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 <david@draw.io>2022-06-22 19:40:07 +0300
committerDavid Benson <david@draw.io>2022-06-22 19:40:07 +0300
commit1d081c7c147ac981d44b16d63d2bbae9ce2db7d4 (patch)
treee6ce1162411668003a754d51f5408fdc5da56181
parent83157497f3937d2a8cbfaff75d2da816d94d848c (diff)
20.0.3 releasev20.0.3
-rw-r--r--ChangeLog8
-rw-r--r--VERSION2
-rw-r--r--src/main/webapp/js/app.min.js4250
-rw-r--r--src/main/webapp/js/diagramly/App.js4
-rw-r--r--src/main/webapp/js/diagramly/Dialogs.js116
-rw-r--r--src/main/webapp/js/diagramly/Editor.js4
-rw-r--r--src/main/webapp/js/diagramly/EditorUi.js30
-rw-r--r--src/main/webapp/js/diagramly/Init.js2
-rw-r--r--src/main/webapp/js/diagramly/Menus.js10
-rw-r--r--src/main/webapp/js/diagramly/Minimal.js56
-rw-r--r--src/main/webapp/js/diagramly/Pages.js4
-rw-r--r--src/main/webapp/js/grapheditor/Dialogs.js66
-rw-r--r--src/main/webapp/js/grapheditor/EditorUi.js67
-rw-r--r--src/main/webapp/js/integrate.min.js4288
-rw-r--r--src/main/webapp/js/viewer-static.min.js2402
-rw-r--r--src/main/webapp/js/viewer.min.js2402
-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
19 files changed, 6816 insertions, 6901 deletions
diff --git a/ChangeLog b/ChangeLog
index 18305534..5ad6f5d3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+22-JUN-2022: 20.0.3
+
+- Fixes ignored error codes for loading templates
+- Fixes new tab for insert from template URL [2891]
+- Validates dialog size after window resize [2883]
+- Fixes page tabs overflow after format panel toggle
+- Adds Lithuanian and Latvian translations
+
21-JUN-2022: 20.0.2
- Fixes autosize and text editor with spacing [2732]
diff --git a/VERSION b/VERSION
index ea7dcaf8..1d47225e 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-20.0.2 \ No newline at end of file
+20.0.3 \ 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 909679de..40c930e9 100644
--- a/src/main/webapp/js/app.min.js
+++ b/src/main/webapp/js/app.min.js
@@ -457,8 +457,8 @@ window.DRAWIO_GITHUB_ID=window.DRAWIO_GITHUB_ID||"Iv1.98d62f0431e40543";window.D
window.RT_WEBSOCKET_URL=window.RT_WEBSOCKET_URL||"wss://"+("test.draw.io"==window.location.hostname?"app.diagrams.net":window.location.hostname)+"/rt";window.SHAPES_PATH=window.SHAPES_PATH||"shapes";window.GRAPH_IMAGE_PATH=window.GRAPH_IMAGE_PATH||"img";window.ICONSEARCH_PATH=window.ICONSEARCH_PATH||((null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE")||urlParams.dev)&&"file:"!=window.location.protocol?"iconSearch":window.DRAWIO_BASE_URL+"/iconSearch");
window.TEMPLATE_PATH=window.TEMPLATE_PATH||"templates";window.NEW_DIAGRAM_CATS_PATH=window.NEW_DIAGRAM_CATS_PATH||"newDiagramCats";window.PLUGINS_BASE_PATH=window.PLUGINS_BASE_PATH||"";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||RESOURCES_PATH+"/dia";window.DRAWIO_CONFIG=window.DRAWIO_CONFIG||null;window.mxLoadResources=window.mxLoadResources||!1;
window.mxLanguage=window.mxLanguage||function(){var a=urlParams.lang;if(null==a&&"undefined"!=typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).language||null);if(!a&&window.mxIsElectron&&(a=urlParams.appLang,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.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",lt:"Lietuvių",lv:"Latviešu",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)}
"1"==urlParams.extAuth&&/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent)&&(urlParams.gapi="0",urlParams.noDevice="1","1"!=urlParams.lightbox&&(urlParams.lightbox="1",urlParams.layers="1",urlParams.viewerOnlyMsg="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");function setCurrentXml(a,b){null!=window.parent&&null!=window.parent.openFile&&window.parent.openFile.setData(a,b)}
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");
@@ -469,7 +469,7 @@ if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==url
"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");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,ADD_ATTR:["target","content"]};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:"20.0.2",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.0.3",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)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints,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]"!==
@@ -2296,8 +2296,8 @@ H);this.exportColor(G)};this.fromRGB=function(y,F,H,G){0>y&&(y=0);1<y&&(y=1);0>F
function(y,F){return(y=y.match(/^\W*([0-9A-F]{3}([0-9A-F]{3})?)\W*$/i))?(6===y[1].length?this.fromRGB(parseInt(y[1].substr(0,2),16)/255,parseInt(y[1].substr(2,2),16)/255,parseInt(y[1].substr(4,2),16)/255,F):this.fromRGB(parseInt(y[1].charAt(0)+y[1].charAt(0),16)/255,parseInt(y[1].charAt(1)+y[1].charAt(1),16)/255,parseInt(y[1].charAt(2)+y[1].charAt(2),16)/255,F),!0):!1};this.toString=function(){return(256|Math.round(255*this.rgb[0])).toString(16).substr(1)+(256|Math.round(255*this.rgb[1])).toString(16).substr(1)+
(256|Math.round(255*this.rgb[2])).toString(16).substr(1)};var q=this,t="hvs"===this.pickerMode.toLowerCase()?1:0,u=mxJSColor.fetchElement(this.valueElement),x=mxJSColor.fetchElement(this.styleElement),A=!1,E=!1,C=1,D=2,B=4,v=8;u&&(b=function(){q.fromString(u.value,C);p()},mxJSColor.addEvent(u,"keyup",b),mxJSColor.addEvent(u,"input",b),mxJSColor.addEvent(u,"blur",l),u.setAttribute("autocomplete","off"));x&&(x.jscStyle={backgroundImage:x.style.backgroundImage,backgroundColor:x.style.backgroundColor,
color:x.style.color});switch(t){case 0:mxJSColor.requireImage("hs.png");break;case 1:mxJSColor.requireImage("hv.png")}this.importColor()}};mxJSColor.install();
-Editor=function(a,b,f,d,g){mxEventSource.call(this);this.chromeless=null!=a?a:this.chromeless;this.initStencilRegistry();this.graph=d||this.createGraph(b,f);this.editable=null!=g?g:!a;this.undoManager=this.createUndoManager();this.status="";this.getOrCreateFilename=function(){return this.filename||mxResources.get("drawing",[Editor.pageCounter])+".xml"};this.getFilename=function(){return this.filename};this.setStatus=function(e){this.status=e;this.fireEvent(new mxEventObject("statusChanged"))};this.getStatus=
-function(){return this.status};this.graphChangeListener=function(e,k){e=null!=k?k.getProperty("edit"):null;null!=e&&e.ignoreEdit||this.setModified(!0)};this.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.graphChangeListener.apply(this,arguments)}));this.graph.resetViewOnRootChange=!1;this.init()};Editor.pageCounter=0;
+Editor=function(a,b,f,e,g){mxEventSource.call(this);this.chromeless=null!=a?a:this.chromeless;this.initStencilRegistry();this.graph=e||this.createGraph(b,f);this.editable=null!=g?g:!a;this.undoManager=this.createUndoManager();this.status="";this.getOrCreateFilename=function(){return this.filename||mxResources.get("drawing",[Editor.pageCounter])+".xml"};this.getFilename=function(){return this.filename};this.setStatus=function(d){this.status=d;this.fireEvent(new mxEventObject("statusChanged"))};this.getStatus=
+function(){return this.status};this.graphChangeListener=function(d,k){d=null!=k?k.getProperty("edit"):null;null!=d&&d.ignoreEdit||this.setModified(!0)};this.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.graphChangeListener.apply(this,arguments)}));this.graph.resetViewOnRootChange=!1;this.init()};Editor.pageCounter=0;
(function(){try{for(var a=window;null!=a.opener&&"undefined"!==typeof a.opener.Editor&&!isNaN(a.opener.Editor.pageCounter)&&a.opener!=a;)a=a.opener;null!=a&&(a.Editor.pageCounter++,Editor.pageCounter=a.Editor.pageCounter)}catch(b){}})();Editor.defaultHtmlFont='-apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", system-ui, ui-sans-serif, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"';Editor.useLocalStorage="undefined"!=typeof Storage&&mxClient.IS_IOS;
Editor.rowMoveImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAEBAMAAACw6DhOAAAAGFBMVEUzMzP///9tbW1QUFCKiopBQUF8fHxfX1/IXlmXAAAAFElEQVQImWNgNVdzYBAUFBRggLMAEzYBy29kEPgAAAAASUVORK5CYII=":IMAGE_PATH+"/thumb_horz.png";
Editor.lightCheckmarkImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhFQAVAMQfAGxsbHx8fIqKioaGhvb29nJycvr6+sDAwJqamltbW5OTk+np6YGBgeTk5Ly8vJiYmP39/fLy8qWlpa6ursjIyOLi4vj4+N/f3+3t7fT09LCwsHZ2dubm5r6+vmZmZv///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OEY4NTZERTQ5QUFBMTFFMUE5MTVDOTM5MUZGMTE3M0QiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OEY4NTZERTU5QUFBMTFFMUE5MTVDOTM5MUZGMTE3M0QiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4Rjg1NkRFMjlBQUExMUUxQTkxNUM5MzkxRkYxMTczRCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4Rjg1NkRFMzlBQUExMUUxQTkxNUM5MzkxRkYxMTczRCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAB8ALAAAAAAVABUAAAVI4CeOZGmeaKqubKtylktSgCOLRyLd3+QJEJnh4VHcMoOfYQXQLBcBD4PA6ngGlIInEHEhPOANRkaIFhq8SuHCE1Hb8Lh8LgsBADs=":IMAGE_PATH+
@@ -2330,12 +2330,12 @@ Editor.outlineImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53M
Editor.saveImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE5IDEydjdINXYtN0gzdjdjMCAxLjEuOSAyIDIgMmgxNGMxLjEgMCAyLS45IDItMnYtN2gtMnptLTYgLjY3bDIuNTktMi41OEwxNyAxMS41bC01IDUtNS01IDEuNDEtMS40MUwxMSAxMi42N1YzaDJ2OS42N3oiLz48L3N2Zz4=";
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:"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.lightColor="#f0f0f0";Editor.isPngDataUrl=function(a){return null!=a&&"data:image/png;"==a.substring(0,15)};Editor.isPngData=function(a){return 8<a.length&&137==a.charCodeAt(0)&&80==a.charCodeAt(1)&&78==a.charCodeAt(2)&&71==a.charCodeAt(3)&&13==a.charCodeAt(4)&&10==a.charCodeAt(5)&&26==a.charCodeAt(6)&&10==a.charCodeAt(7)};
-Editor.extractGraphModelFromPng=function(a){var b=null;try{var f=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(g,e,k){g=d.substring(g+8,g+8+k);"zTXt"==e?(k=g.indexOf(String.fromCharCode(0)),"mxGraphModel"==g.substring(0,k)&&(g=pako.inflateRaw(Graph.stringToArrayBuffer(g.substring(k+2)),{to:"string"}).replace(/\+/g," "),null!=g&&0<g.length&&(b=g))):"tEXt"==e&&(g=g.split(String.fromCharCode(0)),1<g.length&&("mxGraphModel"==
-g[0]||"mxfile"==g[0])&&(b=g[1]));if(null!=b||"IDAT"==e)return!0}))}catch(g){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};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.extractGraphModelFromPng=function(a){var b=null;try{var f=a.substring(a.indexOf(",")+1),e=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0);EditorUi.parsePng(e,mxUtils.bind(this,function(g,d,k){g=e.substring(g+8,g+8+k);"zTXt"==d?(k=g.indexOf(String.fromCharCode(0)),"mxGraphModel"==g.substring(0,k)&&(g=pako.inflateRaw(Graph.stringToArrayBuffer(g.substring(k+2)),{to:"string"}).replace(/\+/g," "),null!=g&&0<g.length&&(b=g))):"tEXt"==d&&(g=g.split(String.fromCharCode(0)),1<g.length&&("mxGraphModel"==
+g[0]||"mxfile"==g[0])&&(b=g[1]));if(null!=b||"IDAT"==d)return!0}))}catch(g){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};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){b=null!=b?"?title="+encodeURIComponent(b):"";null!=urlParams.ui&&(b+=(0<b.length?"&":"?")+"ui="+urlParams.ui);if("undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var f=null,d=mxUtils.bind(this,function(g){"ready"==g.data&&g.source==f&&(mxEvent.removeListener(window,"message",d),f.postMessage(a,"*"))});mxEvent.addListener(window,"message",d);f=this.graph.openLink(this.getEditBlankUrl(b+(0<b.length?"&":"?")+"client=1"),
-null,!0)}else this.graph.openLink(this.getEditBlankUrl(b)+"#R"+encodeURIComponent(a))};Editor.prototype.createGraph=function(a,b){a=new Graph(null,b,null,null,a);a.transparentBackground=!1;var f=a.isCssTransformsSupported,d=this;a.isCssTransformsSupported=function(){return f.apply(this,arguments)&&(!d.chromeless||!mxClient.IS_SF)};this.chromeless||(a.isBlankLink=function(g){return!this.isExternalProtocol(g)});return a};
+Editor.prototype.editAsNew=function(a,b){b=null!=b?"?title="+encodeURIComponent(b):"";null!=urlParams.ui&&(b+=(0<b.length?"&":"?")+"ui="+urlParams.ui);if("undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var f=null,e=mxUtils.bind(this,function(g){"ready"==g.data&&g.source==f&&(mxEvent.removeListener(window,"message",e),f.postMessage(a,"*"))});mxEvent.addListener(window,"message",e);f=this.graph.openLink(this.getEditBlankUrl(b+(0<b.length?"&":"?")+"client=1"),
+null,!0)}else this.graph.openLink(this.getEditBlankUrl(b)+"#R"+encodeURIComponent(a))};Editor.prototype.createGraph=function(a,b){a=new Graph(null,b,null,null,a);a.transparentBackground=!1;var f=a.isCssTransformsSupported,e=this;a.isCssTransformsSupported=function(){return f.apply(this,arguments)&&(!e.chromeless||!mxClient.IS_SF)};this.chromeless||(a.isBlankLink=function(g){return!this.isExternalProtocol(g)});return a};
Editor.prototype.resetGraph=function(){this.graph.gridEnabled=this.graph.defaultGridEnabled&&(!this.isChromelessView()||"1"==urlParams.grid);this.graph.graphHandler.guidesEnabled=!0;this.graph.setTooltips(!0);this.graph.setConnectable(!0);this.graph.foldingEnabled=!0;this.graph.scrollbars=this.graph.defaultScrollbars;this.graph.pageVisible=this.graph.defaultPageVisible;this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=this.graph.pageBreaksVisible;this.graph.background=
null;this.graph.pageScale=mxGraph.prototype.pageScale;this.graph.pageFormat=mxGraph.prototype.pageFormat;this.graph.currentScale=1;this.graph.currentTranslate.x=0;this.graph.currentTranslate.y=0;this.updateGraphComponents();this.graph.view.setScale(1)};
Editor.prototype.readGraphState=function(a){var b=a.getAttribute("grid");if(null==b||""==b)b=this.graph.defaultGridEnabled?"1":"0";this.graph.gridEnabled="0"!=b&&(!this.isChromelessView()||"1"==urlParams.grid);this.graph.gridSize=parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize;this.graph.graphHandler.guidesEnabled="0"!=a.getAttribute("guides");this.graph.setTooltips("0"!=a.getAttribute("tooltips"));this.graph.setConnectable("0"!=a.getAttribute("connect"));this.graph.connectionArrowsEnabled=
@@ -2347,62 +2347,62 @@ Editor.prototype.getGraphXml=function(a){a=(null!=a?a:1)?(new mxCodec(mxUtils.cr
this.graph.gridSize);a.setAttribute("guides",this.graph.graphHandler.guidesEnabled?"1":"0");a.setAttribute("tooltips",this.graph.tooltipHandler.isEnabled()?"1":"0");a.setAttribute("connect",this.graph.connectionHandler.isEnabled()?"1":"0");a.setAttribute("arrows",this.graph.connectionArrowsEnabled?"1":"0");a.setAttribute("fold",this.graph.foldingEnabled?"1":"0");a.setAttribute("page",this.graph.pageVisible?"1":"0");a.setAttribute("pageScale",this.graph.pageScale);a.setAttribute("pageWidth",this.graph.pageFormat.width);
a.setAttribute("pageHeight",this.graph.pageFormat.height);null!=this.graph.background&&a.setAttribute("background",this.graph.background);return a};Editor.prototype.updateGraphComponents=function(){var a=this.graph;null!=a.container&&(a.view.validateBackground(),a.container.style.overflow=a.scrollbars?"auto":this.defaultGraphOverflow,this.fireEvent(new mxEventObject("updateGraphComponents")))};Editor.prototype.setModified=function(a){this.modified=a};
Editor.prototype.setFilename=function(a){this.filename=a};
-Editor.prototype.createUndoManager=function(){var a=this.graph,b=new mxUndoManager;this.undoListener=function(d,g){b.undoableEditHappened(g.getProperty("edit"))};var f=mxUtils.bind(this,function(d,g){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,f);a.getView().addListener(mxEvent.UNDO,f);f=function(d,g){d=a.getSelectionCellsForChanges(g.getProperty("edit").changes,function(k){return!(k instanceof mxChildChange)});if(0<d.length){a.getModel();g=[];for(var e=0;e<d.length;e++)null!=
-a.view.getState(d[e])&&g.push(d[e]);a.setSelectionCells(g)}};b.addListener(mxEvent.UNDO,f);b.addListener(mxEvent.REDO,f);return b};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};
+Editor.prototype.createUndoManager=function(){var a=this.graph,b=new mxUndoManager;this.undoListener=function(e,g){b.undoableEditHappened(g.getProperty("edit"))};var f=mxUtils.bind(this,function(e,g){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,f);a.getView().addListener(mxEvent.UNDO,f);f=function(e,g){e=a.getSelectionCellsForChanges(g.getProperty("edit").changes,function(k){return!(k instanceof mxChildChange)});if(0<e.length){a.getModel();g=[];for(var d=0;d<e.length;d++)null!=
+a.view.getState(e[d])&&g.push(e[d]);a.setSelectionCells(g)}};b.addListener(mxEvent.UNDO,f);b.addListener(mxEvent.REDO,f);return b};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};
OpenFile.prototype.error=function(a){this.cancel(!0);mxUtils.alert(a)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(a){null!=this.done&&this.done(null!=a?a:!0)};
-function Dialog(a,b,f,d,g,e,k,n,u,m,r){var x=u?57:0,B=f,C=d,G=u?0:64,J=Editor.inlineFullscreen||null==a.embedViewport?mxUtils.getDocumentSize():mxUtils.clone(a.embedViewport);null==a.embedViewport&&null!=window.innerHeight&&(J.height=window.innerHeight);var D=J.height,N=Math.max(1,Math.round((J.width-f-G)/2)),Q=Math.max(1,Math.round((D-d-a.footerHeight)/3));b.style.maxHeight="100%";f=null!=document.body?Math.min(f,document.body.scrollWidth-G):f;d=Math.min(d,D-G);0<a.dialogs.length&&(this.zIndex+=
-2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=D+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));J=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=J.x+"px";this.bg.style.top=J.y+"px";N+=J.x;Q+=J.y;Editor.inlineFullscreen||null==a.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px",
-Q+=a.embedViewport.y,N+=a.embedViewport.x);g&&document.body.appendChild(this.bg);var R=a.createDiv(u?"geTransDialog":"geDialog");g=this.getPosition(N,Q,f,d);N=g.x;Q=g.y;R.style.width=f+"px";R.style.height=d+"px";R.style.left=N+"px";R.style.top=Q+"px";R.style.zIndex=this.zIndex;R.appendChild(b);document.body.appendChild(R);!n&&b.clientHeight>R.clientHeight-G&&(b.style.overflowY="auto");b.style.overflowX="hidden";if(e&&(e=document.createElement("img"),e.setAttribute("src",Dialog.prototype.closeImage),
-e.setAttribute("title",mxResources.get("close")),e.className="geDialogClose",e.style.top=Q+14+"px",e.style.left=N+f+38-x+"px",e.style.zIndex=this.zIndex,mxEvent.addListener(e,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(e),this.dialogImg=e,!r)){var P=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(Z){P=!0}),null,mxUtils.bind(this,function(Z){P&&(a.hideDialog(!0),P=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=m){var Z=m();
-null!=Z&&(B=f=Z.w,C=d=Z.h)}Z=mxUtils.getDocumentSize();D=Z.height;this.bg.style.height=D+"px";Editor.inlineFullscreen||null==a.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");N=Math.max(1,Math.round((Z.width-f-G)/2));Q=Math.max(1,Math.round((D-d-a.footerHeight)/3));f=null!=document.body?Math.min(B,document.body.scrollWidth-G):B;d=Math.min(C,D-G);Z=this.getPosition(N,Q,f,d);N=Z.x;Q=Z.y;R.style.left=N+"px";R.style.top=Q+"px";R.style.width=f+"px";R.style.height=d+"px";!n&&
-b.clientHeight>R.clientHeight-G&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=Q+14+"px",this.dialogImg.style.left=N+f+38-x+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=k;this.container=R;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
+function Dialog(a,b,f,e,g,d,k,n,u,m,r){var x=u?57:0,B=f,C=e,F=u?0:64,J=Editor.inlineFullscreen||null==a.embedViewport?mxUtils.getDocumentSize():mxUtils.clone(a.embedViewport);null==a.embedViewport&&null!=window.innerHeight&&(J.height=window.innerHeight);var D=J.height,N=Math.max(1,Math.round((J.width-f-F)/2)),S=Math.max(1,Math.round((D-e-a.footerHeight)/3));b.style.maxHeight="100%";f=null!=document.body?Math.min(f,document.body.scrollWidth-F):f;e=Math.min(e,D-F);0<a.dialogs.length&&(this.zIndex+=
+2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=D+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));J=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=J.x+"px";this.bg.style.top=J.y+"px";N+=J.x;S+=J.y;Editor.inlineFullscreen||null==a.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px",
+S+=a.embedViewport.y,N+=a.embedViewport.x);g&&document.body.appendChild(this.bg);var T=a.createDiv(u?"geTransDialog":"geDialog");g=this.getPosition(N,S,f,e);N=g.x;S=g.y;T.style.width=f+"px";T.style.height=e+"px";T.style.left=N+"px";T.style.top=S+"px";T.style.zIndex=this.zIndex;T.appendChild(b);document.body.appendChild(T);!n&&b.clientHeight>T.clientHeight-F&&(b.style.overflowY="auto");b.style.overflowX="hidden";if(d&&(d=document.createElement("img"),d.setAttribute("src",Dialog.prototype.closeImage),
+d.setAttribute("title",mxResources.get("close")),d.className="geDialogClose",d.style.top=S+14+"px",d.style.left=N+f+38-x+"px",d.style.zIndex=this.zIndex,mxEvent.addListener(d,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(d),this.dialogImg=d,!r)){var P=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(Z){P=!0}),null,mxUtils.bind(this,function(Z){P&&(a.hideDialog(!0),P=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=m){var Z=m();
+null!=Z&&(B=f=Z.w,C=e=Z.h)}Z=mxUtils.getDocumentSize();D=Z.height;this.bg.style.height=D+"px";Editor.inlineFullscreen||null==a.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");N=Math.max(1,Math.round((Z.width-f-F)/2));S=Math.max(1,Math.round((D-e-a.footerHeight)/3));f=null!=document.body?Math.min(B,document.body.scrollWidth-F):B;e=Math.min(C,D-F);Z=this.getPosition(N,S,f,e);N=Z.x;S=Z.y;T.style.left=N+"px";T.style.top=S+"px";T.style.width=f+"px";T.style.height=e+"px";!n&&
+b.clientHeight>T.clientHeight-F&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=S+14+"px",this.dialogImg.style.left=N+f+38-x+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=k;this.container=T;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":IMAGE_PATH+
"/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png";
Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==":IMAGE_PATH+
"/clear.gif";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(a,b){return new mxPoint(a,b)};Dialog.prototype.close=function(a,b){if(null!=this.onDialogClose){if(0==this.onDialogClose(a,b))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)};
-var ErrorDialog=function(a,b,f,d,g,e,k,n,u,m,r){u=null!=u?u:!0;var x=document.createElement("div");x.style.textAlign="center";if(null!=b){var B=document.createElement("div");B.style.padding="0px";B.style.margin="0px";B.style.fontSize="18px";B.style.paddingBottom="16px";B.style.marginBottom="10px";B.style.borderBottom="1px solid #c0c0c0";B.style.color="gray";B.style.whiteSpace="nowrap";B.style.textOverflow="ellipsis";B.style.overflow="hidden";mxUtils.write(B,b);B.setAttribute("title",b);x.appendChild(B)}b=
-document.createElement("div");b.style.lineHeight="1.2em";b.style.padding="6px";b.innerHTML=f;x.appendChild(b);f=document.createElement("div");f.style.marginTop="12px";f.style.textAlign="center";null!=e&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();e()}),b.className="geBtn",f.appendChild(b),f.style.textAlign="center");null!=m&&(m=mxUtils.button(m,function(){null!=r&&r()}),m.className="geBtn",f.appendChild(m));var C=mxUtils.button(d,function(){u&&a.hideDialog();null!=g&&g()});
-C.className="geBtn";f.appendChild(C);null!=k&&(d=mxUtils.button(k,function(){u&&a.hideDialog();null!=n&&n()}),d.className="geBtn gePrimaryBtn",f.appendChild(d));this.init=function(){C.focus()};x.appendChild(f);this.container=x},PrintDialog=function(a,b){this.create(a,b)};
-PrintDialog.prototype.create=function(a){function b(C){var G=k.checked||m.checked,J=parseInt(x.value)/100;isNaN(J)&&(J=1,x.value="100%");J*=.75;var D=f.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,N=1/f.pageScale;if(G){var Q=k.checked?1:parseInt(r.value);isNaN(Q)||(N=mxUtils.getScaleForPageCount(Q,f,D))}f.getGraphBounds();var R=Q=0;D=mxRectangle.fromRectangle(D);D.width=Math.ceil(D.width*J);D.height=Math.ceil(D.height*J);N*=J;!G&&f.pageVisible?(J=f.getPageLayout(),Q-=J.x*D.width,R-=J.y*D.height):
-G=!0;G=PrintDialog.createPrintPreview(f,N,D,0,Q,R,G);G.open();C&&PrintDialog.printPreview(G)}var f=a.editor.graph,d=document.createElement("table");d.style.width="100%";d.style.height="100%";var g=document.createElement("tbody");var e=document.createElement("tr");var k=document.createElement("input");k.setAttribute("type","checkbox");var n=document.createElement("td");n.setAttribute("colspan","2");n.style.fontSize="10pt";n.appendChild(k);var u=document.createElement("span");mxUtils.write(u," "+mxResources.get("fitPage"));
-n.appendChild(u);mxEvent.addListener(u,"click",function(C){k.checked=!k.checked;m.checked=!k.checked;mxEvent.consume(C)});mxEvent.addListener(k,"change",function(){m.checked=!k.checked});e.appendChild(n);g.appendChild(e);e=e.cloneNode(!1);var m=document.createElement("input");m.setAttribute("type","checkbox");n=document.createElement("td");n.style.fontSize="10pt";n.appendChild(m);u=document.createElement("span");mxUtils.write(u," "+mxResources.get("posterPrint")+":");n.appendChild(u);mxEvent.addListener(u,
-"click",function(C){m.checked=!m.checked;k.checked=!m.checked;mxEvent.consume(C)});e.appendChild(n);var r=document.createElement("input");r.setAttribute("value","1");r.setAttribute("type","number");r.setAttribute("min","1");r.setAttribute("size","4");r.setAttribute("disabled","disabled");r.style.width="50px";n=document.createElement("td");n.style.fontSize="10pt";n.appendChild(r);mxUtils.write(n," "+mxResources.get("pages")+" (max)");e.appendChild(n);g.appendChild(e);mxEvent.addListener(m,"change",
-function(){m.checked?r.removeAttribute("disabled"):r.setAttribute("disabled","disabled");k.checked=!m.checked});e=e.cloneNode(!1);n=document.createElement("td");mxUtils.write(n,mxResources.get("pageScale")+":");e.appendChild(n);n=document.createElement("td");var x=document.createElement("input");x.setAttribute("value","100 %");x.setAttribute("size","5");x.style.width="50px";n.appendChild(x);e.appendChild(n);g.appendChild(e);e=document.createElement("tr");n=document.createElement("td");n.colSpan=2;
+var ErrorDialog=function(a,b,f,e,g,d,k,n,u,m,r){u=null!=u?u:!0;var x=document.createElement("div");x.style.textAlign="center";if(null!=b){var B=document.createElement("div");B.style.padding="0px";B.style.margin="0px";B.style.fontSize="18px";B.style.paddingBottom="16px";B.style.marginBottom="10px";B.style.borderBottom="1px solid #c0c0c0";B.style.color="gray";B.style.whiteSpace="nowrap";B.style.textOverflow="ellipsis";B.style.overflow="hidden";mxUtils.write(B,b);B.setAttribute("title",b);x.appendChild(B)}b=
+document.createElement("div");b.style.lineHeight="1.2em";b.style.padding="6px";b.innerHTML=f;x.appendChild(b);f=document.createElement("div");f.style.marginTop="12px";f.style.textAlign="center";null!=d&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();d()}),b.className="geBtn",f.appendChild(b),f.style.textAlign="center");null!=m&&(m=mxUtils.button(m,function(){null!=r&&r()}),m.className="geBtn",f.appendChild(m));var C=mxUtils.button(e,function(){u&&a.hideDialog();null!=g&&g()});
+C.className="geBtn";f.appendChild(C);null!=k&&(e=mxUtils.button(k,function(){u&&a.hideDialog();null!=n&&n()}),e.className="geBtn gePrimaryBtn",f.appendChild(e));this.init=function(){C.focus()};x.appendChild(f);this.container=x},PrintDialog=function(a,b){this.create(a,b)};
+PrintDialog.prototype.create=function(a){function b(C){var F=k.checked||m.checked,J=parseInt(x.value)/100;isNaN(J)&&(J=1,x.value="100%");J*=.75;var D=f.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,N=1/f.pageScale;if(F){var S=k.checked?1:parseInt(r.value);isNaN(S)||(N=mxUtils.getScaleForPageCount(S,f,D))}f.getGraphBounds();var T=S=0;D=mxRectangle.fromRectangle(D);D.width=Math.ceil(D.width*J);D.height=Math.ceil(D.height*J);N*=J;!F&&f.pageVisible?(J=f.getPageLayout(),S-=J.x*D.width,T-=J.y*D.height):
+F=!0;F=PrintDialog.createPrintPreview(f,N,D,0,S,T,F);F.open();C&&PrintDialog.printPreview(F)}var f=a.editor.graph,e=document.createElement("table");e.style.width="100%";e.style.height="100%";var g=document.createElement("tbody");var d=document.createElement("tr");var k=document.createElement("input");k.setAttribute("type","checkbox");var n=document.createElement("td");n.setAttribute("colspan","2");n.style.fontSize="10pt";n.appendChild(k);var u=document.createElement("span");mxUtils.write(u," "+mxResources.get("fitPage"));
+n.appendChild(u);mxEvent.addListener(u,"click",function(C){k.checked=!k.checked;m.checked=!k.checked;mxEvent.consume(C)});mxEvent.addListener(k,"change",function(){m.checked=!k.checked});d.appendChild(n);g.appendChild(d);d=d.cloneNode(!1);var m=document.createElement("input");m.setAttribute("type","checkbox");n=document.createElement("td");n.style.fontSize="10pt";n.appendChild(m);u=document.createElement("span");mxUtils.write(u," "+mxResources.get("posterPrint")+":");n.appendChild(u);mxEvent.addListener(u,
+"click",function(C){m.checked=!m.checked;k.checked=!m.checked;mxEvent.consume(C)});d.appendChild(n);var r=document.createElement("input");r.setAttribute("value","1");r.setAttribute("type","number");r.setAttribute("min","1");r.setAttribute("size","4");r.setAttribute("disabled","disabled");r.style.width="50px";n=document.createElement("td");n.style.fontSize="10pt";n.appendChild(r);mxUtils.write(n," "+mxResources.get("pages")+" (max)");d.appendChild(n);g.appendChild(d);mxEvent.addListener(m,"change",
+function(){m.checked?r.removeAttribute("disabled"):r.setAttribute("disabled","disabled");k.checked=!m.checked});d=d.cloneNode(!1);n=document.createElement("td");mxUtils.write(n,mxResources.get("pageScale")+":");d.appendChild(n);n=document.createElement("td");var x=document.createElement("input");x.setAttribute("value","100 %");x.setAttribute("size","5");x.style.width="50px";n.appendChild(x);d.appendChild(n);g.appendChild(d);d=document.createElement("tr");n=document.createElement("td");n.colSpan=2;
n.style.paddingTop="20px";n.setAttribute("align","right");u=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});u.className="geBtn";a.editor.cancelFirst&&n.appendChild(u);if(PrintDialog.previewEnabled){var B=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});B.className="geBtn";n.appendChild(B)}B=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});B.className="geBtn gePrimaryBtn";n.appendChild(B);a.editor.cancelFirst||
-n.appendChild(u);e.appendChild(n);g.appendChild(e);d.appendChild(g);this.container=d};PrintDialog.printPreview=function(a){try{if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}}catch(f){}};
-PrintDialog.createPrintPreview=function(a,b,f,d,g,e,k){b=new mxPrintPreview(a,b,f,d,g,e);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=k;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var n=b.writeHead;b.writeHead=function(u){n.apply(this,arguments);u.writeln('<style type="text/css">');u.writeln("@media screen {");u.writeln(" body > div { padding:30px;box-sizing:content-box; }");u.writeln("}");u.writeln("</style>")};return b};
+n.appendChild(u);d.appendChild(n);g.appendChild(d);e.appendChild(g);this.container=e};PrintDialog.printPreview=function(a){try{if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}}catch(f){}};
+PrintDialog.createPrintPreview=function(a,b,f,e,g,d,k){b=new mxPrintPreview(a,b,f,e,g,d);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=k;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var n=b.writeHead;b.writeHead=function(u){n.apply(this,arguments);u.writeln('<style type="text/css">');u.writeln("@media screen {");u.writeln(" body > div { padding:30px;box-sizing:content-box; }");u.writeln("}");u.writeln("</style>")};return b};
PrintDialog.previewEnabled=!0;
-var PageSetupDialog=function(a){function b(){null==r||r==mxConstants.NONE?(m.style.backgroundColor="",m.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(m.style.backgroundColor=r,m.style.backgroundImage="")}function f(){var D=G;null!=D&&Graph.isPageLink(D.src)&&(D=a.createImageForPageLink(D.src,null));null!=D&&null!=D.src?(C.setAttribute("src",D.src),C.style.display=""):(C.removeAttribute("src"),C.style.display="none")}var d=a.editor.graph,g=document.createElement("table");g.style.width=
-"100%";g.style.height="100%";var e=document.createElement("tbody");var k=document.createElement("tr");var n=document.createElement("td");n.style.verticalAlign="top";n.style.fontSize="10pt";mxUtils.write(n,mxResources.get("paperSize")+":");k.appendChild(n);n=document.createElement("td");n.style.verticalAlign="top";n.style.fontSize="10pt";var u=PageSetupDialog.addPageFormatPanel(n,"pagesetupdialog",d.pageFormat);k.appendChild(n);e.appendChild(k);k=document.createElement("tr");n=document.createElement("td");
-mxUtils.write(n,mxResources.get("background")+":");k.appendChild(n);n=document.createElement("td");n.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var m=document.createElement("button");m.style.width="22px";m.style.height="22px";m.style.cursor="pointer";m.style.marginRight="20px";m.style.backgroundPosition="center center";m.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(m.style.position="relative",m.style.top="-6px");var r=d.background;b();mxEvent.addListener(m,
-"click",function(D){a.pickColor(r||"none",function(N){r=N;b()});mxEvent.consume(D)});n.appendChild(m);mxUtils.write(n,mxResources.get("gridSize")+":");var x=document.createElement("input");x.setAttribute("type","number");x.setAttribute("min","0");x.style.width="40px";x.style.marginLeft="6px";x.value=d.getGridSize();n.appendChild(x);mxEvent.addListener(x,"change",function(){var D=parseInt(x.value);x.value=Math.max(1,isNaN(D)?d.getGridSize():D)});k.appendChild(n);e.appendChild(k);k=document.createElement("tr");
+var PageSetupDialog=function(a){function b(){null==r||r==mxConstants.NONE?(m.style.backgroundColor="",m.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(m.style.backgroundColor=r,m.style.backgroundImage="")}function f(){var D=F;null!=D&&Graph.isPageLink(D.src)&&(D=a.createImageForPageLink(D.src,null));null!=D&&null!=D.src?(C.setAttribute("src",D.src),C.style.display=""):(C.removeAttribute("src"),C.style.display="none")}var e=a.editor.graph,g=document.createElement("table");g.style.width=
+"100%";g.style.height="100%";var d=document.createElement("tbody");var k=document.createElement("tr");var n=document.createElement("td");n.style.verticalAlign="top";n.style.fontSize="10pt";mxUtils.write(n,mxResources.get("paperSize")+":");k.appendChild(n);n=document.createElement("td");n.style.verticalAlign="top";n.style.fontSize="10pt";var u=PageSetupDialog.addPageFormatPanel(n,"pagesetupdialog",e.pageFormat);k.appendChild(n);d.appendChild(k);k=document.createElement("tr");n=document.createElement("td");
+mxUtils.write(n,mxResources.get("background")+":");k.appendChild(n);n=document.createElement("td");n.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var m=document.createElement("button");m.style.width="22px";m.style.height="22px";m.style.cursor="pointer";m.style.marginRight="20px";m.style.backgroundPosition="center center";m.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(m.style.position="relative",m.style.top="-6px");var r=e.background;b();mxEvent.addListener(m,
+"click",function(D){a.pickColor(r||"none",function(N){r=N;b()});mxEvent.consume(D)});n.appendChild(m);mxUtils.write(n,mxResources.get("gridSize")+":");var x=document.createElement("input");x.setAttribute("type","number");x.setAttribute("min","0");x.style.width="40px";x.style.marginLeft="6px";x.value=e.getGridSize();n.appendChild(x);mxEvent.addListener(x,"change",function(){var D=parseInt(x.value);x.value=Math.max(1,isNaN(D)?e.getGridSize():D)});k.appendChild(n);d.appendChild(k);k=document.createElement("tr");
n=document.createElement("td");mxUtils.write(n,mxResources.get("image")+":");k.appendChild(n);n=document.createElement("td");var B=document.createElement("button");B.className="geBtn";B.style.margin="0px";mxUtils.write(B,mxResources.get("change")+"...");var C=document.createElement("img");C.setAttribute("valign","middle");C.style.verticalAlign="middle";C.style.border="1px solid lightGray";C.style.borderRadius="4px";C.style.marginRight="14px";C.style.maxWidth="100px";C.style.cursor="pointer";C.style.height=
-"60px";C.style.padding="4px";var G=d.backgroundImage,J=function(D){a.showBackgroundImageDialog(function(N,Q){Q||(G=N,f())},G);mxEvent.consume(D)};mxEvent.addListener(B,"click",J);mxEvent.addListener(C,"click",J);f();n.appendChild(C);n.appendChild(B);k.appendChild(n);e.appendChild(k);k=document.createElement("tr");n=document.createElement("td");n.colSpan=2;n.style.paddingTop="16px";n.setAttribute("align","right");B=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});B.className="geBtn";
-a.editor.cancelFirst&&n.appendChild(B);J=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var D=parseInt(x.value);isNaN(D)||d.gridSize===D||d.setGridSize(D);D=new ChangePageSetup(a,r,G,u.get());D.ignoreColor=d.background==r;D.ignoreImage=(null!=d.backgroundImage?d.backgroundImage.src:null)===(null!=G?G.src:null);d.pageFormat.width==D.previousFormat.width&&d.pageFormat.height==D.previousFormat.height&&D.ignoreColor&&D.ignoreImage||d.model.execute(D)});J.className="geBtn gePrimaryBtn";
-n.appendChild(J);a.editor.cancelFirst||n.appendChild(B);k.appendChild(n);e.appendChild(k);g.appendChild(e);this.container=g};
-PageSetupDialog.addPageFormatPanel=function(a,b,f,d){function g(Z,U,V){if(V||x!=document.activeElement&&B!=document.activeElement){Z=!1;for(U=0;U<G.length;U++)V=G[U],Q?"custom"==V.key&&(n.value=V.key,Q=!1):null!=V.format&&("a4"==V.key?826==f.width?(f=mxRectangle.fromRectangle(f),f.width=827):826==f.height&&(f=mxRectangle.fromRectangle(f),f.height=827):"a5"==V.key&&(584==f.width?(f=mxRectangle.fromRectangle(f),f.width=583):584==f.height&&(f=mxRectangle.fromRectangle(f),f.height=583)),f.width==V.format.width&&
-f.height==V.format.height?(n.value=V.key,e.setAttribute("checked","checked"),e.defaultChecked=!0,e.checked=!0,k.removeAttribute("checked"),k.defaultChecked=!1,k.checked=!1,Z=!0):f.width==V.format.height&&f.height==V.format.width&&(n.value=V.key,e.removeAttribute("checked"),e.defaultChecked=!1,e.checked=!1,k.setAttribute("checked","checked"),k.defaultChecked=!0,Z=k.checked=!0));Z?(u.style.display="",r.style.display="none"):(x.value=f.width/100,B.value=f.height/100,e.setAttribute("checked","checked"),
-n.value="custom",u.style.display="none",r.style.display="")}}b="format-"+b;var e=document.createElement("input");e.setAttribute("name",b);e.setAttribute("type","radio");e.setAttribute("value","portrait");var k=document.createElement("input");k.setAttribute("name",b);k.setAttribute("type","radio");k.setAttribute("value","landscape");var n=document.createElement("select");n.style.marginBottom="8px";n.style.borderRadius="4px";n.style.border="1px solid rgb(160, 160, 160)";n.style.width="206px";var u=
-document.createElement("div");u.style.marginLeft="4px";u.style.width="210px";u.style.height="24px";e.style.marginRight="6px";u.appendChild(e);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));u.appendChild(b);k.style.marginLeft="10px";k.style.marginRight="6px";u.appendChild(k);var m=document.createElement("span");m.style.width="100px";mxUtils.write(m,mxResources.get("landscape"));u.appendChild(m);var r=document.createElement("div");r.style.marginLeft=
-"4px";r.style.width="210px";r.style.height="24px";var x=document.createElement("input");x.setAttribute("size","7");x.style.textAlign="right";r.appendChild(x);mxUtils.write(r," in x ");var B=document.createElement("input");B.setAttribute("size","7");B.style.textAlign="right";r.appendChild(B);mxUtils.write(r," in");u.style.display="none";r.style.display="none";for(var C={},G=PageSetupDialog.getFormats(),J=0;J<G.length;J++){var D=G[J];C[D.key]=D;var N=document.createElement("option");N.setAttribute("value",
-D.key);mxUtils.write(N,D.title);n.appendChild(N)}var Q=!1;g();a.appendChild(n);mxUtils.br(a);a.appendChild(u);a.appendChild(r);var R=f,P=function(Z,U){Z=C[n.value];null!=Z.format?(x.value=Z.format.width/100,B.value=Z.format.height/100,r.style.display="none",u.style.display=""):(u.style.display="none",r.style.display="");Z=parseFloat(x.value);if(isNaN(Z)||0>=Z)x.value=f.width/100;Z=parseFloat(B.value);if(isNaN(Z)||0>=Z)B.value=f.height/100;Z=new mxRectangle(0,0,Math.floor(100*parseFloat(x.value)),
-Math.floor(100*parseFloat(B.value)));"custom"!=n.value&&k.checked&&(Z=new mxRectangle(0,0,Z.height,Z.width));U&&Q||Z.width==R.width&&Z.height==R.height||(R=Z,null!=d&&d(R))};mxEvent.addListener(b,"click",function(Z){e.checked=!0;P(Z);mxEvent.consume(Z)});mxEvent.addListener(m,"click",function(Z){k.checked=!0;P(Z);mxEvent.consume(Z)});mxEvent.addListener(x,"blur",P);mxEvent.addListener(x,"click",P);mxEvent.addListener(B,"blur",P);mxEvent.addListener(B,"click",P);mxEvent.addListener(k,"change",P);mxEvent.addListener(e,
-"change",P);mxEvent.addListener(n,"change",function(Z){Q="custom"==n.value;P(Z,!0)});P();return{set:function(Z){f=Z;g(null,null,!0)},get:function(){return R},widthInput:x,heightInput:B}};
+"60px";C.style.padding="4px";var F=e.backgroundImage,J=function(D){a.showBackgroundImageDialog(function(N,S){S||(F=N,f())},F);mxEvent.consume(D)};mxEvent.addListener(B,"click",J);mxEvent.addListener(C,"click",J);f();n.appendChild(C);n.appendChild(B);k.appendChild(n);d.appendChild(k);k=document.createElement("tr");n=document.createElement("td");n.colSpan=2;n.style.paddingTop="16px";n.setAttribute("align","right");B=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});B.className="geBtn";
+a.editor.cancelFirst&&n.appendChild(B);J=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var D=parseInt(x.value);isNaN(D)||e.gridSize===D||e.setGridSize(D);D=new ChangePageSetup(a,r,F,u.get());D.ignoreColor=e.background==r;D.ignoreImage=(null!=e.backgroundImage?e.backgroundImage.src:null)===(null!=F?F.src:null);e.pageFormat.width==D.previousFormat.width&&e.pageFormat.height==D.previousFormat.height&&D.ignoreColor&&D.ignoreImage||e.model.execute(D)});J.className="geBtn gePrimaryBtn";
+n.appendChild(J);a.editor.cancelFirst||n.appendChild(B);k.appendChild(n);d.appendChild(k);g.appendChild(d);this.container=g};
+PageSetupDialog.addPageFormatPanel=function(a,b,f,e){function g(Z,U,V){if(V||x!=document.activeElement&&B!=document.activeElement){Z=!1;for(U=0;U<F.length;U++)V=F[U],S?"custom"==V.key&&(n.value=V.key,S=!1):null!=V.format&&("a4"==V.key?826==f.width?(f=mxRectangle.fromRectangle(f),f.width=827):826==f.height&&(f=mxRectangle.fromRectangle(f),f.height=827):"a5"==V.key&&(584==f.width?(f=mxRectangle.fromRectangle(f),f.width=583):584==f.height&&(f=mxRectangle.fromRectangle(f),f.height=583)),f.width==V.format.width&&
+f.height==V.format.height?(n.value=V.key,d.setAttribute("checked","checked"),d.defaultChecked=!0,d.checked=!0,k.removeAttribute("checked"),k.defaultChecked=!1,k.checked=!1,Z=!0):f.width==V.format.height&&f.height==V.format.width&&(n.value=V.key,d.removeAttribute("checked"),d.defaultChecked=!1,d.checked=!1,k.setAttribute("checked","checked"),k.defaultChecked=!0,Z=k.checked=!0));Z?(u.style.display="",r.style.display="none"):(x.value=f.width/100,B.value=f.height/100,d.setAttribute("checked","checked"),
+n.value="custom",u.style.display="none",r.style.display="")}}b="format-"+b;var d=document.createElement("input");d.setAttribute("name",b);d.setAttribute("type","radio");d.setAttribute("value","portrait");var k=document.createElement("input");k.setAttribute("name",b);k.setAttribute("type","radio");k.setAttribute("value","landscape");var n=document.createElement("select");n.style.marginBottom="8px";n.style.borderRadius="4px";n.style.border="1px solid rgb(160, 160, 160)";n.style.width="206px";var u=
+document.createElement("div");u.style.marginLeft="4px";u.style.width="210px";u.style.height="24px";d.style.marginRight="6px";u.appendChild(d);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));u.appendChild(b);k.style.marginLeft="10px";k.style.marginRight="6px";u.appendChild(k);var m=document.createElement("span");m.style.width="100px";mxUtils.write(m,mxResources.get("landscape"));u.appendChild(m);var r=document.createElement("div");r.style.marginLeft=
+"4px";r.style.width="210px";r.style.height="24px";var x=document.createElement("input");x.setAttribute("size","7");x.style.textAlign="right";r.appendChild(x);mxUtils.write(r," in x ");var B=document.createElement("input");B.setAttribute("size","7");B.style.textAlign="right";r.appendChild(B);mxUtils.write(r," in");u.style.display="none";r.style.display="none";for(var C={},F=PageSetupDialog.getFormats(),J=0;J<F.length;J++){var D=F[J];C[D.key]=D;var N=document.createElement("option");N.setAttribute("value",
+D.key);mxUtils.write(N,D.title);n.appendChild(N)}var S=!1;g();a.appendChild(n);mxUtils.br(a);a.appendChild(u);a.appendChild(r);var T=f,P=function(Z,U){Z=C[n.value];null!=Z.format?(x.value=Z.format.width/100,B.value=Z.format.height/100,r.style.display="none",u.style.display=""):(u.style.display="none",r.style.display="");Z=parseFloat(x.value);if(isNaN(Z)||0>=Z)x.value=f.width/100;Z=parseFloat(B.value);if(isNaN(Z)||0>=Z)B.value=f.height/100;Z=new mxRectangle(0,0,Math.floor(100*parseFloat(x.value)),
+Math.floor(100*parseFloat(B.value)));"custom"!=n.value&&k.checked&&(Z=new mxRectangle(0,0,Z.height,Z.width));U&&S||Z.width==T.width&&Z.height==T.height||(T=Z,null!=e&&e(T))};mxEvent.addListener(b,"click",function(Z){d.checked=!0;P(Z);mxEvent.consume(Z)});mxEvent.addListener(m,"click",function(Z){k.checked=!0;P(Z);mxEvent.consume(Z)});mxEvent.addListener(x,"blur",P);mxEvent.addListener(x,"click",P);mxEvent.addListener(B,"blur",P);mxEvent.addListener(B,"click",P);mxEvent.addListener(k,"change",P);mxEvent.addListener(d,
+"change",P);mxEvent.addListener(n,"change",function(Z){S="custom"==n.value;P(Z,!0)});P();return{set:function(Z){f=Z;g(null,null,!0)},get:function(){return T},widthInput:x,heightInput:B}};
PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",
format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},
{key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,900,1600)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1200,1920)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1200,1600)},{key:"custom",title:mxResources.get("custom"),format:null}]};
-var FilenameDialog=function(a,b,f,d,g,e,k,n,u,m,r,x,B){u=null!=u?u:!0;var C=document.createElement("table"),G=document.createElement("tbody");C.style.position="absolute";C.style.top="30px";C.style.left="20px";var J=document.createElement("tr");var D=document.createElement("td");D.style.textOverflow="ellipsis";D.style.textAlign="right";D.style.maxWidth=(B?B+15:100)+"px";D.style.fontSize="10pt";D.style.width=(B?B:84)+"px";mxUtils.write(D,(g||mxResources.get("filename"))+":");J.appendChild(D);var N=
-document.createElement("input");N.setAttribute("value",b||"");N.style.marginLeft="4px";N.style.width=null!=x?x+"px":"180px";var Q=mxUtils.button(f,function(){if(null==e||e(N.value))u&&a.hideDialog(),d(N.value)});Q.className="geBtn gePrimaryBtn";this.init=function(){if(null!=g||null==k)if(N.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?N.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var R=C.parentNode;if(null!=R){var P=null;mxEvent.addListener(R,"dragleave",
-function(Z){null!=P&&(P.style.backgroundColor="",P=null);Z.stopPropagation();Z.preventDefault()});mxEvent.addListener(R,"dragover",mxUtils.bind(this,function(Z){null==P&&(!mxClient.IS_IE||10<document.documentMode)&&(P=N,P.style.backgroundColor="#ebf2f9");Z.stopPropagation();Z.preventDefault()}));mxEvent.addListener(R,"drop",mxUtils.bind(this,function(Z){null!=P&&(P.style.backgroundColor="",P=null);0<=mxUtils.indexOf(Z.dataTransfer.types,"text/uri-list")&&(N.value=decodeURIComponent(Z.dataTransfer.getData("text/uri-list")),
-Q.click());Z.stopPropagation();Z.preventDefault()}))}}};D=document.createElement("td");D.style.whiteSpace="nowrap";D.appendChild(N);J.appendChild(D);if(null!=g||null==k)G.appendChild(J),null!=r&&(D.appendChild(FilenameDialog.createTypeHint(a,N,r)),null!=a.editor.diagramFileTypes&&(J=document.createElement("tr"),D=document.createElement("td"),D.style.textOverflow="ellipsis",D.style.textAlign="right",D.style.maxWidth="100px",D.style.fontSize="10pt",D.style.width="84px",mxUtils.write(D,mxResources.get("type")+
-":"),J.appendChild(D),D=document.createElement("td"),D.style.whiteSpace="nowrap",J.appendChild(D),b=FilenameDialog.createFileTypes(a,N,a.editor.diagramFileTypes),b.style.marginLeft="4px",b.style.width="198px",D.appendChild(b),N.style.width=null!=x?x-40+"px":"190px",J.appendChild(D),G.appendChild(J)));null!=k&&(J=document.createElement("tr"),D=document.createElement("td"),D.colSpan=2,D.appendChild(k),J.appendChild(D),G.appendChild(J));J=document.createElement("tr");D=document.createElement("td");D.colSpan=
-2;D.style.paddingTop=null!=r?"12px":"20px";D.style.whiteSpace="nowrap";D.setAttribute("align","right");r=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=m&&m()});r.className="geBtn";a.editor.cancelFirst&&D.appendChild(r);null!=n&&(x=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(n)}),x.className="geBtn",D.appendChild(x));mxEvent.addListener(N,"keypress",function(R){13==R.keyCode&&Q.click()});D.appendChild(Q);a.editor.cancelFirst||D.appendChild(r);
-J.appendChild(D);G.appendChild(J);C.appendChild(G);this.container=C};FilenameDialog.filenameHelpLink=null;
-FilenameDialog.createTypeHint=function(a,b,f){var d=document.createElement("img");d.style.backgroundPosition="center bottom";d.style.backgroundRepeat="no-repeat";d.style.margin="2px 0 0 4px";d.style.verticalAlign="top";d.style.cursor="pointer";d.style.height="16px";d.style.width="16px";mxUtils.setOpacity(d,70);var g=function(){d.setAttribute("src",Editor.helpImage);d.setAttribute("title",mxResources.get("help"));for(var e=0;e<f.length;e++)if(0<f[e].ext.length&&b.value.toLowerCase().substring(b.value.length-
-f[e].ext.length-1)=="."+f[e].ext){d.setAttribute("title",mxResources.get(f[e].title));break}};mxEvent.addListener(b,"keyup",g);mxEvent.addListener(b,"change",g);mxEvent.addListener(d,"click",function(e){var k=d.getAttribute("title");d.getAttribute("src")==Editor.helpImage?a.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=k&&a.showError(null,k,mxResources.get("help"),function(){a.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);mxEvent.consume(e)});
-g();return d};
-FilenameDialog.createFileTypes=function(a,b,f){var d=document.createElement("select");for(a=0;a<f.length;a++){var g=document.createElement("option");g.setAttribute("value",a);mxUtils.write(g,mxResources.get(f[a].description)+" (."+f[a].extension+")");d.appendChild(g)}mxEvent.addListener(d,"change",function(e){e=f[d.value].extension;var k=b.value.lastIndexOf(".drawio.");k=0<k?k:b.value.lastIndexOf(".");"drawio"!=e&&(e="drawio."+e);b.value=0<k?b.value.substring(0,k+1)+e:b.value+"."+e;"createEvent"in
-document?(e=document.createEvent("HTMLEvents"),e.initEvent("change",!1,!0),b.dispatchEvent(e)):b.fireEvent("onchange")});a=function(e){e=b.value.toLowerCase();for(var k=0,n=0;n<f.length;n++){var u=f[n].extension,m=null;"drawio"!=u&&(m=u,u=".drawio."+u);if(e.substring(e.length-u.length-1)=="."+u||null!=m&&e.substring(e.length-m.length-1)=="."+m){k=n;break}}d.value=k};mxEvent.addListener(b,"change",a);mxEvent.addListener(b,"keyup",a);a();return d};
+var FilenameDialog=function(a,b,f,e,g,d,k,n,u,m,r,x,B){u=null!=u?u:!0;var C=document.createElement("table"),F=document.createElement("tbody");C.style.position="absolute";C.style.top="30px";C.style.left="20px";var J=document.createElement("tr");var D=document.createElement("td");D.style.textOverflow="ellipsis";D.style.textAlign="right";D.style.maxWidth=(B?B+15:100)+"px";D.style.fontSize="10pt";D.style.width=(B?B:84)+"px";mxUtils.write(D,(g||mxResources.get("filename"))+":");J.appendChild(D);var N=
+document.createElement("input");N.setAttribute("value",b||"");N.style.marginLeft="4px";N.style.width=null!=x?x+"px":"180px";var S=mxUtils.button(f,function(){if(null==d||d(N.value))u&&a.hideDialog(),e(N.value)});S.className="geBtn gePrimaryBtn";this.init=function(){if(null!=g||null==k)if(N.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?N.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var T=C.parentNode;if(null!=T){var P=null;mxEvent.addListener(T,"dragleave",
+function(Z){null!=P&&(P.style.backgroundColor="",P=null);Z.stopPropagation();Z.preventDefault()});mxEvent.addListener(T,"dragover",mxUtils.bind(this,function(Z){null==P&&(!mxClient.IS_IE||10<document.documentMode)&&(P=N,P.style.backgroundColor="#ebf2f9");Z.stopPropagation();Z.preventDefault()}));mxEvent.addListener(T,"drop",mxUtils.bind(this,function(Z){null!=P&&(P.style.backgroundColor="",P=null);0<=mxUtils.indexOf(Z.dataTransfer.types,"text/uri-list")&&(N.value=decodeURIComponent(Z.dataTransfer.getData("text/uri-list")),
+S.click());Z.stopPropagation();Z.preventDefault()}))}}};D=document.createElement("td");D.style.whiteSpace="nowrap";D.appendChild(N);J.appendChild(D);if(null!=g||null==k)F.appendChild(J),null!=r&&(D.appendChild(FilenameDialog.createTypeHint(a,N,r)),null!=a.editor.diagramFileTypes&&(J=document.createElement("tr"),D=document.createElement("td"),D.style.textOverflow="ellipsis",D.style.textAlign="right",D.style.maxWidth="100px",D.style.fontSize="10pt",D.style.width="84px",mxUtils.write(D,mxResources.get("type")+
+":"),J.appendChild(D),D=document.createElement("td"),D.style.whiteSpace="nowrap",J.appendChild(D),b=FilenameDialog.createFileTypes(a,N,a.editor.diagramFileTypes),b.style.marginLeft="4px",b.style.width="198px",D.appendChild(b),N.style.width=null!=x?x-40+"px":"190px",J.appendChild(D),F.appendChild(J)));null!=k&&(J=document.createElement("tr"),D=document.createElement("td"),D.colSpan=2,D.appendChild(k),J.appendChild(D),F.appendChild(J));J=document.createElement("tr");D=document.createElement("td");D.colSpan=
+2;D.style.paddingTop=null!=r?"12px":"20px";D.style.whiteSpace="nowrap";D.setAttribute("align","right");r=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=m&&m()});r.className="geBtn";a.editor.cancelFirst&&D.appendChild(r);null!=n&&(x=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(n)}),x.className="geBtn",D.appendChild(x));mxEvent.addListener(N,"keypress",function(T){13==T.keyCode&&S.click()});D.appendChild(S);a.editor.cancelFirst||D.appendChild(r);
+J.appendChild(D);F.appendChild(J);C.appendChild(F);this.container=C};FilenameDialog.filenameHelpLink=null;
+FilenameDialog.createTypeHint=function(a,b,f){var e=document.createElement("img");e.style.backgroundPosition="center bottom";e.style.backgroundRepeat="no-repeat";e.style.margin="2px 0 0 4px";e.style.verticalAlign="top";e.style.cursor="pointer";e.style.height="16px";e.style.width="16px";mxUtils.setOpacity(e,70);var g=function(){e.setAttribute("src",Editor.helpImage);e.setAttribute("title",mxResources.get("help"));for(var d=0;d<f.length;d++)if(0<f[d].ext.length&&b.value.toLowerCase().substring(b.value.length-
+f[d].ext.length-1)=="."+f[d].ext){e.setAttribute("title",mxResources.get(f[d].title));break}};mxEvent.addListener(b,"keyup",g);mxEvent.addListener(b,"change",g);mxEvent.addListener(e,"click",function(d){var k=e.getAttribute("title");e.getAttribute("src")==Editor.helpImage?a.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=k&&a.showError(null,k,mxResources.get("help"),function(){a.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);mxEvent.consume(d)});
+g();return e};
+FilenameDialog.createFileTypes=function(a,b,f){var e=document.createElement("select");for(a=0;a<f.length;a++){var g=document.createElement("option");g.setAttribute("value",a);mxUtils.write(g,mxResources.get(f[a].description)+" (."+f[a].extension+")");e.appendChild(g)}mxEvent.addListener(e,"change",function(d){d=f[e.value].extension;var k=b.value.lastIndexOf(".drawio.");k=0<k?k:b.value.lastIndexOf(".");"drawio"!=d&&(d="drawio."+d);b.value=0<k?b.value.substring(0,k+1)+d:b.value+"."+d;"createEvent"in
+document?(d=document.createEvent("HTMLEvents"),d.initEvent("change",!1,!0),b.dispatchEvent(d)):b.fireEvent("onchange")});a=function(d){d=b.value.toLowerCase();for(var k=0,n=0;n<f.length;n++){var u=f[n].extension,m=null;"drawio"!=u&&(m=u,u=".drawio."+u);if(d.substring(d.length-u.length-1)=="."+u||null!=m&&d.substring(d.length-m.length-1)=="."+m){k=n;break}}e.value=k};mxEvent.addListener(b,"change",a);mxEvent.addListener(b,"keyup",a);a();return e};
(function(){mxGraphView.prototype.validateBackgroundPage=function(){var k=this.graph;if(null!=k.container&&!k.transparentBackground){if(k.pageVisible){var n=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var u=k.container.firstChild;null!=u&&u.nodeType!=mxConstants.NODETYPE_ELEMENT;)u=u.nextSibling;null!=u&&(this.backgroundPageShape=this.createBackgroundPageShape(n),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,
this.backgroundPageShape.init(k.container),u.style.position="absolute",k.container.insertBefore(this.backgroundPageShape.node,u),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(m){k.dblClick(m)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(m){k.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(m))}),mxUtils.bind(this,function(m){null!=
k.tooltipHandler&&k.tooltipHandler.isHideOnHover()&&k.tooltipHandler.hide();k.isMouseDown&&!mxEvent.isConsumed(m)&&k.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(m))}),mxUtils.bind(this,function(m){k.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(m))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=n,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};
@@ -2411,154 +2411,157 @@ mxGraphView.prototype.validateBackgroundStyles=function(){var k=this.graph,n=nul
k.defaultPageBorderColor,k.container.className="geDiagramContainer geDiagramBackdrop",u.style.backgroundImage="none",u.style.backgroundColor=""):(k.container.className="geDiagramContainer",u.style.backgroundPosition=r,u.style.backgroundColor=n,u.style.backgroundImage=m)};mxGraphView.prototype.createSvgGrid=function(k){for(var n=this.graph.gridSize*this.scale;n<this.minGridSize;)n*=2;for(var u=this.gridSteps*n,m=[],r=1;r<this.gridSteps;r++){var x=r*n;m.push("M 0 "+x+" L "+u+" "+x+" M "+x+" 0 L "+x+
" "+u)}return'<svg width="'+u+'" height="'+u+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+u+'" height="'+u+'" patternUnits="userSpaceOnUse"><path d="'+m.join(" ")+'" fill="none" stroke="'+k+'" opacity="0.2" stroke-width="1"/><path d="M '+u+" 0 L 0 0 0 "+u+'" fill="none" stroke="'+k+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(k,n){a.apply(this,arguments);
if(null!=this.shiftPreview1){var u=this.view.canvas;null!=u.ownerSVGElement&&(u=u.ownerSVGElement);var m=this.gridSize*this.view.scale*this.view.gridSteps;m=-Math.round(m-mxUtils.mod(this.view.translate.x*this.view.scale+k,m))+"px "+-Math.round(m-mxUtils.mod(this.view.translate.y*this.view.scale+n,m))+"px";u.style.backgroundPosition=m}};mxGraph.prototype.updatePageBreaks=function(k,n,u){var m=this.view.scale,r=this.view.translate,x=this.pageFormat,B=m*this.pageScale,C=this.view.getBackgroundPageBounds();
-n=C.width;u=C.height;var G=new mxRectangle(m*r.x,m*r.y,x.width*B,x.height*B),J=(k=k&&Math.min(G.width,G.height)>this.minPageBreakDist)?Math.ceil(u/G.height)-1:0,D=k?Math.ceil(n/G.width)-1:0,N=C.x+n,Q=C.y+u;null==this.horizontalPageBreaks&&0<J&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<D&&(this.verticalPageBreaks=[]);k=mxUtils.bind(this,function(R){if(null!=R){for(var P=R==this.horizontalPageBreaks?J:D,Z=0;Z<=P;Z++){var U=R==this.horizontalPageBreaks?[new mxPoint(Math.round(C.x),
-Math.round(C.y+(Z+1)*G.height)),new mxPoint(Math.round(N),Math.round(C.y+(Z+1)*G.height))]:[new mxPoint(Math.round(C.x+(Z+1)*G.width),Math.round(C.y)),new mxPoint(Math.round(C.x+(Z+1)*G.width),Math.round(Q))];null!=R[Z]?(R[Z].points=U,R[Z].redraw()):(U=new mxPolyline(U,this.pageBreakColor),U.dialect=this.dialect,U.isDashed=this.pageBreakDashed,U.pointerEvents=!1,U.init(this.view.backgroundPane),U.redraw(),R[Z]=U)}for(Z=P;Z<R.length;Z++)R[Z].destroy();R.splice(P,R.length-P)}});k(this.horizontalPageBreaks);
+n=C.width;u=C.height;var F=new mxRectangle(m*r.x,m*r.y,x.width*B,x.height*B),J=(k=k&&Math.min(F.width,F.height)>this.minPageBreakDist)?Math.ceil(u/F.height)-1:0,D=k?Math.ceil(n/F.width)-1:0,N=C.x+n,S=C.y+u;null==this.horizontalPageBreaks&&0<J&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<D&&(this.verticalPageBreaks=[]);k=mxUtils.bind(this,function(T){if(null!=T){for(var P=T==this.horizontalPageBreaks?J:D,Z=0;Z<=P;Z++){var U=T==this.horizontalPageBreaks?[new mxPoint(Math.round(C.x),
+Math.round(C.y+(Z+1)*F.height)),new mxPoint(Math.round(N),Math.round(C.y+(Z+1)*F.height))]:[new mxPoint(Math.round(C.x+(Z+1)*F.width),Math.round(C.y)),new mxPoint(Math.round(C.x+(Z+1)*F.width),Math.round(S))];null!=T[Z]?(T[Z].points=U,T[Z].redraw()):(U=new mxPolyline(U,this.pageBreakColor),U.dialect=this.dialect,U.isDashed=this.pageBreakDashed,U.pointerEvents=!1,U.init(this.view.backgroundPane),U.redraw(),T[Z]=U)}for(Z=P;Z<T.length;Z++)T[Z].destroy();T.splice(P,T.length-P)}});k(this.horizontalPageBreaks);
k(this.verticalPageBreaks)};var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(k,n,u){for(var m=0;m<n.length;m++){if(this.graph.isTableCell(n[m])||this.graph.isTableRow(n[m]))return!1;if(this.graph.getModel().isVertex(n[m])){var r=this.graph.getCellGeometry(n[m]);if(null!=r&&r.relative)return!1}}return b.apply(this,arguments)};var f=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var k=
f.apply(this,arguments);k.intersects=mxUtils.bind(this,function(n,u){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(k,arguments)});return k};mxGraphView.prototype.createBackgroundPageShape=function(k){return new mxRectangleShape(k,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var k=this.getGraphBounds(),n=0<k.width?k.x/this.scale-this.translate.x:0,u=0<k.height?k.y/this.scale-this.translate.y:0,m=this.graph.pageFormat,
-r=this.graph.pageScale,x=m.width*r;m=m.height*r;r=Math.floor(Math.min(0,n)/x);var B=Math.floor(Math.min(0,u)/m);return new mxRectangle(this.scale*(this.translate.x+r*x),this.scale*(this.translate.y+B*m),this.scale*(Math.ceil(Math.max(1,n+k.width/this.scale)/x)-r)*x,this.scale*(Math.ceil(Math.max(1,u+k.height/this.scale)/m)-B)*m)};var d=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(k,n){d.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
-this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=k+"px",this.view.backgroundPageShape.node.style.marginTop=n+"px")};var g=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(k,n,u,m,r,x){var B=g.apply(this,arguments);null==x||x||mxEvent.addListener(B,"mousedown",function(C){mxEvent.consume(C)});return B};var e=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
-function(k,n,u){var m=this.graph.model.getParent(k);if(n){var r=this.graph.model.isEdge(k)?null:this.graph.getCellGeometry(k);r=!this.graph.model.isEdge(m)&&!this.graph.isSiblingSelected(k)&&(null!=r&&r.relative||!this.graph.isContainer(m)||this.graph.isPart(k))}else if(r=e.apply(this,arguments),this.graph.isTableCell(k)||this.graph.isTableRow(k))r=m,this.graph.isTable(r)||(r=this.graph.model.getParent(r)),r=!this.graph.selectionCellsHandler.isHandled(r)||this.graph.isCellSelected(r)&&this.graph.isToggleEvent(u.getEvent())||
-this.graph.isCellSelected(k)&&!this.graph.isToggleEvent(u.getEvent())||this.graph.isTableCell(k)&&this.graph.isCellSelected(m);return r};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(k){k=k.getCell();for(var n=this.graph.getModel(),u=n.getParent(k),m=this.graph.view.getState(u),r=this.graph.isCellSelected(k);null!=m&&(n.isVertex(u)||n.isEdge(u));){var x=this.graph.isCellSelected(u);r=r||x;if(x||!r&&(this.graph.isTableCell(k)||this.graph.isTableRow(k)))k=u;u=n.getParent(u)}return k}})();EditorUi=function(a,b,f){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var d=this.editor.graph;d.lightbox=f;var g=d.getGraphBounds;d.getGraphBounds=function(){var F=g.apply(this,arguments),L=this.backgroundImage;if(null!=L&&null!=L.width&&null!=L.height){var T=this.view.translate,ca=this.view.scale;F=mxRectangle.fromRectangle(F);F.add(new mxRectangle((T.x+L.x)*ca,(T.y+L.y)*ca,L.width*ca,L.height*ca))}return F};d.useCssTransforms&&(this.lazyZoomDelay=
-0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);this.selectionStateListener=mxUtils.bind(this,function(F,L){this.clearSelectionState()});d.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);
-d.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);d.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);d.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);d.getView().addListener("unitChanged",this.selectionStateListener);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,d.isEnabled=function(){return!1},d.panningHandler.isForcePanningEvent=function(F){return!mxEvent.isPopupTrigger(F.getEvent())});this.actions=new Actions(this);this.menus=
-this.createMenus();if(!d.standalone){var e="rounded shadow glass dashed dashPattern labelBackgroundColor labelBorderColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents".split(" "),k="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" "),
-n="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" "),u=!1,m=!1;this.setDefaultStyle=function(F){try{var L=d.getCellStyle(F,!1),T=[],ca=[],fa;for(fa in L)T.push(L[fa]),ca.push(fa);d.getModel().isEdge(F)?d.currentEdgeStyle={}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",ca,"values",T,"cells",[F]));d.getModel().isEdge(F)?m=!0:u=!0}catch(wa){this.handleError(wa)}};this.clearDefaultStyle=function(){d.currentEdgeStyle=
-mxUtils.clone(d.defaultEdgeStyle);d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);u=m=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var r=["fontFamily","fontSource","fontSize","fontColor"];for(b=0;b<r.length;b++)0>mxUtils.indexOf(e,r[b])&&e.push(r[b]);var x="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),B=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],
-["strokeColor","strokeWidth"],["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(b=0;b<B.length;b++)for(f=0;f<B[b].length;f++)e.push(B[b][f]);for(b=0;b<k.length;b++)0>mxUtils.indexOf(e,k[b])&&e.push(k[b]);var C=function(F,L,T,ca,fa,wa,W){ca=null!=ca?ca:d.currentVertexStyle;fa=null!=fa?fa:d.currentEdgeStyle;wa=null!=wa?wa:!0;T=null!=T?T:d.getModel();if(W){W=[];for(var aa=0;aa<F.length;aa++)W=W.concat(T.getDescendants(F[aa]));F=W}T.beginUpdate();try{for(aa=0;aa<F.length;aa++){var oa=
-F[aa];if(L)var sa=["fontSize","fontFamily","fontColor"];else{var Ka=T.getStyle(oa),Ha=null!=Ka?Ka.split(";"):[];sa=e.slice();for(var ua=0;ua<Ha.length;ua++){var Ca=Ha[ua],ra=Ca.indexOf("=");if(0<=ra){var Da=Ca.substring(0,ra),Ua=mxUtils.indexOf(sa,Da);0<=Ua&&sa.splice(Ua,1);for(W=0;W<B.length;W++){var db=B[W];if(0<=mxUtils.indexOf(db,Da))for(var Ta=0;Ta<db.length;Ta++){var $a=mxUtils.indexOf(sa,db[Ta]);0<=$a&&sa.splice($a,1)}}}}}var Xa=T.isEdge(oa);W=Xa?fa:ca;var Va=T.getStyle(oa);for(ua=0;ua<sa.length;ua++){Da=
-sa[ua];var Ya=W[Da];null!=Ya&&"edgeStyle"!=Da&&("shape"!=Da||Xa)&&(!Xa||wa||0>mxUtils.indexOf(n,Da))&&(Va=mxUtils.setStyle(Va,Da,Ya))}Editor.simpleLabels&&(Va=mxUtils.setStyle(mxUtils.setStyle(Va,"html",null),"whiteSpace",null));T.setStyle(oa,Va)}}finally{T.endUpdate()}return F};d.addListener("cellsInserted",function(F,L){C(L.getProperty("cells"),null,null,null,null,!0,!0)});d.addListener("textInserted",function(F,L){C(L.getProperty("cells"),!0)});this.insertHandler=C;this.createDivs();this.createUi();
-this.refresh();var G=mxUtils.bind(this,function(F){null==F&&(F=window.event);return d.isEditing()||null!=F&&this.isSelectionAllowed(F)});this.container==document.body&&(this.menubarContainer.onselectstart=G,this.menubarContainer.onmousedown=G,this.toolbarContainer.onselectstart=G,this.toolbarContainer.onmousedown=G,this.diagramContainer.onselectstart=G,this.diagramContainer.onmousedown=G,this.sidebarContainer.onselectstart=G,this.sidebarContainer.onmousedown=G,this.formatContainer.onselectstart=G,
-this.formatContainer.onmousedown=G,this.footerContainer.onselectstart=G,this.footerContainer.onmousedown=G,null!=this.tabContainer&&(this.tabContainer.onselectstart=G));!this.editor.chromeless||this.editor.editable?(b=function(F){if(null!=F){var L=mxEvent.getSource(F);if("A"==L.nodeName)for(;null!=L;){if("geHint"==L.className)return!0;L=L.parentNode}}return G(F)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",
-b):this.diagramContainer.oncontextmenu=b):d.panningHandler.usePopupTrigger=!1;d.init(this.diagramContainer);mxClient.IS_SVG&&null!=d.view.getDrawPane()&&(b=d.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=d.graphHandler){var J=d.graphHandler.start;d.graphHandler.start=function(){null!=ba.hoverIcons&&ba.hoverIcons.reset();J.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(F){var L=
-mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(F)-L.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(F)-L.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var D=!1,N=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(F,L){return D||N.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(F){32!=F.which||d.isEditing()?mxEvent.isConsumed(F)||
-27!=F.keyCode||this.hideDialog(null,!0):(D=!0,this.hoverIcons.reset(),d.container.style.cursor="move",d.isEditing()||mxEvent.getSource(F)!=d.container||mxEvent.consume(F))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(F){d.container.style.cursor="";D=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var Q=d.panningHandler.isForcePanningEvent;d.panningHandler.isForcePanningEvent=function(F){return Q.apply(this,arguments)||D||mxEvent.isMouseEvent(F.getEvent())&&
-(this.usePopupTrigger||!mxEvent.isPopupTrigger(F.getEvent()))&&(!mxEvent.isControlDown(F.getEvent())&&mxEvent.isRightMouseButton(F.getEvent())||mxEvent.isMiddleMouseButton(F.getEvent()))};var R=d.cellEditor.isStopEditingEvent;d.cellEditor.isStopEditingEvent=function(F){return R.apply(this,arguments)||13==F.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(F)||mxClient.IS_MAC&&mxEvent.isMetaDown(F)||mxClient.IS_SF&&mxEvent.isShiftDown(F))};var P=d.isZoomWheelEvent;d.isZoomWheelEvent=function(){return D||
-P.apply(this,arguments)};var Z=!1,U=null,V=null,ia=null,ha=mxUtils.bind(this,function(){if(null!=this.toolbar&&Z!=d.cellEditor.isContentEditing()){for(var F=this.toolbar.container.firstChild,L=[];null!=F;){var T=F.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,F)&&(F.parentNode.removeChild(F),L.push(F));F=T}F=this.toolbar.fontMenu;T=this.toolbar.sizeMenu;if(null==ia)this.toolbar.createTextToolbar();else{for(var ca=0;ca<ia.length;ca++)this.toolbar.container.appendChild(ia[ca]);this.toolbar.fontMenu=
-U;this.toolbar.sizeMenu=V}Z=d.cellEditor.isContentEditing();U=F;V=T;ia=L}}),ba=this,qa=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){qa.apply(this,arguments);ha();if(d.cellEditor.isContentEditing()){var F=!1,L=function(){F||(F=!0,window.setTimeout(function(){var T=d.getSelectedEditingElement();null!=T&&(T=mxUtils.getCurrentStyle(T),null!=T&&null!=ba.toolbar&&(ba.toolbar.setFontName(Graph.stripQuotes(T.fontFamily)),ba.toolbar.setFontSize(parseInt(T.fontSize))));F=!1},0))};mxEvent.addListener(d.cellEditor.textarea,
-"input",L);mxEvent.addListener(d.cellEditor.textarea,"touchend",L);mxEvent.addListener(d.cellEditor.textarea,"mouseup",L);mxEvent.addListener(d.cellEditor.textarea,"keyup",L);L()}};var O=d.cellEditor.stopEditing;d.cellEditor.stopEditing=function(F,L){try{O.apply(this,arguments),ha()}catch(T){ba.handleError(T)}};d.container.setAttribute("tabindex","0");d.container.style.cursor="default";if(window.self===window.top&&null!=d.container.parentNode)try{d.container.focus()}catch(F){}var S=d.fireMouseEvent;
-d.fireMouseEvent=function(F,L,T){F==mxEvent.MOUSE_DOWN&&this.container.focus();S.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(F,L,T){this.menus.createPopupMenu(F,L,T)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(F){d.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};d.connectionHandler.addListener(mxEvent.CONNECT,function(F,
-L){var T=[L.getProperty("cell")];L.getProperty("terminalInserted")&&(T.push(L.getProperty("terminal")),window.setTimeout(function(){null!=ba.hoverIcons&&ba.hoverIcons.update(d.view.getState(T[T.length-1]))},0));C(T)});this.addListener("styleChanged",mxUtils.bind(this,function(F,L){var T=L.getProperty("cells"),ca=F=!1;if(0<T.length)for(var fa=0;fa<T.length&&(F=d.getModel().isVertex(T[fa])||F,!(ca=d.getModel().isEdge(T[fa])||ca)||!F);fa++);else ca=F=!0;F=F&&!u;ca=ca&&!m;T=L.getProperty("keys");L=L.getProperty("values");
-for(fa=0;fa<T.length;fa++){var wa=0<=mxUtils.indexOf(r,T[fa]);if("strokeColor"!=T[fa]||null!=L[fa]&&"none"!=L[fa])if(0<=mxUtils.indexOf(k,T[fa]))ca||0<=mxUtils.indexOf(x,T[fa])?null==L[fa]?delete d.currentEdgeStyle[T[fa]]:d.currentEdgeStyle[T[fa]]=L[fa]:F&&0<=mxUtils.indexOf(e,T[fa])&&(null==L[fa]?delete d.currentVertexStyle[T[fa]]:d.currentVertexStyle[T[fa]]=L[fa]);else if(0<=mxUtils.indexOf(e,T[fa])){if(F||wa)null==L[fa]?delete d.currentVertexStyle[T[fa]]:d.currentVertexStyle[T[fa]]=L[fa];if(ca||
-wa||0<=mxUtils.indexOf(x,T[fa]))null==L[fa]?delete d.currentEdgeStyle[T[fa]]:d.currentEdgeStyle[T[fa]]=L[fa]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(d.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==d.currentEdgeStyle.edgeStyle&&"1"==d.currentEdgeStyle.curved?"geSprite geSprite-curved":
-"straight"==d.currentEdgeStyle.edgeStyle||"none"==d.currentEdgeStyle.edgeStyle||null==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):
-"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==d.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==d.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==d.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"))}));null!=this.toolbar&&(a=mxUtils.bind(this,function(){var F=d.currentVertexStyle.fontFamily||"Helvetica",L=String(d.currentVertexStyle.fontSize||
-"12"),T=d.getView().getState(d.getSelectionCell());null!=T&&(F=T.style[mxConstants.STYLE_FONTFAMILY]||F,L=T.style[mxConstants.STYLE_FONTSIZE]||L,10<F.length&&(F=F.substring(0,8)+"..."));this.toolbar.setFontName(F);this.toolbar.setFontSize(L)}),d.getSelectionModel().addListener(mxEvent.CHANGE,a),d.getModel().addListener(mxEvent.CHANGE,a));d.addListener(mxEvent.CELLS_ADDED,function(F,L){F=L.getProperty("cells");L=L.getProperty("parent");null!=L&&d.getModel().isLayer(L)&&!d.isCellVisible(L)&&null!=F&&
-0<F.length&&d.getModel().setVisible(L,!0)});this.gestureHandler=mxUtils.bind(this,function(F){null!=this.currentMenu&&mxEvent.getSource(F)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});
-mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){d.view.validateBackground()}));this.addListener("backgroundColorChanged",
-mxUtils.bind(this,function(){d.view.validateBackground()}));d.addListener("gridSizeChanged",mxUtils.bind(this,function(){d.isGridEnabled()&&d.view.validateBackground()}));this.editor.resetGraph()}this.init();d.standalone||this.open()};EditorUi.compactUi=!0;
-EditorUi.parsePng=function(a,b,f){function d(n,u){var m=e;e+=u;return n.substring(m,e)}function g(n){n=d(n,4);return n.charCodeAt(3)+(n.charCodeAt(2)<<8)+(n.charCodeAt(1)<<16)+(n.charCodeAt(0)<<24)}var e=0;if(d(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=f&&f();else if(d(a,4),"IHDR"!=d(a,4))null!=f&&f();else{d(a,17);do{f=g(a);var k=d(a,4);if(null!=b&&b(e-8,k,f))break;value=d(a,f);d(a,4);if("IEND"==k)break}while(f)}};mxUtils.extend(EditorUi,mxEventSource);
+r=this.graph.pageScale,x=m.width*r;m=m.height*r;r=Math.floor(Math.min(0,n)/x);var B=Math.floor(Math.min(0,u)/m);return new mxRectangle(this.scale*(this.translate.x+r*x),this.scale*(this.translate.y+B*m),this.scale*(Math.ceil(Math.max(1,n+k.width/this.scale)/x)-r)*x,this.scale*(Math.ceil(Math.max(1,u+k.height/this.scale)/m)-B)*m)};var e=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(k,n){e.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
+this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=k+"px",this.view.backgroundPageShape.node.style.marginTop=n+"px")};var g=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(k,n,u,m,r,x){var B=g.apply(this,arguments);null==x||x||mxEvent.addListener(B,"mousedown",function(C){mxEvent.consume(C)});return B};var d=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
+function(k,n,u){var m=this.graph.model.getParent(k);if(n){var r=this.graph.model.isEdge(k)?null:this.graph.getCellGeometry(k);r=!this.graph.model.isEdge(m)&&!this.graph.isSiblingSelected(k)&&(null!=r&&r.relative||!this.graph.isContainer(m)||this.graph.isPart(k))}else if(r=d.apply(this,arguments),this.graph.isTableCell(k)||this.graph.isTableRow(k))r=m,this.graph.isTable(r)||(r=this.graph.model.getParent(r)),r=!this.graph.selectionCellsHandler.isHandled(r)||this.graph.isCellSelected(r)&&this.graph.isToggleEvent(u.getEvent())||
+this.graph.isCellSelected(k)&&!this.graph.isToggleEvent(u.getEvent())||this.graph.isTableCell(k)&&this.graph.isCellSelected(m);return r};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(k){k=k.getCell();for(var n=this.graph.getModel(),u=n.getParent(k),m=this.graph.view.getState(u),r=this.graph.isCellSelected(k);null!=m&&(n.isVertex(u)||n.isEdge(u));){var x=this.graph.isCellSelected(u);r=r||x;if(x||!r&&(this.graph.isTableCell(k)||this.graph.isTableRow(k)))k=u;u=n.getParent(u)}return k}})();EditorUi=function(a,b,f){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var e=this.editor.graph;e.lightbox=f;var g=e.getGraphBounds;e.getGraphBounds=function(){var G=g.apply(this,arguments),K=this.backgroundImage;if(null!=K&&null!=K.width&&null!=K.height){var Q=this.view.translate,ba=this.view.scale;G=mxRectangle.fromRectangle(G);G.add(new mxRectangle((Q.x+K.x)*ba,(Q.y+K.y)*ba,K.width*ba,K.height*ba))}return G};e.useCssTransforms&&(this.lazyZoomDelay=
+0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);this.selectionStateListener=mxUtils.bind(this,function(G,K){this.clearSelectionState()});e.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);
+e.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);e.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);e.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);e.getView().addListener("unitChanged",this.selectionStateListener);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,e.isEnabled=function(){return!1},e.panningHandler.isForcePanningEvent=function(G){return!mxEvent.isPopupTrigger(G.getEvent())});this.actions=new Actions(this);this.menus=
+this.createMenus();if(!e.standalone){var d="rounded shadow glass dashed dashPattern labelBackgroundColor labelBorderColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents".split(" "),k="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" "),
+n="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" "),u=!1,m=!1;this.setDefaultStyle=function(G){try{var K=e.getCellStyle(G,!1),Q=[],ba=[],la;for(la in K)Q.push(K[la]),ba.push(la);e.getModel().isEdge(G)?e.currentEdgeStyle={}:e.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",ba,"values",Q,"cells",[G]));e.getModel().isEdge(G)?m=!0:u=!0}catch(ra){this.handleError(ra)}};this.clearDefaultStyle=function(){e.currentEdgeStyle=
+mxUtils.clone(e.defaultEdgeStyle);e.currentVertexStyle=mxUtils.clone(e.defaultVertexStyle);u=m=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var r=["fontFamily","fontSource","fontSize","fontColor"];for(b=0;b<r.length;b++)0>mxUtils.indexOf(d,r[b])&&d.push(r[b]);var x="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),B=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],
+["strokeColor","strokeWidth"],["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(b=0;b<B.length;b++)for(f=0;f<B[b].length;f++)d.push(B[b][f]);for(b=0;b<k.length;b++)0>mxUtils.indexOf(d,k[b])&&d.push(k[b]);var C=function(G,K,Q,ba,la,ra,X){ba=null!=ba?ba:e.currentVertexStyle;la=null!=la?la:e.currentEdgeStyle;ra=null!=ra?ra:!0;Q=null!=Q?Q:e.getModel();if(X){X=[];for(var ca=0;ca<G.length;ca++)X=X.concat(Q.getDescendants(G[ca]));G=X}Q.beginUpdate();try{for(ca=0;ca<G.length;ca++){var oa=
+G[ca];if(K)var ta=["fontSize","fontFamily","fontColor"];else{var Ka=Q.getStyle(oa),Ha=null!=Ka?Ka.split(";"):[];ta=d.slice();for(var va=0;va<Ha.length;va++){var Ca=Ha[va],sa=Ca.indexOf("=");if(0<=sa){var Da=Ca.substring(0,sa),Ua=mxUtils.indexOf(ta,Da);0<=Ua&&ta.splice(Ua,1);for(X=0;X<B.length;X++){var db=B[X];if(0<=mxUtils.indexOf(db,Da))for(var Ta=0;Ta<db.length;Ta++){var $a=mxUtils.indexOf(ta,db[Ta]);0<=$a&&ta.splice($a,1)}}}}}var Xa=Q.isEdge(oa);X=Xa?la:ba;var Va=Q.getStyle(oa);for(va=0;va<ta.length;va++){Da=
+ta[va];var Ya=X[Da];null!=Ya&&"edgeStyle"!=Da&&("shape"!=Da||Xa)&&(!Xa||ra||0>mxUtils.indexOf(n,Da))&&(Va=mxUtils.setStyle(Va,Da,Ya))}Editor.simpleLabels&&(Va=mxUtils.setStyle(mxUtils.setStyle(Va,"html",null),"whiteSpace",null));Q.setStyle(oa,Va)}}finally{Q.endUpdate()}return G};e.addListener("cellsInserted",function(G,K){C(K.getProperty("cells"),null,null,null,null,!0,!0)});e.addListener("textInserted",function(G,K){C(K.getProperty("cells"),!0)});this.insertHandler=C;this.createDivs();this.createUi();
+this.refresh();var F=mxUtils.bind(this,function(G){null==G&&(G=window.event);return e.isEditing()||null!=G&&this.isSelectionAllowed(G)});this.container==document.body&&(this.menubarContainer.onselectstart=F,this.menubarContainer.onmousedown=F,this.toolbarContainer.onselectstart=F,this.toolbarContainer.onmousedown=F,this.diagramContainer.onselectstart=F,this.diagramContainer.onmousedown=F,this.sidebarContainer.onselectstart=F,this.sidebarContainer.onmousedown=F,this.formatContainer.onselectstart=F,
+this.formatContainer.onmousedown=F,this.footerContainer.onselectstart=F,this.footerContainer.onmousedown=F,null!=this.tabContainer&&(this.tabContainer.onselectstart=F));!this.editor.chromeless||this.editor.editable?(b=function(G){if(null!=G){var K=mxEvent.getSource(G);if("A"==K.nodeName)for(;null!=K;){if("geHint"==K.className)return!0;K=K.parentNode}}return F(G)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",
+b):this.diagramContainer.oncontextmenu=b):e.panningHandler.usePopupTrigger=!1;e.init(this.diagramContainer);mxClient.IS_SVG&&null!=e.view.getDrawPane()&&(b=e.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=e.graphHandler){var J=e.graphHandler.start;e.graphHandler.start=function(){null!=ea.hoverIcons&&ea.hoverIcons.reset();J.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(G){var K=
+mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(G)-K.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(G)-K.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var D=!1,N=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(G,K){return D||N.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(G){32!=G.which||e.isEditing()?mxEvent.isConsumed(G)||
+27!=G.keyCode||this.hideDialog(null,!0):(D=!0,this.hoverIcons.reset(),e.container.style.cursor="move",e.isEditing()||mxEvent.getSource(G)!=e.container||mxEvent.consume(G))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(G){e.container.style.cursor="";D=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var S=e.panningHandler.isForcePanningEvent;e.panningHandler.isForcePanningEvent=function(G){return S.apply(this,arguments)||D||mxEvent.isMouseEvent(G.getEvent())&&
+(this.usePopupTrigger||!mxEvent.isPopupTrigger(G.getEvent()))&&(!mxEvent.isControlDown(G.getEvent())&&mxEvent.isRightMouseButton(G.getEvent())||mxEvent.isMiddleMouseButton(G.getEvent()))};var T=e.cellEditor.isStopEditingEvent;e.cellEditor.isStopEditingEvent=function(G){return T.apply(this,arguments)||13==G.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(G)||mxClient.IS_MAC&&mxEvent.isMetaDown(G)||mxClient.IS_SF&&mxEvent.isShiftDown(G))};var P=e.isZoomWheelEvent;e.isZoomWheelEvent=function(){return D||
+P.apply(this,arguments)};var Z=!1,U=null,V=null,aa=null,ia=mxUtils.bind(this,function(){if(null!=this.toolbar&&Z!=e.cellEditor.isContentEditing()){for(var G=this.toolbar.container.firstChild,K=[];null!=G;){var Q=G.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,G)&&(G.parentNode.removeChild(G),K.push(G));G=Q}G=this.toolbar.fontMenu;Q=this.toolbar.sizeMenu;if(null==aa)this.toolbar.createTextToolbar();else{for(var ba=0;ba<aa.length;ba++)this.toolbar.container.appendChild(aa[ba]);this.toolbar.fontMenu=
+U;this.toolbar.sizeMenu=V}Z=e.cellEditor.isContentEditing();U=G;V=Q;aa=K}}),ea=this,qa=e.cellEditor.startEditing;e.cellEditor.startEditing=function(){qa.apply(this,arguments);ia();if(e.cellEditor.isContentEditing()){var G=!1,K=function(){G||(G=!0,window.setTimeout(function(){var Q=e.getSelectedEditingElement();null!=Q&&(Q=mxUtils.getCurrentStyle(Q),null!=Q&&null!=ea.toolbar&&(ea.toolbar.setFontName(Graph.stripQuotes(Q.fontFamily)),ea.toolbar.setFontSize(parseInt(Q.fontSize))));G=!1},0))};mxEvent.addListener(e.cellEditor.textarea,
+"input",K);mxEvent.addListener(e.cellEditor.textarea,"touchend",K);mxEvent.addListener(e.cellEditor.textarea,"mouseup",K);mxEvent.addListener(e.cellEditor.textarea,"keyup",K);K()}};var O=e.cellEditor.stopEditing;e.cellEditor.stopEditing=function(G,K){try{O.apply(this,arguments),ia()}catch(Q){ea.handleError(Q)}};e.container.setAttribute("tabindex","0");e.container.style.cursor="default";if(window.self===window.top&&null!=e.container.parentNode)try{e.container.focus()}catch(G){}var R=e.fireMouseEvent;
+e.fireMouseEvent=function(G,K,Q){G==mxEvent.MOUSE_DOWN&&this.container.focus();R.apply(this,arguments)};e.popupMenuHandler.autoExpand=!0;null!=this.menus&&(e.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(G,K,Q){this.menus.createPopupMenu(G,K,Q)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(G){e.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};e.connectionHandler.addListener(mxEvent.CONNECT,function(G,
+K){var Q=[K.getProperty("cell")];K.getProperty("terminalInserted")&&(Q.push(K.getProperty("terminal")),window.setTimeout(function(){null!=ea.hoverIcons&&ea.hoverIcons.update(e.view.getState(Q[Q.length-1]))},0));C(Q)});this.addListener("styleChanged",mxUtils.bind(this,function(G,K){var Q=K.getProperty("cells"),ba=G=!1;if(0<Q.length)for(var la=0;la<Q.length&&(G=e.getModel().isVertex(Q[la])||G,!(ba=e.getModel().isEdge(Q[la])||ba)||!G);la++);else ba=G=!0;G=G&&!u;ba=ba&&!m;Q=K.getProperty("keys");K=K.getProperty("values");
+for(la=0;la<Q.length;la++){var ra=0<=mxUtils.indexOf(r,Q[la]);if("strokeColor"!=Q[la]||null!=K[la]&&"none"!=K[la])if(0<=mxUtils.indexOf(k,Q[la]))ba||0<=mxUtils.indexOf(x,Q[la])?null==K[la]?delete e.currentEdgeStyle[Q[la]]:e.currentEdgeStyle[Q[la]]=K[la]:G&&0<=mxUtils.indexOf(d,Q[la])&&(null==K[la]?delete e.currentVertexStyle[Q[la]]:e.currentVertexStyle[Q[la]]=K[la]);else if(0<=mxUtils.indexOf(d,Q[la])){if(G||ra)null==K[la]?delete e.currentVertexStyle[Q[la]]:e.currentVertexStyle[Q[la]]=K[la];if(ba||
+ra||0<=mxUtils.indexOf(x,Q[la]))null==K[la]?delete e.currentEdgeStyle[Q[la]]:e.currentEdgeStyle[Q[la]]=K[la]}}null!=this.toolbar&&(this.toolbar.setFontName(e.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(e.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==e.currentEdgeStyle.edgeStyle&&"1"==e.currentEdgeStyle.curved?"geSprite geSprite-curved":
+"straight"==e.currentEdgeStyle.edgeStyle||"none"==e.currentEdgeStyle.edgeStyle||null==e.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==e.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==e.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==e.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==e.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==e.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):
+"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==e.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==e.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==e.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"))}));null!=this.toolbar&&(a=mxUtils.bind(this,function(){var G=e.currentVertexStyle.fontFamily||"Helvetica",K=String(e.currentVertexStyle.fontSize||
+"12"),Q=e.getView().getState(e.getSelectionCell());null!=Q&&(G=Q.style[mxConstants.STYLE_FONTFAMILY]||G,K=Q.style[mxConstants.STYLE_FONTSIZE]||K,10<G.length&&(G=G.substring(0,8)+"..."));this.toolbar.setFontName(G);this.toolbar.setFontSize(K)}),e.getSelectionModel().addListener(mxEvent.CHANGE,a),e.getModel().addListener(mxEvent.CHANGE,a));e.addListener(mxEvent.CELLS_ADDED,function(G,K){G=K.getProperty("cells");K=K.getProperty("parent");null!=K&&e.getModel().isLayer(K)&&!e.isCellVisible(K)&&null!=G&&
+0<G.length&&e.getModel().setVisible(K,!0)});this.gestureHandler=mxUtils.bind(this,function(G){null!=this.currentMenu&&mxEvent.getSource(G)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});
+mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){e.view.validateBackground()}));this.addListener("backgroundColorChanged",
+mxUtils.bind(this,function(){e.view.validateBackground()}));e.addListener("gridSizeChanged",mxUtils.bind(this,function(){e.isGridEnabled()&&e.view.validateBackground()}));this.editor.resetGraph()}this.init();e.standalone||this.open()};EditorUi.compactUi=!0;
+EditorUi.parsePng=function(a,b,f){function e(n,u){var m=d;d+=u;return n.substring(m,d)}function g(n){n=e(n,4);return n.charCodeAt(3)+(n.charCodeAt(2)<<8)+(n.charCodeAt(1)<<16)+(n.charCodeAt(0)<<24)}var d=0;if(e(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=f&&f();else if(e(a,4),"IHDR"!=e(a,4))null!=f&&f();else{e(a,17);do{f=g(a);var k=e(a,4);if(null!=b&&b(d-8,k,f))break;value=e(a,f);e(a,4);if("IEND"==k)break}while(f)}};mxUtils.extend(EditorUi,mxEventSource);
EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.menubarHeight=30;EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.toolbarHeight=38;EditorUi.prototype.footerHeight=28;EditorUi.prototype.sidebarFooterHeight=34;EditorUi.prototype.hsplitPosition=640>=screen.width?118:"large"!=urlParams["sidebar-entries"]?212:240;EditorUi.prototype.allowAnimation=!0;EditorUi.prototype.lightboxMaxFitScale=2;
EditorUi.prototype.lightboxVerticalDivider=4;EditorUi.prototype.hsplitClickEnabled=!1;
-EditorUi.prototype.init=function(){var a=this.editor.graph;if(!a.standalone){"0"!=urlParams["shape-picker"]&&this.installShapePicker();mxEvent.addListener(a.container,"scroll",mxUtils.bind(this,function(){a.tooltipHandler.hide();null!=a.connectionHandler&&null!=a.connectionHandler.constraintHandler&&a.connectionHandler.constraintHandler.reset()}));a.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){a.tooltipHandler.hide();var d=a.getRubberband();null!=d&&d.cancel()}));mxEvent.addListener(a.container,
-"keydown",mxUtils.bind(this,function(d){this.onKeyDown(d)}));mxEvent.addListener(a.container,"keypress",mxUtils.bind(this,function(d){this.onKeyPress(d)}));this.addUndoListener();this.addBeforeUnloadListener();a.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));a.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));var b=a.setDefaultParent,f=this;this.editor.graph.setDefaultParent=function(){b.apply(this,
+EditorUi.prototype.init=function(){var a=this.editor.graph;if(!a.standalone){"0"!=urlParams["shape-picker"]&&this.installShapePicker();mxEvent.addListener(a.container,"scroll",mxUtils.bind(this,function(){a.tooltipHandler.hide();null!=a.connectionHandler&&null!=a.connectionHandler.constraintHandler&&a.connectionHandler.constraintHandler.reset()}));a.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){a.tooltipHandler.hide();var e=a.getRubberband();null!=e&&e.cancel()}));mxEvent.addListener(a.container,
+"keydown",mxUtils.bind(this,function(e){this.onKeyDown(e)}));mxEvent.addListener(a.container,"keypress",mxUtils.bind(this,function(e){this.onKeyPress(e)}));this.addUndoListener();this.addBeforeUnloadListener();a.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));a.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));var b=a.setDefaultParent,f=this;this.editor.graph.setDefaultParent=function(){b.apply(this,
arguments);f.updateActionStates()};a.editLink=f.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()}};EditorUi.prototype.clearSelectionState=function(){this.selectionState=null};EditorUi.prototype.getSelectionState=function(){null==this.selectionState&&(this.selectionState=this.createSelectionState());return this.selectionState};
-EditorUi.prototype.createSelectionState=function(){for(var a=this.editor.graph,b=a.getSelectionCells(),f=this.initSelectionState(),d=!0,g=0;g<b.length;g++){var e=a.getCurrentCellStyle(b[g]);"0"!=mxUtils.getValue(e,mxConstants.STYLE_EDITABLE,"1")&&(this.updateSelectionStateForCell(f,b[g],b,d),d=!1)}this.updateSelectionStateForTableCells(f);return f};
+EditorUi.prototype.createSelectionState=function(){for(var a=this.editor.graph,b=a.getSelectionCells(),f=this.initSelectionState(),e=!0,g=0;g<b.length;g++){var d=a.getCurrentCellStyle(b[g]);"0"!=mxUtils.getValue(d,mxConstants.STYLE_EDITABLE,"1")&&(this.updateSelectionStateForCell(f,b[g],b,e),e=!1)}this.updateSelectionStateForTableCells(f);return f};
EditorUi.prototype.initSelectionState=function(){return{vertices:[],edges:[],cells:[],x:null,y:null,width:null,height:null,style:{},containsImage:!1,containsLabel:!1,fill:!0,glass:!0,rounded:!0,autoSize:!1,image:!0,shadow:!0,lineJumps:!0,resizable:!0,table:!1,cell:!1,row:!1,movable:!0,rotatable:!0,stroke:!0,swimlane:!1,unlocked:this.editor.graph.isEnabled(),connections:!1}};
-EditorUi.prototype.updateSelectionStateForTableCells=function(a){if(1<a.cells.length&&a.cell){for(var b=mxUtils.sortCells(a.cells),f=this.editor.graph.model,d=f.getParent(b[0]),g=f.getParent(d),e=d.getIndex(b[0]),k=g.getIndex(d),n=null,u=1,m=1,r=0,x=k<g.getChildCount()-1?f.getChildAt(f.getChildAt(g,k+1),e):null;r<b.length-1;){var B=b[++r];null==x||x!=B||null!=n&&u!=n||(n=u,u=0,m++,d=f.getParent(x),x=k+m<g.getChildCount()?f.getChildAt(f.getChildAt(g,k+m),e):null);var C=this.editor.graph.view.getState(B);
-if(B==f.getChildAt(d,e+u)&&null!=C&&1==mxUtils.getValue(C.style,"colspan",1)&&1==mxUtils.getValue(C.style,"rowspan",1))u++;else break}r==m*u-1&&(a.mergeCell=b[0],a.colspan=u,a.rowspan=m)}};
-EditorUi.prototype.updateSelectionStateForCell=function(a,b,f,d){f=this.editor.graph;a.cells.push(b);if(f.getModel().isVertex(b)){a.connections=0<f.model.getEdgeCount(b);a.unlocked=a.unlocked&&!f.isCellLocked(b);a.resizable=a.resizable&&f.isCellResizable(b);a.rotatable=a.rotatable&&f.isCellRotatable(b);a.movable=a.movable&&f.isCellMovable(b)&&!f.isTableRow(b)&&!f.isTableCell(b);a.swimlane=a.swimlane||f.isSwimlane(b);a.table=a.table||f.isTable(b);a.cell=a.cell||f.isTableCell(b);a.row=a.row||f.isTableRow(b);
-a.vertices.push(b);var g=f.getCellGeometry(b);if(null!=g&&(0<g.width?null==a.width?a.width=g.width:a.width!=g.width&&(a.width=""):a.containsLabel=!0,0<g.height?null==a.height?a.height=g.height:a.height!=g.height&&(a.height=""):a.containsLabel=!0,!g.relative||null!=g.offset)){var e=g.relative?g.offset.x:g.x;g=g.relative?g.offset.y:g.y;null==a.x?a.x=e:a.x!=e&&(a.x="");null==a.y?a.y=g:a.y!=g&&(a.y="")}}else f.getModel().isEdge(b)&&(a.edges.push(b),a.connections=!0,a.resizable=!1,a.rotatable=!1,a.movable=
-!1);b=f.view.getState(b);null!=b&&(a.autoSize=a.autoSize||f.isAutoSizeState(b),a.glass=a.glass&&f.isGlassState(b),a.rounded=a.rounded&&f.isRoundedState(b),a.lineJumps=a.lineJumps&&f.isLineJumpState(b),a.image=a.image&&f.isImageState(b),a.shadow=a.shadow&&f.isShadowState(b),a.fill=a.fill&&f.isFillState(b),a.stroke=a.stroke&&f.isStrokeState(b),e=mxUtils.getValue(b.style,mxConstants.STYLE_SHAPE,null),a.containsImage=a.containsImage||"image"==e,f.mergeStyle(b.style,a.style,d))};
-EditorUi.prototype.installShapePicker=function(){var a=this.editor.graph,b=this;a.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(u,m){"mouseDown"==m.getProperty("eventName")&&b.hideShapePicker()}));var f=mxUtils.bind(this,function(){b.hideShapePicker(!0)});a.addListener("wheel",f);a.addListener(mxEvent.ESCAPE,f);a.view.addListener(mxEvent.SCALE,f);a.view.addListener(mxEvent.SCALE_AND_TRANSLATE,f);a.getSelectionModel().addListener(mxEvent.CHANGE,f);var d=a.popupMenuHandler.isMenuShowing;
-a.popupMenuHandler.isMenuShowing=function(){return d.apply(this,arguments)||null!=b.shapePicker};var g=a.dblClick;a.dblClick=function(u,m){if(this.isEnabled())if(null!=m||null==b.sidebar||mxEvent.isShiftDown(u)||a.isCellLocked(a.getDefaultParent()))g.apply(this,arguments);else{var r=mxUtils.convertPoint(this.container,mxEvent.getClientX(u),mxEvent.getClientY(u));mxEvent.consume(u);window.setTimeout(mxUtils.bind(this,function(){b.showShapePicker(r.x,r.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",
-f);var e=this.hoverIcons.drag;this.hoverIcons.drag=function(){b.hideShapePicker();e.apply(this,arguments)};var k=this.hoverIcons.execute;this.hoverIcons.execute=function(u,m,r){var x=r.getEvent();this.graph.isCloneEvent(x)||mxEvent.isShiftDown(x)?k.apply(this,arguments):this.graph.connectVertex(u.cell,m,this.graph.defaultEdgeLength,x,null,null,mxUtils.bind(this,function(B,C,G){var J=a.getCompositeParent(u.cell);B=a.getCellGeometry(J);for(r.consume();null!=J&&a.model.isVertex(J)&&null!=B&&B.relative;)cell=
-J,J=a.model.getParent(cell),B=a.getCellGeometry(J);window.setTimeout(mxUtils.bind(this,function(){b.showShapePicker(r.getGraphX(),r.getGraphY(),J,mxUtils.bind(this,function(D){G(D);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(D))}),m)}),30)}),mxUtils.bind(this,function(B){this.graph.selectCellsForConnectVertex(B,x,this)}))};var n=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(u,m){null!=n&&window.clearTimeout(n);n=window.setTimeout(mxUtils.bind(this,function(){var r=
-m.getProperty("arrow"),x=m.getProperty("direction"),B=m.getProperty("event");r=r.getBoundingClientRect();var C=mxUtils.getOffset(a.container),G=a.container.scrollLeft+r.x-C.x;C=a.container.scrollTop+r.y-C.y;var J=a.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),D=b.showShapePicker(G,C,J,mxUtils.bind(this,function(N){null!=N&&a.connectVertex(J,x,a.defaultEdgeLength,B,!0,!0,function(Q,R,P){P(N);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(N))},
-function(Q){a.selectCellsForConnectVertex(Q)},B,this.hoverIcons)}),x,!0);this.centerShapePicker(D,r,G,C,x);mxUtils.setOpacity(D,30);mxEvent.addListener(D,"mouseenter",function(){mxUtils.setOpacity(D,100)});mxEvent.addListener(D,"mouseleave",function(){b.hideShapePicker()})}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(u,m){null!=n&&window.clearTimeout(n)}))}};
-EditorUi.prototype.centerShapePicker=function(a,b,f,d,g){if(g==mxConstants.DIRECTION_EAST||g==mxConstants.DIRECTION_WEST)a.style.width="40px";var e=a.getBoundingClientRect();g==mxConstants.DIRECTION_NORTH?(f-=e.width/2-10,d-=e.height+6):g==mxConstants.DIRECTION_SOUTH?(f-=e.width/2-10,d+=b.height+6):g==mxConstants.DIRECTION_WEST?(f-=e.width+6,d-=e.height/2-10):g==mxConstants.DIRECTION_EAST&&(f+=b.width+6,d-=e.height/2-10);a.style.left=f+"px";a.style.top=d+"px"};
-EditorUi.prototype.showShapePicker=function(a,b,f,d,g,e){a=this.createShapePicker(a,b,f,d,g,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(f,e),e);null!=a&&(null==this.hoverIcons||e||this.hoverIcons.reset(),e=this.editor.graph,e.popupMenuHandler.hideMenu(),e.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=d,this.shapePicker=a);return a};
-EditorUi.prototype.createShapePicker=function(a,b,f,d,g,e,k,n){var u=null;if(null!=k&&0<k.length){var m=this,r=this.editor.graph;u=document.createElement("div");g=r.view.getState(f);var x=null==f||null!=g&&r.isTransparentState(g)?null:r.copyStyle(f);f=6>k.length?35*k.length:140;u.className="geToolbarContainer geSidebarContainer";u.style.cssText="position:absolute;left:"+a+"px;top:"+b+"px;width:"+f+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+
+EditorUi.prototype.updateSelectionStateForTableCells=function(a){if(1<a.cells.length&&a.cell){for(var b=mxUtils.sortCells(a.cells),f=this.editor.graph.model,e=f.getParent(b[0]),g=f.getParent(e),d=e.getIndex(b[0]),k=g.getIndex(e),n=null,u=1,m=1,r=0,x=k<g.getChildCount()-1?f.getChildAt(f.getChildAt(g,k+1),d):null;r<b.length-1;){var B=b[++r];null==x||x!=B||null!=n&&u!=n||(n=u,u=0,m++,e=f.getParent(x),x=k+m<g.getChildCount()?f.getChildAt(f.getChildAt(g,k+m),d):null);var C=this.editor.graph.view.getState(B);
+if(B==f.getChildAt(e,d+u)&&null!=C&&1==mxUtils.getValue(C.style,"colspan",1)&&1==mxUtils.getValue(C.style,"rowspan",1))u++;else break}r==m*u-1&&(a.mergeCell=b[0],a.colspan=u,a.rowspan=m)}};
+EditorUi.prototype.updateSelectionStateForCell=function(a,b,f,e){f=this.editor.graph;a.cells.push(b);if(f.getModel().isVertex(b)){a.connections=0<f.model.getEdgeCount(b);a.unlocked=a.unlocked&&!f.isCellLocked(b);a.resizable=a.resizable&&f.isCellResizable(b);a.rotatable=a.rotatable&&f.isCellRotatable(b);a.movable=a.movable&&f.isCellMovable(b)&&!f.isTableRow(b)&&!f.isTableCell(b);a.swimlane=a.swimlane||f.isSwimlane(b);a.table=a.table||f.isTable(b);a.cell=a.cell||f.isTableCell(b);a.row=a.row||f.isTableRow(b);
+a.vertices.push(b);var g=f.getCellGeometry(b);if(null!=g&&(0<g.width?null==a.width?a.width=g.width:a.width!=g.width&&(a.width=""):a.containsLabel=!0,0<g.height?null==a.height?a.height=g.height:a.height!=g.height&&(a.height=""):a.containsLabel=!0,!g.relative||null!=g.offset)){var d=g.relative?g.offset.x:g.x;g=g.relative?g.offset.y:g.y;null==a.x?a.x=d:a.x!=d&&(a.x="");null==a.y?a.y=g:a.y!=g&&(a.y="")}}else f.getModel().isEdge(b)&&(a.edges.push(b),a.connections=!0,a.resizable=!1,a.rotatable=!1,a.movable=
+!1);b=f.view.getState(b);null!=b&&(a.autoSize=a.autoSize||f.isAutoSizeState(b),a.glass=a.glass&&f.isGlassState(b),a.rounded=a.rounded&&f.isRoundedState(b),a.lineJumps=a.lineJumps&&f.isLineJumpState(b),a.image=a.image&&f.isImageState(b),a.shadow=a.shadow&&f.isShadowState(b),a.fill=a.fill&&f.isFillState(b),a.stroke=a.stroke&&f.isStrokeState(b),d=mxUtils.getValue(b.style,mxConstants.STYLE_SHAPE,null),a.containsImage=a.containsImage||"image"==d,f.mergeStyle(b.style,a.style,e))};
+EditorUi.prototype.installShapePicker=function(){var a=this.editor.graph,b=this;a.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(u,m){"mouseDown"==m.getProperty("eventName")&&b.hideShapePicker()}));var f=mxUtils.bind(this,function(){b.hideShapePicker(!0)});a.addListener("wheel",f);a.addListener(mxEvent.ESCAPE,f);a.view.addListener(mxEvent.SCALE,f);a.view.addListener(mxEvent.SCALE_AND_TRANSLATE,f);a.getSelectionModel().addListener(mxEvent.CHANGE,f);var e=a.popupMenuHandler.isMenuShowing;
+a.popupMenuHandler.isMenuShowing=function(){return e.apply(this,arguments)||null!=b.shapePicker};var g=a.dblClick;a.dblClick=function(u,m){if(this.isEnabled())if(null!=m||null==b.sidebar||mxEvent.isShiftDown(u)||a.isCellLocked(a.getDefaultParent()))g.apply(this,arguments);else{var r=mxUtils.convertPoint(this.container,mxEvent.getClientX(u),mxEvent.getClientY(u));mxEvent.consume(u);window.setTimeout(mxUtils.bind(this,function(){b.showShapePicker(r.x,r.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",
+f);var d=this.hoverIcons.drag;this.hoverIcons.drag=function(){b.hideShapePicker();d.apply(this,arguments)};var k=this.hoverIcons.execute;this.hoverIcons.execute=function(u,m,r){var x=r.getEvent();this.graph.isCloneEvent(x)||mxEvent.isShiftDown(x)?k.apply(this,arguments):this.graph.connectVertex(u.cell,m,this.graph.defaultEdgeLength,x,null,null,mxUtils.bind(this,function(B,C,F){var J=a.getCompositeParent(u.cell);B=a.getCellGeometry(J);for(r.consume();null!=J&&a.model.isVertex(J)&&null!=B&&B.relative;)cell=
+J,J=a.model.getParent(cell),B=a.getCellGeometry(J);window.setTimeout(mxUtils.bind(this,function(){b.showShapePicker(r.getGraphX(),r.getGraphY(),J,mxUtils.bind(this,function(D){F(D);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(D))}),m)}),30)}),mxUtils.bind(this,function(B){this.graph.selectCellsForConnectVertex(B,x,this)}))};var n=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(u,m){null!=n&&window.clearTimeout(n);n=window.setTimeout(mxUtils.bind(this,function(){var r=
+m.getProperty("arrow"),x=m.getProperty("direction"),B=m.getProperty("event");r=r.getBoundingClientRect();var C=mxUtils.getOffset(a.container),F=a.container.scrollLeft+r.x-C.x;C=a.container.scrollTop+r.y-C.y;var J=a.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),D=b.showShapePicker(F,C,J,mxUtils.bind(this,function(N){null!=N&&a.connectVertex(J,x,a.defaultEdgeLength,B,!0,!0,function(S,T,P){P(N);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(N))},
+function(S){a.selectCellsForConnectVertex(S)},B,this.hoverIcons)}),x,!0);this.centerShapePicker(D,r,F,C,x);mxUtils.setOpacity(D,30);mxEvent.addListener(D,"mouseenter",function(){mxUtils.setOpacity(D,100)});mxEvent.addListener(D,"mouseleave",function(){b.hideShapePicker()})}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(u,m){null!=n&&window.clearTimeout(n)}))}};
+EditorUi.prototype.centerShapePicker=function(a,b,f,e,g){if(g==mxConstants.DIRECTION_EAST||g==mxConstants.DIRECTION_WEST)a.style.width="40px";var d=a.getBoundingClientRect();g==mxConstants.DIRECTION_NORTH?(f-=d.width/2-10,e-=d.height+6):g==mxConstants.DIRECTION_SOUTH?(f-=d.width/2-10,e+=b.height+6):g==mxConstants.DIRECTION_WEST?(f-=d.width+6,e-=d.height/2-10):g==mxConstants.DIRECTION_EAST&&(f+=b.width+6,e-=d.height/2-10);a.style.left=f+"px";a.style.top=e+"px"};
+EditorUi.prototype.showShapePicker=function(a,b,f,e,g,d){a=this.createShapePicker(a,b,f,e,g,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(f,d),d);null!=a&&(null==this.hoverIcons||d||this.hoverIcons.reset(),d=this.editor.graph,d.popupMenuHandler.hideMenu(),d.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=e,this.shapePicker=a);return a};
+EditorUi.prototype.createShapePicker=function(a,b,f,e,g,d,k,n){var u=null;if(null!=k&&0<k.length){var m=this,r=this.editor.graph;u=document.createElement("div");g=r.view.getState(f);var x=null==f||null!=g&&r.isTransparentState(g)?null:r.copyStyle(f);f=6>k.length?35*k.length:140;u.className="geToolbarContainer geSidebarContainer";u.style.cssText="position:absolute;left:"+a+"px;top:"+b+"px;width:"+f+"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+";";n||mxUtils.setPrefixedStyle(u.style,"transform","translate(-22px,-22px)");null!=r.background&&r.background!=mxConstants.NONE&&(u.style.backgroundColor=r.background);r.container.appendChild(u);f=mxUtils.bind(this,function(B){var C=document.createElement("a");C.className="geItem";C.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";u.appendChild(C);null!=x&&"1"!=urlParams.sketch?
-this.sidebar.graph.pasteStyle(x,[B]):m.insertHandler([B],""!=B.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([B],25,25,C,null,!0,!1,B.geometry.width,B.geometry.height);mxEvent.addListener(C,"click",function(){var G=r.cloneCell(B);if(null!=d)d(G);else{G.geometry.x=r.snap(Math.round(a/r.view.scale)-r.view.translate.x-B.geometry.width/2);G.geometry.y=r.snap(Math.round(b/r.view.scale)-r.view.translate.y-B.geometry.height/2);r.model.beginUpdate();try{r.addCell(G)}finally{r.model.endUpdate()}r.setSelectionCell(G);
-r.scrollCellToVisible(G);r.startEditingAtCell(G);null!=m.hoverIcons&&m.hoverIcons.update(r.view.getState(G))}null!=e&&e()})});for(g=0;g<(n?Math.min(k.length,4):k.length);g++)f(k[g]);k=u.offsetTop+u.clientHeight-(r.container.scrollTop+r.container.offsetHeight);0<k&&(u.style.top=Math.max(r.container.scrollTop+22,b-k)+"px");k=u.offsetLeft+u.clientWidth-(r.container.scrollLeft+r.container.offsetWidth);0<k&&(u.style.left=Math.max(r.container.scrollLeft+22,a-k)+"px")}return u};
-EditorUi.prototype.getCellsForShapePicker=function(a,b){b=mxUtils.bind(this,function(f,d,g,e){return this.editor.graph.createVertex(null,null,e||"",0,0,d||120,g||60,f,!1)});return[null!=a?this.editor.graph.cloneCell(a):b("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;",40,20,"Text"),b("whiteSpace=wrap;html=1;"),b("ellipse;whiteSpace=wrap;html=1;"),b("rhombus;whiteSpace=wrap;html=1;",80,80),b("rounded=1;whiteSpace=wrap;html=1;"),b("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),
+this.sidebar.graph.pasteStyle(x,[B]):m.insertHandler([B],""!=B.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([B],25,25,C,null,!0,!1,B.geometry.width,B.geometry.height);mxEvent.addListener(C,"click",function(){var F=r.cloneCell(B);if(null!=e)e(F);else{F.geometry.x=r.snap(Math.round(a/r.view.scale)-r.view.translate.x-B.geometry.width/2);F.geometry.y=r.snap(Math.round(b/r.view.scale)-r.view.translate.y-B.geometry.height/2);r.model.beginUpdate();try{r.addCell(F)}finally{r.model.endUpdate()}r.setSelectionCell(F);
+r.scrollCellToVisible(F);r.startEditingAtCell(F);null!=m.hoverIcons&&m.hoverIcons.update(r.view.getState(F))}null!=d&&d()})});for(g=0;g<(n?Math.min(k.length,4):k.length);g++)f(k[g]);k=u.offsetTop+u.clientHeight-(r.container.scrollTop+r.container.offsetHeight);0<k&&(u.style.top=Math.max(r.container.scrollTop+22,b-k)+"px");k=u.offsetLeft+u.clientWidth-(r.container.scrollLeft+r.container.offsetWidth);0<k&&(u.style.left=Math.max(r.container.scrollLeft+22,a-k)+"px")}return u};
+EditorUi.prototype.getCellsForShapePicker=function(a,b){b=mxUtils.bind(this,function(f,e,g,d){return this.editor.graph.createVertex(null,null,d||"",0,0,e||120,g||60,f,!1)});return[null!=a?this.editor.graph.cloneCell(a):b("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;",40,20,"Text"),b("whiteSpace=wrap;html=1;"),b("ellipse;whiteSpace=wrap;html=1;"),b("rhombus;whiteSpace=wrap;html=1;",80,80),b("rounded=1;whiteSpace=wrap;html=1;"),b("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),
b("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,60),b("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",120,80),b("shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,80),b("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;"),b("triangle;whiteSpace=wrap;html=1;",60,80),b("shape=document;whiteSpace=wrap;html=1;boundedLbl=1;",120,80),b("shape=tape;whiteSpace=wrap;html=1;",120,100),b("ellipse;shape=cloud;whiteSpace=wrap;html=1;",
120,80),b("shape=singleArrow;whiteSpace=wrap;html=1;arrowWidth=0.4;arrowSize=0.4;",80,60),b("shape=waypoint;sketch=0;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;",40,40)]};EditorUi.prototype.hideShapePicker=function(a){null!=this.shapePicker&&(this.shapePicker.parentNode.removeChild(this.shapePicker),this.shapePicker=null,a||null==this.shapePickerCallback||this.shapePickerCallback(),this.shapePickerCallback=null)};
-EditorUi.prototype.onKeyDown=function(a){var b=this.editor.graph;if(9==a.which&&b.isEnabled()&&!mxEvent.isControlDown(a)){if(b.isEditing())if(mxEvent.isAltDown(a))b.stopEditing(!1);else try{var f=b.cellEditor.isContentEditing()&&b.cellEditor.isTextSelected();if(window.getSelection&&b.cellEditor.isContentEditing()&&!f&&!mxClient.IS_IE&&!mxClient.IS_IE11){var d=window.getSelection(),g=0<d.rangeCount?d.getRangeAt(0).commonAncestorContainer:null;f=null!=g&&("LI"==g.nodeName||null!=g.parentNode&&"LI"==
-g.parentNode.nodeName)}f?document.execCommand(mxEvent.isShiftDown(a)?"outdent":"indent",!1,null):mxEvent.isShiftDown(a)?b.stopEditing(!1):b.cellEditor.insertTab(b.cellEditor.isContentEditing()?null:4)}catch(e){}else mxEvent.isAltDown(a)?b.selectParentCell():b.selectCell(!mxEvent.isShiftDown(a));mxEvent.consume(a)}};
+EditorUi.prototype.onKeyDown=function(a){var b=this.editor.graph;if(9==a.which&&b.isEnabled()&&!mxEvent.isControlDown(a)){if(b.isEditing())if(mxEvent.isAltDown(a))b.stopEditing(!1);else try{var f=b.cellEditor.isContentEditing()&&b.cellEditor.isTextSelected();if(window.getSelection&&b.cellEditor.isContentEditing()&&!f&&!mxClient.IS_IE&&!mxClient.IS_IE11){var e=window.getSelection(),g=0<e.rangeCount?e.getRangeAt(0).commonAncestorContainer:null;f=null!=g&&("LI"==g.nodeName||null!=g.parentNode&&"LI"==
+g.parentNode.nodeName)}f?document.execCommand(mxEvent.isShiftDown(a)?"outdent":"indent",!1,null):mxEvent.isShiftDown(a)?b.stopEditing(!1):b.cellEditor.insertTab(b.cellEditor.isContentEditing()?null:4)}catch(d){}else mxEvent.isAltDown(a)?b.selectParentCell():b.selectCell(!mxEvent.isShiftDown(a));mxEvent.consume(a)}};
EditorUi.prototype.onKeyPress=function(a){var b=this.editor.graph;!this.isImmediateEditingEvent(a)||b.isEditing()||b.isSelectionEmpty()||0===a.which||27===a.which||mxEvent.isAltDown(a)||mxEvent.isControlDown(a)||mxEvent.isMetaDown(a)||(b.escape(),b.startEditing(),mxClient.IS_FF&&(b=b.cellEditor,null!=b.textarea&&(b.textarea.innerHTML=String.fromCharCode(a.which),a=document.createRange(),a.selectNodeContents(b.textarea),a.collapse(!1),b=window.getSelection(),b.removeAllRanges(),b.addRange(a))))};
EditorUi.prototype.isImmediateEditingEvent=function(a){return!0};
-EditorUi.prototype.updateCssForMarker=function(a,b,f,d,g){a.style.verticalAlign="top";a.style.height="21px";a.style.width="21px";a.innerText="";"flexArrow"==f?a.className=null!=d&&d!=mxConstants.NONE?"geSprite geSprite-"+b+"blocktrans":"geSprite geSprite-noarrow":(f=this.getImageForMarker(d,g),null!=f?(d=document.createElement("img"),d.style.position="absolute",d.style.marginTop="0.5px",d.setAttribute("src",f),a.className="","end"==b&&mxUtils.setPrefixedStyle(d.style,"transform","scaleX(-1)"),Editor.isDarkMode()&&
-(d.style.filter="invert(100%)"),a.appendChild(d)):(a.className="geSprite geSprite-noarrow",a.innerHTML=mxUtils.htmlEntities(mxResources.get("none")),a.style.backgroundImage="none",a.style.verticalAlign="top",a.style.marginTop="4px",a.style.fontSize="10px",a.style.filter="none",a.style.color=this.defaultStrokeColor,a.nextSibling.style.marginTop="0px"))};
+EditorUi.prototype.updateCssForMarker=function(a,b,f,e,g){a.style.verticalAlign="top";a.style.height="21px";a.style.width="21px";a.innerText="";"flexArrow"==f?a.className=null!=e&&e!=mxConstants.NONE?"geSprite geSprite-"+b+"blocktrans":"geSprite geSprite-noarrow":(f=this.getImageForMarker(e,g),null!=f?(e=document.createElement("img"),e.style.position="absolute",e.style.marginTop="0.5px",e.setAttribute("src",f),a.className="","end"==b&&mxUtils.setPrefixedStyle(e.style,"transform","scaleX(-1)"),Editor.isDarkMode()&&
+(e.style.filter="invert(100%)"),a.appendChild(e)):(a.className="geSprite geSprite-noarrow",a.innerHTML=mxUtils.htmlEntities(mxResources.get("none")),a.style.backgroundImage="none",a.style.verticalAlign="top",a.style.marginTop="4px",a.style.fontSize="10px",a.style.filter="none",a.style.color=this.defaultStrokeColor,a.nextSibling.style.marginTop="0px"))};
EditorUi.prototype.getImageForMarker=function(a,b){var f=null;a==mxConstants.ARROW_CLASSIC?f="1"!=b?Format.classicMarkerImage.src:Format.classicFilledMarkerImage.src:a==mxConstants.ARROW_CLASSIC_THIN?f="1"!=b?Format.classicThinMarkerImage.src:Format.openThinFilledMarkerImage.src:a==mxConstants.ARROW_OPEN?f=Format.openFilledMarkerImage.src:a==mxConstants.ARROW_OPEN_THIN?f=Format.openThinFilledMarkerImage.src:a==mxConstants.ARROW_BLOCK?f="1"!=b?Format.blockMarkerImage.src:Format.blockFilledMarkerImage.src:
a==mxConstants.ARROW_BLOCK_THIN?f="1"!=b?Format.blockThinMarkerImage.src:Format.blockThinFilledMarkerImage.src:a==mxConstants.ARROW_OVAL?f="1"!=b?Format.ovalMarkerImage.src:Format.ovalFilledMarkerImage.src:a==mxConstants.ARROW_DIAMOND?f="1"!=b?Format.diamondMarkerImage.src:Format.diamondFilledMarkerImage.src:a==mxConstants.ARROW_DIAMOND_THIN?f="1"!=b?Format.diamondThinMarkerImage.src:Format.diamondThinFilledMarkerImage.src:"doubleBlock"==a?f="1"!=b?Format.doubleBlockMarkerImage.src:Format.doubleBlockFilledMarkerImage.src:
"box"==a?f=Format.boxMarkerImage.src:"halfCircle"==a?f=Format.halfCircleMarkerImage.src:"openAsync"==a?f=Format.openAsyncFilledMarkerImage.src:"async"==a?f="1"!=b?Format.asyncMarkerImage.src:Format.asyncFilledMarkerImage.src:"dash"==a?f=Format.dashMarkerImage.src:"baseDash"==a?f=Format.baseDashMarkerImage.src:"cross"==a?f=Format.crossMarkerImage.src:"circle"==a?f=Format.circleMarkerImage.src:"circlePlus"==a?f=Format.circlePlusMarkerImage.src:"ERone"==a?f=Format.EROneMarkerImage.src:"ERmandOne"==a?
f=Format.ERmandOneMarkerImage.src:"ERmany"==a?f=Format.ERmanyMarkerImage.src:"ERoneToMany"==a?f=Format.ERoneToManyMarkerImage.src:"ERzeroToOne"==a?f=Format.ERzeroToOneMarkerImage.src:"ERzeroToMany"==a&&(f=Format.ERzeroToManyMarkerImage.src);return f};EditorUi.prototype.createMenus=function(){return null};
EditorUi.prototype.updatePasteActionStates=function(){var a=this.editor.graph,b=this.actions.get("paste"),f=this.actions.get("pasteHere");b.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(!mxClient.IS_FF&&null!=navigator.clipboard||!mxClipboard.isEmpty())&&a.isEnabled()&&!a.isCellLocked(a.getDefaultParent()));f.setEnabled(b.isEnabled())};
-EditorUi.prototype.initClipboard=function(){var a=this,b=mxClipboard.cut;mxClipboard.cut=function(e){e.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):b.apply(this,arguments);a.updatePasteActionStates()};mxClipboard.copy=function(e){var k=null;if(e.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{k=k||e.getSelectionCells();k=e.getExportableCells(e.model.getTopmostCells(k));for(var n={},u=e.createCellLookup(k),m=e.cloneCells(k,null,n),r=new mxGraphModel,x=r.getChildAt(r.getRoot(),
-0),B=0;B<m.length;B++){r.add(x,m[B]);var C=e.view.getState(k[B]);if(null!=C){var G=e.getCellGeometry(m[B]);null!=G&&G.relative&&!r.isEdge(k[B])&&null==u[mxObjectIdentity.get(r.getParent(k[B]))]&&(G.offset=null,G.relative=!1,G.x=C.x/C.view.scale-C.view.translate.x,G.y=C.y/C.view.scale-C.view.translate.y)}}e.updateCustomLinks(e.createCellMapping(n,u),m);mxClipboard.insertCount=1;mxClipboard.setCells(m)}a.updatePasteActionStates();return k};var f=mxClipboard.paste;mxClipboard.paste=function(e){var k=
-null;e.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):k=f.apply(this,arguments);a.updatePasteActionStates();return k};var d=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){d.apply(this,arguments);a.updatePasteActionStates()};var g=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(e,k){g.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};
+EditorUi.prototype.initClipboard=function(){var a=this,b=mxClipboard.cut;mxClipboard.cut=function(d){d.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):b.apply(this,arguments);a.updatePasteActionStates()};mxClipboard.copy=function(d){var k=null;if(d.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{k=k||d.getSelectionCells();k=d.getExportableCells(d.model.getTopmostCells(k));for(var n={},u=d.createCellLookup(k),m=d.cloneCells(k,null,n),r=new mxGraphModel,x=r.getChildAt(r.getRoot(),
+0),B=0;B<m.length;B++){r.add(x,m[B]);var C=d.view.getState(k[B]);if(null!=C){var F=d.getCellGeometry(m[B]);null!=F&&F.relative&&!r.isEdge(k[B])&&null==u[mxObjectIdentity.get(r.getParent(k[B]))]&&(F.offset=null,F.relative=!1,F.x=C.x/C.view.scale-C.view.translate.x,F.y=C.y/C.view.scale-C.view.translate.y)}}d.updateCustomLinks(d.createCellMapping(n,u),m);mxClipboard.insertCount=1;mxClipboard.setCells(m)}a.updatePasteActionStates();return k};var f=mxClipboard.paste;mxClipboard.paste=function(d){var k=
+null;d.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):k=f.apply(this,arguments);a.updatePasteActionStates();return k};var e=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){e.apply(this,arguments);a.updatePasteActionStates()};var g=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(d,k){g.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};
EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=400;EditorUi.prototype.buttonZoomDelay=600;
-EditorUi.prototype.initCanvas=function(){var a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var F=this.graph.getPageLayout(),L=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+F.x*L.width),this.scale*(this.translate.y+F.y*L.height),this.scale*F.width*L.width,
-this.scale*F.height*L.height)};a.getPreferredPageSize=function(F,L,T){F=this.getPageLayout();L=this.getPageSize();return new mxRectangle(0,0,F.width*L.width,F.height*L.height)};var b=null,f=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(F,L,T,ca){if(null!=a.container&&!a.isViewer()){T=null!=T?T:0;ca=null!=ca?ca:0;var fa=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),wa=mxUtils.hasScrollbars(a.container),W=a.view.translate,aa=a.view.scale,
-oa=mxRectangle.fromRectangle(fa);oa.x=oa.x/aa-W.x;oa.y=oa.y/aa-W.y;oa.width/=aa;oa.height/=aa;W=a.container.scrollTop;var sa=a.container.scrollLeft,Ka=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)Ka+=3;var Ha=a.container.offsetWidth-Ka;Ka=a.container.offsetHeight-Ka;F=F?Math.max(.3,Math.min(L||1,Ha/oa.width)):aa;L=(Ha-F*oa.width)/2/F;var ua=0==this.lightboxVerticalDivider?0:(Ka-F*oa.height)/this.lightboxVerticalDivider/F;wa&&(L=Math.max(L,0),ua=Math.max(ua,
-0));if(wa||fa.width<Ha||fa.height<Ka)a.view.scaleAndTranslate(F,Math.floor(L-oa.x),Math.floor(ua-oa.y)),a.container.scrollTop=W*F/aa,a.container.scrollLeft=sa*F/aa;else if(0!=T||0!=ca)fa=a.view.translate,a.view.setTranslate(Math.floor(fa.x+T/aa),Math.floor(fa.y+ca/aa))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var d=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",d);this.destroyFunctions.push(function(){mxEvent.removeListener(window,
-"resize",d)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(F){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(F){a.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=
+EditorUi.prototype.initCanvas=function(){var a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var G=this.graph.getPageLayout(),K=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+G.x*K.width),this.scale*(this.translate.y+G.y*K.height),this.scale*G.width*K.width,
+this.scale*G.height*K.height)};a.getPreferredPageSize=function(G,K,Q){G=this.getPageLayout();K=this.getPageSize();return new mxRectangle(0,0,G.width*K.width,G.height*K.height)};var b=null,f=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(G,K,Q,ba){if(null!=a.container&&!a.isViewer()){Q=null!=Q?Q:0;ba=null!=ba?ba:0;var la=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),ra=mxUtils.hasScrollbars(a.container),X=a.view.translate,ca=a.view.scale,
+oa=mxRectangle.fromRectangle(la);oa.x=oa.x/ca-X.x;oa.y=oa.y/ca-X.y;oa.width/=ca;oa.height/=ca;X=a.container.scrollTop;var ta=a.container.scrollLeft,Ka=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)Ka+=3;var Ha=a.container.offsetWidth-Ka;Ka=a.container.offsetHeight-Ka;G=G?Math.max(.3,Math.min(K||1,Ha/oa.width)):ca;K=(Ha-G*oa.width)/2/G;var va=0==this.lightboxVerticalDivider?0:(Ka-G*oa.height)/this.lightboxVerticalDivider/G;ra&&(K=Math.max(K,0),va=Math.max(va,
+0));if(ra||la.width<Ha||la.height<Ka)a.view.scaleAndTranslate(G,Math.floor(K-oa.x),Math.floor(va-oa.y)),a.container.scrollTop=X*G/ca,a.container.scrollLeft=ta*G/ca;else if(0!=Q||0!=ba)la=a.view.translate,a.view.setTranslate(Math.floor(la.x+Q/ca),Math.floor(la.y+ba/ca))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var e=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",e);this.destroyFunctions.push(function(){mxEvent.removeListener(window,
+"resize",e)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(G){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(G){a.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=a.isViewer()?"0":"50%";mxClient.IS_IE||mxClient.IS_IE11?(this.chromelessToolbar.style.backgroundColor="#ffffff",this.chromelessToolbar.style.border="3px solid black"):this.chromelessToolbar.style.backgroundColor="#000000";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,
-"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var e=mxUtils.bind(this,function(){var F=mxUtils.getCurrentStyle(a.container);a.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=F?parseInt(F["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",e);e();var k=0;e=mxUtils.bind(this,function(F,L,T){k++;
-var ca=document.createElement("span");ca.style.paddingLeft="8px";ca.style.paddingRight="8px";ca.style.cursor="pointer";mxEvent.addListener(ca,"click",F);null!=T&&ca.setAttribute("title",T);F=document.createElement("img");F.setAttribute("border","0");F.setAttribute("src",L);F.style.width="36px";F.style.filter="invert(100%)";ca.appendChild(F);this.chromelessToolbar.appendChild(ca);return ca});null!=g.backBtn&&e(mxUtils.bind(this,function(F){window.location.href=g.backBtn.url;mxEvent.consume(F)}),Editor.backImage,
-mxResources.get("back",null,"Back"));if(this.isPagesEnabled()){var n=e(mxUtils.bind(this,function(F){this.actions.get("previousPage").funct();mxEvent.consume(F)}),Editor.previousImage,mxResources.get("previousPage")),u=document.createElement("div");u.style.fontFamily=Editor.defaultHtmlFont;u.style.display="inline-block";u.style.verticalAlign="top";u.style.fontWeight="bold";u.style.marginTop="8px";u.style.fontSize="14px";u.style.color=mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";this.chromelessToolbar.appendChild(u);
-var m=e(mxUtils.bind(this,function(F){this.actions.get("nextPage").funct();mxEvent.consume(F)}),Editor.nextImage,mxResources.get("nextPage")),r=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(u.innerText="",mxUtils.write(u,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});n.style.paddingLeft="0px";n.style.paddingRight="4px";m.style.paddingLeft="4px";m.style.paddingRight="0px";var x=mxUtils.bind(this,function(){null!=this.pages&&
-1<this.pages.length&&null!=this.currentPage?(m.style.display="",n.style.display="",u.style.display="inline-block"):(m.style.display="none",n.style.display="none",u.style.display="none");r()});this.editor.addListener("resetGraphView",x);this.editor.addListener("pageSelected",r)}e(mxUtils.bind(this,function(F){this.actions.get("zoomOut").funct();mxEvent.consume(F)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");e(mxUtils.bind(this,function(F){this.actions.get("zoomIn").funct();
-mxEvent.consume(F)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");e(mxUtils.bind(this,function(F){a.isLightboxView()?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(F)}),Editor.zoomFitImage,mxResources.get("fit"));var B=null,C=null,G=mxUtils.bind(this,function(F){null!=B&&(window.clearTimeout(B),B=null);null!=C&&(window.clearTimeout(C),C=null);B=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,
-0);B=null;C=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";C=null}),600)}),F||200)}),J=mxUtils.bind(this,function(F){null!=B&&(window.clearTimeout(B),B=null);null!=C&&(window.clearTimeout(C),C=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,F||30)});if("1"==urlParams.layers){this.layersDialog=null;var D=e(mxUtils.bind(this,function(F){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),
-this.layersDialog=null;else{this.layersDialog=a.createLayersDialog(null,!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var L=D.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=L.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));L=mxUtils.getCurrentStyle(this.editor.graph.container);
-this.layersDialog.style.zIndex=L.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(F)}),Editor.layersImage,mxResources.get("layers")),N=a.getModel();N.addListener(mxEvent.CHANGE,function(){D.style.display=1<N.getChildCount(N.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(e);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||e(mxUtils.bind(this,function(F){null!=
-this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(F)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(x=0;x<this.lightboxToolbarActions.length;x++){var Q=this.lightboxToolbarActions[x];Q.elem=e(Q.fn,Q.icon,Q.tooltip)}null!=g.refreshBtn&&e(mxUtils.bind(this,function(F){g.refreshBtn.url?window.location.href=g.refreshBtn.url:
-window.location.reload();mxEvent.consume(F)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"));null!=g.fullscreenBtn&&window.self!==window.top&&e(mxUtils.bind(this,function(F){g.fullscreenBtn.url?a.openLink(g.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(F)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(g.closeBtn&&window.self===window.top||a.lightbox&&("1"==urlParams.close||this.container!=document.body))&&e(mxUtils.bind(this,
-function(F){"1"==urlParams.close||g.closeBtn?window.close():(this.destroy(),mxEvent.consume(F))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";a.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(F){mxEvent.isTouchEvent(F)||(mxEvent.isShiftDown(F)||
-J(30),G())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(F){mxEvent.consume(F)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(F){a.tooltipHandler.resetTimer();a.tooltipHandler.hideTooltip();mxEvent.isShiftDown(F)?G():J(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(F){mxEvent.isShiftDown(F)?G():J(100);mxEvent.consume(F)}));mxEvent.addListener(this.chromelessToolbar,
-"mouseleave",mxUtils.bind(this,function(F){mxEvent.isTouchEvent(F)||J(30)}));var R=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(F,L){this.startX=L.getGraphX();this.startY=L.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(F,L){},mouseUp:function(F,L){mxEvent.isTouchEvent(L.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<R&&Math.abs(this.scrollTop-a.container.scrollTop)<R&&
-Math.abs(this.startX-L.getGraphX())<R&&Math.abs(this.startY-L.getGraphY())<R&&(0<parseFloat(f.chromelessToolbar.style.opacity||0)?G():J(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var P=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var F=this.graph.getPagePadding(),L=this.graph.getPageSize();this.translate.x=F.x-(this.x0||0)*L.width;this.translate.y=F.y-(this.y0||0)*L.height}P.apply(this,
-arguments)};if(!a.isViewer()){var Z=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var F=this.getPageLayout(),L=this.getPagePadding(),T=this.getPageSize(),ca=Math.ceil(2*L.x+F.width*T.width),fa=Math.ceil(2*L.y+F.height*T.height),wa=a.minimumGraphSize;if(null==wa||wa.width!=ca||wa.height!=fa)a.minimumGraphSize=new mxRectangle(0,0,ca,fa);ca=L.x-F.x*T.width;L=L.y-F.y*T.height;this.autoTranslate||this.view.translate.x==ca&&this.view.translate.y==
-L?Z.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=F.x,this.view.y0=F.y,F=a.view.translate.x,T=a.view.translate.y,a.view.setTranslate(ca,L),a.container.scrollLeft+=Math.round((ca-F)*a.view.scale),a.container.scrollTop+=Math.round((L-T)*a.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var U=a.view.getBackgroundPane(),V=a.view.getDrawPane();a.cumulativeZoomFactor=1;var ia=null,ha=null,ba=null,qa=null,O=null,S=function(F){null!=
-ia&&window.clearTimeout(ia);0<=F&&window.setTimeout(function(){if(!a.isMouseDown||qa)ia=window.setTimeout(mxUtils.bind(this,function(){a.isFastZoomEnabled()&&(null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null)),V.style.transformOrigin="",U.style.transformOrigin="",mxClient.IS_SF?(V.style.transform="scale(1)",
-U.style.transform="scale(1)",window.setTimeout(function(){V.style.transform="";U.style.transform=""},0)):(V.style.transform="",U.style.transform=""),a.view.getDecoratorPane().style.opacity="",a.view.getOverlayPane().style.opacity="");var L=new mxPoint(a.container.scrollLeft,a.container.scrollTop),T=mxUtils.getOffset(a.container),ca=a.view.scale,fa=0,wa=0;null!=ha&&(fa=a.container.offsetWidth/2-ha.x+T.x,wa=a.container.offsetHeight/2-ha.y+T.y);a.zoom(a.cumulativeZoomFactor,null,a.isFastZoomEnabled()?
-20:null);a.view.scale!=ca&&(null!=ba&&(fa+=L.x-ba.x,wa+=L.y-ba.y),null!=b&&f.chromelessResize(!1,null,fa*(a.cumulativeZoomFactor-1),wa*(a.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==fa&&0==wa||(a.container.scrollLeft-=fa*(a.cumulativeZoomFactor-1),a.container.scrollTop-=wa*(a.cumulativeZoomFactor-1)));null!=O&&V.setAttribute("filter",O);a.cumulativeZoomFactor=1;O=qa=ha=ba=ia=null}),null!=F?F:a.isFastZoomEnabled()?f.wheelZoomDelay:f.lazyZoomDelay)},0)};a.lazyZoom=function(F,L,
-T,ca){ca=null!=ca?ca:this.zoomFactor;(L=L||!a.scrollbars)&&(ha=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/2));F?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=ca,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-
-.05)/this.view.scale:(this.cumulativeZoomFactor/=ca,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;a.isFastZoomEnabled()&&(null==O&&""!=V.getAttribute("filter")&&(O=V.getAttribute("filter"),V.removeAttribute("filter")),ba=new mxPoint(a.container.scrollLeft,a.container.scrollTop),F=L||null==ha?a.container.scrollLeft+a.container.clientWidth/
-2:ha.x+a.container.scrollLeft-a.container.offsetLeft,ca=L||null==ha?a.container.scrollTop+a.container.clientHeight/2:ha.y+a.container.scrollTop-a.container.offsetTop,V.style.transformOrigin=F+"px "+ca+"px",V.style.transform="scale("+this.cumulativeZoomFactor+")",U.style.transformOrigin=F+"px "+ca+"px",U.style.transform="scale("+this.cumulativeZoomFactor+")",null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(F=a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(F.style,
-"transform-origin",(L||null==ha?a.container.clientWidth/2+a.container.scrollLeft-F.offsetLeft+"px":ha.x+a.container.scrollLeft-F.offsetLeft-a.container.offsetLeft+"px")+" "+(L||null==ha?a.container.clientHeight/2+a.container.scrollTop-F.offsetTop+"px":ha.y+a.container.scrollTop-F.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(F.style,"transform","scale("+this.cumulativeZoomFactor+")")),a.view.getDecoratorPane().style.opacity="0",a.view.getOverlayPane().style.opacity="0",null!=f.hoverIcons&&
-f.hoverIcons.reset());S(a.isFastZoomEnabled()?T:0)};mxEvent.addGestureListeners(a.container,function(F){null!=ia&&window.clearTimeout(ia)},null,function(F){1!=a.cumulativeZoomFactor&&S(0)});mxEvent.addListener(a.container,"scroll",function(F){null==ia||a.isMouseDown||1==a.cumulativeZoomFactor||S(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(F,L,T,ca,fa){a.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!a.scrollbars&&!T&&a.isScrollWheelEvent(F))T=
-a.view.getTranslate(),ca=40/a.view.scale,mxEvent.isShiftDown(F)?a.view.setTranslate(T.x+(L?-ca:ca),T.y):a.view.setTranslate(T.x,T.y+(L?ca:-ca));else if(T||a.isZoomWheelEvent(F))for(var wa=mxEvent.getSource(F);null!=wa;){if(wa==a.container)return a.tooltipHandler.hideTooltip(),ha=null!=ca&&null!=fa?new mxPoint(ca,fa):new mxPoint(mxEvent.getClientX(F),mxEvent.getClientY(F)),qa=T,T=a.zoomFactor,ca=null,F.ctrlKey&&null!=F.deltaY&&40>Math.abs(F.deltaY)&&Math.round(F.deltaY)!=F.deltaY?T=1+Math.abs(F.deltaY)/
-20*(T-1):null!=F.movementY&&"pointermove"==F.type&&(T=1+Math.max(1,Math.abs(F.movementY))/20*(T-1),ca=-1),a.lazyZoom(L,null,ca,T),mxEvent.consume(F),!1;wa=wa.parentNode}}),a.container);a.panningHandler.zoomGraph=function(F){a.cumulativeZoomFactor=F.scale;a.lazyZoom(0<F.scale,!0);mxEvent.consume(F)}};EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(b){this.actions.get("print").funct();mxEvent.consume(b)}),Editor.printImage,mxResources.get("print"))};
+"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var d=mxUtils.bind(this,function(){var G=mxUtils.getCurrentStyle(a.container);a.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=G?parseInt(G["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",d);d();var k=0;d=mxUtils.bind(this,function(G,K,Q){k++;
+var ba=document.createElement("span");ba.style.paddingLeft="8px";ba.style.paddingRight="8px";ba.style.cursor="pointer";mxEvent.addListener(ba,"click",G);null!=Q&&ba.setAttribute("title",Q);G=document.createElement("img");G.setAttribute("border","0");G.setAttribute("src",K);G.style.width="36px";G.style.filter="invert(100%)";ba.appendChild(G);this.chromelessToolbar.appendChild(ba);return ba});null!=g.backBtn&&d(mxUtils.bind(this,function(G){window.location.href=g.backBtn.url;mxEvent.consume(G)}),Editor.backImage,
+mxResources.get("back",null,"Back"));if(this.isPagesEnabled()){var n=d(mxUtils.bind(this,function(G){this.actions.get("previousPage").funct();mxEvent.consume(G)}),Editor.previousImage,mxResources.get("previousPage")),u=document.createElement("div");u.style.fontFamily=Editor.defaultHtmlFont;u.style.display="inline-block";u.style.verticalAlign="top";u.style.fontWeight="bold";u.style.marginTop="8px";u.style.fontSize="14px";u.style.color=mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";this.chromelessToolbar.appendChild(u);
+var m=d(mxUtils.bind(this,function(G){this.actions.get("nextPage").funct();mxEvent.consume(G)}),Editor.nextImage,mxResources.get("nextPage")),r=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(u.innerText="",mxUtils.write(u,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});n.style.paddingLeft="0px";n.style.paddingRight="4px";m.style.paddingLeft="4px";m.style.paddingRight="0px";var x=mxUtils.bind(this,function(){null!=this.pages&&
+1<this.pages.length&&null!=this.currentPage?(m.style.display="",n.style.display="",u.style.display="inline-block"):(m.style.display="none",n.style.display="none",u.style.display="none");r()});this.editor.addListener("resetGraphView",x);this.editor.addListener("pageSelected",r)}d(mxUtils.bind(this,function(G){this.actions.get("zoomOut").funct();mxEvent.consume(G)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");d(mxUtils.bind(this,function(G){this.actions.get("zoomIn").funct();
+mxEvent.consume(G)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");d(mxUtils.bind(this,function(G){a.isLightboxView()?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(G)}),Editor.zoomFitImage,mxResources.get("fit"));var B=null,C=null,F=mxUtils.bind(this,function(G){null!=B&&(window.clearTimeout(B),B=null);null!=C&&(window.clearTimeout(C),C=null);B=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,
+0);B=null;C=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";C=null}),600)}),G||200)}),J=mxUtils.bind(this,function(G){null!=B&&(window.clearTimeout(B),B=null);null!=C&&(window.clearTimeout(C),C=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,G||30)});if("1"==urlParams.layers){this.layersDialog=null;var D=d(mxUtils.bind(this,function(G){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),
+this.layersDialog=null;else{this.layersDialog=a.createLayersDialog(null,!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var K=D.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=K.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));K=mxUtils.getCurrentStyle(this.editor.graph.container);
+this.layersDialog.style.zIndex=K.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(G)}),Editor.layersImage,mxResources.get("layers")),N=a.getModel();N.addListener(mxEvent.CHANGE,function(){D.style.display=1<N.getChildCount(N.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(d);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||d(mxUtils.bind(this,function(G){null!=
+this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(G)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(x=0;x<this.lightboxToolbarActions.length;x++){var S=this.lightboxToolbarActions[x];S.elem=d(S.fn,S.icon,S.tooltip)}null!=g.refreshBtn&&d(mxUtils.bind(this,function(G){g.refreshBtn.url?window.location.href=g.refreshBtn.url:
+window.location.reload();mxEvent.consume(G)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"));null!=g.fullscreenBtn&&window.self!==window.top&&d(mxUtils.bind(this,function(G){g.fullscreenBtn.url?a.openLink(g.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(G)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(g.closeBtn&&window.self===window.top||a.lightbox&&("1"==urlParams.close||this.container!=document.body))&&d(mxUtils.bind(this,
+function(G){"1"==urlParams.close||g.closeBtn?window.close():(this.destroy(),mxEvent.consume(G))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";a.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(G){mxEvent.isTouchEvent(G)||(mxEvent.isShiftDown(G)||
+J(30),F())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(G){mxEvent.consume(G)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(G){a.tooltipHandler.resetTimer();a.tooltipHandler.hideTooltip();mxEvent.isShiftDown(G)?F():J(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(G){mxEvent.isShiftDown(G)?F():J(100);mxEvent.consume(G)}));mxEvent.addListener(this.chromelessToolbar,
+"mouseleave",mxUtils.bind(this,function(G){mxEvent.isTouchEvent(G)||J(30)}));var T=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(G,K){this.startX=K.getGraphX();this.startY=K.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(G,K){},mouseUp:function(G,K){mxEvent.isTouchEvent(K.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<T&&Math.abs(this.scrollTop-a.container.scrollTop)<T&&
+Math.abs(this.startX-K.getGraphX())<T&&Math.abs(this.startY-K.getGraphY())<T&&(0<parseFloat(f.chromelessToolbar.style.opacity||0)?F():J(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var P=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var G=this.graph.getPagePadding(),K=this.graph.getPageSize();this.translate.x=G.x-(this.x0||0)*K.width;this.translate.y=G.y-(this.y0||0)*K.height}P.apply(this,
+arguments)};if(!a.isViewer()){var Z=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var G=this.getPageLayout(),K=this.getPagePadding(),Q=this.getPageSize(),ba=Math.ceil(2*K.x+G.width*Q.width),la=Math.ceil(2*K.y+G.height*Q.height),ra=a.minimumGraphSize;if(null==ra||ra.width!=ba||ra.height!=la)a.minimumGraphSize=new mxRectangle(0,0,ba,la);ba=K.x-G.x*Q.width;K=K.y-G.y*Q.height;this.autoTranslate||this.view.translate.x==ba&&this.view.translate.y==
+K?Z.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=G.x,this.view.y0=G.y,G=a.view.translate.x,Q=a.view.translate.y,a.view.setTranslate(ba,K),a.container.scrollLeft+=Math.round((ba-G)*a.view.scale),a.container.scrollTop+=Math.round((K-Q)*a.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var U=a.view.getBackgroundPane(),V=a.view.getDrawPane();a.cumulativeZoomFactor=1;var aa=null,ia=null,ea=null,qa=null,O=null,R=function(G){null!=
+aa&&window.clearTimeout(aa);0<=G&&window.setTimeout(function(){if(!a.isMouseDown||qa)aa=window.setTimeout(mxUtils.bind(this,function(){a.isFastZoomEnabled()&&(null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null)),V.style.transformOrigin="",U.style.transformOrigin="",mxClient.IS_SF?(V.style.transform="scale(1)",
+U.style.transform="scale(1)",window.setTimeout(function(){V.style.transform="";U.style.transform=""},0)):(V.style.transform="",U.style.transform=""),a.view.getDecoratorPane().style.opacity="",a.view.getOverlayPane().style.opacity="");var K=new mxPoint(a.container.scrollLeft,a.container.scrollTop),Q=mxUtils.getOffset(a.container),ba=a.view.scale,la=0,ra=0;null!=ia&&(la=a.container.offsetWidth/2-ia.x+Q.x,ra=a.container.offsetHeight/2-ia.y+Q.y);a.zoom(a.cumulativeZoomFactor,null,a.isFastZoomEnabled()?
+20:null);a.view.scale!=ba&&(null!=ea&&(la+=K.x-ea.x,ra+=K.y-ea.y),null!=b&&f.chromelessResize(!1,null,la*(a.cumulativeZoomFactor-1),ra*(a.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==la&&0==ra||(a.container.scrollLeft-=la*(a.cumulativeZoomFactor-1),a.container.scrollTop-=ra*(a.cumulativeZoomFactor-1)));null!=O&&V.setAttribute("filter",O);a.cumulativeZoomFactor=1;O=qa=ia=ea=aa=null}),null!=G?G:a.isFastZoomEnabled()?f.wheelZoomDelay:f.lazyZoomDelay)},0)};a.lazyZoom=function(G,K,
+Q,ba){ba=null!=ba?ba:this.zoomFactor;(K=K||!a.scrollbars)&&(ia=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/2));G?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=ba,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-
+.05)/this.view.scale:(this.cumulativeZoomFactor/=ba,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;a.isFastZoomEnabled()&&(null==O&&""!=V.getAttribute("filter")&&(O=V.getAttribute("filter"),V.removeAttribute("filter")),ea=new mxPoint(a.container.scrollLeft,a.container.scrollTop),G=K||null==ia?a.container.scrollLeft+a.container.clientWidth/
+2:ia.x+a.container.scrollLeft-a.container.offsetLeft,ba=K||null==ia?a.container.scrollTop+a.container.clientHeight/2:ia.y+a.container.scrollTop-a.container.offsetTop,V.style.transformOrigin=G+"px "+ba+"px",V.style.transform="scale("+this.cumulativeZoomFactor+")",U.style.transformOrigin=G+"px "+ba+"px",U.style.transform="scale("+this.cumulativeZoomFactor+")",null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(G=a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(G.style,
+"transform-origin",(K||null==ia?a.container.clientWidth/2+a.container.scrollLeft-G.offsetLeft+"px":ia.x+a.container.scrollLeft-G.offsetLeft-a.container.offsetLeft+"px")+" "+(K||null==ia?a.container.clientHeight/2+a.container.scrollTop-G.offsetTop+"px":ia.y+a.container.scrollTop-G.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(G.style,"transform","scale("+this.cumulativeZoomFactor+")")),a.view.getDecoratorPane().style.opacity="0",a.view.getOverlayPane().style.opacity="0",null!=f.hoverIcons&&
+f.hoverIcons.reset());R(a.isFastZoomEnabled()?Q:0)};mxEvent.addGestureListeners(a.container,function(G){null!=aa&&window.clearTimeout(aa)},null,function(G){1!=a.cumulativeZoomFactor&&R(0)});mxEvent.addListener(a.container,"scroll",function(G){null==aa||a.isMouseDown||1==a.cumulativeZoomFactor||R(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(G,K,Q,ba,la){a.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!a.scrollbars&&!Q&&a.isScrollWheelEvent(G))Q=
+a.view.getTranslate(),ba=40/a.view.scale,mxEvent.isShiftDown(G)?a.view.setTranslate(Q.x+(K?-ba:ba),Q.y):a.view.setTranslate(Q.x,Q.y+(K?ba:-ba));else if(Q||a.isZoomWheelEvent(G))for(var ra=mxEvent.getSource(G);null!=ra;){if(ra==a.container)return a.tooltipHandler.hideTooltip(),ia=null!=ba&&null!=la?new mxPoint(ba,la):new mxPoint(mxEvent.getClientX(G),mxEvent.getClientY(G)),qa=Q,Q=a.zoomFactor,ba=null,G.ctrlKey&&null!=G.deltaY&&40>Math.abs(G.deltaY)&&Math.round(G.deltaY)!=G.deltaY?Q=1+Math.abs(G.deltaY)/
+20*(Q-1):null!=G.movementY&&"pointermove"==G.type&&(Q=1+Math.max(1,Math.abs(G.movementY))/20*(Q-1),ba=-1),a.lazyZoom(K,null,ba,Q),mxEvent.consume(G),!1;ra=ra.parentNode}}),a.container);a.panningHandler.zoomGraph=function(G){a.cumulativeZoomFactor=G.scale;a.lazyZoom(0<G.scale,!0);mxEvent.consume(G)}};EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(b){this.actions.get("print").funct();mxEvent.consume(b)}),Editor.printImage,mxResources.get("print"))};
EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(a){return Graph.createOffscreenGraph(a)};EditorUi.prototype.addChromelessClickHandler=function(){var a=urlParams.highlight;null!=a&&0<a.length&&(a="#"+a);this.editor.graph.addClickHandler(a)};
EditorUi.prototype.toggleFormatPanel=function(a){a=null!=a?a:0==this.formatWidth;null!=this.format&&(this.formatWidth=a?240:0,this.formatContainer.style.display=a?"":"none",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};
EditorUi.prototype.lightboxFit=function(a){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var b=urlParams.border,f=60;null!=b&&(f=parseInt(b));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(f,null,null,null,null,null,a);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var a=this.editor.graph.getModel();return 1==a.getChildCount(a.root)&&0==a.getChildCount(a.getChildAt(a.root,0))};
EditorUi.prototype.isSelectionAllowed=function(a){return"SELECT"==mxEvent.getSource(a).nodeName||"INPUT"==mxEvent.getSource(a).nodeName&&mxUtils.isAncestorNode(this.formatContainer,mxEvent.getSource(a))};EditorUi.prototype.addBeforeUnloadListener=function(){window.onbeforeunload=mxUtils.bind(this,function(){if(!this.editor.isChromelessView())return this.onBeforeUnload()})};EditorUi.prototype.onBeforeUnload=function(){if(this.editor.modified)return mxResources.get("allChangesLost")};
-EditorUi.prototype.open=function(){try{null!=window.opener&&null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var f=mxUtils.parseXml(a);this.editor.setGraphXml(f.documentElement);this.editor.setModified(!1);this.editor.undoManager.clear();null!=b&&(this.editor.setFilename(b),this.updateDocumentTitle())}catch(d){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+d.message)}}))}catch(a){}this.editor.graph.view.validate();this.editor.graph.sizeDidChange();
-this.editor.fireEvent(new mxEventObject("resetGraphView"))};EditorUi.prototype.showPopupMenu=function(a,b,f,d){this.editor.graph.popupMenuHandler.hideMenu();var g=new mxPopupMenu(a);g.div.className+=" geMenubarMenu";g.smartSeparators=!0;g.showDisabled=!0;g.autoExpand=!0;g.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(g,arguments);g.destroy()});g.popup(b,f,null,d);this.setCurrentMenu(g)};
+EditorUi.prototype.open=function(){try{null!=window.opener&&null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var f=mxUtils.parseXml(a);this.editor.setGraphXml(f.documentElement);this.editor.setModified(!1);this.editor.undoManager.clear();null!=b&&(this.editor.setFilename(b),this.updateDocumentTitle())}catch(e){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+e.message)}}))}catch(a){}this.editor.graph.view.validate();this.editor.graph.sizeDidChange();
+this.editor.fireEvent(new mxEventObject("resetGraphView"))};EditorUi.prototype.showPopupMenu=function(a,b,f,e){this.editor.graph.popupMenuHandler.hideMenu();var g=new mxPopupMenu(a);g.div.className+=" geMenubarMenu";g.smartSeparators=!0;g.showDisabled=!0;g.autoExpand=!0;g.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(g,arguments);g.destroy()});g.popup(b,f,null,e);this.setCurrentMenu(g)};
EditorUi.prototype.setCurrentMenu=function(a,b){this.currentMenuElt=b;this.currentMenu=a};EditorUi.prototype.resetCurrentMenu=function(){this.currentMenu=this.currentMenuElt=null};EditorUi.prototype.hideCurrentMenu=function(){null!=this.currentMenu&&(this.currentMenu.hideMenu(),this.resetCurrentMenu())};EditorUi.prototype.updateDocumentTitle=function(){var a=this.editor.getOrCreateFilename();null!=this.editor.appName&&(a+=" - "+this.editor.appName);document.title=a};
EditorUi.prototype.createHoverIcons=function(){return new HoverIcons(this.editor.graph)};EditorUi.prototype.redo=function(){try{this.editor.graph.isEditing()?document.execCommand("redo",!1,null):this.editor.undoManager.redo()}catch(a){}};EditorUi.prototype.undo=function(){try{var a=this.editor.graph;if(a.isEditing()){var b=a.cellEditor.textarea.innerHTML;document.execCommand("undo",!1,null);b==a.cellEditor.textarea.innerHTML&&(a.stopEditing(!0),this.editor.undoManager.undo())}else this.editor.undoManager.undo()}catch(f){}};
EditorUi.prototype.canRedo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canRedo()};EditorUi.prototype.canUndo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canUndo()};EditorUi.prototype.getEditBlankXml=function(){return mxUtils.getXml(this.editor.getGraphXml())};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0,f;for(f in urlParams)a=0==b?a+"?":a+"&",a+=f+"="+urlParams[f],b++;return a};
EditorUi.prototype.setScrollbars=function(a){var b=this.editor.graph,f=b.container.style.overflow;b.scrollbars=a;this.editor.updateGraphComponents();f!=b.container.style.overflow&&(b.container.scrollTop=0,b.container.scrollLeft=0,b.view.scaleAndTranslate(1,0,0),this.resetScrollbars());this.fireEvent(new mxEventObject("scrollbarsChanged"))};EditorUi.prototype.hasScrollbars=function(){return this.editor.graph.scrollbars};
EditorUi.prototype.resetScrollbars=function(){var a=this.editor.graph;if(!this.editor.extendCanvas)a.container.scrollTop=0,a.container.scrollLeft=0,mxUtils.hasScrollbars(a.container)||a.view.setTranslate(0,0);else if(!this.editor.isChromelessView())if(mxUtils.hasScrollbars(a.container))if(a.pageVisible){var b=a.getPagePadding();a.container.scrollTop=Math.floor(b.y-this.editor.initialTopSpacing)-1;a.container.scrollLeft=Math.floor(Math.min(b.x,(a.container.scrollWidth-a.container.clientWidth)/2))-
1;b=a.getGraphBounds();0<b.width&&0<b.height&&(b.x>a.container.scrollLeft+.9*a.container.clientWidth&&(a.container.scrollLeft=Math.min(b.x+b.width-a.container.clientWidth,b.x-10)),b.y>a.container.scrollTop+.9*a.container.clientHeight&&(a.container.scrollTop=Math.min(b.y+b.height-a.container.clientHeight,b.y-10)))}else{b=a.getGraphBounds();var f=Math.max(b.width,a.scrollTileSize.width*a.view.scale);a.container.scrollTop=Math.floor(Math.max(0,b.y-Math.max(20,(a.container.clientHeight-Math.max(b.height,
-a.scrollTileSize.height*a.view.scale))/4)));a.container.scrollLeft=Math.floor(Math.max(0,b.x-Math.max(0,(a.container.clientWidth-f)/2)))}else{b=mxRectangle.fromRectangle(a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds());f=a.view.translate;var d=a.view.scale;b.x=b.x/d-f.x;b.y=b.y/d-f.y;b.width/=d;b.height/=d;a.view.setTranslate(Math.floor(Math.max(0,(a.container.clientWidth-b.width)/2)-b.x+2),Math.floor((a.pageVisible?0:Math.max(0,(a.container.clientHeight-b.height)/4))-b.y+1))}};
-EditorUi.prototype.setPageVisible=function(a){var b=this.editor.graph,f=mxUtils.hasScrollbars(b.container),d=0,g=0;f&&(d=b.view.translate.x*b.view.scale-b.container.scrollLeft,g=b.view.translate.y*b.view.scale-b.container.scrollTop);b.pageVisible=a;b.pageBreaksVisible=a;b.preferPageSize=a;b.view.validateBackground();if(f){var e=b.getSelectionCells();b.clearSelection();b.setSelectionCells(e)}b.sizeDidChange();f&&(b.container.scrollLeft=b.view.translate.x*b.view.scale-d,b.container.scrollTop=b.view.translate.y*
-b.view.scale-g);b.defaultPageVisible=a;this.fireEvent(new mxEventObject("pageViewChanged"))};function ChangeGridColor(a,b){this.ui=a;this.color=b}ChangeGridColor.prototype.execute=function(){var a=this.ui.editor.graph.view.gridColor;this.ui.setGridColor(this.color);this.color=a};(function(){var a=new mxObjectCodec(new ChangeGridColor,["ui"]);mxCodecRegistry.register(a)})();
-function ChangePageSetup(a,b,f,d,g){this.ui=a;this.previousColor=this.color=b;this.previousImage=this.image=f;this.previousFormat=this.format=d;this.previousPageScale=this.pageScale=g;this.ignoreImage=this.ignoreColor=!1}
+a.scrollTileSize.height*a.view.scale))/4)));a.container.scrollLeft=Math.floor(Math.max(0,b.x-Math.max(0,(a.container.clientWidth-f)/2)))}else{b=mxRectangle.fromRectangle(a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds());f=a.view.translate;var e=a.view.scale;b.x=b.x/e-f.x;b.y=b.y/e-f.y;b.width/=e;b.height/=e;a.view.setTranslate(Math.floor(Math.max(0,(a.container.clientWidth-b.width)/2)-b.x+2),Math.floor((a.pageVisible?0:Math.max(0,(a.container.clientHeight-b.height)/4))-b.y+1))}};
+EditorUi.prototype.setPageVisible=function(a){var b=this.editor.graph,f=mxUtils.hasScrollbars(b.container),e=0,g=0;f&&(e=b.view.translate.x*b.view.scale-b.container.scrollLeft,g=b.view.translate.y*b.view.scale-b.container.scrollTop);b.pageVisible=a;b.pageBreaksVisible=a;b.preferPageSize=a;b.view.validateBackground();if(f){var d=b.getSelectionCells();b.clearSelection();b.setSelectionCells(d)}b.sizeDidChange();f&&(b.container.scrollLeft=b.view.translate.x*b.view.scale-e,b.container.scrollTop=b.view.translate.y*
+b.view.scale-g);b.defaultPageVisible=a;this.fireEvent(new mxEventObject("pageViewChanged"))};
+EditorUi.prototype.installResizeHandler=function(a,b,f){b&&(a.window.setSize=function(g,d){if(!this.minimized){var k=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;g=Math.min(g,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.getX());d=Math.min(d,k-this.getY())}mxWindow.prototype.setSize.apply(this,arguments)});a.window.setLocation=function(g,d){var k=window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth,
+n=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight,u=parseInt(this.div.style.width),m=parseInt(this.div.style.height);g=Math.max(0,Math.min(g,k-u));d=Math.max(0,Math.min(d,n-m));this.getX()==g&&this.getY()==d||mxWindow.prototype.setLocation.apply(this,arguments);b&&!this.minimized&&this.setSize(u,m)};var e=mxUtils.bind(this,function(){var g=a.window.getX(),d=a.window.getY();a.window.setLocation(g,d)});mxEvent.addListener(window,"resize",e);a.destroy=function(){mxEvent.removeListener(window,
+"resize",e);a.window.destroy();null!=f&&f()}};function ChangeGridColor(a,b){this.ui=a;this.color=b}ChangeGridColor.prototype.execute=function(){var a=this.ui.editor.graph.view.gridColor;this.ui.setGridColor(this.color);this.color=a};(function(){var a=new mxObjectCodec(new ChangeGridColor,["ui"]);mxCodecRegistry.register(a)})();
+function ChangePageSetup(a,b,f,e,g){this.ui=a;this.previousColor=this.color=b;this.previousImage=this.image=f;this.previousFormat=this.format=e;this.previousPageScale=this.pageScale=g;this.ignoreImage=this.ignoreColor=!1}
ChangePageSetup.prototype.execute=function(){var a=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var b=a.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=b}if(!this.ignoreImage){this.image=this.previousImage;b=a.backgroundImage;var f=this.previousImage;null!=f&&null!=f.src&&"data:page/id,"==f.src.substring(0,13)&&(f=this.ui.createImageForPageLink(f.src,this.ui.currentPage));this.ui.setBackgroundImage(f);this.previousImage=b}null!=this.previousFormat&&
(this.format=this.previousFormat,b=a.pageFormat,this.previousFormat.width!=b.width||this.previousFormat.height!=b.height)&&(this.ui.setPageFormat(this.previousFormat),this.previousFormat=b);null!=this.foldingEnabled&&this.foldingEnabled!=this.ui.editor.graph.foldingEnabled&&(this.ui.setFoldingEnabled(this.foldingEnabled),this.foldingEnabled=!this.foldingEnabled);null!=this.previousPageScale&&(a=this.ui.editor.graph.pageScale,this.previousPageScale!=a&&(this.ui.setPageScale(this.previousPageScale),
-this.previousPageScale=a))};(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat","previousPageScale"]);a.afterDecode=function(b,f,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;d.previousPageScale=d.pageScale;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);return d};mxCodecRegistry.register(a)})();
+this.previousPageScale=a))};(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat","previousPageScale"]);a.afterDecode=function(b,f,e){e.previousColor=e.color;e.previousImage=e.image;e.previousFormat=e.format;e.previousPageScale=e.pageScale;null!=e.foldingEnabled&&(e.foldingEnabled=!e.foldingEnabled);return e};mxCodecRegistry.register(a)})();
EditorUi.prototype.setBackgroundColor=function(a){this.editor.graph.background=a;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("backgroundColorChanged"))};EditorUi.prototype.setFoldingEnabled=function(a){this.editor.graph.foldingEnabled=a;this.editor.graph.view.revalidate();this.fireEvent(new mxEventObject("foldingEnabledChanged"))};
EditorUi.prototype.setPageFormat=function(a,b){b=null!=b?b:"1"==urlParams.sketch;this.editor.graph.pageFormat=a;b||(this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct());this.fireEvent(new mxEventObject("pageFormatChanged"))};
EditorUi.prototype.setPageScale=function(a){this.editor.graph.pageScale=a;this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct();this.fireEvent(new mxEventObject("pageScaleChanged"))};EditorUi.prototype.setGridColor=function(a){this.editor.graph.view.gridColor=a;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("gridColorChanged"))};
-EditorUi.prototype.addUndoListener=function(){var a=this.actions.get("undo"),b=this.actions.get("redo"),f=this.editor.undoManager,d=mxUtils.bind(this,function(){a.setEnabled(this.canUndo());b.setEnabled(this.canRedo())});f.addListener(mxEvent.ADD,d);f.addListener(mxEvent.UNDO,d);f.addListener(mxEvent.REDO,d);f.addListener(mxEvent.CLEAR,d);var g=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){g.apply(this,arguments);d()};var e=this.editor.graph.cellEditor.stopEditing;
-this.editor.graph.cellEditor.stopEditing=function(k,n){e.apply(this,arguments);d()};d()};
-EditorUi.prototype.updateActionStates=function(){for(var a=this.editor.graph,b=this.getSelectionState(),f=a.isEnabled()&&!a.isCellLocked(a.getDefaultParent()),d="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 strokeColor sharp snapToGrid".split(" "),g=0;g<d.length;g++)this.actions.get(d[g]).setEnabled(0<b.cells.length);
+EditorUi.prototype.addUndoListener=function(){var a=this.actions.get("undo"),b=this.actions.get("redo"),f=this.editor.undoManager,e=mxUtils.bind(this,function(){a.setEnabled(this.canUndo());b.setEnabled(this.canRedo())});f.addListener(mxEvent.ADD,e);f.addListener(mxEvent.UNDO,e);f.addListener(mxEvent.REDO,e);f.addListener(mxEvent.CLEAR,e);var g=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){g.apply(this,arguments);e()};var d=this.editor.graph.cellEditor.stopEditing;
+this.editor.graph.cellEditor.stopEditing=function(k,n){d.apply(this,arguments);e()};e()};
+EditorUi.prototype.updateActionStates=function(){for(var a=this.editor.graph,b=this.getSelectionState(),f=a.isEnabled()&&!a.isCellLocked(a.getDefaultParent()),e="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 strokeColor sharp snapToGrid".split(" "),g=0;g<e.length;g++)this.actions.get(e[g]).setEnabled(0<b.cells.length);
this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);this.actions.get("pasteSize").setEnabled(null!=this.copiedSize&&0<b.vertices.length);this.actions.get("pasteData").setEnabled(null!=this.copiedValue&&0<b.cells.length);this.actions.get("setAsDefaultStyle").setEnabled(1==a.getSelectionCount());this.actions.get("lockUnlock").setEnabled(!a.isSelectionEmpty());this.actions.get("bringForward").setEnabled(1==b.cells.length);this.actions.get("sendBackward").setEnabled(1==
b.cells.length);this.actions.get("rotation").setEnabled(1==b.vertices.length);this.actions.get("wordWrap").setEnabled(1==b.vertices.length);this.actions.get("autosize").setEnabled(1==b.vertices.length);this.actions.get("copySize").setEnabled(1==b.vertices.length);this.actions.get("clearWaypoints").setEnabled(b.connections);this.actions.get("curved").setEnabled(0<b.edges.length);this.actions.get("turn").setEnabled(0<b.cells.length);this.actions.get("group").setEnabled(!b.row&&!b.cell&&(1<b.cells.length||
1==b.vertices.length&&0==a.model.getChildCount(b.cells[0])&&!a.isContainer(b.vertices[0])));this.actions.get("ungroup").setEnabled(!b.row&&!b.cell&&!b.table&&0<b.vertices.length&&(a.isContainer(b.vertices[0])||0<a.getModel().getChildCount(b.vertices[0])));this.actions.get("removeFromGroup").setEnabled(1==b.cells.length&&a.getModel().isVertex(a.getModel().getParent(b.cells[0])));this.actions.get("collapsible").setEnabled(1==b.vertices.length&&(0<a.model.getChildCount(b.vertices[0])||a.isContainer(b.vertices[0])));
this.actions.get("exitGroup").setEnabled(null!=a.view.currentRoot);this.actions.get("home").setEnabled(null!=a.view.currentRoot);this.actions.get("enterGroup").setEnabled(1==b.cells.length&&a.isValidRoot(b.cells[0]));this.actions.get("editLink").setEnabled(1==b.cells.length);this.actions.get("openLink").setEnabled(1==b.cells.length&&null!=a.getLinkForCell(b.cells[0]));this.actions.get("guides").setEnabled(a.isEnabled());this.actions.get("selectVertices").setEnabled(f);this.actions.get("selectEdges").setEnabled(f);
-this.actions.get("selectAll").setEnabled(f);this.actions.get("selectNone").setEnabled(f);d=1==b.vertices.length&&a.isCellFoldable(b.vertices[0]);this.actions.get("expand").setEnabled(d);this.actions.get("collapse").setEnabled(d);this.menus.get("navigation").setEnabled(0<b.cells.length||null!=a.view.currentRoot);this.menus.get("layout").setEnabled(f);this.menus.get("insert").setEnabled(f);this.menus.get("direction").setEnabled(b.unlocked&&1==b.vertices.length);this.menus.get("distribute").setEnabled(b.unlocked&&
+this.actions.get("selectAll").setEnabled(f);this.actions.get("selectNone").setEnabled(f);e=1==b.vertices.length&&a.isCellFoldable(b.vertices[0]);this.actions.get("expand").setEnabled(e);this.actions.get("collapse").setEnabled(e);this.menus.get("navigation").setEnabled(0<b.cells.length||null!=a.view.currentRoot);this.menus.get("layout").setEnabled(f);this.menus.get("insert").setEnabled(f);this.menus.get("direction").setEnabled(b.unlocked&&1==b.vertices.length);this.menus.get("distribute").setEnabled(b.unlocked&&
1<b.vertices.length);this.menus.get("align").setEnabled(b.unlocked&&0<b.cells.length);this.updatePasteActionStates()};EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset};
-EditorUi.prototype.refresh=function(a){a=null!=a?a:!0;var b=this.container.clientWidth,f=this.container.clientHeight;this.container==document.body&&(b=document.body.clientWidth||document.documentElement.clientWidth,f=document.documentElement.clientHeight);var d=0;mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&window.innerHeight!=document.documentElement.clientHeight&&(d=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var g=Math.max(0,Math.min(this.hsplitPosition,
-b-this.splitSize-20));b=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",b+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",b+=this.toolbarHeight);0<b&&(b+=1);var e=0;if(null!=this.sidebarFooterContainer){var k=this.footerHeight+d;e=Math.max(0,Math.min(f-b-k,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=g+"px";this.sidebarFooterContainer.style.height=
-e+"px";this.sidebarFooterContainer.style.bottom=k+"px"}f=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=b+"px";this.sidebarContainer.style.width=g+"px";this.formatContainer.style.top=b+"px";this.formatContainer.style.width=f+"px";this.formatContainer.style.display=null!=this.format?"":"none";k=this.getDiagramContainerOffset();var n=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+d+"px";this.hsplit.style.left=g+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=n+"px");0<this.footerHeight&&(this.footerContainer.style.bottom=d+"px");g=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+d+"px",this.tabContainer.style.right=this.diagramContainer.style.right,g=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+
-e+d+"px";this.formatContainer.style.bottom=this.footerHeight+d+"px";"1"!=urlParams.embedInline&&(this.diagramContainer.style.left=n+k.x+"px",this.diagramContainer.style.top=b+k.y+"px",this.diagramContainer.style.right=f+"px",this.diagramContainer.style.bottom=this.footerHeight+d+g+"px");a&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
+EditorUi.prototype.refresh=function(a){a=null!=a?a:!0;var b=this.container.clientWidth,f=this.container.clientHeight;this.container==document.body&&(b=document.body.clientWidth||document.documentElement.clientWidth,f=document.documentElement.clientHeight);var e=0;mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&window.innerHeight!=document.documentElement.clientHeight&&(e=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var g=Math.max(0,Math.min(this.hsplitPosition,
+b-this.splitSize-20));b=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",b+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",b+=this.toolbarHeight);0<b&&(b+=1);var d=0;if(null!=this.sidebarFooterContainer){var k=this.footerHeight+e;d=Math.max(0,Math.min(f-b-k,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=g+"px";this.sidebarFooterContainer.style.height=
+d+"px";this.sidebarFooterContainer.style.bottom=k+"px"}f=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=b+"px";this.sidebarContainer.style.width=g+"px";this.formatContainer.style.top=b+"px";this.formatContainer.style.width=f+"px";this.formatContainer.style.display=null!=this.format?"":"none";k=this.getDiagramContainerOffset();var n=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+e+"px";this.hsplit.style.left=g+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=n+"px");0<this.footerHeight&&(this.footerContainer.style.bottom=e+"px");g=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+e+"px",this.tabContainer.style.right=f+"px",g=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+d+e+"px";this.formatContainer.style.bottom=
+this.footerHeight+e+"px";"1"!=urlParams.embedInline&&(this.diagramContainer.style.left=n+k.x+"px",this.diagramContainer.style.top=b+k.y+"px",this.diagramContainer.style.right=f+"px",this.diagramContainer.style.bottom=this.footerHeight+e+g+"px");a&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
EditorUi.prototype.createDivs=function(){this.menubarContainer=this.createDiv("geMenubarContainer");this.toolbarContainer=this.createDiv("geToolbarContainer");this.sidebarContainer=this.createDiv("geSidebarContainer");this.formatContainer=this.createDiv("geSidebarContainer geFormatContainer");this.diagramContainer=this.createDiv("geDiagramContainer");this.footerContainer=this.createDiv("geFooterContainer");this.hsplit=this.createDiv("geHsplit");this.hsplit.setAttribute("title",mxResources.get("collapseExpand"));
this.menubarContainer.style.top="0px";this.menubarContainer.style.left="0px";this.menubarContainer.style.right="0px";this.toolbarContainer.style.left="0px";this.toolbarContainer.style.right="0px";this.sidebarContainer.style.left="0px";this.formatContainer.style.right="0px";this.formatContainer.style.zIndex="1";this.diagramContainer.style.right=(null!=this.format?this.formatWidth:0)+"px";this.footerContainer.style.left="0px";this.footerContainer.style.right="0px";this.footerContainer.style.bottom=
"0px";this.footerContainer.style.zIndex=mxPopupMenu.prototype.zIndex-3;this.hsplit.style.width=this.splitSize+"px";if(this.sidebarFooterContainer=this.createSidebarFooterContainer())this.sidebarFooterContainer.style.left="0px";this.editor.chromeless?this.diagramContainer.style.border="none":this.tabContainer=this.createTabContainer()};EditorUi.prototype.createSidebarFooterContainer=function(){return null};
@@ -2568,19 +2571,19 @@ this.container.appendChild(this.sidebarFooterContainer);this.container.appendChi
!0,0,mxUtils.bind(this,function(b){this.hsplitPosition=b;this.refresh()})))};EditorUi.prototype.createStatusContainer=function(){var a=document.createElement("a");a.className="geItem geStatus";return a};EditorUi.prototype.setStatusText=function(a){this.statusContainer.innerHTML=a;0==this.statusContainer.getElementsByTagName("div").length&&(this.statusContainer.innerText="",a=this.createStatusDiv(a),this.statusContainer.appendChild(a))};
EditorUi.prototype.createStatusDiv=function(a){var b=document.createElement("div");b.setAttribute("title",a);b.innerHTML=a;return b};EditorUi.prototype.createToolbar=function(a){return new Toolbar(this,a)};EditorUi.prototype.createSidebar=function(a){return new Sidebar(this,a)};EditorUi.prototype.createFormat=function(a){return new Format(this,a)};EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};
EditorUi.prototype.createDiv=function(a){var b=document.createElement("div");b.className=a;return b};
-EditorUi.prototype.addSplitHandler=function(a,b,f,d){function g(x){if(null!=k){var B=new mxPoint(mxEvent.getClientX(x),mxEvent.getClientY(x));d(Math.max(0,n+(b?B.x-k.x:k.y-B.y)-f));mxEvent.consume(x);n!=r()&&(u=!0,m=null)}}function e(x){g(x);k=n=null}var k=null,n=null,u=!0,m=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var r=mxUtils.bind(this,function(){var x=parseInt(b?a.style.left:a.style.bottom);b||(x=x+f-this.footerHeight);return x});mxEvent.addGestureListeners(a,function(x){k=new mxPoint(mxEvent.getClientX(x),
-mxEvent.getClientY(x));n=r();u=!1;mxEvent.consume(x)});mxEvent.addListener(a,"click",mxUtils.bind(this,function(x){if(!u&&this.hsplitClickEnabled){var B=null!=m?m-f:0;m=r();d(B);mxEvent.consume(x)}}));mxEvent.addGestureListeners(document,null,g,e);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,g,e)})};
-EditorUi.prototype.prompt=function(a,b,f){a=new FilenameDialog(this,b,mxResources.get("apply"),function(d){f(parseFloat(d))},a);this.showDialog(a.container,300,80,!0,!0);a.init()};
-EditorUi.prototype.handleError=function(a,b,f,d,g){a=null!=a&&null!=a.error?a.error:a;if(null!=a||null!=b){g=mxUtils.htmlEntities(mxResources.get("unknownError"));var e=mxResources.get("ok");b=null!=b?b:mxResources.get("error");null!=a&&null!=a.message&&(g=mxUtils.htmlEntities(a.message));this.showError(b,g,e,f,null,null,null,null,null,null,null,null,d?f:null)}else null!=f&&f()};
-EditorUi.prototype.showError=function(a,b,f,d,g,e,k,n,u,m,r,x,B){a=new ErrorDialog(this,a,b,f||mxResources.get("ok"),d,g,e,k,x,n,u);b=Math.ceil(null!=b?b.length/50:1);this.showDialog(a.container,m||340,r||100+20*b,!0,!1,B);a.init()};EditorUi.prototype.showDialog=function(a,b,f,d,g,e,k,n,u,m){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,f,d,g,e,k,n,u,m);this.dialogs.push(this.dialog)};
+EditorUi.prototype.addSplitHandler=function(a,b,f,e){function g(x){if(null!=k){var B=new mxPoint(mxEvent.getClientX(x),mxEvent.getClientY(x));e(Math.max(0,n+(b?B.x-k.x:k.y-B.y)-f));mxEvent.consume(x);n!=r()&&(u=!0,m=null)}}function d(x){g(x);k=n=null}var k=null,n=null,u=!0,m=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var r=mxUtils.bind(this,function(){var x=parseInt(b?a.style.left:a.style.bottom);b||(x=x+f-this.footerHeight);return x});mxEvent.addGestureListeners(a,function(x){k=new mxPoint(mxEvent.getClientX(x),
+mxEvent.getClientY(x));n=r();u=!1;mxEvent.consume(x)});mxEvent.addListener(a,"click",mxUtils.bind(this,function(x){if(!u&&this.hsplitClickEnabled){var B=null!=m?m-f:0;m=r();e(B);mxEvent.consume(x)}}));mxEvent.addGestureListeners(document,null,g,d);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,g,d)})};
+EditorUi.prototype.prompt=function(a,b,f){a=new FilenameDialog(this,b,mxResources.get("apply"),function(e){f(parseFloat(e))},a);this.showDialog(a.container,300,80,!0,!0);a.init()};
+EditorUi.prototype.handleError=function(a,b,f,e,g){a=null!=a&&null!=a.error?a.error:a;if(null!=a||null!=b){g=mxUtils.htmlEntities(mxResources.get("unknownError"));var d=mxResources.get("ok");b=null!=b?b:mxResources.get("error");null!=a&&null!=a.message&&(g=mxUtils.htmlEntities(a.message));this.showError(b,g,d,f,null,null,null,null,null,null,null,null,e?f:null)}else null!=f&&f()};
+EditorUi.prototype.showError=function(a,b,f,e,g,d,k,n,u,m,r,x,B){a=new ErrorDialog(this,a,b,f||mxResources.get("ok"),e,g,d,k,x,n,u);b=Math.ceil(null!=b?b.length/50:1);this.showDialog(a.container,m||340,r||100+20*b,!0,!1,B);a.init()};EditorUi.prototype.showDialog=function(a,b,f,e,g,d,k,n,u,m){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,f,e,g,d,k,n,u,m);this.dialogs.push(this.dialog)};
EditorUi.prototype.hideDialog=function(a,b,f){null!=this.dialogs&&0<this.dialogs.length&&(null==f||f==this.dialog.container.firstChild)&&(f=this.dialogs.pop(),0==f.close(a,b)?this.dialogs.push(f):(this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog")),null==this.dialog&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){this.editor.graph.isEditing()&&null!=this.editor.graph.cellEditor.textarea?
-this.editor.graph.cellEditor.textarea.focus():(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0)))};EditorUi.prototype.ctrlEnter=function(){var a=this.editor.graph;if(a.isEnabled())try{for(var b=a.getSelectionCells(),f=new mxDictionary,d=[],g=0;g<b.length;g++){var e=a.isTableCell(b[g])?a.model.getParent(b[g]):b[g];null==e||f.get(e)||(f.put(e,!0),d.push(e))}a.setSelectionCells(a.duplicateCells(d,!1))}catch(k){this.handleError(k)}};
-EditorUi.prototype.pickColor=function(a,b){var f=this.editor.graph,d=f.cellEditor.saveSelection(),g=230+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));a=new ColorDialog(this,mxUtils.rgba2hex(a)||"none",function(e){f.cellEditor.restoreSelection(d);b(e)},function(){f.cellEditor.restoreSelection(d)});this.showDialog(a.container,230,g,!0,!1);a.init()};
+this.editor.graph.cellEditor.textarea.focus():(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0)))};EditorUi.prototype.ctrlEnter=function(){var a=this.editor.graph;if(a.isEnabled())try{for(var b=a.getSelectionCells(),f=new mxDictionary,e=[],g=0;g<b.length;g++){var d=a.isTableCell(b[g])?a.model.getParent(b[g]):b[g];null==d||f.get(d)||(f.put(d,!0),e.push(d))}a.setSelectionCells(a.duplicateCells(e,!1))}catch(k){this.handleError(k)}};
+EditorUi.prototype.pickColor=function(a,b){var f=this.editor.graph,e=f.cellEditor.saveSelection(),g=230+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));a=new ColorDialog(this,mxUtils.rgba2hex(a)||"none",function(d){f.cellEditor.restoreSelection(e);b(d)},function(){f.cellEditor.restoreSelection(e)});this.showDialog(a.container,230,g,!0,!1);a.init()};
EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:320,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null})};
-EditorUi.prototype.extractGraphModelFromHtml=function(a){var b=null;try{var f=a.indexOf("&lt;mxGraphModel ");if(0<=f){var d=a.lastIndexOf("&lt;/mxGraphModel&gt;");d>f&&(b=a.substring(f,d+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(g){}return b};
-EditorUi.prototype.readGraphModelFromClipboard=function(a){this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(b){null!=b?a(b):this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(f){if(null!=f){var d=decodeURIComponent(f);this.isCompatibleString(d)&&(f=d)}a(f)}),"text")}),"html")};
-EditorUi.prototype.readGraphModelFromClipboardWithType=function(a,b){navigator.clipboard.read().then(mxUtils.bind(this,function(f){if(null!=f&&0<f.length&&"html"==b&&0<=mxUtils.indexOf(f[0].types,"text/html"))f[0].getType("text/html").then(mxUtils.bind(this,function(d){d.text().then(mxUtils.bind(this,function(g){try{var e=this.parseHtmlData(g),k="text/plain"!=e.getAttribute("data-type")?e.innerHTML:mxUtils.trim(null==e.innerText?mxUtils.getTextContent(e):e.innerText);try{var n=k.lastIndexOf("%3E");
-0<=n&&n<k.length-3&&(k=k.substring(0,n+3))}catch(r){}try{var u=e.getElementsByTagName("span"),m=null!=u&&0<u.length?mxUtils.trim(decodeURIComponent(u[0].textContent)):decodeURIComponent(k);this.isCompatibleString(m)&&(k=m)}catch(r){}}catch(r){}a(this.isCompatibleString(k)?k:null)}))["catch"](function(g){a(null)})}))["catch"](function(d){a(null)});else if(null!=f&&0<f.length&&"text"==b&&0<=mxUtils.indexOf(f[0].types,"text/plain"))f[0].getType("text/plain").then(function(d){d.text().then(function(g){a(g)})["catch"](function(){a(null)})})["catch"](function(){a(null)});
+EditorUi.prototype.extractGraphModelFromHtml=function(a){var b=null;try{var f=a.indexOf("&lt;mxGraphModel ");if(0<=f){var e=a.lastIndexOf("&lt;/mxGraphModel&gt;");e>f&&(b=a.substring(f,e+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(g){}return b};
+EditorUi.prototype.readGraphModelFromClipboard=function(a){this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(b){null!=b?a(b):this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(f){if(null!=f){var e=decodeURIComponent(f);this.isCompatibleString(e)&&(f=e)}a(f)}),"text")}),"html")};
+EditorUi.prototype.readGraphModelFromClipboardWithType=function(a,b){navigator.clipboard.read().then(mxUtils.bind(this,function(f){if(null!=f&&0<f.length&&"html"==b&&0<=mxUtils.indexOf(f[0].types,"text/html"))f[0].getType("text/html").then(mxUtils.bind(this,function(e){e.text().then(mxUtils.bind(this,function(g){try{var d=this.parseHtmlData(g),k="text/plain"!=d.getAttribute("data-type")?d.innerHTML:mxUtils.trim(null==d.innerText?mxUtils.getTextContent(d):d.innerText);try{var n=k.lastIndexOf("%3E");
+0<=n&&n<k.length-3&&(k=k.substring(0,n+3))}catch(r){}try{var u=d.getElementsByTagName("span"),m=null!=u&&0<u.length?mxUtils.trim(decodeURIComponent(u[0].textContent)):decodeURIComponent(k);this.isCompatibleString(m)&&(k=m)}catch(r){}}catch(r){}a(this.isCompatibleString(k)?k:null)}))["catch"](function(g){a(null)})}))["catch"](function(e){a(null)});else if(null!=f&&0<f.length&&"text"==b&&0<=mxUtils.indexOf(f[0].types,"text/plain"))f[0].getType("text/plain").then(function(e){e.text().then(function(g){a(g)})["catch"](function(){a(null)})})["catch"](function(){a(null)});
else a(null)}))["catch"](function(f){a(null)})};
EditorUi.prototype.parseHtmlData=function(a){var b=null;if(null!=a&&0<a.length){var f="<meta "==a.substring(0,6);b=document.createElement("div");b.innerHTML=(f?'<meta charset="utf-8">':"")+this.editor.graph.sanitizeHtml(a);asHtml=!0;a=b.getElementsByTagName("style");if(null!=a)for(;0<a.length;)a[0].parentNode.removeChild(a[0]);null!=b.firstChild&&b.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=b.firstChild.nextSibling&&b.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==
b.firstChild.nodeName&&"A"==b.firstChild.nextSibling.nodeName&&null==b.firstChild.nextSibling.nextSibling&&(a=null==b.firstChild.nextSibling.innerText?mxUtils.getTextContent(b.firstChild.nextSibling):b.firstChild.nextSibling.innerText,a==b.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(b,a),asHtml=!1));f=f&&null!=b.firstChild?b.firstChild.nextSibling:b.firstChild;null!=f&&null==f.nextSibling&&f.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==f.nodeName?(a=f.getAttribute("src"),
@@ -2589,24 +2592,24 @@ EditorUi.prototype.extractGraphModelFromEvent=function(a){var b=null,f=null;null
(b=f);return b};EditorUi.prototype.isCompatibleString=function(a){return!1};EditorUi.prototype.saveFile=function(a){a||null==this.editor.filename?(a=new FilenameDialog(this,this.editor.getOrCreateFilename(),mxResources.get("save"),mxUtils.bind(this,function(b){this.save(b)}),null,mxUtils.bind(this,function(b){if(null!=b&&0<b.length)return!0;mxUtils.confirm(mxResources.get("invalidName"));return!1})),this.showDialog(a.container,300,100,!0,!0),a.init()):this.save(this.editor.getOrCreateFilename())};
EditorUi.prototype.save=function(a){if(null!=a){this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var b=mxUtils.getXml(this.editor.getGraphXml());try{if(Editor.useLocalStorage){if(null!=localStorage.getItem(a)&&!mxUtils.confirm(mxResources.get("replaceIt",[a])))return;localStorage.setItem(a,b);this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saved"))+" "+new Date)}else if(b.length<MAX_REQUEST_SIZE)(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(a)+"&xml="+encodeURIComponent(b))).simulate(document,
"_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(b);return}this.editor.setModified(!1);this.editor.setFilename(a);this.updateDocumentTitle()}catch(f){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}}};
-EditorUi.prototype.executeLayouts=function(a,b){this.executeLayout(mxUtils.bind(this,function(){var f=new mxCompositeLayout(this.editor.graph,a),d=this.editor.graph.getSelectionCells();f.execute(this.editor.graph.getDefaultParent(),0==d.length?null:d)}),!0,b)};
-EditorUi.prototype.executeLayout=function(a,b,f){var d=this.editor.graph;if(d.isEnabled()){d.getModel().beginUpdate();try{a()}catch(g){throw g;}finally{this.allowAnimation&&b&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("Camino"))?(a=new mxMorphing(d),a.addListener(mxEvent.DONE,mxUtils.bind(this,function(){d.getModel().endUpdate();null!=f&&f()})),a.startAnimation()):(d.getModel().endUpdate(),null!=f&&f())}}};
-EditorUi.prototype.showImageDialog=function(a,b,f,d){d=this.editor.graph.cellEditor;var g=d.saveSelection(),e=mxUtils.prompt(a,b);d.restoreSelection(g);if(null!=e&&0<e.length){var k=new Image;k.onload=function(){f(e,k.width,k.height)};k.onerror=function(){f(null);mxUtils.alert(mxResources.get("fileNotFound"))};k.src=e}else f(null)};EditorUi.prototype.showLinkDialog=function(a,b,f){a=new LinkDialog(this,a,b,f);this.showDialog(a.container,420,90,!0,!0);a.init()};
+EditorUi.prototype.executeLayouts=function(a,b){this.executeLayout(mxUtils.bind(this,function(){var f=new mxCompositeLayout(this.editor.graph,a),e=this.editor.graph.getSelectionCells();f.execute(this.editor.graph.getDefaultParent(),0==e.length?null:e)}),!0,b)};
+EditorUi.prototype.executeLayout=function(a,b,f){var e=this.editor.graph;if(e.isEnabled()){e.getModel().beginUpdate();try{a()}catch(g){throw g;}finally{this.allowAnimation&&b&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("Camino"))?(a=new mxMorphing(e),a.addListener(mxEvent.DONE,mxUtils.bind(this,function(){e.getModel().endUpdate();null!=f&&f()})),a.startAnimation()):(e.getModel().endUpdate(),null!=f&&f())}}};
+EditorUi.prototype.showImageDialog=function(a,b,f,e){e=this.editor.graph.cellEditor;var g=e.saveSelection(),d=mxUtils.prompt(a,b);e.restoreSelection(g);if(null!=d&&0<d.length){var k=new Image;k.onload=function(){f(d,k.width,k.height)};k.onerror=function(){f(null);mxUtils.alert(mxResources.get("fileNotFound"))};k.src=d}else f(null)};EditorUi.prototype.showLinkDialog=function(a,b,f){a=new LinkDialog(this,a,b,f);this.showDialog(a.container,420,90,!0,!0);a.init()};
EditorUi.prototype.showDataDialog=function(a){null!=a&&(a=new EditDataDialog(this,a),this.showDialog(a.container,480,420,!0,!1,null,!1),a.init())};
-EditorUi.prototype.showBackgroundImageDialog=function(a,b){a=null!=a?a:mxUtils.bind(this,function(d){d=new ChangePageSetup(this,null,d);d.ignoreColor=!0;this.editor.graph.model.execute(d)});var f=mxUtils.prompt(mxResources.get("backgroundImage"),null!=b?b.src:"");null!=f&&0<f.length?(b=new Image,b.onload=function(){a(new mxImage(f,b.width,b.height),!1)},b.onerror=function(){a(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},b.src=f):a(null)};
+EditorUi.prototype.showBackgroundImageDialog=function(a,b){a=null!=a?a:mxUtils.bind(this,function(e){e=new ChangePageSetup(this,null,e);e.ignoreColor=!0;this.editor.graph.model.execute(e)});var f=mxUtils.prompt(mxResources.get("backgroundImage"),null!=b?b.src:"");null!=f&&0<f.length?(b=new Image,b.onload=function(){a(new mxImage(f,b.width,b.height),!1)},b.onerror=function(){a(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},b.src=f):a(null)};
EditorUi.prototype.setBackgroundImage=function(a){this.editor.graph.setBackgroundImage(a);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(a,b,f){mxUtils.confirm(a)?null!=b&&b():null!=f&&f()};EditorUi.prototype.createOutline=function(a){var b=new mxOutline(this.editor.graph);mxEvent.addListener(window,"resize",function(){b.update(!1)});return b};
EditorUi.prototype.altShiftActions={67:"clearWaypoints",65:"connectionArrows",76:"editLink",80:"connectionPoints",84:"editTooltip",86:"pasteSize",88:"copySize",66:"copyData",69:"pasteData"};
-EditorUi.prototype.createKeyHandler=function(a){function b(x,B,C){if(!d.isSelectionEmpty()&&d.isEnabled()){B=null!=B?B:1;var G=d.getCompositeParents(d.getSelectionCells()),J=0<G.length?G[0]:null;if(null!=J)if(C){d.getModel().beginUpdate();try{for(J=0;J<G.length;J++)if(d.getModel().isVertex(G[J])&&d.isCellResizable(G[J])){var D=d.getCellGeometry(G[J]);null!=D&&(D=D.clone(),37==x?D.width=Math.max(0,D.width-B):38==x?D.height=Math.max(0,D.height-B):39==x?D.width+=B:40==x&&(D.height+=B),d.getModel().setGeometry(G[J],
-D))}}finally{d.getModel().endUpdate()}}else{D=d.model.getParent(J);var N=d.getView().scale;C=null;1==d.getSelectionCount()&&d.model.isVertex(J)&&null!=d.layoutManager&&!d.isCellLocked(J)&&(C=d.layoutManager.getLayout(D));if(null!=C&&C.constructor==mxStackLayout)B=D.getIndex(J),37==x||38==x?d.model.add(D,J,Math.max(0,B-1)):(39==x||40==x)&&d.model.add(D,J,Math.min(d.model.getChildCount(D),B+1));else{var Q=d.graphHandler;null!=Q&&(null==Q.first&&Q.start(J,0,0,G),null!=Q.first&&(J=G=0,37==x?G=-B:38==
-x?J=-B:39==x?G=B:40==x&&(J=B),Q.currentDx+=G*N,Q.currentDy+=J*N,Q.checkPreview(),Q.updatePreview()),null!=k&&window.clearTimeout(k),k=window.setTimeout(function(){if(null!=Q.first){var R=Q.roundLength(Q.currentDx/N),P=Q.roundLength(Q.currentDy/N);Q.moveCells(Q.cells,R,P);Q.reset()}},400))}}}}var f=this,d=this.editor.graph,g=new mxKeyHandler(d),e=g.isEventIgnored;g.isEventIgnored=function(x){return!(mxEvent.isShiftDown(x)&&9==x.keyCode)&&(!this.isControlDown(x)||mxEvent.isShiftDown(x)||90!=x.keyCode&&
-89!=x.keyCode&&188!=x.keyCode&&190!=x.keyCode&&85!=x.keyCode)&&(66!=x.keyCode&&73!=x.keyCode||!this.isControlDown(x)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&e.apply(this,arguments)};g.isEnabledForEvent=function(x){return!mxEvent.isConsumed(x)&&this.isGraphEvent(x)&&this.isEnabled()&&(null==f.dialogs||0==f.dialogs.length)};g.isControlDown=function(x){return mxEvent.isControlDown(x)||mxClient.IS_MAC&&x.metaKey};var k=null,n={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,
-39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},u=g.getFunction;mxKeyHandler.prototype.getFunction=function(x){if(d.isEnabled()){if(mxEvent.isShiftDown(x)&&mxEvent.isAltDown(x)){var B=f.actions.get(f.altShiftActions[x.keyCode]);if(null!=B)return B.funct}if(null!=n[x.keyCode]&&!d.isSelectionEmpty())if(!this.isControlDown(x)&&mxEvent.isShiftDown(x)&&mxEvent.isAltDown(x)){if(d.model.isVertex(d.getSelectionCell()))return function(){var C=d.connectVertex(d.getSelectionCell(),n[x.keyCode],
-d.defaultEdgeLength,x,!0);null!=C&&0<C.length&&(1==C.length&&d.model.isEdge(C[0])?d.setSelectionCell(d.model.getTerminal(C[0],!1)):d.setSelectionCell(C[C.length-1]),d.scrollCellToVisible(d.getSelectionCell()),null!=f.hoverIcons&&f.hoverIcons.update(d.view.getState(d.getSelectionCell())))}}else return this.isControlDown(x)?function(){b(x.keyCode,mxEvent.isShiftDown(x)?d.gridSize:null,!0)}:function(){b(x.keyCode,mxEvent.isShiftDown(x)?d.gridSize:null)}}return u.apply(this,arguments)};g.bindAction=mxUtils.bind(this,
-function(x,B,C,G){var J=this.actions.get(C);null!=J&&(C=function(){J.isEnabled()&&J.funct()},B?G?g.bindControlShiftKey(x,C):g.bindControlKey(x,C):G?g.bindShiftKey(x,C):g.bindKey(x,C))});var m=this,r=g.escape;g.escape=function(x){r.apply(this,arguments)};g.enter=function(){};g.bindControlShiftKey(36,function(){d.exitGroup()});g.bindControlShiftKey(35,function(){d.enterGroup()});g.bindShiftKey(36,function(){d.home()});g.bindKey(35,function(){d.refresh()});g.bindAction(107,!0,"zoomIn");g.bindAction(109,
-!0,"zoomOut");g.bindAction(80,!0,"print");g.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)g.bindControlKey(36,function(){d.isEnabled()&&d.foldCells(!0)}),g.bindControlKey(35,function(){d.isEnabled()&&d.foldCells(!1)}),g.bindControlKey(13,function(){m.ctrlEnter()}),g.bindAction(8,!1,"delete"),g.bindAction(8,!0,"deleteAll"),g.bindAction(8,!1,"deleteLabels",!0),g.bindAction(46,!1,"delete"),g.bindAction(46,!0,"deleteAll"),g.bindAction(46,!1,"deleteLabels",!0),g.bindAction(36,
+EditorUi.prototype.createKeyHandler=function(a){function b(x,B,C){if(!e.isSelectionEmpty()&&e.isEnabled()){B=null!=B?B:1;var F=e.getCompositeParents(e.getSelectionCells()),J=0<F.length?F[0]:null;if(null!=J)if(C){e.getModel().beginUpdate();try{for(J=0;J<F.length;J++)if(e.getModel().isVertex(F[J])&&e.isCellResizable(F[J])){var D=e.getCellGeometry(F[J]);null!=D&&(D=D.clone(),37==x?D.width=Math.max(0,D.width-B):38==x?D.height=Math.max(0,D.height-B):39==x?D.width+=B:40==x&&(D.height+=B),e.getModel().setGeometry(F[J],
+D))}}finally{e.getModel().endUpdate()}}else{D=e.model.getParent(J);var N=e.getView().scale;C=null;1==e.getSelectionCount()&&e.model.isVertex(J)&&null!=e.layoutManager&&!e.isCellLocked(J)&&(C=e.layoutManager.getLayout(D));if(null!=C&&C.constructor==mxStackLayout)B=D.getIndex(J),37==x||38==x?e.model.add(D,J,Math.max(0,B-1)):(39==x||40==x)&&e.model.add(D,J,Math.min(e.model.getChildCount(D),B+1));else{var S=e.graphHandler;null!=S&&(null==S.first&&S.start(J,0,0,F),null!=S.first&&(J=F=0,37==x?F=-B:38==
+x?J=-B:39==x?F=B:40==x&&(J=B),S.currentDx+=F*N,S.currentDy+=J*N,S.checkPreview(),S.updatePreview()),null!=k&&window.clearTimeout(k),k=window.setTimeout(function(){if(null!=S.first){var T=S.roundLength(S.currentDx/N),P=S.roundLength(S.currentDy/N);S.moveCells(S.cells,T,P);S.reset()}},400))}}}}var f=this,e=this.editor.graph,g=new mxKeyHandler(e),d=g.isEventIgnored;g.isEventIgnored=function(x){return!(mxEvent.isShiftDown(x)&&9==x.keyCode)&&(!this.isControlDown(x)||mxEvent.isShiftDown(x)||90!=x.keyCode&&
+89!=x.keyCode&&188!=x.keyCode&&190!=x.keyCode&&85!=x.keyCode)&&(66!=x.keyCode&&73!=x.keyCode||!this.isControlDown(x)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&d.apply(this,arguments)};g.isEnabledForEvent=function(x){return!mxEvent.isConsumed(x)&&this.isGraphEvent(x)&&this.isEnabled()&&(null==f.dialogs||0==f.dialogs.length)};g.isControlDown=function(x){return mxEvent.isControlDown(x)||mxClient.IS_MAC&&x.metaKey};var k=null,n={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,
+39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},u=g.getFunction;mxKeyHandler.prototype.getFunction=function(x){if(e.isEnabled()){if(mxEvent.isShiftDown(x)&&mxEvent.isAltDown(x)){var B=f.actions.get(f.altShiftActions[x.keyCode]);if(null!=B)return B.funct}if(null!=n[x.keyCode]&&!e.isSelectionEmpty())if(!this.isControlDown(x)&&mxEvent.isShiftDown(x)&&mxEvent.isAltDown(x)){if(e.model.isVertex(e.getSelectionCell()))return function(){var C=e.connectVertex(e.getSelectionCell(),n[x.keyCode],
+e.defaultEdgeLength,x,!0);null!=C&&0<C.length&&(1==C.length&&e.model.isEdge(C[0])?e.setSelectionCell(e.model.getTerminal(C[0],!1)):e.setSelectionCell(C[C.length-1]),e.scrollCellToVisible(e.getSelectionCell()),null!=f.hoverIcons&&f.hoverIcons.update(e.view.getState(e.getSelectionCell())))}}else return this.isControlDown(x)?function(){b(x.keyCode,mxEvent.isShiftDown(x)?e.gridSize:null,!0)}:function(){b(x.keyCode,mxEvent.isShiftDown(x)?e.gridSize:null)}}return u.apply(this,arguments)};g.bindAction=mxUtils.bind(this,
+function(x,B,C,F){var J=this.actions.get(C);null!=J&&(C=function(){J.isEnabled()&&J.funct()},B?F?g.bindControlShiftKey(x,C):g.bindControlKey(x,C):F?g.bindShiftKey(x,C):g.bindKey(x,C))});var m=this,r=g.escape;g.escape=function(x){r.apply(this,arguments)};g.enter=function(){};g.bindControlShiftKey(36,function(){e.exitGroup()});g.bindControlShiftKey(35,function(){e.enterGroup()});g.bindShiftKey(36,function(){e.home()});g.bindKey(35,function(){e.refresh()});g.bindAction(107,!0,"zoomIn");g.bindAction(109,
+!0,"zoomOut");g.bindAction(80,!0,"print");g.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)g.bindControlKey(36,function(){e.isEnabled()&&e.foldCells(!0)}),g.bindControlKey(35,function(){e.isEnabled()&&e.foldCells(!1)}),g.bindControlKey(13,function(){m.ctrlEnter()}),g.bindAction(8,!1,"delete"),g.bindAction(8,!0,"deleteAll"),g.bindAction(8,!1,"deleteLabels",!0),g.bindAction(46,!1,"delete"),g.bindAction(46,!0,"deleteAll"),g.bindAction(46,!1,"deleteLabels",!0),g.bindAction(36,
!1,"resetView"),g.bindAction(72,!0,"fitWindow",!0),g.bindAction(74,!0,"fitPage"),g.bindAction(74,!0,"fitTwoPages",!0),g.bindAction(48,!0,"customZoom"),g.bindAction(82,!0,"turn"),g.bindAction(82,!0,"clearDefaultStyle",!0),g.bindAction(83,!0,"save"),g.bindAction(83,!0,"saveAs",!0),g.bindAction(65,!0,"selectAll"),g.bindAction(65,!0,"selectNone",!0),g.bindAction(73,!0,"selectVertices",!0),g.bindAction(69,!0,"selectEdges",!0),g.bindAction(69,!0,"editStyle"),g.bindAction(66,!0,"bold"),g.bindAction(66,!0,
"toBack",!0),g.bindAction(70,!0,"toFront",!0),g.bindAction(68,!0,"duplicate"),g.bindAction(68,!0,"setAsDefaultStyle",!0),g.bindAction(90,!0,"undo"),g.bindAction(89,!0,"autosize",!0),g.bindAction(88,!0,"cut"),g.bindAction(67,!0,"copy"),g.bindAction(86,!0,"paste"),g.bindAction(71,!0,"group"),g.bindAction(77,!0,"editData"),g.bindAction(71,!0,"grid",!0),g.bindAction(73,!0,"italic"),g.bindAction(76,!0,"lockUnlock"),g.bindAction(76,!0,"layers",!0),g.bindAction(80,!0,"formatPanel",!0),g.bindAction(85,!0,
-"underline"),g.bindAction(85,!0,"ungroup",!0),g.bindAction(190,!0,"superscript"),g.bindAction(188,!0,"subscript"),g.bindAction(13,!1,"keyPressEnter"),g.bindKey(113,function(){d.isEnabled()&&d.startEditingAtCell()});mxClient.IS_WIN?g.bindAction(89,!0,"redo"):g.bindAction(90,!0,"redo",!0);return g};
+"underline"),g.bindAction(85,!0,"ungroup",!0),g.bindAction(190,!0,"superscript"),g.bindAction(188,!0,"subscript"),g.bindAction(13,!1,"keyPressEnter"),g.bindKey(113,function(){e.isEnabled()&&e.startEditingAtCell()});mxClient.IS_WIN?g.bindAction(89,!0,"redo"):g.bindAction(90,!0,"redo",!0);return g};
EditorUi.prototype.destroy=function(){var a=this.editor.graph;null!=a&&null!=this.selectionStateListener&&(a.getSelectionModel().removeListener(mxEvent.CHANGE,this.selectionStateListener),a.getModel().removeListener(mxEvent.CHANGE,this.selectionStateListener),a.removeListener(mxEvent.EDITING_STARTED,this.selectionStateListener),a.removeListener(mxEvent.EDITING_STOPPED,this.selectionStateListener),a.getView().removeListener("unitChanged",this.selectionStateListener),this.selectionStateListener=null);
null!=this.editor&&(this.editor.destroy(),this.editor=null);null!=this.menubar&&(this.menubar.destroy(),this.menubar=null);null!=this.toolbar&&(this.toolbar.destroy(),this.toolbar=null);null!=this.sidebar&&(this.sidebar.destroy(),this.sidebar=null);null!=this.keyHandler&&(this.keyHandler.destroy(),this.keyHandler=null);null!=this.keydownHandler&&(mxEvent.removeListener(document,"keydown",this.keydownHandler),this.keydownHandler=null);null!=this.keyupHandler&&(mxEvent.removeListener(document,"keyup",
this.keyupHandler),this.keyupHandler=null);null!=this.resizeHandler&&(mxEvent.removeListener(window,"resize",this.resizeHandler),this.resizeHandler=null);null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null);null!=this.orientationChangeHandler&&(mxEvent.removeListener(window,"orientationchange",this.orientationChangeHandler),this.orientationChangeHandler=null);null!=this.scrollHandler&&(mxEvent.removeListener(window,"scroll",this.scrollHandler),
@@ -2626,34 +2629,34 @@ Sidebar.prototype.searchImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgo
"large"!=urlParams["sidebar-entries"]&&(Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1,Sidebar.prototype.thumbBorder=1,Sidebar.prototype.thumbWidth=32,Sidebar.prototype.thumbHeight=30,Sidebar.prototype.minThumbStrokeWidth=1.3,Sidebar.prototype.thumbAntiAlias=!0);Sidebar.prototype.sidebarTitleSize=8;Sidebar.prototype.sidebarTitles=!1;Sidebar.prototype.tooltipTitles=!0;Sidebar.prototype.maxTooltipWidth=400;Sidebar.prototype.maxTooltipHeight=400;Sidebar.prototype.addStencilsToIndex=!0;
Sidebar.prototype.defaultImageWidth=80;Sidebar.prototype.defaultImageHeight=80;Sidebar.prototype.tooltipMouseDown=null;Sidebar.prototype.refresh=function(){this.graph.stylesheet.styles=mxUtils.clone(this.editorUi.editor.graph.stylesheet.styles);this.container.innerText="";this.palettes={};this.init()};
Sidebar.prototype.getTooltipOffset=function(a,b){b=b.height+2*this.tooltipBorder;return new mxPoint(this.container.offsetWidth+this.editorUi.splitSize+10+this.editorUi.container.offsetLeft,Math.min(Math.max(document.body.clientHeight||0,document.documentElement.clientHeight)-b-20,Math.max(0,this.editorUi.container.offsetTop+this.container.offsetTop+a.offsetTop-this.container.scrollTop-b/2+16)))};
-Sidebar.prototype.createTooltip=function(a,b,f,d,g,e,k,n,u,m,r){r=null!=r?r:!0;this.tooltipMouseDown=u;null==this.tooltip&&(this.tooltip=document.createElement("div"),this.tooltip.className="geSidebarTooltip",this.tooltip.style.userSelect="none",this.tooltip.style.zIndex=mxPopupMenu.prototype.zIndex-1,document.body.appendChild(this.tooltip),mxEvent.addMouseWheelListener(mxUtils.bind(this,function(x){this.hideTooltip()}),this.tooltip),this.graph2=new Graph(this.tooltip,null,null,this.editorUi.editor.graph.getStylesheet()),
+Sidebar.prototype.createTooltip=function(a,b,f,e,g,d,k,n,u,m,r){r=null!=r?r:!0;this.tooltipMouseDown=u;null==this.tooltip&&(this.tooltip=document.createElement("div"),this.tooltip.className="geSidebarTooltip",this.tooltip.style.userSelect="none",this.tooltip.style.zIndex=mxPopupMenu.prototype.zIndex-1,document.body.appendChild(this.tooltip),mxEvent.addMouseWheelListener(mxUtils.bind(this,function(x){this.hideTooltip()}),this.tooltip),this.graph2=new Graph(this.tooltip,null,null,this.editorUi.editor.graph.getStylesheet()),
this.graph2.resetViewOnRootChange=!1,this.graph2.foldingEnabled=!1,this.graph2.gridEnabled=!1,this.graph2.autoScroll=!1,this.graph2.setTooltips(!1),this.graph2.setConnectable(!1),this.graph2.setPanning(!1),this.graph2.setEnabled(!1),this.graph2.openLink=mxUtils.bind(this,function(){this.hideTooltip()}),mxEvent.addGestureListeners(this.tooltip,mxUtils.bind(this,function(x){null!=this.tooltipMouseDown&&this.tooltipMouseDown(x);window.setTimeout(mxUtils.bind(this,function(){null!=this.tooltipCloseImage&&
"none"!=this.tooltipCloseImage.style.display||this.hideTooltip()}),0)}),null,mxUtils.bind(this,function(x){this.hideTooltip()})),mxClient.IS_SVG||(this.graph2.view.canvas.style.position="relative"),u=document.createElement("img"),u.setAttribute("src",Dialog.prototype.closeImage),u.setAttribute("title",mxResources.get("close")),u.style.position="absolute",u.style.cursor="default",u.style.padding="8px",u.style.right="2px",u.style.top="2px",this.tooltip.appendChild(u),this.tooltipCloseImage=u,mxEvent.addListener(u,
-"click",mxUtils.bind(this,function(x){this.hideTooltip();mxEvent.consume(x)})));this.tooltipCloseImage.style.display=m?"":"none";this.graph2.model.clear();this.graph2.view.setTranslate(this.tooltipBorder,this.tooltipBorder);this.graph2.view.scale=!n&&(f>this.maxTooltipWidth||d>this.maxTooltipHeight)?Math.round(100*Math.min(this.maxTooltipWidth/f,this.maxTooltipHeight/d))/100:1;this.tooltip.style.display="block";this.graph2.labelsVisible=null==e||e;e=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;
-b=this.graph2.cloneCells(b);this.editorUi.insertHandler(b,null,this.graph2.model,r?null:this.editorUi.editor.graph.defaultVertexStyle,r?null:this.editorUi.editor.graph.defaultEdgeStyle,r,!0);this.graph2.addCells(b);mxClient.NO_FO=e;r=this.graph2.getGraphBounds();n&&0<f&&0<d&&(r.width>f||r.height>d)?(f=Math.round(100*Math.min(f/r.width,d/r.height))/100,mxClient.NO_FO?(this.graph2.view.setScale(Math.round(100*Math.min(this.maxTooltipWidth/r.width,this.maxTooltipHeight/r.height))/100),r=this.graph2.getGraphBounds()):
-(this.graph2.view.getDrawPane().ownerSVGElement.style.transform="scale("+f+")",this.graph2.view.getDrawPane().ownerSVGElement.style.transformOrigin="0 0",r.width*=f,r.height*=f)):mxClient.NO_FO||(this.graph2.view.getDrawPane().ownerSVGElement.style.transform="");f=r.width+2*this.tooltipBorder+4;d=r.height+2*this.tooltipBorder;this.tooltip.style.overflow="visible";this.tooltip.style.width=f+"px";n=f;this.tooltipTitles&&null!=g&&0<g.length?(null==this.tooltipTitle?(this.tooltipTitle=document.createElement("div"),
+"click",mxUtils.bind(this,function(x){this.hideTooltip();mxEvent.consume(x)})));this.tooltipCloseImage.style.display=m?"":"none";this.graph2.model.clear();this.graph2.view.setTranslate(this.tooltipBorder,this.tooltipBorder);this.graph2.view.scale=!n&&(f>this.maxTooltipWidth||e>this.maxTooltipHeight)?Math.round(100*Math.min(this.maxTooltipWidth/f,this.maxTooltipHeight/e))/100:1;this.tooltip.style.display="block";this.graph2.labelsVisible=null==d||d;d=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;
+b=this.graph2.cloneCells(b);this.editorUi.insertHandler(b,null,this.graph2.model,r?null:this.editorUi.editor.graph.defaultVertexStyle,r?null:this.editorUi.editor.graph.defaultEdgeStyle,r,!0);this.graph2.addCells(b);mxClient.NO_FO=d;r=this.graph2.getGraphBounds();n&&0<f&&0<e&&(r.width>f||r.height>e)?(f=Math.round(100*Math.min(f/r.width,e/r.height))/100,mxClient.NO_FO?(this.graph2.view.setScale(Math.round(100*Math.min(this.maxTooltipWidth/r.width,this.maxTooltipHeight/r.height))/100),r=this.graph2.getGraphBounds()):
+(this.graph2.view.getDrawPane().ownerSVGElement.style.transform="scale("+f+")",this.graph2.view.getDrawPane().ownerSVGElement.style.transformOrigin="0 0",r.width*=f,r.height*=f)):mxClient.NO_FO||(this.graph2.view.getDrawPane().ownerSVGElement.style.transform="");f=r.width+2*this.tooltipBorder+4;e=r.height+2*this.tooltipBorder;this.tooltip.style.overflow="visible";this.tooltip.style.width=f+"px";n=f;this.tooltipTitles&&null!=g&&0<g.length?(null==this.tooltipTitle?(this.tooltipTitle=document.createElement("div"),
this.tooltipTitle.style.borderTop="1px solid gray",this.tooltipTitle.style.textAlign="center",this.tooltipTitle.style.width="100%",this.tooltipTitle.style.overflow="hidden",this.tooltipTitle.style.position="absolute",this.tooltipTitle.style.paddingTop="6px",this.tooltipTitle.style.bottom="6px",this.tooltip.appendChild(this.tooltipTitle)):this.tooltipTitle.innerText="",this.tooltipTitle.style.display="",mxUtils.write(this.tooltipTitle,g),n=Math.min(this.maxTooltipWidth,Math.max(f,this.tooltipTitle.scrollWidth+
-4)),g=this.tooltipTitle.offsetHeight+10,d+=g,mxClient.IS_SVG?this.tooltipTitle.style.marginTop=2-g+"px":(d-=6,this.tooltipTitle.style.top=d-g+"px")):null!=this.tooltipTitle&&null!=this.tooltipTitle.parentNode&&(this.tooltipTitle.style.display="none");n>f&&(this.tooltip.style.width=n+"px");this.tooltip.style.height=d+"px";g=-Math.round(r.x-this.tooltipBorder)+(n>f?(n-f)/2:0);f=-Math.round(r.y-this.tooltipBorder);k=null!=k?k:this.getTooltipOffset(a,r);a=k.x;k=k.y;mxClient.IS_SVG?0!=g||0!=f?this.graph2.view.canvas.setAttribute("transform",
+4)),g=this.tooltipTitle.offsetHeight+10,e+=g,mxClient.IS_SVG?this.tooltipTitle.style.marginTop=2-g+"px":(e-=6,this.tooltipTitle.style.top=e-g+"px")):null!=this.tooltipTitle&&null!=this.tooltipTitle.parentNode&&(this.tooltipTitle.style.display="none");n>f&&(this.tooltip.style.width=n+"px");this.tooltip.style.height=e+"px";g=-Math.round(r.x-this.tooltipBorder)+(n>f?(n-f)/2:0);f=-Math.round(r.y-this.tooltipBorder);k=null!=k?k:this.getTooltipOffset(a,r);a=k.x;k=k.y;mxClient.IS_SVG?0!=g||0!=f?this.graph2.view.canvas.setAttribute("transform",
"translate("+g+","+f+")"):this.graph2.view.canvas.removeAttribute("transform"):(this.graph2.view.drawPane.style.left=g+"px",this.graph2.view.drawPane.style.top=f+"px");this.tooltip.style.position="absolute";this.tooltip.style.left=a+"px";this.tooltip.style.top=k+"px";mxUtils.fit(this.tooltip);this.lastCreated=Date.now()};
-Sidebar.prototype.showTooltip=function(a,b,f,d,g,e){if(this.enableTooltips&&this.showTooltips&&this.currentElt!=a){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null);var k=mxUtils.bind(this,function(){this.createTooltip(a,b,f,d,g,e)});null!=this.tooltip&&"none"!=this.tooltip.style.display?k():this.thread=window.setTimeout(k,this.tooltipDelay);this.currentElt=a}};
-Sidebar.prototype.hideTooltip=function(){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null);null!=this.tooltip&&(this.tooltip.style.display="none",this.currentElt=null);this.tooltipMouseDown=null};Sidebar.prototype.addDataEntry=function(a,b,f,d,g){return this.addEntry(a,mxUtils.bind(this,function(){return this.createVertexTemplateFromData(g,b,f,d)}))};
-Sidebar.prototype.addEntries=function(a){for(var b=0;b<a.length;b++)mxUtils.bind(this,function(f){var d=f.data,g=null!=f.title?f.title:"";null!=f.tags&&(g+=" "+f.tags);null!=d&&0<g.length?this.addEntry(g,mxUtils.bind(this,function(){d=this.editorUi.convertDataUri(d);var e="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==f.aspect&&(e+="aspect=fixed;");return this.createVertexTemplate(e+"image="+d,f.w,f.h,"",f.title||"",!1,!1,!0)})):null!=f.xml&&0<g.length&&this.addEntry(g,
-mxUtils.bind(this,function(){var e=this.editorUi.stringToCells(Graph.decompress(f.xml));return this.createVertexTemplateFromCells(e,f.w,f.h,f.title||"",!0,!1,!0)}))})(a[b])};Sidebar.prototype.setCurrentSearchEntryLibrary=function(a,b){this.currentSearchEntryLibrary=null!=a?{id:a,lib:b}:null};
-Sidebar.prototype.addEntry=function(a,b){if(null!=this.taglist&&null!=a&&0<a.length){null!=this.currentSearchEntryLibrary&&(b.parentLibraries=[this.currentSearchEntryLibrary]);a=a.toLowerCase().replace(/[\/,\(\)]/g," ").split(" ");for(var f=[],d={},g=0;g<a.length;g++){null==d[a[g]]&&(d[a[g]]=!0,f.push(a[g]));var e=a[g].replace(/\.*\d*$/,"");e!=a[g]&&null==d[e]&&(d[e]=!0,f.push(e))}for(g=0;g<f.length;g++)this.addEntryForTag(f[g],b)}return b};
+Sidebar.prototype.showTooltip=function(a,b,f,e,g,d){if(this.enableTooltips&&this.showTooltips&&this.currentElt!=a){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null);var k=mxUtils.bind(this,function(){this.createTooltip(a,b,f,e,g,d)});null!=this.tooltip&&"none"!=this.tooltip.style.display?k():this.thread=window.setTimeout(k,this.tooltipDelay);this.currentElt=a}};
+Sidebar.prototype.hideTooltip=function(){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null);null!=this.tooltip&&(this.tooltip.style.display="none",this.currentElt=null);this.tooltipMouseDown=null};Sidebar.prototype.addDataEntry=function(a,b,f,e,g){return this.addEntry(a,mxUtils.bind(this,function(){return this.createVertexTemplateFromData(g,b,f,e)}))};
+Sidebar.prototype.addEntries=function(a){for(var b=0;b<a.length;b++)mxUtils.bind(this,function(f){var e=f.data,g=null!=f.title?f.title:"";null!=f.tags&&(g+=" "+f.tags);null!=e&&0<g.length?this.addEntry(g,mxUtils.bind(this,function(){e=this.editorUi.convertDataUri(e);var d="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==f.aspect&&(d+="aspect=fixed;");return this.createVertexTemplate(d+"image="+e,f.w,f.h,"",f.title||"",!1,!1,!0)})):null!=f.xml&&0<g.length&&this.addEntry(g,
+mxUtils.bind(this,function(){var d=this.editorUi.stringToCells(Graph.decompress(f.xml));return this.createVertexTemplateFromCells(d,f.w,f.h,f.title||"",!0,!1,!0)}))})(a[b])};Sidebar.prototype.setCurrentSearchEntryLibrary=function(a,b){this.currentSearchEntryLibrary=null!=a?{id:a,lib:b}:null};
+Sidebar.prototype.addEntry=function(a,b){if(null!=this.taglist&&null!=a&&0<a.length){null!=this.currentSearchEntryLibrary&&(b.parentLibraries=[this.currentSearchEntryLibrary]);a=a.toLowerCase().replace(/[\/,\(\)]/g," ").split(" ");for(var f=[],e={},g=0;g<a.length;g++){null==e[a[g]]&&(e[a[g]]=!0,f.push(a[g]));var d=a[g].replace(/\.*\d*$/,"");d!=a[g]&&null==e[d]&&(e[d]=!0,f.push(d))}for(g=0;g<f.length;g++)this.addEntryForTag(f[g],b)}return b};
Sidebar.prototype.addEntryForTag=function(a,b){if(null!=a&&1<a.length){var f=this.taglist[a];"object"!==typeof f&&(f={entries:[]},this.taglist[a]=f);f.entries.push(b)}};
-Sidebar.prototype.searchEntries=function(a,b,f,d,g){if(null!=this.taglist&&null!=a){var e=a.toLowerCase().split(" ");g=new mxDictionary;var k=(f+1)*b;a=[];for(var n=0,u=0;u<e.length;u++)if(0<e[u].length){var m=this.taglist[e[u]],r=new mxDictionary;if(null!=m){var x=m.entries;a=[];for(var B=0;B<x.length;B++)if(m=x[B],0==n==(null==g.get(m))&&(r.put(m,m),a.push(m),u==e.length-1&&a.length==k)){d(a.slice(f*b,k),k,!0,e);return}}else a=[];g=r;n++}g=a.length;d(a.slice(f*b,(f+1)*b),g,!1,e)}else d([],null,
-null,e)};Sidebar.prototype.filterTags=function(a){if(null!=a){a=a.split(" ");for(var b=[],f={},d=0;d<a.length;d++)null==f[a[d]]&&(f[a[d]]="1",b.push(a[d]));return b.join(" ")}return null};Sidebar.prototype.cloneCell=function(a,b){a=a.clone();null!=b&&(a.value=b);return a};Sidebar.prototype.showPopupMenuForEntry=function(a,b,f){};
-Sidebar.prototype.addSearchPalette=function(a){var b=document.createElement("div");b.style.visibility="hidden";this.container.appendChild(b);var f=document.createElement("div");f.className="geSidebar";f.style.boxSizing="border-box";f.style.overflow="hidden";f.style.width="100%";f.style.padding="8px";f.style.paddingTop="14px";f.style.paddingBottom="0px";a||(f.style.display="none");var d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.textOverflow="clip";d.style.paddingBottom="8px";
-d.style.cursor="default";var g=document.createElement("input");g.setAttribute("placeholder",mxResources.get("searchShapes"));g.setAttribute("type","text");g.style.fontSize="12px";g.style.overflow="hidden";g.style.boxSizing="border-box";g.style.border="solid 1px #d5d5d5";g.style.borderRadius="4px";g.style.width="100%";g.style.outline="none";g.style.padding="6px";g.style.paddingRight="20px";d.appendChild(g);var e=document.createElement("img");e.setAttribute("src",Sidebar.prototype.searchImage);e.setAttribute("title",
-mxResources.get("search"));e.style.position="relative";e.style.left="-18px";e.style.top="1px";e.style.background="url('"+this.editorUi.editor.transparentImage+"')";d.appendChild(e);f.appendChild(d);var k=document.createElement("center"),n=mxUtils.button(mxResources.get("moreResults"),function(){J()});n.style.display="none";n.style.lineHeight="normal";n.style.fontSize="12px";n.style.padding="6px 12px 6px 12px";n.style.marginTop="4px";n.style.marginBottom="8px";k.style.paddingTop="4px";k.style.paddingBottom=
-"4px";k.appendChild(n);f.appendChild(k);var u="",m=!1,r=!1,x=0,B={},C=12,G=mxUtils.bind(this,function(){m=!1;this.currentSearch=null;for(var D=f.firstChild;null!=D;){var N=D.nextSibling;D!=d&&D!=k&&D.parentNode.removeChild(D);D=N}});mxEvent.addListener(e,"click",function(){e.getAttribute("src")==Dialog.prototype.closeImage&&(e.setAttribute("src",Sidebar.prototype.searchImage),e.setAttribute("title",mxResources.get("search")),n.style.display="none",u=g.value="",G());g.focus()});var J=mxUtils.bind(this,
-function(){C=4*Math.max(1,Math.floor(this.container.clientWidth/(this.thumbWidth+10)));this.hideTooltip();if(""!=g.value){if(null!=k.parentNode&&(u!=g.value&&(G(),u=g.value,B={},r=!1,x=0),!m&&!r)){n.setAttribute("disabled","true");n.style.display="";n.style.cursor="wait";n.innerHTML=mxResources.get("loading")+"...";m=!0;var D={};this.currentSearch=D;this.searchEntries(u,C,x,mxUtils.bind(this,function(N,Q,R,P){if(this.currentSearch==D){N=null!=N?N:[];m=!1;x++;this.insertSearchHint(f,u,C,x,N,Q,R,P);
-0==N.length&&1==x&&(u="");null!=k.parentNode&&k.parentNode.removeChild(k);for(Q=0;Q<N.length;Q++)mxUtils.bind(this,function(Z){try{var U=Z();null==B[U.innerHTML]?(B[U.innerHTML]=null!=Z.parentLibraries?Z.parentLibraries.slice():[],f.appendChild(U)):null!=Z.parentLibraries&&(B[U.innerHTML]=B[U.innerHTML].concat(Z.parentLibraries));mxEvent.addGestureListeners(U,null,null,mxUtils.bind(this,function(V){var ia=B[U.innerHTML];mxEvent.isPopupTrigger(V)&&this.showPopupMenuForEntry(U,ia,V)}));mxEvent.disableContextMenu(U)}catch(V){}})(N[Q]);
-R?(n.removeAttribute("disabled"),n.innerHTML=mxResources.get("moreResults")):(n.innerHTML=mxResources.get("reset"),n.style.display="none",r=!0);n.style.cursor="";f.appendChild(k)}}),mxUtils.bind(this,function(){n.style.cursor=""}))}}else G(),u=g.value="",B={},n.style.display="none",r=!1,g.focus()});this.searchShapes=function(D){g.value=D;J()};mxEvent.addListener(g,"keydown",mxUtils.bind(this,function(D){13==D.keyCode&&(J(),mxEvent.consume(D))}));mxEvent.addListener(g,"keyup",mxUtils.bind(this,function(D){""==
-g.value?(e.setAttribute("src",Sidebar.prototype.searchImage),e.setAttribute("title",mxResources.get("search"))):(e.setAttribute("src",Dialog.prototype.closeImage),e.setAttribute("title",mxResources.get("reset")));""==g.value?(r=!0,n.style.display="none"):g.value!=u?(n.style.display="none",r=!1):m||(n.style.display=r?"none":"")}));mxEvent.addListener(g,"mousedown",function(D){D.stopPropagation&&D.stopPropagation();D.cancelBubble=!0});mxEvent.addListener(g,"selectstart",function(D){D.stopPropagation&&
+Sidebar.prototype.searchEntries=function(a,b,f,e,g){if(null!=this.taglist&&null!=a){var d=a.toLowerCase().split(" ");g=new mxDictionary;var k=(f+1)*b;a=[];for(var n=0,u=0;u<d.length;u++)if(0<d[u].length){var m=this.taglist[d[u]],r=new mxDictionary;if(null!=m){var x=m.entries;a=[];for(var B=0;B<x.length;B++)if(m=x[B],0==n==(null==g.get(m))&&(r.put(m,m),a.push(m),u==d.length-1&&a.length==k)){e(a.slice(f*b,k),k,!0,d);return}}else a=[];g=r;n++}g=a.length;e(a.slice(f*b,(f+1)*b),g,!1,d)}else e([],null,
+null,d)};Sidebar.prototype.filterTags=function(a){if(null!=a){a=a.split(" ");for(var b=[],f={},e=0;e<a.length;e++)null==f[a[e]]&&(f[a[e]]="1",b.push(a[e]));return b.join(" ")}return null};Sidebar.prototype.cloneCell=function(a,b){a=a.clone();null!=b&&(a.value=b);return a};Sidebar.prototype.showPopupMenuForEntry=function(a,b,f){};
+Sidebar.prototype.addSearchPalette=function(a){var b=document.createElement("div");b.style.visibility="hidden";this.container.appendChild(b);var f=document.createElement("div");f.className="geSidebar";f.style.boxSizing="border-box";f.style.overflow="hidden";f.style.width="100%";f.style.padding="8px";f.style.paddingTop="14px";f.style.paddingBottom="0px";a||(f.style.display="none");var e=document.createElement("div");e.style.whiteSpace="nowrap";e.style.textOverflow="clip";e.style.paddingBottom="8px";
+e.style.cursor="default";var g=document.createElement("input");g.setAttribute("placeholder",mxResources.get("searchShapes"));g.setAttribute("type","text");g.style.fontSize="12px";g.style.overflow="hidden";g.style.boxSizing="border-box";g.style.border="solid 1px #d5d5d5";g.style.borderRadius="4px";g.style.width="100%";g.style.outline="none";g.style.padding="6px";g.style.paddingRight="20px";e.appendChild(g);var d=document.createElement("img");d.setAttribute("src",Sidebar.prototype.searchImage);d.setAttribute("title",
+mxResources.get("search"));d.style.position="relative";d.style.left="-18px";d.style.top="1px";d.style.background="url('"+this.editorUi.editor.transparentImage+"')";e.appendChild(d);f.appendChild(e);var k=document.createElement("center"),n=mxUtils.button(mxResources.get("moreResults"),function(){J()});n.style.display="none";n.style.lineHeight="normal";n.style.fontSize="12px";n.style.padding="6px 12px 6px 12px";n.style.marginTop="4px";n.style.marginBottom="8px";k.style.paddingTop="4px";k.style.paddingBottom=
+"4px";k.appendChild(n);f.appendChild(k);var u="",m=!1,r=!1,x=0,B={},C=12,F=mxUtils.bind(this,function(){m=!1;this.currentSearch=null;for(var D=f.firstChild;null!=D;){var N=D.nextSibling;D!=e&&D!=k&&D.parentNode.removeChild(D);D=N}});mxEvent.addListener(d,"click",function(){d.getAttribute("src")==Dialog.prototype.closeImage&&(d.setAttribute("src",Sidebar.prototype.searchImage),d.setAttribute("title",mxResources.get("search")),n.style.display="none",u=g.value="",F());g.focus()});var J=mxUtils.bind(this,
+function(){C=4*Math.max(1,Math.floor(this.container.clientWidth/(this.thumbWidth+10)));this.hideTooltip();if(""!=g.value){if(null!=k.parentNode&&(u!=g.value&&(F(),u=g.value,B={},r=!1,x=0),!m&&!r)){n.setAttribute("disabled","true");n.style.display="";n.style.cursor="wait";n.innerHTML=mxResources.get("loading")+"...";m=!0;var D={};this.currentSearch=D;this.searchEntries(u,C,x,mxUtils.bind(this,function(N,S,T,P){if(this.currentSearch==D){N=null!=N?N:[];m=!1;x++;this.insertSearchHint(f,u,C,x,N,S,T,P);
+0==N.length&&1==x&&(u="");null!=k.parentNode&&k.parentNode.removeChild(k);for(S=0;S<N.length;S++)mxUtils.bind(this,function(Z){try{var U=Z();null==B[U.innerHTML]?(B[U.innerHTML]=null!=Z.parentLibraries?Z.parentLibraries.slice():[],f.appendChild(U)):null!=Z.parentLibraries&&(B[U.innerHTML]=B[U.innerHTML].concat(Z.parentLibraries));mxEvent.addGestureListeners(U,null,null,mxUtils.bind(this,function(V){var aa=B[U.innerHTML];mxEvent.isPopupTrigger(V)&&this.showPopupMenuForEntry(U,aa,V)}));mxEvent.disableContextMenu(U)}catch(V){}})(N[S]);
+T?(n.removeAttribute("disabled"),n.innerHTML=mxResources.get("moreResults")):(n.innerHTML=mxResources.get("reset"),n.style.display="none",r=!0);n.style.cursor="";f.appendChild(k)}}),mxUtils.bind(this,function(){n.style.cursor=""}))}}else F(),u=g.value="",B={},n.style.display="none",r=!1,g.focus()});this.searchShapes=function(D){g.value=D;J()};mxEvent.addListener(g,"keydown",mxUtils.bind(this,function(D){13==D.keyCode&&(J(),mxEvent.consume(D))}));mxEvent.addListener(g,"keyup",mxUtils.bind(this,function(D){""==
+g.value?(d.setAttribute("src",Sidebar.prototype.searchImage),d.setAttribute("title",mxResources.get("search"))):(d.setAttribute("src",Dialog.prototype.closeImage),d.setAttribute("title",mxResources.get("reset")));""==g.value?(r=!0,n.style.display="none"):g.value!=u?(n.style.display="none",r=!1):m||(n.style.display=r?"none":"")}));mxEvent.addListener(g,"mousedown",function(D){D.stopPropagation&&D.stopPropagation();D.cancelBubble=!0});mxEvent.addListener(g,"selectstart",function(D){D.stopPropagation&&
D.stopPropagation();D.cancelBubble=!0});a=document.createElement("div");a.appendChild(f);this.container.appendChild(a);this.palettes.search=[b,a]};
-Sidebar.prototype.insertSearchHint=function(a,b,f,d,g,e,k,n){0==g.length&&1==d&&(f=document.createElement("div"),f.className="geTitle",f.style.cssText="background-color:transparent;border-color:transparent;color:gray;padding:6px 0px 0px 0px !important;margin:4px 8px 4px 8px;text-align:center;cursor:default !important",mxUtils.write(f,mxResources.get("noResultsFor",[b])),a.appendChild(f))};
-Sidebar.prototype.addGeneralPalette=function(a){this.setCurrentSearchEntryLibrary("general","general");var b=this,f=parseInt(this.editorUi.editor.graph.defaultVertexStyle.fontSize);f=isNaN(f)?"":"fontSize="+Math.min(16,f)+";";var d=new mxCell("List Item",new mxGeometry(0,0,80,30),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;"+f);d.vertex=!0;f=[this.createVertexTemplateEntry("rounded=0;whiteSpace=wrap;html=1;",
+Sidebar.prototype.insertSearchHint=function(a,b,f,e,g,d,k,n){0==g.length&&1==e&&(f=document.createElement("div"),f.className="geTitle",f.style.cssText="background-color:transparent;border-color:transparent;color:gray;padding:6px 0px 0px 0px !important;margin:4px 8px 4px 8px;text-align:center;cursor:default !important",mxUtils.write(f,mxResources.get("noResultsFor",[b])),a.appendChild(f))};
+Sidebar.prototype.addGeneralPalette=function(a){this.setCurrentSearchEntryLibrary("general","general");var b=this,f=parseInt(this.editorUi.editor.graph.defaultVertexStyle.fontSize);f=isNaN(f)?"":"fontSize="+Math.min(16,f)+";";var e=new mxCell("List Item",new mxGeometry(0,0,80,30),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;"+f);e.vertex=!0;f=[this.createVertexTemplateEntry("rounded=0;whiteSpace=wrap;html=1;",
120,60,"","Rectangle",null,null,"rect rectangle box"),this.createVertexTemplateEntry("rounded=1;whiteSpace=wrap;html=1;",120,60,"","Rounded Rectangle",null,null,"rounded rect rectangle box"),this.createVertexTemplateEntry("text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text","Text",null,null,"text textbox textarea label"),this.createVertexTemplateEntry("text;html=1;strokeColor=none;fillColor=none;spacing=5;spacingTop=-20;whiteSpace=wrap;overflow=hidden;rounded=0;",
190,120,"<h1>Heading</h1><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>","Textbox",null,null,"text textbox textarea"),this.createVertexTemplateEntry("ellipse;whiteSpace=wrap;html=1;",120,80,"","Ellipse",null,null,"oval ellipse state"),this.createVertexTemplateEntry("whiteSpace=wrap;html=1;aspect=fixed;",80,80,"","Square",null,null,"square"),this.createVertexTemplateEntry("ellipse;whiteSpace=wrap;html=1;aspect=fixed;",
80,80,"","Circle",null,null,"circle"),this.createVertexTemplateEntry("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;",120,60,"","Process",null,null,"process task"),this.createVertexTemplateEntry("rhombus;whiteSpace=wrap;html=1;",80,80,"","Diamond",null,null,"diamond rhombus if condition decision conditional question test"),this.createVertexTemplateEntry("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,60,"","Parallelogram"),this.createVertexTemplateEntry("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",
@@ -2662,16 +2665,16 @@ Sidebar.prototype.addGeneralPalette=function(a){this.setCurrentSearchEntryLibrar
120,60,"","Trapezoid"),this.createVertexTemplateEntry("shape=tape;whiteSpace=wrap;html=1;",120,100,"","Tape"),this.createVertexTemplateEntry("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;darkOpacity=0.05;",80,100,"","Note"),this.createVertexTemplateEntry("shape=card;whiteSpace=wrap;html=1;",80,100,"","Card"),this.createVertexTemplateEntry("shape=callout;whiteSpace=wrap;html=1;perimeter=calloutPerimeter;",120,80,"","Callout",null,null,"bubble chat thought speech message"),this.createVertexTemplateEntry("shape=umlActor;verticalLabelPosition=bottom;verticalAlign=top;html=1;outlineConnect=0;",
30,60,"Actor","Actor",!1,null,"user person human stickman"),this.createVertexTemplateEntry("shape=xor;whiteSpace=wrap;html=1;",60,80,"","Or",null,null,"logic or"),this.createVertexTemplateEntry("shape=or;whiteSpace=wrap;html=1;",60,80,"","And",null,null,"logic and"),this.createVertexTemplateEntry("shape=dataStorage;whiteSpace=wrap;html=1;fixedSize=1;",100,80,"","Data Storage"),this.createVertexTemplateEntry("swimlane;startSize=0;",200,200,"","Container",null,null,"container swimlane lane pool group"),
this.createVertexTemplateEntry("swimlane;",200,200,"Vertical Container","Container",null,null,"container swimlane lane pool group"),this.createVertexTemplateEntry("swimlane;horizontal=0;",200,200,"Horizontal Container","Horizontal Container",null,null,"container swimlane lane pool group"),this.addEntry("list group erd table",function(){var g=new mxCell("List",new mxGeometry(0,0,140,120),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=30;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;");
-g.vertex=!0;g.insert(b.cloneCell(d,"Item 1"));g.insert(b.cloneCell(d,"Item 2"));g.insert(b.cloneCell(d,"Item 3"));return b.createVertexTemplateFromCells([g],g.geometry.width,g.geometry.height,"List")}),this.addEntry("list item entry value group erd table",function(){return b.createVertexTemplateFromCells([b.cloneCell(d,"List Item")],d.geometry.width,d.geometry.height,"List Item")}),this.addEntry("curve",mxUtils.bind(this,function(){var g=new mxCell("",new mxGeometry(0,0,50,50),"curved=1;endArrow=classic;html=1;");
+g.vertex=!0;g.insert(b.cloneCell(e,"Item 1"));g.insert(b.cloneCell(e,"Item 2"));g.insert(b.cloneCell(e,"Item 3"));return b.createVertexTemplateFromCells([g],g.geometry.width,g.geometry.height,"List")}),this.addEntry("list item entry value group erd table",function(){return b.createVertexTemplateFromCells([b.cloneCell(e,"List Item")],e.geometry.width,e.geometry.height,"List Item")}),this.addEntry("curve",mxUtils.bind(this,function(){var g=new mxCell("",new mxGeometry(0,0,50,50),"curved=1;endArrow=classic;html=1;");
g.geometry.setTerminalPoint(new mxPoint(0,50),!0);g.geometry.setTerminalPoint(new mxPoint(50,0),!1);g.geometry.points=[new mxPoint(50,50),new mxPoint(0,0)];g.geometry.relative=!0;g.edge=!0;return this.createEdgeTemplateFromCells([g],g.geometry.width,g.geometry.height,"Curve")})),this.createEdgeTemplateEntry("shape=flexArrow;endArrow=classic;startArrow=classic;html=1;",100,100,"","Bidirectional Arrow",null,"line lines connector connectors connection connections arrow arrows bidirectional"),this.createEdgeTemplateEntry("shape=flexArrow;endArrow=classic;html=1;",
50,50,"","Arrow",null,"line lines connector connectors connection connections arrow arrows directional directed"),this.createEdgeTemplateEntry("endArrow=none;dashed=1;html=1;",50,50,"","Dashed Line",null,"line lines connector connectors connection connections arrow arrows dashed undirected no"),this.createEdgeTemplateEntry("endArrow=none;dashed=1;html=1;dashPattern=1 3;strokeWidth=2;",50,50,"","Dotted Line",null,"line lines connector connectors connection connections arrow arrows dotted undirected no"),
this.createEdgeTemplateEntry("endArrow=none;html=1;",50,50,"","Line",null,"line lines connector connectors connection connections arrow arrows simple undirected plain blank no"),this.createEdgeTemplateEntry("endArrow=classic;startArrow=classic;html=1;",50,50,"","Bidirectional Connector",null,"line lines connector connectors connection connections arrow arrows bidirectional"),this.createEdgeTemplateEntry("endArrow=classic;html=1;",50,50,"","Directional Connector",null,"line lines connector connectors connection connections arrow arrows directional directed"),
-this.createEdgeTemplateEntry("shape=link;html=1;",100,0,"","Link",null,"line lines connector connectors connection connections arrow arrows link"),this.addEntry("line lines connector connectors connection connections arrow arrows edge title",mxUtils.bind(this,function(){var g=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=classic;html=1;");g.geometry.setTerminalPoint(new mxPoint(0,0),!0);g.geometry.setTerminalPoint(new mxPoint(100,0),!1);g.geometry.relative=!0;g.edge=!0;var e=new mxCell("Label",
-new mxGeometry(0,0,0,0),"edgeLabel;resizable=0;html=1;align=center;verticalAlign=middle;");e.geometry.relative=!0;e.setConnectable(!1);e.vertex=!0;g.insert(e);return this.createEdgeTemplateFromCells([g],100,0,"Connector with Label")})),this.addEntry("line lines connector connectors connection connections arrow arrows edge title multiplicity",mxUtils.bind(this,function(){var g=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=classic;html=1;");g.geometry.setTerminalPoint(new mxPoint(0,0),!0);g.geometry.setTerminalPoint(new mxPoint(160,
-0),!1);g.geometry.relative=!0;g.edge=!0;var e=new mxCell("Label",new mxGeometry(0,0,0,0),"edgeLabel;resizable=0;html=1;align=center;verticalAlign=middle;");e.geometry.relative=!0;e.setConnectable(!1);e.vertex=!0;g.insert(e);e=new mxCell("Source",new mxGeometry(-1,0,0,0),"edgeLabel;resizable=0;html=1;align=left;verticalAlign=bottom;");e.geometry.relative=!0;e.setConnectable(!1);e.vertex=!0;g.insert(e);return this.createEdgeTemplateFromCells([g],160,0,"Connector with 2 Labels")})),this.addEntry("line lines connector connectors connection connections arrow arrows edge title multiplicity",
-mxUtils.bind(this,function(){var g=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=classic;html=1;");g.geometry.setTerminalPoint(new mxPoint(0,0),!0);g.geometry.setTerminalPoint(new mxPoint(160,0),!1);g.geometry.relative=!0;g.edge=!0;var e=new mxCell("Label",new mxGeometry(0,0,0,0),"edgeLabel;resizable=0;html=1;align=center;verticalAlign=middle;");e.geometry.relative=!0;e.setConnectable(!1);e.vertex=!0;g.insert(e);e=new mxCell("Source",new mxGeometry(-1,0,0,0),"edgeLabel;resizable=0;html=1;align=left;verticalAlign=bottom;");
-e.geometry.relative=!0;e.setConnectable(!1);e.vertex=!0;g.insert(e);e=new mxCell("Target",new mxGeometry(1,0,0,0),"edgeLabel;resizable=0;html=1;align=right;verticalAlign=bottom;");e.geometry.relative=!0;e.setConnectable(!1);e.vertex=!0;g.insert(e);return this.createEdgeTemplateFromCells([g],160,0,"Connector with 3 Labels")})),this.addEntry("line lines connector connectors connection connections arrow arrows edge shape symbol message mail email",mxUtils.bind(this,function(){var g=new mxCell("",new mxGeometry(0,
-0,0,0),"endArrow=classic;html=1;");g.geometry.setTerminalPoint(new mxPoint(0,0),!0);g.geometry.setTerminalPoint(new mxPoint(100,0),!1);g.geometry.relative=!0;g.edge=!0;var e=new mxCell("",new mxGeometry(0,0,20,14),"shape=message;html=1;outlineConnect=0;");e.geometry.relative=!0;e.vertex=!0;e.geometry.offset=new mxPoint(-10,-7);g.insert(e);return this.createEdgeTemplateFromCells([g],100,0,"Connector with Symbol")}))];this.addPaletteFunctions("general",mxResources.get("general"),null!=a?a:!0,f);this.setCurrentSearchEntryLibrary()};
+this.createEdgeTemplateEntry("shape=link;html=1;",100,0,"","Link",null,"line lines connector connectors connection connections arrow arrows link"),this.addEntry("line lines connector connectors connection connections arrow arrows edge title",mxUtils.bind(this,function(){var g=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=classic;html=1;");g.geometry.setTerminalPoint(new mxPoint(0,0),!0);g.geometry.setTerminalPoint(new mxPoint(100,0),!1);g.geometry.relative=!0;g.edge=!0;var d=new mxCell("Label",
+new mxGeometry(0,0,0,0),"edgeLabel;resizable=0;html=1;align=center;verticalAlign=middle;");d.geometry.relative=!0;d.setConnectable(!1);d.vertex=!0;g.insert(d);return this.createEdgeTemplateFromCells([g],100,0,"Connector with Label")})),this.addEntry("line lines connector connectors connection connections arrow arrows edge title multiplicity",mxUtils.bind(this,function(){var g=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=classic;html=1;");g.geometry.setTerminalPoint(new mxPoint(0,0),!0);g.geometry.setTerminalPoint(new mxPoint(160,
+0),!1);g.geometry.relative=!0;g.edge=!0;var d=new mxCell("Label",new mxGeometry(0,0,0,0),"edgeLabel;resizable=0;html=1;align=center;verticalAlign=middle;");d.geometry.relative=!0;d.setConnectable(!1);d.vertex=!0;g.insert(d);d=new mxCell("Source",new mxGeometry(-1,0,0,0),"edgeLabel;resizable=0;html=1;align=left;verticalAlign=bottom;");d.geometry.relative=!0;d.setConnectable(!1);d.vertex=!0;g.insert(d);return this.createEdgeTemplateFromCells([g],160,0,"Connector with 2 Labels")})),this.addEntry("line lines connector connectors connection connections arrow arrows edge title multiplicity",
+mxUtils.bind(this,function(){var g=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=classic;html=1;");g.geometry.setTerminalPoint(new mxPoint(0,0),!0);g.geometry.setTerminalPoint(new mxPoint(160,0),!1);g.geometry.relative=!0;g.edge=!0;var d=new mxCell("Label",new mxGeometry(0,0,0,0),"edgeLabel;resizable=0;html=1;align=center;verticalAlign=middle;");d.geometry.relative=!0;d.setConnectable(!1);d.vertex=!0;g.insert(d);d=new mxCell("Source",new mxGeometry(-1,0,0,0),"edgeLabel;resizable=0;html=1;align=left;verticalAlign=bottom;");
+d.geometry.relative=!0;d.setConnectable(!1);d.vertex=!0;g.insert(d);d=new mxCell("Target",new mxGeometry(1,0,0,0),"edgeLabel;resizable=0;html=1;align=right;verticalAlign=bottom;");d.geometry.relative=!0;d.setConnectable(!1);d.vertex=!0;g.insert(d);return this.createEdgeTemplateFromCells([g],160,0,"Connector with 3 Labels")})),this.addEntry("line lines connector connectors connection connections arrow arrows edge shape symbol message mail email",mxUtils.bind(this,function(){var g=new mxCell("",new mxGeometry(0,
+0,0,0),"endArrow=classic;html=1;");g.geometry.setTerminalPoint(new mxPoint(0,0),!0);g.geometry.setTerminalPoint(new mxPoint(100,0),!1);g.geometry.relative=!0;g.edge=!0;var d=new mxCell("",new mxGeometry(0,0,20,14),"shape=message;html=1;outlineConnect=0;");d.geometry.relative=!0;d.vertex=!0;d.geometry.offset=new mxPoint(-10,-7);g.insert(d);return this.createEdgeTemplateFromCells([g],100,0,"Connector with Symbol")}))];this.addPaletteFunctions("general",mxResources.get("general"),null!=a?a:!0,f);this.setCurrentSearchEntryLibrary()};
Sidebar.prototype.addMiscPalette=function(a){var b=this;this.setCurrentSearchEntryLibrary("general","misc");var f=[this.createVertexTemplateEntry("text;strokeColor=none;fillColor=none;html=1;fontSize=24;fontStyle=1;verticalAlign=middle;align=center;",100,40,"Title","Title",null,null,"text heading title"),this.createVertexTemplateEntry("text;strokeColor=none;fillColor=none;html=1;whiteSpace=wrap;verticalAlign=middle;overflow=hidden;",100,80,"<ul><li>Value 1</li><li>Value 2</li><li>Value 3</li></ul>",
"Unordered List"),this.createVertexTemplateEntry("text;strokeColor=none;fillColor=none;html=1;whiteSpace=wrap;verticalAlign=middle;overflow=hidden;",100,80,"<ol><li>Value 1</li><li>Value 2</li><li>Value 3</li></ol>","Ordered List"),this.addDataEntry("table",180,120,"Table 1","7ZjBTuMwEIafJteVnVDoXpuycGAvsC9g6mltyfFE9kAann7txN2qqIgU0aCllRJpZjxO7G9i/3KyoqzWN07U6jdKMFlxnRWlQ6TeqtYlGJPlTMusmGd5zsKd5b/eaOVdK6uFA0tDOuR9h2dhnqCP9AFPrUkBr0QdTRKPMTRTVIVhznkwG6UJHmqxiO1NmESIeRKOHvRLDLHgL9CS0BZc6rNAY0TtdfewPkNpI+9Ei0+0ec3Gm6XhgSNYvznFLpTmdwNYAbk2pDRakkoZ0x4DU6BXatMtsWHC94HVv75bYsFI0PYDLA4EeI9NZIhOv0QwJjF4Tc03ujLCwi0I+So0Q9mmEGGdLANLSuYjEmGVHJemy/aSlw7rP8KtYJOy1MaUaDAWy6KN5a5RW+oATWbhCshK9mOSTcLMyuDzrR+umO6oROvJhaLHx4Lw1IAfXMz8Y8W8+IRaXgyvZRgxaWHuYUHCroasi7AObMze0t8D+7CCYkC5NPGDmistJdihjIt3GV8eCfHkxBGvd/GOQPzyTHxnsx8B+dVZE0bRhHa3ZGNIxPRUVtPVl0nEzxNHPL5EcHZGPrZGcH4WiTFFYjqiSPADTtX/93ri7x+9j7aADjh5f0/IXyAU3+GE3O1L4K6fod+e+CfV4YjqEdztL8GubeeP4V8="),
this.addDataEntry("table",180,120,"Table 2","7ZhRb5swEMc/Da+TDSFJX0O27qF7aae9u8EJlowP2ZcR+ulng1maJlbTaaEPIBHpfL5z8O/v0wlHSVYe7jWrih+QcxklX6Mk0wDYWeUh41JGMRF5lKyjOCb2F8XfArO0nSUV01zhNQlxl/CbyT3vPJ3DYCO9wxSsciayZ+daFVja11xTa9aFQP5UsY2br+0mrM8g0/gkXpyL2PEGFDKhuPY5G5CSVUa0i3URhZD5A2tgj/3f9CMXvS/Vg803PlpD/Xro359r5Icgg9blAdxzKDnqxobUIsfCRyw7TqTgYlf0aR4eYaZz7P7mHpFaw1O9TDj5IOFHqB1k0OLFkZN+n2+xmlqUkin+nbP8jWsFeeNdCJW3JN+iN58BEcoep98uuShNrqH6yfSO9yFbIWUGEpyaCpQ7DxUIhS2gdGUfiywjX9IotTvL7Jgex/Zx4RozUAa1PRVuWc4M1tzgtWLG/ybm7D9oOTvT8ldrxoQGRbWvjoLJR75BpnbXVJCtGOWijzJcoP4xZcEy3Up3staFyHOu3KL2ePkDReNr4Sfvwp/fiH0aZB8uqFGwP5xyH0CKeVCKZJLidd8YQIvF1F4GaS/NqWRDdJtlsMxmIymzxad1m7sg+3Tc7IfvNpQEtZhPWgzcbiid+s2Q/WY5YL+h55cBfaEtRlJo9P2bgptV1vlFQU9/OXL6n9Bzwl/6d5MYN246dni8AG3nTu5H/wA="),
@@ -2681,10 +2684,10 @@ this.addDataEntry("crossfunctional cross-functional cross functional flowchart s
this.createVertexTemplateEntry("text;html=1;strokeColor=#c0c0c0;fillColor=#ffffff;overflow=fill;rounded=0;",280,160,'<table border="1" width="100%" height="100%" cellpadding="4" style="width:100%;height:100%;border-collapse:collapse;"><tr style="background-color:#A7C942;color:#ffffff;border:1px solid #98bf21;"><th align="left">Title 1</th><th align="left">Title 2</th><th align="left">Title 3</th></tr><tr style="border:1px solid #98bf21;"><td>Value 1</td><td>Value 2</td><td>Value 3</td></tr><tr style="background-color:#EAF2D3;border:1px solid #98bf21;"><td>Value 4</td><td>Value 5</td><td>Value 6</td></tr><tr style="border:1px solid #98bf21;"><td>Value 7</td><td>Value 8</td><td>Value 9</td></tr><tr style="background-color:#EAF2D3;border:1px solid #98bf21;"><td>Value 10</td><td>Value 11</td><td>Value 12</td></tr></table>',
"HTML Table 1"),this.createVertexTemplateEntry("text;html=1;strokeColor=#c0c0c0;fillColor=none;overflow=fill;",180,140,'<table border="0" width="100%" height="100%" style="width:100%;height:100%;border-collapse:collapse;"><tr><td align="center">Value 1</td><td align="center">Value 2</td><td align="center">Value 3</td></tr><tr><td align="center">Value 4</td><td align="center">Value 5</td><td align="center">Value 6</td></tr><tr><td align="center">Value 7</td><td align="center">Value 8</td><td align="center">Value 9</td></tr></table>',
"HTML Table 2"),this.createVertexTemplateEntry("text;html=1;strokeColor=none;fillColor=none;overflow=fill;",180,140,'<table border="1" width="100%" height="100%" style="width:100%;height:100%;border-collapse:collapse;"><tr><td align="center">Value 1</td><td align="center">Value 2</td><td align="center">Value 3</td></tr><tr><td align="center">Value 4</td><td align="center">Value 5</td><td align="center">Value 6</td></tr><tr><td align="center">Value 7</td><td align="center">Value 8</td><td align="center">Value 9</td></tr></table>',
-"HTML Table 3"),this.createVertexTemplateEntry("text;html=1;strokeColor=none;fillColor=none;overflow=fill;",160,140,'<table border="1" width="100%" height="100%" cellpadding="4" style="width:100%;height:100%;border-collapse:collapse;"><tr><th align="center"><b>Title</b></th></tr><tr><td align="center">Section 1.1\nSection 1.2\nSection 1.3</td></tr><tr><td align="center">Section 2.1\nSection 2.2\nSection 2.3</td></tr></table>',"HTML Table 4"),this.addEntry("link hyperlink",mxUtils.bind(this,function(){var d=
-new mxCell("Link",new mxGeometry(0,0,60,40),"text;html=1;strokeColor=none;fillColor=none;whiteSpace=wrap;align=center;verticalAlign=middle;fontColor=#0000EE;fontStyle=4;");d.vertex=!0;this.graph.setLinkForCell(d,"https://www.draw.io");return this.createVertexTemplateFromCells([d],d.geometry.width,d.geometry.height,"Link")})),this.addEntry("timestamp date time text label",mxUtils.bind(this,function(){var d=new mxCell("%date{ddd mmm dd yyyy HH:MM:ss}%",new mxGeometry(0,0,160,20),"text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;overflow=hidden;");
-d.vertex=!0;this.graph.setAttributeForCell(d,"placeholders","1");return this.createVertexTemplateFromCells([d],d.geometry.width,d.geometry.height,"Timestamp")})),this.addEntry("variable placeholder metadata hello world text label",mxUtils.bind(this,function(){var d=new mxCell("%name% Text",new mxGeometry(0,0,80,20),"text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;overflow=hidden;");d.vertex=!0;this.graph.setAttributeForCell(d,"placeholders","1");this.graph.setAttributeForCell(d,
-"name","Variable");return this.createVertexTemplateFromCells([d],d.geometry.width,d.geometry.height,"Variable")})),this.createVertexTemplateEntry("shape=ext;double=1;rounded=0;whiteSpace=wrap;html=1;",120,80,"","Double Rectangle",null,null,"rect rectangle box double"),this.createVertexTemplateEntry("shape=ext;double=1;rounded=1;whiteSpace=wrap;html=1;",120,80,"","Double Rounded Rectangle",null,null,"rounded rect rectangle box double"),this.createVertexTemplateEntry("ellipse;shape=doubleEllipse;whiteSpace=wrap;html=1;",
+"HTML Table 3"),this.createVertexTemplateEntry("text;html=1;strokeColor=none;fillColor=none;overflow=fill;",160,140,'<table border="1" width="100%" height="100%" cellpadding="4" style="width:100%;height:100%;border-collapse:collapse;"><tr><th align="center"><b>Title</b></th></tr><tr><td align="center">Section 1.1\nSection 1.2\nSection 1.3</td></tr><tr><td align="center">Section 2.1\nSection 2.2\nSection 2.3</td></tr></table>',"HTML Table 4"),this.addEntry("link hyperlink",mxUtils.bind(this,function(){var e=
+new mxCell("Link",new mxGeometry(0,0,60,40),"text;html=1;strokeColor=none;fillColor=none;whiteSpace=wrap;align=center;verticalAlign=middle;fontColor=#0000EE;fontStyle=4;");e.vertex=!0;this.graph.setLinkForCell(e,"https://www.draw.io");return this.createVertexTemplateFromCells([e],e.geometry.width,e.geometry.height,"Link")})),this.addEntry("timestamp date time text label",mxUtils.bind(this,function(){var e=new mxCell("%date{ddd mmm dd yyyy HH:MM:ss}%",new mxGeometry(0,0,160,20),"text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;overflow=hidden;");
+e.vertex=!0;this.graph.setAttributeForCell(e,"placeholders","1");return this.createVertexTemplateFromCells([e],e.geometry.width,e.geometry.height,"Timestamp")})),this.addEntry("variable placeholder metadata hello world text label",mxUtils.bind(this,function(){var e=new mxCell("%name% Text",new mxGeometry(0,0,80,20),"text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;overflow=hidden;");e.vertex=!0;this.graph.setAttributeForCell(e,"placeholders","1");this.graph.setAttributeForCell(e,
+"name","Variable");return this.createVertexTemplateFromCells([e],e.geometry.width,e.geometry.height,"Variable")})),this.createVertexTemplateEntry("shape=ext;double=1;rounded=0;whiteSpace=wrap;html=1;",120,80,"","Double Rectangle",null,null,"rect rectangle box double"),this.createVertexTemplateEntry("shape=ext;double=1;rounded=1;whiteSpace=wrap;html=1;",120,80,"","Double Rounded Rectangle",null,null,"rounded rect rectangle box double"),this.createVertexTemplateEntry("ellipse;shape=doubleEllipse;whiteSpace=wrap;html=1;",
100,60,"","Double Ellipse",null,null,"oval ellipse start end state double"),this.createVertexTemplateEntry("shape=ext;double=1;whiteSpace=wrap;html=1;aspect=fixed;",80,80,"","Double Square",null,null,"double square"),this.createVertexTemplateEntry("ellipse;shape=doubleEllipse;whiteSpace=wrap;html=1;aspect=fixed;",80,80,"","Double Circle",null,null,"double circle"),this.createVertexTemplateEntry("rounded=1;whiteSpace=wrap;html=1;strokeWidth=2;fillWeight=4;hachureGap=8;hachureAngle=45;fillColor=#1ba1e2;sketch=1;",
120,60,"","Rectangle Sketch",!0,null,"rectangle rect box text sketch comic retro"),this.createVertexTemplateEntry("ellipse;whiteSpace=wrap;html=1;strokeWidth=2;fillWeight=2;hachureGap=8;fillColor=#990000;fillStyle=dots;sketch=1;",120,60,"","Ellipse Sketch",!0,null,"ellipse oval sketch comic retro"),this.createVertexTemplateEntry("rhombus;whiteSpace=wrap;html=1;strokeWidth=2;fillWeight=-1;hachureGap=8;fillStyle=cross-hatch;fillColor=#006600;sketch=1;",120,60,"","Diamond Sketch",!0,null,"diamond sketch comic retro"),
this.createVertexTemplateEntry("html=1;whiteSpace=wrap;shape=isoCube2;backgroundOutline=1;isoAngle=15;",90,100,"","Isometric Cube",!0,null,"cube box iso isometric"),this.createVertexTemplateEntry("html=1;whiteSpace=wrap;aspect=fixed;shape=isoRectangle;",150,90,"","Isometric Square",!0,null,"rectangle rect box iso isometric"),this.createEdgeTemplateEntry("edgeStyle=isometricEdgeStyle;endArrow=none;html=1;",50,100,"","Isometric Edge 1"),this.createEdgeTemplateEntry("edgeStyle=isometricEdgeStyle;endArrow=none;html=1;elbow=vertical;",
@@ -2692,7 +2695,7 @@ this.createVertexTemplateEntry("html=1;whiteSpace=wrap;shape=isoCube2;background
160,10,"","Horizontal Backbone",!1,null,"backbone bus network"),this.createVertexTemplateEntry("line;strokeWidth=4;direction=south;html=1;perimeter=backbonePerimeter;points=[];outlineConnect=0;",10,160,"","Vertical Backbone",!1,null,"backbone bus network"),this.createVertexTemplateEntry("shape=crossbar;whiteSpace=wrap;html=1;rounded=1;",120,20,"","Horizontal Crossbar",!1,null,"crossbar distance measure dimension unit"),this.createVertexTemplateEntry("shape=crossbar;whiteSpace=wrap;html=1;rounded=1;direction=south;",
20,120,"","Vertical Crossbar",!1,null,"crossbar distance measure dimension unit"),this.createVertexTemplateEntry("shape=image;html=1;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=1;aspect=fixed;image="+this.gearImage,52,61,"","Image (Fixed Aspect)",!1,null,"fixed image icon symbol"),this.createVertexTemplateEntry("shape=image;html=1;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;image="+this.gearImage,50,60,"","Image (Variable Aspect)",!1,null,"strechted image icon symbol"),
this.createVertexTemplateEntry("icon;html=1;image="+this.gearImage,60,60,"Icon","Icon",!1,null,"icon image symbol"),this.createVertexTemplateEntry("label;whiteSpace=wrap;html=1;image="+this.gearImage,140,60,"Label","Label 1",null,null,"label image icon symbol"),this.createVertexTemplateEntry("label;whiteSpace=wrap;html=1;align=center;verticalAlign=bottom;spacingLeft=0;spacingBottom=4;imageAlign=center;imageVerticalAlign=top;image="+this.gearImage,120,80,"Label","Label 2",null,null,"label image icon symbol"),
-this.addEntry("shape group container",function(){var d=new mxCell("Label",new mxGeometry(0,0,160,70),"html=1;whiteSpace=wrap;container=1;recursiveResize=0;collapsible=0;");d.vertex=!0;var g=new mxCell("",new mxGeometry(20,20,20,30),"triangle;html=1;whiteSpace=wrap;");g.vertex=!0;d.insert(g);return b.createVertexTemplateFromCells([d],d.geometry.width,d.geometry.height,"Shape Group")}),this.createVertexTemplateEntry("shape=partialRectangle;whiteSpace=wrap;html=1;left=0;right=0;fillColor=none;",120,
+this.addEntry("shape group container",function(){var e=new mxCell("Label",new mxGeometry(0,0,160,70),"html=1;whiteSpace=wrap;container=1;recursiveResize=0;collapsible=0;");e.vertex=!0;var g=new mxCell("",new mxGeometry(20,20,20,30),"triangle;html=1;whiteSpace=wrap;");g.vertex=!0;e.insert(g);return b.createVertexTemplateFromCells([e],e.geometry.width,e.geometry.height,"Shape Group")}),this.createVertexTemplateEntry("shape=partialRectangle;whiteSpace=wrap;html=1;left=0;right=0;fillColor=none;",120,
60,"","Partial Rectangle"),this.createVertexTemplateEntry("shape=partialRectangle;whiteSpace=wrap;html=1;bottom=0;top=0;fillColor=none;",120,60,"","Partial Rectangle"),this.createVertexTemplateEntry("shape=partialRectangle;whiteSpace=wrap;html=1;bottom=0;right=0;fillColor=none;",120,60,"","Partial Rectangle"),this.createVertexTemplateEntry("shape=partialRectangle;whiteSpace=wrap;html=1;bottom=1;right=1;left=1;top=0;fillColor=none;routingCenterX=-0.5;",120,60,"","Partial Rectangle"),this.createVertexTemplateEntry("shape=waypoint;sketch=0;fillStyle=solid;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;",
40,40,"","Waypoint"),this.createEdgeTemplateEntry("edgeStyle=segmentEdgeStyle;endArrow=classic;html=1;",50,50,"","Manual Line",null,"line lines connector connectors connection connections arrow arrows manual"),this.createEdgeTemplateEntry("shape=filledEdge;rounded=0;fixDash=1;endArrow=none;strokeWidth=10;fillColor=#ffffff;edgeStyle=orthogonalEdgeStyle;",60,40,"","Filled Edge"),this.createEdgeTemplateEntry("edgeStyle=elbowEdgeStyle;elbow=horizontal;endArrow=classic;html=1;",50,50,"","Horizontal Elbow",
null,"line lines connector connectors connection connections arrow arrows elbow horizontal"),this.createEdgeTemplateEntry("edgeStyle=elbowEdgeStyle;elbow=vertical;endArrow=classic;html=1;",50,50,"","Vertical Elbow",null,"line lines connector connectors connection connections arrow arrows elbow vertical")];this.addPaletteFunctions("misc",mxResources.get("misc"),null!=a?a:!0,f);this.setCurrentSearchEntryLibrary()};
@@ -2719,178 +2722,178 @@ null,null,"collate"),this.createVertexTemplateEntry("shape=switch;whiteSpace=wra
f.insert(a.cloneCell(b,"Item 3"));return a.createVertexTemplateFromCells([f],f.geometry.width,f.geometry.height,"List")}),this.addEntry("list item entry value group erd table",function(){return a.createVertexTemplateFromCells([a.cloneCell(b,"List Item")],b.geometry.width,b.geometry.height,"List Item")})]};
Sidebar.prototype.addBasicPalette=function(a){this.setCurrentSearchEntryLibrary("basic");this.addStencilPalette("basic",mxResources.get("basic"),a+"/basic.xml",";whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#000000;strokeWidth=2",null,null,null,null,[this.createVertexTemplateEntry("shape=partialRectangle;whiteSpace=wrap;html=1;top=0;bottom=0;fillColor=none;",120,60,"","Partial Rectangle"),this.createVertexTemplateEntry("shape=partialRectangle;whiteSpace=wrap;html=1;right=0;top=0;bottom=0;fillColor=none;routingCenterX=-0.5;",
120,60,"","Partial Rectangle"),this.createVertexTemplateEntry("shape=partialRectangle;whiteSpace=wrap;html=1;bottom=0;right=0;fillColor=none;",120,60,"","Partial Rectangle"),this.createVertexTemplateEntry("shape=partialRectangle;whiteSpace=wrap;html=1;top=0;left=0;fillColor=none;",120,60,"","Partial Rectangle")]);this.setCurrentSearchEntryLibrary()};
-Sidebar.prototype.addUmlPalette=function(a){var b=this,f=new mxCell("+ field: type",new mxGeometry(0,0,100,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;");f.vertex=!0;var d=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;");
-d.vertex=!0;this.setCurrentSearchEntryLibrary("uml");var g=[this.createVertexTemplateEntry("html=1;",110,50,"Object","Object",null,null,"uml static class object instance"),this.createVertexTemplateEntry("html=1;",110,50,"&laquo;interface&raquo;<br><b>Name</b>","Interface",null,null,"uml static class interface object instance annotated annotation"),this.addEntry("uml static class object instance",function(){var e=new mxCell("Classname",new mxGeometry(0,0,160,90),"swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;");
-e.vertex=!0;e.insert(f.clone());e.insert(d.clone());e.insert(b.cloneCell(f,"+ method(type): type"));return b.createVertexTemplateFromCells([e],e.geometry.width,e.geometry.height,"Class")}),this.addEntry("uml static class section subsection",function(){var e=new mxCell("Classname",new mxGeometry(0,0,140,110),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=none;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;");e.vertex=
-!0;e.insert(f.clone());e.insert(f.clone());e.insert(f.clone());return b.createVertexTemplateFromCells([e],e.geometry.width,e.geometry.height,"Class 2")}),this.addEntry("uml static class item member method function variable field attribute label",function(){return b.createVertexTemplateFromCells([b.cloneCell(f,"+ item: attribute")],f.geometry.width,f.geometry.height,"Item 1")}),this.addEntry("uml static class item member method function variable field attribute label",function(){var e=new mxCell("item: attribute",
-new mxGeometry(0,0,120,f.geometry.height),"label;fontStyle=0;strokeColor=none;fillColor=none;align=left;verticalAlign=top;overflow=hidden;spacingLeft=28;spacingRight=4;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;imageWidth=16;imageHeight=16;image="+b.gearImage);e.vertex=!0;return b.createVertexTemplateFromCells([e],e.geometry.width,e.geometry.height,"Item 2")}),this.addEntry("uml static class divider hline line separator",function(){return b.createVertexTemplateFromCells([d.clone()],
-d.geometry.width,d.geometry.height,"Divider")}),this.addEntry("uml static class spacer space gap separator",function(){var e=new mxCell("",new mxGeometry(0,0,20,14),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=4;spacingRight=4;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;");e.vertex=!0;return b.createVertexTemplateFromCells([e.clone()],e.geometry.width,e.geometry.height,"Spacer")}),this.createVertexTemplateEntry("text;align=center;fontStyle=1;verticalAlign=middle;spacingLeft=3;spacingRight=3;strokeColor=none;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;",
-80,26,"Title","Title",null,null,"uml static class title label"),this.addEntry("uml static class component",function(){var e=new mxCell("&laquo;Annotation&raquo;<br/><b>Component</b>",new mxGeometry(0,0,180,90),"html=1;dropTarget=0;");e.vertex=!0;var k=new mxCell("",new mxGeometry(1,0,20,20),"shape=module;jettyWidth=8;jettyHeight=4;");k.vertex=!0;k.geometry.relative=!0;k.geometry.offset=new mxPoint(-27,7);e.insert(k);return b.createVertexTemplateFromCells([e],e.geometry.width,e.geometry.height,"Component")}),
-this.addEntry("uml static class component",function(){var e=new mxCell('<p style="margin:0px;margin-top:6px;text-align:center;"><b>Component</b></p><hr/><p style="margin:0px;margin-left:8px;">+ Attribute1: Type<br/>+ Attribute2: Type</p>',new mxGeometry(0,0,180,90),"align=left;overflow=fill;html=1;dropTarget=0;");e.vertex=!0;var k=new mxCell("",new mxGeometry(1,0,20,20),"shape=component;jettyWidth=8;jettyHeight=4;");k.vertex=!0;k.geometry.relative=!0;k.geometry.offset=new mxPoint(-24,4);e.insert(k);
-return b.createVertexTemplateFromCells([e],e.geometry.width,e.geometry.height,"Component with Attributes")}),this.createVertexTemplateEntry("verticalAlign=top;align=left;spacingTop=8;spacingLeft=2;spacingRight=12;shape=cube;size=10;direction=south;fontStyle=4;html=1;",180,120,"Block","Block",null,null,"uml static class block"),this.createVertexTemplateEntry("shape=module;align=left;spacingLeft=20;align=center;verticalAlign=top;",100,50,"Module","Module",null,null,"uml static class module component"),
+Sidebar.prototype.addUmlPalette=function(a){var b=this,f=new mxCell("+ field: type",new mxGeometry(0,0,100,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;");f.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;");
+e.vertex=!0;this.setCurrentSearchEntryLibrary("uml");var g=[this.createVertexTemplateEntry("html=1;",110,50,"Object","Object",null,null,"uml static class object instance"),this.createVertexTemplateEntry("html=1;",110,50,"&laquo;interface&raquo;<br><b>Name</b>","Interface",null,null,"uml static class interface object instance annotated annotation"),this.addEntry("uml static class object instance",function(){var d=new mxCell("Classname",new mxGeometry(0,0,160,90),"swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;");
+d.vertex=!0;d.insert(f.clone());d.insert(e.clone());d.insert(b.cloneCell(f,"+ method(type): type"));return b.createVertexTemplateFromCells([d],d.geometry.width,d.geometry.height,"Class")}),this.addEntry("uml static class section subsection",function(){var d=new mxCell("Classname",new mxGeometry(0,0,140,110),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=none;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;");d.vertex=
+!0;d.insert(f.clone());d.insert(f.clone());d.insert(f.clone());return b.createVertexTemplateFromCells([d],d.geometry.width,d.geometry.height,"Class 2")}),this.addEntry("uml static class item member method function variable field attribute label",function(){return b.createVertexTemplateFromCells([b.cloneCell(f,"+ item: attribute")],f.geometry.width,f.geometry.height,"Item 1")}),this.addEntry("uml static class item member method function variable field attribute label",function(){var d=new mxCell("item: attribute",
+new mxGeometry(0,0,120,f.geometry.height),"label;fontStyle=0;strokeColor=none;fillColor=none;align=left;verticalAlign=top;overflow=hidden;spacingLeft=28;spacingRight=4;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;imageWidth=16;imageHeight=16;image="+b.gearImage);d.vertex=!0;return b.createVertexTemplateFromCells([d],d.geometry.width,d.geometry.height,"Item 2")}),this.addEntry("uml static class divider hline line separator",function(){return b.createVertexTemplateFromCells([e.clone()],
+e.geometry.width,e.geometry.height,"Divider")}),this.addEntry("uml static class spacer space gap separator",function(){var d=new mxCell("",new mxGeometry(0,0,20,14),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=4;spacingRight=4;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;");d.vertex=!0;return b.createVertexTemplateFromCells([d.clone()],d.geometry.width,d.geometry.height,"Spacer")}),this.createVertexTemplateEntry("text;align=center;fontStyle=1;verticalAlign=middle;spacingLeft=3;spacingRight=3;strokeColor=none;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;",
+80,26,"Title","Title",null,null,"uml static class title label"),this.addEntry("uml static class component",function(){var d=new mxCell("&laquo;Annotation&raquo;<br/><b>Component</b>",new mxGeometry(0,0,180,90),"html=1;dropTarget=0;");d.vertex=!0;var k=new mxCell("",new mxGeometry(1,0,20,20),"shape=module;jettyWidth=8;jettyHeight=4;");k.vertex=!0;k.geometry.relative=!0;k.geometry.offset=new mxPoint(-27,7);d.insert(k);return b.createVertexTemplateFromCells([d],d.geometry.width,d.geometry.height,"Component")}),
+this.addEntry("uml static class component",function(){var d=new mxCell('<p style="margin:0px;margin-top:6px;text-align:center;"><b>Component</b></p><hr/><p style="margin:0px;margin-left:8px;">+ Attribute1: Type<br/>+ Attribute2: Type</p>',new mxGeometry(0,0,180,90),"align=left;overflow=fill;html=1;dropTarget=0;");d.vertex=!0;var k=new mxCell("",new mxGeometry(1,0,20,20),"shape=component;jettyWidth=8;jettyHeight=4;");k.vertex=!0;k.geometry.relative=!0;k.geometry.offset=new mxPoint(-24,4);d.insert(k);
+return b.createVertexTemplateFromCells([d],d.geometry.width,d.geometry.height,"Component with Attributes")}),this.createVertexTemplateEntry("verticalAlign=top;align=left;spacingTop=8;spacingLeft=2;spacingRight=12;shape=cube;size=10;direction=south;fontStyle=4;html=1;",180,120,"Block","Block",null,null,"uml static class block"),this.createVertexTemplateEntry("shape=module;align=left;spacingLeft=20;align=center;verticalAlign=top;",100,50,"Module","Module",null,null,"uml static class module component"),
this.createVertexTemplateEntry("shape=folder;fontStyle=1;spacingTop=10;tabWidth=40;tabHeight=14;tabPosition=left;html=1;",70,50,"package","Package",null,null,"uml static class package"),this.createVertexTemplateEntry("verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;",160,90,'<p style="margin:0px;margin-top:4px;text-align:center;text-decoration:underline;"><b>Object:Type</b></p><hr/><p style="margin:0px;margin-left:8px;">field1 = value1<br/>field2 = value2<br>field3 = value3</p>',
"Object",null,null,"uml static class object instance"),this.createVertexTemplateEntry("verticalAlign=top;align=left;overflow=fill;html=1;",180,90,'<div style="box-sizing:border-box;width:100%;background:#e4e4e4;padding:2px;">Tablename</div><table style="width:100%;font-size:1em;" cellpadding="2" cellspacing="0"><tr><td>PK</td><td>uniqueId</td></tr><tr><td>FK1</td><td>foreignKey</td></tr><tr><td></td><td>fieldname</td></tr></table>',"Entity",null,null,"er entity table"),this.addEntry("uml static class object instance",
-function(){var e=new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;"><b>Class</b></p><hr size="1"/><div style="height:2px;"></div>',new mxGeometry(0,0,140,60),"verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;");e.vertex=!0;return b.createVertexTemplateFromCells([e.clone()],e.geometry.width,e.geometry.height,"Class 3")}),this.addEntry("uml static class object instance",function(){var e=new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;"><b>Class</b></p><hr size="1"/><div style="height:2px;"></div><hr size="1"/><div style="height:2px;"></div>',
-new mxGeometry(0,0,140,60),"verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;");e.vertex=!0;return b.createVertexTemplateFromCells([e.clone()],e.geometry.width,e.geometry.height,"Class 4")}),this.addEntry("uml static class object instance",function(){var e=new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;"><b>Class</b></p><hr size="1"/><p style="margin:0px;margin-left:4px;">+ field: Type</p><hr size="1"/><p style="margin:0px;margin-left:4px;">+ method(): Type</p>',
-new mxGeometry(0,0,160,90),"verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;");e.vertex=!0;return b.createVertexTemplateFromCells([e.clone()],e.geometry.width,e.geometry.height,"Class 5")}),this.addEntry("uml static class object instance",function(){var e=new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;"><i>&lt;&lt;Interface&gt;&gt;</i><br/><b>Interface</b></p><hr size="1"/><p style="margin:0px;margin-left:4px;">+ field1: Type<br/>+ field2: Type</p><hr size="1"/><p style="margin:0px;margin-left:4px;">+ method1(Type): Type<br/>+ method2(Type, Type): Type</p>',
-new mxGeometry(0,0,190,140),"verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;");e.vertex=!0;return b.createVertexTemplateFromCells([e.clone()],e.geometry.width,e.geometry.height,"Interface 2")}),this.createVertexTemplateEntry("shape=providedRequiredInterface;html=1;verticalLabelPosition=bottom;sketch=0;",20,20,"","Provided/Required Interface",null,null,"uml provided required interface lollipop notation"),this.createVertexTemplateEntry("shape=requiredInterface;html=1;verticalLabelPosition=bottom;sketch=0;",
+function(){var d=new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;"><b>Class</b></p><hr size="1"/><div style="height:2px;"></div>',new mxGeometry(0,0,140,60),"verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;");d.vertex=!0;return b.createVertexTemplateFromCells([d.clone()],d.geometry.width,d.geometry.height,"Class 3")}),this.addEntry("uml static class object instance",function(){var d=new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;"><b>Class</b></p><hr size="1"/><div style="height:2px;"></div><hr size="1"/><div style="height:2px;"></div>',
+new mxGeometry(0,0,140,60),"verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;");d.vertex=!0;return b.createVertexTemplateFromCells([d.clone()],d.geometry.width,d.geometry.height,"Class 4")}),this.addEntry("uml static class object instance",function(){var d=new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;"><b>Class</b></p><hr size="1"/><p style="margin:0px;margin-left:4px;">+ field: Type</p><hr size="1"/><p style="margin:0px;margin-left:4px;">+ method(): Type</p>',
+new mxGeometry(0,0,160,90),"verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;");d.vertex=!0;return b.createVertexTemplateFromCells([d.clone()],d.geometry.width,d.geometry.height,"Class 5")}),this.addEntry("uml static class object instance",function(){var d=new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;"><i>&lt;&lt;Interface&gt;&gt;</i><br/><b>Interface</b></p><hr size="1"/><p style="margin:0px;margin-left:4px;">+ field1: Type<br/>+ field2: Type</p><hr size="1"/><p style="margin:0px;margin-left:4px;">+ method1(Type): Type<br/>+ method2(Type, Type): Type</p>',
+new mxGeometry(0,0,190,140),"verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;");d.vertex=!0;return b.createVertexTemplateFromCells([d.clone()],d.geometry.width,d.geometry.height,"Interface 2")}),this.createVertexTemplateEntry("shape=providedRequiredInterface;html=1;verticalLabelPosition=bottom;sketch=0;",20,20,"","Provided/Required Interface",null,null,"uml provided required interface lollipop notation"),this.createVertexTemplateEntry("shape=requiredInterface;html=1;verticalLabelPosition=bottom;sketch=0;",
10,20,"","Required Interface",null,null,"uml required interface lollipop notation"),this.addEntry("uml lollipop notation provided required interface",function(){return b.createVertexTemplateFromData("zVRNT8MwDP01uaLSMu6sfFxAmrQDcAytaQJZXLnu2u7XkzQZXTUmuIA4VIqf/ZzkvdQiyzf9HclaPWAJRmQ3IssJkcNq0+dgjEgTXYrsWqRp4j6R3p7Ino/ZpJYEln9CSANhK00LAQlAw4OJAGFrS/D1iciWSKywQivNPWLtwHMHvgHzsNY7z5Ato4MUb0zMgi2viLBzoUULAbnVxsSWzTtwofYBtlTACkhvgIHWtSy0rWKSJVXAJ5Lh4FBWMNMicAJ0cSzPWBW1uQN0fWlwJQRGst7OW8kmhNVn3Sd1hdp1TJMhVCzmhHipUDO54RYHm07Q6NHXfmV/65eS5jXXVJhj15yCNDz54GyxD58PwjL2v/SmMuE7POqSVdxj5vm/cK6PG4X/5deNvPjeSEfQdeOV75Rm8K/dZzo3LOaGSaMr69aF0wbIA00NhZfpVff+JSwJGr2TL2Nnr3jtbzDeabEUi2v/Tlo22kKO1gbq0Z8ZDwzE0J+cNidM2ROinF18CR6KeivQleI59pVrM8knfV04Dc1gx+FM/QA=",
40,10,"Lollipop Notation")}),this.createVertexTemplateEntry("shape=umlBoundary;whiteSpace=wrap;html=1;",100,80,"Boundary Object","Boundary Object",null,null,"uml boundary object"),this.createVertexTemplateEntry("ellipse;shape=umlEntity;whiteSpace=wrap;html=1;",80,80,"Entity Object","Entity Object",null,null,"uml entity object"),this.createVertexTemplateEntry("ellipse;shape=umlControl;whiteSpace=wrap;html=1;",70,80,"Control Object","Control Object",null,null,"uml control object"),this.createVertexTemplateEntry("shape=umlActor;verticalLabelPosition=bottom;verticalAlign=top;html=1;",
-30,60,"Actor","Actor",!1,null,"uml actor"),this.createVertexTemplateEntry("ellipse;whiteSpace=wrap;html=1;",140,70,"Use Case","Use Case",null,null,"uml use case usecase"),this.addEntry("uml activity state start",function(){var e=new mxCell("",new mxGeometry(0,0,30,30),"ellipse;html=1;shape=startState;fillColor=#000000;strokeColor=#ff0000;");e.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");
-k.geometry.setTerminalPoint(new mxPoint(15,90),!1);k.geometry.relative=!0;k.edge=!0;e.insertEdge(k,!0);return b.createVertexTemplateFromCells([e,k],30,90,"Start")}),this.addEntry("uml activity state",function(){var e=new mxCell("Activity",new mxGeometry(0,0,120,40),"rounded=1;whiteSpace=wrap;html=1;arcSize=40;fontColor=#000000;fillColor=#ffffc0;strokeColor=#ff0000;");e.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");
-k.geometry.setTerminalPoint(new mxPoint(60,100),!1);k.geometry.relative=!0;k.edge=!0;e.insertEdge(k,!0);return b.createVertexTemplateFromCells([e,k],120,100,"Activity")}),this.addEntry("uml activity composite state",function(){var e=new mxCell("Composite State",new mxGeometry(0,0,160,60),"swimlane;fontStyle=1;align=center;verticalAlign=middle;childLayout=stackLayout;horizontal=1;startSize=30;horizontalStack=0;resizeParent=0;resizeLast=1;container=0;fontColor=#000000;collapsible=0;rounded=1;arcSize=30;strokeColor=#ff0000;fillColor=#ffffc0;swimlaneFillColor=#ffffc0;dropTarget=0;");
-e.vertex=!0;var k=new mxCell("Subtitle",new mxGeometry(0,0,200,26),"text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;spacingLeft=4;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;fontColor=#000000;");k.vertex=!0;e.insert(k);k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");k.geometry.setTerminalPoint(new mxPoint(80,120),!1);k.geometry.relative=!0;k.edge=!0;e.insertEdge(k,
-!0);return b.createVertexTemplateFromCells([e,k],160,120,"Composite State")}),this.addEntry("uml activity condition",function(){var e=new mxCell("Condition",new mxGeometry(0,0,80,40),"rhombus;whiteSpace=wrap;html=1;fillColor=#ffffc0;strokeColor=#ff0000;");e.vertex=!0;var k=new mxCell("no",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;align=left;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");k.geometry.setTerminalPoint(new mxPoint(180,20),!1);k.geometry.relative=
-!0;k.geometry.x=-1;k.edge=!0;e.insertEdge(k,!0);var n=new mxCell("yes",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;align=left;verticalAlign=top;endArrow=open;endSize=8;strokeColor=#ff0000;");n.geometry.setTerminalPoint(new mxPoint(40,100),!1);n.geometry.relative=!0;n.geometry.x=-1;n.edge=!0;e.insertEdge(n,!0);return b.createVertexTemplateFromCells([e,k,n],180,100,"Condition")}),this.addEntry("uml activity fork join",function(){var e=new mxCell("",new mxGeometry(0,0,200,10),"shape=line;html=1;strokeWidth=6;strokeColor=#ff0000;");
-e.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");k.geometry.setTerminalPoint(new mxPoint(100,80),!1);k.geometry.relative=!0;k.edge=!0;e.insertEdge(k,!0);return b.createVertexTemplateFromCells([e,k],200,80,"Fork/Join")}),this.createVertexTemplateEntry("ellipse;html=1;shape=endState;fillColor=#000000;strokeColor=#ff0000;",30,30,"","End",null,null,"uml activity state end"),this.createVertexTemplateEntry("shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=1;collapsible=0;recursiveResize=0;outlineConnect=0;",
+30,60,"Actor","Actor",!1,null,"uml actor"),this.createVertexTemplateEntry("ellipse;whiteSpace=wrap;html=1;",140,70,"Use Case","Use Case",null,null,"uml use case usecase"),this.addEntry("uml activity state start",function(){var d=new mxCell("",new mxGeometry(0,0,30,30),"ellipse;html=1;shape=startState;fillColor=#000000;strokeColor=#ff0000;");d.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");
+k.geometry.setTerminalPoint(new mxPoint(15,90),!1);k.geometry.relative=!0;k.edge=!0;d.insertEdge(k,!0);return b.createVertexTemplateFromCells([d,k],30,90,"Start")}),this.addEntry("uml activity state",function(){var d=new mxCell("Activity",new mxGeometry(0,0,120,40),"rounded=1;whiteSpace=wrap;html=1;arcSize=40;fontColor=#000000;fillColor=#ffffc0;strokeColor=#ff0000;");d.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");
+k.geometry.setTerminalPoint(new mxPoint(60,100),!1);k.geometry.relative=!0;k.edge=!0;d.insertEdge(k,!0);return b.createVertexTemplateFromCells([d,k],120,100,"Activity")}),this.addEntry("uml activity composite state",function(){var d=new mxCell("Composite State",new mxGeometry(0,0,160,60),"swimlane;fontStyle=1;align=center;verticalAlign=middle;childLayout=stackLayout;horizontal=1;startSize=30;horizontalStack=0;resizeParent=0;resizeLast=1;container=0;fontColor=#000000;collapsible=0;rounded=1;arcSize=30;strokeColor=#ff0000;fillColor=#ffffc0;swimlaneFillColor=#ffffc0;dropTarget=0;");
+d.vertex=!0;var k=new mxCell("Subtitle",new mxGeometry(0,0,200,26),"text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;spacingLeft=4;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;fontColor=#000000;");k.vertex=!0;d.insert(k);k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");k.geometry.setTerminalPoint(new mxPoint(80,120),!1);k.geometry.relative=!0;k.edge=!0;d.insertEdge(k,
+!0);return b.createVertexTemplateFromCells([d,k],160,120,"Composite State")}),this.addEntry("uml activity condition",function(){var d=new mxCell("Condition",new mxGeometry(0,0,80,40),"rhombus;whiteSpace=wrap;html=1;fillColor=#ffffc0;strokeColor=#ff0000;");d.vertex=!0;var k=new mxCell("no",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;align=left;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");k.geometry.setTerminalPoint(new mxPoint(180,20),!1);k.geometry.relative=
+!0;k.geometry.x=-1;k.edge=!0;d.insertEdge(k,!0);var n=new mxCell("yes",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;align=left;verticalAlign=top;endArrow=open;endSize=8;strokeColor=#ff0000;");n.geometry.setTerminalPoint(new mxPoint(40,100),!1);n.geometry.relative=!0;n.geometry.x=-1;n.edge=!0;d.insertEdge(n,!0);return b.createVertexTemplateFromCells([d,k,n],180,100,"Condition")}),this.addEntry("uml activity fork join",function(){var d=new mxCell("",new mxGeometry(0,0,200,10),"shape=line;html=1;strokeWidth=6;strokeColor=#ff0000;");
+d.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");k.geometry.setTerminalPoint(new mxPoint(100,80),!1);k.geometry.relative=!0;k.edge=!0;d.insertEdge(k,!0);return b.createVertexTemplateFromCells([d,k],200,80,"Fork/Join")}),this.createVertexTemplateEntry("ellipse;html=1;shape=endState;fillColor=#000000;strokeColor=#ff0000;",30,30,"","End",null,null,"uml activity state end"),this.createVertexTemplateEntry("shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=1;collapsible=0;recursiveResize=0;outlineConnect=0;",
100,300,":Object","Lifeline",null,null,"uml sequence participant lifeline"),this.createVertexTemplateEntry("shape=umlLifeline;participant=umlActor;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=1;collapsible=0;recursiveResize=0;verticalAlign=top;spacingTop=36;outlineConnect=0;",20,300,"","Actor Lifeline",null,null,"uml sequence participant lifeline actor"),this.createVertexTemplateEntry("shape=umlLifeline;participant=umlBoundary;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=1;collapsible=0;recursiveResize=0;verticalAlign=top;spacingTop=36;outlineConnect=0;",
50,300,"","Boundary Lifeline",null,null,"uml sequence participant lifeline boundary"),this.createVertexTemplateEntry("shape=umlLifeline;participant=umlEntity;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=1;collapsible=0;recursiveResize=0;verticalAlign=top;spacingTop=36;outlineConnect=0;",40,300,"","Entity Lifeline",null,null,"uml sequence participant lifeline entity"),this.createVertexTemplateEntry("shape=umlLifeline;participant=umlControl;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=1;collapsible=0;recursiveResize=0;verticalAlign=top;spacingTop=36;outlineConnect=0;",
-40,300,"","Control Lifeline",null,null,"uml sequence participant lifeline control"),this.createVertexTemplateEntry("shape=umlFrame;whiteSpace=wrap;html=1;",300,200,"frame","Frame",null,null,"uml sequence frame"),this.createVertexTemplateEntry("shape=umlDestroy;whiteSpace=wrap;html=1;strokeWidth=3;",30,30,"","Destruction",null,null,"uml sequence destruction destroy"),this.addEntry("uml sequence invoke invocation call activation",function(){var e=new mxCell("",new mxGeometry(0,0,10,80),"html=1;points=[];perimeter=orthogonalPerimeter;");
-e.vertex=!0;var k=new mxCell("dispatch",new mxGeometry(0,0,0,0),"html=1;verticalAlign=bottom;startArrow=oval;endArrow=block;startSize=8;");k.geometry.setTerminalPoint(new mxPoint(-60,0),!0);k.geometry.relative=!0;k.edge=!0;e.insertEdge(k,!1);return b.createVertexTemplateFromCells([e,k],10,80,"Found Message")}),this.addEntry("uml sequence invoke call delegation synchronous invocation activation",function(){var e=new mxCell("",new mxGeometry(0,0,10,80),"html=1;points=[];perimeter=orthogonalPerimeter;");
-e.vertex=!0;var k=new mxCell("dispatch",new mxGeometry(0,0,0,0),"html=1;verticalAlign=bottom;endArrow=block;entryX=0;entryY=0;");k.geometry.setTerminalPoint(new mxPoint(-70,0),!0);k.geometry.relative=!0;k.edge=!0;e.insertEdge(k,!1);var n=new mxCell("return",new mxGeometry(0,0,0,0),"html=1;verticalAlign=bottom;endArrow=open;dashed=1;endSize=8;exitX=0;exitY=0.95;");n.geometry.setTerminalPoint(new mxPoint(-70,76),!1);n.geometry.relative=!0;n.edge=!0;e.insertEdge(n,!0);return b.createVertexTemplateFromCells([e,
-k,n],10,80,"Synchronous Invocation")}),this.addEntry("uml sequence self call recursion delegation activation",function(){var e=new mxCell("",new mxGeometry(-5,20,10,40),"html=1;points=[];perimeter=orthogonalPerimeter;");e.vertex=!0;var k=new mxCell("self call",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;align=left;spacingLeft=2;endArrow=block;rounded=0;entryX=1;entryY=0;");k.geometry.setTerminalPoint(new mxPoint(0,0),!0);k.geometry.points=[new mxPoint(30,0)];k.geometry.relative=
-!0;k.edge=!0;e.insertEdge(k,!1);return b.createVertexTemplateFromCells([e,k],10,60,"Self Call")}),this.addEntry("uml sequence invoke call delegation callback activation",function(){return b.createVertexTemplateFromData("xZRNT8MwDIZ/Ta6oaymD47rBTkiTuMAxW6wmIm0q19s6fj1OE3V0Y2iCA4dK8euP2I+riGxedUuUjX52CqzIHkU2R+conKpuDtaKNDFKZAuRpgl/In264J303qSRCDVdk5CGhJ20WwhKEFo62ChoqritxURkReNMTa2X80LkC68AmgoIkEWHpF3pamlXR7WIFwASdBeb7KXY4RIc5+KBQ/ZGkY4RYY5Egyl1zLqLmmyDXQ6Zx4n5EIf+HkB2BmAjrV3LzftPIPw4hgNn1pQ1a2tH5Cp2QK1miG7vNeu4iJe4pdeY2BtvbCQDGlAljMCQxBJotJ8rWCFYSWY3LvUdmZi68rvkkLiU6QnL1m1xAzHoBOdw61WEb88II9AW67/ydQ2wq1Cy1aAGvOrFfPh6997qDA3g+dxzv3nIL6MPU/8T+kMw8+m4QPgdfrEJNo8PSQj/+s58Ag==",
+40,300,"","Control Lifeline",null,null,"uml sequence participant lifeline control"),this.createVertexTemplateEntry("shape=umlFrame;whiteSpace=wrap;html=1;",300,200,"frame","Frame",null,null,"uml sequence frame"),this.createVertexTemplateEntry("shape=umlDestroy;whiteSpace=wrap;html=1;strokeWidth=3;",30,30,"","Destruction",null,null,"uml sequence destruction destroy"),this.addEntry("uml sequence invoke invocation call activation",function(){var d=new mxCell("",new mxGeometry(0,0,10,80),"html=1;points=[];perimeter=orthogonalPerimeter;");
+d.vertex=!0;var k=new mxCell("dispatch",new mxGeometry(0,0,0,0),"html=1;verticalAlign=bottom;startArrow=oval;endArrow=block;startSize=8;");k.geometry.setTerminalPoint(new mxPoint(-60,0),!0);k.geometry.relative=!0;k.edge=!0;d.insertEdge(k,!1);return b.createVertexTemplateFromCells([d,k],10,80,"Found Message")}),this.addEntry("uml sequence invoke call delegation synchronous invocation activation",function(){var d=new mxCell("",new mxGeometry(0,0,10,80),"html=1;points=[];perimeter=orthogonalPerimeter;");
+d.vertex=!0;var k=new mxCell("dispatch",new mxGeometry(0,0,0,0),"html=1;verticalAlign=bottom;endArrow=block;entryX=0;entryY=0;");k.geometry.setTerminalPoint(new mxPoint(-70,0),!0);k.geometry.relative=!0;k.edge=!0;d.insertEdge(k,!1);var n=new mxCell("return",new mxGeometry(0,0,0,0),"html=1;verticalAlign=bottom;endArrow=open;dashed=1;endSize=8;exitX=0;exitY=0.95;");n.geometry.setTerminalPoint(new mxPoint(-70,76),!1);n.geometry.relative=!0;n.edge=!0;d.insertEdge(n,!0);return b.createVertexTemplateFromCells([d,
+k,n],10,80,"Synchronous Invocation")}),this.addEntry("uml sequence self call recursion delegation activation",function(){var d=new mxCell("",new mxGeometry(-5,20,10,40),"html=1;points=[];perimeter=orthogonalPerimeter;");d.vertex=!0;var k=new mxCell("self call",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;align=left;spacingLeft=2;endArrow=block;rounded=0;entryX=1;entryY=0;");k.geometry.setTerminalPoint(new mxPoint(0,0),!0);k.geometry.points=[new mxPoint(30,0)];k.geometry.relative=
+!0;k.edge=!0;d.insertEdge(k,!1);return b.createVertexTemplateFromCells([d,k],10,60,"Self Call")}),this.addEntry("uml sequence invoke call delegation callback activation",function(){return b.createVertexTemplateFromData("xZRNT8MwDIZ/Ta6oaymD47rBTkiTuMAxW6wmIm0q19s6fj1OE3V0Y2iCA4dK8euP2I+riGxedUuUjX52CqzIHkU2R+conKpuDtaKNDFKZAuRpgl/In264J303qSRCDVdk5CGhJ20WwhKEFo62ChoqritxURkReNMTa2X80LkC68AmgoIkEWHpF3pamlXR7WIFwASdBeb7KXY4RIc5+KBQ/ZGkY4RYY5Egyl1zLqLmmyDXQ6Zx4n5EIf+HkB2BmAjrV3LzftPIPw4hgNn1pQ1a2tH5Cp2QK1miG7vNeu4iJe4pdeY2BtvbCQDGlAljMCQxBJotJ8rWCFYSWY3LvUdmZi68rvkkLiU6QnL1m1xAzHoBOdw61WEb88II9AW67/ydQ2wq1Cy1aAGvOrFfPh6997qDA3g+dxzv3nIL6MPU/8T+kMw8+m4QPgdfrEJNo8PSQj/+s58Ag==",
10,60,"Callback")}),this.createVertexTemplateEntry("html=1;points=[];perimeter=orthogonalPerimeter;",10,80,"","Activation",null,null,"uml sequence activation"),this.createEdgeTemplateEntry("html=1;verticalAlign=bottom;startArrow=oval;startFill=1;endArrow=block;startSize=8;",60,0,"dispatch","Found Message 1",null,"uml sequence message call invoke dispatch"),this.createEdgeTemplateEntry("html=1;verticalAlign=bottom;startArrow=circle;startFill=1;endArrow=open;startSize=6;endSize=8;",80,0,"dispatch",
-"Found Message 2",null,"uml sequence message call invoke dispatch"),this.createEdgeTemplateEntry("html=1;verticalAlign=bottom;endArrow=block;",80,0,"dispatch","Message",null,"uml sequence message call invoke dispatch"),this.addEntry("uml sequence return message",function(){var e=new mxCell("return",new mxGeometry(0,0,0,0),"html=1;verticalAlign=bottom;endArrow=open;dashed=1;endSize=8;");e.geometry.setTerminalPoint(new mxPoint(80,0),!0);e.geometry.setTerminalPoint(new mxPoint(0,0),!1);e.geometry.relative=
-!0;e.edge=!0;return b.createEdgeTemplateFromCells([e],80,0,"Return")}),this.addEntry("uml relation",function(){var e=new mxCell("name",new mxGeometry(0,0,0,0),"endArrow=block;endFill=1;html=1;edgeStyle=orthogonalEdgeStyle;align=left;verticalAlign=top;");e.geometry.setTerminalPoint(new mxPoint(0,0),!0);e.geometry.setTerminalPoint(new mxPoint(160,0),!1);e.geometry.relative=!0;e.geometry.x=-1;e.edge=!0;var k=new mxCell("1",new mxGeometry(-1,0,0,0),"edgeLabel;resizable=0;html=1;align=left;verticalAlign=bottom;");
-k.geometry.relative=!0;k.setConnectable(!1);k.vertex=!0;e.insert(k);return b.createEdgeTemplateFromCells([e],160,0,"Relation 1")}),this.addEntry("uml association",function(){var e=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;html=1;edgeStyle=orthogonalEdgeStyle;");e.geometry.setTerminalPoint(new mxPoint(0,0),!0);e.geometry.setTerminalPoint(new mxPoint(160,0),!1);e.geometry.relative=!0;e.edge=!0;var k=new mxCell("parent",new mxGeometry(-1,0,0,0),"edgeLabel;resizable=0;html=1;align=left;verticalAlign=bottom;");
-k.geometry.relative=!0;k.setConnectable(!1);k.vertex=!0;e.insert(k);k=new mxCell("child",new mxGeometry(1,0,0,0),"edgeLabel;resizable=0;html=1;align=right;verticalAlign=bottom;");k.geometry.relative=!0;k.setConnectable(!1);k.vertex=!0;e.insert(k);return b.createEdgeTemplateFromCells([e],160,0,"Association 1")}),this.addEntry("uml aggregation",function(){var e=new mxCell("1",new mxGeometry(0,0,0,0),"endArrow=open;html=1;endSize=12;startArrow=diamondThin;startSize=14;startFill=0;edgeStyle=orthogonalEdgeStyle;align=left;verticalAlign=bottom;");
-e.geometry.setTerminalPoint(new mxPoint(0,0),!0);e.geometry.setTerminalPoint(new mxPoint(160,0),!1);e.geometry.relative=!0;e.geometry.x=-1;e.geometry.y=3;e.edge=!0;return b.createEdgeTemplateFromCells([e],160,0,"Aggregation 1")}),this.addEntry("uml composition",function(){var e=new mxCell("1",new mxGeometry(0,0,0,0),"endArrow=open;html=1;endSize=12;startArrow=diamondThin;startSize=14;startFill=1;edgeStyle=orthogonalEdgeStyle;align=left;verticalAlign=bottom;");e.geometry.setTerminalPoint(new mxPoint(0,
-0),!0);e.geometry.setTerminalPoint(new mxPoint(160,0),!1);e.geometry.relative=!0;e.geometry.x=-1;e.geometry.y=3;e.edge=!0;return b.createEdgeTemplateFromCells([e],160,0,"Composition 1")}),this.addEntry("uml relation",function(){var e=new mxCell("Relation",new mxGeometry(0,0,0,0),"endArrow=open;html=1;endSize=12;startArrow=diamondThin;startSize=14;startFill=0;edgeStyle=orthogonalEdgeStyle;");e.geometry.setTerminalPoint(new mxPoint(0,0),!0);e.geometry.setTerminalPoint(new mxPoint(160,0),!1);e.geometry.relative=
-!0;e.edge=!0;var k=new mxCell("0..n",new mxGeometry(-1,0,0,0),"edgeLabel;resizable=0;html=1;align=left;verticalAlign=top;");k.geometry.relative=!0;k.setConnectable(!1);k.vertex=!0;e.insert(k);k=new mxCell("1",new mxGeometry(1,0,0,0),"edgeLabel;resizable=0;html=1;align=right;verticalAlign=top;");k.geometry.relative=!0;k.setConnectable(!1);k.vertex=!0;e.insert(k);return b.createEdgeTemplateFromCells([e],160,0,"Relation 2")}),this.createEdgeTemplateEntry("endArrow=open;endSize=12;dashed=1;html=1;",160,
+"Found Message 2",null,"uml sequence message call invoke dispatch"),this.createEdgeTemplateEntry("html=1;verticalAlign=bottom;endArrow=block;",80,0,"dispatch","Message",null,"uml sequence message call invoke dispatch"),this.addEntry("uml sequence return message",function(){var d=new mxCell("return",new mxGeometry(0,0,0,0),"html=1;verticalAlign=bottom;endArrow=open;dashed=1;endSize=8;");d.geometry.setTerminalPoint(new mxPoint(80,0),!0);d.geometry.setTerminalPoint(new mxPoint(0,0),!1);d.geometry.relative=
+!0;d.edge=!0;return b.createEdgeTemplateFromCells([d],80,0,"Return")}),this.addEntry("uml relation",function(){var d=new mxCell("name",new mxGeometry(0,0,0,0),"endArrow=block;endFill=1;html=1;edgeStyle=orthogonalEdgeStyle;align=left;verticalAlign=top;");d.geometry.setTerminalPoint(new mxPoint(0,0),!0);d.geometry.setTerminalPoint(new mxPoint(160,0),!1);d.geometry.relative=!0;d.geometry.x=-1;d.edge=!0;var k=new mxCell("1",new mxGeometry(-1,0,0,0),"edgeLabel;resizable=0;html=1;align=left;verticalAlign=bottom;");
+k.geometry.relative=!0;k.setConnectable(!1);k.vertex=!0;d.insert(k);return b.createEdgeTemplateFromCells([d],160,0,"Relation 1")}),this.addEntry("uml association",function(){var d=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;html=1;edgeStyle=orthogonalEdgeStyle;");d.geometry.setTerminalPoint(new mxPoint(0,0),!0);d.geometry.setTerminalPoint(new mxPoint(160,0),!1);d.geometry.relative=!0;d.edge=!0;var k=new mxCell("parent",new mxGeometry(-1,0,0,0),"edgeLabel;resizable=0;html=1;align=left;verticalAlign=bottom;");
+k.geometry.relative=!0;k.setConnectable(!1);k.vertex=!0;d.insert(k);k=new mxCell("child",new mxGeometry(1,0,0,0),"edgeLabel;resizable=0;html=1;align=right;verticalAlign=bottom;");k.geometry.relative=!0;k.setConnectable(!1);k.vertex=!0;d.insert(k);return b.createEdgeTemplateFromCells([d],160,0,"Association 1")}),this.addEntry("uml aggregation",function(){var d=new mxCell("1",new mxGeometry(0,0,0,0),"endArrow=open;html=1;endSize=12;startArrow=diamondThin;startSize=14;startFill=0;edgeStyle=orthogonalEdgeStyle;align=left;verticalAlign=bottom;");
+d.geometry.setTerminalPoint(new mxPoint(0,0),!0);d.geometry.setTerminalPoint(new mxPoint(160,0),!1);d.geometry.relative=!0;d.geometry.x=-1;d.geometry.y=3;d.edge=!0;return b.createEdgeTemplateFromCells([d],160,0,"Aggregation 1")}),this.addEntry("uml composition",function(){var d=new mxCell("1",new mxGeometry(0,0,0,0),"endArrow=open;html=1;endSize=12;startArrow=diamondThin;startSize=14;startFill=1;edgeStyle=orthogonalEdgeStyle;align=left;verticalAlign=bottom;");d.geometry.setTerminalPoint(new mxPoint(0,
+0),!0);d.geometry.setTerminalPoint(new mxPoint(160,0),!1);d.geometry.relative=!0;d.geometry.x=-1;d.geometry.y=3;d.edge=!0;return b.createEdgeTemplateFromCells([d],160,0,"Composition 1")}),this.addEntry("uml relation",function(){var d=new mxCell("Relation",new mxGeometry(0,0,0,0),"endArrow=open;html=1;endSize=12;startArrow=diamondThin;startSize=14;startFill=0;edgeStyle=orthogonalEdgeStyle;");d.geometry.setTerminalPoint(new mxPoint(0,0),!0);d.geometry.setTerminalPoint(new mxPoint(160,0),!1);d.geometry.relative=
+!0;d.edge=!0;var k=new mxCell("0..n",new mxGeometry(-1,0,0,0),"edgeLabel;resizable=0;html=1;align=left;verticalAlign=top;");k.geometry.relative=!0;k.setConnectable(!1);k.vertex=!0;d.insert(k);k=new mxCell("1",new mxGeometry(1,0,0,0),"edgeLabel;resizable=0;html=1;align=right;verticalAlign=top;");k.geometry.relative=!0;k.setConnectable(!1);k.vertex=!0;d.insert(k);return b.createEdgeTemplateFromCells([d],160,0,"Relation 2")}),this.createEdgeTemplateEntry("endArrow=open;endSize=12;dashed=1;html=1;",160,
0,"Use","Dependency",null,"uml dependency use"),this.createEdgeTemplateEntry("endArrow=block;endSize=16;endFill=0;html=1;",160,0,"Extends","Generalization",null,"uml generalization extend"),this.createEdgeTemplateEntry("endArrow=block;startArrow=block;endFill=1;startFill=1;html=1;",160,0,"","Association 2",null,"uml association"),this.createEdgeTemplateEntry("endArrow=open;startArrow=circlePlus;endFill=0;startFill=0;endSize=8;html=1;",160,0,"","Inner Class",null,"uml inner class"),this.createEdgeTemplateEntry("endArrow=open;startArrow=cross;endFill=0;startFill=0;endSize=8;startSize=10;html=1;",
160,0,"","Terminate",null,"uml terminate"),this.createEdgeTemplateEntry("endArrow=block;dashed=1;endFill=0;endSize=12;html=1;",160,0,"","Implementation",null,"uml realization implementation"),this.createEdgeTemplateEntry("endArrow=diamondThin;endFill=0;endSize=24;html=1;",160,0,"","Aggregation 2",null,"uml aggregation"),this.createEdgeTemplateEntry("endArrow=diamondThin;endFill=1;endSize=24;html=1;",160,0,"","Composition 2",null,"uml composition"),this.createEdgeTemplateEntry("endArrow=open;endFill=1;endSize=12;html=1;",
160,0,"","Association 3",null,"uml association")];this.addPaletteFunctions("uml",mxResources.get("uml"),a||!1,g);this.setCurrentSearchEntryLibrary()};Sidebar.prototype.createTitle=function(a){var b=document.createElement("a");b.setAttribute("title",mxResources.get("sidebarTooltip"));b.className="geTitle";mxUtils.write(b,a);return b};
-Sidebar.prototype.createThumb=function(a,b,f,d,g,e,k){this.graph.labelsVisible=null==e||e;e=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;this.graph.view.scaleAndTranslate(1,0,0);this.graph.addCells(a);a=this.graph.getGraphBounds();var n=Math.floor(100*Math.min((b-2*this.thumbBorder)/a.width,(f-2*this.thumbBorder)/a.height))/100;this.graph.view.scaleAndTranslate(n,Math.floor((b-a.width*n)/2/n-a.x),Math.floor((f-a.height*n)/2/n-a.y));this.graph.dialect!=mxConstants.DIALECT_SVG||
-mxClient.NO_FO||null==this.graph.view.getCanvas().ownerSVGElement?(n=this.graph.container.cloneNode(!1),n.innerHTML=this.graph.container.innerHTML):n=this.graph.view.getCanvas().ownerSVGElement.cloneNode(!0);this.graph.getModel().clear();mxClient.NO_FO=e;n.style.position="relative";n.style.overflow="hidden";n.style.left=this.thumbBorder+"px";n.style.top=this.thumbBorder+"px";n.style.width=b+"px";n.style.height=f+"px";n.style.visibility="";n.style.minWidth="";n.style.minHeight="";d.appendChild(n);
-this.sidebarTitles&&null!=g&&0!=k&&(d.style.height=this.thumbHeight+0+this.sidebarTitleSize+8+"px",b=document.createElement("div"),b.style.color=Editor.isDarkMode()?"#A0A0A0":"#303030",b.style.fontSize=this.sidebarTitleSize+"px",b.style.textAlign="center",b.style.whiteSpace="nowrap",b.style.overflow="hidden",b.style.textOverflow="ellipsis",mxClient.IS_IE&&(b.style.height=this.sidebarTitleSize+12+"px"),b.style.paddingTop="4px",mxUtils.write(b,g),d.appendChild(b));return a};
+Sidebar.prototype.createThumb=function(a,b,f,e,g,d,k){this.graph.labelsVisible=null==d||d;d=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;this.graph.view.scaleAndTranslate(1,0,0);this.graph.addCells(a);a=this.graph.getGraphBounds();var n=Math.floor(100*Math.min((b-2*this.thumbBorder)/a.width,(f-2*this.thumbBorder)/a.height))/100;this.graph.view.scaleAndTranslate(n,Math.floor((b-a.width*n)/2/n-a.x),Math.floor((f-a.height*n)/2/n-a.y));this.graph.dialect!=mxConstants.DIALECT_SVG||
+mxClient.NO_FO||null==this.graph.view.getCanvas().ownerSVGElement?(n=this.graph.container.cloneNode(!1),n.innerHTML=this.graph.container.innerHTML):n=this.graph.view.getCanvas().ownerSVGElement.cloneNode(!0);this.graph.getModel().clear();mxClient.NO_FO=d;n.style.position="relative";n.style.overflow="hidden";n.style.left=this.thumbBorder+"px";n.style.top=this.thumbBorder+"px";n.style.width=b+"px";n.style.height=f+"px";n.style.visibility="";n.style.minWidth="";n.style.minHeight="";e.appendChild(n);
+this.sidebarTitles&&null!=g&&0!=k&&(e.style.height=this.thumbHeight+0+this.sidebarTitleSize+8+"px",b=document.createElement("div"),b.style.color=Editor.isDarkMode()?"#A0A0A0":"#303030",b.style.fontSize=this.sidebarTitleSize+"px",b.style.textAlign="center",b.style.whiteSpace="nowrap",b.style.overflow="hidden",b.style.textOverflow="ellipsis",mxClient.IS_IE&&(b.style.height=this.sidebarTitleSize+12+"px"),b.style.paddingTop="4px",mxUtils.write(b,g),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,f,d,g,e,k,n){n=null!=n?n:!0;var u=document.createElement("a");u.className="geItem";u.style.overflow="hidden";var m=2*this.thumbBorder;u.style.width=this.thumbWidth+m+"px";u.style.height=this.thumbHeight+m+"px";u.style.padding=this.thumbPadding+"px";mxEvent.addListener(u,"click",function(x){mxEvent.consume(x)});m=a;a=this.graph.cloneCells(a);this.editorUi.insertHandler(m,null,this.graph.model,this.editorUi.editor.graph.defaultVertexStyle,this.editorUi.editor.graph.defaultEdgeStyle,
-!0,!0);this.createThumb(m,this.thumbWidth,this.thumbHeight,u,b,f,d,g,e);var r=new mxRectangle(0,0,g,e);1<a.length||a[0].vertex?(d=this.createDragSource(u,this.createDropHandler(a,!0,k,r),this.createDragPreview(g,e),a,r),this.addClickHandler(u,d,a),d.isGuidesEnabled=mxUtils.bind(this,function(){return this.editorUi.editor.graph.graphHandler.guidesEnabled})):null!=a[0]&&a[0].edge&&(d=this.createDragSource(u,this.createDropHandler(a,!1,k,r),this.createDragPreview(g,e),a,r),this.addClickHandler(u,d,a));
+Sidebar.prototype.createItem=function(a,b,f,e,g,d,k,n){n=null!=n?n:!0;var u=document.createElement("a");u.className="geItem";u.style.overflow="hidden";var m=2*this.thumbBorder;u.style.width=this.thumbWidth+m+"px";u.style.height=this.thumbHeight+m+"px";u.style.padding=this.thumbPadding+"px";mxEvent.addListener(u,"click",function(x){mxEvent.consume(x)});m=a;a=this.graph.cloneCells(a);this.editorUi.insertHandler(m,null,this.graph.model,this.editorUi.editor.graph.defaultVertexStyle,this.editorUi.editor.graph.defaultEdgeStyle,
+!0,!0);this.createThumb(m,this.thumbWidth,this.thumbHeight,u,b,f,e,g,d);var r=new mxRectangle(0,0,g,d);1<a.length||a[0].vertex?(e=this.createDragSource(u,this.createDropHandler(a,!0,k,r),this.createDragPreview(g,d),a,r),this.addClickHandler(u,e,a),e.isGuidesEnabled=mxUtils.bind(this,function(){return this.editorUi.editor.graph.graphHandler.guidesEnabled})):null!=a[0]&&a[0].edge&&(e=this.createDragSource(u,this.createDropHandler(a,!1,k,r),this.createDragPreview(g,d),a,r),this.addClickHandler(u,e,a));
!mxClient.IS_IOS&&n&&mxEvent.addGestureListeners(u,null,mxUtils.bind(this,function(x){mxEvent.isMouseEvent(x)&&this.showTooltip(u,a,r.width,r.height,b,f)}));return u};
-Sidebar.prototype.updateShapes=function(a,b){var f=this.editorUi.editor.graph,d=f.getCellStyle(a),g=[];f.model.beginUpdate();try{for(var e=f.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(" "),n=
-0;n<b.length;n++){var u=b[n];if(f.getModel().isVertex(u)==f.getModel().isVertex(a)||f.getModel().isEdge(u)==f.getModel().isEdge(a)){var m=f.getCellStyle(b[n],!1);f.getModel().setStyle(u,e);if("1"==mxUtils.getValue(m,"composite","0"))for(var r=f.model.getChildCount(u);0<=r;r--)f.model.remove(f.model.getChildAt(u,r));"umlLifeline"==m[mxConstants.STYLE_SHAPE]&&"umlLifeline"!=d[mxConstants.STYLE_SHAPE]&&(f.setCellStyles(mxConstants.STYLE_SHAPE,"umlLifeline",[u]),f.setCellStyles("participant",d[mxConstants.STYLE_SHAPE],
+Sidebar.prototype.updateShapes=function(a,b){var f=this.editorUi.editor.graph,e=f.getCellStyle(a),g=[];f.model.beginUpdate();try{for(var d=f.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(" "),n=
+0;n<b.length;n++){var u=b[n];if(f.getModel().isVertex(u)==f.getModel().isVertex(a)||f.getModel().isEdge(u)==f.getModel().isEdge(a)){var m=f.getCellStyle(b[n],!1);f.getModel().setStyle(u,d);if("1"==mxUtils.getValue(m,"composite","0"))for(var r=f.model.getChildCount(u);0<=r;r--)f.model.remove(f.model.getChildAt(u,r));"umlLifeline"==m[mxConstants.STYLE_SHAPE]&&"umlLifeline"!=e[mxConstants.STYLE_SHAPE]&&(f.setCellStyles(mxConstants.STYLE_SHAPE,"umlLifeline",[u]),f.setCellStyles("participant",e[mxConstants.STYLE_SHAPE],
[u]));for(r=0;r<k.length;r++){var x=m[k[r]];null!=x&&f.setCellStyles(k[r],x,[u])}g.push(u)}}}finally{f.model.endUpdate()}return g};
-Sidebar.prototype.createDropHandler=function(a,b,f,d){f=null!=f?f:!0;return mxUtils.bind(this,function(g,e,k,n,u,m){for(m=m?null:mxEvent.isTouchEvent(e)||mxEvent.isPenEvent(e)?document.elementFromPoint(mxEvent.getClientX(e),mxEvent.getClientY(e)):mxEvent.getSource(e);null!=m&&m!=this.container;)m=m.parentNode;if(null==m&&g.isEnabled()){a=g.getImportableCells(a);if(0<a.length){g.stopEditing();m=null==k||mxEvent.isAltDown(e)?!1:g.isValidDropTarget(k,a,e);var r=null;null==k||m||(k=null);if(!g.isCellLocked(k||
-g.getDefaultParent())){g.model.beginUpdate();try{n=Math.round(n);u=Math.round(u);if(b&&g.isSplitTarget(k,a,e)){var x=g.view.scale,B=g.view.translate,C=(n+B.x)*x,G=(u+B.y)*x,J=g.cloneCells(a);g.splitEdge(k,J,null,n-d.width/2,u-d.height/2,C,G);r=J}else 0<a.length&&(r=g.importCells(a,n,u,k));if(null!=g.layoutManager){var D=g.layoutManager.getLayout(k);if(null!=D)for(x=g.view.scale,B=g.view.translate,C=(n+B.x)*x,G=(u+B.y)*x,k=0;k<r.length;k++)D.moveCell(r[k],C,G)}!f||null!=e&&mxEvent.isShiftDown(e)||
-g.fireEvent(new mxEventObject("cellsInserted","cells",r))}catch(N){this.editorUi.handleError(N)}finally{g.model.endUpdate()}null!=r&&0<r.length&&(g.scrollCellToVisible(r[0]),g.setSelectionCells(r));g.editAfterInsert&&null!=e&&mxEvent.isMouseEvent(e)&&null!=r&&1==r.length&&window.setTimeout(function(){g.startEditing(r[0])},0)}}mxEvent.consume(e)}})};
+Sidebar.prototype.createDropHandler=function(a,b,f,e){f=null!=f?f:!0;return mxUtils.bind(this,function(g,d,k,n,u,m){for(m=m?null:mxEvent.isTouchEvent(d)||mxEvent.isPenEvent(d)?document.elementFromPoint(mxEvent.getClientX(d),mxEvent.getClientY(d)):mxEvent.getSource(d);null!=m&&m!=this.container;)m=m.parentNode;if(null==m&&g.isEnabled()){a=g.getImportableCells(a);if(0<a.length){g.stopEditing();m=null==k||mxEvent.isAltDown(d)?!1:g.isValidDropTarget(k,a,d);var r=null;null==k||m||(k=null);if(!g.isCellLocked(k||
+g.getDefaultParent())){g.model.beginUpdate();try{n=Math.round(n);u=Math.round(u);if(b&&g.isSplitTarget(k,a,d)){var x=g.view.scale,B=g.view.translate,C=(n+B.x)*x,F=(u+B.y)*x,J=g.cloneCells(a);g.splitEdge(k,J,null,n-e.width/2,u-e.height/2,C,F);r=J}else 0<a.length&&(r=g.importCells(a,n,u,k));if(null!=g.layoutManager){var D=g.layoutManager.getLayout(k);if(null!=D)for(x=g.view.scale,B=g.view.translate,C=(n+B.x)*x,F=(u+B.y)*x,k=0;k<r.length;k++)D.moveCell(r[k],C,F)}!f||null!=d&&mxEvent.isShiftDown(d)||
+g.fireEvent(new mxEventObject("cellsInserted","cells",r))}catch(N){this.editorUi.handleError(N)}finally{g.model.endUpdate()}null!=r&&0<r.length&&(g.scrollCellToVisible(r[0]),g.setSelectionCells(r));g.editAfterInsert&&null!=d&&mxEvent.isMouseEvent(d)&&null!=r&&1==r.length&&window.setTimeout(function(){g.startEditing(r[0])},0)}}mxEvent.consume(d)}})};
Sidebar.prototype.createDragPreview=function(a,b){var f=document.createElement("div");f.className="geDragPreview";f.style.width=a+"px";f.style.height=b+"px";return f};
-Sidebar.prototype.dropAndConnect=function(a,b,f,d,g){var e=this.getDropAndConnectGeometry(a,b[d],f,b),k=[];if(null!=e){var n=this.editorUi.editor.graph,u=null;n.model.beginUpdate();try{var m=n.getCellGeometry(a),r=n.getCellGeometry(b[d]),x=n.model.getParent(a),B=!0;if(null!=n.layoutManager){var C=n.layoutManager.getLayout(x);null!=C&&C.constructor==mxStackLayout&&(B=!1)}k=n.model.isEdge(a)?null:n.view.getState(x);var G=C=0;if(null!=k){var J=k.origin;C=J.x;G=J.y;var D=e.getTerminalPoint(!1);null!=
-D&&(D.x+=J.x,D.y+=J.y)}var N=!n.isTableRow(a)&&!n.isTableCell(a)&&(n.model.isEdge(a)||null!=m&&!m.relative&&B),Q=n.getCellAt((e.x+C+n.view.translate.x)*n.view.scale,(e.y+G+n.view.translate.y)*n.view.scale,null,null,null,function(Z,U,V){return!n.isContainer(Z.cell)});if(null!=Q&&Q!=x)k=n.view.getState(Q),null!=k&&(J=k.origin,x=Q,N=!0,n.model.isEdge(a)||(e.x-=J.x-C,e.y-=J.y-G));else if(!B||n.isTableRow(a)||n.isTableCell(a))e.x+=C,e.y+=G;C=r.x;G=r.y;n.model.isEdge(b[d])&&(G=C=0);k=b=n.importCells(b,
-e.x-(N?C:0),e.y-(N?G:0),N?x:null);if(n.model.isEdge(a))n.model.setTerminal(a,b[d],f==mxConstants.DIRECTION_NORTH);else if(n.model.isEdge(b[d])){n.model.setTerminal(b[d],a,!0);var R=n.getCellGeometry(b[d]);R.points=null;if(null!=R.getTerminalPoint(!1))R.setTerminalPoint(e.getTerminalPoint(!1),!1);else if(N&&n.model.isVertex(x)){var P=n.view.getState(x);J=P.cell!=n.view.currentRoot?P.origin:new mxPoint(0,0);n.cellsMoved(b,J.x,J.y,null,null,!0)}}else r=n.getCellGeometry(b[d]),C=e.x-Math.round(r.x),G=
-e.y-Math.round(r.y),e.x=Math.round(r.x),e.y=Math.round(r.y),n.model.setGeometry(b[d],e),n.cellsMoved(b,C,G,null,null,!0),k=b.slice(),u=1==k.length?k[0]:null,b.push(n.insertEdge(null,null,"",a,b[d],n.createCurrentEdgeStyle()));null!=g&&mxEvent.isShiftDown(g)||n.fireEvent(new mxEventObject("cellsInserted","cells",b))}catch(Z){this.editorUi.handleError(Z)}finally{n.model.endUpdate()}n.editAfterInsert&&null!=g&&mxEvent.isMouseEvent(g)&&null!=u&&window.setTimeout(function(){n.startEditing(u)},0)}return k};
-Sidebar.prototype.getDropAndConnectGeometry=function(a,b,f,d){var g=this.editorUi.editor.graph,e=g.view,k=1<d.length,n=g.getCellGeometry(a);d=g.getCellGeometry(b);null!=n&&null!=d&&(d=d.clone(),g.model.isEdge(a)?(a=g.view.getState(a),n=a.absolutePoints,b=n[0],g=n[n.length-1],f==mxConstants.DIRECTION_NORTH?(d.x=b.x/e.scale-e.translate.x-d.width/2,d.y=b.y/e.scale-e.translate.y-d.height/2):(d.x=g.x/e.scale-e.translate.x-d.width/2,d.y=g.y/e.scale-e.translate.y-d.height/2)):(n.relative&&(a=g.view.getState(a),
-n=n.clone(),n.x=(a.x-e.translate.x)/e.scale,n.y=(a.y-e.translate.y)/e.scale),e=g.defaultEdgeLength,g.model.isEdge(b)&&null!=d.getTerminalPoint(!0)&&null!=d.getTerminalPoint(!1)?(b=d.getTerminalPoint(!0),g=d.getTerminalPoint(!1),e=g.x-b.x,b=g.y-b.y,e=Math.sqrt(e*e+b*b),d.x=n.getCenterX(),d.y=n.getCenterY(),d.width=1,d.height=1,f==mxConstants.DIRECTION_NORTH?(d.height=e,d.y=n.y-e,d.setTerminalPoint(new mxPoint(d.x,d.y),!1)):f==mxConstants.DIRECTION_EAST?(d.width=e,d.x=n.x+n.width,d.setTerminalPoint(new mxPoint(d.x+
-d.width,d.y),!1)):f==mxConstants.DIRECTION_SOUTH?(d.height=e,d.y=n.y+n.height,d.setTerminalPoint(new mxPoint(d.x,d.y+d.height),!1)):f==mxConstants.DIRECTION_WEST&&(d.width=e,d.x=n.x-e,d.setTerminalPoint(new mxPoint(d.x,d.y),!1))):(!k&&45<d.width&&45<d.height&&45<n.width&&45<n.height&&(d.width*=n.height/d.height,d.height=n.height),d.x=n.x+n.width/2-d.width/2,d.y=n.y+n.height/2-d.height/2,f==mxConstants.DIRECTION_NORTH?d.y=d.y-n.height/2-d.height/2-e:f==mxConstants.DIRECTION_EAST?d.x=d.x+n.width/2+
-d.width/2+e:f==mxConstants.DIRECTION_SOUTH?d.y=d.y+n.height/2+d.height/2+e:f==mxConstants.DIRECTION_WEST&&(d.x=d.x-n.width/2-d.width/2-e),g.model.isEdge(b)&&null!=d.getTerminalPoint(!0)&&null!=b.getTerminal(!1)&&(n=g.getCellGeometry(b.getTerminal(!1)),null!=n&&(f==mxConstants.DIRECTION_NORTH?(d.x-=n.getCenterX(),d.y-=n.getCenterY()+n.height/2):f==mxConstants.DIRECTION_EAST?(d.x-=n.getCenterX()-n.width/2,d.y-=n.getCenterY()):f==mxConstants.DIRECTION_SOUTH?(d.x-=n.getCenterX(),d.y-=n.getCenterY()-n.height/
-2):f==mxConstants.DIRECTION_WEST&&(d.x-=n.getCenterX()+n.width/2,d.y-=n.getCenterY()))))));return d};Sidebar.prototype.isDropStyleEnabled=function(a,b){var f=!0;null!=b&&1==a.length&&(a=this.graph.getCellStyle(a[b]),null!=a&&(f=mxUtils.getValue(a,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(a,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE));return f};
+Sidebar.prototype.dropAndConnect=function(a,b,f,e,g){var d=this.getDropAndConnectGeometry(a,b[e],f,b),k=[];if(null!=d){var n=this.editorUi.editor.graph,u=null;n.model.beginUpdate();try{var m=n.getCellGeometry(a),r=n.getCellGeometry(b[e]),x=n.model.getParent(a),B=!0;if(null!=n.layoutManager){var C=n.layoutManager.getLayout(x);null!=C&&C.constructor==mxStackLayout&&(B=!1)}k=n.model.isEdge(a)?null:n.view.getState(x);var F=C=0;if(null!=k){var J=k.origin;C=J.x;F=J.y;var D=d.getTerminalPoint(!1);null!=
+D&&(D.x+=J.x,D.y+=J.y)}var N=!n.isTableRow(a)&&!n.isTableCell(a)&&(n.model.isEdge(a)||null!=m&&!m.relative&&B),S=n.getCellAt((d.x+C+n.view.translate.x)*n.view.scale,(d.y+F+n.view.translate.y)*n.view.scale,null,null,null,function(Z,U,V){return!n.isContainer(Z.cell)});if(null!=S&&S!=x)k=n.view.getState(S),null!=k&&(J=k.origin,x=S,N=!0,n.model.isEdge(a)||(d.x-=J.x-C,d.y-=J.y-F));else if(!B||n.isTableRow(a)||n.isTableCell(a))d.x+=C,d.y+=F;C=r.x;F=r.y;n.model.isEdge(b[e])&&(F=C=0);k=b=n.importCells(b,
+d.x-(N?C:0),d.y-(N?F:0),N?x:null);if(n.model.isEdge(a))n.model.setTerminal(a,b[e],f==mxConstants.DIRECTION_NORTH);else if(n.model.isEdge(b[e])){n.model.setTerminal(b[e],a,!0);var T=n.getCellGeometry(b[e]);T.points=null;if(null!=T.getTerminalPoint(!1))T.setTerminalPoint(d.getTerminalPoint(!1),!1);else if(N&&n.model.isVertex(x)){var P=n.view.getState(x);J=P.cell!=n.view.currentRoot?P.origin:new mxPoint(0,0);n.cellsMoved(b,J.x,J.y,null,null,!0)}}else r=n.getCellGeometry(b[e]),C=d.x-Math.round(r.x),F=
+d.y-Math.round(r.y),d.x=Math.round(r.x),d.y=Math.round(r.y),n.model.setGeometry(b[e],d),n.cellsMoved(b,C,F,null,null,!0),k=b.slice(),u=1==k.length?k[0]:null,b.push(n.insertEdge(null,null,"",a,b[e],n.createCurrentEdgeStyle()));null!=g&&mxEvent.isShiftDown(g)||n.fireEvent(new mxEventObject("cellsInserted","cells",b))}catch(Z){this.editorUi.handleError(Z)}finally{n.model.endUpdate()}n.editAfterInsert&&null!=g&&mxEvent.isMouseEvent(g)&&null!=u&&window.setTimeout(function(){n.startEditing(u)},0)}return k};
+Sidebar.prototype.getDropAndConnectGeometry=function(a,b,f,e){var g=this.editorUi.editor.graph,d=g.view,k=1<e.length,n=g.getCellGeometry(a);e=g.getCellGeometry(b);null!=n&&null!=e&&(e=e.clone(),g.model.isEdge(a)?(a=g.view.getState(a),n=a.absolutePoints,b=n[0],g=n[n.length-1],f==mxConstants.DIRECTION_NORTH?(e.x=b.x/d.scale-d.translate.x-e.width/2,e.y=b.y/d.scale-d.translate.y-e.height/2):(e.x=g.x/d.scale-d.translate.x-e.width/2,e.y=g.y/d.scale-d.translate.y-e.height/2)):(n.relative&&(a=g.view.getState(a),
+n=n.clone(),n.x=(a.x-d.translate.x)/d.scale,n.y=(a.y-d.translate.y)/d.scale),d=g.defaultEdgeLength,g.model.isEdge(b)&&null!=e.getTerminalPoint(!0)&&null!=e.getTerminalPoint(!1)?(b=e.getTerminalPoint(!0),g=e.getTerminalPoint(!1),d=g.x-b.x,b=g.y-b.y,d=Math.sqrt(d*d+b*b),e.x=n.getCenterX(),e.y=n.getCenterY(),e.width=1,e.height=1,f==mxConstants.DIRECTION_NORTH?(e.height=d,e.y=n.y-d,e.setTerminalPoint(new mxPoint(e.x,e.y),!1)):f==mxConstants.DIRECTION_EAST?(e.width=d,e.x=n.x+n.width,e.setTerminalPoint(new mxPoint(e.x+
+e.width,e.y),!1)):f==mxConstants.DIRECTION_SOUTH?(e.height=d,e.y=n.y+n.height,e.setTerminalPoint(new mxPoint(e.x,e.y+e.height),!1)):f==mxConstants.DIRECTION_WEST&&(e.width=d,e.x=n.x-d,e.setTerminalPoint(new mxPoint(e.x,e.y),!1))):(!k&&45<e.width&&45<e.height&&45<n.width&&45<n.height&&(e.width*=n.height/e.height,e.height=n.height),e.x=n.x+n.width/2-e.width/2,e.y=n.y+n.height/2-e.height/2,f==mxConstants.DIRECTION_NORTH?e.y=e.y-n.height/2-e.height/2-d:f==mxConstants.DIRECTION_EAST?e.x=e.x+n.width/2+
+e.width/2+d:f==mxConstants.DIRECTION_SOUTH?e.y=e.y+n.height/2+e.height/2+d:f==mxConstants.DIRECTION_WEST&&(e.x=e.x-n.width/2-e.width/2-d),g.model.isEdge(b)&&null!=e.getTerminalPoint(!0)&&null!=b.getTerminal(!1)&&(n=g.getCellGeometry(b.getTerminal(!1)),null!=n&&(f==mxConstants.DIRECTION_NORTH?(e.x-=n.getCenterX(),e.y-=n.getCenterY()+n.height/2):f==mxConstants.DIRECTION_EAST?(e.x-=n.getCenterX()-n.width/2,e.y-=n.getCenterY()):f==mxConstants.DIRECTION_SOUTH?(e.x-=n.getCenterX(),e.y-=n.getCenterY()-n.height/
+2):f==mxConstants.DIRECTION_WEST&&(e.x-=n.getCenterX()+n.width/2,e.y-=n.getCenterY()))))));return e};Sidebar.prototype.isDropStyleEnabled=function(a,b){var f=!0;null!=b&&1==a.length&&(a=this.graph.getCellStyle(a[b]),null!=a&&(f=mxUtils.getValue(a,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(a,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE));return f};
Sidebar.prototype.isDropStyleTargetIgnored=function(a){return this.graph.isSwimlane(a.cell)||this.graph.isTableCell(a.cell)||this.graph.isTableRow(a.cell)||this.graph.isTable(a.cell)};
-Sidebar.prototype.createDragSource=function(a,b,f,d,g){function e(aa,oa){var sa=mxUtils.createImage(aa.src);sa.style.width=aa.width+"px";sa.style.height=aa.height+"px";null!=oa&&sa.setAttribute("title",oa);mxUtils.setOpacity(sa,aa==this.refreshTarget?30:20);sa.style.position="absolute";sa.style.cursor="crosshair";return sa}function k(aa,oa,sa,Ka){null!=Ka.parentNode&&(mxUtils.contains(sa,aa,oa)?(mxUtils.setOpacity(Ka,100),S=Ka):mxUtils.setOpacity(Ka,Ka==ia?30:20));return sa}for(var n=this.editorUi,
-u=n.editor.graph,m=null,r=null,x=this,B=0;B<d.length&&(null==r&&u.model.isVertex(d[B])?r=B:null==m&&u.model.isEdge(d[B])&&null==u.model.getTerminal(d[B],!0)&&(m=B),null==r||null==m);B++);var C=this.isDropStyleEnabled(d,r),G=mxUtils.makeDraggable(a,u,mxUtils.bind(this,function(aa,oa,sa,Ka,Ha){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=d&&null!=Q&&S==ia){var ua=aa.isCellSelected(Q.cell)?aa.getSelectionCells():[Q.cell];ua=this.updateShapes(aa.model.isEdge(Q.cell)?d[0]:d[r],
-ua);aa.setSelectionCells(ua)}else null!=d&&null!=S&&null!=D&&S!=ia?(ua=aa.model.isEdge(D.cell)||null==m?r:m,aa.setSelectionCells(this.dropAndConnect(D.cell,d,O,ua,oa))):b.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(aa.view.getState(aa.getSelectionCell()))}),f,0,0,u.autoscroll,!0,!0);u.addListener(mxEvent.ESCAPE,function(aa,oa){G.isActive()&&G.reset()});var J=G.mouseDown;G.mouseDown=function(aa){mxEvent.isPopupTrigger(aa)||mxEvent.isMultiTouchEvent(aa)||u.isCellLocked(u.getDefaultParent())||
-(u.stopEditing(),J.apply(this,arguments))};var D=null,N=null,Q=null,R=!1,P=e(this.triangleUp,mxResources.get("connect")),Z=e(this.triangleRight,mxResources.get("connect")),U=e(this.triangleDown,mxResources.get("connect")),V=e(this.triangleLeft,mxResources.get("connect")),ia=e(this.refreshTarget,mxResources.get("replace")),ha=null,ba=e(this.roundDrop),qa=e(this.roundDrop),O=mxConstants.DIRECTION_NORTH,S=null,F=G.createPreviewElement;G.createPreviewElement=function(aa){var oa=F.apply(this,arguments);
-mxClient.IS_SVG&&(oa.style.pointerEvents="none");this.previewElementWidth=oa.style.width;this.previewElementHeight=oa.style.height;return oa};var L=G.dragEnter;G.dragEnter=function(aa,oa){null!=n.hoverIcons&&n.hoverIcons.setDisplay("none");L.apply(this,arguments)};var T=G.dragExit;G.dragExit=function(aa,oa){null!=n.hoverIcons&&n.hoverIcons.setDisplay("");T.apply(this,arguments)};G.dragOver=function(aa,oa){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=S&&this.currentGuide.hide();
-if(null!=this.previewElement){var sa=aa.view;if(null!=Q&&S==ia)this.previewElement.style.display=aa.model.isEdge(Q.cell)?"none":"",this.previewElement.style.left=Q.x+"px",this.previewElement.style.top=Q.y+"px",this.previewElement.style.width=Q.width+"px",this.previewElement.style.height=Q.height+"px";else if(null!=D&&null!=S){null!=G.currentHighlight&&null!=G.currentHighlight.state&&G.currentHighlight.hide();var Ka=aa.model.isEdge(D.cell)||null==m?r:m,Ha=x.getDropAndConnectGeometry(D.cell,d[Ka],O,
-d),ua=aa.model.isEdge(D.cell)?null:aa.getCellGeometry(D.cell),Ca=aa.getCellGeometry(d[Ka]),ra=aa.model.getParent(D.cell),Da=sa.translate.x*sa.scale,Ua=sa.translate.y*sa.scale;null!=ua&&!ua.relative&&aa.model.isVertex(ra)&&ra!=sa.currentRoot&&(Ua=sa.getState(ra),Da=Ua.x,Ua=Ua.y);ua=Ca.x;Ca=Ca.y;aa.model.isEdge(d[Ka])&&(Ca=ua=0);this.previewElement.style.left=(Ha.x-ua)*sa.scale+Da+"px";this.previewElement.style.top=(Ha.y-Ca)*sa.scale+Ua+"px";1==d.length&&(this.previewElement.style.width=Ha.width*sa.scale+
-"px",this.previewElement.style.height=Ha.height*sa.scale+"px");this.previewElement.style.display=""}else null!=G.currentHighlight.state&&aa.model.isEdge(G.currentHighlight.state.cell)?(this.previewElement.style.left=Math.round(parseInt(this.previewElement.style.left)-g.width*sa.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-g.height*sa.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,
-this.previewElement.style.display="")}};var ca=(new Date).getTime(),fa=0,wa=null,W=this.editorUi.editor.graph.getCellStyle(d[0]);G.getDropTarget=mxUtils.bind(this,function(aa,oa,sa,Ka){var Ha=mxEvent.isAltDown(Ka)||null==d?null:aa.getCellAt(oa,sa,null,null,null,function(Ua,db,Ta){return aa.isContainer(Ua.cell)});if(null!=Ha&&!this.graph.isCellConnectable(Ha)&&!this.graph.model.isEdge(Ha)){var ua=this.graph.getModel().getParent(Ha);this.graph.getModel().isVertex(ua)&&this.graph.isCellConnectable(ua)&&
-(Ha=ua)}aa.isCellLocked(Ha)&&(Ha=null);var Ca=aa.view.getState(Ha);ua=S=null;wa!=Ca?(ca=(new Date).getTime(),fa=0,wa=Ca,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=Ca&&(this.updateThread=window.setTimeout(function(){null==S&&(wa=Ca,G.getDropTarget(aa,oa,sa,Ka))},this.dropTargetDelay+10))):fa=(new Date).getTime()-ca;if(C&&2500>fa&&null!=Ca&&!mxEvent.isShiftDown(Ka)&&(mxUtils.getValue(Ca.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(W,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(Ca.style,
-mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ca.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ca.style,mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(W,mxConstants.STYLE_SHAPE)||1500<fa||aa.model.isEdge(Ca.cell))&&fa>this.dropTargetDelay&&!this.isDropStyleTargetIgnored(Ca)&&(aa.model.isVertex(Ca.cell)&&null!=r||aa.model.isEdge(Ca.cell)&&aa.model.isEdge(d[0]))){if(aa.isCellEditable(Ca.cell)){Q=
-Ca;var ra=aa.model.isEdge(Ca.cell)?aa.view.getPoint(Ca):new mxPoint(Ca.getCenterX(),Ca.getCenterY());ra=new mxRectangle(ra.x-this.refreshTarget.width/2,ra.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);ia.style.left=Math.floor(ra.x)+"px";ia.style.top=Math.floor(ra.y)+"px";null==ha&&(aa.container.appendChild(ia),ha=ia.parentNode);k(oa,sa,ra,ia)}}else null==Q||!mxUtils.contains(Q,oa,sa)||1500<fa&&!mxEvent.isShiftDown(Ka)?(Q=null,null!=ha&&(ia.parentNode.removeChild(ia),
-ha=null)):null!=Q&&null!=ha&&(ra=aa.model.isEdge(Q.cell)?aa.view.getPoint(Q):new mxPoint(Q.getCenterX(),Q.getCenterY()),ra=new mxRectangle(ra.x-this.refreshTarget.width/2,ra.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height),k(oa,sa,ra,ia));if(R&&null!=D&&!mxEvent.isAltDown(Ka)&&null==S){ua=mxRectangle.fromRectangle(D);if(aa.model.isEdge(D.cell)){var Da=D.absolutePoints;null!=ba.parentNode&&(ra=Da[0],ua.add(k(oa,sa,new mxRectangle(ra.x-this.roundDrop.width/2,ra.y-this.roundDrop.height/
-2,this.roundDrop.width,this.roundDrop.height),ba)));null!=qa.parentNode&&(Da=Da[Da.length-1],ua.add(k(oa,sa,new mxRectangle(Da.x-this.roundDrop.width/2,Da.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),qa)))}else ra=mxRectangle.fromRectangle(D),null!=D.shape&&null!=D.shape.boundingBox&&(ra=mxRectangle.fromRectangle(D.shape.boundingBox)),ra.grow(this.graph.tolerance),ra.grow(HoverIcons.prototype.arrowSpacing),Da=this.graph.selectionCellsHandler.getHandler(D.cell),null!=Da&&(ra.x-=
-Da.horizontalOffset/2,ra.y-=Da.verticalOffset/2,ra.width+=Da.horizontalOffset,ra.height+=Da.verticalOffset,null!=Da.rotationShape&&null!=Da.rotationShape.node&&"hidden"!=Da.rotationShape.node.style.visibility&&"none"!=Da.rotationShape.node.style.display&&null!=Da.rotationShape.boundingBox&&ra.add(Da.rotationShape.boundingBox)),ua.add(k(oa,sa,new mxRectangle(D.getCenterX()-this.triangleUp.width/2,ra.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),P)),ua.add(k(oa,sa,new mxRectangle(ra.x+
-ra.width,D.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),Z)),ua.add(k(oa,sa,new mxRectangle(D.getCenterX()-this.triangleDown.width/2,ra.y+ra.height,this.triangleDown.width,this.triangleDown.height),U)),ua.add(k(oa,sa,new mxRectangle(ra.x-this.triangleLeft.width,D.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),V));null!=ua&&ua.grow(10)}O=mxConstants.DIRECTION_NORTH;S==Z?O=mxConstants.DIRECTION_EAST:S==U||S==qa?
-O=mxConstants.DIRECTION_SOUTH:S==V&&(O=mxConstants.DIRECTION_WEST);null!=Q&&S==ia&&(Ca=Q);ra=(null==r||aa.isCellConnectable(d[r]))&&(aa.model.isEdge(Ha)&&null!=r||aa.model.isVertex(Ha)&&aa.isCellConnectable(Ha));if(null!=D&&5E3<=fa||D!=Ca&&(null==ua||!mxUtils.contains(ua,oa,sa)||500<fa&&null==S&&ra))if(R=!1,D=5E3>fa&&fa>this.dropTargetDelay||aa.model.isEdge(Ha)?Ca:null,null!=D&&ra){ua=[ba,qa,P,Z,U,V];for(ra=0;ra<ua.length;ra++)null!=ua[ra].parentNode&&ua[ra].parentNode.removeChild(ua[ra]);aa.model.isEdge(Ha)?
-(Da=Ca.absolutePoints,null!=Da&&(ra=Da[0],Da=Da[Da.length-1],ua=aa.tolerance,new mxRectangle(oa-ua,sa-ua,2*ua,2*ua),ba.style.left=Math.floor(ra.x-this.roundDrop.width/2)+"px",ba.style.top=Math.floor(ra.y-this.roundDrop.height/2)+"px",qa.style.left=Math.floor(Da.x-this.roundDrop.width/2)+"px",qa.style.top=Math.floor(Da.y-this.roundDrop.height/2)+"px",null==aa.model.getTerminal(Ha,!0)&&aa.container.appendChild(ba),null==aa.model.getTerminal(Ha,!1)&&aa.container.appendChild(qa))):(ra=mxRectangle.fromRectangle(Ca),
-null!=Ca.shape&&null!=Ca.shape.boundingBox&&(ra=mxRectangle.fromRectangle(Ca.shape.boundingBox)),ra.grow(this.graph.tolerance),ra.grow(HoverIcons.prototype.arrowSpacing),Da=this.graph.selectionCellsHandler.getHandler(Ca.cell),null!=Da&&(ra.x-=Da.horizontalOffset/2,ra.y-=Da.verticalOffset/2,ra.width+=Da.horizontalOffset,ra.height+=Da.verticalOffset,null!=Da.rotationShape&&null!=Da.rotationShape.node&&"hidden"!=Da.rotationShape.node.style.visibility&&"none"!=Da.rotationShape.node.style.display&&null!=
-Da.rotationShape.boundingBox&&ra.add(Da.rotationShape.boundingBox)),P.style.left=Math.floor(Ca.getCenterX()-this.triangleUp.width/2)+"px",P.style.top=Math.floor(ra.y-this.triangleUp.height)+"px",Z.style.left=Math.floor(ra.x+ra.width)+"px",Z.style.top=Math.floor(Ca.getCenterY()-this.triangleRight.height/2)+"px",U.style.left=P.style.left,U.style.top=Math.floor(ra.y+ra.height)+"px",V.style.left=Math.floor(ra.x-this.triangleLeft.width)+"px",V.style.top=Z.style.top,"eastwest"!=Ca.style.portConstraint&&
-(aa.container.appendChild(P),aa.container.appendChild(U)),aa.container.appendChild(Z),aa.container.appendChild(V));null!=Ca&&(N=aa.selectionCellsHandler.getHandler(Ca.cell),null!=N&&null!=N.setHandlesVisible&&N.setHandlesVisible(!1));R=!0}else for(ua=[ba,qa,P,Z,U,V],ra=0;ra<ua.length;ra++)null!=ua[ra].parentNode&&ua[ra].parentNode.removeChild(ua[ra]);R||null==N||N.setHandlesVisible(!0);Ha=mxEvent.isAltDown(Ka)&&!mxEvent.isShiftDown(Ka)||null!=Q&&S==ia?null:mxDragSource.prototype.getDropTarget.apply(this,
-arguments);ua=aa.getModel();if(null!=Ha&&(null!=S||!aa.isSplitTarget(Ha,d,Ka))){for(;null!=Ha&&!aa.isValidDropTarget(Ha,d,Ka)&&ua.isVertex(ua.getParent(Ha));)Ha=ua.getParent(Ha);null!=Ha&&(aa.view.currentRoot==Ha||!aa.isValidRoot(Ha)&&0==aa.getModel().getChildCount(Ha)||aa.isCellLocked(Ha)||ua.isEdge(Ha)||!aa.isValidDropTarget(Ha,d,Ka))&&(Ha=null)}aa.isCellLocked(Ha)&&(Ha=null);return Ha});G.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,arguments);for(var aa=[ba,qa,ia,P,Z,U,V],oa=
-0;oa<aa.length;oa++)null!=aa[oa].parentNode&&aa[oa].parentNode.removeChild(aa[oa]);null!=D&&null!=N&&N.reset();S=ha=Q=D=N=null};return G};
-Sidebar.prototype.itemClicked=function(a,b,f,d){d=this.editorUi.editor.graph;d.container.focus();if(mxEvent.isAltDown(f)&&1==d.getSelectionCount()&&d.model.isVertex(d.getSelectionCell())){b=null;for(var g=0;g<a.length&&null==b;g++)d.model.isVertex(a[g])&&(b=g);null!=b&&(d.setSelectionCells(this.dropAndConnect(d.getSelectionCell(),a,mxEvent.isMetaDown(f)||mxEvent.isControlDown(f)?mxEvent.isShiftDown(f)?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH:mxEvent.isShiftDown(f)?mxConstants.DIRECTION_EAST:
-mxConstants.DIRECTION_SOUTH,b,f)),d.scrollCellToVisible(d.getSelectionCell()))}else mxEvent.isShiftDown(f)&&!d.isSelectionEmpty()?(f=d.getEditableCells(d.getSelectionCells()),this.updateShapes(a[0],f),d.scrollCellToVisible(f)):(a=mxEvent.isAltDown(f)?d.getFreeInsertPoint():d.getCenterInsertPoint(d.getBoundingBoxFromGeometry(a,!0)),b.drop(d,f,null,a.x,a.y,!0))};
-Sidebar.prototype.addClickHandler=function(a,b,f){var d=b.mouseDown,g=b.mouseMove,e=b.mouseUp,k=this.editorUi.editor.graph.tolerance,n=null,u=this;b.mouseDown=function(m){d.apply(this,arguments);n=new mxPoint(mxEvent.getClientX(m),mxEvent.getClientY(m));null!=this.dragElement&&(this.dragElement.style.display="none",mxUtils.setOpacity(a,50))};b.mouseMove=function(m){null!=this.dragElement&&"none"==this.dragElement.style.display&&null!=n&&(Math.abs(n.x-mxEvent.getClientX(m))>k||Math.abs(n.y-mxEvent.getClientY(m))>
-k)&&(this.dragElement.style.display="",mxUtils.setOpacity(a,100));g.apply(this,arguments)};b.mouseUp=function(m){try{mxEvent.isPopupTrigger(m)||null!=this.currentGraph||null==this.dragElement||"none"!=this.dragElement.style.display||u.itemClicked(f,b,m,a),e.apply(b,arguments),mxUtils.setOpacity(a,100),n=null,u.currentElt=a}catch(r){b.reset(),u.editorUi.handleError(r)}}};
-Sidebar.prototype.createVertexTemplateEntry=function(a,b,f,d,g,e,k,n){null!=n&&null!=g&&(n+=" "+g);n=null!=n&&0<n.length?n:null!=g?g.toLowerCase():"";return this.addEntry(n,mxUtils.bind(this,function(){return this.createVertexTemplate(a,b,f,d,g,e,k)}))};Sidebar.prototype.createVertexTemplate=function(a,b,f,d,g,e,k,n,u){a=[new mxCell(null!=d?d:"",new mxGeometry(0,0,b,f),a)];a[0].vertex=!0;return this.createVertexTemplateFromCells(a,b,f,g,e,k,n,u)};
-Sidebar.prototype.createVertexTemplateFromData=function(a,b,f,d,g,e,k,n){a=mxUtils.parseXml(Graph.decompress(a));var u=new mxCodec(a),m=new mxGraphModel;u.decode(a.documentElement,m);a=this.graph.cloneCells(m.root.getChildAt(0).children);return this.createVertexTemplateFromCells(a,b,f,d,g,e,k,n)};Sidebar.prototype.createVertexTemplateFromCells=function(a,b,f,d,g,e,k,n){return this.createItem(a,d,g,e,b,f,k,n)};
-Sidebar.prototype.createEdgeTemplateEntry=function(a,b,f,d,g,e,k,n,u){k=null!=k&&0<k.length?k:g.toLowerCase();return this.addEntry(k,mxUtils.bind(this,function(){return this.createEdgeTemplate(a,b,f,d,g,e,n,u)}))};
-Sidebar.prototype.createEdgeTemplate=function(a,b,f,d,g,e,k,n){a=new mxCell(null!=d?d:"",new mxGeometry(0,0,b,f),a);a.geometry.setTerminalPoint(new mxPoint(0,f),!0);a.geometry.setTerminalPoint(new mxPoint(b,0),!1);a.geometry.relative=!0;a.edge=!0;return this.createEdgeTemplateFromCells([a],b,f,g,e,k,n)};Sidebar.prototype.createEdgeTemplateFromCells=function(a,b,f,d,g,e,k,n){return this.createItem(a,d,g,null!=n?n:!0,b,f,e,k)};
-Sidebar.prototype.addPaletteFunctions=function(a,b,f,d){this.addPalette(a,b,f,mxUtils.bind(this,function(g){for(var e=0;e<d.length;e++)g.appendChild(d[e](g))}))};
-Sidebar.prototype.addPalette=function(a,b,f,d){b=this.createTitle(b);this.container.appendChild(b);var g=document.createElement("div");g.className="geSidebar";mxClient.IS_POINTER&&(g.style.touchAction="none");f?(d(g),d=null):g.style.display="none";this.addFoldingHandler(b,g,d);f=document.createElement("div");f.appendChild(g);this.container.appendChild(f);null!=a&&(this.palettes[a]=[b,f]);return g};
-Sidebar.prototype.addFoldingHandler=function(a,b,f){var d=!1;if(!mxClient.IS_IE||8<=document.documentMode)a.style.backgroundImage="none"==b.style.display?"url('"+this.collapsedImage+"')":"url('"+this.expandedImage+"')";a.style.backgroundRepeat="no-repeat";a.style.backgroundPosition="0% 50%";mxEvent.addListener(a,"click",mxUtils.bind(this,function(g){if("none"==b.style.display){if(d)b.style.display="block";else if(d=!0,null!=f){a.style.cursor="wait";var e=a.innerHTML;a.innerHTML=mxResources.get("loading")+
-"...";window.setTimeout(function(){b.style.display="block";a.style.cursor="";a.innerHTML=e;var k=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;f(b,a);mxClient.NO_FO=k},mxClient.IS_FF?20:0)}else b.style.display="block";a.style.backgroundImage="url('"+this.expandedImage+"')"}else a.style.backgroundImage="url('"+this.collapsedImage+"')",b.style.display="none";mxEvent.consume(g)}));mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(g){g.preventDefault()}))};
+Sidebar.prototype.createDragSource=function(a,b,f,e,g){function d(ca,oa){var ta=mxUtils.createImage(ca.src);ta.style.width=ca.width+"px";ta.style.height=ca.height+"px";null!=oa&&ta.setAttribute("title",oa);mxUtils.setOpacity(ta,ca==this.refreshTarget?30:20);ta.style.position="absolute";ta.style.cursor="crosshair";return ta}function k(ca,oa,ta,Ka){null!=Ka.parentNode&&(mxUtils.contains(ta,ca,oa)?(mxUtils.setOpacity(Ka,100),R=Ka):mxUtils.setOpacity(Ka,Ka==aa?30:20));return ta}for(var n=this.editorUi,
+u=n.editor.graph,m=null,r=null,x=this,B=0;B<e.length&&(null==r&&u.model.isVertex(e[B])?r=B:null==m&&u.model.isEdge(e[B])&&null==u.model.getTerminal(e[B],!0)&&(m=B),null==r||null==m);B++);var C=this.isDropStyleEnabled(e,r),F=mxUtils.makeDraggable(a,u,mxUtils.bind(this,function(ca,oa,ta,Ka,Ha){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=e&&null!=S&&R==aa){var va=ca.isCellSelected(S.cell)?ca.getSelectionCells():[S.cell];va=this.updateShapes(ca.model.isEdge(S.cell)?e[0]:e[r],
+va);ca.setSelectionCells(va)}else null!=e&&null!=R&&null!=D&&R!=aa?(va=ca.model.isEdge(D.cell)||null==m?r:m,ca.setSelectionCells(this.dropAndConnect(D.cell,e,O,va,oa))):b.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(ca.view.getState(ca.getSelectionCell()))}),f,0,0,u.autoscroll,!0,!0);u.addListener(mxEvent.ESCAPE,function(ca,oa){F.isActive()&&F.reset()});var J=F.mouseDown;F.mouseDown=function(ca){mxEvent.isPopupTrigger(ca)||mxEvent.isMultiTouchEvent(ca)||u.isCellLocked(u.getDefaultParent())||
+(u.stopEditing(),J.apply(this,arguments))};var D=null,N=null,S=null,T=!1,P=d(this.triangleUp,mxResources.get("connect")),Z=d(this.triangleRight,mxResources.get("connect")),U=d(this.triangleDown,mxResources.get("connect")),V=d(this.triangleLeft,mxResources.get("connect")),aa=d(this.refreshTarget,mxResources.get("replace")),ia=null,ea=d(this.roundDrop),qa=d(this.roundDrop),O=mxConstants.DIRECTION_NORTH,R=null,G=F.createPreviewElement;F.createPreviewElement=function(ca){var oa=G.apply(this,arguments);
+mxClient.IS_SVG&&(oa.style.pointerEvents="none");this.previewElementWidth=oa.style.width;this.previewElementHeight=oa.style.height;return oa};var K=F.dragEnter;F.dragEnter=function(ca,oa){null!=n.hoverIcons&&n.hoverIcons.setDisplay("none");K.apply(this,arguments)};var Q=F.dragExit;F.dragExit=function(ca,oa){null!=n.hoverIcons&&n.hoverIcons.setDisplay("");Q.apply(this,arguments)};F.dragOver=function(ca,oa){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=R&&this.currentGuide.hide();
+if(null!=this.previewElement){var ta=ca.view;if(null!=S&&R==aa)this.previewElement.style.display=ca.model.isEdge(S.cell)?"none":"",this.previewElement.style.left=S.x+"px",this.previewElement.style.top=S.y+"px",this.previewElement.style.width=S.width+"px",this.previewElement.style.height=S.height+"px";else if(null!=D&&null!=R){null!=F.currentHighlight&&null!=F.currentHighlight.state&&F.currentHighlight.hide();var Ka=ca.model.isEdge(D.cell)||null==m?r:m,Ha=x.getDropAndConnectGeometry(D.cell,e[Ka],O,
+e),va=ca.model.isEdge(D.cell)?null:ca.getCellGeometry(D.cell),Ca=ca.getCellGeometry(e[Ka]),sa=ca.model.getParent(D.cell),Da=ta.translate.x*ta.scale,Ua=ta.translate.y*ta.scale;null!=va&&!va.relative&&ca.model.isVertex(sa)&&sa!=ta.currentRoot&&(Ua=ta.getState(sa),Da=Ua.x,Ua=Ua.y);va=Ca.x;Ca=Ca.y;ca.model.isEdge(e[Ka])&&(Ca=va=0);this.previewElement.style.left=(Ha.x-va)*ta.scale+Da+"px";this.previewElement.style.top=(Ha.y-Ca)*ta.scale+Ua+"px";1==e.length&&(this.previewElement.style.width=Ha.width*ta.scale+
+"px",this.previewElement.style.height=Ha.height*ta.scale+"px");this.previewElement.style.display=""}else null!=F.currentHighlight.state&&ca.model.isEdge(F.currentHighlight.state.cell)?(this.previewElement.style.left=Math.round(parseInt(this.previewElement.style.left)-g.width*ta.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-g.height*ta.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,
+this.previewElement.style.display="")}};var ba=(new Date).getTime(),la=0,ra=null,X=this.editorUi.editor.graph.getCellStyle(e[0]);F.getDropTarget=mxUtils.bind(this,function(ca,oa,ta,Ka){var Ha=mxEvent.isAltDown(Ka)||null==e?null:ca.getCellAt(oa,ta,null,null,null,function(Ua,db,Ta){return ca.isContainer(Ua.cell)});if(null!=Ha&&!this.graph.isCellConnectable(Ha)&&!this.graph.model.isEdge(Ha)){var va=this.graph.getModel().getParent(Ha);this.graph.getModel().isVertex(va)&&this.graph.isCellConnectable(va)&&
+(Ha=va)}ca.isCellLocked(Ha)&&(Ha=null);var Ca=ca.view.getState(Ha);va=R=null;ra!=Ca?(ba=(new Date).getTime(),la=0,ra=Ca,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=Ca&&(this.updateThread=window.setTimeout(function(){null==R&&(ra=Ca,F.getDropTarget(ca,oa,ta,Ka))},this.dropTargetDelay+10))):la=(new Date).getTime()-ba;if(C&&2500>la&&null!=Ca&&!mxEvent.isShiftDown(Ka)&&(mxUtils.getValue(Ca.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(X,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(Ca.style,
+mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ca.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ca.style,mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(X,mxConstants.STYLE_SHAPE)||1500<la||ca.model.isEdge(Ca.cell))&&la>this.dropTargetDelay&&!this.isDropStyleTargetIgnored(Ca)&&(ca.model.isVertex(Ca.cell)&&null!=r||ca.model.isEdge(Ca.cell)&&ca.model.isEdge(e[0]))){if(ca.isCellEditable(Ca.cell)){S=
+Ca;var sa=ca.model.isEdge(Ca.cell)?ca.view.getPoint(Ca):new mxPoint(Ca.getCenterX(),Ca.getCenterY());sa=new mxRectangle(sa.x-this.refreshTarget.width/2,sa.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);aa.style.left=Math.floor(sa.x)+"px";aa.style.top=Math.floor(sa.y)+"px";null==ia&&(ca.container.appendChild(aa),ia=aa.parentNode);k(oa,ta,sa,aa)}}else null==S||!mxUtils.contains(S,oa,ta)||1500<la&&!mxEvent.isShiftDown(Ka)?(S=null,null!=ia&&(aa.parentNode.removeChild(aa),
+ia=null)):null!=S&&null!=ia&&(sa=ca.model.isEdge(S.cell)?ca.view.getPoint(S):new mxPoint(S.getCenterX(),S.getCenterY()),sa=new mxRectangle(sa.x-this.refreshTarget.width/2,sa.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height),k(oa,ta,sa,aa));if(T&&null!=D&&!mxEvent.isAltDown(Ka)&&null==R){va=mxRectangle.fromRectangle(D);if(ca.model.isEdge(D.cell)){var Da=D.absolutePoints;null!=ea.parentNode&&(sa=Da[0],va.add(k(oa,ta,new mxRectangle(sa.x-this.roundDrop.width/2,sa.y-this.roundDrop.height/
+2,this.roundDrop.width,this.roundDrop.height),ea)));null!=qa.parentNode&&(Da=Da[Da.length-1],va.add(k(oa,ta,new mxRectangle(Da.x-this.roundDrop.width/2,Da.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),qa)))}else sa=mxRectangle.fromRectangle(D),null!=D.shape&&null!=D.shape.boundingBox&&(sa=mxRectangle.fromRectangle(D.shape.boundingBox)),sa.grow(this.graph.tolerance),sa.grow(HoverIcons.prototype.arrowSpacing),Da=this.graph.selectionCellsHandler.getHandler(D.cell),null!=Da&&(sa.x-=
+Da.horizontalOffset/2,sa.y-=Da.verticalOffset/2,sa.width+=Da.horizontalOffset,sa.height+=Da.verticalOffset,null!=Da.rotationShape&&null!=Da.rotationShape.node&&"hidden"!=Da.rotationShape.node.style.visibility&&"none"!=Da.rotationShape.node.style.display&&null!=Da.rotationShape.boundingBox&&sa.add(Da.rotationShape.boundingBox)),va.add(k(oa,ta,new mxRectangle(D.getCenterX()-this.triangleUp.width/2,sa.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),P)),va.add(k(oa,ta,new mxRectangle(sa.x+
+sa.width,D.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),Z)),va.add(k(oa,ta,new mxRectangle(D.getCenterX()-this.triangleDown.width/2,sa.y+sa.height,this.triangleDown.width,this.triangleDown.height),U)),va.add(k(oa,ta,new mxRectangle(sa.x-this.triangleLeft.width,D.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),V));null!=va&&va.grow(10)}O=mxConstants.DIRECTION_NORTH;R==Z?O=mxConstants.DIRECTION_EAST:R==U||R==qa?
+O=mxConstants.DIRECTION_SOUTH:R==V&&(O=mxConstants.DIRECTION_WEST);null!=S&&R==aa&&(Ca=S);sa=(null==r||ca.isCellConnectable(e[r]))&&(ca.model.isEdge(Ha)&&null!=r||ca.model.isVertex(Ha)&&ca.isCellConnectable(Ha));if(null!=D&&5E3<=la||D!=Ca&&(null==va||!mxUtils.contains(va,oa,ta)||500<la&&null==R&&sa))if(T=!1,D=5E3>la&&la>this.dropTargetDelay||ca.model.isEdge(Ha)?Ca:null,null!=D&&sa){va=[ea,qa,P,Z,U,V];for(sa=0;sa<va.length;sa++)null!=va[sa].parentNode&&va[sa].parentNode.removeChild(va[sa]);ca.model.isEdge(Ha)?
+(Da=Ca.absolutePoints,null!=Da&&(sa=Da[0],Da=Da[Da.length-1],va=ca.tolerance,new mxRectangle(oa-va,ta-va,2*va,2*va),ea.style.left=Math.floor(sa.x-this.roundDrop.width/2)+"px",ea.style.top=Math.floor(sa.y-this.roundDrop.height/2)+"px",qa.style.left=Math.floor(Da.x-this.roundDrop.width/2)+"px",qa.style.top=Math.floor(Da.y-this.roundDrop.height/2)+"px",null==ca.model.getTerminal(Ha,!0)&&ca.container.appendChild(ea),null==ca.model.getTerminal(Ha,!1)&&ca.container.appendChild(qa))):(sa=mxRectangle.fromRectangle(Ca),
+null!=Ca.shape&&null!=Ca.shape.boundingBox&&(sa=mxRectangle.fromRectangle(Ca.shape.boundingBox)),sa.grow(this.graph.tolerance),sa.grow(HoverIcons.prototype.arrowSpacing),Da=this.graph.selectionCellsHandler.getHandler(Ca.cell),null!=Da&&(sa.x-=Da.horizontalOffset/2,sa.y-=Da.verticalOffset/2,sa.width+=Da.horizontalOffset,sa.height+=Da.verticalOffset,null!=Da.rotationShape&&null!=Da.rotationShape.node&&"hidden"!=Da.rotationShape.node.style.visibility&&"none"!=Da.rotationShape.node.style.display&&null!=
+Da.rotationShape.boundingBox&&sa.add(Da.rotationShape.boundingBox)),P.style.left=Math.floor(Ca.getCenterX()-this.triangleUp.width/2)+"px",P.style.top=Math.floor(sa.y-this.triangleUp.height)+"px",Z.style.left=Math.floor(sa.x+sa.width)+"px",Z.style.top=Math.floor(Ca.getCenterY()-this.triangleRight.height/2)+"px",U.style.left=P.style.left,U.style.top=Math.floor(sa.y+sa.height)+"px",V.style.left=Math.floor(sa.x-this.triangleLeft.width)+"px",V.style.top=Z.style.top,"eastwest"!=Ca.style.portConstraint&&
+(ca.container.appendChild(P),ca.container.appendChild(U)),ca.container.appendChild(Z),ca.container.appendChild(V));null!=Ca&&(N=ca.selectionCellsHandler.getHandler(Ca.cell),null!=N&&null!=N.setHandlesVisible&&N.setHandlesVisible(!1));T=!0}else for(va=[ea,qa,P,Z,U,V],sa=0;sa<va.length;sa++)null!=va[sa].parentNode&&va[sa].parentNode.removeChild(va[sa]);T||null==N||N.setHandlesVisible(!0);Ha=mxEvent.isAltDown(Ka)&&!mxEvent.isShiftDown(Ka)||null!=S&&R==aa?null:mxDragSource.prototype.getDropTarget.apply(this,
+arguments);va=ca.getModel();if(null!=Ha&&(null!=R||!ca.isSplitTarget(Ha,e,Ka))){for(;null!=Ha&&!ca.isValidDropTarget(Ha,e,Ka)&&va.isVertex(va.getParent(Ha));)Ha=va.getParent(Ha);null!=Ha&&(ca.view.currentRoot==Ha||!ca.isValidRoot(Ha)&&0==ca.getModel().getChildCount(Ha)||ca.isCellLocked(Ha)||va.isEdge(Ha)||!ca.isValidDropTarget(Ha,e,Ka))&&(Ha=null)}ca.isCellLocked(Ha)&&(Ha=null);return Ha});F.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,arguments);for(var ca=[ea,qa,aa,P,Z,U,V],oa=
+0;oa<ca.length;oa++)null!=ca[oa].parentNode&&ca[oa].parentNode.removeChild(ca[oa]);null!=D&&null!=N&&N.reset();R=ia=S=D=N=null};return F};
+Sidebar.prototype.itemClicked=function(a,b,f,e){e=this.editorUi.editor.graph;e.container.focus();if(mxEvent.isAltDown(f)&&1==e.getSelectionCount()&&e.model.isVertex(e.getSelectionCell())){b=null;for(var g=0;g<a.length&&null==b;g++)e.model.isVertex(a[g])&&(b=g);null!=b&&(e.setSelectionCells(this.dropAndConnect(e.getSelectionCell(),a,mxEvent.isMetaDown(f)||mxEvent.isControlDown(f)?mxEvent.isShiftDown(f)?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH:mxEvent.isShiftDown(f)?mxConstants.DIRECTION_EAST:
+mxConstants.DIRECTION_SOUTH,b,f)),e.scrollCellToVisible(e.getSelectionCell()))}else mxEvent.isShiftDown(f)&&!e.isSelectionEmpty()?(f=e.getEditableCells(e.getSelectionCells()),this.updateShapes(a[0],f),e.scrollCellToVisible(f)):(a=mxEvent.isAltDown(f)?e.getFreeInsertPoint():e.getCenterInsertPoint(e.getBoundingBoxFromGeometry(a,!0)),b.drop(e,f,null,a.x,a.y,!0))};
+Sidebar.prototype.addClickHandler=function(a,b,f){var e=b.mouseDown,g=b.mouseMove,d=b.mouseUp,k=this.editorUi.editor.graph.tolerance,n=null,u=this;b.mouseDown=function(m){e.apply(this,arguments);n=new mxPoint(mxEvent.getClientX(m),mxEvent.getClientY(m));null!=this.dragElement&&(this.dragElement.style.display="none",mxUtils.setOpacity(a,50))};b.mouseMove=function(m){null!=this.dragElement&&"none"==this.dragElement.style.display&&null!=n&&(Math.abs(n.x-mxEvent.getClientX(m))>k||Math.abs(n.y-mxEvent.getClientY(m))>
+k)&&(this.dragElement.style.display="",mxUtils.setOpacity(a,100));g.apply(this,arguments)};b.mouseUp=function(m){try{mxEvent.isPopupTrigger(m)||null!=this.currentGraph||null==this.dragElement||"none"!=this.dragElement.style.display||u.itemClicked(f,b,m,a),d.apply(b,arguments),mxUtils.setOpacity(a,100),n=null,u.currentElt=a}catch(r){b.reset(),u.editorUi.handleError(r)}}};
+Sidebar.prototype.createVertexTemplateEntry=function(a,b,f,e,g,d,k,n){null!=n&&null!=g&&(n+=" "+g);n=null!=n&&0<n.length?n:null!=g?g.toLowerCase():"";return this.addEntry(n,mxUtils.bind(this,function(){return this.createVertexTemplate(a,b,f,e,g,d,k)}))};Sidebar.prototype.createVertexTemplate=function(a,b,f,e,g,d,k,n,u){a=[new mxCell(null!=e?e:"",new mxGeometry(0,0,b,f),a)];a[0].vertex=!0;return this.createVertexTemplateFromCells(a,b,f,g,d,k,n,u)};
+Sidebar.prototype.createVertexTemplateFromData=function(a,b,f,e,g,d,k,n){a=mxUtils.parseXml(Graph.decompress(a));var u=new mxCodec(a),m=new mxGraphModel;u.decode(a.documentElement,m);a=this.graph.cloneCells(m.root.getChildAt(0).children);return this.createVertexTemplateFromCells(a,b,f,e,g,d,k,n)};Sidebar.prototype.createVertexTemplateFromCells=function(a,b,f,e,g,d,k,n){return this.createItem(a,e,g,d,b,f,k,n)};
+Sidebar.prototype.createEdgeTemplateEntry=function(a,b,f,e,g,d,k,n,u){k=null!=k&&0<k.length?k:g.toLowerCase();return this.addEntry(k,mxUtils.bind(this,function(){return this.createEdgeTemplate(a,b,f,e,g,d,n,u)}))};
+Sidebar.prototype.createEdgeTemplate=function(a,b,f,e,g,d,k,n){a=new mxCell(null!=e?e:"",new mxGeometry(0,0,b,f),a);a.geometry.setTerminalPoint(new mxPoint(0,f),!0);a.geometry.setTerminalPoint(new mxPoint(b,0),!1);a.geometry.relative=!0;a.edge=!0;return this.createEdgeTemplateFromCells([a],b,f,g,d,k,n)};Sidebar.prototype.createEdgeTemplateFromCells=function(a,b,f,e,g,d,k,n){return this.createItem(a,e,g,null!=n?n:!0,b,f,d,k)};
+Sidebar.prototype.addPaletteFunctions=function(a,b,f,e){this.addPalette(a,b,f,mxUtils.bind(this,function(g){for(var d=0;d<e.length;d++)g.appendChild(e[d](g))}))};
+Sidebar.prototype.addPalette=function(a,b,f,e){b=this.createTitle(b);this.container.appendChild(b);var g=document.createElement("div");g.className="geSidebar";mxClient.IS_POINTER&&(g.style.touchAction="none");f?(e(g),e=null):g.style.display="none";this.addFoldingHandler(b,g,e);f=document.createElement("div");f.appendChild(g);this.container.appendChild(f);null!=a&&(this.palettes[a]=[b,f]);return g};
+Sidebar.prototype.addFoldingHandler=function(a,b,f){var e=!1;if(!mxClient.IS_IE||8<=document.documentMode)a.style.backgroundImage="none"==b.style.display?"url('"+this.collapsedImage+"')":"url('"+this.expandedImage+"')";a.style.backgroundRepeat="no-repeat";a.style.backgroundPosition="0% 50%";mxEvent.addListener(a,"click",mxUtils.bind(this,function(g){if("none"==b.style.display){if(e)b.style.display="block";else if(e=!0,null!=f){a.style.cursor="wait";var d=a.innerHTML;a.innerHTML=mxResources.get("loading")+
+"...";window.setTimeout(function(){b.style.display="block";a.style.cursor="";a.innerHTML=d;var k=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;f(b,a);mxClient.NO_FO=k},mxClient.IS_FF?20:0)}else b.style.display="block";a.style.backgroundImage="url('"+this.expandedImage+"')"}else a.style.backgroundImage="url('"+this.collapsedImage+"')",b.style.display="none";mxEvent.consume(g)}));mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(g){g.preventDefault()}))};
Sidebar.prototype.removePalette=function(a){var b=this.palettes[a];if(null!=b){this.palettes[a]=null;for(a=0;a<b.length;a++)this.container.removeChild(b[a]);return!0}return!1};
-Sidebar.prototype.addImagePalette=function(a,b,f,d,g,e,k){for(var n=[],u=0;u<g.length;u++)mxUtils.bind(this,function(m,r,x){if(null==x){x=m.lastIndexOf("/");var B=m.lastIndexOf(".");x=m.substring(0<=x?x+1:0,0<=B?B:m.length).replace(/[-_]/g," ")}n.push(this.createVertexTemplateEntry("image;html=1;image="+f+m+d,this.defaultImageWidth,this.defaultImageHeight,"",r,null!=r,null,this.filterTags(x)))})(g[u],null!=e?e[u]:null,null!=k?k[g[u]]:null);this.addPaletteFunctions(a,b,!1,n)};
-Sidebar.prototype.getTagsForStencil=function(a,b,f){a=a.split(".");for(var d=1;d<a.length;d++)a[d]=a[d].replace(/_/g," ");a.push(b.replace(/_/g," "));null!=f&&a.push(f);return a.slice(1,a.length)};
-Sidebar.prototype.addStencilPalette=function(a,b,f,d,g,e,k,n,u,m){k=null!=k?k:1;if(this.addStencilsToIndex){var r=[];if(null!=u)for(m=0;m<u.length;m++)r.push(u[m]);mxStencilRegistry.loadStencilSet(f,mxUtils.bind(this,function(x,B,C,G,J){if(null==g||0>mxUtils.indexOf(g,B)){C=this.getTagsForStencil(x,B);var D=null!=n?n[B]:null;null!=D&&C.push(D);r.push(this.createVertexTemplateEntry("shape="+x+B.toLowerCase()+d,Math.round(G*k),Math.round(J*k),"",B.replace(/_/g," "),null,null,this.filterTags(C.join(" "))))}}),
-!0,!0);this.addPaletteFunctions(a,b,!1,r)}else this.addPalette(a,b,!1,mxUtils.bind(this,function(x){null==d&&(d="");null!=e&&e.call(this,x);if(null!=u)for(var B=0;B<u.length;B++)u[B](x);mxStencilRegistry.loadStencilSet(f,mxUtils.bind(this,function(C,G,J,D,N){(null==g||0>mxUtils.indexOf(g,G))&&x.appendChild(this.createVertexTemplate("shape="+C+G.toLowerCase()+d,Math.round(D*k),Math.round(N*k),"",G.replace(/_/g," "),!0))}),!0)}))};
+Sidebar.prototype.addImagePalette=function(a,b,f,e,g,d,k){for(var n=[],u=0;u<g.length;u++)mxUtils.bind(this,function(m,r,x){if(null==x){x=m.lastIndexOf("/");var B=m.lastIndexOf(".");x=m.substring(0<=x?x+1:0,0<=B?B:m.length).replace(/[-_]/g," ")}n.push(this.createVertexTemplateEntry("image;html=1;image="+f+m+e,this.defaultImageWidth,this.defaultImageHeight,"",r,null!=r,null,this.filterTags(x)))})(g[u],null!=d?d[u]:null,null!=k?k[g[u]]:null);this.addPaletteFunctions(a,b,!1,n)};
+Sidebar.prototype.getTagsForStencil=function(a,b,f){a=a.split(".");for(var e=1;e<a.length;e++)a[e]=a[e].replace(/_/g," ");a.push(b.replace(/_/g," "));null!=f&&a.push(f);return a.slice(1,a.length)};
+Sidebar.prototype.addStencilPalette=function(a,b,f,e,g,d,k,n,u,m){k=null!=k?k:1;if(this.addStencilsToIndex){var r=[];if(null!=u)for(m=0;m<u.length;m++)r.push(u[m]);mxStencilRegistry.loadStencilSet(f,mxUtils.bind(this,function(x,B,C,F,J){if(null==g||0>mxUtils.indexOf(g,B)){C=this.getTagsForStencil(x,B);var D=null!=n?n[B]:null;null!=D&&C.push(D);r.push(this.createVertexTemplateEntry("shape="+x+B.toLowerCase()+e,Math.round(F*k),Math.round(J*k),"",B.replace(/_/g," "),null,null,this.filterTags(C.join(" "))))}}),
+!0,!0);this.addPaletteFunctions(a,b,!1,r)}else this.addPalette(a,b,!1,mxUtils.bind(this,function(x){null==e&&(e="");null!=d&&d.call(this,x);if(null!=u)for(var B=0;B<u.length;B++)u[B](x);mxStencilRegistry.loadStencilSet(f,mxUtils.bind(this,function(C,F,J,D,N){(null==g||0>mxUtils.indexOf(g,F))&&x.appendChild(this.createVertexTemplate("shape="+C+F.toLowerCase()+e,Math.round(D*k),Math.round(N*k),"",F.replace(/_/g," "),!0))}),!0)}))};
Sidebar.prototype.destroy=function(){null!=this.graph&&(null!=this.graph.container&&null!=this.graph.container.parentNode&&this.graph.container.parentNode.removeChild(this.graph.container),this.graph.destroy(),this.graph=null);null!=this.pointerUpHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerup":"mouseup",this.pointerUpHandler),this.pointerUpHandler=null);null!=this.pointerDownHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerdown":"mousedown",this.pointerDownHandler),
-this.pointerDownHandler=null);null!=this.pointerMoveHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.pointerMoveHandler),this.pointerMoveHandler=null);null!=this.pointerOutHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerout":"mouseout",this.pointerOutHandler),this.pointerOutHandler=null)};(function(){var a=[["nbsp","160"],["shy","173"]],b=mxUtils.parseXml;mxUtils.parseXml=function(f){for(var d=0;d<a.length;d++)f=f.replace(new RegExp("&"+a[d][0]+";","g"),"&#"+a[d][1]+";");return b(f)}})();
+this.pointerDownHandler=null);null!=this.pointerMoveHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.pointerMoveHandler),this.pointerMoveHandler=null);null!=this.pointerOutHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerout":"mouseout",this.pointerOutHandler),this.pointerOutHandler=null)};(function(){var a=[["nbsp","160"],["shy","173"]],b=mxUtils.parseXml;mxUtils.parseXml=function(f){for(var e=0;e<a.length;e++)f=f.replace(new RegExp("&"+a[e][0]+";","g"),"&#"+a[e][1]+";");return b(f)}})();
Date.prototype.toISOString||function(){function a(b){b=String(b);1===b.length&&(b="0"+b);return b}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+a(this.getUTCMonth()+1)+"-"+a(this.getUTCDate())+"T"+a(this.getUTCHours())+":"+a(this.getUTCMinutes())+":"+a(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"}}();Date.now||(Date.now=function(){return(new Date).getTime()});
-Uint8Array.from||(Uint8Array.from=function(){var a=Object.prototype.toString,b=function(d){return"function"===typeof d||"[object Function]"===a.call(d)},f=Math.pow(2,53)-1;return function(d){var g=Object(d);if(null==d)throw new TypeError("Array.from requires an array-like object - not null or undefined");var e=1<arguments.length?arguments[1]:void 0,k;if("undefined"!==typeof e){if(!b(e))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(k=
-arguments[2])}var n=Number(g.length);n=isNaN(n)?0:0!==n&&isFinite(n)?(0<n?1:-1)*Math.floor(Math.abs(n)):n;n=Math.min(Math.max(n,0),f);for(var u=b(this)?Object(new this(n)):Array(n),m=0,r;m<n;)r=g[m],u[m]=e?"undefined"===typeof k?e(r,m):e.call(k,r,m):r,m+=1;u.length=n;return u}}());mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.METERS=4;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";
+Uint8Array.from||(Uint8Array.from=function(){var a=Object.prototype.toString,b=function(e){return"function"===typeof e||"[object Function]"===a.call(e)},f=Math.pow(2,53)-1;return function(e){var g=Object(e);if(null==e)throw new TypeError("Array.from requires an array-like object - not null or undefined");var d=1<arguments.length?arguments[1]:void 0,k;if("undefined"!==typeof d){if(!b(d))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(k=
+arguments[2])}var n=Number(g.length);n=isNaN(n)?0:0!==n&&isFinite(n)?(0<n?1:-1)*Math.floor(Math.abs(n)):n;n=Math.min(Math.max(n,0),f);for(var u=b(this)?Object(new this(n)):Array(n),m=0,r;m<n;)r=g[m],u[m]=d?"undefined"===typeof k?d(r,m):d.call(k,r,m):r,m+=1;u.length=n;return u}}());mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.METERS=4;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";
mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxCodec.allowlist="mxStylesheet Array mxGraphModel mxCell mxGeometry mxRectangle mxPoint mxChildChange mxRootChange mxTerminalChange mxValueChange mxStyleChange mxGeometryChange mxCollapseChange mxVisibleChange mxCellAttributeChange".split(" ");mxGraph.prototype.pageBreakColor="#c0c0c0";mxGraph.prototype.pageScale=1;
(function(){try{if(null!=navigator&&null!=navigator.language){var a=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===a||"en-ca"===a||"es-mx"===a?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(b){}})();mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;
mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=":IMAGE_PATH+"/grid.gif";mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.defaultGridColor="#d0d0d0";mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultGridColor;mxGraphView.prototype.unit=mxConstants.POINTS;
mxGraphView.prototype.setUnit=function(a){this.unit!=a&&(this.unit=a,this.fireEvent(new mxEventObject("unitChanged","unit",a)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(a,b,f){return null};
mxImageShape.prototype.getImageDataUri=function(){var a=this.image;if("data:image/svg+xml;base64,"==a.substring(0,26)&&null!=this.style&&"1"==mxUtils.getValue(this.style,"clipSvg","0")){if(null==this.clippedSvg||this.clippedImage!=a)this.clippedSvg=Graph.clipSvgDataUri(a,!0),this.clippedImage=a;a=this.clippedSvg}return a};
-Graph=function(a,b,f,d,g,e){mxGraph.call(this,a,b,f,d);this.themes=g||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=e?e:!1;a=this.baseUrl;b=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<b&&(b=a.indexOf("/",b+2),0<b&&(this.domainUrl=a.substring(0,b)),b=a.lastIndexOf("/"),0<b&&(this.domainPathUrl=a.substring(0,b+1)));this.isHtmlLabel=function(O){O=this.getCurrentCellStyle(O);
-return null!=O?"1"==O.html||"wrap"==O[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var k=null,n=null,u=null,m=null,r=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(O,S){if("mouseDown"==S.getProperty("eventName")&&this.isEnabled()){O=S.getProperty("event");var F=O.getState();S=this.view.scale;if(!mxEvent.isAltDown(O.getEvent())&&null!=F)if(this.model.isEdge(F.cell))if(k=new mxPoint(O.getGraphX(),O.getGraphY()),r=this.isCellSelected(F.cell),u=F,n=O,null!=F.text&&null!=
-F.text.boundingBox&&mxUtils.contains(F.text.boundingBox,O.getGraphX(),O.getGraphY()))m=mxEvent.LABEL_HANDLE;else{var L=this.selectionCellsHandler.getHandler(F.cell);null!=L&&null!=L.bends&&0<L.bends.length&&(m=L.getHandleForEvent(O))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(O.getEvent())&&(L=this.selectionCellsHandler.getHandler(F.cell),null==L||null==L.getHandleForEvent(O))){var T=new mxRectangle(O.getGraphX()-1,O.getGraphY()-1),ca=mxEvent.isTouchEvent(O.getEvent())?mxShape.prototype.svgStrokeTolerance-
-1:(mxShape.prototype.svgStrokeTolerance+2)/2;L=ca+2;T.grow(ca);if(this.isTableCell(F.cell)&&!this.isCellSelected(F.cell)&&!(mxUtils.contains(F,O.getGraphX()-L,O.getGraphY()-L)&&mxUtils.contains(F,O.getGraphX()-L,O.getGraphY()+L)&&mxUtils.contains(F,O.getGraphX()+L,O.getGraphY()+L)&&mxUtils.contains(F,O.getGraphX()+L,O.getGraphY()-L))){var fa=this.model.getParent(F.cell);L=this.model.getParent(fa);if(!this.isCellSelected(L)){ca*=S;var wa=2*ca;if(this.model.getChildAt(L,0)!=fa&&mxUtils.intersects(T,
-new mxRectangle(F.x,F.y-ca,F.width,wa))||this.model.getChildAt(fa,0)!=F.cell&&mxUtils.intersects(T,new mxRectangle(F.x-ca,F.y,wa,F.height))||mxUtils.intersects(T,new mxRectangle(F.x,F.y+F.height-ca,F.width,wa))||mxUtils.intersects(T,new mxRectangle(F.x+F.width-ca,F.y,wa,F.height)))fa=this.selectionCellsHandler.isHandled(L),this.selectCellForEvent(L,O.getEvent()),L=this.selectionCellsHandler.getHandler(L),null!=L&&(ca=L.getHandleForEvent(O),null!=ca&&(L.start(O.getGraphX(),O.getGraphY(),ca),L.blockDelayedSelection=
-!fa,O.consume()))}}for(;!O.isConsumed()&&null!=F&&(this.isTableCell(F.cell)||this.isTableRow(F.cell)||this.isTable(F.cell));)this.isSwimlane(F.cell)&&(L=this.getActualStartSize(F.cell),(0<L.x||0<L.width)&&mxUtils.intersects(T,new mxRectangle(F.x+(L.x-L.width-1)*S+(0==L.x?F.width:0),F.y,1,F.height))||(0<L.y||0<L.height)&&mxUtils.intersects(T,new mxRectangle(F.x,F.y+(L.y-L.height-1)*S+(0==L.y?F.height:0),F.width,1)))&&(this.selectCellForEvent(F.cell,O.getEvent()),L=this.selectionCellsHandler.getHandler(F.cell),
-null!=L&&(ca=mxEvent.CUSTOM_HANDLE-L.customHandles.length+1,L.start(O.getGraphX(),O.getGraphY(),ca),O.consume())),F=this.view.getState(this.model.getParent(F.cell))}}}));this.addMouseListener({mouseDown:function(O,S){},mouseMove:mxUtils.bind(this,function(O,S){O=this.selectionCellsHandler.handlers.map;for(var F in O)if(null!=O[F].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(S.getEvent())){var L=this.tolerance;if(null!=k&&null!=u&&null!=n){if(F=u,Math.abs(k.x-
-S.getGraphX())>L||Math.abs(k.y-S.getGraphY())>L){var T=this.selectionCellsHandler.getHandler(F.cell);null==T&&this.model.isEdge(F.cell)&&(T=this.createHandler(F));if(null!=T&&null!=T.bends&&0<T.bends.length){O=T.getHandleForEvent(n);var ca=this.view.getEdgeStyle(F);L=ca==mxEdgeStyle.EntityRelation;r||m!=mxEvent.LABEL_HANDLE||(O=m);if(L&&0!=O&&O!=T.bends.length-1&&O!=mxEvent.LABEL_HANDLE)!L||null==F.visibleSourceState&&null==F.visibleTargetState||(this.graphHandler.reset(),S.consume());else if(O==
-mxEvent.LABEL_HANDLE||0==O||null!=F.visibleSourceState||O==T.bends.length-1||null!=F.visibleTargetState)L||O==mxEvent.LABEL_HANDLE||(L=F.absolutePoints,null!=L&&(null==ca&&null==O||ca==mxEdgeStyle.OrthConnector)&&(O=m,null==O&&(O=new mxRectangle(k.x,k.y),O.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(O,L[0].x,L[0].y)?O=0:mxUtils.contains(O,L[L.length-1].x,L[L.length-1].y)?O=T.bends.length-1:null!=ca&&(2==L.length||3==L.length&&(0==Math.round(L[0].x-L[1].x)&&0==Math.round(L[1].x-
-L[2].x)||0==Math.round(L[0].y-L[1].y)&&0==Math.round(L[1].y-L[2].y)))?O=2:(O=mxUtils.findNearestSegment(F,k.x,k.y),O=null==ca?mxEvent.VIRTUAL_HANDLE-O:O+1))),null==O&&(O=mxEvent.VIRTUAL_HANDLE)),T.start(S.getGraphX(),S.getGraphX(),O),S.consume(),this.graphHandler.reset()}null!=T&&(this.selectionCellsHandler.isHandlerActive(T)?this.isCellSelected(F.cell)||(this.selectionCellsHandler.handlers.put(F.cell,T),this.selectCellForEvent(F.cell,S.getEvent())):this.isCellSelected(F.cell)||T.destroy());r=!1;
-k=n=u=m=null}}else if(F=S.getState(),null!=F&&this.isCellEditable(F.cell)){T=null;if(this.model.isEdge(F.cell)){if(O=new mxRectangle(S.getGraphX(),S.getGraphY()),O.grow(mxEdgeHandler.prototype.handleImage.width/2),L=F.absolutePoints,null!=L)if(null!=F.text&&null!=F.text.boundingBox&&mxUtils.contains(F.text.boundingBox,S.getGraphX(),S.getGraphY()))T="move";else if(mxUtils.contains(O,L[0].x,L[0].y)||mxUtils.contains(O,L[L.length-1].x,L[L.length-1].y))T="pointer";else if(null!=F.visibleSourceState||
-null!=F.visibleTargetState)O=this.view.getEdgeStyle(F),T="crosshair",O!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(F)&&(S=mxUtils.findNearestSegment(F,S.getGraphX(),S.getGraphY()),S<L.length-1&&0<=S&&(T=0==Math.round(L[S].x-L[S+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(S.getEvent())){L=mxShape.prototype.svgStrokeTolerance/2;O=new mxRectangle(S.getGraphX(),S.getGraphY());O.grow(L);if(this.isTableCell(F.cell)&&(S=this.model.getParent(F.cell),L=this.model.getParent(S),!this.isCellSelected(L)))if(mxUtils.intersects(O,
-new mxRectangle(F.x,F.y-2,F.width,4))&&this.model.getChildAt(L,0)!=S||mxUtils.intersects(O,new mxRectangle(F.x,F.y+F.height-2,F.width,4)))T="row-resize";else if(mxUtils.intersects(O,new mxRectangle(F.x-2,F.y,4,F.height))&&this.model.getChildAt(S,0)!=F.cell||mxUtils.intersects(O,new mxRectangle(F.x+F.width-2,F.y,4,F.height)))T="col-resize";for(S=F;null==T&&null!=S&&(this.isTableCell(S.cell)||this.isTableRow(S.cell)||this.isTable(S.cell));)this.isSwimlane(S.cell)&&(L=this.getActualStartSize(S.cell),
-ca=this.view.scale,(0<L.x||0<L.width)&&mxUtils.intersects(O,new mxRectangle(S.x+(L.x-L.width-1)*ca+(0==L.x?S.width*ca:0),S.y,1,S.height))?T="col-resize":(0<L.y||0<L.height)&&mxUtils.intersects(O,new mxRectangle(S.x,S.y+(L.y-L.height-1)*ca+(0==L.y?S.height:0),S.width,1))&&(T="row-resize")),S=this.view.getState(this.model.getParent(S.cell))}null!=T&&F.setCursor(T)}}}),mouseUp:mxUtils.bind(this,function(O,S){m=k=n=u=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(O){var S=
-mxCellRenderer.prototype.getLabelValue.apply(this,arguments);O.view.graph.isHtmlLabel(O.cell)&&(S=1!=O.style.html?mxUtils.htmlEntities(S,!1):O.view.graph.sanitizeHtml(S));return S};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(O,S){return!1};this.alternateEdgeStyle="vertical";null==d&&this.loadStylesheet();var x=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var O=x.apply(this,arguments);if(this.graph.pageVisible){var S=[],F=this.graph.pageFormat,L=this.graph.pageScale,T=F.width*L;F=F.height*L;L=this.graph.view.translate;for(var ca=this.graph.view.scale,fa=
-this.graph.getPageLayout(),wa=0;wa<fa.width;wa++)S.push(new mxRectangle(((fa.x+wa)*T+L.x)*ca,(fa.y*F+L.y)*ca,T*ca,F*ca));for(wa=1;wa<fa.height;wa++)S.push(new mxRectangle((fa.x*T+L.x)*ca,((fa.y+wa)*F+L.y)*ca,T*ca,F*ca));O=S.concat(O)}return O};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(O,S){return null==O.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(O){this.previewColor="#000000"==this.graph.background?
-"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var B=this.graphHandler.getCells;this.graphHandler.getCells=function(O){for(var S=B.apply(this,arguments),F=new mxDictionary,L=[],T=0;T<S.length;T++){var ca=this.graph.isTableCell(O)&&this.graph.isTableCell(S[T])&&this.graph.isCellSelected(S[T])?this.graph.model.getParent(S[T]):this.graph.isTableRow(O)&&this.graph.isTableRow(S[T])&&this.graph.isCellSelected(S[T])?S[T]:this.graph.getCompositeParent(S[T]);
-null==ca||F.get(ca)||(F.put(ca,!0),L.push(ca))}return L};var C=this.graphHandler.start;this.graphHandler.start=function(O,S,F,L){var T=!1;this.graph.isTableCell(O)&&(this.graph.isCellSelected(O)?T=!0:O=this.graph.model.getParent(O));T||this.graph.isTableRow(O)&&this.graph.isCellSelected(O)||(O=this.graph.getCompositeParent(O));C.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(O,S){S=this.graph.getCompositeParent(S);return mxConnectionHandler.prototype.createTargetVertex.apply(this,
-arguments)};var G=new mxRubberband(this);this.getRubberband=function(){return G};var J=(new Date).getTime(),D=0,N=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var O=this.currentState;N.apply(this,arguments);O!=this.currentState?(J=(new Date).getTime(),D=0):D=(new Date).getTime()-J};var Q=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(O){return mxEvent.isShiftDown(O.getEvent())&&mxEvent.isAltDown(O.getEvent())?!1:null!=
-this.currentState&&O.getState()==this.currentState&&2E3<D||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&Q.apply(this,arguments)};var R=this.isToggleEvent;this.isToggleEvent=function(O){return R.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(O)};var P=G.isForceRubberbandEvent;G.isForceRubberbandEvent=function(O){return P.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(O.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&
+Graph=function(a,b,f,e,g,d){mxGraph.call(this,a,b,f,e);this.themes=g||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=d?d:!1;a=this.baseUrl;b=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<b&&(b=a.indexOf("/",b+2),0<b&&(this.domainUrl=a.substring(0,b)),b=a.lastIndexOf("/"),0<b&&(this.domainPathUrl=a.substring(0,b+1)));this.isHtmlLabel=function(O){O=this.getCurrentCellStyle(O);
+return null!=O?"1"==O.html||"wrap"==O[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var k=null,n=null,u=null,m=null,r=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(O,R){if("mouseDown"==R.getProperty("eventName")&&this.isEnabled()){O=R.getProperty("event");var G=O.getState();R=this.view.scale;if(!mxEvent.isAltDown(O.getEvent())&&null!=G)if(this.model.isEdge(G.cell))if(k=new mxPoint(O.getGraphX(),O.getGraphY()),r=this.isCellSelected(G.cell),u=G,n=O,null!=G.text&&null!=
+G.text.boundingBox&&mxUtils.contains(G.text.boundingBox,O.getGraphX(),O.getGraphY()))m=mxEvent.LABEL_HANDLE;else{var K=this.selectionCellsHandler.getHandler(G.cell);null!=K&&null!=K.bends&&0<K.bends.length&&(m=K.getHandleForEvent(O))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(O.getEvent())&&(K=this.selectionCellsHandler.getHandler(G.cell),null==K||null==K.getHandleForEvent(O))){var Q=new mxRectangle(O.getGraphX()-1,O.getGraphY()-1),ba=mxEvent.isTouchEvent(O.getEvent())?mxShape.prototype.svgStrokeTolerance-
+1:(mxShape.prototype.svgStrokeTolerance+2)/2;K=ba+2;Q.grow(ba);if(this.isTableCell(G.cell)&&!this.isCellSelected(G.cell)&&!(mxUtils.contains(G,O.getGraphX()-K,O.getGraphY()-K)&&mxUtils.contains(G,O.getGraphX()-K,O.getGraphY()+K)&&mxUtils.contains(G,O.getGraphX()+K,O.getGraphY()+K)&&mxUtils.contains(G,O.getGraphX()+K,O.getGraphY()-K))){var la=this.model.getParent(G.cell);K=this.model.getParent(la);if(!this.isCellSelected(K)){ba*=R;var ra=2*ba;if(this.model.getChildAt(K,0)!=la&&mxUtils.intersects(Q,
+new mxRectangle(G.x,G.y-ba,G.width,ra))||this.model.getChildAt(la,0)!=G.cell&&mxUtils.intersects(Q,new mxRectangle(G.x-ba,G.y,ra,G.height))||mxUtils.intersects(Q,new mxRectangle(G.x,G.y+G.height-ba,G.width,ra))||mxUtils.intersects(Q,new mxRectangle(G.x+G.width-ba,G.y,ra,G.height)))la=this.selectionCellsHandler.isHandled(K),this.selectCellForEvent(K,O.getEvent()),K=this.selectionCellsHandler.getHandler(K),null!=K&&(ba=K.getHandleForEvent(O),null!=ba&&(K.start(O.getGraphX(),O.getGraphY(),ba),K.blockDelayedSelection=
+!la,O.consume()))}}for(;!O.isConsumed()&&null!=G&&(this.isTableCell(G.cell)||this.isTableRow(G.cell)||this.isTable(G.cell));)this.isSwimlane(G.cell)&&(K=this.getActualStartSize(G.cell),(0<K.x||0<K.width)&&mxUtils.intersects(Q,new mxRectangle(G.x+(K.x-K.width-1)*R+(0==K.x?G.width:0),G.y,1,G.height))||(0<K.y||0<K.height)&&mxUtils.intersects(Q,new mxRectangle(G.x,G.y+(K.y-K.height-1)*R+(0==K.y?G.height:0),G.width,1)))&&(this.selectCellForEvent(G.cell,O.getEvent()),K=this.selectionCellsHandler.getHandler(G.cell),
+null!=K&&(ba=mxEvent.CUSTOM_HANDLE-K.customHandles.length+1,K.start(O.getGraphX(),O.getGraphY(),ba),O.consume())),G=this.view.getState(this.model.getParent(G.cell))}}}));this.addMouseListener({mouseDown:function(O,R){},mouseMove:mxUtils.bind(this,function(O,R){O=this.selectionCellsHandler.handlers.map;for(var G in O)if(null!=O[G].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(R.getEvent())){var K=this.tolerance;if(null!=k&&null!=u&&null!=n){if(G=u,Math.abs(k.x-
+R.getGraphX())>K||Math.abs(k.y-R.getGraphY())>K){var Q=this.selectionCellsHandler.getHandler(G.cell);null==Q&&this.model.isEdge(G.cell)&&(Q=this.createHandler(G));if(null!=Q&&null!=Q.bends&&0<Q.bends.length){O=Q.getHandleForEvent(n);var ba=this.view.getEdgeStyle(G);K=ba==mxEdgeStyle.EntityRelation;r||m!=mxEvent.LABEL_HANDLE||(O=m);if(K&&0!=O&&O!=Q.bends.length-1&&O!=mxEvent.LABEL_HANDLE)!K||null==G.visibleSourceState&&null==G.visibleTargetState||(this.graphHandler.reset(),R.consume());else if(O==
+mxEvent.LABEL_HANDLE||0==O||null!=G.visibleSourceState||O==Q.bends.length-1||null!=G.visibleTargetState)K||O==mxEvent.LABEL_HANDLE||(K=G.absolutePoints,null!=K&&(null==ba&&null==O||ba==mxEdgeStyle.OrthConnector)&&(O=m,null==O&&(O=new mxRectangle(k.x,k.y),O.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(O,K[0].x,K[0].y)?O=0:mxUtils.contains(O,K[K.length-1].x,K[K.length-1].y)?O=Q.bends.length-1:null!=ba&&(2==K.length||3==K.length&&(0==Math.round(K[0].x-K[1].x)&&0==Math.round(K[1].x-
+K[2].x)||0==Math.round(K[0].y-K[1].y)&&0==Math.round(K[1].y-K[2].y)))?O=2:(O=mxUtils.findNearestSegment(G,k.x,k.y),O=null==ba?mxEvent.VIRTUAL_HANDLE-O:O+1))),null==O&&(O=mxEvent.VIRTUAL_HANDLE)),Q.start(R.getGraphX(),R.getGraphX(),O),R.consume(),this.graphHandler.reset()}null!=Q&&(this.selectionCellsHandler.isHandlerActive(Q)?this.isCellSelected(G.cell)||(this.selectionCellsHandler.handlers.put(G.cell,Q),this.selectCellForEvent(G.cell,R.getEvent())):this.isCellSelected(G.cell)||Q.destroy());r=!1;
+k=n=u=m=null}}else if(G=R.getState(),null!=G&&this.isCellEditable(G.cell)){Q=null;if(this.model.isEdge(G.cell)){if(O=new mxRectangle(R.getGraphX(),R.getGraphY()),O.grow(mxEdgeHandler.prototype.handleImage.width/2),K=G.absolutePoints,null!=K)if(null!=G.text&&null!=G.text.boundingBox&&mxUtils.contains(G.text.boundingBox,R.getGraphX(),R.getGraphY()))Q="move";else if(mxUtils.contains(O,K[0].x,K[0].y)||mxUtils.contains(O,K[K.length-1].x,K[K.length-1].y))Q="pointer";else if(null!=G.visibleSourceState||
+null!=G.visibleTargetState)O=this.view.getEdgeStyle(G),Q="crosshair",O!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(G)&&(R=mxUtils.findNearestSegment(G,R.getGraphX(),R.getGraphY()),R<K.length-1&&0<=R&&(Q=0==Math.round(K[R].x-K[R+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(R.getEvent())){K=mxShape.prototype.svgStrokeTolerance/2;O=new mxRectangle(R.getGraphX(),R.getGraphY());O.grow(K);if(this.isTableCell(G.cell)&&(R=this.model.getParent(G.cell),K=this.model.getParent(R),!this.isCellSelected(K)))if(mxUtils.intersects(O,
+new mxRectangle(G.x,G.y-2,G.width,4))&&this.model.getChildAt(K,0)!=R||mxUtils.intersects(O,new mxRectangle(G.x,G.y+G.height-2,G.width,4)))Q="row-resize";else if(mxUtils.intersects(O,new mxRectangle(G.x-2,G.y,4,G.height))&&this.model.getChildAt(R,0)!=G.cell||mxUtils.intersects(O,new mxRectangle(G.x+G.width-2,G.y,4,G.height)))Q="col-resize";for(R=G;null==Q&&null!=R&&(this.isTableCell(R.cell)||this.isTableRow(R.cell)||this.isTable(R.cell));)this.isSwimlane(R.cell)&&(K=this.getActualStartSize(R.cell),
+ba=this.view.scale,(0<K.x||0<K.width)&&mxUtils.intersects(O,new mxRectangle(R.x+(K.x-K.width-1)*ba+(0==K.x?R.width*ba:0),R.y,1,R.height))?Q="col-resize":(0<K.y||0<K.height)&&mxUtils.intersects(O,new mxRectangle(R.x,R.y+(K.y-K.height-1)*ba+(0==K.y?R.height:0),R.width,1))&&(Q="row-resize")),R=this.view.getState(this.model.getParent(R.cell))}null!=Q&&G.setCursor(Q)}}}),mouseUp:mxUtils.bind(this,function(O,R){m=k=n=u=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(O){var R=
+mxCellRenderer.prototype.getLabelValue.apply(this,arguments);O.view.graph.isHtmlLabel(O.cell)&&(R=1!=O.style.html?mxUtils.htmlEntities(R,!1):O.view.graph.sanitizeHtml(R));return R};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(O,R){return!1};this.alternateEdgeStyle="vertical";null==e&&this.loadStylesheet();var x=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var O=x.apply(this,arguments);if(this.graph.pageVisible){var R=[],G=this.graph.pageFormat,K=this.graph.pageScale,Q=G.width*K;G=G.height*K;K=this.graph.view.translate;for(var ba=this.graph.view.scale,la=
+this.graph.getPageLayout(),ra=0;ra<la.width;ra++)R.push(new mxRectangle(((la.x+ra)*Q+K.x)*ba,(la.y*G+K.y)*ba,Q*ba,G*ba));for(ra=1;ra<la.height;ra++)R.push(new mxRectangle((la.x*Q+K.x)*ba,((la.y+ra)*G+K.y)*ba,Q*ba,G*ba));O=R.concat(O)}return O};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(O,R){return null==O.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(O){this.previewColor="#000000"==this.graph.background?
+"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var B=this.graphHandler.getCells;this.graphHandler.getCells=function(O){for(var R=B.apply(this,arguments),G=new mxDictionary,K=[],Q=0;Q<R.length;Q++){var ba=this.graph.isTableCell(O)&&this.graph.isTableCell(R[Q])&&this.graph.isCellSelected(R[Q])?this.graph.model.getParent(R[Q]):this.graph.isTableRow(O)&&this.graph.isTableRow(R[Q])&&this.graph.isCellSelected(R[Q])?R[Q]:this.graph.getCompositeParent(R[Q]);
+null==ba||G.get(ba)||(G.put(ba,!0),K.push(ba))}return K};var C=this.graphHandler.start;this.graphHandler.start=function(O,R,G,K){var Q=!1;this.graph.isTableCell(O)&&(this.graph.isCellSelected(O)?Q=!0:O=this.graph.model.getParent(O));Q||this.graph.isTableRow(O)&&this.graph.isCellSelected(O)||(O=this.graph.getCompositeParent(O));C.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(O,R){R=this.graph.getCompositeParent(R);return mxConnectionHandler.prototype.createTargetVertex.apply(this,
+arguments)};var F=new mxRubberband(this);this.getRubberband=function(){return F};var J=(new Date).getTime(),D=0,N=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var O=this.currentState;N.apply(this,arguments);O!=this.currentState?(J=(new Date).getTime(),D=0):D=(new Date).getTime()-J};var S=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(O){return mxEvent.isShiftDown(O.getEvent())&&mxEvent.isAltDown(O.getEvent())?!1:null!=
+this.currentState&&O.getState()==this.currentState&&2E3<D||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&S.apply(this,arguments)};var T=this.isToggleEvent;this.isToggleEvent=function(O){return T.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(O)};var P=F.isForceRubberbandEvent;F.isForceRubberbandEvent=function(O){return P.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(O.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&
mxClient.IS_FF&&mxClient.IS_WIN&&null==O.getState()&&mxEvent.isTouchEvent(O.getEvent())};var Z=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(Z=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=Z)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(O){return mxEvent.isMouseEvent(O.getEvent())};
-var U=this.click;this.click=function(O){var S=null==O.state&&null!=O.sourceState&&this.isCellLocked(O.sourceState.cell);if(this.isEnabled()&&!S||O.isConsumed())return U.apply(this,arguments);var F=S?O.sourceState.cell:O.getCell();null!=F&&(F=this.getClickableLinkForCell(F),null!=F&&(this.isCustomLink(F)?this.customLinkClicked(F):this.openLink(F)));this.isEnabled()&&S&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(O){return O.sourceState};var V=this.tooltipHandler.show;this.tooltipHandler.show=
-function(){V.apply(this,arguments);if(null!=this.div)for(var O=this.div.getElementsByTagName("a"),S=0;S<O.length;S++)null!=O[S].getAttribute("href")&&null==O[S].getAttribute("target")&&O[S].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(O){return O.sourceState};this.getCursorForMouseEvent=function(O){var S=null==O.state&&null!=O.sourceState&&this.isCellLocked(O.sourceState.cell);return this.getCursorForCell(S?O.sourceState.cell:O.getCell())};var ia=this.getCursorForCell;
-this.getCursorForCell=function(O){if(!this.isEnabled()||this.isCellLocked(O)){if(null!=this.getClickableLinkForCell(O))return"pointer";if(this.isCellLocked(O))return"default"}return ia.apply(this,arguments)};this.selectRegion=function(O,S){var F=mxEvent.isAltDown(S)?O:null;O=this.getCells(O.x,O.y,O.width,O.height,null,null,F,function(L){return"1"==mxUtils.getValue(L.style,"locked","0")},!0);if(this.isToggleEvent(S))for(F=0;F<O.length;F++)this.selectCellForEvent(O[F],S);else this.selectCellsForEvent(O,
-S);return O};var ha=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(O,S,F){return this.graph.isCellSelected(O)?!1:ha.apply(this,arguments)};this.isCellLocked=function(O){for(;null!=O;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(O),"locked","0"))return!0;O=this.model.getParent(O)}return!1};var ba=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(O,S){"mouseDown"==S.getProperty("eventName")&&(O=S.getProperty("event").getState(),
-ba=null==O||this.isSelectionEmpty()||this.isCellSelected(O.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(O,S){if(!mxEvent.isMultiTouchEvent(S)){O=S.getProperty("event");var F=S.getProperty("cell");null==F?(O=mxUtils.convertPoint(this.container,mxEvent.getClientX(O),mxEvent.getClientY(O)),G.start(O.x,O.y)):null!=ba?this.addSelectionCells(ba):1<this.getSelectionCount()&&this.isCellSelected(F)&&this.removeSelectionCell(F);ba=null;S.consume()}}));
-this.connectionHandler.selectCells=function(O,S){this.graph.setSelectionCell(S||O)};this.connectionHandler.constraintHandler.isStateIgnored=function(O,S){var F=O.view.graph;return S&&(F.isCellSelected(O.cell)||F.isTableRow(O.cell)&&F.selectionCellsHandler.isHandled(F.model.getParent(O.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var O=this.connectionHandler.constraintHandler;null!=O.currentFocus&&O.isStateIgnored(O.currentFocus,!0)&&(O.currentFocus=null,O.constraints=
+var U=this.click;this.click=function(O){var R=null==O.state&&null!=O.sourceState&&this.isCellLocked(O.sourceState.cell);if(this.isEnabled()&&!R||O.isConsumed())return U.apply(this,arguments);var G=R?O.sourceState.cell:O.getCell();null!=G&&(G=this.getClickableLinkForCell(G),null!=G&&(this.isCustomLink(G)?this.customLinkClicked(G):this.openLink(G)));this.isEnabled()&&R&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(O){return O.sourceState};var V=this.tooltipHandler.show;this.tooltipHandler.show=
+function(){V.apply(this,arguments);if(null!=this.div)for(var O=this.div.getElementsByTagName("a"),R=0;R<O.length;R++)null!=O[R].getAttribute("href")&&null==O[R].getAttribute("target")&&O[R].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(O){return O.sourceState};this.getCursorForMouseEvent=function(O){var R=null==O.state&&null!=O.sourceState&&this.isCellLocked(O.sourceState.cell);return this.getCursorForCell(R?O.sourceState.cell:O.getCell())};var aa=this.getCursorForCell;
+this.getCursorForCell=function(O){if(!this.isEnabled()||this.isCellLocked(O)){if(null!=this.getClickableLinkForCell(O))return"pointer";if(this.isCellLocked(O))return"default"}return aa.apply(this,arguments)};this.selectRegion=function(O,R){var G=mxEvent.isAltDown(R)?O:null;O=this.getCells(O.x,O.y,O.width,O.height,null,null,G,function(K){return"1"==mxUtils.getValue(K.style,"locked","0")},!0);if(this.isToggleEvent(R))for(G=0;G<O.length;G++)this.selectCellForEvent(O[G],R);else this.selectCellsForEvent(O,
+R);return O};var ia=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(O,R,G){return this.graph.isCellSelected(O)?!1:ia.apply(this,arguments)};this.isCellLocked=function(O){for(;null!=O;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(O),"locked","0"))return!0;O=this.model.getParent(O)}return!1};var ea=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(O,R){"mouseDown"==R.getProperty("eventName")&&(O=R.getProperty("event").getState(),
+ea=null==O||this.isSelectionEmpty()||this.isCellSelected(O.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(O,R){if(!mxEvent.isMultiTouchEvent(R)){O=R.getProperty("event");var G=R.getProperty("cell");null==G?(O=mxUtils.convertPoint(this.container,mxEvent.getClientX(O),mxEvent.getClientY(O)),F.start(O.x,O.y)):null!=ea?this.addSelectionCells(ea):1<this.getSelectionCount()&&this.isCellSelected(G)&&this.removeSelectionCell(G);ea=null;R.consume()}}));
+this.connectionHandler.selectCells=function(O,R){this.graph.setSelectionCell(R||O)};this.connectionHandler.constraintHandler.isStateIgnored=function(O,R){var G=O.view.graph;return R&&(G.isCellSelected(O.cell)||G.isTableRow(O.cell)&&G.selectionCellsHandler.isHandled(G.model.getParent(O.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var O=this.connectionHandler.constraintHandler;null!=O.currentFocus&&O.isStateIgnored(O.currentFocus,!0)&&(O.currentFocus=null,O.constraints=
null,O.destroyIcons());O.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var qa=this.updateMouseEvent;this.updateMouseEvent=function(O){O=qa.apply(this,arguments);null!=O.state&&this.isCellLocked(O.getCell())&&(O.state=null);return O}}this.currentTranslate=new mxPoint(0,0)};Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;
Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.translateDiagram="1"==urlParams["translate-diagram"];Graph.diagramLanguage=null!=urlParams["diagram-language"]?urlParams["diagram-language"]:mxClient.language;Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;Graph.zoomWheel=!1;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Text is not SVG - cannot display";
Graph.foreignObjectWarningLink="https://www.diagrams.net/doc/faq/svg-export-text-problems";Graph.xmlDeclaration='<?xml version="1.0" encoding="UTF-8"?>';Graph.svgDoctype='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">';Graph.svgFileComment="\x3c!-- Do not edit this file with editors other than diagrams.net --\x3e";Graph.pasteStyles="rounded shadow dashed dashPattern fontFamily fontSource fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize targetPerimeterSpacing startFill startArrow startSize sourcePerimeterSpacing arcSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle".split(" ");
Graph.layoutNames="mxHierarchicalLayout mxCircleLayout mxCompactTreeLayout mxEdgeLabelLayout mxFastOrganicLayout mxParallelEdgeLayout mxPartitionLayout mxRadialTreeLayout mxStackLayout".split(" ");
Graph.createOffscreenGraph=function(a){var b=new Graph(document.createElement("div"));b.stylesheet.styles=mxUtils.clone(a.styles);b.resetViewOnRootChange=!1;b.setConnectable(!1);b.gridEnabled=!1;b.autoScroll=!1;b.setTooltips(!1);b.setEnabled(!1);b.container.style.visibility="hidden";b.container.style.position="absolute";b.container.style.overflow="hidden";b.container.style.height="1px";b.container.style.width="1px";return b};
-Graph.createSvgImage=function(a,b,f,d,g){f=unescape(encodeURIComponent(Graph.svgDoctype+'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+a+'px" height="'+b+'px" '+(null!=d&&null!=g?'viewBox="0 0 '+d+" "+g+'" ':"")+'version="1.1">'+f+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(f):Base64.encode(f,!0)),a,b)};
-Graph.createSvgNode=function(a,b,f,d,g){var e=mxUtils.createXmlDocument(),k=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"svg"):e.createElement("svg");null!=g&&(null!=k.style?k.style.backgroundColor=g:k.setAttribute("style","background-color:"+g));null==e.createElementNS?(k.setAttribute("xmlns",mxConstants.NS_SVG),k.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):k.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);k.setAttribute("version","1.1");
-k.setAttribute("width",f+"px");k.setAttribute("height",d+"px");k.setAttribute("viewBox",a+" "+b+" "+f+" "+d);e.appendChild(k);return k};Graph.htmlToPng=function(a,b,f,d){var g=document.createElement("canvas");g.width=b;g.height=f;var e=document.createElement("img");e.onload=mxUtils.bind(this,function(){g.getContext("2d").drawImage(e,0,0);d(g.toDataURL())});e.src="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml"><style>em{color:red;}</style><em>I</em> lick <span>cheese</span></div></foreignObject></svg>')};
-Graph.zapGremlins=function(a){for(var b=0,f=[],d=0;d<a.length;d++){var g=a.charCodeAt(d);(32<=g||9==g||10==g||13==g)&&65535!=g&&65534!=g||(f.push(a.substring(b,d)),b=d+1)}0<b&&b<a.length&&f.push(a.substring(b));return 0==f.length?a:f.join("")};Graph.stringToBytes=function(a){for(var b=Array(a.length),f=0;f<a.length;f++)b[f]=a.charCodeAt(f);return b};Graph.bytesToString=function(a){for(var b=Array(a.length),f=0;f<a.length;f++)b[f]=String.fromCharCode(a[f]);return b.join("")};
+Graph.createSvgImage=function(a,b,f,e,g){f=unescape(encodeURIComponent(Graph.svgDoctype+'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+a+'px" height="'+b+'px" '+(null!=e&&null!=g?'viewBox="0 0 '+e+" "+g+'" ':"")+'version="1.1">'+f+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(f):Base64.encode(f,!0)),a,b)};
+Graph.createSvgNode=function(a,b,f,e,g){var d=mxUtils.createXmlDocument(),k=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"svg"):d.createElement("svg");null!=g&&(null!=k.style?k.style.backgroundColor=g:k.setAttribute("style","background-color:"+g));null==d.createElementNS?(k.setAttribute("xmlns",mxConstants.NS_SVG),k.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):k.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);k.setAttribute("version","1.1");
+k.setAttribute("width",f+"px");k.setAttribute("height",e+"px");k.setAttribute("viewBox",a+" "+b+" "+f+" "+e);d.appendChild(k);return k};Graph.htmlToPng=function(a,b,f,e){var g=document.createElement("canvas");g.width=b;g.height=f;var d=document.createElement("img");d.onload=mxUtils.bind(this,function(){g.getContext("2d").drawImage(d,0,0);e(g.toDataURL())});d.src="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml"><style>em{color:red;}</style><em>I</em> lick <span>cheese</span></div></foreignObject></svg>')};
+Graph.zapGremlins=function(a){for(var b=0,f=[],e=0;e<a.length;e++){var g=a.charCodeAt(e);(32<=g||9==g||10==g||13==g)&&65535!=g&&65534!=g||(f.push(a.substring(b,e)),b=e+1)}0<b&&b<a.length&&f.push(a.substring(b));return 0==f.length?a:f.join("")};Graph.stringToBytes=function(a){for(var b=Array(a.length),f=0;f<a.length;f++)b[f]=a.charCodeAt(f);return b};Graph.bytesToString=function(a){for(var b=Array(a.length),f=0;f<a.length;f++)b[f]=String.fromCharCode(a[f]);return b.join("")};
Graph.base64EncodeUnicode=function(a){return btoa(encodeURIComponent(a).replace(/%([0-9A-F]{2})/g,function(b,f){return String.fromCharCode(parseInt(f,16))}))};Graph.base64DecodeUnicode=function(a){return decodeURIComponent(Array.prototype.map.call(atob(a),function(b){return"%"+("00"+b.charCodeAt(0).toString(16)).slice(-2)}).join(""))};Graph.compressNode=function(a,b){a=mxUtils.getXml(a);return Graph.compress(b?a:Graph.zapGremlins(a))};
-Graph.arrayBufferToString=function(a){var b="";a=new Uint8Array(a);for(var f=a.byteLength,d=0;d<f;d++)b+=String.fromCharCode(a[d]);return b};Graph.stringToArrayBuffer=function(a){return Uint8Array.from(a,function(b){return b.charCodeAt(0)})};
-Graph.arrayBufferIndexOfString=function(a,b,f){var d=b.charCodeAt(0),g=1,e=-1;for(f=f||0;f<a.byteLength;f++)if(a[f]==d){e=f;break}for(f=e+1;-1<e&&f<a.byteLength&&f<e+b.length-1;f++){if(a[f]!=b.charCodeAt(g))return Graph.arrayBufferIndexOfString(a,b,e+1);g++}return g==b.length-1?e:-1};Graph.compress=function(a,b){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=b?pako.deflate(encodeURIComponent(a)):pako.deflateRaw(encodeURIComponent(a));return btoa(Graph.arrayBufferToString(new Uint8Array(a)))};
+Graph.arrayBufferToString=function(a){var b="";a=new Uint8Array(a);for(var f=a.byteLength,e=0;e<f;e++)b+=String.fromCharCode(a[e]);return b};Graph.stringToArrayBuffer=function(a){return Uint8Array.from(a,function(b){return b.charCodeAt(0)})};
+Graph.arrayBufferIndexOfString=function(a,b,f){var e=b.charCodeAt(0),g=1,d=-1;for(f=f||0;f<a.byteLength;f++)if(a[f]==e){d=f;break}for(f=d+1;-1<d&&f<a.byteLength&&f<d+b.length-1;f++){if(a[f]!=b.charCodeAt(g))return Graph.arrayBufferIndexOfString(a,b,d+1);g++}return g==b.length-1?d:-1};Graph.compress=function(a,b){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=b?pako.deflate(encodeURIComponent(a)):pako.deflateRaw(encodeURIComponent(a));return btoa(Graph.arrayBufferToString(new Uint8Array(a)))};
Graph.decompress=function(a,b,f){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=Graph.stringToArrayBuffer(atob(a));b=decodeURIComponent(b?pako.inflate(a,{to:"string"}):pako.inflateRaw(a,{to:"string"}));return f?b:Graph.zapGremlins(b)};
-Graph.fadeNodes=function(a,b,f,d,g){g=null!=g?g:1E3;Graph.setTransitionForNodes(a,null);Graph.setOpacityForNodes(a,b);window.setTimeout(function(){Graph.setTransitionForNodes(a,"all "+g+"ms ease-in-out");Graph.setOpacityForNodes(a,f);window.setTimeout(function(){Graph.setTransitionForNodes(a,null);null!=d&&d()},g)},0)};Graph.removeKeys=function(a,b){for(var f in a)b(f)&&delete a[f]};
+Graph.fadeNodes=function(a,b,f,e,g){g=null!=g?g:1E3;Graph.setTransitionForNodes(a,null);Graph.setOpacityForNodes(a,b);window.setTimeout(function(){Graph.setTransitionForNodes(a,"all "+g+"ms ease-in-out");Graph.setOpacityForNodes(a,f);window.setTimeout(function(){Graph.setTransitionForNodes(a,null);null!=e&&e()},g)},0)};Graph.removeKeys=function(a,b){for(var f in a)b(f)&&delete a[f]};
Graph.setTransitionForNodes=function(a,b){for(var f=0;f<a.length;f++)mxUtils.setPrefixedStyle(a[f].style,"transition",b)};Graph.setOpacityForNodes=function(a,b){for(var f=0;f<a.length;f++)a[f].style.opacity=b};Graph.removePasteFormatting=function(a){for(;null!=a;)null!=a.firstChild&&Graph.removePasteFormatting(a.firstChild),a.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=a.style&&(a.style.whiteSpace="","#000000"==a.style.color&&(a.style.color="")),a=a.nextSibling};
Graph.sanitizeHtml=function(a,b){return Graph.domPurify(a,!1)};Graph.sanitizeLink=function(a){var b=document.createElement("a");b.setAttribute("href",a);Graph.sanitizeNode(b);return b.getAttribute("href")};Graph.sanitizeNode=function(a){return Graph.domPurify(a,!0)};DOMPurify.addHook("afterSanitizeAttributes",function(a){"use"==a.nodeName&&a.hasAttribute("xlink:href")&&!a.getAttribute("xlink:href").match(/^#/)&&a.remove()});
Graph.domPurify=function(a,b){window.DOM_PURIFY_CONFIG.IN_PLACE=b;return DOMPurify.sanitize(a,window.DOM_PURIFY_CONFIG)};
-Graph.clipSvgDataUri=function(a,b){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=a&&"data:image/svg+xml;base64,"==a.substring(0,26))try{var f=document.createElement("div");f.style.position="absolute";f.style.visibility="hidden";var d=decodeURIComponent(escape(atob(a.substring(26)))),g=d.indexOf("<svg");if(0<=g){f.innerHTML=Graph.sanitizeHtml(d.substring(g));var e=f.getElementsByTagName("svg");if(0<e.length){if(b||null!=e[0].getAttribute("preserveAspectRatio")){document.body.appendChild(f);try{d=b=
-1;var k=e[0].getAttribute("width"),n=e[0].getAttribute("height");k=null!=k&&"%"!=k.charAt(k.length-1)?parseFloat(k):NaN;n=null!=n&&"%"!=n.charAt(n.length-1)?parseFloat(n):NaN;var u=e[0].getAttribute("viewBox");if(null!=u&&!isNaN(k)&&!isNaN(n)){var m=u.split(" ");4<=u.length&&(b=parseFloat(m[2])/k,d=parseFloat(m[3])/n)}var r=e[0].getBBox();0<r.width&&0<r.height&&(f.getElementsByTagName("svg")[0].setAttribute("viewBox",r.x+" "+r.y+" "+r.width+" "+r.height),f.getElementsByTagName("svg")[0].setAttribute("width",
-r.width/b),f.getElementsByTagName("svg")[0].setAttribute("height",r.height/d))}catch(x){}finally{document.body.removeChild(f)}}a=Editor.createSvgDataUri(mxUtils.getXml(e[0]))}}}catch(x){}return a};Graph.stripQuotes=function(a){null!=a&&("'"==a.charAt(0)&&(a=a.substring(1)),"'"==a.charAt(a.length-1)&&(a=a.substring(0,a.length-1)),'"'==a.charAt(0)&&(a=a.substring(1)),'"'==a.charAt(a.length-1)&&(a=a.substring(0,a.length-1)));return a};
+Graph.clipSvgDataUri=function(a,b){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=a&&"data:image/svg+xml;base64,"==a.substring(0,26))try{var f=document.createElement("div");f.style.position="absolute";f.style.visibility="hidden";var e=decodeURIComponent(escape(atob(a.substring(26)))),g=e.indexOf("<svg");if(0<=g){f.innerHTML=Graph.sanitizeHtml(e.substring(g));var d=f.getElementsByTagName("svg");if(0<d.length){if(b||null!=d[0].getAttribute("preserveAspectRatio")){document.body.appendChild(f);try{e=b=
+1;var k=d[0].getAttribute("width"),n=d[0].getAttribute("height");k=null!=k&&"%"!=k.charAt(k.length-1)?parseFloat(k):NaN;n=null!=n&&"%"!=n.charAt(n.length-1)?parseFloat(n):NaN;var u=d[0].getAttribute("viewBox");if(null!=u&&!isNaN(k)&&!isNaN(n)){var m=u.split(" ");4<=u.length&&(b=parseFloat(m[2])/k,e=parseFloat(m[3])/n)}var r=d[0].getBBox();0<r.width&&0<r.height&&(f.getElementsByTagName("svg")[0].setAttribute("viewBox",r.x+" "+r.y+" "+r.width+" "+r.height),f.getElementsByTagName("svg")[0].setAttribute("width",
+r.width/b),f.getElementsByTagName("svg")[0].setAttribute("height",r.height/e))}catch(x){}finally{document.body.removeChild(f)}}a=Editor.createSvgDataUri(mxUtils.getXml(d[0]))}}}catch(x){}return a};Graph.stripQuotes=function(a){null!=a&&("'"==a.charAt(0)&&(a=a.substring(1)),"'"==a.charAt(a.length-1)&&(a=a.substring(0,a.length-1)),'"'==a.charAt(0)&&(a=a.substring(1)),'"'==a.charAt(a.length-1)&&(a=a.substring(0,a.length-1)));return a};
Graph.createRemoveIcon=function(a,b){var f=document.createElement("img");f.setAttribute("src",Dialog.prototype.clearImage);f.setAttribute("title",a);f.setAttribute("width","13");f.setAttribute("height","10");f.style.marginLeft="4px";f.style.marginBottom="-1px";f.style.cursor="pointer";mxEvent.addListener(f,"click",b);return f};Graph.isPageLink=function(a){return null!=a&&"data:page/id,"==a.substring(0,13)};Graph.isLink=function(a){return null!=a&&Graph.linkPattern.test(a)};
Graph.linkPattern=RegExp("^(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=!0;Graph.prototype.defaultPageVisible=!0;Graph.prototype.defaultGridEnabled="0"!=urlParams.grid;Graph.prototype.lightbox=!1;Graph.prototype.defaultPageBackgroundColor="#ffffff";Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.shapeForegroundColor="#000000";Graph.prototype.shapeBackgroundColor="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.selectParentAfterDelete=!1;
Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}^ ^\"^ '^=^;]+)%","g");Graph.prototype.absoluteUrlPattern=RegExp("^(?:[a-z]+:)?//","i");Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=null!=urlParams.base?decodeURIComponent(urlParams.base):(window!=window.top?document.referrer:document.location.toString()).split("#")[0];
Graph.prototype.editAfterInsert=!1;Graph.prototype.builtInProperties=["label","tooltip","placeholders","placeholder"];Graph.prototype.standalone=!1;Graph.prototype.enableFlowAnimation=!1;Graph.prototype.roundableShapes="label rectangle internalStorage corner parallelogram swimlane triangle trapezoid ext step tee process link rhombus offPageConnector loopLimit hexagon manualInput card curlyBracket singleArrow callout doubleArrow flexArrow umlLifeline".split(" ");
-Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(f,d){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var g=f.view.graph.tolerance,e=!0,k=null,n=mxUtils.bind(this,function(r){e=!0;k=new mxPoint(mxEvent.getClientX(r),mxEvent.getClientY(r))}),u=mxUtils.bind(this,function(r){e=e&&null!=k&&Math.abs(k.x-mxEvent.getClientX(r))<g&&Math.abs(k.y-mxEvent.getClientY(r))<g}),m=mxUtils.bind(this,function(r){if(e)for(var x=mxEvent.getSource(r);null!=
-x&&x!=d.node;){if("a"==x.nodeName.toLowerCase()){f.view.graph.labelLinkClicked(f,x,r);break}x=x.parentNode}});mxEvent.addGestureListeners(d.node,n,u,m);mxEvent.addListener(d.node,"click",function(r){mxEvent.consume(r)})};if(null!=this.tooltipHandler){var b=this.tooltipHandler.init;this.tooltipHandler.init=function(){b.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(f){var d=mxEvent.getSource(f);"A"==d.nodeName&&(d=d.getAttribute("href"),null!=
-d&&this.graph.isCustomLink(d)&&(mxEvent.isTouchEvent(f)||!mxEvent.isPopupTrigger(f))&&this.graph.customLinkClicked(d)&&mxEvent.consume(f))}))}}this.addListener(mxEvent.SIZE,mxUtils.bind(this,function(f,d){null!=this.container&&this.flowAnimationStyle&&(f=this.flowAnimationStyle.getAttribute("id"),this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(f))}));this.initLayoutManager()};
+Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(f,e){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var g=f.view.graph.tolerance,d=!0,k=null,n=mxUtils.bind(this,function(r){d=!0;k=new mxPoint(mxEvent.getClientX(r),mxEvent.getClientY(r))}),u=mxUtils.bind(this,function(r){d=d&&null!=k&&Math.abs(k.x-mxEvent.getClientX(r))<g&&Math.abs(k.y-mxEvent.getClientY(r))<g}),m=mxUtils.bind(this,function(r){if(d)for(var x=mxEvent.getSource(r);null!=
+x&&x!=e.node;){if("a"==x.nodeName.toLowerCase()){f.view.graph.labelLinkClicked(f,x,r);break}x=x.parentNode}});mxEvent.addGestureListeners(e.node,n,u,m);mxEvent.addListener(e.node,"click",function(r){mxEvent.consume(r)})};if(null!=this.tooltipHandler){var b=this.tooltipHandler.init;this.tooltipHandler.init=function(){b.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(f){var e=mxEvent.getSource(f);"A"==e.nodeName&&(e=e.getAttribute("href"),null!=
+e&&this.graph.isCustomLink(e)&&(mxEvent.isTouchEvent(f)||!mxEvent.isPopupTrigger(f))&&this.graph.customLinkClicked(e)&&mxEvent.consume(f))}))}}this.addListener(mxEvent.SIZE,mxUtils.bind(this,function(f,e){null!=this.container&&this.flowAnimationStyle&&(f=this.flowAnimationStyle.getAttribute("id"),this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(f))}));this.initLayoutManager()};
(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.isFillState=function(k){return!this.isSpecialColor(k.style[mxConstants.STYLE_FILLCOLOR])&&"1"!=mxUtils.getValue(k.style,"lineShape",null)&&(this.model.isVertex(k.cell)||"arrow"==mxUtils.getValue(k.style,mxConstants.STYLE_SHAPE,null)||"filledEdge"==mxUtils.getValue(k.style,mxConstants.STYLE_SHAPE,null)||"flexArrow"==mxUtils.getValue(k.style,mxConstants.STYLE_SHAPE,
null))};Graph.prototype.isStrokeState=function(k){return!this.isSpecialColor(k.style[mxConstants.STYLE_STROKECOLOR])};Graph.prototype.isSpecialColor=function(k){return 0<=mxUtils.indexOf([mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_FILLCOLOR,"inherit","swimlane","indicated"],k)};Graph.prototype.isGlassState=function(k){k=mxUtils.getValue(k.style,mxConstants.STYLE_SHAPE,null);return"label"==k||"rectangle"==k||"internalStorage"==k||"ext"==k||"umlLifeline"==k||"swimlane"==k||"process"==k};Graph.prototype.isRoundedState=
function(k){return null!=k.shape?k.shape.isRoundable():0<=mxUtils.indexOf(this.roundableShapes,mxUtils.getValue(k.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isLineJumpState=function(k){var n=mxUtils.getValue(k.style,mxConstants.STYLE_SHAPE,null);return!mxUtils.getValue(k.style,mxConstants.STYLE_CURVED,!1)&&("connector"==n||"filledEdge"==n)};Graph.prototype.isAutoSizeState=function(k){return"1"==mxUtils.getValue(k.style,mxConstants.STYLE_AUTOSIZE,null)};Graph.prototype.isImageState=function(k){k=
@@ -2899,83 +2902,83 @@ n,0==u)}return n};Graph.prototype.mergeStyle=function(k,n,u){if(null!=k){var m={
mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(k)&&(!this.isSwimlane(k)||0==n)&&""==this.getLabel(k)&&0<this.model.getChildCount(k))for(n=0;n<this.model.getChildCount(k);n++){var u=this.model.getChildAt(k,n);if(this.isCellEditable(u)){k=u;break}}return k};Graph.prototype.copyStyle=function(k){return this.getCellStyle(k,!1)};Graph.prototype.pasteStyle=function(k,n,u){u=null!=u?u:Graph.pasteStyles;Graph.removeKeys(k,function(m){return 0>mxUtils.indexOf(u,m)});this.updateCellStyles(k,n)};Graph.prototype.updateCellStyles=
function(k,n){this.model.beginUpdate();try{for(var u=0;u<n.length;u++)if(this.model.isVertex(n[u])||this.model.isEdge(n[u])){var m=this.getCellStyle(n[u],!1),r;for(r in k){var x=k[r];m[r]!=x&&this.setCellStyles(r,x,[n[u]])}}}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(k,n,u,m,r,x){this.useCssTransforms&&(k=k/this.currentScale-this.currentTranslate.x,n=n/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(k,n,u,m,r,x){m=null!=m?m:!0;r=null!=r?r:!0;null==u&&(u=this.getCurrentRoot(),null==u&&(u=this.getModel().getRoot()));if(null!=u)for(var B=this.model.getChildCount(u)-1;0<=
-B;B--){var C=this.model.getChildAt(u,B),G=this.getScaledCellAt(k,n,C,m,r,x);if(null!=G)return G;if(this.isCellVisible(C)&&(r&&this.model.isEdge(C)||m&&this.model.isVertex(C))&&(G=this.view.getState(C),null!=G&&(null==x||!x(G,k,n))&&this.intersects(G,k,n)))return C}return null};Graph.prototype.isRecursiveVertexResize=function(k){return!this.isSwimlane(k.cell)&&0<this.model.getChildCount(k.cell)&&!this.isCellCollapsed(k.cell)&&"1"==mxUtils.getValue(k.style,"recursiveResize","1")&&null==mxUtils.getValue(k.style,
+B;B--){var C=this.model.getChildAt(u,B),F=this.getScaledCellAt(k,n,C,m,r,x);if(null!=F)return F;if(this.isCellVisible(C)&&(r&&this.model.isEdge(C)||m&&this.model.isVertex(C))&&(F=this.view.getState(C),null!=F&&(null==x||!x(F,k,n))&&this.intersects(F,k,n)))return C}return null};Graph.prototype.isRecursiveVertexResize=function(k){return!this.isSwimlane(k.cell)&&0<this.model.getChildCount(k.cell)&&!this.isCellCollapsed(k.cell)&&"1"==mxUtils.getValue(k.style,"recursiveResize","1")&&null==mxUtils.getValue(k.style,
"childLayout",null)};Graph.prototype.getAbsoluteParent=function(k){for(var n=this.getCellGeometry(k);null!=n&&n.relative;)k=this.getModel().getParent(k),n=this.getCellGeometry(k);return k};Graph.prototype.isPart=function(k){return"1"==mxUtils.getValue(this.getCurrentCellStyle(k),"part","0")||this.isTableCell(k)||this.isTableRow(k)};Graph.prototype.getCompositeParents=function(k){for(var n=new mxDictionary,u=[],m=0;m<k.length;m++){var r=this.getCompositeParent(k[m]);this.isTableCell(r)&&(r=this.graph.model.getParent(r));
this.isTableRow(r)&&(r=this.graph.model.getParent(r));null==r||n.get(r)||(n.put(r,!0),u.push(r))}return u};Graph.prototype.getCompositeParent=function(k){for(;this.isPart(k);){var n=this.model.getParent(k);if(!this.model.isVertex(n))break;k=n}return k};Graph.prototype.filterSelectionCells=function(k){var n=this.getSelectionCells();if(null!=k){for(var u=[],m=0;m<n.length;m++)k(n[m])||u.push(n[m]);n=u}return n};var a=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(k){if(this.useCssTransforms){var n=
this.currentScale,u=this.currentTranslate;k=new mxRectangle((k.x+2*u.x)*n-u.x,(k.y+2*u.y)*n-u.y,k.width*n,k.height*n)}a.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=function(k){k=this.strokeWidth;this.graph.useCssTransforms&&(k/=this.graph.currentScale);return k};mxGraphView.prototype.getGraphBounds=function(){var k=this.graphBounds;if(this.graph.useCssTransforms){var n=this.graph.currentTranslate,u=this.graph.currentScale;k=new mxRectangle((k.x+n.x)*u,(k.y+n.y)*u,k.width*u,k.height*
u)}return k};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var b=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(k){this.graph.useCssTransforms&&(this.graph.currentScale=this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=0);b.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),
-this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};var f=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(k){k=f.apply(this,arguments);for(var n=[],u=0;u<k.length;u++)this.isTableRow(k[u])||this.isTableCell(k[u])||n.push(k[u]);return n};var d=mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(k){k=d.apply(this,arguments);for(var n=[],u=0;u<k.length;u++)this.isTable(k[u])||
+this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};var f=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(k){k=f.apply(this,arguments);for(var n=[],u=0;u<k.length;u++)this.isTableRow(k[u])||this.isTableCell(k[u])||n.push(k[u]);return n};var e=mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(k){k=e.apply(this,arguments);for(var n=[],u=0;u<k.length;u++)this.isTable(k[u])||
this.isTableRow(k[u])||this.isTableCell(k[u])||n.push(k[u]);return n};Graph.prototype.updateCssTransform=function(){var k=this.view.getDrawPane();if(null!=k)if(k=k.parentNode,this.useCssTransforms){var n=k.getAttribute("transform");k.setAttribute("transformOrigin","0 0");var u=Math.round(100*this.currentScale)/100;k.setAttribute("transform","scale("+u+","+u+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");n!=k.getAttribute("transform")&&
-this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",k.getAttribute("transform"))}else k.removeAttribute("transformOrigin"),k.removeAttribute("transform")};var g=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var k=this.graph.useCssTransforms,n=this.scale,u=this.translate;k&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);g.apply(this,arguments);k&&(this.scale=n,this.translate=u)};var e=mxGraph.prototype.updatePageBreaks;
-mxGraph.prototype.updatePageBreaks=function(k,n,u){var m=this.useCssTransforms,r=this.view.scale,x=this.view.translate;m&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);e.apply(this,arguments);m&&(this.view.scale=r,this.view.translate=x,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};
+this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",k.getAttribute("transform"))}else k.removeAttribute("transformOrigin"),k.removeAttribute("transform")};var g=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var k=this.graph.useCssTransforms,n=this.scale,u=this.translate;k&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);g.apply(this,arguments);k&&(this.scale=n,this.translate=u)};var d=mxGraph.prototype.updatePageBreaks;
+mxGraph.prototype.updatePageBreaks=function(k,n,u){var m=this.useCssTransforms,r=this.view.scale,x=this.view.translate;m&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);d.apply(this,arguments);m&&(this.view.scale=r,this.view.translate=x,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};
Graph.prototype.labelLinkClicked=function(a,b,f){b=b.getAttribute("href");if(null!=b&&!this.isCustomLink(b)&&(mxEvent.isLeftMouseButton(f)&&!mxEvent.isPopupTrigger(f)||mxEvent.isTouchEvent(f))){if(!this.isEnabled()||this.isCellLocked(a.cell))a=this.isBlankLink(b)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(b),a);mxEvent.consume(f)}};
-Graph.prototype.openLink=function(a,b,f){var d=window;try{if(a=Graph.sanitizeLink(a),null!=a)if("_self"==b&&window!=window.top)window.location.href=a;else if(a.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==a.charAt(this.baseUrl.length)&&"_top"==b&&window==window.top){var g=a.split("#")[1];window.location.hash=="#"+g&&(window.location.hash="");window.location.hash=g}else d=window.open(a,null!=b?b:"_blank"),null==d||f||(d.opener=null)}catch(e){}return d};
+Graph.prototype.openLink=function(a,b,f){var e=window;try{if(a=Graph.sanitizeLink(a),null!=a)if("_self"==b&&window!=window.top)window.location.href=a;else if(a.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==a.charAt(this.baseUrl.length)&&"_top"==b&&window==window.top){var g=a.split("#")[1];window.location.hash=="#"+g&&(window.location.hash="");window.location.hash=g}else e=window.open(a,null!=b?b:"_blank"),null==e||f||(e.opener=null)}catch(d){}return e};
Graph.prototype.getLinkTitle=function(a){return a.substring(a.lastIndexOf("/")+1)};Graph.prototype.isCustomLink=function(a){return"data:"==a.substring(0,5)};Graph.prototype.customLinkClicked=function(a){return!1};Graph.prototype.isExternalProtocol=function(a){return"mailto:"===a.substring(0,7)};Graph.prototype.isBlankLink=function(a){return!this.isExternalProtocol(a)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(a)&&a.substring(0,this.domainUrl.length)!==this.domainUrl)};
Graph.prototype.isRelativeUrl=function(a){return null!=a&&!this.absoluteUrlPattern.test(a)&&"data:"!==a.substring(0,5)&&!this.isExternalProtocol(a)};Graph.prototype.getAbsoluteUrl=function(a){null!=a&&this.isRelativeUrl(a)&&(a="#"==a.charAt(0)?this.baseUrl+a:"/"==a.charAt(0)?this.domainUrl+a:this.domainPathUrl+a);return a};
Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutManager(this);this.layoutManager.hasLayout=function(a){return null!=this.graph.getCellStyle(a).childLayout};this.layoutManager.getLayout=function(a,b){var f=this.graph.model.getParent(a);if(!this.graph.isCellCollapsed(a)&&(b!=mxEvent.BEGIN_UPDATE||this.hasLayout(f,b))){a=this.graph.getCellStyle(a);if("stackLayout"==a.childLayout)return b=new mxStackLayout(this.graph,!0),b.resizeParentMax="1"==mxUtils.getValue(a,"resizeParentMax",
"1"),b.horizontal="1"==mxUtils.getValue(a,"horizontalStack","1"),b.resizeParent="1"==mxUtils.getValue(a,"resizeParent","1"),b.resizeLast="1"==mxUtils.getValue(a,"resizeLast","0"),b.spacing=a.stackSpacing||b.spacing,b.border=a.stackBorder||b.border,b.marginLeft=a.marginLeft||0,b.marginRight=a.marginRight||0,b.marginTop=a.marginTop||0,b.marginBottom=a.marginBottom||0,b.allowGaps=a.allowGaps||0,b.fill=!0,b.allowGaps&&(b.gridSize=parseFloat(mxUtils.getValue(a,"stackUnitSize",20))),b;if("treeLayout"==
a.childLayout)return b=new mxCompactTreeLayout(this.graph),b.horizontal="1"==mxUtils.getValue(a,"horizontalTree","1"),b.resizeParent="1"==mxUtils.getValue(a,"resizeParent","1"),b.groupPadding=mxUtils.getValue(a,"parentPadding",20),b.levelDistance=mxUtils.getValue(a,"treeLevelDistance",30),b.maintainParentLocation=!0,b.edgeRouting=!1,b.resetEdges=!1,b;if("flowLayout"==a.childLayout)return b=new mxHierarchicalLayout(this.graph,mxUtils.getValue(a,"flowOrientation",mxConstants.DIRECTION_EAST)),b.resizeParent=
"1"==mxUtils.getValue(a,"resizeParent","1"),b.parentBorder=mxUtils.getValue(a,"parentPadding",20),b.maintainParentLocation=!0,b.intraCellSpacing=mxUtils.getValue(a,"intraCellSpacing",mxHierarchicalLayout.prototype.intraCellSpacing),b.interRankCellSpacing=mxUtils.getValue(a,"interRankCellSpacing",mxHierarchicalLayout.prototype.interRankCellSpacing),b.interHierarchySpacing=mxUtils.getValue(a,"interHierarchySpacing",mxHierarchicalLayout.prototype.interHierarchySpacing),b.parallelEdgeSpacing=mxUtils.getValue(a,
-"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),b;if("circleLayout"==a.childLayout)return new mxCircleLayout(this.graph);if("organicLayout"==a.childLayout)return new mxFastOrganicLayout(this.graph);if("tableLayout"==a.childLayout)return new TableLayout(this.graph);if(null!=a.childLayout&&"["==a.childLayout.charAt(0))try{return new mxCompositeLayout(this.graph,this.graph.createLayouts(JSON.parse(a.childLayout)))}catch(d){null!=window.console&&console.error(d)}}return null}};
-Graph.prototype.createLayouts=function(a){for(var b=[],f=0;f<a.length;f++)if(0<=mxUtils.indexOf(Graph.layoutNames,a[f].layout)){var d=new window[a[f].layout](this);if(null!=a[f].config)for(var g in a[f].config)d[g]=a[f].config[g];b.push(d)}else throw Error(mxResources.get("invalidCallFnNotFound",[a[f].layout]));return b};
-Graph.prototype.getDataForCells=function(a){for(var b=[],f=0;f<a.length;f++){var d=null!=a[f].value?a[f].value.attributes:null,g={};g.id=a[f].id;if(null!=d)for(var e=0;e<d.length;e++)g[d[e].nodeName]=d[e].nodeValue;else g.label=this.convertValueToString(a[f]);b.push(g)}return b};
-Graph.prototype.getNodesForCells=function(a){for(var b=[],f=0;f<a.length;f++){var d=this.view.getState(a[f]);if(null!=d){for(var g=this.cellRenderer.getShapesForState(d),e=0;e<g.length;e++)null!=g[e]&&null!=g[e].node&&b.push(g[e].node);null!=d.control&&null!=d.control.node&&b.push(d.control.node)}}return b};
-Graph.prototype.createWipeAnimations=function(a,b){for(var f=[],d=0;d<a.length;d++){var g=this.view.getState(a[d]);null!=g&&null!=g.shape&&(this.model.isEdge(g.cell)&&null!=g.absolutePoints&&1<g.absolutePoints.length?f.push(this.createEdgeWipeAnimation(g,b)):this.model.isVertex(g.cell)&&null!=g.shape.bounds&&f.push(this.createVertexWipeAnimation(g,b)))}return f};
-Graph.prototype.createEdgeWipeAnimation=function(a,b){var f=a.absolutePoints.slice(),d=a.segments,g=a.length,e=f.length;return{execute:mxUtils.bind(this,function(k,n){if(null!=a.shape){var u=[f[0]];n=k/n;b||(n=1-n);for(var m=g*n,r=1;r<e;r++)if(m<=d[r-1]){u.push(new mxPoint(f[r-1].x+(f[r].x-f[r-1].x)*m/d[r-1],f[r-1].y+(f[r].y-f[r-1].y)*m/d[r-1]));break}else m-=d[r-1],u.push(f[r]);a.shape.points=u;a.shape.redraw();0==k&&Graph.setOpacityForNodes(this.getNodesForCells([a.cell]),1);null!=a.text&&null!=
+"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),b;if("circleLayout"==a.childLayout)return new mxCircleLayout(this.graph);if("organicLayout"==a.childLayout)return new mxFastOrganicLayout(this.graph);if("tableLayout"==a.childLayout)return new TableLayout(this.graph);if(null!=a.childLayout&&"["==a.childLayout.charAt(0))try{return new mxCompositeLayout(this.graph,this.graph.createLayouts(JSON.parse(a.childLayout)))}catch(e){null!=window.console&&console.error(e)}}return null}};
+Graph.prototype.createLayouts=function(a){for(var b=[],f=0;f<a.length;f++)if(0<=mxUtils.indexOf(Graph.layoutNames,a[f].layout)){var e=new window[a[f].layout](this);if(null!=a[f].config)for(var g in a[f].config)e[g]=a[f].config[g];b.push(e)}else throw Error(mxResources.get("invalidCallFnNotFound",[a[f].layout]));return b};
+Graph.prototype.getDataForCells=function(a){for(var b=[],f=0;f<a.length;f++){var e=null!=a[f].value?a[f].value.attributes:null,g={};g.id=a[f].id;if(null!=e)for(var d=0;d<e.length;d++)g[e[d].nodeName]=e[d].nodeValue;else g.label=this.convertValueToString(a[f]);b.push(g)}return b};
+Graph.prototype.getNodesForCells=function(a){for(var b=[],f=0;f<a.length;f++){var e=this.view.getState(a[f]);if(null!=e){for(var g=this.cellRenderer.getShapesForState(e),d=0;d<g.length;d++)null!=g[d]&&null!=g[d].node&&b.push(g[d].node);null!=e.control&&null!=e.control.node&&b.push(e.control.node)}}return b};
+Graph.prototype.createWipeAnimations=function(a,b){for(var f=[],e=0;e<a.length;e++){var g=this.view.getState(a[e]);null!=g&&null!=g.shape&&(this.model.isEdge(g.cell)&&null!=g.absolutePoints&&1<g.absolutePoints.length?f.push(this.createEdgeWipeAnimation(g,b)):this.model.isVertex(g.cell)&&null!=g.shape.bounds&&f.push(this.createVertexWipeAnimation(g,b)))}return f};
+Graph.prototype.createEdgeWipeAnimation=function(a,b){var f=a.absolutePoints.slice(),e=a.segments,g=a.length,d=f.length;return{execute:mxUtils.bind(this,function(k,n){if(null!=a.shape){var u=[f[0]];n=k/n;b||(n=1-n);for(var m=g*n,r=1;r<d;r++)if(m<=e[r-1]){u.push(new mxPoint(f[r-1].x+(f[r].x-f[r-1].x)*m/e[r-1],f[r-1].y+(f[r].y-f[r-1].y)*m/e[r-1]));break}else m-=e[r-1],u.push(f[r]);a.shape.points=u;a.shape.redraw();0==k&&Graph.setOpacityForNodes(this.getNodesForCells([a.cell]),1);null!=a.text&&null!=
a.text.node&&(a.text.node.style.opacity=n)}}),stop:mxUtils.bind(this,function(){null!=a.shape&&(a.shape.points=f,a.shape.redraw(),null!=a.text&&null!=a.text.node&&(a.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([a.cell]),b?1:0))})}};
-Graph.prototype.createVertexWipeAnimation=function(a,b){var f=new mxRectangle.fromRectangle(a.shape.bounds);return{execute:mxUtils.bind(this,function(d,g){null!=a.shape&&(g=d/g,b||(g=1-g),a.shape.bounds=new mxRectangle(f.x,f.y,f.width*g,f.height),a.shape.redraw(),0==d&&Graph.setOpacityForNodes(this.getNodesForCells([a.cell]),1),null!=a.text&&null!=a.text.node&&(a.text.node.style.opacity=g))}),stop:mxUtils.bind(this,function(){null!=a.shape&&(a.shape.bounds=f,a.shape.redraw(),null!=a.text&&null!=a.text.node&&
-(a.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([a.cell]),b?1:0))})}};Graph.prototype.executeAnimations=function(a,b,f,d){f=null!=f?f:30;d=null!=d?d:30;var g=null,e=0,k=mxUtils.bind(this,function(){if(e==f||this.stoppingCustomActions){window.clearInterval(g);for(var n=0;n<a.length;n++)a[n].stop();null!=b&&b()}else for(n=0;n<a.length;n++)a[n].execute(e,f);e++});g=window.setInterval(k,d);k()};
+Graph.prototype.createVertexWipeAnimation=function(a,b){var f=new mxRectangle.fromRectangle(a.shape.bounds);return{execute:mxUtils.bind(this,function(e,g){null!=a.shape&&(g=e/g,b||(g=1-g),a.shape.bounds=new mxRectangle(f.x,f.y,f.width*g,f.height),a.shape.redraw(),0==e&&Graph.setOpacityForNodes(this.getNodesForCells([a.cell]),1),null!=a.text&&null!=a.text.node&&(a.text.node.style.opacity=g))}),stop:mxUtils.bind(this,function(){null!=a.shape&&(a.shape.bounds=f,a.shape.redraw(),null!=a.text&&null!=a.text.node&&
+(a.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([a.cell]),b?1:0))})}};Graph.prototype.executeAnimations=function(a,b,f,e){f=null!=f?f:30;e=null!=e?e:30;var g=null,d=0,k=mxUtils.bind(this,function(){if(d==f||this.stoppingCustomActions){window.clearInterval(g);for(var n=0;n<a.length;n++)a[n].stop();null!=b&&b()}else for(n=0;n<a.length;n++)a[n].execute(d,f);d++});g=window.setInterval(k,e);k()};
Graph.prototype.getPageSize=function(){return this.pageVisible?new mxRectangle(0,0,this.pageFormat.width*this.pageScale,this.pageFormat.height*this.pageScale):this.scrollTileSize};
-Graph.prototype.getPageLayout=function(){var a=this.getPageSize(),b=this.getGraphBounds();if(0==b.width||0==b.height)return new mxRectangle(0,0,1,1);var f=Math.floor(Math.ceil(b.x/this.view.scale-this.view.translate.x)/a.width),d=Math.floor(Math.ceil(b.y/this.view.scale-this.view.translate.y)/a.height);return new mxRectangle(f,d,Math.ceil((Math.floor((b.x+b.width)/this.view.scale)-this.view.translate.x)/a.width)-f,Math.ceil((Math.floor((b.y+b.height)/this.view.scale)-this.view.translate.y)/a.height)-
-d)};Graph.prototype.sanitizeHtml=function(a,b){return Graph.sanitizeHtml(a,b)};Graph.prototype.updatePlaceholders=function(){var a=!1,b;for(b in this.model.cells){var f=this.model.cells[b];this.isReplacePlaceholders(f)&&(this.view.invalidate(f,!1,!1),a=!0)}a&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(a){return null!=a.value&&"object"==typeof a.value&&"1"==a.value.getAttribute("placeholders")};
+Graph.prototype.getPageLayout=function(){var a=this.getPageSize(),b=this.getGraphBounds();if(0==b.width||0==b.height)return new mxRectangle(0,0,1,1);var f=Math.floor(Math.ceil(b.x/this.view.scale-this.view.translate.x)/a.width),e=Math.floor(Math.ceil(b.y/this.view.scale-this.view.translate.y)/a.height);return new mxRectangle(f,e,Math.ceil((Math.floor((b.x+b.width)/this.view.scale)-this.view.translate.x)/a.width)-f,Math.ceil((Math.floor((b.y+b.height)/this.view.scale)-this.view.translate.y)/a.height)-
+e)};Graph.prototype.sanitizeHtml=function(a,b){return Graph.sanitizeHtml(a,b)};Graph.prototype.updatePlaceholders=function(){var a=!1,b;for(b in this.model.cells){var f=this.model.cells[b];this.isReplacePlaceholders(f)&&(this.view.invalidate(f,!1,!1),a=!0)}a&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(a){return null!=a.value&&"object"==typeof a.value&&"1"==a.value.getAttribute("placeholders")};
Graph.prototype.isZoomWheelEvent=function(a){return Graph.zoomWheel&&!mxEvent.isShiftDown(a)&&!mxEvent.isMetaDown(a)&&!mxEvent.isAltDown(a)&&(!mxEvent.isControlDown(a)||mxClient.IS_MAC)||!Graph.zoomWheel&&(mxEvent.isAltDown(a)||mxEvent.isControlDown(a))};Graph.prototype.isScrollWheelEvent=function(a){return!this.isZoomWheelEvent(a)};Graph.prototype.isTransparentClickEvent=function(a){return mxEvent.isAltDown(a)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};
Graph.prototype.isIgnoreTerminalEvent=function(a){return mxEvent.isAltDown(a)&&!mxEvent.isShiftDown(a)&&!mxEvent.isControlDown(a)&&!mxEvent.isMetaDown(a)};Graph.prototype.isEdgeIgnored=function(a){var b=!1;null!=a&&(a=this.getCurrentCellStyle(a),b="1"==mxUtils.getValue(a,"ignoreEdge","0"));return b};Graph.prototype.isSplitTarget=function(a,b,f){return!this.model.isEdge(b[0])&&!mxEvent.isAltDown(f)&&!mxEvent.isShiftDown(f)&&mxGraph.prototype.isSplitTarget.apply(this,arguments)};
Graph.prototype.getLabel=function(a){var b=mxGraph.prototype.getLabel.apply(this,arguments);null!=b&&this.isReplacePlaceholders(a)&&null==a.getAttribute("placeholder")&&(b=this.replacePlaceholders(a,b));return b};Graph.prototype.isLabelMovable=function(a){var b=this.getCurrentCellStyle(a);return!this.isCellLocked(a)&&(this.model.isEdge(a)&&this.edgeLabelsMovable||this.model.isVertex(a)&&(this.vertexLabelsMovable||"1"==mxUtils.getValue(b,"labelMovable","0")))};
Graph.prototype.setGridSize=function(a){this.gridSize=a;this.fireEvent(new mxEventObject("gridSizeChanged"))};Graph.prototype.setDefaultParent=function(a){this.defaultParent=a;this.fireEvent(new mxEventObject("defaultParentChanged"))};Graph.prototype.getClickableLinkForCell=function(a){do{var b=this.getLinkForCell(a);if(null!=b)return b;a=this.model.getParent(a)}while(null!=a);return null};
Graph.prototype.getGlobalVariable=function(a){var b=null;"date"==a?b=(new Date).toLocaleDateString():"time"==a?b=(new Date).toLocaleTimeString():"timestamp"==a?b=(new Date).toLocaleString():"date{"==a.substring(0,5)&&(a=a.substring(5,a.length-1),b=this.formatDate(new Date,a));return b};
Graph.prototype.formatDate=function(a,b,f){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
-shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var d=this.dateFormatCache,g=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,e=/[^-+\dA-Z]/g,k=function(N,Q){N=String(N);for(Q=Q||2;N.length<Q;)N="0"+N;return N};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||
-/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(d.masks[b]||b||d.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),f=!0);var n=f?"getUTC":"get",u=a[n+"Date"](),m=a[n+"Day"](),r=a[n+"Month"](),x=a[n+"FullYear"](),B=a[n+"Hours"](),C=a[n+"Minutes"](),G=a[n+"Seconds"]();n=a[n+"Milliseconds"]();var J=f?0:a.getTimezoneOffset(),D={d:u,dd:k(u),ddd:d.i18n.dayNames[m],dddd:d.i18n.dayNames[m+7],m:r+1,mm:k(r+1),mmm:d.i18n.monthNames[r],mmmm:d.i18n.monthNames[r+
-12],yy:String(x).slice(2),yyyy:x,h:B%12||12,hh:k(B%12||12),H:B,HH:k(B),M:C,MM:k(C),s:G,ss:k(G),l:k(n,3),L:k(99<n?Math.round(n/10):n),t:12>B?"a":"p",tt:12>B?"am":"pm",T:12>B?"A":"P",TT:12>B?"AM":"PM",Z:f?"UTC":(String(a).match(g)||[""]).pop().replace(e,""),o:(0<J?"-":"+")+k(100*Math.floor(Math.abs(J)/60)+Math.abs(J)%60,4),S:["th","st","nd","rd"][3<u%10?0:(10!=u%100-u%10)*u%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(N){return N in D?D[N]:N.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 e=this.dateFormatCache,g=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,d=/[^-+\dA-Z]/g,k=function(N,S){N=String(N);for(S=S||2;N.length<S;)N="0"+N;return N};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||
+/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(e.masks[b]||b||e.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),f=!0);var n=f?"getUTC":"get",u=a[n+"Date"](),m=a[n+"Day"](),r=a[n+"Month"](),x=a[n+"FullYear"](),B=a[n+"Hours"](),C=a[n+"Minutes"](),F=a[n+"Seconds"]();n=a[n+"Milliseconds"]();var J=f?0:a.getTimezoneOffset(),D={d:u,dd:k(u),ddd:e.i18n.dayNames[m],dddd:e.i18n.dayNames[m+7],m:r+1,mm:k(r+1),mmm:e.i18n.monthNames[r],mmmm:e.i18n.monthNames[r+
+12],yy:String(x).slice(2),yyyy:x,h:B%12||12,hh:k(B%12||12),H:B,HH:k(B),M:C,MM:k(C),s:F,ss:k(F),l:k(n,3),L:k(99<n?Math.round(n/10):n),t:12>B?"a":"p",tt:12>B?"am":"pm",T:12>B?"A":"P",TT:12>B?"AM":"PM",Z:f?"UTC":(String(a).match(g)||[""]).pop().replace(d,""),o:(0<J?"-":"+")+k(100*Math.floor(Math.abs(J)/60)+Math.abs(J)%60,4),S:["th","st","nd","rd"][3<u%10?0:(10!=u%100-u%10)*u%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(N){return N in D?D[N]:N.slice(1,
N.length-1)})};Graph.prototype.getLayerForCells=function(a){var b=null;if(0<a.length){for(b=a[0];!this.model.isLayer(b);)b=this.model.getParent(b);for(var f=1;f<a.length;f++)if(!this.model.isAncestor(b,a[f])){b=null;break}}return b};
-Graph.prototype.createLayersDialog=function(a,b){var f=document.createElement("div");f.style.position="absolute";for(var d=this.getModel(),g=d.getChildCount(d.root),e=0;e<g;e++)mxUtils.bind(this,function(k){function n(){d.isVisible(k)?(r.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(m,75)):(r.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(m,25))}var u=this.convertValueToString(k)||mxResources.get("background")||"Background",m=document.createElement("div");m.style.overflow=
-"hidden";m.style.textOverflow="ellipsis";m.style.padding="2px";m.style.whiteSpace="nowrap";m.style.cursor="pointer";m.setAttribute("title",mxResources.get(d.isVisible(k)?"hideIt":"show",[u]));var r=document.createElement("img");r.setAttribute("draggable","false");r.setAttribute("align","absmiddle");r.setAttribute("border","0");r.style.position="relative";r.style.width="16px";r.style.padding="0px 6px 0 4px";b&&(r.style.filter="invert(100%)",r.style.top="-2px");m.appendChild(r);mxUtils.write(m,u);f.appendChild(m);
-mxEvent.addListener(m,"click",function(){d.setVisible(k,!d.isVisible(k));n();null!=a&&a(k)});n()})(d.getChildAt(d.root,e));return f};
-Graph.prototype.replacePlaceholders=function(a,b,f,d){d=[];if(null!=b){for(var g=0;match=this.placeholderPattern.exec(b);){var e=match[0];if(2<e.length&&"%label%"!=e&&"%tooltip%"!=e){var k=null;if(match.index>g&&"%"==b.charAt(match.index-1))k=e.substring(1);else{var n=e.substring(1,e.length-1);if("id"==n)k=a.id;else if(0>n.indexOf("{"))for(var u=a;null==k&&null!=u;)null!=u.value&&"object"==typeof u.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(k=u.getAttribute(n+"_"+Graph.diagramLanguage)),
-null==k&&(k=u.hasAttribute(n)?null!=u.getAttribute(n)?u.getAttribute(n):"":null)),u=this.model.getParent(u);null==k&&(k=this.getGlobalVariable(n));null==k&&null!=f&&(k=f[n])}d.push(b.substring(g,match.index)+(null!=k?k:e));g=match.index+e.length}}d.push(b.substring(g))}return d.join("")};Graph.prototype.restoreSelection=function(a){if(null!=a&&0<a.length){for(var b=[],f=0;f<a.length;f++){var d=this.model.getCell(a[f].id);null!=d&&b.push(d)}this.setSelectionCells(b)}else this.clearSelection()};
+Graph.prototype.createLayersDialog=function(a,b){var f=document.createElement("div");f.style.position="absolute";for(var e=this.getModel(),g=e.getChildCount(e.root),d=0;d<g;d++)mxUtils.bind(this,function(k){function n(){e.isVisible(k)?(r.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(m,75)):(r.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(m,25))}var u=this.convertValueToString(k)||mxResources.get("background")||"Background",m=document.createElement("div");m.style.overflow=
+"hidden";m.style.textOverflow="ellipsis";m.style.padding="2px";m.style.whiteSpace="nowrap";m.style.cursor="pointer";m.setAttribute("title",mxResources.get(e.isVisible(k)?"hideIt":"show",[u]));var r=document.createElement("img");r.setAttribute("draggable","false");r.setAttribute("align","absmiddle");r.setAttribute("border","0");r.style.position="relative";r.style.width="16px";r.style.padding="0px 6px 0 4px";b&&(r.style.filter="invert(100%)",r.style.top="-2px");m.appendChild(r);mxUtils.write(m,u);f.appendChild(m);
+mxEvent.addListener(m,"click",function(){e.setVisible(k,!e.isVisible(k));n();null!=a&&a(k)});n()})(e.getChildAt(e.root,d));return f};
+Graph.prototype.replacePlaceholders=function(a,b,f,e){e=[];if(null!=b){for(var g=0;match=this.placeholderPattern.exec(b);){var d=match[0];if(2<d.length&&"%label%"!=d&&"%tooltip%"!=d){var k=null;if(match.index>g&&"%"==b.charAt(match.index-1))k=d.substring(1);else{var n=d.substring(1,d.length-1);if("id"==n)k=a.id;else if(0>n.indexOf("{"))for(var u=a;null==k&&null!=u;)null!=u.value&&"object"==typeof u.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(k=u.getAttribute(n+"_"+Graph.diagramLanguage)),
+null==k&&(k=u.hasAttribute(n)?null!=u.getAttribute(n)?u.getAttribute(n):"":null)),u=this.model.getParent(u);null==k&&(k=this.getGlobalVariable(n));null==k&&null!=f&&(k=f[n])}e.push(b.substring(g,match.index)+(null!=k?k:d));g=match.index+d.length}}e.push(b.substring(g))}return e.join("")};Graph.prototype.restoreSelection=function(a){if(null!=a&&0<a.length){for(var b=[],f=0;f<a.length;f++){var e=this.model.getCell(a[f].id);null!=e&&b.push(e)}this.setSelectionCells(b)}else this.clearSelection()};
Graph.prototype.selectCellForEvent=function(a,b){mxEvent.isShiftDown(b)&&!this.isSelectionEmpty()&&this.selectTableRange(this.getSelectionCell(),a)||mxGraph.prototype.selectCellForEvent.apply(this,arguments)};
-Graph.prototype.selectTableRange=function(a,b){var f=!1;if(this.isTableCell(a)&&this.isTableCell(b)){var d=this.model.getParent(a),g=this.model.getParent(d),e=this.model.getParent(b);if(g==this.model.getParent(e)){a=d.getIndex(a);d=g.getIndex(d);var k=e.getIndex(b),n=g.getIndex(e);e=Math.max(d,n);b=Math.min(a,k);a=Math.max(a,k);k=[];for(d=Math.min(d,n);d<=e;d++){n=this.model.getChildAt(g,d);for(var u=b;u<=a;u++)k.push(this.model.getChildAt(n,u))}0<k.length&&(1<k.length||1<this.getSelectionCount()||
+Graph.prototype.selectTableRange=function(a,b){var f=!1;if(this.isTableCell(a)&&this.isTableCell(b)){var e=this.model.getParent(a),g=this.model.getParent(e),d=this.model.getParent(b);if(g==this.model.getParent(d)){a=e.getIndex(a);e=g.getIndex(e);var k=d.getIndex(b),n=g.getIndex(d);d=Math.max(e,n);b=Math.min(a,k);a=Math.max(a,k);k=[];for(e=Math.min(e,n);e<=d;e++){n=this.model.getChildAt(g,e);for(var u=b;u<=a;u++)k.push(this.model.getChildAt(n,u))}0<k.length&&(1<k.length||1<this.getSelectionCount()||
!this.isCellSelected(k[0]))&&(this.setSelectionCells(k),f=!0)}}return f};
-Graph.prototype.snapCellsToGrid=function(a,b){this.getModel().beginUpdate();try{for(var f=0;f<a.length;f++){var d=a[f],g=this.getCellGeometry(d);if(null!=g){g=g.clone();if(this.getModel().isVertex(d))g.x=Math.round(g.x/b)*b,g.y=Math.round(g.y/b)*b,g.width=Math.round(g.width/b)*b,g.height=Math.round(g.height/b)*b;else if(this.getModel().isEdge(d)&&null!=g.points)for(var e=0;e<g.points.length;e++)g.points[e].x=Math.round(g.points[e].x/b)*b,g.points[e].y=Math.round(g.points[e].y/b)*b;this.getModel().setGeometry(d,
+Graph.prototype.snapCellsToGrid=function(a,b){this.getModel().beginUpdate();try{for(var f=0;f<a.length;f++){var e=a[f],g=this.getCellGeometry(e);if(null!=g){g=g.clone();if(this.getModel().isVertex(e))g.x=Math.round(g.x/b)*b,g.y=Math.round(g.y/b)*b,g.width=Math.round(g.width/b)*b,g.height=Math.round(g.height/b)*b;else if(this.getModel().isEdge(e)&&null!=g.points)for(var d=0;d<g.points.length;d++)g.points[d].x=Math.round(g.points[d].x/b)*b,g.points[d].y=Math.round(g.points[d].y/b)*b;this.getModel().setGeometry(e,
g)}}}finally{this.getModel().endUpdate()}};Graph.prototype.selectCellsForConnectVertex=function(a,b,f){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),this.scrollCellToVisible(a[1]),null!=f&&(mxEvent.isTouchEvent(b)?f.update(f.getState(this.view.getState(a[1]))):f.reset())):this.setSelectionCells(a)};
Graph.prototype.isCloneConnectSource=function(a){var b=null;null!=this.layoutManager&&(b=this.layoutManager.getLayout(this.model.getParent(a)));return this.isTableRow(a)||this.isTableCell(a)||null!=b&&b.constructor==mxStackLayout};
-Graph.prototype.connectVertex=function(a,b,f,d,g,e,k,n){e=e?e:!1;if(a.geometry.relative&&this.model.isEdge(a.parent))return[];for(;a.geometry.relative&&this.model.isVertex(a.parent);)a=a.parent;var u=this.isCloneConnectSource(a),m=u?a:this.getCompositeParent(a),r=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(m.geometry.x,m.geometry.y);b==mxConstants.DIRECTION_NORTH?(r.x+=m.geometry.width/2,r.y-=f):b==
-mxConstants.DIRECTION_SOUTH?(r.x+=m.geometry.width/2,r.y+=m.geometry.height+f):(r.x=b==mxConstants.DIRECTION_WEST?r.x-f:r.x+(m.geometry.width+f),r.y+=m.geometry.height/2);var x=this.view.getState(this.model.getParent(a));f=this.view.scale;var B=this.view.translate;m=B.x*f;B=B.y*f;null!=x&&this.model.isVertex(x.cell)&&(m=x.x,B=x.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(r.x+=a.parent.geometry.x,r.y+=a.parent.geometry.y);e=e?null:(new mxRectangle(m+r.x*f,B+r.y*f)).grow(40*f);e=null!=e?
-this.getCells(0,0,0,0,null,null,e,null,!0):null;x=this.view.getState(a);var C=null,G=null;if(null!=e){e=e.reverse();for(var J=0;J<e.length;J++)if(!this.isCellLocked(e[J])&&!this.model.isEdge(e[J])&&e[J]!=a)if(!this.model.isAncestor(a,e[J])&&this.isContainer(e[J])&&(null==C||e[J]==this.model.getParent(a)))C=e[J];else if(null==G&&this.isCellConnectable(e[J])&&!this.model.isAncestor(e[J],a)&&!this.isSwimlane(e[J])){var D=this.view.getState(e[J]);null==x||null==D||mxUtils.intersects(x,D)||(G=e[J])}}var N=
-!mxEvent.isShiftDown(d)||mxEvent.isControlDown(d)||g;N&&("1"!=urlParams.sketch||g)&&(b==mxConstants.DIRECTION_NORTH?r.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?r.y+=a.geometry.height/2:r.x=b==mxConstants.DIRECTION_WEST?r.x-a.geometry.width/2:r.x+a.geometry.width/2);var Q=[],R=G;G=C;g=mxUtils.bind(this,function(P){if(null==k||null!=P||null==G&&u){this.model.beginUpdate();try{if(null==R&&N){var Z=this.getAbsoluteParent(null!=P?P:a);Z=u?a:this.getCompositeParent(Z);R=null!=P?P:this.duplicateCells([Z],
-!1)[0];null!=P&&this.addCells([R],this.model.getParent(a),null,null,null,!0);var U=this.getCellGeometry(R);null!=U&&(null!=P&&"1"==urlParams.sketch&&(b==mxConstants.DIRECTION_NORTH?r.y-=U.height/2:b==mxConstants.DIRECTION_SOUTH?r.y+=U.height/2:r.x=b==mxConstants.DIRECTION_WEST?r.x-U.width/2:r.x+U.width/2),U.x=r.x-U.width/2,U.y=r.y-U.height/2);null!=C?(this.addCells([R],C,null,null,null,!0),G=null):N&&!u&&this.addCells([R],this.getDefaultParent(),null,null,null,!0)}var V=mxEvent.isControlDown(d)&&
-mxEvent.isShiftDown(d)&&N||null==G&&u?null:this.insertEdge(this.model.getParent(a),null,"",a,R,this.createCurrentEdgeStyle());if(null!=V&&this.connectionHandler.insertBeforeSource){var ia=null;for(P=a;null!=P.parent&&null!=P.geometry&&P.geometry.relative&&P.parent!=V.parent;)P=this.model.getParent(P);null!=P&&null!=P.parent&&P.parent==V.parent&&(ia=P.parent.getIndex(P),this.model.add(P.parent,V,ia))}null==G&&null!=R&&null!=a.parent&&u&&b==mxConstants.DIRECTION_WEST&&(ia=a.parent.getIndex(a),this.model.add(a.parent,
-R,ia));null!=V&&Q.push(V);null==G&&null!=R&&Q.push(R);null==R&&null!=V&&V.geometry.setTerminalPoint(r,!1);null!=V&&this.fireEvent(new mxEventObject("cellsInserted","cells",[V]))}finally{this.model.endUpdate()}}if(null!=n)n(Q);else return Q});if(null==k||null!=R||!N||null==G&&u)return g(R);k(m+r.x*f,B+r.y*f,g)};
-Graph.prototype.getIndexableText=function(a){a=null!=a?a:this.model.getDescendants(this.model.root);for(var b=document.createElement("div"),f=[],d,g=0;g<a.length;g++)if(d=a[g],this.model.isVertex(d)||this.model.isEdge(d))this.isHtmlLabel(d)?(b.innerHTML=this.sanitizeHtml(this.getLabel(d)),d=mxUtils.extractTextWithWhitespace([b])):d=this.getLabel(d),d=mxUtils.trim(d.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<d.length&&f.push(d);return f.join(" ")};
-Graph.prototype.convertValueToString=function(a){var b=this.model.getValue(a);if(null!=b&&"object"==typeof b){var f=null;if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){b=a.getAttribute("placeholder");for(var d=a;null==f&&null!=d;)null!=d.value&&"object"==typeof d.value&&(f=d.hasAttribute(b)?null!=d.getAttribute(b)?d.getAttribute(b):"":null),d=this.model.getParent(d)}else f=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(f=b.getAttribute("label_"+Graph.diagramLanguage)),
+Graph.prototype.connectVertex=function(a,b,f,e,g,d,k,n){d=d?d:!1;if(a.geometry.relative&&this.model.isEdge(a.parent))return[];for(;a.geometry.relative&&this.model.isVertex(a.parent);)a=a.parent;var u=this.isCloneConnectSource(a),m=u?a:this.getCompositeParent(a),r=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(m.geometry.x,m.geometry.y);b==mxConstants.DIRECTION_NORTH?(r.x+=m.geometry.width/2,r.y-=f):b==
+mxConstants.DIRECTION_SOUTH?(r.x+=m.geometry.width/2,r.y+=m.geometry.height+f):(r.x=b==mxConstants.DIRECTION_WEST?r.x-f:r.x+(m.geometry.width+f),r.y+=m.geometry.height/2);var x=this.view.getState(this.model.getParent(a));f=this.view.scale;var B=this.view.translate;m=B.x*f;B=B.y*f;null!=x&&this.model.isVertex(x.cell)&&(m=x.x,B=x.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(r.x+=a.parent.geometry.x,r.y+=a.parent.geometry.y);d=d?null:(new mxRectangle(m+r.x*f,B+r.y*f)).grow(40*f);d=null!=d?
+this.getCells(0,0,0,0,null,null,d,null,!0):null;x=this.view.getState(a);var C=null,F=null;if(null!=d){d=d.reverse();for(var J=0;J<d.length;J++)if(!this.isCellLocked(d[J])&&!this.model.isEdge(d[J])&&d[J]!=a)if(!this.model.isAncestor(a,d[J])&&this.isContainer(d[J])&&(null==C||d[J]==this.model.getParent(a)))C=d[J];else if(null==F&&this.isCellConnectable(d[J])&&!this.model.isAncestor(d[J],a)&&!this.isSwimlane(d[J])){var D=this.view.getState(d[J]);null==x||null==D||mxUtils.intersects(x,D)||(F=d[J])}}var N=
+!mxEvent.isShiftDown(e)||mxEvent.isControlDown(e)||g;N&&("1"!=urlParams.sketch||g)&&(b==mxConstants.DIRECTION_NORTH?r.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?r.y+=a.geometry.height/2:r.x=b==mxConstants.DIRECTION_WEST?r.x-a.geometry.width/2:r.x+a.geometry.width/2);var S=[],T=F;F=C;g=mxUtils.bind(this,function(P){if(null==k||null!=P||null==F&&u){this.model.beginUpdate();try{if(null==T&&N){var Z=this.getAbsoluteParent(null!=P?P:a);Z=u?a:this.getCompositeParent(Z);T=null!=P?P:this.duplicateCells([Z],
+!1)[0];null!=P&&this.addCells([T],this.model.getParent(a),null,null,null,!0);var U=this.getCellGeometry(T);null!=U&&(null!=P&&"1"==urlParams.sketch&&(b==mxConstants.DIRECTION_NORTH?r.y-=U.height/2:b==mxConstants.DIRECTION_SOUTH?r.y+=U.height/2:r.x=b==mxConstants.DIRECTION_WEST?r.x-U.width/2:r.x+U.width/2),U.x=r.x-U.width/2,U.y=r.y-U.height/2);null!=C?(this.addCells([T],C,null,null,null,!0),F=null):N&&!u&&this.addCells([T],this.getDefaultParent(),null,null,null,!0)}var V=mxEvent.isControlDown(e)&&
+mxEvent.isShiftDown(e)&&N||null==F&&u?null:this.insertEdge(this.model.getParent(a),null,"",a,T,this.createCurrentEdgeStyle());if(null!=V&&this.connectionHandler.insertBeforeSource){var aa=null;for(P=a;null!=P.parent&&null!=P.geometry&&P.geometry.relative&&P.parent!=V.parent;)P=this.model.getParent(P);null!=P&&null!=P.parent&&P.parent==V.parent&&(aa=P.parent.getIndex(P),this.model.add(P.parent,V,aa))}null==F&&null!=T&&null!=a.parent&&u&&b==mxConstants.DIRECTION_WEST&&(aa=a.parent.getIndex(a),this.model.add(a.parent,
+T,aa));null!=V&&S.push(V);null==F&&null!=T&&S.push(T);null==T&&null!=V&&V.geometry.setTerminalPoint(r,!1);null!=V&&this.fireEvent(new mxEventObject("cellsInserted","cells",[V]))}finally{this.model.endUpdate()}}if(null!=n)n(S);else return S});if(null==k||null!=T||!N||null==F&&u)return g(T);k(m+r.x*f,B+r.y*f,g)};
+Graph.prototype.getIndexableText=function(a){a=null!=a?a:this.model.getDescendants(this.model.root);for(var b=document.createElement("div"),f=[],e,g=0;g<a.length;g++)if(e=a[g],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&&f.push(e);return f.join(" ")};
+Graph.prototype.convertValueToString=function(a){var b=this.model.getValue(a);if(null!=b&&"object"==typeof b){var f=null;if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){b=a.getAttribute("placeholder");for(var e=a;null==f&&null!=e;)null!=e.value&&"object"==typeof e.value&&(f=e.hasAttribute(b)?null!=e.getAttribute(b)?e.getAttribute(b):"":null),e=this.model.getParent(e)}else f=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(f=b.getAttribute("label_"+Graph.diagramLanguage)),
null==f&&(f=b.getAttribute("label")||"");return f||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(a){return null!=a&&null!=a.text&&null!=a.text.node?a.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(a){return null!=a.value&&"object"==typeof a.value?(a=a.value.getAttribute("link"),null!=a&&"javascript:"===a.toLowerCase().substring(0,11)&&(a=a.substring(11)),a):null};
Graph.prototype.getLinkTargetForCell=function(a){return null!=a.value&&"object"==typeof a.value?a.value.getAttribute("linkTarget"):null};Graph.prototype.postProcessCellStyle=function(a,b){return this.updateHorizontalStyle(a,this.replaceDefaultColors(a,mxGraph.prototype.postProcessCellStyle.apply(this,arguments)))};
Graph.prototype.updateHorizontalStyle=function(a,b){if(null!=a&&null!=b&&null!=this.layoutManager){var f=this.model.getParent(a);this.model.isVertex(f)&&this.isCellCollapsed(a)&&(a=this.layoutManager.getLayout(f),null!=a&&a.constructor==mxStackLayout&&(b[mxConstants.STYLE_HORIZONTAL]=!a.horizontal))}return b};
Graph.prototype.replaceDefaultColors=function(a,b){if(null!=b){a=mxUtils.hex2rgb(this.shapeBackgroundColor);var f=mxUtils.hex2rgb(this.shapeForegroundColor);this.replaceDefaultColor(b,mxConstants.STYLE_FONTCOLOR,f);this.replaceDefaultColor(b,mxConstants.STYLE_FILLCOLOR,a);this.replaceDefaultColor(b,mxConstants.STYLE_STROKECOLOR,f);this.replaceDefaultColor(b,mxConstants.STYLE_IMAGE_BORDER,f);this.replaceDefaultColor(b,mxConstants.STYLE_IMAGE_BACKGROUND,a);this.replaceDefaultColor(b,mxConstants.STYLE_LABEL_BORDERCOLOR,
f);this.replaceDefaultColor(b,mxConstants.STYLE_SWIMLANE_FILLCOLOR,a);this.replaceDefaultColor(b,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,a)}return b};Graph.prototype.replaceDefaultColor=function(a,b,f){null!=a&&"default"==a[b]&&null!=f&&(a[b]=f)};
-Graph.prototype.updateAlternateBounds=function(a,b,f){if(null!=a&&null!=b&&null!=this.layoutManager&&null!=b.alternateBounds){var d=this.layoutManager.getLayout(this.model.getParent(a));null!=d&&d.constructor==mxStackLayout&&(d.horizontal?b.alternateBounds.height=0:b.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(a,b){return mxEvent.isShiftDown(a)||"1"==mxUtils.getValue(b.style,"moveCells","0")};
-Graph.prototype.foldCells=function(a,b,f,d,g){b=null!=b?b:!1;null==f&&(f=this.getFoldableCells(this.getSelectionCells(),a));if(null!=f){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var e=0;e<f.length;e++){var k=this.view.getState(f[e]),n=this.getCellGeometry(f[e]);if(null!=k&&null!=n){var u=Math.round(n.width-k.width/this.view.scale),m=Math.round(n.height-k.height/this.view.scale);if(0!=m||0!=u){var r=this.model.getParent(f[e]),x=this.layoutManager.getLayout(r);
+Graph.prototype.updateAlternateBounds=function(a,b,f){if(null!=a&&null!=b&&null!=this.layoutManager&&null!=b.alternateBounds){var e=this.layoutManager.getLayout(this.model.getParent(a));null!=e&&e.constructor==mxStackLayout&&(e.horizontal?b.alternateBounds.height=0:b.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(a,b){return mxEvent.isShiftDown(a)||"1"==mxUtils.getValue(b.style,"moveCells","0")};
+Graph.prototype.foldCells=function(a,b,f,e,g){b=null!=b?b:!1;null==f&&(f=this.getFoldableCells(this.getSelectionCells(),a));if(null!=f){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var d=0;d<f.length;d++){var k=this.view.getState(f[d]),n=this.getCellGeometry(f[d]);if(null!=k&&null!=n){var u=Math.round(n.width-k.width/this.view.scale),m=Math.round(n.height-k.height/this.view.scale);if(0!=m||0!=u){var r=this.model.getParent(f[d]),x=this.layoutManager.getLayout(r);
null==x?null!=g&&this.isMoveCellsEvent(g,k)&&this.moveSiblings(k,r,u,m):null!=g&&mxEvent.isAltDown(g)||x.constructor!=mxStackLayout||x.resizeLast||this.resizeParentStacks(r,x,u,m)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(f)}};
-Graph.prototype.moveSiblings=function(a,b,f,d){this.model.beginUpdate();try{var g=this.getCellsBeyond(a.x,a.y,b,!0,!0);for(b=0;b<g.length;b++)if(g[b]!=a.cell){var e=this.view.getState(g[b]),k=this.getCellGeometry(g[b]);null!=e&&null!=k&&(k=k.clone(),k.translate(Math.round(f*Math.max(0,Math.min(1,(e.x-a.x)/a.width))),Math.round(d*Math.max(0,Math.min(1,(e.y-a.y)/a.height)))),this.model.setGeometry(g[b],k))}}finally{this.model.endUpdate()}};
-Graph.prototype.resizeParentStacks=function(a,b,f,d){if(null!=this.layoutManager&&null!=b&&b.constructor==mxStackLayout&&!b.resizeLast){this.model.beginUpdate();try{for(var g=b.horizontal;null!=a&&null!=b&&b.constructor==mxStackLayout&&b.horizontal==g&&!b.resizeLast;){var e=this.getCellGeometry(a),k=this.view.getState(a);null!=k&&null!=e&&(e=e.clone(),b.horizontal?e.width+=f+Math.min(0,k.width/this.view.scale-e.width):e.height+=d+Math.min(0,k.height/this.view.scale-e.height),this.model.setGeometry(a,
-e));a=this.model.getParent(a);b=this.layoutManager.getLayout(a)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(a){var b=this.getCurrentCellStyle(a);return this.isSwimlane(a)?"0"!=b.container:"1"==b.container};Graph.prototype.isCellConnectable=function(a){var b=this.getCurrentCellStyle(a);return null!=b.connectable?"0"!=b.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};
+Graph.prototype.moveSiblings=function(a,b,f,e){this.model.beginUpdate();try{var g=this.getCellsBeyond(a.x,a.y,b,!0,!0);for(b=0;b<g.length;b++)if(g[b]!=a.cell){var d=this.view.getState(g[b]),k=this.getCellGeometry(g[b]);null!=d&&null!=k&&(k=k.clone(),k.translate(Math.round(f*Math.max(0,Math.min(1,(d.x-a.x)/a.width))),Math.round(e*Math.max(0,Math.min(1,(d.y-a.y)/a.height)))),this.model.setGeometry(g[b],k))}}finally{this.model.endUpdate()}};
+Graph.prototype.resizeParentStacks=function(a,b,f,e){if(null!=this.layoutManager&&null!=b&&b.constructor==mxStackLayout&&!b.resizeLast){this.model.beginUpdate();try{for(var g=b.horizontal;null!=a&&null!=b&&b.constructor==mxStackLayout&&b.horizontal==g&&!b.resizeLast;){var d=this.getCellGeometry(a),k=this.view.getState(a);null!=k&&null!=d&&(d=d.clone(),b.horizontal?d.width+=f+Math.min(0,k.width/this.view.scale-d.width):d.height+=e+Math.min(0,k.height/this.view.scale-d.height),this.model.setGeometry(a,
+d));a=this.model.getParent(a);b=this.layoutManager.getLayout(a)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(a){var b=this.getCurrentCellStyle(a);return this.isSwimlane(a)?"0"!=b.container:"1"==b.container};Graph.prototype.isCellConnectable=function(a){var b=this.getCurrentCellStyle(a);return null!=b.connectable?"0"!=b.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};
Graph.prototype.isLabelMovable=function(a){var b=this.getCurrentCellStyle(a);return null!=b.movableLabel?"0"!=b.movableLabel:mxGraph.prototype.isLabelMovable.apply(this,arguments)};Graph.prototype.selectAll=function(a){a=a||this.getDefaultParent();this.isCellLocked(a)||mxGraph.prototype.selectAll.apply(this,arguments)};Graph.prototype.selectCells=function(a,b,f){f=f||this.getDefaultParent();this.isCellLocked(f)||mxGraph.prototype.selectCells.apply(this,arguments)};
-Graph.prototype.getSwimlaneAt=function(a,b,f){var d=mxGraph.prototype.getSwimlaneAt.apply(this,arguments);this.isCellLocked(d)&&(d=null);return d};Graph.prototype.isCellFoldable=function(a){var b=this.getCurrentCellStyle(a);return this.foldingEnabled&&"0"!=mxUtils.getValue(b,mxConstants.STYLE_RESIZABLE,"1")&&("1"==b.treeFolding||!this.isCellLocked(a)&&(this.isContainer(a)&&"0"!=b.collapsible||!this.isContainer(a)&&"1"==b.collapsible))};
+Graph.prototype.getSwimlaneAt=function(a,b,f){var e=mxGraph.prototype.getSwimlaneAt.apply(this,arguments);this.isCellLocked(e)&&(e=null);return e};Graph.prototype.isCellFoldable=function(a){var b=this.getCurrentCellStyle(a);return this.foldingEnabled&&"0"!=mxUtils.getValue(b,mxConstants.STYLE_RESIZABLE,"1")&&("1"==b.treeFolding||!this.isCellLocked(a)&&(this.isContainer(a)&&"0"!=b.collapsible||!this.isContainer(a)&&"1"==b.collapsible))};
Graph.prototype.reset=function(){this.isEditing()&&this.stopEditing(!0);this.escape();this.isSelectionEmpty()||this.clearSelection()};Graph.prototype.zoom=function(a,b){a=Math.max(.01,Math.min(this.view.scale*a,160))/this.view.scale;mxGraph.prototype.zoom.apply(this,arguments)};Graph.prototype.zoomIn=function(){.15>this.view.scale?this.zoom((this.view.scale+.01)/this.view.scale):this.zoom(Math.round(this.view.scale*this.zoomFactor*20)/20/this.view.scale)};
Graph.prototype.zoomOut=function(){.15>=this.view.scale?this.zoom((this.view.scale-.01)/this.view.scale):this.zoom(Math.round(1/this.zoomFactor*this.view.scale*20)/20/this.view.scale)};
-Graph.prototype.fitWindow=function(a,b){b=null!=b?b:10;var f=this.container.clientWidth-b,d=this.container.clientHeight-b,g=Math.floor(20*Math.min(f/a.width,d/a.height))/20;this.zoomTo(g);if(mxUtils.hasScrollbars(this.container)){var e=this.view.translate;this.container.scrollTop=(a.y+e.y)*g-Math.max((d-a.height*g)/2+b/2,0);this.container.scrollLeft=(a.x+e.x)*g-Math.max((f-a.width*g)/2+b/2,0)}};
-Graph.prototype.getTooltipForCell=function(a){var b="";if(mxUtils.isNode(a.value)){var f=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&(f=a.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==f&&(f=a.value.getAttribute("tooltip"));if(null!=f)null!=f&&this.isReplacePlaceholders(a)&&(f=this.replacePlaceholders(a,f)),b=this.sanitizeHtml(f);else{f=this.builtInProperties;a=a.value.attributes;var d=[];this.isEnabled()&&(f.push("linkTarget"),f.push("link"));for(var g=0;g<a.length;g++)0>
-mxUtils.indexOf(f,a[g].nodeName)&&0<a[g].nodeValue.length&&d.push({name:a[g].nodeName,value:a[g].nodeValue});d.sort(function(e,k){return e.name<k.name?-1:e.name>k.name?1:0});for(g=0;g<d.length;g++)"link"==d[g].name&&this.isCustomLink(d[g].value)||(b+=("link"!=d[g].name?"<b>"+mxUtils.htmlEntities(d[g].name)+":</b> ":"")+mxUtils.htmlEntities(d[g].value)+"\n");0<b.length&&(b=b.substring(0,b.length-1),mxClient.IS_SVG&&(b='<div style="max-width:360px;text-overflow:ellipsis;overflow:hidden;">'+b+"</div>"))}}return b};
+Graph.prototype.fitWindow=function(a,b){b=null!=b?b:10;var f=this.container.clientWidth-b,e=this.container.clientHeight-b,g=Math.floor(20*Math.min(f/a.width,e/a.height))/20;this.zoomTo(g);if(mxUtils.hasScrollbars(this.container)){var d=this.view.translate;this.container.scrollTop=(a.y+d.y)*g-Math.max((e-a.height*g)/2+b/2,0);this.container.scrollLeft=(a.x+d.x)*g-Math.max((f-a.width*g)/2+b/2,0)}};
+Graph.prototype.getTooltipForCell=function(a){var b="";if(mxUtils.isNode(a.value)){var f=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&(f=a.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==f&&(f=a.value.getAttribute("tooltip"));if(null!=f)null!=f&&this.isReplacePlaceholders(a)&&(f=this.replacePlaceholders(a,f)),b=this.sanitizeHtml(f);else{f=this.builtInProperties;a=a.value.attributes;var e=[];this.isEnabled()&&(f.push("linkTarget"),f.push("link"));for(var g=0;g<a.length;g++)0>
+mxUtils.indexOf(f,a[g].nodeName)&&0<a[g].nodeValue.length&&e.push({name:a[g].nodeName,value:a[g].nodeValue});e.sort(function(d,k){return d.name<k.name?-1:d.name>k.name?1:0});for(g=0;g<e.length;g++)"link"==e[g].name&&this.isCustomLink(e[g].value)||(b+=("link"!=e[g].name?"<b>"+mxUtils.htmlEntities(e[g].name)+":</b> ":"")+mxUtils.htmlEntities(e[g].value)+"\n");0<b.length&&(b=b.substring(0,b.length-1),mxClient.IS_SVG&&(b='<div style="max-width:360px;text-overflow:ellipsis;overflow:hidden;">'+b+"</div>"))}}return b};
Graph.prototype.getFlowAnimationStyle=function(){var a=document.getElementsByTagName("head")[0];if(null!=a&&null==this.flowAnimationStyle){this.flowAnimationStyle=document.createElement("style");this.flowAnimationStyle.setAttribute("id","geEditorFlowAnimation-"+Editor.guid());this.flowAnimationStyle.type="text/css";var b=this.flowAnimationStyle.getAttribute("id");this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(b);a.appendChild(this.flowAnimationStyle)}return this.flowAnimationStyle};
Graph.prototype.getFlowAnimationStyleCss=function(a){return"."+a+" {\nanimation: "+a+" 0.5s linear;\nanimation-iteration-count: infinite;\n}\n@keyframes "+a+" {\nto {\nstroke-dashoffset: "+-16*this.view.scale+";\n}\n}"};Graph.prototype.stringToBytes=function(a){return Graph.stringToBytes(a)};Graph.prototype.bytesToString=function(a){return Graph.bytesToString(a)};Graph.prototype.compressNode=function(a){return Graph.compressNode(a)};Graph.prototype.compress=function(a,b){return Graph.compress(a,b)};
Graph.prototype.decompress=function(a,b){return Graph.decompress(a,b)};Graph.prototype.zapGremlins=function(a){return Graph.zapGremlins(a)};HoverIcons=function(a){mxEventSource.call(this);this.graph=a;this.init()};mxUtils.extend(HoverIcons,mxEventSource);HoverIcons.prototype.arrowSpacing=2;HoverIcons.prototype.updateDelay=500;HoverIcons.prototype.activationDelay=140;HoverIcons.prototype.currentState=null;HoverIcons.prototype.activeArrow=null;HoverIcons.prototype.inactiveOpacity=15;
@@ -2988,212 +2991,212 @@ 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(f){null!=f.relatedTarget&&
mxEvent.getSource(f)==this.graph.container&&this.setDisplay("none")}));this.graph.addListener(mxEvent.START_EDITING,mxUtils.bind(this,function(f){this.reset()}));var a=this.graph.click;this.graph.click=mxUtils.bind(this,function(f){a.apply(this.graph,arguments);null==this.currentState||this.graph.isCellSelected(this.currentState.cell)||!mxEvent.isTouchEvent(f.getEvent())||this.graph.model.isVertex(f.getCell())||this.reset()});var b=!1;this.graph.addMouseListener({mouseDown:mxUtils.bind(this,function(f,
-d){b=!1;f=d.getEvent();this.isResetEvent(f)?this.reset():this.isActive()||(d=this.getState(d.getState()),null==d&&mxEvent.isTouchEvent(f)||this.update(d));this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(f,d){f=d.getEvent();this.isResetEvent(f)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(f)||this.update(this.getState(d.getState()),d.getGraphX(),d.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(b=!0)}),mouseUp:mxUtils.bind(this,
-function(f,d){f=d.getEvent();mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(f),mxEvent.getClientY(f));this.isResetEvent(f)?this.reset():this.isActive()&&!b&&null!=this.mouseDownPoint?this.click(this.currentState,this.getDirection(),d):this.isActive()?1==this.graph.getSelectionCount()&&this.graph.model.isEdge(this.graph.getSelectionCell())?this.reset():this.update(this.getState(this.graph.view.getState(this.graph.getCellAt(d.getGraphX(),d.getGraphY())))):mxEvent.isTouchEvent(f)||null!=
-this.bbox&&mxUtils.contains(this.bbox,d.getGraphX(),d.getGraphY())?(this.setDisplay(""),this.repaint()):mxEvent.isTouchEvent(f)||this.reset();b=!1;this.resetActiveArrow()})})};HoverIcons.prototype.isResetEvent=function(a,b){return mxEvent.isAltDown(a)||null==this.activeArrow&&mxEvent.isShiftDown(a)||mxEvent.isPopupTrigger(a)&&!this.graph.isCloneEvent(a)};
-HoverIcons.prototype.createArrow=function(a,b,f){var d=null;d=mxUtils.createImage(a.src);d.style.width=a.width+"px";d.style.height=a.height+"px";d.style.padding=this.tolerance+"px";null!=b&&d.setAttribute("title",b);d.style.position="absolute";d.style.cursor=this.cssCursor;mxEvent.addGestureListeners(d,mxUtils.bind(this,function(g){null==this.currentState||this.isResetEvent(g)||(this.mouseDownPoint=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(g),mxEvent.getClientY(g)),this.drag(g,
-this.mouseDownPoint.x,this.mouseDownPoint.y),this.activeArrow=d,this.setDisplay("none"),mxEvent.consume(g))}));mxEvent.redirectMouseEvents(d,this.graph,this.currentState);mxEvent.addListener(d,"mouseenter",mxUtils.bind(this,function(g){mxEvent.isMouseEvent(g)&&(null!=this.activeArrow&&this.activeArrow!=d&&mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.graph.connectionHandler.constraintHandler.reset(),mxUtils.setOpacity(d,100),this.activeArrow=d,this.fireEvent(new mxEventObject("focus",
-"arrow",d,"direction",f,"event",g)))}));mxEvent.addListener(d,"mouseleave",mxUtils.bind(this,function(g){mxEvent.isMouseEvent(g)&&this.fireEvent(new mxEventObject("blur","arrow",d,"direction",f,"event",g));this.graph.isMouseDown||this.resetActiveArrow()}));return d};HoverIcons.prototype.resetActiveArrow=function(){null!=this.activeArrow&&(mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.activeArrow=null)};
+e){b=!1;f=e.getEvent();this.isResetEvent(f)?this.reset():this.isActive()||(e=this.getState(e.getState()),null==e&&mxEvent.isTouchEvent(f)||this.update(e));this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(f,e){f=e.getEvent();this.isResetEvent(f)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(f)||this.update(this.getState(e.getState()),e.getGraphX(),e.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(b=!0)}),mouseUp:mxUtils.bind(this,
+function(f,e){f=e.getEvent();mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(f),mxEvent.getClientY(f));this.isResetEvent(f)?this.reset():this.isActive()&&!b&&null!=this.mouseDownPoint?this.click(this.currentState,this.getDirection(),e):this.isActive()?1==this.graph.getSelectionCount()&&this.graph.model.isEdge(this.graph.getSelectionCell())?this.reset():this.update(this.getState(this.graph.view.getState(this.graph.getCellAt(e.getGraphX(),e.getGraphY())))):mxEvent.isTouchEvent(f)||null!=
+this.bbox&&mxUtils.contains(this.bbox,e.getGraphX(),e.getGraphY())?(this.setDisplay(""),this.repaint()):mxEvent.isTouchEvent(f)||this.reset();b=!1;this.resetActiveArrow()})})};HoverIcons.prototype.isResetEvent=function(a,b){return mxEvent.isAltDown(a)||null==this.activeArrow&&mxEvent.isShiftDown(a)||mxEvent.isPopupTrigger(a)&&!this.graph.isCloneEvent(a)};
+HoverIcons.prototype.createArrow=function(a,b,f){var e=null;e=mxUtils.createImage(a.src);e.style.width=a.width+"px";e.style.height=a.height+"px";e.style.padding=this.tolerance+"px";null!=b&&e.setAttribute("title",b);e.style.position="absolute";e.style.cursor=this.cssCursor;mxEvent.addGestureListeners(e,mxUtils.bind(this,function(g){null==this.currentState||this.isResetEvent(g)||(this.mouseDownPoint=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(g),mxEvent.getClientY(g)),this.drag(g,
+this.mouseDownPoint.x,this.mouseDownPoint.y),this.activeArrow=e,this.setDisplay("none"),mxEvent.consume(g))}));mxEvent.redirectMouseEvents(e,this.graph,this.currentState);mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(g){mxEvent.isMouseEvent(g)&&(null!=this.activeArrow&&this.activeArrow!=e&&mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.graph.connectionHandler.constraintHandler.reset(),mxUtils.setOpacity(e,100),this.activeArrow=e,this.fireEvent(new mxEventObject("focus",
+"arrow",e,"direction",f,"event",g)))}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(g){mxEvent.isMouseEvent(g)&&this.fireEvent(new mxEventObject("blur","arrow",e,"direction",f,"event",g));this.graph.isMouseDown||this.resetActiveArrow()}));return e};HoverIcons.prototype.resetActiveArrow=function(){null!=this.activeArrow&&(mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.activeArrow=null)};
HoverIcons.prototype.getDirection=function(){var a=mxConstants.DIRECTION_EAST;this.activeArrow==this.arrowUp?a=mxConstants.DIRECTION_NORTH:this.activeArrow==this.arrowDown?a=mxConstants.DIRECTION_SOUTH:this.activeArrow==this.arrowLeft&&(a=mxConstants.DIRECTION_WEST);return a};HoverIcons.prototype.visitNodes=function(a){for(var b=0;b<this.elts.length;b++)null!=this.elts[b]&&a(this.elts[b])};HoverIcons.prototype.removeNodes=function(){this.visitNodes(function(a){null!=a.parentNode&&a.parentNode.removeChild(a)})};
HoverIcons.prototype.setDisplay=function(a){this.visitNodes(function(b){b.style.display=a})};HoverIcons.prototype.isActive=function(){return null!=this.activeArrow&&null!=this.currentState};
HoverIcons.prototype.drag=function(a,b,f){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);null!=this.currentState&&(this.graph.connectionHandler.start(this.currentState,b,f),this.graph.isMouseTrigger=mxEvent.isMouseEvent(a),this.graph.isMouseDown=!0,b=this.graph.selectionCellsHandler.getHandler(this.currentState.cell),null!=b&&b.setHandlesVisible(!1),b=this.graph.connectionHandler.edgeState,null!=a&&mxEvent.isShiftDown(a)&&mxEvent.isControlDown(a)&&null!=b&&"orthogonalEdgeStyle"===
mxUtils.getValue(b.style,mxConstants.STYLE_EDGE,null)&&(a=this.getDirection(),b.cell.style=mxUtils.setStyle(b.cell.style,"sourcePortConstraint",a),b.style.sourcePortConstraint=a))};HoverIcons.prototype.getStateAt=function(a,b,f){return this.graph.view.getState(this.graph.getCellAt(b,f))};
-HoverIcons.prototype.click=function(a,b,f){var d=f.getEvent(),g=f.getGraphX(),e=f.getGraphY();g=this.getStateAt(a,g,e);null==g||!this.graph.model.isEdge(g.cell)||this.graph.isCloneEvent(d)||g.getVisibleTerminalState(!0)!=a&&g.getVisibleTerminalState(!1)!=a?null!=a&&this.execute(a,b,f):(this.graph.setSelectionCell(g.cell),this.reset());f.consume()};
+HoverIcons.prototype.click=function(a,b,f){var e=f.getEvent(),g=f.getGraphX(),d=f.getGraphY();g=this.getStateAt(a,g,d);null==g||!this.graph.model.isEdge(g.cell)||this.graph.isCloneEvent(e)||g.getVisibleTerminalState(!0)!=a&&g.getVisibleTerminalState(!1)!=a?null!=a&&this.execute(a,b,f):(this.graph.setSelectionCell(g.cell),this.reset());f.consume()};
HoverIcons.prototype.execute=function(a,b,f){f=f.getEvent();this.graph.selectCellsForConnectVertex(this.graph.connectVertex(a.cell,b,this.graph.defaultEdgeLength,f,this.graph.isCloneEvent(f),this.graph.isCloneEvent(f)),f,this)};HoverIcons.prototype.reset=function(a){null!=a&&!a||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null;this.fireEvent(new mxEventObject("reset"))};
HoverIcons.prototype.repaint=function(){this.bbox=null;if(null!=this.currentState){this.currentState=this.getState(this.currentState);if(null!=this.currentState&&this.graph.model.isVertex(this.currentState.cell)&&this.graph.isCellConnectable(this.currentState.cell)){var a=mxRectangle.fromRectangle(this.currentState);null!=this.currentState.shape&&null!=this.currentState.shape.boundingBox&&(a=mxRectangle.fromRectangle(this.currentState.shape.boundingBox));a.grow(this.graph.tolerance);a.grow(this.arrowSpacing);
var b=this.graph.selectionCellsHandler.getHandler(this.currentState.cell);this.graph.isTableRow(this.currentState.cell)&&(b=this.graph.selectionCellsHandler.getHandler(this.graph.model.getParent(this.currentState.cell)));var f=null;null!=b&&(a.x-=b.horizontalOffset/2,a.y-=b.verticalOffset/2,a.width+=b.horizontalOffset,a.height+=b.verticalOffset,null!=b.rotationShape&&null!=b.rotationShape.node&&"hidden"!=b.rotationShape.node.style.visibility&&"none"!=b.rotationShape.node.style.display&&null!=b.rotationShape.boundingBox&&
(f=b.rotationShape.boundingBox));b=mxUtils.bind(this,function(n,u,m){if(null!=f){var r=new mxRectangle(u,m,n.clientWidth,n.clientHeight);mxUtils.intersects(r,f)&&(n==this.arrowUp?m-=r.y+r.height-f.y:n==this.arrowRight?u+=f.x+f.width-r.x:n==this.arrowDown?m+=f.y+f.height-r.y:n==this.arrowLeft&&(u-=r.x+r.width-f.x))}n.style.left=u+"px";n.style.top=m+"px";mxUtils.setOpacity(n,this.inactiveOpacity)});b(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(a.y-
this.triangleUp.height-this.tolerance));b(this.arrowRight,Math.round(a.x+a.width-this.tolerance),Math.round(this.currentState.getCenterY()-this.triangleRight.height/2-this.tolerance));b(this.arrowDown,parseInt(this.arrowUp.style.left),Math.round(a.y+a.height-this.tolerance));b(this.arrowLeft,Math.round(a.x-this.triangleLeft.width-this.tolerance),parseInt(this.arrowRight.style.top));if(this.checkCollisions){b=this.graph.getCellAt(a.x+a.width+this.triangleRight.width/2,this.currentState.getCenterY());
-var d=this.graph.getCellAt(a.x-this.triangleLeft.width/2,this.currentState.getCenterY()),g=this.graph.getCellAt(this.currentState.getCenterX(),a.y-this.triangleUp.height/2);a=this.graph.getCellAt(this.currentState.getCenterX(),a.y+a.height+this.triangleDown.height/2);null!=b&&b==d&&d==g&&g==a&&(a=g=d=b=null);var e=this.graph.getCellGeometry(this.currentState.cell),k=mxUtils.bind(this,function(n,u){var m=this.graph.model.isVertex(n)&&this.graph.getCellGeometry(n);null==n||this.graph.model.isAncestor(n,
-this.currentState.cell)||this.graph.isSwimlane(n)||!(null==m||null==e||m.height<3*e.height&&m.width<3*e.width)?u.style.visibility="visible":u.style.visibility="hidden"});k(b,this.arrowRight);k(d,this.arrowLeft);k(g,this.arrowUp);k(a,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),
+var e=this.graph.getCellAt(a.x-this.triangleLeft.width/2,this.currentState.getCenterY()),g=this.graph.getCellAt(this.currentState.getCenterX(),a.y-this.triangleUp.height/2);a=this.graph.getCellAt(this.currentState.getCenterX(),a.y+a.height+this.triangleDown.height/2);null!=b&&b==e&&e==g&&g==a&&(a=g=e=b=null);var d=this.graph.getCellGeometry(this.currentState.cell),k=mxUtils.bind(this,function(n,u){var m=this.graph.model.isVertex(n)&&this.graph.getCellGeometry(n);null==n||this.graph.model.isAncestor(n,
+this.currentState.cell)||this.graph.isSwimlane(n)||!(null==m||null==d||m.height<3*d.height&&m.width<3*d.width)?u.style.visibility="visible":u.style.visibility="hidden"});k(b,this.arrowRight);k(e,this.arrowLeft);k(g,this.arrowUp);k(a,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),
this.arrowRight.setAttribute("title",mxResources.get("plusTooltip")),this.arrowUp.setAttribute("title",mxResources.get("plusTooltip")),this.arrowDown.setAttribute("title",mxResources.get("plusTooltip"))):(this.arrowLeft.removeAttribute("title"),this.arrowRight.removeAttribute("title"),this.arrowUp.removeAttribute("title"),this.arrowDown.removeAttribute("title"))}else this.reset();null!=this.currentState&&(this.bbox=this.computeBoundingBox(),null!=this.bbox&&this.bbox.grow(10))}};
HoverIcons.prototype.computeBoundingBox=function(){var a=this.graph.model.isEdge(this.currentState.cell)?null:mxRectangle.fromRectangle(this.currentState);this.visitNodes(function(b){null!=b.parentNode&&(b=new mxRectangle(b.offsetLeft,b.offsetTop,b.offsetWidth,b.offsetHeight),null==a?a=b:a.add(b))});return a};
HoverIcons.prototype.getState=function(a){if(null!=a)if(a=a.cell,this.graph.getModel().contains(a)){if(this.graph.getModel().isVertex(a)&&!this.graph.isCellConnectable(a)){var b=this.graph.getModel().getParent(a);this.graph.getModel().isVertex(b)&&this.graph.isCellConnectable(b)&&(a=b)}if(this.graph.isCellLocked(a)||this.graph.model.isEdge(a))a=null;a=this.graph.view.getState(a);null!=a&&null==a.style&&(a=null)}else a=null;return a};
-HoverIcons.prototype.update=function(a,b,f){if(!this.graph.connectionArrowsEnabled||null!=a&&"0"==mxUtils.getValue(a.style,"allowArrows","1"))this.reset();else{null!=a&&null!=a.cell.geometry&&a.cell.geometry.relative&&this.graph.model.isEdge(a.cell.parent)&&(a=null);var d=null;this.prev!=a||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=a,d=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=a&&(this.updateThread=window.setTimeout(mxUtils.bind(this,function(){this.isActive()||
-this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=a,this.update(a,b,f))}),this.updateDelay+10))):null!=this.startTime&&(d=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=a&&d<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,b,f)?this.reset(!1):(null!=this.currentState||d>this.activationDelay)&&this.currentState!=a&&(d>this.updateDelay&&null!=a||null==this.bbox||null==b||null==f||!mxUtils.contains(this.bbox,
+HoverIcons.prototype.update=function(a,b,f){if(!this.graph.connectionArrowsEnabled||null!=a&&"0"==mxUtils.getValue(a.style,"allowArrows","1"))this.reset();else{null!=a&&null!=a.cell.geometry&&a.cell.geometry.relative&&this.graph.model.isEdge(a.cell.parent)&&(a=null);var e=null;this.prev!=a||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=a,e=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=a&&(this.updateThread=window.setTimeout(mxUtils.bind(this,function(){this.isActive()||
+this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=a,this.update(a,b,f))}),this.updateDelay+10))):null!=this.startTime&&(e=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=a&&e<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,b,f)?this.reset(!1):(null!=this.currentState||e>this.activationDelay)&&this.currentState!=a&&(e>this.updateDelay&&null!=a||null==this.bbox||null==b||null==f||!mxUtils.contains(this.bbox,
b,f))&&(null!=a&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(a),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=a&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}};
-HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=a};Graph.prototype.createParent=function(a,b,f,d,g){a=this.cloneCell(a);for(var e=0;e<f;e++){var k=this.cloneCell(b),n=this.getCellGeometry(k);null!=n&&(n.x+=e*d,n.y+=e*g);a.insert(k)}return a};
-Graph.prototype.createTable=function(a,b,f,d,g,e,k,n,u){f=null!=f?f:60;d=null!=d?d:40;e=null!=e?e:30;n=null!=n?n:"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";u=null!=u?u:"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,b*f,a*d+(null!=g?e:0),null!=k?k:"shape=table;startSize="+(null!=g?e:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,b*f,d,n),this.createVertex(null,null,"",0,0,f,d,u),b,f,0),a,0,d)};
-Graph.prototype.setTableValues=function(a,b,f){for(var d=this.model.getChildCells(a,!0),g=0;g<d.length;g++)if(null!=f&&(d[g].value=f[g]),null!=b)for(var e=this.model.getChildCells(d[g],!0),k=0;k<e.length;k++)null!=b[g][k]&&(e[k].value=b[g][k]);return a};
-Graph.prototype.createCrossFunctionalSwimlane=function(a,b,f,d,g,e,k,n,u){f=null!=f?f:120;d=null!=d?d:120;k=null!=k?k:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;collapsible=0;recursiveResize=0;expand=0;";n=null!=n?n:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;";
-u=null!=u?u:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;";g=this.createVertex(null,null,null!=g?g:"",0,0,b*f,a*d,null!=e?e:"shape=table;childLayout=tableLayout;"+(null==g?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");e=mxUtils.getValue(this.getCellStyle(g),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);g.geometry.width+=e;g.geometry.height+=e;k=this.createVertex(null,
-null,"",0,e,b*f+e,d,k);g.insert(this.createParent(k,this.createVertex(null,null,"",e,0,f,d,n),b,f,0));return 1<a?(k.geometry.y=d+e,this.createParent(g,this.createParent(k,this.createVertex(null,null,"",e,0,f,d,u),b,f,0),a-1,0,d)):g};
-Graph.prototype.visitTableCells=function(a,b){var f=null,d=this.model.getChildCells(a,!0);a=this.getActualStartSize(a,!0);for(var g=0;g<d.length;g++){for(var e=this.getActualStartSize(d[g],!0),k=this.model.getChildCells(d[g],!0),n=this.getCellStyle(d[g],!0),u=null,m=[],r=0;r<k.length;r++){var x=this.getCellGeometry(k[r]),B={cell:k[r],rospan:1,colspan:1,row:g,col:r,geo:x};x=null!=x.alternateBounds?x.alternateBounds:x;B.point=new mxPoint(x.width+(null!=u?u.point.x:a.x+e.x),x.height+(null!=f&&null!=
-f[0]?f[0].point.y:a.y+e.y));B.actual=B;null!=f&&null!=f[r]&&1<f[r].rowspan?(B.rowspan=f[r].rowspan-1,B.colspan=f[r].colspan,B.actual=f[r].actual):null!=u&&1<u.colspan?(B.rowspan=u.rowspan,B.colspan=u.colspan-1,B.actual=u.actual):(u=this.getCurrentCellStyle(k[r],!0),null!=u&&(B.rowspan=parseInt(u.rowspan||1),B.colspan=parseInt(u.colspan||1)));u=1==mxUtils.getValue(n,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(n,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;b(B,k.length,
-d.length,a.x+(u?e.x:0),a.y+(u?e.y:0));m.push(B);u=B}f=m}};Graph.prototype.getTableLines=function(a,b,f){var d=[],g=[];(b||f)&&this.visitTableCells(a,mxUtils.bind(this,function(e,k,n,u,m){b&&e.row<n-1&&(null==d[e.row]&&(d[e.row]=[new mxPoint(u,e.point.y)]),1<e.rowspan&&d[e.row].push(null),d[e.row].push(e.point));f&&e.col<k-1&&(null==g[e.col]&&(g[e.col]=[new mxPoint(e.point.x,m)]),1<e.colspan&&g[e.col].push(null),g[e.col].push(e.point))}));return d.concat(g)};
+HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=a};Graph.prototype.createParent=function(a,b,f,e,g){a=this.cloneCell(a);for(var d=0;d<f;d++){var k=this.cloneCell(b),n=this.getCellGeometry(k);null!=n&&(n.x+=d*e,n.y+=d*g);a.insert(k)}return a};
+Graph.prototype.createTable=function(a,b,f,e,g,d,k,n,u){f=null!=f?f:60;e=null!=e?e:40;d=null!=d?d:30;n=null!=n?n:"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";u=null!=u?u:"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,b*f,a*e+(null!=g?d:0),null!=k?k:"shape=table;startSize="+(null!=g?d:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,b*f,e,n),this.createVertex(null,null,"",0,0,f,e,u),b,f,0),a,0,e)};
+Graph.prototype.setTableValues=function(a,b,f){for(var e=this.model.getChildCells(a,!0),g=0;g<e.length;g++)if(null!=f&&(e[g].value=f[g]),null!=b)for(var d=this.model.getChildCells(e[g],!0),k=0;k<d.length;k++)null!=b[g][k]&&(d[k].value=b[g][k]);return a};
+Graph.prototype.createCrossFunctionalSwimlane=function(a,b,f,e,g,d,k,n,u){f=null!=f?f:120;e=null!=e?e:120;k=null!=k?k:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;collapsible=0;recursiveResize=0;expand=0;";n=null!=n?n:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;";
+u=null!=u?u:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;";g=this.createVertex(null,null,null!=g?g:"",0,0,b*f,a*e,null!=d?d:"shape=table;childLayout=tableLayout;"+(null==g?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");d=mxUtils.getValue(this.getCellStyle(g),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);g.geometry.width+=d;g.geometry.height+=d;k=this.createVertex(null,
+null,"",0,d,b*f+d,e,k);g.insert(this.createParent(k,this.createVertex(null,null,"",d,0,f,e,n),b,f,0));return 1<a?(k.geometry.y=e+d,this.createParent(g,this.createParent(k,this.createVertex(null,null,"",d,0,f,e,u),b,f,0),a-1,0,e)):g};
+Graph.prototype.visitTableCells=function(a,b){var f=null,e=this.model.getChildCells(a,!0);a=this.getActualStartSize(a,!0);for(var g=0;g<e.length;g++){for(var d=this.getActualStartSize(e[g],!0),k=this.model.getChildCells(e[g],!0),n=this.getCellStyle(e[g],!0),u=null,m=[],r=0;r<k.length;r++){var x=this.getCellGeometry(k[r]),B={cell:k[r],rospan:1,colspan:1,row:g,col:r,geo:x};x=null!=x.alternateBounds?x.alternateBounds:x;B.point=new mxPoint(x.width+(null!=u?u.point.x:a.x+d.x),x.height+(null!=f&&null!=
+f[0]?f[0].point.y:a.y+d.y));B.actual=B;null!=f&&null!=f[r]&&1<f[r].rowspan?(B.rowspan=f[r].rowspan-1,B.colspan=f[r].colspan,B.actual=f[r].actual):null!=u&&1<u.colspan?(B.rowspan=u.rowspan,B.colspan=u.colspan-1,B.actual=u.actual):(u=this.getCurrentCellStyle(k[r],!0),null!=u&&(B.rowspan=parseInt(u.rowspan||1),B.colspan=parseInt(u.colspan||1)));u=1==mxUtils.getValue(n,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(n,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;b(B,k.length,
+e.length,a.x+(u?d.x:0),a.y+(u?d.y:0));m.push(B);u=B}f=m}};Graph.prototype.getTableLines=function(a,b,f){var e=[],g=[];(b||f)&&this.visitTableCells(a,mxUtils.bind(this,function(d,k,n,u,m){b&&d.row<n-1&&(null==e[d.row]&&(e[d.row]=[new mxPoint(u,d.point.y)]),1<d.rowspan&&e[d.row].push(null),e[d.row].push(d.point));f&&d.col<k-1&&(null==g[d.col]&&(g[d.col]=[new mxPoint(d.point.x,m)]),1<d.colspan&&g[d.col].push(null),g[d.col].push(d.point))}));return e.concat(g)};
Graph.prototype.isTableCell=function(a){return this.model.isVertex(a)&&this.isTableRow(this.model.getParent(a))};Graph.prototype.isTableRow=function(a){return this.model.isVertex(a)&&this.isTable(this.model.getParent(a))};Graph.prototype.isTable=function(a){a=this.getCellStyle(a);return null!=a&&"tableLayout"==a.childLayout};Graph.prototype.isStack=function(a){a=this.getCellStyle(a);return null!=a&&"stackLayout"==a.childLayout};
Graph.prototype.isStackChild=function(a){return this.model.isVertex(a)&&this.isStack(this.model.getParent(a))};
-Graph.prototype.setTableRowHeight=function(a,b,f){f=null!=f?f:!0;var d=this.getModel();d.beginUpdate();try{var g=this.getCellGeometry(a);if(null!=g){g=g.clone();g.height+=b;d.setGeometry(a,g);var e=d.getParent(a),k=d.getChildCells(e,!0);if(!f){var n=mxUtils.indexOf(k,a);if(n<k.length-1){var u=k[n+1],m=this.getCellGeometry(u);null!=m&&(m=m.clone(),m.y+=b,m.height-=b,d.setGeometry(u,m))}}var r=this.getCellGeometry(e);null!=r&&(f||(f=a==k[k.length-1]),f&&(r=r.clone(),r.height+=b,d.setGeometry(e,r)))}}finally{d.endUpdate()}};
-Graph.prototype.setTableColumnWidth=function(a,b,f){f=null!=f?f:!1;var d=this.getModel(),g=d.getParent(a),e=d.getParent(g),k=d.getChildCells(g,!0);a=mxUtils.indexOf(k,a);var n=a==k.length-1;d.beginUpdate();try{for(var u=d.getChildCells(e,!0),m=0;m<u.length;m++){g=u[m];k=d.getChildCells(g,!0);var r=k[a],x=this.getCellGeometry(r);null!=x&&(x=x.clone(),x.width+=b,null!=x.alternateBounds&&(x.alternateBounds.width+=b),d.setGeometry(r,x));a<k.length-1&&(r=k[a+1],x=this.getCellGeometry(r),null!=x&&(x=x.clone(),
-x.x+=b,f||(x.width-=b,null!=x.alternateBounds&&(x.alternateBounds.width-=b)),d.setGeometry(r,x)))}if(n||f){var B=this.getCellGeometry(e);null!=B&&(B=B.clone(),B.width+=b,d.setGeometry(e,B))}null!=this.layoutManager&&this.layoutManager.executeLayout(e)}finally{d.endUpdate()}};function TableLayout(a){mxGraphLayout.call(this,a)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
-TableLayout.prototype.isVertexIgnored=function(a){return!this.graph.getModel().isVertex(a)||!this.graph.isCellVisible(a)};TableLayout.prototype.getSize=function(a,b){for(var f=0,d=0;d<a.length;d++)if(!this.isVertexIgnored(a[d])){var g=this.graph.getCellGeometry(a[d]);null!=g&&(f+=b?g.width:g.height)}return f};
-TableLayout.prototype.getRowLayout=function(a,b){var f=this.graph.model.getChildCells(a,!0),d=this.graph.getActualStartSize(a,!0);a=this.getSize(f,!0);b=b-d.x-d.width;var g=[];d=d.x;for(var e=0;e<f.length;e++){var k=this.graph.getCellGeometry(f[e]);null!=k&&(d+=(null!=k.alternateBounds?k.alternateBounds.width:k.width)*b/a,g.push(Math.round(d)))}return g};
-TableLayout.prototype.layoutRow=function(a,b,f,d){var g=this.graph.getModel(),e=g.getChildCells(a,!0);a=this.graph.getActualStartSize(a,!0);var k=a.x,n=0;null!=b&&(b=b.slice(),b.splice(0,0,a.x));for(var u=0;u<e.length;u++){var m=this.graph.getCellGeometry(e[u]);null!=m&&(m=m.clone(),m.y=a.y,m.height=f-a.y-a.height,null!=b?(m.x=b[u],m.width=b[u+1]-m.x,u==e.length-1&&u<b.length-2&&(m.width=d-m.x-a.x-a.width)):(m.x=k,k+=m.width,u==e.length-1?m.width=d-a.x-a.width-n:n+=m.width),m.alternateBounds=new mxRectangle(0,
-0,m.width,m.height),g.setGeometry(e[u],m))}return n};
-TableLayout.prototype.execute=function(a){if(null!=a){var b=this.graph.getActualStartSize(a,!0),f=this.graph.getCellGeometry(a),d=this.graph.getCellStyle(a),g="1"==mxUtils.getValue(d,"resizeLastRow","0"),e="1"==mxUtils.getValue(d,"resizeLast","0");d="1"==mxUtils.getValue(d,"fixedRows","0");var k=this.graph.getModel(),n=0;k.beginUpdate();try{for(var u=f.height-b.y-b.height,m=f.width-b.x-b.width,r=k.getChildCells(a,!0),x=0;x<r.length;x++)k.setVisible(r[x],!0);var B=this.getSize(r,!1);if(0<u&&0<m&&0<
-r.length&&0<B){if(g){var C=this.graph.getCellGeometry(r[r.length-1]);null!=C&&(C=C.clone(),C.height=u-B+C.height,k.setGeometry(r[r.length-1],C))}var G=e?null:this.getRowLayout(r[0],m),J=[],D=b.y;for(x=0;x<r.length;x++)C=this.graph.getCellGeometry(r[x]),null!=C&&(C=C.clone(),C.x=b.x,C.width=m,C.y=Math.round(D),D=g||d?D+C.height:D+C.height/B*u,C.height=Math.round(D)-C.y,k.setGeometry(r[x],C)),n=Math.max(n,this.layoutRow(r[x],G,C.height,m,J));d&&u<B&&(f=f.clone(),f.height=D+b.height,k.setGeometry(a,
-f));e&&m<n+Graph.minTableColumnWidth&&(f=f.clone(),f.width=n+b.width+b.x+Graph.minTableColumnWidth,k.setGeometry(a,f));this.graph.visitTableCells(a,mxUtils.bind(this,function(N){k.setVisible(N.cell,N.actual.cell==N.cell);if(N.actual.cell!=N.cell){if(N.actual.row==N.row){var Q=null!=N.geo.alternateBounds?N.geo.alternateBounds:N.geo;N.actual.geo.width+=Q.width}N.actual.col==N.col&&(Q=null!=N.geo.alternateBounds?N.geo.alternateBounds:N.geo,N.actual.geo.height+=Q.height)}}))}else for(x=0;x<r.length;x++)k.setVisible(r[x],
+Graph.prototype.setTableRowHeight=function(a,b,f){f=null!=f?f:!0;var e=this.getModel();e.beginUpdate();try{var g=this.getCellGeometry(a);if(null!=g){g=g.clone();g.height+=b;e.setGeometry(a,g);var d=e.getParent(a),k=e.getChildCells(d,!0);if(!f){var n=mxUtils.indexOf(k,a);if(n<k.length-1){var u=k[n+1],m=this.getCellGeometry(u);null!=m&&(m=m.clone(),m.y+=b,m.height-=b,e.setGeometry(u,m))}}var r=this.getCellGeometry(d);null!=r&&(f||(f=a==k[k.length-1]),f&&(r=r.clone(),r.height+=b,e.setGeometry(d,r)))}}finally{e.endUpdate()}};
+Graph.prototype.setTableColumnWidth=function(a,b,f){f=null!=f?f:!1;var e=this.getModel(),g=e.getParent(a),d=e.getParent(g),k=e.getChildCells(g,!0);a=mxUtils.indexOf(k,a);var n=a==k.length-1;e.beginUpdate();try{for(var u=e.getChildCells(d,!0),m=0;m<u.length;m++){g=u[m];k=e.getChildCells(g,!0);var r=k[a],x=this.getCellGeometry(r);null!=x&&(x=x.clone(),x.width+=b,null!=x.alternateBounds&&(x.alternateBounds.width+=b),e.setGeometry(r,x));a<k.length-1&&(r=k[a+1],x=this.getCellGeometry(r),null!=x&&(x=x.clone(),
+x.x+=b,f||(x.width-=b,null!=x.alternateBounds&&(x.alternateBounds.width-=b)),e.setGeometry(r,x)))}if(n||f){var B=this.getCellGeometry(d);null!=B&&(B=B.clone(),B.width+=b,e.setGeometry(d,B))}null!=this.layoutManager&&this.layoutManager.executeLayout(d)}finally{e.endUpdate()}};function TableLayout(a){mxGraphLayout.call(this,a)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
+TableLayout.prototype.isVertexIgnored=function(a){return!this.graph.getModel().isVertex(a)||!this.graph.isCellVisible(a)};TableLayout.prototype.getSize=function(a,b){for(var f=0,e=0;e<a.length;e++)if(!this.isVertexIgnored(a[e])){var g=this.graph.getCellGeometry(a[e]);null!=g&&(f+=b?g.width:g.height)}return f};
+TableLayout.prototype.getRowLayout=function(a,b){var f=this.graph.model.getChildCells(a,!0),e=this.graph.getActualStartSize(a,!0);a=this.getSize(f,!0);b=b-e.x-e.width;var g=[];e=e.x;for(var d=0;d<f.length;d++){var k=this.graph.getCellGeometry(f[d]);null!=k&&(e+=(null!=k.alternateBounds?k.alternateBounds.width:k.width)*b/a,g.push(Math.round(e)))}return g};
+TableLayout.prototype.layoutRow=function(a,b,f,e){var g=this.graph.getModel(),d=g.getChildCells(a,!0);a=this.graph.getActualStartSize(a,!0);var k=a.x,n=0;null!=b&&(b=b.slice(),b.splice(0,0,a.x));for(var u=0;u<d.length;u++){var m=this.graph.getCellGeometry(d[u]);null!=m&&(m=m.clone(),m.y=a.y,m.height=f-a.y-a.height,null!=b?(m.x=b[u],m.width=b[u+1]-m.x,u==d.length-1&&u<b.length-2&&(m.width=e-m.x-a.x-a.width)):(m.x=k,k+=m.width,u==d.length-1?m.width=e-a.x-a.width-n:n+=m.width),m.alternateBounds=new mxRectangle(0,
+0,m.width,m.height),g.setGeometry(d[u],m))}return n};
+TableLayout.prototype.execute=function(a){if(null!=a){var b=this.graph.getActualStartSize(a,!0),f=this.graph.getCellGeometry(a),e=this.graph.getCellStyle(a),g="1"==mxUtils.getValue(e,"resizeLastRow","0"),d="1"==mxUtils.getValue(e,"resizeLast","0");e="1"==mxUtils.getValue(e,"fixedRows","0");var k=this.graph.getModel(),n=0;k.beginUpdate();try{for(var u=f.height-b.y-b.height,m=f.width-b.x-b.width,r=k.getChildCells(a,!0),x=0;x<r.length;x++)k.setVisible(r[x],!0);var B=this.getSize(r,!1);if(0<u&&0<m&&0<
+r.length&&0<B){if(g){var C=this.graph.getCellGeometry(r[r.length-1]);null!=C&&(C=C.clone(),C.height=u-B+C.height,k.setGeometry(r[r.length-1],C))}var F=d?null:this.getRowLayout(r[0],m),J=[],D=b.y;for(x=0;x<r.length;x++)C=this.graph.getCellGeometry(r[x]),null!=C&&(C=C.clone(),C.x=b.x,C.width=m,C.y=Math.round(D),D=g||e?D+C.height:D+C.height/B*u,C.height=Math.round(D)-C.y,k.setGeometry(r[x],C)),n=Math.max(n,this.layoutRow(r[x],F,C.height,m,J));e&&u<B&&(f=f.clone(),f.height=D+b.height,k.setGeometry(a,
+f));d&&m<n+Graph.minTableColumnWidth&&(f=f.clone(),f.width=n+b.width+b.x+Graph.minTableColumnWidth,k.setGeometry(a,f));this.graph.visitTableCells(a,mxUtils.bind(this,function(N){k.setVisible(N.cell,N.actual.cell==N.cell);if(N.actual.cell!=N.cell){if(N.actual.row==N.row){var S=null!=N.geo.alternateBounds?N.geo.alternateBounds:N.geo;N.actual.geo.width+=S.width}N.actual.col==N.col&&(S=null!=N.geo.alternateBounds?N.geo.alternateBounds:N.geo,N.actual.geo.height+=S.height)}}))}else for(x=0;x<r.length;x++)k.setVisible(r[x],
!1)}finally{k.endUpdate()}}};
(function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var b=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(r,x){x=null!=x?x:!0;var B=this.getState(r);null!=B&&x&&this.graph.model.isEdge(B.cell)&&null!=B.style&&1!=B.style[mxConstants.STYLE_CURVED]&&!B.invalid&&this.updateLineJumps(B)&&this.graph.cellRenderer.redraw(B,!1,this.isRendering());B=b.apply(this,
arguments);null!=B&&x&&this.graph.model.isEdge(B.cell)&&null!=B.style&&1!=B.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(B);return B};var f=mxShape.prototype.paint;mxShape.prototype.paint=function(){f.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 r=this.node.getElementsByTagName("path");if(1<r.length){"1"!=mxUtils.getValue(this.state.style,
-mxConstants.STYLE_DASHED,"0")&&r[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var x=this.state.view.graph.getFlowAnimationStyle();null!=x&&r[1].setAttribute("class",x.getAttribute("id"))}}};var d=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(r,x){return d.apply(this,arguments)||null!=r.routedPoints&&null!=x.routedPoints&&!mxUtils.equalPoints(x.routedPoints,r.routedPoints)};var g=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
-function(r){g.apply(this,arguments);this.graph.model.isEdge(r.cell)&&1!=r.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(r)};mxGraphView.prototype.updateLineJumps=function(r){var x=r.absolutePoints;if(Graph.lineJumpsEnabled){var B=null!=r.routedPoints,C=null;if(null!=x&&null!=this.validEdges&&"none"!==mxUtils.getValue(r.style,"jumpStyle","none")){var G=function(ba,qa,O){var S=new mxPoint(qa,O);S.type=ba;C.push(S);S=null!=r.routedPoints?r.routedPoints[C.length-1]:null;return null==S||S.type!=
-ba||S.x!=qa||S.y!=O},J=.5*this.scale;B=!1;C=[];for(var D=0;D<x.length-1;D++){for(var N=x[D+1],Q=x[D],R=[],P=x[D+2];D<x.length-2&&mxUtils.ptSegDistSq(Q.x,Q.y,P.x,P.y,N.x,N.y)<1*this.scale*this.scale;)N=P,D++,P=x[D+2];B=G(0,Q.x,Q.y)||B;for(var Z=0;Z<this.validEdges.length;Z++){var U=this.validEdges[Z],V=U.absolutePoints;if(null!=V&&mxUtils.intersects(r,U)&&"1"!=U.style.noJump)for(U=0;U<V.length-1;U++){var ia=V[U+1],ha=V[U];for(P=V[U+2];U<V.length-2&&mxUtils.ptSegDistSq(ha.x,ha.y,P.x,P.y,ia.x,ia.y)<
-1*this.scale*this.scale;)ia=P,U++,P=V[U+2];P=mxUtils.intersection(Q.x,Q.y,N.x,N.y,ha.x,ha.y,ia.x,ia.y);if(null!=P&&(Math.abs(P.x-Q.x)>J||Math.abs(P.y-Q.y)>J)&&(Math.abs(P.x-N.x)>J||Math.abs(P.y-N.y)>J)&&(Math.abs(P.x-ha.x)>J||Math.abs(P.y-ha.y)>J)&&(Math.abs(P.x-ia.x)>J||Math.abs(P.y-ia.y)>J)){ia=P.x-Q.x;ha=P.y-Q.y;P={distSq:ia*ia+ha*ha,x:P.x,y:P.y};for(ia=0;ia<R.length;ia++)if(R[ia].distSq>P.distSq){R.splice(ia,0,P);P=null;break}null==P||0!=R.length&&R[R.length-1].x===P.x&&R[R.length-1].y===P.y||
-R.push(P)}}}for(U=0;U<R.length;U++)B=G(1,R[U].x,R[U].y)||B}P=x[x.length-1];B=G(0,P.x,P.y)||B}r.routedPoints=C;return B}return!1};var e=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(r,x,B){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)e.apply(this,arguments);else{var C=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
-2,G=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,J=mxUtils.getValue(this.style,"jumpStyle","none"),D=!0,N=null,Q=null,R=[],P=null;r.begin();for(var Z=0;Z<this.state.routedPoints.length;Z++){var U=this.state.routedPoints[Z],V=new mxPoint(U.x/this.scale,U.y/this.scale);0==Z?V=x[0]:Z==this.state.routedPoints.length-1&&(V=x[x.length-1]);var ia=!1;if(null!=N&&1==U.type){var ha=this.state.routedPoints[Z+1];U=ha.x/this.scale-V.x;ha=ha.y/this.scale-V.y;U=
-U*U+ha*ha;null==P&&(P=new mxPoint(V.x-N.x,V.y-N.y),Q=Math.sqrt(P.x*P.x+P.y*P.y),0<Q?(P.x=P.x*G/Q,P.y=P.y*G/Q):P=null);U>G*G&&0<Q&&(U=N.x-V.x,ha=N.y-V.y,U=U*U+ha*ha,U>G*G&&(ia=new mxPoint(V.x-P.x,V.y-P.y),U=new mxPoint(V.x+P.x,V.y+P.y),R.push(ia),this.addPoints(r,R,B,C,!1,null,D),R=0>Math.round(P.x)||0==Math.round(P.x)&&0>=Math.round(P.y)?1:-1,D=!1,"sharp"==J?(r.lineTo(ia.x-P.y*R,ia.y+P.x*R),r.lineTo(U.x-P.y*R,U.y+P.x*R),r.lineTo(U.x,U.y)):"line"==J?(r.moveTo(ia.x+P.y*R,ia.y-P.x*R),r.lineTo(ia.x-P.y*
-R,ia.y+P.x*R),r.moveTo(U.x-P.y*R,U.y+P.x*R),r.lineTo(U.x+P.y*R,U.y-P.x*R),r.moveTo(U.x,U.y)):"arc"==J?(R*=1.3,r.curveTo(ia.x-P.y*R,ia.y+P.x*R,U.x-P.y*R,U.y+P.x*R,U.x,U.y)):(r.moveTo(U.x,U.y),D=!0),R=[U],ia=!0))}else P=null;ia||(R.push(V),N=V)}this.addPoints(r,R,B,C,!1,null,D);r.stroke()}};var k=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(r,x,B,C){return null!=x&&"centerPerimeter"==x.style[mxConstants.STYLE_PERIMETER]?new mxPoint(x.getCenterX(),
-x.getCenterY()):k.apply(this,arguments)};var n=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(r,x,B,C){if(null==x||null==r||"1"!=x.style.snapToPoint&&"1"!=r.style.snapToPoint)n.apply(this,arguments);else{x=this.getTerminalPort(r,x,C);var G=this.getNextPoint(r,B,C),J=this.graph.isOrthogonal(r),D=mxUtils.toRadians(Number(x.style[mxConstants.STYLE_ROTATION]||"0")),N=new mxPoint(x.getCenterX(),x.getCenterY());if(0!=D){var Q=Math.cos(-D),R=
-Math.sin(-D);G=mxUtils.getRotatedPoint(G,Q,R,N)}Q=parseFloat(r.style[mxConstants.STYLE_PERIMETER_SPACING]||0);Q+=parseFloat(r.style[C?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);G=this.getPerimeterPoint(x,G,0==D&&J,Q);0!=D&&(Q=Math.cos(D),R=Math.sin(D),G=mxUtils.getRotatedPoint(G,Q,R,N));r.setAbsoluteTerminalPoint(this.snapToAnchorPoint(r,x,B,C,G),C)}};mxGraphView.prototype.snapToAnchorPoint=function(r,x,B,C,G){if(null!=x&&null!=r){r=this.graph.getAllConnectionConstraints(x);
-C=B=null;if(null!=r)for(var J=0;J<r.length;J++){var D=this.graph.getConnectionPoint(x,r[J]);if(null!=D){var N=(D.x-G.x)*(D.x-G.x)+(D.y-G.y)*(D.y-G.y);if(null==C||N<C)B=D,C=N}}null!=B&&(G=B)}return G};var u=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(r,x,B){var C=u.apply(this,arguments);"1"==r.getAttribute("placeholders")&&null!=B.state&&(C=B.state.view.graph.replacePlaceholders(B.state.cell,C));return C};var m=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=
-function(r){if(null!=r.style&&"undefined"!==typeof pako){var x=mxUtils.getValue(r.style,mxConstants.STYLE_SHAPE,null);if(null!=x&&"string"===typeof x&&"stencil("==x.substring(0,8))try{var B=x.substring(8,x.length-1),C=mxUtils.parseXml(Graph.decompress(B));return new mxShape(new mxStencil(C.documentElement))}catch(G){null!=window.console&&console.log("Error in shape: "+G)}}return m.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;
+mxConstants.STYLE_DASHED,"0")&&r[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var x=this.state.view.graph.getFlowAnimationStyle();null!=x&&r[1].setAttribute("class",x.getAttribute("id"))}}};var e=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(r,x){return e.apply(this,arguments)||null!=r.routedPoints&&null!=x.routedPoints&&!mxUtils.equalPoints(x.routedPoints,r.routedPoints)};var g=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
+function(r){g.apply(this,arguments);this.graph.model.isEdge(r.cell)&&1!=r.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(r)};mxGraphView.prototype.updateLineJumps=function(r){var x=r.absolutePoints;if(Graph.lineJumpsEnabled){var B=null!=r.routedPoints,C=null;if(null!=x&&null!=this.validEdges&&"none"!==mxUtils.getValue(r.style,"jumpStyle","none")){var F=function(ea,qa,O){var R=new mxPoint(qa,O);R.type=ea;C.push(R);R=null!=r.routedPoints?r.routedPoints[C.length-1]:null;return null==R||R.type!=
+ea||R.x!=qa||R.y!=O},J=.5*this.scale;B=!1;C=[];for(var D=0;D<x.length-1;D++){for(var N=x[D+1],S=x[D],T=[],P=x[D+2];D<x.length-2&&mxUtils.ptSegDistSq(S.x,S.y,P.x,P.y,N.x,N.y)<1*this.scale*this.scale;)N=P,D++,P=x[D+2];B=F(0,S.x,S.y)||B;for(var Z=0;Z<this.validEdges.length;Z++){var U=this.validEdges[Z],V=U.absolutePoints;if(null!=V&&mxUtils.intersects(r,U)&&"1"!=U.style.noJump)for(U=0;U<V.length-1;U++){var aa=V[U+1],ia=V[U];for(P=V[U+2];U<V.length-2&&mxUtils.ptSegDistSq(ia.x,ia.y,P.x,P.y,aa.x,aa.y)<
+1*this.scale*this.scale;)aa=P,U++,P=V[U+2];P=mxUtils.intersection(S.x,S.y,N.x,N.y,ia.x,ia.y,aa.x,aa.y);if(null!=P&&(Math.abs(P.x-S.x)>J||Math.abs(P.y-S.y)>J)&&(Math.abs(P.x-N.x)>J||Math.abs(P.y-N.y)>J)&&(Math.abs(P.x-ia.x)>J||Math.abs(P.y-ia.y)>J)&&(Math.abs(P.x-aa.x)>J||Math.abs(P.y-aa.y)>J)){aa=P.x-S.x;ia=P.y-S.y;P={distSq:aa*aa+ia*ia,x:P.x,y:P.y};for(aa=0;aa<T.length;aa++)if(T[aa].distSq>P.distSq){T.splice(aa,0,P);P=null;break}null==P||0!=T.length&&T[T.length-1].x===P.x&&T[T.length-1].y===P.y||
+T.push(P)}}}for(U=0;U<T.length;U++)B=F(1,T[U].x,T[U].y)||B}P=x[x.length-1];B=F(0,P.x,P.y)||B}r.routedPoints=C;return B}return!1};var d=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(r,x,B){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)d.apply(this,arguments);else{var C=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
+2,F=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,J=mxUtils.getValue(this.style,"jumpStyle","none"),D=!0,N=null,S=null,T=[],P=null;r.begin();for(var Z=0;Z<this.state.routedPoints.length;Z++){var U=this.state.routedPoints[Z],V=new mxPoint(U.x/this.scale,U.y/this.scale);0==Z?V=x[0]:Z==this.state.routedPoints.length-1&&(V=x[x.length-1]);var aa=!1;if(null!=N&&1==U.type){var ia=this.state.routedPoints[Z+1];U=ia.x/this.scale-V.x;ia=ia.y/this.scale-V.y;U=
+U*U+ia*ia;null==P&&(P=new mxPoint(V.x-N.x,V.y-N.y),S=Math.sqrt(P.x*P.x+P.y*P.y),0<S?(P.x=P.x*F/S,P.y=P.y*F/S):P=null);U>F*F&&0<S&&(U=N.x-V.x,ia=N.y-V.y,U=U*U+ia*ia,U>F*F&&(aa=new mxPoint(V.x-P.x,V.y-P.y),U=new mxPoint(V.x+P.x,V.y+P.y),T.push(aa),this.addPoints(r,T,B,C,!1,null,D),T=0>Math.round(P.x)||0==Math.round(P.x)&&0>=Math.round(P.y)?1:-1,D=!1,"sharp"==J?(r.lineTo(aa.x-P.y*T,aa.y+P.x*T),r.lineTo(U.x-P.y*T,U.y+P.x*T),r.lineTo(U.x,U.y)):"line"==J?(r.moveTo(aa.x+P.y*T,aa.y-P.x*T),r.lineTo(aa.x-P.y*
+T,aa.y+P.x*T),r.moveTo(U.x-P.y*T,U.y+P.x*T),r.lineTo(U.x+P.y*T,U.y-P.x*T),r.moveTo(U.x,U.y)):"arc"==J?(T*=1.3,r.curveTo(aa.x-P.y*T,aa.y+P.x*T,U.x-P.y*T,U.y+P.x*T,U.x,U.y)):(r.moveTo(U.x,U.y),D=!0),T=[U],aa=!0))}else P=null;aa||(T.push(V),N=V)}this.addPoints(r,T,B,C,!1,null,D);r.stroke()}};var k=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(r,x,B,C){return null!=x&&"centerPerimeter"==x.style[mxConstants.STYLE_PERIMETER]?new mxPoint(x.getCenterX(),
+x.getCenterY()):k.apply(this,arguments)};var n=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(r,x,B,C){if(null==x||null==r||"1"!=x.style.snapToPoint&&"1"!=r.style.snapToPoint)n.apply(this,arguments);else{x=this.getTerminalPort(r,x,C);var F=this.getNextPoint(r,B,C),J=this.graph.isOrthogonal(r),D=mxUtils.toRadians(Number(x.style[mxConstants.STYLE_ROTATION]||"0")),N=new mxPoint(x.getCenterX(),x.getCenterY());if(0!=D){var S=Math.cos(-D),T=
+Math.sin(-D);F=mxUtils.getRotatedPoint(F,S,T,N)}S=parseFloat(r.style[mxConstants.STYLE_PERIMETER_SPACING]||0);S+=parseFloat(r.style[C?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);F=this.getPerimeterPoint(x,F,0==D&&J,S);0!=D&&(S=Math.cos(D),T=Math.sin(D),F=mxUtils.getRotatedPoint(F,S,T,N));r.setAbsoluteTerminalPoint(this.snapToAnchorPoint(r,x,B,C,F),C)}};mxGraphView.prototype.snapToAnchorPoint=function(r,x,B,C,F){if(null!=x&&null!=r){r=this.graph.getAllConnectionConstraints(x);
+C=B=null;if(null!=r)for(var J=0;J<r.length;J++){var D=this.graph.getConnectionPoint(x,r[J]);if(null!=D){var N=(D.x-F.x)*(D.x-F.x)+(D.y-F.y)*(D.y-F.y);if(null==C||N<C)B=D,C=N}}null!=B&&(F=B)}return F};var u=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(r,x,B){var C=u.apply(this,arguments);"1"==r.getAttribute("placeholders")&&null!=B.state&&(C=B.state.view.graph.replacePlaceholders(B.state.cell,C));return C};var m=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=
+function(r){if(null!=r.style&&"undefined"!==typeof pako){var x=mxUtils.getValue(r.style,mxConstants.STYLE_SHAPE,null);if(null!=x&&"string"===typeof x&&"stencil("==x.substring(0,8))try{var B=x.substring(8,x.length-1),C=mxUtils.parseXml(Graph.decompress(B));return new mxShape(new mxStencil(C.documentElement))}catch(F){null!=window.console&&console.log("Error in shape: "+F)}}return m.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;
mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];mxStencilRegistry.filesLoaded={};
-mxStencilRegistry.getStencil=function(a){var b=mxStencilRegistry.stencils[a];if(null==b&&null==mxCellRenderer.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var f=mxStencilRegistry.getBasenameForStencil(a);if(null!=f){b=mxStencilRegistry.libraries[f];if(null!=b){if(null==mxStencilRegistry.packages[f]){for(var d=0;d<b.length;d++){var g=b[d];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 e=mxUtils.load(g);null!=e&&200<=e.getStatus()&&299>=e.getStatus()&&eval.call(window,e.getText())}}catch(k){null!=window.console&&console.log("error in getStencil:",a,f,b,g,k)}}mxStencilRegistry.packages[f]=1}}else f=f.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+f+".xml",null);b=mxStencilRegistry.stencils[a]}}return b};
+mxStencilRegistry.getStencil=function(a){var b=mxStencilRegistry.stencils[a];if(null==b&&null==mxCellRenderer.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var f=mxStencilRegistry.getBasenameForStencil(a);if(null!=f){b=mxStencilRegistry.libraries[f];if(null!=b){if(null==mxStencilRegistry.packages[f]){for(var e=0;e<b.length;e++){var g=b[e];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 d=mxUtils.load(g);null!=d&&200<=d.getStatus()&&299>=d.getStatus()&&eval.call(window,d.getText())}}catch(k){null!=window.console&&console.log("error in getStencil:",a,f,b,g,k)}}mxStencilRegistry.packages[f]=1}}else f=f.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+f+".xml",null);b=mxStencilRegistry.stencils[a]}}return b};
mxStencilRegistry.getBasenameForStencil=function(a){var b=null;if(null!=a&&"string"===typeof a&&(a=a.split("."),0<a.length&&"mxgraph"==a[0])){b=a[1];for(var f=2;f<a.length-1;f++)b+="/"+a[f]}return b};
-mxStencilRegistry.loadStencilSet=function(a,b,f,d){var g=mxStencilRegistry.packages[a];if(null!=f&&f||null==g){var e=!1;if(null==g)try{if(d){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(k){null!=k&&null!=k.documentElement&&(mxStencilRegistry.packages[a]=k,e=!0,mxStencilRegistry.parseStencilSet(k.documentElement,b,e))}));return}g=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=g;e=!0}catch(k){null!=window.console&&console.log("error in loadStencilSet:",a,k)}null!=g&&null!=
-g.documentElement&&mxStencilRegistry.parseStencilSet(g.documentElement,b,e)}};mxStencilRegistry.loadStencil=function(a,b){if(null!=b)mxUtils.get(a,mxUtils.bind(this,function(f){b(200<=f.getStatus()&&299>=f.getStatus()?f.getXml():null)}));else return mxUtils.load(a).getXml()};mxStencilRegistry.parseStencilSets=function(a){for(var b=0;b<a.length;b++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(a[b]).documentElement)};
-mxStencilRegistry.parseStencilSet=function(a,b,f){if("stencils"==a.nodeName)for(var d=a.firstChild;null!=d;)"shapes"==d.nodeName&&mxStencilRegistry.parseStencilSet(d,b,f),d=d.nextSibling;else{f=null!=f?f:!0;d=a.firstChild;var g="";a=a.getAttribute("name");for(null!=a&&(g=a+".");null!=d;){if(d.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=d.getAttribute("name"),null!=a)){g=g.toLowerCase();var e=a.replace(/ /g,"_");f&&mxStencilRegistry.addStencil(g+e.toLowerCase(),new mxStencil(d));if(null!=b){var k=d.getAttribute("w"),
-n=d.getAttribute("h");k=null==k?80:parseInt(k,10);n=null==n?80:parseInt(n,10);b(g,e,a,k,n)}}d=d.nextSibling}}};
+mxStencilRegistry.loadStencilSet=function(a,b,f,e){var g=mxStencilRegistry.packages[a];if(null!=f&&f||null==g){var d=!1;if(null==g)try{if(e){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(k){null!=k&&null!=k.documentElement&&(mxStencilRegistry.packages[a]=k,d=!0,mxStencilRegistry.parseStencilSet(k.documentElement,b,d))}));return}g=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=g;d=!0}catch(k){null!=window.console&&console.log("error in loadStencilSet:",a,k)}null!=g&&null!=
+g.documentElement&&mxStencilRegistry.parseStencilSet(g.documentElement,b,d)}};mxStencilRegistry.loadStencil=function(a,b){if(null!=b)mxUtils.get(a,mxUtils.bind(this,function(f){b(200<=f.getStatus()&&299>=f.getStatus()?f.getXml():null)}));else return mxUtils.load(a).getXml()};mxStencilRegistry.parseStencilSets=function(a){for(var b=0;b<a.length;b++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(a[b]).documentElement)};
+mxStencilRegistry.parseStencilSet=function(a,b,f){if("stencils"==a.nodeName)for(var e=a.firstChild;null!=e;)"shapes"==e.nodeName&&mxStencilRegistry.parseStencilSet(e,b,f),e=e.nextSibling;else{f=null!=f?f:!0;e=a.firstChild;var g="";a=a.getAttribute("name");for(null!=a&&(g=a+".");null!=e;){if(e.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=e.getAttribute("name"),null!=a)){g=g.toLowerCase();var d=a.replace(/ /g,"_");f&&mxStencilRegistry.addStencil(g+d.toLowerCase(),new mxStencil(e));if(null!=b){var k=e.getAttribute("w"),
+n=e.getAttribute("h");k=null==k?80:parseInt(k,10);n=null==n?80:parseInt(n,10);b(g,d,a,k,n)}}e=e.nextSibling}}};
"undefined"!==typeof mxVertexHandler&&function(){function a(){var t=document.createElement("div");t.className="geHint";t.style.whiteSpace="nowrap";t.style.position="absolute";return t}function b(t,z){switch(z){case mxConstants.POINTS:return t;case mxConstants.MILLIMETERS:return(t/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(t/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(t/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(t){return!mxEvent.isAltDown(t)};var f=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(t){return f.apply(this,arguments)||this.graph.isTableRow(t)||this.graph.isTableCell(t)};var d=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=function(t){return d.apply(this,arguments)||
+!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents=!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(t){return!mxEvent.isAltDown(t)};var f=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(t){return f.apply(this,arguments)||this.graph.isTableRow(t)||this.graph.isTableCell(t)};var e=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=function(t){return e.apply(this,arguments)||
this.graph.isEdgeIgnored(t)};var g=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(t){return this.graph.isCloneEvent(t)!=g.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var t=new mxEllipse(null,this.highlightColor,this.highlightColor,0);t.opacity=mxConstants.HIGHLIGHT_OPACITY;return t};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor="crosshair";mxConnectionHandler.prototype.createEdgeState=
-function(t){t=this.graph.createCurrentEdgeStyle();t=this.graph.createEdge(null,null,null,null,null,t);t=new mxCellState(this.graph.view,t,this.graph.getCellStyle(t));for(var z in this.graph.currentEdgeStyle)t.style[z]=this.graph.currentEdgeStyle[z];t.style=this.graph.postProcessCellStyle(t.cell,t.style);return t};var e=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var t=e.apply(this,arguments);t.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];
+function(t){t=this.graph.createCurrentEdgeStyle();t=this.graph.createEdge(null,null,null,null,null,t);t=new mxCellState(this.graph.view,t,this.graph.getCellStyle(t));for(var z in this.graph.currentEdgeStyle)t.style[z]=this.graph.currentEdgeStyle[z];t.style=this.graph.postProcessCellStyle(t.cell,t.style);return t};var d=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var t=d.apply(this,arguments);t.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];
return t};mxConnectionHandler.prototype.updatePreview=function(t){};var k=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var t=k.apply(this,arguments),z=t.getCell;t.getCell=mxUtils.bind(this,function(A){var E=z.apply(this,arguments);this.error=null;return E});return t};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=
function(){for(var t="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",z="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),A=0;A<z.length;A++)null!=this.currentEdgeStyle[z[A]]&&(t+=z[A]+"="+this.currentEdgeStyle[z[A]]+";");null!=this.currentEdgeStyle.orthogonalLoop?t+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&
(t+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?t+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(t+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(t+="elbow="+this.currentEdgeStyle.elbow+";");return t=null!=this.currentEdgeStyle.html?t+("html="+this.currentEdgeStyle.html+";"):t+"html=1;"};
Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var t=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=t&&(new mxCodec(t.ownerDocument)).decode(t,this.getStylesheet())};Graph.prototype.createCellLookup=function(t,z){z=null!=z?z:{};for(var A=0;A<t.length;A++){var E=t[A];z[mxObjectIdentity.get(E)]=E.getId();for(var H=this.model.getChildCount(E),
-K=0;K<H;K++)this.createCellLookup([this.model.getChildAt(E,K)],z)}return z};Graph.prototype.createCellMapping=function(t,z,A){A=null!=A?A:{};for(var E in t){var H=z[E];null==A[H]&&(A[H]=t[E].getId()||"")}return A};Graph.prototype.importGraphModel=function(t,z,A,E){z=null!=z?z:0;A=null!=A?A:0;var H=new mxCodec(t.ownerDocument),K=new mxGraphModel;H.decode(t,K);t=[];H={};var X={},ja=K.getChildren(this.cloneCell(K.root,this.isCloneInvalidEdges(),H));if(null!=ja){var ea=this.createCellLookup([K.root]);
-ja=ja.slice();this.model.beginUpdate();try{if(1!=ja.length||this.isCellLocked(this.getDefaultParent()))for(K=0;K<ja.length;K++)ka=this.model.getChildren(this.moveCells([ja[K]],z,A,!1,this.model.getRoot())[0]),null!=ka&&(t=t.concat(ka));else{var ka=K.getChildren(ja[0]);null!=ka&&(t=this.moveCells(ka,z,A,!1,this.getDefaultParent()),X[K.getChildAt(K.root,0).getId()]=this.getDefaultParent().getId())}if(null!=t&&(this.createCellMapping(H,ea,X),this.updateCustomLinks(X,t),E)){this.isGridEnabled()&&(z=this.snap(z),
-A=this.snap(A));var ta=this.getBoundingBoxFromGeometry(t,!0);null!=ta&&this.moveCells(t,z-ta.x,A-ta.y)}}finally{this.model.endUpdate()}}return t};Graph.prototype.encodeCells=function(t){for(var z={},A=this.cloneCells(t,null,z),E=new mxDictionary,H=0;H<t.length;H++)E.put(t[H],!0);var K=new mxCodec,X=new mxGraphModel,ja=X.getChildAt(X.getRoot(),0);for(H=0;H<A.length;H++){X.add(ja,A[H]);var ea=this.view.getState(t[H]);if(null!=ea){var ka=this.getCellGeometry(A[H]);null!=ka&&ka.relative&&!this.model.isEdge(t[H])&&
-null==E.get(this.model.getParent(t[H]))&&(ka.offset=null,ka.relative=!1,ka.x=ea.x/ea.view.scale-ea.view.translate.x,ka.y=ea.y/ea.view.scale-ea.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(z,this.createCellLookup(t)),A);return K.encode(X)};Graph.prototype.isSwimlane=function(t,z){var A=null;null==t||this.model.isEdge(t)||this.model.getParent(t)==this.model.getRoot()||(A=this.getCurrentCellStyle(t,z)[mxConstants.STYLE_SHAPE]);return A==mxConstants.SHAPE_SWIMLANE||"table"==A||"tableRow"==
-A};var n=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(t){var z=this.model.getParent(t);if(null!=z){var A=this.getCurrentCellStyle(z);if(null!=A.expand)return"0"!=A.expand}return n.apply(this,arguments)&&(null==z||!this.isTable(z))};var u=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(t,z,A,E,H,K,X,ja){null==ja&&(ja=this.model.getParent(t),this.isTable(ja)||this.isTableRow(ja))&&(ja=this.getCellAt(K,X,null,!0,!1));A=null;this.model.beginUpdate();try{A=u.apply(this,
-[t,z,A,E,H,K,X,ja]);this.model.setValue(A,"");var ea=this.getChildCells(A,!0);for(z=0;z<ea.length;z++){var ka=this.getCellGeometry(ea[z]);null!=ka&&ka.relative&&0<ka.x&&this.model.remove(ea[z])}var ta=this.getChildCells(t,!0);for(z=0;z<ta.length;z++)ka=this.getCellGeometry(ta[z]),null!=ka&&ka.relative&&0>=ka.x&&this.model.remove(ta[z]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[A]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[A]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
+L=0;L<H;L++)this.createCellLookup([this.model.getChildAt(E,L)],z)}return z};Graph.prototype.createCellMapping=function(t,z,A){A=null!=A?A:{};for(var E in t){var H=z[E];null==A[H]&&(A[H]=t[E].getId()||"")}return A};Graph.prototype.importGraphModel=function(t,z,A,E){z=null!=z?z:0;A=null!=A?A:0;var H=new mxCodec(t.ownerDocument),L=new mxGraphModel;H.decode(t,L);t=[];H={};var W={},ha=L.getChildren(this.cloneCell(L.root,this.isCloneInvalidEdges(),H));if(null!=ha){var fa=this.createCellLookup([L.root]);
+ha=ha.slice();this.model.beginUpdate();try{if(1!=ha.length||this.isCellLocked(this.getDefaultParent()))for(L=0;L<ha.length;L++)ja=this.model.getChildren(this.moveCells([ha[L]],z,A,!1,this.model.getRoot())[0]),null!=ja&&(t=t.concat(ja));else{var ja=L.getChildren(ha[0]);null!=ja&&(t=this.moveCells(ja,z,A,!1,this.getDefaultParent()),W[L.getChildAt(L.root,0).getId()]=this.getDefaultParent().getId())}if(null!=t&&(this.createCellMapping(H,fa,W),this.updateCustomLinks(W,t),E)){this.isGridEnabled()&&(z=this.snap(z),
+A=this.snap(A));var ua=this.getBoundingBoxFromGeometry(t,!0);null!=ua&&this.moveCells(t,z-ua.x,A-ua.y)}}finally{this.model.endUpdate()}}return t};Graph.prototype.encodeCells=function(t){for(var z={},A=this.cloneCells(t,null,z),E=new mxDictionary,H=0;H<t.length;H++)E.put(t[H],!0);var L=new mxCodec,W=new mxGraphModel,ha=W.getChildAt(W.getRoot(),0);for(H=0;H<A.length;H++){W.add(ha,A[H]);var fa=this.view.getState(t[H]);if(null!=fa){var ja=this.getCellGeometry(A[H]);null!=ja&&ja.relative&&!this.model.isEdge(t[H])&&
+null==E.get(this.model.getParent(t[H]))&&(ja.offset=null,ja.relative=!1,ja.x=fa.x/fa.view.scale-fa.view.translate.x,ja.y=fa.y/fa.view.scale-fa.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(z,this.createCellLookup(t)),A);return L.encode(W)};Graph.prototype.isSwimlane=function(t,z){var A=null;null==t||this.model.isEdge(t)||this.model.getParent(t)==this.model.getRoot()||(A=this.getCurrentCellStyle(t,z)[mxConstants.STYLE_SHAPE]);return A==mxConstants.SHAPE_SWIMLANE||"table"==A||"tableRow"==
+A};var n=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(t){var z=this.model.getParent(t);if(null!=z){var A=this.getCurrentCellStyle(z);if(null!=A.expand)return"0"!=A.expand}return n.apply(this,arguments)&&(null==z||!this.isTable(z))};var u=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(t,z,A,E,H,L,W,ha){null==ha&&(ha=this.model.getParent(t),this.isTable(ha)||this.isTableRow(ha))&&(ha=this.getCellAt(L,W,null,!0,!1));A=null;this.model.beginUpdate();try{A=u.apply(this,
+[t,z,A,E,H,L,W,ha]);this.model.setValue(A,"");var fa=this.getChildCells(A,!0);for(z=0;z<fa.length;z++){var ja=this.getCellGeometry(fa[z]);null!=ja&&ja.relative&&0<ja.x&&this.model.remove(fa[z])}var ua=this.getChildCells(t,!0);for(z=0;z<ua.length;z++)ja=this.getCellGeometry(ua[z]),null!=ja&&ja.relative&&0>=ja.x&&this.model.remove(ua[z]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[A]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[A]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
null,[t]);this.setCellStyles(mxConstants.STYLE_STARTARROW,mxConstants.NONE,[t]);var Aa=this.model.getTerminal(A,!1);if(null!=Aa){var Ea=this.getCurrentCellStyle(Aa);null!=Ea&&"1"==Ea.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[t]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[t]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[A]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[A]))}}finally{this.model.endUpdate()}return A};var m=Graph.prototype.selectCell;Graph.prototype.selectCell=
-function(t,z,A){if(z||A)m.apply(this,arguments);else{var E=this.getSelectionCell(),H=null,K=[],X=mxUtils.bind(this,function(ja){if(null!=this.view.getState(ja)&&(this.model.isVertex(ja)||this.model.isEdge(ja)))if(K.push(ja),ja==E)H=K.length-1;else if(t&&null==E&&0<K.length||null!=H&&t&&K.length>H||!t&&0<H)return;for(var ea=0;ea<this.model.getChildCount(ja);ea++)X(this.model.getChildAt(ja,ea))});X(this.model.root);0<K.length&&(H=null!=H?mxUtils.mod(H+(t?1:-1),K.length):0,this.setSelectionCell(K[H]))}};
-Graph.prototype.swapShapes=function(t,z,A,E,H,K,X){z=!1;if(!E&&null!=H&&1==t.length&&(E=this.view.getState(H),A=this.view.getState(t[0]),null!=E&&null!=A&&(null!=K&&mxEvent.isShiftDown(K)||"umlLifeline"==E.style.shape&&"umlLifeline"==A.style.shape)&&(E=this.getCellGeometry(H),K=this.getCellGeometry(t[0]),null!=E&&null!=K))){z=E.clone();E=K.clone();E.x=z.x;E.y=z.y;z.x=K.x;z.y=K.y;this.model.beginUpdate();try{this.model.setGeometry(H,z),this.model.setGeometry(t[0],E)}finally{this.model.endUpdate()}z=
-!0}return z};var r=Graph.prototype.moveCells;Graph.prototype.moveCells=function(t,z,A,E,H,K,X){if(this.swapShapes(t,z,A,E,H,K,X))return t;X=null!=X?X:{};if(this.isTable(H)){for(var ja=[],ea=0;ea<t.length;ea++)this.isTable(t[ea])?ja=ja.concat(this.model.getChildCells(t[ea],!0).reverse()):ja.push(t[ea]);t=ja}this.model.beginUpdate();try{ja=[];for(ea=0;ea<t.length;ea++)if(null!=H&&this.isTableRow(t[ea])){var ka=this.model.getParent(t[ea]),ta=this.getCellGeometry(t[ea]);this.isTable(ka)&&ja.push(ka);
-if(null!=ka&&null!=ta&&this.isTable(ka)&&this.isTable(H)&&(E||ka!=H)){if(!E){var Aa=this.getCellGeometry(ka);null!=Aa&&(Aa=Aa.clone(),Aa.height-=ta.height,this.model.setGeometry(ka,Aa))}Aa=this.getCellGeometry(H);null!=Aa&&(Aa=Aa.clone(),Aa.height+=ta.height,this.model.setGeometry(H,Aa));var Ea=this.model.getChildCells(H,!0);if(0<Ea.length){t[ea]=E?this.cloneCell(t[ea]):t[ea];var Ma=this.model.getChildCells(t[ea],!0),La=this.model.getChildCells(Ea[0],!0),Ia=La.length-Ma.length;if(0<Ia)for(var Fa=
-0;Fa<Ia;Fa++){var Ga=this.cloneCell(Ma[Ma.length-1]);null!=Ga&&(Ga.value="",this.model.add(t[ea],Ga))}else if(0>Ia)for(Fa=0;Fa>Ia;Fa--)this.model.remove(Ma[Ma.length+Fa-1]);Ma=this.model.getChildCells(t[ea],!0);for(Fa=0;Fa<La.length;Fa++){var Oa=this.getCellGeometry(La[Fa]),Pa=this.getCellGeometry(Ma[Fa]);null!=Oa&&null!=Pa&&(Pa=Pa.clone(),Pa.width=Oa.width,this.model.setGeometry(Ma[Fa],Pa))}}}}var Na=r.apply(this,arguments);for(ea=0;ea<ja.length;ea++)!E&&this.model.contains(ja[ea])&&0==this.model.getChildCount(ja[ea])&&
-this.model.remove(ja[ea]);E&&this.updateCustomLinks(this.createCellMapping(X,this.createCellLookup(t)),Na)}finally{this.model.endUpdate()}return Na};var x=Graph.prototype.removeCells;Graph.prototype.removeCells=function(t,z){var A=[];this.model.beginUpdate();try{for(var E=0;E<t.length;E++)if(this.isTableCell(t[E])){var H=this.model.getParent(t[E]),K=this.model.getParent(H);1==this.model.getChildCount(H)&&1==this.model.getChildCount(K)?0>mxUtils.indexOf(t,K)&&0>mxUtils.indexOf(A,K)&&A.push(K):this.labelChanged(t[E],
-"")}else{if(this.isTableRow(t[E])&&(K=this.model.getParent(t[E]),0>mxUtils.indexOf(t,K)&&0>mxUtils.indexOf(A,K))){for(var X=this.model.getChildCells(K,!0),ja=0,ea=0;ea<X.length;ea++)0<=mxUtils.indexOf(t,X[ea])&&ja++;ja==X.length&&A.push(K)}A.push(t[E])}A=x.apply(this,[A,z])}finally{this.model.endUpdate()}return A};Graph.prototype.updateCustomLinks=function(t,z,A){A=null!=A?A:new Graph;for(var E=0;E<z.length;E++)null!=z[E]&&A.updateCustomLinksForCell(t,z[E],A)};Graph.prototype.updateCustomLinksForCell=
+function(t,z,A){if(z||A)m.apply(this,arguments);else{var E=this.getSelectionCell(),H=null,L=[],W=mxUtils.bind(this,function(ha){if(null!=this.view.getState(ha)&&(this.model.isVertex(ha)||this.model.isEdge(ha)))if(L.push(ha),ha==E)H=L.length-1;else if(t&&null==E&&0<L.length||null!=H&&t&&L.length>H||!t&&0<H)return;for(var fa=0;fa<this.model.getChildCount(ha);fa++)W(this.model.getChildAt(ha,fa))});W(this.model.root);0<L.length&&(H=null!=H?mxUtils.mod(H+(t?1:-1),L.length):0,this.setSelectionCell(L[H]))}};
+Graph.prototype.swapShapes=function(t,z,A,E,H,L,W){z=!1;if(!E&&null!=H&&1==t.length&&(E=this.view.getState(H),A=this.view.getState(t[0]),null!=E&&null!=A&&(null!=L&&mxEvent.isShiftDown(L)||"umlLifeline"==E.style.shape&&"umlLifeline"==A.style.shape)&&(E=this.getCellGeometry(H),L=this.getCellGeometry(t[0]),null!=E&&null!=L))){z=E.clone();E=L.clone();E.x=z.x;E.y=z.y;z.x=L.x;z.y=L.y;this.model.beginUpdate();try{this.model.setGeometry(H,z),this.model.setGeometry(t[0],E)}finally{this.model.endUpdate()}z=
+!0}return z};var r=Graph.prototype.moveCells;Graph.prototype.moveCells=function(t,z,A,E,H,L,W){if(this.swapShapes(t,z,A,E,H,L,W))return t;W=null!=W?W:{};if(this.isTable(H)){for(var ha=[],fa=0;fa<t.length;fa++)this.isTable(t[fa])?ha=ha.concat(this.model.getChildCells(t[fa],!0).reverse()):ha.push(t[fa]);t=ha}this.model.beginUpdate();try{ha=[];for(fa=0;fa<t.length;fa++)if(null!=H&&this.isTableRow(t[fa])){var ja=this.model.getParent(t[fa]),ua=this.getCellGeometry(t[fa]);this.isTable(ja)&&ha.push(ja);
+if(null!=ja&&null!=ua&&this.isTable(ja)&&this.isTable(H)&&(E||ja!=H)){if(!E){var Aa=this.getCellGeometry(ja);null!=Aa&&(Aa=Aa.clone(),Aa.height-=ua.height,this.model.setGeometry(ja,Aa))}Aa=this.getCellGeometry(H);null!=Aa&&(Aa=Aa.clone(),Aa.height+=ua.height,this.model.setGeometry(H,Aa));var Ea=this.model.getChildCells(H,!0);if(0<Ea.length){t[fa]=E?this.cloneCell(t[fa]):t[fa];var Ma=this.model.getChildCells(t[fa],!0),La=this.model.getChildCells(Ea[0],!0),Ia=La.length-Ma.length;if(0<Ia)for(var Fa=
+0;Fa<Ia;Fa++){var Ga=this.cloneCell(Ma[Ma.length-1]);null!=Ga&&(Ga.value="",this.model.add(t[fa],Ga))}else if(0>Ia)for(Fa=0;Fa>Ia;Fa--)this.model.remove(Ma[Ma.length+Fa-1]);Ma=this.model.getChildCells(t[fa],!0);for(Fa=0;Fa<La.length;Fa++){var Oa=this.getCellGeometry(La[Fa]),Pa=this.getCellGeometry(Ma[Fa]);null!=Oa&&null!=Pa&&(Pa=Pa.clone(),Pa.width=Oa.width,this.model.setGeometry(Ma[Fa],Pa))}}}}var Na=r.apply(this,arguments);for(fa=0;fa<ha.length;fa++)!E&&this.model.contains(ha[fa])&&0==this.model.getChildCount(ha[fa])&&
+this.model.remove(ha[fa]);E&&this.updateCustomLinks(this.createCellMapping(W,this.createCellLookup(t)),Na)}finally{this.model.endUpdate()}return Na};var x=Graph.prototype.removeCells;Graph.prototype.removeCells=function(t,z){var A=[];this.model.beginUpdate();try{for(var E=0;E<t.length;E++)if(this.isTableCell(t[E])){var H=this.model.getParent(t[E]),L=this.model.getParent(H);1==this.model.getChildCount(H)&&1==this.model.getChildCount(L)?0>mxUtils.indexOf(t,L)&&0>mxUtils.indexOf(A,L)&&A.push(L):this.labelChanged(t[E],
+"")}else{if(this.isTableRow(t[E])&&(L=this.model.getParent(t[E]),0>mxUtils.indexOf(t,L)&&0>mxUtils.indexOf(A,L))){for(var W=this.model.getChildCells(L,!0),ha=0,fa=0;fa<W.length;fa++)0<=mxUtils.indexOf(t,W[fa])&&ha++;ha==W.length&&A.push(L)}A.push(t[E])}A=x.apply(this,[A,z])}finally{this.model.endUpdate()}return A};Graph.prototype.updateCustomLinks=function(t,z,A){A=null!=A?A:new Graph;for(var E=0;E<z.length;E++)null!=z[E]&&A.updateCustomLinksForCell(t,z[E],A)};Graph.prototype.updateCustomLinksForCell=
function(t,z){this.doUpdateCustomLinksForCell(t,z);for(var A=this.model.getChildCount(z),E=0;E<A;E++)this.updateCustomLinksForCell(t,this.model.getChildAt(z,E))};Graph.prototype.doUpdateCustomLinksForCell=function(t,z){};Graph.prototype.getAllConnectionConstraints=function(t,z){if(null!=t){z=mxUtils.getValue(t.style,"points",null);if(null!=z){t=[];try{var A=JSON.parse(z);for(z=0;z<A.length;z++){var E=A[z];t.push(new mxConnectionConstraint(new mxPoint(E[0],E[1]),2<E.length?"0"!=E[2]:!0,null,3<E.length?
-E[3]:0,4<E.length?E[4]:0))}}catch(K){}return t}if(null!=t.shape&&null!=t.shape.bounds){E=t.shape.direction;z=t.shape.bounds;var H=t.shape.scale;A=z.width/H;z=z.height/H;if(E==mxConstants.DIRECTION_NORTH||E==mxConstants.DIRECTION_SOUTH)E=A,A=z,z=E;z=t.shape.getConstraints(t.style,A,z);if(null!=z)return z;if(null!=t.shape.stencil&&null!=t.shape.stencil.constraints)return t.shape.stencil.constraints;if(null!=t.shape.constraints)return t.shape.constraints}}return null};Graph.prototype.flipEdge=function(t){if(null!=
+E[3]:0,4<E.length?E[4]:0))}}catch(L){}return t}if(null!=t.shape&&null!=t.shape.bounds){E=t.shape.direction;z=t.shape.bounds;var H=t.shape.scale;A=z.width/H;z=z.height/H;if(E==mxConstants.DIRECTION_NORTH||E==mxConstants.DIRECTION_SOUTH)E=A,A=z,z=E;z=t.shape.getConstraints(t.style,A,z);if(null!=z)return z;if(null!=t.shape.stencil&&null!=t.shape.stencil.constraints)return t.shape.stencil.constraints;if(null!=t.shape.constraints)return t.shape.constraints}}return null};Graph.prototype.flipEdge=function(t){if(null!=
t){var z=this.getCurrentCellStyle(t);z=mxUtils.getValue(z,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,z,[t])}};Graph.prototype.isValidRoot=function(t){for(var z=this.model.getChildCount(t),A=0,E=0;E<z;E++){var H=this.model.getChildAt(t,E);this.model.isVertex(H)&&(H=this.getCellGeometry(H),null==H||H.relative||A++)}return 0<A||this.isContainer(t)};Graph.prototype.isValidDropTarget=
-function(t,z,A){for(var E=this.getCurrentCellStyle(t),H=!0,K=!0,X=0;X<z.length&&K;X++)H=H&&this.isTable(z[X]),K=K&&this.isTableRow(z[X]);return(1==z.length&&null!=A&&mxEvent.isShiftDown(A)&&!mxEvent.isControlDown(A)&&!mxEvent.isAltDown(A)||("1"!=mxUtils.getValue(E,"part","0")||this.isContainer(t))&&"0"!=mxUtils.getValue(E,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(t))&&!this.isTableRow(t)&&(!this.isTable(t)||K||H))&&!this.isCellLocked(t)};Graph.prototype.createGroupCell=
+function(t,z,A){for(var E=this.getCurrentCellStyle(t),H=!0,L=!0,W=0;W<z.length&&L;W++)H=H&&this.isTable(z[W]),L=L&&this.isTableRow(z[W]);return(1==z.length&&null!=A&&mxEvent.isShiftDown(A)&&!mxEvent.isControlDown(A)&&!mxEvent.isAltDown(A)||("1"!=mxUtils.getValue(E,"part","0")||this.isContainer(t))&&"0"!=mxUtils.getValue(E,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(t))&&!this.isTableRow(t)&&(!this.isTable(t)||L||H))&&!this.isCellLocked(t)};Graph.prototype.createGroupCell=
function(){var t=mxGraph.prototype.createGroupCell.apply(this,arguments);t.setStyle("group");return t};Graph.prototype.isExtendParentsOnAdd=function(t){var z=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(z&&null!=t&&null!=this.layoutManager){var A=this.model.getParent(t);null!=A&&(A=this.layoutManager.getLayout(A),null!=A&&A.constructor==mxStackLayout&&(z=!1))}return z};Graph.prototype.getPreferredSizeForCell=function(t){var z=mxGraph.prototype.getPreferredSizeForCell.apply(this,
-arguments);null!=z&&(z.width+=10,z.height+=4,this.gridEnabled&&(z.width=this.snap(z.width),z.height=this.snap(z.height)));return z};Graph.prototype.turnShapes=function(t,z){var A=this.getModel(),E=[];A.beginUpdate();try{for(var H=0;H<t.length;H++){var K=t[H];if(A.isEdge(K)){var X=A.getTerminal(K,!0),ja=A.getTerminal(K,!1);A.setTerminal(K,ja,!0);A.setTerminal(K,X,!1);var ea=A.getGeometry(K);if(null!=ea){ea=ea.clone();null!=ea.points&&ea.points.reverse();var ka=ea.getTerminalPoint(!0),ta=ea.getTerminalPoint(!1);
-ea.setTerminalPoint(ka,!1);ea.setTerminalPoint(ta,!0);A.setGeometry(K,ea);var Aa=this.view.getState(K),Ea=this.view.getState(X),Ma=this.view.getState(ja);if(null!=Aa){var La=null!=Ea?this.getConnectionConstraint(Aa,Ea,!0):null,Ia=null!=Ma?this.getConnectionConstraint(Aa,Ma,!1):null;this.setConnectionConstraint(K,X,!0,Ia);this.setConnectionConstraint(K,ja,!1,La);var Fa=mxUtils.getValue(Aa.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
-mxUtils.getValue(Aa.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[K]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,Fa,[K])}E.push(K)}}else if(A.isVertex(K)&&(ea=this.getCellGeometry(K),null!=ea)){if(!(this.isTable(K)||this.isTableRow(K)||this.isTableCell(K)||this.isSwimlane(K))){ea=ea.clone();ea.x+=ea.width/2-ea.height/2;ea.y+=ea.height/2-ea.width/2;var Ga=ea.width;ea.width=ea.height;ea.height=Ga;A.setGeometry(K,ea)}var Oa=this.view.getState(K);if(null!=Oa){var Pa=[mxConstants.DIRECTION_EAST,
-mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],Na=mxUtils.getValue(Oa.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,Pa[mxUtils.mod(mxUtils.indexOf(Pa,Na)+(z?-1:1),Pa.length)],[K])}E.push(K)}}}finally{A.endUpdate()}return E};Graph.prototype.stencilHasPlaceholders=function(t){if(null!=t&&null!=t.fgNode)for(t=t.fgNode.firstChild;null!=t;){if("text"==t.nodeName&&"1"==t.getAttribute("placeholders"))return!0;
+arguments);null!=z&&(z.width+=10,z.height+=4,this.gridEnabled&&(z.width=this.snap(z.width),z.height=this.snap(z.height)));return z};Graph.prototype.turnShapes=function(t,z){var A=this.getModel(),E=[];A.beginUpdate();try{for(var H=0;H<t.length;H++){var L=t[H];if(A.isEdge(L)){var W=A.getTerminal(L,!0),ha=A.getTerminal(L,!1);A.setTerminal(L,ha,!0);A.setTerminal(L,W,!1);var fa=A.getGeometry(L);if(null!=fa){fa=fa.clone();null!=fa.points&&fa.points.reverse();var ja=fa.getTerminalPoint(!0),ua=fa.getTerminalPoint(!1);
+fa.setTerminalPoint(ja,!1);fa.setTerminalPoint(ua,!0);A.setGeometry(L,fa);var Aa=this.view.getState(L),Ea=this.view.getState(W),Ma=this.view.getState(ha);if(null!=Aa){var La=null!=Ea?this.getConnectionConstraint(Aa,Ea,!0):null,Ia=null!=Ma?this.getConnectionConstraint(Aa,Ma,!1):null;this.setConnectionConstraint(L,W,!0,Ia);this.setConnectionConstraint(L,ha,!1,La);var Fa=mxUtils.getValue(Aa.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
+mxUtils.getValue(Aa.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[L]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,Fa,[L])}E.push(L)}}else if(A.isVertex(L)&&(fa=this.getCellGeometry(L),null!=fa)){if(!(this.isTable(L)||this.isTableRow(L)||this.isTableCell(L)||this.isSwimlane(L))){fa=fa.clone();fa.x+=fa.width/2-fa.height/2;fa.y+=fa.height/2-fa.width/2;var Ga=fa.width;fa.width=fa.height;fa.height=Ga;A.setGeometry(L,fa)}var Oa=this.view.getState(L);if(null!=Oa){var Pa=[mxConstants.DIRECTION_EAST,
+mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],Na=mxUtils.getValue(Oa.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,Pa[mxUtils.mod(mxUtils.indexOf(Pa,Na)+(z?-1:1),Pa.length)],[L])}E.push(L)}}}finally{A.endUpdate()}return E};Graph.prototype.stencilHasPlaceholders=function(t){if(null!=t&&null!=t.fgNode)for(t=t.fgNode.firstChild;null!=t;){if("text"==t.nodeName&&"1"==t.getAttribute("placeholders"))return!0;
t=t.nextSibling}return!1};var B=Graph.prototype.processChange;Graph.prototype.processChange=function(t){if(t instanceof mxGeometryChange&&(this.isTableCell(t.cell)||this.isTableRow(t.cell))&&(null==t.previous&&null!=t.geometry||null!=t.previous&&!t.previous.equals(t.geometry))){var z=t.cell;this.isTableCell(z)&&(z=this.model.getParent(z));this.isTableRow(z)&&(z=this.model.getParent(z));var A=this.view.getState(z);null!=A&&null!=A.shape&&(this.view.invalidate(z),A.shape.bounds=null)}B.apply(this,arguments);
t instanceof mxValueChange&&null!=t.cell&&null!=t.cell.value&&"object"==typeof t.cell.value&&this.invalidateDescendantsWithPlaceholders(t.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(t){t=this.model.getDescendants(t);if(0<t.length)for(var z=0;z<t.length;z++){var A=this.view.getState(t[z]);null!=A&&null!=A.shape&&null!=A.shape.stencil&&this.stencilHasPlaceholders(A.shape.stencil)?this.removeStateForCell(t[z]):this.isReplacePlaceholders(t[z])&&this.view.invalidate(t[z],!1,!1)}};
Graph.prototype.replaceElement=function(t,z){z=t.ownerDocument.createElement(null!=z?z:"span");for(var A=Array.prototype.slice.call(t.attributes);attr=A.pop();)z.setAttribute(attr.nodeName,attr.nodeValue);z.innerHTML=t.innerHTML;t.parentNode.replaceChild(z,t)};Graph.prototype.processElements=function(t,z){if(null!=t){t=t.getElementsByTagName("*");for(var A=0;A<t.length;A++)z(t[A])}};Graph.prototype.updateLabelElements=function(t,z,A){t=null!=t?t:this.getSelectionCells();for(var E=document.createElement("div"),
-H=0;H<t.length;H++)if(this.isHtmlLabel(t[H])){var K=this.convertValueToString(t[H]);if(null!=K&&0<K.length){E.innerHTML=K;for(var X=E.getElementsByTagName(null!=A?A:"*"),ja=0;ja<X.length;ja++)z(X[ja]);E.innerHTML!=K&&this.cellLabelChanged(t[H],E.innerHTML)}}};Graph.prototype.cellLabelChanged=function(t,z,A){z=Graph.zapGremlins(z);this.model.beginUpdate();try{if(null!=t.value&&"object"==typeof t.value){if(this.isReplacePlaceholders(t)&&null!=t.getAttribute("placeholder"))for(var E=t.getAttribute("placeholder"),
-H=t;null!=H;){if(H==this.model.getRoot()||null!=H.value&&"object"==typeof H.value&&H.hasAttribute(E)){this.setAttributeForCell(H,E,z);break}H=this.model.getParent(H)}var K=t.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&K.hasAttribute("label_"+Graph.diagramLanguage)?K.setAttribute("label_"+Graph.diagramLanguage,z):K.setAttribute("label",z);z=K}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(t){if(null!=
-t){for(var z=new mxDictionary,A=0;A<t.length;A++)z.put(t[A],!0);var E=[];for(A=0;A<t.length;A++){var H=this.model.getParent(t[A]);null==H||z.get(H)||(z.put(H,!0),E.push(H))}for(A=0;A<E.length;A++)if(H=this.view.getState(E[A]),null!=H&&(this.model.isEdge(H.cell)||this.model.isVertex(H.cell))&&this.isCellDeletable(H.cell)&&this.isTransparentState(H)){for(var K=!0,X=0;X<this.model.getChildCount(H.cell)&&K;X++)z.get(this.model.getChildAt(H.cell,X))||(K=!1);K&&t.push(H.cell)}}mxGraph.prototype.cellsRemoved.apply(this,
+H=0;H<t.length;H++)if(this.isHtmlLabel(t[H])){var L=this.convertValueToString(t[H]);if(null!=L&&0<L.length){E.innerHTML=L;for(var W=E.getElementsByTagName(null!=A?A:"*"),ha=0;ha<W.length;ha++)z(W[ha]);E.innerHTML!=L&&this.cellLabelChanged(t[H],E.innerHTML)}}};Graph.prototype.cellLabelChanged=function(t,z,A){z=Graph.zapGremlins(z);this.model.beginUpdate();try{if(null!=t.value&&"object"==typeof t.value){if(this.isReplacePlaceholders(t)&&null!=t.getAttribute("placeholder"))for(var E=t.getAttribute("placeholder"),
+H=t;null!=H;){if(H==this.model.getRoot()||null!=H.value&&"object"==typeof H.value&&H.hasAttribute(E)){this.setAttributeForCell(H,E,z);break}H=this.model.getParent(H)}var L=t.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&L.hasAttribute("label_"+Graph.diagramLanguage)?L.setAttribute("label_"+Graph.diagramLanguage,z):L.setAttribute("label",z);z=L}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(t){if(null!=
+t){for(var z=new mxDictionary,A=0;A<t.length;A++)z.put(t[A],!0);var E=[];for(A=0;A<t.length;A++){var H=this.model.getParent(t[A]);null==H||z.get(H)||(z.put(H,!0),E.push(H))}for(A=0;A<E.length;A++)if(H=this.view.getState(E[A]),null!=H&&(this.model.isEdge(H.cell)||this.model.isVertex(H.cell))&&this.isCellDeletable(H.cell)&&this.isTransparentState(H)){for(var L=!0,W=0;W<this.model.getChildCount(H.cell)&&L;W++)z.get(this.model.getChildAt(H.cell,W))||(L=!1);L&&t.push(H.cell)}}mxGraph.prototype.cellsRemoved.apply(this,
arguments)};Graph.prototype.removeCellsAfterUngroup=function(t){for(var z=[],A=0;A<t.length;A++)this.isCellDeletable(t[A])&&this.isTransparentState(this.view.getState(t[A]))&&z.push(t[A]);t=z;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(t,z){this.setAttributeForCell(t,"link",z)};Graph.prototype.setTooltipForCell=function(t,z){var A="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(t.value)&&t.value.hasAttribute("tooltip_"+
Graph.diagramLanguage)&&(A="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(t,A,z)};Graph.prototype.getAttributeForCell=function(t,z,A){t=null!=t.value&&"object"===typeof t.value?t.value.getAttribute(z):null;return null!=t?t:A};Graph.prototype.setAttributeForCell=function(t,z,A){if(null!=t.value&&"object"==typeof t.value)var E=t.value.cloneNode(!0);else E=mxUtils.createXmlDocument().createElement("UserObject"),E.setAttribute("label",t.value||"");null!=A?E.setAttribute(z,A):E.removeAttribute(z);
-this.model.setValue(t,E)};var C=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(t,z,A,E){this.getModel();if(mxEvent.isAltDown(z))return null;for(var H=0;H<t.length;H++){var K=this.model.getParent(t[H]);if(this.model.isEdge(K)&&0>mxUtils.indexOf(t,K))return null}K=C.apply(this,arguments);var X=!0;for(H=0;H<t.length&&X;H++)X=X&&this.isTableRow(t[H]);X&&(this.isTableCell(K)&&(K=this.model.getParent(K)),this.isTableRow(K)&&(K=this.model.getParent(K)),this.isTable(K)||(K=null));return K};
+this.model.setValue(t,E)};var C=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(t,z,A,E){this.getModel();if(mxEvent.isAltDown(z))return null;for(var H=0;H<t.length;H++){var L=this.model.getParent(t[H]);if(this.model.isEdge(L)&&0>mxUtils.indexOf(t,L))return null}L=C.apply(this,arguments);var W=!0;for(H=0;H<t.length&&W;H++)W=W&&this.isTableRow(t[H]);W&&(this.isTableCell(L)&&(L=this.model.getParent(L)),this.isTableRow(L)&&(L=this.model.getParent(L)),this.isTable(L)||(L=null));return L};
Graph.prototype.click=function(t){mxGraph.prototype.click.call(this,t);this.firstClickState=t.getState();this.firstClickSource=t.getSource()};Graph.prototype.dblClick=function(t,z){this.isEnabled()&&(z=this.insertTextForEvent(t,z),mxGraph.prototype.dblClick.call(this,t,z))};Graph.prototype.insertTextForEvent=function(t,z){var A=mxUtils.convertPoint(this.container,mxEvent.getClientX(t),mxEvent.getClientY(t));if(null!=t&&!this.model.isVertex(z)){var E=this.model.isEdge(z)?this.view.getState(z):null,
H=mxEvent.getSource(t);this.firstClickState!=E||this.firstClickSource!=H||null!=E&&null!=E.text&&null!=E.text.node&&null!=E.text.boundingBox&&(mxUtils.contains(E.text.boundingBox,A.x,A.y)||mxUtils.isAncestorNode(E.text.node,mxEvent.getSource(t)))||(null!=E||this.isCellLocked(this.getDefaultParent()))&&(null==E||this.isCellLocked(E.cell))||!(null!=E||mxClient.IS_SVG&&H==this.view.getCanvas().ownerSVGElement)||(null==E&&(E=this.view.getState(this.getCellAt(A.x,A.y))),z=this.addText(A.x,A.y,E))}return z};
Graph.prototype.getInsertPoint=function(){var t=this.getGridSize(),z=this.container.scrollLeft/this.view.scale-this.view.translate.x,A=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var E=this.getPageLayout(),H=this.getPageSize();z=Math.max(z,E.x*H.width);A=Math.max(A,E.y*H.height)}return new mxPoint(this.snap(z+t),this.snap(A+t))};Graph.prototype.getFreeInsertPoint=function(){var t=this.view,z=this.getGraphBounds(),A=this.getInsertPoint(),E=this.snap(Math.round(Math.max(A.x,
z.x/t.scale-t.translate.x+(0==z.width?2*this.gridSize:0))));t=this.snap(Math.round(Math.max(A.y,(z.y+z.height)/t.scale-t.translate.y+2*this.gridSize)));return new mxPoint(E,t)};Graph.prototype.getCenterInsertPoint=function(t){t=null!=t?t:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap(Math.round((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-t.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/
2)/this.view.scale-this.view.translate.y-t.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-t.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-t.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(t,z,A){var E=new mxCell;E.value="Text";E.geometry=new mxGeometry(0,0,0,0);E.vertex=!0;if(null!=A&&this.model.isEdge(A.cell)){E.style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];";
-E.geometry.relative=!0;E.connectable=!1;var H=this.view.getRelativePoint(A,t,z);E.geometry.x=Math.round(1E4*H.x)/1E4;E.geometry.y=Math.round(H.y);E.geometry.offset=new mxPoint(0,0);H=this.view.getPoint(A,E.geometry);var K=this.view.scale;E.geometry.offset=new mxPoint(Math.round((t-H.x)/K),Math.round((z-H.y)/K))}else H=this.view.translate,E.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",E.geometry.width=40,E.geometry.height=20,E.geometry.x=Math.round(t/this.view.scale)-
-H.x-(null!=A?A.origin.x:0),E.geometry.y=Math.round(z/this.view.scale)-H.y-(null!=A?A.origin.y:0),E.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([E],null!=A?A.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[E])),this.autoSizeCell(E)}finally{this.getModel().endUpdate()}return E};Graph.prototype.addClickHandler=function(t,z,A){var E=mxUtils.bind(this,function(){var ea=this.container.getElementsByTagName("a");if(null!=ea)for(var ka=0;ka<ea.length;ka++){var ta=
-this.getAbsoluteUrl(ea[ka].getAttribute("href"));null!=ta&&(ea[ka].setAttribute("rel",this.linkRelation),ea[ka].setAttribute("href",ta),null!=z&&mxEvent.addGestureListeners(ea[ka],null,null,z))}});this.model.addListener(mxEvent.CHANGE,E);E();var H=this.container.style.cursor,K=this.getTolerance(),X=this,ja={currentState:null,currentLink:null,currentTarget:null,highlight:null!=t&&""!=t&&t!=mxConstants.NONE?new mxCellHighlight(X,t,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(ea){var ka=
-ea.sourceState;if(null==ka||null==X.getLinkForCell(ka.cell))ea=X.getCellAt(ea.getGraphX(),ea.getGraphY(),null,null,null,function(ta,Aa,Ea){return null==X.getLinkForCell(ta.cell)}),ka=null==ka||X.model.isAncestor(ea,ka.cell)?X.view.getState(ea):null;ka!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=ka,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(ea,ka){this.startX=ka.getGraphX();this.startY=ka.getGraphY();this.scrollLeft=X.container.scrollLeft;
-this.scrollTop=X.container.scrollTop;null==this.currentLink&&"auto"==X.container.style.overflow&&(X.container.style.cursor="move");this.updateCurrentState(ka)},mouseMove:function(ea,ka){if(X.isMouseDown)null!=this.currentLink&&(ea=Math.abs(this.startX-ka.getGraphX()),ka=Math.abs(this.startY-ka.getGraphY()),(ea>K||ka>K)&&this.clear());else{for(ea=ka.getSource();null!=ea&&"a"!=ea.nodeName.toLowerCase();)ea=ea.parentNode;null!=ea?this.clear():(null!=X.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&
-X.tooltipHandler.reset(ka,!0,this.currentState),(null==this.currentState||ka.getState()!=this.currentState&&null!=ka.sourceState||!X.intersects(this.currentState,ka.getGraphX(),ka.getGraphY()))&&this.updateCurrentState(ka))}},mouseUp:function(ea,ka){var ta=ka.getSource();for(ea=ka.getEvent();null!=ta&&"a"!=ta.nodeName.toLowerCase();)ta=ta.parentNode;null==ta&&Math.abs(this.scrollLeft-X.container.scrollLeft)<K&&Math.abs(this.scrollTop-X.container.scrollTop)<K&&(null==ka.sourceState||!ka.isSource(ka.sourceState.control))&&
-((mxEvent.isLeftMouseButton(ea)||mxEvent.isMiddleMouseButton(ea))&&!mxEvent.isPopupTrigger(ea)||mxEvent.isTouchEvent(ea))&&(null!=this.currentLink?(ta=X.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&ta||null==z||z(ea,this.currentLink),mxEvent.isConsumed(ea)||(ea=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(ea)?"_blank":ta?X.linkTarget:"_top",X.openLink(this.currentLink,ea),ka.consume())):null!=A&&!ka.isConsumed()&&Math.abs(this.scrollLeft-X.container.scrollLeft)<
-K&&Math.abs(this.scrollTop-X.container.scrollTop)<K&&Math.abs(this.startX-ka.getGraphX())<K&&Math.abs(this.startY-ka.getGraphY())<K&&A(ka.getEvent()));this.clear()},activate:function(ea){this.currentLink=X.getAbsoluteUrl(X.getLinkForCell(ea.cell));null!=this.currentLink&&(this.currentTarget=X.getLinkTargetForCell(ea.cell),X.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(ea))},clear:function(){null!=X.container&&(X.container.style.cursor=H);this.currentLink=this.currentState=
-this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=X.tooltipHandler&&X.tooltipHandler.hide()}};X.click=function(ea){};X.addMouseListener(ja);mxEvent.addListener(document,"mouseleave",function(ea){ja.clear()})};Graph.prototype.duplicateCells=function(t,z){t=null!=t?t:this.getSelectionCells();z=null!=z?z:!0;for(var A=0;A<t.length;A++)this.isTableCell(t[A])&&(t[A]=this.model.getParent(t[A]));t=this.model.getTopmostCells(t);var E=this.getModel(),H=this.gridSize,K=[];E.beginUpdate();
-try{var X={},ja=this.createCellLookup(t),ea=this.cloneCells(t,!1,X,!0);for(A=0;A<t.length;A++){var ka=E.getParent(t[A]);if(null!=ka){var ta=this.moveCells([ea[A]],H,H,!1)[0];K.push(ta);if(z)E.add(ka,ea[A]);else{var Aa=ka.getIndex(t[A]);E.add(ka,ea[A],Aa+1)}if(this.isTable(ka)){var Ea=this.getCellGeometry(ea[A]),Ma=this.getCellGeometry(ka);null!=Ea&&null!=Ma&&(Ma=Ma.clone(),Ma.height+=Ea.height,E.setGeometry(ka,Ma))}}else K.push(ea[A])}this.updateCustomLinks(this.createCellMapping(X,ja),ea,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,
-"cells",ea))}finally{E.endUpdate()}return K};Graph.prototype.insertImage=function(t,z,A){if(null!=t&&null!=this.cellEditor.textarea){for(var E=this.cellEditor.textarea.getElementsByTagName("img"),H=[],K=0;K<E.length;K++)H.push(E[K]);document.execCommand("insertimage",!1,t);t=this.cellEditor.textarea.getElementsByTagName("img");if(t.length==H.length+1)for(K=t.length-1;0<=K;K--)if(0==K||t[K]!=H[K-1]){t[K].setAttribute("width",z);t[K].setAttribute("height",A);break}}};Graph.prototype.insertLink=function(t){if(null!=
+E.geometry.relative=!0;E.connectable=!1;var H=this.view.getRelativePoint(A,t,z);E.geometry.x=Math.round(1E4*H.x)/1E4;E.geometry.y=Math.round(H.y);E.geometry.offset=new mxPoint(0,0);H=this.view.getPoint(A,E.geometry);var L=this.view.scale;E.geometry.offset=new mxPoint(Math.round((t-H.x)/L),Math.round((z-H.y)/L))}else H=this.view.translate,E.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",E.geometry.width=40,E.geometry.height=20,E.geometry.x=Math.round(t/this.view.scale)-
+H.x-(null!=A?A.origin.x:0),E.geometry.y=Math.round(z/this.view.scale)-H.y-(null!=A?A.origin.y:0),E.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([E],null!=A?A.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[E])),this.autoSizeCell(E)}finally{this.getModel().endUpdate()}return E};Graph.prototype.addClickHandler=function(t,z,A){var E=mxUtils.bind(this,function(){var fa=this.container.getElementsByTagName("a");if(null!=fa)for(var ja=0;ja<fa.length;ja++){var ua=
+this.getAbsoluteUrl(fa[ja].getAttribute("href"));null!=ua&&(fa[ja].setAttribute("rel",this.linkRelation),fa[ja].setAttribute("href",ua),null!=z&&mxEvent.addGestureListeners(fa[ja],null,null,z))}});this.model.addListener(mxEvent.CHANGE,E);E();var H=this.container.style.cursor,L=this.getTolerance(),W=this,ha={currentState:null,currentLink:null,currentTarget:null,highlight:null!=t&&""!=t&&t!=mxConstants.NONE?new mxCellHighlight(W,t,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(fa){var ja=
+fa.sourceState;if(null==ja||null==W.getLinkForCell(ja.cell))fa=W.getCellAt(fa.getGraphX(),fa.getGraphY(),null,null,null,function(ua,Aa,Ea){return null==W.getLinkForCell(ua.cell)}),ja=null==ja||W.model.isAncestor(fa,ja.cell)?W.view.getState(fa):null;ja!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=ja,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(fa,ja){this.startX=ja.getGraphX();this.startY=ja.getGraphY();this.scrollLeft=W.container.scrollLeft;
+this.scrollTop=W.container.scrollTop;null==this.currentLink&&"auto"==W.container.style.overflow&&(W.container.style.cursor="move");this.updateCurrentState(ja)},mouseMove:function(fa,ja){if(W.isMouseDown)null!=this.currentLink&&(fa=Math.abs(this.startX-ja.getGraphX()),ja=Math.abs(this.startY-ja.getGraphY()),(fa>L||ja>L)&&this.clear());else{for(fa=ja.getSource();null!=fa&&"a"!=fa.nodeName.toLowerCase();)fa=fa.parentNode;null!=fa?this.clear():(null!=W.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&
+W.tooltipHandler.reset(ja,!0,this.currentState),(null==this.currentState||ja.getState()!=this.currentState&&null!=ja.sourceState||!W.intersects(this.currentState,ja.getGraphX(),ja.getGraphY()))&&this.updateCurrentState(ja))}},mouseUp:function(fa,ja){var ua=ja.getSource();for(fa=ja.getEvent();null!=ua&&"a"!=ua.nodeName.toLowerCase();)ua=ua.parentNode;null==ua&&Math.abs(this.scrollLeft-W.container.scrollLeft)<L&&Math.abs(this.scrollTop-W.container.scrollTop)<L&&(null==ja.sourceState||!ja.isSource(ja.sourceState.control))&&
+((mxEvent.isLeftMouseButton(fa)||mxEvent.isMiddleMouseButton(fa))&&!mxEvent.isPopupTrigger(fa)||mxEvent.isTouchEvent(fa))&&(null!=this.currentLink?(ua=W.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&ua||null==z||z(fa,this.currentLink),mxEvent.isConsumed(fa)||(fa=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(fa)?"_blank":ua?W.linkTarget:"_top",W.openLink(this.currentLink,fa),ja.consume())):null!=A&&!ja.isConsumed()&&Math.abs(this.scrollLeft-W.container.scrollLeft)<
+L&&Math.abs(this.scrollTop-W.container.scrollTop)<L&&Math.abs(this.startX-ja.getGraphX())<L&&Math.abs(this.startY-ja.getGraphY())<L&&A(ja.getEvent()));this.clear()},activate:function(fa){this.currentLink=W.getAbsoluteUrl(W.getLinkForCell(fa.cell));null!=this.currentLink&&(this.currentTarget=W.getLinkTargetForCell(fa.cell),W.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(fa))},clear:function(){null!=W.container&&(W.container.style.cursor=H);this.currentLink=this.currentState=
+this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=W.tooltipHandler&&W.tooltipHandler.hide()}};W.click=function(fa){};W.addMouseListener(ha);mxEvent.addListener(document,"mouseleave",function(fa){ha.clear()})};Graph.prototype.duplicateCells=function(t,z){t=null!=t?t:this.getSelectionCells();z=null!=z?z:!0;for(var A=0;A<t.length;A++)this.isTableCell(t[A])&&(t[A]=this.model.getParent(t[A]));t=this.model.getTopmostCells(t);var E=this.getModel(),H=this.gridSize,L=[];E.beginUpdate();
+try{var W={},ha=this.createCellLookup(t),fa=this.cloneCells(t,!1,W,!0);for(A=0;A<t.length;A++){var ja=E.getParent(t[A]);if(null!=ja){var ua=this.moveCells([fa[A]],H,H,!1)[0];L.push(ua);if(z)E.add(ja,fa[A]);else{var Aa=ja.getIndex(t[A]);E.add(ja,fa[A],Aa+1)}if(this.isTable(ja)){var Ea=this.getCellGeometry(fa[A]),Ma=this.getCellGeometry(ja);null!=Ea&&null!=Ma&&(Ma=Ma.clone(),Ma.height+=Ea.height,E.setGeometry(ja,Ma))}}else L.push(fa[A])}this.updateCustomLinks(this.createCellMapping(W,ha),fa,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,
+"cells",fa))}finally{E.endUpdate()}return L};Graph.prototype.insertImage=function(t,z,A){if(null!=t&&null!=this.cellEditor.textarea){for(var E=this.cellEditor.textarea.getElementsByTagName("img"),H=[],L=0;L<E.length;L++)H.push(E[L]);document.execCommand("insertimage",!1,t);t=this.cellEditor.textarea.getElementsByTagName("img");if(t.length==H.length+1)for(L=t.length-1;0<=L;L--)if(0==L||t[L]!=H[L-1]){t[L].setAttribute("width",z);t[L].setAttribute("height",A);break}}};Graph.prototype.insertLink=function(t){if(null!=
this.cellEditor.textarea)if(0==t.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var z=this.cellEditor.textarea.getElementsByTagName("a"),A=[],E=0;E<z.length;E++)A.push(z[E]);document.execCommand("createlink",!1,mxUtils.trim(t));z=this.cellEditor.textarea.getElementsByTagName("a");if(z.length==A.length+1)for(E=z.length-1;0<=E;E--)if(z[E]!=A[E-1]){for(z=z[E].getElementsByTagName("a");0<z.length;){for(A=z[0].parentNode;null!=z[0].firstChild;)A.insertBefore(z[0].firstChild,z[0]);
A.removeChild(z[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(t))};Graph.prototype.isCellResizable=function(t){var z=mxGraph.prototype.isCellResizable.apply(this,arguments),A=this.getCurrentCellStyle(t);return!this.isTableCell(t)&&!this.isTableRow(t)&&(z||"0"!=mxUtils.getValue(A,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==A[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(t,z){null==z&&(z=this.getSelectionCells());if(null!=z&&1<z.length){for(var A=[],E=null,
-H=null,K=0;K<z.length;K++)if(this.getModel().isVertex(z[K])){var X=this.view.getState(z[K]);if(null!=X){var ja=t?X.getCenterX():X.getCenterY();E=null!=E?Math.max(E,ja):ja;H=null!=H?Math.min(H,ja):ja;A.push(X)}}if(2<A.length){A.sort(function(Aa,Ea){return t?Aa.x-Ea.x:Aa.y-Ea.y});X=this.view.translate;ja=this.view.scale;H=H/ja-(t?X.x:X.y);E=E/ja-(t?X.x:X.y);this.getModel().beginUpdate();try{var ea=(E-H)/(A.length-1);E=H;for(K=1;K<A.length-1;K++){var ka=this.view.getState(this.model.getParent(A[K].cell)),
-ta=this.getCellGeometry(A[K].cell);E+=ea;null!=ta&&null!=ka&&(ta=ta.clone(),t?ta.x=Math.round(E-ta.width/2)-ka.origin.x:ta.y=Math.round(E-ta.height/2)-ka.origin.y,this.getModel().setGeometry(A[K].cell,ta))}}finally{this.getModel().endUpdate()}}}return z};Graph.prototype.isCloneEvent=function(t){return mxClient.IS_MAC&&mxEvent.isMetaDown(t)||mxEvent.isControlDown(t)};Graph.prototype.createSvgImageExport=function(){var t=new mxImageExport;t.getLinkForCellState=mxUtils.bind(this,function(z,A){return this.getLinkForCell(z.cell)});
-return t};Graph.prototype.parseBackgroundImage=function(t){var z=null;null!=t&&0<t.length&&(t=JSON.parse(t),z=new mxImage(t.src,t.width,t.height));return z};Graph.prototype.getBackgroundImageObject=function(t){return t};Graph.prototype.getSvg=function(t,z,A,E,H,K,X,ja,ea,ka,ta,Aa,Ea,Ma){var La=null;if(null!=Ma)for(La=new mxDictionary,ta=0;ta<Ma.length;ta++)La.put(Ma[ta],!0);if(Ma=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{z=null!=z?z:1;A=null!=A?
-A:0;H=null!=H?H:!0;K=null!=K?K:!0;X=null!=X?X:!0;ka=null!=ka?ka:!1;var Ia="page"==Ea?this.view.getBackgroundPageBounds():K&&null==La||E||"diagram"==Ea?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),Fa=this.view.scale;"diagram"==Ea&&null!=this.backgroundImage&&(Ia=mxRectangle.fromRectangle(Ia),Ia.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*Fa,(this.view.translate.y+this.backgroundImage.y)*Fa,this.backgroundImage.width*Fa,this.backgroundImage.height*Fa)));
-if(null==Ia)throw Error(mxResources.get("drawingEmpty"));E=z/Fa;Ea=H?-.5:0;var Ga=Graph.createSvgNode(Ea,Ea,Math.max(1,Math.ceil(Ia.width*E)+2*A)+(ka&&0==A?5:0),Math.max(1,Math.ceil(Ia.height*E)+2*A)+(ka&&0==A?5:0),t),Oa=Ga.ownerDocument,Pa=null!=Oa.createElementNS?Oa.createElementNS(mxConstants.NS_SVG,"g"):Oa.createElement("g");Ga.appendChild(Pa);var Na=this.createSvgCanvas(Pa);Na.foOffset=H?-.5:0;Na.textOffset=H?-.5:0;Na.imageOffset=H?-.5:0;Na.translate(Math.floor(A/z-Ia.x/Fa),Math.floor(A/z-Ia.y/
+H=null,L=0;L<z.length;L++)if(this.getModel().isVertex(z[L])){var W=this.view.getState(z[L]);if(null!=W){var ha=t?W.getCenterX():W.getCenterY();E=null!=E?Math.max(E,ha):ha;H=null!=H?Math.min(H,ha):ha;A.push(W)}}if(2<A.length){A.sort(function(Aa,Ea){return t?Aa.x-Ea.x:Aa.y-Ea.y});W=this.view.translate;ha=this.view.scale;H=H/ha-(t?W.x:W.y);E=E/ha-(t?W.x:W.y);this.getModel().beginUpdate();try{var fa=(E-H)/(A.length-1);E=H;for(L=1;L<A.length-1;L++){var ja=this.view.getState(this.model.getParent(A[L].cell)),
+ua=this.getCellGeometry(A[L].cell);E+=fa;null!=ua&&null!=ja&&(ua=ua.clone(),t?ua.x=Math.round(E-ua.width/2)-ja.origin.x:ua.y=Math.round(E-ua.height/2)-ja.origin.y,this.getModel().setGeometry(A[L].cell,ua))}}finally{this.getModel().endUpdate()}}}return z};Graph.prototype.isCloneEvent=function(t){return mxClient.IS_MAC&&mxEvent.isMetaDown(t)||mxEvent.isControlDown(t)};Graph.prototype.createSvgImageExport=function(){var t=new mxImageExport;t.getLinkForCellState=mxUtils.bind(this,function(z,A){return this.getLinkForCell(z.cell)});
+return t};Graph.prototype.parseBackgroundImage=function(t){var z=null;null!=t&&0<t.length&&(t=JSON.parse(t),z=new mxImage(t.src,t.width,t.height));return z};Graph.prototype.getBackgroundImageObject=function(t){return t};Graph.prototype.getSvg=function(t,z,A,E,H,L,W,ha,fa,ja,ua,Aa,Ea,Ma){var La=null;if(null!=Ma)for(La=new mxDictionary,ua=0;ua<Ma.length;ua++)La.put(Ma[ua],!0);if(Ma=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{z=null!=z?z:1;A=null!=A?
+A:0;H=null!=H?H:!0;L=null!=L?L:!0;W=null!=W?W:!0;ja=null!=ja?ja:!1;var Ia="page"==Ea?this.view.getBackgroundPageBounds():L&&null==La||E||"diagram"==Ea?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),Fa=this.view.scale;"diagram"==Ea&&null!=this.backgroundImage&&(Ia=mxRectangle.fromRectangle(Ia),Ia.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*Fa,(this.view.translate.y+this.backgroundImage.y)*Fa,this.backgroundImage.width*Fa,this.backgroundImage.height*Fa)));
+if(null==Ia)throw Error(mxResources.get("drawingEmpty"));E=z/Fa;Ea=H?-.5:0;var Ga=Graph.createSvgNode(Ea,Ea,Math.max(1,Math.ceil(Ia.width*E)+2*A)+(ja&&0==A?5:0),Math.max(1,Math.ceil(Ia.height*E)+2*A)+(ja&&0==A?5:0),t),Oa=Ga.ownerDocument,Pa=null!=Oa.createElementNS?Oa.createElementNS(mxConstants.NS_SVG,"g"):Oa.createElement("g");Ga.appendChild(Pa);var Na=this.createSvgCanvas(Pa);Na.foOffset=H?-.5:0;Na.textOffset=H?-.5:0;Na.imageOffset=H?-.5:0;Na.translate(Math.floor(A/z-Ia.x/Fa),Math.floor(A/z-Ia.y/
Fa));var Sa=document.createElement("div"),eb=Na.getAlternateText;Na.getAlternateText=function(cb,mb,Za,ib,gb,Wa,qb,tb,nb,fb,Ra,rb,xb){if(null!=Wa&&0<this.state.fontSize)try{mxUtils.isNode(Wa)?Wa=Wa.innerText:(Sa.innerHTML=Wa,Wa=mxUtils.extractTextWithWhitespace(Sa.childNodes));for(var kb=Math.ceil(2*ib/this.state.fontSize),hb=[],ob=0,lb=0;(0==kb||ob<kb)&&lb<Wa.length;){var sb=Wa.charCodeAt(lb);if(10==sb||13==sb){if(0<ob)break}else hb.push(Wa.charAt(lb)),255>sb&&ob++;lb++}hb.length<Wa.length&&1<Wa.length-
-hb.length&&(Wa=mxUtils.trim(hb.join(""))+"...");return Wa}catch(c){return eb.apply(this,arguments)}else return eb.apply(this,arguments)};var ab=this.backgroundImage;if(null!=ab){t=Fa/z;var pb=this.view.translate;Ea=new mxRectangle((ab.x+pb.x)*t,(ab.y+pb.y)*t,ab.width*t,ab.height*t);mxUtils.intersects(Ia,Ea)&&Na.image(ab.x+pb.x,ab.y+pb.y,ab.width,ab.height,ab.src,!0)}Na.scale(E);Na.textEnabled=X;ja=null!=ja?ja:this.createSvgImageExport();var ub=ja.drawCellState,vb=ja.getLinkForCellState;ja.getLinkForCellState=
-function(cb,mb){var Za=vb.apply(this,arguments);return null==Za||cb.view.graph.isCustomLink(Za)?null:Za};ja.getLinkTargetForCellState=function(cb,mb){return cb.view.graph.getLinkTargetForCell(cb.cell)};ja.drawCellState=function(cb,mb){for(var Za=cb.view.graph,ib=null!=La?La.get(cb.cell):Za.isCellSelected(cb.cell),gb=Za.model.getParent(cb.cell);!(K&&null==La||ib)&&null!=gb;)ib=null!=La?La.get(gb):Za.isCellSelected(gb),gb=Za.model.getParent(gb);(K&&null==La||ib)&&ub.apply(this,arguments)};ja.drawState(this.getView().getState(this.model.root),
-Na);this.updateSvgLinks(Ga,ea,!0);this.addForeignObjectWarning(Na,Ga);return Ga}finally{Ma&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(t,z){if("0"!=urlParams["svg-warning"]&&0<z.getElementsByTagName("foreignObject").length){var A=t.createElement("switch"),E=t.createElement("g");E.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var H=t.createElement("a");H.setAttribute("transform","translate(0,-5)");
+hb.length&&(Wa=mxUtils.trim(hb.join(""))+"...");return Wa}catch(c){return eb.apply(this,arguments)}else return eb.apply(this,arguments)};var ab=this.backgroundImage;if(null!=ab){t=Fa/z;var pb=this.view.translate;Ea=new mxRectangle((ab.x+pb.x)*t,(ab.y+pb.y)*t,ab.width*t,ab.height*t);mxUtils.intersects(Ia,Ea)&&Na.image(ab.x+pb.x,ab.y+pb.y,ab.width,ab.height,ab.src,!0)}Na.scale(E);Na.textEnabled=W;ha=null!=ha?ha:this.createSvgImageExport();var ub=ha.drawCellState,vb=ha.getLinkForCellState;ha.getLinkForCellState=
+function(cb,mb){var Za=vb.apply(this,arguments);return null==Za||cb.view.graph.isCustomLink(Za)?null:Za};ha.getLinkTargetForCellState=function(cb,mb){return cb.view.graph.getLinkTargetForCell(cb.cell)};ha.drawCellState=function(cb,mb){for(var Za=cb.view.graph,ib=null!=La?La.get(cb.cell):Za.isCellSelected(cb.cell),gb=Za.model.getParent(cb.cell);!(L&&null==La||ib)&&null!=gb;)ib=null!=La?La.get(gb):Za.isCellSelected(gb),gb=Za.model.getParent(gb);(L&&null==La||ib)&&ub.apply(this,arguments)};ha.drawState(this.getView().getState(this.model.root),
+Na);this.updateSvgLinks(Ga,fa,!0);this.addForeignObjectWarning(Na,Ga);return Ga}finally{Ma&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(t,z){if("0"!=urlParams["svg-warning"]&&0<z.getElementsByTagName("foreignObject").length){var A=t.createElement("switch"),E=t.createElement("g");E.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var H=t.createElement("a");H.setAttribute("transform","translate(0,-5)");
null==H.setAttributeNS||z.ownerDocument!=document&&null==document.documentMode?(H.setAttribute("xlink:href",Graph.foreignObjectWarningLink),H.setAttribute("target","_blank")):(H.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),H.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));t=t.createElement("text");t.setAttribute("text-anchor","middle");t.setAttribute("font-size","10px");t.setAttribute("x","50%");t.setAttribute("y","100%");mxUtils.write(t,Graph.foreignObjectWarningText);
A.appendChild(E);H.appendChild(t);A.appendChild(H);z.appendChild(A)}};Graph.prototype.updateSvgLinks=function(t,z,A){t=t.getElementsByTagName("a");for(var E=0;E<t.length;E++)if(null==t[E].getAttribute("target")){var H=t[E].getAttribute("href");null==H&&(H=t[E].getAttribute("xlink:href"));null!=H&&(null!=z&&/^https?:\/\//.test(H)?t[E].setAttribute("target",z):A&&this.isCustomLink(H)&&t[E].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(t){t=new mxSvgCanvas2D(t);
t.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;t.pointerEvents=!0;return t};Graph.prototype.getSelectedElement=function(){var t=null;if(window.getSelection){var z=window.getSelection();z.getRangeAt&&z.rangeCount&&(t=z.getRangeAt(0).commonAncestorContainer)}else document.selection&&(t=document.selection.createRange().parentElement());return t};Graph.prototype.getSelectedEditingElement=function(){for(var t=this.getSelectedElement();null!=t&&t.nodeType!=mxConstants.NODETYPE_ELEMENT;)t=t.parentNode;
null!=t&&t==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(t=this.cellEditor.textarea.firstChild);return t};Graph.prototype.getParentByName=function(t,z,A){for(;null!=t&&t.nodeName!=z;){if(t==A)return null;t=t.parentNode}return t};Graph.prototype.getParentByNames=function(t,z,A){for(;null!=t&&!(0<=mxUtils.indexOf(z,t.nodeName));){if(t==A)return null;t=t.parentNode}return t};Graph.prototype.selectNode=
function(t){var z=null;if(window.getSelection){if(z=window.getSelection(),z.getRangeAt&&z.rangeCount){var A=document.createRange();A.selectNode(t);z.removeAllRanges();z.addRange(A)}}else(z=document.selection)&&"Control"!=z.type&&(t=z.createRange(),t.collapse(!0),A=z.createRange(),A.setEndPoint("StartToStart",t),A.select())};Graph.prototype.flipEdgePoints=function(t,z,A){var E=this.getCellGeometry(t);if(null!=E){E=E.clone();if(null!=E.points)for(var H=0;H<E.points.length;H++)z?E.points[H].x=A+(A-E.points[H].x):
-E.points[H].y=A+(A-E.points[H].y);H=function(K){null!=K&&(z?K.x=A+(A-K.x):K.y=A+(A-K.y))};H(E.getTerminalPoint(!0));H(E.getTerminalPoint(!1));this.model.setGeometry(t,E)}};Graph.prototype.flipChildren=function(t,z,A){this.model.beginUpdate();try{for(var E=this.model.getChildCount(t),H=0;H<E;H++){var K=this.model.getChildAt(t,H);if(this.model.isEdge(K))this.flipEdgePoints(K,z,A);else{var X=this.getCellGeometry(K);null!=X&&(X=X.clone(),z?X.x=A+(A-X.x-X.width):X.y=A+(A-X.y-X.height),this.model.setGeometry(K,
-X))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(t,z){this.model.beginUpdate();try{t=this.model.getTopmostCells(t);for(var A=[],E=0;E<t.length;E++)if(this.model.isEdge(t[E])){var H=this.view.getState(t[E]);null!=H&&this.flipEdgePoints(t[E],z,(z?H.getCenterX():H.getCenterY())/this.view.scale-(z?H.origin.x:H.origin.y)-(z?this.view.translate.x:this.view.translate.y))}else{var K=this.getCellGeometry(t[E]);null!=K&&this.flipChildren(t[E],z,z?K.getCenterX()-K.x:K.getCenterY()-K.y);
-A.push(t[E])}this.toggleCellStyles(z?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,A)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(t,z){var A=null;if(null!=t&&0<t.length){this.model.beginUpdate();try{for(var E=0;E<t.length;E++){var H=this.model.getParent(t[E]);if(this.isTable(H)){var K=this.getCellGeometry(t[E]),X=this.getCellGeometry(H);null!=K&&null!=X&&(X=X.clone(),X.height-=K.height,this.model.setGeometry(H,X))}}var ja=this.selectParentAfterDelete?this.model.getParents(t):
-null;this.removeCells(t,z)}finally{this.model.endUpdate()}if(null!=ja)for(A=[],E=0;E<ja.length;E++)this.model.contains(ja[E])&&(this.model.isVertex(ja[E])||this.model.isEdge(ja[E]))&&A.push(ja[E])}return A};Graph.prototype.insertTableColumn=function(t,z){var A=this.getModel();A.beginUpdate();try{var E=t,H=0;if(this.isTableCell(t)){var K=A.getParent(t);E=A.getParent(K);H=mxUtils.indexOf(A.getChildCells(K,!0),t)}else this.isTableRow(t)?E=A.getParent(t):t=A.getChildCells(E,!0)[0],z||(H=A.getChildCells(t,
-!0).length-1);var X=A.getChildCells(E,!0),ja=Graph.minTableColumnWidth;for(t=0;t<X.length;t++){var ea=A.getChildCells(X[t],!0)[H],ka=A.cloneCell(ea,!1),ta=this.getCellGeometry(ka);ka.value=null;ka.style=mxUtils.setStyle(mxUtils.setStyle(ka.style,"rowspan",null),"colspan",null);if(null!=ta){null!=ta.alternateBounds&&(ta.width=ta.alternateBounds.width,ta.height=ta.alternateBounds.height,ta.alternateBounds=null);ja=ta.width;var Aa=this.getCellGeometry(X[t]);null!=Aa&&(ta.height=Aa.height)}A.add(X[t],
-ka,H+(z?0:1))}var Ea=this.getCellGeometry(E);null!=Ea&&(Ea=Ea.clone(),Ea.width+=ja,A.setGeometry(E,Ea))}finally{A.endUpdate()}};Graph.prototype.deleteLane=function(t){var z=this.getModel();z.beginUpdate();try{var A=null;A="stackLayout"==this.getCurrentCellStyle(t).childLayout?t:z.getParent(t);var E=z.getChildCells(A,!0);0==E.length?z.remove(A):(A==t&&(t=E[E.length-1]),z.remove(t))}finally{z.endUpdate()}};Graph.prototype.insertLane=function(t,z){var A=this.getModel();A.beginUpdate();try{var E=null;
-if("stackLayout"==this.getCurrentCellStyle(t).childLayout){E=t;var H=A.getChildCells(E,!0);t=H[z?0:H.length-1]}else E=A.getParent(t);var K=E.getIndex(t);t=A.cloneCell(t,!1);t.value=null;A.add(E,t,K+(z?0:1))}finally{A.endUpdate()}};Graph.prototype.insertTableRow=function(t,z){var A=this.getModel();A.beginUpdate();try{var E=t,H=t;if(this.isTableCell(t))H=A.getParent(t),E=A.getParent(H);else if(this.isTableRow(t))E=A.getParent(t);else{var K=A.getChildCells(E,!0);H=K[z?0:K.length-1]}var X=A.getChildCells(H,
-!0),ja=E.getIndex(H);H=A.cloneCell(H,!1);H.value=null;var ea=this.getCellGeometry(H);if(null!=ea){for(K=0;K<X.length;K++){t=A.cloneCell(X[K],!1);t.value=null;t.style=mxUtils.setStyle(mxUtils.setStyle(t.style,"rowspan",null),"colspan",null);var ka=this.getCellGeometry(t);null!=ka&&(null!=ka.alternateBounds&&(ka.width=ka.alternateBounds.width,ka.height=ka.alternateBounds.height,ka.alternateBounds=null),ka.height=ea.height);H.insert(t)}A.add(E,H,ja+(z?0:1));var ta=this.getCellGeometry(E);null!=ta&&(ta=
-ta.clone(),ta.height+=ea.height,A.setGeometry(E,ta))}}finally{A.endUpdate()}};Graph.prototype.deleteTableColumn=function(t){var z=this.getModel();z.beginUpdate();try{var A=t,E=t;this.isTableCell(t)&&(E=z.getParent(t));this.isTableRow(E)&&(A=z.getParent(E));var H=z.getChildCells(A,!0);if(0==H.length)z.remove(A);else{this.isTableRow(E)||(E=H[0]);var K=z.getChildCells(E,!0);if(1>=K.length)z.remove(A);else{var X=K.length-1;this.isTableCell(t)&&(X=mxUtils.indexOf(K,t));for(E=t=0;E<H.length;E++){var ja=
-z.getChildCells(H[E],!0)[X];z.remove(ja);var ea=this.getCellGeometry(ja);null!=ea&&(t=Math.max(t,ea.width))}var ka=this.getCellGeometry(A);null!=ka&&(ka=ka.clone(),ka.width-=t,z.setGeometry(A,ka))}}}finally{z.endUpdate()}};Graph.prototype.deleteTableRow=function(t){var z=this.getModel();z.beginUpdate();try{var A=t,E=t;this.isTableCell(t)&&(t=E=z.getParent(t));this.isTableRow(t)&&(A=z.getParent(E));var H=z.getChildCells(A,!0);if(1>=H.length)z.remove(A);else{this.isTableRow(E)||(E=H[H.length-1]);z.remove(E);
-t=0;var K=this.getCellGeometry(E);null!=K&&(t=K.height);var X=this.getCellGeometry(A);null!=X&&(X=X.clone(),X.height-=t,z.setGeometry(A,X))}}finally{z.endUpdate()}};Graph.prototype.insertRow=function(t,z){for(var A=t.tBodies[0],E=A.rows[0].cells,H=t=0;H<E.length;H++){var K=E[H].getAttribute("colspan");t+=null!=K?parseInt(K):1}z=A.insertRow(z);for(H=0;H<t;H++)mxUtils.br(z.insertCell(-1));return z.cells[0]};Graph.prototype.deleteRow=function(t,z){t.tBodies[0].deleteRow(z)};Graph.prototype.insertColumn=
+E.points[H].y=A+(A-E.points[H].y);H=function(L){null!=L&&(z?L.x=A+(A-L.x):L.y=A+(A-L.y))};H(E.getTerminalPoint(!0));H(E.getTerminalPoint(!1));this.model.setGeometry(t,E)}};Graph.prototype.flipChildren=function(t,z,A){this.model.beginUpdate();try{for(var E=this.model.getChildCount(t),H=0;H<E;H++){var L=this.model.getChildAt(t,H);if(this.model.isEdge(L))this.flipEdgePoints(L,z,A);else{var W=this.getCellGeometry(L);null!=W&&(W=W.clone(),z?W.x=A+(A-W.x-W.width):W.y=A+(A-W.y-W.height),this.model.setGeometry(L,
+W))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(t,z){this.model.beginUpdate();try{t=this.model.getTopmostCells(t);for(var A=[],E=0;E<t.length;E++)if(this.model.isEdge(t[E])){var H=this.view.getState(t[E]);null!=H&&this.flipEdgePoints(t[E],z,(z?H.getCenterX():H.getCenterY())/this.view.scale-(z?H.origin.x:H.origin.y)-(z?this.view.translate.x:this.view.translate.y))}else{var L=this.getCellGeometry(t[E]);null!=L&&this.flipChildren(t[E],z,z?L.getCenterX()-L.x:L.getCenterY()-L.y);
+A.push(t[E])}this.toggleCellStyles(z?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,A)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(t,z){var A=null;if(null!=t&&0<t.length){this.model.beginUpdate();try{for(var E=0;E<t.length;E++){var H=this.model.getParent(t[E]);if(this.isTable(H)){var L=this.getCellGeometry(t[E]),W=this.getCellGeometry(H);null!=L&&null!=W&&(W=W.clone(),W.height-=L.height,this.model.setGeometry(H,W))}}var ha=this.selectParentAfterDelete?this.model.getParents(t):
+null;this.removeCells(t,z)}finally{this.model.endUpdate()}if(null!=ha)for(A=[],E=0;E<ha.length;E++)this.model.contains(ha[E])&&(this.model.isVertex(ha[E])||this.model.isEdge(ha[E]))&&A.push(ha[E])}return A};Graph.prototype.insertTableColumn=function(t,z){var A=this.getModel();A.beginUpdate();try{var E=t,H=0;if(this.isTableCell(t)){var L=A.getParent(t);E=A.getParent(L);H=mxUtils.indexOf(A.getChildCells(L,!0),t)}else this.isTableRow(t)?E=A.getParent(t):t=A.getChildCells(E,!0)[0],z||(H=A.getChildCells(t,
+!0).length-1);var W=A.getChildCells(E,!0),ha=Graph.minTableColumnWidth;for(t=0;t<W.length;t++){var fa=A.getChildCells(W[t],!0)[H],ja=A.cloneCell(fa,!1),ua=this.getCellGeometry(ja);ja.value=null;ja.style=mxUtils.setStyle(mxUtils.setStyle(ja.style,"rowspan",null),"colspan",null);if(null!=ua){null!=ua.alternateBounds&&(ua.width=ua.alternateBounds.width,ua.height=ua.alternateBounds.height,ua.alternateBounds=null);ha=ua.width;var Aa=this.getCellGeometry(W[t]);null!=Aa&&(ua.height=Aa.height)}A.add(W[t],
+ja,H+(z?0:1))}var Ea=this.getCellGeometry(E);null!=Ea&&(Ea=Ea.clone(),Ea.width+=ha,A.setGeometry(E,Ea))}finally{A.endUpdate()}};Graph.prototype.deleteLane=function(t){var z=this.getModel();z.beginUpdate();try{var A=null;A="stackLayout"==this.getCurrentCellStyle(t).childLayout?t:z.getParent(t);var E=z.getChildCells(A,!0);0==E.length?z.remove(A):(A==t&&(t=E[E.length-1]),z.remove(t))}finally{z.endUpdate()}};Graph.prototype.insertLane=function(t,z){var A=this.getModel();A.beginUpdate();try{var E=null;
+if("stackLayout"==this.getCurrentCellStyle(t).childLayout){E=t;var H=A.getChildCells(E,!0);t=H[z?0:H.length-1]}else E=A.getParent(t);var L=E.getIndex(t);t=A.cloneCell(t,!1);t.value=null;A.add(E,t,L+(z?0:1))}finally{A.endUpdate()}};Graph.prototype.insertTableRow=function(t,z){var A=this.getModel();A.beginUpdate();try{var E=t,H=t;if(this.isTableCell(t))H=A.getParent(t),E=A.getParent(H);else if(this.isTableRow(t))E=A.getParent(t);else{var L=A.getChildCells(E,!0);H=L[z?0:L.length-1]}var W=A.getChildCells(H,
+!0),ha=E.getIndex(H);H=A.cloneCell(H,!1);H.value=null;var fa=this.getCellGeometry(H);if(null!=fa){for(L=0;L<W.length;L++){t=A.cloneCell(W[L],!1);t.value=null;t.style=mxUtils.setStyle(mxUtils.setStyle(t.style,"rowspan",null),"colspan",null);var ja=this.getCellGeometry(t);null!=ja&&(null!=ja.alternateBounds&&(ja.width=ja.alternateBounds.width,ja.height=ja.alternateBounds.height,ja.alternateBounds=null),ja.height=fa.height);H.insert(t)}A.add(E,H,ha+(z?0:1));var ua=this.getCellGeometry(E);null!=ua&&(ua=
+ua.clone(),ua.height+=fa.height,A.setGeometry(E,ua))}}finally{A.endUpdate()}};Graph.prototype.deleteTableColumn=function(t){var z=this.getModel();z.beginUpdate();try{var A=t,E=t;this.isTableCell(t)&&(E=z.getParent(t));this.isTableRow(E)&&(A=z.getParent(E));var H=z.getChildCells(A,!0);if(0==H.length)z.remove(A);else{this.isTableRow(E)||(E=H[0]);var L=z.getChildCells(E,!0);if(1>=L.length)z.remove(A);else{var W=L.length-1;this.isTableCell(t)&&(W=mxUtils.indexOf(L,t));for(E=t=0;E<H.length;E++){var ha=
+z.getChildCells(H[E],!0)[W];z.remove(ha);var fa=this.getCellGeometry(ha);null!=fa&&(t=Math.max(t,fa.width))}var ja=this.getCellGeometry(A);null!=ja&&(ja=ja.clone(),ja.width-=t,z.setGeometry(A,ja))}}}finally{z.endUpdate()}};Graph.prototype.deleteTableRow=function(t){var z=this.getModel();z.beginUpdate();try{var A=t,E=t;this.isTableCell(t)&&(t=E=z.getParent(t));this.isTableRow(t)&&(A=z.getParent(E));var H=z.getChildCells(A,!0);if(1>=H.length)z.remove(A);else{this.isTableRow(E)||(E=H[H.length-1]);z.remove(E);
+t=0;var L=this.getCellGeometry(E);null!=L&&(t=L.height);var W=this.getCellGeometry(A);null!=W&&(W=W.clone(),W.height-=t,z.setGeometry(A,W))}}finally{z.endUpdate()}};Graph.prototype.insertRow=function(t,z){for(var A=t.tBodies[0],E=A.rows[0].cells,H=t=0;H<E.length;H++){var L=E[H].getAttribute("colspan");t+=null!=L?parseInt(L):1}z=A.insertRow(z);for(H=0;H<t;H++)mxUtils.br(z.insertCell(-1));return z.cells[0]};Graph.prototype.deleteRow=function(t,z){t.tBodies[0].deleteRow(z)};Graph.prototype.insertColumn=
function(t,z){var A=t.tHead;if(null!=A)for(var E=0;E<A.rows.length;E++){var H=document.createElement("th");A.rows[E].appendChild(H);mxUtils.br(H)}t=t.tBodies[0];for(A=0;A<t.rows.length;A++)E=t.rows[A].insertCell(z),mxUtils.br(E);return t.rows[0].cells[0<=z?z:t.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(t,z){if(0<=z){t=t.tBodies[0].rows;for(var A=0;A<t.length;A++)t[A].cells.length>z&&t[A].deleteCell(z)}};Graph.prototype.pasteHtmlAtCaret=function(t){if(window.getSelection){var z=
-window.getSelection();if(z.getRangeAt&&z.rangeCount){z=z.getRangeAt(0);z.deleteContents();var A=document.createElement("div");A.innerHTML=t;t=document.createDocumentFragment();for(var E;E=A.firstChild;)lastNode=t.appendChild(E);z.insertNode(t)}}else(z=document.selection)&&"Control"!=z.type&&z.createRange().pasteHTML(t)};Graph.prototype.createLinkForHint=function(t,z){function A(H,K){H.length>K&&(H=H.substring(0,Math.round(K/2))+"..."+H.substring(H.length-Math.round(K/4)));return H}t=null!=t?t:"javascript:void(0);";
+window.getSelection();if(z.getRangeAt&&z.rangeCount){z=z.getRangeAt(0);z.deleteContents();var A=document.createElement("div");A.innerHTML=t;t=document.createDocumentFragment();for(var E;E=A.firstChild;)lastNode=t.appendChild(E);z.insertNode(t)}}else(z=document.selection)&&"Control"!=z.type&&z.createRange().pasteHTML(t)};Graph.prototype.createLinkForHint=function(t,z){function A(H,L){H.length>L&&(H=H.substring(0,Math.round(L/2))+"..."+H.substring(H.length-Math.round(L/4)));return H}t=null!=t?t:"javascript:void(0);";
if(null==z||0==z.length)z=this.isCustomLink(t)?this.getLinkTitle(t):t;var E=document.createElement("a");E.setAttribute("rel",this.linkRelation);E.setAttribute("href",this.getAbsoluteUrl(t));E.setAttribute("title",A(this.isCustomLink(t)?this.getLinkTitle(t):t,80));null!=this.linkTarget&&E.setAttribute("target",this.linkTarget);mxUtils.write(E,A(z,40));this.isCustomLink(t)&&mxEvent.addListener(E,"click",mxUtils.bind(this,function(H){this.customLinkClicked(t);mxEvent.consume(H)}));return E};Graph.prototype.initTouch=
-function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(K,X){this.popupMenuHandler.hideMenu()});var t=this.updateMouseEvent;this.updateMouseEvent=function(K){K=t.apply(this,arguments);if(mxEvent.isTouchEvent(K.getEvent())&&null==K.getState()){var X=this.getCellAt(K.graphX,K.graphY);null!=X&&this.isSwimlane(X)&&this.hitsSwimlaneContent(X,K.graphX,K.graphY)||(K.state=this.view.getState(X),null!=K.state&&
-null!=K.state.shape&&(this.container.style.cursor=K.state.shape.node.style.cursor))}null==K.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return K};var z=!1,A=!1,E=!1,H=this.fireMouseEvent;this.fireMouseEvent=function(K,X,ja){K==mxEvent.MOUSE_DOWN&&(X=this.updateMouseEvent(X),z=this.isCellSelected(X.getCell()),A=this.isSelectionEmpty(),E=this.popupMenuHandler.isMenuShowing());H.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(K,X){var ja=mxEvent.isMouseEvent(X.getEvent());
-this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==X.getState()||!X.isSource(X.getState().control))&&(this.popupMenuHandler.popupTrigger||!E&&!ja&&(A&&null==X.getCell()&&this.isSelectionEmpty()||z&&this.isCellSelected(X.getCell())));ja=!z||ja?null:mxUtils.bind(this,function(ea){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var ka=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(X.getX()+ka.x+1,X.getY()+ka.y+1,ea,X.getEvent())}}),500)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,
-[K,X,ja])})};mxCellEditor.prototype.isContentEditing=function(){var t=this.graph.view.getState(this.editingCell);return null!=t&&1==t.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var t="";window.getSelection?t=window.getSelection():document.getSelection?t=document.getSelection():document.selection&&(t=document.selection.createRange().text);
+function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(L,W){this.popupMenuHandler.hideMenu()});var t=this.updateMouseEvent;this.updateMouseEvent=function(L){L=t.apply(this,arguments);if(mxEvent.isTouchEvent(L.getEvent())&&null==L.getState()){var W=this.getCellAt(L.graphX,L.graphY);null!=W&&this.isSwimlane(W)&&this.hitsSwimlaneContent(W,L.graphX,L.graphY)||(L.state=this.view.getState(W),null!=L.state&&
+null!=L.state.shape&&(this.container.style.cursor=L.state.shape.node.style.cursor))}null==L.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return L};var z=!1,A=!1,E=!1,H=this.fireMouseEvent;this.fireMouseEvent=function(L,W,ha){L==mxEvent.MOUSE_DOWN&&(W=this.updateMouseEvent(W),z=this.isCellSelected(W.getCell()),A=this.isSelectionEmpty(),E=this.popupMenuHandler.isMenuShowing());H.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(L,W){var ha=mxEvent.isMouseEvent(W.getEvent());
+this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==W.getState()||!W.isSource(W.getState().control))&&(this.popupMenuHandler.popupTrigger||!E&&!ha&&(A&&null==W.getCell()&&this.isSelectionEmpty()||z&&this.isCellSelected(W.getCell())));ha=!z||ha?null:mxUtils.bind(this,function(fa){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var ja=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(W.getX()+ja.x+1,W.getY()+ja.y+1,fa,W.getEvent())}}),500)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,
+[L,W,ha])})};mxCellEditor.prototype.isContentEditing=function(){var t=this.graph.view.getState(this.editingCell);return null!=t&&1==t.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var t="";window.getSelection?t=window.getSelection():document.getSelection?t=document.getSelection():document.selection&&(t=document.selection.createRange().text);
return""!=t};mxCellEditor.prototype.insertTab=function(t){var z=this.textarea.ownerDocument.defaultView.getSelection(),A=z.getRangeAt(0),E="\t";if(null!=t)for(E="";0<t;)E+=" ",t--;t=document.createElement("span");t.style.whiteSpace="pre";t.appendChild(document.createTextNode(E));A.insertNode(t);A.setStartAfter(t);A.setEndAfter(t);z.removeAllRanges();z.addRange(A)};mxCellEditor.prototype.alignText=function(t,z){var A=null!=z&&mxEvent.isShiftDown(z);if(A||null!=window.getSelection&&null!=window.getSelection().containsNode){var E=
!0;this.graph.processElements(this.textarea,function(H){A||window.getSelection().containsNode(H,!0)?(H.removeAttribute("align"),H.style.textAlign=null):E=!1});E&&this.graph.cellEditor.setAlign(t)}document.execCommand("justify"+t.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var t=window.getSelection();if(t.getRangeAt&&t.rangeCount){for(var z=[],A=0,E=t.rangeCount;A<E;++A)z.push(t.getRangeAt(A));return z}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();
-return null};mxCellEditor.prototype.restoreSelection=function(t){try{if(t)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var z=0,A=t.length;z<A;++z)sel.addRange(t[z])}else document.selection&&t.select&&t.select()}catch(E){}};var G=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(t){null!=t.text&&(t.text.replaceLinefeeds="0"!=mxUtils.getValue(t.style,"nl2Br","1"));G.apply(this,arguments)};var J=mxConstraintHandler.prototype.update;
+return null};mxCellEditor.prototype.restoreSelection=function(t){try{if(t)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var z=0,A=t.length;z<A;++z)sel.addRange(t[z])}else document.selection&&t.select&&t.select()}catch(E){}};var F=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(t){null!=t.text&&(t.text.replaceLinefeeds="0"!=mxUtils.getValue(t.style,"nl2Br","1"));F.apply(this,arguments)};var J=mxConstraintHandler.prototype.update;
mxConstraintHandler.prototype.update=function(t,z){this.isKeepFocusEvent(t)||!mxEvent.isAltDown(t.getEvent())?J.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(t){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var D=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(t,z){t=this.graph.getStartEditingCell(t,z);D.apply(this,arguments);var A=this.graph.view.getState(t);
this.textarea.className=null!=A&&1==A.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(t);A=this.graph.getModel().getParent(t);var E=this.graph.getCellGeometry(t);if(this.graph.getModel().isEdge(A)&&null!=E&&E.relative||this.graph.getModel().isEdge(t))this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var N=mxCellEditor.prototype.installListeners;
-mxCellEditor.prototype.installListeners=function(t){function z(H,K){K.originalNode=H;H=H.firstChild;for(var X=K.firstChild;null!=H&&null!=X;)z(H,X),H=H.nextSibling,X=X.nextSibling;return K}function A(H,K){if(null!=H)if(K.originalNode!=H)E(H);else for(H=H.firstChild,K=K.firstChild;null!=H;){var X=H.nextSibling;null==K?E(H):(A(H,K),K=K.nextSibling);H=X}}function E(H){for(var K=H.firstChild;null!=K;){var X=K.nextSibling;E(K);K=X}1==H.nodeType&&("BR"===H.nodeName||null!=H.firstChild)||3==H.nodeType&&
-0!=mxUtils.trim(mxUtils.getTextContent(H)).length?(3==H.nodeType&&mxUtils.setTextContent(H,mxUtils.getTextContent(H).replace(/\n|\r/g,"")),1==H.nodeType&&(H.removeAttribute("style"),H.removeAttribute("class"),H.removeAttribute("width"),H.removeAttribute("cellpadding"),H.removeAttribute("cellspacing"),H.removeAttribute("border"))):H.parentNode.removeChild(H)}N.apply(this,arguments);7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(H){var K=
-z(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?A(this.textarea,K):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var t=this.graph.view.getState(this.editingCell);if(null!=t){var z=null!=t&&"0"!=mxUtils.getValue(t.style,"nl2Br","1"),A=this.saveSelection();if(this.codeViewMode){ja=
-mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<ja.length&&"\n"==ja.charAt(ja.length-1)&&(ja=ja.substring(0,ja.length-1));ja=this.graph.sanitizeHtml(z?ja.replace(/\n/g,"<br/>"):ja,!0);this.textarea.className="mxCellEditor geContentEditable";ea=mxUtils.getValue(t.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);z=mxUtils.getValue(t.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var E=mxUtils.getValue(t.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),
-H=(mxUtils.getValue(t.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,K=(mxUtils.getValue(t.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,X=[];(mxUtils.getValue(t.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&X.push("underline");(mxUtils.getValue(t.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&X.push("line-through");this.textarea.style.lineHeight=
-mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ea*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ea)+"px";this.textarea.style.textDecoration=X.join(" ");this.textarea.style.fontWeight=H?"bold":"normal";this.textarea.style.fontStyle=K?"italic":"";this.textarea.style.fontFamily=z;this.textarea.style.textAlign=E;this.textarea.style.padding="0px";this.textarea.innerHTML!=ja&&(this.textarea.innerHTML=ja,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=
-this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerText="");var ja=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(ja=mxUtils.replaceTrailingNewlines(ja,"<div><br></div>"));ja=this.graph.sanitizeHtml(z?ja.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):ja,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";
-var ea=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ea*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ea)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=
-ja&&(this.textarea.innerHTML=ja);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=A;this.resize()}};var Q=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(t,z){if(null!=this.textarea)if(t=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=t){var A=t.view.scale;this.bounds=mxRectangle.fromRectangle(t);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=
+mxCellEditor.prototype.installListeners=function(t){function z(H,L){L.originalNode=H;H=H.firstChild;for(var W=L.firstChild;null!=H&&null!=W;)z(H,W),H=H.nextSibling,W=W.nextSibling;return L}function A(H,L){if(null!=H)if(L.originalNode!=H)E(H);else for(H=H.firstChild,L=L.firstChild;null!=H;){var W=H.nextSibling;null==L?E(H):(A(H,L),L=L.nextSibling);H=W}}function E(H){for(var L=H.firstChild;null!=L;){var W=L.nextSibling;E(L);L=W}1==H.nodeType&&("BR"===H.nodeName||null!=H.firstChild)||3==H.nodeType&&
+0!=mxUtils.trim(mxUtils.getTextContent(H)).length?(3==H.nodeType&&mxUtils.setTextContent(H,mxUtils.getTextContent(H).replace(/\n|\r/g,"")),1==H.nodeType&&(H.removeAttribute("style"),H.removeAttribute("class"),H.removeAttribute("width"),H.removeAttribute("cellpadding"),H.removeAttribute("cellspacing"),H.removeAttribute("border"))):H.parentNode.removeChild(H)}N.apply(this,arguments);7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(H){var L=
+z(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?A(this.textarea,L):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var t=this.graph.view.getState(this.editingCell);if(null!=t){var z=null!=t&&"0"!=mxUtils.getValue(t.style,"nl2Br","1"),A=this.saveSelection();if(this.codeViewMode){ha=
+mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<ha.length&&"\n"==ha.charAt(ha.length-1)&&(ha=ha.substring(0,ha.length-1));ha=this.graph.sanitizeHtml(z?ha.replace(/\n/g,"<br/>"):ha,!0);this.textarea.className="mxCellEditor geContentEditable";fa=mxUtils.getValue(t.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);z=mxUtils.getValue(t.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var E=mxUtils.getValue(t.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),
+H=(mxUtils.getValue(t.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,L=(mxUtils.getValue(t.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,W=[];(mxUtils.getValue(t.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&W.push("underline");(mxUtils.getValue(t.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&W.push("line-through");this.textarea.style.lineHeight=
+mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(fa*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(fa)+"px";this.textarea.style.textDecoration=W.join(" ");this.textarea.style.fontWeight=H?"bold":"normal";this.textarea.style.fontStyle=L?"italic":"";this.textarea.style.fontFamily=z;this.textarea.style.textAlign=E;this.textarea.style.padding="0px";this.textarea.innerHTML!=ha&&(this.textarea.innerHTML=ha,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=
+this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerText="");var ha=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(ha=mxUtils.replaceTrailingNewlines(ha,"<div><br></div>"));ha=this.graph.sanitizeHtml(z?ha.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):ha,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";
+var fa=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(fa*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(fa)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=
+ha&&(this.textarea.innerHTML=ha);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=A;this.resize()}};var S=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(t,z){if(null!=this.textarea)if(t=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=t){var A=t.view.scale;this.bounds=mxRectangle.fromRectangle(t);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=
160*A;this.bounds.height=60*A;var E=null!=t.text?t.text.margin:null;null==E&&(E=mxUtils.getAlignmentAsPoint(mxUtils.getValue(t.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(t.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=E.x*this.bounds.width;this.bounds.y+=E.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/A)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/A)+"px";this.textarea.style.overflow=
"auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/A)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*A);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/A)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*A);this.textarea.style.left=Math.round(this.bounds.x)+
-"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+A+","+A+")")}else this.textarea.style.height="",this.textarea.style.overflow="",Q.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(t,z){if("0"==mxUtils.getValue(t.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var A=this.graph.getEditingValue(t.cell,z);"1"==
+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+A+","+A+")")}else this.textarea.style.height="",this.textarea.style.overflow="",S.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(t,z){if("0"==mxUtils.getValue(t.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var A=this.graph.getEditingValue(t.cell,z);"1"==
mxUtils.getValue(t.style,"nl2Br","1")&&(A=A.replace(/\n/g,"<br/>"));return A=this.graph.sanitizeHtml(A,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(t){if("0"==mxUtils.getValue(t.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var z=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return z="1"==mxUtils.getValue(t.style,"nl2Br","1")?z.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):z.replace(/\r\n/g,
-"").replace(/\n/g,"")};var R=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(t){this.codeViewMode&&this.toggleViewMode();R.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(t){}};var P=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(t,z){this.graph.getModel().beginUpdate();try{P.apply(this,arguments),""==z&&this.graph.isCellDeletable(t.cell)&&0==this.graph.model.getChildCount(t.cell)&&
+"").replace(/\n/g,"")};var T=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(t){this.codeViewMode&&this.toggleViewMode();T.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(t){}};var P=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(t,z){this.graph.getModel().beginUpdate();try{P.apply(this,arguments),""==z&&this.graph.isCellDeletable(t.cell)&&0==this.graph.model.getChildCount(t.cell)&&
this.graph.isTransparentState(t)&&this.graph.removeCells([t.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(t){var z=mxUtils.getValue(t.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=z&&z!=mxConstants.NONE||!(null!=t.cell.geometry&&0<t.cell.geometry.width)||0==mxUtils.getValue(t.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(t.style,mxConstants.STYLE_HORIZONTAL,1)||(z=mxUtils.getValue(t.style,mxConstants.STYLE_FILLCOLOR,
null));z==mxConstants.NONE&&(z=null);return z};mxCellEditor.prototype.getBorderColor=function(t){var z=mxUtils.getValue(t.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);null!=z&&z!=mxConstants.NONE||!(null!=t.cell.geometry&&0<t.cell.geometry.width)||0==mxUtils.getValue(t.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(t.style,mxConstants.STYLE_HORIZONTAL,1)||(z=mxUtils.getValue(t.style,mxConstants.STYLE_STROKECOLOR,null));z==mxConstants.NONE&&(z=null);return z};mxCellEditor.prototype.getMinimumSize=
function(t){var z=this.graph.getView().scale;return new mxRectangle(0,0,null==t.text?30:t.text.size*z+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(t,z){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(z.getEvent)};mxGraphView.prototype.formatUnitText=function(t){return t?b(t,this.unit):t};mxGraphHandler.prototype.updateHint=function(t){if(null!=this.pBounds&&(null!=this.shape||
this.livePreviewActive)){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var z=this.graph.view.translate,A=this.graph.view.scale;t=this.roundLength((this.bounds.x+this.currentDx)/A-z.x);z=this.roundLength((this.bounds.y+this.currentDy)/A-z.y);A=this.graph.view.unit;this.hint.innerHTML=b(t,A)+", "+b(z,A);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+
-Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var Z=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(t,z){Z.apply(this,arguments);var A=this.graph.getCellStyle(t);if(null==A.childLayout){var E=this.graph.model.getParent(t),H=null!=E?this.graph.getCellGeometry(E):null;if(null!=H&&(A=this.graph.getCellStyle(E),"stackLayout"==A.childLayout)){var K=parseFloat(mxUtils.getValue(A,
-"stackBorder",mxStackLayout.prototype.border));A="1"==mxUtils.getValue(A,"horizontalStack","1");var X=this.graph.getActualStartSize(E);H=H.clone();A?H.height=z.height+X.y+X.height+2*K:H.width=z.width+X.x+X.width+2*K;this.graph.model.setGeometry(E,H)}}};var U=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function t(ja){A.get(ja)||(A.put(ja,!0),H.push(ja))}for(var z=U.apply(this,arguments),A=new mxDictionary,E=this.graph.model,
-H=[],K=0;K<z.length;K++){var X=z[K];this.graph.isTableCell(X)?t(E.getParent(E.getParent(X))):this.graph.isTableRow(X)&&t(E.getParent(X));t(X)}return H};var V=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(t){var z=V.apply(this,arguments);z.stroke="#C0C0C0";z.strokewidth=1;return z};var ia=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(t){var z=ia.apply(this,arguments);
+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var Z=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(t,z){Z.apply(this,arguments);var A=this.graph.getCellStyle(t);if(null==A.childLayout){var E=this.graph.model.getParent(t),H=null!=E?this.graph.getCellGeometry(E):null;if(null!=H&&(A=this.graph.getCellStyle(E),"stackLayout"==A.childLayout)){var L=parseFloat(mxUtils.getValue(A,
+"stackBorder",mxStackLayout.prototype.border));A="1"==mxUtils.getValue(A,"horizontalStack","1");var W=this.graph.getActualStartSize(E);H=H.clone();A?H.height=z.height+W.y+W.height+2*L:H.width=z.width+W.x+W.width+2*L;this.graph.model.setGeometry(E,H)}}};var U=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function t(ha){A.get(ha)||(A.put(ha,!0),H.push(ha))}for(var z=U.apply(this,arguments),A=new mxDictionary,E=this.graph.model,
+H=[],L=0;L<z.length;L++){var W=z[L];this.graph.isTableCell(W)?t(E.getParent(E.getParent(W))):this.graph.isTableRow(W)&&t(E.getParent(W));t(W)}return H};var V=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(t){var z=V.apply(this,arguments);z.stroke="#C0C0C0";z.strokewidth=1;return z};var aa=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(t){var z=aa.apply(this,arguments);
z.stroke="#C0C0C0";z.strokewidth=1;return z};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var t=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+t.x/2,this.bounds.y+this.rotationHandleVSpacing-t.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(t,z){return this.graph.isRecursiveVertexResize(t)&&!mxEvent.isAltDown(z.getEvent())};mxVertexHandler.prototype.isCenteredEvent=
-function(t,z){return mxEvent.isControlDown(z.getEvent())||mxEvent.isMetaDown(z.getEvent())};var ha=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return ha.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 ba=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return ba.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var qa=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(t){return t.tableHandle||qa.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=
-function(){var t=0;this.graph.isTableRow(this.state.cell)?t=1:this.graph.isTableCell(this.state.cell)&&(t=2);return t};var O=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return O.apply(this,arguments).grow(-this.getSelectionBorderInset())};var S=null,F=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==S&&(S=mxCellRenderer.defaultShapes.tableLine);var t=F.apply(this,arguments);
-if(this.graph.isTable(this.state.cell)){var z=function(La,Ia,Fa){for(var Ga=[],Oa=0;Oa<La.length;Oa++){var Pa=La[Oa];Ga.push(null==Pa?null:new mxPoint((ea+Pa.x+Ia)*K,(ka+Pa.y+Fa)*K))}return Ga},A=this,E=this.graph,H=E.model,K=E.view.scale,X=this.state,ja=this.selectionBorder,ea=this.state.origin.x+E.view.translate.x,ka=this.state.origin.y+E.view.translate.y;null==t&&(t=[]);var ta=E.view.getCellStates(H.getChildCells(this.state.cell,!0));if(0<ta.length){var Aa=H.getChildCells(ta[0].cell,!0),Ea=E.getTableLines(this.state.cell,
-!1,!0),Ma=E.getTableLines(this.state.cell,!0,!1);for(H=0;H<ta.length;H++)mxUtils.bind(this,function(La){var Ia=ta[La],Fa=La<ta.length-1?ta[La+1]:null;Fa=null!=Fa?E.getCellGeometry(Fa.cell):null;var Ga=null!=Fa&&null!=Fa.alternateBounds?Fa.alternateBounds:Fa;Fa=null!=Ma[La]?new S(Ma[La],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);Fa.isDashed=ja.isDashed;Fa.svgStrokeTolerance++;Ia=new mxHandle(Ia,"row-resize",null,Fa);Ia.tableHandle=!0;var Oa=0;Ia.shape.node.parentNode.insertBefore(Ia.shape.node,
-Ia.shape.node.parentNode.firstChild);Ia.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Oa?mxConstants.NONE:ja.stroke;if(this.shape.constructor==S)this.shape.line=z(Ma[La],0,Oa),this.shape.updateBoundsFromLine();else{var Na=E.getActualStartSize(X.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+Oa*K;this.shape.bounds.x=X.x+(La==ta.length-1?0:Na.x*K);this.shape.bounds.width=X.width-(La==ta.length-1?0:Na.width+Na.x+K)}this.shape.redraw()}};var Pa=!1;
-Ia.setPosition=function(Na,Sa,eb){Oa=Math.max(Graph.minTableRowHeight-Na.height,Sa.y-Na.y-Na.height);Pa=mxEvent.isShiftDown(eb.getEvent());null!=Ga&&Pa&&(Oa=Math.min(Oa,Ga.height-Graph.minTableRowHeight))};Ia.execute=function(Na){if(0!=Oa)E.setTableRowHeight(this.state.cell,Oa,!Pa);else if(!A.blockDelayedSelection){var Sa=E.getCellAt(Na.getGraphX(),Na.getGraphY())||X.cell;E.graphHandler.selectCellForEvent(Sa,Na)}Oa=0};Ia.reset=function(){Oa=0};t.push(Ia)})(H);for(H=0;H<Aa.length;H++)mxUtils.bind(this,
-function(La){var Ia=E.view.getState(Aa[La]),Fa=E.getCellGeometry(Aa[La]),Ga=null!=Fa.alternateBounds?Fa.alternateBounds:Fa;null==Ia&&(Ia=new mxCellState(E.view,Aa[La],E.getCellStyle(Aa[La])),Ia.x=X.x+Fa.x*K,Ia.y=X.y+Fa.y*K,Ia.width=Ga.width*K,Ia.height=Ga.height*K,Ia.updateCachedBounds());Fa=La<Aa.length-1?Aa[La+1]:null;Fa=null!=Fa?E.getCellGeometry(Fa):null;var Oa=null!=Fa&&null!=Fa.alternateBounds?Fa.alternateBounds:Fa;Fa=null!=Ea[La]?new S(Ea[La],mxConstants.NONE,1):new mxLine(new mxRectangle,
-mxConstants.NONE,1,!0);Fa.isDashed=ja.isDashed;Fa.svgStrokeTolerance++;Ia=new mxHandle(Ia,"col-resize",null,Fa);Ia.tableHandle=!0;var Pa=0;Ia.shape.node.parentNode.insertBefore(Ia.shape.node,Ia.shape.node.parentNode.firstChild);Ia.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Pa?mxConstants.NONE:ja.stroke;if(this.shape.constructor==S)this.shape.line=z(Ea[La],Pa,0),this.shape.updateBoundsFromLine();else{var Sa=E.getActualStartSize(X.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=
-this.state.x+(Ga.width+Pa)*K;this.shape.bounds.y=X.y+(La==Aa.length-1?0:Sa.y*K);this.shape.bounds.height=X.height-(La==Aa.length-1?0:(Sa.height+Sa.y)*K)}this.shape.redraw()}};var Na=!1;Ia.setPosition=function(Sa,eb,ab){Pa=Math.max(Graph.minTableColumnWidth-Ga.width,eb.x-Sa.x-Ga.width);Na=mxEvent.isShiftDown(ab.getEvent());null==Oa||Na||(Pa=Math.min(Pa,Oa.width-Graph.minTableColumnWidth))};Ia.execute=function(Sa){if(0!=Pa)E.setTableColumnWidth(this.state.cell,Pa,Na);else if(!A.blockDelayedSelection){var eb=
-E.getCellAt(Sa.getGraphX(),Sa.getGraphY())||X.cell;E.graphHandler.selectCellForEvent(eb,Sa)}Pa=0};Ia.positionChanged=function(){};Ia.reset=function(){Pa=0};t.push(Ia)})(H)}}return null!=t?t.reverse():null};var L=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(t){L.apply(this,arguments);if(null!=this.moveHandles)for(var z=0;z<this.moveHandles.length;z++)this.moveHandles[z].style.visibility=t?"":"hidden";if(null!=this.cornerHandles)for(z=0;z<this.cornerHandles.length;z++)this.cornerHandles[z].node.style.visibility=
+function(t,z){return mxEvent.isControlDown(z.getEvent())||mxEvent.isMetaDown(z.getEvent())};var ia=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return ia.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 ea=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return ea.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var qa=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(t){return t.tableHandle||qa.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=
+function(){var t=0;this.graph.isTableRow(this.state.cell)?t=1:this.graph.isTableCell(this.state.cell)&&(t=2);return t};var O=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return O.apply(this,arguments).grow(-this.getSelectionBorderInset())};var R=null,G=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==R&&(R=mxCellRenderer.defaultShapes.tableLine);var t=G.apply(this,arguments);
+if(this.graph.isTable(this.state.cell)){var z=function(La,Ia,Fa){for(var Ga=[],Oa=0;Oa<La.length;Oa++){var Pa=La[Oa];Ga.push(null==Pa?null:new mxPoint((fa+Pa.x+Ia)*L,(ja+Pa.y+Fa)*L))}return Ga},A=this,E=this.graph,H=E.model,L=E.view.scale,W=this.state,ha=this.selectionBorder,fa=this.state.origin.x+E.view.translate.x,ja=this.state.origin.y+E.view.translate.y;null==t&&(t=[]);var ua=E.view.getCellStates(H.getChildCells(this.state.cell,!0));if(0<ua.length){var Aa=H.getChildCells(ua[0].cell,!0),Ea=E.getTableLines(this.state.cell,
+!1,!0),Ma=E.getTableLines(this.state.cell,!0,!1);for(H=0;H<ua.length;H++)mxUtils.bind(this,function(La){var Ia=ua[La],Fa=La<ua.length-1?ua[La+1]:null;Fa=null!=Fa?E.getCellGeometry(Fa.cell):null;var Ga=null!=Fa&&null!=Fa.alternateBounds?Fa.alternateBounds:Fa;Fa=null!=Ma[La]?new R(Ma[La],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);Fa.isDashed=ha.isDashed;Fa.svgStrokeTolerance++;Ia=new mxHandle(Ia,"row-resize",null,Fa);Ia.tableHandle=!0;var Oa=0;Ia.shape.node.parentNode.insertBefore(Ia.shape.node,
+Ia.shape.node.parentNode.firstChild);Ia.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Oa?mxConstants.NONE:ha.stroke;if(this.shape.constructor==R)this.shape.line=z(Ma[La],0,Oa),this.shape.updateBoundsFromLine();else{var Na=E.getActualStartSize(W.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+Oa*L;this.shape.bounds.x=W.x+(La==ua.length-1?0:Na.x*L);this.shape.bounds.width=W.width-(La==ua.length-1?0:Na.width+Na.x+L)}this.shape.redraw()}};var Pa=!1;
+Ia.setPosition=function(Na,Sa,eb){Oa=Math.max(Graph.minTableRowHeight-Na.height,Sa.y-Na.y-Na.height);Pa=mxEvent.isShiftDown(eb.getEvent());null!=Ga&&Pa&&(Oa=Math.min(Oa,Ga.height-Graph.minTableRowHeight))};Ia.execute=function(Na){if(0!=Oa)E.setTableRowHeight(this.state.cell,Oa,!Pa);else if(!A.blockDelayedSelection){var Sa=E.getCellAt(Na.getGraphX(),Na.getGraphY())||W.cell;E.graphHandler.selectCellForEvent(Sa,Na)}Oa=0};Ia.reset=function(){Oa=0};t.push(Ia)})(H);for(H=0;H<Aa.length;H++)mxUtils.bind(this,
+function(La){var Ia=E.view.getState(Aa[La]),Fa=E.getCellGeometry(Aa[La]),Ga=null!=Fa.alternateBounds?Fa.alternateBounds:Fa;null==Ia&&(Ia=new mxCellState(E.view,Aa[La],E.getCellStyle(Aa[La])),Ia.x=W.x+Fa.x*L,Ia.y=W.y+Fa.y*L,Ia.width=Ga.width*L,Ia.height=Ga.height*L,Ia.updateCachedBounds());Fa=La<Aa.length-1?Aa[La+1]:null;Fa=null!=Fa?E.getCellGeometry(Fa):null;var Oa=null!=Fa&&null!=Fa.alternateBounds?Fa.alternateBounds:Fa;Fa=null!=Ea[La]?new R(Ea[La],mxConstants.NONE,1):new mxLine(new mxRectangle,
+mxConstants.NONE,1,!0);Fa.isDashed=ha.isDashed;Fa.svgStrokeTolerance++;Ia=new mxHandle(Ia,"col-resize",null,Fa);Ia.tableHandle=!0;var Pa=0;Ia.shape.node.parentNode.insertBefore(Ia.shape.node,Ia.shape.node.parentNode.firstChild);Ia.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Pa?mxConstants.NONE:ha.stroke;if(this.shape.constructor==R)this.shape.line=z(Ea[La],Pa,0),this.shape.updateBoundsFromLine();else{var Sa=E.getActualStartSize(W.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=
+this.state.x+(Ga.width+Pa)*L;this.shape.bounds.y=W.y+(La==Aa.length-1?0:Sa.y*L);this.shape.bounds.height=W.height-(La==Aa.length-1?0:(Sa.height+Sa.y)*L)}this.shape.redraw()}};var Na=!1;Ia.setPosition=function(Sa,eb,ab){Pa=Math.max(Graph.minTableColumnWidth-Ga.width,eb.x-Sa.x-Ga.width);Na=mxEvent.isShiftDown(ab.getEvent());null==Oa||Na||(Pa=Math.min(Pa,Oa.width-Graph.minTableColumnWidth))};Ia.execute=function(Sa){if(0!=Pa)E.setTableColumnWidth(this.state.cell,Pa,Na);else if(!A.blockDelayedSelection){var eb=
+E.getCellAt(Sa.getGraphX(),Sa.getGraphY())||W.cell;E.graphHandler.selectCellForEvent(eb,Sa)}Pa=0};Ia.positionChanged=function(){};Ia.reset=function(){Pa=0};t.push(Ia)})(H)}}return null!=t?t.reverse():null};var K=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(t){K.apply(this,arguments);if(null!=this.moveHandles)for(var z=0;z<this.moveHandles.length;z++)this.moveHandles[z].style.visibility=t?"":"hidden";if(null!=this.cornerHandles)for(z=0;z<this.cornerHandles.length;z++)this.cornerHandles[z].node.style.visibility=
t?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=function(){var t=this.graph.model;if(null!=this.moveHandles){for(var z=0;z<this.moveHandles.length;z++)this.moveHandles[z].parentNode.removeChild(this.moveHandles[z]);this.moveHandles=null}this.moveHandles=[];for(z=0;z<t.getChildCount(this.state.cell);z++)mxUtils.bind(this,function(A){if(null!=A&&t.isVertex(A.cell)){var E=mxUtils.createImage(Editor.rowMoveImage);E.style.position="absolute";E.style.cursor="pointer";E.style.width="7px";E.style.height=
"4px";E.style.padding="4px 2px 4px 2px";E.rowState=A;mxEvent.addGestureListeners(E,mxUtils.bind(this,function(H){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(H)&&this.graph.isCellSelected(A.cell)||this.graph.selectCellForEvent(A.cell,H);mxEvent.isPopupTrigger(H)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(H),mxEvent.getClientY(H),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=
mxEvent.isMouseEvent(H),this.graph.isMouseDown=!0);mxEvent.consume(H)}),null,mxUtils.bind(this,function(H){mxEvent.isPopupTrigger(H)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(H),mxEvent.getClientY(H),A.cell,H),mxEvent.consume(H))}));this.moveHandles.push(E);this.graph.container.appendChild(E)}})(this.graph.view.getState(t.getChildAt(this.state.cell,z)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var t=0;t<this.customHandles.length;t++)this.customHandles[t].destroy();
-this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var T=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var t=new mxPoint(0,0),z=this.tolerance,A=this.state.style.shape;null==mxCellRenderer.defaultShapes[A]&&mxStencilRegistry.getStencil(A);A=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!A&&null!=this.customHandles)for(var E=0;E<this.customHandles.length;E++)if(null!=
-this.customHandles[E].shape&&null!=this.customHandles[E].shape.bounds){var H=this.customHandles[E].shape.bounds,K=H.getCenterX(),X=H.getCenterY();if(Math.abs(this.state.x-K)<H.width/2||Math.abs(this.state.y-X)<H.height/2||Math.abs(this.state.x+this.state.width-K)<H.width/2||Math.abs(this.state.y+this.state.height-X)<H.height/2){A=!0;break}}A&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(z/=2,this.graph.isTable(this.state.cell)&&(z+=7),t.x=this.sizers[0].bounds.width+z,t.y=this.sizers[0].bounds.height+
-z):t=T.apply(this,arguments);return t};mxVertexHandler.prototype.updateHint=function(t){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{t=this.state.view.scale;var z=this.state.view.unit;this.hint.innerHTML=b(this.roundLength(this.bounds.width/t),z)+" x "+b(this.roundLength(this.bounds.height/t),z)}t=mxUtils.getBoundingBox(this.bounds,
-null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==t&&(t=this.bounds);this.hint.style.left=t.x+Math.round((t.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=t.y+t.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var ca=mxEdgeHandler.prototype.mouseMove;
-mxEdgeHandler.prototype.mouseMove=function(t,z){ca.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};var fa=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(t,z){fa.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(t,z){null==this.hint&&
+this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var Q=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var t=new mxPoint(0,0),z=this.tolerance,A=this.state.style.shape;null==mxCellRenderer.defaultShapes[A]&&mxStencilRegistry.getStencil(A);A=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!A&&null!=this.customHandles)for(var E=0;E<this.customHandles.length;E++)if(null!=
+this.customHandles[E].shape&&null!=this.customHandles[E].shape.bounds){var H=this.customHandles[E].shape.bounds,L=H.getCenterX(),W=H.getCenterY();if(Math.abs(this.state.x-L)<H.width/2||Math.abs(this.state.y-W)<H.height/2||Math.abs(this.state.x+this.state.width-L)<H.width/2||Math.abs(this.state.y+this.state.height-W)<H.height/2){A=!0;break}}A&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(z/=2,this.graph.isTable(this.state.cell)&&(z+=7),t.x=this.sizers[0].bounds.width+z,t.y=this.sizers[0].bounds.height+
+z):t=Q.apply(this,arguments);return t};mxVertexHandler.prototype.updateHint=function(t){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{t=this.state.view.scale;var z=this.state.view.unit;this.hint.innerHTML=b(this.roundLength(this.bounds.width/t),z)+" x "+b(this.roundLength(this.bounds.height/t),z)}t=mxUtils.getBoundingBox(this.bounds,
+null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==t&&(t=this.bounds);this.hint.style.left=t.x+Math.round((t.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=t.y+t.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var ba=mxEdgeHandler.prototype.mouseMove;
+mxEdgeHandler.prototype.mouseMove=function(t,z){ba.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};var la=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(t,z){la.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(t,z){null==this.hint&&
(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var A=this.graph.view.translate,E=this.graph.view.scale,H=this.roundLength(z.x/E-A.x);A=this.roundLength(z.y/E-A.y);E=this.graph.view.unit;this.hint.innerHTML=b(H,E)+", "+b(A,E);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(H=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*H.x)+
"%, "+Math.round(100*H.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(t.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(t.getGraphY(),z.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};Graph.prototype.expandedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="50%" y1="0%" x2="50%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 2 4.5 L 7 4.5 z" stroke="#000"/>');
Graph.prototype.collapsedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 4.5 2 L 4.5 7 M 2 4.5 L 7 4.5 z" stroke="#000"/>');mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=
@@ -3205,30 +3208,30 @@ mxEdgeHandler.prototype.endHandleImage=HoverIcons.prototype.endMainHandle;mxEdge
HoverIcons.prototype.mainHandle;null!=window.Sidebar&&(Sidebar.prototype.triangleUp=HoverIcons.prototype.triangleUp,Sidebar.prototype.triangleRight=HoverIcons.prototype.triangleRight,Sidebar.prototype.triangleDown=HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.prototype.triangleLeft,Sidebar.prototype.refreshTarget=HoverIcons.prototype.refreshTarget,Sidebar.prototype.roundDrop=HoverIcons.prototype.roundDrop);mxVertexHandler.prototype.rotationEnabled=!0;mxVertexHandler.prototype.manageSizers=
!0;mxVertexHandler.prototype.livePreview=!0;mxGraphHandler.prototype.maxLivePreview=16;mxRubberband.prototype.defaultOpacity=30;mxConnectionHandler.prototype.outlineConnect=!0;mxCellHighlight.prototype.keepOnTop=!0;mxVertexHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.dblClickRemoveEnabled=!0;mxEdgeHandler.prototype.straightRemoveEnabled=!0;mxEdgeHandler.prototype.virtualBendsEnabled=!0;mxEdgeHandler.prototype.mergeRemoveEnabled=
!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(t){return!mxEvent.isShiftDown(t.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(t){return!mxEvent.isShiftDown(t.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=
-12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(t){return mxEvent.isMouseEvent(t.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(t){var z=t.getEvent();return null==t.getState()&&!mxEvent.isMouseEvent(z)||mxEvent.isPopupTrigger(z)&&(null==t.getState()||mxEvent.isControlDown(z)||mxEvent.isShiftDown(z))};var wa=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=
-function(t,z){wa.apply(this,arguments);mxEvent.isTouchEvent(z.getEvent())&&this.graph.isCellSelected(z.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(t){var z=t.getEvent();return mxEvent.isLeftMouseButton(z)&&(this.useLeftButtonForPanning&&null==t.getState()||mxEvent.isControlDown(z)&&!mxEvent.isShiftDown(z))||this.usePopupTrigger&&mxEvent.isPopupTrigger(z)};mxRubberband.prototype.isSpaceEvent=function(t){return this.graph.isEnabled()&&
-!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(t.getEvent())||mxEvent.isMetaDown(t.getEvent()))&&mxEvent.isShiftDown(t.getEvent())&&mxEvent.isAltDown(t.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(t,z){if(this.cancelled)this.cancelled=!1,z.consume();else{var A=null!=this.div&&"none"!=this.div.style.display,E=null,H=null,K=t=null;null!=
-this.first&&null!=this.currentX&&null!=this.currentY&&(E=this.first.x,H=this.first.y,t=(this.currentX-E)/this.graph.view.scale,K=(this.currentY-H)/this.graph.view.scale,mxEvent.isAltDown(z.getEvent())||(t=this.graph.snap(t),K=this.graph.snap(K),this.graph.isGridEnabled()||(Math.abs(t)<this.graph.tolerance&&(t=0),Math.abs(K)<this.graph.tolerance&&(K=0))));this.reset();if(A){if(this.isSpaceEvent(z)){this.graph.model.beginUpdate();try{var X=this.graph.getCellsBeyond(E,H,this.graph.getDefaultParent(),
-!0,!0);for(A=0;A<X.length;A++)if(this.graph.isCellMovable(X[A])){var ja=this.graph.view.getState(X[A]),ea=this.graph.getCellGeometry(X[A]);null!=ja&&null!=ea&&(ea=ea.clone(),ea.translate(t,K),this.graph.model.setGeometry(X[A],ea))}}finally{this.graph.model.endUpdate()}}else X=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(X,z.getEvent());z.consume()}}};mxRubberband.prototype.mouseMove=function(t,z){if(!z.isConsumed()&&null!=this.first){var A=mxUtils.getScrollOrigin(this.graph.container);
-t=mxUtils.getOffset(this.graph.container);A.x-=t.x;A.y-=t.y;t=z.getX()+A.x;A=z.getY()+A.y;var E=this.first.x-t,H=this.first.y-A,K=this.graph.tolerance;if(null!=this.div||Math.abs(E)>K||Math.abs(H)>K)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(t,A),this.isSpaceEvent(z)?(t=this.x+this.width,A=this.y+this.height,E=this.graph.view.scale,mxEvent.isAltDown(z.getEvent())||(this.width=this.graph.snap(this.width/E)*E,this.height=this.graph.snap(this.height/E)*E,this.graph.isGridEnabled()||
+12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(t){return mxEvent.isMouseEvent(t.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(t){var z=t.getEvent();return null==t.getState()&&!mxEvent.isMouseEvent(z)||mxEvent.isPopupTrigger(z)&&(null==t.getState()||mxEvent.isControlDown(z)||mxEvent.isShiftDown(z))};var ra=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=
+function(t,z){ra.apply(this,arguments);mxEvent.isTouchEvent(z.getEvent())&&this.graph.isCellSelected(z.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(t){var z=t.getEvent();return mxEvent.isLeftMouseButton(z)&&(this.useLeftButtonForPanning&&null==t.getState()||mxEvent.isControlDown(z)&&!mxEvent.isShiftDown(z))||this.usePopupTrigger&&mxEvent.isPopupTrigger(z)};mxRubberband.prototype.isSpaceEvent=function(t){return this.graph.isEnabled()&&
+!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(t.getEvent())||mxEvent.isMetaDown(t.getEvent()))&&mxEvent.isShiftDown(t.getEvent())&&mxEvent.isAltDown(t.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(t,z){if(this.cancelled)this.cancelled=!1,z.consume();else{var A=null!=this.div&&"none"!=this.div.style.display,E=null,H=null,L=t=null;null!=
+this.first&&null!=this.currentX&&null!=this.currentY&&(E=this.first.x,H=this.first.y,t=(this.currentX-E)/this.graph.view.scale,L=(this.currentY-H)/this.graph.view.scale,mxEvent.isAltDown(z.getEvent())||(t=this.graph.snap(t),L=this.graph.snap(L),this.graph.isGridEnabled()||(Math.abs(t)<this.graph.tolerance&&(t=0),Math.abs(L)<this.graph.tolerance&&(L=0))));this.reset();if(A){if(this.isSpaceEvent(z)){this.graph.model.beginUpdate();try{var W=this.graph.getCellsBeyond(E,H,this.graph.getDefaultParent(),
+!0,!0);for(A=0;A<W.length;A++)if(this.graph.isCellMovable(W[A])){var ha=this.graph.view.getState(W[A]),fa=this.graph.getCellGeometry(W[A]);null!=ha&&null!=fa&&(fa=fa.clone(),fa.translate(t,L),this.graph.model.setGeometry(W[A],fa))}}finally{this.graph.model.endUpdate()}}else W=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(W,z.getEvent());z.consume()}}};mxRubberband.prototype.mouseMove=function(t,z){if(!z.isConsumed()&&null!=this.first){var A=mxUtils.getScrollOrigin(this.graph.container);
+t=mxUtils.getOffset(this.graph.container);A.x-=t.x;A.y-=t.y;t=z.getX()+A.x;A=z.getY()+A.y;var E=this.first.x-t,H=this.first.y-A,L=this.graph.tolerance;if(null!=this.div||Math.abs(E)>L||Math.abs(H)>L)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(t,A),this.isSpaceEvent(z)?(t=this.x+this.width,A=this.y+this.height,E=this.graph.view.scale,mxEvent.isAltDown(z.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=t-this.width),this.y<this.first.y&&(this.y=A-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",
null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&
-(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),z.consume()}};var W=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);W.apply(this,arguments)};var aa=(new Date).getTime(),oa=0,sa=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(t,z,A,E){sa.apply(this,arguments);A!=this.currentTerminalState?(aa=(new Date).getTime(),
-oa=0):oa=(new Date).getTime()-aa;this.currentTerminalState=A};var Ka=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(t){return mxEvent.isShiftDown(t.getEvent())&&mxEvent.isAltDown(t.getEvent())?!1:null!=this.currentTerminalState&&t.getState()==this.currentTerminalState&&2E3<oa||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&Ka.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=
+(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),z.consume()}};var X=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);X.apply(this,arguments)};var ca=(new Date).getTime(),oa=0,ta=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(t,z,A,E){ta.apply(this,arguments);A!=this.currentTerminalState?(ca=(new Date).getTime(),
+oa=0):oa=(new Date).getTime()-ca;this.currentTerminalState=A};var Ka=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(t){return mxEvent.isShiftDown(t.getEvent())&&mxEvent.isAltDown(t.getEvent())?!1:null!=this.currentTerminalState&&t.getState()==this.currentTerminalState&&2E3<oa||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&Ka.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=
function(t,z,A){z=null!=t&&0==t;var E=this.state.getVisibleTerminalState(z);t=null!=t&&(0==t||t>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==t)?this.graph.getConnectionConstraint(this.state,E,z):null;A=null!=(null!=t?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(z),t):null)?A?this.endFixedHandleImage:this.fixedHandleImage:null!=t&&null!=E?A?this.endTerminalHandleImage:this.terminalHandleImage:A?this.endHandleImage:this.handleImage;if(null!=A)return A=
new mxImageShape(new mxRectangle(0,0,A.width,A.height),A.src),A.preserveImageAspect=!1,A;A=mxConstants.HANDLE_SIZE;this.preferHtml&&--A;return new mxRectangleShape(new mxRectangle(0,0,A,A),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var Ha=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(t,z,A){this.handleImage=z==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:z==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;
-return Ha.apply(this,arguments)};var ua=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(t){if(null!=t&&1==t.length){var z=this.graph.getModel(),A=z.getParent(t[0]),E=this.graph.getCellGeometry(t[0]);if(z.isEdge(A)&&null!=E&&E.relative&&(z=this.graph.view.getState(t[0]),null!=z&&2>z.width&&2>z.height&&null!=z.text&&null!=z.text.boundingBox))return mxRectangle.fromRectangle(z.text.boundingBox)}return ua.apply(this,arguments)};var Ca=mxGraphHandler.prototype.getGuideStates;
-mxGraphHandler.prototype.getGuideStates=function(){for(var t=Ca.apply(this,arguments),z=[],A=0;A<t.length;A++)"1"!=mxUtils.getValue(t[A].style,"part","0")&&z.push(t[A]);return z};var ra=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(t){var z=this.graph.getModel(),A=z.getParent(t.cell),E=this.graph.getCellGeometry(t.cell);return z.isEdge(A)&&null!=E&&E.relative&&2>t.width&&2>t.height&&null!=t.text&&null!=t.text.boundingBox?(z=t.text.unrotatedBoundingBox||
-t.text.boundingBox,new mxRectangle(Math.round(z.x),Math.round(z.y),Math.round(z.width),Math.round(z.height))):ra.apply(this,arguments)};var Da=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(t,z){var A=this.graph.getModel(),E=A.getParent(this.state.cell),H=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(z)==mxEvent.ROTATION_HANDLE||!A.isEdge(E)||null==H||!H.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&Da.apply(this,arguments)};
+return Ha.apply(this,arguments)};var va=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(t){if(null!=t&&1==t.length){var z=this.graph.getModel(),A=z.getParent(t[0]),E=this.graph.getCellGeometry(t[0]);if(z.isEdge(A)&&null!=E&&E.relative&&(z=this.graph.view.getState(t[0]),null!=z&&2>z.width&&2>z.height&&null!=z.text&&null!=z.text.boundingBox))return mxRectangle.fromRectangle(z.text.boundingBox)}return va.apply(this,arguments)};var Ca=mxGraphHandler.prototype.getGuideStates;
+mxGraphHandler.prototype.getGuideStates=function(){for(var t=Ca.apply(this,arguments),z=[],A=0;A<t.length;A++)"1"!=mxUtils.getValue(t[A].style,"part","0")&&z.push(t[A]);return z};var sa=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(t){var z=this.graph.getModel(),A=z.getParent(t.cell),E=this.graph.getCellGeometry(t.cell);return z.isEdge(A)&&null!=E&&E.relative&&2>t.width&&2>t.height&&null!=t.text&&null!=t.text.boundingBox?(z=t.text.unrotatedBoundingBox||
+t.text.boundingBox,new mxRectangle(Math.round(z.x),Math.round(z.y),Math.round(z.width),Math.round(z.height))):sa.apply(this,arguments)};var Da=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(t,z){var A=this.graph.getModel(),E=A.getParent(this.state.cell),H=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(z)==mxEvent.ROTATION_HANDLE||!A.isEdge(E)||null==H||!H.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&Da.apply(this,arguments)};
mxVertexHandler.prototype.rotateClick=function(){var t=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),z=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&t==mxConstants.NONE&&z==mxConstants.NONE?(t=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,t,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};
var Ua=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(t,z){Ua.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var db=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(t,z){db.apply(this,arguments);null!=this.rotationShape&&null!=
this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="");this.blockDelayedSelection=null};var Ta=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){Ta.apply(this,arguments);var t=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));if(this.graph.isTable(this.state.cell))this.refreshMoveHandles();
else if(1==this.graph.getSelectionCount()&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var z=0;4>z;z++){var A=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);A.dialect=mxConstants.DIALECT_SVG;A.init(this.graph.view.getOverlayPane());this.cornerHandles.push(A)}}var E=mxUtils.bind(this,function(){null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<
-this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.changeHandler=mxUtils.bind(this,function(H,K){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));E()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(H,K){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);
+this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.changeHandler=mxUtils.bind(this,function(H,L){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));E()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(H,L){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);
z=this.graph.getLinkForCell(this.state.cell);A=this.graph.getLinksForState(this.state);this.updateLinkHint(z,A);if(null!=z||null!=A&&0<A.length)t=!0;t&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(t,z){try{if(null==t&&(null==z||0==z.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=t||null!=z&&0<z.length){null==this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding=
"6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerText="";if(null!=t&&(this.linkHint.appendChild(this.graph.createLinkForHint(t)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var A=document.createElement("img");A.setAttribute("src",Editor.editImage);A.setAttribute("title",
-mxResources.get("editLink"));A.setAttribute("width","11");A.setAttribute("height","11");A.style.marginLeft="10px";A.style.marginBottom="-1px";A.style.cursor="pointer";Editor.isDarkMode()&&(A.style.filter="invert(100%)");this.linkHint.appendChild(A);mxEvent.addListener(A,"click",mxUtils.bind(this,function(K){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(K)}));var E=A.cloneNode(!0);E.setAttribute("src",Editor.trashImage);E.setAttribute("title",mxResources.get("removeIt",
-[mxResources.get("link")]));E.style.marginLeft="4px";this.linkHint.appendChild(E);mxEvent.addListener(E,"click",mxUtils.bind(this,function(K){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(K)}))}if(null!=z)for(A=0;A<z.length;A++){var H=document.createElement("div");H.style.marginTop=null!=t||0<A?"6px":"0px";H.appendChild(this.graph.createLinkForHint(z[A].getAttribute("href"),mxUtils.getTextContent(z[A])));this.linkHint.appendChild(H)}}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(K){}};
+mxResources.get("editLink"));A.setAttribute("width","11");A.setAttribute("height","11");A.style.marginLeft="10px";A.style.marginBottom="-1px";A.style.cursor="pointer";Editor.isDarkMode()&&(A.style.filter="invert(100%)");this.linkHint.appendChild(A);mxEvent.addListener(A,"click",mxUtils.bind(this,function(L){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(L)}));var E=A.cloneNode(!0);E.setAttribute("src",Editor.trashImage);E.setAttribute("title",mxResources.get("removeIt",
+[mxResources.get("link")]));E.style.marginLeft="4px";this.linkHint.appendChild(E);mxEvent.addListener(E,"click",mxUtils.bind(this,function(L){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(L)}))}if(null!=z)for(A=0;A<z.length;A++){var H=document.createElement("div");H.style.marginTop=null!=t||0<A?"6px":"0px";H.appendChild(this.graph.createLinkForHint(z[A].getAttribute("href"),mxUtils.getTextContent(z[A])));this.linkHint.appendChild(H)}}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(L){}};
mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var $a=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){$a.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var t=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&
this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.changeHandler=mxUtils.bind(this,function(E,H){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));t();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var z=this.graph.getLinkForCell(this.state.cell),A=this.graph.getLinksForState(this.state);if(null!=
z||null!=A&&0<A.length)this.updateLinkHint(z,A),this.redrawHandles()};var Xa=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Xa.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Va=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var t=0;t<this.moveHandles.length;t++)this.moveHandles[t].style.left=this.moveHandles[t].rowState.x+
@@ -3258,282 +3261,282 @@ Format.ERzeroToManyMarkerImage=Graph.createSvgImage(20,22,'<path transform="tran
Format.baseDashMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 0 2 L 0 14 M 0 8 L 24 8" stroke="#404040" fill="transparent"/>',32,20);Format.doubleBlockMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 0 8 L 8 2 L 8 14 Z M 8 8 L 16 2 L 16 14 Z M 16 8 L 24 8" stroke="#404040" fill="transparent"/>',32,20);
Format.doubleBlockFilledMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 0 8 L 8 2 L 8 14 Z M 8 8 L 16 2 L 16 14 Z M 16 8 L 24 8" stroke="#404040" fill="#404040"/>',32,20);Format.processMenuIcon=function(a,b){var f=a.getElementsByTagName("img");0<f.length&&(Editor.isDarkMode()&&(f[0].style.filter="invert(100%)"),f[0].className="geIcon",f[0].style.padding="0px",f[0].style.margin="0 0 0 2px",null!=b&&mxUtils.setPrefixedStyle(f[0].style,"transform",b));return a};
Format.prototype.labelIndex=0;Format.prototype.diagramIndex=0;Format.prototype.currentIndex=0;Format.prototype.showCloseButton=!0;
-Format.prototype.init=function(){var a=this.editorUi,b=a.editor,f=b.graph;this.update=mxUtils.bind(this,function(d,g){this.refresh()});f.getSelectionModel().addListener(mxEvent.CHANGE,this.update);f.getModel().addListener(mxEvent.CHANGE,this.update);f.addListener(mxEvent.EDITING_STARTED,this.update);f.addListener(mxEvent.EDITING_STOPPED,this.update);f.getView().addListener("unitChanged",this.update);b.addListener("autosaveChanged",this.update);f.addListener(mxEvent.ROOT,this.update);a.addListener("styleChanged",
+Format.prototype.init=function(){var a=this.editorUi,b=a.editor,f=b.graph;this.update=mxUtils.bind(this,function(e,g){this.refresh()});f.getSelectionModel().addListener(mxEvent.CHANGE,this.update);f.getModel().addListener(mxEvent.CHANGE,this.update);f.addListener(mxEvent.EDITING_STARTED,this.update);f.addListener(mxEvent.EDITING_STOPPED,this.update);f.getView().addListener("unitChanged",this.update);b.addListener("autosaveChanged",this.update);f.addListener(mxEvent.ROOT,this.update);a.addListener("styleChanged",
this.update);this.refresh()};Format.prototype.clear=function(){this.container.innerText="";if(null!=this.panels)for(var a=0;a<this.panels.length;a++)this.panels[a].destroy();this.panels=[]};Format.prototype.refresh=function(){null!=this.pendingRefresh&&(window.clearTimeout(this.pendingRefresh),this.pendingRefresh=null);this.pendingRefresh=window.setTimeout(mxUtils.bind(this,function(){this.immediateRefresh()}))};
-Format.prototype.immediateRefresh=function(){if("0px"!=this.container.style.width){this.clear();var a=this.editorUi,b=a.editor.graph,f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.color="rgb(112, 112, 112)";f.style.textAlign="left";f.style.cursor="default";var d=document.createElement("div");d.className="geFormatSection";d.style.textAlign="center";d.style.fontWeight="bold";d.style.paddingTop="8px";d.style.fontSize="13px";d.style.borderWidth="0px 0px 1px 1px";d.style.borderStyle=
-"solid";d.style.display="inline-block";d.style.height="25px";d.style.overflow="hidden";d.style.width="100%";this.container.appendChild(f);mxEvent.addListener(d,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(C){C.preventDefault()}));var g=a.getSelectionState(),e=g.containsLabel,k=null,n=null,u=mxUtils.bind(this,function(C,G,J,D){var N=mxUtils.bind(this,function(Q){k!=C&&(e?this.labelIndex=J:b.isSelectionEmpty()?this.diagramIndex=J:this.currentIndex=J,null!=k&&(k.style.backgroundColor=
-Format.inactiveTabBackgroundColor,k.style.borderBottomWidth="1px"),k=C,k.style.backgroundColor="",k.style.borderBottomWidth="0px",n!=G&&(null!=n&&(n.style.display="none"),n=G,n.style.display=""))});mxEvent.addListener(C,"click",N);mxEvent.addListener(C,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(Q){Q.preventDefault()}));(D&&null==k||J==(e?this.labelIndex:b.isSelectionEmpty()?this.diagramIndex:this.currentIndex))&&N()}),m=0;if(b.isSelectionEmpty()){mxUtils.write(d,mxResources.get("diagram"));
-d.style.borderLeftWidth="0px";f.appendChild(d);g=f.cloneNode(!1);this.panels.push(new DiagramFormatPanel(this,a,g));this.container.appendChild(g);if(null!=Editor.styles){g.style.display="none";d.style.width=this.showCloseButton?"106px":"50%";d.style.cursor="pointer";d.style.backgroundColor=Format.inactiveTabBackgroundColor;var r=d.cloneNode(!1);r.style.borderLeftWidth="1px";r.style.borderRightWidth="1px";r.style.backgroundColor=Format.inactiveTabBackgroundColor;u(d,g,m++);var x=f.cloneNode(!1);x.style.display=
-"none";mxUtils.write(r,mxResources.get("style"));f.appendChild(r);this.panels.push(new DiagramStylePanel(this,a,x));this.container.appendChild(x);u(r,x,m++)}this.showCloseButton&&(r=d.cloneNode(!1),r.style.borderLeftWidth="1px",r.style.borderRightWidth="1px",r.style.borderBottomWidth="1px",r.style.backgroundColor=Format.inactiveTabBackgroundColor,r.style.position="absolute",r.style.right="0px",r.style.top="0px",r.style.width="25px",u=document.createElement("img"),u.setAttribute("border","0"),u.setAttribute("src",
-Dialog.prototype.closeImage),u.setAttribute("title",mxResources.get("hide")),u.style.position="absolute",u.style.display="block",u.style.right="0px",u.style.top="8px",u.style.cursor="pointer",u.style.marginTop="1px",u.style.marginRight="6px",u.style.border="1px solid transparent",u.style.padding="1px",u.style.opacity=.5,r.appendChild(u),mxEvent.addListener(u,"click",function(){a.actions.get("formatPanel").funct()}),f.appendChild(r))}else if(b.isEditing())mxUtils.write(d,mxResources.get("text")),f.appendChild(d),
-this.panels.push(new TextFormatPanel(this,a,f));else{d.style.backgroundColor=Format.inactiveTabBackgroundColor;d.style.borderLeftWidth="1px";d.style.cursor="pointer";d.style.width=e||0==g.cells.length?"50%":"33.3%";r=d.cloneNode(!1);var B=r.cloneNode(!1);r.style.backgroundColor=Format.inactiveTabBackgroundColor;B.style.backgroundColor=Format.inactiveTabBackgroundColor;e?r.style.borderLeftWidth="0px":(d.style.borderLeftWidth="0px",mxUtils.write(d,mxResources.get("style")),f.appendChild(d),x=f.cloneNode(!1),
-x.style.display="none",this.panels.push(new StyleFormatPanel(this,a,x)),this.container.appendChild(x),u(d,x,m++));mxUtils.write(r,mxResources.get("text"));f.appendChild(r);d=f.cloneNode(!1);d.style.display="none";this.panels.push(new TextFormatPanel(this,a,d));this.container.appendChild(d);mxUtils.write(B,mxResources.get("arrange"));f.appendChild(B);f=f.cloneNode(!1);f.style.display="none";this.panels.push(new ArrangePanel(this,a,f));this.container.appendChild(f);0<g.cells.length?u(r,d,m++):r.style.display=
+Format.prototype.immediateRefresh=function(){if("0px"!=this.container.style.width){this.clear();var a=this.editorUi,b=a.editor.graph,f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.color="rgb(112, 112, 112)";f.style.textAlign="left";f.style.cursor="default";var e=document.createElement("div");e.className="geFormatSection";e.style.textAlign="center";e.style.fontWeight="bold";e.style.paddingTop="8px";e.style.fontSize="13px";e.style.borderWidth="0px 0px 1px 1px";e.style.borderStyle=
+"solid";e.style.display="inline-block";e.style.height="25px";e.style.overflow="hidden";e.style.width="100%";this.container.appendChild(f);mxEvent.addListener(e,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(C){C.preventDefault()}));var g=a.getSelectionState(),d=g.containsLabel,k=null,n=null,u=mxUtils.bind(this,function(C,F,J,D){var N=mxUtils.bind(this,function(S){k!=C&&(d?this.labelIndex=J:b.isSelectionEmpty()?this.diagramIndex=J:this.currentIndex=J,null!=k&&(k.style.backgroundColor=
+Format.inactiveTabBackgroundColor,k.style.borderBottomWidth="1px"),k=C,k.style.backgroundColor="",k.style.borderBottomWidth="0px",n!=F&&(null!=n&&(n.style.display="none"),n=F,n.style.display=""))});mxEvent.addListener(C,"click",N);mxEvent.addListener(C,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(S){S.preventDefault()}));(D&&null==k||J==(d?this.labelIndex:b.isSelectionEmpty()?this.diagramIndex:this.currentIndex))&&N()}),m=0;if(b.isSelectionEmpty()){mxUtils.write(e,mxResources.get("diagram"));
+e.style.borderLeftWidth="0px";f.appendChild(e);g=f.cloneNode(!1);this.panels.push(new DiagramFormatPanel(this,a,g));this.container.appendChild(g);if(null!=Editor.styles){g.style.display="none";e.style.width=this.showCloseButton?"106px":"50%";e.style.cursor="pointer";e.style.backgroundColor=Format.inactiveTabBackgroundColor;var r=e.cloneNode(!1);r.style.borderLeftWidth="1px";r.style.borderRightWidth="1px";r.style.backgroundColor=Format.inactiveTabBackgroundColor;u(e,g,m++);var x=f.cloneNode(!1);x.style.display=
+"none";mxUtils.write(r,mxResources.get("style"));f.appendChild(r);this.panels.push(new DiagramStylePanel(this,a,x));this.container.appendChild(x);u(r,x,m++)}this.showCloseButton&&(r=e.cloneNode(!1),r.style.borderLeftWidth="1px",r.style.borderRightWidth="1px",r.style.borderBottomWidth="1px",r.style.backgroundColor=Format.inactiveTabBackgroundColor,r.style.position="absolute",r.style.right="0px",r.style.top="0px",r.style.width="25px",u=document.createElement("img"),u.setAttribute("border","0"),u.setAttribute("src",
+Dialog.prototype.closeImage),u.setAttribute("title",mxResources.get("hide")),u.style.position="absolute",u.style.display="block",u.style.right="0px",u.style.top="8px",u.style.cursor="pointer",u.style.marginTop="1px",u.style.marginRight="6px",u.style.border="1px solid transparent",u.style.padding="1px",u.style.opacity=.5,r.appendChild(u),mxEvent.addListener(u,"click",function(){a.actions.get("formatPanel").funct()}),f.appendChild(r))}else if(b.isEditing())mxUtils.write(e,mxResources.get("text")),f.appendChild(e),
+this.panels.push(new TextFormatPanel(this,a,f));else{e.style.backgroundColor=Format.inactiveTabBackgroundColor;e.style.borderLeftWidth="1px";e.style.cursor="pointer";e.style.width=d||0==g.cells.length?"50%":"33.3%";r=e.cloneNode(!1);var B=r.cloneNode(!1);r.style.backgroundColor=Format.inactiveTabBackgroundColor;B.style.backgroundColor=Format.inactiveTabBackgroundColor;d?r.style.borderLeftWidth="0px":(e.style.borderLeftWidth="0px",mxUtils.write(e,mxResources.get("style")),f.appendChild(e),x=f.cloneNode(!1),
+x.style.display="none",this.panels.push(new StyleFormatPanel(this,a,x)),this.container.appendChild(x),u(e,x,m++));mxUtils.write(r,mxResources.get("text"));f.appendChild(r);e=f.cloneNode(!1);e.style.display="none";this.panels.push(new TextFormatPanel(this,a,e));this.container.appendChild(e);mxUtils.write(B,mxResources.get("arrange"));f.appendChild(B);f=f.cloneNode(!1);f.style.display="none";this.panels.push(new ArrangePanel(this,a,f));this.container.appendChild(f);0<g.cells.length?u(r,e,m++):r.style.display=
"none";u(B,f,m++,!0)}}};BaseFormatPanel=function(a,b,f){this.format=a;this.editorUi=b;this.container=f;this.listeners=[]};BaseFormatPanel.prototype.buttonBackgroundColor="white";
-BaseFormatPanel.prototype.installInputHandler=function(a,b,f,d,g,e,k,n){e=null!=e?e:"";n=null!=n?n:!1;var u=this.editorUi,m=u.editor.graph;d=null!=d?d:1;g=null!=g?g:999;var r=null,x=!1,B=mxUtils.bind(this,function(C){var G=n?parseFloat(a.value):parseInt(a.value);isNaN(G)||b!=mxConstants.STYLE_ROTATION||(G=mxUtils.mod(Math.round(100*G),36E3)/100);G=Math.min(g,Math.max(d,isNaN(G)?f:G));if(m.cellEditor.isContentEditing()&&k)x||(x=!0,null!=r&&(m.cellEditor.restoreSelection(r),r=null),k(G),a.value=G+e,
-x=!1);else if(G!=mxUtils.getValue(u.getSelectionState().style,b,f)){m.isEditing()&&m.stopEditing(!0);m.getModel().beginUpdate();try{var J=u.getSelectionState().cells;m.setCellStyles(b,G,J);b==mxConstants.STYLE_FONTSIZE&&m.updateLabelElements(J,function(N){N.style.fontSize=G+"px";N.removeAttribute("size")});for(var D=0;D<J.length;D++)0==m.model.getChildCount(J[D])&&m.autoSizeCell(J[D],!1);u.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[G],"cells",J))}finally{m.getModel().endUpdate()}}a.value=
-G+e;mxEvent.consume(C)});k&&m.cellEditor.isContentEditing()&&(mxEvent.addListener(a,"mousedown",function(){document.activeElement==m.cellEditor.textarea&&(r=m.cellEditor.saveSelection())}),mxEvent.addListener(a,"touchstart",function(){document.activeElement==m.cellEditor.textarea&&(r=m.cellEditor.saveSelection())}));mxEvent.addListener(a,"change",B);mxEvent.addListener(a,"blur",B);return B};
+BaseFormatPanel.prototype.installInputHandler=function(a,b,f,e,g,d,k,n){d=null!=d?d:"";n=null!=n?n:!1;var u=this.editorUi,m=u.editor.graph;e=null!=e?e:1;g=null!=g?g:999;var r=null,x=!1,B=mxUtils.bind(this,function(C){var F=n?parseFloat(a.value):parseInt(a.value);isNaN(F)||b!=mxConstants.STYLE_ROTATION||(F=mxUtils.mod(Math.round(100*F),36E3)/100);F=Math.min(g,Math.max(e,isNaN(F)?f:F));if(m.cellEditor.isContentEditing()&&k)x||(x=!0,null!=r&&(m.cellEditor.restoreSelection(r),r=null),k(F),a.value=F+d,
+x=!1);else if(F!=mxUtils.getValue(u.getSelectionState().style,b,f)){m.isEditing()&&m.stopEditing(!0);m.getModel().beginUpdate();try{var J=u.getSelectionState().cells;m.setCellStyles(b,F,J);b==mxConstants.STYLE_FONTSIZE&&m.updateLabelElements(J,function(N){N.style.fontSize=F+"px";N.removeAttribute("size")});for(var D=0;D<J.length;D++)0==m.model.getChildCount(J[D])&&m.autoSizeCell(J[D],!1);u.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[F],"cells",J))}finally{m.getModel().endUpdate()}}a.value=
+F+d;mxEvent.consume(C)});k&&m.cellEditor.isContentEditing()&&(mxEvent.addListener(a,"mousedown",function(){document.activeElement==m.cellEditor.textarea&&(r=m.cellEditor.saveSelection())}),mxEvent.addListener(a,"touchstart",function(){document.activeElement==m.cellEditor.textarea&&(r=m.cellEditor.saveSelection())}));mxEvent.addListener(a,"change",B);mxEvent.addListener(a,"blur",B);return B};
BaseFormatPanel.prototype.createPanel=function(){var a=document.createElement("div");a.className="geFormatSection";a.style.padding="12px 0px 12px 14px";return a};BaseFormatPanel.prototype.createTitle=function(a){var b=document.createElement("div");b.style.padding="0px 0px 6px 0px";b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.width="200px";b.style.fontWeight="bold";mxUtils.write(b,a);return b};
-BaseFormatPanel.prototype.addAction=function(a,b){var f=this.editorUi.actions.get(b);b=null;null!=f&&f.isEnabled()&&(b=mxUtils.button(f.label,function(d){f.funct(d,d)}),b.setAttribute("title",f.label+(null!=f.shortcut?" ("+f.shortcut+")":"")),b.style.marginBottom="2px",b.style.width="210px",a.appendChild(b),result=!0);return b};
-BaseFormatPanel.prototype.addActions=function(a,b){for(var f=null,d=null,g=0,e=0;e<b.length;e++){var k=this.addAction(a,b[e]);null!=k&&(g++,0==mxUtils.mod(g,2)&&(d.style.marginRight="2px",d.style.width="104px",k.style.width="104px",f.parentNode.removeChild(f)),f=mxUtils.br(a),d=k)}return g};
-BaseFormatPanel.prototype.createStepper=function(a,b,f,d,g,e,k){f=null!=f?f:1;d=null!=d?d:9;var n=10*f,u=document.createElement("div");mxUtils.setPrefixedStyle(u.style,"borderRadius","3px");u.style.border="1px solid rgb(192, 192, 192)";u.style.position="absolute";var m=document.createElement("div");m.style.borderBottom="1px solid rgb(192, 192, 192)";m.style.position="relative";m.style.height=d+"px";m.style.width="10px";m.className="geBtnUp";u.appendChild(m);var r=m.cloneNode(!1);r.style.border="none";
-r.style.height=d+"px";r.className="geBtnDown";u.appendChild(r);mxEvent.addGestureListeners(r,function(B){mxEvent.consume(B)},null,function(B){""==a.value&&(a.value=e||"2");var C=k?parseFloat(a.value):parseInt(a.value);isNaN(C)||(a.value=C-(mxEvent.isShiftDown(B)?n:f),null!=b&&b(B));mxEvent.consume(B)});mxEvent.addGestureListeners(m,function(B){mxEvent.consume(B)},null,function(B){""==a.value&&(a.value=e||"0");var C=k?parseFloat(a.value):parseInt(a.value);isNaN(C)||(a.value=C+(mxEvent.isShiftDown(B)?
+BaseFormatPanel.prototype.addAction=function(a,b){var f=this.editorUi.actions.get(b);b=null;null!=f&&f.isEnabled()&&(b=mxUtils.button(f.label,function(e){f.funct(e,e)}),b.setAttribute("title",f.label+(null!=f.shortcut?" ("+f.shortcut+")":"")),b.style.marginBottom="2px",b.style.width="210px",a.appendChild(b),result=!0);return b};
+BaseFormatPanel.prototype.addActions=function(a,b){for(var f=null,e=null,g=0,d=0;d<b.length;d++){var k=this.addAction(a,b[d]);null!=k&&(g++,0==mxUtils.mod(g,2)&&(e.style.marginRight="2px",e.style.width="104px",k.style.width="104px",f.parentNode.removeChild(f)),f=mxUtils.br(a),e=k)}return g};
+BaseFormatPanel.prototype.createStepper=function(a,b,f,e,g,d,k){f=null!=f?f:1;e=null!=e?e:9;var n=10*f,u=document.createElement("div");mxUtils.setPrefixedStyle(u.style,"borderRadius","3px");u.style.border="1px solid rgb(192, 192, 192)";u.style.position="absolute";var m=document.createElement("div");m.style.borderBottom="1px solid rgb(192, 192, 192)";m.style.position="relative";m.style.height=e+"px";m.style.width="10px";m.className="geBtnUp";u.appendChild(m);var r=m.cloneNode(!1);r.style.border="none";
+r.style.height=e+"px";r.className="geBtnDown";u.appendChild(r);mxEvent.addGestureListeners(r,function(B){mxEvent.consume(B)},null,function(B){""==a.value&&(a.value=d||"2");var C=k?parseFloat(a.value):parseInt(a.value);isNaN(C)||(a.value=C-(mxEvent.isShiftDown(B)?n:f),null!=b&&b(B));mxEvent.consume(B)});mxEvent.addGestureListeners(m,function(B){mxEvent.consume(B)},null,function(B){""==a.value&&(a.value=d||"0");var C=k?parseFloat(a.value):parseInt(a.value);isNaN(C)||(a.value=C+(mxEvent.isShiftDown(B)?
n:f),null!=b&&b(B));mxEvent.consume(B)});if(g){var x=null;mxEvent.addGestureListeners(u,function(B){mxEvent.consume(B)},null,function(B){if(null!=x){try{x.select()}catch(C){}x=null;mxEvent.consume(B)}})}else mxEvent.addListener(u,"click",function(B){mxEvent.consume(B)});return u};
-BaseFormatPanel.prototype.createOption=function(a,b,f,d,g){var e=document.createElement("div");e.style.padding="3px 0px 3px 0px";e.style.whiteSpace="nowrap";e.style.textOverflow="ellipsis";e.style.overflow="hidden";e.style.width="200px";e.style.height="18px";var k=document.createElement("input");k.setAttribute("type","checkbox");k.style.margin="1px 6px 0px 0px";k.style.verticalAlign="top";e.appendChild(k);var n=document.createElement("span");n.style.verticalAlign="top";n.style.userSelect="none";mxUtils.write(n,
-a);e.appendChild(n);var u=!1,m=b(),r=function(x,B){u||(u=!0,x?(k.setAttribute("checked","checked"),k.defaultChecked=!0,k.checked=!0):(k.removeAttribute("checked"),k.defaultChecked=!1,k.checked=!1),m!=x&&(m=x,b()!=m&&f(m,B)),u=!1)};mxEvent.addListener(e,"click",function(x){if("disabled"!=k.getAttribute("disabled")){var B=mxEvent.getSource(x);if(B==e||B==n)k.checked=!k.checked;r(k.checked,x)}});r(m);null!=d&&(d.install(r),this.listeners.push(d));null!=g&&g(e);return e};
-BaseFormatPanel.prototype.createCellOption=function(a,b,f,d,g,e,k,n,u){var m=this.editorUi,r=m.editor.graph;d=null!=d?"null"==d?null:d:1;g=null!=g?"null"==g?null:g:0;var x=null!=u?r.getCommonStyle(u):m.getSelectionState().style;return this.createOption(a,function(){return mxUtils.getValue(x,b,f)!=g},function(B){n&&r.stopEditing();if(null!=k)k.funct();else{r.getModel().beginUpdate();try{var C=null!=u?u:m.getSelectionState().cells;B=B?d:g;r.setCellStyles(b,B,C);null!=e&&e(C,B);m.fireEvent(new mxEventObject("styleChanged",
+BaseFormatPanel.prototype.createOption=function(a,b,f,e,g){var d=document.createElement("div");d.style.padding="3px 0px 3px 0px";d.style.whiteSpace="nowrap";d.style.textOverflow="ellipsis";d.style.overflow="hidden";d.style.width="200px";d.style.height="18px";var k=document.createElement("input");k.setAttribute("type","checkbox");k.style.margin="1px 6px 0px 0px";k.style.verticalAlign="top";d.appendChild(k);var n=document.createElement("span");n.style.verticalAlign="top";n.style.userSelect="none";mxUtils.write(n,
+a);d.appendChild(n);var u=!1,m=b(),r=function(x,B){u||(u=!0,x?(k.setAttribute("checked","checked"),k.defaultChecked=!0,k.checked=!0):(k.removeAttribute("checked"),k.defaultChecked=!1,k.checked=!1),m!=x&&(m=x,b()!=m&&f(m,B)),u=!1)};mxEvent.addListener(d,"click",function(x){if("disabled"!=k.getAttribute("disabled")){var B=mxEvent.getSource(x);if(B==d||B==n)k.checked=!k.checked;r(k.checked,x)}});r(m);null!=e&&(e.install(r),this.listeners.push(e));null!=g&&g(d);return d};
+BaseFormatPanel.prototype.createCellOption=function(a,b,f,e,g,d,k,n,u){var m=this.editorUi,r=m.editor.graph;e=null!=e?"null"==e?null:e:1;g=null!=g?"null"==g?null:g:0;var x=null!=u?r.getCommonStyle(u):m.getSelectionState().style;return this.createOption(a,function(){return mxUtils.getValue(x,b,f)!=g},function(B){n&&r.stopEditing();if(null!=k)k.funct();else{r.getModel().beginUpdate();try{var C=null!=u?u:m.getSelectionState().cells;B=B?e:g;r.setCellStyles(b,B,C);null!=d&&d(C,B);m.fireEvent(new mxEventObject("styleChanged",
"keys",[b],"values",[B],"cells",C))}finally{r.getModel().endUpdate()}}},{install:function(B){this.listener=function(){B(mxUtils.getValue(x,b,f)!=g)};r.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){r.getModel().removeListener(this.listener)}})};
-BaseFormatPanel.prototype.createColorOption=function(a,b,f,d,g,e,k,n){var u=document.createElement("div");u.style.padding="3px 0px 3px 0px";u.style.whiteSpace="nowrap";u.style.overflow="hidden";u.style.width="200px";u.style.height="18px";var m=document.createElement("input");m.setAttribute("type","checkbox");m.style.margin="1px 6px 0px 0px";m.style.verticalAlign="top";k||u.appendChild(m);var r=document.createElement("span");r.style.verticalAlign="top";mxUtils.write(r,a);u.appendChild(r);var x=b(),
-B=!1,C=null,G=function(D,N,Q){if(!B){var R="null"==d?null:d;B=!0;D=/(^#?[a-zA-Z0-9]*$)/.test(D)?D:R;R=null!=D&&D!=mxConstants.NONE?D:R;var P=document.createElement("div");P.style.width="36px";P.style.height="12px";P.style.margin="3px";P.style.border="1px solid black";P.style.backgroundColor="default"==R?n:R;C.innerText="";C.appendChild(P);null!=D&&D!=mxConstants.NONE&&1<D.length&&"string"===typeof D&&(R="#"==D.charAt(0)?D.substring(1).toUpperCase():D,R=ColorDialog.prototype.colorNames[R],C.setAttribute("title",
-null!=R?R+" (Shift+Click for Color Dropper)":"Shift+Click for Color Dropper"));null!=D&&D!=mxConstants.NONE?(m.setAttribute("checked","checked"),m.defaultChecked=!0,m.checked=!0):(m.removeAttribute("checked"),m.defaultChecked=!1,m.checked=!1);C.style.display=m.checked||k?"":"none";null!=e&&e("null"==D?null:D);x=D;N||(Q||k||b()!=x)&&f("null"==x?null:x,x);B=!1}},J=document.createElement("input");J.setAttribute("type","color");J.style.visibility="hidden";J.style.width="0px";J.style.height="0px";J.style.border=
-"none";u.appendChild(J);C=mxUtils.button("",mxUtils.bind(this,function(D){var N=x;"default"==N&&(N=n);!mxEvent.isShiftDown(D)||mxClient.IS_IE||mxClient.IS_IE11?this.editorUi.pickColor(N,function(Q){G(Q,null,!0)},n):(J.value=N,J.click(),mxEvent.addListener(J,"input",function(){G(J.value,null,!0)}));mxEvent.consume(D)}));C.style.position="absolute";C.style.marginTop="-3px";C.style.left="178px";C.style.height="22px";C.className="geColorBtn";C.style.display=m.checked||k?"":"none";u.appendChild(C);a=null!=
-x&&"string"===typeof x&&"#"==x.charAt(0)?x.substring(1).toUpperCase():x;a=ColorDialog.prototype.colorNames[a];C.setAttribute("title",null!=a?a+" (Shift+Click for Color Dropper)":"Shift+Click for Color Dropper");mxEvent.addListener(u,"click",function(D){D=mxEvent.getSource(D);if(D==m||"INPUT"!=D.nodeName)D!=m&&(m.checked=!m.checked),m.checked||null==x||x==mxConstants.NONE||d==mxConstants.NONE||(d=x),G(m.checked?d:mxConstants.NONE)});G(x,!0);null!=g&&(g.install(G),this.listeners.push(g));return u};
-BaseFormatPanel.prototype.createCellColorOption=function(a,b,f,d,g,e){var k=this.editorUi,n=k.editor.graph;return this.createColorOption(a,function(){var u=n.view.getState(k.getSelectionState().cells[0]);return null!=u?mxUtils.getValue(u.style,b,null):null},function(u,m){n.getModel().beginUpdate();try{var r=k.getSelectionState().cells;n.setCellStyles(b,u,r);null!=g&&g(u);k.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[u],"cells",r))}finally{n.getModel().endUpdate()}},f||mxConstants.NONE,
-{install:function(u){this.listener=function(){var m=n.view.getState(k.getSelectionState().cells[0]);null!=m&&u(mxUtils.getValue(m.style,b,null),!0)};n.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){n.getModel().removeListener(this.listener)}},d,null,e)};
-BaseFormatPanel.prototype.addArrow=function(a,b,f){b=null!=b?b:10;var d=document.createElement("div");d.style.borderLeft="1px solid #a0a0a0";d.style.display="inline-block";d.style.height=b+"px";d.style.paddingRight="4px";d.style.padding="6px";f?(d.style.verticalAlign="top",d.style.marginLeft="1px"):(b=10-b,2==b?d.style.paddingTop="6px":0<b?d.style.paddingTop=6-b+"px":d.style.marginTop="-2px");b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("valign","middle");b.setAttribute("src",
-Toolbar.prototype.dropDownImage);d.appendChild(b);b=d.getElementsByTagName("img")[0];b.style.position="relative";b.style.left="1px";b.style.top=mxClient.IS_FF?"0px":"-4px";mxUtils.setOpacity(d,70);b=a.getElementsByTagName("div")[0];null!=b&&(b.style.paddingRight="6px",b.style.marginLeft="4px",b.style.marginTop="-1px",b.style.display="inline-block",mxUtils.setOpacity(b,60));mxUtils.setOpacity(a,100);a.style.border="1px solid #a0a0a0";a.style.backgroundColor=this.buttonBackgroundColor;a.style.backgroundImage=
-"none";a.style.width="auto";a.className+=" geColorBtn";mxUtils.setPrefixedStyle(a.style,"borderRadius","3px");a.appendChild(d);return b};
-BaseFormatPanel.prototype.addUnitInput=function(a,b,f,d,g,e,k,n,u){k=null!=k?k:0;b=document.createElement("input");b.style.position="absolute";b.style.textAlign="right";b.style.marginTop="-2px";b.style.left=228-f-d+"px";b.style.width=d+"px";b.style.height="21px";b.style.border="1px solid rgb(160, 160, 160)";b.style.borderRadius="4px";b.style.boxSizing="border-box";a.appendChild(b);d=this.createStepper(b,g,e,null,n,null,u);d.style.marginTop=k-2+"px";d.style.left=228-f+"px";a.appendChild(d);return b};
-BaseFormatPanel.prototype.createRelativeOption=function(a,b,f,d,g){f=null!=f?f:52;var e=this.editorUi,k=e.editor.graph,n=this.createPanel();n.style.paddingTop="10px";n.style.paddingBottom="10px";mxUtils.write(n,a);n.style.fontWeight="bold";a=mxUtils.bind(this,function(r){if(null!=d)d(u);else{var x=parseInt(u.value);x=Math.min(100,Math.max(0,isNaN(x)?100:x));var B=k.view.getState(e.getSelectionState().cells[0]);null!=B&&x!=mxUtils.getValue(B.style,b,100)&&(100==x&&(x=null),B=e.getSelectionState().cells,
-k.setCellStyles(b,x,B),this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[x],"cells",B)));u.value=(null!=x?x:"100")+" %"}mxEvent.consume(r)});var u=this.addUnitInput(n,"%",16,f,a,10,-15,null!=d);if(null!=b){var m=mxUtils.bind(this,function(r,x,B){if(B||u!=document.activeElement)r=e.getSelectionState(),r=parseInt(mxUtils.getValue(r.style,b,100)),u.value=isNaN(r)?"":r+" %"});mxEvent.addListener(u,"keydown",function(r){13==r.keyCode?(k.container.focus(),mxEvent.consume(r)):
+BaseFormatPanel.prototype.createColorOption=function(a,b,f,e,g,d,k,n){var u=document.createElement("div");u.style.padding="3px 0px 3px 0px";u.style.whiteSpace="nowrap";u.style.overflow="hidden";u.style.width="200px";u.style.height="18px";var m=document.createElement("input");m.setAttribute("type","checkbox");m.style.margin="1px 6px 0px 0px";m.style.verticalAlign="top";k||u.appendChild(m);var r=document.createElement("span");r.style.verticalAlign="top";mxUtils.write(r,a);u.appendChild(r);var x=b(),
+B=!1,C=null,F=function(D,N,S){if(!B){var T="null"==e?null:e;B=!0;D=/(^#?[a-zA-Z0-9]*$)/.test(D)?D:T;T=null!=D&&D!=mxConstants.NONE?D:T;var P=document.createElement("div");P.style.width="36px";P.style.height="12px";P.style.margin="3px";P.style.border="1px solid black";P.style.backgroundColor="default"==T?n:T;C.innerText="";C.appendChild(P);null!=D&&D!=mxConstants.NONE&&1<D.length&&"string"===typeof D&&(T="#"==D.charAt(0)?D.substring(1).toUpperCase():D,T=ColorDialog.prototype.colorNames[T],C.setAttribute("title",
+null!=T?T+" (Shift+Click for Color Dropper)":"Shift+Click for Color Dropper"));null!=D&&D!=mxConstants.NONE?(m.setAttribute("checked","checked"),m.defaultChecked=!0,m.checked=!0):(m.removeAttribute("checked"),m.defaultChecked=!1,m.checked=!1);C.style.display=m.checked||k?"":"none";null!=d&&d("null"==D?null:D);x=D;N||(S||k||b()!=x)&&f("null"==x?null:x,x);B=!1}},J=document.createElement("input");J.setAttribute("type","color");J.style.visibility="hidden";J.style.width="0px";J.style.height="0px";J.style.border=
+"none";u.appendChild(J);C=mxUtils.button("",mxUtils.bind(this,function(D){var N=x;"default"==N&&(N=n);!mxEvent.isShiftDown(D)||mxClient.IS_IE||mxClient.IS_IE11?this.editorUi.pickColor(N,function(S){F(S,null,!0)},n):(J.value=N,J.click(),mxEvent.addListener(J,"input",function(){F(J.value,null,!0)}));mxEvent.consume(D)}));C.style.position="absolute";C.style.marginTop="-3px";C.style.left="178px";C.style.height="22px";C.className="geColorBtn";C.style.display=m.checked||k?"":"none";u.appendChild(C);a=null!=
+x&&"string"===typeof x&&"#"==x.charAt(0)?x.substring(1).toUpperCase():x;a=ColorDialog.prototype.colorNames[a];C.setAttribute("title",null!=a?a+" (Shift+Click for Color Dropper)":"Shift+Click for Color Dropper");mxEvent.addListener(u,"click",function(D){D=mxEvent.getSource(D);if(D==m||"INPUT"!=D.nodeName)D!=m&&(m.checked=!m.checked),m.checked||null==x||x==mxConstants.NONE||e==mxConstants.NONE||(e=x),F(m.checked?e:mxConstants.NONE)});F(x,!0);null!=g&&(g.install(F),this.listeners.push(g));return u};
+BaseFormatPanel.prototype.createCellColorOption=function(a,b,f,e,g,d){var k=this.editorUi,n=k.editor.graph;return this.createColorOption(a,function(){var u=n.view.getState(k.getSelectionState().cells[0]);return null!=u?mxUtils.getValue(u.style,b,null):null},function(u,m){n.getModel().beginUpdate();try{var r=k.getSelectionState().cells;n.setCellStyles(b,u,r);null!=g&&g(u);k.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[u],"cells",r))}finally{n.getModel().endUpdate()}},f||mxConstants.NONE,
+{install:function(u){this.listener=function(){var m=n.view.getState(k.getSelectionState().cells[0]);null!=m&&u(mxUtils.getValue(m.style,b,null),!0)};n.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){n.getModel().removeListener(this.listener)}},e,null,d)};
+BaseFormatPanel.prototype.addArrow=function(a,b,f){b=null!=b?b:10;var e=document.createElement("div");e.style.borderLeft="1px solid #a0a0a0";e.style.display="inline-block";e.style.height=b+"px";e.style.paddingRight="4px";e.style.padding="6px";f?(e.style.verticalAlign="top",e.style.marginLeft="1px"):(b=10-b,2==b?e.style.paddingTop="6px":0<b?e.style.paddingTop=6-b+"px":e.style.marginTop="-2px");b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("valign","middle");b.setAttribute("src",
+Toolbar.prototype.dropDownImage);e.appendChild(b);b=e.getElementsByTagName("img")[0];b.style.position="relative";b.style.left="1px";b.style.top=mxClient.IS_FF?"0px":"-4px";mxUtils.setOpacity(e,70);b=a.getElementsByTagName("div")[0];null!=b&&(b.style.paddingRight="6px",b.style.marginLeft="4px",b.style.marginTop="-1px",b.style.display="inline-block",mxUtils.setOpacity(b,60));mxUtils.setOpacity(a,100);a.style.border="1px solid #a0a0a0";a.style.backgroundColor=this.buttonBackgroundColor;a.style.backgroundImage=
+"none";a.style.width="auto";a.className+=" geColorBtn";mxUtils.setPrefixedStyle(a.style,"borderRadius","3px");a.appendChild(e);return b};
+BaseFormatPanel.prototype.addUnitInput=function(a,b,f,e,g,d,k,n,u){k=null!=k?k:0;b=document.createElement("input");b.style.position="absolute";b.style.textAlign="right";b.style.marginTop="-2px";b.style.left=228-f-e+"px";b.style.width=e+"px";b.style.height="21px";b.style.border="1px solid rgb(160, 160, 160)";b.style.borderRadius="4px";b.style.boxSizing="border-box";a.appendChild(b);e=this.createStepper(b,g,d,null,n,null,u);e.style.marginTop=k-2+"px";e.style.left=228-f+"px";a.appendChild(e);return b};
+BaseFormatPanel.prototype.createRelativeOption=function(a,b,f,e,g){f=null!=f?f:52;var d=this.editorUi,k=d.editor.graph,n=this.createPanel();n.style.paddingTop="10px";n.style.paddingBottom="10px";mxUtils.write(n,a);n.style.fontWeight="bold";a=mxUtils.bind(this,function(r){if(null!=e)e(u);else{var x=parseInt(u.value);x=Math.min(100,Math.max(0,isNaN(x)?100:x));var B=k.view.getState(d.getSelectionState().cells[0]);null!=B&&x!=mxUtils.getValue(B.style,b,100)&&(100==x&&(x=null),B=d.getSelectionState().cells,
+k.setCellStyles(b,x,B),this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[x],"cells",B)));u.value=(null!=x?x:"100")+" %"}mxEvent.consume(r)});var u=this.addUnitInput(n,"%",16,f,a,10,-15,null!=e);if(null!=b){var m=mxUtils.bind(this,function(r,x,B){if(B||u!=document.activeElement)r=d.getSelectionState(),r=parseInt(mxUtils.getValue(r.style,b,100)),u.value=isNaN(r)?"":r+" %"});mxEvent.addListener(u,"keydown",function(r){13==r.keyCode?(k.container.focus(),mxEvent.consume(r)):
27==r.keyCode&&(m(null,null,!0),k.container.focus(),mxEvent.consume(r))});k.getModel().addListener(mxEvent.CHANGE,m);this.listeners.push({destroy:function(){k.getModel().removeListener(m)}});m()}mxEvent.addListener(u,"blur",a);mxEvent.addListener(u,"change",a);null!=g&&g(u);return n};
-BaseFormatPanel.prototype.addLabel=function(a,b,f,d){d=null!=d?d:61;var g=document.createElement("div");mxUtils.write(g,b);g.style.position="absolute";g.style.left=240-f-d+"px";g.style.width=d+"px";g.style.marginTop="6px";g.style.textAlign="center";a.appendChild(g)};
+BaseFormatPanel.prototype.addLabel=function(a,b,f,e){e=null!=e?e:61;var g=document.createElement("div");mxUtils.write(g,b);g.style.position="absolute";g.style.left=240-f-e+"px";g.style.width=e+"px";g.style.marginTop="6px";g.style.textAlign="center";a.appendChild(g)};
BaseFormatPanel.prototype.addKeyHandler=function(a,b){mxEvent.addListener(a,"keydown",mxUtils.bind(this,function(f){13==f.keyCode?(this.editorUi.editor.graph.container.focus(),mxEvent.consume(f)):27==f.keyCode&&(null!=b&&b(null,null,!0),this.editorUi.editor.graph.container.focus(),mxEvent.consume(f))}))};
BaseFormatPanel.prototype.styleButtons=function(a){for(var b=0;b<a.length;b++)mxUtils.setPrefixedStyle(a[b].style,"borderRadius","3px"),mxUtils.setOpacity(a[b],100),a[b].style.border="1px solid #a0a0a0",a[b].style.padding="4px",a[b].style.paddingTop="3px",a[b].style.paddingRight="1px",a[b].style.margin="1px",a[b].style.marginRight="2px",a[b].style.width="24px",a[b].style.height="20px",a[b].className+=" geColorBtn"};
BaseFormatPanel.prototype.destroy=function(){if(null!=this.listeners){for(var a=0;a<this.listeners.length;a++)this.listeners[a].destroy();this.listeners=null}};ArrangePanel=function(a,b,f){BaseFormatPanel.call(this,a,b,f);this.init()};mxUtils.extend(ArrangePanel,BaseFormatPanel);
ArrangePanel.prototype.init=function(){var a=this.editorUi.getSelectionState();0<a.cells.length&&(this.container.appendChild(this.addLayerOps(this.createPanel())),this.addGeometry(this.container),this.addEdgeGeometry(this.container),a.containsLabel&&0!=a.edges.length||this.container.appendChild(this.addAngle(this.createPanel())),a.containsLabel||this.container.appendChild(this.addFlip(this.createPanel())),this.container.appendChild(this.addAlign(this.createPanel())),1<a.vertices.length&&!a.cell&&
!a.row&&this.container.appendChild(this.addDistribute(this.createPanel())),this.container.appendChild(this.addTable(this.createPanel())),this.container.appendChild(this.addGroupOps(this.createPanel())));a.containsLabel&&(a=document.createElement("div"),a.style.width="100%",a.style.marginTop="0px",a.style.fontWeight="bold",a.style.padding="10px 0 0 14px",mxUtils.write(a,mxResources.get("style")),this.container.appendChild(a),new StyleFormatPanel(this.format,this.editorUi,this.container))};
-ArrangePanel.prototype.addTable=function(a){var b=this.editorUi,f=b.editor.graph,d=b.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="10px";var g=document.createElement("div");g.style.marginTop="0px";g.style.marginBottom="6px";g.style.fontWeight="bold";mxUtils.write(g,mxResources.get("table"));a.appendChild(g);g=document.createElement("div");g.style.position="relative";g.style.paddingLeft="0px";g.style.borderWidth="0px";g.style.width="220px";g.className="geToolbarContainer";var e=
-d.vertices[0];1<f.getSelectionCount()&&(f.isTableCell(e)&&(e=f.model.getParent(e)),f.isTableRow(e)&&(e=f.model.getParent(e)));var k=d.table||d.row||d.cell,n=f.isStack(e)||f.isStackChild(e),u=k;n&&(k="0"==(f.isStack(e)?d.style:f.getCellStyle(f.model.getParent(e))).horizontalStack,u=!k);var m=[];u&&(m=m.concat([b.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),mxUtils.bind(this,function(){try{n?f.insertLane(e,!0):f.insertTableColumn(e,!0)}catch(r){b.handleError(r)}}),
-g),b.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{n?f.insertLane(e,!1):f.insertTableColumn(e,!1)}catch(r){b.handleError(r)}}),g),b.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{n?f.deleteLane(e):f.deleteTableColumn(e)}catch(r){b.handleError(r)}}),g)]));k&&(m=m.concat([b.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),mxUtils.bind(this,
-function(){try{n?f.insertLane(e,!0):f.insertTableRow(e,!0)}catch(r){b.handleError(r)}}),g),b.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{n?f.insertLane(e,!1):f.insertTableRow(e,!1)}catch(r){b.handleError(r)}}),g),b.toolbar.addButton("geSprite-deleterow",mxResources.get("deleteRow"),mxUtils.bind(this,function(){try{n?f.deleteLane(e):f.deleteTableRow(e)}catch(r){b.handleError(r)}}),g)]));if(0<m.length){this.styleButtons(m);a.appendChild(g);
-3<m.length&&(m[2].style.marginRight="10px");u=0;if(null!=d.mergeCell)u+=this.addActions(a,["mergeCells"]);else if(1<d.style.colspan||1<d.style.rowspan)u+=this.addActions(a,["unmergeCells"]);0<u&&(g.style.paddingBottom="2px")}else a.style.display="none";return a};ArrangePanel.prototype.addLayerOps=function(a){this.addActions(a,["toFront","toBack"]);this.addActions(a,["bringForward","sendBackward"]);return a};
-ArrangePanel.prototype.addGroupOps=function(a){var b=this.editorUi,f=b.editor.graph,d=b.getSelectionState();a.style.paddingTop="8px";a.style.paddingBottom="6px";var g=0;d.cell||d.row||(g+=this.addActions(a,["group","ungroup","copySize","pasteSize"])+this.addActions(a,["removeFromGroup"]));var e=null;1!=d.cells.length||null==d.cells[0].value||isNaN(d.cells[0].value.nodeType)||(e=mxUtils.button(mxResources.get("copyData"),function(n){if(mxEvent.isShiftDown(n)){var u=f.getDataForCells(f.getSelectionCells());
-n=new EmbedDialog(b,JSON.stringify(u,null,2),null,null,function(){console.log(u);b.alert("Written to Console (Dev Tools)")},mxResources.get("copyData"),null,"Console","data.json");b.showDialog(n.container,450,240,!0,!0);n.init()}else b.actions.get("copyData").funct(n)}),e.setAttribute("title",mxResources.get("copyData")+" ("+this.editorUi.actions.get("copyData").shortcut+") Shift+Click to Extract Data"),e.style.marginBottom="2px",e.style.width="210px",a.appendChild(e),g++);var k=null;null!=b.copiedValue&&
-0<d.cells.length&&(k=mxUtils.button(mxResources.get("pasteData"),function(n){b.actions.get("pasteData").funct(n)}),k.setAttribute("title",mxResources.get("pasteData")+" ("+this.editorUi.actions.get("pasteData").shortcut+")"),k.style.marginBottom="2px",k.style.width="210px",a.appendChild(k),g++,null!=e&&(e.style.width="104px",k.style.width="104px",k.style.marginBottom="2px",e.style.marginBottom="2px",e.style.marginRight="2px"));null==e&&null==k||mxUtils.br(a);d=this.addAction(a,"clearWaypoints");null!=
-d&&(mxUtils.br(a),d.setAttribute("title",mxResources.get("clearWaypoints")+" ("+this.editorUi.actions.get("clearWaypoints").shortcut+") Shift+Click to Clear Anchor Points"),g++);1==f.getSelectionCount()&&(g+=this.addActions(a,["editData","editLink"]));0==g&&(a.style.display="none");return a};
-ArrangePanel.prototype.addAlign=function(a){var b=this.editorUi.getSelectionState(),f=this.editorUi.editor.graph;a.style.paddingTop="6px";a.style.paddingBottom="8px";a.appendChild(this.createTitle(mxResources.get("align")));var d=document.createElement("div");d.style.position="relative";d.style.whiteSpace="nowrap";d.style.paddingLeft="0px";d.style.paddingBottom="2px";d.style.borderWidth="0px";d.style.width="220px";d.className="geToolbarContainer";if(1<b.vertices.length){b=this.editorUi.toolbar.addButton("geSprite-alignleft",
-mxResources.get("left"),function(){f.alignCells(mxConstants.ALIGN_LEFT)},d);var g=this.editorUi.toolbar.addButton("geSprite-aligncenter",mxResources.get("center"),function(){f.alignCells(mxConstants.ALIGN_CENTER)},d),e=this.editorUi.toolbar.addButton("geSprite-alignright",mxResources.get("right"),function(){f.alignCells(mxConstants.ALIGN_RIGHT)},d),k=this.editorUi.toolbar.addButton("geSprite-aligntop",mxResources.get("top"),function(){f.alignCells(mxConstants.ALIGN_TOP)},d),n=this.editorUi.toolbar.addButton("geSprite-alignmiddle",
-mxResources.get("middle"),function(){f.alignCells(mxConstants.ALIGN_MIDDLE)},d),u=this.editorUi.toolbar.addButton("geSprite-alignbottom",mxResources.get("bottom"),function(){f.alignCells(mxConstants.ALIGN_BOTTOM)},d);this.styleButtons([b,g,e,k,n,u]);e.style.marginRight="10px"}a.appendChild(d);this.addActions(a,["snapToGrid"]);return a};
-ArrangePanel.prototype.addFlip=function(a){var b=this.editorUi.editor.graph;a.style.paddingTop="6px";a.style.paddingBottom="10px";var f=this.editorUi.getSelectionState(),d=document.createElement("div");d.style.marginTop="2px";d.style.marginBottom="8px";d.style.fontWeight="bold";mxUtils.write(d,mxResources.get("flip"));a.appendChild(d);d=mxUtils.button(mxResources.get("horizontal"),function(g){b.flipCells(f.cells,!0)});d.setAttribute("title",mxResources.get("horizontal"));d.style.width="104px";d.style.marginRight=
-"2px";a.appendChild(d);d=mxUtils.button(mxResources.get("vertical"),function(g){b.flipCells(f.cells,!1)});d.setAttribute("title",mxResources.get("vertical"));d.style.width="104px";a.appendChild(d);return a};
-ArrangePanel.prototype.addDistribute=function(a){var b=this.editorUi.editor.graph;a.style.paddingTop="6px";a.style.paddingBottom="12px";a.appendChild(this.createTitle(mxResources.get("distribute")));var f=mxUtils.button(mxResources.get("horizontal"),function(d){b.distributeCells(!0)});f.setAttribute("title",mxResources.get("horizontal"));f.style.width="104px";f.style.marginRight="2px";a.appendChild(f);f=mxUtils.button(mxResources.get("vertical"),function(d){b.distributeCells(!1)});f.setAttribute("title",
+ArrangePanel.prototype.addTable=function(a){var b=this.editorUi,f=b.editor.graph,e=b.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="10px";var g=document.createElement("div");g.style.marginTop="0px";g.style.marginBottom="6px";g.style.fontWeight="bold";mxUtils.write(g,mxResources.get("table"));a.appendChild(g);g=document.createElement("div");g.style.position="relative";g.style.paddingLeft="0px";g.style.borderWidth="0px";g.style.width="220px";g.className="geToolbarContainer";var d=
+e.vertices[0];1<f.getSelectionCount()&&(f.isTableCell(d)&&(d=f.model.getParent(d)),f.isTableRow(d)&&(d=f.model.getParent(d)));var k=e.table||e.row||e.cell,n=f.isStack(d)||f.isStackChild(d),u=k;n&&(k="0"==(f.isStack(d)?e.style:f.getCellStyle(f.model.getParent(d))).horizontalStack,u=!k);var m=[];u&&(m=m.concat([b.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),mxUtils.bind(this,function(){try{n?f.insertLane(d,!0):f.insertTableColumn(d,!0)}catch(r){b.handleError(r)}}),
+g),b.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{n?f.insertLane(d,!1):f.insertTableColumn(d,!1)}catch(r){b.handleError(r)}}),g),b.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{n?f.deleteLane(d):f.deleteTableColumn(d)}catch(r){b.handleError(r)}}),g)]));k&&(m=m.concat([b.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),mxUtils.bind(this,
+function(){try{n?f.insertLane(d,!0):f.insertTableRow(d,!0)}catch(r){b.handleError(r)}}),g),b.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{n?f.insertLane(d,!1):f.insertTableRow(d,!1)}catch(r){b.handleError(r)}}),g),b.toolbar.addButton("geSprite-deleterow",mxResources.get("deleteRow"),mxUtils.bind(this,function(){try{n?f.deleteLane(d):f.deleteTableRow(d)}catch(r){b.handleError(r)}}),g)]));if(0<m.length){this.styleButtons(m);a.appendChild(g);
+3<m.length&&(m[2].style.marginRight="10px");u=0;if(null!=e.mergeCell)u+=this.addActions(a,["mergeCells"]);else if(1<e.style.colspan||1<e.style.rowspan)u+=this.addActions(a,["unmergeCells"]);0<u&&(g.style.paddingBottom="2px")}else a.style.display="none";return a};ArrangePanel.prototype.addLayerOps=function(a){this.addActions(a,["toFront","toBack"]);this.addActions(a,["bringForward","sendBackward"]);return a};
+ArrangePanel.prototype.addGroupOps=function(a){var b=this.editorUi,f=b.editor.graph,e=b.getSelectionState();a.style.paddingTop="8px";a.style.paddingBottom="6px";var g=0;e.cell||e.row||(g+=this.addActions(a,["group","ungroup","copySize","pasteSize"])+this.addActions(a,["removeFromGroup"]));var d=null;1!=e.cells.length||null==e.cells[0].value||isNaN(e.cells[0].value.nodeType)||(d=mxUtils.button(mxResources.get("copyData"),function(n){if(mxEvent.isShiftDown(n)){var u=f.getDataForCells(f.getSelectionCells());
+n=new EmbedDialog(b,JSON.stringify(u,null,2),null,null,function(){console.log(u);b.alert("Written to Console (Dev Tools)")},mxResources.get("copyData"),null,"Console","data.json");b.showDialog(n.container,450,240,!0,!0);n.init()}else b.actions.get("copyData").funct(n)}),d.setAttribute("title",mxResources.get("copyData")+" ("+this.editorUi.actions.get("copyData").shortcut+") Shift+Click to Extract Data"),d.style.marginBottom="2px",d.style.width="210px",a.appendChild(d),g++);var k=null;null!=b.copiedValue&&
+0<e.cells.length&&(k=mxUtils.button(mxResources.get("pasteData"),function(n){b.actions.get("pasteData").funct(n)}),k.setAttribute("title",mxResources.get("pasteData")+" ("+this.editorUi.actions.get("pasteData").shortcut+")"),k.style.marginBottom="2px",k.style.width="210px",a.appendChild(k),g++,null!=d&&(d.style.width="104px",k.style.width="104px",k.style.marginBottom="2px",d.style.marginBottom="2px",d.style.marginRight="2px"));null==d&&null==k||mxUtils.br(a);e=this.addAction(a,"clearWaypoints");null!=
+e&&(mxUtils.br(a),e.setAttribute("title",mxResources.get("clearWaypoints")+" ("+this.editorUi.actions.get("clearWaypoints").shortcut+") Shift+Click to Clear Anchor Points"),g++);1==f.getSelectionCount()&&(g+=this.addActions(a,["editData","editLink"]));0==g&&(a.style.display="none");return a};
+ArrangePanel.prototype.addAlign=function(a){var b=this.editorUi.getSelectionState(),f=this.editorUi.editor.graph;a.style.paddingTop="6px";a.style.paddingBottom="8px";a.appendChild(this.createTitle(mxResources.get("align")));var e=document.createElement("div");e.style.position="relative";e.style.whiteSpace="nowrap";e.style.paddingLeft="0px";e.style.paddingBottom="2px";e.style.borderWidth="0px";e.style.width="220px";e.className="geToolbarContainer";if(1<b.vertices.length){b=this.editorUi.toolbar.addButton("geSprite-alignleft",
+mxResources.get("left"),function(){f.alignCells(mxConstants.ALIGN_LEFT)},e);var g=this.editorUi.toolbar.addButton("geSprite-aligncenter",mxResources.get("center"),function(){f.alignCells(mxConstants.ALIGN_CENTER)},e),d=this.editorUi.toolbar.addButton("geSprite-alignright",mxResources.get("right"),function(){f.alignCells(mxConstants.ALIGN_RIGHT)},e),k=this.editorUi.toolbar.addButton("geSprite-aligntop",mxResources.get("top"),function(){f.alignCells(mxConstants.ALIGN_TOP)},e),n=this.editorUi.toolbar.addButton("geSprite-alignmiddle",
+mxResources.get("middle"),function(){f.alignCells(mxConstants.ALIGN_MIDDLE)},e),u=this.editorUi.toolbar.addButton("geSprite-alignbottom",mxResources.get("bottom"),function(){f.alignCells(mxConstants.ALIGN_BOTTOM)},e);this.styleButtons([b,g,d,k,n,u]);d.style.marginRight="10px"}a.appendChild(e);this.addActions(a,["snapToGrid"]);return a};
+ArrangePanel.prototype.addFlip=function(a){var b=this.editorUi.editor.graph;a.style.paddingTop="6px";a.style.paddingBottom="10px";var f=this.editorUi.getSelectionState(),e=document.createElement("div");e.style.marginTop="2px";e.style.marginBottom="8px";e.style.fontWeight="bold";mxUtils.write(e,mxResources.get("flip"));a.appendChild(e);e=mxUtils.button(mxResources.get("horizontal"),function(g){b.flipCells(f.cells,!0)});e.setAttribute("title",mxResources.get("horizontal"));e.style.width="104px";e.style.marginRight=
+"2px";a.appendChild(e);e=mxUtils.button(mxResources.get("vertical"),function(g){b.flipCells(f.cells,!1)});e.setAttribute("title",mxResources.get("vertical"));e.style.width="104px";a.appendChild(e);return a};
+ArrangePanel.prototype.addDistribute=function(a){var b=this.editorUi.editor.graph;a.style.paddingTop="6px";a.style.paddingBottom="12px";a.appendChild(this.createTitle(mxResources.get("distribute")));var f=mxUtils.button(mxResources.get("horizontal"),function(e){b.distributeCells(!0)});f.setAttribute("title",mxResources.get("horizontal"));f.style.width="104px";f.style.marginRight="2px";a.appendChild(f);f=mxUtils.button(mxResources.get("vertical"),function(e){b.distributeCells(!1)});f.setAttribute("title",
mxResources.get("vertical"));f.style.width="104px";a.appendChild(f);return a};
-ArrangePanel.prototype.addAngle=function(a){var b=this.editorUi,f=b.editor.graph,d=b.getSelectionState();a.style.paddingBottom="8px";var g=document.createElement("div");g.style.position="absolute";g.style.width="70px";g.style.marginTop="0px";g.style.fontWeight="bold";var e=null,k=null,n=null;!d.rotatable||d.table||d.row||d.cell?a.style.paddingTop="8px":(mxUtils.write(g,mxResources.get("angle")),a.appendChild(g),e=this.addUnitInput(a,"°",16,52,function(){k.apply(this,arguments)}),mxUtils.br(a),a.style.paddingTop=
-"10px");d.containsLabel||(g=mxResources.get("reverse"),0<d.vertices.length&&0<d.edges.length?g=mxResources.get("turn")+" / "+g:0<d.vertices.length&&(g=mxResources.get("turn")),n=mxUtils.button(g,function(m){b.actions.get("turn").funct(m)}),n.setAttribute("title",g+" ("+this.editorUi.actions.get("turn").shortcut+")"),n.style.width="210px",a.appendChild(n),null!=e&&(n.style.marginTop="8px"));if(null!=e){var u=mxUtils.bind(this,function(m,r,x){if(x||document.activeElement!=e)d=b.getSelectionState(),
-m=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_ROTATION,0)),e.value=isNaN(m)?"":m+"°"});k=this.installInputHandler(e,mxConstants.STYLE_ROTATION,0,0,360,"°",null,!0);this.addKeyHandler(e,u);f.getModel().addListener(mxEvent.CHANGE,u);this.listeners.push({destroy:function(){f.getModel().removeListener(u)}});u()}return a};
+ArrangePanel.prototype.addAngle=function(a){var b=this.editorUi,f=b.editor.graph,e=b.getSelectionState();a.style.paddingBottom="8px";var g=document.createElement("div");g.style.position="absolute";g.style.width="70px";g.style.marginTop="0px";g.style.fontWeight="bold";var d=null,k=null,n=null;!e.rotatable||e.table||e.row||e.cell?a.style.paddingTop="8px":(mxUtils.write(g,mxResources.get("angle")),a.appendChild(g),d=this.addUnitInput(a,"°",16,52,function(){k.apply(this,arguments)}),mxUtils.br(a),a.style.paddingTop=
+"10px");e.containsLabel||(g=mxResources.get("reverse"),0<e.vertices.length&&0<e.edges.length?g=mxResources.get("turn")+" / "+g:0<e.vertices.length&&(g=mxResources.get("turn")),n=mxUtils.button(g,function(m){b.actions.get("turn").funct(m)}),n.setAttribute("title",g+" ("+this.editorUi.actions.get("turn").shortcut+")"),n.style.width="210px",a.appendChild(n),null!=d&&(n.style.marginTop="8px"));if(null!=d){var u=mxUtils.bind(this,function(m,r,x){if(x||document.activeElement!=d)e=b.getSelectionState(),
+m=parseFloat(mxUtils.getValue(e.style,mxConstants.STYLE_ROTATION,0)),d.value=isNaN(m)?"":m+"°"});k=this.installInputHandler(d,mxConstants.STYLE_ROTATION,0,0,360,"°",null,!0);this.addKeyHandler(d,u);f.getModel().addListener(mxEvent.CHANGE,u);this.listeners.push({destroy:function(){f.getModel().removeListener(u)}});u()}return a};
BaseFormatPanel.prototype.getUnit=function(){switch(this.editorUi.editor.graph.view.unit){case mxConstants.POINTS:return"pt";case mxConstants.INCHES:return'"';case mxConstants.MILLIMETERS:return"mm";case mxConstants.METERS:return"m"}};BaseFormatPanel.prototype.inUnit=function(a){return this.editorUi.editor.graph.view.formatUnitText(a)};
BaseFormatPanel.prototype.fromUnit=function(a){switch(this.editorUi.editor.graph.view.unit){case mxConstants.POINTS:return a;case mxConstants.INCHES:return a*mxConstants.PIXELS_PER_INCH;case mxConstants.MILLIMETERS:return a*mxConstants.PIXELS_PER_MM;case mxConstants.METERS:return a*mxConstants.PIXELS_PER_MM*1E3}};BaseFormatPanel.prototype.isFloatUnit=function(){return this.editorUi.editor.graph.view.unit!=mxConstants.POINTS};
BaseFormatPanel.prototype.getUnitStep=function(){switch(this.editorUi.editor.graph.view.unit){case mxConstants.POINTS:return 1;case mxConstants.INCHES:return.1;case mxConstants.MILLIMETERS:return.5;case mxConstants.METERS:return.001}};
-ArrangePanel.prototype.addGeometry=function(a){var b=this,f=this.editorUi,d=f.editor.graph,g=d.getModel(),e=f.getSelectionState(),k=this.createPanel();k.style.paddingBottom="8px";var n=document.createElement("div");n.style.position="absolute";n.style.width="50px";n.style.marginTop="0px";n.style.fontWeight="bold";mxUtils.write(n,mxResources.get("size"));k.appendChild(n);var u=this.addUnitInput(k,this.getUnit(),87,52,function(){C.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),
-m=this.addUnitInput(k,this.getUnit(),16,52,function(){G.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),r=document.createElement("div");r.className="geSprite geSprite-fit";r.setAttribute("title",mxResources.get("autosize")+" ("+this.editorUi.actions.get("autosize").shortcut+")");r.style.position="relative";r.style.cursor="pointer";r.style.marginTop="-3px";r.style.border="0px";r.style.left="42px";mxUtils.setOpacity(r,50);mxEvent.addListener(r,"mouseenter",function(){mxUtils.setOpacity(r,
-100)});mxEvent.addListener(r,"mouseleave",function(){mxUtils.setOpacity(r,50)});mxEvent.addListener(r,"click",function(){f.actions.get("autosize").funct()});k.appendChild(r);e.row?(u.style.visibility="hidden",u.nextSibling.style.visibility="hidden"):this.addLabel(k,mxResources.get("width"),87);this.addLabel(k,mxResources.get("height"),16);mxUtils.br(k);n=document.createElement("div");n.style.paddingTop="8px";n.style.paddingRight="20px";n.style.whiteSpace="nowrap";n.style.textAlign="right";var x=this.createCellOption(mxResources.get("constrainProportions"),
-mxConstants.STYLE_ASPECT,null,"fixed","null");x.style.width="210px";n.appendChild(x);e.cell||e.row?r.style.visibility="hidden":k.appendChild(n);var B=x.getElementsByTagName("input")[0];this.addKeyHandler(u,Q);this.addKeyHandler(m,Q);var C=this.addGeometryHandler(u,function(U,V,ia){if(d.isTableCell(ia))return d.setTableColumnWidth(ia,V-U.width,!0),!0;0<U.width&&(V=Math.max(1,b.fromUnit(V)),B.checked&&(U.height=Math.round(U.height*V*100/U.width)/100),U.width=V)});var G=this.addGeometryHandler(m,function(U,
-V,ia){d.isTableCell(ia)&&(ia=d.model.getParent(ia));if(d.isTableRow(ia))return d.setTableRowHeight(ia,V-U.height),!0;0<U.height&&(V=Math.max(1,b.fromUnit(V)),B.checked&&(U.width=Math.round(U.width*V*100/U.height)/100),U.height=V)});(e.resizable||e.row||e.cell)&&a.appendChild(k);var J=this.createPanel();J.style.paddingBottom="30px";n=document.createElement("div");n.style.position="absolute";n.style.width="70px";n.style.marginTop="0px";n.style.fontWeight="bold";mxUtils.write(n,mxResources.get("position"));
-J.appendChild(n);var D=this.addUnitInput(J,this.getUnit(),87,52,function(){R.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),N=this.addUnitInput(J,this.getUnit(),16,52,function(){P.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(J);this.addLabel(J,mxResources.get("left"),87);this.addLabel(J,mxResources.get("top"),16);var Q=mxUtils.bind(this,function(U,V,ia){e=f.getSelectionState();if(e.containsLabel||e.vertices.length!=d.getSelectionCount()||
-null==e.width||null==e.height)k.style.display="none";else{k.style.display="";if(ia||document.activeElement!=u)u.value=this.inUnit(e.width)+(""==e.width?"":" "+this.getUnit());if(ia||document.activeElement!=m)m.value=this.inUnit(e.height)+(""==e.height?"":" "+this.getUnit())}if(e.vertices.length==d.getSelectionCount()&&null!=e.x&&null!=e.y){J.style.display="";if(ia||document.activeElement!=D)D.value=this.inUnit(e.x)+(""==e.x?"":" "+this.getUnit());if(ia||document.activeElement!=N)N.value=this.inUnit(e.y)+
-(""==e.y?"":" "+this.getUnit())}else J.style.display="none"});this.addKeyHandler(D,Q);this.addKeyHandler(N,Q);g.addListener(mxEvent.CHANGE,Q);this.listeners.push({destroy:function(){g.removeListener(Q)}});Q();var R=this.addGeometryHandler(D,function(U,V){V=b.fromUnit(V);U.relative?U.offset.x=V:U.x=V});var P=this.addGeometryHandler(N,function(U,V){V=b.fromUnit(V);U.relative?U.offset.y=V:U.y=V});if(e.movable){if(0==e.edges.length&&1==e.vertices.length&&g.isEdge(g.getParent(e.vertices[0]))){var Z=d.getCellGeometry(e.vertices[0]);
-null!=Z&&Z.relative&&(n=mxUtils.button(mxResources.get("center"),mxUtils.bind(this,function(U){g.beginUpdate();try{Z=Z.clone(),Z.x=0,Z.y=0,Z.offset=new mxPoint,g.setGeometry(e.vertices[0],Z)}finally{g.endUpdate()}})),n.setAttribute("title",mxResources.get("center")),n.style.width="210px",n.style.position="absolute",mxUtils.br(J),mxUtils.br(J),J.appendChild(n))}a.appendChild(J)}};
-ArrangePanel.prototype.addGeometryHandler=function(a,b){function f(n){if(""!=a.value){var u=parseFloat(a.value);if(isNaN(u))a.value=e+" "+k.getUnit();else if(u!=e){g.getModel().beginUpdate();try{for(var m=d.getSelectionState().cells,r=0;r<m.length;r++)if(g.getModel().isVertex(m[r])){var x=g.getCellGeometry(m[r]);if(null!=x&&(x=x.clone(),!b(x,u,m[r]))){var B=g.view.getState(m[r]);null!=B&&g.isRecursiveVertexResize(B)&&g.resizeChildCells(m[r],x);g.getModel().setGeometry(m[r],x);g.constrainChildCells(m[r])}}}finally{g.getModel().endUpdate()}e=
-u;a.value=u+" "+k.getUnit()}}mxEvent.consume(n)}var d=this.editorUi,g=d.editor.graph,e=null,k=this;mxEvent.addListener(a,"blur",f);mxEvent.addListener(a,"change",f);mxEvent.addListener(a,"focus",function(){e=a.value});return f};
-ArrangePanel.prototype.addEdgeGeometryHandler=function(a,b){function f(k){if(""!=a.value){var n=parseFloat(a.value);if(isNaN(n))a.value=e+" pt";else if(n!=e){g.getModel().beginUpdate();try{for(var u=d.getSelectionState().cells,m=0;m<u.length;m++)if(g.getModel().isEdge(u[m])){var r=g.getCellGeometry(u[m]);null!=r&&(r=r.clone(),b(r,n),g.getModel().setGeometry(u[m],r))}}finally{g.getModel().endUpdate()}e=n;a.value=n+" pt"}}mxEvent.consume(k)}var d=this.editorUi,g=d.editor.graph,e=null;mxEvent.addListener(a,
-"blur",f);mxEvent.addListener(a,"change",f);mxEvent.addListener(a,"focus",function(){e=a.value});return f};
-ArrangePanel.prototype.addEdgeGeometry=function(a){var b=this.editorUi,f=b.editor.graph,d=b.getSelectionState(),g=this.createPanel(),e=document.createElement("div");e.style.position="absolute";e.style.width="70px";e.style.marginTop="0px";e.style.fontWeight="bold";mxUtils.write(e,mxResources.get("width"));g.appendChild(e);var k=this.addUnitInput(g,"pt",12,44,function(){n.apply(this,arguments)});mxUtils.br(g);this.addKeyHandler(k,G);var n=mxUtils.bind(this,function(R){var P=parseInt(k.value);P=Math.min(999,
-Math.max(1,isNaN(P)?1:P));if(P!=mxUtils.getValue(d.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth)){var Z=b.getSelectionState().cells;f.setCellStyles("width",P,Z);b.fireEvent(new mxEventObject("styleChanged","keys",["width"],"values",[P],"cells",Z))}k.value=P+" pt";mxEvent.consume(R)});mxEvent.addListener(k,"blur",n);mxEvent.addListener(k,"change",n);a.appendChild(g);var u=this.createPanel();u.style.paddingBottom="30px";e=document.createElement("div");e.style.position=
-"absolute";e.style.width="70px";e.style.marginTop="0px";mxUtils.write(e,mxResources.get("linestart"));u.appendChild(e);var m=this.addUnitInput(u,"pt",87,52,function(){J.apply(this,arguments)}),r=this.addUnitInput(u,"pt",16,52,function(){D.apply(this,arguments)});mxUtils.br(u);this.addLabel(u,mxResources.get("left"),87);this.addLabel(u,mxResources.get("top"),16);a.appendChild(u);this.addKeyHandler(m,G);this.addKeyHandler(r,G);var x=this.createPanel();x.style.paddingBottom="30px";e=document.createElement("div");
-e.style.position="absolute";e.style.width="70px";e.style.marginTop="0px";mxUtils.write(e,mxResources.get("lineend"));x.appendChild(e);var B=this.addUnitInput(x,"pt",87,52,function(){N.apply(this,arguments)}),C=this.addUnitInput(x,"pt",16,52,function(){Q.apply(this,arguments)});mxUtils.br(x);this.addLabel(x,mxResources.get("left"),87);this.addLabel(x,mxResources.get("top"),16);a.appendChild(x);this.addKeyHandler(B,G);this.addKeyHandler(C,G);var G=mxUtils.bind(this,function(R,P,Z){d=b.getSelectionState();
-R=d.cells[0];if("link"==d.style.shape||"flexArrow"==d.style.shape){if(g.style.display="",Z||document.activeElement!=k)Z=mxUtils.getValue(d.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth),k.value=Z+" pt"}else g.style.display="none";1==d.cells.length&&f.model.isEdge(R)?(Z=f.model.getGeometry(R),null!=Z.sourcePoint&&null==f.model.getTerminal(R,!0)?(m.value=Z.sourcePoint.x,r.value=Z.sourcePoint.y):u.style.display="none",null!=Z.targetPoint&&null==f.model.getTerminal(R,!1)?
-(B.value=Z.targetPoint.x,C.value=Z.targetPoint.y):x.style.display="none"):(u.style.display="none",x.style.display="none")});var J=this.addEdgeGeometryHandler(m,function(R,P){R.sourcePoint.x=P});var D=this.addEdgeGeometryHandler(r,function(R,P){R.sourcePoint.y=P});var N=this.addEdgeGeometryHandler(B,function(R,P){R.targetPoint.x=P});var Q=this.addEdgeGeometryHandler(C,function(R,P){R.targetPoint.y=P});f.getModel().addListener(mxEvent.CHANGE,G);this.listeners.push({destroy:function(){f.getModel().removeListener(G)}});
-G()};TextFormatPanel=function(a,b,f){BaseFormatPanel.call(this,a,b,f);this.init()};mxUtils.extend(TextFormatPanel,BaseFormatPanel);TextFormatPanel.prototype.init=function(){this.container.style.borderBottom="none";this.addFont(this.container)};
-TextFormatPanel.prototype.addFont=function(a){function b(da,t){da.style.backgroundImage=t?Editor.isDarkMode()?"linear-gradient(rgb(0 161 241) 0px, rgb(0, 97, 146) 100%)":"linear-gradient(#c5ecff 0px,#87d4fb 100%)":""}var f=this.editorUi,d=f.editor.graph,g=f.getSelectionState(),e=this.createTitle(mxResources.get("font"));e.style.paddingLeft="14px";e.style.paddingTop="10px";e.style.paddingBottom="6px";a.appendChild(e);e=this.createPanel();e.style.paddingTop="2px";e.style.paddingBottom="2px";e.style.position=
-"relative";e.style.marginLeft="-2px";e.style.borderWidth="0px";e.className="geToolbarContainer";if(d.cellEditor.isContentEditing()){var k=e.cloneNode(),n=this.editorUi.toolbar.addMenu(mxResources.get("style"),mxResources.get("style"),!0,"formatBlock",k,null,!0);n.style.color="rgb(112, 112, 112)";n.style.whiteSpace="nowrap";n.style.overflow="hidden";n.style.margin="0px";this.addArrow(n);n.style.width="200px";n.style.height="15px";n=n.getElementsByTagName("div")[0];n.style.cssFloat="right";a.appendChild(k)}a.appendChild(e);
-k=this.createPanel();k.style.marginTop="8px";k.style.borderTop="1px solid #c0c0c0";k.style.paddingTop="6px";k.style.paddingBottom="6px";var u=this.editorUi.toolbar.addMenu("Helvetica",mxResources.get("fontFamily"),!0,"fontFamily",e,null,!0);u.style.color="rgb(112, 112, 112)";u.style.whiteSpace="nowrap";u.style.overflow="hidden";u.style.margin="0px";this.addArrow(u);u.style.width="200px";u.style.height="15px";n=e.cloneNode(!1);n.style.marginLeft="-3px";var m=this.editorUi.toolbar.addItems(["bold",
-"italic","underline"],n,!0);m[0].setAttribute("title",mxResources.get("bold")+" ("+this.editorUi.actions.get("bold").shortcut+")");m[1].setAttribute("title",mxResources.get("italic")+" ("+this.editorUi.actions.get("italic").shortcut+")");m[2].setAttribute("title",mxResources.get("underline")+" ("+this.editorUi.actions.get("underline").shortcut+")");var r=this.editorUi.toolbar.addItems(["vertical"],n,!0)[0];a.appendChild(n);this.styleButtons(m);this.styleButtons([r]);var x=e.cloneNode(!1);x.style.marginLeft=
-"-3px";x.style.paddingBottom="0px";var B=function(da){return function(){return da()}},C=this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),d.cellEditor.isContentEditing()?function(da){d.cellEditor.alignText(mxConstants.ALIGN_LEFT,da);f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_LEFT],"cells",g.cells))}:B(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_LEFT])),x),G=this.editorUi.toolbar.addButton("geSprite-center",
-mxResources.get("center"),d.cellEditor.isContentEditing()?function(da){d.cellEditor.alignText(mxConstants.ALIGN_CENTER,da);f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_CENTER],"cells",g.cells))}:B(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_CENTER])),x),J=this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),d.cellEditor.isContentEditing()?function(da){d.cellEditor.alignText(mxConstants.ALIGN_RIGHT,
-da);f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_RIGHT],"cells",g.cells))}:B(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_RIGHT])),x);this.styleButtons([C,G,J]);if(d.cellEditor.isContentEditing()){var D=this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("strikethrough"),function(){document.execCommand("strikeThrough",!1,null)},n);this.styleButtons([D]);D.firstChild.style.background=
+ArrangePanel.prototype.addGeometry=function(a){var b=this,f=this.editorUi,e=f.editor.graph,g=e.getModel(),d=f.getSelectionState(),k=this.createPanel();k.style.paddingBottom="8px";var n=document.createElement("div");n.style.position="absolute";n.style.width="50px";n.style.marginTop="0px";n.style.fontWeight="bold";mxUtils.write(n,mxResources.get("size"));k.appendChild(n);var u=this.addUnitInput(k,this.getUnit(),87,52,function(){C.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),
+m=this.addUnitInput(k,this.getUnit(),16,52,function(){F.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),r=document.createElement("div");r.className="geSprite geSprite-fit";r.setAttribute("title",mxResources.get("autosize")+" ("+this.editorUi.actions.get("autosize").shortcut+")");r.style.position="relative";r.style.cursor="pointer";r.style.marginTop="-3px";r.style.border="0px";r.style.left="42px";mxUtils.setOpacity(r,50);mxEvent.addListener(r,"mouseenter",function(){mxUtils.setOpacity(r,
+100)});mxEvent.addListener(r,"mouseleave",function(){mxUtils.setOpacity(r,50)});mxEvent.addListener(r,"click",function(){f.actions.get("autosize").funct()});k.appendChild(r);d.row?(u.style.visibility="hidden",u.nextSibling.style.visibility="hidden"):this.addLabel(k,mxResources.get("width"),87);this.addLabel(k,mxResources.get("height"),16);mxUtils.br(k);n=document.createElement("div");n.style.paddingTop="8px";n.style.paddingRight="20px";n.style.whiteSpace="nowrap";n.style.textAlign="right";var x=this.createCellOption(mxResources.get("constrainProportions"),
+mxConstants.STYLE_ASPECT,null,"fixed","null");x.style.width="210px";n.appendChild(x);d.cell||d.row?r.style.visibility="hidden":k.appendChild(n);var B=x.getElementsByTagName("input")[0];this.addKeyHandler(u,S);this.addKeyHandler(m,S);var C=this.addGeometryHandler(u,function(U,V,aa){if(e.isTableCell(aa))return e.setTableColumnWidth(aa,V-U.width,!0),!0;0<U.width&&(V=Math.max(1,b.fromUnit(V)),B.checked&&(U.height=Math.round(U.height*V*100/U.width)/100),U.width=V)});var F=this.addGeometryHandler(m,function(U,
+V,aa){e.isTableCell(aa)&&(aa=e.model.getParent(aa));if(e.isTableRow(aa))return e.setTableRowHeight(aa,V-U.height),!0;0<U.height&&(V=Math.max(1,b.fromUnit(V)),B.checked&&(U.width=Math.round(U.width*V*100/U.height)/100),U.height=V)});(d.resizable||d.row||d.cell)&&a.appendChild(k);var J=this.createPanel();J.style.paddingBottom="30px";n=document.createElement("div");n.style.position="absolute";n.style.width="70px";n.style.marginTop="0px";n.style.fontWeight="bold";mxUtils.write(n,mxResources.get("position"));
+J.appendChild(n);var D=this.addUnitInput(J,this.getUnit(),87,52,function(){T.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),N=this.addUnitInput(J,this.getUnit(),16,52,function(){P.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(J);this.addLabel(J,mxResources.get("left"),87);this.addLabel(J,mxResources.get("top"),16);var S=mxUtils.bind(this,function(U,V,aa){d=f.getSelectionState();if(d.containsLabel||d.vertices.length!=e.getSelectionCount()||
+null==d.width||null==d.height)k.style.display="none";else{k.style.display="";if(aa||document.activeElement!=u)u.value=this.inUnit(d.width)+(""==d.width?"":" "+this.getUnit());if(aa||document.activeElement!=m)m.value=this.inUnit(d.height)+(""==d.height?"":" "+this.getUnit())}if(d.vertices.length==e.getSelectionCount()&&null!=d.x&&null!=d.y){J.style.display="";if(aa||document.activeElement!=D)D.value=this.inUnit(d.x)+(""==d.x?"":" "+this.getUnit());if(aa||document.activeElement!=N)N.value=this.inUnit(d.y)+
+(""==d.y?"":" "+this.getUnit())}else J.style.display="none"});this.addKeyHandler(D,S);this.addKeyHandler(N,S);g.addListener(mxEvent.CHANGE,S);this.listeners.push({destroy:function(){g.removeListener(S)}});S();var T=this.addGeometryHandler(D,function(U,V){V=b.fromUnit(V);U.relative?U.offset.x=V:U.x=V});var P=this.addGeometryHandler(N,function(U,V){V=b.fromUnit(V);U.relative?U.offset.y=V:U.y=V});if(d.movable){if(0==d.edges.length&&1==d.vertices.length&&g.isEdge(g.getParent(d.vertices[0]))){var Z=e.getCellGeometry(d.vertices[0]);
+null!=Z&&Z.relative&&(n=mxUtils.button(mxResources.get("center"),mxUtils.bind(this,function(U){g.beginUpdate();try{Z=Z.clone(),Z.x=0,Z.y=0,Z.offset=new mxPoint,g.setGeometry(d.vertices[0],Z)}finally{g.endUpdate()}})),n.setAttribute("title",mxResources.get("center")),n.style.width="210px",n.style.position="absolute",mxUtils.br(J),mxUtils.br(J),J.appendChild(n))}a.appendChild(J)}};
+ArrangePanel.prototype.addGeometryHandler=function(a,b){function f(n){if(""!=a.value){var u=parseFloat(a.value);if(isNaN(u))a.value=d+" "+k.getUnit();else if(u!=d){g.getModel().beginUpdate();try{for(var m=e.getSelectionState().cells,r=0;r<m.length;r++)if(g.getModel().isVertex(m[r])){var x=g.getCellGeometry(m[r]);if(null!=x&&(x=x.clone(),!b(x,u,m[r]))){var B=g.view.getState(m[r]);null!=B&&g.isRecursiveVertexResize(B)&&g.resizeChildCells(m[r],x);g.getModel().setGeometry(m[r],x);g.constrainChildCells(m[r])}}}finally{g.getModel().endUpdate()}d=
+u;a.value=u+" "+k.getUnit()}}mxEvent.consume(n)}var e=this.editorUi,g=e.editor.graph,d=null,k=this;mxEvent.addListener(a,"blur",f);mxEvent.addListener(a,"change",f);mxEvent.addListener(a,"focus",function(){d=a.value});return f};
+ArrangePanel.prototype.addEdgeGeometryHandler=function(a,b){function f(k){if(""!=a.value){var n=parseFloat(a.value);if(isNaN(n))a.value=d+" pt";else if(n!=d){g.getModel().beginUpdate();try{for(var u=e.getSelectionState().cells,m=0;m<u.length;m++)if(g.getModel().isEdge(u[m])){var r=g.getCellGeometry(u[m]);null!=r&&(r=r.clone(),b(r,n),g.getModel().setGeometry(u[m],r))}}finally{g.getModel().endUpdate()}d=n;a.value=n+" pt"}}mxEvent.consume(k)}var e=this.editorUi,g=e.editor.graph,d=null;mxEvent.addListener(a,
+"blur",f);mxEvent.addListener(a,"change",f);mxEvent.addListener(a,"focus",function(){d=a.value});return f};
+ArrangePanel.prototype.addEdgeGeometry=function(a){var b=this.editorUi,f=b.editor.graph,e=b.getSelectionState(),g=this.createPanel(),d=document.createElement("div");d.style.position="absolute";d.style.width="70px";d.style.marginTop="0px";d.style.fontWeight="bold";mxUtils.write(d,mxResources.get("width"));g.appendChild(d);var k=this.addUnitInput(g,"pt",12,44,function(){n.apply(this,arguments)});mxUtils.br(g);this.addKeyHandler(k,F);var n=mxUtils.bind(this,function(T){var P=parseInt(k.value);P=Math.min(999,
+Math.max(1,isNaN(P)?1:P));if(P!=mxUtils.getValue(e.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth)){var Z=b.getSelectionState().cells;f.setCellStyles("width",P,Z);b.fireEvent(new mxEventObject("styleChanged","keys",["width"],"values",[P],"cells",Z))}k.value=P+" pt";mxEvent.consume(T)});mxEvent.addListener(k,"blur",n);mxEvent.addListener(k,"change",n);a.appendChild(g);var u=this.createPanel();u.style.paddingBottom="30px";d=document.createElement("div");d.style.position=
+"absolute";d.style.width="70px";d.style.marginTop="0px";mxUtils.write(d,mxResources.get("linestart"));u.appendChild(d);var m=this.addUnitInput(u,"pt",87,52,function(){J.apply(this,arguments)}),r=this.addUnitInput(u,"pt",16,52,function(){D.apply(this,arguments)});mxUtils.br(u);this.addLabel(u,mxResources.get("left"),87);this.addLabel(u,mxResources.get("top"),16);a.appendChild(u);this.addKeyHandler(m,F);this.addKeyHandler(r,F);var x=this.createPanel();x.style.paddingBottom="30px";d=document.createElement("div");
+d.style.position="absolute";d.style.width="70px";d.style.marginTop="0px";mxUtils.write(d,mxResources.get("lineend"));x.appendChild(d);var B=this.addUnitInput(x,"pt",87,52,function(){N.apply(this,arguments)}),C=this.addUnitInput(x,"pt",16,52,function(){S.apply(this,arguments)});mxUtils.br(x);this.addLabel(x,mxResources.get("left"),87);this.addLabel(x,mxResources.get("top"),16);a.appendChild(x);this.addKeyHandler(B,F);this.addKeyHandler(C,F);var F=mxUtils.bind(this,function(T,P,Z){e=b.getSelectionState();
+T=e.cells[0];if("link"==e.style.shape||"flexArrow"==e.style.shape){if(g.style.display="",Z||document.activeElement!=k)Z=mxUtils.getValue(e.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth),k.value=Z+" pt"}else g.style.display="none";1==e.cells.length&&f.model.isEdge(T)?(Z=f.model.getGeometry(T),null!=Z.sourcePoint&&null==f.model.getTerminal(T,!0)?(m.value=Z.sourcePoint.x,r.value=Z.sourcePoint.y):u.style.display="none",null!=Z.targetPoint&&null==f.model.getTerminal(T,!1)?
+(B.value=Z.targetPoint.x,C.value=Z.targetPoint.y):x.style.display="none"):(u.style.display="none",x.style.display="none")});var J=this.addEdgeGeometryHandler(m,function(T,P){T.sourcePoint.x=P});var D=this.addEdgeGeometryHandler(r,function(T,P){T.sourcePoint.y=P});var N=this.addEdgeGeometryHandler(B,function(T,P){T.targetPoint.x=P});var S=this.addEdgeGeometryHandler(C,function(T,P){T.targetPoint.y=P});f.getModel().addListener(mxEvent.CHANGE,F);this.listeners.push({destroy:function(){f.getModel().removeListener(F)}});
+F()};TextFormatPanel=function(a,b,f){BaseFormatPanel.call(this,a,b,f);this.init()};mxUtils.extend(TextFormatPanel,BaseFormatPanel);TextFormatPanel.prototype.init=function(){this.container.style.borderBottom="none";this.addFont(this.container)};
+TextFormatPanel.prototype.addFont=function(a){function b(da,t){da.style.backgroundImage=t?Editor.isDarkMode()?"linear-gradient(rgb(0 161 241) 0px, rgb(0, 97, 146) 100%)":"linear-gradient(#c5ecff 0px,#87d4fb 100%)":""}var f=this.editorUi,e=f.editor.graph,g=f.getSelectionState(),d=this.createTitle(mxResources.get("font"));d.style.paddingLeft="14px";d.style.paddingTop="10px";d.style.paddingBottom="6px";a.appendChild(d);d=this.createPanel();d.style.paddingTop="2px";d.style.paddingBottom="2px";d.style.position=
+"relative";d.style.marginLeft="-2px";d.style.borderWidth="0px";d.className="geToolbarContainer";if(e.cellEditor.isContentEditing()){var k=d.cloneNode(),n=this.editorUi.toolbar.addMenu(mxResources.get("style"),mxResources.get("style"),!0,"formatBlock",k,null,!0);n.style.color="rgb(112, 112, 112)";n.style.whiteSpace="nowrap";n.style.overflow="hidden";n.style.margin="0px";this.addArrow(n);n.style.width="200px";n.style.height="15px";n=n.getElementsByTagName("div")[0];n.style.cssFloat="right";a.appendChild(k)}a.appendChild(d);
+k=this.createPanel();k.style.marginTop="8px";k.style.borderTop="1px solid #c0c0c0";k.style.paddingTop="6px";k.style.paddingBottom="6px";var u=this.editorUi.toolbar.addMenu("Helvetica",mxResources.get("fontFamily"),!0,"fontFamily",d,null,!0);u.style.color="rgb(112, 112, 112)";u.style.whiteSpace="nowrap";u.style.overflow="hidden";u.style.margin="0px";this.addArrow(u);u.style.width="200px";u.style.height="15px";n=d.cloneNode(!1);n.style.marginLeft="-3px";var m=this.editorUi.toolbar.addItems(["bold",
+"italic","underline"],n,!0);m[0].setAttribute("title",mxResources.get("bold")+" ("+this.editorUi.actions.get("bold").shortcut+")");m[1].setAttribute("title",mxResources.get("italic")+" ("+this.editorUi.actions.get("italic").shortcut+")");m[2].setAttribute("title",mxResources.get("underline")+" ("+this.editorUi.actions.get("underline").shortcut+")");var r=this.editorUi.toolbar.addItems(["vertical"],n,!0)[0];a.appendChild(n);this.styleButtons(m);this.styleButtons([r]);var x=d.cloneNode(!1);x.style.marginLeft=
+"-3px";x.style.paddingBottom="0px";var B=function(da){return function(){return da()}},C=this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),e.cellEditor.isContentEditing()?function(da){e.cellEditor.alignText(mxConstants.ALIGN_LEFT,da);f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_LEFT],"cells",g.cells))}:B(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_LEFT])),x),F=this.editorUi.toolbar.addButton("geSprite-center",
+mxResources.get("center"),e.cellEditor.isContentEditing()?function(da){e.cellEditor.alignText(mxConstants.ALIGN_CENTER,da);f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_CENTER],"cells",g.cells))}:B(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_CENTER])),x),J=this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),e.cellEditor.isContentEditing()?function(da){e.cellEditor.alignText(mxConstants.ALIGN_RIGHT,
+da);f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_RIGHT],"cells",g.cells))}:B(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_RIGHT])),x);this.styleButtons([C,F,J]);if(e.cellEditor.isContentEditing()){var D=this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("strikethrough"),function(){document.execCommand("strikeThrough",!1,null)},n);this.styleButtons([D]);D.firstChild.style.background=
"url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PGRlZnM+PHBhdGggaWQ9ImEiIGQ9Ik0wIDBoMjR2MjRIMFYweiIvPjwvZGVmcz48Y2xpcFBhdGggaWQ9ImIiPjx1c2UgeGxpbms6aHJlZj0iI2EiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PC9jbGlwUGF0aD48cGF0aCBjbGlwLXBhdGg9InVybCgjYikiIGZpbGw9IiMwMTAxMDEiIGQ9Ik03LjI0IDguNzVjLS4yNi0uNDgtLjM5LTEuMDMtLjM5LTEuNjcgMC0uNjEuMTMtMS4xNi40LTEuNjcuMjYtLjUuNjMtLjkzIDEuMTEtMS4yOS40OC0uMzUgMS4wNS0uNjMgMS43LS44My42Ni0uMTkgMS4zOS0uMjkgMi4xOC0uMjkuODEgMCAxLjU0LjExIDIuMjEuMzQuNjYuMjIgMS4yMy41NCAxLjY5Ljk0LjQ3LjQuODMuODggMS4wOCAxLjQzLjI1LjU1LjM4IDEuMTUuMzggMS44MWgtMy4wMWMwLS4zMS0uMDUtLjU5LS4xNS0uODUtLjA5LS4yNy0uMjQtLjQ5LS40NC0uNjgtLjItLjE5LS40NS0uMzMtLjc1LS40NC0uMy0uMS0uNjYtLjE2LTEuMDYtLjE2LS4zOSAwLS43NC4wNC0xLjAzLjEzLS4yOS4wOS0uNTMuMjEtLjcyLjM2LS4xOS4xNi0uMzQuMzQtLjQ0LjU1LS4xLjIxLS4xNS40My0uMTUuNjYgMCAuNDguMjUuODguNzQgMS4yMS4zOC4yNS43Ny40OCAxLjQxLjdINy4zOWMtLjA1LS4wOC0uMTEtLjE3LS4xNS0uMjV6TTIxIDEydi0ySDN2Mmg5LjYyYy4xOC4wNy40LjE0LjU1LjIuMzcuMTcuNjYuMzQuODcuNTEuMjEuMTcuMzUuMzYuNDMuNTcuMDcuMi4xMS40My4xMS42OSAwIC4yMy0uMDUuNDUtLjE0LjY2LS4wOS4yLS4yMy4zOC0uNDIuNTMtLjE5LjE1LS40Mi4yNi0uNzEuMzUtLjI5LjA4LS42My4xMy0xLjAxLjEzLS40MyAwLS44My0uMDQtMS4xOC0uMTNzLS42Ni0uMjMtLjkxLS40MmMtLjI1LS4xOS0uNDUtLjQ0LS41OS0uNzUtLjE0LS4zMS0uMjUtLjc2LS4yNS0xLjIxSDYuNGMwIC41NS4wOCAxLjEzLjI0IDEuNTguMTYuNDUuMzcuODUuNjUgMS4yMS4yOC4zNS42LjY2Ljk4LjkyLjM3LjI2Ljc4LjQ4IDEuMjIuNjUuNDQuMTcuOS4zIDEuMzguMzkuNDguMDguOTYuMTMgMS40NC4xMy44IDAgMS41My0uMDkgMi4xOC0uMjhzMS4yMS0uNDUgMS42Ny0uNzljLjQ2LS4zNC44Mi0uNzcgMS4wNy0xLjI3cy4zOC0xLjA3LjM4LTEuNzFjMC0uNi0uMS0xLjE0LS4zMS0xLjYxLS4wNS0uMTEtLjExLS4yMy0uMTctLjMzSDIxeiIvPjwvc3ZnPg==)";
-D.firstChild.style.backgroundPosition="2px 2px";D.firstChild.style.backgroundSize="18px 18px";this.styleButtons([D])}var N=this.editorUi.toolbar.addButton("geSprite-top",mxResources.get("top"),B(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP])),x),Q=this.editorUi.toolbar.addButton("geSprite-middle",mxResources.get("middle"),B(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE])),x),R=this.editorUi.toolbar.addButton("geSprite-bottom",
-mxResources.get("bottom"),B(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM])),x);this.styleButtons([N,Q,R]);a.appendChild(x);var P,Z,U,V,ia;if(d.cellEditor.isContentEditing()){N.style.display="none";Q.style.display="none";R.style.display="none";r.style.display="none";var ha=this.editorUi.toolbar.addButton("geSprite-justifyfull",mxResources.get("block"),function(){1==ha.style.opacity&&document.execCommand("justifyfull",!1,null)},x);ha.style.marginRight=
-"9px";ha.style.opacity=1;this.styleButtons([ha,P=this.editorUi.toolbar.addButton("geSprite-subscript",mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)",function(){document.execCommand("subscript",!1,null)},x),Z=this.editorUi.toolbar.addButton("geSprite-superscript",mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",!1,null)},x)]);P.style.marginLeft="10px";B=x.cloneNode(!1);B.style.paddingTop="4px";x=[this.editorUi.toolbar.addButton("geSprite-orderedlist",
+D.firstChild.style.backgroundPosition="2px 2px";D.firstChild.style.backgroundSize="18px 18px";this.styleButtons([D])}var N=this.editorUi.toolbar.addButton("geSprite-top",mxResources.get("top"),B(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP])),x),S=this.editorUi.toolbar.addButton("geSprite-middle",mxResources.get("middle"),B(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE])),x),T=this.editorUi.toolbar.addButton("geSprite-bottom",
+mxResources.get("bottom"),B(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM])),x);this.styleButtons([N,S,T]);a.appendChild(x);var P,Z,U,V,aa;if(e.cellEditor.isContentEditing()){N.style.display="none";S.style.display="none";T.style.display="none";r.style.display="none";var ia=this.editorUi.toolbar.addButton("geSprite-justifyfull",mxResources.get("block"),function(){1==ia.style.opacity&&document.execCommand("justifyfull",!1,null)},x);ia.style.marginRight=
+"9px";ia.style.opacity=1;this.styleButtons([ia,P=this.editorUi.toolbar.addButton("geSprite-subscript",mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)",function(){document.execCommand("subscript",!1,null)},x),Z=this.editorUi.toolbar.addButton("geSprite-superscript",mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",!1,null)},x)]);P.style.marginLeft="10px";B=x.cloneNode(!1);B.style.paddingTop="4px";x=[this.editorUi.toolbar.addButton("geSprite-orderedlist",
mxResources.get("numberedList"),function(){document.execCommand("insertorderedlist",!1,null)},B),this.editorUi.toolbar.addButton("geSprite-unorderedlist",mxResources.get("bulletedList"),function(){document.execCommand("insertunorderedlist",!1,null)},B),this.editorUi.toolbar.addButton("geSprite-outdent",mxResources.get("decreaseIndent"),function(){document.execCommand("outdent",!1,null)},B),this.editorUi.toolbar.addButton("geSprite-indent",mxResources.get("increaseIndent"),function(){document.execCommand("indent",
-!1,null)},B),this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},B),this.editorUi.toolbar.addButton("geSprite-code",mxResources.get("html"),function(){d.cellEditor.toggleViewMode()},B)];this.styleButtons(x);x[x.length-2].style.marginLeft="10px";a.appendChild(B)}else m[2].style.marginRight="12px",J.style.marginRight="12px";x=e.cloneNode(!1);x.style.marginLeft="0px";x.style.paddingTop="8px";x.style.paddingBottom=
-"4px";x.style.fontWeight="normal";mxUtils.write(x,mxResources.get("position"));var ba=document.createElement("select");ba.style.position="absolute";ba.style.left="126px";ba.style.width="98px";ba.style.border="1px solid rgb(160, 160, 160)";ba.style.borderRadius="4px";ba.style.marginTop="-2px";D="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" ");var qa={topLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM],top:[mxConstants.ALIGN_CENTER,
+!1,null)},B),this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},B),this.editorUi.toolbar.addButton("geSprite-code",mxResources.get("html"),function(){e.cellEditor.toggleViewMode()},B)];this.styleButtons(x);x[x.length-2].style.marginLeft="10px";a.appendChild(B)}else m[2].style.marginRight="12px",J.style.marginRight="12px";x=d.cloneNode(!1);x.style.marginLeft="0px";x.style.paddingTop="8px";x.style.paddingBottom=
+"4px";x.style.fontWeight="normal";mxUtils.write(x,mxResources.get("position"));var ea=document.createElement("select");ea.style.position="absolute";ea.style.left="126px";ea.style.width="98px";ea.style.border="1px solid rgb(160, 160, 160)";ea.style.borderRadius="4px";ea.style.marginTop="-2px";D="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" ");var qa={topLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM],top:[mxConstants.ALIGN_CENTER,
mxConstants.ALIGN_TOP,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM],topRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM],left:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE],center:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE],right:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE],bottomLeft:[mxConstants.ALIGN_LEFT,
-mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP],bottom:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]};for(B=0;B<D.length;B++){var O=document.createElement("option");O.setAttribute("value",D[B]);mxUtils.write(O,mxResources.get(D[B]));ba.appendChild(O)}x.appendChild(ba);D=e.cloneNode(!1);D.style.marginLeft="0px";D.style.paddingTop=
-"4px";D.style.paddingBottom="4px";D.style.fontWeight="normal";mxUtils.write(D,mxResources.get("writingDirection"));var S=document.createElement("select");S.style.position="absolute";S.style.border="1px solid rgb(160, 160, 160)";S.style.left="126px";S.style.width="98px";S.style.borderRadius="4px";S.style.marginTop="-2px";O=["automatic","leftToRight","rightToLeft"];var F={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL};for(B=0;B<O.length;B++){var L=
-document.createElement("option");L.setAttribute("value",O[B]);mxUtils.write(L,mxResources.get(O[B]));S.appendChild(L)}D.appendChild(S);d.isEditing()||(a.appendChild(x),mxEvent.addListener(ba,"change",function(da){d.getModel().beginUpdate();try{var t=qa[ba.value];null!=t&&(d.setCellStyles(mxConstants.STYLE_LABEL_POSITION,t[0],g.cells),d.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,t[1],g.cells),d.setCellStyles(mxConstants.STYLE_ALIGN,t[2],g.cells),d.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,
-t[3],g.cells))}finally{d.getModel().endUpdate()}mxEvent.consume(da)}),a.appendChild(D),mxEvent.addListener(S,"change",function(da){d.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,F[S.value],g.cells);mxEvent.consume(da)}));var T=document.createElement("input");T.style.position="absolute";T.style.border="1px solid rgb(160, 160, 160)";T.style.textAlign="right";T.style.marginTop="4px";T.style.left="161px";T.style.width="53px";T.style.borderRadius="4px";T.style.height="23px";T.style.boxSizing="border-box";
-n.appendChild(T);var ca=null;x=this.installInputHandler(T,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,1,999," pt",function(da){if(window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11){var t=function(H,K){null!=d.cellEditor.textarea&&H!=d.cellEditor.textarea&&d.cellEditor.textarea.contains(H)&&(K||z.containsNode(H,!0))&&("FONT"==H.nodeName?(H.removeAttribute("size"),H.style.fontSize=da+"px"):mxUtils.getCurrentStyle(H).fontSize!=da+"px"&&(mxUtils.getCurrentStyle(H.parentNode).fontSize!=
-da+"px"?H.style.fontSize=da+"px":H.style.fontSize=""));f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTSIZE],"values",[da],"cells",g.cells))},z=window.getSelection(),A=0<z.rangeCount?z.getRangeAt(0).commonAncestorContainer:d.cellEditor.textarea;A!=d.cellEditor.textarea&&A.nodeType==mxConstants.NODETYPE_ELEMENT||document.execCommand("fontSize",!1,"1");A!=d.cellEditor.textarea&&(A=A.parentNode);if(null!=A&&A.nodeType==mxConstants.NODETYPE_ELEMENT){var E=A.getElementsByTagName("*");
-t(A);for(A=0;A<E.length;A++)t(E[A])}T.value=da+" pt"}else if(window.getSelection||document.selection)if(t=function(H,K){for(;null!=K;){if(K===H)return!0;K=K.parentNode}return!1},E=null,document.selection?E=document.selection.createRange().parentElement():(z=window.getSelection(),0<z.rangeCount&&(E=z.getRangeAt(0).commonAncestorContainer)),null!=E&&t(d.cellEditor.textarea,E))for(ca=da,document.execCommand("fontSize",!1,"4"),E=d.cellEditor.textarea.getElementsByTagName("font"),A=0;A<E.length;A++)if("4"==
-E[A].getAttribute("size")){E[A].removeAttribute("size");E[A].style.fontSize=ca+"px";window.setTimeout(function(){T.value=ca+" pt";ca=null},0);break}},!0);x=this.createStepper(T,x,1,10,!0,Menus.prototype.defaultFontSize);x.style.display=T.style.display;x.style.marginTop="4px";x.style.left="214px";n.appendChild(x);n=u.getElementsByTagName("div")[0];n.style.cssFloat="right";var fa=null,wa=d.shapeBackgroundColor,W=null,aa=d.shapeForegroundColor,oa=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),
-function(){return wa},function(da){document.execCommand("backcolor",!1,da!=mxConstants.NONE?da:"transparent");f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR],"values",[da],"cells",g.cells))},d.shapeBackgroundColor,{install:function(da){fa=da},destroy:function(){fa=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"),mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"default",null,function(da){d.updateLabelElements(g.cells,function(t){t.style.backgroundColor=
-null})},d.shapeBackgroundColor);oa.style.fontWeight="bold";var sa=this.createCellColorOption(mxResources.get("borderColor"),mxConstants.STYLE_LABEL_BORDERCOLOR,"default",null,null,d.shapeForegroundColor);sa.style.fontWeight="bold";n=1<=g.vertices.length?d.stylesheet.getDefaultVertexStyle():d.stylesheet.getDefaultEdgeStyle();n=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return aa},function(da){if(mxClient.IS_FF){for(var t=d.cellEditor.textarea.getElementsByTagName("font"),
-z=[],A=0;A<t.length;A++)z.push({node:t[A],color:t[A].getAttribute("color")});document.execCommand("forecolor",!1,da!=mxConstants.NONE?da:"transparent");f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTCOLOR],"values",[da],"cells",g.cells));da=d.cellEditor.textarea.getElementsByTagName("font");for(A=0;A<da.length;A++)if(A>=z.length||da[A]!=z[A].node||da[A]==z[A].node&&da[A].getAttribute("color")!=z[A].color){z=da[A].firstChild;if(null!=z&&"A"==z.nodeName&&null==z.nextSibling&&
-null!=z.firstChild){da[A].parentNode.insertBefore(z,da[A]);for(t=z.firstChild;null!=t;){var E=t.nextSibling;da[A].appendChild(t);t=E}z.appendChild(da[A])}break}}else document.execCommand("forecolor",!1,da!=mxConstants.NONE?da:"transparent"),f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTCOLOR],"values",[da],"cells",g.cells))},null!=n[mxConstants.STYLE_FONTCOLOR]?n[mxConstants.STYLE_FONTCOLOR]:d.shapeForegroundColor,{install:function(da){W=da},destroy:function(){W=null}},
-null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"default",function(da){oa.style.display=da==mxConstants.NONE?"none":"";sa.style.display=oa.style.display},function(da){da==mxConstants.NONE?d.setCellStyles(mxConstants.STYLE_NOLABEL,"1",g.cells):d.setCellStyles(mxConstants.STYLE_NOLABEL,null,g.cells);d.setCellStyles(mxConstants.STYLE_FONTCOLOR,da,g.cells);d.updateLabelElements(g.cells,function(t){t.removeAttribute("color");t.style.color=null})},d.shapeForegroundColor);
-n.style.fontWeight="bold";k.appendChild(n);k.appendChild(oa);d.cellEditor.isContentEditing()||k.appendChild(sa);a.appendChild(k);k=this.createPanel();k.style.paddingTop="2px";k.style.paddingBottom="4px";n=d.filterSelectionCells(mxUtils.bind(this,function(da){var t=d.view.getState(da);return null==t||d.isAutoSizeState(t)||d.getModel().isEdge(da)||!d.isTableRow(da)&&!d.isTableCell(da)&&!d.isCellResizable(da)}));x=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap",
+mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP],bottom:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]};for(B=0;B<D.length;B++){var O=document.createElement("option");O.setAttribute("value",D[B]);mxUtils.write(O,mxResources.get(D[B]));ea.appendChild(O)}x.appendChild(ea);D=d.cloneNode(!1);D.style.marginLeft="0px";D.style.paddingTop=
+"4px";D.style.paddingBottom="4px";D.style.fontWeight="normal";mxUtils.write(D,mxResources.get("writingDirection"));var R=document.createElement("select");R.style.position="absolute";R.style.border="1px solid rgb(160, 160, 160)";R.style.left="126px";R.style.width="98px";R.style.borderRadius="4px";R.style.marginTop="-2px";O=["automatic","leftToRight","rightToLeft"];var G={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL};for(B=0;B<O.length;B++){var K=
+document.createElement("option");K.setAttribute("value",O[B]);mxUtils.write(K,mxResources.get(O[B]));R.appendChild(K)}D.appendChild(R);e.isEditing()||(a.appendChild(x),mxEvent.addListener(ea,"change",function(da){e.getModel().beginUpdate();try{var t=qa[ea.value];null!=t&&(e.setCellStyles(mxConstants.STYLE_LABEL_POSITION,t[0],g.cells),e.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,t[1],g.cells),e.setCellStyles(mxConstants.STYLE_ALIGN,t[2],g.cells),e.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,
+t[3],g.cells))}finally{e.getModel().endUpdate()}mxEvent.consume(da)}),a.appendChild(D),mxEvent.addListener(R,"change",function(da){e.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,G[R.value],g.cells);mxEvent.consume(da)}));var Q=document.createElement("input");Q.style.position="absolute";Q.style.border="1px solid rgb(160, 160, 160)";Q.style.textAlign="right";Q.style.marginTop="4px";Q.style.left="161px";Q.style.width="53px";Q.style.borderRadius="4px";Q.style.height="23px";Q.style.boxSizing="border-box";
+n.appendChild(Q);var ba=null;x=this.installInputHandler(Q,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,1,999," pt",function(da){if(window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11){var t=function(H,L){null!=e.cellEditor.textarea&&H!=e.cellEditor.textarea&&e.cellEditor.textarea.contains(H)&&(L||z.containsNode(H,!0))&&("FONT"==H.nodeName?(H.removeAttribute("size"),H.style.fontSize=da+"px"):mxUtils.getCurrentStyle(H).fontSize!=da+"px"&&(mxUtils.getCurrentStyle(H.parentNode).fontSize!=
+da+"px"?H.style.fontSize=da+"px":H.style.fontSize=""));f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTSIZE],"values",[da],"cells",g.cells))},z=window.getSelection(),A=0<z.rangeCount?z.getRangeAt(0).commonAncestorContainer:e.cellEditor.textarea;A!=e.cellEditor.textarea&&A.nodeType==mxConstants.NODETYPE_ELEMENT||document.execCommand("fontSize",!1,"1");A!=e.cellEditor.textarea&&(A=A.parentNode);if(null!=A&&A.nodeType==mxConstants.NODETYPE_ELEMENT){var E=A.getElementsByTagName("*");
+t(A);for(A=0;A<E.length;A++)t(E[A])}Q.value=da+" pt"}else if(window.getSelection||document.selection)if(t=function(H,L){for(;null!=L;){if(L===H)return!0;L=L.parentNode}return!1},E=null,document.selection?E=document.selection.createRange().parentElement():(z=window.getSelection(),0<z.rangeCount&&(E=z.getRangeAt(0).commonAncestorContainer)),null!=E&&t(e.cellEditor.textarea,E))for(ba=da,document.execCommand("fontSize",!1,"4"),E=e.cellEditor.textarea.getElementsByTagName("font"),A=0;A<E.length;A++)if("4"==
+E[A].getAttribute("size")){E[A].removeAttribute("size");E[A].style.fontSize=ba+"px";window.setTimeout(function(){Q.value=ba+" pt";ba=null},0);break}},!0);x=this.createStepper(Q,x,1,10,!0,Menus.prototype.defaultFontSize);x.style.display=Q.style.display;x.style.marginTop="4px";x.style.left="214px";n.appendChild(x);n=u.getElementsByTagName("div")[0];n.style.cssFloat="right";var la=null,ra=e.shapeBackgroundColor,X=null,ca=e.shapeForegroundColor,oa=e.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),
+function(){return ra},function(da){document.execCommand("backcolor",!1,da!=mxConstants.NONE?da:"transparent");f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR],"values",[da],"cells",g.cells))},e.shapeBackgroundColor,{install:function(da){la=da},destroy:function(){la=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"),mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"default",null,function(da){e.updateLabelElements(g.cells,function(t){t.style.backgroundColor=
+null})},e.shapeBackgroundColor);oa.style.fontWeight="bold";var ta=this.createCellColorOption(mxResources.get("borderColor"),mxConstants.STYLE_LABEL_BORDERCOLOR,"default",null,null,e.shapeForegroundColor);ta.style.fontWeight="bold";n=1<=g.vertices.length?e.stylesheet.getDefaultVertexStyle():e.stylesheet.getDefaultEdgeStyle();n=e.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return ca},function(da){if(mxClient.IS_FF){for(var t=e.cellEditor.textarea.getElementsByTagName("font"),
+z=[],A=0;A<t.length;A++)z.push({node:t[A],color:t[A].getAttribute("color")});document.execCommand("forecolor",!1,da!=mxConstants.NONE?da:"transparent");f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTCOLOR],"values",[da],"cells",g.cells));da=e.cellEditor.textarea.getElementsByTagName("font");for(A=0;A<da.length;A++)if(A>=z.length||da[A]!=z[A].node||da[A]==z[A].node&&da[A].getAttribute("color")!=z[A].color){z=da[A].firstChild;if(null!=z&&"A"==z.nodeName&&null==z.nextSibling&&
+null!=z.firstChild){da[A].parentNode.insertBefore(z,da[A]);for(t=z.firstChild;null!=t;){var E=t.nextSibling;da[A].appendChild(t);t=E}z.appendChild(da[A])}break}}else document.execCommand("forecolor",!1,da!=mxConstants.NONE?da:"transparent"),f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTCOLOR],"values",[da],"cells",g.cells))},null!=n[mxConstants.STYLE_FONTCOLOR]?n[mxConstants.STYLE_FONTCOLOR]:e.shapeForegroundColor,{install:function(da){X=da},destroy:function(){X=null}},
+null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"default",function(da){oa.style.display=da==mxConstants.NONE?"none":"";ta.style.display=oa.style.display},function(da){da==mxConstants.NONE?e.setCellStyles(mxConstants.STYLE_NOLABEL,"1",g.cells):e.setCellStyles(mxConstants.STYLE_NOLABEL,null,g.cells);e.setCellStyles(mxConstants.STYLE_FONTCOLOR,da,g.cells);e.updateLabelElements(g.cells,function(t){t.removeAttribute("color");t.style.color=null})},e.shapeForegroundColor);
+n.style.fontWeight="bold";k.appendChild(n);k.appendChild(oa);e.cellEditor.isContentEditing()||k.appendChild(ta);a.appendChild(k);k=this.createPanel();k.style.paddingTop="2px";k.style.paddingBottom="4px";n=e.filterSelectionCells(mxUtils.bind(this,function(da){var t=e.view.getState(da);return null==t||e.isAutoSizeState(t)||e.getModel().isEdge(da)||!e.isTableRow(da)&&!e.isTableCell(da)&&!e.isCellResizable(da)}));x=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap",
"null",null,null,!0,n);x.style.fontWeight="bold";0<n.length&&k.appendChild(x);n=this.createCellOption(mxResources.get("formattedText"),"html",0,null,null,null,f.actions.get("formattedText"));n.style.fontWeight="bold";k.appendChild(n);n=this.createPanel();n.style.paddingTop="10px";n.style.paddingBottom="28px";n.style.fontWeight="normal";x=document.createElement("div");x.style.position="absolute";x.style.width="70px";x.style.marginTop="0px";x.style.fontWeight="bold";mxUtils.write(x,mxResources.get("spacing"));
-n.appendChild(x);var Ka=this.addUnitInput(n,"pt",87,52,function(){Xa.apply(this,arguments)}),Ha=this.addUnitInput(n,"pt",16,52,function(){$a.apply(this,arguments)});mxUtils.br(n);this.addLabel(n,mxResources.get("top"),87);this.addLabel(n,mxResources.get("global"),16);mxUtils.br(n);mxUtils.br(n);var ua=this.addUnitInput(n,"pt",158,52,function(){jb.apply(this,arguments)}),Ca=this.addUnitInput(n,"pt",87,52,function(){Ya.apply(this,arguments)}),ra=this.addUnitInput(n,"pt",16,52,function(){Va.apply(this,
-arguments)});mxUtils.br(n);this.addLabel(n,mxResources.get("left"),158);this.addLabel(n,mxResources.get("bottom"),87);this.addLabel(n,mxResources.get("right"),16);if(d.cellEditor.isContentEditing()){var Da=null,Ua=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),null,null,function(da){var t=""==da.value?120:parseInt(da.value);t=Math.max(0,isNaN(t)?120:t);null!=Da&&(d.cellEditor.restoreSelection(Da),Da=null);for(var z=d.getSelectedElement();null!=z&&z.nodeType!=mxConstants.NODETYPE_ELEMENT;)z=
-z.parentNode;null!=z&&z==d.cellEditor.textarea&&null!=d.cellEditor.textarea.firstChild&&("P"!=d.cellEditor.textarea.firstChild.nodeName&&(d.cellEditor.textarea.innerHTML="<p>"+d.cellEditor.textarea.innerHTML+"</p>"),z=d.cellEditor.textarea.firstChild);null!=z&&null!=d.cellEditor.textarea&&z!=d.cellEditor.textarea&&d.cellEditor.textarea.contains(z)&&(z.style.lineHeight=t/100);da.value=t+" %"},function(da){Ua=da;mxEvent.addListener(da,"mousedown",function(){document.activeElement==d.cellEditor.textarea&&
-(Da=d.cellEditor.saveSelection())});mxEvent.addListener(da,"touchstart",function(){document.activeElement==d.cellEditor.textarea&&(Da=d.cellEditor.saveSelection())});da.value="120 %"}));k=e.cloneNode(!1);k.style.paddingLeft="0px";n=this.editorUi.toolbar.addItems(["link","image"],k,!0);x=[this.editorUi.toolbar.addButton("geSprite-horizontalrule",mxResources.get("insertHorizontalRule"),function(){document.execCommand("inserthorizontalrule",!1)},k),this.editorUi.toolbar.addMenuFunctionInContainer(k,
-"geSprite-table",mxResources.get("table"),!1,mxUtils.bind(this,function(da){this.editorUi.menus.addInsertTableItem(da,null,null,!1)}))];this.styleButtons(n);this.styleButtons(x);n=this.createPanel();n.style.paddingTop="10px";n.style.paddingBottom="10px";n.appendChild(this.createTitle(mxResources.get("insert")));n.appendChild(k);a.appendChild(n);n=e.cloneNode(!1);n.style.paddingLeft="0px";x=[this.editorUi.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),mxUtils.bind(this,
-function(){try{null!=U&&d.insertColumn(U,null!=V?V.cellIndex:0)}catch(da){this.editorUi.handleError(da)}}),n),this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{null!=U&&d.insertColumn(U,null!=V?V.cellIndex+1:-1)}catch(da){this.editorUi.handleError(da)}}),n),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{null!=U&&null!=V&&d.deleteColumn(U,V.cellIndex)}catch(da){this.editorUi.handleError(da)}}),
-n),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{null!=U&&null!=ia&&d.insertRow(U,ia.sectionRowIndex)}catch(da){this.editorUi.handleError(da)}}),n),this.editorUi.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{null!=U&&null!=ia&&d.insertRow(U,ia.sectionRowIndex+1)}catch(da){this.editorUi.handleError(da)}}),n),this.editorUi.toolbar.addButton("geSprite-deleterow",
-mxResources.get("deleteRow"),mxUtils.bind(this,function(){try{null!=U&&null!=ia&&d.deleteRow(U,ia.sectionRowIndex)}catch(da){this.editorUi.handleError(da)}}),n)];this.styleButtons(x);x[2].style.marginRight="10px";k=this.createPanel();k.style.paddingTop="10px";k.style.paddingBottom="10px";k.appendChild(this.createTitle(mxResources.get("table")));k.appendChild(n);e=e.cloneNode(!1);e.style.paddingLeft="0px";x=[this.editorUi.toolbar.addButton("geSprite-strokecolor",mxResources.get("borderColor"),mxUtils.bind(this,
-function(da){if(null!=U){var t=U.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(z,A,E,H){return"#"+("0"+Number(A).toString(16)).substr(-2)+("0"+Number(E).toString(16)).substr(-2)+("0"+Number(H).toString(16)).substr(-2)});this.editorUi.pickColor(t,function(z){var A=null==V||null!=da&&mxEvent.isShiftDown(da)?U:V;d.processElements(A,function(E){E.style.border=null});null==z||z==mxConstants.NONE?(A.removeAttribute("border"),A.style.border="",A.style.borderCollapse=
-""):(A.setAttribute("border","1"),A.style.border="1px solid "+z,A.style.borderCollapse="collapse")})}}),e),this.editorUi.toolbar.addButton("geSprite-fillcolor",mxResources.get("backgroundColor"),mxUtils.bind(this,function(da){if(null!=U){var t=U.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(z,A,E,H){return"#"+("0"+Number(A).toString(16)).substr(-2)+("0"+Number(E).toString(16)).substr(-2)+("0"+Number(H).toString(16)).substr(-2)});this.editorUi.pickColor(t,
-function(z){var A=null==V||null!=da&&mxEvent.isShiftDown(da)?U:V;d.processElements(A,function(E){E.style.backgroundColor=null});A.style.backgroundColor=null==z||z==mxConstants.NONE?"":z})}}),e),this.editorUi.toolbar.addButton("geSprite-fit",mxResources.get("spacing"),function(){if(null!=U){var da=U.getAttribute("cellPadding")||0;da=new FilenameDialog(f,da,mxResources.get("apply"),mxUtils.bind(this,function(t){null!=t&&0<t.length?U.setAttribute("cellPadding",t):U.removeAttribute("cellPadding")}),mxResources.get("spacing"));
-f.showDialog(da.container,300,80,!0,!0);da.init()}},e),this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),function(){null!=U&&U.setAttribute("align","left")},e),this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),function(){null!=U&&U.setAttribute("align","center")},e),this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),function(){null!=U&&U.setAttribute("align","right")},e)];this.styleButtons(x);x[2].style.marginRight="10px";k.appendChild(e);
+n.appendChild(x);var Ka=this.addUnitInput(n,"pt",87,52,function(){Xa.apply(this,arguments)}),Ha=this.addUnitInput(n,"pt",16,52,function(){$a.apply(this,arguments)});mxUtils.br(n);this.addLabel(n,mxResources.get("top"),87);this.addLabel(n,mxResources.get("global"),16);mxUtils.br(n);mxUtils.br(n);var va=this.addUnitInput(n,"pt",158,52,function(){jb.apply(this,arguments)}),Ca=this.addUnitInput(n,"pt",87,52,function(){Ya.apply(this,arguments)}),sa=this.addUnitInput(n,"pt",16,52,function(){Va.apply(this,
+arguments)});mxUtils.br(n);this.addLabel(n,mxResources.get("left"),158);this.addLabel(n,mxResources.get("bottom"),87);this.addLabel(n,mxResources.get("right"),16);if(e.cellEditor.isContentEditing()){var Da=null,Ua=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),null,null,function(da){var t=""==da.value?120:parseInt(da.value);t=Math.max(0,isNaN(t)?120:t);null!=Da&&(e.cellEditor.restoreSelection(Da),Da=null);for(var z=e.getSelectedElement();null!=z&&z.nodeType!=mxConstants.NODETYPE_ELEMENT;)z=
+z.parentNode;null!=z&&z==e.cellEditor.textarea&&null!=e.cellEditor.textarea.firstChild&&("P"!=e.cellEditor.textarea.firstChild.nodeName&&(e.cellEditor.textarea.innerHTML="<p>"+e.cellEditor.textarea.innerHTML+"</p>"),z=e.cellEditor.textarea.firstChild);null!=z&&null!=e.cellEditor.textarea&&z!=e.cellEditor.textarea&&e.cellEditor.textarea.contains(z)&&(z.style.lineHeight=t/100);da.value=t+" %"},function(da){Ua=da;mxEvent.addListener(da,"mousedown",function(){document.activeElement==e.cellEditor.textarea&&
+(Da=e.cellEditor.saveSelection())});mxEvent.addListener(da,"touchstart",function(){document.activeElement==e.cellEditor.textarea&&(Da=e.cellEditor.saveSelection())});da.value="120 %"}));k=d.cloneNode(!1);k.style.paddingLeft="0px";n=this.editorUi.toolbar.addItems(["link","image"],k,!0);x=[this.editorUi.toolbar.addButton("geSprite-horizontalrule",mxResources.get("insertHorizontalRule"),function(){document.execCommand("inserthorizontalrule",!1)},k),this.editorUi.toolbar.addMenuFunctionInContainer(k,
+"geSprite-table",mxResources.get("table"),!1,mxUtils.bind(this,function(da){this.editorUi.menus.addInsertTableItem(da,null,null,!1)}))];this.styleButtons(n);this.styleButtons(x);n=this.createPanel();n.style.paddingTop="10px";n.style.paddingBottom="10px";n.appendChild(this.createTitle(mxResources.get("insert")));n.appendChild(k);a.appendChild(n);n=d.cloneNode(!1);n.style.paddingLeft="0px";x=[this.editorUi.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),mxUtils.bind(this,
+function(){try{null!=U&&e.insertColumn(U,null!=V?V.cellIndex:0)}catch(da){this.editorUi.handleError(da)}}),n),this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{null!=U&&e.insertColumn(U,null!=V?V.cellIndex+1:-1)}catch(da){this.editorUi.handleError(da)}}),n),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{null!=U&&null!=V&&e.deleteColumn(U,V.cellIndex)}catch(da){this.editorUi.handleError(da)}}),
+n),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{null!=U&&null!=aa&&e.insertRow(U,aa.sectionRowIndex)}catch(da){this.editorUi.handleError(da)}}),n),this.editorUi.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{null!=U&&null!=aa&&e.insertRow(U,aa.sectionRowIndex+1)}catch(da){this.editorUi.handleError(da)}}),n),this.editorUi.toolbar.addButton("geSprite-deleterow",
+mxResources.get("deleteRow"),mxUtils.bind(this,function(){try{null!=U&&null!=aa&&e.deleteRow(U,aa.sectionRowIndex)}catch(da){this.editorUi.handleError(da)}}),n)];this.styleButtons(x);x[2].style.marginRight="10px";k=this.createPanel();k.style.paddingTop="10px";k.style.paddingBottom="10px";k.appendChild(this.createTitle(mxResources.get("table")));k.appendChild(n);d=d.cloneNode(!1);d.style.paddingLeft="0px";x=[this.editorUi.toolbar.addButton("geSprite-strokecolor",mxResources.get("borderColor"),mxUtils.bind(this,
+function(da){if(null!=U){var t=U.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(z,A,E,H){return"#"+("0"+Number(A).toString(16)).substr(-2)+("0"+Number(E).toString(16)).substr(-2)+("0"+Number(H).toString(16)).substr(-2)});this.editorUi.pickColor(t,function(z){var A=null==V||null!=da&&mxEvent.isShiftDown(da)?U:V;e.processElements(A,function(E){E.style.border=null});null==z||z==mxConstants.NONE?(A.removeAttribute("border"),A.style.border="",A.style.borderCollapse=
+""):(A.setAttribute("border","1"),A.style.border="1px solid "+z,A.style.borderCollapse="collapse")})}}),d),this.editorUi.toolbar.addButton("geSprite-fillcolor",mxResources.get("backgroundColor"),mxUtils.bind(this,function(da){if(null!=U){var t=U.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(z,A,E,H){return"#"+("0"+Number(A).toString(16)).substr(-2)+("0"+Number(E).toString(16)).substr(-2)+("0"+Number(H).toString(16)).substr(-2)});this.editorUi.pickColor(t,
+function(z){var A=null==V||null!=da&&mxEvent.isShiftDown(da)?U:V;e.processElements(A,function(E){E.style.backgroundColor=null});A.style.backgroundColor=null==z||z==mxConstants.NONE?"":z})}}),d),this.editorUi.toolbar.addButton("geSprite-fit",mxResources.get("spacing"),function(){if(null!=U){var da=U.getAttribute("cellPadding")||0;da=new FilenameDialog(f,da,mxResources.get("apply"),mxUtils.bind(this,function(t){null!=t&&0<t.length?U.setAttribute("cellPadding",t):U.removeAttribute("cellPadding")}),mxResources.get("spacing"));
+f.showDialog(da.container,300,80,!0,!0);da.init()}},d),this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),function(){null!=U&&U.setAttribute("align","left")},d),this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),function(){null!=U&&U.setAttribute("align","center")},d),this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),function(){null!=U&&U.setAttribute("align","right")},d)];this.styleButtons(x);x[2].style.marginRight="10px";k.appendChild(d);
a.appendChild(k);var db=k}else a.appendChild(k),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(n);for(B=0;3>B;B++)(function(da){mxEvent.addListener(m[da],"click",function(){b(m[da],""==m[da].style.backgroundImage)})})(B);var Ta=mxUtils.bind(this,function(da,t,z){g=f.getSelectionState();da=mxUtils.getValue(g.style,mxConstants.STYLE_FONTSTYLE,0);b(m[0],(da&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);b(m[1],(da&mxConstants.FONT_ITALIC)==
-mxConstants.FONT_ITALIC);b(m[2],(da&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);u.firstChild.nodeValue=mxUtils.getValue(g.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont);b(r,"0"==mxUtils.getValue(g.style,mxConstants.STYLE_HORIZONTAL,"1"));if(z||document.activeElement!=T)da=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),T.value=isNaN(da)?"":da+" pt";da=mxUtils.getValue(g.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);
-b(C,da==mxConstants.ALIGN_LEFT);b(G,da==mxConstants.ALIGN_CENTER);b(J,da==mxConstants.ALIGN_RIGHT);da=mxUtils.getValue(g.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);b(N,da==mxConstants.ALIGN_TOP);b(Q,da==mxConstants.ALIGN_MIDDLE);b(R,da==mxConstants.ALIGN_BOTTOM);da=mxUtils.getValue(g.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);t=mxUtils.getValue(g.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);ba.value=da==mxConstants.ALIGN_LEFT&&
+mxConstants.FONT_ITALIC);b(m[2],(da&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);u.firstChild.nodeValue=mxUtils.getValue(g.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont);b(r,"0"==mxUtils.getValue(g.style,mxConstants.STYLE_HORIZONTAL,"1"));if(z||document.activeElement!=Q)da=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),Q.value=isNaN(da)?"":da+" pt";da=mxUtils.getValue(g.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);
+b(C,da==mxConstants.ALIGN_LEFT);b(F,da==mxConstants.ALIGN_CENTER);b(J,da==mxConstants.ALIGN_RIGHT);da=mxUtils.getValue(g.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);b(N,da==mxConstants.ALIGN_TOP);b(S,da==mxConstants.ALIGN_MIDDLE);b(T,da==mxConstants.ALIGN_BOTTOM);da=mxUtils.getValue(g.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);t=mxUtils.getValue(g.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);ea.value=da==mxConstants.ALIGN_LEFT&&
t==mxConstants.ALIGN_TOP?"topLeft":da==mxConstants.ALIGN_CENTER&&t==mxConstants.ALIGN_TOP?"top":da==mxConstants.ALIGN_RIGHT&&t==mxConstants.ALIGN_TOP?"topRight":da==mxConstants.ALIGN_LEFT&&t==mxConstants.ALIGN_BOTTOM?"bottomLeft":da==mxConstants.ALIGN_CENTER&&t==mxConstants.ALIGN_BOTTOM?"bottom":da==mxConstants.ALIGN_RIGHT&&t==mxConstants.ALIGN_BOTTOM?"bottomRight":da==mxConstants.ALIGN_LEFT?"left":da==mxConstants.ALIGN_RIGHT?"right":"center";da=mxUtils.getValue(g.style,mxConstants.STYLE_TEXT_DIRECTION,
-mxConstants.DEFAULT_TEXT_DIRECTION);da==mxConstants.TEXT_DIRECTION_RTL?S.value="rightToLeft":da==mxConstants.TEXT_DIRECTION_LTR?S.value="leftToRight":da==mxConstants.TEXT_DIRECTION_AUTO&&(S.value="automatic");if(z||document.activeElement!=Ha)da=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING,2)),Ha.value=isNaN(da)?"":da+" pt";if(z||document.activeElement!=Ka)da=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_TOP,0)),Ka.value=isNaN(da)?"":da+" pt";if(z||document.activeElement!=
-ra)da=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_RIGHT,0)),ra.value=isNaN(da)?"":da+" pt";if(z||document.activeElement!=Ca)da=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_BOTTOM,0)),Ca.value=isNaN(da)?"":da+" pt";if(z||document.activeElement!=ua)da=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_LEFT,0)),ua.value=isNaN(da)?"":da+" pt"});var $a=this.installInputHandler(Ha,mxConstants.STYLE_SPACING,2,-999,999," pt");var Xa=this.installInputHandler(Ka,
-mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");var Va=this.installInputHandler(ra,mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");var Ya=this.installInputHandler(Ca,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");var jb=this.installInputHandler(ua,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(T,Ta);this.addKeyHandler(Ha,Ta);this.addKeyHandler(Ka,Ta);this.addKeyHandler(ra,Ta);this.addKeyHandler(Ca,Ta);this.addKeyHandler(ua,Ta);d.getModel().addListener(mxEvent.CHANGE,Ta);
-this.listeners.push({destroy:function(){d.getModel().removeListener(Ta)}});Ta();if(d.cellEditor.isContentEditing()){var bb=!1;e=function(){bb||(bb=!0,window.setTimeout(function(){var da=d.getSelectedEditingElement();if(null!=da){var t=function(Aa,Ea){if(null!=Aa&&null!=Ea){if(Aa==Ea)return!0;if(Aa.length>Ea.length+1)return Aa.substring(Aa.length-Ea.length-1,Aa.length)=="-"+Ea}return!1},z=function(Aa){if(null!=d.getParentByName(da,Aa,d.cellEditor.textarea))return!0;for(var Ea=da;null!=Ea&&1==Ea.childNodes.length;)if(Ea=
-Ea.childNodes[0],Ea.nodeName==Aa)return!0;return!1},A=function(Aa){Aa=null!=Aa?Aa.fontSize:null;return null!=Aa&&"px"==Aa.substring(Aa.length-2)?parseFloat(Aa):mxConstants.DEFAULT_FONTSIZE},E=function(Aa,Ea,Ma){return null!=Ma.style&&null!=Ea?(Ea=Ea.lineHeight,null!=Ma.style.lineHeight&&"%"==Ma.style.lineHeight.substring(Ma.style.lineHeight.length-1)?parseInt(Ma.style.lineHeight)/100:"px"==Ea.substring(Ea.length-2)?parseFloat(Ea)/Aa:parseInt(Ea)):""},H=mxUtils.getCurrentStyle(da),K=A(H),X=E(K,H,da),
-ja=da.getElementsByTagName("*");if(0<ja.length&&window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11)for(var ea=window.getSelection(),ka=0;ka<ja.length;ka++)if(ea.containsNode(ja[ka],!0)){temp=mxUtils.getCurrentStyle(ja[ka]);K=Math.max(A(temp),K);var ta=E(K,temp,ja[ka]);if(ta!=X||isNaN(ta))X=""}null!=H&&(b(m[0],"bold"==H.fontWeight||400<H.fontWeight||z("B")||z("STRONG")),b(m[1],"italic"==H.fontStyle||z("I")||z("EM")),b(m[2],z("U")),b(Z,z("SUP")),b(P,z("SUB")),d.cellEditor.isTableSelected()?(b(ha,
-t(H.textAlign,"justify")),b(C,t(H.textAlign,"left")),b(G,t(H.textAlign,"center")),b(J,t(H.textAlign,"right"))):(z=d.cellEditor.align||mxUtils.getValue(g.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),t(H.textAlign,"justify")?(b(ha,t(H.textAlign,"justify")),b(C,!1),b(G,!1),b(J,!1)):(b(ha,!1),b(C,z==mxConstants.ALIGN_LEFT),b(G,z==mxConstants.ALIGN_CENTER),b(J,z==mxConstants.ALIGN_RIGHT))),U=d.getParentByName(da,"TABLE",d.cellEditor.textarea),ia=null==U?null:d.getParentByName(da,"TR",U),V=null==
-U?null:d.getParentByNames(da,["TD","TH"],U),db.style.display=null!=U?"":"none",document.activeElement!=T&&("FONT"==da.nodeName&&"4"==da.getAttribute("size")&&null!=ca?(da.removeAttribute("size"),da.style.fontSize=ca+" pt",ca=null):T.value=isNaN(K)?"":K+" pt",ta=parseFloat(X),isNaN(ta)?Ua.value="100 %":Ua.value=Math.round(100*ta)+" %"),null!=W&&(aa="rgba(0, 0, 0, 0)"==H.color||"transparent"==H.color?mxConstants.NONE:mxUtils.rgba2hex(H.color),W(aa,!0)),null!=fa&&(wa="rgba(0, 0, 0, 0)"==H.backgroundColor||
-"transparent"==H.backgroundColor?mxConstants.NONE:mxUtils.rgba2hex(H.backgroundColor),fa(wa,!0)),null!=u.firstChild&&(u.firstChild.nodeValue=Graph.stripQuotes(H.fontFamily)))}bb=!1},0))};(mxClient.IS_FF||mxClient.IS_EDGE||mxClient.IS_IE||mxClient.IS_IE11)&&mxEvent.addListener(d.cellEditor.textarea,"DOMSubtreeModified",e);mxEvent.addListener(d.cellEditor.textarea,"input",e);mxEvent.addListener(d.cellEditor.textarea,"touchend",e);mxEvent.addListener(d.cellEditor.textarea,"mouseup",e);mxEvent.addListener(d.cellEditor.textarea,
-"keyup",e);this.listeners.push({destroy:function(){}});e()}return a};StyleFormatPanel=function(a,b,f){BaseFormatPanel.call(this,a,b,f);this.init()};mxUtils.extend(StyleFormatPanel,BaseFormatPanel);StyleFormatPanel.prototype.defaultStrokeColor="black";
+mxConstants.DEFAULT_TEXT_DIRECTION);da==mxConstants.TEXT_DIRECTION_RTL?R.value="rightToLeft":da==mxConstants.TEXT_DIRECTION_LTR?R.value="leftToRight":da==mxConstants.TEXT_DIRECTION_AUTO&&(R.value="automatic");if(z||document.activeElement!=Ha)da=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING,2)),Ha.value=isNaN(da)?"":da+" pt";if(z||document.activeElement!=Ka)da=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_TOP,0)),Ka.value=isNaN(da)?"":da+" pt";if(z||document.activeElement!=
+sa)da=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_RIGHT,0)),sa.value=isNaN(da)?"":da+" pt";if(z||document.activeElement!=Ca)da=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_BOTTOM,0)),Ca.value=isNaN(da)?"":da+" pt";if(z||document.activeElement!=va)da=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_LEFT,0)),va.value=isNaN(da)?"":da+" pt"});var $a=this.installInputHandler(Ha,mxConstants.STYLE_SPACING,2,-999,999," pt");var Xa=this.installInputHandler(Ka,
+mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");var Va=this.installInputHandler(sa,mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");var Ya=this.installInputHandler(Ca,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");var jb=this.installInputHandler(va,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(Q,Ta);this.addKeyHandler(Ha,Ta);this.addKeyHandler(Ka,Ta);this.addKeyHandler(sa,Ta);this.addKeyHandler(Ca,Ta);this.addKeyHandler(va,Ta);e.getModel().addListener(mxEvent.CHANGE,Ta);
+this.listeners.push({destroy:function(){e.getModel().removeListener(Ta)}});Ta();if(e.cellEditor.isContentEditing()){var bb=!1;d=function(){bb||(bb=!0,window.setTimeout(function(){var da=e.getSelectedEditingElement();if(null!=da){var t=function(Aa,Ea){if(null!=Aa&&null!=Ea){if(Aa==Ea)return!0;if(Aa.length>Ea.length+1)return Aa.substring(Aa.length-Ea.length-1,Aa.length)=="-"+Ea}return!1},z=function(Aa){if(null!=e.getParentByName(da,Aa,e.cellEditor.textarea))return!0;for(var Ea=da;null!=Ea&&1==Ea.childNodes.length;)if(Ea=
+Ea.childNodes[0],Ea.nodeName==Aa)return!0;return!1},A=function(Aa){Aa=null!=Aa?Aa.fontSize:null;return null!=Aa&&"px"==Aa.substring(Aa.length-2)?parseFloat(Aa):mxConstants.DEFAULT_FONTSIZE},E=function(Aa,Ea,Ma){return null!=Ma.style&&null!=Ea?(Ea=Ea.lineHeight,null!=Ma.style.lineHeight&&"%"==Ma.style.lineHeight.substring(Ma.style.lineHeight.length-1)?parseInt(Ma.style.lineHeight)/100:"px"==Ea.substring(Ea.length-2)?parseFloat(Ea)/Aa:parseInt(Ea)):""},H=mxUtils.getCurrentStyle(da),L=A(H),W=E(L,H,da),
+ha=da.getElementsByTagName("*");if(0<ha.length&&window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11)for(var fa=window.getSelection(),ja=0;ja<ha.length;ja++)if(fa.containsNode(ha[ja],!0)){temp=mxUtils.getCurrentStyle(ha[ja]);L=Math.max(A(temp),L);var ua=E(L,temp,ha[ja]);if(ua!=W||isNaN(ua))W=""}null!=H&&(b(m[0],"bold"==H.fontWeight||400<H.fontWeight||z("B")||z("STRONG")),b(m[1],"italic"==H.fontStyle||z("I")||z("EM")),b(m[2],z("U")),b(Z,z("SUP")),b(P,z("SUB")),e.cellEditor.isTableSelected()?(b(ia,
+t(H.textAlign,"justify")),b(C,t(H.textAlign,"left")),b(F,t(H.textAlign,"center")),b(J,t(H.textAlign,"right"))):(z=e.cellEditor.align||mxUtils.getValue(g.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),t(H.textAlign,"justify")?(b(ia,t(H.textAlign,"justify")),b(C,!1),b(F,!1),b(J,!1)):(b(ia,!1),b(C,z==mxConstants.ALIGN_LEFT),b(F,z==mxConstants.ALIGN_CENTER),b(J,z==mxConstants.ALIGN_RIGHT))),U=e.getParentByName(da,"TABLE",e.cellEditor.textarea),aa=null==U?null:e.getParentByName(da,"TR",U),V=null==
+U?null:e.getParentByNames(da,["TD","TH"],U),db.style.display=null!=U?"":"none",document.activeElement!=Q&&("FONT"==da.nodeName&&"4"==da.getAttribute("size")&&null!=ba?(da.removeAttribute("size"),da.style.fontSize=ba+" pt",ba=null):Q.value=isNaN(L)?"":L+" pt",ua=parseFloat(W),isNaN(ua)?Ua.value="100 %":Ua.value=Math.round(100*ua)+" %"),null!=X&&(ca="rgba(0, 0, 0, 0)"==H.color||"transparent"==H.color?mxConstants.NONE:mxUtils.rgba2hex(H.color),X(ca,!0)),null!=la&&(ra="rgba(0, 0, 0, 0)"==H.backgroundColor||
+"transparent"==H.backgroundColor?mxConstants.NONE:mxUtils.rgba2hex(H.backgroundColor),la(ra,!0)),null!=u.firstChild&&(u.firstChild.nodeValue=Graph.stripQuotes(H.fontFamily)))}bb=!1},0))};(mxClient.IS_FF||mxClient.IS_EDGE||mxClient.IS_IE||mxClient.IS_IE11)&&mxEvent.addListener(e.cellEditor.textarea,"DOMSubtreeModified",d);mxEvent.addListener(e.cellEditor.textarea,"input",d);mxEvent.addListener(e.cellEditor.textarea,"touchend",d);mxEvent.addListener(e.cellEditor.textarea,"mouseup",d);mxEvent.addListener(e.cellEditor.textarea,
+"keyup",d);this.listeners.push({destroy:function(){}});d()}return a};StyleFormatPanel=function(a,b,f){BaseFormatPanel.call(this,a,b,f);this.init()};mxUtils.extend(StyleFormatPanel,BaseFormatPanel);StyleFormatPanel.prototype.defaultStrokeColor="black";
StyleFormatPanel.prototype.init=function(){var a=this.editorUi.getSelectionState();!a.containsLabel&&0<a.cells.length&&(a.containsImage&&1==a.vertices.length&&"image"==a.style.shape&&null!=a.style.image&&"data:image/svg+xml;"==a.style.image.substring(0,19)&&this.container.appendChild(this.addSvgStyles(this.createPanel())),a.fill&&this.container.appendChild(this.addFill(this.createPanel())),this.container.appendChild(this.addStroke(this.createPanel())),this.container.appendChild(this.addLineJumps(this.createPanel())),
a=this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_OPACITY),a.style.paddingTop="8px",a.style.paddingBottom="8px",this.container.appendChild(a),this.container.appendChild(this.addEffects(this.createPanel())));a=this.addEditOps(this.createPanel());null!=a.firstChild&&mxUtils.br(a);this.container.appendChild(this.addStyleOps(a))};
StyleFormatPanel.prototype.getCssRules=function(a){var b=document.implementation.createHTMLDocument(""),f=document.createElement("style");mxUtils.setTextContent(f,a);b.body.appendChild(f);return f.sheet.cssRules};
-StyleFormatPanel.prototype.addSvgStyles=function(a){var b=this.editorUi.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="6px";a.style.fontWeight="bold";a.style.display="none";try{var f=b.style.editableCssRules;if(null!=f){var d=new RegExp(f),g=b.style.image.substring(b.style.image.indexOf(",")+1),e=window.atob?atob(g):Base64.decode(g,!0),k=mxUtils.parseXml(e);if(null!=k){var n=k.getElementsByTagName("style");for(b=0;b<n.length;b++){var u=this.getCssRules(mxUtils.getTextContent(n[b]));
-for(f=0;f<u.length;f++)this.addSvgRule(a,u[f],k,n[b],u,f,d)}}}}catch(m){}return a};
-StyleFormatPanel.prototype.addSvgRule=function(a,b,f,d,g,e,k){var n=this.editorUi,u=n.editor.graph;k.test(b.selectorText)&&(k=mxUtils.bind(this,function(m,r,x){var B=mxUtils.trim(m.style[r]);""!=B&&"url("!=B.substring(0,4)&&(m=this.createColorOption(x+" "+m.selectorText,function(){var C=B;return(C=C.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===C.length?"#"+("0"+parseInt(C[1],10).toString(16)).slice(-2)+("0"+parseInt(C[2],10).toString(16)).slice(-2)+("0"+parseInt(C[3],
-10).toString(16)).slice(-2):""},mxUtils.bind(this,function(C){g[e].style[r]=C;C="";for(var G=0;G<g.length;G++)C+=g[G].cssText+" ";d.textContent=C;C=mxUtils.getXml(f.documentElement);u.setCellStyles(mxConstants.STYLE_IMAGE,"data:image/svg+xml,"+(window.btoa?btoa(C):Base64.encode(C,!0)),n.getSelectionState().cells)}),"#ffffff",{install:function(C){},destroy:function(){}}),a.appendChild(m),a.style.display="")}),k(b,"fill",mxResources.get("fill")),k(b,"stroke",mxResources.get("line")),k(b,"stop-color",
+StyleFormatPanel.prototype.addSvgStyles=function(a){var b=this.editorUi.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="6px";a.style.fontWeight="bold";a.style.display="none";try{var f=b.style.editableCssRules;if(null!=f){var e=new RegExp(f),g=b.style.image.substring(b.style.image.indexOf(",")+1),d=window.atob?atob(g):Base64.decode(g,!0),k=mxUtils.parseXml(d);if(null!=k){var n=k.getElementsByTagName("style");for(b=0;b<n.length;b++){var u=this.getCssRules(mxUtils.getTextContent(n[b]));
+for(f=0;f<u.length;f++)this.addSvgRule(a,u[f],k,n[b],u,f,e)}}}}catch(m){}return a};
+StyleFormatPanel.prototype.addSvgRule=function(a,b,f,e,g,d,k){var n=this.editorUi,u=n.editor.graph;k.test(b.selectorText)&&(k=mxUtils.bind(this,function(m,r,x){var B=mxUtils.trim(m.style[r]);""!=B&&"url("!=B.substring(0,4)&&(m=this.createColorOption(x+" "+m.selectorText,function(){var C=B;return(C=C.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===C.length?"#"+("0"+parseInt(C[1],10).toString(16)).slice(-2)+("0"+parseInt(C[2],10).toString(16)).slice(-2)+("0"+parseInt(C[3],
+10).toString(16)).slice(-2):""},mxUtils.bind(this,function(C){g[d].style[r]=C;C="";for(var F=0;F<g.length;F++)C+=g[F].cssText+" ";e.textContent=C;C=mxUtils.getXml(f.documentElement);u.setCellStyles(mxConstants.STYLE_IMAGE,"data:image/svg+xml,"+(window.btoa?btoa(C):Base64.encode(C,!0)),n.getSelectionState().cells)}),"#ffffff",{install:function(C){},destroy:function(){}}),a.appendChild(m),a.style.display="")}),k(b,"fill",mxResources.get("fill")),k(b,"stroke",mxResources.get("line")),k(b,"stop-color",
mxResources.get("gradient")))};
-StyleFormatPanel.prototype.addEditOps=function(a){var b=this.editorUi.getSelectionState(),f=null;1==b.cells.length&&(f=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(d){this.editorUi.actions.get("editStyle").funct()})),f.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),f.style.width="210px",f.style.marginBottom="2px",a.appendChild(f));b.image&&0<b.cells.length&&(b=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,
-function(d){this.editorUi.actions.get("image").funct()})),b.setAttribute("title",mxResources.get("editImage")),b.style.marginBottom="2px",null==f?b.style.width="210px":(f.style.width="104px",b.style.width="104px",b.style.marginLeft="2px"),a.appendChild(b));return a};
-StyleFormatPanel.prototype.addFill=function(a){var b=this.editorUi,f=b.editor.graph,d=b.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="6px";var g=document.createElement("select");g.style.position="absolute";g.style.left="104px";g.style.width="70px";g.style.height="22px";g.style.padding="0px";g.style.marginTop="-3px";g.style.borderRadius="4px";g.style.border="1px solid rgb(160, 160, 160)";g.style.boxSizing="border-box";var e=g.cloneNode(!1);mxEvent.addListener(g,"click",function(C){mxEvent.consume(C)});
-mxEvent.addListener(e,"click",function(C){mxEvent.consume(C)});var k=1<=d.vertices.length?f.stylesheet.getDefaultVertexStyle():f.stylesheet.getDefaultEdgeStyle(),n=this.createCellColorOption(mxResources.get("gradient"),mxConstants.STYLE_GRADIENTCOLOR,null!=k[mxConstants.STYLE_GRADIENTCOLOR]?k[mxConstants.STYLE_GRADIENTCOLOR]:"#ffffff",function(C){g.style.display=null==C||C==mxConstants.NONE?"none":""},function(C){f.updateCellStyles({gradientColor:C},f.getSelectionCells())}),u="image"==d.style.shape?
-mxConstants.STYLE_IMAGE_BACKGROUND:mxConstants.STYLE_FILLCOLOR;k=this.createCellColorOption(mxResources.get("fill"),u,"default",null,mxUtils.bind(this,function(C){f.setCellStyles(u,C,d.cells)}),f.shapeBackgroundColor);k.style.fontWeight="bold";var m=mxUtils.getValue(d.style,u,null);n.style.display=null!=m&&m!=mxConstants.NONE&&d.fill&&"image"!=d.style.shape?"":"none";var r=[mxConstants.DIRECTION_NORTH,mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_RADIAL];
-for(m=0;m<r.length;m++){var x=document.createElement("option");x.setAttribute("value",r[m]);mxUtils.write(x,mxResources.get(r[m]));g.appendChild(x)}n.appendChild(g);for(m=0;m<Editor.roughFillStyles.length;m++)r=document.createElement("option"),r.setAttribute("value",Editor.roughFillStyles[m].val),mxUtils.write(r,Editor.roughFillStyles[m].dispName),e.appendChild(r);k.appendChild(e);var B=mxUtils.bind(this,function(){d=b.getSelectionState();var C=mxUtils.getValue(d.style,mxConstants.STYLE_GRADIENT_DIRECTION,
-mxConstants.DIRECTION_SOUTH),G=mxUtils.getValue(d.style,"fillStyle","auto");""==C&&(C=mxConstants.DIRECTION_SOUTH);g.value=C;e.value=G;a.style.display=d.fill?"":"none";C=mxUtils.getValue(d.style,u,null);d.fill&&null!=C&&C!=mxConstants.NONE&&"filledEdge"!=d.style.shape?(e.style.display="1"==d.style.sketch?"":"none",n.style.display=d.containsImage||"1"==d.style.sketch&&"solid"!=G&&"auto"!=G?"none":""):(e.style.display="none",n.style.display="none")});f.getModel().addListener(mxEvent.CHANGE,B);this.listeners.push({destroy:function(){f.getModel().removeListener(B)}});
-B();mxEvent.addListener(g,"change",function(C){f.setCellStyles(mxConstants.STYLE_GRADIENT_DIRECTION,g.value,d.cells);b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_GRADIENT_DIRECTION],"values",[g.value],"cells",d.cells));mxEvent.consume(C)});mxEvent.addListener(e,"change",function(C){f.setCellStyles("fillStyle",e.value,d.cells);b.fireEvent(new mxEventObject("styleChanged","keys",["fillStyle"],"values",[e.value],"cells",d.cells));mxEvent.consume(C)});a.appendChild(k);a.appendChild(n);
+StyleFormatPanel.prototype.addEditOps=function(a){var b=this.editorUi.getSelectionState(),f=null;1==b.cells.length&&(f=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(e){this.editorUi.actions.get("editStyle").funct()})),f.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),f.style.width="210px",f.style.marginBottom="2px",a.appendChild(f));b.image&&0<b.cells.length&&(b=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,
+function(e){this.editorUi.actions.get("image").funct()})),b.setAttribute("title",mxResources.get("editImage")),b.style.marginBottom="2px",null==f?b.style.width="210px":(f.style.width="104px",b.style.width="104px",b.style.marginLeft="2px"),a.appendChild(b));return a};
+StyleFormatPanel.prototype.addFill=function(a){var b=this.editorUi,f=b.editor.graph,e=b.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="6px";var g=document.createElement("select");g.style.position="absolute";g.style.left="104px";g.style.width="70px";g.style.height="22px";g.style.padding="0px";g.style.marginTop="-3px";g.style.borderRadius="4px";g.style.border="1px solid rgb(160, 160, 160)";g.style.boxSizing="border-box";var d=g.cloneNode(!1);mxEvent.addListener(g,"click",function(C){mxEvent.consume(C)});
+mxEvent.addListener(d,"click",function(C){mxEvent.consume(C)});var k=1<=e.vertices.length?f.stylesheet.getDefaultVertexStyle():f.stylesheet.getDefaultEdgeStyle(),n=this.createCellColorOption(mxResources.get("gradient"),mxConstants.STYLE_GRADIENTCOLOR,null!=k[mxConstants.STYLE_GRADIENTCOLOR]?k[mxConstants.STYLE_GRADIENTCOLOR]:"#ffffff",function(C){g.style.display=null==C||C==mxConstants.NONE?"none":""},function(C){f.updateCellStyles({gradientColor:C},f.getSelectionCells())}),u="image"==e.style.shape?
+mxConstants.STYLE_IMAGE_BACKGROUND:mxConstants.STYLE_FILLCOLOR;k=this.createCellColorOption(mxResources.get("fill"),u,"default",null,mxUtils.bind(this,function(C){f.setCellStyles(u,C,e.cells)}),f.shapeBackgroundColor);k.style.fontWeight="bold";var m=mxUtils.getValue(e.style,u,null);n.style.display=null!=m&&m!=mxConstants.NONE&&e.fill&&"image"!=e.style.shape?"":"none";var r=[mxConstants.DIRECTION_NORTH,mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_RADIAL];
+for(m=0;m<r.length;m++){var x=document.createElement("option");x.setAttribute("value",r[m]);mxUtils.write(x,mxResources.get(r[m]));g.appendChild(x)}n.appendChild(g);for(m=0;m<Editor.roughFillStyles.length;m++)r=document.createElement("option"),r.setAttribute("value",Editor.roughFillStyles[m].val),mxUtils.write(r,Editor.roughFillStyles[m].dispName),d.appendChild(r);k.appendChild(d);var B=mxUtils.bind(this,function(){e=b.getSelectionState();var C=mxUtils.getValue(e.style,mxConstants.STYLE_GRADIENT_DIRECTION,
+mxConstants.DIRECTION_SOUTH),F=mxUtils.getValue(e.style,"fillStyle","auto");""==C&&(C=mxConstants.DIRECTION_SOUTH);g.value=C;d.value=F;a.style.display=e.fill?"":"none";C=mxUtils.getValue(e.style,u,null);e.fill&&null!=C&&C!=mxConstants.NONE&&"filledEdge"!=e.style.shape?(d.style.display="1"==e.style.sketch?"":"none",n.style.display=e.containsImage||"1"==e.style.sketch&&"solid"!=F&&"auto"!=F?"none":""):(d.style.display="none",n.style.display="none")});f.getModel().addListener(mxEvent.CHANGE,B);this.listeners.push({destroy:function(){f.getModel().removeListener(B)}});
+B();mxEvent.addListener(g,"change",function(C){f.setCellStyles(mxConstants.STYLE_GRADIENT_DIRECTION,g.value,e.cells);b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_GRADIENT_DIRECTION],"values",[g.value],"cells",e.cells));mxEvent.consume(C)});mxEvent.addListener(d,"change",function(C){f.setCellStyles("fillStyle",d.value,e.cells);b.fireEvent(new mxEventObject("styleChanged","keys",["fillStyle"],"values",[d.value],"cells",e.cells));mxEvent.consume(C)});a.appendChild(k);a.appendChild(n);
k=this.getCustomColors();for(m=0;m<k.length;m++)a.appendChild(this.createCellColorOption(k[m].title,k[m].key,k[m].defaultValue));return a};StyleFormatPanel.prototype.getCustomColors=function(){var a=[];this.editorUi.getSelectionState().swimlane&&a.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return a};
-StyleFormatPanel.prototype.addStroke=function(a){function b(W){var aa=parseFloat(D.value);aa=Math.min(999,Math.max(0,isNaN(aa)?1:aa));aa!=mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)&&(g.setCellStyles(mxConstants.STYLE_STROKEWIDTH,aa,e.cells),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[aa],"cells",e.cells)));D.value=aa+" pt";mxEvent.consume(W)}function f(W){var aa=parseFloat(N.value);aa=Math.min(999,Math.max(0,isNaN(aa)?1:aa));aa!=mxUtils.getValue(e.style,
-mxConstants.STYLE_STROKEWIDTH,1)&&(g.setCellStyles(mxConstants.STYLE_STROKEWIDTH,aa,e.cells),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[aa],"cells",e.cells)));N.value=aa+" pt";mxEvent.consume(W)}var d=this.editorUi,g=d.editor.graph,e=d.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="4px";a.style.whiteSpace="normal";var k=document.createElement("div");k.style.fontWeight="bold";e.stroke||(k.style.display="none");var n=document.createElement("select");
-n.style.position="absolute";n.style.height="22px";n.style.padding="0px";n.style.marginTop="-3px";n.style.boxSizing="border-box";n.style.left="94px";n.style.width="80px";n.style.border="1px solid rgb(160, 160, 160)";n.style.borderRadius="4px";for(var u=["sharp","rounded","curved"],m=0;m<u.length;m++){var r=document.createElement("option");r.setAttribute("value",u[m]);mxUtils.write(r,mxResources.get(u[m]));n.appendChild(r)}mxEvent.addListener(n,"change",function(W){g.getModel().beginUpdate();try{var aa=
-[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],oa=["0",null];"rounded"==n.value?oa=["1",null]:"curved"==n.value&&(oa=[null,"1"]);for(var sa=0;sa<aa.length;sa++)g.setCellStyles(aa[sa],oa[sa],e.cells);d.fireEvent(new mxEventObject("styleChanged","keys",aa,"values",oa,"cells",e.cells))}finally{g.getModel().endUpdate()}mxEvent.consume(W)});mxEvent.addListener(n,"click",function(W){mxEvent.consume(W)});var x="image"==e.style.shape?mxConstants.STYLE_IMAGE_BORDER:mxConstants.STYLE_STROKECOLOR;u="image"==
-e.style.shape?mxResources.get("border"):mxResources.get("line");u=this.createCellColorOption(u,x,"default",null,mxUtils.bind(this,function(W){g.setCellStyles(x,W,e.cells)}),g.shapeForegroundColor);u.appendChild(n);k.appendChild(u);var B=k.cloneNode(!1);B.style.fontWeight="normal";B.style.whiteSpace="nowrap";B.style.position="relative";B.style.paddingLeft="0px";B.style.marginBottom="2px";B.style.overflow="hidden";B.style.marginTop="2px";B.style.width="220px";B.className="geToolbarContainer";var C=
-mxUtils.bind(this,function(W,aa,oa,sa,Ka){W=this.editorUi.menus.styleChange(W,"",sa,Ka,"geIcon",null);sa=document.createElement("div");sa.style.width=aa+"px";sa.style.height="1px";sa.style.borderBottom="1px "+oa+" "+this.defaultStrokeColor;sa.style.paddingTop="6px";W.firstChild.firstChild.style.padding="0px 4px 0px 4px";W.firstChild.firstChild.style.width=aa+"px";W.firstChild.firstChild.appendChild(sa);return W});m=this.editorUi.toolbar.addMenuFunctionInContainer(B,"geSprite-orthogonal",mxResources.get("pattern"),
-!1,mxUtils.bind(this,function(W){C(W,75,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));C(W,75,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed"));C(W,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");C(W,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],
-["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");C(W,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")}));var G=B.cloneNode(!1),J=this.editorUi.toolbar.addMenuFunctionInContainer(G,"geSprite-connection",mxResources.get("connection"),!1,mxUtils.bind(this,function(W){this.editorUi.menus.styleChange(W,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],[null,
-null,null,null],"geIcon geSprite geSprite-connection",null,!0).setAttribute("title",mxResources.get("line"));this.editorUi.menus.styleChange(W,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["link",null,null,null],"geIcon geSprite geSprite-linkedge",null,!0).setAttribute("title",mxResources.get("link"));this.editorUi.menus.styleChange(W,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["flexArrow",null,null,null],
-"geIcon geSprite geSprite-arrow",null,!0).setAttribute("title",mxResources.get("arrow"));this.editorUi.menus.styleChange(W,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["arrow",null,null,null],"geIcon geSprite geSprite-simplearrow",null,!0).setAttribute("title",mxResources.get("simpleArrow"))}));r=this.editorUi.toolbar.addMenuFunctionInContainer(G,"geSprite-orthogonal",mxResources.get("pattern"),!1,mxUtils.bind(this,function(W){C(W,33,"solid",[mxConstants.STYLE_DASHED,
-mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));C(W,33,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed"));C(W,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");C(W,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+
-" (2)");C(W,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")}));u=B.cloneNode(!1);var D=document.createElement("input");D.style.position="absolute";D.style.textAlign="right";D.style.marginTop="2px";D.style.width="52px";D.style.height="21px";D.style.left="146px";D.style.border="1px solid rgb(160, 160, 160)";D.style.borderRadius="4px";D.style.boxSizing="border-box";D.setAttribute("title",mxResources.get("linewidth"));
-B.appendChild(D);var N=D.cloneNode(!0);G.appendChild(N);var Q=this.createStepper(D,b,1,9);Q.style.display=D.style.display;Q.style.marginTop="2px";Q.style.left="198px";B.appendChild(Q);Q=this.createStepper(N,f,1,9);Q.style.display=N.style.display;Q.style.marginTop="2px";N.style.position="absolute";Q.style.left="198px";G.appendChild(Q);mxEvent.addListener(D,"blur",b);mxEvent.addListener(D,"change",b);mxEvent.addListener(N,"blur",f);mxEvent.addListener(N,"change",f);var R=this.editorUi.toolbar.addMenuFunctionInContainer(u,
-"geSprite-orthogonal",mxResources.get("waypoints"),!1,mxUtils.bind(this,function(W){"arrow"!=e.style.shape&&(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],"geIcon geSprite geSprite-straight",null,!0).setAttribute("title",mxResources.get("straight")),this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle",null,null],"geIcon geSprite geSprite-orthogonal",
-null,!0).setAttribute("title",mxResources.get("orthogonal")),this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalelbow",null,!0).setAttribute("title",mxResources.get("simple")),this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",
-"vertical",null,null],"geIcon geSprite geSprite-verticalelbow",null,!0).setAttribute("title",mxResources.get("simple")),this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalisometric",null,!0).setAttribute("title",mxResources.get("isometric")),this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,
-mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalisometric",null,!0).setAttribute("title",mxResources.get("isometric")),"connector"==e.style.shape&&this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle","1",null],"geIcon geSprite geSprite-curved",null,!0).setAttribute("title",mxResources.get("curved")),this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_EDGE,
-mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["entityRelationEdgeStyle",null,null],"geIcon geSprite geSprite-entity",null,!0).setAttribute("title",mxResources.get("entityRelation")))})),P=this.editorUi.toolbar.addMenuFunctionInContainer(u,"geSprite-startclassic",mxResources.get("linestart"),!1,mxUtils.bind(this,function(W){if("connector"==e.style.shape||"flexArrow"==e.style.shape||"filledEdge"==e.style.shape){var aa=this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,
-"startFill"],[mxConstants.NONE,0],"geIcon",null,!1);aa.setAttribute("title",mxResources.get("none"));var oa=document.createElement("font");oa.style.fontSize="10px";mxUtils.write(oa,mxResources.get("none"));aa.firstChild.firstChild.appendChild(oa);"connector"==e.style.shape||"filledEdge"==e.style.shape?(Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC,1],null,null,!1,Format.classicFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,
-"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC_THIN,1],null,null,!1,Format.classicThinFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OPEN,0],null,null,!1,Format.openFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OPEN_THIN,0],null,null,!1,Format.openThinFilledMarkerImage.src)),
-Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],["openAsync",0],null,null,!1,Format.openAsyncFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK,1],null,null,!1,Format.blockFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK_THIN,1],null,
-null,!1,Format.blockThinFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],["async",1],null,null,!1,Format.asyncFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OVAL,1],null,null,!1,Format.ovalFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],
-[mxConstants.ARROW_DIAMOND,1],null,null,!1,Format.diamondFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_DIAMOND_THIN,1],null,null,!1,Format.diamondThinFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC,0],null,null,!1,Format.classicMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,
-"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC_THIN,0],null,null,!1,Format.classicThinMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK,0],null,null,!1,Format.blockMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK_THIN,0],null,null,!1,Format.blockThinMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,
-"",[mxConstants.STYLE_STARTARROW,"startFill"],["async",0],null,null,!1,Format.asyncMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OVAL,0],null,null,!1,Format.ovalMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_DIAMOND,0],null,null,!1,Format.diamondMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,
-"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_DIAMOND_THIN,0],null,null,!1,Format.diamondThinMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],["box",0],null,null,!1,Format.boxMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],["halfCircle",0],null,null,!1,Format.halfCircleMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,
-"",[mxConstants.STYLE_STARTARROW,"startFill"],["dash",0],null,null,!1,Format.dashMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],["cross",0],null,null,!1,Format.crossMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],["circlePlus",0],null,null,!1,Format.circlePlusMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,
-"startFill"],["circle",1],null,null,!1,Format.circleMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],["baseDash",0],null,null,!1,Format.baseDashMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERone",0],null,null,!1,Format.EROneMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],
-["ERmandOne",0],null,null,!1,Format.ERmandOneMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERmany",0],null,null,!1,Format.ERmanyMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERoneToMany",0],null,null,!1,Format.ERoneToManyMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],
-["ERzeroToOne",0],null,null,!1,Format.ERzeroToOneMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERzeroToMany",0],null,null,!1,Format.ERzeroToManyMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],["doubleBlock",0],null,null,!1,Format.doubleBlockMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,
-"startFill"],["doubleBlock",1],null,null,!1,Format.doubleBlockFilledMarkerImage.src))):this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-startblocktrans",null,!1).setAttribute("title",mxResources.get("block"));W.div.style.width="40px";window.setTimeout(mxUtils.bind(this,function(){null!=W.div&&mxUtils.fit(W.div)}),0)}})),Z=this.editorUi.toolbar.addMenuFunctionInContainer(u,"geSprite-endclassic",mxResources.get("lineend"),!1,
-mxUtils.bind(this,function(W){if("connector"==e.style.shape||"flexArrow"==e.style.shape||"filledEdge"==e.style.shape){var aa=this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.NONE,0],"geIcon",null,!1);aa.setAttribute("title",mxResources.get("none"));var oa=document.createElement("font");oa.style.fontSize="10px";mxUtils.write(oa,mxResources.get("none"));aa.firstChild.firstChild.appendChild(oa);"connector"==e.style.shape||"filledEdge"==e.style.shape?(Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,
-"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC,1],null,null,!1,Format.classicFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC_THIN,1],null,null,!1,Format.classicThinFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OPEN,0],null,null,!1,Format.openFilledMarkerImage.src),
-"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OPEN_THIN,0],null,null,!1,Format.openThinFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["openAsync",0],null,null,!1,Format.openAsyncFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],
-[mxConstants.ARROW_BLOCK,1],null,null,!1,Format.blockFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_BLOCK_THIN,1],null,null,!1,Format.blockThinFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["async",1],null,null,!1,Format.asyncFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,
-"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OVAL,1],null,null,!1,Format.ovalFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND,1],null,null,!1,Format.diamondFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND_THIN,1],null,null,!1,Format.diamondThinFilledMarkerImage.src),
-"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC,0],null,null,!1,Format.classicMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC_THIN,0],null,null,!1,Format.classicThinMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],
-[mxConstants.ARROW_BLOCK,0],null,null,!1,Format.blockMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_BLOCK_THIN,0],null,null,!1,Format.blockThinMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["async",0],null,null,!1,Format.asyncMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,
-"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OVAL,0],null,null,!1,Format.ovalMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND,0],null,null,!1,Format.diamondMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND_THIN,0],null,null,!1,Format.diamondThinMarkerImage.src),
-"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["box",0],null,null,!1,Format.boxMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["halfCircle",0],null,null,!1,Format.halfCircleMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["dash",0],null,null,!1,Format.dashMarkerImage.src),
-"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["cross",0],null,null,!1,Format.crossMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["circlePlus",0],null,null,!1,Format.circlePlusMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["circle",0],null,null,!1,Format.circleMarkerImage.src),
-"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["baseDash",0],null,null,!1,Format.baseDashMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERone",0],null,null,!1,Format.EROneMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmandOne",0],null,null,!1,Format.ERmandOneMarkerImage.src),
-"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmany",0],null,null,!1,Format.ERmanyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERoneToMany",0],null,null,!1,Format.ERoneToManyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToOne",0],null,null,
-!1,Format.ERzeroToOneMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToMany",0],null,null,!1,Format.ERzeroToManyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["doubleBlock",0],null,null,!1,Format.doubleBlockMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,
-"endFill"],["doubleBlock",1],null,null,!1,Format.doubleBlockFilledMarkerImage.src),"scaleX(-1)")):this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-endblocktrans",null,!1).setAttribute("title",mxResources.get("block"));W.div.style.width="40px";window.setTimeout(mxUtils.bind(this,function(){null!=W.div&&mxUtils.fit(W.div)}),0)}}));Q=this.addArrow(J,8);Q.nextSibling.style.position="relative";Q.nextSibling.style.top="-2px";Q=this.addArrow(R,
-10);Q.nextSibling.style.position="relative";Q.nextSibling.style.top="-3px";R.getElementsByTagName("img")[0].style.top="-1px";this.addArrow(P,null,!0);this.addArrow(Z,null,!0);Q=this.addArrow(m,9);Q.className="geIcon";Q.style.width="auto";var U=this.addArrow(r,9);U.className="geIcon";U.style.width="22px";var V=document.createElement("div");V.style.width="84px";V.style.height="1px";V.style.borderBottom="1px solid "+this.defaultStrokeColor;V.style.marginBottom="7px";Q.appendChild(V);var ia=document.createElement("div");
-ia.style.width="23px";ia.style.height="1px";ia.style.borderBottom="1px solid "+this.defaultStrokeColor;ia.style.marginBottom="7px";U.appendChild(ia);m.style.height="15px";m.style.marginLeft="16px";r.style.height="15px";r.style.marginLeft="3px";J.style.marginLeft="10px";J.style.height="15px";R.style.marginLeft="10px";R.style.height="17px";P.style.marginLeft="3px";P.style.height="17px";Z.style.marginLeft="3px";Z.style.height="17px";a.appendChild(k);a.appendChild(G);a.appendChild(B);m=B.cloneNode(!1);
-m.style.padding="5px 4px 6px 0px";m.style.fontWeight="normal";r=document.createElement("div");r.style.position="absolute";r.style.marginLeft="0px";r.style.marginBottom="12px";r.style.marginTop="2px";r.style.fontWeight="normal";r.style.width="76px";mxUtils.write(r,mxResources.get("lineend"));m.appendChild(r);var ha=this.addUnitInput(m,"pt",98,52,function(){fa.apply(this,arguments)}),ba=this.addUnitInput(m,"pt",30,52,function(){ca.apply(this,arguments)});mxUtils.br(m);Q=document.createElement("div");
-Q.style.height="8px";m.appendChild(Q);r=r.cloneNode(!1);mxUtils.write(r,mxResources.get("linestart"));m.appendChild(r);var qa=this.addUnitInput(m,"pt",98,52,function(){T.apply(this,arguments)}),O=this.addUnitInput(m,"pt",30,52,function(){L.apply(this,arguments)});mxUtils.br(m);this.addLabel(m,mxResources.get("spacing"),98,52);this.addLabel(m,mxResources.get("size"),30,52);mxUtils.br(m);k=k.cloneNode(!1);k.style.fontWeight="normal";k.style.position="relative";k.style.paddingLeft="16px";k.style.marginBottom=
-"2px";k.style.marginTop="6px";k.style.borderWidth="0px";k.style.paddingBottom="18px";r=document.createElement("div");r.style.position="absolute";r.style.marginLeft="3px";r.style.marginBottom="12px";r.style.marginTop="1px";r.style.fontWeight="normal";r.style.width="120px";mxUtils.write(r,mxResources.get("perimeter"));k.appendChild(r);var S=this.addUnitInput(k,"pt",30,52,function(){wa.apply(this,arguments)});e.edges.length==e.cells.length?(a.appendChild(u),a.appendChild(m)):e.vertices.length==e.cells.length&&
-a.appendChild(k);var F=mxUtils.bind(this,function(W,aa,oa){function sa(Ka,Ha,ua,Ca){ua=ua.getElementsByTagName("div")[0];null!=ua&&d.updateCssForMarker(ua,Ca,e.style.shape,Ka,Ha);return ua}e=d.getSelectionState();if(oa||document.activeElement!=D)W=parseFloat(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),D.value=isNaN(W)?"":W+" pt";if(oa||document.activeElement!=N)W=parseFloat(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),N.value=isNaN(W)?"":W+" pt";n.style.visibility="connector"==
-e.style.shape||"filledEdge"==e.style.shape?"":"hidden";"1"==mxUtils.getValue(e.style,mxConstants.STYLE_CURVED,null)?n.value="curved":"1"==mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,null)&&(n.value="rounded");"1"==mxUtils.getValue(e.style,mxConstants.STYLE_DASHED,null)?null==mxUtils.getValue(e.style,mxConstants.STYLE_DASH_PATTERN,null)?V.style.borderBottom="1px dashed "+this.defaultStrokeColor:V.style.borderBottom="1px dotted "+this.defaultStrokeColor:V.style.borderBottom="1px solid "+this.defaultStrokeColor;
-ia.style.borderBottom=V.style.borderBottom;W=R.getElementsByTagName("div")[0];null!=W&&(aa=mxUtils.getValue(e.style,mxConstants.STYLE_EDGE,null),"1"==mxUtils.getValue(e.style,mxConstants.STYLE_NOEDGESTYLE,null)&&(aa=null),"orthogonalEdgeStyle"==aa&&"1"==mxUtils.getValue(e.style,mxConstants.STYLE_CURVED,null)?W.className="geSprite geSprite-curved":W.className="straight"==aa||"none"==aa||null==aa?"geSprite geSprite-straight":"entityRelationEdgeStyle"==aa?"geSprite geSprite-entity":"elbowEdgeStyle"==
-aa?"geSprite "+("vertical"==mxUtils.getValue(e.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalelbow":"geSprite-horizontalelbow"):"isometricEdgeStyle"==aa?"geSprite "+("vertical"==mxUtils.getValue(e.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalisometric":"geSprite-horizontalisometric"):"geSprite geSprite-orthogonal");W=J.getElementsByTagName("div")[0];null!=W&&(W.className="link"==e.style.shape?"geSprite geSprite-linkedge":"flexArrow"==e.style.shape?"geSprite geSprite-arrow":"arrow"==
-e.style.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection");e.edges.length==e.cells.length?(G.style.display="",B.style.display="none"):(G.style.display="none",B.style.display="");Graph.lineJumpsEnabled&&0<e.edges.length&&0==e.vertices.length&&e.lineJumps&&(a.style.borderBottomStyle="none");W=sa(mxUtils.getValue(e.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(e.style,"startFill","1"),P,"start");aa=sa(mxUtils.getValue(e.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(e.style,
-"endFill","1"),Z,"end");null!=W&&null!=aa&&("arrow"==e.style.shape?(W.className="geSprite geSprite-noarrow",aa.className="geSprite geSprite-endblocktrans"):"link"==e.style.shape&&(W.className="geSprite geSprite-noarrow",aa.className="geSprite geSprite-noarrow"));mxUtils.setOpacity(R,"arrow"==e.style.shape?30:100);"connector"!=e.style.shape&&"flexArrow"!=e.style.shape&&"filledEdge"!=e.style.shape?(mxUtils.setOpacity(P,30),mxUtils.setOpacity(Z,30)):(mxUtils.setOpacity(P,100),mxUtils.setOpacity(Z,100));
-if(oa||document.activeElement!=O)W=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),O.value=isNaN(W)?"":W+" pt";if(oa||document.activeElement!=qa)W=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),qa.value=isNaN(W)?"":W+" pt";if(oa||document.activeElement!=ba)W=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),ba.value=isNaN(W)?"":W+" pt";if(oa||document.activeElement!=qa)W=parseInt(mxUtils.getValue(e.style,
-mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),ha.value=isNaN(W)?"":W+" pt";if(oa||document.activeElement!=S)W=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_PERIMETER_SPACING,0)),S.value=isNaN(W)?"":W+" pt"});var L=this.installInputHandler(O,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");var T=this.installInputHandler(qa,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");var ca=this.installInputHandler(ba,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,
-0,999," pt");var fa=this.installInputHandler(ha,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0,-999,999," pt");var wa=this.installInputHandler(S,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(D,F);this.addKeyHandler(O,F);this.addKeyHandler(qa,F);this.addKeyHandler(ba,F);this.addKeyHandler(ha,F);this.addKeyHandler(S,F);g.getModel().addListener(mxEvent.CHANGE,F);this.listeners.push({destroy:function(){g.getModel().removeListener(F)}});F();return a};
-StyleFormatPanel.prototype.addLineJumps=function(a){var b=this.editorUi,f=b.editor.graph,d=b.getSelectionState();if(Graph.lineJumpsEnabled&&0<d.edges.length&&0==d.vertices.length&&d.lineJumps){a.style.padding="2px 0px 24px 14px";var g=document.createElement("div");g.style.position="absolute";g.style.maxWidth="82px";g.style.overflow="hidden";g.style.textOverflow="ellipsis";mxUtils.write(g,mxResources.get("lineJumps"));a.appendChild(g);var e=document.createElement("select");e.style.position="absolute";
-e.style.height="21px";e.style.padding="0px";e.style.marginTop="-2px";e.style.boxSizing="border-box";e.style.right="76px";e.style.width="54px";e.style.border="1px solid rgb(160, 160, 160)";e.style.borderRadius="4px";g=["none","arc","gap","sharp","line"];for(var k=0;k<g.length;k++){var n=document.createElement("option");n.setAttribute("value",g[k]);mxUtils.write(n,mxResources.get(g[k]));e.appendChild(n)}mxEvent.addListener(e,"change",function(x){f.getModel().beginUpdate();try{f.setCellStyles("jumpStyle",
-e.value,d.cells),b.fireEvent(new mxEventObject("styleChanged","keys",["jumpStyle"],"values",[e.value],"cells",d.cells))}finally{f.getModel().endUpdate()}mxEvent.consume(x)});mxEvent.addListener(e,"click",function(x){mxEvent.consume(x)});a.appendChild(e);var u=this.addUnitInput(a,"pt",16,42,function(){m.apply(this,arguments)});var m=this.installInputHandler(u,"jumpSize",Graph.defaultJumpSize,0,999," pt");var r=mxUtils.bind(this,function(x,B,C){d=b.getSelectionState();e.value=mxUtils.getValue(d.style,
-"jumpStyle","none");if(C||document.activeElement!=u)x=parseInt(mxUtils.getValue(d.style,"jumpSize",Graph.defaultJumpSize)),u.value=isNaN(x)?"":x+" pt"});this.addKeyHandler(u,r);f.getModel().addListener(mxEvent.CHANGE,r);this.listeners.push({destroy:function(){f.getModel().removeListener(r)}});r()}else a.style.display="none";return a};
-StyleFormatPanel.prototype.addEffects=function(a){var b=this.editorUi,f=b.editor.graph,d=b.getSelectionState();a.style.paddingTop="4px";a.style.paddingBottom="0px";var g=document.createElement("table");g.style.width="210px";g.style.fontWeight="bold";g.style.tableLayout="fixed";var e=document.createElement("tbody"),k=document.createElement("tr");k.style.padding="0px";var n=document.createElement("td");n.style.padding="0px";n.style.width="50%";n.setAttribute("valign","top");var u=n.cloneNode(!0);u.style.paddingLeft=
-"8px";k.appendChild(n);k.appendChild(u);e.appendChild(k);g.appendChild(e);a.appendChild(g);var m=n,r=0,x=mxUtils.bind(this,function(C,G,J){C=this.createCellOption(C,G,J);C.style.width="100%";m.appendChild(C);m=m==n?u:n;r++}),B=mxUtils.bind(this,function(C,G,J){d=b.getSelectionState();n.innerText="";u.innerText="";m=n;d.rounded&&x(mxResources.get("rounded"),mxConstants.STYLE_ROUNDED,0);d.swimlane&&x(mxResources.get("divider"),"swimlaneLine",1);d.containsImage||x(mxResources.get("shadow"),mxConstants.STYLE_SHADOW,
-0);d.glass&&x(mxResources.get("glass"),mxConstants.STYLE_GLASS,0);x(mxResources.get("sketch"),"sketch",0)});f.getModel().addListener(mxEvent.CHANGE,B);this.listeners.push({destroy:function(){f.getModel().removeListener(B)}});B();return a};StyleFormatPanel.prototype.addStyleOps=function(a){a.style.paddingTop="10px";a.style.paddingBottom="10px";this.addActions(a,["setAsDefaultStyle"]);return a};DiagramStylePanel=function(a,b,f){BaseFormatPanel.call(this,a,b,f);this.init()};
+StyleFormatPanel.prototype.addStroke=function(a){function b(X){var ca=parseFloat(D.value);ca=Math.min(999,Math.max(0,isNaN(ca)?1:ca));ca!=mxUtils.getValue(d.style,mxConstants.STYLE_STROKEWIDTH,1)&&(g.setCellStyles(mxConstants.STYLE_STROKEWIDTH,ca,d.cells),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[ca],"cells",d.cells)));D.value=ca+" pt";mxEvent.consume(X)}function f(X){var ca=parseFloat(N.value);ca=Math.min(999,Math.max(0,isNaN(ca)?1:ca));ca!=mxUtils.getValue(d.style,
+mxConstants.STYLE_STROKEWIDTH,1)&&(g.setCellStyles(mxConstants.STYLE_STROKEWIDTH,ca,d.cells),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[ca],"cells",d.cells)));N.value=ca+" pt";mxEvent.consume(X)}var e=this.editorUi,g=e.editor.graph,d=e.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="4px";a.style.whiteSpace="normal";var k=document.createElement("div");k.style.fontWeight="bold";d.stroke||(k.style.display="none");var n=document.createElement("select");
+n.style.position="absolute";n.style.height="22px";n.style.padding="0px";n.style.marginTop="-3px";n.style.boxSizing="border-box";n.style.left="94px";n.style.width="80px";n.style.border="1px solid rgb(160, 160, 160)";n.style.borderRadius="4px";for(var u=["sharp","rounded","curved"],m=0;m<u.length;m++){var r=document.createElement("option");r.setAttribute("value",u[m]);mxUtils.write(r,mxResources.get(u[m]));n.appendChild(r)}mxEvent.addListener(n,"change",function(X){g.getModel().beginUpdate();try{var ca=
+[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],oa=["0",null];"rounded"==n.value?oa=["1",null]:"curved"==n.value&&(oa=[null,"1"]);for(var ta=0;ta<ca.length;ta++)g.setCellStyles(ca[ta],oa[ta],d.cells);e.fireEvent(new mxEventObject("styleChanged","keys",ca,"values",oa,"cells",d.cells))}finally{g.getModel().endUpdate()}mxEvent.consume(X)});mxEvent.addListener(n,"click",function(X){mxEvent.consume(X)});var x="image"==d.style.shape?mxConstants.STYLE_IMAGE_BORDER:mxConstants.STYLE_STROKECOLOR;u="image"==
+d.style.shape?mxResources.get("border"):mxResources.get("line");u=this.createCellColorOption(u,x,"default",null,mxUtils.bind(this,function(X){g.setCellStyles(x,X,d.cells)}),g.shapeForegroundColor);u.appendChild(n);k.appendChild(u);var B=k.cloneNode(!1);B.style.fontWeight="normal";B.style.whiteSpace="nowrap";B.style.position="relative";B.style.paddingLeft="0px";B.style.marginBottom="2px";B.style.overflow="hidden";B.style.marginTop="2px";B.style.width="220px";B.className="geToolbarContainer";var C=
+mxUtils.bind(this,function(X,ca,oa,ta,Ka){X=this.editorUi.menus.styleChange(X,"",ta,Ka,"geIcon",null);ta=document.createElement("div");ta.style.width=ca+"px";ta.style.height="1px";ta.style.borderBottom="1px "+oa+" "+this.defaultStrokeColor;ta.style.paddingTop="6px";X.firstChild.firstChild.style.padding="0px 4px 0px 4px";X.firstChild.firstChild.style.width=ca+"px";X.firstChild.firstChild.appendChild(ta);return X});m=this.editorUi.toolbar.addMenuFunctionInContainer(B,"geSprite-orthogonal",mxResources.get("pattern"),
+!1,mxUtils.bind(this,function(X){C(X,75,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));C(X,75,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed"));C(X,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");C(X,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],
+["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");C(X,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")}));var F=B.cloneNode(!1),J=this.editorUi.toolbar.addMenuFunctionInContainer(F,"geSprite-connection",mxResources.get("connection"),!1,mxUtils.bind(this,function(X){this.editorUi.menus.styleChange(X,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],[null,
+null,null,null],"geIcon geSprite geSprite-connection",null,!0).setAttribute("title",mxResources.get("line"));this.editorUi.menus.styleChange(X,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["link",null,null,null],"geIcon geSprite geSprite-linkedge",null,!0).setAttribute("title",mxResources.get("link"));this.editorUi.menus.styleChange(X,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["flexArrow",null,null,null],
+"geIcon geSprite geSprite-arrow",null,!0).setAttribute("title",mxResources.get("arrow"));this.editorUi.menus.styleChange(X,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["arrow",null,null,null],"geIcon geSprite geSprite-simplearrow",null,!0).setAttribute("title",mxResources.get("simpleArrow"))}));r=this.editorUi.toolbar.addMenuFunctionInContainer(F,"geSprite-orthogonal",mxResources.get("pattern"),!1,mxUtils.bind(this,function(X){C(X,33,"solid",[mxConstants.STYLE_DASHED,
+mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));C(X,33,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed"));C(X,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");C(X,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+
+" (2)");C(X,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")}));u=B.cloneNode(!1);var D=document.createElement("input");D.style.position="absolute";D.style.textAlign="right";D.style.marginTop="2px";D.style.width="52px";D.style.height="21px";D.style.left="146px";D.style.border="1px solid rgb(160, 160, 160)";D.style.borderRadius="4px";D.style.boxSizing="border-box";D.setAttribute("title",mxResources.get("linewidth"));
+B.appendChild(D);var N=D.cloneNode(!0);F.appendChild(N);var S=this.createStepper(D,b,1,9);S.style.display=D.style.display;S.style.marginTop="2px";S.style.left="198px";B.appendChild(S);S=this.createStepper(N,f,1,9);S.style.display=N.style.display;S.style.marginTop="2px";N.style.position="absolute";S.style.left="198px";F.appendChild(S);mxEvent.addListener(D,"blur",b);mxEvent.addListener(D,"change",b);mxEvent.addListener(N,"blur",f);mxEvent.addListener(N,"change",f);var T=this.editorUi.toolbar.addMenuFunctionInContainer(u,
+"geSprite-orthogonal",mxResources.get("waypoints"),!1,mxUtils.bind(this,function(X){"arrow"!=d.style.shape&&(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],"geIcon geSprite geSprite-straight",null,!0).setAttribute("title",mxResources.get("straight")),this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle",null,null],"geIcon geSprite geSprite-orthogonal",
+null,!0).setAttribute("title",mxResources.get("orthogonal")),this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalelbow",null,!0).setAttribute("title",mxResources.get("simple")),this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",
+"vertical",null,null],"geIcon geSprite geSprite-verticalelbow",null,!0).setAttribute("title",mxResources.get("simple")),this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalisometric",null,!0).setAttribute("title",mxResources.get("isometric")),this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,
+mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalisometric",null,!0).setAttribute("title",mxResources.get("isometric")),"connector"==d.style.shape&&this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle","1",null],"geIcon geSprite geSprite-curved",null,!0).setAttribute("title",mxResources.get("curved")),this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_EDGE,
+mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["entityRelationEdgeStyle",null,null],"geIcon geSprite geSprite-entity",null,!0).setAttribute("title",mxResources.get("entityRelation")))})),P=this.editorUi.toolbar.addMenuFunctionInContainer(u,"geSprite-startclassic",mxResources.get("linestart"),!1,mxUtils.bind(this,function(X){if("connector"==d.style.shape||"flexArrow"==d.style.shape||"filledEdge"==d.style.shape){var ca=this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW,
+"startFill"],[mxConstants.NONE,0],"geIcon",null,!1);ca.setAttribute("title",mxResources.get("none"));var oa=document.createElement("font");oa.style.fontSize="10px";mxUtils.write(oa,mxResources.get("none"));ca.firstChild.firstChild.appendChild(oa);"connector"==d.style.shape||"filledEdge"==d.style.shape?(Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC,1],null,null,!1,Format.classicFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,
+"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC_THIN,1],null,null,!1,Format.classicThinFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OPEN,0],null,null,!1,Format.openFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OPEN_THIN,0],null,null,!1,Format.openThinFilledMarkerImage.src)),
+Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW,"startFill"],["openAsync",0],null,null,!1,Format.openAsyncFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK,1],null,null,!1,Format.blockFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK_THIN,1],null,
+null,!1,Format.blockThinFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW,"startFill"],["async",1],null,null,!1,Format.asyncFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OVAL,1],null,null,!1,Format.ovalFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW,"startFill"],
+[mxConstants.ARROW_DIAMOND,1],null,null,!1,Format.diamondFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_DIAMOND_THIN,1],null,null,!1,Format.diamondThinFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC,0],null,null,!1,Format.classicMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,
+"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC_THIN,0],null,null,!1,Format.classicThinMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK,0],null,null,!1,Format.blockMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK_THIN,0],null,null,!1,Format.blockThinMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,
+"",[mxConstants.STYLE_STARTARROW,"startFill"],["async",0],null,null,!1,Format.asyncMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OVAL,0],null,null,!1,Format.ovalMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_DIAMOND,0],null,null,!1,Format.diamondMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,
+"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_DIAMOND_THIN,0],null,null,!1,Format.diamondThinMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW,"startFill"],["box",0],null,null,!1,Format.boxMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW,"startFill"],["halfCircle",0],null,null,!1,Format.halfCircleMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,
+"",[mxConstants.STYLE_STARTARROW,"startFill"],["dash",0],null,null,!1,Format.dashMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW,"startFill"],["cross",0],null,null,!1,Format.crossMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW,"startFill"],["circlePlus",0],null,null,!1,Format.circlePlusMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW,
+"startFill"],["circle",1],null,null,!1,Format.circleMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW,"startFill"],["baseDash",0],null,null,!1,Format.baseDashMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERone",0],null,null,!1,Format.EROneMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW,"startFill"],
+["ERmandOne",0],null,null,!1,Format.ERmandOneMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERmany",0],null,null,!1,Format.ERmanyMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERoneToMany",0],null,null,!1,Format.ERoneToManyMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW,"startFill"],
+["ERzeroToOne",0],null,null,!1,Format.ERzeroToOneMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERzeroToMany",0],null,null,!1,Format.ERzeroToManyMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW,"startFill"],["doubleBlock",0],null,null,!1,Format.doubleBlockMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW,
+"startFill"],["doubleBlock",1],null,null,!1,Format.doubleBlockFilledMarkerImage.src))):this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-startblocktrans",null,!1).setAttribute("title",mxResources.get("block"));X.div.style.width="40px";window.setTimeout(mxUtils.bind(this,function(){null!=X.div&&mxUtils.fit(X.div)}),0)}})),Z=this.editorUi.toolbar.addMenuFunctionInContainer(u,"geSprite-endclassic",mxResources.get("lineend"),!1,
+mxUtils.bind(this,function(X){if("connector"==d.style.shape||"flexArrow"==d.style.shape||"filledEdge"==d.style.shape){var ca=this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.NONE,0],"geIcon",null,!1);ca.setAttribute("title",mxResources.get("none"));var oa=document.createElement("font");oa.style.fontSize="10px";mxUtils.write(oa,mxResources.get("none"));ca.firstChild.firstChild.appendChild(oa);"connector"==d.style.shape||"filledEdge"==d.style.shape?(Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,
+"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC,1],null,null,!1,Format.classicFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC_THIN,1],null,null,!1,Format.classicThinFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OPEN,0],null,null,!1,Format.openFilledMarkerImage.src),
+"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OPEN_THIN,0],null,null,!1,Format.openThinFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],["openAsync",0],null,null,!1,Format.openAsyncFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],
+[mxConstants.ARROW_BLOCK,1],null,null,!1,Format.blockFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_BLOCK_THIN,1],null,null,!1,Format.blockThinFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],["async",1],null,null,!1,Format.asyncFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,
+"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OVAL,1],null,null,!1,Format.ovalFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND,1],null,null,!1,Format.diamondFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND_THIN,1],null,null,!1,Format.diamondThinFilledMarkerImage.src),
+"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC,0],null,null,!1,Format.classicMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC_THIN,0],null,null,!1,Format.classicThinMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],
+[mxConstants.ARROW_BLOCK,0],null,null,!1,Format.blockMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_BLOCK_THIN,0],null,null,!1,Format.blockThinMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],["async",0],null,null,!1,Format.asyncMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,
+"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OVAL,0],null,null,!1,Format.ovalMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND,0],null,null,!1,Format.diamondMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND_THIN,0],null,null,!1,Format.diamondThinMarkerImage.src),
+"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],["box",0],null,null,!1,Format.boxMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],["halfCircle",0],null,null,!1,Format.halfCircleMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],["dash",0],null,null,!1,Format.dashMarkerImage.src),
+"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],["cross",0],null,null,!1,Format.crossMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],["circlePlus",0],null,null,!1,Format.circlePlusMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],["circle",0],null,null,!1,Format.circleMarkerImage.src),
+"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],["baseDash",0],null,null,!1,Format.baseDashMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERone",0],null,null,!1,Format.EROneMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmandOne",0],null,null,!1,Format.ERmandOneMarkerImage.src),
+"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmany",0],null,null,!1,Format.ERmanyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERoneToMany",0],null,null,!1,Format.ERoneToManyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToOne",0],null,null,
+!1,Format.ERzeroToOneMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToMany",0],null,null,!1,Format.ERzeroToManyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],["doubleBlock",0],null,null,!1,Format.doubleBlockMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,
+"endFill"],["doubleBlock",1],null,null,!1,Format.doubleBlockFilledMarkerImage.src),"scaleX(-1)")):this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-endblocktrans",null,!1).setAttribute("title",mxResources.get("block"));X.div.style.width="40px";window.setTimeout(mxUtils.bind(this,function(){null!=X.div&&mxUtils.fit(X.div)}),0)}}));S=this.addArrow(J,8);S.nextSibling.style.position="relative";S.nextSibling.style.top="-2px";S=this.addArrow(T,
+10);S.nextSibling.style.position="relative";S.nextSibling.style.top="-3px";T.getElementsByTagName("img")[0].style.top="-1px";this.addArrow(P,null,!0);this.addArrow(Z,null,!0);S=this.addArrow(m,9);S.className="geIcon";S.style.width="auto";var U=this.addArrow(r,9);U.className="geIcon";U.style.width="22px";var V=document.createElement("div");V.style.width="84px";V.style.height="1px";V.style.borderBottom="1px solid "+this.defaultStrokeColor;V.style.marginBottom="7px";S.appendChild(V);var aa=document.createElement("div");
+aa.style.width="23px";aa.style.height="1px";aa.style.borderBottom="1px solid "+this.defaultStrokeColor;aa.style.marginBottom="7px";U.appendChild(aa);m.style.height="15px";m.style.marginLeft="16px";r.style.height="15px";r.style.marginLeft="3px";J.style.marginLeft="10px";J.style.height="15px";T.style.marginLeft="10px";T.style.height="17px";P.style.marginLeft="3px";P.style.height="17px";Z.style.marginLeft="3px";Z.style.height="17px";a.appendChild(k);a.appendChild(F);a.appendChild(B);m=B.cloneNode(!1);
+m.style.padding="5px 4px 6px 0px";m.style.fontWeight="normal";r=document.createElement("div");r.style.position="absolute";r.style.marginLeft="0px";r.style.marginBottom="12px";r.style.marginTop="2px";r.style.fontWeight="normal";r.style.width="76px";mxUtils.write(r,mxResources.get("lineend"));m.appendChild(r);var ia=this.addUnitInput(m,"pt",98,52,function(){la.apply(this,arguments)}),ea=this.addUnitInput(m,"pt",30,52,function(){ba.apply(this,arguments)});mxUtils.br(m);S=document.createElement("div");
+S.style.height="8px";m.appendChild(S);r=r.cloneNode(!1);mxUtils.write(r,mxResources.get("linestart"));m.appendChild(r);var qa=this.addUnitInput(m,"pt",98,52,function(){Q.apply(this,arguments)}),O=this.addUnitInput(m,"pt",30,52,function(){K.apply(this,arguments)});mxUtils.br(m);this.addLabel(m,mxResources.get("spacing"),98,52);this.addLabel(m,mxResources.get("size"),30,52);mxUtils.br(m);k=k.cloneNode(!1);k.style.fontWeight="normal";k.style.position="relative";k.style.paddingLeft="16px";k.style.marginBottom=
+"2px";k.style.marginTop="6px";k.style.borderWidth="0px";k.style.paddingBottom="18px";r=document.createElement("div");r.style.position="absolute";r.style.marginLeft="3px";r.style.marginBottom="12px";r.style.marginTop="1px";r.style.fontWeight="normal";r.style.width="120px";mxUtils.write(r,mxResources.get("perimeter"));k.appendChild(r);var R=this.addUnitInput(k,"pt",30,52,function(){ra.apply(this,arguments)});d.edges.length==d.cells.length?(a.appendChild(u),a.appendChild(m)):d.vertices.length==d.cells.length&&
+a.appendChild(k);var G=mxUtils.bind(this,function(X,ca,oa){function ta(Ka,Ha,va,Ca){va=va.getElementsByTagName("div")[0];null!=va&&e.updateCssForMarker(va,Ca,d.style.shape,Ka,Ha);return va}d=e.getSelectionState();if(oa||document.activeElement!=D)X=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_STROKEWIDTH,1)),D.value=isNaN(X)?"":X+" pt";if(oa||document.activeElement!=N)X=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_STROKEWIDTH,1)),N.value=isNaN(X)?"":X+" pt";n.style.visibility="connector"==
+d.style.shape||"filledEdge"==d.style.shape?"":"hidden";"1"==mxUtils.getValue(d.style,mxConstants.STYLE_CURVED,null)?n.value="curved":"1"==mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,null)&&(n.value="rounded");"1"==mxUtils.getValue(d.style,mxConstants.STYLE_DASHED,null)?null==mxUtils.getValue(d.style,mxConstants.STYLE_DASH_PATTERN,null)?V.style.borderBottom="1px dashed "+this.defaultStrokeColor:V.style.borderBottom="1px dotted "+this.defaultStrokeColor:V.style.borderBottom="1px solid "+this.defaultStrokeColor;
+aa.style.borderBottom=V.style.borderBottom;X=T.getElementsByTagName("div")[0];null!=X&&(ca=mxUtils.getValue(d.style,mxConstants.STYLE_EDGE,null),"1"==mxUtils.getValue(d.style,mxConstants.STYLE_NOEDGESTYLE,null)&&(ca=null),"orthogonalEdgeStyle"==ca&&"1"==mxUtils.getValue(d.style,mxConstants.STYLE_CURVED,null)?X.className="geSprite geSprite-curved":X.className="straight"==ca||"none"==ca||null==ca?"geSprite geSprite-straight":"entityRelationEdgeStyle"==ca?"geSprite geSprite-entity":"elbowEdgeStyle"==
+ca?"geSprite "+("vertical"==mxUtils.getValue(d.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalelbow":"geSprite-horizontalelbow"):"isometricEdgeStyle"==ca?"geSprite "+("vertical"==mxUtils.getValue(d.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalisometric":"geSprite-horizontalisometric"):"geSprite geSprite-orthogonal");X=J.getElementsByTagName("div")[0];null!=X&&(X.className="link"==d.style.shape?"geSprite geSprite-linkedge":"flexArrow"==d.style.shape?"geSprite geSprite-arrow":"arrow"==
+d.style.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection");d.edges.length==d.cells.length?(F.style.display="",B.style.display="none"):(F.style.display="none",B.style.display="");Graph.lineJumpsEnabled&&0<d.edges.length&&0==d.vertices.length&&d.lineJumps&&(a.style.borderBottomStyle="none");X=ta(mxUtils.getValue(d.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(d.style,"startFill","1"),P,"start");ca=ta(mxUtils.getValue(d.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(d.style,
+"endFill","1"),Z,"end");null!=X&&null!=ca&&("arrow"==d.style.shape?(X.className="geSprite geSprite-noarrow",ca.className="geSprite geSprite-endblocktrans"):"link"==d.style.shape&&(X.className="geSprite geSprite-noarrow",ca.className="geSprite geSprite-noarrow"));mxUtils.setOpacity(T,"arrow"==d.style.shape?30:100);"connector"!=d.style.shape&&"flexArrow"!=d.style.shape&&"filledEdge"!=d.style.shape?(mxUtils.setOpacity(P,30),mxUtils.setOpacity(Z,30)):(mxUtils.setOpacity(P,100),mxUtils.setOpacity(Z,100));
+if(oa||document.activeElement!=O)X=parseInt(mxUtils.getValue(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),O.value=isNaN(X)?"":X+" pt";if(oa||document.activeElement!=qa)X=parseInt(mxUtils.getValue(d.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),qa.value=isNaN(X)?"":X+" pt";if(oa||document.activeElement!=ea)X=parseInt(mxUtils.getValue(d.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),ea.value=isNaN(X)?"":X+" pt";if(oa||document.activeElement!=qa)X=parseInt(mxUtils.getValue(d.style,
+mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),ia.value=isNaN(X)?"":X+" pt";if(oa||document.activeElement!=R)X=parseInt(mxUtils.getValue(d.style,mxConstants.STYLE_PERIMETER_SPACING,0)),R.value=isNaN(X)?"":X+" pt"});var K=this.installInputHandler(O,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");var Q=this.installInputHandler(qa,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");var ba=this.installInputHandler(ea,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,
+0,999," pt");var la=this.installInputHandler(ia,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0,-999,999," pt");var ra=this.installInputHandler(R,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(D,G);this.addKeyHandler(O,G);this.addKeyHandler(qa,G);this.addKeyHandler(ea,G);this.addKeyHandler(ia,G);this.addKeyHandler(R,G);g.getModel().addListener(mxEvent.CHANGE,G);this.listeners.push({destroy:function(){g.getModel().removeListener(G)}});G();return a};
+StyleFormatPanel.prototype.addLineJumps=function(a){var b=this.editorUi,f=b.editor.graph,e=b.getSelectionState();if(Graph.lineJumpsEnabled&&0<e.edges.length&&0==e.vertices.length&&e.lineJumps){a.style.padding="2px 0px 24px 14px";var g=document.createElement("div");g.style.position="absolute";g.style.maxWidth="82px";g.style.overflow="hidden";g.style.textOverflow="ellipsis";mxUtils.write(g,mxResources.get("lineJumps"));a.appendChild(g);var d=document.createElement("select");d.style.position="absolute";
+d.style.height="21px";d.style.padding="0px";d.style.marginTop="-2px";d.style.boxSizing="border-box";d.style.right="76px";d.style.width="54px";d.style.border="1px solid rgb(160, 160, 160)";d.style.borderRadius="4px";g=["none","arc","gap","sharp","line"];for(var k=0;k<g.length;k++){var n=document.createElement("option");n.setAttribute("value",g[k]);mxUtils.write(n,mxResources.get(g[k]));d.appendChild(n)}mxEvent.addListener(d,"change",function(x){f.getModel().beginUpdate();try{f.setCellStyles("jumpStyle",
+d.value,e.cells),b.fireEvent(new mxEventObject("styleChanged","keys",["jumpStyle"],"values",[d.value],"cells",e.cells))}finally{f.getModel().endUpdate()}mxEvent.consume(x)});mxEvent.addListener(d,"click",function(x){mxEvent.consume(x)});a.appendChild(d);var u=this.addUnitInput(a,"pt",16,42,function(){m.apply(this,arguments)});var m=this.installInputHandler(u,"jumpSize",Graph.defaultJumpSize,0,999," pt");var r=mxUtils.bind(this,function(x,B,C){e=b.getSelectionState();d.value=mxUtils.getValue(e.style,
+"jumpStyle","none");if(C||document.activeElement!=u)x=parseInt(mxUtils.getValue(e.style,"jumpSize",Graph.defaultJumpSize)),u.value=isNaN(x)?"":x+" pt"});this.addKeyHandler(u,r);f.getModel().addListener(mxEvent.CHANGE,r);this.listeners.push({destroy:function(){f.getModel().removeListener(r)}});r()}else a.style.display="none";return a};
+StyleFormatPanel.prototype.addEffects=function(a){var b=this.editorUi,f=b.editor.graph,e=b.getSelectionState();a.style.paddingTop="4px";a.style.paddingBottom="0px";var g=document.createElement("table");g.style.width="210px";g.style.fontWeight="bold";g.style.tableLayout="fixed";var d=document.createElement("tbody"),k=document.createElement("tr");k.style.padding="0px";var n=document.createElement("td");n.style.padding="0px";n.style.width="50%";n.setAttribute("valign","top");var u=n.cloneNode(!0);u.style.paddingLeft=
+"8px";k.appendChild(n);k.appendChild(u);d.appendChild(k);g.appendChild(d);a.appendChild(g);var m=n,r=0,x=mxUtils.bind(this,function(C,F,J){C=this.createCellOption(C,F,J);C.style.width="100%";m.appendChild(C);m=m==n?u:n;r++}),B=mxUtils.bind(this,function(C,F,J){e=b.getSelectionState();n.innerText="";u.innerText="";m=n;e.rounded&&x(mxResources.get("rounded"),mxConstants.STYLE_ROUNDED,0);e.swimlane&&x(mxResources.get("divider"),"swimlaneLine",1);e.containsImage||x(mxResources.get("shadow"),mxConstants.STYLE_SHADOW,
+0);e.glass&&x(mxResources.get("glass"),mxConstants.STYLE_GLASS,0);x(mxResources.get("sketch"),"sketch",0)});f.getModel().addListener(mxEvent.CHANGE,B);this.listeners.push({destroy:function(){f.getModel().removeListener(B)}});B();return a};StyleFormatPanel.prototype.addStyleOps=function(a){a.style.paddingTop="10px";a.style.paddingBottom="10px";this.addActions(a,["setAsDefaultStyle"]);return a};DiagramStylePanel=function(a,b,f){BaseFormatPanel.call(this,a,b,f);this.init()};
mxUtils.extend(DiagramStylePanel,BaseFormatPanel);DiagramStylePanel.prototype.init=function(){var a=this.editorUi;this.darkModeChangedListener=mxUtils.bind(this,function(){this.format.cachedStyleEntries=[]});a.addListener("darkModeChanged",this.darkModeChangedListener);this.container.appendChild(this.addView(this.createPanel()))};
-DiagramStylePanel.prototype.addView=function(a){var b=this.editorUi,f=b.editor.graph,d=f.getModel(),g=f.view.gridColor;a.style.whiteSpace="normal";var e="1"==f.currentVertexStyle.sketch&&"1"==f.currentEdgeStyle.sketch,k="1"==f.currentVertexStyle.rounded,n="1"==f.currentEdgeStyle.curved,u=document.createElement("div");u.style.marginRight="16px";a.style.paddingTop="8px";var m=document.createElement("table");m.style.width="210px";m.style.fontWeight="bold";var r=document.createElement("tbody"),x=document.createElement("tr");
-x.style.padding="0px";var B=document.createElement("td");B.style.padding="0px";B.style.width="50%";B.setAttribute("valign","middle");var C=B.cloneNode(!0);C.style.paddingLeft="8px";"1"!=urlParams.sketch&&(u.style.paddingBottom="12px",x.appendChild(B),B.appendChild(this.createOption(mxResources.get("sketch"),function(){return e},function(ba){(e=ba)?(f.currentEdgeStyle.sketch="1",f.currentVertexStyle.sketch="1"):(delete f.currentEdgeStyle.sketch,delete f.currentVertexStyle.sketch);f.updateCellStyles({sketch:ba?
-"1":null},f.getVerticesAndEdges())},null,function(ba){ba.style.width="auto"})));x.appendChild(C);r.appendChild(x);m.appendChild(r);C.appendChild(this.createOption(mxResources.get("rounded"),function(){return k},function(ba){(k=ba)?(f.currentEdgeStyle.rounded="1",f.currentVertexStyle.rounded="1"):(delete f.currentEdgeStyle.rounded,delete f.currentVertexStyle.rounded);f.updateCellStyles({rounded:ba?"1":"0"},f.getVerticesAndEdges())},null,function(ba){ba.style.width="auto"}));"1"!=urlParams.sketch&&
-(B=B.cloneNode(!1),C=C.cloneNode(!1),x=x.cloneNode(!1),x.appendChild(B),x.appendChild(C),r.appendChild(x),B.appendChild(this.createOption(mxResources.get("curved"),function(){return n},function(ba){(n=ba)?f.currentEdgeStyle.curved="1":delete f.currentEdgeStyle.curved;f.updateCellStyles({curved:ba?"1":null},f.getVerticesAndEdges(!1,!0))},null,function(ba){ba.style.width="auto"})));u.appendChild(m);a.appendChild(u);var G=["fillColor","strokeColor","fontColor","gradientColor"],J=mxUtils.bind(this,function(ba,
-qa){var O=f.getVerticesAndEdges();d.beginUpdate();try{for(var S=0;S<O.length;S++){var F=f.getCellStyle(O[S]);null!=F.labelBackgroundColor&&f.updateCellStyles({labelBackgroundColor:null!=qa?qa.background:null},[O[S]]);for(var L=d.isEdge(O[S]),T=d.getStyle(O[S]),ca=L?f.currentEdgeStyle:f.currentVertexStyle,fa=0;fa<ba.length;fa++)if(null!=F[ba[fa]]&&F[ba[fa]]!=mxConstants.NONE||ba[fa]!=mxConstants.STYLE_FILLCOLOR&&ba[fa]!=mxConstants.STYLE_STROKECOLOR)T=mxUtils.setStyle(T,ba[fa],ca[ba[fa]]);d.setStyle(O[S],
-T)}}finally{d.endUpdate()}}),D=mxUtils.bind(this,function(ba,qa,O){if(null!=ba)for(var S=0;S<qa.length;S++)if(null!=ba[qa[S]]&&ba[qa[S]]!=mxConstants.NONE||qa[S]!=mxConstants.STYLE_FILLCOLOR&&qa[S]!=mxConstants.STYLE_STROKECOLOR)ba[qa[S]]=O[qa[S]]}),N=mxUtils.bind(this,function(ba,qa,O,S,F){if(null!=ba){null!=O&&null!=qa.labelBackgroundColor&&(S=null!=S?S.background:null,F=null!=F?F:f,null==S&&(S=F.background),null==S&&(S=F.defaultPageBackgroundColor),qa.labelBackgroundColor=S);for(var L in ba)if(null==
-O||null!=qa[L]&&qa[L]!=mxConstants.NONE||L!=mxConstants.STYLE_FILLCOLOR&&L!=mxConstants.STYLE_STROKECOLOR)qa[L]=ba[L]}});"1"!=urlParams.sketch&&(B=mxUtils.button(mxResources.get("reset"),mxUtils.bind(this,function(ba){ba=f.getVerticesAndEdges(!0,!0);if(0<ba.length){d.beginUpdate();try{f.updateCellStyles({sketch:null,rounded:null},ba),f.updateCellStyles({curved:null},f.getVerticesAndEdges(!1,!0))}finally{d.endUpdate()}}b.clearDefaultStyle()})),B.setAttribute("title",mxResources.get("reset")),B.style.textOverflow=
-"ellipsis",B.style.maxWidth="90px",C.appendChild(B));var Q=mxUtils.bind(this,function(ba,qa,O,S,F){var L=document.createElement("div");L.style.position="absolute";L.style.display="inline-block";L.style.overflow="hidden";L.style.pointerEvents="none";L.style.width="100%";L.style.height="100%";F.appendChild(L);var T=new Graph(L,null,null,f.getStylesheet());T.resetViewOnRootChange=!1;T.foldingEnabled=!1;T.gridEnabled=!1;T.autoScroll=!1;T.setTooltips(!1);T.setConnectable(!1);T.setPanning(!1);T.setEnabled(!1);
-T.getCellStyle=function(wa,W){W=null!=W?W:!0;var aa=mxUtils.clone(f.getCellStyle.apply(this,arguments)),oa=f.stylesheet.getDefaultVertexStyle(),sa=qa;d.isEdge(wa)&&(oa=f.stylesheet.getDefaultEdgeStyle(),sa=O);D(aa,G,oa);N(ba,aa,wa,S,T);N(sa,aa,wa,S,T);W&&(aa=f.postProcessCellStyle(wa,aa));return aa};T.model.beginUpdate();try{var ca=T.insertVertex(T.getDefaultParent(),null,"Shape",14,8,70,40,"strokeWidth=2;"),fa=T.insertEdge(T.getDefaultParent(),null,"Connector",ca,ca,"edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;endSize=5;strokeWidth=2;");
-fa.geometry.points=[new mxPoint(32,70)];fa.geometry.offset=new mxPoint(0,8)}finally{T.model.endUpdate()}}),R=document.createElement("div");R.style.position="relative";a.appendChild(R);null==this.format.cachedStyleEntries&&(this.format.cachedStyleEntries=[]);var P=mxUtils.bind(this,function(ba,qa,O,S,F){var L=this.format.cachedStyleEntries[F];null==L&&(L=document.createElement("div"),L.style.display="inline-block",L.style.position="relative",L.style.width="96px",L.style.height="90px",L.style.cursor=
-"pointer",L.style.border="1px solid gray",L.style.borderRadius="8px",L.style.margin="2px",L.style.overflow="hidden",null!=S&&null!=S.background&&(L.style.backgroundColor=S.background),Q(ba,qa,O,S,L),mxEvent.addGestureListeners(L,mxUtils.bind(this,function(T){L.style.opacity=.5}),null,mxUtils.bind(this,function(T){L.style.opacity=1;f.currentVertexStyle=mxUtils.clone(f.defaultVertexStyle);f.currentEdgeStyle=mxUtils.clone(f.defaultEdgeStyle);N(ba,f.currentVertexStyle);N(ba,f.currentEdgeStyle);N(qa,f.currentVertexStyle);
-N(O,f.currentEdgeStyle);"1"==urlParams.sketch&&(e=Editor.sketchMode);e?(f.currentEdgeStyle.sketch="1",f.currentVertexStyle.sketch="1"):(f.currentEdgeStyle.sketch="0",f.currentVertexStyle.sketch="0");f.currentVertexStyle.rounded=k?"1":"0";f.currentEdgeStyle.rounded="1";f.currentEdgeStyle.curved=n?"1":"0";d.beginUpdate();try{var ca=G.slice(),fa;for(fa in ba)ca.push(fa);J(ca,S);var wa=new ChangePageSetup(b,null!=S?S.background:null);wa.ignoreImage=!0;d.execute(wa);d.execute(new ChangeGridColor(b,null!=
-S&&null!=S.gridColor?S.gridColor:g))}finally{d.endUpdate()}})),mxEvent.addListener(L,"mouseenter",mxUtils.bind(this,function(T){var ca=f.getCellStyle;T=f.background;var fa=f.view.gridColor;f.background=null!=S?S.background:null;f.view.gridColor=null!=S&&null!=S.gridColor?S.gridColor:g;f.getCellStyle=function(wa,W){W=null!=W?W:!0;var aa=mxUtils.clone(ca.apply(this,arguments)),oa=f.stylesheet.getDefaultVertexStyle(),sa=qa;d.isEdge(wa)&&(oa=f.stylesheet.getDefaultEdgeStyle(),sa=O);D(aa,G,oa);N(ba,aa,
-wa,S);N(sa,aa,wa,S);W&&(aa=this.postProcessCellStyle(wa,aa));return aa};f.refresh();f.getCellStyle=ca;f.background=T;f.view.gridColor=fa})),mxEvent.addListener(L,"mouseleave",mxUtils.bind(this,function(T){f.refresh()})),mxClient.IS_IE||mxClient.IS_IE11||(this.format.cachedStyleEntries[F]=L));R.appendChild(L)}),Z=Math.ceil(Editor.styles.length/10);this.format.currentStylePage=null!=this.format.currentStylePage?this.format.currentStylePage:0;var U=[],V=mxUtils.bind(this,function(){0<U.length&&(U[this.format.currentStylePage].style.background=
-"#84d7ff");for(var ba=10*this.format.currentStylePage;ba<Math.min(10*(this.format.currentStylePage+1),Editor.styles.length);ba++){var qa=Editor.styles[ba];P(qa.commonStyle,qa.vertexStyle,qa.edgeStyle,qa.graph,ba)}}),ia=mxUtils.bind(this,function(ba){0<=ba&&ba<Z&&(U[this.format.currentStylePage].style.background="transparent",R.innerText="",this.format.currentStylePage=ba,V())});if(1<Z){u=document.createElement("div");u.style.whiteSpace="nowrap";u.style.position="relative";u.style.textAlign="center";
-u.style.paddingTop="4px";u.style.width="210px";a.style.paddingBottom="8px";for(C=0;C<Z;C++){var ha=document.createElement("div");ha.style.display="inline-block";ha.style.width="6px";ha.style.height="6px";ha.style.marginLeft="4px";ha.style.marginRight="3px";ha.style.borderRadius="3px";ha.style.cursor="pointer";ha.style.background="transparent";ha.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(ba,qa){mxEvent.addListener(ha,"click",mxUtils.bind(this,function(){ia(ba)}))})(C,ha);u.appendChild(ha);
-U.push(ha)}a.appendChild(u);V();15>Z&&(m=function(ba){mxEvent.addListener(ba,"mouseenter",function(){ba.style.opacity="1"});mxEvent.addListener(ba,"mouseleave",function(){ba.style.opacity="0.5"})},B=document.createElement("div"),B.style.position="absolute",B.style.left="0px",B.style.top="0px",B.style.bottom="0px",B.style.width="24px",B.style.height="24px",B.style.margin="0px",B.style.cursor="pointer",B.style.opacity="0.5",B.style.backgroundRepeat="no-repeat",B.style.backgroundPosition="center center",
-B.style.backgroundSize="24px 24px",B.style.backgroundImage="url("+Editor.previousImage+")",Editor.isDarkMode()&&(B.style.filter="invert(100%)"),C=B.cloneNode(!1),C.style.backgroundImage="url("+Editor.nextImage+")",C.style.left="",C.style.right="2px",u.appendChild(B),u.appendChild(C),mxEvent.addListener(B,"click",mxUtils.bind(this,function(){ia(mxUtils.mod(this.format.currentStylePage-1,Z))})),mxEvent.addListener(C,"click",mxUtils.bind(this,function(){ia(mxUtils.mod(this.format.currentStylePage+1,
+DiagramStylePanel.prototype.addView=function(a){var b=this.editorUi,f=b.editor.graph,e=f.getModel(),g=f.view.gridColor;a.style.whiteSpace="normal";var d="1"==f.currentVertexStyle.sketch&&"1"==f.currentEdgeStyle.sketch,k="1"==f.currentVertexStyle.rounded,n="1"==f.currentEdgeStyle.curved,u=document.createElement("div");u.style.marginRight="16px";a.style.paddingTop="8px";var m=document.createElement("table");m.style.width="210px";m.style.fontWeight="bold";var r=document.createElement("tbody"),x=document.createElement("tr");
+x.style.padding="0px";var B=document.createElement("td");B.style.padding="0px";B.style.width="50%";B.setAttribute("valign","middle");var C=B.cloneNode(!0);C.style.paddingLeft="8px";"1"!=urlParams.sketch&&(u.style.paddingBottom="12px",x.appendChild(B),B.appendChild(this.createOption(mxResources.get("sketch"),function(){return d},function(ea){(d=ea)?(f.currentEdgeStyle.sketch="1",f.currentVertexStyle.sketch="1"):(delete f.currentEdgeStyle.sketch,delete f.currentVertexStyle.sketch);f.updateCellStyles({sketch:ea?
+"1":null},f.getVerticesAndEdges())},null,function(ea){ea.style.width="auto"})));x.appendChild(C);r.appendChild(x);m.appendChild(r);C.appendChild(this.createOption(mxResources.get("rounded"),function(){return k},function(ea){(k=ea)?(f.currentEdgeStyle.rounded="1",f.currentVertexStyle.rounded="1"):(delete f.currentEdgeStyle.rounded,delete f.currentVertexStyle.rounded);f.updateCellStyles({rounded:ea?"1":"0"},f.getVerticesAndEdges())},null,function(ea){ea.style.width="auto"}));"1"!=urlParams.sketch&&
+(B=B.cloneNode(!1),C=C.cloneNode(!1),x=x.cloneNode(!1),x.appendChild(B),x.appendChild(C),r.appendChild(x),B.appendChild(this.createOption(mxResources.get("curved"),function(){return n},function(ea){(n=ea)?f.currentEdgeStyle.curved="1":delete f.currentEdgeStyle.curved;f.updateCellStyles({curved:ea?"1":null},f.getVerticesAndEdges(!1,!0))},null,function(ea){ea.style.width="auto"})));u.appendChild(m);a.appendChild(u);var F=["fillColor","strokeColor","fontColor","gradientColor"],J=mxUtils.bind(this,function(ea,
+qa){var O=f.getVerticesAndEdges();e.beginUpdate();try{for(var R=0;R<O.length;R++){var G=f.getCellStyle(O[R]);null!=G.labelBackgroundColor&&f.updateCellStyles({labelBackgroundColor:null!=qa?qa.background:null},[O[R]]);for(var K=e.isEdge(O[R]),Q=e.getStyle(O[R]),ba=K?f.currentEdgeStyle:f.currentVertexStyle,la=0;la<ea.length;la++)if(null!=G[ea[la]]&&G[ea[la]]!=mxConstants.NONE||ea[la]!=mxConstants.STYLE_FILLCOLOR&&ea[la]!=mxConstants.STYLE_STROKECOLOR)Q=mxUtils.setStyle(Q,ea[la],ba[ea[la]]);e.setStyle(O[R],
+Q)}}finally{e.endUpdate()}}),D=mxUtils.bind(this,function(ea,qa,O){if(null!=ea)for(var R=0;R<qa.length;R++)if(null!=ea[qa[R]]&&ea[qa[R]]!=mxConstants.NONE||qa[R]!=mxConstants.STYLE_FILLCOLOR&&qa[R]!=mxConstants.STYLE_STROKECOLOR)ea[qa[R]]=O[qa[R]]}),N=mxUtils.bind(this,function(ea,qa,O,R,G){if(null!=ea){null!=O&&null!=qa.labelBackgroundColor&&(R=null!=R?R.background:null,G=null!=G?G:f,null==R&&(R=G.background),null==R&&(R=G.defaultPageBackgroundColor),qa.labelBackgroundColor=R);for(var K in ea)if(null==
+O||null!=qa[K]&&qa[K]!=mxConstants.NONE||K!=mxConstants.STYLE_FILLCOLOR&&K!=mxConstants.STYLE_STROKECOLOR)qa[K]=ea[K]}});"1"!=urlParams.sketch&&(B=mxUtils.button(mxResources.get("reset"),mxUtils.bind(this,function(ea){ea=f.getVerticesAndEdges(!0,!0);if(0<ea.length){e.beginUpdate();try{f.updateCellStyles({sketch:null,rounded:null},ea),f.updateCellStyles({curved:null},f.getVerticesAndEdges(!1,!0))}finally{e.endUpdate()}}b.clearDefaultStyle()})),B.setAttribute("title",mxResources.get("reset")),B.style.textOverflow=
+"ellipsis",B.style.maxWidth="90px",C.appendChild(B));var S=mxUtils.bind(this,function(ea,qa,O,R,G){var K=document.createElement("div");K.style.position="absolute";K.style.display="inline-block";K.style.overflow="hidden";K.style.pointerEvents="none";K.style.width="100%";K.style.height="100%";G.appendChild(K);var Q=new Graph(K,null,null,f.getStylesheet());Q.resetViewOnRootChange=!1;Q.foldingEnabled=!1;Q.gridEnabled=!1;Q.autoScroll=!1;Q.setTooltips(!1);Q.setConnectable(!1);Q.setPanning(!1);Q.setEnabled(!1);
+Q.getCellStyle=function(ra,X){X=null!=X?X:!0;var ca=mxUtils.clone(f.getCellStyle.apply(this,arguments)),oa=f.stylesheet.getDefaultVertexStyle(),ta=qa;e.isEdge(ra)&&(oa=f.stylesheet.getDefaultEdgeStyle(),ta=O);D(ca,F,oa);N(ea,ca,ra,R,Q);N(ta,ca,ra,R,Q);X&&(ca=f.postProcessCellStyle(ra,ca));return ca};Q.model.beginUpdate();try{var ba=Q.insertVertex(Q.getDefaultParent(),null,"Shape",14,8,70,40,"strokeWidth=2;"),la=Q.insertEdge(Q.getDefaultParent(),null,"Connector",ba,ba,"edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;endSize=5;strokeWidth=2;");
+la.geometry.points=[new mxPoint(32,70)];la.geometry.offset=new mxPoint(0,8)}finally{Q.model.endUpdate()}}),T=document.createElement("div");T.style.position="relative";a.appendChild(T);null==this.format.cachedStyleEntries&&(this.format.cachedStyleEntries=[]);var P=mxUtils.bind(this,function(ea,qa,O,R,G){var K=this.format.cachedStyleEntries[G];null==K&&(K=document.createElement("div"),K.style.display="inline-block",K.style.position="relative",K.style.width="96px",K.style.height="90px",K.style.cursor=
+"pointer",K.style.border="1px solid gray",K.style.borderRadius="8px",K.style.margin="2px",K.style.overflow="hidden",null!=R&&null!=R.background&&(K.style.backgroundColor=R.background),S(ea,qa,O,R,K),mxEvent.addGestureListeners(K,mxUtils.bind(this,function(Q){K.style.opacity=.5}),null,mxUtils.bind(this,function(Q){K.style.opacity=1;f.currentVertexStyle=mxUtils.clone(f.defaultVertexStyle);f.currentEdgeStyle=mxUtils.clone(f.defaultEdgeStyle);N(ea,f.currentVertexStyle);N(ea,f.currentEdgeStyle);N(qa,f.currentVertexStyle);
+N(O,f.currentEdgeStyle);"1"==urlParams.sketch&&(d=Editor.sketchMode);d?(f.currentEdgeStyle.sketch="1",f.currentVertexStyle.sketch="1"):(f.currentEdgeStyle.sketch="0",f.currentVertexStyle.sketch="0");f.currentVertexStyle.rounded=k?"1":"0";f.currentEdgeStyle.rounded="1";f.currentEdgeStyle.curved=n?"1":"0";e.beginUpdate();try{var ba=F.slice(),la;for(la in ea)ba.push(la);J(ba,R);var ra=new ChangePageSetup(b,null!=R?R.background:null);ra.ignoreImage=!0;e.execute(ra);e.execute(new ChangeGridColor(b,null!=
+R&&null!=R.gridColor?R.gridColor:g))}finally{e.endUpdate()}})),mxEvent.addListener(K,"mouseenter",mxUtils.bind(this,function(Q){var ba=f.getCellStyle;Q=f.background;var la=f.view.gridColor;f.background=null!=R?R.background:null;f.view.gridColor=null!=R&&null!=R.gridColor?R.gridColor:g;f.getCellStyle=function(ra,X){X=null!=X?X:!0;var ca=mxUtils.clone(ba.apply(this,arguments)),oa=f.stylesheet.getDefaultVertexStyle(),ta=qa;e.isEdge(ra)&&(oa=f.stylesheet.getDefaultEdgeStyle(),ta=O);D(ca,F,oa);N(ea,ca,
+ra,R);N(ta,ca,ra,R);X&&(ca=this.postProcessCellStyle(ra,ca));return ca};f.refresh();f.getCellStyle=ba;f.background=Q;f.view.gridColor=la})),mxEvent.addListener(K,"mouseleave",mxUtils.bind(this,function(Q){f.refresh()})),mxClient.IS_IE||mxClient.IS_IE11||(this.format.cachedStyleEntries[G]=K));T.appendChild(K)}),Z=Math.ceil(Editor.styles.length/10);this.format.currentStylePage=null!=this.format.currentStylePage?this.format.currentStylePage:0;var U=[],V=mxUtils.bind(this,function(){0<U.length&&(U[this.format.currentStylePage].style.background=
+"#84d7ff");for(var ea=10*this.format.currentStylePage;ea<Math.min(10*(this.format.currentStylePage+1),Editor.styles.length);ea++){var qa=Editor.styles[ea];P(qa.commonStyle,qa.vertexStyle,qa.edgeStyle,qa.graph,ea)}}),aa=mxUtils.bind(this,function(ea){0<=ea&&ea<Z&&(U[this.format.currentStylePage].style.background="transparent",T.innerText="",this.format.currentStylePage=ea,V())});if(1<Z){u=document.createElement("div");u.style.whiteSpace="nowrap";u.style.position="relative";u.style.textAlign="center";
+u.style.paddingTop="4px";u.style.width="210px";a.style.paddingBottom="8px";for(C=0;C<Z;C++){var ia=document.createElement("div");ia.style.display="inline-block";ia.style.width="6px";ia.style.height="6px";ia.style.marginLeft="4px";ia.style.marginRight="3px";ia.style.borderRadius="3px";ia.style.cursor="pointer";ia.style.background="transparent";ia.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(ea,qa){mxEvent.addListener(ia,"click",mxUtils.bind(this,function(){aa(ea)}))})(C,ia);u.appendChild(ia);
+U.push(ia)}a.appendChild(u);V();15>Z&&(m=function(ea){mxEvent.addListener(ea,"mouseenter",function(){ea.style.opacity="1"});mxEvent.addListener(ea,"mouseleave",function(){ea.style.opacity="0.5"})},B=document.createElement("div"),B.style.position="absolute",B.style.left="0px",B.style.top="0px",B.style.bottom="0px",B.style.width="24px",B.style.height="24px",B.style.margin="0px",B.style.cursor="pointer",B.style.opacity="0.5",B.style.backgroundRepeat="no-repeat",B.style.backgroundPosition="center center",
+B.style.backgroundSize="24px 24px",B.style.backgroundImage="url("+Editor.previousImage+")",Editor.isDarkMode()&&(B.style.filter="invert(100%)"),C=B.cloneNode(!1),C.style.backgroundImage="url("+Editor.nextImage+")",C.style.left="",C.style.right="2px",u.appendChild(B),u.appendChild(C),mxEvent.addListener(B,"click",mxUtils.bind(this,function(){aa(mxUtils.mod(this.format.currentStylePage-1,Z))})),mxEvent.addListener(C,"click",mxUtils.bind(this,function(){aa(mxUtils.mod(this.format.currentStylePage+1,
Z))})),m(B),m(C))}else V();return a};DiagramStylePanel.prototype.destroy=function(){BaseFormatPanel.prototype.destroy.apply(this,arguments);this.darkModeChangedListener&&(this.editorUi.removeListener(this.darkModeChangedListener),this.darkModeChangedListener=null)};DiagramFormatPanel=function(a,b,f){BaseFormatPanel.call(this,a,b,f);this.init()};mxUtils.extend(DiagramFormatPanel,BaseFormatPanel);DiagramFormatPanel.showPageView=!0;DiagramFormatPanel.prototype.showBackgroundImageOption=!0;
DiagramFormatPanel.prototype.init=function(){var a=this.editorUi.editor.graph;this.container.appendChild(this.addView(this.createPanel()));a.isEnabled()&&(this.container.appendChild(this.addOptions(this.createPanel())),this.container.appendChild(this.addPaperSize(this.createPanel())),this.container.appendChild(this.addStyleOps(this.createPanel())))};
-DiagramFormatPanel.prototype.addView=function(a){var b=this.editorUi,f=b.editor.graph;a.appendChild(this.createTitle(mxResources.get("view")));this.addGridOption(a);DiagramFormatPanel.showPageView&&a.appendChild(this.createOption(mxResources.get("pageView"),function(){return f.pageVisible},function(e){b.actions.get("pageView").funct()},{install:function(e){this.listener=function(){e(f.pageVisible)};b.addListener("pageViewChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}}));
-if(f.isEnabled()){var d=this.createColorOption(mxResources.get("background"),function(){return f.background},function(e){var k=new ChangePageSetup(b,e);k.ignoreImage=null!=e&&e!=mxConstants.NONE;f.model.execute(k)},"#ffffff",{install:function(e){this.listener=function(){e(f.background)};b.addListener("backgroundColorChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}});if(this.showBackgroundImageOption){var g=d.getElementsByTagName("span")[0];g.style.display="inline-block";
-g.style.textOverflow="ellipsis";g.style.overflow="hidden";g.style.maxWidth="68px";mxClient.IS_FF&&(g.style.marginTop="1px");g=mxUtils.button(mxResources.get("change"),function(e){b.showBackgroundImageDialog(null,b.editor.graph.backgroundImage);mxEvent.consume(e)});g.className="geColorBtn";g.style.position="absolute";g.style.marginTop="-3px";g.style.height="22px";g.style.left="118px";g.style.width="56px";d.appendChild(g)}a.appendChild(d)}return a};
-DiagramFormatPanel.prototype.addOptions=function(a){var b=this.editorUi,f=b.editor.graph;a.appendChild(this.createTitle(mxResources.get("options")));f.isEnabled()&&(a.appendChild(this.createOption(mxResources.get("connectionArrows"),function(){return f.connectionArrowsEnabled},function(d){b.actions.get("connectionArrows").funct()},{install:function(d){this.listener=function(){d(f.connectionArrowsEnabled)};b.addListener("connectionArrowsChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}})),
-a.appendChild(this.createOption(mxResources.get("connectionPoints"),function(){return f.connectionHandler.isEnabled()},function(d){b.actions.get("connectionPoints").funct()},{install:function(d){this.listener=function(){d(f.connectionHandler.isEnabled())};b.addListener("connectionPointsChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}})),a.appendChild(this.createOption(mxResources.get("guides"),function(){return f.graphHandler.guidesEnabled},function(d){b.actions.get("guides").funct()},
-{install:function(d){this.listener=function(){d(f.graphHandler.guidesEnabled)};b.addListener("guidesEnabledChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}})));return a};
-DiagramFormatPanel.prototype.addGridOption=function(a){function b(u){var m=f.isFloatUnit()?parseFloat(e.value):parseInt(e.value);m=f.fromUnit(Math.max(f.inUnit(1),isNaN(m)?f.inUnit(10):m));m!=g.getGridSize()&&(mxGraph.prototype.gridSize=m,g.setGridSize(m));e.value=f.inUnit(m)+" "+f.getUnit();mxEvent.consume(u)}var f=this,d=this.editorUi,g=d.editor.graph,e=document.createElement("input");e.style.position="absolute";e.style.textAlign="right";e.style.width="48px";e.style.marginTop="-2px";e.style.height=
-"21px";e.style.border="1px solid rgb(160, 160, 160)";e.style.borderRadius="4px";e.style.boxSizing="border-box";e.value=this.inUnit(g.getGridSize())+" "+this.getUnit();var k=this.createStepper(e,b,this.getUnitStep(),null,null,null,this.isFloatUnit());e.style.display=g.isGridEnabled()?"":"none";k.style.display=e.style.display;mxEvent.addListener(e,"keydown",function(u){13==u.keyCode?(g.container.focus(),mxEvent.consume(u)):27==u.keyCode&&(e.value=g.getGridSize(),g.container.focus(),mxEvent.consume(u))});
-mxEvent.addListener(e,"blur",b);mxEvent.addListener(e,"change",b);e.style.right="78px";k.style.marginTop="-17px";k.style.right="66px";var n=this.createColorOption(mxResources.get("grid"),function(){var u=g.view.gridColor;return g.isGridEnabled()?u:null},function(u){var m=g.isGridEnabled();u==mxConstants.NONE?g.setGridEnabled(!1):(g.setGridEnabled(!0),d.setGridColor(u));e.style.display=g.isGridEnabled()?"":"none";k.style.display=e.style.display;m!=g.isGridEnabled()&&(g.defaultGridEnabled=g.isGridEnabled(),
-d.fireEvent(new mxEventObject("gridEnabledChanged")))},Editor.isDarkMode()?g.view.defaultDarkGridColor:g.view.defaultGridColor,{install:function(u){this.listener=function(){u(g.isGridEnabled()?g.view.gridColor:null)};d.addListener("gridColorChanged",this.listener);d.addListener("gridEnabledChanged",this.listener)},destroy:function(){d.removeListener(this.listener)}});n.appendChild(e);n.appendChild(k);a.appendChild(n)};
+DiagramFormatPanel.prototype.addView=function(a){var b=this.editorUi,f=b.editor.graph;a.appendChild(this.createTitle(mxResources.get("view")));this.addGridOption(a);DiagramFormatPanel.showPageView&&a.appendChild(this.createOption(mxResources.get("pageView"),function(){return f.pageVisible},function(d){b.actions.get("pageView").funct()},{install:function(d){this.listener=function(){d(f.pageVisible)};b.addListener("pageViewChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}}));
+if(f.isEnabled()){var e=this.createColorOption(mxResources.get("background"),function(){return f.background},function(d){var k=new ChangePageSetup(b,d);k.ignoreImage=null!=d&&d!=mxConstants.NONE;f.model.execute(k)},"#ffffff",{install:function(d){this.listener=function(){d(f.background)};b.addListener("backgroundColorChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}});if(this.showBackgroundImageOption){var g=e.getElementsByTagName("span")[0];g.style.display="inline-block";
+g.style.textOverflow="ellipsis";g.style.overflow="hidden";g.style.maxWidth="68px";mxClient.IS_FF&&(g.style.marginTop="1px");g=mxUtils.button(mxResources.get("change"),function(d){b.showBackgroundImageDialog(null,b.editor.graph.backgroundImage);mxEvent.consume(d)});g.className="geColorBtn";g.style.position="absolute";g.style.marginTop="-3px";g.style.height="22px";g.style.left="118px";g.style.width="56px";e.appendChild(g)}a.appendChild(e)}return a};
+DiagramFormatPanel.prototype.addOptions=function(a){var b=this.editorUi,f=b.editor.graph;a.appendChild(this.createTitle(mxResources.get("options")));f.isEnabled()&&(a.appendChild(this.createOption(mxResources.get("connectionArrows"),function(){return f.connectionArrowsEnabled},function(e){b.actions.get("connectionArrows").funct()},{install:function(e){this.listener=function(){e(f.connectionArrowsEnabled)};b.addListener("connectionArrowsChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}})),
+a.appendChild(this.createOption(mxResources.get("connectionPoints"),function(){return f.connectionHandler.isEnabled()},function(e){b.actions.get("connectionPoints").funct()},{install:function(e){this.listener=function(){e(f.connectionHandler.isEnabled())};b.addListener("connectionPointsChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}})),a.appendChild(this.createOption(mxResources.get("guides"),function(){return f.graphHandler.guidesEnabled},function(e){b.actions.get("guides").funct()},
+{install:function(e){this.listener=function(){e(f.graphHandler.guidesEnabled)};b.addListener("guidesEnabledChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}})));return a};
+DiagramFormatPanel.prototype.addGridOption=function(a){function b(u){var m=f.isFloatUnit()?parseFloat(d.value):parseInt(d.value);m=f.fromUnit(Math.max(f.inUnit(1),isNaN(m)?f.inUnit(10):m));m!=g.getGridSize()&&(mxGraph.prototype.gridSize=m,g.setGridSize(m));d.value=f.inUnit(m)+" "+f.getUnit();mxEvent.consume(u)}var f=this,e=this.editorUi,g=e.editor.graph,d=document.createElement("input");d.style.position="absolute";d.style.textAlign="right";d.style.width="48px";d.style.marginTop="-2px";d.style.height=
+"21px";d.style.border="1px solid rgb(160, 160, 160)";d.style.borderRadius="4px";d.style.boxSizing="border-box";d.value=this.inUnit(g.getGridSize())+" "+this.getUnit();var k=this.createStepper(d,b,this.getUnitStep(),null,null,null,this.isFloatUnit());d.style.display=g.isGridEnabled()?"":"none";k.style.display=d.style.display;mxEvent.addListener(d,"keydown",function(u){13==u.keyCode?(g.container.focus(),mxEvent.consume(u)):27==u.keyCode&&(d.value=g.getGridSize(),g.container.focus(),mxEvent.consume(u))});
+mxEvent.addListener(d,"blur",b);mxEvent.addListener(d,"change",b);d.style.right="78px";k.style.marginTop="-17px";k.style.right="66px";var n=this.createColorOption(mxResources.get("grid"),function(){var u=g.view.gridColor;return g.isGridEnabled()?u:null},function(u){var m=g.isGridEnabled();u==mxConstants.NONE?g.setGridEnabled(!1):(g.setGridEnabled(!0),e.setGridColor(u));d.style.display=g.isGridEnabled()?"":"none";k.style.display=d.style.display;m!=g.isGridEnabled()&&(g.defaultGridEnabled=g.isGridEnabled(),
+e.fireEvent(new mxEventObject("gridEnabledChanged")))},Editor.isDarkMode()?g.view.defaultDarkGridColor:g.view.defaultGridColor,{install:function(u){this.listener=function(){u(g.isGridEnabled()?g.view.gridColor:null)};e.addListener("gridColorChanged",this.listener);e.addListener("gridEnabledChanged",this.listener)},destroy:function(){e.removeListener(this.listener)}});n.appendChild(d);n.appendChild(k);a.appendChild(n)};
DiagramFormatPanel.prototype.addDocumentProperties=function(a){a.appendChild(this.createTitle(mxResources.get("options")));return a};
-DiagramFormatPanel.prototype.addPaperSize=function(a){var b=this.editorUi,f=b.editor.graph;a.appendChild(this.createTitle(mxResources.get("paperSize")));var d=PageSetupDialog.addPageFormatPanel(a,"formatpanel",f.pageFormat,function(e){if(null==f.pageFormat||f.pageFormat.width!=e.width||f.pageFormat.height!=e.height)e=new ChangePageSetup(b,null,null,e),e.ignoreColor=!0,e.ignoreImage=!0,f.model.execute(e)});this.addKeyHandler(d.widthInput,function(){d.set(f.pageFormat)});this.addKeyHandler(d.heightInput,
-function(){d.set(f.pageFormat)});var g=function(){d.set(f.pageFormat)};b.addListener("pageFormatChanged",g);this.listeners.push({destroy:function(){b.removeListener(g)}});f.getModel().addListener(mxEvent.CHANGE,g);this.listeners.push({destroy:function(){f.getModel().removeListener(g)}});return a};DiagramFormatPanel.prototype.addStyleOps=function(a){this.addActions(a,["editData"]);this.addActions(a,["clearDefaultStyle"]);return a};
-DiagramFormatPanel.prototype.destroy=function(){BaseFormatPanel.prototype.destroy.apply(this,arguments);this.gridEnabledListener&&(this.editorUi.removeListener(this.gridEnabledListener),this.gridEnabledListener=null)};(function(){function a(c,h,q){mxShape.call(this);this.line=c;this.stroke=h;this.strokewidth=null!=q?q:1;this.updateBoundsFromLine()}function b(){mxSwimlane.call(this)}function f(){mxSwimlane.call(this)}function d(){mxCylinder.call(this)}function g(){mxCylinder.call(this)}function e(){mxActor.call(this)}function k(){mxCylinder.call(this)}function n(){mxCylinder.call(this)}function u(){mxCylinder.call(this)}function m(){mxCylinder.call(this)}function r(){mxShape.call(this)}function x(){mxShape.call(this)}
-function B(c,h,q,l){mxShape.call(this);this.bounds=c;this.fill=h;this.stroke=q;this.strokewidth=null!=l?l:1}function C(){mxActor.call(this)}function G(){mxCylinder.call(this)}function J(){mxCylinder.call(this)}function D(){mxActor.call(this)}function N(){mxActor.call(this)}function Q(){mxActor.call(this)}function R(){mxActor.call(this)}function P(){mxActor.call(this)}function Z(){mxActor.call(this)}function U(){mxActor.call(this)}function V(c,h){this.canvas=c;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");
+DiagramFormatPanel.prototype.addPaperSize=function(a){var b=this.editorUi,f=b.editor.graph;a.appendChild(this.createTitle(mxResources.get("paperSize")));var e=PageSetupDialog.addPageFormatPanel(a,"formatpanel",f.pageFormat,function(d){if(null==f.pageFormat||f.pageFormat.width!=d.width||f.pageFormat.height!=d.height)d=new ChangePageSetup(b,null,null,d),d.ignoreColor=!0,d.ignoreImage=!0,f.model.execute(d)});this.addKeyHandler(e.widthInput,function(){e.set(f.pageFormat)});this.addKeyHandler(e.heightInput,
+function(){e.set(f.pageFormat)});var g=function(){e.set(f.pageFormat)};b.addListener("pageFormatChanged",g);this.listeners.push({destroy:function(){b.removeListener(g)}});f.getModel().addListener(mxEvent.CHANGE,g);this.listeners.push({destroy:function(){f.getModel().removeListener(g)}});return a};DiagramFormatPanel.prototype.addStyleOps=function(a){this.addActions(a,["editData"]);this.addActions(a,["clearDefaultStyle"]);return a};
+DiagramFormatPanel.prototype.destroy=function(){BaseFormatPanel.prototype.destroy.apply(this,arguments);this.gridEnabledListener&&(this.editorUi.removeListener(this.gridEnabledListener),this.gridEnabledListener=null)};(function(){function a(c,h,q){mxShape.call(this);this.line=c;this.stroke=h;this.strokewidth=null!=q?q:1;this.updateBoundsFromLine()}function b(){mxSwimlane.call(this)}function f(){mxSwimlane.call(this)}function e(){mxCylinder.call(this)}function g(){mxCylinder.call(this)}function d(){mxActor.call(this)}function k(){mxCylinder.call(this)}function n(){mxCylinder.call(this)}function u(){mxCylinder.call(this)}function m(){mxCylinder.call(this)}function r(){mxShape.call(this)}function x(){mxShape.call(this)}
+function B(c,h,q,l){mxShape.call(this);this.bounds=c;this.fill=h;this.stroke=q;this.strokewidth=null!=l?l:1}function C(){mxActor.call(this)}function F(){mxCylinder.call(this)}function J(){mxCylinder.call(this)}function D(){mxActor.call(this)}function N(){mxActor.call(this)}function S(){mxActor.call(this)}function T(){mxActor.call(this)}function P(){mxActor.call(this)}function Z(){mxActor.call(this)}function U(){mxActor.call(this)}function V(c,h){this.canvas=c;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");
this.defaultVariation=h;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,V.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,V.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,V.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,V.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,V.prototype.curveTo);
-this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,V.prototype.arcTo)}function ia(){mxRectangleShape.call(this)}function ha(){mxRectangleShape.call(this)}function ba(){mxActor.call(this)}function qa(){mxActor.call(this)}function O(){mxActor.call(this)}function S(){mxRectangleShape.call(this)}function F(){mxRectangleShape.call(this)}function L(){mxCylinder.call(this)}function T(){mxShape.call(this)}function ca(){mxShape.call(this)}function fa(){mxEllipse.call(this)}function wa(){mxShape.call(this)}
-function W(){mxShape.call(this)}function aa(){mxRectangleShape.call(this)}function oa(){mxShape.call(this)}function sa(){mxShape.call(this)}function Ka(){mxShape.call(this)}function Ha(){mxShape.call(this)}function ua(){mxShape.call(this)}function Ca(){mxCylinder.call(this)}function ra(){mxCylinder.call(this)}function Da(){mxRectangleShape.call(this)}function Ua(){mxDoubleEllipse.call(this)}function db(){mxDoubleEllipse.call(this)}function Ta(){mxArrowConnector.call(this);this.spacing=0}function $a(){mxArrowConnector.call(this);
-this.spacing=0}function Xa(){mxActor.call(this)}function Va(){mxRectangleShape.call(this)}function Ya(){mxActor.call(this)}function jb(){mxActor.call(this)}function bb(){mxActor.call(this)}function da(){mxActor.call(this)}function t(){mxActor.call(this)}function z(){mxActor.call(this)}function A(){mxActor.call(this)}function E(){mxActor.call(this)}function H(){mxActor.call(this)}function K(){mxActor.call(this)}function X(){mxEllipse.call(this)}function ja(){mxEllipse.call(this)}function ea(){mxEllipse.call(this)}
-function ka(){mxRhombus.call(this)}function ta(){mxEllipse.call(this)}function Aa(){mxEllipse.call(this)}function Ea(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function La(){mxActor.call(this)}function Ia(){mxActor.call(this)}function Fa(){mxActor.call(this)}function Ga(c,h,q,l){mxShape.call(this);this.bounds=c;this.fill=h;this.stroke=q;this.strokewidth=null!=l?l:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function Oa(){mxConnector.call(this)}
+this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,V.prototype.arcTo)}function aa(){mxRectangleShape.call(this)}function ia(){mxRectangleShape.call(this)}function ea(){mxActor.call(this)}function qa(){mxActor.call(this)}function O(){mxActor.call(this)}function R(){mxRectangleShape.call(this)}function G(){mxRectangleShape.call(this)}function K(){mxCylinder.call(this)}function Q(){mxShape.call(this)}function ba(){mxShape.call(this)}function la(){mxEllipse.call(this)}function ra(){mxShape.call(this)}
+function X(){mxShape.call(this)}function ca(){mxRectangleShape.call(this)}function oa(){mxShape.call(this)}function ta(){mxShape.call(this)}function Ka(){mxShape.call(this)}function Ha(){mxShape.call(this)}function va(){mxShape.call(this)}function Ca(){mxCylinder.call(this)}function sa(){mxCylinder.call(this)}function Da(){mxRectangleShape.call(this)}function Ua(){mxDoubleEllipse.call(this)}function db(){mxDoubleEllipse.call(this)}function Ta(){mxArrowConnector.call(this);this.spacing=0}function $a(){mxArrowConnector.call(this);
+this.spacing=0}function Xa(){mxActor.call(this)}function Va(){mxRectangleShape.call(this)}function Ya(){mxActor.call(this)}function jb(){mxActor.call(this)}function bb(){mxActor.call(this)}function da(){mxActor.call(this)}function t(){mxActor.call(this)}function z(){mxActor.call(this)}function A(){mxActor.call(this)}function E(){mxActor.call(this)}function H(){mxActor.call(this)}function L(){mxActor.call(this)}function W(){mxEllipse.call(this)}function ha(){mxEllipse.call(this)}function fa(){mxEllipse.call(this)}
+function ja(){mxRhombus.call(this)}function ua(){mxEllipse.call(this)}function Aa(){mxEllipse.call(this)}function Ea(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function La(){mxActor.call(this)}function Ia(){mxActor.call(this)}function Fa(){mxActor.call(this)}function Ga(c,h,q,l){mxShape.call(this);this.bounds=c;this.fill=h;this.stroke=q;this.strokewidth=null!=l?l:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function Oa(){mxConnector.call(this)}
function Pa(c,h,q,l,p,v,w,I,y,Y){w+=y;var M=l.clone();l.x-=p*(2*w+y);l.y-=v*(2*w+y);p*=w+y;v*=w+y;return function(){c.ellipse(M.x-p-w,M.y-v-w,2*w,2*w);Y?c.fillAndStroke():c.stroke()}}mxUtils.extend(a,mxShape);a.prototype.updateBoundsFromLine=function(){var c=null;if(null!=this.line)for(var h=0;h<this.line.length;h++){var q=this.line[h];null!=q&&(q=new mxRectangle(q.x,q.y,this.strokewidth,this.strokewidth),null==c?c=q:c.add(q))}this.bounds=null!=c?c:new mxRectangle};a.prototype.paintVertexShape=function(c,
h,q,l,p){this.paintTableLine(c,this.line,0,0)};a.prototype.paintTableLine=function(c,h,q,l){if(null!=h){var p=null;c.begin();for(var v=0;v<h.length;v++){var w=h[v];null!=w&&(null==p?c.moveTo(w.x+q,w.y+l):null!=p&&c.lineTo(w.x+q,w.y+l));p=w}c.end();c.stroke()}};a.prototype.intersectsRectangle=function(c){var h=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var q=null,l=0;l<this.line.length&&!h;l++){var p=this.line[l];null!=p&&null!=q&&(h=mxUtils.rectangleIntersectsSegment(c,
q,p));q=p}return h};mxCellRenderer.registerShape("tableLine",a);mxUtils.extend(b,mxSwimlane);b.prototype.getLabelBounds=function(c){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};b.prototype.paintVertexShape=function(c,h,q,l,p){var v=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):!1,w=this.isHorizontal(),I=this.getTitleSize();0==I||this.outline?Ea.prototype.paintVertexShape.apply(this,
arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-h,-q));v||this.outline||!(w&&I<p||!w&&I<l)||this.paintForeground(c,h,q,l,p)};b.prototype.paintForeground=function(c,h,q,l,p){if(null!=this.state){var v=this.flipH,w=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var I=v;v=w;w=I}c.rotate(-this.getShapeRotation(),v,w,h+l/2,q+p/2);s=this.scale;h=this.bounds.x/s;q=this.bounds.y/s;l=this.bounds.width/s;p=this.bounds.height/
s;this.paintTableForeground(c,h,q,l,p)}};b.prototype.paintTableForeground=function(c,h,q,l,p){l=this.state.view.graph.getTableLines(this.state.cell,"0"!=mxUtils.getValue(this.state.style,"rowLines","1"),"0"!=mxUtils.getValue(this.state.style,"columnLines","1"));for(p=0;p<l.length;p++)a.prototype.paintTableLine(c,l[p],h,q)};b.prototype.configurePointerEvents=function(c){0==this.getTitleSize()?c.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",
-b);mxUtils.extend(f,b);f.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",f);mxUtils.extend(d,mxCylinder);d.prototype.size=20;d.prototype.darkOpacity=0;d.prototype.darkOpacity2=0;d.prototype.paintVertexShape=function(c,h,q,l,p){var v=Math.max(0,Math.min(l,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),w=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),I=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+b);mxUtils.extend(f,b);f.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",f);mxUtils.extend(e,mxCylinder);e.prototype.size=20;e.prototype.darkOpacity=0;e.prototype.darkOpacity2=0;e.prototype.paintVertexShape=function(c,h,q,l,p){var v=Math.max(0,Math.min(l,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),w=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),I=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,
"darkOpacity2",this.darkOpacity2))));c.translate(h,q);c.begin();c.moveTo(0,0);c.lineTo(l-v,0);c.lineTo(l,v);c.lineTo(l,p);c.lineTo(v,p);c.lineTo(0,p-v);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=w&&(c.setFillAlpha(Math.abs(w)),c.setFillColor(0>w?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(l-v,0),c.lineTo(l,v),c.lineTo(v,v),c.close(),c.fill()),0!=I&&(c.setFillAlpha(Math.abs(I)),c.setFillColor(0>I?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(v,
-v),c.lineTo(v,p),c.lineTo(0,p-v),c.close(),c.fill()),c.begin(),c.moveTo(v,p),c.lineTo(v,v),c.lineTo(0,0),c.moveTo(v,v),c.lineTo(l,v),c.end(),c.stroke())};d.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?(c=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(c,c,0,0)):null};mxCellRenderer.registerShape("cube",d);var Na=Math.tan(mxUtils.toRadians(30)),Sa=(.5-Na)/2;mxCellRenderer.registerShape("isoRectangle",e);mxUtils.extend(g,
-mxCylinder);g.prototype.size=6;g.prototype.paintVertexShape=function(c,h,q,l,p){c.setFillColor(this.stroke);var v=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;c.ellipse(h+.5*(l-v),q+.5*(p-v),v,v);c.fill();c.setFillColor(mxConstants.NONE);c.rect(h,q,l,p);c.fill()};mxCellRenderer.registerShape("waypoint",g);mxUtils.extend(e,mxActor);e.prototype.size=20;e.prototype.redrawPath=function(c,h,q,l,p){h=Math.min(l,p/Na);c.translate((l-h)/2,(p-h)/2+h/4);c.moveTo(0,
-.25*h);c.lineTo(.5*h,h*Sa);c.lineTo(h,.25*h);c.lineTo(.5*h,(.5-Sa)*h);c.lineTo(0,.25*h);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",e);mxUtils.extend(k,mxCylinder);k.prototype.size=20;k.prototype.redrawPath=function(c,h,q,l,p,v){h=Math.min(l,p/(.5+Na));v?(c.moveTo(0,.25*h),c.lineTo(.5*h,(.5-Sa)*h),c.lineTo(h,.25*h),c.moveTo(.5*h,(.5-Sa)*h),c.lineTo(.5*h,(1-Sa)*h)):(c.translate((l-h)/2,(p-h)/2),c.moveTo(0,.25*h),c.lineTo(.5*h,h*Sa),c.lineTo(h,.25*h),c.lineTo(h,.75*h),c.lineTo(.5*
+v),c.lineTo(v,p),c.lineTo(0,p-v),c.close(),c.fill()),c.begin(),c.moveTo(v,p),c.lineTo(v,v),c.lineTo(0,0),c.moveTo(v,v),c.lineTo(l,v),c.end(),c.stroke())};e.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?(c=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(c,c,0,0)):null};mxCellRenderer.registerShape("cube",e);var Na=Math.tan(mxUtils.toRadians(30)),Sa=(.5-Na)/2;mxCellRenderer.registerShape("isoRectangle",d);mxUtils.extend(g,
+mxCylinder);g.prototype.size=6;g.prototype.paintVertexShape=function(c,h,q,l,p){c.setFillColor(this.stroke);var v=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;c.ellipse(h+.5*(l-v),q+.5*(p-v),v,v);c.fill();c.setFillColor(mxConstants.NONE);c.rect(h,q,l,p);c.fill()};mxCellRenderer.registerShape("waypoint",g);mxUtils.extend(d,mxActor);d.prototype.size=20;d.prototype.redrawPath=function(c,h,q,l,p){h=Math.min(l,p/Na);c.translate((l-h)/2,(p-h)/2+h/4);c.moveTo(0,
+.25*h);c.lineTo(.5*h,h*Sa);c.lineTo(h,.25*h);c.lineTo(.5*h,(.5-Sa)*h);c.lineTo(0,.25*h);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",d);mxUtils.extend(k,mxCylinder);k.prototype.size=20;k.prototype.redrawPath=function(c,h,q,l,p,v){h=Math.min(l,p/(.5+Na));v?(c.moveTo(0,.25*h),c.lineTo(.5*h,(.5-Sa)*h),c.lineTo(h,.25*h),c.moveTo(.5*h,(.5-Sa)*h),c.lineTo(.5*h,(1-Sa)*h)):(c.translate((l-h)/2,(p-h)/2),c.moveTo(0,.25*h),c.lineTo(.5*h,h*Sa),c.lineTo(h,.25*h),c.lineTo(h,.75*h),c.lineTo(.5*
h,(1-Sa)*h),c.lineTo(0,.75*h),c.close());c.end()};mxCellRenderer.registerShape("isoCube",k);mxUtils.extend(n,mxCylinder);n.prototype.redrawPath=function(c,h,q,l,p,v){h=Math.min(p/2,Math.round(p/8)+this.strokewidth-1);if(v&&null!=this.fill||!v&&null==this.fill)c.moveTo(0,h),c.curveTo(0,2*h,l,2*h,l,h),v||(c.stroke(),c.begin()),c.translate(0,h/2),c.moveTo(0,h),c.curveTo(0,2*h,l,2*h,l,h),v||(c.stroke(),c.begin()),c.translate(0,h/2),c.moveTo(0,h),c.curveTo(0,2*h,l,2*h,l,h),v||(c.stroke(),c.begin()),c.translate(0,
-h);v||(c.moveTo(0,h),c.curveTo(0,-h/3,l,-h/3,l,h),c.lineTo(l,p-h),c.curveTo(l,p+h/3,0,p+h/3,0,p-h),c.close())};n.prototype.getLabelMargins=function(c){return new mxRectangle(0,2.5*Math.min(c.height/2,Math.round(c.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",n);mxUtils.extend(u,mxCylinder);u.prototype.size=30;u.prototype.darkOpacity=0;u.prototype.paintVertexShape=function(c,h,q,l,p){var v=Math.max(0,Math.min(l,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",
this.size))))),w=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));c.translate(h,q);c.begin();c.moveTo(0,0);c.lineTo(l-v,0);c.lineTo(l,v);c.lineTo(l,p);c.lineTo(0,p);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=w&&(c.setFillAlpha(Math.abs(w)),c.setFillColor(0>w?"#FFFFFF":"#000000"),c.begin(),c.moveTo(l-v,0),c.lineTo(l-v,v),c.lineTo(l,v),c.close(),c.fill()),c.begin(),c.moveTo(l-v,0),c.lineTo(l-v,v),c.lineTo(l,v),
@@ -3541,23 +3544,23 @@ c.end(),c.stroke())};mxCellRenderer.registerShape("note",u);mxUtils.extend(m,u);
"isoAngle",this.isoAngle))))*Math.PI/200;v=Math.min(l*Math.tan(v),.5*p);c.translate(h,q);c.begin();c.moveTo(.5*l,0);c.lineTo(l,v);c.lineTo(l,p-v);c.lineTo(.5*l,p);c.lineTo(0,p-v);c.lineTo(0,v);c.close();c.fillAndStroke();c.setShadow(!1);c.begin();c.moveTo(0,v);c.lineTo(.5*l,2*v);c.lineTo(l,v);c.moveTo(.5*l,2*v);c.lineTo(.5*l,p);c.stroke()};mxCellRenderer.registerShape("isoCube2",r);mxUtils.extend(x,mxShape);x.prototype.size=15;x.prototype.paintVertexShape=function(c,h,q,l,p){var v=Math.max(0,Math.min(.5*
p,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.translate(h,q);0==v?(c.rect(0,0,l,p),c.fillAndStroke()):(c.begin(),c.moveTo(0,v),c.arcTo(.5*l,v,0,0,1,.5*l,0),c.arcTo(.5*l,v,0,0,1,l,v),c.lineTo(l,p-v),c.arcTo(.5*l,v,0,0,1,.5*l,p),c.arcTo(.5*l,v,0,0,1,0,p-v),c.close(),c.fillAndStroke(),c.setShadow(!1),c.begin(),c.moveTo(l,v),c.arcTo(.5*l,v,0,0,1,.5*l,2*v),c.arcTo(.5*l,v,0,0,1,0,v),c.stroke())};mxCellRenderer.registerShape("cylinder2",x);mxUtils.extend(B,mxCylinder);B.prototype.size=
15;B.prototype.paintVertexShape=function(c,h,q,l,p){var v=Math.max(0,Math.min(.5*p,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),w=mxUtils.getValue(this.style,"lid",!0);c.translate(h,q);0==v?(c.rect(0,0,l,p),c.fillAndStroke()):(c.begin(),w?(c.moveTo(0,v),c.arcTo(.5*l,v,0,0,1,.5*l,0),c.arcTo(.5*l,v,0,0,1,l,v)):(c.moveTo(0,0),c.arcTo(.5*l,v,0,0,0,.5*l,v),c.arcTo(.5*l,v,0,0,0,l,0)),c.lineTo(l,p-v),c.arcTo(.5*l,v,0,0,1,.5*l,p),c.arcTo(.5*l,v,0,0,1,0,p-v),c.close(),c.fillAndStroke(),c.setShadow(!1),
-w&&(c.begin(),c.moveTo(l,v),c.arcTo(.5*l,v,0,0,1,.5*l,2*v),c.arcTo(.5*l,v,0,0,1,0,v),c.stroke()))};mxCellRenderer.registerShape("cylinder3",B);mxUtils.extend(C,mxActor);C.prototype.redrawPath=function(c,h,q,l,p){c.moveTo(0,0);c.quadTo(l/2,.5*p,l,0);c.quadTo(.5*l,p/2,l,p);c.quadTo(l/2,.5*p,0,p);c.quadTo(.5*l,p/2,0,0);c.end()};mxCellRenderer.registerShape("switch",C);mxUtils.extend(G,mxCylinder);G.prototype.tabWidth=60;G.prototype.tabHeight=20;G.prototype.tabPosition="right";G.prototype.arcSize=.1;
-G.prototype.paintVertexShape=function(c,h,q,l,p){c.translate(h,q);h=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));q=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var v=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),w=mxUtils.getValue(this.style,"rounded",!1),I=mxUtils.getValue(this.style,"absoluteArcSize",!1),y=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));I||(y*=Math.min(l,p));
+w&&(c.begin(),c.moveTo(l,v),c.arcTo(.5*l,v,0,0,1,.5*l,2*v),c.arcTo(.5*l,v,0,0,1,0,v),c.stroke()))};mxCellRenderer.registerShape("cylinder3",B);mxUtils.extend(C,mxActor);C.prototype.redrawPath=function(c,h,q,l,p){c.moveTo(0,0);c.quadTo(l/2,.5*p,l,0);c.quadTo(.5*l,p/2,l,p);c.quadTo(l/2,.5*p,0,p);c.quadTo(.5*l,p/2,0,0);c.end()};mxCellRenderer.registerShape("switch",C);mxUtils.extend(F,mxCylinder);F.prototype.tabWidth=60;F.prototype.tabHeight=20;F.prototype.tabPosition="right";F.prototype.arcSize=.1;
+F.prototype.paintVertexShape=function(c,h,q,l,p){c.translate(h,q);h=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));q=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var v=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),w=mxUtils.getValue(this.style,"rounded",!1),I=mxUtils.getValue(this.style,"absoluteArcSize",!1),y=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));I||(y*=Math.min(l,p));
y=Math.min(y,.5*l,.5*(p-q));h=Math.max(h,y);h=Math.min(l-y,h);w||(y=0);c.begin();"left"==v?(c.moveTo(Math.max(y,0),q),c.lineTo(Math.max(y,0),0),c.lineTo(h,0),c.lineTo(h,q)):(c.moveTo(l-h,q),c.lineTo(l-h,0),c.lineTo(l-Math.max(y,0),0),c.lineTo(l-Math.max(y,0),q));w?(c.moveTo(0,y+q),c.arcTo(y,y,0,0,1,y,q),c.lineTo(l-y,q),c.arcTo(y,y,0,0,1,l,y+q),c.lineTo(l,p-y),c.arcTo(y,y,0,0,1,l-y,p),c.lineTo(y,p),c.arcTo(y,y,0,0,1,0,p-y)):(c.moveTo(0,q),c.lineTo(l,q),c.lineTo(l,p),c.lineTo(0,p));c.close();c.fillAndStroke();
-c.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(c.begin(),c.moveTo(l-30,q+20),c.lineTo(l-20,q+10),c.lineTo(l-10,q+20),c.close(),c.stroke())};mxCellRenderer.registerShape("folder",G);G.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var h=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var q=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;h=mxUtils.getValue(this.style,
+c.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(c.begin(),c.moveTo(l-30,q+20),c.lineTo(l-20,q+10),c.lineTo(l-10,q+20),c.close(),c.stroke())};mxCellRenderer.registerShape("folder",F);F.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var h=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var q=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;h=mxUtils.getValue(this.style,
"tabHeight",15)*this.scale;var l=mxUtils.getValue(this.style,"rounded",!1),p=mxUtils.getValue(this.style,"absoluteArcSize",!1),v=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));p||(v*=Math.min(c.width,c.height));v=Math.min(v,.5*c.width,.5*(c.height-h));l||(v=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(v,0,Math.min(c.width,c.width-q),Math.min(c.height,c.height-h)):new mxRectangle(Math.min(c.width,c.width-q),0,v,Math.min(c.height,c.height-
h))}return new mxRectangle(0,Math.min(c.height,h),0,0)}return null};mxUtils.extend(J,mxCylinder);J.prototype.arcSize=.1;J.prototype.paintVertexShape=function(c,h,q,l,p){c.translate(h,q);var v=mxUtils.getValue(this.style,"rounded",!1),w=mxUtils.getValue(this.style,"absoluteArcSize",!1);h=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));q=mxUtils.getValue(this.style,"umlStateConnection",null);w||(h*=Math.min(l,p));h=Math.min(h,.5*l,.5*p);v||(h=0);v=0;null!=q&&(v=10);c.begin();c.moveTo(v,
h);c.arcTo(h,h,0,0,1,v+h,0);c.lineTo(l-h,0);c.arcTo(h,h,0,0,1,l,h);c.lineTo(l,p-h);c.arcTo(h,h,0,0,1,l-h,p);c.lineTo(v+h,p);c.arcTo(h,h,0,0,1,v,p-h);c.close();c.fillAndStroke();c.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(c.roundrect(l-40,p-20,10,10,3,3),c.stroke(),c.roundrect(l-20,p-20,10,10,3,3),c.stroke(),c.begin(),c.moveTo(l-30,p-15),c.lineTo(l-20,p-15),c.stroke());"connPointRefEntry"==q?(c.ellipse(0,.5*p-10,20,20),c.fillAndStroke()):"connPointRefExit"==
q&&(c.ellipse(0,.5*p-10,20,20),c.fillAndStroke(),c.begin(),c.moveTo(5,.5*p-5),c.lineTo(15,.5*p+5),c.moveTo(15,.5*p-5),c.lineTo(5,.5*p+5),c.stroke())};J.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",J);mxUtils.extend(D,mxActor);D.prototype.size=30;D.prototype.isRoundable=function(){return!0};D.prototype.redrawPath=
function(c,h,q,l,p){h=Math.max(0,Math.min(l,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(h,0),new mxPoint(l,0),new mxPoint(l,p),new mxPoint(0,p),new mxPoint(0,h)],this.isRounded,q,!0);c.end()};mxCellRenderer.registerShape("card",D);mxUtils.extend(N,mxActor);N.prototype.size=.4;N.prototype.redrawPath=function(c,h,q,l,p){h=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
"size",this.size))));c.moveTo(0,h/2);c.quadTo(l/4,1.4*h,l/2,h/2);c.quadTo(3*l/4,h*(1-1.4),l,h/2);c.lineTo(l,p-h/2);c.quadTo(3*l/4,p-1.4*h,l/2,p-h/2);c.quadTo(l/4,p-h*(1-1.4),0,p-h/2);c.lineTo(0,h/2);c.close();c.end()};N.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var h=mxUtils.getValue(this.style,"size",this.size),q=c.width,l=c.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return h*=
-l,new mxRectangle(c.x,c.y+h,q,l-2*h);h*=q;return new mxRectangle(c.x+h,c.y,q-2*h,l)}return c};mxCellRenderer.registerShape("tape",N);mxUtils.extend(Q,mxActor);Q.prototype.size=.3;Q.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*c.height):null};Q.prototype.redrawPath=function(c,h,q,l,p){h=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,
-0);c.lineTo(l,0);c.lineTo(l,p-h/2);c.quadTo(3*l/4,p-1.4*h,l/2,p-h/2);c.quadTo(l/4,p-h*(1-1.4),0,p-h/2);c.lineTo(0,h/2);c.close();c.end()};mxCellRenderer.registerShape("document",Q);var eb=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,h,q,l){var p=mxUtils.getValue(this.style,"size");return null!=p?l*Math.max(0,Math.min(1,p)):eb.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var h=2*mxUtils.getValue(this.style,
-"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,c.height*h),0,0)}return null};B.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var h=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(h/=2);return new mxRectangle(0,Math.min(c.height*this.scale,2*h*this.scale),0,Math.max(0,.3*h*this.scale))}return null};G.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var h=mxUtils.getValue(this.style,
+l,new mxRectangle(c.x,c.y+h,q,l-2*h);h*=q;return new mxRectangle(c.x+h,c.y,q-2*h,l)}return c};mxCellRenderer.registerShape("tape",N);mxUtils.extend(S,mxActor);S.prototype.size=.3;S.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*c.height):null};S.prototype.redrawPath=function(c,h,q,l,p){h=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,
+0);c.lineTo(l,0);c.lineTo(l,p-h/2);c.quadTo(3*l/4,p-1.4*h,l/2,p-h/2);c.quadTo(l/4,p-h*(1-1.4),0,p-h/2);c.lineTo(0,h/2);c.close();c.end()};mxCellRenderer.registerShape("document",S);var eb=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,h,q,l){var p=mxUtils.getValue(this.style,"size");return null!=p?l*Math.max(0,Math.min(1,p)):eb.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var h=2*mxUtils.getValue(this.style,
+"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,c.height*h),0,0)}return null};B.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var h=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(h/=2);return new mxRectangle(0,Math.min(c.height*this.scale,2*h*this.scale),0,Math.max(0,.3*h*this.scale))}return null};F.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var h=mxUtils.getValue(this.style,
"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var q=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;h=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var l=mxUtils.getValue(this.style,"rounded",!1),p=mxUtils.getValue(this.style,"absoluteArcSize",!1),v=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));p||(v*=Math.min(c.width,c.height));v=Math.min(v,.5*c.width,.5*(c.height-h));l||(v=0);return"left"==mxUtils.getValue(this.style,"tabPosition",
this.tabPosition)?new mxRectangle(v,0,Math.min(c.width,c.width-q),Math.min(c.height,c.height-h)):new mxRectangle(Math.min(c.width,c.width-q),0,v,Math.min(c.height,c.height-h))}return new mxRectangle(0,Math.min(c.height,h),0,0)}return null};J.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};m.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,
-"boundedLbl",!1)){var h=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,h*this.scale),0,Math.max(0,h*this.scale))}return null};mxUtils.extend(R,mxActor);R.prototype.size=.2;R.prototype.fixedSize=20;R.prototype.isRoundable=function(){return!0};R.prototype.redrawPath=function(c,h,q,l,p){h="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,p),new mxPoint(h,0),new mxPoint(l,0),new mxPoint(l-h,p)],this.isRounded,q,!0);c.end()};mxCellRenderer.registerShape("parallelogram",R);mxUtils.extend(P,mxActor);P.prototype.size=.2;P.prototype.fixedSize=20;P.prototype.isRoundable=function(){return!0};P.prototype.redrawPath=function(c,h,q,l,p){h="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*
+"boundedLbl",!1)){var h=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,h*this.scale),0,Math.max(0,h*this.scale))}return null};mxUtils.extend(T,mxActor);T.prototype.size=.2;T.prototype.fixedSize=20;T.prototype.isRoundable=function(){return!0};T.prototype.redrawPath=function(c,h,q,l,p){h="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,p),new mxPoint(h,0),new mxPoint(l,0),new mxPoint(l-h,p)],this.isRounded,q,!0);c.end()};mxCellRenderer.registerShape("parallelogram",T);mxUtils.extend(P,mxActor);P.prototype.size=.2;P.prototype.fixedSize=20;P.prototype.isRoundable=function(){return!0};P.prototype.redrawPath=function(c,h,q,l,p){h="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*
l,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):l*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,p),new mxPoint(h,0),new mxPoint(l-h,0),new mxPoint(l,p)],this.isRounded,q,!0)};mxCellRenderer.registerShape("trapezoid",P);mxUtils.extend(Z,mxActor);Z.prototype.size=.5;Z.prototype.redrawPath=function(c,h,q,l,p){c.setFillColor(null);
h=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(h,0),new mxPoint(h,p/2),new mxPoint(0,p/2),new mxPoint(h,p/2),new mxPoint(h,p),new mxPoint(l,p)],this.isRounded,q,!1);c.end()};mxCellRenderer.registerShape("curlyBracket",Z);mxUtils.extend(U,mxActor);U.prototype.redrawPath=function(c,h,q,l,p){c.setStrokeWidth(1);c.setFillColor(this.stroke);
h=l/5;c.rect(0,0,h,p);c.fillAndStroke();c.rect(2*h,0,h,p);c.fillAndStroke();c.rect(4*h,0,h,p);c.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",U);V.prototype.moveTo=function(c,h){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=h;this.firstX=c;this.firstY=h};V.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};
@@ -3567,32 +3570,32 @@ h};V.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.ca
mxShape.prototype.afterPaint=function(c){pb.apply(this,arguments);null!=c.handJiggle&&(c.handJiggle.destroy(),delete c.handJiggle)};mxShape.prototype.createComicCanvas=function(c){return new V(c,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(c){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(c)};mxRhombus.prototype.defaultJiggle=2;var ub=mxRectangleShape.prototype.isHtmlAllowed;
mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&ub.apply(this,arguments)};var vb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(c,h,q,l,p){if(null==c.handJiggle||c.handJiggle.constructor!=V)vb.apply(this,arguments);else{var v=!0;null!=this.style&&(v="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,
"1"));if(v||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)v||null!=this.fill&&this.fill!=mxConstants.NONE||(c.pointerEvents=!1),c.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?v=Math.min(l/2,Math.min(p/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,v=Math.min(l*
-v,p*v)),c.moveTo(h+v,q),c.lineTo(h+l-v,q),c.quadTo(h+l,q,h+l,q+v),c.lineTo(h+l,q+p-v),c.quadTo(h+l,q+p,h+l-v,q+p),c.lineTo(h+v,q+p),c.quadTo(h,q+p,h,q+p-v),c.lineTo(h,q+v),c.quadTo(h,q,h+v,q)):(c.moveTo(h,q),c.lineTo(h+l,q),c.lineTo(h+l,q+p),c.lineTo(h,q+p),c.lineTo(h,q)),c.close(),c.end(),c.fillAndStroke()}};mxUtils.extend(ia,mxRectangleShape);ia.prototype.size=.1;ia.prototype.fixedSize=!1;ia.prototype.isHtmlAllowed=function(){return!1};ia.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.state.style,
+v,p*v)),c.moveTo(h+v,q),c.lineTo(h+l-v,q),c.quadTo(h+l,q,h+l,q+v),c.lineTo(h+l,q+p-v),c.quadTo(h+l,q+p,h+l-v,q+p),c.lineTo(h+v,q+p),c.quadTo(h,q+p,h,q+p-v),c.lineTo(h,q+v),c.quadTo(h,q,h+v,q)):(c.moveTo(h,q),c.lineTo(h+l,q),c.lineTo(h+l,q+p),c.lineTo(h,q+p),c.lineTo(h,q)),c.close(),c.end(),c.fillAndStroke()}};mxUtils.extend(aa,mxRectangleShape);aa.prototype.size=.1;aa.prototype.fixedSize=!1;aa.prototype.isHtmlAllowed=function(){return!1};aa.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.state.style,
mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var h=c.width,q=c.height;c=new mxRectangle(c.x,c.y,h,q);var l=h*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var p=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;l=Math.max(l,Math.min(h*p,q*p))}c.x+=Math.round(l);c.width-=Math.round(2*l);return c}return c};
-ia.prototype.paintForeground=function(c,h,q,l,p){var v=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),w=parseFloat(mxUtils.getValue(this.style,"size",this.size));w=v?Math.max(0,Math.min(l,w)):l*Math.max(0,Math.min(1,w));this.isRounded&&(v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,w=Math.max(w,Math.min(l*v,p*v)));w=Math.round(w);c.begin();c.moveTo(h+w,q);c.lineTo(h+w,q+p);c.moveTo(h+l-w,q);c.lineTo(h+l-w,q+p);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
-arguments)};mxCellRenderer.registerShape("process",ia);mxCellRenderer.registerShape("process2",ia);mxUtils.extend(ha,mxRectangleShape);ha.prototype.paintBackground=function(c,h,q,l,p){c.setFillColor(mxConstants.NONE);c.rect(h,q,l,p);c.fill()};ha.prototype.paintForeground=function(c,h,q,l,p){};mxCellRenderer.registerShape("transparent",ha);mxUtils.extend(ba,mxHexagon);ba.prototype.size=30;ba.prototype.position=.5;ba.prototype.position2=.5;ba.prototype.base=20;ba.prototype.getLabelMargins=function(){return new mxRectangle(0,
-0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};ba.prototype.isRoundable=function(){return!0};ba.prototype.redrawPath=function(c,h,q,l,p){h=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;q=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var v=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),w=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",
-this.position2)))),I=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(c,[new mxPoint(0,0),new mxPoint(l,0),new mxPoint(l,p-q),new mxPoint(Math.min(l,v+I),p-q),new mxPoint(w,p),new mxPoint(Math.max(0,v),p-q),new mxPoint(0,p-q)],this.isRounded,h,!0,[4])};mxCellRenderer.registerShape("callout",ba);mxUtils.extend(qa,mxActor);qa.prototype.size=.2;qa.prototype.fixedSize=20;qa.prototype.isRoundable=function(){return!0};qa.prototype.redrawPath=function(c,h,
+aa.prototype.paintForeground=function(c,h,q,l,p){var v=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),w=parseFloat(mxUtils.getValue(this.style,"size",this.size));w=v?Math.max(0,Math.min(l,w)):l*Math.max(0,Math.min(1,w));this.isRounded&&(v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,w=Math.max(w,Math.min(l*v,p*v)));w=Math.round(w);c.begin();c.moveTo(h+w,q);c.lineTo(h+w,q+p);c.moveTo(h+l-w,q);c.lineTo(h+l-w,q+p);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
+arguments)};mxCellRenderer.registerShape("process",aa);mxCellRenderer.registerShape("process2",aa);mxUtils.extend(ia,mxRectangleShape);ia.prototype.paintBackground=function(c,h,q,l,p){c.setFillColor(mxConstants.NONE);c.rect(h,q,l,p);c.fill()};ia.prototype.paintForeground=function(c,h,q,l,p){};mxCellRenderer.registerShape("transparent",ia);mxUtils.extend(ea,mxHexagon);ea.prototype.size=30;ea.prototype.position=.5;ea.prototype.position2=.5;ea.prototype.base=20;ea.prototype.getLabelMargins=function(){return new mxRectangle(0,
+0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};ea.prototype.isRoundable=function(){return!0};ea.prototype.redrawPath=function(c,h,q,l,p){h=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;q=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var v=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),w=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",
+this.position2)))),I=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(c,[new mxPoint(0,0),new mxPoint(l,0),new mxPoint(l,p-q),new mxPoint(Math.min(l,v+I),p-q),new mxPoint(w,p),new mxPoint(Math.max(0,v),p-q),new mxPoint(0,p-q)],this.isRounded,h,!0,[4])};mxCellRenderer.registerShape("callout",ea);mxUtils.extend(qa,mxActor);qa.prototype.size=.2;qa.prototype.fixedSize=20;qa.prototype.isRoundable=function(){return!0};qa.prototype.redrawPath=function(c,h,
q,l,p){h="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(l-h,0),new mxPoint(l,p/2),new mxPoint(l-h,p),new mxPoint(0,p),new mxPoint(h,p/2)],this.isRounded,q,!0);c.end()};mxCellRenderer.registerShape("step",
qa);mxUtils.extend(O,mxHexagon);O.prototype.size=.25;O.prototype.fixedSize=20;O.prototype.isRoundable=function(){return!0};O.prototype.redrawPath=function(c,h,q,l,p){h="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*l,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(h,
-0),new mxPoint(l-h,0),new mxPoint(l,.5*p),new mxPoint(l-h,p),new mxPoint(h,p),new mxPoint(0,.5*p)],this.isRounded,q,!0)};mxCellRenderer.registerShape("hexagon",O);mxUtils.extend(S,mxRectangleShape);S.prototype.isHtmlAllowed=function(){return!1};S.prototype.paintForeground=function(c,h,q,l,p){var v=Math.min(l/5,p/5)+1;c.begin();c.moveTo(h+l/2,q+v);c.lineTo(h+l/2,q+p-v);c.moveTo(h+v,q+p/2);c.lineTo(h+l-v,q+p/2);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",
-S);var cb=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var h=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+h,c.y+h,c.width-2*h,c.height-2*h)}return c};mxRhombus.prototype.paintVertexShape=function(c,h,q,l,p){cb.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var v=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
-0);h+=v;q+=v;l-=2*v;p-=2*v;0<l&&0<p&&(c.setShadow(!1),cb.apply(this,[c,h,q,l,p]))}};mxUtils.extend(F,mxRectangleShape);F.prototype.isHtmlAllowed=function(){return!1};F.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var h=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+h,c.y+h,c.width-2*h,c.height-2*h)}return c};F.prototype.paintForeground=function(c,h,q,l,p){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var v=
+0),new mxPoint(l-h,0),new mxPoint(l,.5*p),new mxPoint(l-h,p),new mxPoint(h,p),new mxPoint(0,.5*p)],this.isRounded,q,!0)};mxCellRenderer.registerShape("hexagon",O);mxUtils.extend(R,mxRectangleShape);R.prototype.isHtmlAllowed=function(){return!1};R.prototype.paintForeground=function(c,h,q,l,p){var v=Math.min(l/5,p/5)+1;c.begin();c.moveTo(h+l/2,q+v);c.lineTo(h+l/2,q+p-v);c.moveTo(h+v,q+p/2);c.lineTo(h+l-v,q+p/2);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",
+R);var cb=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var h=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+h,c.y+h,c.width-2*h,c.height-2*h)}return c};mxRhombus.prototype.paintVertexShape=function(c,h,q,l,p){cb.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var v=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
+0);h+=v;q+=v;l-=2*v;p-=2*v;0<l&&0<p&&(c.setShadow(!1),cb.apply(this,[c,h,q,l,p]))}};mxUtils.extend(G,mxRectangleShape);G.prototype.isHtmlAllowed=function(){return!1};G.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var h=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+h,c.y+h,c.width-2*h,c.height-2*h)}return c};G.prototype.paintForeground=function(c,h,q,l,p){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var v=
Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);h+=v;q+=v;l-=2*v;p-=2*v;0<l&&0<p&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}c.setDashed(!1);v=0;do{var w=mxCellRenderer.defaultShapes[this.style["symbol"+v]];if(null!=w){var I=this.style["symbol"+v+"Align"],y=this.style["symbol"+v+"VerticalAlign"],Y=this.style["symbol"+v+"Width"],M=this.style["symbol"+v+"Height"],Ba=this.style["symbol"+v+"Spacing"]||0,Qa=this.style["symbol"+v+"VSpacing"]||Ba,
-Ja=this.style["symbol"+v+"ArcSpacing"];null!=Ja&&(Ja*=this.getArcSize(l+this.strokewidth,p+this.strokewidth),Ba+=Ja,Qa+=Ja);Ja=h;var la=q;Ja=I==mxConstants.ALIGN_CENTER?Ja+(l-Y)/2:I==mxConstants.ALIGN_RIGHT?Ja+(l-Y-Ba):Ja+Ba;la=y==mxConstants.ALIGN_MIDDLE?la+(p-M)/2:y==mxConstants.ALIGN_BOTTOM?la+(p-M-Qa):la+Qa;c.save();I=new w;I.style=this.style;w.prototype.paintVertexShape.call(I,c,Ja,la,Y,M);c.restore()}v++}while(null!=w)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",
-F);mxUtils.extend(L,mxCylinder);L.prototype.redrawPath=function(c,h,q,l,p,v){v?(c.moveTo(0,0),c.lineTo(l/2,p/2),c.lineTo(l,0),c.end()):(c.moveTo(0,0),c.lineTo(l,0),c.lineTo(l,p),c.lineTo(0,p),c.close())};mxCellRenderer.registerShape("message",L);mxUtils.extend(T,mxShape);T.prototype.paintBackground=function(c,h,q,l,p){c.translate(h,q);c.ellipse(l/4,0,l/2,p/4);c.fillAndStroke();c.begin();c.moveTo(l/2,p/4);c.lineTo(l/2,2*p/3);c.moveTo(l/2,p/3);c.lineTo(0,p/3);c.moveTo(l/2,p/3);c.lineTo(l,p/3);c.moveTo(l/
-2,2*p/3);c.lineTo(0,p);c.moveTo(l/2,2*p/3);c.lineTo(l,p);c.end();c.stroke()};mxCellRenderer.registerShape("umlActor",T);mxUtils.extend(ca,mxShape);ca.prototype.getLabelMargins=function(c){return new mxRectangle(c.width/6,0,0,0)};ca.prototype.paintBackground=function(c,h,q,l,p){c.translate(h,q);c.begin();c.moveTo(0,p/4);c.lineTo(0,3*p/4);c.end();c.stroke();c.begin();c.moveTo(0,p/2);c.lineTo(l/6,p/2);c.end();c.stroke();c.ellipse(l/6,0,5*l/6,p);c.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",
-ca);mxUtils.extend(fa,mxEllipse);fa.prototype.paintVertexShape=function(c,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(h+l/8,q+p);c.lineTo(h+7*l/8,q+p);c.end();c.stroke()};mxCellRenderer.registerShape("umlEntity",fa);mxUtils.extend(wa,mxShape);wa.prototype.paintVertexShape=function(c,h,q,l,p){c.translate(h,q);c.begin();c.moveTo(l,0);c.lineTo(0,p);c.moveTo(0,0);c.lineTo(l,p);c.end();c.stroke()};mxCellRenderer.registerShape("umlDestroy",wa);mxUtils.extend(W,
-mxShape);W.prototype.getLabelBounds=function(c){return new mxRectangle(c.x,c.y+c.height/8,c.width,7*c.height/8)};W.prototype.paintBackground=function(c,h,q,l,p){c.translate(h,q);c.begin();c.moveTo(3*l/8,p/8*1.1);c.lineTo(5*l/8,0);c.end();c.stroke();c.ellipse(0,p/8,l,7*p/8);c.fillAndStroke()};W.prototype.paintForeground=function(c,h,q,l,p){c.begin();c.moveTo(3*l/8,p/8*1.1);c.lineTo(5*l/8,p/4);c.end();c.stroke()};mxCellRenderer.registerShape("umlControl",W);mxUtils.extend(aa,mxRectangleShape);aa.prototype.size=
-40;aa.prototype.isHtmlAllowed=function(){return!1};aa.prototype.getLabelBounds=function(c){var h=Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(c.x,c.y,c.width,h)};aa.prototype.paintBackground=function(c,h,q,l,p){var v=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),w=mxUtils.getValue(this.style,"participant");null==w||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,
-c,h,q,l,v):(w=this.state.view.graph.cellRenderer.getShape(w),null!=w&&w!=aa&&(w=new w,w.apply(this.state),c.save(),w.paintVertexShape(c,h,q,l,v),c.restore()));v<p&&(c.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),c.begin(),c.moveTo(h+l/2,q+v),c.lineTo(h+l/2,q+p),c.end(),c.stroke())};aa.prototype.paintForeground=function(c,h,q,l,p){var v=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,c,h,q,l,
-Math.min(p,v))};mxCellRenderer.registerShape("umlLifeline",aa);mxUtils.extend(oa,mxShape);oa.prototype.width=60;oa.prototype.height=30;oa.prototype.corner=10;oa.prototype.getLabelMargins=function(c){return new mxRectangle(0,0,c.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),c.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};oa.prototype.paintBackground=function(c,h,q,l,p){var v=this.corner,w=Math.min(l,Math.max(v,parseFloat(mxUtils.getValue(this.style,
+Ja=this.style["symbol"+v+"ArcSpacing"];null!=Ja&&(Ja*=this.getArcSize(l+this.strokewidth,p+this.strokewidth),Ba+=Ja,Qa+=Ja);Ja=h;var ka=q;Ja=I==mxConstants.ALIGN_CENTER?Ja+(l-Y)/2:I==mxConstants.ALIGN_RIGHT?Ja+(l-Y-Ba):Ja+Ba;ka=y==mxConstants.ALIGN_MIDDLE?ka+(p-M)/2:y==mxConstants.ALIGN_BOTTOM?ka+(p-M-Qa):ka+Qa;c.save();I=new w;I.style=this.style;w.prototype.paintVertexShape.call(I,c,Ja,ka,Y,M);c.restore()}v++}while(null!=w)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",
+G);mxUtils.extend(K,mxCylinder);K.prototype.redrawPath=function(c,h,q,l,p,v){v?(c.moveTo(0,0),c.lineTo(l/2,p/2),c.lineTo(l,0),c.end()):(c.moveTo(0,0),c.lineTo(l,0),c.lineTo(l,p),c.lineTo(0,p),c.close())};mxCellRenderer.registerShape("message",K);mxUtils.extend(Q,mxShape);Q.prototype.paintBackground=function(c,h,q,l,p){c.translate(h,q);c.ellipse(l/4,0,l/2,p/4);c.fillAndStroke();c.begin();c.moveTo(l/2,p/4);c.lineTo(l/2,2*p/3);c.moveTo(l/2,p/3);c.lineTo(0,p/3);c.moveTo(l/2,p/3);c.lineTo(l,p/3);c.moveTo(l/
+2,2*p/3);c.lineTo(0,p);c.moveTo(l/2,2*p/3);c.lineTo(l,p);c.end();c.stroke()};mxCellRenderer.registerShape("umlActor",Q);mxUtils.extend(ba,mxShape);ba.prototype.getLabelMargins=function(c){return new mxRectangle(c.width/6,0,0,0)};ba.prototype.paintBackground=function(c,h,q,l,p){c.translate(h,q);c.begin();c.moveTo(0,p/4);c.lineTo(0,3*p/4);c.end();c.stroke();c.begin();c.moveTo(0,p/2);c.lineTo(l/6,p/2);c.end();c.stroke();c.ellipse(l/6,0,5*l/6,p);c.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",
+ba);mxUtils.extend(la,mxEllipse);la.prototype.paintVertexShape=function(c,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(h+l/8,q+p);c.lineTo(h+7*l/8,q+p);c.end();c.stroke()};mxCellRenderer.registerShape("umlEntity",la);mxUtils.extend(ra,mxShape);ra.prototype.paintVertexShape=function(c,h,q,l,p){c.translate(h,q);c.begin();c.moveTo(l,0);c.lineTo(0,p);c.moveTo(0,0);c.lineTo(l,p);c.end();c.stroke()};mxCellRenderer.registerShape("umlDestroy",ra);mxUtils.extend(X,
+mxShape);X.prototype.getLabelBounds=function(c){return new mxRectangle(c.x,c.y+c.height/8,c.width,7*c.height/8)};X.prototype.paintBackground=function(c,h,q,l,p){c.translate(h,q);c.begin();c.moveTo(3*l/8,p/8*1.1);c.lineTo(5*l/8,0);c.end();c.stroke();c.ellipse(0,p/8,l,7*p/8);c.fillAndStroke()};X.prototype.paintForeground=function(c,h,q,l,p){c.begin();c.moveTo(3*l/8,p/8*1.1);c.lineTo(5*l/8,p/4);c.end();c.stroke()};mxCellRenderer.registerShape("umlControl",X);mxUtils.extend(ca,mxRectangleShape);ca.prototype.size=
+40;ca.prototype.isHtmlAllowed=function(){return!1};ca.prototype.getLabelBounds=function(c){var h=Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(c.x,c.y,c.width,h)};ca.prototype.paintBackground=function(c,h,q,l,p){var v=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),w=mxUtils.getValue(this.style,"participant");null==w||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,
+c,h,q,l,v):(w=this.state.view.graph.cellRenderer.getShape(w),null!=w&&w!=ca&&(w=new w,w.apply(this.state),c.save(),w.paintVertexShape(c,h,q,l,v),c.restore()));v<p&&(c.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),c.begin(),c.moveTo(h+l/2,q+v),c.lineTo(h+l/2,q+p),c.end(),c.stroke())};ca.prototype.paintForeground=function(c,h,q,l,p){var v=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,c,h,q,l,
+Math.min(p,v))};mxCellRenderer.registerShape("umlLifeline",ca);mxUtils.extend(oa,mxShape);oa.prototype.width=60;oa.prototype.height=30;oa.prototype.corner=10;oa.prototype.getLabelMargins=function(c){return new mxRectangle(0,0,c.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),c.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};oa.prototype.paintBackground=function(c,h,q,l,p){var v=this.corner,w=Math.min(l,Math.max(v,parseFloat(mxUtils.getValue(this.style,
"width",this.width)))),I=Math.min(p,Math.max(1.5*v,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),y=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);y!=mxConstants.NONE&&(c.setFillColor(y),c.rect(h,q,l,p),c.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(c,h,q,l,p),c.setGradient(this.fill,this.gradient,h,q,l,p,this.gradientDirection)):c.setFillColor(this.fill);c.begin();
c.moveTo(h,q);c.lineTo(h+w,q);c.lineTo(h+w,q+Math.max(0,I-1.5*v));c.lineTo(h+Math.max(0,w-v),q+I);c.lineTo(h,q+I);c.close();c.fillAndStroke();c.begin();c.moveTo(h+w,q);c.lineTo(h+l,q);c.lineTo(h+l,q+p);c.lineTo(h,q+p);c.lineTo(h,q+I);c.stroke()};mxCellRenderer.registerShape("umlFrame",oa);mxPerimeter.CenterPerimeter=function(c,h,q,l){return new mxPoint(c.getCenterX(),c.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(c,h,
-q,l){l=aa.prototype.size;null!=h&&(l=mxUtils.getValue(h.style,"size",l)*h.view.scale);h=parseFloat(h.style[mxConstants.STYLE_STROKEWIDTH]||1)*h.view.scale/2-1;q.x<c.getCenterX()&&(h=-1*(h+1));return new mxPoint(c.getCenterX()+h,Math.min(c.y+c.height,Math.max(c.y+l,q.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(c,h,q,l){l=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",
+q,l){l=ca.prototype.size;null!=h&&(l=mxUtils.getValue(h.style,"size",l)*h.view.scale);h=parseFloat(h.style[mxConstants.STYLE_STROKEWIDTH]||1)*h.view.scale/2-1;q.x<c.getCenterX()&&(h=-1*(h+1));return new mxPoint(c.getCenterX()+h,Math.min(c.y+c.height,Math.max(c.y+l,q.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(c,h,q,l){l=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",
mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(c,h,q,l){l=parseFloat(h.style[mxConstants.STYLE_STROKEWIDTH]||1)*h.view.scale/2-1;null!=h.style.backboneSize&&(l+=parseFloat(h.style.backboneSize)*h.view.scale/2-1);if("south"==h.style[mxConstants.STYLE_DIRECTION]||"north"==h.style[mxConstants.STYLE_DIRECTION])return q.x<c.getCenterX()&&(l=-1*(l+1)),new mxPoint(c.getCenterX()+l,Math.min(c.y+c.height,Math.max(c.y,q.y)));q.y<c.getCenterY()&&(l=-1*(l+1));return new mxPoint(Math.min(c.x+
-c.width,Math.max(c.x,q.x)),c.getCenterY()+l)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(c,h,q,l){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(c,new mxRectangle(0,0,0,Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(h.style,"size",ba.prototype.size))*h.view.scale))),h.style),h,q,l)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(c,
-h,q,l){var p="0"!=mxUtils.getValue(h.style,"fixedSize","0"),v=p?R.prototype.fixedSize:R.prototype.size;null!=h&&(v=mxUtils.getValue(h.style,"size",v));p&&(v*=h.view.scale);var w=c.x,I=c.y,y=c.width,Y=c.height;h=null!=h?mxUtils.getValue(h.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;h==mxConstants.DIRECTION_NORTH||h==mxConstants.DIRECTION_SOUTH?(p=p?Math.max(0,Math.min(Y,v)):Y*Math.max(0,Math.min(1,v)),I=[new mxPoint(w,I),new mxPoint(w+y,I+p),new mxPoint(w+
+c.width,Math.max(c.x,q.x)),c.getCenterY()+l)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(c,h,q,l){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(c,new mxRectangle(0,0,0,Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(h.style,"size",ea.prototype.size))*h.view.scale))),h.style),h,q,l)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(c,
+h,q,l){var p="0"!=mxUtils.getValue(h.style,"fixedSize","0"),v=p?T.prototype.fixedSize:T.prototype.size;null!=h&&(v=mxUtils.getValue(h.style,"size",v));p&&(v*=h.view.scale);var w=c.x,I=c.y,y=c.width,Y=c.height;h=null!=h?mxUtils.getValue(h.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;h==mxConstants.DIRECTION_NORTH||h==mxConstants.DIRECTION_SOUTH?(p=p?Math.max(0,Math.min(Y,v)):Y*Math.max(0,Math.min(1,v)),I=[new mxPoint(w,I),new mxPoint(w+y,I+p),new mxPoint(w+
y,I+Y),new mxPoint(w,I+Y-p),new mxPoint(w,I)]):(p=p?Math.max(0,Math.min(.5*y,v)):y*Math.max(0,Math.min(1,v)),I=[new mxPoint(w+p,I),new mxPoint(w+y,I),new mxPoint(w+y-p,I+Y),new mxPoint(w,I+Y),new mxPoint(w+p,I)]);Y=c.getCenterX();c=c.getCenterY();c=new mxPoint(Y,c);l&&(q.x<w||q.x>w+y?c.y=q.y:c.x=q.x);return mxUtils.getPerimeterPoint(I,c,q)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(c,h,q,l){var p="0"!=mxUtils.getValue(h.style,
"fixedSize","0"),v=p?P.prototype.fixedSize:P.prototype.size;null!=h&&(v=mxUtils.getValue(h.style,"size",v));p&&(v*=h.view.scale);var w=c.x,I=c.y,y=c.width,Y=c.height;h=null!=h?mxUtils.getValue(h.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;h==mxConstants.DIRECTION_EAST?(p=p?Math.max(0,Math.min(.5*y,v)):y*Math.max(0,Math.min(1,v)),I=[new mxPoint(w+p,I),new mxPoint(w+y-p,I),new mxPoint(w+y,I+Y),new mxPoint(w,I+Y),new mxPoint(w+p,I)]):h==mxConstants.DIRECTION_WEST?
(p=p?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),I=[new mxPoint(w,I),new mxPoint(w+y,I),new mxPoint(w+y-p,I+Y),new mxPoint(w+p,I+Y),new mxPoint(w,I)]):h==mxConstants.DIRECTION_NORTH?(p=p?Math.max(0,Math.min(Y,v)):Y*Math.max(0,Math.min(1,v)),I=[new mxPoint(w,I+p),new mxPoint(w+y,I),new mxPoint(w+y,I+Y),new mxPoint(w,I+Y-p),new mxPoint(w,I+p)]):(p=p?Math.max(0,Math.min(Y,v)):Y*Math.max(0,Math.min(1,v)),I=[new mxPoint(w,I),new mxPoint(w+y,I+p),new mxPoint(w+y,I+Y-p),new mxPoint(w,I+Y),new mxPoint(w,
@@ -3601,12 +3604,12 @@ h?mxUtils.getValue(h.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAS
y,I+Y),new mxPoint(w+p,I+Y),new mxPoint(w,c),new mxPoint(w+p,I)]):h==mxConstants.DIRECTION_NORTH?(p=p?Math.max(0,Math.min(Y,v)):Y*Math.max(0,Math.min(1,v)),I=[new mxPoint(w,I+p),new mxPoint(M,I),new mxPoint(w+y,I+p),new mxPoint(w+y,I+Y),new mxPoint(M,I+Y-p),new mxPoint(w,I+Y),new mxPoint(w,I+p)]):(p=p?Math.max(0,Math.min(Y,v)):Y*Math.max(0,Math.min(1,v)),I=[new mxPoint(w,I),new mxPoint(M,I+p),new mxPoint(w+y,I),new mxPoint(w+y,I+Y-p),new mxPoint(M,I+Y),new mxPoint(w,I+Y-p),new mxPoint(w,I)]);M=new mxPoint(M,
c);l&&(q.x<w||q.x>w+y?M.y=q.y:M.x=q.x);return mxUtils.getPerimeterPoint(I,M,q)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(c,h,q,l){var p="0"!=mxUtils.getValue(h.style,"fixedSize","0"),v=p?O.prototype.fixedSize:O.prototype.size;null!=h&&(v=mxUtils.getValue(h.style,"size",v));p&&(v*=h.view.scale);var w=c.x,I=c.y,y=c.width,Y=c.height,M=c.getCenterX();c=c.getCenterY();h=null!=h?mxUtils.getValue(h.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):
mxConstants.DIRECTION_EAST;h==mxConstants.DIRECTION_NORTH||h==mxConstants.DIRECTION_SOUTH?(p=p?Math.max(0,Math.min(Y,v)):Y*Math.max(0,Math.min(1,v)),I=[new mxPoint(M,I),new mxPoint(w+y,I+p),new mxPoint(w+y,I+Y-p),new mxPoint(M,I+Y),new mxPoint(w,I+Y-p),new mxPoint(w,I+p),new mxPoint(M,I)]):(p=p?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),I=[new mxPoint(w+p,I),new mxPoint(w+y-p,I),new mxPoint(w+y,c),new mxPoint(w+y-p,I+Y),new mxPoint(w+p,I+Y),new mxPoint(w,c),new mxPoint(w+p,I)]);M=new mxPoint(M,
-c);l&&(q.x<w||q.x>w+y?M.y=q.y:M.x=q.x);return mxUtils.getPerimeterPoint(I,M,q)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(sa,mxShape);sa.prototype.size=10;sa.prototype.paintBackground=function(c,h,q,l,p){var v=parseFloat(mxUtils.getValue(this.style,"size",this.size));c.translate(h,q);c.ellipse((l-v)/2,0,v,v);c.fillAndStroke();c.begin();c.moveTo(l/2,v);c.lineTo(l/2,p);c.end();c.stroke()};mxCellRenderer.registerShape("lollipop",sa);mxUtils.extend(Ka,
+c);l&&(q.x<w||q.x>w+y?M.y=q.y:M.x=q.x);return mxUtils.getPerimeterPoint(I,M,q)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(ta,mxShape);ta.prototype.size=10;ta.prototype.paintBackground=function(c,h,q,l,p){var v=parseFloat(mxUtils.getValue(this.style,"size",this.size));c.translate(h,q);c.ellipse((l-v)/2,0,v,v);c.fillAndStroke();c.begin();c.moveTo(l/2,v);c.lineTo(l/2,p);c.end();c.stroke()};mxCellRenderer.registerShape("lollipop",ta);mxUtils.extend(Ka,
mxShape);Ka.prototype.size=10;Ka.prototype.inset=2;Ka.prototype.paintBackground=function(c,h,q,l,p){var v=parseFloat(mxUtils.getValue(this.style,"size",this.size)),w=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(h,q);c.begin();c.moveTo(l/2,v+w);c.lineTo(l/2,p);c.end();c.stroke();c.begin();c.moveTo((l-v)/2-w,v/2);c.quadTo((l-v)/2-w,v+w,l/2,v+w);c.quadTo((l+v)/2+w,v+w,(l+v)/2+w,v/2);c.end();c.stroke()};mxCellRenderer.registerShape("requires",Ka);mxUtils.extend(Ha,
-mxShape);Ha.prototype.paintBackground=function(c,h,q,l,p){c.translate(h,q);c.begin();c.moveTo(0,0);c.quadTo(l,0,l,p/2);c.quadTo(l,p,0,p);c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",Ha);mxUtils.extend(ua,mxShape);ua.prototype.inset=2;ua.prototype.paintBackground=function(c,h,q,l,p){var v=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(h,q);c.ellipse(0,v,l-2*v,p-2*v);c.fillAndStroke();c.begin();c.moveTo(l/2,0);c.quadTo(l,0,l,p/2);c.quadTo(l,
-p,l/2,p);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",ua);mxUtils.extend(Ca,mxCylinder);Ca.prototype.jettyWidth=20;Ca.prototype.jettyHeight=10;Ca.prototype.redrawPath=function(c,h,q,l,p,v){var w=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));h=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));q=w/2;w=q+w/2;var I=Math.min(h,p-h),y=Math.min(I+2*h,p-h);v?(c.moveTo(q,I),c.lineTo(w,I),c.lineTo(w,I+h),c.lineTo(q,I+h),c.moveTo(q,
-y),c.lineTo(w,y),c.lineTo(w,y+h),c.lineTo(q,y+h)):(c.moveTo(q,0),c.lineTo(l,0),c.lineTo(l,p),c.lineTo(q,p),c.lineTo(q,y+h),c.lineTo(0,y+h),c.lineTo(0,y),c.lineTo(q,y),c.lineTo(q,I+h),c.lineTo(0,I+h),c.lineTo(0,I),c.lineTo(q,I),c.close());c.end()};mxCellRenderer.registerShape("module",Ca);mxUtils.extend(ra,mxCylinder);ra.prototype.jettyWidth=32;ra.prototype.jettyHeight=12;ra.prototype.redrawPath=function(c,h,q,l,p,v){var w=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));h=parseFloat(mxUtils.getValue(this.style,
-"jettyHeight",this.jettyHeight));q=w/2;w=q+w/2;var I=.3*p-h/2,y=.7*p-h/2;v?(c.moveTo(q,I),c.lineTo(w,I),c.lineTo(w,I+h),c.lineTo(q,I+h),c.moveTo(q,y),c.lineTo(w,y),c.lineTo(w,y+h),c.lineTo(q,y+h)):(c.moveTo(q,0),c.lineTo(l,0),c.lineTo(l,p),c.lineTo(q,p),c.lineTo(q,y+h),c.lineTo(0,y+h),c.lineTo(0,y),c.lineTo(q,y),c.lineTo(q,I+h),c.lineTo(0,I+h),c.lineTo(0,I),c.lineTo(q,I),c.close());c.end()};mxCellRenderer.registerShape("component",ra);mxUtils.extend(Da,mxRectangleShape);Da.prototype.paintForeground=
+mxShape);Ha.prototype.paintBackground=function(c,h,q,l,p){c.translate(h,q);c.begin();c.moveTo(0,0);c.quadTo(l,0,l,p/2);c.quadTo(l,p,0,p);c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",Ha);mxUtils.extend(va,mxShape);va.prototype.inset=2;va.prototype.paintBackground=function(c,h,q,l,p){var v=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(h,q);c.ellipse(0,v,l-2*v,p-2*v);c.fillAndStroke();c.begin();c.moveTo(l/2,0);c.quadTo(l,0,l,p/2);c.quadTo(l,
+p,l/2,p);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",va);mxUtils.extend(Ca,mxCylinder);Ca.prototype.jettyWidth=20;Ca.prototype.jettyHeight=10;Ca.prototype.redrawPath=function(c,h,q,l,p,v){var w=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));h=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));q=w/2;w=q+w/2;var I=Math.min(h,p-h),y=Math.min(I+2*h,p-h);v?(c.moveTo(q,I),c.lineTo(w,I),c.lineTo(w,I+h),c.lineTo(q,I+h),c.moveTo(q,
+y),c.lineTo(w,y),c.lineTo(w,y+h),c.lineTo(q,y+h)):(c.moveTo(q,0),c.lineTo(l,0),c.lineTo(l,p),c.lineTo(q,p),c.lineTo(q,y+h),c.lineTo(0,y+h),c.lineTo(0,y),c.lineTo(q,y),c.lineTo(q,I+h),c.lineTo(0,I+h),c.lineTo(0,I),c.lineTo(q,I),c.close());c.end()};mxCellRenderer.registerShape("module",Ca);mxUtils.extend(sa,mxCylinder);sa.prototype.jettyWidth=32;sa.prototype.jettyHeight=12;sa.prototype.redrawPath=function(c,h,q,l,p,v){var w=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));h=parseFloat(mxUtils.getValue(this.style,
+"jettyHeight",this.jettyHeight));q=w/2;w=q+w/2;var I=.3*p-h/2,y=.7*p-h/2;v?(c.moveTo(q,I),c.lineTo(w,I),c.lineTo(w,I+h),c.lineTo(q,I+h),c.moveTo(q,y),c.lineTo(w,y),c.lineTo(w,y+h),c.lineTo(q,y+h)):(c.moveTo(q,0),c.lineTo(l,0),c.lineTo(l,p),c.lineTo(q,p),c.lineTo(q,y+h),c.lineTo(0,y+h),c.lineTo(0,y),c.lineTo(q,y),c.lineTo(q,I+h),c.lineTo(0,I+h),c.lineTo(0,I),c.lineTo(q,I),c.close());c.end()};mxCellRenderer.registerShape("component",sa);mxUtils.extend(Da,mxRectangleShape);Da.prototype.paintForeground=
function(c,h,q,l,p){var v=l/2,w=p/2,I=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c.begin();this.addPoints(c,[new mxPoint(h+v,q),new mxPoint(h+l,q+w),new mxPoint(h+v,q+p),new mxPoint(h,q+w)],this.isRounded,I,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",Da);mxUtils.extend(Ua,mxDoubleEllipse);Ua.prototype.outerStroke=!0;Ua.prototype.paintVertexShape=function(c,h,q,l,p){var v=Math.min(4,
Math.min(l/5,p/5));0<l&&0<p&&(c.ellipse(h+v,q+v,l-2*v,p-2*v),c.fillAndStroke());c.setShadow(!1);this.outerStroke&&(c.ellipse(h,q,l,p),c.stroke())};mxCellRenderer.registerShape("endState",Ua);mxUtils.extend(db,Ua);db.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",db);mxUtils.extend(Ta,mxArrowConnector);Ta.prototype.defaultWidth=4;Ta.prototype.isOpenEnded=function(){return!0};Ta.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,
this.strokewidth-1)};Ta.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",Ta);mxUtils.extend($a,mxArrowConnector);$a.prototype.defaultWidth=10;$a.prototype.defaultArrowWidth=20;$a.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};$a.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};$a.prototype.getEdgeWidth=
@@ -3620,11 +3623,11 @@ this.arrowWidth))));h=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.s
h,q,l,p){var v=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",da.prototype.arrowWidth))));h=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",da.prototype.arrowSize))));q=(p-v)/2;v=q+v;var w=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,p/2),new mxPoint(h,0),new mxPoint(h,q),new mxPoint(l-h,q),new mxPoint(l-h,0),new mxPoint(l,p/2),new mxPoint(l-h,p),new mxPoint(l-h,v),new mxPoint(h,
v),new mxPoint(h,p)],this.isRounded,w,!0);c.end()};mxCellRenderer.registerShape("doubleArrow",t);mxUtils.extend(z,mxActor);z.prototype.size=.1;z.prototype.fixedSize=20;z.prototype.redrawPath=function(c,h,q,l,p){h="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(h,0);c.lineTo(l,0);c.quadTo(l-2*h,p/2,l,p);c.lineTo(h,p);c.quadTo(h-
2*h,p/2,h,0);c.close();c.end()};mxCellRenderer.registerShape("dataStorage",z);mxUtils.extend(A,mxActor);A.prototype.redrawPath=function(c,h,q,l,p){c.moveTo(0,0);c.quadTo(l,0,l,p/2);c.quadTo(l,p,0,p);c.close();c.end()};mxCellRenderer.registerShape("or",A);mxUtils.extend(E,mxActor);E.prototype.redrawPath=function(c,h,q,l,p){c.moveTo(0,0);c.quadTo(l,0,l,p/2);c.quadTo(l,p,0,p);c.quadTo(l/2,p/2,0,0);c.close();c.end()};mxCellRenderer.registerShape("xor",E);mxUtils.extend(H,mxActor);H.prototype.size=20;
-H.prototype.isRoundable=function(){return!0};H.prototype.redrawPath=function(c,h,q,l,p){h=Math.min(l/2,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(h,0),new mxPoint(l-h,0),new mxPoint(l,.8*h),new mxPoint(l,p),new mxPoint(0,p),new mxPoint(0,.8*h)],this.isRounded,q,!0);c.end()};mxCellRenderer.registerShape("loopLimit",H);mxUtils.extend(K,mxActor);K.prototype.size=
-.375;K.prototype.isRoundable=function(){return!0};K.prototype.redrawPath=function(c,h,q,l,p){h=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(l,0),new mxPoint(l,p-h),new mxPoint(l/2,p),new mxPoint(0,p-h)],this.isRounded,q,!0);c.end()};mxCellRenderer.registerShape("offPageConnector",K);mxUtils.extend(X,mxEllipse);X.prototype.paintVertexShape=
-function(c,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(h+l/2,q+p);c.lineTo(h+l,q+p);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",X);mxUtils.extend(ja,mxEllipse);ja.prototype.paintVertexShape=function(c,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(h,q+p/2);c.lineTo(h+l,q+p/2);c.end();c.stroke();c.begin();c.moveTo(h+l/2,q);c.lineTo(h+l/2,q+p);c.end();c.stroke()};mxCellRenderer.registerShape("orEllipse",
-ja);mxUtils.extend(ea,mxEllipse);ea.prototype.paintVertexShape=function(c,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(h+.145*l,q+.145*p);c.lineTo(h+.855*l,q+.855*p);c.end();c.stroke();c.begin();c.moveTo(h+.855*l,q+.145*p);c.lineTo(h+.145*l,q+.855*p);c.end();c.stroke()};mxCellRenderer.registerShape("sumEllipse",ea);mxUtils.extend(ka,mxRhombus);ka.prototype.paintVertexShape=function(c,h,q,l,p){mxRhombus.prototype.paintVertexShape.apply(this,
-arguments);c.setShadow(!1);c.begin();c.moveTo(h,q+p/2);c.lineTo(h+l,q+p/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",ka);mxUtils.extend(ta,mxEllipse);ta.prototype.paintVertexShape=function(c,h,q,l,p){c.begin();c.moveTo(h,q);c.lineTo(h+l,q);c.lineTo(h+l/2,q+p/2);c.close();c.fillAndStroke();c.begin();c.moveTo(h,q+p);c.lineTo(h+l,q+p);c.lineTo(h+l/2,q+p/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",ta);mxUtils.extend(Aa,mxEllipse);Aa.prototype.paintVertexShape=
+H.prototype.isRoundable=function(){return!0};H.prototype.redrawPath=function(c,h,q,l,p){h=Math.min(l/2,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(h,0),new mxPoint(l-h,0),new mxPoint(l,.8*h),new mxPoint(l,p),new mxPoint(0,p),new mxPoint(0,.8*h)],this.isRounded,q,!0);c.end()};mxCellRenderer.registerShape("loopLimit",H);mxUtils.extend(L,mxActor);L.prototype.size=
+.375;L.prototype.isRoundable=function(){return!0};L.prototype.redrawPath=function(c,h,q,l,p){h=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(l,0),new mxPoint(l,p-h),new mxPoint(l/2,p),new mxPoint(0,p-h)],this.isRounded,q,!0);c.end()};mxCellRenderer.registerShape("offPageConnector",L);mxUtils.extend(W,mxEllipse);W.prototype.paintVertexShape=
+function(c,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(h+l/2,q+p);c.lineTo(h+l,q+p);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",W);mxUtils.extend(ha,mxEllipse);ha.prototype.paintVertexShape=function(c,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(h,q+p/2);c.lineTo(h+l,q+p/2);c.end();c.stroke();c.begin();c.moveTo(h+l/2,q);c.lineTo(h+l/2,q+p);c.end();c.stroke()};mxCellRenderer.registerShape("orEllipse",
+ha);mxUtils.extend(fa,mxEllipse);fa.prototype.paintVertexShape=function(c,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(h+.145*l,q+.145*p);c.lineTo(h+.855*l,q+.855*p);c.end();c.stroke();c.begin();c.moveTo(h+.855*l,q+.145*p);c.lineTo(h+.145*l,q+.855*p);c.end();c.stroke()};mxCellRenderer.registerShape("sumEllipse",fa);mxUtils.extend(ja,mxRhombus);ja.prototype.paintVertexShape=function(c,h,q,l,p){mxRhombus.prototype.paintVertexShape.apply(this,
+arguments);c.setShadow(!1);c.begin();c.moveTo(h,q+p/2);c.lineTo(h+l,q+p/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",ja);mxUtils.extend(ua,mxEllipse);ua.prototype.paintVertexShape=function(c,h,q,l,p){c.begin();c.moveTo(h,q);c.lineTo(h+l,q);c.lineTo(h+l/2,q+p/2);c.close();c.fillAndStroke();c.begin();c.moveTo(h,q+p);c.lineTo(h+l,q+p);c.lineTo(h+l/2,q+p/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",ua);mxUtils.extend(Aa,mxEllipse);Aa.prototype.paintVertexShape=
function(c,h,q,l,p){var v=c.state.strokeWidth/2,w=10+2*v,I=q+p-w/2;c.begin();c.moveTo(h,q);c.lineTo(h,q+p);c.moveTo(h+v,I);c.lineTo(h+v+w,I-w/2);c.moveTo(h+v,I);c.lineTo(h+v+w,I+w/2);c.moveTo(h+v,I);c.lineTo(h+l-v,I);c.moveTo(h+l,q);c.lineTo(h+l,q+p);c.moveTo(h+l-v,I);c.lineTo(h+l-w-v,I-w/2);c.moveTo(h+l-v,I);c.lineTo(h+l-w-v,I+w/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",Aa);mxUtils.extend(Ea,mxEllipse);Ea.prototype.drawHidden=!0;Ea.prototype.paintVertexShape=function(c,h,q,
l,p){this.outline||c.setStrokeColor(null);if(null!=this.style){var v=c.pointerEvents,w=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||w||(c.pointerEvents=!1);var I="1"==mxUtils.getValue(this.style,"top","1"),y="1"==mxUtils.getValue(this.style,"left","1"),Y="1"==mxUtils.getValue(this.style,"right","1"),M="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||w||this.outline||I||Y||M||y?(c.rect(h,q,l,p),c.fill(),c.pointerEvents=
v,c.setStrokeColor(this.stroke),c.setLineCap("square"),c.begin(),c.moveTo(h,q),this.outline||I?c.lineTo(h+l,q):c.moveTo(h+l,q),this.outline||Y?c.lineTo(h+l,q+p):c.moveTo(h+l,q+p),this.outline||M?c.lineTo(h,q+p):c.moveTo(h,q+p),(this.outline||y)&&c.lineTo(h,q),c.end(),c.stroke(),c.setLineCap("flat")):c.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Ea);mxUtils.extend(Ma,mxEllipse);Ma.prototype.paintVertexShape=function(c,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,
@@ -3637,34 +3640,34 @@ type:"bool",defVal:!0},{name:"left",dispName:"Left ",type:"bool",defVal:!0},{nam
{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"}]}];Ga.prototype.paintVertexShape=function(c,h,q,l,p){c.translate(h,q);this.strictDrawShape(c,0,0,l,p)};Ga.prototype.strictDrawShape=function(c,h,q,l,p,v){var w=v&&v.rectStyle?v.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),I=v&&v.absoluteCornerSize?v.absoluteCornerSize:mxUtils.getValue(this.style,
"absoluteCornerSize",this.absoluteCornerSize),y=v&&v.size?v.size:Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),Y=v&&v.rectOutline?v.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),M=v&&v.indent?v.indent:Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),Ba=v&&v.dashed?v.dashed:mxUtils.getValue(this.style,"dashed",!1),Qa=v&&v.dashPattern?v.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),Ja=v&&
-v.relIndent?v.relIndent:Math.max(0,Math.min(50,M)),la=v&&v.top?v.top:mxUtils.getValue(this.style,"top",!0),pa=v&&v.right?v.right:mxUtils.getValue(this.style,"right",!0),na=v&&v.bottom?v.bottom:mxUtils.getValue(this.style,"bottom",!0),ma=v&&v.left?v.left:mxUtils.getValue(this.style,"left",!0),va=v&&v.topLeftStyle?v.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),xa=v&&v.topRightStyle?v.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),ya=v&&v.bottomRightStyle?
+v.relIndent?v.relIndent:Math.max(0,Math.min(50,M)),ka=v&&v.top?v.top:mxUtils.getValue(this.style,"top",!0),pa=v&&v.right?v.right:mxUtils.getValue(this.style,"right",!0),na=v&&v.bottom?v.bottom:mxUtils.getValue(this.style,"bottom",!0),ma=v&&v.left?v.left:mxUtils.getValue(this.style,"left",!0),wa=v&&v.topLeftStyle?v.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),xa=v&&v.topRightStyle?v.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),ya=v&&v.bottomRightStyle?
v.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),za=v&&v.bottomLeftStyle?v.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),zb=v&&v.fillColor?v.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");v&&v.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var Ab=v&&v.strokeWidth?v.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),wb=v&&v.fillColor2?v.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),yb=v&&v.gradientColor2?
v.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),Bb=v&&v.gradientDirection2?v.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Cb=v&&v.opacity?v.opacity:mxUtils.getValue(this.style,"opacity","100"),Db=Math.max(0,Math.min(50,y));v=Ga.prototype;c.setDashed(Ba);Qa&&""!=Qa&&c.setDashPattern(Qa);c.setStrokeWidth(Ab);y=Math.min(.5*p,.5*l,y);I||(y=Db*Math.min(l,p)/100);y=Math.min(y,.5*Math.min(l,p));I||(M=Math.min(Ja*Math.min(l,p)/100));M=Math.min(M,.5*Math.min(l,
-p)-y);(la||pa||na||ma)&&"frame"!=Y&&(c.begin(),la?v.moveNW(c,h,q,l,p,w,va,y,ma):c.moveTo(0,0),la&&v.paintNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),pa&&v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),na&&v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),ma&&v.paintSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,va,y,la),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(wb),Ba=I=Cb,"none"==wb&&(I=0),"none"==yb&&(Ba=0),c.setGradient(wb,yb,0,0,l,p,Bb,I,Ba),
-c.begin(),la?v.moveNWInner(c,h,q,l,p,w,va,y,M,la,ma):c.moveTo(M,0),v.paintLeftInner(c,h,q,l,p,w,za,y,M,na,ma),ma&&na&&v.paintSWInner(c,h,q,l,p,w,za,y,M,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na),na&&pa&&v.paintSEInner(c,h,q,l,p,w,ya,y,M),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa),pa&&la&&v.paintNEInner(c,h,q,l,p,w,xa,y,M),v.paintTopInner(c,h,q,l,p,w,va,y,M,ma,la),la&&ma&&v.paintNWInner(c,h,q,l,p,w,va,y,M),c.fill(),"none"==zb&&(c.begin(),v.paintFolds(c,h,q,l,p,w,va,xa,ya,za,y,la,pa,na,ma),c.stroke()));
-la||pa||na||!ma?la||pa||!na||ma?!la&&!pa&&na&&ma?"frame"!=Y?(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,va,y,la),"double"==Y&&(v.moveNWInner(c,h,q,l,p,w,va,y,M,la,ma),v.paintLeftInner(c,h,q,l,p,w,za,y,M,na,ma),v.paintSWInner(c,h,q,l,p,w,za,y,M,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na)),c.stroke()):(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,
-h,q,l,p,w,va,y,la),v.lineNWInner(c,h,q,l,p,w,va,y,M,la,ma),v.paintLeftInner(c,h,q,l,p,w,za,y,M,na,ma),v.paintSWInner(c,h,q,l,p,w,za,y,M,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na),c.close(),c.fillAndStroke()):la||!pa||na||ma?!la&&pa&&!na&&ma?"frame"!=Y?(c.begin(),v.moveSW(c,h,q,l,p,w,va,y,na),v.paintLeft(c,h,q,l,p,w,va,y,la),"double"==Y&&(v.moveNWInner(c,h,q,l,p,w,va,y,M,la,ma),v.paintLeftInner(c,h,q,l,p,w,za,y,M,na,ma)),c.stroke(),c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,
-p,w,ya,y,na),"double"==Y&&(v.moveSEInner(c,h,q,l,p,w,ya,y,M,na),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa)),c.stroke()):(c.begin(),v.moveSW(c,h,q,l,p,w,va,y,na),v.paintLeft(c,h,q,l,p,w,va,y,la),v.lineNWInner(c,h,q,l,p,w,va,y,M,la,ma),v.paintLeftInner(c,h,q,l,p,w,za,y,M,na,ma),c.close(),c.fillAndStroke(),c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),v.lineSEInner(c,h,q,l,p,w,ya,y,M,na),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa),c.close(),c.fillAndStroke()):!la&&pa&&na&&
-!ma?"frame"!=Y?(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),"double"==Y&&(v.moveSWInner(c,h,q,l,p,w,za,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,M),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa)),c.stroke()):(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.lineSWInner(c,
-h,q,l,p,w,za,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,M),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa),c.close(),c.fillAndStroke()):!la&&pa&&na&&ma?"frame"!=Y?(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,va,y,la),"double"==Y&&(v.moveNWInner(c,h,q,l,p,w,va,y,M,la,ma),v.paintLeftInner(c,h,q,l,p,w,za,y,M,na,ma),
-v.paintSWInner(c,h,q,l,p,w,za,y,M,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,M),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa)),c.stroke()):(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,va,y,la),v.lineNWInner(c,h,q,l,p,w,va,y,M,la,ma),v.paintLeftInner(c,h,q,l,p,w,za,y,M,na,ma),v.paintSWInner(c,h,q,l,p,w,za,y,M,na),
-v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,M),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa),c.close(),c.fillAndStroke()):!la||pa||na||ma?la&&!pa&&!na&&ma?"frame"!=Y?(c.begin(),v.moveSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,va,y,la),v.paintNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),"double"==Y&&(v.moveNEInner(c,h,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,h,q,l,p,w,va,y,M,ma,la),v.paintNWInner(c,h,q,l,p,w,va,y,M),v.paintLeftInner(c,h,q,l,p,w,za,y,M,na,
-ma)),c.stroke()):(c.begin(),v.moveSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,va,y,la),v.paintNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.lineNEInner(c,h,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,h,q,l,p,w,va,y,M,ma,la),v.paintNWInner(c,h,q,l,p,w,va,y,M),v.paintLeftInner(c,h,q,l,p,w,za,y,M,na,ma),c.close(),c.fillAndStroke()):la&&!pa&&na&&!ma?"frame"!=Y?(c.begin(),v.moveNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),"double"==Y&&(v.moveNEInner(c,h,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,
-h,q,l,p,w,va,y,M,ma,la)),c.stroke(),c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),"double"==Y&&(v.moveSWInner(c,h,q,l,p,w,za,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na)),c.stroke()):(c.begin(),v.moveNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.lineNEInner(c,h,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,h,q,l,p,w,va,y,M,ma,la),c.close(),c.fillAndStroke(),c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.lineSWInner(c,h,q,l,p,w,
-za,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na),c.close(),c.fillAndStroke()):la&&!pa&&na&&ma?"frame"!=Y?(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,va,y,la),v.paintNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),"double"==Y&&(v.moveNEInner(c,h,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,h,q,l,p,w,va,y,M,ma,la),v.paintNWInner(c,h,q,l,p,w,va,y,M),v.paintLeftInner(c,h,q,l,p,w,za,y,M,na,ma),v.paintSWInner(c,
-h,q,l,p,w,za,y,M,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na)),c.stroke()):(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,va,y,la),v.paintNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.lineNEInner(c,h,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,h,q,l,p,w,va,y,M,ma,la),v.paintNWInner(c,h,q,l,p,w,va,y,M),v.paintLeftInner(c,h,q,l,p,w,za,y,M,na,ma),v.paintSWInner(c,h,q,l,p,w,za,y,M,na),v.paintBottomInner(c,h,q,
-l,p,w,ya,y,M,pa,na),c.close(),c.fillAndStroke()):la&&pa&&!na&&!ma?"frame"!=Y?(c.begin(),v.moveNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),"double"==Y&&(v.moveSEInner(c,h,q,l,p,w,ya,y,M,na),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,M),v.paintTopInner(c,h,q,l,p,w,va,y,M,ma,la)),c.stroke()):(c.begin(),v.moveNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),
-v.paintRight(c,h,q,l,p,w,ya,y,na),v.lineSEInner(c,h,q,l,p,w,ya,y,M,na),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,M),v.paintTopInner(c,h,q,l,p,w,va,y,M,ma,la),c.close(),c.fillAndStroke()):la&&pa&&!na&&ma?"frame"!=Y?(c.begin(),v.moveSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,va,y,la),v.paintNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),"double"==Y&&(v.moveSEInner(c,h,q,l,p,w,ya,y,M,na),
-v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,M),v.paintTopInner(c,h,q,l,p,w,va,y,M,ma,la),v.paintNWInner(c,h,q,l,p,w,va,y,M),v.paintLeftInner(c,h,q,l,p,w,za,y,M,na,ma)),c.stroke()):(c.begin(),v.moveSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,va,y,la),v.paintNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),v.lineSEInner(c,h,q,l,p,w,ya,y,M,na),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa),v.paintNEInner(c,
-h,q,l,p,w,xa,y,M),v.paintTopInner(c,h,q,l,p,w,va,y,M,ma,la),v.paintNWInner(c,h,q,l,p,w,va,y,M),v.paintLeftInner(c,h,q,l,p,w,za,y,M,na,ma),c.close(),c.fillAndStroke()):la&&pa&&na&&!ma?"frame"!=Y?(c.begin(),v.moveNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),"double"==Y&&(v.moveSWInner(c,h,q,l,p,w,za,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na),v.paintSEInner(c,
-h,q,l,p,w,ya,y,M),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,M),v.paintTopInner(c,h,q,l,p,w,va,y,M,ma,la)),c.stroke()):(c.begin(),v.moveNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.lineSWInner(c,h,q,l,p,w,za,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,M),v.paintRightInner(c,h,q,l,p,
-w,xa,y,M,la,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,M),v.paintTopInner(c,h,q,l,p,w,va,y,M,ma,la),c.close(),c.fillAndStroke()):la&&pa&&na&&ma&&("frame"!=Y?(c.begin(),v.moveNW(c,h,q,l,p,w,va,y,ma),v.paintNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,va,y,la),c.close(),"double"==Y&&(v.moveSWInner(c,h,q,l,p,w,za,
-y,M,ma),v.paintSWInner(c,h,q,l,p,w,za,y,M,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,M),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,M),v.paintTopInner(c,h,q,l,p,w,va,y,M,ma,la),v.paintNWInner(c,h,q,l,p,w,va,y,M),v.paintLeftInner(c,h,q,l,p,w,za,y,M,na,ma),c.close()),c.stroke()):(c.begin(),v.moveNW(c,h,q,l,p,w,va,y,ma),v.paintNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,
-l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,va,y,la),c.close(),v.moveSWInner(c,h,q,l,p,w,za,y,M,ma),v.paintSWInner(c,h,q,l,p,w,za,y,M,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,M),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,M),v.paintTopInner(c,h,q,l,p,w,va,y,M,ma,la),v.paintNWInner(c,h,q,l,p,w,va,y,M),v.paintLeftInner(c,h,q,l,p,w,za,y,M,
-na,ma),c.close(),c.fillAndStroke())):"frame"!=Y?(c.begin(),v.moveNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),"double"==Y&&(v.moveNEInner(c,h,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,h,q,l,p,w,va,y,M,ma,la)),c.stroke()):(c.begin(),v.moveNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.lineNEInner(c,h,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,h,q,l,p,w,va,y,M,ma,la),c.close(),c.fillAndStroke()):"frame"!=Y?(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),"double"==
-Y&&(v.moveSEInner(c,h,q,l,p,w,ya,y,M,na),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa)),c.stroke()):(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),v.lineSEInner(c,h,q,l,p,w,ya,y,M,na),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa),c.close(),c.fillAndStroke()):"frame"!=Y?(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),"double"==Y&&(v.moveSWInner(c,h,q,l,p,w,za,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na)),c.stroke()):(c.begin(),v.moveSE(c,
-h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.lineSWInner(c,h,q,l,p,w,za,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na),c.close(),c.fillAndStroke()):"frame"!=Y?(c.begin(),v.moveSW(c,h,q,l,p,w,va,y,na),v.paintLeft(c,h,q,l,p,w,va,y,la),"double"==Y&&(v.moveNWInner(c,h,q,l,p,w,va,y,M,la,ma),v.paintLeftInner(c,h,q,l,p,w,za,y,M,na,ma)),c.stroke()):(c.begin(),v.moveSW(c,h,q,l,p,w,va,y,na),v.paintLeft(c,h,q,l,p,w,va,y,la),v.lineNWInner(c,h,q,l,p,w,va,y,M,la,ma),v.paintLeftInner(c,h,q,l,p,
-w,za,y,M,na,ma),c.close(),c.fillAndStroke());c.begin();v.paintFolds(c,h,q,l,p,w,va,xa,ya,za,y,la,pa,na,ma);c.stroke()};Ga.prototype.moveNW=function(c,h,q,l,p,v,w,I,y){"square"==w||"default"==w&&"square"==v||!y?c.moveTo(0,0):c.moveTo(0,I)};Ga.prototype.moveNE=function(c,h,q,l,p,v,w,I,y){"square"==w||"default"==w&&"square"==v||!y?c.moveTo(l,0):c.moveTo(l-I,0)};Ga.prototype.moveSE=function(c,h,q,l,p,v,w,I,y){"square"==w||"default"==w&&"square"==v||!y?c.moveTo(l,p):c.moveTo(l,p-I)};Ga.prototype.moveSW=
+p)-y);(ka||pa||na||ma)&&"frame"!=Y&&(c.begin(),ka?v.moveNW(c,h,q,l,p,w,wa,y,ma):c.moveTo(0,0),ka&&v.paintNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),pa&&v.paintNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,l,p,w,ya,y,na),na&&v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),ma&&v.paintSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,wa,y,ka),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(wb),Ba=I=Cb,"none"==wb&&(I=0),"none"==yb&&(Ba=0),c.setGradient(wb,yb,0,0,l,p,Bb,I,Ba),
+c.begin(),ka?v.moveNWInner(c,h,q,l,p,w,wa,y,M,ka,ma):c.moveTo(M,0),v.paintLeftInner(c,h,q,l,p,w,za,y,M,na,ma),ma&&na&&v.paintSWInner(c,h,q,l,p,w,za,y,M,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na),na&&pa&&v.paintSEInner(c,h,q,l,p,w,ya,y,M),v.paintRightInner(c,h,q,l,p,w,xa,y,M,ka,pa),pa&&ka&&v.paintNEInner(c,h,q,l,p,w,xa,y,M),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,ka),ka&&ma&&v.paintNWInner(c,h,q,l,p,w,wa,y,M),c.fill(),"none"==zb&&(c.begin(),v.paintFolds(c,h,q,l,p,w,wa,xa,ya,za,y,ka,pa,na,ma),c.stroke()));
+ka||pa||na||!ma?ka||pa||!na||ma?!ka&&!pa&&na&&ma?"frame"!=Y?(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,wa,y,ka),"double"==Y&&(v.moveNWInner(c,h,q,l,p,w,wa,y,M,ka,ma),v.paintLeftInner(c,h,q,l,p,w,za,y,M,na,ma),v.paintSWInner(c,h,q,l,p,w,za,y,M,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na)),c.stroke()):(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,
+h,q,l,p,w,wa,y,ka),v.lineNWInner(c,h,q,l,p,w,wa,y,M,ka,ma),v.paintLeftInner(c,h,q,l,p,w,za,y,M,na,ma),v.paintSWInner(c,h,q,l,p,w,za,y,M,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na),c.close(),c.fillAndStroke()):ka||!pa||na||ma?!ka&&pa&&!na&&ma?"frame"!=Y?(c.begin(),v.moveSW(c,h,q,l,p,w,wa,y,na),v.paintLeft(c,h,q,l,p,w,wa,y,ka),"double"==Y&&(v.moveNWInner(c,h,q,l,p,w,wa,y,M,ka,ma),v.paintLeftInner(c,h,q,l,p,w,za,y,M,na,ma)),c.stroke(),c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,l,
+p,w,ya,y,na),"double"==Y&&(v.moveSEInner(c,h,q,l,p,w,ya,y,M,na),v.paintRightInner(c,h,q,l,p,w,xa,y,M,ka,pa)),c.stroke()):(c.begin(),v.moveSW(c,h,q,l,p,w,wa,y,na),v.paintLeft(c,h,q,l,p,w,wa,y,ka),v.lineNWInner(c,h,q,l,p,w,wa,y,M,ka,ma),v.paintLeftInner(c,h,q,l,p,w,za,y,M,na,ma),c.close(),c.fillAndStroke(),c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,l,p,w,ya,y,na),v.lineSEInner(c,h,q,l,p,w,ya,y,M,na),v.paintRightInner(c,h,q,l,p,w,xa,y,M,ka,pa),c.close(),c.fillAndStroke()):!ka&&pa&&na&&
+!ma?"frame"!=Y?(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),"double"==Y&&(v.moveSWInner(c,h,q,l,p,w,za,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,M),v.paintRightInner(c,h,q,l,p,w,xa,y,M,ka,pa)),c.stroke()):(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.lineSWInner(c,
+h,q,l,p,w,za,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,M),v.paintRightInner(c,h,q,l,p,w,xa,y,M,ka,pa),c.close(),c.fillAndStroke()):!ka&&pa&&na&&ma?"frame"!=Y?(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,wa,y,ka),"double"==Y&&(v.moveNWInner(c,h,q,l,p,w,wa,y,M,ka,ma),v.paintLeftInner(c,h,q,l,p,w,za,y,M,na,ma),
+v.paintSWInner(c,h,q,l,p,w,za,y,M,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,M),v.paintRightInner(c,h,q,l,p,w,xa,y,M,ka,pa)),c.stroke()):(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,wa,y,ka),v.lineNWInner(c,h,q,l,p,w,wa,y,M,ka,ma),v.paintLeftInner(c,h,q,l,p,w,za,y,M,na,ma),v.paintSWInner(c,h,q,l,p,w,za,y,M,na),
+v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,M),v.paintRightInner(c,h,q,l,p,w,xa,y,M,ka,pa),c.close(),c.fillAndStroke()):!ka||pa||na||ma?ka&&!pa&&!na&&ma?"frame"!=Y?(c.begin(),v.moveSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,wa,y,ka),v.paintNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),"double"==Y&&(v.moveNEInner(c,h,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,ka),v.paintNWInner(c,h,q,l,p,w,wa,y,M),v.paintLeftInner(c,h,q,l,p,w,za,y,M,na,
+ma)),c.stroke()):(c.begin(),v.moveSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,wa,y,ka),v.paintNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.lineNEInner(c,h,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,ka),v.paintNWInner(c,h,q,l,p,w,wa,y,M),v.paintLeftInner(c,h,q,l,p,w,za,y,M,na,ma),c.close(),c.fillAndStroke()):ka&&!pa&&na&&!ma?"frame"!=Y?(c.begin(),v.moveNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),"double"==Y&&(v.moveNEInner(c,h,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,
+h,q,l,p,w,wa,y,M,ma,ka)),c.stroke(),c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),"double"==Y&&(v.moveSWInner(c,h,q,l,p,w,za,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na)),c.stroke()):(c.begin(),v.moveNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.lineNEInner(c,h,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,ka),c.close(),c.fillAndStroke(),c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.lineSWInner(c,h,q,l,p,w,
+za,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na),c.close(),c.fillAndStroke()):ka&&!pa&&na&&ma?"frame"!=Y?(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,wa,y,ka),v.paintNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),"double"==Y&&(v.moveNEInner(c,h,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,ka),v.paintNWInner(c,h,q,l,p,w,wa,y,M),v.paintLeftInner(c,h,q,l,p,w,za,y,M,na,ma),v.paintSWInner(c,
+h,q,l,p,w,za,y,M,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na)),c.stroke()):(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,wa,y,ka),v.paintNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.lineNEInner(c,h,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,ka),v.paintNWInner(c,h,q,l,p,w,wa,y,M),v.paintLeftInner(c,h,q,l,p,w,za,y,M,na,ma),v.paintSWInner(c,h,q,l,p,w,za,y,M,na),v.paintBottomInner(c,h,q,
+l,p,w,ya,y,M,pa,na),c.close(),c.fillAndStroke()):ka&&pa&&!na&&!ma?"frame"!=Y?(c.begin(),v.moveNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,l,p,w,ya,y,na),"double"==Y&&(v.moveSEInner(c,h,q,l,p,w,ya,y,M,na),v.paintRightInner(c,h,q,l,p,w,xa,y,M,ka,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,M),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,ka)),c.stroke()):(c.begin(),v.moveNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,ka),
+v.paintRight(c,h,q,l,p,w,ya,y,na),v.lineSEInner(c,h,q,l,p,w,ya,y,M,na),v.paintRightInner(c,h,q,l,p,w,xa,y,M,ka,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,M),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,ka),c.close(),c.fillAndStroke()):ka&&pa&&!na&&ma?"frame"!=Y?(c.begin(),v.moveSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,wa,y,ka),v.paintNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,l,p,w,ya,y,na),"double"==Y&&(v.moveSEInner(c,h,q,l,p,w,ya,y,M,na),
+v.paintRightInner(c,h,q,l,p,w,xa,y,M,ka,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,M),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,ka),v.paintNWInner(c,h,q,l,p,w,wa,y,M),v.paintLeftInner(c,h,q,l,p,w,za,y,M,na,ma)),c.stroke()):(c.begin(),v.moveSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,wa,y,ka),v.paintNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,l,p,w,ya,y,na),v.lineSEInner(c,h,q,l,p,w,ya,y,M,na),v.paintRightInner(c,h,q,l,p,w,xa,y,M,ka,pa),v.paintNEInner(c,
+h,q,l,p,w,xa,y,M),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,ka),v.paintNWInner(c,h,q,l,p,w,wa,y,M),v.paintLeftInner(c,h,q,l,p,w,za,y,M,na,ma),c.close(),c.fillAndStroke()):ka&&pa&&na&&!ma?"frame"!=Y?(c.begin(),v.moveNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),"double"==Y&&(v.moveSWInner(c,h,q,l,p,w,za,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na),v.paintSEInner(c,
+h,q,l,p,w,ya,y,M),v.paintRightInner(c,h,q,l,p,w,xa,y,M,ka,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,M),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,ka)),c.stroke()):(c.begin(),v.moveNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.lineSWInner(c,h,q,l,p,w,za,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,M),v.paintRightInner(c,h,q,l,p,
+w,xa,y,M,ka,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,M),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,ka),c.close(),c.fillAndStroke()):ka&&pa&&na&&ma&&("frame"!=Y?(c.begin(),v.moveNW(c,h,q,l,p,w,wa,y,ma),v.paintNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,wa,y,ka),c.close(),"double"==Y&&(v.moveSWInner(c,h,q,l,p,w,za,
+y,M,ma),v.paintSWInner(c,h,q,l,p,w,za,y,M,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,M),v.paintRightInner(c,h,q,l,p,w,xa,y,M,ka,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,M),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,ka),v.paintNWInner(c,h,q,l,p,w,wa,y,M),v.paintLeftInner(c,h,q,l,p,w,za,y,M,na,ma),c.close()),c.stroke()):(c.begin(),v.moveNW(c,h,q,l,p,w,wa,y,ma),v.paintNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,
+l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,wa,y,ka),c.close(),v.moveSWInner(c,h,q,l,p,w,za,y,M,ma),v.paintSWInner(c,h,q,l,p,w,za,y,M,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,M),v.paintRightInner(c,h,q,l,p,w,xa,y,M,ka,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,M),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,ka),v.paintNWInner(c,h,q,l,p,w,wa,y,M),v.paintLeftInner(c,h,q,l,p,w,za,y,M,
+na,ma),c.close(),c.fillAndStroke())):"frame"!=Y?(c.begin(),v.moveNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),"double"==Y&&(v.moveNEInner(c,h,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,ka)),c.stroke()):(c.begin(),v.moveNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.lineNEInner(c,h,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,ka),c.close(),c.fillAndStroke()):"frame"!=Y?(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,l,p,w,ya,y,na),"double"==
+Y&&(v.moveSEInner(c,h,q,l,p,w,ya,y,M,na),v.paintRightInner(c,h,q,l,p,w,xa,y,M,ka,pa)),c.stroke()):(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,l,p,w,ya,y,na),v.lineSEInner(c,h,q,l,p,w,ya,y,M,na),v.paintRightInner(c,h,q,l,p,w,xa,y,M,ka,pa),c.close(),c.fillAndStroke()):"frame"!=Y?(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),"double"==Y&&(v.moveSWInner(c,h,q,l,p,w,za,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na)),c.stroke()):(c.begin(),v.moveSE(c,
+h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.lineSWInner(c,h,q,l,p,w,za,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na),c.close(),c.fillAndStroke()):"frame"!=Y?(c.begin(),v.moveSW(c,h,q,l,p,w,wa,y,na),v.paintLeft(c,h,q,l,p,w,wa,y,ka),"double"==Y&&(v.moveNWInner(c,h,q,l,p,w,wa,y,M,ka,ma),v.paintLeftInner(c,h,q,l,p,w,za,y,M,na,ma)),c.stroke()):(c.begin(),v.moveSW(c,h,q,l,p,w,wa,y,na),v.paintLeft(c,h,q,l,p,w,wa,y,ka),v.lineNWInner(c,h,q,l,p,w,wa,y,M,ka,ma),v.paintLeftInner(c,h,q,l,p,
+w,za,y,M,na,ma),c.close(),c.fillAndStroke());c.begin();v.paintFolds(c,h,q,l,p,w,wa,xa,ya,za,y,ka,pa,na,ma);c.stroke()};Ga.prototype.moveNW=function(c,h,q,l,p,v,w,I,y){"square"==w||"default"==w&&"square"==v||!y?c.moveTo(0,0):c.moveTo(0,I)};Ga.prototype.moveNE=function(c,h,q,l,p,v,w,I,y){"square"==w||"default"==w&&"square"==v||!y?c.moveTo(l,0):c.moveTo(l-I,0)};Ga.prototype.moveSE=function(c,h,q,l,p,v,w,I,y){"square"==w||"default"==w&&"square"==v||!y?c.moveTo(l,p):c.moveTo(l,p-I)};Ga.prototype.moveSW=
function(c,h,q,l,p,v,w,I,y){"square"==w||"default"==w&&"square"==v||!y?c.moveTo(0,p):c.moveTo(I,p)};Ga.prototype.paintNW=function(c,h,q,l,p,v,w,I,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){h=0;if("rounded"==w||"default"==w&&"rounded"==v)h=1;c.arcTo(I,I,0,0,h,I,0)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(I,0);else c.lineTo(0,0)};Ga.prototype.paintTop=function(c,h,q,l,p,v,w,I,y){"square"==w||"default"==
w&&"square"==v||!y?c.lineTo(l,0):c.lineTo(l-I,0)};Ga.prototype.paintNE=function(c,h,q,l,p,v,w,I,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){h=0;if("rounded"==w||"default"==w&&"rounded"==v)h=1;c.arcTo(I,I,0,0,h,l,I)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(l,I);else c.lineTo(l,0)};Ga.prototype.paintRight=function(c,h,q,l,p,v,w,I,y){"square"==w||"default"==w&&"square"==v||!y?c.lineTo(l,p):c.lineTo(l,p-
I)};Ga.prototype.paintLeft=function(c,h,q,l,p,v,w,I,y){"square"==w||"default"==w&&"square"==v||!y?c.lineTo(0,0):c.lineTo(0,I)};Ga.prototype.paintSE=function(c,h,q,l,p,v,w,I,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){h=0;if("rounded"==w||"default"==w&&"rounded"==v)h=1;c.arcTo(I,I,0,0,h,l-I,p)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(l-I,p);else c.lineTo(l,p)};Ga.prototype.paintBottom=function(c,h,q,
@@ -3679,8 +3682,8 @@ function(c,h,q,l,p,v,w,I,y,Y){Y?"square"==w||"default"==w&&"square"==v?c.lineTo(
y,p-I-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.moveTo(l-y,p-I-y):c.moveTo(l-y,p)};Ga.prototype.lineSEInner=function(c,h,q,l,p,v,w,I,y,Y){Y?"square"==w||"default"==w&&"square"==v?c.lineTo(l-y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(l-y,p-I-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(l-y,p-I-y):c.lineTo(l-y,p)};Ga.prototype.moveNEInner=function(c,h,
q,l,p,v,w,I,y,Y){Y?"square"==w||"default"==w&&"square"==v||Y?c.moveTo(l-y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.moveTo(l-y,I+.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.moveTo(l-y,I+y):c.moveTo(l,y)};Ga.prototype.lineNEInner=function(c,h,q,l,p,v,w,I,y,Y){Y?"square"==w||"default"==w&&"square"==v||Y?c.lineTo(l-y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(l-y,I+.5*y):
("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(l-y,I+y):c.lineTo(l,y)};Ga.prototype.moveNWInner=function(c,h,q,l,p,v,w,I,y,Y,M){Y||M?!Y&&M?c.moveTo(y,0):Y&&!M?c.moveTo(0,y):"square"==w||"default"==w&&"square"==v?c.moveTo(y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.moveTo(y,I+.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.moveTo(y,I+y):c.moveTo(0,0)};Ga.prototype.lineNWInner=
-function(c,h,q,l,p,v,w,I,y,Y,M){Y||M?!Y&&M?c.lineTo(y,0):Y&&!M?c.lineTo(0,y):"square"==w||"default"==w&&"square"==v?c.lineTo(y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(y,I+.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(y,I+y):c.lineTo(0,0)};Ga.prototype.paintFolds=function(c,h,q,l,p,v,w,I,y,Y,M,Ba,Qa,Ja,la){if("fold"==v||"fold"==w||"fold"==I||"fold"==y||"fold"==Y)("fold"==w||"default"==w&&"fold"==v)&&
-Ba&&la&&(c.moveTo(0,M),c.lineTo(M,M),c.lineTo(M,0)),("fold"==I||"default"==I&&"fold"==v)&&Ba&&Qa&&(c.moveTo(l-M,0),c.lineTo(l-M,M),c.lineTo(l,M)),("fold"==y||"default"==y&&"fold"==v)&&Ja&&Qa&&(c.moveTo(l-M,p),c.lineTo(l-M,p-M),c.lineTo(l,p-M)),("fold"==Y||"default"==Y&&"fold"==v)&&Ja&&la&&(c.moveTo(0,p-M),c.lineTo(M,p-M),c.lineTo(M,p))};mxCellRenderer.registerShape(Ga.prototype.cst.RECT2,Ga);Ga.prototype.constraints=null;mxUtils.extend(Oa,mxConnector);Oa.prototype.origPaintEdgeShape=Oa.prototype.paintEdgeShape;
+function(c,h,q,l,p,v,w,I,y,Y,M){Y||M?!Y&&M?c.lineTo(y,0):Y&&!M?c.lineTo(0,y):"square"==w||"default"==w&&"square"==v?c.lineTo(y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(y,I+.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(y,I+y):c.lineTo(0,0)};Ga.prototype.paintFolds=function(c,h,q,l,p,v,w,I,y,Y,M,Ba,Qa,Ja,ka){if("fold"==v||"fold"==w||"fold"==I||"fold"==y||"fold"==Y)("fold"==w||"default"==w&&"fold"==v)&&
+Ba&&ka&&(c.moveTo(0,M),c.lineTo(M,M),c.lineTo(M,0)),("fold"==I||"default"==I&&"fold"==v)&&Ba&&Qa&&(c.moveTo(l-M,0),c.lineTo(l-M,M),c.lineTo(l,M)),("fold"==y||"default"==y&&"fold"==v)&&Ja&&Qa&&(c.moveTo(l-M,p),c.lineTo(l-M,p-M),c.lineTo(l,p-M)),("fold"==Y||"default"==Y&&"fold"==v)&&Ja&&ka&&(c.moveTo(0,p-M),c.lineTo(M,p-M),c.lineTo(M,p))};mxCellRenderer.registerShape(Ga.prototype.cst.RECT2,Ga);Ga.prototype.constraints=null;mxUtils.extend(Oa,mxConnector);Oa.prototype.origPaintEdgeShape=Oa.prototype.paintEdgeShape;
Oa.prototype.paintEdgeShape=function(c,h,q){for(var l=[],p=0;p<h.length;p++)l.push(mxUtils.clone(h[p]));p=c.state.dashed;var v=c.state.fixDash;Oa.prototype.origPaintEdgeShape.apply(this,[c,l,q]);3<=c.state.strokeWidth&&(l=mxUtils.getValue(this.style,"fillColor",null),null!=l&&(c.setStrokeColor(l),c.setStrokeWidth(c.state.strokeWidth-2),c.setDashed(p,v),Oa.prototype.origPaintEdgeShape.apply(this,[c,h,q])))};mxCellRenderer.registerShape("filledEdge",Oa);"undefined"!==typeof StyleFormatPanel&&function(){var c=
StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var h=this.editorUi.getSelectionState(),q=c.apply(this,arguments);"umlFrame"==h.style.shape&&q.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return q}}();mxMarker.addMarker("dash",function(c,h,q,l,p,v,w,I,y,Y){var M=p*(w+y+1),Ba=v*(w+y+1);return function(){c.begin();c.moveTo(l.x-M/2-Ba/2,l.y-Ba/2+M/2);c.lineTo(l.x+Ba/2-3*M/2,l.y-3*Ba/2-M/2);c.stroke()}});mxMarker.addMarker("box",
function(c,h,q,l,p,v,w,I,y,Y){var M=p*(w+y+1),Ba=v*(w+y+1),Qa=l.x+M/2,Ja=l.y+Ba/2;l.x-=M;l.y-=Ba;return function(){c.begin();c.moveTo(Qa-M/2-Ba/2,Ja-Ba/2+M/2);c.lineTo(Qa-M/2+Ba/2,Ja-Ba/2-M/2);c.lineTo(Qa+Ba/2-3*M/2,Ja-3*Ba/2-M/2);c.lineTo(Qa-Ba/2-3*M/2,Ja-3*Ba/2+M/2);c.close();Y?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("cross",function(c,h,q,l,p,v,w,I,y,Y){var M=p*(w+y+1),Ba=v*(w+y+1);return function(){c.begin();c.moveTo(l.x-M/2-Ba/2,l.y-Ba/2+M/2);c.lineTo(l.x+Ba/2-3*M/2,l.y-3*Ba/2-M/2);
@@ -3707,66 +3710,66 @@ c.view.scale)-v*l/2,w.y+v*(I+c.shape.strokewidth*c.view.scale)+p*l/2)},function(
c.style.startWidth=c.style.endWidth;mxEvent.isAltDown(Y.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<h/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(c.style.endWidth)-parseFloat(c.style.startWidth))<h&&(c.style.endWidth=c.style.startWidth))})));return q},swimlane:function(c){var h=[];if(mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED)){var q=parseFloat(mxUtils.getValue(c.style,
mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));h.push(fb(c,q/2))}h.push(Ra(c,[mxConstants.STYLE_STARTSIZE],function(l){var p=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(c.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(l.getCenterX(),l.y+Math.max(0,Math.min(l.height,p))):new mxPoint(l.x+Math.max(0,Math.min(l.width,p)),l.getCenterY())},function(l,p){c.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,
mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(l.height,p.y-l.y))):Math.round(Math.max(0,Math.min(l.width,p.x-l.x)))},!1,null,function(l){var p=c.view.graph;if(!mxEvent.isShiftDown(l.getEvent())&&!mxEvent.isControlDown(l.getEvent())&&(p.isTableRow(c.cell)||p.isTableCell(c.cell))){l=p.getSwimlaneDirection(c.style);var v=p.model.getParent(c.cell);v=p.model.getChildCells(v,!0);for(var w=[],I=0;I<v.length;I++)v[I]!=c.cell&&p.isSwimlane(v[I])&&p.getSwimlaneDirection(p.getCurrentCellStyle(v[I]))==
-l&&w.push(v[I]);p.setCellStyles(mxConstants.STYLE_STARTSIZE,c.style[mxConstants.STYLE_STARTSIZE],w)}}));return h},label:nb(),ext:nb(),rectangle:nb(),triangle:nb(),rhombus:nb(),umlLifeline:function(c){return[Ra(c,["size"],function(h){var q=Math.max(0,Math.min(h.height,parseFloat(mxUtils.getValue(this.state.style,"size",aa.prototype.size))));return new mxPoint(h.getCenterX(),h.y+q)},function(h,q){this.state.style.size=Math.round(Math.max(0,Math.min(h.height,q.y-h.y)))},!1)]},umlFrame:function(c){return[Ra(c,
+l&&w.push(v[I]);p.setCellStyles(mxConstants.STYLE_STARTSIZE,c.style[mxConstants.STYLE_STARTSIZE],w)}}));return h},label:nb(),ext:nb(),rectangle:nb(),triangle:nb(),rhombus:nb(),umlLifeline:function(c){return[Ra(c,["size"],function(h){var q=Math.max(0,Math.min(h.height,parseFloat(mxUtils.getValue(this.state.style,"size",ca.prototype.size))));return new mxPoint(h.getCenterX(),h.y+q)},function(h,q){this.state.style.size=Math.round(Math.max(0,Math.min(h.height,q.y-h.y)))},!1)]},umlFrame:function(c){return[Ra(c,
["width","height"],function(h){var q=Math.max(oa.prototype.corner,Math.min(h.width,mxUtils.getValue(this.state.style,"width",oa.prototype.width))),l=Math.max(1.5*oa.prototype.corner,Math.min(h.height,mxUtils.getValue(this.state.style,"height",oa.prototype.height)));return new mxPoint(h.x+q,h.y+l)},function(h,q){this.state.style.width=Math.round(Math.max(oa.prototype.corner,Math.min(h.width,q.x-h.x)));this.state.style.height=Math.round(Math.max(1.5*oa.prototype.corner,Math.min(h.height,q.y-h.y)))},
-!1)]},process:function(c){var h=[Ra(c,["size"],function(q){var l="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),p=parseFloat(mxUtils.getValue(this.state.style,"size",ia.prototype.size));return l?new mxPoint(q.x+p,q.y+q.height/4):new mxPoint(q.x+q.width*p,q.y+q.height/4)},function(q,l){q="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*q.width,l.x-q.x)):Math.max(0,Math.min(.5,(l.x-q.x)/q.width));this.state.style.size=q},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,
+!1)]},process:function(c){var h=[Ra(c,["size"],function(q){var l="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),p=parseFloat(mxUtils.getValue(this.state.style,"size",aa.prototype.size));return l?new mxPoint(q.x+p,q.y+q.height/4):new mxPoint(q.x+q.width*p,q.y+q.height/4)},function(q,l){q="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*q.width,l.x-q.x)):Math.max(0,Math.min(.5,(l.x-q.x)/q.width));this.state.style.size=q},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,
!1)&&h.push(fb(c));return h},cross:function(c){return[Ra(c,["size"],function(h){var q=Math.min(h.width,h.height);q=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",Ia.prototype.size)))*q/2;return new mxPoint(h.getCenterX()-q,h.getCenterY()-q)},function(h,q){var l=Math.min(h.width,h.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,h.getCenterY()-q.y)/l*2,Math.max(0,h.getCenterX()-q.x)/l*2)))})]},note:function(c){return[Ra(c,["size"],function(h){var q=Math.max(0,
Math.min(h.width,Math.min(h.height,parseFloat(mxUtils.getValue(this.state.style,"size",u.prototype.size)))));return new mxPoint(h.x+h.width-q,h.y+q)},function(h,q){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(h.width,h.x+h.width-q.x),Math.min(h.height,q.y-h.y))))})]},note2:function(c){return[Ra(c,["size"],function(h){var q=Math.max(0,Math.min(h.width,Math.min(h.height,parseFloat(mxUtils.getValue(this.state.style,"size",m.prototype.size)))));return new mxPoint(h.x+h.width-q,h.y+q)},
function(h,q){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(h.width,h.x+h.width-q.x),Math.min(h.height,q.y-h.y))))})]},manualInput:function(c){var h=[Ra(c,["size"],function(q){var l=Math.max(0,Math.min(q.height,mxUtils.getValue(this.state.style,"size",Xa.prototype.size)));return new mxPoint(q.x+q.width/4,q.y+3*l/4)},function(q,l){this.state.style.size=Math.round(Math.max(0,Math.min(q.height,4*(l.y-q.y)/3)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&h.push(fb(c));
return h},dataStorage:function(c){return[Ra(c,["size"],function(h){var q="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),l=parseFloat(mxUtils.getValue(this.state.style,"size",q?z.prototype.fixedSize:z.prototype.size));return new mxPoint(h.x+h.width-l*(q?1:h.width),h.getCenterY())},function(h,q){h="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(h.width,h.x+h.width-q.x)):Math.max(0,Math.min(1,(h.x+h.width-q.x)/h.width));this.state.style.size=h},!1)]},callout:function(c){var h=
-[Ra(c,["size","position"],function(q){var l=Math.max(0,Math.min(q.height,mxUtils.getValue(this.state.style,"size",ba.prototype.size))),p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ba.prototype.position)));mxUtils.getValue(this.state.style,"base",ba.prototype.base);return new mxPoint(q.x+p*q.width,q.y+q.height-l)},function(q,l){mxUtils.getValue(this.state.style,"base",ba.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(q.height,q.y+q.height-l.y)));this.state.style.position=
-Math.round(100*Math.max(0,Math.min(1,(l.x-q.x)/q.width)))/100},!1),Ra(c,["position2"],function(q){var l=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",ba.prototype.position2)));return new mxPoint(q.x+l*q.width,q.y+q.height)},function(q,l){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(l.x-q.x)/q.width)))/100},!1),Ra(c,["base"],function(q){var l=Math.max(0,Math.min(q.height,mxUtils.getValue(this.state.style,"size",ba.prototype.size))),p=Math.max(0,Math.min(1,
-mxUtils.getValue(this.state.style,"position",ba.prototype.position))),v=Math.max(0,Math.min(q.width,mxUtils.getValue(this.state.style,"base",ba.prototype.base)));return new mxPoint(q.x+Math.min(q.width,p*q.width+v),q.y+q.height-l)},function(q,l){var p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ba.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(q.width,l.x-q.x-p*q.width)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&h.push(fb(c));
+[Ra(c,["size","position"],function(q){var l=Math.max(0,Math.min(q.height,mxUtils.getValue(this.state.style,"size",ea.prototype.size))),p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ea.prototype.position)));mxUtils.getValue(this.state.style,"base",ea.prototype.base);return new mxPoint(q.x+p*q.width,q.y+q.height-l)},function(q,l){mxUtils.getValue(this.state.style,"base",ea.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(q.height,q.y+q.height-l.y)));this.state.style.position=
+Math.round(100*Math.max(0,Math.min(1,(l.x-q.x)/q.width)))/100},!1),Ra(c,["position2"],function(q){var l=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",ea.prototype.position2)));return new mxPoint(q.x+l*q.width,q.y+q.height)},function(q,l){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(l.x-q.x)/q.width)))/100},!1),Ra(c,["base"],function(q){var l=Math.max(0,Math.min(q.height,mxUtils.getValue(this.state.style,"size",ea.prototype.size))),p=Math.max(0,Math.min(1,
+mxUtils.getValue(this.state.style,"position",ea.prototype.position))),v=Math.max(0,Math.min(q.width,mxUtils.getValue(this.state.style,"base",ea.prototype.base)));return new mxPoint(q.x+Math.min(q.width,p*q.width+v),q.y+q.height-l)},function(q,l){var p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ea.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(q.width,l.x-q.x-p*q.width)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&h.push(fb(c));
return h},internalStorage:function(c){var h=[Ra(c,["dx","dy"],function(q){var l=Math.max(0,Math.min(q.width,mxUtils.getValue(this.state.style,"dx",Va.prototype.dx))),p=Math.max(0,Math.min(q.height,mxUtils.getValue(this.state.style,"dy",Va.prototype.dy)));return new mxPoint(q.x+l,q.y+p)},function(q,l){this.state.style.dx=Math.round(Math.max(0,Math.min(q.width,l.x-q.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(q.height,l.y-q.y)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&
h.push(fb(c));return h},module:function(c){return[Ra(c,["jettyWidth","jettyHeight"],function(h){var q=Math.max(0,Math.min(h.width,mxUtils.getValue(this.state.style,"jettyWidth",Ca.prototype.jettyWidth))),l=Math.max(0,Math.min(h.height,mxUtils.getValue(this.state.style,"jettyHeight",Ca.prototype.jettyHeight)));return new mxPoint(h.x+q/2,h.y+2*l)},function(h,q){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(h.width,q.x-h.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(h.height,
q.y-h.y))/2)})]},corner:function(c){return[Ra(c,["dx","dy"],function(h){var q=Math.max(0,Math.min(h.width,mxUtils.getValue(this.state.style,"dx",Ya.prototype.dx))),l=Math.max(0,Math.min(h.height,mxUtils.getValue(this.state.style,"dy",Ya.prototype.dy)));return new mxPoint(h.x+q,h.y+l)},function(h,q){this.state.style.dx=Math.round(Math.max(0,Math.min(h.width,q.x-h.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(h.height,q.y-h.y)))},!1)]},tee:function(c){return[Ra(c,["dx","dy"],function(h){var q=
Math.max(0,Math.min(h.width,mxUtils.getValue(this.state.style,"dx",bb.prototype.dx))),l=Math.max(0,Math.min(h.height,mxUtils.getValue(this.state.style,"dy",bb.prototype.dy)));return new mxPoint(h.x+(h.width+q)/2,h.y+l)},function(h,q){this.state.style.dx=Math.round(Math.max(0,2*Math.min(h.width/2,q.x-h.x-h.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(h.height,q.y-h.y)))},!1)]},singleArrow:ib(1),doubleArrow:ib(.5),folder:function(c){return[Ra(c,["tabWidth","tabHeight"],function(h){var q=
-Math.max(0,Math.min(h.width,mxUtils.getValue(this.state.style,"tabWidth",G.prototype.tabWidth))),l=Math.max(0,Math.min(h.height,mxUtils.getValue(this.state.style,"tabHeight",G.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",G.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(q=h.width-q);return new mxPoint(h.x+q,h.y+l)},function(h,q){var l=Math.max(0,Math.min(h.width,q.x-h.x));mxUtils.getValue(this.state.style,"tabPosition",G.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&
-(l=h.width-l);this.state.style.tabWidth=Math.round(l);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(h.height,q.y-h.y)))},!1)]},document:function(c){return[Ra(c,["size"],function(h){var q=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",Q.prototype.size))));return new mxPoint(h.x+3*h.width/4,h.y+(1-q)*h.height)},function(h,q){this.state.style.size=Math.max(0,Math.min(1,(h.y+h.height-q.y)/h.height))},!1)]},tape:function(c){return[Ra(c,["size"],function(h){var q=
+Math.max(0,Math.min(h.width,mxUtils.getValue(this.state.style,"tabWidth",F.prototype.tabWidth))),l=Math.max(0,Math.min(h.height,mxUtils.getValue(this.state.style,"tabHeight",F.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",F.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(q=h.width-q);return new mxPoint(h.x+q,h.y+l)},function(h,q){var l=Math.max(0,Math.min(h.width,q.x-h.x));mxUtils.getValue(this.state.style,"tabPosition",F.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&
+(l=h.width-l);this.state.style.tabWidth=Math.round(l);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(h.height,q.y-h.y)))},!1)]},document:function(c){return[Ra(c,["size"],function(h){var q=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",S.prototype.size))));return new mxPoint(h.x+3*h.width/4,h.y+(1-q)*h.height)},function(h,q){this.state.style.size=Math.max(0,Math.min(1,(h.y+h.height-q.y)/h.height))},!1)]},tape:function(c){return[Ra(c,["size"],function(h){var q=
Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",N.prototype.size))));return new mxPoint(h.getCenterX(),h.y+q*h.height/2)},function(h,q){this.state.style.size=Math.max(0,Math.min(1,(q.y-h.y)/h.height*2))},!1)]},isoCube2:function(c){return[Ra(c,["isoAngle"],function(h){var q=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",r.isoAngle))))*Math.PI/200;return new mxPoint(h.x,h.y+Math.min(h.width*Math.tan(q),.5*h.height))},function(h,q){this.state.style.isoAngle=
-Math.max(0,50*(q.y-h.y)/h.height)},!0)]},cylinder2:gb(x.prototype.size),cylinder3:gb(B.prototype.size),offPageConnector:function(c){return[Ra(c,["size"],function(h){var q=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",K.prototype.size))));return new mxPoint(h.getCenterX(),h.y+(1-q)*h.height)},function(h,q){this.state.style.size=Math.max(0,Math.min(1,(h.y+h.height-q.y)/h.height))},!1)]},"mxgraph.basic.rect":function(c){var h=[Graph.createHandle(c,["size"],function(q){var l=
+Math.max(0,50*(q.y-h.y)/h.height)},!0)]},cylinder2:gb(x.prototype.size),cylinder3:gb(B.prototype.size),offPageConnector:function(c){return[Ra(c,["size"],function(h){var q=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",L.prototype.size))));return new mxPoint(h.getCenterX(),h.y+(1-q)*h.height)},function(h,q){this.state.style.size=Math.max(0,Math.min(1,(h.y+h.height-q.y)/h.height))},!1)]},"mxgraph.basic.rect":function(c){var h=[Graph.createHandle(c,["size"],function(q){var l=
Math.max(0,Math.min(q.width/2,q.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(q.x+l,q.y+l)},function(q,l){this.state.style.size=Math.round(100*Math.max(0,Math.min(q.height/2,q.width/2,l.x-q.x)))/100})];c=Graph.createHandle(c,["indent"],function(q){var l=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(q.x+.75*q.width,q.y+l*q.height/200)},function(q,l){this.state.style.indent=Math.round(100*
-Math.max(0,Math.min(100,200*(l.y-q.y)/q.height)))/100});h.push(c);return h},step:qb(qa.prototype.size,!0,null,!0,qa.prototype.fixedSize),hexagon:qb(O.prototype.size,!0,.5,!0,O.prototype.fixedSize),curlyBracket:qb(Z.prototype.size,!1),display:qb(Fa.prototype.size,!1),cube:Wa(1,d.prototype.size,!1),card:Wa(.5,D.prototype.size,!0),loopLimit:Wa(.5,H.prototype.size,!0),trapezoid:tb(.5,P.prototype.size,P.prototype.fixedSize),parallelogram:tb(1,R.prototype.size,R.prototype.fixedSize)};Graph.createHandle=
+Math.max(0,Math.min(100,200*(l.y-q.y)/q.height)))/100});h.push(c);return h},step:qb(qa.prototype.size,!0,null,!0,qa.prototype.fixedSize),hexagon:qb(O.prototype.size,!0,.5,!0,O.prototype.fixedSize),curlyBracket:qb(Z.prototype.size,!1),display:qb(Fa.prototype.size,!1),cube:Wa(1,e.prototype.size,!1),card:Wa(.5,D.prototype.size,!0),loopLimit:Wa(.5,H.prototype.size,!0),trapezoid:tb(.5,P.prototype.size,P.prototype.fixedSize),parallelogram:tb(1,T.prototype.size,T.prototype.fixedSize)};Graph.createHandle=
Ra;Graph.handleFactory=rb;var xb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=xb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var h=this.state.style.shape;null==mxCellRenderer.defaultShapes[h]&&null==mxStencilRegistry.getStencil(h)?h=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(h=mxConstants.SHAPE_SWIMLANE);h=rb[h];null==h&&null!=this.state.shape&&this.state.shape.isRoundable()&&
(h=rb[mxConstants.SHAPE_RECTANGLE]);null!=h&&(h=h(this.state),null!=h&&(c=null==c?h:c.concat(h)))}return c};mxEdgeHandler.prototype.createCustomHandles=function(){var c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&null==mxStencilRegistry.getStencil(c)&&(c=mxConstants.SHAPE_CONNECTOR);c=rb[c];return null!=c?c(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var kb=new mxPoint(1,0),hb=new mxPoint(1,0),ob=mxUtils.toRadians(-30);kb=mxUtils.getRotatedPoint(kb,
Math.cos(ob),Math.sin(ob));var lb=mxUtils.toRadians(-150);hb=mxUtils.getRotatedPoint(hb,Math.cos(lb),Math.sin(lb));mxEdgeStyle.IsometricConnector=function(c,h,q,l,p){var v=c.view;l=null!=l&&0<l.length?l[0]:null;var w=c.absolutePoints,I=w[0];w=w[w.length-1];null!=l&&(l=v.transformControlPoint(c,l));null==I&&null!=h&&(I=new mxPoint(h.getCenterX(),h.getCenterY()));null==w&&null!=q&&(w=new mxPoint(q.getCenterX(),q.getCenterY()));var y=kb.x,Y=kb.y,M=hb.x,Ba=hb.y,Qa="horizontal"==mxUtils.getValue(c.style,
-"elbow","horizontal");if(null!=w&&null!=I){c=function(la,pa,na){la-=Ja.x;var ma=pa-Ja.y;pa=(Ba*la-M*ma)/(y*Ba-Y*M);la=(Y*la-y*ma)/(Y*M-y*Ba);Qa?(na&&(Ja=new mxPoint(Ja.x+y*pa,Ja.y+Y*pa),p.push(Ja)),Ja=new mxPoint(Ja.x+M*la,Ja.y+Ba*la)):(na&&(Ja=new mxPoint(Ja.x+M*la,Ja.y+Ba*la),p.push(Ja)),Ja=new mxPoint(Ja.x+y*pa,Ja.y+Y*pa));p.push(Ja)};var Ja=I;null==l&&(l=new mxPoint(I.x+(w.x-I.x)/2,I.y+(w.y-I.y)/2));c(l.x,l.y,!0);c(w.x,w.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);
-var sb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,h){if(h==mxEdgeStyle.IsometricConnector){var q=new mxElbowEdgeHandler(c);q.snapToTerminals=!1;return q}return sb.apply(this,arguments)};e.prototype.constraints=[];k.prototype.getConstraints=function(c,h,q){c=[];var l=Math.tan(mxUtils.toRadians(30)),p=(.5-l)/2;l=Math.min(h,q/(.5+l));h=(h-l)/2;q=(q-l)/2;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,q+.25*l));c.push(new mxConnectionConstraint(new mxPoint(0,
+"elbow","horizontal");if(null!=w&&null!=I){c=function(ka,pa,na){ka-=Ja.x;var ma=pa-Ja.y;pa=(Ba*ka-M*ma)/(y*Ba-Y*M);ka=(Y*ka-y*ma)/(Y*M-y*Ba);Qa?(na&&(Ja=new mxPoint(Ja.x+y*pa,Ja.y+Y*pa),p.push(Ja)),Ja=new mxPoint(Ja.x+M*ka,Ja.y+Ba*ka)):(na&&(Ja=new mxPoint(Ja.x+M*ka,Ja.y+Ba*ka),p.push(Ja)),Ja=new mxPoint(Ja.x+y*pa,Ja.y+Y*pa));p.push(Ja)};var Ja=I;null==l&&(l=new mxPoint(I.x+(w.x-I.x)/2,I.y+(w.y-I.y)/2));c(l.x,l.y,!0);c(w.x,w.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);
+var sb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,h){if(h==mxEdgeStyle.IsometricConnector){var q=new mxElbowEdgeHandler(c);q.snapToTerminals=!1;return q}return sb.apply(this,arguments)};d.prototype.constraints=[];k.prototype.getConstraints=function(c,h,q){c=[];var l=Math.tan(mxUtils.toRadians(30)),p=(.5-l)/2;l=Math.min(h,q/(.5+l));h=(h-l)/2;q=(q-l)/2;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,q+.25*l));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,h+.5*l,q+l*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h+l,q+.25*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h+l,q+.75*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h+.5*l,q+(1-p)*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,q+.75*l));return c};r.prototype.getConstraints=function(c,h,q){c=[];var l=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;l=Math.min(h*
Math.tan(l),.5*q);c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,l));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,q-l));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q-l));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
-0,l));return c};ba.prototype.getConstraints=function(c,h,q){c=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var l=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var p=h*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));c.push(new mxConnectionConstraint(new mxPoint(0,
+0,l));return c};ea.prototype.getConstraints=function(c,h,q){c=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var l=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var p=h*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1));c.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.5*(q-l)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,q-l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,q));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,
q-l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(q-l)));h>=2*l&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,
.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];Ea.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=
-mxRectangleShape.prototype.constraints;S.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;u.prototype.getConstraints=function(c,h,q){c=[];var l=Math.max(0,Math.min(h,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-l),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,
+mxRectangleShape.prototype.constraints;R.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;u.prototype.getConstraints=function(c,h,q){c=[];var l=Math.max(0,Math.min(h,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-l),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,
null,h-l,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-.5*l,.5*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.5*(q+l)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));h>=2*l&&c.push(new mxConnectionConstraint(new mxPoint(.5,
0),!1));return c};D.prototype.getConstraints=function(c,h,q){c=[];var l=Math.max(0,Math.min(h,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+l),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,.5*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,.5*(q+l)));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));h>=2*l&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};d.prototype.getConstraints=function(c,h,q){c=[];var l=Math.max(0,Math.min(h,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,.5*(q+l)));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));h>=2*l&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};e.prototype.getConstraints=function(c,h,q){c=[];var l=Math.max(0,Math.min(h,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-l),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-l,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-.5*l,.5*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.5*(q+l)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+l),q));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,l,q));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,q-.5*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q-l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(q-l)));return c};B.prototype.getConstraints=function(c,h,q){c=[];h=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,
1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,h));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,h));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-h));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-h));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,h+.5*(.5*q-h)));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,h+.5*(.5*q-h)));c.push(new mxConnectionConstraint(new mxPoint(1,
-0),!1,null,0,q-h-.5*(.5*q-h)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q-h-.5*(.5*q-h)));c.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*h));c.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*h));c.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-h));c.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-h));return c};G.prototype.getConstraints=function(c,h,q){c=[];var l=Math.max(0,Math.min(h,parseFloat(mxUtils.getValue(this.style,
+0),!1,null,0,q-h-.5*(.5*q-h)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q-h-.5*(.5*q-h)));c.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*h));c.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*h));c.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-h));c.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-h));return c};F.prototype.getConstraints=function(c,h,q){c=[];var l=Math.max(0,Math.min(h,parseFloat(mxUtils.getValue(this.style,
"tabWidth",this.tabWidth)))),p=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(c.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,p)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
.5*(h+l),p))):(c.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-.5*l,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-l,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-l,p)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-l),p)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.25*(q-p)+p));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,h,.5*(q-p)+p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.75*(q-p)+p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,q));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(q-p)+p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(q-p)+p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(q-p)+p));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,q));c.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return c};Va.prototype.constraints=mxRectangleShape.prototype.constraints;z.prototype.constraints=mxRectangleShape.prototype.constraints;X.prototype.constraints=mxEllipse.prototype.constraints;ja.prototype.constraints=mxEllipse.prototype.constraints;ea.prototype.constraints=mxEllipse.prototype.constraints;Ma.prototype.constraints=
+0),!1,null,0,q));c.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return c};Va.prototype.constraints=mxRectangleShape.prototype.constraints;z.prototype.constraints=mxRectangleShape.prototype.constraints;W.prototype.constraints=mxEllipse.prototype.constraints;ha.prototype.constraints=mxEllipse.prototype.constraints;fa.prototype.constraints=mxEllipse.prototype.constraints;Ma.prototype.constraints=
mxEllipse.prototype.constraints;Xa.prototype.constraints=mxRectangleShape.prototype.constraints;La.prototype.constraints=mxRectangleShape.prototype.constraints;Fa.prototype.getConstraints=function(c,h,q){c=[];var l=Math.min(h,q/2),p=Math.min(h-l,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*h);c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
.5*(p+h-l),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-l,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-l,q));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+h-l),q));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,q));return c};Ca.prototype.getConstraints=function(c,h,q){h=parseFloat(mxUtils.getValue(c,"jettyWidth",Ca.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c,
"jettyHeight",Ca.prototype.jettyHeight));var l=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,h),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,
h),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(q-.5*c,1.5*c)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(q-.5*c,3.5*c))];q>5*c&&l.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,h));q>8*c&&l.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,h));q>
-15*c&&l.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,h));return l};H.prototype.constraints=mxRectangleShape.prototype.constraints;K.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,
-.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];T.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)];ra.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,
+15*c&&l.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,h));return l};H.prototype.constraints=mxRectangleShape.prototype.constraints;L.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,
+.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];Q.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)];sa.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)];C.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)];N.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)];qa.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)];sa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,
+.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ta.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,
1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=
[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),
new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,
-.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];R.prototype.constraints=mxRectangleShape.prototype.constraints;P.prototype.constraints=mxRectangleShape.prototype.constraints;Q.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
+.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];T.prototype.constraints=mxRectangleShape.prototype.constraints;P.prototype.constraints=mxRectangleShape.prototype.constraints;S.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;bb.prototype.getConstraints=function(c,h,q){c=[];var l=Math.max(0,Math.min(h,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),p=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,
"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*h+.25*l,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+l),p));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*(h+l),.5*(q+p)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+l),q));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-l),q));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-l),.5*(q+p)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-l),p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*h-.25*l,p));c.push(new mxConnectionConstraint(new mxPoint(0,
@@ -3779,274 +3782,271 @@ function(c,h,q){c=[];var l=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(t
function(c,h,q){c=[];var l=Math.min(q,h),p=Math.max(0,Math.min(l,l*parseFloat(mxUtils.getValue(this.style,"size",this.size))));l=(q-p)/2;var v=l+p,w=(h-p)/2;p=w+p;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,.5*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,0));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*l));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,p,l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,q-.5*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,q));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,q));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,q-.5*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+p),l));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,h,l));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+p),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*w,l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*w,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,l));return c};aa.prototype.constraints=null;A.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)];E.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)];Ha.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ua.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*w,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,l));return c};ca.prototype.constraints=null;A.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)];E.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)];Ha.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];va.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
-Actions.prototype.init=function(){function a(m){e.escape();m=e.deleteCells(e.getDeletableCells(e.getSelectionCells()),m);null!=m&&e.setSelectionCells(m)}function b(){if(!e.isSelectionEmpty()){e.getModel().beginUpdate();try{for(var m=e.getSelectionCells(),r=0;r<m.length;r++)e.cellLabelChanged(m[r],"")}finally{e.getModel().endUpdate()}}}function f(m,r,x,B,C){C.getModel().beginUpdate();try{var G=C.getCellGeometry(m);null!=G&&x&&B&&(x/=B,G=G.clone(),1<x?G.height=G.width/x:G.width=G.height*x,C.getModel().setGeometry(m,
-G));C.setCellStyles(mxConstants.STYLE_CLIP_PATH,r,[m]);C.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[m])}finally{C.getModel().endUpdate()}}var d=this.editorUi,g=d.editor,e=g.graph,k=function(){return Action.prototype.isEnabled.apply(this,arguments)&&e.isEnabled()};this.addAction("new...",function(){e.openLink(d.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";d.openFile()});this.addAction("smartFit",function(){e.popupMenuHandler.hideMenu();var m=e.view.scale,
-r=e.view.translate.x,x=e.view.translate.y;d.actions.get("resetView").funct();1E-5>Math.abs(m-e.view.scale)&&r==e.view.translate.x&&x==e.view.translate.y&&d.actions.get(e.pageVisible?"fitPage":"fitWindow").funct()});this.addAction("keyPressEnter",function(){e.isEnabled()&&(e.isSelectionEmpty()?d.actions.get("smartFit").funct():e.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){d.hideDialog()}));
-window.openFile.setConsumer(mxUtils.bind(this,function(m,r){try{var x=mxUtils.parseXml(m);g.graph.setSelectionCells(g.graph.importGraphModel(x.documentElement))}catch(B){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+B.message)}}));d.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=k;this.addAction("save",function(){d.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=k;this.addAction("saveAs...",function(){d.saveFile(!0)},null,
-null,Editor.ctrlKey+"+Shift+S").isEnabled=k;this.addAction("export...",function(){d.showDialog((new ExportDialog(d)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var m=new EditDiagramDialog(d);d.showDialog(m.container,620,420,!0,!1);m.init()});this.addAction("pageSetup...",function(){d.showDialog((new PageSetupDialog(d)).container,320,240,!0,!0)}).isEnabled=k;this.addAction("print...",function(){d.showDialog((new PrintDialog(d)).container,300,180,!0,!0)},null,"sprite-print",
-Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(e,null,10,10)});this.addAction("undo",function(){d.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){d.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var m=null;try{m=d.copyXml(),null!=m&&e.removeCells(m,!1)}catch(r){}null==m&&mxClipboard.cut(e)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{d.copyXml()}catch(m){}try{mxClipboard.copy(e)}catch(m){d.handleError(m)}},
-null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(e.isEnabled()&&!e.isCellLocked(e.getDefaultParent())){var m=!1;try{Editor.enableNativeCipboard&&(d.readGraphModelFromClipboard(function(r){if(null!=r){e.getModel().beginUpdate();try{d.pasteXml(r,!0)}finally{e.getModel().endUpdate()}}else mxClipboard.paste(e)}),m=!0)}catch(r){}m||mxClipboard.paste(e)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(m){function r(B){if(null!=B){for(var C=!0,G=0;G<
-B.length&&C;G++)C=C&&e.model.isEdge(B[G]);var J=e.view.translate;G=e.view.scale;var D=J.x,N=J.y;J=null;if(1==B.length&&C){var Q=e.getCellGeometry(B[0]);null!=Q&&(J=Q.getTerminalPoint(!0))}J=null!=J?J:e.getBoundingBoxFromGeometry(B,C);null!=J&&(C=Math.round(e.snap(e.popupMenuHandler.triggerX/G-D)),G=Math.round(e.snap(e.popupMenuHandler.triggerY/G-N)),e.cellsMoved(B,C-J.x,G-J.y))}}function x(){e.getModel().beginUpdate();try{r(mxClipboard.paste(e))}finally{e.getModel().endUpdate()}}if(e.isEnabled()&&
-!e.isCellLocked(e.getDefaultParent())){m=!1;try{Editor.enableNativeCipboard&&(d.readGraphModelFromClipboard(function(B){if(null!=B){e.getModel().beginUpdate();try{r(d.pasteXml(B,!0))}finally{e.getModel().endUpdate()}}else x()}),m=!0)}catch(B){}m||x()}});this.addAction("copySize",function(){var m=e.getSelectionCell();e.isEnabled()&&null!=m&&e.getModel().isVertex(m)&&(m=e.getCellGeometry(m),null!=m&&(d.copiedSize=new mxRectangle(m.x,m.y,m.width,m.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",
-function(){if(e.isEnabled()&&!e.isSelectionEmpty()&&null!=d.copiedSize){e.getModel().beginUpdate();try{for(var m=e.getResizableCells(e.getSelectionCells()),r=0;r<m.length;r++)if(e.getModel().isVertex(m[r])){var x=e.getCellGeometry(m[r]);null!=x&&(x=x.clone(),x.width=d.copiedSize.width,x.height=d.copiedSize.height,e.getModel().setGeometry(m[r],x))}}finally{e.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",function(){var m=e.getSelectionCell()||e.getModel().getRoot();e.isEnabled()&&
-null!=m&&(m=m.cloneValue(),null==m||isNaN(m.nodeType)||(d.copiedValue=m))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(m,r){function x(G,J){var D=B.getValue(G);J=G.cloneValue(J);J.removeAttribute("placeholders");null==D||isNaN(D.nodeType)||J.setAttribute("placeholders",D.getAttribute("placeholders"));null!=m&&mxEvent.isShiftDown(m)||J.setAttribute("label",e.convertValueToString(G));B.setValue(G,J)}m=null!=r?r:m;var B=e.getModel();if(e.isEnabled()&&!e.isSelectionEmpty()&&null!=d.copiedValue){B.beginUpdate();
-try{var C=e.getEditableCells(e.getSelectionCells());if(0==C.length)x(B.getRoot(),d.copiedValue);else for(r=0;r<C.length;r++)x(C[r],d.copiedValue)}finally{B.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(m,r){m=null!=r?r:m;null!=m&&mxEvent.isShiftDown(m)?b():a(null!=m&&(mxEvent.isControlDown(m)||mxEvent.isMetaDown(m)||mxEvent.isAltDown(m)))},null,null,"Delete");this.addAction("deleteAll",function(){a(!0)});this.addAction("deleteLabels",function(){b()},null,null,Editor.ctrlKey+
-"+Delete");this.addAction("duplicate",function(){try{e.setSelectionCells(e.duplicateCells()),e.scrollCellToVisible(e.getSelectionCell())}catch(m){d.handleError(m)}},null,null,Editor.ctrlKey+"+D");this.put("mergeCells",new Action(mxResources.get("merge"),function(){var m=d.getSelectionState();if(null!=m.mergeCell){e.getModel().beginUpdate();try{e.setCellStyles("rowspan",m.rowspan,[m.mergeCell]),e.setCellStyles("colspan",m.colspan,[m.mergeCell])}finally{e.getModel().endUpdate()}}}));this.put("unmergeCells",
-new Action(mxResources.get("unmerge"),function(){var m=d.getSelectionState();if(0<m.cells.length){e.getModel().beginUpdate();try{e.setCellStyles("rowspan",null,m.cells),e.setCellStyles("colspan",null,m.cells)}finally{e.getModel().endUpdate()}}}));this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(m,r){m=null!=r?r:m;e.turnShapes(e.getResizableCells(e.getSelectionCells()),null!=m?mxEvent.isShiftDown(m):!1)},null,null,mxClient.IS_SF?null:Editor.ctrlKey+"+R"));
-this.put("selectConnections",new Action(mxResources.get("selectEdges"),function(m){m=e.getSelectionCell();e.isEnabled()&&null!=m&&e.addSelectionCells(e.getEdges(m))}));this.addAction("selectVertices",function(){e.selectVertices(null,!0)},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){e.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){e.selectAll(null,!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){e.clearSelection()},
-null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!e.isSelectionEmpty()){e.getModel().beginUpdate();try{var m=e.getSelectionCells(),r=e.getCurrentCellStyle(e.getSelectionCell()),x=1==mxUtils.getValue(r,mxConstants.STYLE_EDITABLE,1)?0:1;e.setCellStyles(mxConstants.STYLE_MOVABLE,x,m);e.setCellStyles(mxConstants.STYLE_RESIZABLE,x,m);e.setCellStyles(mxConstants.STYLE_ROTATABLE,x,m);e.setCellStyles(mxConstants.STYLE_DELETABLE,x,m);e.setCellStyles(mxConstants.STYLE_EDITABLE,
-x,m);e.setCellStyles("connectable",x,m)}finally{e.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("home",function(){e.home()},null,null,"Shift+Home");this.addAction("exitGroup",function(){e.exitGroup()},null,null,Editor.ctrlKey+"+Shift+Home");this.addAction("enterGroup",function(){e.enterGroup()},null,null,Editor.ctrlKey+"+Shift+End");this.addAction("collapse",function(){e.foldCells(!0)},null,null,Editor.ctrlKey+"+Home");this.addAction("expand",function(){e.foldCells(!1)},
-null,null,Editor.ctrlKey+"+End");this.addAction("toFront",function(){e.orderCells(!1)},null,null,Editor.ctrlKey+"+Shift+F");this.addAction("toBack",function(){e.orderCells(!0)},null,null,Editor.ctrlKey+"+Shift+B");this.addAction("bringForward",function(m){e.orderCells(!1,null,!0)});this.addAction("sendBackward",function(m){e.orderCells(!0,null,!0)});this.addAction("group",function(){if(e.isEnabled()){var m=mxUtils.sortCells(e.getSelectionCells(),!0);1!=m.length||e.isTable(m[0])||e.isTableRow(m[0])?
-(m=e.getCellsForGroup(m),1<m.length&&e.setSelectionCell(e.groupCells(null,0,m))):e.setCellStyles("container","1")}},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",function(){if(e.isEnabled()){var m=e.getEditableCells(e.getSelectionCells());e.model.beginUpdate();try{var r=e.ungroupCells();if(null!=m)for(var x=0;x<m.length;x++)e.model.contains(m[x])&&(0==e.model.getChildCount(m[x])&&e.model.isVertex(m[x])&&e.setCellStyles("container","0",[m[x]]),r.push(m[x]))}finally{e.model.endUpdate()}0<
-r.length&&e.setSelectionCells(r)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){if(e.isEnabled()){var m=e.getSelectionCells();if(null!=m){for(var r=[],x=0;x<m.length;x++)e.isTableRow(m[x])||e.isTableCell(m[x])||r.push(m[x]);e.removeCellsFromParent(r)}}});this.addAction("edit",function(){e.isEnabled()&&e.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var m=e.getSelectionCell()||e.getModel().getRoot();d.showDataDialog(m)},null,
-null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var m=e.getSelectionCell();if(e.isEnabled()&&null!=m&&e.isCellEditable(m)){var r="";if(mxUtils.isNode(m.value)){var x=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&m.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(x=m.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==x&&(x=m.value.getAttribute("tooltip"));null!=x&&(r=x)}r=new TextareaDialog(d,mxResources.get("editTooltip")+":",r,function(B){e.setTooltipForCell(m,
-B)});d.showDialog(r.container,320,200,!0,!0);r.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var m=e.getLinkForCell(e.getSelectionCell());null!=m&&e.openLink(m)});this.addAction("editLink...",function(){var m=e.getSelectionCell();if(e.isEnabled()&&null!=m&&e.isCellEditable(m)){var r=e.getLinkForCell(m)||"";d.showLinkDialog(r,mxResources.get("apply"),function(x,B,C){x=mxUtils.trim(x);e.setLinkForCell(m,0<x.length?x:null);e.setAttributeForCell(m,"linkTarget",C)},!0,e.getLinkTargetForCell(m))}},
-null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){e.isEnabled()&&!e.isCellLocked(e.getDefaultParent())&&(e.clearSelection(),d.actions.get("image").funct())})).isEnabled=k;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){e.isEnabled()&&!e.isCellLocked(e.getDefaultParent())&&d.showLinkDialog("",mxResources.get("insert"),function(m,r,x){m=mxUtils.trim(m);if(0<m.length){var B=null,C=e.getLinkTitle(m);null!=r&&0<r.length&&(B=r[0].iconUrl,
-C=r[0].name||r[0].type,C=C.charAt(0).toUpperCase()+C.substring(1),30<C.length&&(C=C.substring(0,30)+"..."));r=new mxCell(C,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=B?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+B:"spacing=10;"));r.vertex=!0;B=e.getCenterInsertPoint(e.getBoundingBoxFromGeometry([r],!0));r.geometry.x=B.x;r.geometry.y=B.y;e.setAttributeForCell(r,"linkTarget",x);e.setLinkForCell(r,m);e.cellSizeUpdated(r,
-!0);e.getModel().beginUpdate();try{r=e.addCell(r),e.fireEvent(new mxEventObject("cellsInserted","cells",[r]))}finally{e.getModel().endUpdate()}e.setSelectionCell(r);e.scrollCellToVisible(e.getSelectionCell())}},!0)})).isEnabled=k;this.addAction("link...",mxUtils.bind(this,function(){if(e.isEnabled())if(e.cellEditor.isContentEditing()){var m=e.getSelectedElement(),r=e.getParentByName(m,"A",e.cellEditor.textarea),x="";if(null==r&&null!=m&&null!=m.getElementsByTagName)for(var B=m.getElementsByTagName("a"),
-C=0;C<B.length&&null==r;C++)B[C].textContent==m.textContent&&(r=B[C]);null!=r&&"A"==r.nodeName&&(x=r.getAttribute("href")||"",e.selectNode(r));var G=e.cellEditor.saveSelection();d.showLinkDialog(x,mxResources.get("apply"),mxUtils.bind(this,function(J){e.cellEditor.restoreSelection(G);null!=J&&e.insertLink(J)}))}else e.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=k;this.addAction("autosize",function(){var m=e.getSelectionCells();if(null!=m){e.getModel().beginUpdate();
-try{for(var r=0;r<m.length;r++){var x=m[r];0<e.getModel().getChildCount(x)?e.updateGroupBounds([x],0,!0):e.updateCellSize(x)}}finally{e.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){e.snapCellsToGrid(e.getSelectionCells(),e.gridSize)});this.addAction("formattedText",function(){e.stopEditing();var m=e.getCommonStyle(e.getSelectionCells());m="1"==mxUtils.getValue(m,"html","0")?null:"1";e.getModel().beginUpdate();try{for(var r=e.getEditableCells(e.getSelectionCells()),
-x=0;x<r.length;x++)if(state=e.getView().getState(r[x]),null!=state){var B=mxUtils.getValue(state.style,"html","0");if("1"==B&&null==m){var C=e.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(C=C.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var G=document.createElement("div");G.innerHTML=e.sanitizeHtml(C);C=mxUtils.extractTextWithWhitespace(G.childNodes);e.cellLabelChanged(state.cell,C);e.setCellStyles("html",m,[r[x]])}else"0"==B&&"1"==m&&(C=mxUtils.htmlEntities(e.convertValueToString(state.cell),
-!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(C=C.replace(/\n/g,"<br/>")),e.cellLabelChanged(state.cell,e.sanitizeHtml(C)),e.setCellStyles("html",m,[r[x]]))}d.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=m?m:"0"],"cells",r))}finally{e.getModel().endUpdate()}});this.addAction("wordWrap",function(){var m=e.getView().getState(e.getSelectionCell()),r="wrap";e.stopEditing();null!=m&&"wrap"==m.style[mxConstants.STYLE_WHITE_SPACE]&&(r=null);e.setCellStyles(mxConstants.STYLE_WHITE_SPACE,
-r)});this.addAction("rotation",function(){var m="0",r=e.getView().getState(e.getSelectionCell());null!=r&&(m=r.style[mxConstants.STYLE_ROTATION]||m);m=new FilenameDialog(d,m,mxResources.get("apply"),function(x){null!=x&&0<x.length&&e.setCellStyles(mxConstants.STYLE_ROTATION,x)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");d.showDialog(m.container,375,80,!0,!0);m.init()});this.addAction("resetView",function(){e.zoomTo(1);d.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",
-function(m){e.isFastZoomEnabled()?e.lazyZoom(!0,!0,d.buttonZoomDelay):e.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(m){e.isFastZoomEnabled()?e.lazyZoom(!1,!0,d.buttonZoomDelay):e.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var m=e.isSelectionEmpty()?e.getGraphBounds():e.getBoundingBox(e.getSelectionCells()),r=e.view.translate,x=e.view.scale;m.x=m.x/x-r.x;m.y=m.y/x-r.y;m.width/=x;
-m.height/=x;null!=e.backgroundImage&&(m=mxRectangle.fromRectangle(m),m.add(new mxRectangle(0,0,e.backgroundImage.width,e.backgroundImage.height)));0==m.width||0==m.height?(e.zoomTo(1),d.resetScrollbars()):(r=Editor.fitWindowBorders,null!=r&&(m.x-=r.x,m.y-=r.y,m.width+=r.width+r.x,m.height+=r.height+r.y),e.fitWindow(m))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){e.pageVisible||this.get("pageView").funct();var m=e.pageFormat,r=e.pageScale;e.zoomTo(Math.floor(20*
-Math.min((e.container.clientWidth-10)/m.width/r,(e.container.clientHeight-10)/m.height/r))/20);mxUtils.hasScrollbars(e.container)&&(m=e.getPagePadding(),e.container.scrollTop=m.y*e.view.scale-1,e.container.scrollLeft=Math.min(m.x*e.view.scale,(e.container.scrollWidth-e.container.clientWidth)/2)-1)}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){e.pageVisible||this.get("pageView").funct();var m=e.pageFormat,r=e.pageScale;e.zoomTo(Math.floor(20*Math.min((e.container.clientWidth-
-10)/(2*m.width)/r,(e.container.clientHeight-10)/m.height/r))/20);mxUtils.hasScrollbars(e.container)&&(m=e.getPagePadding(),e.container.scrollTop=Math.min(m.y,(e.container.scrollHeight-e.container.clientHeight)/2),e.container.scrollLeft=Math.min(m.x,(e.container.scrollWidth-e.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){e.pageVisible||this.get("pageView").funct();e.zoomTo(Math.floor(20*(e.container.clientWidth-10)/e.pageFormat.width/
-e.pageScale)/20);if(mxUtils.hasScrollbars(e.container)){var m=e.getPagePadding();e.container.scrollLeft=Math.min(m.x*e.view.scale,(e.container.scrollWidth-e.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var m=new FilenameDialog(this.editorUi,parseInt(100*e.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(r){r=parseInt(r);!isNaN(r)&&0<r&&e.zoomTo(r/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(m.container,
-300,80,!0,!0);m.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var m=new FilenameDialog(this.editorUi,parseInt(100*e.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(r){r=parseInt(r);!isNaN(r)&&0<r&&(r=new ChangePageSetup(d,null,null,null,r/100),r.ignoreColor=!0,r.ignoreImage=!0,e.model.execute(r))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(m.container,300,80,!0,!0);m.init()}));var n=null;n=this.addAction("grid",
-function(){e.setGridEnabled(!e.isGridEnabled());e.defaultGridEnabled=e.isGridEnabled();d.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");n.setToggleAction(!0);n.setSelectedCallback(function(){return e.isGridEnabled()});n.setEnabled(!1);n=this.addAction("guides",function(){e.graphHandler.guidesEnabled=!e.graphHandler.guidesEnabled;d.fireEvent(new mxEventObject("guidesEnabledChanged"))});n.setToggleAction(!0);n.setSelectedCallback(function(){return e.graphHandler.guidesEnabled});
-n.setEnabled(!1);n=this.addAction("tooltips",function(){e.tooltipHandler.setEnabled(!e.tooltipHandler.isEnabled());d.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});n.setToggleAction(!0);n.setSelectedCallback(function(){return e.tooltipHandler.isEnabled()});n=this.addAction("collapseExpand",function(){var m=new ChangePageSetup(d);m.ignoreColor=!0;m.ignoreImage=!0;m.foldingEnabled=!e.foldingEnabled;e.model.execute(m)});n.setToggleAction(!0);n.setSelectedCallback(function(){return e.foldingEnabled});
-n.isEnabled=k;n=this.addAction("scrollbars",function(){d.setScrollbars(!d.hasScrollbars())});n.setToggleAction(!0);n.setSelectedCallback(function(){return e.scrollbars});n=this.addAction("pageView",mxUtils.bind(this,function(){d.setPageVisible(!e.pageVisible)}));n.setToggleAction(!0);n.setSelectedCallback(function(){return e.pageVisible});n=this.addAction("connectionArrows",function(){e.connectionArrowsEnabled=!e.connectionArrowsEnabled;d.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,
-null,"Alt+Shift+A");n.setToggleAction(!0);n.setSelectedCallback(function(){return e.connectionArrowsEnabled});n=this.addAction("connectionPoints",function(){e.setConnectable(!e.connectionHandler.isEnabled());d.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");n.setToggleAction(!0);n.setSelectedCallback(function(){return e.connectionHandler.isEnabled()});n=this.addAction("copyConnect",function(){e.connectionHandler.setCreateTarget(!e.connectionHandler.isCreateTarget());
-d.fireEvent(new mxEventObject("copyConnectChanged"))});n.setToggleAction(!0);n.setSelectedCallback(function(){return e.connectionHandler.isCreateTarget()});n.isEnabled=k;n=this.addAction("autosave",function(){d.editor.setAutosave(!d.editor.autosave)});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.editor.autosave});n.isEnabled=k;n.visible=!1;this.addAction("help",function(){var m="";mxResources.isLanguageSupported(mxClient.language)&&(m="_"+mxClient.language);e.openLink(RESOURCES_PATH+
-"/help"+m+".html")});var u=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){u||(d.showDialog((new AboutDialog(d)).container,320,280,!0,!0,function(){u=!1}),u=!0)}));n=mxUtils.bind(this,function(m,r,x,B){return this.addAction(m,function(){if(null!=x&&e.cellEditor.isContentEditing())x();else{e.stopEditing(!1);e.getModel().beginUpdate();try{var C=e.getEditableCells(e.getSelectionCells());e.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,r,C);(r&mxConstants.FONT_BOLD)==
-mxConstants.FONT_BOLD?e.updateLabelElements(C,function(J){J.style.fontWeight=null;"B"==J.nodeName&&e.replaceElement(J)}):(r&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?e.updateLabelElements(C,function(J){J.style.fontStyle=null;"I"==J.nodeName&&e.replaceElement(J)}):(r&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&e.updateLabelElements(C,function(J){J.style.textDecoration=null;"U"==J.nodeName&&e.replaceElement(J)});for(var G=0;G<C.length;G++)0==e.model.getChildCount(C[G])&&e.autoSizeCell(C[G],
-!1)}finally{e.getModel().endUpdate()}}},null,null,B)});n("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");n("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");n("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){d.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",
-function(){d.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){d.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});this.addAction("gradientColor...",function(){d.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});this.addAction("backgroundColor...",function(){d.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor")});this.addAction("borderColor...",function(){d.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR)});this.addAction("vertical",function(){d.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,
-!0)});this.addAction("shadow",function(){d.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){e.getModel().beginUpdate();try{e.setCellStyles(mxConstants.STYLE_DASHED,null),e.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",e.getSelectionCells()))}finally{e.getModel().endUpdate()}});this.addAction("dashed",function(){e.getModel().beginUpdate();
-try{e.setCellStyles(mxConstants.STYLE_DASHED,"1"),e.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",e.getSelectionCells()))}finally{e.getModel().endUpdate()}});this.addAction("dotted",function(){e.getModel().beginUpdate();try{e.setCellStyles(mxConstants.STYLE_DASHED,"1"),e.setCellStyles(mxConstants.STYLE_DASH_PATTERN,"1 4"),d.fireEvent(new mxEventObject("styleChanged",
-"keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1","1 4"],"cells",e.getSelectionCells()))}finally{e.getModel().endUpdate()}});this.addAction("sharp",function(){e.getModel().beginUpdate();try{e.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),e.setCellStyles(mxConstants.STYLE_CURVED,"0"),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","0"],"cells",e.getSelectionCells()))}finally{e.getModel().endUpdate()}});
-this.addAction("rounded",function(){e.getModel().beginUpdate();try{e.setCellStyles(mxConstants.STYLE_ROUNDED,"1"),e.setCellStyles(mxConstants.STYLE_CURVED,"0"),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",e.getSelectionCells()))}finally{e.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!e.isSelectionEmpty()&&e.isEnabled()){e.getModel().beginUpdate();try{var m=e.getSelectionCells(),r=e.getCurrentCellStyle(m[0]),
-x="1"==mxUtils.getValue(r,mxConstants.STYLE_ROUNDED,"0")?"0":"1";e.setCellStyles(mxConstants.STYLE_ROUNDED,x);e.setCellStyles(mxConstants.STYLE_CURVED,null);d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[x,"0"],"cells",e.getSelectionCells()))}finally{e.getModel().endUpdate()}}});this.addAction("curved",function(){e.getModel().beginUpdate();try{e.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),e.setCellStyles(mxConstants.STYLE_CURVED,
-"1"),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",e.getSelectionCells()))}finally{e.getModel().endUpdate()}});this.addAction("collapsible",function(){var m=e.view.getState(e.getSelectionCell()),r="1";null!=m&&null!=e.getFoldingImage(m)&&(r="0");e.setCellStyles("collapsible",r);d.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[r],"cells",e.getSelectionCells()))});this.addAction("editStyle...",
-mxUtils.bind(this,function(){var m=e.getEditableCells(e.getSelectionCells());if(null!=m&&0<m.length){var r=e.getModel();r=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",r.getStyle(m[0])||"",function(x){null!=x&&e.setCellStyle(mxUtils.trim(x),m)},null,null,400,220);this.editorUi.showDialog(r.container,420,300,!0,!0);r.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){e.isEnabled()&&!e.isSelectionEmpty()&&d.setDefaultStyle(e.getSelectionCell())},
-null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){e.isEnabled()&&d.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var m=e.getSelectionCell();if(null!=m&&e.getModel().isEdge(m)){var r=g.graph.selectionCellsHandler.getHandler(m);if(r instanceof mxEdgeHandler){var x=e.view.translate,B=e.view.scale,C=x.x;x=x.y;m=e.getModel().getParent(m);for(var G=e.getCellGeometry(m);e.getModel().isVertex(m)&&null!=G;)C+=G.x,x+=G.y,m=
-e.getModel().getParent(m),G=e.getCellGeometry(m);C=Math.round(e.snap(e.popupMenuHandler.triggerX/B-C));B=Math.round(e.snap(e.popupMenuHandler.triggerY/B-x));r.addPointAt(r.state,C,B)}}});this.addAction("removeWaypoint",function(){var m=d.actions.get("removeWaypoint");null!=m.handler&&m.handler.removePoint(m.handler.state,m.index)});this.addAction("clearWaypoints",function(m,r){m=null!=r?r:m;var x=e.getSelectionCells();if(null!=x){x=e.getEditableCells(e.addAllEdges(x));e.getModel().beginUpdate();try{for(var B=
-0;B<x.length;B++){var C=x[B];if(e.getModel().isEdge(C)){var G=e.getCellGeometry(C);null!=r&&mxEvent.isShiftDown(m)?(e.setCellStyles(mxConstants.STYLE_EXIT_X,null,[C]),e.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[C]),e.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[C]),e.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[C])):null!=G&&(G=G.clone(),G.points=null,G.x=0,G.y=0,G.offset=null,e.getModel().setGeometry(C,G))}}}finally{e.getModel().endUpdate()}}},null,null,"Alt+Shift+C");n=this.addAction("subscript",
-mxUtils.bind(this,function(){e.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");n=this.addAction("superscript",mxUtils.bind(this,function(){e.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(e.isEnabled()&&!e.isCellLocked(e.getDefaultParent())){var m=mxResources.get("image")+" ("+mxResources.get("url")+"):",r=e.getView().getState(e.getSelectionCell()),
-x="",B=null;null!=r&&(x=r.style[mxConstants.STYLE_IMAGE]||x,B=r.style[mxConstants.STYLE_CLIP_PATH]||B);var C=e.cellEditor.saveSelection();d.showImageDialog(m,x,function(G,J,D,N,Q,R){if(e.cellEditor.isContentEditing())e.cellEditor.restoreSelection(C),e.insertImage(G,J,D);else{var P=e.getSelectionCells();if(null!=G&&(0<G.length||0<P.length)){var Z=null;e.getModel().beginUpdate();try{if(0==P.length){P=[e.insertVertex(e.getDefaultParent(),null,"",0,0,J,D,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];
-var U=e.getCenterInsertPoint(e.getBoundingBoxFromGeometry(P,!0));P[0].geometry.x=U.x;P[0].geometry.y=U.y;null!=N&&f(P[0],N,Q,R,e);Z=P;e.fireEvent(new mxEventObject("cellsInserted","cells",Z))}e.setCellStyles(mxConstants.STYLE_IMAGE,0<G.length?G:null,P);var V=e.getCurrentCellStyle(P[0]);"image"!=V[mxConstants.STYLE_SHAPE]&&"label"!=V[mxConstants.STYLE_SHAPE]?e.setCellStyles(mxConstants.STYLE_SHAPE,"image",P):0==G.length&&e.setCellStyles(mxConstants.STYLE_SHAPE,null,P);if(1==e.getSelectionCount()&&
-null!=J&&null!=D){var ia=P[0],ha=e.getModel().getGeometry(ia);null!=ha&&(ha=ha.clone(),ha.width=J,ha.height=D,e.getModel().setGeometry(ia,ha));null!=N?f(ia,N,Q,R,e):e.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,P)}}finally{e.getModel().endUpdate()}null!=Z&&(e.setSelectionCells(Z),e.scrollCellToVisible(Z[0]))}}},e.cellEditor.isContentEditing(),!e.cellEditor.isContentEditing(),!0,B)}}).isEnabled=k;this.addAction("crop...",function(){var m=e.getSelectionCell();if(e.isEnabled()&&!e.isCellLocked(e.getDefaultParent())&&
-null!=m){var r=e.getCurrentCellStyle(m),x=r[mxConstants.STYLE_IMAGE],B=r[mxConstants.STYLE_SHAPE];x&&"image"==B&&(r=new CropImageDialog(d,x,r[mxConstants.STYLE_CLIP_PATH],function(C,G,J){f(m,C,G,J,e)}),d.showDialog(r.container,300,390,!0,!0))}}).isEnabled=k;n=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(d,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",mxUtils.bind(this,function(){d.fireEvent(new mxEventObject("layers"))})),
-this.layersWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));n=this.addAction("formatPanel",mxUtils.bind(this,
-function(){d.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return 0<d.formatWidth}));n=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(d,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){d.fireEvent(new mxEventObject("outline"))})),this.outlineWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("outline"))}),
-this.outlineWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var m=e.getSelectionCell();if(e.isEnabled()&&!e.isCellLocked(e.getDefaultParent())&&null!=m){var r=new ConnectionPointsDialog(d,
-m);d.showDialog(r.container,350,450,!0,!1,function(){r.destroy()});r.init()}}).isEnabled=k};Actions.prototype.addAction=function(a,b,f,d,g){if("..."==a.substring(a.length-3)){a=a.substring(0,a.length-3);var e=mxResources.get(a)+"..."}else e=mxResources.get(a);return this.put(a,new Action(e,b,f,d,g))};Actions.prototype.put=function(a,b){return this.actions[a]=b};Actions.prototype.get=function(a){return this.actions[a]};
-function Action(a,b,f,d,g){mxEventSource.call(this);this.label=a;this.funct=this.createFunction(b);this.enabled=null!=f?f:!0;this.iconCls=d;this.shortcut=g;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(a){return a};Action.prototype.setEnabled=function(a){this.enabled!=a&&(this.enabled=a,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};
+Actions.prototype.init=function(){function a(m){d.escape();m=d.deleteCells(d.getDeletableCells(d.getSelectionCells()),m);null!=m&&d.setSelectionCells(m)}function b(){if(!d.isSelectionEmpty()){d.getModel().beginUpdate();try{for(var m=d.getSelectionCells(),r=0;r<m.length;r++)d.cellLabelChanged(m[r],"")}finally{d.getModel().endUpdate()}}}function f(m,r,x,B,C){C.getModel().beginUpdate();try{var F=C.getCellGeometry(m);null!=F&&x&&B&&(x/=B,F=F.clone(),1<x?F.height=F.width/x:F.width=F.height*x,C.getModel().setGeometry(m,
+F));C.setCellStyles(mxConstants.STYLE_CLIP_PATH,r,[m]);C.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[m])}finally{C.getModel().endUpdate()}}var e=this.editorUi,g=e.editor,d=g.graph,k=function(){return Action.prototype.isEnabled.apply(this,arguments)&&d.isEnabled()};this.addAction("new...",function(){d.openLink(e.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";e.openFile()});this.addAction("smartFit",function(){d.popupMenuHandler.hideMenu();var m=d.view.scale,
+r=d.view.translate.x,x=d.view.translate.y;e.actions.get("resetView").funct();1E-5>Math.abs(m-d.view.scale)&&r==d.view.translate.x&&x==d.view.translate.y&&e.actions.get(d.pageVisible?"fitPage":"fitWindow").funct()});this.addAction("keyPressEnter",function(){d.isEnabled()&&(d.isSelectionEmpty()?e.actions.get("smartFit").funct():d.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(m,r){try{var x=mxUtils.parseXml(m);g.graph.setSelectionCells(g.graph.importGraphModel(x.documentElement))}catch(B){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+B.message)}}));e.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=k;this.addAction("save",function(){e.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=k;this.addAction("saveAs...",function(){e.saveFile(!0)},null,
+null,Editor.ctrlKey+"+Shift+S").isEnabled=k;this.addAction("export...",function(){e.showDialog((new ExportDialog(e)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var m=new EditDiagramDialog(e);e.showDialog(m.container,620,420,!0,!1);m.init()});this.addAction("pageSetup...",function(){e.showDialog((new PageSetupDialog(e)).container,320,240,!0,!0)}).isEnabled=k;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(d,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 m=null;try{m=e.copyXml(),null!=m&&d.removeCells(m,!1)}catch(r){}null==m&&mxClipboard.cut(d)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{e.copyXml()}catch(m){}try{mxClipboard.copy(d)}catch(m){e.handleError(m)}},
+null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var m=!1;try{Editor.enableNativeCipboard&&(e.readGraphModelFromClipboard(function(r){if(null!=r){d.getModel().beginUpdate();try{e.pasteXml(r,!0)}finally{d.getModel().endUpdate()}}else mxClipboard.paste(d)}),m=!0)}catch(r){}m||mxClipboard.paste(d)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(m){function r(B){if(null!=B){for(var C=!0,F=0;F<
+B.length&&C;F++)C=C&&d.model.isEdge(B[F]);var J=d.view.translate;F=d.view.scale;var D=J.x,N=J.y;J=null;if(1==B.length&&C){var S=d.getCellGeometry(B[0]);null!=S&&(J=S.getTerminalPoint(!0))}J=null!=J?J:d.getBoundingBoxFromGeometry(B,C);null!=J&&(C=Math.round(d.snap(d.popupMenuHandler.triggerX/F-D)),F=Math.round(d.snap(d.popupMenuHandler.triggerY/F-N)),d.cellsMoved(B,C-J.x,F-J.y))}}function x(){d.getModel().beginUpdate();try{r(mxClipboard.paste(d))}finally{d.getModel().endUpdate()}}if(d.isEnabled()&&
+!d.isCellLocked(d.getDefaultParent())){m=!1;try{Editor.enableNativeCipboard&&(e.readGraphModelFromClipboard(function(B){if(null!=B){d.getModel().beginUpdate();try{r(e.pasteXml(B,!0))}finally{d.getModel().endUpdate()}}else x()}),m=!0)}catch(B){}m||x()}});this.addAction("copySize",function(){var m=d.getSelectionCell();d.isEnabled()&&null!=m&&d.getModel().isVertex(m)&&(m=d.getCellGeometry(m),null!=m&&(e.copiedSize=new mxRectangle(m.x,m.y,m.width,m.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",
+function(){if(d.isEnabled()&&!d.isSelectionEmpty()&&null!=e.copiedSize){d.getModel().beginUpdate();try{for(var m=d.getResizableCells(d.getSelectionCells()),r=0;r<m.length;r++)if(d.getModel().isVertex(m[r])){var x=d.getCellGeometry(m[r]);null!=x&&(x=x.clone(),x.width=e.copiedSize.width,x.height=e.copiedSize.height,d.getModel().setGeometry(m[r],x))}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",function(){var m=d.getSelectionCell()||d.getModel().getRoot();d.isEnabled()&&
+null!=m&&(m=m.cloneValue(),null==m||isNaN(m.nodeType)||(e.copiedValue=m))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(m,r){function x(F,J){var D=B.getValue(F);J=F.cloneValue(J);J.removeAttribute("placeholders");null==D||isNaN(D.nodeType)||J.setAttribute("placeholders",D.getAttribute("placeholders"));null!=m&&mxEvent.isShiftDown(m)||J.setAttribute("label",d.convertValueToString(F));B.setValue(F,J)}m=null!=r?r:m;var B=d.getModel();if(d.isEnabled()&&!d.isSelectionEmpty()&&null!=e.copiedValue){B.beginUpdate();
+try{var C=d.getEditableCells(d.getSelectionCells());if(0==C.length)x(B.getRoot(),e.copiedValue);else for(r=0;r<C.length;r++)x(C[r],e.copiedValue)}finally{B.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(m,r){m=null!=r?r:m;null!=m&&mxEvent.isShiftDown(m)?b():a(null!=m&&(mxEvent.isControlDown(m)||mxEvent.isMetaDown(m)||mxEvent.isAltDown(m)))},null,null,"Delete");this.addAction("deleteAll",function(){a(!0)});this.addAction("deleteLabels",function(){b()},null,null,Editor.ctrlKey+
+"+Delete");this.addAction("duplicate",function(){try{d.setSelectionCells(d.duplicateCells()),d.scrollCellToVisible(d.getSelectionCell())}catch(m){e.handleError(m)}},null,null,Editor.ctrlKey+"+D");this.put("mergeCells",new Action(mxResources.get("merge"),function(){var m=e.getSelectionState();if(null!=m.mergeCell){d.getModel().beginUpdate();try{d.setCellStyles("rowspan",m.rowspan,[m.mergeCell]),d.setCellStyles("colspan",m.colspan,[m.mergeCell])}finally{d.getModel().endUpdate()}}}));this.put("unmergeCells",
+new Action(mxResources.get("unmerge"),function(){var m=e.getSelectionState();if(0<m.cells.length){d.getModel().beginUpdate();try{d.setCellStyles("rowspan",null,m.cells),d.setCellStyles("colspan",null,m.cells)}finally{d.getModel().endUpdate()}}}));this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(m,r){m=null!=r?r:m;d.turnShapes(d.getResizableCells(d.getSelectionCells()),null!=m?mxEvent.isShiftDown(m):!1)},null,null,mxClient.IS_SF?null:Editor.ctrlKey+"+R"));
+this.put("selectConnections",new Action(mxResources.get("selectEdges"),function(m){m=d.getSelectionCell();d.isEnabled()&&null!=m&&d.addSelectionCells(d.getEdges(m))}));this.addAction("selectVertices",function(){d.selectVertices(null,!0)},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){d.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){d.selectAll(null,!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){d.clearSelection()},
+null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!d.isSelectionEmpty()){d.getModel().beginUpdate();try{var m=d.getSelectionCells(),r=d.getCurrentCellStyle(d.getSelectionCell()),x=1==mxUtils.getValue(r,mxConstants.STYLE_EDITABLE,1)?0:1;d.setCellStyles(mxConstants.STYLE_MOVABLE,x,m);d.setCellStyles(mxConstants.STYLE_RESIZABLE,x,m);d.setCellStyles(mxConstants.STYLE_ROTATABLE,x,m);d.setCellStyles(mxConstants.STYLE_DELETABLE,x,m);d.setCellStyles(mxConstants.STYLE_EDITABLE,
+x,m);d.setCellStyles("connectable",x,m)}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("home",function(){d.home()},null,null,"Shift+Home");this.addAction("exitGroup",function(){d.exitGroup()},null,null,Editor.ctrlKey+"+Shift+Home");this.addAction("enterGroup",function(){d.enterGroup()},null,null,Editor.ctrlKey+"+Shift+End");this.addAction("collapse",function(){d.foldCells(!0)},null,null,Editor.ctrlKey+"+Home");this.addAction("expand",function(){d.foldCells(!1)},
+null,null,Editor.ctrlKey+"+End");this.addAction("toFront",function(){d.orderCells(!1)},null,null,Editor.ctrlKey+"+Shift+F");this.addAction("toBack",function(){d.orderCells(!0)},null,null,Editor.ctrlKey+"+Shift+B");this.addAction("bringForward",function(m){d.orderCells(!1,null,!0)});this.addAction("sendBackward",function(m){d.orderCells(!0,null,!0)});this.addAction("group",function(){if(d.isEnabled()){var m=mxUtils.sortCells(d.getSelectionCells(),!0);1!=m.length||d.isTable(m[0])||d.isTableRow(m[0])?
+(m=d.getCellsForGroup(m),1<m.length&&d.setSelectionCell(d.groupCells(null,0,m))):d.setCellStyles("container","1")}},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",function(){if(d.isEnabled()){var m=d.getEditableCells(d.getSelectionCells());d.model.beginUpdate();try{var r=d.ungroupCells();if(null!=m)for(var x=0;x<m.length;x++)d.model.contains(m[x])&&(0==d.model.getChildCount(m[x])&&d.model.isVertex(m[x])&&d.setCellStyles("container","0",[m[x]]),r.push(m[x]))}finally{d.model.endUpdate()}0<
+r.length&&d.setSelectionCells(r)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){if(d.isEnabled()){var m=d.getSelectionCells();if(null!=m){for(var r=[],x=0;x<m.length;x++)d.isTableRow(m[x])||d.isTableCell(m[x])||r.push(m[x]);d.removeCellsFromParent(r)}}});this.addAction("edit",function(){d.isEnabled()&&d.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var m=d.getSelectionCell()||d.getModel().getRoot();e.showDataDialog(m)},null,
+null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var m=d.getSelectionCell();if(d.isEnabled()&&null!=m&&d.isCellEditable(m)){var r="";if(mxUtils.isNode(m.value)){var x=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&m.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(x=m.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==x&&(x=m.value.getAttribute("tooltip"));null!=x&&(r=x)}r=new TextareaDialog(e,mxResources.get("editTooltip")+":",r,function(B){d.setTooltipForCell(m,
+B)});e.showDialog(r.container,320,200,!0,!0);r.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var m=d.getLinkForCell(d.getSelectionCell());null!=m&&d.openLink(m)});this.addAction("editLink...",function(){var m=d.getSelectionCell();if(d.isEnabled()&&null!=m&&d.isCellEditable(m)){var r=d.getLinkForCell(m)||"";e.showLinkDialog(r,mxResources.get("apply"),function(x,B,C){x=mxUtils.trim(x);d.setLinkForCell(m,0<x.length?x:null);d.setAttributeForCell(m,"linkTarget",C)},!0,d.getLinkTargetForCell(m))}},
+null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&(d.clearSelection(),e.actions.get("image").funct())})).isEnabled=k;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&e.showLinkDialog("",mxResources.get("insert"),function(m,r,x){m=mxUtils.trim(m);if(0<m.length){var B=null,C=d.getLinkTitle(m);null!=r&&0<r.length&&(B=r[0].iconUrl,
+C=r[0].name||r[0].type,C=C.charAt(0).toUpperCase()+C.substring(1),30<C.length&&(C=C.substring(0,30)+"..."));r=new mxCell(C,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=B?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+B:"spacing=10;"));r.vertex=!0;B=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry([r],!0));r.geometry.x=B.x;r.geometry.y=B.y;d.setAttributeForCell(r,"linkTarget",x);d.setLinkForCell(r,m);d.cellSizeUpdated(r,
+!0);d.getModel().beginUpdate();try{r=d.addCell(r),d.fireEvent(new mxEventObject("cellsInserted","cells",[r]))}finally{d.getModel().endUpdate()}d.setSelectionCell(r);d.scrollCellToVisible(d.getSelectionCell())}},!0)})).isEnabled=k;this.addAction("link...",mxUtils.bind(this,function(){if(d.isEnabled())if(d.cellEditor.isContentEditing()){var m=d.getSelectedElement(),r=d.getParentByName(m,"A",d.cellEditor.textarea),x="";if(null==r&&null!=m&&null!=m.getElementsByTagName)for(var B=m.getElementsByTagName("a"),
+C=0;C<B.length&&null==r;C++)B[C].textContent==m.textContent&&(r=B[C]);null!=r&&"A"==r.nodeName&&(x=r.getAttribute("href")||"",d.selectNode(r));var F=d.cellEditor.saveSelection();e.showLinkDialog(x,mxResources.get("apply"),mxUtils.bind(this,function(J){d.cellEditor.restoreSelection(F);null!=J&&d.insertLink(J)}))}else d.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=k;this.addAction("autosize",function(){var m=d.getSelectionCells();if(null!=m){d.getModel().beginUpdate();
+try{for(var r=0;r<m.length;r++){var x=m[r];0<d.getModel().getChildCount(x)?d.updateGroupBounds([x],0,!0):d.updateCellSize(x)}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){d.snapCellsToGrid(d.getSelectionCells(),d.gridSize)});this.addAction("formattedText",function(){d.stopEditing();var m=d.getCommonStyle(d.getSelectionCells());m="1"==mxUtils.getValue(m,"html","0")?null:"1";d.getModel().beginUpdate();try{for(var r=d.getEditableCells(d.getSelectionCells()),
+x=0;x<r.length;x++)if(state=d.getView().getState(r[x]),null!=state){var B=mxUtils.getValue(state.style,"html","0");if("1"==B&&null==m){var C=d.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(C=C.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var F=document.createElement("div");F.innerHTML=d.sanitizeHtml(C);C=mxUtils.extractTextWithWhitespace(F.childNodes);d.cellLabelChanged(state.cell,C);d.setCellStyles("html",m,[r[x]])}else"0"==B&&"1"==m&&(C=mxUtils.htmlEntities(d.convertValueToString(state.cell),
+!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(C=C.replace(/\n/g,"<br/>")),d.cellLabelChanged(state.cell,d.sanitizeHtml(C)),d.setCellStyles("html",m,[r[x]]))}e.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=m?m:"0"],"cells",r))}finally{d.getModel().endUpdate()}});this.addAction("wordWrap",function(){var m=d.getView().getState(d.getSelectionCell()),r="wrap";d.stopEditing();null!=m&&"wrap"==m.style[mxConstants.STYLE_WHITE_SPACE]&&(r=null);d.setCellStyles(mxConstants.STYLE_WHITE_SPACE,
+r)});this.addAction("rotation",function(){var m="0",r=d.getView().getState(d.getSelectionCell());null!=r&&(m=r.style[mxConstants.STYLE_ROTATION]||m);m=new FilenameDialog(e,m,mxResources.get("apply"),function(x){null!=x&&0<x.length&&d.setCellStyles(mxConstants.STYLE_ROTATION,x)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");e.showDialog(m.container,375,80,!0,!0);m.init()});this.addAction("resetView",function(){d.zoomTo(1);e.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",
+function(m){d.isFastZoomEnabled()?d.lazyZoom(!0,!0,e.buttonZoomDelay):d.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(m){d.isFastZoomEnabled()?d.lazyZoom(!1,!0,e.buttonZoomDelay):d.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var m=d.isSelectionEmpty()?d.getGraphBounds():d.getBoundingBox(d.getSelectionCells()),r=d.view.translate,x=d.view.scale;m.x=m.x/x-r.x;m.y=m.y/x-r.y;m.width/=x;
+m.height/=x;null!=d.backgroundImage&&(m=mxRectangle.fromRectangle(m),m.add(new mxRectangle(0,0,d.backgroundImage.width,d.backgroundImage.height)));0==m.width||0==m.height?(d.zoomTo(1),e.resetScrollbars()):(r=Editor.fitWindowBorders,null!=r&&(m.x-=r.x,m.y-=r.y,m.width+=r.width+r.x,m.height+=r.height+r.y),d.fitWindow(m))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();var m=d.pageFormat,r=d.pageScale;d.zoomTo(Math.floor(20*
+Math.min((d.container.clientWidth-10)/m.width/r,(d.container.clientHeight-10)/m.height/r))/20);mxUtils.hasScrollbars(d.container)&&(m=d.getPagePadding(),d.container.scrollTop=m.y*d.view.scale-1,d.container.scrollLeft=Math.min(m.x*d.view.scale,(d.container.scrollWidth-d.container.clientWidth)/2)-1)}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();var m=d.pageFormat,r=d.pageScale;d.zoomTo(Math.floor(20*Math.min((d.container.clientWidth-
+10)/(2*m.width)/r,(d.container.clientHeight-10)/m.height/r))/20);mxUtils.hasScrollbars(d.container)&&(m=d.getPagePadding(),d.container.scrollTop=Math.min(m.y,(d.container.scrollHeight-d.container.clientHeight)/2),d.container.scrollLeft=Math.min(m.x,(d.container.scrollWidth-d.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();d.zoomTo(Math.floor(20*(d.container.clientWidth-10)/d.pageFormat.width/
+d.pageScale)/20);if(mxUtils.hasScrollbars(d.container)){var m=d.getPagePadding();d.container.scrollLeft=Math.min(m.x*d.view.scale,(d.container.scrollWidth-d.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var m=new FilenameDialog(this.editorUi,parseInt(100*d.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(r){r=parseInt(r);!isNaN(r)&&0<r&&d.zoomTo(r/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(m.container,
+300,80,!0,!0);m.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var m=new FilenameDialog(this.editorUi,parseInt(100*d.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(r){r=parseInt(r);!isNaN(r)&&0<r&&(r=new ChangePageSetup(e,null,null,null,r/100),r.ignoreColor=!0,r.ignoreImage=!0,d.model.execute(r))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(m.container,300,80,!0,!0);m.init()}));var n=null;n=this.addAction("grid",
+function(){d.setGridEnabled(!d.isGridEnabled());d.defaultGridEnabled=d.isGridEnabled();e.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");n.setToggleAction(!0);n.setSelectedCallback(function(){return d.isGridEnabled()});n.setEnabled(!1);n=this.addAction("guides",function(){d.graphHandler.guidesEnabled=!d.graphHandler.guidesEnabled;e.fireEvent(new mxEventObject("guidesEnabledChanged"))});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.graphHandler.guidesEnabled});
+n.setEnabled(!1);n=this.addAction("tooltips",function(){d.tooltipHandler.setEnabled(!d.tooltipHandler.isEnabled());e.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.tooltipHandler.isEnabled()});n=this.addAction("collapseExpand",function(){var m=new ChangePageSetup(e);m.ignoreColor=!0;m.ignoreImage=!0;m.foldingEnabled=!d.foldingEnabled;d.model.execute(m)});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.foldingEnabled});
+n.isEnabled=k;n=this.addAction("scrollbars",function(){e.setScrollbars(!e.hasScrollbars())});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.scrollbars});n=this.addAction("pageView",mxUtils.bind(this,function(){e.setPageVisible(!d.pageVisible)}));n.setToggleAction(!0);n.setSelectedCallback(function(){return d.pageVisible});n=this.addAction("connectionArrows",function(){d.connectionArrowsEnabled=!d.connectionArrowsEnabled;e.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,
+null,"Alt+Shift+A");n.setToggleAction(!0);n.setSelectedCallback(function(){return d.connectionArrowsEnabled});n=this.addAction("connectionPoints",function(){d.setConnectable(!d.connectionHandler.isEnabled());e.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");n.setToggleAction(!0);n.setSelectedCallback(function(){return d.connectionHandler.isEnabled()});n=this.addAction("copyConnect",function(){d.connectionHandler.setCreateTarget(!d.connectionHandler.isCreateTarget());
+e.fireEvent(new mxEventObject("copyConnectChanged"))});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.connectionHandler.isCreateTarget()});n.isEnabled=k;n=this.addAction("autosave",function(){e.editor.setAutosave(!e.editor.autosave)});n.setToggleAction(!0);n.setSelectedCallback(function(){return e.editor.autosave});n.isEnabled=k;n.visible=!1;this.addAction("help",function(){var m="";mxResources.isLanguageSupported(mxClient.language)&&(m="_"+mxClient.language);d.openLink(RESOURCES_PATH+
+"/help"+m+".html")});var u=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){u||(e.showDialog((new AboutDialog(e)).container,320,280,!0,!0,function(){u=!1}),u=!0)}));n=mxUtils.bind(this,function(m,r,x,B){return this.addAction(m,function(){if(null!=x&&d.cellEditor.isContentEditing())x();else{d.stopEditing(!1);d.getModel().beginUpdate();try{var C=d.getEditableCells(d.getSelectionCells());d.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,r,C);(r&mxConstants.FONT_BOLD)==
+mxConstants.FONT_BOLD?d.updateLabelElements(C,function(J){J.style.fontWeight=null;"B"==J.nodeName&&d.replaceElement(J)}):(r&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?d.updateLabelElements(C,function(J){J.style.fontStyle=null;"I"==J.nodeName&&d.replaceElement(J)}):(r&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&d.updateLabelElements(C,function(J){J.style.textDecoration=null;"U"==J.nodeName&&d.replaceElement(J)});for(var F=0;F<C.length;F++)0==d.model.getChildCount(C[F])&&d.autoSizeCell(C[F],
+!1)}finally{d.getModel().endUpdate()}}},null,null,B)});n("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");n("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");n("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){e.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",
+function(){e.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){e.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});this.addAction("gradientColor...",function(){e.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});this.addAction("backgroundColor...",function(){e.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor")});this.addAction("borderColor...",function(){e.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR)});this.addAction("vertical",function(){e.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,
+!0)});this.addAction("shadow",function(){e.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,null),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("dashed",function(){d.getModel().beginUpdate();
+try{d.setCellStyles(mxConstants.STYLE_DASHED,"1"),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("dotted",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,"1"),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,"1 4"),e.fireEvent(new mxEventObject("styleChanged",
+"keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1","1 4"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("sharp",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),d.setCellStyles(mxConstants.STYLE_CURVED,"0"),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});
+this.addAction("rounded",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,"1"),d.setCellStyles(mxConstants.STYLE_CURVED,"0"),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!d.isSelectionEmpty()&&d.isEnabled()){d.getModel().beginUpdate();try{var m=d.getSelectionCells(),r=d.getCurrentCellStyle(m[0]),
+x="1"==mxUtils.getValue(r,mxConstants.STYLE_ROUNDED,"0")?"0":"1";d.setCellStyles(mxConstants.STYLE_ROUNDED,x);d.setCellStyles(mxConstants.STYLE_CURVED,null);e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[x,"0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}}});this.addAction("curved",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),d.setCellStyles(mxConstants.STYLE_CURVED,
+"1"),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("collapsible",function(){var m=d.view.getState(d.getSelectionCell()),r="1";null!=m&&null!=d.getFoldingImage(m)&&(r="0");d.setCellStyles("collapsible",r);e.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[r],"cells",d.getSelectionCells()))});this.addAction("editStyle...",
+mxUtils.bind(this,function(){var m=d.getEditableCells(d.getSelectionCells());if(null!=m&&0<m.length){var r=d.getModel();r=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",r.getStyle(m[0])||"",function(x){null!=x&&d.setCellStyle(mxUtils.trim(x),m)},null,null,400,220);this.editorUi.showDialog(r.container,420,300,!0,!0);r.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){d.isEnabled()&&!d.isSelectionEmpty()&&e.setDefaultStyle(d.getSelectionCell())},
+null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){d.isEnabled()&&e.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var m=d.getSelectionCell();if(null!=m&&d.getModel().isEdge(m)){var r=g.graph.selectionCellsHandler.getHandler(m);if(r instanceof mxEdgeHandler){var x=d.view.translate,B=d.view.scale,C=x.x;x=x.y;m=d.getModel().getParent(m);for(var F=d.getCellGeometry(m);d.getModel().isVertex(m)&&null!=F;)C+=F.x,x+=F.y,m=
+d.getModel().getParent(m),F=d.getCellGeometry(m);C=Math.round(d.snap(d.popupMenuHandler.triggerX/B-C));B=Math.round(d.snap(d.popupMenuHandler.triggerY/B-x));r.addPointAt(r.state,C,B)}}});this.addAction("removeWaypoint",function(){var m=e.actions.get("removeWaypoint");null!=m.handler&&m.handler.removePoint(m.handler.state,m.index)});this.addAction("clearWaypoints",function(m,r){m=null!=r?r:m;var x=d.getSelectionCells();if(null!=x){x=d.getEditableCells(d.addAllEdges(x));d.getModel().beginUpdate();try{for(var B=
+0;B<x.length;B++){var C=x[B];if(d.getModel().isEdge(C)){var F=d.getCellGeometry(C);null!=r&&mxEvent.isShiftDown(m)?(d.setCellStyles(mxConstants.STYLE_EXIT_X,null,[C]),d.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[C]),d.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[C]),d.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[C])):null!=F&&(F=F.clone(),F.points=null,F.x=0,F.y=0,F.offset=null,d.getModel().setGeometry(C,F))}}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+C");n=this.addAction("subscript",
+mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");n=this.addAction("superscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var m=mxResources.get("image")+" ("+mxResources.get("url")+"):",r=d.getView().getState(d.getSelectionCell()),
+x="",B=null;null!=r&&(x=r.style[mxConstants.STYLE_IMAGE]||x,B=r.style[mxConstants.STYLE_CLIP_PATH]||B);var C=d.cellEditor.saveSelection();e.showImageDialog(m,x,function(F,J,D,N,S,T){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(C),d.insertImage(F,J,D);else{var P=d.getSelectionCells();if(null!=F&&(0<F.length||0<P.length)){var Z=null;d.getModel().beginUpdate();try{if(0==P.length){P=[d.insertVertex(d.getDefaultParent(),null,"",0,0,J,D,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];
+var U=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry(P,!0));P[0].geometry.x=U.x;P[0].geometry.y=U.y;null!=N&&f(P[0],N,S,T,d);Z=P;d.fireEvent(new mxEventObject("cellsInserted","cells",Z))}d.setCellStyles(mxConstants.STYLE_IMAGE,0<F.length?F:null,P);var V=d.getCurrentCellStyle(P[0]);"image"!=V[mxConstants.STYLE_SHAPE]&&"label"!=V[mxConstants.STYLE_SHAPE]?d.setCellStyles(mxConstants.STYLE_SHAPE,"image",P):0==F.length&&d.setCellStyles(mxConstants.STYLE_SHAPE,null,P);if(1==d.getSelectionCount()&&
+null!=J&&null!=D){var aa=P[0],ia=d.getModel().getGeometry(aa);null!=ia&&(ia=ia.clone(),ia.width=J,ia.height=D,d.getModel().setGeometry(aa,ia));null!=N?f(aa,N,S,T,d):d.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,P)}}finally{d.getModel().endUpdate()}null!=Z&&(d.setSelectionCells(Z),d.scrollCellToVisible(Z[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing(),!0,B)}}).isEnabled=k;this.addAction("crop...",function(){var m=d.getSelectionCell();if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&
+null!=m){var r=d.getCurrentCellStyle(m),x=r[mxConstants.STYLE_IMAGE],B=r[mxConstants.STYLE_SHAPE];x&&"image"==B&&(r=new CropImageDialog(e,x,r[mxConstants.STYLE_CLIP_PATH],function(C,F,J){f(m,C,F,J,d)}),e.showDialog(r.container,300,390,!0,!0))}}).isEnabled=k;n=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",mxUtils.bind(this,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");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));n=this.addAction("formatPanel",mxUtils.bind(this,
+function(){e.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return 0<e.formatWidth}));n=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",mxUtils.bind(this,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");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var m=d.getSelectionCell();if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&null!=m){var r=new ConnectionPointsDialog(e,
+m);e.showDialog(r.container,350,450,!0,!1,function(){r.destroy()});r.init()}}).isEnabled=k};Actions.prototype.addAction=function(a,b,f,e,g){if("..."==a.substring(a.length-3)){a=a.substring(0,a.length-3);var d=mxResources.get(a)+"..."}else d=mxResources.get(a);return this.put(a,new Action(d,b,f,e,g))};Actions.prototype.put=function(a,b){return this.actions[a]=b};Actions.prototype.get=function(a){return this.actions[a]};
+function Action(a,b,f,e,g){mxEventSource.call(this);this.label=a;this.funct=this.createFunction(b);this.enabled=null!=f?f:!0;this.iconCls=e;this.shortcut=g;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(a){return a};Action.prototype.setEnabled=function(a){this.enabled!=a&&(this.enabled=a,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};
Action.prototype.setToggleAction=function(a){this.toggleAction=a};Action.prototype.setSelectedCallback=function(a){this.selectedCallback=a};Action.prototype.isSelected=function(){return this.selectedCallback()};Menus=function(a){this.editorUi=a;this.menus={};this.init();mxClient.IS_SVG||((new Image).src=this.checkmarkImage)};Menus.prototype.defaultFont="Helvetica";Menus.prototype.defaultFontSize="12";Menus.prototype.defaultMenuItems="file edit view arrange extras help".split(" ");Menus.prototype.defaultFonts="Helvetica;Verdana;Times New Roman;Garamond;Comic Sans MS;Courier New;Georgia;Lucida Console;Tahoma".split(";");
-Menus.prototype.init=function(){var a=this.editorUi,b=a.editor.graph,f=mxUtils.bind(b,b.isEnabled);this.customFonts=[];this.customFontSizes=[];this.put("fontFamily",new Menu(mxUtils.bind(this,function(d,g){for(var e=mxUtils.bind(this,function(n){this.styleChange(d,n,[mxConstants.STYLE_FONTFAMILY],[n],null,g,function(){document.execCommand("fontname",!1,n);a.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTFAMILY],"values",[n],"cells",[b.cellEditor.getEditingCell()]))},function(){b.updateLabelElements(b.getSelectionCells(),
-function(u){u.removeAttribute("face");u.style.fontFamily=null;"PRE"==u.nodeName&&b.replaceElement(u,"div")})}).firstChild.nextSibling.style.fontFamily=n}),k=0;k<this.defaultFonts.length;k++)e(this.defaultFonts[k]);d.addSeparator(g);if(0<this.customFonts.length){for(k=0;k<this.customFonts.length;k++)e(this.customFonts[k]);d.addSeparator(g);d.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){this.customFonts=[];this.editorUi.fireEvent(new mxEventObject("customFontsChanged"))}),g);d.addSeparator(g)}this.promptChange(d,
-mxResources.get("custom")+"...","",mxConstants.DEFAULT_FONTFAMILY,mxConstants.STYLE_FONTFAMILY,g,!0,mxUtils.bind(this,function(n){0>mxUtils.indexOf(this.customFonts,n)&&(this.customFonts.push(n),this.editorUi.fireEvent(new mxEventObject("customFontsChanged")))}))})));this.put("formatBlock",new Menu(mxUtils.bind(this,function(d,g){function e(k,n){return d.addItem(k,null,mxUtils.bind(this,function(){null!=b.cellEditor.textarea&&(b.cellEditor.textarea.focus(),document.execCommand("formatBlock",!1,"<"+
-n+">"))}),g)}e(mxResources.get("normal"),"p");e("","h1").firstChild.nextSibling.innerHTML='<h1 style="margin:0px;">'+mxResources.get("heading")+" 1</h1>";e("","h2").firstChild.nextSibling.innerHTML='<h2 style="margin:0px;">'+mxResources.get("heading")+" 2</h2>";e("","h3").firstChild.nextSibling.innerHTML='<h3 style="margin:0px;">'+mxResources.get("heading")+" 3</h3>";e("","h4").firstChild.nextSibling.innerHTML='<h4 style="margin:0px;">'+mxResources.get("heading")+" 4</h4>";e("","h5").firstChild.nextSibling.innerHTML=
-'<h5 style="margin:0px;">'+mxResources.get("heading")+" 5</h5>";e("","h6").firstChild.nextSibling.innerHTML='<h6 style="margin:0px;">'+mxResources.get("heading")+" 6</h6>";e("","pre").firstChild.nextSibling.innerHTML='<pre style="margin:0px;">'+mxResources.get("formatted")+"</pre>";e("","blockquote").firstChild.nextSibling.innerHTML='<blockquote style="margin-top:0px;margin-bottom:0px;">'+mxResources.get("blockquote")+"</blockquote>"})));this.put("fontSize",new Menu(mxUtils.bind(this,function(d,g){var e=
-[6,8,9,10,11,12,14,18,24,36,48,72];0>mxUtils.indexOf(e,this.defaultFontSize)&&(e.push(this.defaultFontSize),e.sort(function(x,B){return x-B}));for(var k=mxUtils.bind(this,function(x){if(null!=b.cellEditor.textarea){document.execCommand("fontSize",!1,"3");for(var B=b.cellEditor.textarea.getElementsByTagName("font"),C=0;C<B.length;C++)if("3"==B[C].getAttribute("size")){B[C].removeAttribute("size");B[C].style.fontSize=x+"px";break}a.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTSIZE],
-"values",[x],"cells",[b.cellEditor.getEditingCell()]))}}),n=mxUtils.bind(this,function(x){this.styleChange(d,x,[mxConstants.STYLE_FONTSIZE],[x],null,g,function(){k(x)})}),u=0;u<e.length;u++)n(e[u]);d.addSeparator(g);if(0<this.customFontSizes.length){var m=0;for(u=0;u<this.customFontSizes.length;u++)0>mxUtils.indexOf(e,this.customFontSizes[u])&&(n(this.customFontSizes[u]),m++);0<m&&d.addSeparator(g);d.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){this.customFontSizes=[]}),g);d.addSeparator(g)}var r=
-null;this.promptChange(d,mxResources.get("custom")+"...","("+mxResources.get("points")+")",this.defaultFontSize,mxConstants.STYLE_FONTSIZE,g,!0,mxUtils.bind(this,function(x){null!=r&&null!=b.cellEditor.textarea&&(b.cellEditor.textarea.focus(),b.cellEditor.restoreSelection(r));null!=x&&0<x.length&&(this.customFontSizes.push(x),k(x))}),null,function(){r=b.cellEditor.saveSelection();return!1})})));this.put("direction",new Menu(mxUtils.bind(this,function(d,g){d.addItem(mxResources.get("flipH"),null,function(){b.toggleCellStyles(mxConstants.STYLE_FLIPH,
-!1)},g);d.addItem(mxResources.get("flipV"),null,function(){b.toggleCellStyles(mxConstants.STYLE_FLIPV,!1)},g);this.addMenuItems(d,["-","rotation"],g)})));this.put("align",new Menu(mxUtils.bind(this,function(d,g){var e=1<this.editorUi.getSelectionState().vertices.length;d.addItem(mxResources.get("leftAlign"),null,function(){b.alignCells(mxConstants.ALIGN_LEFT)},g,null,e);d.addItem(mxResources.get("center"),null,function(){b.alignCells(mxConstants.ALIGN_CENTER)},g,null,e);d.addItem(mxResources.get("rightAlign"),
-null,function(){b.alignCells(mxConstants.ALIGN_RIGHT)},g,null,e);d.addSeparator(g);d.addItem(mxResources.get("topAlign"),null,function(){b.alignCells(mxConstants.ALIGN_TOP)},g,null,e);d.addItem(mxResources.get("middle"),null,function(){b.alignCells(mxConstants.ALIGN_MIDDLE)},g,null,e);d.addItem(mxResources.get("bottomAlign"),null,function(){b.alignCells(mxConstants.ALIGN_BOTTOM)},g,null,e);this.addMenuItems(d,["-","snapToGrid"],g)})));this.put("distribute",new Menu(mxUtils.bind(this,function(d,g){d.addItem(mxResources.get("horizontal"),
-null,function(){b.distributeCells(!0)},g);d.addItem(mxResources.get("vertical"),null,function(){b.distributeCells(!1)},g)})));this.put("line",new Menu(mxUtils.bind(this,function(d,g){var e=b.view.getState(b.getSelectionCell());null!=e&&(e=mxUtils.getValue(e.style,mxConstants.STYLE_SHAPE),"arrow"!=e&&(this.edgeStyleChange(d,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],"geIcon geSprite geSprite-straight",g,!0).setAttribute("title",mxResources.get("straight")),
-this.edgeStyleChange(d,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle",null,null],"geIcon geSprite geSprite-orthogonal",g,!0).setAttribute("title",mxResources.get("orthogonal")),this.edgeStyleChange(d,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalelbow",g,!0).setAttribute("title",mxResources.get("simple")),this.edgeStyleChange(d,
-"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalelbow",g,!0).setAttribute("title",mxResources.get("simple")),this.edgeStyleChange(d,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalisometric",g,!0).setAttribute("title",mxResources.get("isometric")),
-this.edgeStyleChange(d,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalisometric",g,!0).setAttribute("title",mxResources.get("isometric")),"connector"==e&&this.edgeStyleChange(d,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle","1",null],"geIcon geSprite geSprite-curved",g,!0).setAttribute("title",mxResources.get("curved")),
-this.edgeStyleChange(d,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["entityRelationEdgeStyle",null,null],"geIcon geSprite geSprite-entity",g,!0).setAttribute("title",mxResources.get("entityRelation"))),d.addSeparator(g),this.styleChange(d,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],[null,null,null,null],"geIcon geSprite geSprite-connection",g,!0,null,!0).setAttribute("title",mxResources.get("line")),this.styleChange(d,
-"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["link",null,null,null],"geIcon geSprite geSprite-linkedge",g,!0,null,!0).setAttribute("title",mxResources.get("link")),this.styleChange(d,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["flexArrow",null,null,null],"geIcon geSprite geSprite-arrow",g,!0,null,!0).setAttribute("title",mxResources.get("arrow")),this.styleChange(d,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,
-mxConstants.STYLE_ENDSIZE,"width"],["arrow",null,null,null],"geIcon geSprite geSprite-simplearrow",g,!0,null,!0).setAttribute("title",mxResources.get("simpleArrow")))})));this.put("layout",new Menu(mxUtils.bind(this,function(d,g){var e=mxUtils.bind(this,function(n,u){this.editorUi.prompt(mxResources.get("spacing"),n,u)}),k=mxUtils.bind(this,function(n){var u=b.getSelectionCell(),m=null;null==u||0==b.getModel().getChildCount(u)?0==b.getModel().getEdgeCount(u)&&(m=b.findTreeRoots(b.getDefaultParent())):
-m=b.findTreeRoots(u);null!=m&&0<m.length&&(u=m[0]);null!=u&&this.editorUi.executeLayout(function(){n.execute(b.getDefaultParent(),u);b.isSelectionEmpty()||(u=b.getModel().getParent(u),b.getModel().isVertex(u)&&b.updateGroupBounds([u],2*b.gridSize,!0))},!0)});d.addItem(mxResources.get("horizontalFlow"),null,mxUtils.bind(this,function(){var n=new mxHierarchicalLayout(b,mxConstants.DIRECTION_WEST);this.editorUi.executeLayout(function(){var u=b.getSelectionCells();n.execute(b.getDefaultParent(),0==u.length?
-null:u)},!0)}),g);d.addItem(mxResources.get("verticalFlow"),null,mxUtils.bind(this,function(){var n=new mxHierarchicalLayout(b,mxConstants.DIRECTION_NORTH);this.editorUi.executeLayout(function(){var u=b.getSelectionCells();n.execute(b.getDefaultParent(),0==u.length?null:u)},!0)}),g);d.addSeparator(g);d.addItem(mxResources.get("horizontalTree"),null,mxUtils.bind(this,function(){var n=new mxCompactTreeLayout(b,!0);n.edgeRouting=!1;n.levelDistance=30;e(n.levelDistance,mxUtils.bind(this,function(u){isNaN(u)||
-(n.levelDistance=u,k(n))}))}),g);d.addItem(mxResources.get("verticalTree"),null,mxUtils.bind(this,function(){var n=new mxCompactTreeLayout(b,!1);n.edgeRouting=!1;n.levelDistance=30;e(n.levelDistance,mxUtils.bind(this,function(u){isNaN(u)||(n.levelDistance=u,k(n))}))}),g);d.addItem(mxResources.get("radialTree"),null,mxUtils.bind(this,function(){var n=new mxRadialTreeLayout(b);n.levelDistance=80;n.autoRadius=!0;e(n.levelDistance,mxUtils.bind(this,function(u){isNaN(u)||(n.levelDistance=u,k(n))}))}),
-g);d.addSeparator(g);d.addItem(mxResources.get("organic"),null,mxUtils.bind(this,function(){var n=new mxFastOrganicLayout(b);e(n.forceConstant,mxUtils.bind(this,function(u){n.forceConstant=u;this.editorUi.executeLayout(function(){var m=b.getSelectionCell();if(null==m||0==b.getModel().getChildCount(m))m=b.getDefaultParent();n.execute(m);b.getModel().isVertex(m)&&b.updateGroupBounds([m],2*b.gridSize,!0)},!0)}))}),g);d.addItem(mxResources.get("circle"),null,mxUtils.bind(this,function(){var n=new mxCircleLayout(b);
-this.editorUi.executeLayout(function(){var u=b.getSelectionCell();if(null==u||0==b.getModel().getChildCount(u))u=b.getDefaultParent();n.execute(u);b.getModel().isVertex(u)&&b.updateGroupBounds([u],2*b.gridSize,!0)},!0)}),g)})));this.put("navigation",new Menu(mxUtils.bind(this,function(d,g){this.addMenuItems(d,"home - exitGroup enterGroup - expand collapse - collapsible".split(" "),g)})));this.put("arrange",new Menu(mxUtils.bind(this,function(d,g){this.addMenuItems(d,["toFront","toBack","bringForward",
-"sendBackward","-"],g);this.addSubmenu("direction",d,g);this.addMenuItems(d,["turn","-"],g);this.addSubmenu("align",d,g);this.addSubmenu("distribute",d,g);d.addSeparator(g);this.addSubmenu("navigation",d,g);this.addSubmenu("insert",d,g);this.addSubmenu("layout",d,g);this.addMenuItems(d,"- group ungroup removeFromGroup - clearWaypoints autosize".split(" "),g)}))).isEnabled=f;this.put("insert",new Menu(mxUtils.bind(this,function(d,g){this.addMenuItems(d,["insertLink","insertImage"],g)})));this.put("view",
-new Menu(mxUtils.bind(this,function(d,g){this.addMenuItems(d,(null!=this.editorUi.format?["formatPanel"]:[]).concat("outline layers - pageView pageScale - scrollbars tooltips - grid guides - connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),g))})));this.put("viewPanels",new Menu(mxUtils.bind(this,function(d,g){null!=this.editorUi.format&&this.addMenuItems(d,["formatPanel"],g);this.addMenuItems(d,["outline","layers"],g)})));this.put("viewZoom",new Menu(mxUtils.bind(this,function(d,
-g){this.addMenuItems(d,["resetView","-"],g);for(var e=[.25,.5,.75,1,1.25,1.5,2,3,4],k=0;k<e.length;k++)(function(n){d.addItem(100*n+"%",null,function(){b.zoomTo(n)},g)})(e[k]);this.addMenuItems(d,"- fitWindow fitPageWidth fitPage fitTwoPages - customZoom".split(" "),g)})));this.put("file",new Menu(mxUtils.bind(this,function(d,g){this.addMenuItems(d,"new open - save saveAs - import export - pageSetup print".split(" "),g)})));this.put("edit",new Menu(mxUtils.bind(this,function(d,g){this.addMenuItems(d,
-"undo redo - cut copy paste delete - duplicate - editData editTooltip - editStyle - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));this.put("extras",new Menu(mxUtils.bind(this,function(d,g){this.addMenuItems(d,["copyConnect","collapseExpand","-","editDiagram"])})));this.put("help",new Menu(mxUtils.bind(this,function(d,g){this.addMenuItems(d,["help","-","about"])})))};Menus.prototype.put=function(a,b){return this.menus[a]=b};
-Menus.prototype.get=function(a){return this.menus[a]};Menus.prototype.addSubmenu=function(a,b,f,d){var g=this.get(a);null!=g&&(g=g.isEnabled(),b.showDisabled||g)&&(f=b.addItem(d||mxResources.get(a),null,null,f,null,g),this.addMenu(a,b,f))};Menus.prototype.addMenu=function(a,b,f){var d=this.get(a);null!=d&&(b.showDisabled||d.isEnabled())&&this.get(a).execute(b,f)};
-Menus.prototype.addInsertTableCellItem=function(a,b){var f=this.editorUi.editor.graph,d=f.getSelectionCell(),g=f.getCurrentCellStyle(d);1<f.getSelectionCount()&&(f.isTableCell(d)&&(d=f.model.getParent(d)),f.isTableRow(d)&&(d=f.model.getParent(d)));var e=f.isTable(d)||f.isTableRow(d)||f.isTableCell(d),k=f.isStack(d)||f.isStackChild(d),n=e,u=e;k&&(g=f.isStack(d)?g:f.getCellStyle(f.model.getParent(d)),u="0"==g.horizontalStack,n=!u);null!=b||!e&&!k?this.addInsertTableItem(a,mxUtils.bind(this,function(m,
+Menus.prototype.init=function(){var a=this.editorUi,b=a.editor.graph,f=mxUtils.bind(b,b.isEnabled);this.customFonts=[];this.customFontSizes=[];this.put("fontFamily",new Menu(mxUtils.bind(this,function(e,g){for(var d=mxUtils.bind(this,function(n){this.styleChange(e,n,[mxConstants.STYLE_FONTFAMILY],[n],null,g,function(){document.execCommand("fontname",!1,n);a.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTFAMILY],"values",[n],"cells",[b.cellEditor.getEditingCell()]))},function(){b.updateLabelElements(b.getSelectionCells(),
+function(u){u.removeAttribute("face");u.style.fontFamily=null;"PRE"==u.nodeName&&b.replaceElement(u,"div")})}).firstChild.nextSibling.style.fontFamily=n}),k=0;k<this.defaultFonts.length;k++)d(this.defaultFonts[k]);e.addSeparator(g);if(0<this.customFonts.length){for(k=0;k<this.customFonts.length;k++)d(this.customFonts[k]);e.addSeparator(g);e.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){this.customFonts=[];this.editorUi.fireEvent(new mxEventObject("customFontsChanged"))}),g);e.addSeparator(g)}this.promptChange(e,
+mxResources.get("custom")+"...","",mxConstants.DEFAULT_FONTFAMILY,mxConstants.STYLE_FONTFAMILY,g,!0,mxUtils.bind(this,function(n){0>mxUtils.indexOf(this.customFonts,n)&&(this.customFonts.push(n),this.editorUi.fireEvent(new mxEventObject("customFontsChanged")))}))})));this.put("formatBlock",new Menu(mxUtils.bind(this,function(e,g){function d(k,n){return e.addItem(k,null,mxUtils.bind(this,function(){null!=b.cellEditor.textarea&&(b.cellEditor.textarea.focus(),document.execCommand("formatBlock",!1,"<"+
+n+">"))}),g)}d(mxResources.get("normal"),"p");d("","h1").firstChild.nextSibling.innerHTML='<h1 style="margin:0px;">'+mxResources.get("heading")+" 1</h1>";d("","h2").firstChild.nextSibling.innerHTML='<h2 style="margin:0px;">'+mxResources.get("heading")+" 2</h2>";d("","h3").firstChild.nextSibling.innerHTML='<h3 style="margin:0px;">'+mxResources.get("heading")+" 3</h3>";d("","h4").firstChild.nextSibling.innerHTML='<h4 style="margin:0px;">'+mxResources.get("heading")+" 4</h4>";d("","h5").firstChild.nextSibling.innerHTML=
+'<h5 style="margin:0px;">'+mxResources.get("heading")+" 5</h5>";d("","h6").firstChild.nextSibling.innerHTML='<h6 style="margin:0px;">'+mxResources.get("heading")+" 6</h6>";d("","pre").firstChild.nextSibling.innerHTML='<pre style="margin:0px;">'+mxResources.get("formatted")+"</pre>";d("","blockquote").firstChild.nextSibling.innerHTML='<blockquote style="margin-top:0px;margin-bottom:0px;">'+mxResources.get("blockquote")+"</blockquote>"})));this.put("fontSize",new Menu(mxUtils.bind(this,function(e,g){var d=
+[6,8,9,10,11,12,14,18,24,36,48,72];0>mxUtils.indexOf(d,this.defaultFontSize)&&(d.push(this.defaultFontSize),d.sort(function(x,B){return x-B}));for(var k=mxUtils.bind(this,function(x){if(null!=b.cellEditor.textarea){document.execCommand("fontSize",!1,"3");for(var B=b.cellEditor.textarea.getElementsByTagName("font"),C=0;C<B.length;C++)if("3"==B[C].getAttribute("size")){B[C].removeAttribute("size");B[C].style.fontSize=x+"px";break}a.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTSIZE],
+"values",[x],"cells",[b.cellEditor.getEditingCell()]))}}),n=mxUtils.bind(this,function(x){this.styleChange(e,x,[mxConstants.STYLE_FONTSIZE],[x],null,g,function(){k(x)})}),u=0;u<d.length;u++)n(d[u]);e.addSeparator(g);if(0<this.customFontSizes.length){var m=0;for(u=0;u<this.customFontSizes.length;u++)0>mxUtils.indexOf(d,this.customFontSizes[u])&&(n(this.customFontSizes[u]),m++);0<m&&e.addSeparator(g);e.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){this.customFontSizes=[]}),g);e.addSeparator(g)}var r=
+null;this.promptChange(e,mxResources.get("custom")+"...","("+mxResources.get("points")+")",this.defaultFontSize,mxConstants.STYLE_FONTSIZE,g,!0,mxUtils.bind(this,function(x){null!=r&&null!=b.cellEditor.textarea&&(b.cellEditor.textarea.focus(),b.cellEditor.restoreSelection(r));null!=x&&0<x.length&&(this.customFontSizes.push(x),k(x))}),null,function(){r=b.cellEditor.saveSelection();return!1})})));this.put("direction",new Menu(mxUtils.bind(this,function(e,g){e.addItem(mxResources.get("flipH"),null,function(){b.toggleCellStyles(mxConstants.STYLE_FLIPH,
+!1)},g);e.addItem(mxResources.get("flipV"),null,function(){b.toggleCellStyles(mxConstants.STYLE_FLIPV,!1)},g);this.addMenuItems(e,["-","rotation"],g)})));this.put("align",new Menu(mxUtils.bind(this,function(e,g){var d=1<this.editorUi.getSelectionState().vertices.length;e.addItem(mxResources.get("leftAlign"),null,function(){b.alignCells(mxConstants.ALIGN_LEFT)},g,null,d);e.addItem(mxResources.get("center"),null,function(){b.alignCells(mxConstants.ALIGN_CENTER)},g,null,d);e.addItem(mxResources.get("rightAlign"),
+null,function(){b.alignCells(mxConstants.ALIGN_RIGHT)},g,null,d);e.addSeparator(g);e.addItem(mxResources.get("topAlign"),null,function(){b.alignCells(mxConstants.ALIGN_TOP)},g,null,d);e.addItem(mxResources.get("middle"),null,function(){b.alignCells(mxConstants.ALIGN_MIDDLE)},g,null,d);e.addItem(mxResources.get("bottomAlign"),null,function(){b.alignCells(mxConstants.ALIGN_BOTTOM)},g,null,d);this.addMenuItems(e,["-","snapToGrid"],g)})));this.put("distribute",new Menu(mxUtils.bind(this,function(e,g){e.addItem(mxResources.get("horizontal"),
+null,function(){b.distributeCells(!0)},g);e.addItem(mxResources.get("vertical"),null,function(){b.distributeCells(!1)},g)})));this.put("line",new Menu(mxUtils.bind(this,function(e,g){var d=b.view.getState(b.getSelectionCell());null!=d&&(d=mxUtils.getValue(d.style,mxConstants.STYLE_SHAPE),"arrow"!=d&&(this.edgeStyleChange(e,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],"geIcon geSprite geSprite-straight",g,!0).setAttribute("title",mxResources.get("straight")),
+this.edgeStyleChange(e,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle",null,null],"geIcon geSprite geSprite-orthogonal",g,!0).setAttribute("title",mxResources.get("orthogonal")),this.edgeStyleChange(e,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalelbow",g,!0).setAttribute("title",mxResources.get("simple")),this.edgeStyleChange(e,
+"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalelbow",g,!0).setAttribute("title",mxResources.get("simple")),this.edgeStyleChange(e,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalisometric",g,!0).setAttribute("title",mxResources.get("isometric")),
+this.edgeStyleChange(e,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalisometric",g,!0).setAttribute("title",mxResources.get("isometric")),"connector"==d&&this.edgeStyleChange(e,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle","1",null],"geIcon geSprite geSprite-curved",g,!0).setAttribute("title",mxResources.get("curved")),
+this.edgeStyleChange(e,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["entityRelationEdgeStyle",null,null],"geIcon geSprite geSprite-entity",g,!0).setAttribute("title",mxResources.get("entityRelation"))),e.addSeparator(g),this.styleChange(e,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],[null,null,null,null],"geIcon geSprite geSprite-connection",g,!0,null,!0).setAttribute("title",mxResources.get("line")),this.styleChange(e,
+"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["link",null,null,null],"geIcon geSprite geSprite-linkedge",g,!0,null,!0).setAttribute("title",mxResources.get("link")),this.styleChange(e,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["flexArrow",null,null,null],"geIcon geSprite geSprite-arrow",g,!0,null,!0).setAttribute("title",mxResources.get("arrow")),this.styleChange(e,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,
+mxConstants.STYLE_ENDSIZE,"width"],["arrow",null,null,null],"geIcon geSprite geSprite-simplearrow",g,!0,null,!0).setAttribute("title",mxResources.get("simpleArrow")))})));this.put("layout",new Menu(mxUtils.bind(this,function(e,g){var d=mxUtils.bind(this,function(n,u){this.editorUi.prompt(mxResources.get("spacing"),n,u)}),k=mxUtils.bind(this,function(n){var u=b.getSelectionCell(),m=null;null==u||0==b.getModel().getChildCount(u)?0==b.getModel().getEdgeCount(u)&&(m=b.findTreeRoots(b.getDefaultParent())):
+m=b.findTreeRoots(u);null!=m&&0<m.length&&(u=m[0]);null!=u&&this.editorUi.executeLayout(function(){n.execute(b.getDefaultParent(),u);b.isSelectionEmpty()||(u=b.getModel().getParent(u),b.getModel().isVertex(u)&&b.updateGroupBounds([u],2*b.gridSize,!0))},!0)});e.addItem(mxResources.get("horizontalFlow"),null,mxUtils.bind(this,function(){var n=new mxHierarchicalLayout(b,mxConstants.DIRECTION_WEST);this.editorUi.executeLayout(function(){var u=b.getSelectionCells();n.execute(b.getDefaultParent(),0==u.length?
+null:u)},!0)}),g);e.addItem(mxResources.get("verticalFlow"),null,mxUtils.bind(this,function(){var n=new mxHierarchicalLayout(b,mxConstants.DIRECTION_NORTH);this.editorUi.executeLayout(function(){var u=b.getSelectionCells();n.execute(b.getDefaultParent(),0==u.length?null:u)},!0)}),g);e.addSeparator(g);e.addItem(mxResources.get("horizontalTree"),null,mxUtils.bind(this,function(){var n=new mxCompactTreeLayout(b,!0);n.edgeRouting=!1;n.levelDistance=30;d(n.levelDistance,mxUtils.bind(this,function(u){isNaN(u)||
+(n.levelDistance=u,k(n))}))}),g);e.addItem(mxResources.get("verticalTree"),null,mxUtils.bind(this,function(){var n=new mxCompactTreeLayout(b,!1);n.edgeRouting=!1;n.levelDistance=30;d(n.levelDistance,mxUtils.bind(this,function(u){isNaN(u)||(n.levelDistance=u,k(n))}))}),g);e.addItem(mxResources.get("radialTree"),null,mxUtils.bind(this,function(){var n=new mxRadialTreeLayout(b);n.levelDistance=80;n.autoRadius=!0;d(n.levelDistance,mxUtils.bind(this,function(u){isNaN(u)||(n.levelDistance=u,k(n))}))}),
+g);e.addSeparator(g);e.addItem(mxResources.get("organic"),null,mxUtils.bind(this,function(){var n=new mxFastOrganicLayout(b);d(n.forceConstant,mxUtils.bind(this,function(u){n.forceConstant=u;this.editorUi.executeLayout(function(){var m=b.getSelectionCell();if(null==m||0==b.getModel().getChildCount(m))m=b.getDefaultParent();n.execute(m);b.getModel().isVertex(m)&&b.updateGroupBounds([m],2*b.gridSize,!0)},!0)}))}),g);e.addItem(mxResources.get("circle"),null,mxUtils.bind(this,function(){var n=new mxCircleLayout(b);
+this.editorUi.executeLayout(function(){var u=b.getSelectionCell();if(null==u||0==b.getModel().getChildCount(u))u=b.getDefaultParent();n.execute(u);b.getModel().isVertex(u)&&b.updateGroupBounds([u],2*b.gridSize,!0)},!0)}),g)})));this.put("navigation",new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,"home - exitGroup enterGroup - expand collapse - collapsible".split(" "),g)})));this.put("arrange",new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,["toFront","toBack","bringForward",
+"sendBackward","-"],g);this.addSubmenu("direction",e,g);this.addMenuItems(e,["turn","-"],g);this.addSubmenu("align",e,g);this.addSubmenu("distribute",e,g);e.addSeparator(g);this.addSubmenu("navigation",e,g);this.addSubmenu("insert",e,g);this.addSubmenu("layout",e,g);this.addMenuItems(e,"- group ungroup removeFromGroup - clearWaypoints autosize".split(" "),g)}))).isEnabled=f;this.put("insert",new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,["insertLink","insertImage"],g)})));this.put("view",
+new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,(null!=this.editorUi.format?["formatPanel"]:[]).concat("outline layers - pageView pageScale - scrollbars tooltips - grid guides - connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),g))})));this.put("viewPanels",new Menu(mxUtils.bind(this,function(e,g){null!=this.editorUi.format&&this.addMenuItems(e,["formatPanel"],g);this.addMenuItems(e,["outline","layers"],g)})));this.put("viewZoom",new Menu(mxUtils.bind(this,function(e,
+g){this.addMenuItems(e,["resetView","-"],g);for(var d=[.25,.5,.75,1,1.25,1.5,2,3,4],k=0;k<d.length;k++)(function(n){e.addItem(100*n+"%",null,function(){b.zoomTo(n)},g)})(d[k]);this.addMenuItems(e,"- fitWindow fitPageWidth fitPage fitTwoPages - customZoom".split(" "),g)})));this.put("file",new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,"new open - save saveAs - import export - pageSetup print".split(" "),g)})));this.put("edit",new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,
+"undo redo - cut copy paste delete - duplicate - editData editTooltip - editStyle - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));this.put("extras",new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,["copyConnect","collapseExpand","-","editDiagram"])})));this.put("help",new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,["help","-","about"])})))};Menus.prototype.put=function(a,b){return this.menus[a]=b};
+Menus.prototype.get=function(a){return this.menus[a]};Menus.prototype.addSubmenu=function(a,b,f,e){var g=this.get(a);null!=g&&(g=g.isEnabled(),b.showDisabled||g)&&(f=b.addItem(e||mxResources.get(a),null,null,f,null,g),this.addMenu(a,b,f))};Menus.prototype.addMenu=function(a,b,f){var e=this.get(a);null!=e&&(b.showDisabled||e.isEnabled())&&this.get(a).execute(b,f)};
+Menus.prototype.addInsertTableCellItem=function(a,b){var f=this.editorUi.editor.graph,e=f.getSelectionCell(),g=f.getCurrentCellStyle(e);1<f.getSelectionCount()&&(f.isTableCell(e)&&(e=f.model.getParent(e)),f.isTableRow(e)&&(e=f.model.getParent(e)));var d=f.isTable(e)||f.isTableRow(e)||f.isTableCell(e),k=f.isStack(e)||f.isStackChild(e),n=d,u=d;k&&(g=f.isStack(e)?g:f.getCellStyle(f.model.getParent(e)),u="0"==g.horizontalStack,n=!u);null!=b||!d&&!k?this.addInsertTableItem(a,mxUtils.bind(this,function(m,
r,x,B,C){r=C||mxEvent.isControlDown(m)||mxEvent.isMetaDown(m)?f.createCrossFunctionalSwimlane(r,x,null,null,B||mxEvent.isShiftDown(m)?"Cross-Functional Flowchart":null):f.createTable(r,x,null,null,B||mxEvent.isShiftDown(m)?"Table":null);m=mxEvent.isAltDown(m)?f.getFreeInsertPoint():f.getCenterInsertPoint(f.getBoundingBoxFromGeometry([r],!0));x=null;f.getModel().beginUpdate();try{x=f.importCells([r],m.x,m.y),f.fireEvent(new mxEventObject("cellsInserted","cells",f.model.getDescendants(x[0])))}finally{f.getModel().endUpdate()}null!=
-x&&0<x.length&&(f.scrollCellToVisible(x[0]),f.setSelectionCells(x))}),b):(n&&(b=a.addItem(mxResources.get("insertColumnBefore"),null,mxUtils.bind(this,function(){try{k?f.insertLane(d,!0):f.insertTableColumn(d,!0)}catch(m){this.editorUi.handleError(m)}}),null,"geIcon geSprite geSprite-insertcolumnbefore"),b.setAttribute("title",mxResources.get("insertColumnBefore")),b=a.addItem(mxResources.get("insertColumnAfter"),null,mxUtils.bind(this,function(){try{k?f.insertLane(d,!1):f.insertTableColumn(d,!1)}catch(m){this.editorUi.handleError(m)}}),
-null,"geIcon geSprite geSprite-insertcolumnafter"),b.setAttribute("title",mxResources.get("insertColumnAfter")),b=a.addItem(mxResources.get("deleteColumn"),null,mxUtils.bind(this,function(){if(null!=d)try{k?f.deleteLane(d):f.deleteTableColumn(d)}catch(m){this.editorUi.handleError(m)}}),null,"geIcon geSprite geSprite-deletecolumn"),b.setAttribute("title",mxResources.get("deleteColumn"))),u&&(b=a.addItem(mxResources.get("insertRowBefore"),null,mxUtils.bind(this,function(){try{k?f.insertLane(d,!0):f.insertTableRow(d,
-!0)}catch(m){this.editorUi.handleError(m)}}),null,"geIcon geSprite geSprite-insertrowbefore"),b.setAttribute("title",mxResources.get("insertRowBefore")),b=a.addItem(mxResources.get("insertRowAfter"),null,mxUtils.bind(this,function(){try{k?f.insertLane(d,!1):f.insertTableRow(d,!1)}catch(m){this.editorUi.handleError(m)}}),null,"geIcon geSprite geSprite-insertrowafter"),b.setAttribute("title",mxResources.get("insertRowAfter")),b=a.addItem(mxResources.get("deleteRow"),null,mxUtils.bind(this,function(){try{k?
-f.deleteLane(d):f.deleteTableRow(d)}catch(m){this.editorUi.handleError(m)}}),null,"geIcon geSprite geSprite-deleterow"),b.setAttribute("title",mxResources.get("deleteRow")),u=this.editorUi.getSelectionState(),null!=u.mergeCell?this.addMenuItem(a,"mergeCells"):(1<u.style.colspan||1<u.style.rowspan)&&this.addMenuItem(a,"unmergeCells")))};
-Menus.prototype.addInsertTableItem=function(a,b,f,d){function g(C){n=e.getParentByName(mxEvent.getSource(C),"TD");var G=!1;if(null!=n){k=e.getParentByName(n,"TR");var J=mxEvent.isMouseEvent(C)?2:4,D=x,N=Math.min(20,k.sectionRowIndex+J);J=Math.min(20,n.cellIndex+J);for(var Q=D.rows.length;Q<N;Q++)for(var R=D.insertRow(Q),P=0;P<D.rows[0].cells.length;P++)R.insertCell(-1);for(Q=0;Q<D.rows.length;Q++)for(R=D.rows[Q],P=R.cells.length;P<J;P++)R.insertCell(-1);B.innerHTML=n.cellIndex+1+"x"+(k.sectionRowIndex+
-1);for(D=0;D<x.rows.length;D++)for(N=x.rows[D],J=0;J<N.cells.length;J++)Q=N.cells[J],D==k.sectionRowIndex&&J==n.cellIndex&&(G="blue"==Q.style.backgroundColor),Q.style.backgroundColor=D<=k.sectionRowIndex&&J<=n.cellIndex?"blue":"transparent"}mxEvent.consume(C);return G}d=null!=d?d:!0;b=null!=b?b:mxUtils.bind(this,function(C,G,J){var D=this.editorUi.editor.graph;C=D.getParentByName(mxEvent.getSource(C),"TD");if(null!=C&&null!=D.cellEditor.textarea){D.getParentByName(C,"TR");var N=D.cellEditor.textarea.getElementsByTagName("table");
-C=[];for(var Q=0;Q<N.length;Q++)C.push(N[Q]);D.container.focus();Q=D.pasteHtmlAtCaret;N=["<table>"];for(var R=0;R<G;R++){N.push("<tr>");for(var P=0;P<J;P++)N.push("<td><br></td>");N.push("</tr>")}N.push("</table>");G=N.join("");Q.call(D,G);G=D.cellEditor.textarea.getElementsByTagName("table");if(G.length==C.length+1)for(Q=G.length-1;0<=Q;Q--)if(0==Q||G[Q]!=C[Q-1]){D.selectNode(G[Q].rows[0].cells[0]);break}}});var e=this.editorUi.editor.graph,k=null,n=null;null==f&&(a.div.className+=" geToolbarMenu",
+x&&0<x.length&&(f.scrollCellToVisible(x[0]),f.setSelectionCells(x))}),b):(n&&(b=a.addItem(mxResources.get("insertColumnBefore"),null,mxUtils.bind(this,function(){try{k?f.insertLane(e,!0):f.insertTableColumn(e,!0)}catch(m){this.editorUi.handleError(m)}}),null,"geIcon geSprite geSprite-insertcolumnbefore"),b.setAttribute("title",mxResources.get("insertColumnBefore")),b=a.addItem(mxResources.get("insertColumnAfter"),null,mxUtils.bind(this,function(){try{k?f.insertLane(e,!1):f.insertTableColumn(e,!1)}catch(m){this.editorUi.handleError(m)}}),
+null,"geIcon geSprite geSprite-insertcolumnafter"),b.setAttribute("title",mxResources.get("insertColumnAfter")),b=a.addItem(mxResources.get("deleteColumn"),null,mxUtils.bind(this,function(){if(null!=e)try{k?f.deleteLane(e):f.deleteTableColumn(e)}catch(m){this.editorUi.handleError(m)}}),null,"geIcon geSprite geSprite-deletecolumn"),b.setAttribute("title",mxResources.get("deleteColumn"))),u&&(b=a.addItem(mxResources.get("insertRowBefore"),null,mxUtils.bind(this,function(){try{k?f.insertLane(e,!0):f.insertTableRow(e,
+!0)}catch(m){this.editorUi.handleError(m)}}),null,"geIcon geSprite geSprite-insertrowbefore"),b.setAttribute("title",mxResources.get("insertRowBefore")),b=a.addItem(mxResources.get("insertRowAfter"),null,mxUtils.bind(this,function(){try{k?f.insertLane(e,!1):f.insertTableRow(e,!1)}catch(m){this.editorUi.handleError(m)}}),null,"geIcon geSprite geSprite-insertrowafter"),b.setAttribute("title",mxResources.get("insertRowAfter")),b=a.addItem(mxResources.get("deleteRow"),null,mxUtils.bind(this,function(){try{k?
+f.deleteLane(e):f.deleteTableRow(e)}catch(m){this.editorUi.handleError(m)}}),null,"geIcon geSprite geSprite-deleterow"),b.setAttribute("title",mxResources.get("deleteRow")),u=this.editorUi.getSelectionState(),null!=u.mergeCell?this.addMenuItem(a,"mergeCells"):(1<u.style.colspan||1<u.style.rowspan)&&this.addMenuItem(a,"unmergeCells")))};
+Menus.prototype.addInsertTableItem=function(a,b,f,e){function g(C){n=d.getParentByName(mxEvent.getSource(C),"TD");var F=!1;if(null!=n){k=d.getParentByName(n,"TR");var J=mxEvent.isMouseEvent(C)?2:4,D=x,N=Math.min(20,k.sectionRowIndex+J);J=Math.min(20,n.cellIndex+J);for(var S=D.rows.length;S<N;S++)for(var T=D.insertRow(S),P=0;P<D.rows[0].cells.length;P++)T.insertCell(-1);for(S=0;S<D.rows.length;S++)for(T=D.rows[S],P=T.cells.length;P<J;P++)T.insertCell(-1);B.innerHTML=n.cellIndex+1+"x"+(k.sectionRowIndex+
+1);for(D=0;D<x.rows.length;D++)for(N=x.rows[D],J=0;J<N.cells.length;J++)S=N.cells[J],D==k.sectionRowIndex&&J==n.cellIndex&&(F="blue"==S.style.backgroundColor),S.style.backgroundColor=D<=k.sectionRowIndex&&J<=n.cellIndex?"blue":"transparent"}mxEvent.consume(C);return F}e=null!=e?e:!0;b=null!=b?b:mxUtils.bind(this,function(C,F,J){var D=this.editorUi.editor.graph;C=D.getParentByName(mxEvent.getSource(C),"TD");if(null!=C&&null!=D.cellEditor.textarea){D.getParentByName(C,"TR");var N=D.cellEditor.textarea.getElementsByTagName("table");
+C=[];for(var S=0;S<N.length;S++)C.push(N[S]);D.container.focus();S=D.pasteHtmlAtCaret;N=["<table>"];for(var T=0;T<F;T++){N.push("<tr>");for(var P=0;P<J;P++)N.push("<td><br></td>");N.push("</tr>")}N.push("</table>");F=N.join("");S.call(D,F);F=D.cellEditor.textarea.getElementsByTagName("table");if(F.length==C.length+1)for(S=F.length-1;0<=S;S--)if(0==S||F[S]!=C[S-1]){D.selectNode(F[S].rows[0].cells[0]);break}}});var d=this.editorUi.editor.graph,k=null,n=null;null==f&&(a.div.className+=" geToolbarMenu",
a.labels=!1);a=a.addItem("",null,null,f,null,null,null,!0);a.firstChild.style.fontSize=Menus.prototype.defaultFontSize+"px";a.firstChild.innerText="";var u=document.createElement("input");u.setAttribute("id","geTitleOption");u.setAttribute("type","checkbox");f=document.createElement("label");mxUtils.write(f,mxResources.get("title"));f.setAttribute("for","geTitleOption");mxEvent.addGestureListeners(f,null,null,mxUtils.bind(this,function(C){mxEvent.consume(C)}));mxEvent.addGestureListeners(u,null,null,
-mxUtils.bind(this,function(C){mxEvent.consume(C)}));var m=document.createElement("input");m.setAttribute("id","geContainerOption");m.setAttribute("type","checkbox");var r=document.createElement("label");mxUtils.write(r,mxResources.get("container"));r.setAttribute("for","geContainerOption");mxEvent.addGestureListeners(r,null,null,mxUtils.bind(this,function(C){mxEvent.consume(C)}));mxEvent.addGestureListeners(m,null,null,mxUtils.bind(this,function(C){mxEvent.consume(C)}));d&&(a.firstChild.appendChild(u),
-a.firstChild.appendChild(f),mxUtils.br(a.firstChild),a.firstChild.appendChild(m),a.firstChild.appendChild(r),mxUtils.br(a.firstChild),mxUtils.br(a.firstChild));var x=function(C,G){var J=document.createElement("table");J.setAttribute("border","1");J.style.borderCollapse="collapse";J.style.borderStyle="solid";J.setAttribute("cellPadding","8");for(var D=0;D<C;D++)for(var N=J.insertRow(D),Q=0;Q<G;Q++)N.insertCell(-1);return J}(5,5);a.firstChild.appendChild(x);var B=document.createElement("div");B.style.padding=
-"4px";B.innerHTML="1x1";a.firstChild.appendChild(B);mxEvent.addGestureListeners(x,null,null,mxUtils.bind(this,function(C){var G=g(C);null!=n&&null!=k&&G&&(b(C,k.sectionRowIndex+1,n.cellIndex+1,u.checked,m.checked),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0))}));mxEvent.addListener(x,"mouseover",g)};
-Menus.prototype.edgeStyleChange=function(a,b,f,d,g,e,k,n){return this.showIconOnly(a.addItem(b,n,mxUtils.bind(this,function(){var u=this.editorUi.editor.graph;u.stopEditing(!1);u.getModel().beginUpdate();try{for(var m=u.getSelectionCells(),r=[],x=0;x<m.length;x++){var B=m[x];if(u.getModel().isEdge(B)){if(k){var C=u.getCellGeometry(B);null!=C&&(C=C.clone(),C.points=null,u.getModel().setGeometry(B,C))}for(var G=0;G<f.length;G++)u.setCellStyles(f[G],d[G],[B]);r.push(B)}}this.editorUi.fireEvent(new mxEventObject("styleChanged",
-"keys",f,"values",d,"cells",r))}finally{u.getModel().endUpdate()}}),e,g))};Menus.prototype.showIconOnly=function(a){var b=a.getElementsByTagName("td");for(i=0;i<b.length;i++)"mxPopupMenuItem"==b[i].getAttribute("class")&&(b[i].style.display="none");return a};
-Menus.prototype.styleChange=function(a,b,f,d,g,e,k,n,u){var m=this.createStyleChangeFunction(f,d);a=a.addItem(b,null,mxUtils.bind(this,function(){var r=this.editorUi.editor.graph;null!=k&&r.cellEditor.isContentEditing()?k():m(n)}),e,g);u&&this.showIconOnly(a);return a};
-Menus.prototype.createStyleChangeFunction=function(a,b){return mxUtils.bind(this,function(f){var d=this.editorUi.editor.graph;d.stopEditing(!1);d.getModel().beginUpdate();try{for(var g=d.getEditableCells(d.getSelectionCells()),e=!1,k=0;k<a.length;k++)if(d.setCellStyles(a[k],b[k],g),a[k]==mxConstants.STYLE_ALIGN&&d.updateLabelElements(g,function(n){n.removeAttribute("align");n.style.textAlign=null}),a[k]==mxConstants.STYLE_FONTFAMILY||"fontSource"==a[k])e=!0;if(e)for(e=0;e<g.length;e++)0==d.model.getChildCount(g[e])&&
-d.autoSizeCell(g[e],!1);null!=f&&f();this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",a,"values",b,"cells",g))}finally{d.getModel().endUpdate()}})};
-Menus.prototype.promptChange=function(a,b,f,d,g,e,k,n,u,m){return a.addItem(b,null,mxUtils.bind(this,function(){var r=this.editorUi.editor.graph,x=d,B=r.getView().getState(r.getSelectionCell());null!=B&&(x=B.style[g]||x);var C=null!=m?m():!0;x=new FilenameDialog(this.editorUi,x,mxResources.get("apply"),mxUtils.bind(this,function(G){if(null!=G&&0<G.length){if(C){r.getModel().beginUpdate();try{r.stopEditing(!1),r.setCellStyles(g,G)}finally{r.getModel().endUpdate()}}null!=n&&n(G)}}),mxResources.get("enterValue")+
-(0<f.length?" "+f:""),null,null,null,null,function(){null!=n&&null!=m&&n(null)});this.editorUi.showDialog(x.container,300,80,!0,!0);x.init()}),e,u,k)};
-Menus.prototype.pickColor=function(a,b,f){var d=this.editorUi,g=d.editor.graph,e=226+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));if(null!=b&&g.cellEditor.isContentEditing()){var k=g.cellEditor.saveSelection();a=new ColorDialog(this.editorUi,f||g.shapeForegroundColor,mxUtils.bind(this,function(u){g.cellEditor.restoreSelection(k);document.execCommand(b,!1,u!=mxConstants.NONE?u:"transparent");var m={forecolor:mxConstants.STYLE_FONTCOLOR,
-backcolor:mxConstants.STYLE_LABEL_BACKGROUNDCOLOR}[b];null!=m&&d.fireEvent(new mxEventObject("styleChanged","keys",[m],"values",[u],"cells",[g.cellEditor.getEditingCell()]))}),function(){g.cellEditor.restoreSelection(k)});this.editorUi.showDialog(a.container,230,e,!0,!0);a.init()}else{null==this.colorDialog&&(this.colorDialog=new ColorDialog(this.editorUi));this.colorDialog.currentColorKey=a;f=g.getView().getState(g.getSelectionCell());var n=mxConstants.NONE;null!=f&&(n=f.style[a]||n);n==mxConstants.NONE?
-(n=g.shapeBackgroundColor.substring(1),this.colorDialog.picker.fromString(n),this.colorDialog.colorInput.value=mxConstants.NONE):this.colorDialog.picker.fromString(mxUtils.rgba2hex(n));this.editorUi.showDialog(this.colorDialog.container,230,e,!0,!0);this.colorDialog.init()}};Menus.prototype.toggleStyle=function(a,b){var f=this.editorUi.editor.graph;b=f.toggleCellStyles(a,b);this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",[a],"values",[b],"cells",f.getSelectionCells()))};
-Menus.prototype.addMenuItem=function(a,b,f,d,g,e){var k=this.editorUi.actions.get(b);return null!=k&&(a.showDisabled||k.isEnabled())&&k.visible?(b=a.addItem(e||k.label,null,function(n){k.funct(d,n)},f,g,k.isEnabled()),k.toggleAction&&k.isSelected()&&a.addCheckmark(b,Editor.checkmarkImage),this.addShortcut(b,k),b):null};
-Menus.prototype.addShortcut=function(a,b){if(null!=b.shortcut){a=a.firstChild.nextSibling.nextSibling;var f=document.createElement("span");f.style.color="gray";mxUtils.write(f,b.shortcut);a.appendChild(f)}};Menus.prototype.addMenuItems=function(a,b,f,d,g){for(var e=0;e<b.length;e++)"-"==b[e]?a.addSeparator(f):this.addMenuItem(a,b[e],f,d,null!=g?g[e]:null)};
+mxUtils.bind(this,function(C){mxEvent.consume(C)}));var m=document.createElement("input");m.setAttribute("id","geContainerOption");m.setAttribute("type","checkbox");var r=document.createElement("label");mxUtils.write(r,mxResources.get("container"));r.setAttribute("for","geContainerOption");mxEvent.addGestureListeners(r,null,null,mxUtils.bind(this,function(C){mxEvent.consume(C)}));mxEvent.addGestureListeners(m,null,null,mxUtils.bind(this,function(C){mxEvent.consume(C)}));e&&(a.firstChild.appendChild(u),
+a.firstChild.appendChild(f),mxUtils.br(a.firstChild),a.firstChild.appendChild(m),a.firstChild.appendChild(r),mxUtils.br(a.firstChild),mxUtils.br(a.firstChild));var x=function(C,F){var J=document.createElement("table");J.setAttribute("border","1");J.style.borderCollapse="collapse";J.style.borderStyle="solid";J.setAttribute("cellPadding","8");for(var D=0;D<C;D++)for(var N=J.insertRow(D),S=0;S<F;S++)N.insertCell(-1);return J}(5,5);a.firstChild.appendChild(x);var B=document.createElement("div");B.style.padding=
+"4px";B.innerHTML="1x1";a.firstChild.appendChild(B);mxEvent.addGestureListeners(x,null,null,mxUtils.bind(this,function(C){var F=g(C);null!=n&&null!=k&&F&&(b(C,k.sectionRowIndex+1,n.cellIndex+1,u.checked,m.checked),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0))}));mxEvent.addListener(x,"mouseover",g)};
+Menus.prototype.edgeStyleChange=function(a,b,f,e,g,d,k,n){return this.showIconOnly(a.addItem(b,n,mxUtils.bind(this,function(){var u=this.editorUi.editor.graph;u.stopEditing(!1);u.getModel().beginUpdate();try{for(var m=u.getSelectionCells(),r=[],x=0;x<m.length;x++){var B=m[x];if(u.getModel().isEdge(B)){if(k){var C=u.getCellGeometry(B);null!=C&&(C=C.clone(),C.points=null,u.getModel().setGeometry(B,C))}for(var F=0;F<f.length;F++)u.setCellStyles(f[F],e[F],[B]);r.push(B)}}this.editorUi.fireEvent(new mxEventObject("styleChanged",
+"keys",f,"values",e,"cells",r))}finally{u.getModel().endUpdate()}}),d,g))};Menus.prototype.showIconOnly=function(a){var b=a.getElementsByTagName("td");for(i=0;i<b.length;i++)"mxPopupMenuItem"==b[i].getAttribute("class")&&(b[i].style.display="none");return a};
+Menus.prototype.styleChange=function(a,b,f,e,g,d,k,n,u){var m=this.createStyleChangeFunction(f,e);a=a.addItem(b,null,mxUtils.bind(this,function(){var r=this.editorUi.editor.graph;null!=k&&r.cellEditor.isContentEditing()?k():m(n)}),d,g);u&&this.showIconOnly(a);return a};
+Menus.prototype.createStyleChangeFunction=function(a,b){return mxUtils.bind(this,function(f){var e=this.editorUi.editor.graph;e.stopEditing(!1);e.getModel().beginUpdate();try{for(var g=e.getEditableCells(e.getSelectionCells()),d=!1,k=0;k<a.length;k++)if(e.setCellStyles(a[k],b[k],g),a[k]==mxConstants.STYLE_ALIGN&&e.updateLabelElements(g,function(n){n.removeAttribute("align");n.style.textAlign=null}),a[k]==mxConstants.STYLE_FONTFAMILY||"fontSource"==a[k])d=!0;if(d)for(d=0;d<g.length;d++)0==e.model.getChildCount(g[d])&&
+e.autoSizeCell(g[d],!1);null!=f&&f();this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",a,"values",b,"cells",g))}finally{e.getModel().endUpdate()}})};
+Menus.prototype.promptChange=function(a,b,f,e,g,d,k,n,u,m){return a.addItem(b,null,mxUtils.bind(this,function(){var r=this.editorUi.editor.graph,x=e,B=r.getView().getState(r.getSelectionCell());null!=B&&(x=B.style[g]||x);var C=null!=m?m():!0;x=new FilenameDialog(this.editorUi,x,mxResources.get("apply"),mxUtils.bind(this,function(F){if(null!=F&&0<F.length){if(C){r.getModel().beginUpdate();try{r.stopEditing(!1),r.setCellStyles(g,F)}finally{r.getModel().endUpdate()}}null!=n&&n(F)}}),mxResources.get("enterValue")+
+(0<f.length?" "+f:""),null,null,null,null,function(){null!=n&&null!=m&&n(null)});this.editorUi.showDialog(x.container,300,80,!0,!0);x.init()}),d,u,k)};
+Menus.prototype.pickColor=function(a,b,f){var e=this.editorUi,g=e.editor.graph,d=226+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));if(null!=b&&g.cellEditor.isContentEditing()){var k=g.cellEditor.saveSelection();a=new ColorDialog(this.editorUi,f||g.shapeForegroundColor,mxUtils.bind(this,function(u){g.cellEditor.restoreSelection(k);document.execCommand(b,!1,u!=mxConstants.NONE?u:"transparent");var m={forecolor:mxConstants.STYLE_FONTCOLOR,
+backcolor:mxConstants.STYLE_LABEL_BACKGROUNDCOLOR}[b];null!=m&&e.fireEvent(new mxEventObject("styleChanged","keys",[m],"values",[u],"cells",[g.cellEditor.getEditingCell()]))}),function(){g.cellEditor.restoreSelection(k)});this.editorUi.showDialog(a.container,230,d,!0,!0);a.init()}else{null==this.colorDialog&&(this.colorDialog=new ColorDialog(this.editorUi));this.colorDialog.currentColorKey=a;f=g.getView().getState(g.getSelectionCell());var n=mxConstants.NONE;null!=f&&(n=f.style[a]||n);n==mxConstants.NONE?
+(n=g.shapeBackgroundColor.substring(1),this.colorDialog.picker.fromString(n),this.colorDialog.colorInput.value=mxConstants.NONE):this.colorDialog.picker.fromString(mxUtils.rgba2hex(n));this.editorUi.showDialog(this.colorDialog.container,230,d,!0,!0);this.colorDialog.init()}};Menus.prototype.toggleStyle=function(a,b){var f=this.editorUi.editor.graph;b=f.toggleCellStyles(a,b);this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",[a],"values",[b],"cells",f.getSelectionCells()))};
+Menus.prototype.addMenuItem=function(a,b,f,e,g,d){var k=this.editorUi.actions.get(b);return null!=k&&(a.showDisabled||k.isEnabled())&&k.visible?(b=a.addItem(d||k.label,null,function(n){k.funct(e,n)},f,g,k.isEnabled()),k.toggleAction&&k.isSelected()&&a.addCheckmark(b,Editor.checkmarkImage),this.addShortcut(b,k),b):null};
+Menus.prototype.addShortcut=function(a,b){if(null!=b.shortcut){a=a.firstChild.nextSibling.nextSibling;var f=document.createElement("span");f.style.color="gray";mxUtils.write(f,b.shortcut);a.appendChild(f)}};Menus.prototype.addMenuItems=function(a,b,f,e,g){for(var d=0;d<b.length;d++)"-"==b[d]?a.addSeparator(f):this.addMenuItem(a,b[d],f,e,null!=g?g[d]:null)};
Menus.prototype.createPopupMenu=function(a,b,f){a.smartSeparators=!0;this.addPopupMenuHistoryItems(a,b,f);this.addPopupMenuEditItems(a,b,f);this.addPopupMenuStyleItems(a,b,f);this.addPopupMenuArrangeItems(a,b,f);this.addPopupMenuCellItems(a,b,f);this.addPopupMenuSelectionItems(a,b,f)};Menus.prototype.addPopupMenuHistoryItems=function(a,b,f){this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(a,["undo","redo"],null,f)};
Menus.prototype.addPopupMenuEditItems=function(a,b,f){this.editorUi.editor.graph.isSelectionEmpty()?this.addMenuItems(a,["pasteHere"],null,f):this.addMenuItems(a,"delete - cut copy - duplicate".split(" "),null,f)};Menus.prototype.addPopupMenuStyleItems=function(a,b,f){1==this.editorUi.editor.graph.getSelectionCount()?this.addMenuItems(a,["-","setAsDefaultStyle"],null,f):this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(a,["-","clearDefaultStyle"],null,f)};
-Menus.prototype.addPopupMenuArrangeItems=function(a,b,f){var d=this.editorUi.editor.graph;0<d.getEditableCells(d.getSelectionCells()).length&&(this.addMenuItems(a,["-","toFront","toBack"],null,f),1==d.getSelectionCount()&&this.addMenuItems(a,["bringForward","sendBackward"],null,f));1<d.getSelectionCount()?this.addMenuItems(a,["-","group"],null,f):1==d.getSelectionCount()&&!d.getModel().isEdge(b)&&!d.isSwimlane(b)&&0<d.getModel().getChildCount(b)&&d.isCellEditable(b)&&this.addMenuItems(a,["-","ungroup"],
+Menus.prototype.addPopupMenuArrangeItems=function(a,b,f){var e=this.editorUi.editor.graph;0<e.getEditableCells(e.getSelectionCells()).length&&(this.addMenuItems(a,["-","toFront","toBack"],null,f),1==e.getSelectionCount()&&this.addMenuItems(a,["bringForward","sendBackward"],null,f));1<e.getSelectionCount()?this.addMenuItems(a,["-","group"],null,f):1==e.getSelectionCount()&&!e.getModel().isEdge(b)&&!e.isSwimlane(b)&&0<e.getModel().getChildCount(b)&&e.isCellEditable(b)&&this.addMenuItems(a,["-","ungroup"],
null,f)};
-Menus.prototype.addPopupMenuCellItems=function(a,b,f){var d=this.editorUi.editor.graph,g=d.view.getState(b);a.addSeparator();if(null!=g){var e=!1;1==d.getSelectionCount()&&d.getModel().isEdge(b)&&(a.addSeparator(),this.addSubmenu("line",a));if(d.getModel().isEdge(b)&&"entityRelationEdgeStyle"!=mxUtils.getValue(g.style,mxConstants.STYLE_EDGE,null)&&"arrow"!=mxUtils.getValue(g.style,mxConstants.STYLE_SHAPE,null)){g=d.selectionCellsHandler.getHandler(b);var k=!1;g instanceof mxEdgeHandler&&null!=g.bends&&
-2<g.bends.length&&(e=g.getHandleForEvent(d.updateMouseEvent(new mxMouseEvent(f))),0<e&&e<g.bends.length-1&&(null==g.bends[e]||null==g.bends[e].node||""==g.bends[e].node.style.opacity)&&(k=this.editorUi.actions.get("removeWaypoint"),k.handler=g,k.index=e,k=!0));a.addSeparator();this.addMenuItem(a,"turn",null,f,null,mxResources.get("reverse"));this.addMenuItems(a,[k?"removeWaypoint":"addWaypoint"],null,f);g=d.getModel().getGeometry(b);e=null!=g&&null!=g.points&&0<g.points.length}1==d.getSelectionCount()&&
-(e||d.getModel().isVertex(b)&&0<d.getModel().getEdgeCount(b))&&this.addMenuItems(a,["-","clearWaypoints"],null,f);1==d.getSelectionCount()&&d.isCellEditable(b)&&this.addPopupMenuCellEditItems(a,b,f)}};
-Menus.prototype.addPopupMenuCellEditItems=function(a,b,f,d){var g=this.editorUi.editor.graph,e=g.view.getState(b);this.addMenuItems(a,["-","editStyle","editData","editLink"],d,f);g.getModel().isVertex(b)&&null!=mxUtils.getValue(e.style,mxConstants.STYLE_IMAGE,null)&&(a.addSeparator(),this.addMenuItem(a,"image",d,f).firstChild.nextSibling.innerHTML=mxResources.get("editImage")+"...",this.addMenuItem(a,"crop",d,f));(g.getModel().isVertex(b)&&0==g.getModel().getChildCount(b)||g.isContainer(b))&&this.addMenuItem(a,
-"editConnectionPoints",d,f)};Menus.prototype.addPopupMenuSelectionItems=function(a,b,f){this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(a,["-","selectVertices","selectEdges","selectAll"],null,f)};
-Menus.prototype.createMenubar=function(a){for(var b=new Menubar(this.editorUi,a),f=this.defaultMenuItems,d=0;d<f.length;d++)mxUtils.bind(this,function(g){var e=b.addMenu(mxResources.get(f[d]),mxUtils.bind(this,function(){g.funct.apply(this,arguments)}));this.menuCreated(g,e)})(this.get(f[d]));return b};
+Menus.prototype.addPopupMenuCellItems=function(a,b,f){var e=this.editorUi.editor.graph,g=e.view.getState(b);a.addSeparator();if(null!=g){var d=!1;1==e.getSelectionCount()&&e.getModel().isEdge(b)&&(a.addSeparator(),this.addSubmenu("line",a));if(e.getModel().isEdge(b)&&"entityRelationEdgeStyle"!=mxUtils.getValue(g.style,mxConstants.STYLE_EDGE,null)&&"arrow"!=mxUtils.getValue(g.style,mxConstants.STYLE_SHAPE,null)){g=e.selectionCellsHandler.getHandler(b);var k=!1;g instanceof mxEdgeHandler&&null!=g.bends&&
+2<g.bends.length&&(d=g.getHandleForEvent(e.updateMouseEvent(new mxMouseEvent(f))),0<d&&d<g.bends.length-1&&(null==g.bends[d]||null==g.bends[d].node||""==g.bends[d].node.style.opacity)&&(k=this.editorUi.actions.get("removeWaypoint"),k.handler=g,k.index=d,k=!0));a.addSeparator();this.addMenuItem(a,"turn",null,f,null,mxResources.get("reverse"));this.addMenuItems(a,[k?"removeWaypoint":"addWaypoint"],null,f);g=e.getModel().getGeometry(b);d=null!=g&&null!=g.points&&0<g.points.length}1==e.getSelectionCount()&&
+(d||e.getModel().isVertex(b)&&0<e.getModel().getEdgeCount(b))&&this.addMenuItems(a,["-","clearWaypoints"],null,f);1==e.getSelectionCount()&&e.isCellEditable(b)&&this.addPopupMenuCellEditItems(a,b,f)}};
+Menus.prototype.addPopupMenuCellEditItems=function(a,b,f,e){var g=this.editorUi.editor.graph,d=g.view.getState(b);this.addMenuItems(a,["-","editStyle","editData","editLink"],e,f);g.getModel().isVertex(b)&&null!=mxUtils.getValue(d.style,mxConstants.STYLE_IMAGE,null)&&(a.addSeparator(),this.addMenuItem(a,"image",e,f).firstChild.nextSibling.innerHTML=mxResources.get("editImage")+"...",this.addMenuItem(a,"crop",e,f));(g.getModel().isVertex(b)&&0==g.getModel().getChildCount(b)||g.isContainer(b))&&this.addMenuItem(a,
+"editConnectionPoints",e,f)};Menus.prototype.addPopupMenuSelectionItems=function(a,b,f){this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(a,["-","selectVertices","selectEdges","selectAll"],null,f)};
+Menus.prototype.createMenubar=function(a){for(var b=new Menubar(this.editorUi,a),f=this.defaultMenuItems,e=0;e<f.length;e++)mxUtils.bind(this,function(g){var d=b.addMenu(mxResources.get(f[e]),mxUtils.bind(this,function(){g.funct.apply(this,arguments)}));this.menuCreated(g,d)})(this.get(f[e]));return b};
Menus.prototype.menuCreated=function(a,b,f){null!=b&&(f=null!=f?f:"geItem",a.addListener("stateChanged",function(){(b.enabled=a.enabled)?(b.className=f,8==document.documentMode&&(b.style.color="")):(b.className=f+" mxDisabled",8==document.documentMode&&(b.style.color="#c3c3c3"))}))};function Menubar(a,b){this.editorUi=a;this.container=b}Menubar.prototype.hideMenu=function(){this.editorUi.hideCurrentMenu()};
-Menubar.prototype.addMenu=function(a,b,f){var d=document.createElement("a");d.className="geItem";mxUtils.write(d,a);this.addMenuHandler(d,b);null!=f?this.container.insertBefore(d,f):this.container.appendChild(d);return d};
-Menubar.prototype.addMenuHandler=function(a,b){if(null!=b){var f=!0,d=mxUtils.bind(this,function(g){if(f&&(null==a.enabled||a.enabled)){this.editorUi.editor.graph.popupMenuHandler.hideMenu();var e=new mxPopupMenu(b);e.div.className+=" geMenubarMenu";e.smartSeparators=!0;e.showDisabled=!0;e.autoExpand=!0;e.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(e,arguments);this.editorUi.resetCurrentMenu();e.destroy()});var k=mxUtils.getOffset(a);e.popup(k.x,k.y+a.offsetHeight,null,
-g);this.editorUi.setCurrentMenu(e,a)}mxEvent.consume(g)});mxEvent.addListener(a,"mousemove",mxUtils.bind(this,function(g){null!=this.editorUi.currentMenu&&this.editorUi.currentMenuElt!=a&&(this.editorUi.hideCurrentMenu(),d(g))}));mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(g){f=null==this.editorUi.currentMenu;g.preventDefault()}));mxEvent.addListener(a,"click",mxUtils.bind(this,function(g){d(g);f=!0}))}};Menubar.prototype.destroy=function(){};
+Menubar.prototype.addMenu=function(a,b,f){var e=document.createElement("a");e.className="geItem";mxUtils.write(e,a);this.addMenuHandler(e,b);null!=f?this.container.insertBefore(e,f):this.container.appendChild(e);return e};
+Menubar.prototype.addMenuHandler=function(a,b){if(null!=b){var f=!0,e=mxUtils.bind(this,function(g){if(f&&(null==a.enabled||a.enabled)){this.editorUi.editor.graph.popupMenuHandler.hideMenu();var d=new mxPopupMenu(b);d.div.className+=" geMenubarMenu";d.smartSeparators=!0;d.showDisabled=!0;d.autoExpand=!0;d.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(d,arguments);this.editorUi.resetCurrentMenu();d.destroy()});var k=mxUtils.getOffset(a);d.popup(k.x,k.y+a.offsetHeight,null,
+g);this.editorUi.setCurrentMenu(d,a)}mxEvent.consume(g)});mxEvent.addListener(a,"mousemove",mxUtils.bind(this,function(g){null!=this.editorUi.currentMenu&&this.editorUi.currentMenuElt!=a&&(this.editorUi.hideCurrentMenu(),e(g))}));mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(g){f=null==this.editorUi.currentMenu;g.preventDefault()}));mxEvent.addListener(a,"click",mxUtils.bind(this,function(g){e(g);f=!0}))}};Menubar.prototype.destroy=function(){};
function Menu(a,b){mxEventSource.call(this);this.funct=a;this.enabled=null!=b?b:!0}mxUtils.extend(Menu,mxEventSource);Menu.prototype.isEnabled=function(){return this.enabled};Menu.prototype.setEnabled=function(a){this.enabled!=a&&(this.enabled=a,this.fireEvent(new mxEventObject("stateChanged")))};Menu.prototype.execute=function(a,b){this.funct(a,b)};EditorUi.prototype.createMenus=function(){return new Menus(this)};function Toolbar(a,b){this.editorUi=a;this.container=b;this.staticElements=[];this.init();this.gestureHandler=mxUtils.bind(this,function(f){null!=this.editorUi.currentMenu&&mxEvent.getSource(f)!=this.editorUi.currentMenu.div&&this.hideMenu()});mxEvent.addGestureListeners(document,this.gestureHandler)}
Toolbar.prototype.dropDownImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQANAIABAHt7e////yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IE1hY2ludG9zaCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpCREM1NkJFMjE0NEMxMUU1ODk1Q0M5MjQ0MTA4QjNDMSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpCREM1NkJFMzE0NEMxMUU1ODk1Q0M5MjQ0MTA4QjNDMSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkQzOUMzMjZCMTQ0QjExRTU4OTVDQzkyNDQxMDhCM0MxIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkQzOUMzMjZDMTQ0QjExRTU4OTVDQzkyNDQxMDhCM0MxIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+Af/+/fz7+vn49/b19PPy8fDv7u3s6+rp6Ofm5eTj4uHg397d3Nva2djX1tXU09LR0M/OzczLysnIx8bFxMPCwcC/vr28u7q5uLe2tbSzsrGwr66trKuqqainpqWko6KhoJ+enZybmpmYl5aVlJOSkZCPjo2Mi4qJiIeGhYSDgoGAf359fHt6eXh3dnV0c3JxcG9ubWxramloZ2ZlZGNiYWBfXl1cW1pZWFdWVVRTUlFQT05NTEtKSUhHRkVEQ0JBQD8+PTw7Ojk4NzY1NDMyMTAvLi0sKyopKCcmJSQjIiEgHx4dHBsaGRgXFhUUExIREA8ODQwLCgkIBwYFBAMCAQAAIfkEAQAAAQAsAAAAAA0ADQAAAhGMj6nL3QAjVHIu6azbvPtWAAA7":IMAGE_PATH+
"/dropdown.gif";Toolbar.prototype.selectedBackground="#d0d0d0";Toolbar.prototype.unselectedBackground="none";Toolbar.prototype.staticElements=null;
Toolbar.prototype.init=function(){var a=screen.width;a-=740<screen.height?56:0;if(700<=a){var b=this.addMenu("",mxResources.get("view")+" ("+mxResources.get("panTooltip")+")",!0,"viewPanels",null,!0);this.addDropDownArrow(b,"geSprite-formatpanel",38,50,-4,-3,36,-8);this.addSeparator()}var f=this.addMenu("",mxResources.get("zoom")+" (Alt+Mousewheel)",!0,"viewZoom",null,!0);f.showDisabled=!0;f.style.whiteSpace="nowrap";f.style.position="relative";f.style.overflow="hidden";f.style.width=EditorUi.compactUi?
"50px":"36px";420<=a&&(this.addSeparator(),b=this.addItems(["zoomIn","zoomOut"]),b[0].setAttribute("title",mxResources.get("zoomIn")+" ("+this.editorUi.actions.get("zoomIn").shortcut+")"),b[1].setAttribute("title",mxResources.get("zoomOut")+" ("+this.editorUi.actions.get("zoomOut").shortcut+")"));this.updateZoom=mxUtils.bind(this,function(){f.innerHTML=Math.round(100*this.editorUi.editor.graph.view.scale)+"%";this.appendDropDownImageHtml(f);EditorUi.compactUi&&(f.getElementsByTagName("img")[0].style.right=
"1px",f.getElementsByTagName("img")[0].style.top="5px")});this.editorUi.editor.graph.view.addListener(mxEvent.EVENT_SCALE,this.updateZoom);this.editorUi.editor.addListener("resetGraphView",this.updateZoom);b=this.addItems(["-","undo","redo"]);b[1].setAttribute("title",mxResources.get("undo")+" ("+this.editorUi.actions.get("undo").shortcut+")");b[2].setAttribute("title",mxResources.get("redo")+" ("+this.editorUi.actions.get("redo").shortcut+")");320<=a&&(b=this.addItems(["-","delete"]),b[1].setAttribute("title",
-mxResources.get("delete")+" ("+this.editorUi.actions.get("delete").shortcut+")"));550<=a&&this.addItems(["-","toFront","toBack"]);740<=a&&(this.addItems(["-","fillColor"]),780<=a&&(this.addItems(["strokeColor"]),820<=a&&this.addItems(["shadow"])));400<=a&&(this.addSeparator(),440<=a&&(this.edgeShapeMenu=this.addMenuFunction("",mxResources.get("connection"),!1,mxUtils.bind(this,function(d){this.editorUi.menus.edgeStyleChange(d,"",[mxConstants.STYLE_SHAPE,"width"],[null,null],"geIcon geSprite geSprite-connection",
-null,!0).setAttribute("title",mxResources.get("line"));this.editorUi.menus.edgeStyleChange(d,"",[mxConstants.STYLE_SHAPE,"width"],["link",null],"geIcon geSprite geSprite-linkedge",null,!0).setAttribute("title",mxResources.get("link"));this.editorUi.menus.edgeStyleChange(d,"",[mxConstants.STYLE_SHAPE,"width"],["flexArrow",null],"geIcon geSprite geSprite-arrow",null,!0).setAttribute("title",mxResources.get("arrow"));this.editorUi.menus.edgeStyleChange(d,"",[mxConstants.STYLE_SHAPE,"width"],["arrow",
-null],"geIcon geSprite geSprite-simplearrow",null,!0).setAttribute("title",mxResources.get("simpleArrow"))})),this.addDropDownArrow(this.edgeShapeMenu,"geSprite-connection",44,50,0,0,22,-4)),this.edgeStyleMenu=this.addMenuFunction("geSprite-orthogonal",mxResources.get("waypoints"),!1,mxUtils.bind(this,function(d){this.editorUi.menus.edgeStyleChange(d,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],"geIcon geSprite geSprite-straight",null,!0).setAttribute("title",
-mxResources.get("straight"));this.editorUi.menus.edgeStyleChange(d,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle",null,null],"geIcon geSprite geSprite-orthogonal",null,!0).setAttribute("title",mxResources.get("orthogonal"));this.editorUi.menus.edgeStyleChange(d,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalelbow",
-null,!0).setAttribute("title",mxResources.get("simple"));this.editorUi.menus.edgeStyleChange(d,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalelbow",null,!0).setAttribute("title",mxResources.get("simple"));this.editorUi.menus.edgeStyleChange(d,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle",
-null,null,null],"geIcon geSprite geSprite-horizontalisometric",null,!0).setAttribute("title",mxResources.get("isometric"));this.editorUi.menus.edgeStyleChange(d,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalisometric",null,!0).setAttribute("title",mxResources.get("isometric"));this.editorUi.menus.edgeStyleChange(d,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,
-mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle","1",null],"geIcon geSprite geSprite-curved",null,!0).setAttribute("title",mxResources.get("curved"));this.editorUi.menus.edgeStyleChange(d,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["entityRelationEdgeStyle",null,null],"geIcon geSprite geSprite-entity",null,!0).setAttribute("title",mxResources.get("entityRelation"))})),this.addDropDownArrow(this.edgeStyleMenu,"geSprite-orthogonal",44,50,0,0,22,-4));this.addSeparator();
+mxResources.get("delete")+" ("+this.editorUi.actions.get("delete").shortcut+")"));550<=a&&this.addItems(["-","toFront","toBack"]);740<=a&&(this.addItems(["-","fillColor"]),780<=a&&(this.addItems(["strokeColor"]),820<=a&&this.addItems(["shadow"])));400<=a&&(this.addSeparator(),440<=a&&(this.edgeShapeMenu=this.addMenuFunction("",mxResources.get("connection"),!1,mxUtils.bind(this,function(e){this.editorUi.menus.edgeStyleChange(e,"",[mxConstants.STYLE_SHAPE,"width"],[null,null],"geIcon geSprite geSprite-connection",
+null,!0).setAttribute("title",mxResources.get("line"));this.editorUi.menus.edgeStyleChange(e,"",[mxConstants.STYLE_SHAPE,"width"],["link",null],"geIcon geSprite geSprite-linkedge",null,!0).setAttribute("title",mxResources.get("link"));this.editorUi.menus.edgeStyleChange(e,"",[mxConstants.STYLE_SHAPE,"width"],["flexArrow",null],"geIcon geSprite geSprite-arrow",null,!0).setAttribute("title",mxResources.get("arrow"));this.editorUi.menus.edgeStyleChange(e,"",[mxConstants.STYLE_SHAPE,"width"],["arrow",
+null],"geIcon geSprite geSprite-simplearrow",null,!0).setAttribute("title",mxResources.get("simpleArrow"))})),this.addDropDownArrow(this.edgeShapeMenu,"geSprite-connection",44,50,0,0,22,-4)),this.edgeStyleMenu=this.addMenuFunction("geSprite-orthogonal",mxResources.get("waypoints"),!1,mxUtils.bind(this,function(e){this.editorUi.menus.edgeStyleChange(e,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],"geIcon geSprite geSprite-straight",null,!0).setAttribute("title",
+mxResources.get("straight"));this.editorUi.menus.edgeStyleChange(e,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle",null,null],"geIcon geSprite geSprite-orthogonal",null,!0).setAttribute("title",mxResources.get("orthogonal"));this.editorUi.menus.edgeStyleChange(e,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalelbow",
+null,!0).setAttribute("title",mxResources.get("simple"));this.editorUi.menus.edgeStyleChange(e,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalelbow",null,!0).setAttribute("title",mxResources.get("simple"));this.editorUi.menus.edgeStyleChange(e,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle",
+null,null,null],"geIcon geSprite geSprite-horizontalisometric",null,!0).setAttribute("title",mxResources.get("isometric"));this.editorUi.menus.edgeStyleChange(e,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalisometric",null,!0).setAttribute("title",mxResources.get("isometric"));this.editorUi.menus.edgeStyleChange(e,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,
+mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle","1",null],"geIcon geSprite geSprite-curved",null,!0).setAttribute("title",mxResources.get("curved"));this.editorUi.menus.edgeStyleChange(e,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["entityRelationEdgeStyle",null,null],"geIcon geSprite geSprite-entity",null,!0).setAttribute("title",mxResources.get("entityRelation"))})),this.addDropDownArrow(this.edgeStyleMenu,"geSprite-orthogonal",44,50,0,0,22,-4));this.addSeparator();
a=this.addMenu("",mxResources.get("insert")+" ("+mxResources.get("doubleClickTooltip")+")",!0,"insert",null,!0);this.addDropDownArrow(a,"geSprite-plus",38,48,-4,-3,36,-8);this.addSeparator();this.addTableDropDown()};
Toolbar.prototype.appendDropDownImageHtml=function(a){var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("valign","middle");b.setAttribute("src",Toolbar.prototype.dropDownImage);a.appendChild(b);b.style.position="absolute";b.style.right="4px";b.style.top=(EditorUi.compactUi?6:8)+"px"};
Toolbar.prototype.addTableDropDown=function(){var a=this.addMenuFunction("geIcon geSprite geSprite-table",mxResources.get("table"),!1,mxUtils.bind(this,function(f){this.editorUi.menus.addInsertTableCellItem(f)}));a.style.position="relative";a.style.whiteSpace="nowrap";a.style.overflow="hidden";a.style.width="30px";a.innerHTML='<div class="geSprite geSprite-table"></div>';this.appendDropDownImageHtml(a);a.getElementsByTagName("div")[0].style.marginLeft="-2px";EditorUi.compactUi&&(a.getElementsByTagName("img")[0].style.left=
"22px",a.getElementsByTagName("img")[0].style.top="5px");var b=this.editorUi.menus.get("insert");null!=b&&"function"===typeof a.setEnabled&&b.addListener("stateChanged",function(){a.setEnabled(b.enabled)});return a};
-Toolbar.prototype.addDropDownArrow=function(a,b,f,d,g,e,k,n){g=EditorUi.compactUi?g:n;a.style.whiteSpace="nowrap";a.style.overflow="hidden";a.style.position="relative";a.style.width=d-(null!=k?k:32)+"px";a.innerHTML='<div class="geSprite '+b+'"></div>';this.appendDropDownImageHtml(a);b=a.getElementsByTagName("div")[0];b.style.marginLeft=g+"px";b.style.marginTop=e+"px";EditorUi.compactUi&&(a.getElementsByTagName("img")[0].style.left="24px",a.getElementsByTagName("img")[0].style.top="5px",a.style.width=
+Toolbar.prototype.addDropDownArrow=function(a,b,f,e,g,d,k,n){g=EditorUi.compactUi?g:n;a.style.whiteSpace="nowrap";a.style.overflow="hidden";a.style.position="relative";a.style.width=e-(null!=k?k:32)+"px";a.innerHTML='<div class="geSprite '+b+'"></div>';this.appendDropDownImageHtml(a);b=a.getElementsByTagName("div")[0];b.style.marginLeft=g+"px";b.style.marginTop=d+"px";EditorUi.compactUi&&(a.getElementsByTagName("img")[0].style.left="24px",a.getElementsByTagName("img")[0].style.top="5px",a.style.width=
f-10+"px")};Toolbar.prototype.setFontName=function(a){if(null!=this.fontMenu){this.fontMenu.innerText="";var b=document.createElement("div");b.style.display="inline-block";b.style.overflow="hidden";b.style.textOverflow="ellipsis";b.style.maxWidth="66px";mxUtils.write(b,a);this.fontMenu.appendChild(b);this.appendDropDownImageHtml(this.fontMenu)}};
Toolbar.prototype.setFontSize=function(a){if(null!=this.sizeMenu){this.sizeMenu.innerText="";var b=document.createElement("div");b.style.display="inline-block";b.style.overflow="hidden";b.style.textOverflow="ellipsis";b.style.maxWidth="24px";mxUtils.write(b,a);this.sizeMenu.appendChild(b);this.appendDropDownImageHtml(this.sizeMenu)}};
Toolbar.prototype.createTextToolbar=function(){var a=this.editorUi,b=a.editor.graph,f=this.addMenu("",mxResources.get("style"),!0,"formatBlock");f.style.position="relative";f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.innerHTML=mxResources.get("style");this.appendDropDownImageHtml(f);EditorUi.compactUi&&(f.style.paddingRight="18px",f.getElementsByTagName("img")[0].style.right="1px",f.getElementsByTagName("img")[0].style.top="5px");this.addSeparator();this.fontMenu=this.addMenu("",mxResources.get("fontFamily"),
!0,"fontFamily");this.fontMenu.style.position="relative";this.fontMenu.style.whiteSpace="nowrap";this.fontMenu.style.overflow="hidden";this.fontMenu.style.width="68px";this.setFontName(Menus.prototype.defaultFont);EditorUi.compactUi&&(this.fontMenu.style.paddingRight="18px",this.fontMenu.getElementsByTagName("img")[0].style.right="1px",this.fontMenu.getElementsByTagName("img")[0].style.top="5px");this.addSeparator();this.sizeMenu=this.addMenu(Menus.prototype.defaultFontSize,mxResources.get("fontSize"),
!0,"fontSize");this.sizeMenu.style.position="relative";this.sizeMenu.style.whiteSpace="nowrap";this.sizeMenu.style.overflow="hidden";this.sizeMenu.style.width="24px";this.setFontSize(Menus.prototype.defaultFontSize);EditorUi.compactUi&&(this.sizeMenu.style.paddingRight="18px",this.sizeMenu.getElementsByTagName("img")[0].style.right="1px",this.sizeMenu.getElementsByTagName("img")[0].style.top="5px");f=this.addItems("- undo redo - bold italic underline".split(" "));f[1].setAttribute("title",mxResources.get("undo")+
-" ("+a.actions.get("undo").shortcut+")");f[2].setAttribute("title",mxResources.get("redo")+" ("+a.actions.get("redo").shortcut+")");f[4].setAttribute("title",mxResources.get("bold")+" ("+a.actions.get("bold").shortcut+")");f[5].setAttribute("title",mxResources.get("italic")+" ("+a.actions.get("italic").shortcut+")");f[6].setAttribute("title",mxResources.get("underline")+" ("+a.actions.get("underline").shortcut+")");var d=this.addMenuFunction("",mxResources.get("align"),!1,mxUtils.bind(this,function(e){g=
-e.addItem("",null,mxUtils.bind(this,function(k){b.cellEditor.alignText(mxConstants.ALIGN_LEFT,k);a.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_LEFT],"cells",[b.cellEditor.getEditingCell()]))}),null,"geIcon geSprite geSprite-left");g.setAttribute("title",mxResources.get("left"));g=e.addItem("",null,mxUtils.bind(this,function(k){b.cellEditor.alignText(mxConstants.ALIGN_CENTER,k);a.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],
-"values",[mxConstants.ALIGN_CENTER],"cells",[b.cellEditor.getEditingCell()]))}),null,"geIcon geSprite geSprite-center");g.setAttribute("title",mxResources.get("center"));g=e.addItem("",null,mxUtils.bind(this,function(k){b.cellEditor.alignText(mxConstants.ALIGN_RIGHT,k);a.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_RIGHT],"cells",[b.cellEditor.getEditingCell()]))}),null,"geIcon geSprite geSprite-right");g.setAttribute("title",mxResources.get("right"));
-g=e.addItem("",null,mxUtils.bind(this,function(){document.execCommand("justifyfull",!1,null)}),null,"geIcon geSprite geSprite-justifyfull");g.setAttribute("title",mxResources.get("justifyfull"));g=e.addItem("",null,mxUtils.bind(this,function(){document.execCommand("insertorderedlist",!1,null)}),null,"geIcon geSprite geSprite-orderedlist");g.setAttribute("title",mxResources.get("numberedList"));g=e.addItem("",null,mxUtils.bind(this,function(){document.execCommand("insertunorderedlist",!1,null)}),null,
-"geIcon geSprite geSprite-unorderedlist");g.setAttribute("title",mxResources.get("bulletedList"));g=e.addItem("",null,mxUtils.bind(this,function(){document.execCommand("outdent",!1,null)}),null,"geIcon geSprite geSprite-outdent");g.setAttribute("title",mxResources.get("decreaseIndent"));g=e.addItem("",null,mxUtils.bind(this,function(){document.execCommand("indent",!1,null)}),null,"geIcon geSprite geSprite-indent");g.setAttribute("title",mxResources.get("increaseIndent"))}));d.style.position="relative";
-d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.width="30px";d.innerText="";f=document.createElement("div");f.className="geSprite geSprite-left";f.style.marginLeft="-2px";d.appendChild(f);this.appendDropDownImageHtml(d);EditorUi.compactUi&&(d.getElementsByTagName("img")[0].style.left="22px",d.getElementsByTagName("img")[0].style.top="5px");d=this.addMenuFunction("",mxResources.get("format"),!1,mxUtils.bind(this,function(e){g=e.addItem("",null,this.editorUi.actions.get("subscript").funct,
-null,"geIcon geSprite geSprite-subscript");g.setAttribute("title",mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)");g=e.addItem("",null,this.editorUi.actions.get("superscript").funct,null,"geIcon geSprite geSprite-superscript");g.setAttribute("title",mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)");g=e.addItem("",null,this.editorUi.actions.get("fontColor").funct,null,"geIcon geSprite geSprite-fontcolor");g.setAttribute("title",mxResources.get("fontColor"));g=e.addItem("",null,this.editorUi.actions.get("backgroundColor").funct,
-null,"geIcon geSprite geSprite-fontbackground");g.setAttribute("title",mxResources.get("backgroundColor"));g=e.addItem("",null,mxUtils.bind(this,function(){document.execCommand("removeformat",!1,null)}),null,"geIcon geSprite geSprite-removeformat");g.setAttribute("title",mxResources.get("removeFormat"))}));d.style.position="relative";d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.width="30px";d.innerText="";f=document.createElement("div");f.className="geSprite geSprite-dots";f.style.marginLeft=
-"-2px";d.appendChild(f);this.appendDropDownImageHtml(d);EditorUi.compactUi&&(d.getElementsByTagName("img")[0].style.left="22px",d.getElementsByTagName("img")[0].style.top="5px");this.addSeparator();this.addButton("geIcon geSprite geSprite-code",mxResources.get("html"),function(){b.cellEditor.toggleViewMode();0<b.cellEditor.textarea.innerHTML.length&&("&nbsp;"!=b.cellEditor.textarea.innerHTML||!b.cellEditor.clearOnChange)&&window.setTimeout(function(){document.execCommand("selectAll",!1,null)})});
-this.addSeparator();d=this.addMenuFunction("",mxResources.get("insert"),!0,mxUtils.bind(this,function(e){e.addItem(mxResources.get("insertLink"),null,mxUtils.bind(this,function(){this.editorUi.actions.get("link").funct()}));e.addItem(mxResources.get("insertImage"),null,mxUtils.bind(this,function(){this.editorUi.actions.get("image").funct()}));e.addItem(mxResources.get("insertHorizontalRule"),null,mxUtils.bind(this,function(){document.execCommand("inserthorizontalrule",!1,null)}))}));d.style.whiteSpace=
-"nowrap";d.style.overflow="hidden";d.style.position="relative";d.style.width="16px";d.innerText="";f=document.createElement("div");f.className="geSprite geSprite-plus";f.style.marginLeft="-4px";f.style.marginTop="-3px";d.appendChild(f);this.appendDropDownImageHtml(d);EditorUi.compactUi&&(d.getElementsByTagName("img")[0].style.left="24px",d.getElementsByTagName("img")[0].style.top="5px",d.style.width="30px");this.addSeparator();var g=this.addMenuFunction("geIcon geSprite geSprite-table",mxResources.get("table"),
-!1,mxUtils.bind(this,function(e){var k=b.getSelectedElement(),n=b.getParentByNames(k,["TD","TH"],b.cellEditor.text2),u=b.getParentByName(k,"TR",b.cellEditor.text2);if(null==u)this.editorUi.menus.addInsertTableItem(e);else{var m=b.getParentByName(u,"TABLE",b.cellEditor.text2);k=e.addItem("",null,mxUtils.bind(this,function(){try{b.selectNode(b.insertColumn(m,null!=n?n.cellIndex:0))}catch(r){this.editorUi.handleError(r)}}),null,"geIcon geSprite geSprite-insertcolumnbefore");k.setAttribute("title",mxResources.get("insertColumnBefore"));
-k=e.addItem("",null,mxUtils.bind(this,function(){try{b.selectNode(b.insertColumn(m,null!=n?n.cellIndex+1:-1))}catch(r){this.editorUi.handleError(r)}}),null,"geIcon geSprite geSprite-insertcolumnafter");k.setAttribute("title",mxResources.get("insertColumnAfter"));k=e.addItem("Delete column",null,mxUtils.bind(this,function(){if(null!=n)try{b.deleteColumn(m,n.cellIndex)}catch(r){this.editorUi.handleError(r)}}),null,"geIcon geSprite geSprite-deletecolumn");k.setAttribute("title",mxResources.get("deleteColumn"));
-k=e.addItem("",null,mxUtils.bind(this,function(){try{b.selectNode(b.insertRow(m,u.sectionRowIndex))}catch(r){this.editorUi.handleError(r)}}),null,"geIcon geSprite geSprite-insertrowbefore");k.setAttribute("title",mxResources.get("insertRowBefore"));k=e.addItem("",null,mxUtils.bind(this,function(){try{b.selectNode(b.insertRow(m,u.sectionRowIndex+1))}catch(r){this.editorUi.handleError(r)}}),null,"geIcon geSprite geSprite-insertrowafter");k.setAttribute("title",mxResources.get("insertRowAfter"));k=e.addItem("",
-null,mxUtils.bind(this,function(){try{b.deleteRow(m,u.sectionRowIndex)}catch(r){this.editorUi.handleError(r)}}),null,"geIcon geSprite geSprite-deleterow");k.setAttribute("title",mxResources.get("deleteRow"));k=e.addItem("",null,mxUtils.bind(this,function(){var r=m.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(x,B,C,G){return"#"+("0"+Number(B).toString(16)).substr(-2)+("0"+Number(C).toString(16)).substr(-2)+("0"+Number(G).toString(16)).substr(-2)});this.editorUi.pickColor(r,
-function(x){null==x||x==mxConstants.NONE?(m.removeAttribute("border"),m.style.border="",m.style.borderCollapse=""):(m.setAttribute("border","1"),m.style.border="1px solid "+x,m.style.borderCollapse="collapse")})}),null,"geIcon geSprite geSprite-strokecolor");k.setAttribute("title",mxResources.get("borderColor"));k=e.addItem("",null,mxUtils.bind(this,function(){var r=m.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(x,B,C,G){return"#"+("0"+Number(B).toString(16)).substr(-2)+
-("0"+Number(C).toString(16)).substr(-2)+("0"+Number(G).toString(16)).substr(-2)});this.editorUi.pickColor(r,function(x){m.style.backgroundColor=null==x||x==mxConstants.NONE?"":x})}),null,"geIcon geSprite geSprite-fillcolor");k.setAttribute("title",mxResources.get("backgroundColor"));k=e.addItem("",null,mxUtils.bind(this,function(){var r=m.getAttribute("cellPadding")||0;r=new FilenameDialog(this.editorUi,r,mxResources.get("apply"),mxUtils.bind(this,function(x){null!=x&&0<x.length?m.setAttribute("cellPadding",
-x):m.removeAttribute("cellPadding")}),mxResources.get("spacing"));this.editorUi.showDialog(r.container,300,80,!0,!0);r.init()}),null,"geIcon geSprite geSprite-fit");k.setAttribute("title",mxResources.get("spacing"));k=e.addItem("",null,mxUtils.bind(this,function(){m.setAttribute("align","left")}),null,"geIcon geSprite geSprite-left");k.setAttribute("title",mxResources.get("left"));k=e.addItem("",null,mxUtils.bind(this,function(){m.setAttribute("align","center")}),null,"geIcon geSprite geSprite-center");
-k.setAttribute("title",mxResources.get("center"));k=e.addItem("",null,mxUtils.bind(this,function(){m.setAttribute("align","right")}),null,"geIcon geSprite geSprite-right");k.setAttribute("title",mxResources.get("right"))}}));g.style.position="relative";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.width="30px";g.innerText="";f=document.createElement("div");f.className="geSprite geSprite-table";f.style.marginLeft="-2px";g.appendChild(f);this.appendDropDownImageHtml(g);EditorUi.compactUi&&
-(g.getElementsByTagName("img")[0].style.left="22px",g.getElementsByTagName("img")[0].style.top="5px")};Toolbar.prototype.hideMenu=function(){this.editorUi.hideCurrentMenu()};Toolbar.prototype.addMenu=function(a,b,f,d,g,e,k){var n=this.editorUi.menus.get(d),u=this.addMenuFunction(a,b,f,function(){n.funct.apply(n,arguments)},g,e);k||"function"!==typeof u.setEnabled||n.addListener("stateChanged",function(){u.setEnabled(n.enabled)});return u};
-Toolbar.prototype.addMenuFunction=function(a,b,f,d,g,e){return this.addMenuFunctionInContainer(null!=g?g:this.container,a,b,f,d,e)};Toolbar.prototype.addMenuFunctionInContainer=function(a,b,f,d,g,e){b=d?this.createLabel(b):this.createButton(b);this.initElement(b,f);this.addMenuHandler(b,d,g,e);a.appendChild(b);return b};Toolbar.prototype.addSeparator=function(a){a=null!=a?a:this.container;var b=document.createElement("div");b.className="geSeparator";a.appendChild(b);return b};
-Toolbar.prototype.addItems=function(a,b,f){for(var d=[],g=0;g<a.length;g++){var e=a[g];"-"==e?d.push(this.addSeparator(b)):d.push(this.addItem("geSprite-"+e.toLowerCase(),e,b,f))}return d};Toolbar.prototype.addItem=function(a,b,f,d){var g=this.editorUi.actions.get(b),e=null;null!=g&&(b=g.label,null!=g.shortcut&&(b+=" ("+g.shortcut+")"),e=this.addButton(a,b,g.funct,f),d||"function"!==typeof e.setEnabled||(e.setEnabled(g.enabled),g.addListener("stateChanged",function(){e.setEnabled(g.enabled)})));return e};
-Toolbar.prototype.addButton=function(a,b,f,d){a=this.createButton(a);d=null!=d?d:this.container;this.initElement(a,b);this.addClickHandler(a,f);d.appendChild(a);return a};Toolbar.prototype.initElement=function(a,b){null!=b&&a.setAttribute("title",b);this.addEnabledState(a)};Toolbar.prototype.addEnabledState=function(a){var b=a.className;a.setEnabled=function(f){a.enabled=f;a.className=f?b:b+" mxDisabled"};a.setEnabled(!0)};
+" ("+a.actions.get("undo").shortcut+")");f[2].setAttribute("title",mxResources.get("redo")+" ("+a.actions.get("redo").shortcut+")");f[4].setAttribute("title",mxResources.get("bold")+" ("+a.actions.get("bold").shortcut+")");f[5].setAttribute("title",mxResources.get("italic")+" ("+a.actions.get("italic").shortcut+")");f[6].setAttribute("title",mxResources.get("underline")+" ("+a.actions.get("underline").shortcut+")");var e=this.addMenuFunction("",mxResources.get("align"),!1,mxUtils.bind(this,function(d){g=
+d.addItem("",null,mxUtils.bind(this,function(k){b.cellEditor.alignText(mxConstants.ALIGN_LEFT,k);a.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_LEFT],"cells",[b.cellEditor.getEditingCell()]))}),null,"geIcon geSprite geSprite-left");g.setAttribute("title",mxResources.get("left"));g=d.addItem("",null,mxUtils.bind(this,function(k){b.cellEditor.alignText(mxConstants.ALIGN_CENTER,k);a.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],
+"values",[mxConstants.ALIGN_CENTER],"cells",[b.cellEditor.getEditingCell()]))}),null,"geIcon geSprite geSprite-center");g.setAttribute("title",mxResources.get("center"));g=d.addItem("",null,mxUtils.bind(this,function(k){b.cellEditor.alignText(mxConstants.ALIGN_RIGHT,k);a.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_RIGHT],"cells",[b.cellEditor.getEditingCell()]))}),null,"geIcon geSprite geSprite-right");g.setAttribute("title",mxResources.get("right"));
+g=d.addItem("",null,mxUtils.bind(this,function(){document.execCommand("justifyfull",!1,null)}),null,"geIcon geSprite geSprite-justifyfull");g.setAttribute("title",mxResources.get("justifyfull"));g=d.addItem("",null,mxUtils.bind(this,function(){document.execCommand("insertorderedlist",!1,null)}),null,"geIcon geSprite geSprite-orderedlist");g.setAttribute("title",mxResources.get("numberedList"));g=d.addItem("",null,mxUtils.bind(this,function(){document.execCommand("insertunorderedlist",!1,null)}),null,
+"geIcon geSprite geSprite-unorderedlist");g.setAttribute("title",mxResources.get("bulletedList"));g=d.addItem("",null,mxUtils.bind(this,function(){document.execCommand("outdent",!1,null)}),null,"geIcon geSprite geSprite-outdent");g.setAttribute("title",mxResources.get("decreaseIndent"));g=d.addItem("",null,mxUtils.bind(this,function(){document.execCommand("indent",!1,null)}),null,"geIcon geSprite geSprite-indent");g.setAttribute("title",mxResources.get("increaseIndent"))}));e.style.position="relative";
+e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.width="30px";e.innerText="";f=document.createElement("div");f.className="geSprite geSprite-left";f.style.marginLeft="-2px";e.appendChild(f);this.appendDropDownImageHtml(e);EditorUi.compactUi&&(e.getElementsByTagName("img")[0].style.left="22px",e.getElementsByTagName("img")[0].style.top="5px");e=this.addMenuFunction("",mxResources.get("format"),!1,mxUtils.bind(this,function(d){g=d.addItem("",null,this.editorUi.actions.get("subscript").funct,
+null,"geIcon geSprite geSprite-subscript");g.setAttribute("title",mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)");g=d.addItem("",null,this.editorUi.actions.get("superscript").funct,null,"geIcon geSprite geSprite-superscript");g.setAttribute("title",mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)");g=d.addItem("",null,this.editorUi.actions.get("fontColor").funct,null,"geIcon geSprite geSprite-fontcolor");g.setAttribute("title",mxResources.get("fontColor"));g=d.addItem("",null,this.editorUi.actions.get("backgroundColor").funct,
+null,"geIcon geSprite geSprite-fontbackground");g.setAttribute("title",mxResources.get("backgroundColor"));g=d.addItem("",null,mxUtils.bind(this,function(){document.execCommand("removeformat",!1,null)}),null,"geIcon geSprite geSprite-removeformat");g.setAttribute("title",mxResources.get("removeFormat"))}));e.style.position="relative";e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.width="30px";e.innerText="";f=document.createElement("div");f.className="geSprite geSprite-dots";f.style.marginLeft=
+"-2px";e.appendChild(f);this.appendDropDownImageHtml(e);EditorUi.compactUi&&(e.getElementsByTagName("img")[0].style.left="22px",e.getElementsByTagName("img")[0].style.top="5px");this.addSeparator();this.addButton("geIcon geSprite geSprite-code",mxResources.get("html"),function(){b.cellEditor.toggleViewMode();0<b.cellEditor.textarea.innerHTML.length&&("&nbsp;"!=b.cellEditor.textarea.innerHTML||!b.cellEditor.clearOnChange)&&window.setTimeout(function(){document.execCommand("selectAll",!1,null)})});
+this.addSeparator();e=this.addMenuFunction("",mxResources.get("insert"),!0,mxUtils.bind(this,function(d){d.addItem(mxResources.get("insertLink"),null,mxUtils.bind(this,function(){this.editorUi.actions.get("link").funct()}));d.addItem(mxResources.get("insertImage"),null,mxUtils.bind(this,function(){this.editorUi.actions.get("image").funct()}));d.addItem(mxResources.get("insertHorizontalRule"),null,mxUtils.bind(this,function(){document.execCommand("inserthorizontalrule",!1,null)}))}));e.style.whiteSpace=
+"nowrap";e.style.overflow="hidden";e.style.position="relative";e.style.width="16px";e.innerText="";f=document.createElement("div");f.className="geSprite geSprite-plus";f.style.marginLeft="-4px";f.style.marginTop="-3px";e.appendChild(f);this.appendDropDownImageHtml(e);EditorUi.compactUi&&(e.getElementsByTagName("img")[0].style.left="24px",e.getElementsByTagName("img")[0].style.top="5px",e.style.width="30px");this.addSeparator();var g=this.addMenuFunction("geIcon geSprite geSprite-table",mxResources.get("table"),
+!1,mxUtils.bind(this,function(d){var k=b.getSelectedElement(),n=b.getParentByNames(k,["TD","TH"],b.cellEditor.text2),u=b.getParentByName(k,"TR",b.cellEditor.text2);if(null==u)this.editorUi.menus.addInsertTableItem(d);else{var m=b.getParentByName(u,"TABLE",b.cellEditor.text2);k=d.addItem("",null,mxUtils.bind(this,function(){try{b.selectNode(b.insertColumn(m,null!=n?n.cellIndex:0))}catch(r){this.editorUi.handleError(r)}}),null,"geIcon geSprite geSprite-insertcolumnbefore");k.setAttribute("title",mxResources.get("insertColumnBefore"));
+k=d.addItem("",null,mxUtils.bind(this,function(){try{b.selectNode(b.insertColumn(m,null!=n?n.cellIndex+1:-1))}catch(r){this.editorUi.handleError(r)}}),null,"geIcon geSprite geSprite-insertcolumnafter");k.setAttribute("title",mxResources.get("insertColumnAfter"));k=d.addItem("Delete column",null,mxUtils.bind(this,function(){if(null!=n)try{b.deleteColumn(m,n.cellIndex)}catch(r){this.editorUi.handleError(r)}}),null,"geIcon geSprite geSprite-deletecolumn");k.setAttribute("title",mxResources.get("deleteColumn"));
+k=d.addItem("",null,mxUtils.bind(this,function(){try{b.selectNode(b.insertRow(m,u.sectionRowIndex))}catch(r){this.editorUi.handleError(r)}}),null,"geIcon geSprite geSprite-insertrowbefore");k.setAttribute("title",mxResources.get("insertRowBefore"));k=d.addItem("",null,mxUtils.bind(this,function(){try{b.selectNode(b.insertRow(m,u.sectionRowIndex+1))}catch(r){this.editorUi.handleError(r)}}),null,"geIcon geSprite geSprite-insertrowafter");k.setAttribute("title",mxResources.get("insertRowAfter"));k=d.addItem("",
+null,mxUtils.bind(this,function(){try{b.deleteRow(m,u.sectionRowIndex)}catch(r){this.editorUi.handleError(r)}}),null,"geIcon geSprite geSprite-deleterow");k.setAttribute("title",mxResources.get("deleteRow"));k=d.addItem("",null,mxUtils.bind(this,function(){var r=m.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(x,B,C,F){return"#"+("0"+Number(B).toString(16)).substr(-2)+("0"+Number(C).toString(16)).substr(-2)+("0"+Number(F).toString(16)).substr(-2)});this.editorUi.pickColor(r,
+function(x){null==x||x==mxConstants.NONE?(m.removeAttribute("border"),m.style.border="",m.style.borderCollapse=""):(m.setAttribute("border","1"),m.style.border="1px solid "+x,m.style.borderCollapse="collapse")})}),null,"geIcon geSprite geSprite-strokecolor");k.setAttribute("title",mxResources.get("borderColor"));k=d.addItem("",null,mxUtils.bind(this,function(){var r=m.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(x,B,C,F){return"#"+("0"+Number(B).toString(16)).substr(-2)+
+("0"+Number(C).toString(16)).substr(-2)+("0"+Number(F).toString(16)).substr(-2)});this.editorUi.pickColor(r,function(x){m.style.backgroundColor=null==x||x==mxConstants.NONE?"":x})}),null,"geIcon geSprite geSprite-fillcolor");k.setAttribute("title",mxResources.get("backgroundColor"));k=d.addItem("",null,mxUtils.bind(this,function(){var r=m.getAttribute("cellPadding")||0;r=new FilenameDialog(this.editorUi,r,mxResources.get("apply"),mxUtils.bind(this,function(x){null!=x&&0<x.length?m.setAttribute("cellPadding",
+x):m.removeAttribute("cellPadding")}),mxResources.get("spacing"));this.editorUi.showDialog(r.container,300,80,!0,!0);r.init()}),null,"geIcon geSprite geSprite-fit");k.setAttribute("title",mxResources.get("spacing"));k=d.addItem("",null,mxUtils.bind(this,function(){m.setAttribute("align","left")}),null,"geIcon geSprite geSprite-left");k.setAttribute("title",mxResources.get("left"));k=d.addItem("",null,mxUtils.bind(this,function(){m.setAttribute("align","center")}),null,"geIcon geSprite geSprite-center");
+k.setAttribute("title",mxResources.get("center"));k=d.addItem("",null,mxUtils.bind(this,function(){m.setAttribute("align","right")}),null,"geIcon geSprite geSprite-right");k.setAttribute("title",mxResources.get("right"))}}));g.style.position="relative";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.width="30px";g.innerText="";f=document.createElement("div");f.className="geSprite geSprite-table";f.style.marginLeft="-2px";g.appendChild(f);this.appendDropDownImageHtml(g);EditorUi.compactUi&&
+(g.getElementsByTagName("img")[0].style.left="22px",g.getElementsByTagName("img")[0].style.top="5px")};Toolbar.prototype.hideMenu=function(){this.editorUi.hideCurrentMenu()};Toolbar.prototype.addMenu=function(a,b,f,e,g,d,k){var n=this.editorUi.menus.get(e),u=this.addMenuFunction(a,b,f,function(){n.funct.apply(n,arguments)},g,d);k||"function"!==typeof u.setEnabled||n.addListener("stateChanged",function(){u.setEnabled(n.enabled)});return u};
+Toolbar.prototype.addMenuFunction=function(a,b,f,e,g,d){return this.addMenuFunctionInContainer(null!=g?g:this.container,a,b,f,e,d)};Toolbar.prototype.addMenuFunctionInContainer=function(a,b,f,e,g,d){b=e?this.createLabel(b):this.createButton(b);this.initElement(b,f);this.addMenuHandler(b,e,g,d);a.appendChild(b);return b};Toolbar.prototype.addSeparator=function(a){a=null!=a?a:this.container;var b=document.createElement("div");b.className="geSeparator";a.appendChild(b);return b};
+Toolbar.prototype.addItems=function(a,b,f){for(var e=[],g=0;g<a.length;g++){var d=a[g];"-"==d?e.push(this.addSeparator(b)):e.push(this.addItem("geSprite-"+d.toLowerCase(),d,b,f))}return e};Toolbar.prototype.addItem=function(a,b,f,e){var g=this.editorUi.actions.get(b),d=null;null!=g&&(b=g.label,null!=g.shortcut&&(b+=" ("+g.shortcut+")"),d=this.addButton(a,b,g.funct,f),e||"function"!==typeof d.setEnabled||(d.setEnabled(g.enabled),g.addListener("stateChanged",function(){d.setEnabled(g.enabled)})));return d};
+Toolbar.prototype.addButton=function(a,b,f,e){a=this.createButton(a);e=null!=e?e:this.container;this.initElement(a,b);this.addClickHandler(a,f);e.appendChild(a);return a};Toolbar.prototype.initElement=function(a,b){null!=b&&a.setAttribute("title",b);this.addEnabledState(a)};Toolbar.prototype.addEnabledState=function(a){var b=a.className;a.setEnabled=function(f){a.enabled=f;a.className=f?b:b+" mxDisabled"};a.setEnabled(!0)};
Toolbar.prototype.addClickHandler=function(a,b){null!=b&&(mxEvent.addListener(a,"click",function(f){a.enabled&&b(f);mxEvent.consume(f)}),mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(f){f.preventDefault()})))};Toolbar.prototype.createButton=function(a){var b=document.createElement("a");b.className="geButton";var f=document.createElement("div");null!=a&&(f.className="geSprite "+a);b.appendChild(f);return b};
Toolbar.prototype.createLabel=function(a,b){b=document.createElement("a");b.className="geLabel";mxUtils.write(b,a);return b};
-Toolbar.prototype.addMenuHandler=function(a,b,f,d){if(null!=f){var g=this.editorUi.editor.graph,e=null,k=!0;mxEvent.addListener(a,"click",mxUtils.bind(this,function(n){if(k&&(null==a.enabled||a.enabled)){g.popupMenuHandler.hideMenu();e=new mxPopupMenu(f);e.div.className+=" geToolbarMenu";e.showDisabled=d;e.labels=b;e.autoExpand=!0;!b&&e.div.scrollHeight>e.div.clientHeight&&(e.div.style.width="40px");e.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(e,arguments);this.editorUi.resetCurrentMenu();
-e.destroy()});var u=mxUtils.getOffset(a);e.popup(u.x,u.y+a.offsetHeight,null,n);this.editorUi.setCurrentMenu(e,a)}k=!0;mxEvent.consume(n)}));mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(n){k=null==e||null==e.div||null==e.div.parentNode;n.preventDefault()}))}};Toolbar.prototype.destroy=function(){null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null)};var OpenDialog=function(){var a=document.createElement("iframe");a.style.backgroundColor="transparent";a.allowTransparency="true";a.style.borderStyle="none";a.style.borderWidth="0px";a.style.overflow="hidden";a.frameBorder="0";a.setAttribute("width",(Editor.useLocalStorage?640:320)+"px");a.setAttribute("height",(Editor.useLocalStorage?480:220)+"px");a.setAttribute("src",OPEN_FORM);this.container=a},ColorDialog=function(a,b,f,d){function g(){var J=k.value;/(^#?[a-zA-Z0-9]*$)/.test(J)?("none"!=J&&"#"!=
-J.charAt(0)&&(J="#"+J),ColorDialog.addRecentColor("none"!=J?J.substring(1):J,12),n(J),a.hideDialog()):a.handleError({message:mxResources.get("invalidInput")})}function e(){var J=r(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);J.style.marginBottom="8px";return J}this.editorUi=a;var k=document.createElement("input");k.style.marginBottom="10px";mxClient.IS_IE&&(k.style.marginTop="10px",document.body.appendChild(k));var n=null!=f?f:this.createApplyFunction();this.init=
-function(){mxClient.IS_TOUCH||k.focus()};var u=new mxJSColor.color(k);u.pickerOnfocus=!1;u.showPicker();f=document.createElement("div");mxJSColor.picker.box.style.position="relative";mxJSColor.picker.box.style.width="230px";mxJSColor.picker.box.style.height="100px";mxJSColor.picker.box.style.paddingBottom="10px";f.appendChild(mxJSColor.picker.box);var m=document.createElement("center"),r=mxUtils.bind(this,function(J,D,N,Q){D=null!=D?D:12;var R=document.createElement("table");R.style.borderCollapse=
-"collapse";R.setAttribute("cellspacing","0");R.style.marginBottom="20px";R.style.cellSpacing="0px";R.style.marginLeft="1px";var P=document.createElement("tbody");R.appendChild(P);for(var Z=J.length/D,U=0;U<Z;U++){for(var V=document.createElement("tr"),ia=0;ia<D;ia++)mxUtils.bind(this,function(ha){var ba=document.createElement("td");ba.style.border="0px solid black";ba.style.padding="0px";ba.style.width="16px";ba.style.height="16px";null==ha&&(ha=N);if(null!=ha){ba.style.borderWidth="1px";"none"==
-ha?ba.style.background="url('"+Dialog.prototype.noColorImage+"')":ba.style.backgroundColor="#"+ha;var qa=this.colorNames[ha.toUpperCase()];null!=qa&&ba.setAttribute("title",qa)}V.appendChild(ba);null!=ha&&(ba.style.cursor="pointer",mxEvent.addListener(ba,"click",function(){"none"==ha?(u.fromString("ffffff"),k.value="none"):u.fromString(ha)}),mxEvent.addListener(ba,"dblclick",g))})(J[U*D+ia]);P.appendChild(V)}Q&&(J=document.createElement("td"),J.setAttribute("title",mxResources.get("reset")),J.style.border=
-"1px solid black",J.style.padding="0px",J.style.width="16px",J.style.height="16px",J.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')",J.style.backgroundPosition="center center",J.style.backgroundRepeat="no-repeat",J.style.cursor="pointer",V.appendChild(J),mxEvent.addListener(J,"click",function(){ColorDialog.resetRecentColors();R.parentNode.replaceChild(e(),R)}));m.appendChild(R);return R});f.appendChild(k);if(mxClient.IS_IE||mxClient.IS_IE11)k.style.width="216px";else{k.style.width=
-"182px";var x=document.createElement("input");x.setAttribute("type","color");x.style.visibility="hidden";x.style.width="0px";x.style.height="0px";x.style.border="none";x.style.marginLeft="2px";f.style.whiteSpace="nowrap";f.appendChild(x);f.appendChild(mxUtils.button("...",function(){document.activeElement==x?k.focus():(x.value="#"+k.value,x.click())}));mxEvent.addListener(x,"input",function(){u.fromString(x.value.substring(1))})}mxUtils.br(f);e();var B=r(this.presetColors);B.style.marginBottom="8px";
-B=r(this.defaultColors);B.style.marginBottom="16px";f.appendChild(m);B=document.createElement("div");B.style.textAlign="right";B.style.whiteSpace="nowrap";var C=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d()});C.className="geBtn";a.editor.cancelFirst&&B.appendChild(C);var G=mxUtils.button(mxResources.get("apply"),g);G.className="geBtn gePrimaryBtn";B.appendChild(G);a.editor.cancelFirst||B.appendChild(C);null!=b&&("none"==b?(u.fromString("ffffff"),k.value="none"):u.fromString(b));
-f.appendChild(B);this.picker=u;this.colorInput=k;mxEvent.addListener(f,"keydown",function(J){27==J.keyCode&&(a.hideDialog(),null!=d&&d(),mxEvent.consume(J))});this.container=f};ColorDialog.prototype.presetColors="E6D0DE CDA2BE B5739D E1D5E7 C3ABD0 A680B8 D4E1F5 A9C4EB 7EA6E0 D5E8D4 9AC7BF 67AB9F D5E8D4 B9E0A5 97D077 FFF2CC FFE599 FFD966 FFF4C3 FFCE9F FFB570 F8CECC F19C99 EA6B66".split(" ");ColorDialog.prototype.colorNames={};ColorDialog.prototype.defaultColors="none FFFFFF E6E6E6 CCCCCC B3B3B3 999999 808080 666666 4D4D4D 333333 1A1A1A 000000 FFCCCC FFE6CC FFFFCC E6FFCC CCFFCC CCFFE6 CCFFFF CCE5FF CCCCFF E5CCFF FFCCFF FFCCE6 FF9999 FFCC99 FFFF99 CCFF99 99FF99 99FFCC 99FFFF 99CCFF 9999FF CC99FF FF99FF FF99CC FF6666 FFB366 FFFF66 B3FF66 66FF66 66FFB3 66FFFF 66B2FF 6666FF B266FF FF66FF FF66B3 FF3333 FF9933 FFFF33 99FF33 33FF33 33FF99 33FFFF 3399FF 3333FF 9933FF FF33FF FF3399 FF0000 FF8000 FFFF00 80FF00 00FF00 00FF80 00FFFF 007FFF 0000FF 7F00FF FF00FF FF0080 CC0000 CC6600 CCCC00 66CC00 00CC00 00CC66 00CCCC 0066CC 0000CC 6600CC CC00CC CC0066 990000 994C00 999900 4D9900 009900 00994D 009999 004C99 000099 4C0099 990099 99004D 660000 663300 666600 336600 006600 006633 006666 003366 000066 330066 660066 660033 330000 331A00 333300 1A3300 003300 00331A 003333 001933 000033 190033 330033 33001A".split(" ");
+Toolbar.prototype.addMenuHandler=function(a,b,f,e){if(null!=f){var g=this.editorUi.editor.graph,d=null,k=!0;mxEvent.addListener(a,"click",mxUtils.bind(this,function(n){if(k&&(null==a.enabled||a.enabled)){g.popupMenuHandler.hideMenu();d=new mxPopupMenu(f);d.div.className+=" geToolbarMenu";d.showDisabled=e;d.labels=b;d.autoExpand=!0;!b&&d.div.scrollHeight>d.div.clientHeight&&(d.div.style.width="40px");d.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(d,arguments);this.editorUi.resetCurrentMenu();
+d.destroy()});var u=mxUtils.getOffset(a);d.popup(u.x,u.y+a.offsetHeight,null,n);this.editorUi.setCurrentMenu(d,a)}k=!0;mxEvent.consume(n)}));mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(n){k=null==d||null==d.div||null==d.div.parentNode;n.preventDefault()}))}};Toolbar.prototype.destroy=function(){null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null)};var OpenDialog=function(){var a=document.createElement("iframe");a.style.backgroundColor="transparent";a.allowTransparency="true";a.style.borderStyle="none";a.style.borderWidth="0px";a.style.overflow="hidden";a.frameBorder="0";a.setAttribute("width",(Editor.useLocalStorage?640:320)+"px");a.setAttribute("height",(Editor.useLocalStorage?480:220)+"px");a.setAttribute("src",OPEN_FORM);this.container=a},ColorDialog=function(a,b,f,e){function g(){var J=k.value;/(^#?[a-zA-Z0-9]*$)/.test(J)?("none"!=J&&"#"!=
+J.charAt(0)&&(J="#"+J),ColorDialog.addRecentColor("none"!=J?J.substring(1):J,12),n(J),a.hideDialog()):a.handleError({message:mxResources.get("invalidInput")})}function d(){var J=r(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);J.style.marginBottom="8px";return J}this.editorUi=a;var k=document.createElement("input");k.style.marginBottom="10px";mxClient.IS_IE&&(k.style.marginTop="10px",document.body.appendChild(k));var n=null!=f?f:this.createApplyFunction();this.init=
+function(){mxClient.IS_TOUCH||k.focus()};var u=new mxJSColor.color(k);u.pickerOnfocus=!1;u.showPicker();f=document.createElement("div");mxJSColor.picker.box.style.position="relative";mxJSColor.picker.box.style.width="230px";mxJSColor.picker.box.style.height="100px";mxJSColor.picker.box.style.paddingBottom="10px";f.appendChild(mxJSColor.picker.box);var m=document.createElement("center"),r=mxUtils.bind(this,function(J,D,N,S){D=null!=D?D:12;var T=document.createElement("table");T.style.borderCollapse=
+"collapse";T.setAttribute("cellspacing","0");T.style.marginBottom="20px";T.style.cellSpacing="0px";T.style.marginLeft="1px";var P=document.createElement("tbody");T.appendChild(P);for(var Z=J.length/D,U=0;U<Z;U++){for(var V=document.createElement("tr"),aa=0;aa<D;aa++)mxUtils.bind(this,function(ia){var ea=document.createElement("td");ea.style.border="0px solid black";ea.style.padding="0px";ea.style.width="16px";ea.style.height="16px";null==ia&&(ia=N);if(null!=ia){ea.style.borderWidth="1px";"none"==
+ia?ea.style.background="url('"+Dialog.prototype.noColorImage+"')":ea.style.backgroundColor="#"+ia;var qa=this.colorNames[ia.toUpperCase()];null!=qa&&ea.setAttribute("title",qa)}V.appendChild(ea);null!=ia&&(ea.style.cursor="pointer",mxEvent.addListener(ea,"click",function(){"none"==ia?(u.fromString("ffffff"),k.value="none"):u.fromString(ia)}),mxEvent.addListener(ea,"dblclick",g))})(J[U*D+aa]);P.appendChild(V)}S&&(J=document.createElement("td"),J.setAttribute("title",mxResources.get("reset")),J.style.border=
+"1px solid black",J.style.padding="0px",J.style.width="16px",J.style.height="16px",J.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')",J.style.backgroundPosition="center center",J.style.backgroundRepeat="no-repeat",J.style.cursor="pointer",V.appendChild(J),mxEvent.addListener(J,"click",function(){ColorDialog.resetRecentColors();T.parentNode.replaceChild(d(),T)}));m.appendChild(T);return T});f.appendChild(k);if(mxClient.IS_IE||mxClient.IS_IE11)k.style.width="216px";else{k.style.width=
+"182px";var x=document.createElement("input");x.setAttribute("type","color");x.style.visibility="hidden";x.style.width="0px";x.style.height="0px";x.style.border="none";x.style.marginLeft="2px";f.style.whiteSpace="nowrap";f.appendChild(x);f.appendChild(mxUtils.button("...",function(){document.activeElement==x?k.focus():(x.value="#"+k.value,x.click())}));mxEvent.addListener(x,"input",function(){u.fromString(x.value.substring(1))})}mxUtils.br(f);d();var B=r(this.presetColors);B.style.marginBottom="8px";
+B=r(this.defaultColors);B.style.marginBottom="16px";f.appendChild(m);B=document.createElement("div");B.style.textAlign="right";B.style.whiteSpace="nowrap";var C=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=e&&e()});C.className="geBtn";a.editor.cancelFirst&&B.appendChild(C);var F=mxUtils.button(mxResources.get("apply"),g);F.className="geBtn gePrimaryBtn";B.appendChild(F);a.editor.cancelFirst||B.appendChild(C);null!=b&&("none"==b?(u.fromString("ffffff"),k.value="none"):u.fromString(b));
+f.appendChild(B);this.picker=u;this.colorInput=k;mxEvent.addListener(f,"keydown",function(J){27==J.keyCode&&(a.hideDialog(),null!=e&&e(),mxEvent.consume(J))});this.container=f};ColorDialog.prototype.presetColors="E6D0DE CDA2BE B5739D E1D5E7 C3ABD0 A680B8 D4E1F5 A9C4EB 7EA6E0 D5E8D4 9AC7BF 67AB9F D5E8D4 B9E0A5 97D077 FFF2CC FFE599 FFD966 FFF4C3 FFCE9F FFB570 F8CECC F19C99 EA6B66".split(" ");ColorDialog.prototype.colorNames={};ColorDialog.prototype.defaultColors="none FFFFFF E6E6E6 CCCCCC B3B3B3 999999 808080 666666 4D4D4D 333333 1A1A1A 000000 FFCCCC FFE6CC FFFFCC E6FFCC CCFFCC CCFFE6 CCFFFF CCE5FF CCCCFF E5CCFF FFCCFF FFCCE6 FF9999 FFCC99 FFFF99 CCFF99 99FF99 99FFCC 99FFFF 99CCFF 9999FF CC99FF FF99FF FF99CC FF6666 FFB366 FFFF66 B3FF66 66FF66 66FFB3 66FFFF 66B2FF 6666FF B266FF FF66FF FF66B3 FF3333 FF9933 FFFF33 99FF33 33FF33 33FF99 33FFFF 3399FF 3333FF 9933FF FF33FF FF3399 FF0000 FF8000 FFFF00 80FF00 00FF00 00FF80 00FFFF 007FFF 0000FF 7F00FF FF00FF FF0080 CC0000 CC6600 CCCC00 66CC00 00CC00 00CC66 00CCCC 0066CC 0000CC 6600CC CC00CC CC0066 990000 994C00 999900 4D9900 009900 00994D 009999 004C99 000099 4C0099 990099 99004D 660000 663300 666600 336600 006600 006633 006666 003366 000066 330066 660066 660033 330000 331A00 333300 1A3300 003300 00331A 003333 001933 000033 190033 330033 33001A".split(" ");
ColorDialog.prototype.createApplyFunction=function(){return mxUtils.bind(this,function(a){var b=this.editorUi.editor.graph;b.getModel().beginUpdate();try{b.setCellStyles(this.currentColorKey,a),this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",[this.currentColorKey],"values",[a],"cells",b.getSelectionCells()))}finally{b.getModel().endUpdate()}})};ColorDialog.recentColors=[];
ColorDialog.addRecentColor=function(a,b){null!=a&&(mxUtils.remove(a,ColorDialog.recentColors),ColorDialog.recentColors.splice(0,0,a),ColorDialog.recentColors.length>=b&&ColorDialog.recentColors.pop())};ColorDialog.resetRecentColors=function(){ColorDialog.recentColors=[]};
var AboutDialog=function(a){var b=document.createElement("div");b.setAttribute("align","center");var f=document.createElement("h3");mxUtils.write(f,mxResources.get("about")+" GraphEditor");b.appendChild(f);f=document.createElement("img");f.style.border="0px";f.setAttribute("width","176");f.setAttribute("width","151");f.setAttribute("src",IMAGE_PATH+"/logo.png");b.appendChild(f);mxUtils.br(b);mxUtils.write(b,"Powered by mxGraph "+mxClient.VERSION);mxUtils.br(b);f=document.createElement("a");f.setAttribute("href",
-"http://www.jgraph.com/");f.setAttribute("target","_blank");mxUtils.write(f,"www.jgraph.com");b.appendChild(f);mxUtils.br(b);mxUtils.br(b);f=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});f.className="geBtn gePrimaryBtn";b.appendChild(f);this.container=b},TextareaDialog=function(a,b,f,d,g,e,k,n,u,m,r,x,B,C,G){m=null!=m?m:!1;k=document.createElement("div");k.style.position="absolute";k.style.top="20px";k.style.bottom="20px";k.style.left="20px";k.style.right="20px";n=document.createElement("div");
-n.style.position="absolute";n.style.left="0px";n.style.right="0px";var J=n.cloneNode(!1),D=n.cloneNode(!1);n.style.top="0px";n.style.height="20px";J.style.top="20px";J.style.bottom="64px";D.style.bottom="0px";D.style.height="60px";D.style.textAlign="center";mxUtils.write(n,b);k.appendChild(n);k.appendChild(J);k.appendChild(D);null!=G&&n.appendChild(G);var N=document.createElement("textarea");r&&N.setAttribute("wrap","off");N.setAttribute("spellcheck","false");N.setAttribute("autocorrect","off");N.setAttribute("autocomplete",
-"off");N.setAttribute("autocapitalize","off");mxUtils.write(N,f||"");N.style.resize="none";N.style.outline="none";N.style.position="absolute";N.style.boxSizing="border-box";N.style.top="0px";N.style.left="0px";N.style.height="100%";N.style.width="100%";this.textarea=N;this.init=function(){N.focus();N.scrollTop=0};J.appendChild(N);null!=B&&(b=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(B)}),b.className="geBtn",D.appendChild(b));if(null!=C)for(b=0;b<C.length;b++)(function(R,
-P,Z){R=mxUtils.button(R,function(U){P(U,N)});null!=Z&&R.setAttribute("title",Z);R.className="geBtn";D.appendChild(R)})(C[b][0],C[b][1],C[b][2]);e=mxUtils.button(e||mxResources.get("cancel"),function(){a.hideDialog();null!=g&&g()});e.setAttribute("title","Escape");e.className="geBtn";a.editor.cancelFirst&&D.appendChild(e);null!=u&&u(D,N);if(null!=d){var Q=mxUtils.button(x||mxResources.get("apply"),function(){m||a.hideDialog();d(N.value)});Q.setAttribute("title","Ctrl+Enter");Q.className="geBtn gePrimaryBtn";
-D.appendChild(Q);mxEvent.addListener(N,"keypress",function(R){13==R.keyCode&&mxEvent.isControlDown(R)&&Q.click()})}a.editor.cancelFirst||D.appendChild(e);this.container=k},EditDiagramDialog=function(a){var b=document.createElement("div");b.style.textAlign="right";var f=document.createElement("textarea");f.setAttribute("wrap","off");f.setAttribute("spellcheck","false");f.setAttribute("autocorrect","off");f.setAttribute("autocomplete","off");f.setAttribute("autocapitalize","off");f.style.overflow="auto";
+"http://www.jgraph.com/");f.setAttribute("target","_blank");mxUtils.write(f,"www.jgraph.com");b.appendChild(f);mxUtils.br(b);mxUtils.br(b);f=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});f.className="geBtn gePrimaryBtn";b.appendChild(f);this.container=b},TextareaDialog=function(a,b,f,e,g,d,k,n,u,m,r,x,B,C,F){m=null!=m?m:!1;k=document.createElement("div");k.style.position="absolute";k.style.top="20px";k.style.bottom="20px";k.style.left="20px";k.style.right="20px";n=document.createElement("div");
+n.style.position="absolute";n.style.left="0px";n.style.right="0px";var J=n.cloneNode(!1),D=n.cloneNode(!1);n.style.top="0px";n.style.height="20px";J.style.top="20px";J.style.bottom="64px";D.style.bottom="0px";D.style.height="60px";D.style.textAlign="center";mxUtils.write(n,b);k.appendChild(n);k.appendChild(J);k.appendChild(D);null!=F&&n.appendChild(F);var N=document.createElement("textarea");r&&N.setAttribute("wrap","off");N.setAttribute("spellcheck","false");N.setAttribute("autocorrect","off");N.setAttribute("autocomplete",
+"off");N.setAttribute("autocapitalize","off");mxUtils.write(N,f||"");N.style.resize="none";N.style.outline="none";N.style.position="absolute";N.style.boxSizing="border-box";N.style.top="0px";N.style.left="0px";N.style.height="100%";N.style.width="100%";this.textarea=N;this.init=function(){N.focus();N.scrollTop=0};J.appendChild(N);null!=B&&(b=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(B)}),b.className="geBtn",D.appendChild(b));if(null!=C)for(b=0;b<C.length;b++)(function(T,
+P,Z){T=mxUtils.button(T,function(U){P(U,N)});null!=Z&&T.setAttribute("title",Z);T.className="geBtn";D.appendChild(T)})(C[b][0],C[b][1],C[b][2]);d=mxUtils.button(d||mxResources.get("cancel"),function(){a.hideDialog();null!=g&&g()});d.setAttribute("title","Escape");d.className="geBtn";a.editor.cancelFirst&&D.appendChild(d);null!=u&&u(D,N);if(null!=e){var S=mxUtils.button(x||mxResources.get("apply"),function(){m||a.hideDialog();e(N.value)});S.setAttribute("title","Ctrl+Enter");S.className="geBtn gePrimaryBtn";
+D.appendChild(S);mxEvent.addListener(N,"keypress",function(T){13==T.keyCode&&mxEvent.isControlDown(T)&&S.click()})}a.editor.cancelFirst||D.appendChild(d);this.container=k},EditDiagramDialog=function(a){var b=document.createElement("div");b.style.textAlign="right";var f=document.createElement("textarea");f.setAttribute("wrap","off");f.setAttribute("spellcheck","false");f.setAttribute("autocorrect","off");f.setAttribute("autocomplete","off");f.setAttribute("autocapitalize","off");f.style.overflow="auto";
f.style.resize="none";f.style.width="600px";f.style.height="360px";f.style.marginBottom="16px";f.value=mxUtils.getPrettyXml(a.editor.getGraphXml());b.appendChild(f);this.init=function(){f.focus()};Graph.fileSupport&&(f.addEventListener("dragover",function(k){k.stopPropagation();k.preventDefault()},!1),f.addEventListener("drop",function(k){k.stopPropagation();k.preventDefault();if(0<k.dataTransfer.files.length){k=k.dataTransfer.files[0];var n=new FileReader;n.onload=function(u){f.value=u.target.result};
-n.readAsText(k)}else f.value=a.extractGraphModelFromEvent(k)},!1));var d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.className="geBtn";a.editor.cancelFirst&&b.appendChild(d);var g=document.createElement("select");g.style.width="180px";g.className="geBtn";if(a.editor.graph.isEnabled()){var e=document.createElement("option");e.setAttribute("value","replace");mxUtils.write(e,mxResources.get("replaceExistingDrawing"));g.appendChild(e)}e=document.createElement("option");e.setAttribute("value",
-"new");mxUtils.write(e,mxResources.get("openInNewWindow"));EditDiagramDialog.showNewWindowOption&&g.appendChild(e);a.editor.graph.isEnabled()&&(e=document.createElement("option"),e.setAttribute("value","import"),mxUtils.write(e,mxResources.get("addToExistingDrawing")),g.appendChild(e));b.appendChild(g);e=mxUtils.button(mxResources.get("ok"),function(){var k=Graph.zapGremlins(mxUtils.trim(f.value)),n=null;if("new"==g.value)a.hideDialog(),a.editor.editAsNew(k);else if("replace"==g.value){a.editor.graph.model.beginUpdate();
+n.readAsText(k)}else f.value=a.extractGraphModelFromEvent(k)},!1));var e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.className="geBtn";a.editor.cancelFirst&&b.appendChild(e);var g=document.createElement("select");g.style.width="180px";g.className="geBtn";if(a.editor.graph.isEnabled()){var d=document.createElement("option");d.setAttribute("value","replace");mxUtils.write(d,mxResources.get("replaceExistingDrawing"));g.appendChild(d)}d=document.createElement("option");d.setAttribute("value",
+"new");mxUtils.write(d,mxResources.get("openInNewWindow"));EditDiagramDialog.showNewWindowOption&&g.appendChild(d);a.editor.graph.isEnabled()&&(d=document.createElement("option"),d.setAttribute("value","import"),mxUtils.write(d,mxResources.get("addToExistingDrawing")),g.appendChild(d));b.appendChild(g);d=mxUtils.button(mxResources.get("ok"),function(){var k=Graph.zapGremlins(mxUtils.trim(f.value)),n=null;if("new"==g.value)a.hideDialog(),a.editor.editAsNew(k);else if("replace"==g.value){a.editor.graph.model.beginUpdate();
try{a.editor.setGraphXml(mxUtils.parseXml(k).documentElement),a.hideDialog()}catch(x){n=x}finally{a.editor.graph.model.endUpdate()}}else if("import"==g.value){a.editor.graph.model.beginUpdate();try{var u=mxUtils.parseXml(k),m=new mxGraphModel;(new mxCodec(u)).decode(u.documentElement,m);var r=m.getChildren(m.getChildAt(m.getRoot(),0));a.editor.graph.setSelectionCells(a.editor.graph.importCells(r));a.hideDialog()}catch(x){n=x}finally{a.editor.graph.model.endUpdate()}}null!=n&&mxUtils.alert(n.message)});
-e.className="geBtn gePrimaryBtn";b.appendChild(e);a.editor.cancelFirst||b.appendChild(d);this.container=b};EditDiagramDialog.showNewWindowOption=!0;
-var ExportDialog=function(a){function b(){var V=r.value,ia=V.lastIndexOf(".");r.value=0<ia?V.substring(0,ia+1)+x.value:V+"."+x.value;"xml"===x.value?(B.setAttribute("disabled","true"),C.setAttribute("disabled","true"),G.setAttribute("disabled","true"),P.setAttribute("disabled","true")):(B.removeAttribute("disabled"),C.removeAttribute("disabled"),G.removeAttribute("disabled"),P.removeAttribute("disabled"));"png"===x.value||"svg"===x.value||"pdf"===x.value?Q.removeAttribute("disabled"):Q.setAttribute("disabled",
-"disabled");"png"===x.value||"jpg"===x.value||"pdf"===x.value?R.removeAttribute("disabled"):R.setAttribute("disabled","disabled");"png"===x.value?(J.removeAttribute("disabled"),D.removeAttribute("disabled")):(J.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"))}function f(){C.style.backgroundColor=C.value*G.value>MAX_AREA||0>=C.value?"red":"";G.style.backgroundColor=C.value*G.value>MAX_AREA||0>=G.value?"red":""}var d=a.editor.graph,g=d.getGraphBounds(),e=d.view.scale,k=Math.ceil(g.width/
-e),n=Math.ceil(g.height/e);e=document.createElement("table");var u=document.createElement("tbody");e.setAttribute("cellpadding",mxClient.IS_SF?"0":"2");g=document.createElement("tr");var m=document.createElement("td");m.style.fontSize="10pt";m.style.width="100px";mxUtils.write(m,mxResources.get("filename")+":");g.appendChild(m);var r=document.createElement("input");r.setAttribute("value",a.editor.getOrCreateFilename());r.style.width="180px";m=document.createElement("td");m.appendChild(r);g.appendChild(m);
+d.className="geBtn gePrimaryBtn";b.appendChild(d);a.editor.cancelFirst||b.appendChild(e);this.container=b};EditDiagramDialog.showNewWindowOption=!0;
+var ExportDialog=function(a){function b(){var V=r.value,aa=V.lastIndexOf(".");r.value=0<aa?V.substring(0,aa+1)+x.value:V+"."+x.value;"xml"===x.value?(B.setAttribute("disabled","true"),C.setAttribute("disabled","true"),F.setAttribute("disabled","true"),P.setAttribute("disabled","true")):(B.removeAttribute("disabled"),C.removeAttribute("disabled"),F.removeAttribute("disabled"),P.removeAttribute("disabled"));"png"===x.value||"svg"===x.value||"pdf"===x.value?S.removeAttribute("disabled"):S.setAttribute("disabled",
+"disabled");"png"===x.value||"jpg"===x.value||"pdf"===x.value?T.removeAttribute("disabled"):T.setAttribute("disabled","disabled");"png"===x.value?(J.removeAttribute("disabled"),D.removeAttribute("disabled")):(J.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"))}function f(){C.style.backgroundColor=C.value*F.value>MAX_AREA||0>=C.value?"red":"";F.style.backgroundColor=C.value*F.value>MAX_AREA||0>=F.value?"red":""}var e=a.editor.graph,g=e.getGraphBounds(),d=e.view.scale,k=Math.ceil(g.width/
+d),n=Math.ceil(g.height/d);d=document.createElement("table");var u=document.createElement("tbody");d.setAttribute("cellpadding",mxClient.IS_SF?"0":"2");g=document.createElement("tr");var m=document.createElement("td");m.style.fontSize="10pt";m.style.width="100px";mxUtils.write(m,mxResources.get("filename")+":");g.appendChild(m);var r=document.createElement("input");r.setAttribute("value",a.editor.getOrCreateFilename());r.style.width="180px";m=document.createElement("td");m.appendChild(r);g.appendChild(m);
u.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("format")+":");g.appendChild(m);var x=document.createElement("select");x.style.width="180px";m=document.createElement("option");m.setAttribute("value","png");mxUtils.write(m,mxResources.get("formatPng"));x.appendChild(m);m=document.createElement("option");ExportDialog.showGifOption&&(m.setAttribute("value","gif"),mxUtils.write(m,mxResources.get("formatGif")),x.appendChild(m));
m=document.createElement("option");m.setAttribute("value","jpg");mxUtils.write(m,mxResources.get("formatJpg"));x.appendChild(m);m=document.createElement("option");m.setAttribute("value","pdf");mxUtils.write(m,mxResources.get("formatPdf"));x.appendChild(m);m=document.createElement("option");m.setAttribute("value","svg");mxUtils.write(m,mxResources.get("formatSvg"));x.appendChild(m);ExportDialog.showXmlOption&&(m=document.createElement("option"),m.setAttribute("value","xml"),mxUtils.write(m,mxResources.get("formatXml")),
x.appendChild(m));m=document.createElement("td");m.appendChild(x);g.appendChild(m);u.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("zoom")+" (%):");g.appendChild(m);var B=document.createElement("input");B.setAttribute("type","number");B.setAttribute("value","100");B.style.width="180px";m=document.createElement("td");m.appendChild(B);g.appendChild(m);u.appendChild(g);g=document.createElement("tr");m=document.createElement("td");
-m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("width")+":");g.appendChild(m);var C=document.createElement("input");C.setAttribute("value",k);C.style.width="180px";m=document.createElement("td");m.appendChild(C);g.appendChild(m);u.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("height")+":");g.appendChild(m);var G=document.createElement("input");G.setAttribute("value",n);G.style.width="180px";m=document.createElement("td");
-m.appendChild(G);g.appendChild(m);u.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("dpi")+":");g.appendChild(m);var J=document.createElement("select");J.style.width="180px";m=document.createElement("option");m.setAttribute("value","100");mxUtils.write(m,"100dpi");J.appendChild(m);m=document.createElement("option");m.setAttribute("value","200");mxUtils.write(m,"200dpi");J.appendChild(m);m=document.createElement("option");
+m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("width")+":");g.appendChild(m);var C=document.createElement("input");C.setAttribute("value",k);C.style.width="180px";m=document.createElement("td");m.appendChild(C);g.appendChild(m);u.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("height")+":");g.appendChild(m);var F=document.createElement("input");F.setAttribute("value",n);F.style.width="180px";m=document.createElement("td");
+m.appendChild(F);g.appendChild(m);u.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("dpi")+":");g.appendChild(m);var J=document.createElement("select");J.style.width="180px";m=document.createElement("option");m.setAttribute("value","100");mxUtils.write(m,"100dpi");J.appendChild(m);m=document.createElement("option");m.setAttribute("value","200");mxUtils.write(m,"200dpi");J.appendChild(m);m=document.createElement("option");
m.setAttribute("value","300");mxUtils.write(m,"300dpi");J.appendChild(m);m=document.createElement("option");m.setAttribute("value","400");mxUtils.write(m,"400dpi");J.appendChild(m);m=document.createElement("option");m.setAttribute("value","custom");mxUtils.write(m,mxResources.get("custom"));J.appendChild(m);var D=document.createElement("input");D.style.width="180px";D.style.display="none";D.setAttribute("value","100");D.setAttribute("type","number");D.setAttribute("min","50");D.setAttribute("step",
"50");var N=!1;mxEvent.addListener(J,"change",function(){"custom"==this.value?(this.style.display="none",D.style.display="",D.focus()):(D.value=this.value,N||(B.value=this.value))});mxEvent.addListener(D,"change",function(){var V=parseInt(D.value);isNaN(V)||0>=V?D.style.backgroundColor="red":(D.style.backgroundColor="",N||(B.value=V))});m=document.createElement("td");m.appendChild(J);m.appendChild(D);g.appendChild(m);u.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.style.fontSize=
-"10pt";mxUtils.write(m,mxResources.get("background")+":");g.appendChild(m);var Q=document.createElement("input");Q.setAttribute("type","checkbox");Q.checked=null==d.background||d.background==mxConstants.NONE;m=document.createElement("td");m.appendChild(Q);mxUtils.write(m,mxResources.get("transparent"));g.appendChild(m);u.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("grid")+":");g.appendChild(m);var R=document.createElement("input");
-R.setAttribute("type","checkbox");R.checked=!1;m=document.createElement("td");m.appendChild(R);g.appendChild(m);u.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("borderWidth")+":");g.appendChild(m);var P=document.createElement("input");P.setAttribute("type","number");P.setAttribute("value",ExportDialog.lastBorderValue);P.style.width="180px";m=document.createElement("td");m.appendChild(P);g.appendChild(m);u.appendChild(g);
-e.appendChild(u);mxEvent.addListener(x,"change",b);b();mxEvent.addListener(B,"change",function(){N=!0;var V=Math.max(0,parseFloat(B.value)||100)/100;B.value=parseFloat((100*V).toFixed(2));0<k?(C.value=Math.floor(k*V),G.value=Math.floor(n*V)):(B.value="100",C.value=k,G.value=n);f()});mxEvent.addListener(C,"change",function(){var V=parseInt(C.value)/k;0<V?(B.value=parseFloat((100*V).toFixed(2)),G.value=Math.floor(n*V)):(B.value="100",C.value=k,G.value=n);f()});mxEvent.addListener(G,"change",function(){var V=
-parseInt(G.value)/n;0<V?(B.value=parseFloat((100*V).toFixed(2)),C.value=Math.floor(k*V)):(B.value="100",C.value=k,G.value=n);f()});g=document.createElement("tr");m=document.createElement("td");m.setAttribute("align","right");m.style.paddingTop="22px";m.colSpan=2;var Z=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(B.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var V=r.value,ia=x.value,ha=Math.max(0,parseFloat(B.value)||100)/100,ba=Math.max(0,parseInt(P.value)),
-qa=d.background,O=Math.max(1,parseInt(D.value));if(("svg"==ia||"png"==ia||"pdf"==ia)&&Q.checked)qa=null;else if(null==qa||qa==mxConstants.NONE)qa="#ffffff";ExportDialog.lastBorderValue=ba;ExportDialog.exportFile(a,V,ia,qa,ha,ba,O,R.checked)}}));Z.className="geBtn gePrimaryBtn";var U=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});U.className="geBtn";a.editor.cancelFirst?(m.appendChild(U),m.appendChild(Z)):(m.appendChild(Z),m.appendChild(U));g.appendChild(m);u.appendChild(g);e.appendChild(u);
-this.container=e};ExportDialog.lastBorderValue=0;ExportDialog.showGifOption=!0;ExportDialog.showXmlOption=!0;
-ExportDialog.exportFile=function(a,b,f,d,g,e,k,n){n=a.editor.graph;if("xml"==f)ExportDialog.saveLocalFile(a,mxUtils.getXml(a.editor.getGraphXml()),b,f);else if("svg"==f)ExportDialog.saveLocalFile(a,mxUtils.getXml(n.getSvg(d,g,e)),b,f);else{var u=n.getGraphBounds(),m=mxUtils.createXmlDocument(),r=m.createElement("output");m.appendChild(r);m=new mxXmlCanvas2D(r);m.translate(Math.floor((e/g-u.x)/n.view.scale),Math.floor((e/g-u.y)/n.view.scale));m.scale(g/n.view.scale);(new mxImageExport).drawState(n.getView().getState(n.model.root),
-m);r="xml="+encodeURIComponent(mxUtils.getXml(r));m=Math.ceil(u.width*g/n.view.scale+2*e);g=Math.ceil(u.height*g/n.view.scale+2*e);r.length<=MAX_REQUEST_SIZE&&m*g<MAX_AREA?(a.hideDialog(),(new mxXmlRequest(EXPORT_URL,"format="+f+"&filename="+encodeURIComponent(b)+"&bg="+(null!=d?d:"none")+"&w="+m+"&h="+g+"&"+r+"&dpi="+k)).simulate(document,"_blank")):mxUtils.alert(mxResources.get("drawingTooLarge"))}};
-ExportDialog.saveLocalFile=function(a,b,f,d){b.length<MAX_REQUEST_SIZE?(a.hideDialog(),(new mxXmlRequest(SAVE_URL,"xml="+encodeURIComponent(b)+"&filename="+encodeURIComponent(f)+"&format="+d)).simulate(document,"_blank")):(mxUtils.alert(mxResources.get("drawingTooLarge")),mxUtils.popup(xml))};
-var EditDataDialog=function(a,b){function f(){0<R.value.length?P.removeAttribute("disabled"):P.setAttribute("disabled","disabled")}var d=document.createElement("div"),g=a.editor.graph,e=g.getModel().getValue(b);if(!mxUtils.isNode(e)){var k=mxUtils.createXmlDocument().createElement("object");k.setAttribute("label",e||"");e=k}var n={};try{var u=mxUtils.getValue(a.editor.graph.getCurrentCellStyle(b),"metaData",null);null!=u&&(n=JSON.parse(u))}catch(U){}var m=new mxForm("properties");m.table.style.width=
-"100%";var r=e.attributes,x=[],B=[],C=0,G=null!=EditDataDialog.getDisplayIdForCell?EditDataDialog.getDisplayIdForCell(a,b):null,J=function(U,V){var ia=document.createElement("div");ia.style.position="relative";ia.style.paddingRight="20px";ia.style.boxSizing="border-box";ia.style.width="100%";var ha=document.createElement("a"),ba=mxUtils.createImage(Dialog.prototype.closeImage);ba.style.height="9px";ba.style.fontSize="9px";ba.style.marginBottom=mxClient.IS_IE11?"-1px":"5px";ha.className="geButton";
-ha.setAttribute("title",mxResources.get("delete"));ha.style.position="absolute";ha.style.top="4px";ha.style.right="0px";ha.style.margin="0px";ha.style.width="9px";ha.style.height="9px";ha.style.cursor="pointer";ha.appendChild(ba);V=function(qa){return function(){for(var O=0,S=0;S<x.length;S++){if(x[S]==qa){B[S]=null;m.table.deleteRow(O+(null!=G?1:0));break}null!=B[S]&&O++}}}(V);mxEvent.addListener(ha,"click",V);V=U.parentNode;ia.appendChild(U);ia.appendChild(ha);V.appendChild(ia)};k=function(U,V,
-ia){x[U]=V;B[U]=m.addTextarea(x[C]+":",ia,2);B[U].style.width="100%";0<ia.indexOf("\n")&&B[U].setAttribute("rows","2");J(B[U],V);null!=n[V]&&0==n[V].editable&&B[U].setAttribute("disabled","disabled")};u=[];for(var D=g.getModel().getParent(b)==g.getModel().getRoot(),N=0;N<r.length;N++)!D&&"label"==r[N].nodeName||"placeholders"==r[N].nodeName||u.push({name:r[N].nodeName,value:r[N].nodeValue});u.sort(function(U,V){return U.name<V.name?-1:U.name>V.name?1:0});if(null!=G){r=document.createElement("div");
-r.style.width="100%";r.style.fontSize="11px";r.style.textAlign="center";mxUtils.write(r,G);var Q=m.addField(mxResources.get("id")+":",r);mxEvent.addListener(r,"dblclick",function(U){mxEvent.isShiftDown(U)&&(U=new FilenameDialog(a,G,mxResources.get("apply"),mxUtils.bind(this,function(V){null!=V&&0<V.length&&V!=G&&(null==g.getModel().getCell(V)?(g.getModel().cellRemoved(b),b.setId(V),G=V,Q.innerHTML=mxUtils.htmlEntities(V),g.getModel().cellAdded(b)):a.handleError({message:mxResources.get("alreadyExst",
+"10pt";mxUtils.write(m,mxResources.get("background")+":");g.appendChild(m);var S=document.createElement("input");S.setAttribute("type","checkbox");S.checked=null==e.background||e.background==mxConstants.NONE;m=document.createElement("td");m.appendChild(S);mxUtils.write(m,mxResources.get("transparent"));g.appendChild(m);u.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("grid")+":");g.appendChild(m);var T=document.createElement("input");
+T.setAttribute("type","checkbox");T.checked=!1;m=document.createElement("td");m.appendChild(T);g.appendChild(m);u.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("borderWidth")+":");g.appendChild(m);var P=document.createElement("input");P.setAttribute("type","number");P.setAttribute("value",ExportDialog.lastBorderValue);P.style.width="180px";m=document.createElement("td");m.appendChild(P);g.appendChild(m);u.appendChild(g);
+d.appendChild(u);mxEvent.addListener(x,"change",b);b();mxEvent.addListener(B,"change",function(){N=!0;var V=Math.max(0,parseFloat(B.value)||100)/100;B.value=parseFloat((100*V).toFixed(2));0<k?(C.value=Math.floor(k*V),F.value=Math.floor(n*V)):(B.value="100",C.value=k,F.value=n);f()});mxEvent.addListener(C,"change",function(){var V=parseInt(C.value)/k;0<V?(B.value=parseFloat((100*V).toFixed(2)),F.value=Math.floor(n*V)):(B.value="100",C.value=k,F.value=n);f()});mxEvent.addListener(F,"change",function(){var V=
+parseInt(F.value)/n;0<V?(B.value=parseFloat((100*V).toFixed(2)),C.value=Math.floor(k*V)):(B.value="100",C.value=k,F.value=n);f()});g=document.createElement("tr");m=document.createElement("td");m.setAttribute("align","right");m.style.paddingTop="22px";m.colSpan=2;var Z=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(B.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var V=r.value,aa=x.value,ia=Math.max(0,parseFloat(B.value)||100)/100,ea=Math.max(0,parseInt(P.value)),
+qa=e.background,O=Math.max(1,parseInt(D.value));if(("svg"==aa||"png"==aa||"pdf"==aa)&&S.checked)qa=null;else if(null==qa||qa==mxConstants.NONE)qa="#ffffff";ExportDialog.lastBorderValue=ea;ExportDialog.exportFile(a,V,aa,qa,ia,ea,O,T.checked)}}));Z.className="geBtn gePrimaryBtn";var U=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});U.className="geBtn";a.editor.cancelFirst?(m.appendChild(U),m.appendChild(Z)):(m.appendChild(Z),m.appendChild(U));g.appendChild(m);u.appendChild(g);d.appendChild(u);
+this.container=d};ExportDialog.lastBorderValue=0;ExportDialog.showGifOption=!0;ExportDialog.showXmlOption=!0;
+ExportDialog.exportFile=function(a,b,f,e,g,d,k,n){n=a.editor.graph;if("xml"==f)ExportDialog.saveLocalFile(a,mxUtils.getXml(a.editor.getGraphXml()),b,f);else if("svg"==f)ExportDialog.saveLocalFile(a,mxUtils.getXml(n.getSvg(e,g,d)),b,f);else{var u=n.getGraphBounds(),m=mxUtils.createXmlDocument(),r=m.createElement("output");m.appendChild(r);m=new mxXmlCanvas2D(r);m.translate(Math.floor((d/g-u.x)/n.view.scale),Math.floor((d/g-u.y)/n.view.scale));m.scale(g/n.view.scale);(new mxImageExport).drawState(n.getView().getState(n.model.root),
+m);r="xml="+encodeURIComponent(mxUtils.getXml(r));m=Math.ceil(u.width*g/n.view.scale+2*d);g=Math.ceil(u.height*g/n.view.scale+2*d);r.length<=MAX_REQUEST_SIZE&&m*g<MAX_AREA?(a.hideDialog(),(new mxXmlRequest(EXPORT_URL,"format="+f+"&filename="+encodeURIComponent(b)+"&bg="+(null!=e?e:"none")+"&w="+m+"&h="+g+"&"+r+"&dpi="+k)).simulate(document,"_blank")):mxUtils.alert(mxResources.get("drawingTooLarge"))}};
+ExportDialog.saveLocalFile=function(a,b,f,e){b.length<MAX_REQUEST_SIZE?(a.hideDialog(),(new mxXmlRequest(SAVE_URL,"xml="+encodeURIComponent(b)+"&filename="+encodeURIComponent(f)+"&format="+e)).simulate(document,"_blank")):(mxUtils.alert(mxResources.get("drawingTooLarge")),mxUtils.popup(xml))};
+var EditDataDialog=function(a,b){function f(){0<T.value.length?P.removeAttribute("disabled"):P.setAttribute("disabled","disabled")}var e=document.createElement("div"),g=a.editor.graph,d=g.getModel().getValue(b);if(!mxUtils.isNode(d)){var k=mxUtils.createXmlDocument().createElement("object");k.setAttribute("label",d||"");d=k}var n={};try{var u=mxUtils.getValue(a.editor.graph.getCurrentCellStyle(b),"metaData",null);null!=u&&(n=JSON.parse(u))}catch(U){}var m=new mxForm("properties");m.table.style.width=
+"100%";var r=d.attributes,x=[],B=[],C=0,F=null!=EditDataDialog.getDisplayIdForCell?EditDataDialog.getDisplayIdForCell(a,b):null,J=function(U,V){var aa=document.createElement("div");aa.style.position="relative";aa.style.paddingRight="20px";aa.style.boxSizing="border-box";aa.style.width="100%";var ia=document.createElement("a"),ea=mxUtils.createImage(Dialog.prototype.closeImage);ea.style.height="9px";ea.style.fontSize="9px";ea.style.marginBottom=mxClient.IS_IE11?"-1px":"5px";ia.className="geButton";
+ia.setAttribute("title",mxResources.get("delete"));ia.style.position="absolute";ia.style.top="4px";ia.style.right="0px";ia.style.margin="0px";ia.style.width="9px";ia.style.height="9px";ia.style.cursor="pointer";ia.appendChild(ea);V=function(qa){return function(){for(var O=0,R=0;R<x.length;R++){if(x[R]==qa){B[R]=null;m.table.deleteRow(O+(null!=F?1:0));break}null!=B[R]&&O++}}}(V);mxEvent.addListener(ia,"click",V);V=U.parentNode;aa.appendChild(U);aa.appendChild(ia);V.appendChild(aa)};k=function(U,V,
+aa){x[U]=V;B[U]=m.addTextarea(x[C]+":",aa,2);B[U].style.width="100%";0<aa.indexOf("\n")&&B[U].setAttribute("rows","2");J(B[U],V);null!=n[V]&&0==n[V].editable&&B[U].setAttribute("disabled","disabled")};u=[];for(var D=g.getModel().getParent(b)==g.getModel().getRoot(),N=0;N<r.length;N++)!D&&"label"==r[N].nodeName||"placeholders"==r[N].nodeName||u.push({name:r[N].nodeName,value:r[N].nodeValue});u.sort(function(U,V){return U.name<V.name?-1:U.name>V.name?1:0});if(null!=F){r=document.createElement("div");
+r.style.width="100%";r.style.fontSize="11px";r.style.textAlign="center";mxUtils.write(r,F);var S=m.addField(mxResources.get("id")+":",r);mxEvent.addListener(r,"dblclick",function(U){mxEvent.isShiftDown(U)&&(U=new FilenameDialog(a,F,mxResources.get("apply"),mxUtils.bind(this,function(V){null!=V&&0<V.length&&V!=F&&(null==g.getModel().getCell(V)?(g.getModel().cellRemoved(b),b.setId(V),F=V,S.innerHTML=mxUtils.htmlEntities(V),g.getModel().cellAdded(b)):a.handleError({message:mxResources.get("alreadyExst",
[V])}))}),mxResources.get("id")),a.showDialog(U.container,300,80,!0,!0),U.init())});r.setAttribute("title","Shift+Double Click to Edit ID")}for(N=0;N<u.length;N++)k(C,u[N].name,u[N].value),C++;u=document.createElement("div");u.style.position="absolute";u.style.top="30px";u.style.left="30px";u.style.right="30px";u.style.bottom="80px";u.style.overflowY="auto";u.appendChild(m.table);k=document.createElement("div");k.style.boxSizing="border-box";k.style.paddingRight="160px";k.style.whiteSpace="nowrap";
-k.style.marginTop="6px";k.style.width="100%";var R=document.createElement("input");R.setAttribute("placeholder",mxResources.get("enterPropertyName"));R.setAttribute("type","text");R.setAttribute("size",mxClient.IS_IE||mxClient.IS_IE11?"36":"40");R.style.boxSizing="border-box";R.style.marginLeft="2px";R.style.width="100%";k.appendChild(R);u.appendChild(k);d.appendChild(u);var P=mxUtils.button(mxResources.get("addProperty"),function(){var U=R.value;if(0<U.length&&"label"!=U&&"placeholders"!=U&&0>U.indexOf(":"))try{var V=
-mxUtils.indexOf(x,U);if(0<=V&&null!=B[V])B[V].focus();else{e.cloneNode(!1).setAttribute(U,"");0<=V&&(x.splice(V,1),B.splice(V,1));x.push(U);var ia=m.addTextarea(U+":","",2);ia.style.width="100%";B.push(ia);J(ia,U);ia.focus()}P.setAttribute("disabled","disabled");R.value=""}catch(ha){mxUtils.alert(ha)}else mxUtils.alert(mxResources.get("invalidName"))});mxEvent.addListener(R,"keypress",function(U){13==U.keyCode&&P.click()});this.init=function(){0<B.length?B[0].focus():R.focus()};P.setAttribute("title",
-mxResources.get("addProperty"));P.setAttribute("disabled","disabled");P.style.textOverflow="ellipsis";P.style.position="absolute";P.style.overflow="hidden";P.style.width="144px";P.style.right="0px";P.className="geBtn";k.appendChild(P);u=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog.apply(a,arguments)});u.setAttribute("title","Escape");u.className="geBtn";var Z=mxUtils.button(mxResources.get("apply"),function(){try{a.hideDialog.apply(a,arguments);e=e.cloneNode(!0);for(var U=!1,V=
-0;V<x.length;V++)null==B[V]?e.removeAttribute(x[V]):(e.setAttribute(x[V],B[V].value),U=U||"placeholder"==x[V]&&"1"==e.getAttribute("placeholders"));U&&e.removeAttribute("label");g.getModel().setValue(b,e)}catch(ia){mxUtils.alert(ia)}});Z.setAttribute("title","Ctrl+Enter");Z.className="geBtn gePrimaryBtn";mxEvent.addListener(d,"keypress",function(U){13==U.keyCode&&mxEvent.isControlDown(U)&&Z.click()});mxEvent.addListener(R,"keyup",f);mxEvent.addListener(R,"change",f);k=document.createElement("div");
-k.style.cssText="position:absolute;left:30px;right:30px;text-align:right;bottom:30px;height:40px;";if(a.editor.graph.getModel().isVertex(b)||a.editor.graph.getModel().isEdge(b))r=document.createElement("span"),r.style.marginRight="10px",D=document.createElement("input"),D.setAttribute("type","checkbox"),D.style.marginRight="6px","1"==e.getAttribute("placeholders")&&(D.setAttribute("checked","checked"),D.defaultChecked=!0),mxEvent.addListener(D,"click",function(){"1"==e.getAttribute("placeholders")?
-e.removeAttribute("placeholders"):e.setAttribute("placeholders","1")}),r.appendChild(D),mxUtils.write(r,mxResources.get("placeholders")),null!=EditDataDialog.placeholderHelpLink&&(D=document.createElement("a"),D.setAttribute("href",EditDataDialog.placeholderHelpLink),D.setAttribute("title",mxResources.get("help")),D.setAttribute("target","_blank"),D.style.marginLeft="8px",D.style.cursor="help",N=document.createElement("img"),mxUtils.setOpacity(N,50),N.style.height="16px",N.style.width="16px",N.setAttribute("border",
-"0"),N.setAttribute("valign","middle"),N.style.marginTop=mxClient.IS_IE11?"0px":"-4px",N.setAttribute("src",Editor.helpImage),D.appendChild(N),r.appendChild(D)),k.appendChild(r);a.editor.cancelFirst?(k.appendChild(u),k.appendChild(Z)):(k.appendChild(Z),k.appendChild(u));d.appendChild(k);this.container=d};EditDataDialog.getDisplayIdForCell=function(a,b){var f=null;null!=a.editor.graph.getModel().getParent(b)&&(f=b.getId());return f};EditDataDialog.placeholderHelpLink=null;
-var LinkDialog=function(a,b,f,d){var g=document.createElement("div");mxUtils.write(g,mxResources.get("editLink")+":");var 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 k=document.createElement("input");k.setAttribute("value",b);k.setAttribute("placeholder","http://www.example.com/");k.setAttribute("type","text");
+k.style.marginTop="6px";k.style.width="100%";var T=document.createElement("input");T.setAttribute("placeholder",mxResources.get("enterPropertyName"));T.setAttribute("type","text");T.setAttribute("size",mxClient.IS_IE||mxClient.IS_IE11?"36":"40");T.style.boxSizing="border-box";T.style.marginLeft="2px";T.style.width="100%";k.appendChild(T);u.appendChild(k);e.appendChild(u);var P=mxUtils.button(mxResources.get("addProperty"),function(){var U=T.value;if(0<U.length&&"label"!=U&&"placeholders"!=U&&0>U.indexOf(":"))try{var V=
+mxUtils.indexOf(x,U);if(0<=V&&null!=B[V])B[V].focus();else{d.cloneNode(!1).setAttribute(U,"");0<=V&&(x.splice(V,1),B.splice(V,1));x.push(U);var aa=m.addTextarea(U+":","",2);aa.style.width="100%";B.push(aa);J(aa,U);aa.focus()}P.setAttribute("disabled","disabled");T.value=""}catch(ia){mxUtils.alert(ia)}else mxUtils.alert(mxResources.get("invalidName"))});mxEvent.addListener(T,"keypress",function(U){13==U.keyCode&&P.click()});this.init=function(){0<B.length?B[0].focus():T.focus()};P.setAttribute("title",
+mxResources.get("addProperty"));P.setAttribute("disabled","disabled");P.style.textOverflow="ellipsis";P.style.position="absolute";P.style.overflow="hidden";P.style.width="144px";P.style.right="0px";P.className="geBtn";k.appendChild(P);u=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog.apply(a,arguments)});u.setAttribute("title","Escape");u.className="geBtn";var Z=mxUtils.button(mxResources.get("apply"),function(){try{a.hideDialog.apply(a,arguments);d=d.cloneNode(!0);for(var U=!1,V=
+0;V<x.length;V++)null==B[V]?d.removeAttribute(x[V]):(d.setAttribute(x[V],B[V].value),U=U||"placeholder"==x[V]&&"1"==d.getAttribute("placeholders"));U&&d.removeAttribute("label");g.getModel().setValue(b,d)}catch(aa){mxUtils.alert(aa)}});Z.setAttribute("title","Ctrl+Enter");Z.className="geBtn gePrimaryBtn";mxEvent.addListener(e,"keypress",function(U){13==U.keyCode&&mxEvent.isControlDown(U)&&Z.click()});mxEvent.addListener(T,"keyup",f);mxEvent.addListener(T,"change",f);k=document.createElement("div");
+k.style.cssText="position:absolute;left:30px;right:30px;text-align:right;bottom:30px;height:40px;";if(a.editor.graph.getModel().isVertex(b)||a.editor.graph.getModel().isEdge(b))r=document.createElement("span"),r.style.marginRight="10px",D=document.createElement("input"),D.setAttribute("type","checkbox"),D.style.marginRight="6px","1"==d.getAttribute("placeholders")&&(D.setAttribute("checked","checked"),D.defaultChecked=!0),mxEvent.addListener(D,"click",function(){"1"==d.getAttribute("placeholders")?
+d.removeAttribute("placeholders"):d.setAttribute("placeholders","1")}),r.appendChild(D),mxUtils.write(r,mxResources.get("placeholders")),null!=EditDataDialog.placeholderHelpLink&&(D=document.createElement("a"),D.setAttribute("href",EditDataDialog.placeholderHelpLink),D.setAttribute("title",mxResources.get("help")),D.setAttribute("target","_blank"),D.style.marginLeft="8px",D.style.cursor="help",N=document.createElement("img"),mxUtils.setOpacity(N,50),N.style.height="16px",N.style.width="16px",N.setAttribute("border",
+"0"),N.setAttribute("valign","middle"),N.style.marginTop=mxClient.IS_IE11?"0px":"-4px",N.setAttribute("src",Editor.helpImage),D.appendChild(N),r.appendChild(D)),k.appendChild(r);a.editor.cancelFirst?(k.appendChild(u),k.appendChild(Z)):(k.appendChild(Z),k.appendChild(u));e.appendChild(k);this.container=e};EditDataDialog.getDisplayIdForCell=function(a,b){var f=null;null!=a.editor.graph.getModel().getParent(b)&&(f=b.getId());return f};EditDataDialog.placeholderHelpLink=null;
+var LinkDialog=function(a,b,f,e){var g=document.createElement("div");mxUtils.write(g,mxResources.get("editLink")+":");var d=document.createElement("div");d.className="geTitle";d.style.backgroundColor="transparent";d.style.borderColor="transparent";d.style.whiteSpace="nowrap";d.style.textOverflow="clip";d.style.cursor="default";d.style.paddingRight="20px";var k=document.createElement("input");k.setAttribute("value",b);k.setAttribute("placeholder","http://www.example.com/");k.setAttribute("type","text");
k.style.marginTop="6px";k.style.width="400px";k.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";k.style.backgroundRepeat="no-repeat";k.style.backgroundPosition="100% 50%";k.style.paddingRight="14px";b=document.createElement("div");b.setAttribute("title",mxResources.get("reset"));b.style.position="relative";b.style.left="-16px";b.style.width="12px";b.style.height="14px";b.style.cursor="pointer";b.style.display="inline-block";b.style.top="3px";b.style.background="url("+IMAGE_PATH+"/transparent.gif)";
-mxEvent.addListener(b,"click",function(){k.value="";k.focus()});e.appendChild(k);e.appendChild(b);g.appendChild(e);this.init=function(){k.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?k.select():document.execCommand("selectAll",!1,null)};e=document.createElement("div");e.style.marginTop="18px";e.style.textAlign="right";mxEvent.addListener(k,"keypress",function(n){13==n.keyCode&&(a.hideDialog(),d(k.value))});b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
-b.className="geBtn";a.editor.cancelFirst&&e.appendChild(b);f=mxUtils.button(f,function(){a.hideDialog();d(k.value)});f.className="geBtn gePrimaryBtn";e.appendChild(f);a.editor.cancelFirst||e.appendChild(b);g.appendChild(e);this.container=g},OutlineWindow=function(a,b,f,d,g){var e=a.editor.graph,k=document.createElement("div");k.style.position="absolute";k.style.width="100%";k.style.height="100%";k.style.overflow="hidden";this.window=new mxWindow(mxResources.get("outline"),k,b,f,d,g,!0,!0);this.window.minimumSize=
-new mxRectangle(0,0,80,80);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.setLocation=function(m,r){var x=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;m=Math.max(0,Math.min(m,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));r=Math.max(0,Math.min(r,x-this.table.clientHeight-("1"==urlParams.sketch?
-3:48)));this.getX()==m&&this.getY()==r||mxWindow.prototype.setLocation.apply(this,arguments)};var n=mxUtils.bind(this,function(){var m=this.window.getX(),r=this.window.getY();this.window.setLocation(m,r)});mxEvent.addListener(window,"resize",n);var u=a.createOutline(this.window);this.destroy=function(){mxEvent.removeListener(window,"resize",n);this.window.destroy();u.destroy()};this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit();u.setSuspended(!1)}));this.window.addListener(mxEvent.HIDE,
-mxUtils.bind(this,function(){u.setSuspended(!0)}));this.window.addListener(mxEvent.NORMALIZE,mxUtils.bind(this,function(){u.setSuspended(!1)}));this.window.addListener(mxEvent.MINIMIZE,mxUtils.bind(this,function(){u.setSuspended(!0)}));u.init(k);a.actions.get("zoomIn");a.actions.get("zoomOut");mxEvent.addMouseWheelListener(function(m,r){for(var x=!1,B=mxEvent.getSource(m);null!=B;){if(B==u.svg){x=!0;break}B=B.parentNode}x&&(x=e.zoomFactor,null!=m.deltaY&&Math.round(m.deltaY)!=m.deltaY&&(x=1+Math.abs(m.deltaY)/
-20*(x-1)),e.lazyZoom(r,null,null,x),mxEvent.consume(m))})},LayersWindow=function(a,b,f,d,g){function e(ha){if(u.isEnabled()&&null!=ha){var ba=u.convertValueToString(ha);ba=new FilenameDialog(a,ba||mxResources.get("background"),mxResources.get("rename"),mxUtils.bind(this,function(qa){null!=qa&&u.cellLabelChanged(ha,qa)}),mxResources.get("enterName"));a.showDialog(ba.container,300,100,!0,!0);ba.init()}}function k(){var ha=U.get(u.getLayerForCells(u.getSelectionCells()));null!=ha?ha.appendChild(V):null!=
-V.parentNode&&V.parentNode.removeChild(V)}function n(){function ha(O,S,F,L){var T=document.createElement("div");T.className="geToolbarContainer";U.put(F,T);T.style.overflow="hidden";T.style.position="relative";T.style.padding="4px";T.style.height="22px";T.style.display="block";T.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";T.style.borderWidth="0px 0px 1px 0px";T.style.borderColor="#c3c3c3";T.style.borderStyle="solid";T.style.whiteSpace="nowrap";T.setAttribute("title",
-S);var ca=document.createElement("div");ca.style.display="inline-block";ca.style.width="100%";ca.style.textOverflow="ellipsis";ca.style.overflow="hidden";mxEvent.addListener(T,"dragover",function(W){W.dataTransfer.dropEffect="move";C=O;W.stopPropagation();W.preventDefault()});mxEvent.addListener(T,"dragstart",function(W){B=T;mxClient.IS_FF&&W.dataTransfer.setData("Text","<layer/>")});mxEvent.addListener(T,"dragend",function(W){null!=B&&null!=C&&u.addCell(F,u.model.root,C);C=B=null;W.stopPropagation();
-W.preventDefault()});var fa=document.createElement("img");fa.setAttribute("draggable","false");fa.setAttribute("align","top");fa.setAttribute("border","0");fa.style.width="16px";fa.style.padding="0px 6px 0 4px";fa.style.marginTop="2px";fa.style.cursor="pointer";fa.setAttribute("title",mxResources.get(u.model.isVisible(F)?"hide":"show"));u.model.isVisible(F)?(fa.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(T,75)):(fa.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(T,25));Editor.isDarkMode()&&
-(fa.style.filter="invert(100%)");ca.appendChild(fa);mxEvent.addListener(fa,"click",function(W){u.model.setVisible(F,!u.model.isVisible(F));mxEvent.consume(W)});fa=document.createElement("img");fa.setAttribute("draggable","false");fa.setAttribute("align","top");fa.setAttribute("border","0");fa.style.width="16px";fa.style.padding="0px 6px 0 0";fa.style.marginTop="2px";fa.setAttribute("title",mxResources.get("lockUnlock"));var wa=u.getCurrentCellStyle(F);"1"==mxUtils.getValue(wa,"locked","0")?(fa.setAttribute("src",
-Editor.lockedImage),mxUtils.setOpacity(fa,75)):(fa.setAttribute("src",Editor.unlockedImage),mxUtils.setOpacity(fa,25));Editor.isDarkMode()&&(fa.style.filter="invert(100%)");u.isEnabled()&&(fa.style.cursor="pointer");mxEvent.addListener(fa,"click",function(W){if(u.isEnabled()){var aa=null;u.getModel().beginUpdate();try{aa="1"==mxUtils.getValue(wa,"locked","0")?null:"1",u.setCellStyles("locked",aa,[F])}finally{u.getModel().endUpdate()}"1"==aa&&u.removeSelectionCells(u.getModel().getDescendants(F));
-mxEvent.consume(W)}});ca.appendChild(fa);fa=document.createElement("span");mxUtils.write(fa,S);fa.style.display="block";fa.style.whiteSpace="nowrap";fa.style.overflow="hidden";fa.style.textOverflow="ellipsis";fa.style.position="absolute";fa.style.left="52px";fa.style.right="8px";fa.style.top="8px";ca.appendChild(fa);T.appendChild(ca);if(u.isEnabled()){if(mxClient.IS_TOUCH||mxClient.IS_POINTER||mxClient.IS_IE&&10>document.documentMode)S=document.createElement("div"),S.style.display="block",S.style.textAlign=
-"right",S.style.whiteSpace="nowrap",S.style.position="absolute",S.style.right="16px",S.style.top="6px",0<O&&(ca=document.createElement("a"),ca.setAttribute("title",mxResources.get("toBack")),ca.className="geButton",ca.style.cssFloat="none",ca.innerHTML="&#9660;",ca.style.width="14px",ca.style.height="14px",ca.style.fontSize="14px",ca.style.margin="0px",ca.style.marginTop="-1px",S.appendChild(ca),mxEvent.addListener(ca,"click",function(W){u.isEnabled()&&u.addCell(F,u.model.root,O-1);mxEvent.consume(W)})),
-0<=O&&O<G-1&&(ca=document.createElement("a"),ca.setAttribute("title",mxResources.get("toFront")),ca.className="geButton",ca.style.cssFloat="none",ca.innerHTML="&#9650;",ca.style.width="14px",ca.style.height="14px",ca.style.fontSize="14px",ca.style.margin="0px",ca.style.marginTop="-1px",S.appendChild(ca),mxEvent.addListener(ca,"click",function(W){u.isEnabled()&&u.addCell(F,u.model.root,O+1);mxEvent.consume(W)})),T.appendChild(S);mxClient.IS_SVG&&(!mxClient.IS_IE||10<=document.documentMode)&&(T.setAttribute("draggable",
-"true"),T.style.cursor="move")}mxEvent.addListener(T,"dblclick",function(W){var aa=mxEvent.getSource(W).nodeName;"INPUT"!=aa&&"IMG"!=aa&&(e(F),mxEvent.consume(W))});u.getDefaultParent()==F&&(T.style.background=Editor.isDarkMode()?"#505759":"#e6eff8",T.style.fontWeight=u.isEnabled()?"bold":"",J=F);mxEvent.addListener(T,"click",function(W){u.isEnabled()&&(u.setDefaultParent(L),u.view.setCurrentRoot(null),mxEvent.isShiftDown(W)&&u.setSelectionCells(F.children),mxEvent.consume(W))});x.appendChild(T)}
-G=u.model.getChildCount(u.model.root);x.innerText="";U.clear();for(var ba=G-1;0<=ba;ba--)mxUtils.bind(this,function(O){ha(ba,u.convertValueToString(O)||mxResources.get("background"),O,O)})(u.model.getChildAt(u.model.root,ba));var qa=u.convertValueToString(J)||mxResources.get("background");Q.setAttribute("title",mxResources.get("removeIt",[qa]));Z.setAttribute("title",mxResources.get("duplicateIt",[qa]));u.isSelectionEmpty()&&(R.className="geButton mxDisabled");k()}var u=a.editor.graph,m=document.createElement("div");
-m.style.userSelect="none";m.style.background=Editor.isDarkMode()?Dialog.backdropColor:"#fff";m.style.border="1px solid whiteSmoke";m.style.height="100%";m.style.marginBottom="10px";m.style.overflow="auto";var r=EditorUi.compactUi?"26px":"30px",x=document.createElement("div");x.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"#fff";x.style.position="absolute";x.style.overflow="auto";x.style.left="0px";x.style.right="0px";x.style.top="0px";x.style.bottom=parseInt(r)+7+"px";m.appendChild(x);
-var B=null,C=null;mxEvent.addListener(m,"dragover",function(ha){ha.dataTransfer.dropEffect="move";C=0;ha.stopPropagation();ha.preventDefault()});mxEvent.addListener(m,"drop",function(ha){ha.stopPropagation();ha.preventDefault()});var G=null,J=null,D=document.createElement("div");D.className="geToolbarContainer";D.style.position="absolute";D.style.bottom="0px";D.style.left="0px";D.style.right="0px";D.style.height=r;D.style.overflow="hidden";D.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";
-D.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";D.style.borderWidth="1px 0px 0px 0px";D.style.borderColor="#c3c3c3";D.style.borderStyle="solid";D.style.display="block";D.style.whiteSpace="nowrap";var N=document.createElement("a");N.className="geButton";var Q=N.cloneNode(!1);r=document.createElement("img");r.setAttribute("border","0");r.setAttribute("width","22");r.setAttribute("src",Editor.trashImage);r.style.opacity="0.9";Editor.isDarkMode()&&(r.style.filter="invert(100%)");
-Q.appendChild(r);mxEvent.addListener(Q,"click",function(ha){if(u.isEnabled()){u.model.beginUpdate();try{var ba=u.model.root.getIndex(J);u.removeCells([J],!1);0==u.model.getChildCount(u.model.root)?(u.model.add(u.model.root,new mxCell),u.setDefaultParent(null)):0<ba&&ba<=u.model.getChildCount(u.model.root)?u.setDefaultParent(u.model.getChildAt(u.model.root,ba-1)):u.setDefaultParent(null)}finally{u.model.endUpdate()}}mxEvent.consume(ha)});u.isEnabled()||(Q.className="geButton mxDisabled");D.appendChild(Q);
-var R=N.cloneNode();R.setAttribute("title",mxUtils.trim(mxResources.get("moveSelectionTo",["..."])));r=r.cloneNode(!1);r.setAttribute("src",Editor.verticalDotsImage);R.appendChild(r);mxEvent.addListener(R,"click",function(ha){if(u.isEnabled()&&!u.isSelectionEmpty()){var ba=mxUtils.getOffset(R);a.showPopupMenu(mxUtils.bind(this,function(qa,O){for(var S=G-1;0<=S;S--)mxUtils.bind(this,function(F){var L=qa.addItem(u.convertValueToString(F)||mxResources.get("background"),null,mxUtils.bind(this,function(){u.moveCells(u.getSelectionCells(),
-0,0,!1,F)}),O);1==u.getSelectionCount()&&u.model.isAncestor(F,u.getSelectionCell())&&qa.addCheckmark(L,Editor.checkmarkImage)})(u.model.getChildAt(u.model.root,S))}),ba.x,ba.y+R.offsetHeight,ha)}});D.appendChild(R);var P=N.cloneNode(!1);P.setAttribute("title",mxResources.get("editData"));r=r.cloneNode(!1);r.setAttribute("src",Editor.editImage);P.appendChild(r);mxEvent.addListener(P,"click",function(ha){u.isEnabled()&&a.showDataDialog(J);mxEvent.consume(ha)});u.isEnabled()||(P.className="geButton mxDisabled");
-D.appendChild(P);var Z=N.cloneNode(!1);Z.setAttribute("title",mxResources.get("duplicate"));r=r.cloneNode(!1);r.setAttribute("src",Editor.duplicateImage);Z.appendChild(r);mxEvent.addListener(Z,"click",function(ha){if(u.isEnabled()){ha=null;u.model.beginUpdate();try{ha=u.cloneCell(J),u.cellLabelChanged(ha,mxResources.get("untitledLayer")),ha.setVisible(!0),ha=u.addCell(ha,u.model.root),u.setDefaultParent(ha)}finally{u.model.endUpdate()}null==ha||u.isCellLocked(ha)||u.selectAll(ha)}});u.isEnabled()||
-(Z.className="geButton mxDisabled");D.appendChild(Z);N=N.cloneNode(!1);N.setAttribute("title",mxResources.get("addLayer"));r=r.cloneNode(!1);r.setAttribute("src",Editor.addImage);N.appendChild(r);mxEvent.addListener(N,"click",function(ha){if(u.isEnabled()){u.model.beginUpdate();try{var ba=u.addCell(new mxCell(mxResources.get("untitledLayer")),u.model.root);u.setDefaultParent(ba)}finally{u.model.endUpdate()}}mxEvent.consume(ha)});u.isEnabled()||(N.className="geButton mxDisabled");D.appendChild(N);
-m.appendChild(D);var U=new mxDictionary,V=document.createElement("span");V.setAttribute("title",mxResources.get("selectionOnly"));V.innerHTML="&#8226;";V.style.position="absolute";V.style.fontWeight="bold";V.style.fontSize="16pt";V.style.right="2px";V.style.top="2px";n();u.model.addListener(mxEvent.CHANGE,n);u.addListener("defaultParentChanged",n);u.selectionModel.addListener(mxEvent.CHANGE,function(){u.isSelectionEmpty()?R.className="geButton mxDisabled":R.className="geButton";k()});this.window=
-new mxWindow(mxResources.get("layers"),m,b,f,d,g,!0,!0);this.window.minimumSize=new mxRectangle(0,0,150,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.init=function(){x.scrollTop=x.scrollHeight-x.clientHeight};this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.refreshLayers=n;this.window.setLocation=function(ha,ba){var qa=window.innerHeight||document.body.clientHeight||
-document.documentElement.clientHeight;ha=Math.max(0,Math.min(ha,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));ba=Math.max(0,Math.min(ba,qa-this.table.clientHeight-("1"==urlParams.sketch?3:48)));this.getX()==ha&&this.getY()==ba||mxWindow.prototype.setLocation.apply(this,arguments)};var ia=mxUtils.bind(this,function(){var ha=this.window.getX(),ba=this.window.getY();this.window.setLocation(ha,ba)});mxEvent.addListener(window,"resize",ia);
-this.destroy=function(){mxEvent.removeListener(window,"resize",ia);this.window.destroy()}};
+mxEvent.addListener(b,"click",function(){k.value="";k.focus()});d.appendChild(k);d.appendChild(b);g.appendChild(d);this.init=function(){k.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?k.select():document.execCommand("selectAll",!1,null)};d=document.createElement("div");d.style.marginTop="18px";d.style.textAlign="right";mxEvent.addListener(k,"keypress",function(n){13==n.keyCode&&(a.hideDialog(),e(k.value))});b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
+b.className="geBtn";a.editor.cancelFirst&&d.appendChild(b);f=mxUtils.button(f,function(){a.hideDialog();e(k.value)});f.className="geBtn gePrimaryBtn";d.appendChild(f);a.editor.cancelFirst||d.appendChild(b);g.appendChild(d);this.container=g},OutlineWindow=function(a,b,f,e,g){var d=a.editor.graph,k=document.createElement("div");k.style.position="absolute";k.style.width="100%";k.style.height="100%";k.style.overflow="hidden";this.window=new mxWindow(mxResources.get("outline"),k,b,f,e,g,!0,!0);this.window.minimumSize=
+new mxRectangle(0,0,80,80);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);var n=a.createOutline(this.window);a.installResizeHandler(this,!0,function(){n.destroy()});this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit();n.setSuspended(!1)}));this.window.addListener(mxEvent.HIDE,mxUtils.bind(this,function(){n.setSuspended(!0)}));this.window.addListener(mxEvent.NORMALIZE,mxUtils.bind(this,
+function(){n.setSuspended(!1)}));this.window.addListener(mxEvent.MINIMIZE,mxUtils.bind(this,function(){n.setSuspended(!0)}));n.init(k);mxEvent.addMouseWheelListener(function(u,m){for(var r=!1,x=mxEvent.getSource(u);null!=x;){if(x==n.svg){r=!0;break}x=x.parentNode}r&&(r=d.zoomFactor,null!=u.deltaY&&Math.round(u.deltaY)!=u.deltaY&&(r=1+Math.abs(u.deltaY)/20*(r-1)),d.lazyZoom(m,null,null,r),mxEvent.consume(u))})},LayersWindow=function(a,b,f,e,g){function d(aa){if(u.isEnabled()&&null!=aa){var ia=u.convertValueToString(aa);
+ia=new FilenameDialog(a,ia||mxResources.get("background"),mxResources.get("rename"),mxUtils.bind(this,function(ea){null!=ea&&u.cellLabelChanged(aa,ea)}),mxResources.get("enterName"));a.showDialog(ia.container,300,100,!0,!0);ia.init()}}function k(){var aa=U.get(u.getLayerForCells(u.getSelectionCells()));null!=aa?aa.appendChild(V):null!=V.parentNode&&V.parentNode.removeChild(V)}function n(){function aa(qa,O,R,G){var K=document.createElement("div");K.className="geToolbarContainer";U.put(R,K);K.style.overflow=
+"hidden";K.style.position="relative";K.style.padding="4px";K.style.height="22px";K.style.display="block";K.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";K.style.borderWidth="0px 0px 1px 0px";K.style.borderColor="#c3c3c3";K.style.borderStyle="solid";K.style.whiteSpace="nowrap";K.setAttribute("title",O);var Q=document.createElement("div");Q.style.display="inline-block";Q.style.width="100%";Q.style.textOverflow="ellipsis";Q.style.overflow="hidden";mxEvent.addListener(K,
+"dragover",function(ra){ra.dataTransfer.dropEffect="move";C=qa;ra.stopPropagation();ra.preventDefault()});mxEvent.addListener(K,"dragstart",function(ra){B=K;mxClient.IS_FF&&ra.dataTransfer.setData("Text","<layer/>")});mxEvent.addListener(K,"dragend",function(ra){null!=B&&null!=C&&u.addCell(R,u.model.root,C);C=B=null;ra.stopPropagation();ra.preventDefault()});var ba=document.createElement("img");ba.setAttribute("draggable","false");ba.setAttribute("align","top");ba.setAttribute("border","0");ba.style.width=
+"16px";ba.style.padding="0px 6px 0 4px";ba.style.marginTop="2px";ba.style.cursor="pointer";ba.setAttribute("title",mxResources.get(u.model.isVisible(R)?"hide":"show"));u.model.isVisible(R)?(ba.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(K,75)):(ba.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(K,25));Editor.isDarkMode()&&(ba.style.filter="invert(100%)");Q.appendChild(ba);mxEvent.addListener(ba,"click",function(ra){u.model.setVisible(R,!u.model.isVisible(R));mxEvent.consume(ra)});
+ba=document.createElement("img");ba.setAttribute("draggable","false");ba.setAttribute("align","top");ba.setAttribute("border","0");ba.style.width="16px";ba.style.padding="0px 6px 0 0";ba.style.marginTop="2px";ba.setAttribute("title",mxResources.get("lockUnlock"));var la=u.getCurrentCellStyle(R);"1"==mxUtils.getValue(la,"locked","0")?(ba.setAttribute("src",Editor.lockedImage),mxUtils.setOpacity(ba,75)):(ba.setAttribute("src",Editor.unlockedImage),mxUtils.setOpacity(ba,25));Editor.isDarkMode()&&(ba.style.filter=
+"invert(100%)");u.isEnabled()&&(ba.style.cursor="pointer");mxEvent.addListener(ba,"click",function(ra){if(u.isEnabled()){var X=null;u.getModel().beginUpdate();try{X="1"==mxUtils.getValue(la,"locked","0")?null:"1",u.setCellStyles("locked",X,[R])}finally{u.getModel().endUpdate()}"1"==X&&u.removeSelectionCells(u.getModel().getDescendants(R));mxEvent.consume(ra)}});Q.appendChild(ba);ba=document.createElement("span");mxUtils.write(ba,O);ba.style.display="block";ba.style.whiteSpace="nowrap";ba.style.overflow=
+"hidden";ba.style.textOverflow="ellipsis";ba.style.position="absolute";ba.style.left="52px";ba.style.right="8px";ba.style.top="8px";Q.appendChild(ba);K.appendChild(Q);if(u.isEnabled()){if(mxClient.IS_TOUCH||mxClient.IS_POINTER||mxClient.IS_IE&&10>document.documentMode)O=document.createElement("div"),O.style.display="block",O.style.textAlign="right",O.style.whiteSpace="nowrap",O.style.position="absolute",O.style.right="16px",O.style.top="6px",0<qa&&(Q=document.createElement("a"),Q.setAttribute("title",
+mxResources.get("toBack")),Q.className="geButton",Q.style.cssFloat="none",Q.innerHTML="&#9660;",Q.style.width="14px",Q.style.height="14px",Q.style.fontSize="14px",Q.style.margin="0px",Q.style.marginTop="-1px",O.appendChild(Q),mxEvent.addListener(Q,"click",function(ra){u.isEnabled()&&u.addCell(R,u.model.root,qa-1);mxEvent.consume(ra)})),0<=qa&&qa<F-1&&(Q=document.createElement("a"),Q.setAttribute("title",mxResources.get("toFront")),Q.className="geButton",Q.style.cssFloat="none",Q.innerHTML="&#9650;",
+Q.style.width="14px",Q.style.height="14px",Q.style.fontSize="14px",Q.style.margin="0px",Q.style.marginTop="-1px",O.appendChild(Q),mxEvent.addListener(Q,"click",function(ra){u.isEnabled()&&u.addCell(R,u.model.root,qa+1);mxEvent.consume(ra)})),K.appendChild(O);mxClient.IS_SVG&&(!mxClient.IS_IE||10<=document.documentMode)&&(K.setAttribute("draggable","true"),K.style.cursor="move")}mxEvent.addListener(K,"dblclick",function(ra){var X=mxEvent.getSource(ra).nodeName;"INPUT"!=X&&"IMG"!=X&&(d(R),mxEvent.consume(ra))});
+u.getDefaultParent()==R&&(K.style.background=Editor.isDarkMode()?"#505759":"#e6eff8",K.style.fontWeight=u.isEnabled()?"bold":"",J=R);mxEvent.addListener(K,"click",function(ra){u.isEnabled()&&(u.setDefaultParent(G),u.view.setCurrentRoot(null),mxEvent.isShiftDown(ra)&&u.setSelectionCells(R.children),mxEvent.consume(ra))});x.appendChild(K)}F=u.model.getChildCount(u.model.root);x.innerText="";U.clear();for(var ia=F-1;0<=ia;ia--)mxUtils.bind(this,function(qa){aa(ia,u.convertValueToString(qa)||mxResources.get("background"),
+qa,qa)})(u.model.getChildAt(u.model.root,ia));var ea=u.convertValueToString(J)||mxResources.get("background");S.setAttribute("title",mxResources.get("removeIt",[ea]));Z.setAttribute("title",mxResources.get("duplicateIt",[ea]));u.isSelectionEmpty()&&(T.className="geButton mxDisabled");k()}var u=a.editor.graph,m=document.createElement("div");m.style.userSelect="none";m.style.background=Editor.isDarkMode()?Dialog.backdropColor:"#fff";m.style.border="1px solid whiteSmoke";m.style.height="100%";m.style.marginBottom=
+"10px";m.style.overflow="auto";var r=EditorUi.compactUi?"26px":"30px",x=document.createElement("div");x.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"#fff";x.style.position="absolute";x.style.overflow="auto";x.style.left="0px";x.style.right="0px";x.style.top="0px";x.style.bottom=parseInt(r)+7+"px";m.appendChild(x);var B=null,C=null;mxEvent.addListener(m,"dragover",function(aa){aa.dataTransfer.dropEffect="move";C=0;aa.stopPropagation();aa.preventDefault()});mxEvent.addListener(m,
+"drop",function(aa){aa.stopPropagation();aa.preventDefault()});var F=null,J=null,D=document.createElement("div");D.className="geToolbarContainer";D.style.position="absolute";D.style.bottom="0px";D.style.left="0px";D.style.right="0px";D.style.height=r;D.style.overflow="hidden";D.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";D.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";D.style.borderWidth="1px 0px 0px 0px";D.style.borderColor="#c3c3c3";D.style.borderStyle=
+"solid";D.style.display="block";D.style.whiteSpace="nowrap";var N=document.createElement("a");N.className="geButton";var S=N.cloneNode(!1);r=document.createElement("img");r.setAttribute("border","0");r.setAttribute("width","22");r.setAttribute("src",Editor.trashImage);r.style.opacity="0.9";Editor.isDarkMode()&&(r.style.filter="invert(100%)");S.appendChild(r);mxEvent.addListener(S,"click",function(aa){if(u.isEnabled()){u.model.beginUpdate();try{var ia=u.model.root.getIndex(J);u.removeCells([J],!1);
+0==u.model.getChildCount(u.model.root)?(u.model.add(u.model.root,new mxCell),u.setDefaultParent(null)):0<ia&&ia<=u.model.getChildCount(u.model.root)?u.setDefaultParent(u.model.getChildAt(u.model.root,ia-1)):u.setDefaultParent(null)}finally{u.model.endUpdate()}}mxEvent.consume(aa)});u.isEnabled()||(S.className="geButton mxDisabled");D.appendChild(S);var T=N.cloneNode();T.setAttribute("title",mxUtils.trim(mxResources.get("moveSelectionTo",["..."])));r=r.cloneNode(!1);r.setAttribute("src",Editor.verticalDotsImage);
+T.appendChild(r);mxEvent.addListener(T,"click",function(aa){if(u.isEnabled()&&!u.isSelectionEmpty()){var ia=mxUtils.getOffset(T);a.showPopupMenu(mxUtils.bind(this,function(ea,qa){for(var O=F-1;0<=O;O--)mxUtils.bind(this,function(R){var G=ea.addItem(u.convertValueToString(R)||mxResources.get("background"),null,mxUtils.bind(this,function(){u.moveCells(u.getSelectionCells(),0,0,!1,R)}),qa);1==u.getSelectionCount()&&u.model.isAncestor(R,u.getSelectionCell())&&ea.addCheckmark(G,Editor.checkmarkImage)})(u.model.getChildAt(u.model.root,
+O))}),ia.x,ia.y+T.offsetHeight,aa)}});D.appendChild(T);var P=N.cloneNode(!1);P.setAttribute("title",mxResources.get("editData"));r=r.cloneNode(!1);r.setAttribute("src",Editor.editImage);P.appendChild(r);mxEvent.addListener(P,"click",function(aa){u.isEnabled()&&a.showDataDialog(J);mxEvent.consume(aa)});u.isEnabled()||(P.className="geButton mxDisabled");D.appendChild(P);var Z=N.cloneNode(!1);Z.setAttribute("title",mxResources.get("duplicate"));r=r.cloneNode(!1);r.setAttribute("src",Editor.duplicateImage);
+Z.appendChild(r);mxEvent.addListener(Z,"click",function(aa){if(u.isEnabled()){aa=null;u.model.beginUpdate();try{aa=u.cloneCell(J),u.cellLabelChanged(aa,mxResources.get("untitledLayer")),aa.setVisible(!0),aa=u.addCell(aa,u.model.root),u.setDefaultParent(aa)}finally{u.model.endUpdate()}null==aa||u.isCellLocked(aa)||u.selectAll(aa)}});u.isEnabled()||(Z.className="geButton mxDisabled");D.appendChild(Z);N=N.cloneNode(!1);N.setAttribute("title",mxResources.get("addLayer"));r=r.cloneNode(!1);r.setAttribute("src",
+Editor.addImage);N.appendChild(r);mxEvent.addListener(N,"click",function(aa){if(u.isEnabled()){u.model.beginUpdate();try{var ia=u.addCell(new mxCell(mxResources.get("untitledLayer")),u.model.root);u.setDefaultParent(ia)}finally{u.model.endUpdate()}}mxEvent.consume(aa)});u.isEnabled()||(N.className="geButton mxDisabled");D.appendChild(N);m.appendChild(D);var U=new mxDictionary,V=document.createElement("span");V.setAttribute("title",mxResources.get("selectionOnly"));V.innerHTML="&#8226;";V.style.position=
+"absolute";V.style.fontWeight="bold";V.style.fontSize="16pt";V.style.right="2px";V.style.top="2px";n();u.model.addListener(mxEvent.CHANGE,n);u.addListener("defaultParentChanged",n);u.selectionModel.addListener(mxEvent.CHANGE,function(){u.isSelectionEmpty()?T.className="geButton mxDisabled":T.className="geButton";k()});this.window=new mxWindow(mxResources.get("layers"),m,b,f,e,g,!0,!0);this.window.minimumSize=new mxRectangle(0,0,150,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);
+this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.init=function(){x.scrollTop=x.scrollHeight-x.clientHeight};this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.refreshLayers=n;a.installResizeHandler(this,!0)};
(function(){Sidebar.prototype.tagIndex="5V1dV+M6sv01rDvngax0oLvveYQEaGaAziE0PW8sxVYSDbblI9uk6V9/VVWS7ST+kB0zL3etbmIn3ltlfZRKUqkU/rpRLN6MmFJym5yM/8QL/Xnw7yLceXQ03fA3JaOTyfjCQCKZehvu66tErCMW6J9E1M4jlJcFTJWIPP1VIKK1ixj/zML4VBRiTMaf9HOKx8G7/lwy71V/ZJEv8Vv8cKea9KW646tU41nk678/4tK7SZVu5FpC9oz/TDPVnkEPJlsn4wVma1lEnVemGByy6q+M+SXkSmaQ6Vv27gJeBDzyOQDMu1ma5FVEEVBEtuokgQhdyZ62Uv/9qWWoYPRltgx4A3U970/hc6BnIuD+kdI+KbGTcelGce6ec4evOBl/k0r8llGKtWBTvulF98xVKjzEvxWXDVS/M8VHF57Hk0TDpzpxJQGScC9TIoX3euXvVV/UcWWpDFkqsCYyfaM/1ly36vGfgVhv0oiasyfh7ypgyaaBaKHl5/nThqb5VeAvZEigXx8k0AolJJUkVjo7jGBOHFOm29Se3FZin6VsyRL42V+2U90z9crTOGAeIEK8Q1UCnMlGxk4CLWb/gsflKt0y/MLnbzyQccgjaIivAjgTT/Gtr4Quf9cXXWRLjRKxyRwvkBko75hHnjisPzUkP/kyESnHtwoAtQ7kkrehL7UyzUAtLrh6E5g7Nnn9iYo2SWW8ZVr1QYsTIW8gE+ll5kHWQlXGdr/Qug1Zl/RDe2O4FL+fWPBaiJSUZGoDT6HRYT3DN9Gdgy4agY3Q59gj+iIOdAOB/MmYYlHKqYp5PMLaFHMVirSSG2XYySnnZrGHNW19JdaZoiYxGV8LbGq+9DKsT0APT3Sk1ldzXaZszQvOpfzlkndUYodytAPDOEuxuocyEqlUmM+Jbm6HevkAq0sAW8+MB9BmQJs+8HQr1Wup3G2zL6uCetJZjXKofV7J+FLnUUWtxZyLTYa20FzpV1GxEgnVdxH4JOgyS0QECr4F3z3nEUHWUQfUjUi/ZUv7tjqTGaCkl0q6Wou0Ef9tdhslUBAn9Xq4GshZkG6gTmx0m8EqvuGoYzb4iwMYdDnVMcpbS2QM3TYB3mM0Sp71/0fuSVPf7lmki1d10DN3LE6x0/CKut+GuddVgGpRyFCtc/sZYS/Cm9FySdUj3sgIPlOZeZvWNAm1o0uTXH81UO3zZEEqQDkwD5q37t+zdAOqNe/RS/aJ6Tdi5purBt73xV930PiLapT8HTTXqz2Kh7JloQ26bIlVOtAl6dIY9uBPMhbeCdgtu/ZLJeEe1XdduTSPrpc6v9+TlIf64jakMpeQ9RumQFVr3YiV3vcb+eZyy9Viw4Ogl1p+nM2xmofSyNSdYgHjnSzA6m26fu+wTKtwYM30S1LXTkxPsYp0qp+nbu8yg271r4xnWM3/hoseBI+8qttygmLlSfLhZtmsS7CZUd1Kds295iT2m4dTh7aH0qLgF2QqGo5qVVdLtHiPvIp2mdDXinvvXtBgGhLRI4/1sJs09z5TqY6sRCNVqlU+2qxPDNuRuxm20MqLmqNOO3CqHRqxEGEclC3jNtATkMOLhFZpOynrH5FAc3UlcKRsbJHvy/9wD8iylUSFJHhrrfmRYBPaZCGDZ2Mu6QXolr3prFf16OdvsxOjqyqUVPXzVEngw+g2Qrur8WehCxWnqu71sE9gv/QWnrSalK00WglxllLFX+VXVaxv1TMae7yFcRrlV2059PNiNr2+wdxh60gmKamJ7trRDvIm4xsecYXqxI7z6sQ5pICWKDHp6jFiEyjpgtLioL1lU6MmSu3VHZm0QtcI1RVNeCPPjIeKHnuZLamxJzHnNIzdyIzsV2+DJm+Y22ZVlPINS35AxuFl1Bo4nQ5IJ7PIfxyW8xzGplLgaG9BGginPqsrUhn55RCZiLoxbRn4v4dAbkYubdBLFkWoRfXYs24CvPz8lGzpNZchT1XDzN8OSEkcF8ZBhnP+1cq2jJgddJORxMmOmMX7w5A96HXzILoS882Mr/IBWqAHTcjxejheKQPvJRo3kWNuP0g0msMlzn6upFoK36/o6A6R34t5fG0RKMGiNdXSwyFVJX4R6mwE9Y+GsodSb1gcv7cCTRUWmCEx1rI2SAbsPvY2+m9QmTl7mCeBdrAdKeMnTGC24X4ylMvU3qWtzY2Yf5/QdB+kwyKPB1i9agqkwEqZJqm+HLULWY27rx0Q72mUWoass8VjGOIQHihN0cRKenQVagMsqEtZ40YXPq4geB2yGWCXNjHdvWUBLwzZJqO0hL+TVEJ2va5urbACZWbCVYXEuLKywZep5bhnERlBRuANDHRa5c1HgwZlFJY2kWnipFFzIUE+znKy+EtINIQLcbvWDo8tdUmlOANNl1A7/85EXGmvHeBG00tYB81LS0AuLBVnVATUY8Ryv9DreSbjX5/Gw7BN6qTSVmRHniapOrKd1UqFa33dmLRcn4eiO68TzJgwXYga5OrAdj+l/P+s/3w5u4BXnkOdFpGwo5wOb+7Cf+7CX/0GtfRfzjCN8YfJX05g2BeQMAv9mxwCtgIWyOwr5L/o7pR+6SJ3Fe/5QLwwr4C6BIv1fKyzpToXHJTbLiG8/GQotrMJyTgA31zp7sYz07uavDfhI0+ET93fNFPKrlqZnmkCBaS85u7Qkeu8E9ciU7jYt/Oin4Cirkdwp8G3qlPh7jTYKupVrjsR5kytjqzkeYIFXRodnI/DcJL3VsvKmexWjgEoQCsdT/N5gLf5grrxeJ6vHTm4gO6UlxdM9fCJr5VdTooZGIdRDXwVSKniAK23gL3Xr/TsPT66RK06s+5MS1xeX2UqEqZDcGRYCDPKrMfWwKV89WhCtCt0umFC9cHJWKCO87lZ93ND0Yx1Ilesax5NH5/A6H4+Kc+ulmZcK+SoYJnx5BWnwRUNUOzoqJMouyS0VN6PSOkRm10jTnAgsGXKVzQTWkNVwXMVcD3cwHzgiccCc+0iwrV+eIB8vYYrzXPHQmiE1ZMQ1dCqZe8YRowhM391K5bkoGWFgTnpJC0cvypov69W1PHZKu61VvUKlrlgOFehv8dRqYiSVFVPrFeh9R+a6FKwUKF/2DYN5EtABZqrc/t6ZBF2b+Aky+I4EDDf0hE76YPlKyXWsFCNdaYrfEHqwDPaoVMBPZl25/OkuXfYh1AuGViPJI2HzBH4syPx50fiP/fFS0ErkVp1KFpUCxjqH1AdWqWlSspDr9t9mp8sRe05lZKcAbbwhWfvXCT5uaMGgh6KpJLW1xfoBw3LaFijA7pLbA/dLBaAHq0vExEoc+vIsCVvS8dsgKfzHs2zF5UcNegfdc9XQw7LtzEBEfnVuw5qsk9o/ZpU+TG0Qy5lmqJsZZKl/bKVR1cmoRI9kMKywhvIGYGrFIq+bi/73BQ0hZ97urenL6JXo5mqakobbtIVV66p/w8gNxay1cYALkHB9QnaBuTxx//OCudewXQalev3OcXoIopkah29PmH7C415oHVru0dODdPkGKapDAJyVt7oUe06YBVuotXIfZ+gJPdtaYfWuto0odAH8LSEDeELJ+eFgmTOYjMjHzutTu3jF0WpG5cTsOdrF/oO4OA7ZEqfB4GIEzsLWN3o6/CT3nipaAhKotcVWg06C0PjypdFnnW8zKDa16wc7zM8ads4WfHympGqW4QkbMBZ9BJqM5HWi99YkIFBog0Hzio7lkrk6FpEIqHNUzdS+rD2lUqc/dJZEPYVaHSDy8bczBP5mZ0nMo6LJDO2Kt7crnZYv2dpIkqO4Lj+UwiaZGA0N9XXHbZnPaKg7UVm+cmsVbpgLwQqTBDlK2QRjYqU9WGg36q1rR4EKSmgVoQS93g0qWbzMLnj/zKeThc2Ny9xdcxvW89tJ4FBZ+TrYS822IEJJ+OfG7MBproKdaU+lm6ha0k6VD5Wkg2Rn63EH5QRvWjn4LGOw95S7TY+lo3TH5bgr0x4r7qHlmhA5xdL8inC2+X+qnIjibHk+hEt7HPJHmiPr5FDKwqa25qJBIaLoGOvda+c0H4n10rRyKPrgymjDoVVMM5x8qynOBbcSwY9gDZTfidm4q9hNigH6Zq7EjwAgaEWn4CdRLdtSHCS1yLr+oE6voukO1CwEDCn2jNsm2CDCNlvtAe2HK3BYr8H2yZ1uJHuZl7so7STbMGZwqkd6+yc2C8a0q/ngU2T1/pvyFPmk83Tn/jK+AeZjy7QxdUCkrSe3NbTqNgL40jzsEOzt6u1D9tkTG81GT/skQ2ayLenp/lHp2H3zgzG+tdOZtsNHX1oJuNi99VAhH9Z9NF0P6/LNDBfboa6fZhgGdkTPhmqg3Eaf+zelGaa70Uruxfjpw7m7dWUBlIMPOJLqqEnlbYw7m/rCMN8W4EIq3yU28lRr/00O6EP07B7pPtJPgO3BzSObqMkNTPyh4nQVpli6C+Kh7umeGXIdYrzyrTE4a54V+7GdziaNakWdy8rutDfP+5Q6uGXHqZnFasiznRQXfSQERvNwMTfZtcLB/4N88lR1Bd6tC6Wmg+3UpO1nNAGReekn+dT/fCb2QYDbrLizeyyPyxWZ8bSBMBkfKP5KJTH8MncwhpdhJEJPjKZR2kWM4anfp4/4AqMtort1M9HJXJkDjXvCa99fDR7j1goZ+Ci5eNlH6zuA1JT24fiScpErMTelfGWWtwxQgHFjjzCtuJuPPlabFdZTK9hY7OU1LD5pjsLmKV+V7LRWsksxq1hcNHhDR5nYFYqnRg0I1Y7DGhmMD12qaM7njEng52y6I//yONAG9BDsy/0hb98H4T2Hv7Q9t5BMyMPDTB4Nn9XzMNV9SGpaZMwKq/cRu6MBdc0PRqMupDoGiLfYQUGNXqIoSzglobh11Ll0aDyYCql7wahxgrlvX5sEk9cZ8huDzRQKtakbzDk+1FCGCwTPmIQ6tuLe/08bRLHSBvMs1uV8of6M2tpff8UM/Pjklg8LY7ij2R0alrmSxLrke4KNjZKlWGvuIKL9jaT+K844epjeCsbzgtnkPNwXuM/X3fC4BwyjB44eY2kUW1gqzKElvowWzyKevTim5hHprYrSXGfbPU290OwgmbZRoHEXmVmBwR7emHQ9K589FG7k96B/hk0nQWuRNKy6Ee92NUl1NrCPFkWodFqXT7dWLX8EYuTjUw/LIFnGWQh/wD6BXjF5f1UsZTtMB/UxgsRVUy8uA9OYDJGlyEbZyNpS1HacBx90z06HU8knhzZ+GJAVIo1Vl/L92CjS6WtHnxx8r5FZ4xmPbZPYWNQQGbmEnRmuZ+BSxs5k2zBqQJpskiklWy1PIuQ4XrcZbGXdyOzpNmGIhLrhZhgucX6peINVyxIRreX0Gvda5tspRgFQCo8FlPjIwyemeTOGHtHJCIiCLF1sTgfj3fTib1jX+DJSDoQaa0feE+++5K/Z4mSnEGL3N11JS8SdE9HeEraqGfFD0fVEJwXKwldJ25PbrDKdG6T+y0F1RlOcDth5Q1LnHvED0S48Kx/2FCEsd33NxRhFplVkqLAB2obiywGV+ucayDaPEbVTg7QOnlfSrsfbDAhf+w3rmPInvWoA13OtB5XbLiyp9hIlxATesgqVVuZanqbKm6MJh1Y9lBCLL9k9Gl8cwW+HVN5dYJRLrKWiYZmurNPX2FH4z9mJNcfpaWJPKJ1YKpu6aZ3cv+m5HAb00cnVoSnzXdi39v8OjrjroXiW7JZiggXhh5ecLu4/2OIdA7Ih+C08S2Hz/Mi1Fqe56VEdMY8L6Zn4/H4j64J+gKCZEl0trLXXWAjGMsGJWQg26I8EcMmW9IrrmlhBZrg+JIlHLZJUsDSTda8UlJHNIXvj2Y5Dm0N7+NY9pee1o2LUIfB7vYSCPXf0b/4OxT2bsD8RsTjfKH/6Z9VXOcwfICpjK3rhMzX9DytZOyWPLfXrWCUPg9NPwImrq4cFDp2bgze3FOyVbYDpm9SprndbD67s+TRiPMDD27nJfk83rKrqZ7X5xQq0q9YDHNhWMhV5/fLowhZv+42gEJbG6qJssvEbZBSVOXSZTsKYuja+uiYEEIglnuoh940Z5eYnsnancUvHRghyGUuRsN2kzpsWYZVmcuVBAd9W77MgSF8cWI9JZs5sAeipm0DrrRhtrqDCGj+YStWogZxgwj9oEfBAkdsCZHMvHQ0uwCj1xdrQQeRMG1SSzqzI4JDRSpiZTWQ8TCDQIm6wsMEi66wv1qClVex6HKgZJe6zcRte5SqGO6zX6dWll1JmiVrIz2g68ZgQnab6IEXIcRmwh3ZYRxAHN5hGCfHMT5dGKlkiVuP1WAvj64TsOvFLGDWJOJAP/lY+rOPooctUXaFcG5CMCa1a0AHPB6LmSeMTZjfdEePpjmWiipzbiI1JJMhSCDb6SkZvNPUfwVnB0LYx541RzxuJ/k8hFT3ptWjI2OJC8b3RVLQnYF/CSf9GYYUlJRr45LCdn5cmnOM+J+nGctEOKfpC22h0DCFPGOcUCZPT0PubViEX01O6XyqRR4tbFvn7ONCdyczP8nnzoqrvnzzLNmUx3kP0PNFsKof4FFvGGqlYWNjR/bvu+xaITXs0W3mplMCaGSq9dDgslfw95VecO/809fRxfT0YkqMuRWRmxYdiWa1RIXZ4s43G5IMY9p07mxL6Mn4UtAY33ZVfdkuC2NpZQ2orngTjbcXfnaxl7EVNqU7WUX1OZLvoBYVfDWmbgulWK24yneHH1cVriJPvce4Kh95HZSwgX8Tx5T8neyLftHFIDycVUHfSFbhqFqHRluMTCF73Rk7urVIY0gLE+jEreOr5DkbiOfzMTy0c16rX25fTSgzM38k16QXl41tRaVVG+mqHQ9Kj2tRjO4N49KlY/vbrXN4V1f3WuAjOGZmozND0lk84L9yZ3zmzFEzTpQwu8YD2B2viUbXWWKDSOkmchQHFhbnzo2qkgRHQ8tEBty9dVYSnR8lzW0QZLBgZ46HuswCmA8R9ltgtcHh8HNJD3RKA4PMUdZbLlFOtrvUhnEyICPSHGYAsR3mR598eOA4RDUx91qTOIbeVNIBkpDJiqcJlB1dnsAJOg2hOSqwoxkt5cC8PixAfV9cX8Gqx8PJzjAM7N5oP9h+T2rYzFYabfWizslupwMJu8s4qIywhoDnZ+gK/DqkqPM94mMlfji1sFJxfTppGJD3YpwMzng2OOP54IyfB2f8cgzjvK6saydCejFOBmc8G5zxfHDGz4MzfunPCEXQt3+YDK4TahiP0Ak1jEfohBrGI3RCDeMROqGG8QidMBlcJ9QwHqETahiP0Ak1jEfohBrGI3RCDWMfnSDjVL6Y+cxIeMnoK67frkNzxEEetjrhb7XHe/VlzX35Z/NSCj73REj+FIdndDml9mfNO0Si1lGgL+nuK5gEjn+Du6vZ3iiMhyK1J7EeLjJ0IJ0MTApUp8xL0fUFY+1PIThD4lH4kcAc0ZZ7fsEUO87W7k3yOaX2XX9x6sksJg8y+L2461euSImrmyKhGTR4ZOeLfsTzjUylzdYYbqqzuZbvRY8OMSAUjkF3l2M7rL3GgfcSMN/nCg7P1gX0PUvjzEbVbDt124lo0ptoAFl6SwF7LF4S3QbMsrY0LjilL47hGt08fS+aQ3tDMPNvaYbHaMjVCm4278rUQudkb2+mtp+2Z3RgWoYf/YJS812Jv/v7mYQmH57QA7rd3d5cFu+VZMFuaksRSzpcr7Lp9ktr8l9M6+y/mNb5x6Y1f5j/18prJ60PLq+dtD64vHbS+uDyAhVlI6M799fdE5h8YAK31gsPt6BVaZt6RsUp69DTk3fr9ROx1h3yS5LHHaarfvARrtguLAODtUQzBeyZU8d6kM5KpOZkDlwuH5J18iGsZwOxPmOw7TcZpG2xuxs4cH33aI5Jd5J0A/u0wKZ8oZC56GjUdHaNAwVZp8aD2xqnlQ7dlXy5uknqlI8rfmfa4p+V00n/cZ2kaqGdDEA7r5a267C7hbLPjMiWvXFYo0Y/ZnPdiBUy+ToCJYpL0l6tk/j+06MLbE6e4m3OCmUMBlbBmIwYySAVIUXwCUXkNy1blzguKWaN4jE6VDljtma3rNJVX2ak5eHgFEcCGB0nG3TrWcrDQ+wrQdSQmIkm0+0tpXzFpGTTidwVMBCtiEwAsXob3RfLWCX4ypxyl0oZVL1mDXTKAh75Jk66e3WYbjBMgC8SL0vqzqOpBO7WH5vDDkAZ6haFYTV80TxG3EGhkULjQpwqMUeO68F4KirOKKgkwXBn/2FvzDVZc9pEc2C+SiA3Pgq6yskW3VGGFYeCeDJ2blwWhh1SQRGzpMmTZIdgizN+NtQNGoLctdpe2WPnJ+N/XIVx+o67L/O4wYoztyZe5jFhh4EpiyoZ6kje0SLH+OEmmkWxpN90tkyJ4zpgyWbHhcM19WsZkH6Ras0i8du55AloXNdaztzYgSmjVSMTb53tH+BUg7xhGZYONOBme6EMCujYxrX+rN3BeYD6xunkoQ3XlnTdTqBDlETN0hSK5ABzV3IzOXRyoYOyyjWjlS7C4Gzl2KFuctjgTfkpR62bf3bRrzgai5lv1GzlwbDVWPlKbkk35kykmnDxNfh7Eyk+b73cNsoi+HsbRY71qHcpDnlyBic7MhgeB3Q5TsmbJMsckqeTLbVSk+tI5EHclWjjK84IzRcv3ASRtGEiPyEv+h/61AUTSdPlpplatvIkMKP6LPiW06Ed6OhY1wfKmLYftpG+gY7Fc4RyhcXwxBznF3yQ2LXoERXmbJgl6LsIFIGoOEPugOC7tnWi/CywOxNXSxuzuPakZB7BoTLnqxhxGxNtsOAVRmUdSnF0fvb2MtDBzKimE2/MA2mNB7qTEI8873ZXiid0El/MsdYrniqHt38sni8oclZHCnqsvxCLcqZV5+t+fnro/r7m5ryWStYNhRnMYvM+Tnm60EOFmFThlPqfZeZcvRe6EzZntaWkS0wsOJ8spTa4HjHk+6Ibt48fQlPMCVXtlFkLkvG2iMbZYpnXMBwMWHzFas7yPYRn2FSxmTraXlU05nQ71NwNh5Uc4uTB2MANp7Sh5+EmdN03vFN026Vw7ud/xJ2r5Q8KdgOHyTIb+oN5bt1bHpGwXf/vNj8HUrMgLTPqDioiQ1eBf7KAoiFR2zLDcwecuIa+t7TluwWGYR+m9rzA4ghBJ5iZsdwJqknTOi4mHXJ0HtARirSFPaHPBXL1KyZjxYJaSwJh5izfLind6Vpr9KPN18QcHuVG8GizwuetHvkllLGJuoi6sGeG/eObVOI3NJkAhoY154U58DxDm/F6suBsH7TdDa8wy2tA3fQ6YlC9NOXTGgF0TuGI+bD1SyTEX3M0aAXOM1NHtJU7n0ZywCkYmwWjBz30PNV21NvJzuSeO0EfLBzLSaFI8HQybXkJbo+4tZ/tLMW0krl0QcGMLniY2CkXc+kC1c9lJPUyS1OcetH6+4SiDIMPmf4dGpT+0lgaIX3TQmvUXIL7tS5MjYlzg7gjwTfSQF3xN9z0aDhTy1PUXKarOmnpnCoJzWDUmgLFgLBZGF0hcDmELWGhtiVWVYyHIcbCnNNabPDKOwolTaRtHq1FxLnabcBlpslwVCMGezrNyo69hvxMhe7NKq2yCuzowiK1zpsqmSSnl5yFGAIM7kBRVJ1H68B2DYvgp5cBwwNf58z3A5yua4hje1NQxjHTqlC3Bed2VIAx6JNYZTRNUNy1A2UYw6GIJmxFftcFSGvDF8JELCgYOq0S75NO7UvgzpwS72R8qv8/ZWop8DTbmR5fknemaluT2kvj5fRFJLLje6ss2UCcubWuqSZOMX53Uj4XDH+0nxTziHBunKMpfIOWCGTtjU0KwgfbJPYIawXWuUKzqHiBn+9NQxjAUFssWiW8m2z0WSihRldm5Q/ElaZpXEz/6FMhmihnSOm+CF/mw3DTbBjZdrj6CLXi3E5041VrkdJWbsdN3SXA6E78nQk8jJVwWuBLIXHTLNl9S9Ec04PI8pHWKvfRbYEEcvuS8CixfoyRS1PbcJa+8F+wBL2m181vTnDqPM0v3FlG1+IX+QKnipndmk/ZksMe4W/ANBlflVJJs2W7StlP4oAHehqJJ3NiUn8MSXwN4xO/eAtQGNcsGjSN/bzqTf4DMn7D4rLAvbO91851AIa6CmB9wgvHx0e30ekd9TiPUo9cwMH+3uBFFLT571cSLcAO8roTkUFVIjoWj5N7XieKjDzA4dPtYd3b+jiPZCB+xaTSDirhaBFZnWFuWhNLdP3Sb/diemM6EMb2ms3QNzgeGsc+dOUKGM1ktsSZMgjAqTjuIn5idqksZYIGnp6A8MItr205EY/N+dkKcxzX0bLo3kLK9I8hiEr5BNFrh+KEfgwopR5JhgOTPkq5+gBK/QFjy4GFftODSX9ILqqJg5X/TGjj1R8yV3cYSdoPqRDXLMCAGUNSBtJGzhgsO/Y4jyg+xbxXE4/UhoiespQF77gOa0e7eWi0s/FkrD9WNG0CW882fBvwlNxvvFfyzRgorU/HptUVBG6zdODOGk83i2jQkJ/09x4uccbM/F6NH7EINuHhNEZktuOlMlO0SkxXYfnHZpoRBlaYybU5t2wpfL9lQyThV1L6NUm34kZThkF9C91FPjq0dLTEeyeea4Zle02yhLzFiaaEfORJyjLFIrtJa9XA0Uow6UZAnjseLcPmbjwh94VHlsZGJvFhyLlaFp2fuFnzDo/N8PQNxE4Sv5tiJNcw3WJ05d/Mzi2K0n03poX0KACac1zyGqKn2QyqF6wS7MV+zr3Ffc5W5pn9sNl7vLq9ZZrziinM8xgi12CwVt16W+ucAf8z04VDZ2xY+BrLXtdGBSPi9wrCaqp7RnE87+gFdANgfrM75R4c7dvjxeDKy9T7IFTkqpPoAXYQiJZlrB3kA4/TjEKfHyvEPMjQ8/9oogUz+xaPZ4rkdhWwV3hy27QQUIXFY31wI1PasqxWgZv0xJ31xJ13xv3QajQbpCI/82OJnMLpHwJG11x3p1i4shPunlAdMbY+mDQ74SadcT/xlUw/yfthJ12wCVtxPGJgw35XmVR1CLBmupkxBU53VCE5e4Jdu6a1N/jU1l1rz5B4AuZARroHljjTAMIHFadYVUBjqegcRrgofTqgIKykRANWm7VhSMLHsnbdtYLhX+yd4fYTuTUr3ZK8TFkk6wIn7BA84rk3y4CZBY38HByV/9CefZZqa1Lfl8YJ/XyCfkewgYfsgze+EV67KWnwCyZouIcpJvqubXp6Dx4JM7UHUTRkQsZPvlpZHKKVgpsUaIrDDQU11B6PcKoPHFdt7I03bXa7mAqW41X3yDo3lSmmJL/vwBFhASlaZ0jsXfm6MfThLpmtsXarWZdaWwJP3MEp9za1p9FUGY8NLHuHwdEZkWHpAMndYxfT4lC6Wk739fkD6OMCDguCJSBoA4IClZL1lcDRBKiPmgie8rc3xdFw+kwjeHIM+OwY8Pkx4M9dwLDLEephqUG/cXOaBJxi241gdIG+4kXW43VXMcosk0FYzgZhOR+E5fMgLF8GYfnan+USwwljIWfLACtK/kQvqslwVGfDUZ0PQTVlefBuPZhz8PpuYJkMwnI2CMv5kSxwXGOqMvSUXAmcQrK3XWhuFO41mYyfKrRZTYG1ki5oNfaSB2hC6bslXXbkMUtOTIXkCwSfOD/vaNHt0ykmoqEaniUbpOlZskEanyYLB3zLcLiXhOpJgh1RuSzNZBias2Fozoeh+TwMzZdhaL52pzEGUM0iQB1kRM61k/HD1QkeK5NuTjntucUb3rj/tprpZ8605QWTue7CtACZEpkVMuFND5kWP3MmIwfedJDpkq3XNBgIMnvlDFVLdMVZ0HaSDRPKa4knt0sAoRsm4wvsLhYye9Oj0RIfhHRISpdp4+kRO8y0lcR7L3nwnGCMOLdFAsNyFfA3490RiFWHF8OdweQFbLdrOSJxvmjOlJkv6jLjZBjmZqunZ7Og8kSzaixkPM4YUa53yfEfsR6TCvKKsRd7//4P";
Sidebar.prototype.searchIndexData="7Z1rU+M40Kh/zVbN+wEq98vHkHDbJUxeHGDrfFEpjkh0cKwc2R6G/fVHchKGKMwuRo7Usr21xQyBzUaPW62+qfuP9tkf3bM/Go0ofg2I+POP5kB+t8Rr8kdztPq54Hi9PMWcs5fodCD/QCP2Ev7RPFvGq0D8Sl389QfhMfVxcINnJJiwiMaUiV8ZzVgcs9W7XxgEdCF/ELO1eDWKOXsmj3QeL8VrjbdXhixgXLzyR6NZS/8RP5EfrTEUX182H7Jb23y73Hzb726+pfO3NWw+89t/F9DZBz/qjuRPsxK4IU+xdQK7JS/3gZghcEcXy5IjuF9bX7+lTXBGwjjdAyglYR2DIgZGMaQboeIgdgNMCL2mGQhDHAQsicXhmMwCAoRF245+2LH43wTPgZCwtDV2JMDsjo4iET1DHJbkB2chEAj9zh6EjiGzYUi5nwSYQ6GwvyU6fTMU/kxW6xO6FQVUt49hXxj6VjA0yoohtSJxOIejIVUQHYMgvCXma3Q+X5A5uiJQD09T+vKWxf5SkPDEOnDwtlns49iXkKYhHJU1tfG1dmIBBMW+MJgKQbzXFEBA2FES4JRD14py8AISzgkHHJUxJhBbEtMXhh7xawVDwhAfmqAppgEcdWHHB/NiTtdwINiJX3vil2gkKIA+Sk2JxJRTqIZVx1B4Zk9XoivG6T8sjHFgn4clkdjj8bBdlnUaavDOkGt6j6YJB2pfmQpgbhnI1DdMEJ2GURCA7Mzdyg07o1sQkPJ/dknAieAZ3hk+jXx2OktoMKfhIjo94zj0l+j70xP1yT6NNaNhTPj5DxLG0fa1OY6EDSa+kWt5okHwfo3NTk8s54PVP6X/fEjqi8jx9jufyI8oXmBJHNBQ/E/DkPjx9gOqsNv1fRO2fQA7xfMh6/QnZztuWszPw3lZgLf2gLcPjQAjwC9JSDj10e7dio69v2971Zu2uDOxqnAlSy7Kgr5eU9zkQ5vPCPrx6L7oqDv7/lbv0N8yQtpb4SAQ8h2JDxxFRYe+82F2Gr1lB/qUBMRnq1UiPjq6YklU+KO0Xts/S3uWFMsheTQZVvDNwL8PqViWWOtr4Yk3m/uK5rA08ojEhYCvpYBHabnHWhiP6yXhOIhOr8/GaIxp+MTxqvA6RynJ/CDk/x/PYLjj+EejJkiKr5NfLPN/LjSkaOC1Uke70A+mtb85PogagHowU/aSrq3Yz2Q/oNU9DGiBeSY3eL1ZaaEfiOIFd+pwH8gY+4I+i5aFfyb9/WeS2X0w+Eyoz9l6ycLCH/O9/0zVgXkoxXc1uj1nbK7JEA3m4igRjuAQ83nRn0xH8QFBbxN0x+SP/BI8F5d2DKfblRX6ifT382xNwKe852OxksI/EeWIz575NPhE1gQ/F/+JtPdd+D7kPZKE6JHx5yjGGyLFfjK99r6PAtiR9xLx3e7HhX8uyo45vPUH5rlM8SwgcdEfiHLMtwEbXlPCVzRUy2KL90g6yiMBfKrcF9+XVzYIZI/xgc4JE278Snxb9MfS2S/R+aAsG8xjeSQzdCaLPIt/vCsFwZBDw2UyhuFlGkNBJAh2z2XF5klAotN67fIcXQzZedGfiBqG/IL2eiP49kzGG4o5Po9mvdtC30YkehaL/R80DJIoDRS//XrRn1N3/5RpfmHnGHlOf8vndBEwxqun9FZTCu0pyf+LLKP2XmjsL9Hmf1D0Z9PraFsEJp7NBeXkRdYAe4T/oD7ZPh2xqV688f8U/SEpcczeFyLLJh7S/rMp/EOpO6HVvFdx2qxKdNqo4RmgttsD5XGCg91p8+t/ir49eEN5mbHwaq2ldFbLXH6c75OaizPGjxn/ZQmchwuxCPRtiP0lQaPtzwv/XNSivsw2wY6U3lPYvcvJMMBRhC7ojBM0XMpccvD2MIr+LNRTJnNCJq9nITjQWRKTeWnQK5FlW9vghon1zEvCXKkzameuJ86HuQw+LjhL1qURdjUGmTkhrwN+mcw2xtECx8LNe5WRxtoZjsgUXSWzoqNXjttWZu9OMPpl/1xuEebyGIby9TI8A+Wec3an4XjPYNdYYfumJXsS3cyn7vGeRLUPbNIfD7yy7IG2YgVlNvqP9xQ2nRhKsBMAn8rbG+o4KM1+0G1xdLxn8TC5LctTUPzhlrWzYSW+ntbbjeLfQe/rHsdj8eWrhDvdWk3m2ygpfMcdpd4je6hHh3O3XathHqFv3Xa9WfjgsnqTzKhID3yfRBGaSKqFB71/xSL7BTEt0MPC14hpZ0n0+HpF56vIb/bmRFp8R+PC89UNtWvx9Qao3S6+AddWenFkDqtrQY6ojyacyTOv+BkMJWjywZzXo8rzHarXSmMv9xTWmR1yLdbTQdH51mu61/70AI9Rs1d85azcUcp+YV8L8kPhLTi7FvLfk6LzVV1po3zPzrzCm8iqGt61HzREmBP8LIeFn7GfRSetNNs0q4rPOJ0vCl+v3tVNomghnnrCPi5BxF5t52tUkIcyNzvGIV6Ursy/aTSOPMTF57sfuWgajVwIvsKN5mmDPRou0OYSS9GRW02NDEeja3QhvhSdsl3felj8wHJ/35bLXr2kxVf+NQ3FFR2zcim0ZdSe22AeFj4Qp10Wrw/5PqTxKzr/ueYlGH2ktgqwwDttPFN0ztr9F7U4y1nSfowG/v9LKC++q6IOrTYap9vBHu4+cqFRd3Qv5euilteGpxyH0RPjq7R71a9bxNPzwld3KaPrDIu6dzIe3BU+raIWxpj1X7zxSeEJq+2/zAbxvHs08go/WbRe2+9FmP2ChRbk+7PCFyiqAxXNVtCNSFyKi9OKx5K9G7AWZBafzFnhS5mb+4yNxkVHk2nR8SpGW/aLPVp8vZtB4UOiSqcjs7W2I9lmaszmxc9wt22q4sfRGF3QoAROttKTKPswKB3OMkWF7mi4KDrlerNjUS1fcJY2QJuXp4BcGS5rVkmnXT6Enh6s1wHFoV94Za342Gavtu56qpRGtq1ejrjC4XxJgsIPSVTqyc2WzFxN0tnsRWes1NeZtfGuULPRLDzhusVj8HpYeF9QCWZkn2Gvx7fwwftuzSZf+UlDEiMv5kQOeio67Xptv07U7CWU6+8e8m7Oig5Z7bxjNFVyXfh7VIor0jV6y+d6Mi38jL6DklujZRmC8APa1WaU5HaE1eYO1xOBe7VKQrGaEmQA1UCd4SNwgkbeTdEZd21eJb6eFv4IVPWF0fjQn2ffR0UH3FAawRi1Mf4ihW9O2doX4LrRSyeCb+ErxpXrw9knw+sAvhncopgh8UfRMasFzEYNtxu6WMYvRH5Fg8KfeXa9khsWLjjBcvTXpPCliOpMNqPKYzwofDFtbz913TAqyeNh4fm2bd7gGZ/X68W/zqrdXVwLMZnTMoQqFCOuZ9QLGRMimzmsA1z86paWzXjFmETLyn47OmSxelQvQQ9b7ZlAWphpSNHD4O+iQ27rjpvRgsxmNCAlylkrCT+jBcxjr/DunnKhxGyR1vi+8MpCyYaYjdaP/y68/Kpd240G4W4Hw/JUgfcUx9qoCXdbDSk5Ll9hIuOwDNUWysUzs/qCxBELS9CQUrkOZdRCFpBfGH/elg+tSPHHRylnoFkb7pb8TKJSdPGzrKAl5oacW3KBZ/JC1PnPmITz4mtsu01AN9zbJRBvCJy7JeCsXNrpGE2wfvdjEhSdsJI6MesTfr/16mUYl6Z2wDaan/q+TteBBivhfD/R4h+Cyn1Vs27LjnbaLHHNeOENaqVRlNl7aZPBCNWLTliZSmc2rC8JNwpPeD/QYbZIYyI8b3Tty9UVm7JSy2zWmJucFT59ojTDMJvQngyRx57iF8wLH9xXSrrMTgkVnB/onLCiQ1ZLa43mAiejwk+A2Pkgu4slNaNW8mRc/MvBjX3Chg1jzmLms60fEpShCFQxL8yOqJv8fVF0vmr3cKNBjDsck1VS+HmhVodZ3pE1wSXo86kIstnpt3L0H0HeC439ZXn69Km6w6xcTzzxb9ERW22N4RH+gwpRLjpk5cKU2eqBLeS05wtnZctMmQ3KeSRGU7Yuw4zyet3meeh5hfcElXiR2aF0nneDpoSvaFgGH1Dtvmw0xOxNC9+xT6lrNtsK2Ct+vyI1hG9WfktyT0oZ5Gy2NtF7KH4eymYQY0oC4ssufeIDlyKrumu5ZSVRImnLAc6kBHd66k1FORutw5iKpRdelq1eUJtOUAlavih5P7ORuE1RHJYrLzblTt+iiTHlif9cdMIH2tjsuZdwTgpf2lnv7NfFmb3GOn0oOt9206II35/d9euFr7y3e1HnfnyJPMJp8RMjljlX6b2j8n3ASVD4085qWOihdONIzHoeD5NbmTeVn5hXiZBjw/YKr46tCvPjoGrwclS+117hx/X19gH3jQkwm5NVhHA4R+slC0l0OsSzgKSD3FdFh66UtDSzlyin9P5o1AQ/8XWSEsznKZAgQOn7Ff0hNLUnNB/tIVzg4lcbNTq6lsnR8F8xFq/LsAXUCujsyv9oz+B6Ug4tpBg4X4iXHO0RbNvmDnxZm45K+kB6oB5IGWyj/T4SjeylZUfjn77VyVMJDudaB+zBUAolBPhgvrsoh4+mzBz6QjX80R6BbLBQDvtUewJGTs9gTdg6IKeDcM7ZgoQsidCE8KgEVYX7BSzZL/tOUnJfRz7GPnpkK1x80vt2T72W2fDRRx2WA7Vq3tTbmQNwuqwnQ9lrufig9+2YeitzlEcX9F0ShjRclIF2bz9x3c9cRqTL2qOxnIBWDiWiXAHuZ44TaNOOhVFTEtFu7Bvj2ceL5wa7FLJtDzeXbTF4dCrMn9K1A85e93m3oaXBeTAdo827VLCNwJ7ixa7rSzm4a7eL0ud+xhme+ziKS4JcbTOeObOtj1z2JhGfGe16lZQSvA0dc0kXeEbjnY7ZqZxS8rch+NeDUTlh2xD26wlKbx4vWfhaTurZm2fnQN0bXpeEtnqdJXszUX3c+2UY5eDeV6azWVDkt8PzksAGoMhvSfwUsJeyAFcG02QOHeoD342n2TVsLAt5ZcpV5usE+uRLAtq+Ttm8A7oO0VlCAxm8LTp0pcHgW2sEC9QfabxEHg2oz8KtL1p0+kpHlex9SvXhV9EW08DXuDS468qFmezzx3LgHTMux2SVg7hSfJX9rr8+8Omoyg8Zg/3AKuVtEPcj/kECEi7isqTiAPidj5QL5qWJY6kJicw1nV8nHhE/4TR+PR3KXhcUXQjyLzgo/LiAltK+JXO+2duC02Iuv0Vv71Rw5KqUZ9YreSAvi3w3lJaSmVVKHrAvcUyeCVkXX4MrI4GzX1PPBXeC+bzwpBWLMHNsNg/S19+98pyUSm+dzLer8gB+w4rfo1bp75m9nXUeoG9J/ML4c2mMkpaiuDOHY/OAPrn+uzTqRPUurUj5Nv1QGuZKNZBZZ4f/SEs9U1/nPqRPlMzRZDsFIs0sF988VGacfMUaTynq8JdTTkKxILnOqJzcs98M1+c+EjrGjxl/LQlyJb/5FU9IF/kFDUhUCtg5RLHygF0S0VZof8VW1KV9xaLCd9ZWr4N/xUTU5Xw9mT6URKpzMMh1aY+pz9kLmZVDaUMA/v2qJNIN4ITcvMOm1q0c+Uxl2FL2+tkcoMtGlJz9LIvZrcSxvpJc00bOnuIXzAk6w5Fw8cvBXenHlD11nwN32XQC8zkqg3EIQZ9vqwvLIeBKCKWXuQJLH/h9SOOy6PG2km2zED7Z1BfKeGE57HEAQcLHx8eSyHdnvx+W0Uj4Rm9vMxFp3Oo8XNDi90fVno6zPfF0mAcsKXxpSr2nNIysZVcl2qRHNHomcVx4oW7rTpDUR30xRLs3KThsJWTVym4E6sOmM+FaDpdYfM4ASSlHXjKLXqO4+E3G9Z2eHPCL43KIZ+KzFt7HVFSLDdx3JEgT9ViIOo7xDEeF1zGKZZj9qo8+9an4IRpwjotf9mZfozySGRoGSVSCeLhdwzC9Vk82fSUvZHvDXfO383gpPKlS3Lrv6Hb08LYUdR9AOZoc6IdUcsA9DHAUoRZqlwS6cg88e6vxXKArHT23DSbr9eL3ae5D0DFv/Msh8rpztfNAvu+ZXuAZp35J+B80PrQi85ckJClz9hSXw5xRskTZ+03mgf1afOIgoJvvkRfj4l/RUrMX2bNzeXD3Rrcl0S9t5bKnFd43+JVw1EB3ZMViUhLyqmb/Qnw9N/TNkjAH4aSOL/9GvVqthsZJENNoz4wv+gPQbgyfywOQ3E92ZuSmdrQc+JVZWXasmhR/kOqdUil81ZWyJ/tbg3JEpOYpOnb1nLWj9Cdnf5dEzFWLMnuWKQ/cnInXVys8C8qiXkBEhMt8mloiTle/ztOScFc0jJWD9FcoDE0uH9H4clh47B0A5+gD5XGCA3RTInkHEYPf1KxXCVYL0MsBHEY87JHx5wVnybqifnzqL9smxKcDmVINcdFhK50V39owfB72rm2zDuxLId7hHE0JX9EQF741lzLCrL77sVnod3hOGZqyl+LX4jW7ipRnbr+QB3APp7nT4l/TUMeBtDIHdXPFLS8OFP7UVHRK9qKMPJA/0pMLKocKF5229rC4fGhv36PgsBXtnf36aJ6w0Rmn8xJc/tpvLZK9L3GuzG/YpoUlGqzXAcVh8VNEfd2O57nyn3IcRmvGC38LTG3TZQf7zeAWyZpezoKg+Mb5gb+fOa71Jegc+8+neO2fDiZD5K0wj9H9xEP1Wq120pS1MA8D1Ljfhx8oPDhdLON3Cw/Ik/w2WmOfhoub9LtRva0+IvFR5uzl4+f19lQOMHX2MTUPwyJySR9Skj8Qy8yDT3uLpg0YzQfGrwk03XZKpg6YTP3QE8ufzEadDeVXVO/X2rKgieIAydph8Wvxtk/Yb2dLuwxsuNNUOsgadSdZZdVIubBq1VPxEngqZJ9C1ujX3BQvC1ux0a+7yeqDiNvxWTmqtqywalesPsmq2W+0K1afZdWqWH2SVbdTa4Ln0jFvHwguLfBcPrgmYIBLBzyXj/L3BsD0wYNp1g8j2McHU4evYRofpFOODabXbNU2ofxNWP/ku3DgQnlgbScRilX/LtQPiZ2FU2vgDVC73Wuf/I0Gc7yO6Q/yNrbRBWQWHN6BdyejunXwW9GCg7tl0wDPxp7cNMRWq+j8jg58U9GCCb1lA99c7B32VjDDxgHDqN4/vCZoAk5fHFVwqVjSNAJKBy6UesvOPurX6jW4VBotS7LSl78OlUqnfVjsfWwqAsD8rStfs9aEJDRK2ap5OEPMhffJ0UT8gMS/Sp1QQ+1eCEmMLOjh34JqA+Zkwaf6LacOZIGyYAoOcYyD1yhGLXG8f3yJExIhK1vujVCjJ8zm/S7OIfm45SckaFb23xu0VgXtS9AqQL8H1GnXmifn8BC1lPmrFrWVQNRyAJGFJOJ7RB0HENU/aIdnklEfPKFGw3yY6B2hutBFgOH0zScX3+AoXm+jhp4YR1cTQLjUe+Dmc9S/o9VspLRGJAjg8vpgJJktXq0afF5Wgisf4qrXHMAFSLzqlfLKQqtZSdeHvK7nJIx3Y7XTutCPZuGW3NG7nnio1RYKyiNhJD8wVDYW4lHb8iw08H15LXh7RxUuIgvic0t+JpHMcNfQrjHg225zoD7LGrGG8B2mu0E65z9jEs5BVwdY49RotKYTdHlesfoEq2ZjMhGbsaL1SVrTcUXrs7Ravcn/VrQ+T6vSWp9j1azVO/DCnnDoVPmpf6PTaVV0fkunXcnO7+m0BZ1Jhef3ePqdKVwuVqIBOy738OXGGp+OvHoEnY61XdWRV0ig07FQS7Gh05XNtuq1Ey9gu6olOXM4imgEl5aNq7bvcfUcw9W1iqvlFi0bF9zf0eq7RatRM1++8/3WQ/V2s9beHyY6TKKYrQjf5Q4mAY6fGF/BhWfhTNyyExp/eIO877fn032IFbR/hTYeIG90BR1Zb39olYXC+w2xVru1kbGTQ2ic/aCRQCMbMcAjeCh05svMNgw7H89MhomtoTTabdTNFwRNlq+RbBz8q2lF6x55MeNY7akOScAsOACHoD5Ua4XqNmsQW5E6OxvE1gKMzcImvR96qC2LGcF7AhasDAmn02j17ie7pJ/sTMj9XTN4qKgsaK0NqjSO6hQqC5pKoho2GmjcRJvJznDpWBIkQadW4fkXPC0X6FjbWi0nhMcank6F51/wtNxQPdbwSOlpgMdjwZJ+HJyftOsNuEwsnFaSSadicsik24LLxIJqkUy6zVbVNe4QSreCsg/l4Rw1+oC3jxWVIqC0KyiHUDoVlEMo3XalaT+iUqnaQyq9SlYUKmT2Qbt65NW7NbicbGia33BqQuYESJ46FafT5fr0aoKEA9m+/NX67n2nBECENHtJXE2+iifl4b1GMVkhPx37ex76AYsSDrgcIWsyLyc8XUfw1FtWxCfqtN3gkzW893U81+ETDekZDufoYnQHXe00zMnNhLMbcVQJfXzTadT8bUR4I05g+RhUy+/5dCo+/8qn14bKp9m1zmd0U+/U0GUPDhRd7yIXKM1GjVRUDqh0KiofUllXVA6o9IDLSlYvMy8qsGXFEpV2ReWAShv4wWwBinfTaNYiUFR61nWtgNKGDcWcpOxaCg43lcHoIiA/T+o18e8IDh0bbhGdrU6vz8aoXq/Vag8DdD/xAAHRnF4uFqZBpF2rnTQa8Klk3UV6VLrtFrph/mYvRSwgaIxDvIBclpdV9+oBuhfKBcdogkPyi9FfNK74pHyaDuiZrPPJtYB0HACSNfKtBWT+U3jOcFkYVbdCKuTBDBhH1pyaLo62TKZdPcAFYlR5CCDddiUeWxo/m8LjQeMCFd9p4mg3KxzvcVTS8R5HR0pHEy4OoyftFgdg6TCNA/hmMY2jD/iUNcyiC3lytXEW7UqJ/sLRE1rj7zZcHEY92Z/NfoXj+ZSJrwE5vSUxx9tC2r+bJ40zePd5NQPw39OFagIaTprysvxgOhzsqo6hYVKs1nrG1qK5YepWmP4T07Rfg01J9YGyTk7OD1OtgvMhnG2RpNTZcNFktXPyIbPG3EfT1kkdvOhY5rM77NGYzZMAUK0tiDP/jVPxepzkwufvljzroaOxssX+7vxCU22ufUKbbXUuWwKuOY0IGrdcOOWz5kxyp9R2gVK9ZQNTddb/G5nqlP8PQvDP96zp67zItMCTyVp9qEsmCbcue8eZ+8OGNbJCaHdXfzdt/fznmsuRKRtlhBqtNarX0OXsHBBCy3ppn+C2Spr+Q+aolZL6DcsK4AHAKqL973hSN+Wth2clR4egRjjGQyLN8O39/5m8/78dmdXsAGKlWbaSA6udWqrXpJLaMuo21hWkDyD97+jufUeJSxyTF/wKr6uEfWK7SHfjBHDhi2kLfY8LoMtkAOxzJzIjFveR4HIDF4zpMIkEs5nYhRrycpmwhgac49eK0DtC/+fCe6PUrTcKVGiWN5wmZDiG00QCzgXlBE3roC/LmFfFKZW/G3VYVBogqLSAUYEhKy3Q94ks6ZW/W52SU1nT+Sle0BiL4yc6HWz/Jv5jcSBRztWg15pRGck4/0HCONq+tiPjp0EO8YKwEWM5PfFGQTljccxW735hsP0vY7ZW+aloejUlkHOIZr35+wEZ8fpuXVEObNC3QegvGf+fiswBmSFnUXRyRvCqonNIZ0QjHyqX5uGxZIyLbKxATjYB5QmezwMClVLLovRcpt0nINOxubeuSCA/PVQ0HziVxtBcr9YkCAjYA8smmwlnsOD0FR+q2bAHZ5rwGQ3BqhtjR9Z6jTmOkwiRgKzkqk/HOFwyNc9pDYz0d/fI1LLtqN36/mjUzrcrzAOSx/xnEktXYtueTawU3bJ//gEDrrnPLePpfixsyXrNeIzOpEdHYiCo6qqIQUJ1QxZAMDXaIHfiltMdDaGAUnVWI5syPzIo75lyODvPvnaXC+T0KVmQ6HT49nep2kfEx2ltyzfP5+QlDRyxgM6RtxR2FRTToX6gvjIx/LXkvNAJh4UulshbEzIHA0kVtGxK/hiQJoQ/MSG9BJo8AUSViM8Lxo0BuOHe9BNYoQLIjKSHh3AGIcUuAe4+YTCsVtX2+zdCAK0Ci3LEVmnhPeMROkE0YqdnAXshaeLtAodQAWUUo1+LFMbntfc9B0y/3lOiesB+kqzQJFmtK2T/jQx9e5NZOKFy4MRGVPwexwswGU3gvM7/L/FjONlx4LQmNIpZWMH6FCwZvqpQfQ4Vk0ktcT7CSd+AJxZj/lrB+hSs1JeuWH2KlcyisorVjhVP41QRWnAazoVCPx1uXgEK6IMSzH/js12dgHO5XV9+hIT1zuCqc1CgrjCoaAxkVNerNfbjCtUnUP2JwZ55oDhtjM8K1X+gSt9qiHZvi8bYF69BqY2BiG1MgyDN4CSBWBH9p7IaMsGqzsWvUauOyM9Qq/T+Zzk90BnHcoUVqh2qOafiHU5H8g+gUDJe/kiXkj0x+B6EvBmT0Hnat+sMcJ2QBTDb+KZwiH+QV8YFngCsgjbM51Xakt/FquUxtv12uMSr2Sa7LDPwT/L1aqNJXlcEx+k432QFF0i2IJ0ekE0cXAhIskIbdSyEZpqsZoEUpEpBbzF5a45fKxw7HGmQ+5e8yGqxX9+N2Q8pOzvNU3ZkT4TMJbOL9M9d5glN8QzO1c56raWjgjZL+zoaeS2PcbkOHKDNm4EBo6WbjwAGfRsTsV5AufGmwqhtH9F2jz1g4dVDwWRZlDYnGKj7eCoRQ4JD41jsnuj0TJg48/TsAsKjpXU8XWzXpQGEE/wcLzlLFksgSJo9rT2jjWQY4NVa+OMXAQ4XRHgOyTqAc6uuradR9OkwASeM0hZCMIgoW6hnHEglH+9wiF2zIrI7JongiAgsKOjbiMTCdpELOxG2DHsqir2SO6jzn+tALK3i9B+cZKu7kzsS0SjGIdwwKSxMaRij2om/RSesn/m7xh5AyDS0HIjcuIyS1epV0PkBJm7Ra9sFkwhBCaCwsOxWXbEIjMetsMjWi0sfxXW4uS4EBIdCw7RgXMul+UupQ2QweBNG//YrLAHl/LEdl/iY03fhem7+eh0ioXB8SCUWtpG9wal4bHhw+kR9giay92jFJGVyR+aJD8Zi6do15e6SdZxwAmnP2A5UeCR4OhGKRBavhQt0RwKCI7JJqgBBdJi3bBlmRAMSwtlEdVWnGJcZ8VWc0BvHCAgUu66QF3NMQzASYjlAvqMB63KbZSgPYm1ASNj2lR8oeZGHzWWAowgIE800db5M0LcbOaEEUPmHrejkUpZykp8bv5DL3Fs4J2EERtP2dJSKrFOVHTzflqeNZ8QS6TtP6JqgtAr27b2B8Orr7LL8eZ0HxI859VNYYCBpGnj5Y7qgP2VjRXmsC7WEpsmMRDDlS9VT2Y62/MldYcrXNATHqf+f8xHNYoK0/YDp9P19Jm1qGmy2IFTjAII0vSd2QcNQ6K+K2ReZ/bFpYAkVnfXj8YBdwDbRNPEDsDf8oAlcGrSvYH0OlremvDDdPg3g2rNcoWKzLWTpDkQ4nKMLLquonDDwMw6oy5/aHZkJgwwMH9Wwb9qlk/YGT2VKbj1FpFAdCLTOvkxla5VgGlqjgpYdWrOC9iG0TSZvImPOINV9H9YRubG7YKJST8Z+pulb+bOaLml4ckGDFTr/gdeMA7pApDfkNn9U9ycf6CwgrIBFCu+RJ39r7lIQ2jSzFf0pUV2HJzc0JGh7T3osX4VCqK/lMaZL0ebixVh8blhc9DxpPS5/hQQDasrQtYhC/NcyfjfBMZQ70o2ODRzrZLWOTof4B41fQU3kaTT3NWwmW0cu5MssyNuwnRQIGB9W2S6drjUiYBzUxh6Rrj0iULxPazIi23iA0h9aZQI6JC5xhLZj4WCg6DYsyYQk8W7yGwwaB2WAxg6WS4I5pC3S7u5HE+qmQFwxTv9hYbxVnkBw1NvKFPi6MSBFuk+pw2FCuLzGH4gPDASFGs3tm0KRzmqCtD1Uy6JjngQYu1N1TsztEC+ZrYSbR9MaYDjCUa/tA+lmur+lB0TIBWAS9Z6xjSK7ucKZRNLfb/mWLQ+mgwHedOF+f19bGDtEHrafFRKMutLspd4ytUHQCZrT8L3vDgWJXkx4i6Q2ur7VAvM2M7nC8h7Lue+nEuOjR8YrNvts0ts1bIUXIYFjtAOBI/39ish7Ilevc46ToBKUfSw39P8ldI7+JFCuDwPhckd8uubMT0vtKzR7aDYZ/80g+grNezRpvKBCskMiB1sLzbIJoHzbqBqo9fFfxPOVidbv8WzQvPMLKj4f8HlzDyo6H9CRxl4F5gMwlcb5LZrNmn6k3crWAfbJihSm0XPOpDhbyCyyhLWpVaowfYBpz2DeGocVqA9ApTZiReY0Imuclu1Hp5d8UwPo7V76Q46dJHEcvB9FCYOYXnX/2wqzx5Hf8dqMl36Hq0KzQ7MvQvQJbOMPu3SEy/HqB4D65wGjowSXK0r/RinaXHWYcGkC0Fj+rAKWEZhUV48EjAUOjNuE8BUOxYLRON2RFaYPMckuoAmnSJiYyUyYTBWmDzGJfVYh+ggRC+icPtG0D1jAIgImdAKNjpyNULF5xyadDLvbU6UHI16TjusK+0sakuj0/GfMk3SqMLC4SF2nYYS3WaZw/8fbheZJClaYBByoCQkC4Zn8I18ENHBCjScBACVjt+A2HlRMd0yIFRijCB6m7Xui7Tuib7/uE1XQPg1tVxtcIdsi+yE2Hwmi0zMMpdZImRyUrd3Pw2Y5OhjQt2vvOxT5sAyDcxLI+NCIJ1BqgJXb7xnTRvkiASUqeo00tMEk4fN2Mk569+IsXQkUNprJRl04AorwKWKCpjh8hoJEkZeuUdUylIZLOllKbKWUivhzKCxlwqEWdnZNi8xvAaFvZ4yBiUSrnLLNFTg2p0oLfRLVDVmA7SBdr9lRTuhbGnpNBwVsKvrSv17iCFC3bcVEzDZ6SBfVdjBTdcAdgJHmIeMI2mAvrbaXulAuGPfJ/GTE8VMsyLC0yGoKqGmQcme5n+nOsjadhIfYh3KTXclhWEHRgMnC8LmdttYSnz6AIhrN/ZZBZoMSksYVC+A09OzaDNFc4eBpMxZx29pz84ZA0BzYcd1MYxt04VyHckY86PNmv12IWRfzT+w/C5tt7ojoZGquo8vmr5D5zycsiSGFPtt1i5oGUjtppZlKr2cYhNwtdwQDal6n5gkydZfRJSJrktBZEjwjTxDBCyh2it7sa10qaV474fQfoWFBq9aGWXN2wtkaDRbb4mMYSKwqFFiapGXTnH27eQUpjmQ1vr2pbxxxCubwtcxjc8Igb70kHMpBYzc+sAvlgz5kzLo2gNSHVX0qOcDOFmbrv50Pj7dsxRmOwFxDVDtEWgJTFW/8O5o7xp6ggulb5pJOqYQmO/sxk7pZH3DHSHxyOFeaDo5mC0fSFok0WyCfTj0LaEZUfkDYisYuFik1jhxVDQukLnAQEWBgFCu4Xm9Y4BKwTYsgyFvLvJ+kgAGvks0CApQsrLf2lXCmiVa5gECPNF6iCfafAbWmtUplM3wCWji72dlnYjTrLltBoG9nBFJTPyXfYR5Hau9WPFIe8k9pzz09CRdAwBlRvCJitWBKatVkqlGV8otPau9uzDh5KHsJf8I+QdfhnMpeh3DuFCvGXc8mr/NwU6N9xtPqFjAy1bHpQf2G0aYnVOpGyeHs4kyHQsvqtcff0NoiOtnVkW3Kp8AQa8AjBulKieqANow6oL8BdAdpywEUIO+ZcjgqHKQITZeyQV0grIIoCUBZBTAEiq3AZPj6+2Xz2UYw5wXkIgmCk2kyIwfn2ZBROG0xGjajYjtWEwrmeAchOx5ZUQdkp25adiLx2aJTHFKhiKPTMznwvP7fMJ5oEAxZIING4n/UrKX/iNejmLNnsvtJyNLZpl8EdQD8QK6UeaWHR1q6uA9ppT8ZbFaty6vhCC81n/zBQOijAxsR4o6A9RQr4LCy1gwvVwRsF2z6fezp+LzYAn0PhfcmtKyj1A5rp45PLfE/UXIIgtZbO4XdCXmYHzg6rgvhxqArHPvCf3l1hJsiZR8Uhxwd218kDD9T4wuRV//wBt/ReY0Ziz5RJQ4Dl2KLWRCvW4aE9o/cBGbDtvDIZ+apg6B1UMRlwdb3AhY7Y1Ps9wLpWbApvBA/O6q9rGzGGM8+0ySj4rXhNSXz+Ss6+9TAdhDMOv/ZnudozJ4Ym8vun46Q0pauC7Her2Ia4jB6uwsQEFfMiW7LJjP29EQc1V2dzEejDqkRp6GsP0SPOHYpEGZTuhRmDUeYdTsWmV3gKEbpG7gBS9mUH1RhHROW+IKm3J0YmELrg2thR6T1V0ifnNH1+0GculFdf0eiGCcch7Ezel5tjmdUZ73j5YqOV8pE6rXMUcIvAlsSHMRLH3NyOgjEZwtxOpV+TObUp6Ez21NxiTIHDa/eMGgyDIXsLUlEsSvklPPSHrkoolEqezeyGXco7TTvVfztE33nQJDs6ZppeZE845iGjkADI35DzOdUrHnhTBpOiW1kNnRzJEeQF+OnJzTgxBm91wWyW4c4XiKxOle47YvdR11ITIGTv+BK2qmrWwCUF7URwU+uMOuDYcZXOHbqcFDQZa7Pyw0dFSuLnQl+q/EQa+bI+aujrpdVZOjRoWK9pmYWLy9uF3hFg1c04dgX63BG7HRTe7nhozyK0YA6GiC3B+6ShEQswNGjwd5+3bwPOp8nm/vvjvKzJnfifbg7gfR6TTknMgeG8+XWcISbKm6Zi7tzw8aiNY1x4IzEwdmoO3KuyFxPN+mVF7nr1SoJ6T/p8eDM+QrF278On4iwhFkSoRGNCHa1ct4mwbUQPfExXQEHJXNzLT5gGMkcmAyqu0IPjtil+evAteR1tw4E4F90HhJXQpxgqN0koTt3hRRo1pzYMV6tmPiZK8l9MEou1W1ppxvxQddyfgN3BaFyk8haoHiH8IbOOHbn2i00CbwjPuNzZzQfHHxhvGk1GDhzCVC7aj83eHfXjiADE3+6JQl3KXUNRtZuk5hTlwLsutcC8wL3PfRdEjgwJ8P3JEYTpwIn7Q4QkZssMV9h3xWRazeBiNxk+RqlxpxsoInXrvBTXQlrcndHFlSs3Kk8LJRgpydeQDc4XCSfmpUNAp7a+K5nLRvrMZ+KfesR/oP67tTXQUnyeAlfuNNy66BpjTVu09HIEWZg/Igpc6fbz8EI58z3XPOidh+IYzViSehMXZ2yRa3ZJI9LQgJ/iSlHA18cDRGdBcSZ6pPdhX2gGBuOYrSm/T7G2HQEo9p6w6w0hjhOZGE75s4cINrBlNt0zV+H9Weypu7kxHq6lwB0cY3xWmzHG3cuhfVsC9gYc2e8LeusCPcTZ7ysXdt/e5uRORNF0j4YdVndknWcOFPipW2O6eKaBEnMHIHV0Y2O68Ly5B+u7ER1pKLxneiF7OUpcKdFr/W96CWhM+64dlI5D1iuON0gYLniWls3TiWsVgXrc7CmURLiFXUFl5IfNo7rnuMwccVN7LQsq60H4hAs3Tt+X4a1JmwdkNMzPHt1xnxQ3MR6rZEV1yRdtSYuVwyIrm7yQ5fWcInDRdp5MXaqpkU316vNjYViwYnvEDM1kGpc1i7ICjszp0S7B7surbE7rNSWFW/fm6Tljovd1I1H5AHLlROyqRt31oaVrFauJDTUJuzGYU3InIgVU+zMoagbTNUl5i3Zi0PjXNR6WPPKawvMFf2lBnKM+0OeWG0QOFMgoVa+Zr81rAvsPqQR+ekILjUCbdzwesRiKcJ/vGNs5YwWU9zuL/S0zhWbK7qsp1vMr08tkOO8HMHVtm2NPbKVQ25RS7vRfD68XNmNLWviFeEnEr+enlG2xP9g7krBfr2m+JKZJ2h46cK/TmyIE4cChtrZbW1cS7JKL6s+Erx2FlvmU1IX2wUOgo1t4T+7kmXTbracBzSWxMhbksCdcnLrW/SC4wV1JlDd1a2+18V1hcN5QNAjjZdOdXzU7SKnzY0uluiBBTFeuHOzrWX7INij5oxZqxuRzZWaM8V1ugVQutT+ImSNRs5c/dC+h6XL69aV4nzrJsYtC0+uWUj/SW1aPKdOFaoo4y4zx2f16aHzMHZmXwKQNuStmENRRuvu5q+cLxpyFkUOodMtstZF55o2eyvn/PJsGl1iXkDX6MqlqGNXO6ytzSxmnKA7YdbG6H7tjPvUte0IKNxccaAsajWfktAnp2JFjGNBzxmrQxvZZuUazMZ4ERJX2oB2dS+Q5MCL+sLY8NnalRia9qUbfWa3iR8Q7E6xmX5QIzdkrip/C1L2SMP5SrBwhJg6qN0ksTXjcXQ6WK2XNCbYobSTbumBl65cAxn3l+5081RFLLse08R1hiMyw85syba2EtPlRUPmJ0GJGj9pE2PCI3/BwbMrwHSvd+UALEY3OAl9Rzv9tTNXsusiG+LV2qGrEor12jWuxba8HDVd21Z4PVF3ijJsWxWS14K71LFZ8SezR6+1iYXMnfoVNXeZvVw2F1yu6C/1FnTLvAJLuy7f0CdX4ojaLfu1iQV0NXMoYamdHdflJRO8aCh0fsxfkfdMZU2Go/rsC8nLY9BzRb2psmfe/H/1A4e2qnJ4Ghe2EeUxOqPOdOlU5csCsB8OiZd2NkmXFnsJl4KEc4eAImbGjVoVnKP637xCO/9JuE+jSp99ktcF5eSFMVec84POItnrpLSBRUuXVNnBkLjsxcU5EXNGhym1eHXj2n9HbELdSfbadtIlMzQMCA4dss/2Ja1jfGtessCVCT/q+Afjtqxk5Y5oabcV0ccVzlmAHcGlPTpaF9cVFvr+MqBzd0RMYdbpGGdGn505H7Wn1+QAyyHRUoKwxg/GK8ZlMZT/jKYcU1dKoqxH/q99grbGa4Xs88i8Zxw7hGzftPjKXSVdZsK0YBx5L3S1coibbRvjTxLLeKKjuIybF3/hV+xMpaJtNXZDnwj6UxyYzlxPOgiMGWc2ZjHjM1ni6UowUREz88Urv5A13ETWNK7GJtQPqe9ayzLbVRhbalMs59I7uj07xp3MPWqO7lDzFYx3OFwQvhuu5I602S4tVrg5I2+6s+K0uTH/GTlW1Kg9aSkfaHJIgkvjvOzv0XSsxCzALgW2bZdN3bEXaeO6gks5P+vGcSWhQ0lftWON+S354Agp1Zw1XkzsYRqgM4d2onaXAm1gIY0xf0UjKl6JcODaxFDbroAnPppwoB4oeUkhOcJNe0CaPrdkhpFbxdmKrBnPcXqERPjFTVpt4wEhjwRP6DJJCzSqpHAmck5HHo0nN2UymMxkpwx3dFnHtnfuPVP0Z7JaO8JrV9Bij1dA5g7Jl3pPzngSRfAia6n5HVNmfdvKbIWDjQvlVhsb+7cmvDANAvG5s8Jm3tAQyFZs5s6kIdUFML89BTGh0hhx5yhQu0GYl7KEO3QPQG1hZh7XtkjPnbTmvq2xa8togVjDFWJKVVDmYdw5EHNnQ+p3+tekNSVhSJ3pWWnbqKhCPRlgybi1I6x2sX1rLvijUylx7flB2rTEB4vSZhgVsk8iW+KApKkkh6DZbuos+9JHbln41uWMsTm6xPGScIeoWSuMiom/PB04VPOvuyWnYsEanBz1gvqZvSAdTkO8Ihy7KlPZ20TlwMpRucoej9BiRYIATZabFbpAq6Vr1mvRYqsVdrXRtVnFLlCtE4cSabqjM7RYceZMYtumTJ3/X+K7UjGnRpkzVxpqgZK2ujuDBNX4stHNlzZIdGjeg26bLB1WY2dDpV2j1vqEvbhz8tUtnnxy9DVzBZRSoZq5RkkLlOe5gslmOGFKArKW3owznnJrP071hXRhPrxc8ZabupWo+eBqOoJLmdH81l7ZNK+WK7zqILRX2xFcVnfjvXfmCKaWbjm4DqYHOicMbYKijvBSbIiW0TPxEW+ac4+xL/50xS/s6jad+CoyjsM0T5heAz1tocclEWrMGe9HCdNkPx731q8PcED5DLuSZFWH3fWz+0T541sH2CH7X20flj1OcSyCrngE9dq+C9XOHmo9FkJXvIS+dlLtWARd8Rv0o2jHIuiKK6HdNetoBDuuENzfxV/x9Y+FsOsIQvVaYCt74UreCFezRCD0XfFDtFtU5g4w9JeMu2MP6tYtHomfK9ag9pyqI/FzxhTUrTY+Ej9nDEHtQqKc+Z1R/9V3KCADzQzc8nPnANFtqncsgM6cINp5/iMBdPQIaWfPoR0JoDNniAIQjA50JpawfwhnbyaXO8AkcvUAAXACC3iOHh4N+4eHgOfowdHM3JPpGPBcOTR6+xHorxSS5UxviB0KuyidmqwrPQnPFaWnRk3tb1xJz1WtB0L0XNF62o0jjwHvhvnOzBVU6l+slx/IFt9zMkdXdLF8wa+OYFSb1lnfwxeEc1fgKTLYsR4vkFfCYp64s4mVE8R63veC8eeAPjlz/1A5RKwXEF1id8IFHe3a5iPAc8Vy1q/aPQI8ZwxnaFVrEp4rhjM8yeMsCedIeVs3YKoWjPWc2xXmM7lwF+llb2KfOz0SUJ+t3eleogZgOtYDMG65bx1oRRt/ErJ2xgJUs23WhS+l54oJqN/8JGd6N2LrxkuWRA7VvEDbv+8YuiKHbWgG4ZitydxVEbR/CWmDzxXpA1exMWYx42nVi5sEO9YzIRMs1oGD4BV5yWxF+EKI4yMn7kRVldSIdaCyWRIWUonSXuluUuxb39iez5hD+JRqXvv4CI7RGQlcie33oF3MFADRRF6KcwQguAtd3pK66xtbjwym9JyxCqGVok5x6Ir5osYE29bDqlP8kzoCD5zVMmUvaOBOQFXhZ78iQbyfH7t0DVhpX2vd+dgBdPTosF/YJufMhc7IXxua2bzB54r0dXSnsh4HnzOVHdDusG7weS4XJYCQwZUzClB13CBYMCtn9J96gxXABk78Z3eErw9O+CQ+R6WvBUDzSXzOnL5K9137zm+Kz5XKSnC3WDf4nLm7r9ygtp5I3+BzpQlgF1zINMXnSgNA9eiwfvLeh0RAQncMOzp20H7C6IEsqexe4tSdOAWilfjfDxKcDjinP2Q7/ItA1rRFjvA7mHvyFQ9ErF8LHHtB5zhyJVOu3oL7it2SA7Hbc1d45XDS5sFL7PGlI8h2MmUb2aMjvPKoa86Bl+fMlgTCiyXVlsyIrNqSmXg9EnfsCqW1knG74gwvFnjhTL2dYoYZN1zP3KlxUkXrK16SJis+Ixx5S3cGuO/r+6+1idNjRnASvyIPB+6kUjvWoTH2jAbhXNoWAg91S+aUM9O4SpNNue7Ep8OuTC9XujN8bZSLJrJoSV29JvGlWgc9XAzHaLh053aTWh78pcmHesgSzknov6Lzn/4Sh+4YaIqsGbdnh0kkFuBKJFa10b6STdbCNWIvYRRjyl0lZlzARpyGz2nMnyXi0KSumGk7X8neqTnaJkumLHHm6GxYPjrPA/JDXmt1hFdHNc2M+wLnkfjUDhFTL1J/paIjH2BIngWuUFNOAfP78o3avTOOpmKamd+aCWeOsOopVxSMB7LPf1JnQthKAMO4RXYlzFc/cQVXu2f7iLxiMXEl1qOW+tiBha7DJ8ZXTl1wUZquGz8hr1crKl6ukGVA9kvK3LmNYTvl+x5awxFobdvVUXIIhzPx624Od/U0aUVxml+SIR9HK437X7njrUVtnEQkWblCK4eeFlq0bhmaYC4Di64Qs51V2uJy5qTs5jAGJxdgrpyS1k2LiSSDvj8J8198QmeLyixsTYfOyTzam+vBEpIlPpwjuLq2I2OytMeZZKUiW8ZtMM+p1K7tOzZTKryiGI2xv6TOtKDsWY8nbrFNEu4vceQKN+t7c5qEoTNxWOsJkfu1W2Uqii7Tk6726P8D";
Sidebar.prototype.gearImage=GRAPH_IMAGE_PATH+"/clipart/Gear_128x128.png";Sidebar.prototype.libAliases={aws2:"aws3",gcp:"gcp2"};Sidebar.prototype.defaultEntries="general;uml;er;bpmn;flowchart;basic;arrows2";Sidebar.prototype.signs="Animals Food Healthcare Nature People Safety Science Sports Tech Transportation Travel".split(" ");Sidebar.prototype.ibm="Analytics Applications Blockchain Data DevOps Infrastructure Management Miscellaneous Security Social Users VPC Boxes Connectors".split(" ");Sidebar.prototype.allied_telesis=
@@ -10952,7 +10952,7 @@ e))}catch(n){null!=e&&e(n)}}),e))};
DrawioFile.prototype.mergeFile=function(b,e,f,c){var m=!0;try{this.stats.fileMerged++;var n=this.getShadowPages(),v=b.getShadowPages();if(null!=v&&0<v.length){var d=[this.ui.diffPages(null!=c?c:n,v)],g=this.ignorePatches(d);this.setShadowPages(v);if(g)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",g);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(n,this.ui.pages):null;c={};g={};var k=this.ui.patchPages(n,d[0]),l=this.ui.getHashValueForPages(k,
c),p=this.ui.getHashValueForPages(v,g);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",n,"pages",this.ui.pages,"patches",d,"backup",this.backupPatch,"checksum",l,"current",p,"valid",l==p,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=l&&l!=p){var q=this.compressReportData(this.getAnonymizedXmlForPages(v)),x=this.compressReportData(this.getAnonymizedXmlForPages(k)),y=this.ui.hashValue(b.getCurrentEtag()),z=this.ui.hashValue(this.getCurrentEtag());
this.checksumError(f,d,"Shadow Details: "+JSON.stringify(c)+"\nChecksum: "+l+"\nCurrent: "+p+"\nCurrent Details: "+JSON.stringify(g)+"\nFrom: "+y+"\nTo: "+z+"\n\nFile Data:\n"+q+"\nPatched Shadow:\n"+x,null,"mergeFile");return}if(null!=this.sync){var A=this.sync.patchRealtime(d,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==A||mxUtils.isEmptyObject(A)||d.push(A)}this.patch(d,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw m=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=
-this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=e&&e()}catch(L){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=f&&f(L);try{if(m)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,L);else{var K=this.getCurrentUser(),O=null!=K?K.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),O,L)}}catch(u){}}};
+this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=e&&e()}catch(K){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=f&&f(K);try{if(m)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,K);else{var J=this.getCurrentUser(),O=null!=J?J.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),O,K)}}catch(u){}}};
DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var e=new mxCodec(mxUtils.createXmlDocument()),f=e.document.createElement("mxfile");if(null!=b)for(var c=0;c<b.length;c++){var m=e.encode(new mxGraphModel(b[c].root));"1"!=urlParams.dev&&(m=this.ui.anonymizeNode(m,!0));m.setAttribute("id",b[c].getId());b[c].viewState&&this.ui.editor.graph.saveViewState(b[c].viewState,m,!0);f.appendChild(m)}return mxUtils.getPrettyXml(f)};
DrawioFile.prototype.compressReportData=function(b,e,f){e=null!=e?e:1E4;null!=f&&null!=b&&b.length>f?b=b.substring(0,f)+"[...]":null!=b&&b.length>e&&(b=Graph.compress(b)+"\n");return b};
DrawioFile.prototype.checksumError=function(b,e,f,c,m){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=e)for(b=0;b<e.length;b++)this.ui.anonymizePatch(e[b]);var n=mxUtils.bind(this,function(k){var l=this.compressReportData(JSON.stringify(e,null,2));k=null==k?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(k.data)),
@@ -11040,11 +11040,11 @@ StorageFile.listFiles=function(b,e,f,c){b.getDatabaseItems(function(m){var n=[];
StorageLibrary.prototype.isRenamable=function(b,e,f){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};RemoteFile=function(b,e,f){DrawioFile.call(this,b,e);this.title=f;this.mode=null};mxUtils.extend(RemoteFile,DrawioFile);RemoteFile.prototype.isAutosave=function(){return!1};RemoteFile.prototype.getMode=function(){return this.mode};RemoteFile.prototype.getTitle=function(){return this.title};RemoteFile.prototype.isRenamable=function(){return!1};RemoteFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};RemoteLibrary=function(b,e,f){RemoteFile.call(this,b,e,f.title);this.libObj=f};mxUtils.extend(RemoteLibrary,LocalFile);RemoteLibrary.prototype.getHash=function(){return"R"+encodeURIComponent(JSON.stringify([this.libObj.id,this.libObj.title,this.libObj.downloadUrl]))};RemoteLibrary.prototype.isEditable=function(){return!1};RemoteLibrary.prototype.isRenamable=function(){return!1};RemoteLibrary.prototype.isAutosave=function(){return!1};RemoteLibrary.prototype.save=function(b,e,f){};
RemoteLibrary.prototype.saveAs=function(b,e,f){};RemoteLibrary.prototype.updateFileData=function(){};RemoteLibrary.prototype.open=function(){};UrlLibrary=function(b,e,f){StorageFile.call(this,b,e,f);b=f;e=b.lastIndexOf("/");0<=e&&(b=b.substring(e+1));this.fname=b};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(b,e,f){return!1};UrlLibrary.prototype.saveAs=function(b,e,f){};UrlLibrary.prototype.open=function(){};EmbedFile=function(b,e,f){DrawioFile.call(this,b,e);this.desc=f||{};this.mode=App.MODE_EMBED};mxUtils.extend(EmbedFile,DrawioFile);EmbedFile.prototype.getMode=function(){return this.mode};EmbedFile.prototype.getTitle=function(){return this.desc.title||""};/*
mxClient.IS_IOS || */
-var StorageDialog=function(b,e,f){function c(p,q,x,y,z,A){function K(){mxEvent.addListener(O,"click",null!=A?A:function(){x!=App.MODE_GOOGLE||b.isDriveDomain()?x==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(x,!0);e()})):x==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(x,!0);e()}),
+var StorageDialog=function(b,e,f){function c(p,q,x,y,z,A){function J(){mxEvent.addListener(O,"click",null!=A?A:function(){x!=App.MODE_GOOGLE||b.isDriveDomain()?x==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(x,!0);e()})):x==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(x,!0);e()}),
function(D){b.spinner.stop();b.handleError(D)}):(b.setMode(x,!0),e()):window.location.hostname=DriveClient.prototype.newAppHostname})}d++;++v>f&&(mxUtils.br(g),v=1);var O=document.createElement("a");O.style.overflow="hidden";O.style.display="inline-block";O.className="geBaseButton";O.style.boxSizing="border-box";O.style.fontSize="11px";O.style.position="relative";O.style.margin="4px";O.style.marginTop="8px";O.style.marginBottom="0px";O.style.padding="8px 10px 8px 10px";O.style.width="88px";O.style.height=
-"100px";O.style.whiteSpace="nowrap";O.setAttribute("title",q);var L=document.createElement("div");L.style.textOverflow="ellipsis";L.style.overflow="hidden";L.style.position="absolute";L.style.bottom="8px";L.style.left="0px";L.style.right="0px";mxUtils.write(L,q);O.appendChild(L);if(null!=p){var u=document.createElement("img");u.setAttribute("src",p);u.setAttribute("border","0");u.setAttribute("align","absmiddle");u.style.width="60px";u.style.height="60px";u.style.paddingBottom="6px";O.appendChild(u)}else L.style.paddingTop=
-"5px",L.style.whiteSpace="normal",mxClient.IS_IOS?(O.style.padding="0px 10px 20px 10px",O.style.top="6px"):mxClient.IS_FF&&(L.style.paddingTop="0px",L.style.marginTop="-2px");if(null!=z)for(p=0;p<z.length;p++)mxUtils.br(L),mxUtils.write(L,z[p]);if(null!=y&&null==b[y]){u.style.visibility="hidden";mxUtils.setOpacity(L,10);var E=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});E.spin(O);
-var B=window.setTimeout(function(){null==b[y]&&(E.stop(),O.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(D,G){null!=b[y]&&G.getProperty("client")==b[y]&&(window.clearTimeout(B),mxUtils.setOpacity(L,100),u.style.visibility="",E.stop(),K(),"drive"==y&&null!=k.parentNode&&k.parentNode.removeChild(k))}))}else K();g.appendChild(O)}f=null!=f?f:2;var m=document.createElement("div");m.style.textAlign="center";m.style.whiteSpace="nowrap";m.style.paddingTop="0px";m.style.paddingBottom=
+"100px";O.style.whiteSpace="nowrap";O.setAttribute("title",q);var K=document.createElement("div");K.style.textOverflow="ellipsis";K.style.overflow="hidden";K.style.position="absolute";K.style.bottom="8px";K.style.left="0px";K.style.right="0px";mxUtils.write(K,q);O.appendChild(K);if(null!=p){var u=document.createElement("img");u.setAttribute("src",p);u.setAttribute("border","0");u.setAttribute("align","absmiddle");u.style.width="60px";u.style.height="60px";u.style.paddingBottom="6px";O.appendChild(u)}else K.style.paddingTop=
+"5px",K.style.whiteSpace="normal",mxClient.IS_IOS?(O.style.padding="0px 10px 20px 10px",O.style.top="6px"):mxClient.IS_FF&&(K.style.paddingTop="0px",K.style.marginTop="-2px");if(null!=z)for(p=0;p<z.length;p++)mxUtils.br(K),mxUtils.write(K,z[p]);if(null!=y&&null==b[y]){u.style.visibility="hidden";mxUtils.setOpacity(K,10);var E=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});E.spin(O);
+var B=window.setTimeout(function(){null==b[y]&&(E.stop(),O.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(D,G){null!=b[y]&&G.getProperty("client")==b[y]&&(window.clearTimeout(B),mxUtils.setOpacity(K,100),u.style.visibility="",E.stop(),J(),"drive"==y&&null!=k.parentNode&&k.parentNode.removeChild(k))}))}else J();g.appendChild(O)}f=null!=f?f:2;var m=document.createElement("div");m.style.textAlign="center";m.style.whiteSpace="nowrap";m.style.paddingTop="0px";m.style.paddingBottom=
"20px";var n=document.createElement("div");n.style.border="1px solid #d3d3d3";n.style.borderWidth="1px 0px 1px 0px";n.style.padding="10px 0px 20px 0px";var v=0,d=0,g=document.createElement("div");g.style.paddingTop="2px";n.appendChild(g);var k=document.createElement("p"),l=document.createElement("p");l.style.cssText="font-size:22px;padding:4px 0 16px 0;margin:0;color:gray;";mxUtils.write(l,mxResources.get("saveDiagramsTo")+":");m.appendChild(l);m.appendChild(n);v=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");n=document.createElement("span");n.style.position="absolute";n.style.cursor="pointer";n.style.bottom="27px";n.style.color="gray";n.style.userSelect="none";n.style.textAlign="center";n.style.left="50%";mxUtils.setPrefixedStyle(n.style,
@@ -11071,50 +11071,50 @@ d=document.createElement("img"),d.setAttribute("src",Editor.tweetImage),d.setAtt
b.defaultFilename)+"&body="+encodeURIComponent(l.value);b.openLink(x)}catch(y){b.handleError({message:y.message||mxResources.get("drawingTooLarge")})}}),d=document.createElement("img"),d.setAttribute("src",Editor.mailImage),d.setAttribute("width","18"),d.setAttribute("height","18"),d.setAttribute("border","0"),d.style.marginBottom="5px",Editor.isDarkMode()&&(d.style.filter="invert(100%)"),q.appendChild(d),q.style.verticalAlign="bottom",q.style.paddingTop="4px",q.style.minWidth="46px",q.className=
"geBtn",n.appendChild(q));d=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});n.appendChild(d);q=mxUtils.button(mxResources.get("copy"),function(){l.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?l.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");b.alert(mxResources.get("copiedToClipboard"))});5E5>e.length?mxClient.IS_SF||null!=document.documentMode?d.className="geBtn gePrimaryBtn":(n.appendChild(q),q.className="geBtn gePrimaryBtn",
d.className="geBtn"):(n.appendChild(p),d.className="geBtn",p.className="geBtn gePrimaryBtn");c.appendChild(n);this.container=c};EmbedDialog.showPreviewOption=!0;
-var GoogleSitesDialog=function(b,e){function f(){var D=null!=B&&null!=B.getTitle()?B.getTitle():this.defaultFilename;if(u.checked&&""!=q.value){var G="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(q.value));null!=D&&(G+="&title="+encodeURIComponent(D));0<E.length&&(G+="&s="+E);""!=x.value&&"0"!=x.value&&(G+="&border="+x.value);""!=p.value&&(G+="&height="+p.value);G+="&pan="+(y.checked?"1":"0");G+="&zoom="+(z.checked?"1":"0");G+="&fit="+(L.checked?"1":"0");
-G+="&resize="+(O.checked?"1":"0");G+="&x0="+Number(l.value);G+="&y0="+g;m.mathEnabled&&(G+="&math=1");K.checked?G+="&edit=_blank":A.checked&&(G+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));k.value=G}else B.constructor==DriveFile||B.constructor==DropboxFile?(G="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=q.value?G+=encodeURIComponent(mxUtils.htmlEntities(q.value))+"&type=3":(G+=B.getHash().substring(1),G=B.constructor==DropboxFile?G+"&type=2":G+"&type=1"),null!=
+var GoogleSitesDialog=function(b,e){function f(){var D=null!=B&&null!=B.getTitle()?B.getTitle():this.defaultFilename;if(u.checked&&""!=q.value){var G="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(q.value));null!=D&&(G+="&title="+encodeURIComponent(D));0<E.length&&(G+="&s="+E);""!=x.value&&"0"!=x.value&&(G+="&border="+x.value);""!=p.value&&(G+="&height="+p.value);G+="&pan="+(y.checked?"1":"0");G+="&zoom="+(z.checked?"1":"0");G+="&fit="+(K.checked?"1":"0");
+G+="&resize="+(O.checked?"1":"0");G+="&x0="+Number(l.value);G+="&y0="+g;m.mathEnabled&&(G+="&math=1");J.checked?G+="&edit=_blank":A.checked&&(G+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));k.value=G}else B.constructor==DriveFile||B.constructor==DropboxFile?(G="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=q.value?G+=encodeURIComponent(mxUtils.htmlEntities(q.value))+"&type=3":(G+=B.getHash().substring(1),G=B.constructor==DropboxFile?G+"&type=2":G+"&type=1"),null!=
D&&(G+="&title="+encodeURIComponent(D)),""!=p.value&&(D=parseInt(p.value)+parseInt(l.value),G+="&height="+D),k.value=G):k.value=""}var c=document.createElement("div"),m=b.editor.graph,n=m.getGraphBounds(),v=m.view.scale,d=Math.floor(n.x/v-m.view.translate.x),g=Math.floor(n.y/v-m.view.translate.y);mxUtils.write(c,mxResources.get("googleGadget")+":");mxUtils.br(c);var k=document.createElement("input");k.setAttribute("type","text");k.style.marginBottom="8px";k.style.marginTop="2px";k.style.width="410px";
c.appendChild(k);mxUtils.br(c);this.init=function(){k.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?k.select():document.execCommand("selectAll",!1,null)};mxUtils.write(c,mxResources.get("top")+":");var l=document.createElement("input");l.setAttribute("type","text");l.setAttribute("size","4");l.style.marginRight="16px";l.style.marginLeft="4px";l.value=d;c.appendChild(l);mxUtils.write(c,mxResources.get("height")+":");var p=document.createElement("input");p.setAttribute("type","text");
p.setAttribute("size","4");p.style.marginLeft="4px";p.value=Math.ceil(n.height/v);c.appendChild(p);mxUtils.br(c);n=document.createElement("hr");n.setAttribute("size","1");n.style.marginBottom="16px";n.style.marginTop="16px";c.appendChild(n);mxUtils.write(c,mxResources.get("publicDiagramUrl")+":");mxUtils.br(c);var q=document.createElement("input");q.setAttribute("type","text");q.setAttribute("size","28");q.style.marginBottom="8px";q.style.marginTop="2px";q.style.width="410px";q.value=e||"";c.appendChild(q);
mxUtils.br(c);mxUtils.write(c,mxResources.get("borderWidth")+":");var x=document.createElement("input");x.setAttribute("type","text");x.setAttribute("size","3");x.style.marginBottom="8px";x.style.marginLeft="4px";x.value="0";c.appendChild(x);mxUtils.br(c);var y=document.createElement("input");y.setAttribute("type","checkbox");y.setAttribute("checked","checked");y.defaultChecked=!0;y.style.marginLeft="16px";c.appendChild(y);mxUtils.write(c,mxResources.get("pan")+" ");var z=document.createElement("input");
-z.setAttribute("type","checkbox");z.setAttribute("checked","checked");z.defaultChecked=!0;z.style.marginLeft="8px";c.appendChild(z);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 K=document.createElement("input");K.setAttribute("type","checkbox");K.style.marginLeft="8px";c.appendChild(K);mxUtils.write(c,
-mxResources.get("asNew")+" ");mxUtils.br(c);var O=document.createElement("input");O.setAttribute("type","checkbox");O.setAttribute("checked","checked");O.defaultChecked=!0;O.style.marginLeft="16px";c.appendChild(O);mxUtils.write(c,mxResources.get("resize")+" ");var L=document.createElement("input");L.setAttribute("type","checkbox");L.style.marginLeft="8px";c.appendChild(L);mxUtils.write(c,mxResources.get("fit")+" ");var u=document.createElement("input");u.setAttribute("type","checkbox");u.style.marginLeft=
-"8px";c.appendChild(u);mxUtils.write(c,mxResources.get("embed")+" ");var E=b.getBasenames().join(";"),B=b.getCurrentFile();mxEvent.addListener(y,"change",f);mxEvent.addListener(z,"change",f);mxEvent.addListener(O,"change",f);mxEvent.addListener(L,"change",f);mxEvent.addListener(A,"change",f);mxEvent.addListener(K,"change",f);mxEvent.addListener(u,"change",f);mxEvent.addListener(p,"change",f);mxEvent.addListener(l,"change",f);mxEvent.addListener(x,"change",f);mxEvent.addListener(q,"change",f);f();
+z.setAttribute("type","checkbox");z.setAttribute("checked","checked");z.defaultChecked=!0;z.style.marginLeft="8px";c.appendChild(z);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 J=document.createElement("input");J.setAttribute("type","checkbox");J.style.marginLeft="8px";c.appendChild(J);mxUtils.write(c,
+mxResources.get("asNew")+" ");mxUtils.br(c);var O=document.createElement("input");O.setAttribute("type","checkbox");O.setAttribute("checked","checked");O.defaultChecked=!0;O.style.marginLeft="16px";c.appendChild(O);mxUtils.write(c,mxResources.get("resize")+" ");var K=document.createElement("input");K.setAttribute("type","checkbox");K.style.marginLeft="8px";c.appendChild(K);mxUtils.write(c,mxResources.get("fit")+" ");var u=document.createElement("input");u.setAttribute("type","checkbox");u.style.marginLeft=
+"8px";c.appendChild(u);mxUtils.write(c,mxResources.get("embed")+" ");var E=b.getBasenames().join(";"),B=b.getCurrentFile();mxEvent.addListener(y,"change",f);mxEvent.addListener(z,"change",f);mxEvent.addListener(O,"change",f);mxEvent.addListener(K,"change",f);mxEvent.addListener(A,"change",f);mxEvent.addListener(J,"change",f);mxEvent.addListener(u,"change",f);mxEvent.addListener(p,"change",f);mxEvent.addListener(l,"change",f);mxEvent.addListener(x,"change",f);mxEvent.addListener(q,"change",f);f();
mxEvent.addListener(k,"click",function(){k.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?k.select():document.execCommand("selectAll",!1,null)});e=document.createElement("div");e.style.paddingTop="12px";e.style.textAlign="right";n=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});n.className="geBtn gePrimaryBtn";e.appendChild(n);c.appendChild(e);this.container=c},CreateGraphDialog=function(b,e,f){var c=document.createElement("div");c.style.textAlign="right";this.init=
function(){var m=document.createElement("div");m.style.position="relative";m.style.border="1px solid gray";m.style.width="100%";m.style.height="360px";m.style.overflow="hidden";m.style.marginBottom="16px";mxEvent.disableContextMenu(m);c.appendChild(m);var n=new Graph(m);n.setCellsCloneable(!0);n.setPanning(!0);n.setAllowDanglingEdges(!1);n.connectionHandler.select=!1;n.view.setTranslate(20,20);n.border=20;n.panningHandler.useLeftButtonForPanning=!0;var v="curved=1;";n.cellRenderer.installCellOverlayListeners=
-function(z,A,K){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(K.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(O){A.fireEvent(new mxEventObject("pointerdown","event",O,"state",z))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(K.node,"touchstart",function(O){A.fireEvent(new mxEventObject("pointerdown","event",O,"state",z))})};n.getAllConnectionConstraints=function(){return null};n.connectionHandler.marker.highlight.keepOnTop=
-!1;n.connectionHandler.createEdgeState=function(z){z=n.createEdge(null,null,null,null,null,v);return new mxCellState(this.graph.view,z,this.graph.getCellStyle(z))};var d=n.getDefaultParent(),g=mxUtils.bind(this,function(z){var A=new mxCellOverlay(this.connectImage,"Add outgoing");A.cursor="hand";A.addListener(mxEvent.CLICK,function(K,O){n.connectionHandler.reset();n.clearSelection();var L=n.getCellGeometry(z),u;p(function(){u=n.insertVertex(d,null,"Entry",L.x,L.y,80,30,"rounded=1;");g(u);n.view.refresh(u);
-n.insertEdge(d,null,"",z,u,v)},function(){n.scrollCellToVisible(u)})});A.addListener("pointerdown",function(K,O){K=O.getProperty("event");O=O.getProperty("state");n.popupMenuHandler.hideMenu();n.stopEditing(!1);var L=mxUtils.convertPoint(n.container,mxEvent.getClientX(K),mxEvent.getClientY(K));n.connectionHandler.start(O,L.x,L.y);n.isMouseDown=!0;n.isMouseTrigger=mxEvent.isMouseEvent(K);mxEvent.consume(K)});n.addCellOverlay(z,A)});n.getModel().beginUpdate();try{var k=n.insertVertex(d,null,"Start",
+function(z,A,J){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(J.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(O){A.fireEvent(new mxEventObject("pointerdown","event",O,"state",z))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(J.node,"touchstart",function(O){A.fireEvent(new mxEventObject("pointerdown","event",O,"state",z))})};n.getAllConnectionConstraints=function(){return null};n.connectionHandler.marker.highlight.keepOnTop=
+!1;n.connectionHandler.createEdgeState=function(z){z=n.createEdge(null,null,null,null,null,v);return new mxCellState(this.graph.view,z,this.graph.getCellStyle(z))};var d=n.getDefaultParent(),g=mxUtils.bind(this,function(z){var A=new mxCellOverlay(this.connectImage,"Add outgoing");A.cursor="hand";A.addListener(mxEvent.CLICK,function(J,O){n.connectionHandler.reset();n.clearSelection();var K=n.getCellGeometry(z),u;p(function(){u=n.insertVertex(d,null,"Entry",K.x,K.y,80,30,"rounded=1;");g(u);n.view.refresh(u);
+n.insertEdge(d,null,"",z,u,v)},function(){n.scrollCellToVisible(u)})});A.addListener("pointerdown",function(J,O){J=O.getProperty("event");O=O.getProperty("state");n.popupMenuHandler.hideMenu();n.stopEditing(!1);var K=mxUtils.convertPoint(n.container,mxEvent.getClientX(J),mxEvent.getClientY(J));n.connectionHandler.start(O,K.x,K.y);n.isMouseDown=!0;n.isMouseTrigger=mxEvent.isMouseEvent(J);mxEvent.consume(J)});n.addCellOverlay(z,A)});n.getModel().beginUpdate();try{var k=n.insertVertex(d,null,"Start",
0,0,80,30,"ellipse");g(k)}finally{n.getModel().endUpdate()}if("horizontalTree"==f){var l=new mxCompactTreeLayout(n);l.edgeRouting=!1;l.levelDistance=30;v="edgeStyle=elbowEdgeStyle;elbow=horizontal;"}else"verticalTree"==f?(l=new mxCompactTreeLayout(n,!1),l.edgeRouting=!1,l.levelDistance=30,v="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==f?(l=new mxRadialTreeLayout(n,!1),l.edgeRouting=!1,l.levelDistance=80):"verticalFlow"==f?l=new mxHierarchicalLayout(n,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
-f?l=new mxHierarchicalLayout(n,mxConstants.DIRECTION_WEST):"organic"==f?(l=new mxFastOrganicLayout(n,!1),l.forceConstant=80):"circle"==f&&(l=new mxCircleLayout(n));if(null!=l){var p=function(z,A){n.getModel().beginUpdate();try{null!=z&&z(),l.execute(n.getDefaultParent(),k)}catch(K){throw K;}finally{z=new mxMorphing(n),z.addListener(mxEvent.DONE,mxUtils.bind(this,function(){n.getModel().endUpdate();null!=A&&A()})),z.startAnimation()}},q=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=
-function(z,A,K,O,L){q.apply(this,arguments);p()};n.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);p()};n.connectionHandler.addListener(mxEvent.CONNECT,function(){p()})}var x=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),function(){null!=m.parentNode&&(n.destroy(),m.parentNode.removeChild(m));b.hideDialog()})});x.className="geBtn";b.editor.cancelFirst&&c.appendChild(x);var y=mxUtils.button(mxResources.get("insert"),function(z){n.clearCellOverlays();
-var A=n.getModel().getChildren(n.getDefaultParent());z=mxEvent.isAltDown(z)?b.editor.graph.getFreeInsertPoint():b.editor.graph.getCenterInsertPoint(n.getBoundingBoxFromGeometry(A,!0));A=b.editor.graph.importCells(A,z.x,z.y);z=b.editor.graph.view;var K=z.getBounds(A);K.x-=z.translate.x;K.y-=z.translate.y;b.editor.graph.scrollRectToVisible(K);b.editor.graph.setSelectionCells(A);null!=m.parentNode&&(n.destroy(),m.parentNode.removeChild(m));b.hideDialog()});c.appendChild(y);y.className="geBtn gePrimaryBtn";
+f?l=new mxHierarchicalLayout(n,mxConstants.DIRECTION_WEST):"organic"==f?(l=new mxFastOrganicLayout(n,!1),l.forceConstant=80):"circle"==f&&(l=new mxCircleLayout(n));if(null!=l){var p=function(z,A){n.getModel().beginUpdate();try{null!=z&&z(),l.execute(n.getDefaultParent(),k)}catch(J){throw J;}finally{z=new mxMorphing(n),z.addListener(mxEvent.DONE,mxUtils.bind(this,function(){n.getModel().endUpdate();null!=A&&A()})),z.startAnimation()}},q=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=
+function(z,A,J,O,K){q.apply(this,arguments);p()};n.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);p()};n.connectionHandler.addListener(mxEvent.CONNECT,function(){p()})}var x=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),function(){null!=m.parentNode&&(n.destroy(),m.parentNode.removeChild(m));b.hideDialog()})});x.className="geBtn";b.editor.cancelFirst&&c.appendChild(x);var y=mxUtils.button(mxResources.get("insert"),function(z){n.clearCellOverlays();
+var A=n.getModel().getChildren(n.getDefaultParent());z=mxEvent.isAltDown(z)?b.editor.graph.getFreeInsertPoint():b.editor.graph.getCenterInsertPoint(n.getBoundingBoxFromGeometry(A,!0));A=b.editor.graph.importCells(A,z.x,z.y);z=b.editor.graph.view;var J=z.getBounds(A);J.x-=z.translate.x;J.y-=z.translate.y;b.editor.graph.scrollRectToVisible(J);b.editor.graph.setSelectionCells(A);null!=m.parentNode&&(n.destroy(),m.parentNode.removeChild(m));b.hideDialog()});c.appendChild(y);y.className="geBtn gePrimaryBtn";
b.editor.cancelFirst||c.appendChild(x)};this.container=c};
CreateGraphDialog.prototype.connectImage=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjQ3OTk0QjMyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjQ3OTk0QjQyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRjA0N0I2MjJENzExMUU1OEZBOEY0NUEyM0EyMUMzOSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGNDc5OTRCMjJENzIxMUU1OEZBOEY0NUEyM0EyMUMzOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjIf+MgAAATlSURBVHjanFZraFxFFD735u4ru3ls0yZG26ShgmJoKK1J2vhIYzBgRdtIURHyw1hQUH9IxIgI2h8iCEUF/1RRlNQYCsYfCTHVhiTtNolpZCEStqSC22xIsrs1bDfu7t37Gs/cO3Ozxs1DBw73zpk555vzmHNGgJ0NYatFgmNLYUHYUoHASMz5ijmgVLmxgfKCUiBxC4ACJAeSG8nb1dVVOTc3dyoSibwWDofPBIPBJzo7O8vpGtvjpDICGztxkciECpF2LS0tvZtOpwNkk5FKpcYXFxffwL1+JuPgllPj8nk1F6RoaGjoKCqZ5ApljZDZO4SMRA0SuG2QUJIQRV8HxMOM9vf3H0ZZH9Nhg20MMl2QkFwjIyNHWlpahtADnuUMwLcRHX5aNSBjCJYEsSSLUeLEbhGe3ytCmQtA1/XY+Pj46dbW1iDuyCJp9BC5ycBj4hoeHq5ra2sbw0Xn1ZgBZ+dVkA1Lc+6p0Ck2p0QS4Ox9EhwpEylYcmBg4LH29vYQLilIOt0u5FhDfevNZDI/u93uw6PLOrwTUtjxrbPYbhD42WgMrF8JmR894ICmCgnQjVe8Xu8pXEkzMJKbuo5oNPomBbm1ZsD7s2kwFA1JZ6QBUXWT1nmGNc/qoMgavDcrQzxjQGFh4aOYIJ0sFAXcEtui4uLiVjr5KpSBVFYDDZVrWUaKRRWSAYeK0fmKykgDXbVoNaPChRuyqdDv97czL5nXxQbq6empQmsaklkDBiNpSwFVrmr2P6UyicD5piI4f8wHh0oEm8/p4h8pyGiEWvVQd3e3nxtjAzU1NR2jP7NRBWQ8GbdEzzJAmc0V3RR4cI8Dvmwuhc8fKUFA0d6/ltHg5p+Kuaejo6OeY0jcNJ/PV00ZS0nFUoZRvvFS1bZFsKHCCQ2Pl8H0chY+C96B6ZUsrCQ1qKtwQVFRURW/QhIXMAzDPAZ6BgOr8tTa8dDxCmiYGApaJbJMxSzV+brE8pdgWkcpY5dbMF1AR9XH8/xu2ilef48bvn92n82ZwHh+8ssqTEXS9p7dHisiiURikd8PbpExNTU1UVNTA3V3Y7lC16n0gpB/NwpNcZjfa7dScC4Qh0kOQCwnlEgi3F/hMVl9fX0zvKrzSk2lfXjRhj0eT/2rvWG4+Pta3oJY7XfC3hInXAv/ldeFLx8shQ+eqQL0UAAz7ylkpej5eNZRVBWL6BU6ef14OYiY1oqyTtmsavr/5koaRucT1pzx+ZpL1+GV5nLutksUgIcmtwTRiuuVZXnU5XId7A2swJkfFsymRWC91hHg1Viw6x23+7vn9sPJ+j20BE1hCXqSWaNSQ8ScbknRZWxub1PGCw/fBV+c3AeijlUbY5bBjEqr9GuYZP4jP41WudGSC6erTRCqdGZm5i1WvXWeDHnbBCZGc2Nj4wBl/hZOwrmBBfgmlID1HmGJutHaF+tKoevp/XCgstDkjo2NtWKLuc6AVN4mNjY+s1XQxoenOoFuDPHGtnRbJj9ej5GvL0dI7+giuRyMk1giazc+DP6vgUDgOJVlOv7R+PJ12QIeL6SyeDz+Kfp8ZrNWjgDTsVjsQ7qXyTjztXJhm9ePxFLfMTg4eG9tbe1RTP9KFFYQfHliYmIS69kCC7jKYmKwxxD5P88tkVkqbPPcIps9t4T/+HjcuJ/s5BFJgf4WYABCtxGuxIZ90gAAAABJRU5ErkJggg==":IMAGE_PATH+
"/handle-connect.png",26,26);
var BackgroundImageDialog=function(b,e,f){var c=document.createElement("div");c.style.whiteSpace="nowrap";var m=document.createElement("h2");mxUtils.write(m,mxResources.get("backgroundImage"));m.style.marginTop="0px";c.appendChild(m);var n=null!=f&&null!=f.originalSrc;m=!1;var v=document.createElement("input");v.style.cssText="margin-right:8px;margin-bottom:8px;";v.setAttribute("value","url");v.setAttribute("type","radio");v.setAttribute("name","geBackgroundImageDialogOption");var d=document.createElement("input");
d.style.cssText="margin-right:8px;margin-bottom:8px;";d.setAttribute("value","url");d.setAttribute("type","radio");d.setAttribute("name","geBackgroundImageDialogOption");var g=document.createElement("input");g.setAttribute("type","text");g.style.marginBottom="8px";g.style.width="360px";g.value=n||null==f?"":f.src;var k=document.createElement("select");k.style.width="360px";if(null!=b.pages)for(var l=0;l<b.pages.length;l++){var p=document.createElement("option");mxUtils.write(p,b.pages[l].getName()||
mxResources.get("pageWithNumber",[l+1]));p.setAttribute("value","data:page/id,"+b.pages[l].getId());b.pages[l]==b.currentPage&&p.setAttribute("disabled","disabled");null!=f&&f.originalSrc==p.getAttribute("value")&&(p.setAttribute("selected","selected"),m=!0);k.appendChild(p)}n||null!=b.pages&&1!=b.pages.length||(v.style.display="none",d.style.display="none",k.style.display="none");var q=document.createElement("option"),x=!1,y=!1,z=function(u,E){x||null!=u&&y||(d.checked?null!=E&&E(q.selected?null:
-k.value):""==g.value||b.isOffline()?(K.value="",O.value="",null!=E&&E("")):(g.value=mxUtils.trim(g.value),b.loadImage(g.value,function(B){K.value=B.width;O.value=B.height;null!=E&&E(g.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));K.value="";O.value="";null!=E&&E(null)})))},A=mxUtils.bind(this,function(u){b.importFiles(u,0,0,b.maxBackgroundSize,function(E,B,D,G,N,I){g.value=E;z();g.focus()},function(){},function(E){return"image/"==E.type.substring(0,
+k.value):""==g.value||b.isOffline()?(J.value="",O.value="",null!=E&&E("")):(g.value=mxUtils.trim(g.value),b.loadImage(g.value,function(B){J.value=B.width;O.value=B.height;null!=E&&E(g.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));J.value="";O.value="";null!=E&&E(null)})))},A=mxUtils.bind(this,function(u){b.importFiles(u,0,0,b.maxBackgroundSize,function(E,B,D,G,H,N){g.value=E;z();g.focus()},function(){},function(E){return"image/"==E.type.substring(0,
6)},function(E){for(var B=0;B<E.length;B++)E[B]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0)});this.init=function(){n?k.focus():g.focus();mxEvent.addListener(k,"focus",function(){v.removeAttribute("checked");d.setAttribute("checked","checked");d.checked=!0});mxEvent.addListener(g,"focus",function(){d.removeAttribute("checked");v.setAttribute("checked","checked");v.checked=!0});if(Graph.fileSupport){g.setAttribute("placeholder",mxResources.get("dragImagesHere"));var u=c.parentNode,E=null;mxEvent.addListener(u,
"dragleave",function(B){null!=E&&(E.parentNode.removeChild(E),E=null);B.stopPropagation();B.preventDefault()});mxEvent.addListener(u,"dragover",mxUtils.bind(this,function(B){null==E&&(!mxClient.IS_IE||10<document.documentMode)&&(E=b.highlightElement(u));B.stopPropagation();B.preventDefault()}));mxEvent.addListener(u,"drop",mxUtils.bind(this,function(B){null!=E&&(E.parentNode.removeChild(E),E=null);if(0<B.dataTransfer.files.length)A(B.dataTransfer.files);else if(0<=mxUtils.indexOf(B.dataTransfer.types,
-"text/uri-list")){var D=B.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(D)&&(g.value=decodeURIComponent(D),z())}B.stopPropagation();B.preventDefault()}),!1)}};c.appendChild(v);c.appendChild(g);mxUtils.br(c);l=document.createElement("span");l.style.marginLeft="30px";mxUtils.write(l,mxResources.get("width")+":");c.appendChild(l);var K=document.createElement("input");K.setAttribute("type","text");K.style.width="60px";K.style.marginLeft="8px";K.style.marginRight="16px";
-K.value=null==f||n?"":f.width;c.appendChild(K);mxUtils.write(c,mxResources.get("height")+":");var O=document.createElement("input");O.setAttribute("type","text");O.style.width="60px";O.style.marginLeft="8px";O.style.marginRight="16px";O.value=null==f||n?"":f.height;c.appendChild(O);mxUtils.br(c);mxUtils.br(c);mxEvent.addListener(g,"change",z);ImageDialog.filePicked=function(u){u.action==google.picker.Action.PICKED&&null!=u.docs[0].thumbnails&&(u=u.docs[0].thumbnails[u.docs[0].thumbnails.length-1],
+"text/uri-list")){var D=B.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(D)&&(g.value=decodeURIComponent(D),z())}B.stopPropagation();B.preventDefault()}),!1)}};c.appendChild(v);c.appendChild(g);mxUtils.br(c);l=document.createElement("span");l.style.marginLeft="30px";mxUtils.write(l,mxResources.get("width")+":");c.appendChild(l);var J=document.createElement("input");J.setAttribute("type","text");J.style.width="60px";J.style.marginLeft="8px";J.style.marginRight="16px";
+J.value=null==f||n?"":f.width;c.appendChild(J);mxUtils.write(c,mxResources.get("height")+":");var O=document.createElement("input");O.setAttribute("type","text");O.style.width="60px";O.style.marginLeft="8px";O.style.marginRight="16px";O.value=null==f||n?"":f.height;c.appendChild(O);mxUtils.br(c);mxUtils.br(c);mxEvent.addListener(g,"change",z);ImageDialog.filePicked=function(u){u.action==google.picker.Action.PICKED&&null!=u.docs[0].thumbnails&&(u=u.docs[0].thumbnails[u.docs[0].thumbnails.length-1],
null!=u&&(g.value=u.url,z()));g.focus()};c.appendChild(d);c.appendChild(k);mxUtils.br(c);n?(d.setAttribute("checked","checked"),d.checked=!0):(v.setAttribute("checked","checked"),v.checked=!0);!m&&d.checked&&(mxUtils.write(q,mxResources.get("pageNotFound")),q.setAttribute("disabled","disabled"),q.setAttribute("selected","selected"),q.setAttribute("value","pageNotFound"),k.appendChild(q),mxEvent.addListener(k,"change",function(){null==q.parentNode||q.selected||q.parentNode.removeChild(q)}));f=document.createElement("div");
-f.style.marginTop="30px";f.style.textAlign="right";m=mxUtils.button(mxResources.get("cancel"),function(){x=!0;b.hideDialog()});m.className="geBtn";b.editor.cancelFirst&&f.appendChild(m);l=mxUtils.button(mxResources.get("reset"),function(){g.value="";K.value="";O.value="";v.checked=!0;x=!1});mxEvent.addGestureListeners(l,function(){x=!0});l.className="geBtn";l.width="100";f.appendChild(l);if(Graph.fileSupport){var L=document.createElement("input");L.setAttribute("multiple","multiple");L.setAttribute("type",
-"file");mxEvent.addListener(L,"change",function(u){null!=L.files&&(A(L.files),L.type="",L.type="file",L.value="")});L.style.display="none";c.appendChild(L);l=mxUtils.button(mxResources.get("open"),function(){L.click()});l.className="geBtn";f.appendChild(l)}applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();z(null,function(u){e(""!=u&&null!=u?new mxImage(u,K.value,O.value):null,null==u)})});mxEvent.addGestureListeners(applyBtn,function(){y=!0});applyBtn.className="geBtn gePrimaryBtn";
-f.appendChild(applyBtn);b.editor.cancelFirst||f.appendChild(m);c.appendChild(f);this.container=c},ParseDialog=function(b,e,f){function c(x,y,z){var A=x.split("\n");if("plantUmlPng"==y||"plantUmlSvg"==y||"plantUmlTxt"==y){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var K=function(X,J,W,V,t){n=mxEvent.isAltDown(z)?n:O.getCenterInsertPoint(new mxRectangle(0,0,V,t));var C=null;O.getModel().beginUpdate();try{C="txt"==J?b.insertAsPreText(W,n.x,n.y):O.insertVertex(null,null,null,n.x,n.y,
-V,t,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(W)+";"),O.setAttributeForCell(C,"plantUmlData",JSON.stringify({data:X,format:J},null,2))}finally{O.getModel().endUpdate()}null!=C&&(O.setSelectionCell(C),O.scrollCellToVisible(C))},O=b.editor.graph,L="plantUmlTxt"==y?"txt":"plantUmlPng"==y?"png":"svg";"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml"==
-x&&"svg"==L?window.setTimeout(function(){b.spinner.stop();K(x,L,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",
-295,212)},200):b.generatePlantUmlImage(x,L,function(X,J,W){b.spinner.stop();K(x,L,X,J,W)},function(X){b.handleError(X)})}}else if("mermaid"==y)b.spinner.spin(document.body,mxResources.get("inserting"))&&(O=b.editor.graph,b.generateMermaidImage(x,L,function(X,J,W){n=mxEvent.isAltDown(z)?n:O.getCenterInsertPoint(new mxRectangle(0,0,J,W));b.spinner.stop();var V=null;O.getModel().beginUpdate();try{V=O.insertVertex(null,null,null,n.x,n.y,J,W,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+
-X+";"),O.setAttributeForCell(V,"mermaidData",JSON.stringify({data:x,config:EditorUi.defaultMermaidConfig},null,2))}finally{O.getModel().endUpdate()}null!=V&&(O.setSelectionCell(V),O.scrollCellToVisible(V))},function(X){b.handleError(X)}));else if("table"==y){y=null;for(var u=[],E=0,B={},D=0;D<A.length;D++){var G=mxUtils.trim(A[D]);if("primary key"==G.substring(0,11).toLowerCase()){var N=G.match(/\((.+)\)/);N&&N[1]&&(B[N[1]]=!0);A.splice(D,1)}else 0<G.toLowerCase().indexOf("primary key")&&(B[G.split(" ")[0]]=
-!0,A[D]=mxUtils.trim(G.replace(/primary key/i,"")))}for(D=0;D<A.length;D++)if(G=mxUtils.trim(A[D]),"create table"==G.substring(0,12).toLowerCase())G=mxUtils.trim(G.substring(12)),"("==G.charAt(G.length-1)&&(G=mxUtils.trim(G.substring(0,G.length-1))),y=new mxCell(G,new mxGeometry(E,0,160,40),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),y.vertex=!0,u.push(y),G=b.editor.graph.getPreferredSizeForCell(I),null!=
-G&&(y.geometry.width=G.width+10);else if(null!=y&&")"==G.charAt(0))E+=y.geometry.width+40,y=null;else if("("!=G&&null!=y){G=G.substring(0,","==G.charAt(G.length-1)?G.length-1:G.length);N=B[G.split(" ")[0]];var I=new mxCell("",new mxGeometry(0,0,160,30),"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom="+(N?"1":"0")+";");I.vertex=!0;var F=new mxCell(N?"PK":"",
-new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;"+(N?"fontStyle=1;":""));F.vertex=!0;I.insert(F);G=new mxCell(G,new mxGeometry(30,0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;align=left;top=0;left=0;bottom=0;right=0;spacingLeft=6;"+(N?"fontStyle=5;":""));G.vertex=!0;I.insert(G);G=b.editor.graph.getPreferredSizeForCell(G);null!=G&&y.geometry.width<G.width+30&&(y.geometry.width=Math.min(320,
-Math.max(y.geometry.width,G.width+30)));y.insert(I,N?0:null);y.geometry.height+=30}0<u.length&&(O=b.editor.graph,n=mxEvent.isAltDown(z)?n:O.getCenterInsertPoint(O.getBoundingBoxFromGeometry(u,!0)),O.setSelectionCells(O.importCells(u,n.x,n.y)),O.scrollCellToVisible(O.getSelectionCell()))}else if("list"==y){if(0<A.length){O=b.editor.graph;I=null;u=[];for(D=y=0;D<A.length;D++)";"!=A[D].charAt(0)&&(0==A[D].length?I=null:null==I?(I=new mxCell(A[D],new mxGeometry(y,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),
-I.vertex=!0,u.push(I),G=O.getPreferredSizeForCell(I),null!=G&&I.geometry.width<G.width+10&&(I.geometry.width=G.width+10),y+=I.geometry.width+40):"--"==A[D]?(G=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;"),G.vertex=!0,I.geometry.height+=G.geometry.height,I.insert(G)):0<A[D].length&&(E=new mxCell(A[D],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;"),
-E.vertex=!0,G=O.getPreferredSizeForCell(E),null!=G&&E.geometry.width<G.width&&(E.geometry.width=G.width),I.geometry.width=Math.max(I.geometry.width,E.geometry.width),I.geometry.height+=E.geometry.height,I.insert(E)));if(0<u.length){n=mxEvent.isAltDown(z)?n:O.getCenterInsertPoint(O.getBoundingBoxFromGeometry(u,!0));O.getModel().beginUpdate();try{u=O.importCells(u,n.x,n.y);G=[];for(D=0;D<u.length;D++)G.push(u[D]),G=G.concat(u[D].children);O.fireEvent(new mxEventObject("cellsInserted","cells",G))}finally{O.getModel().endUpdate()}O.setSelectionCells(u);
-O.scrollCellToVisible(O.getSelectionCell())}}}else{I=function(X){var J=H[X];null==J&&(J=new mxCell(X,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),J.vertex=!0,H[X]=J,u.push(J));return J};var H={};u=[];for(D=0;D<A.length;D++)if(";"!=A[D].charAt(0)){var R=A[D].split("->");2<=R.length&&(N=I(R[0]),F=I(R[R.length-1]),R=new mxCell(2<R.length?R[1]:"",new mxGeometry),R.edge=!0,N.insertEdge(R,!0),F.insertEdge(R,!1),u.push(R))}if(0<u.length){A=document.createElement("div");A.style.visibility="hidden";
+f.style.marginTop="30px";f.style.textAlign="right";m=mxUtils.button(mxResources.get("cancel"),function(){x=!0;b.hideDialog()});m.className="geBtn";b.editor.cancelFirst&&f.appendChild(m);l=mxUtils.button(mxResources.get("reset"),function(){g.value="";J.value="";O.value="";v.checked=!0;x=!1});mxEvent.addGestureListeners(l,function(){x=!0});l.className="geBtn";l.width="100";f.appendChild(l);if(Graph.fileSupport){var K=document.createElement("input");K.setAttribute("multiple","multiple");K.setAttribute("type",
+"file");mxEvent.addListener(K,"change",function(u){null!=K.files&&(A(K.files),K.type="",K.type="file",K.value="")});K.style.display="none";c.appendChild(K);l=mxUtils.button(mxResources.get("open"),function(){K.click()});l.className="geBtn";f.appendChild(l)}applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();z(null,function(u){e(""!=u&&null!=u?new mxImage(u,J.value,O.value):null,null==u)})});mxEvent.addGestureListeners(applyBtn,function(){y=!0});applyBtn.className="geBtn gePrimaryBtn";
+f.appendChild(applyBtn);b.editor.cancelFirst||f.appendChild(m);c.appendChild(f);this.container=c},ParseDialog=function(b,e,f){function c(x,y,z){var A=x.split("\n");if("plantUmlPng"==y||"plantUmlSvg"==y||"plantUmlTxt"==y){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var J=function(X,L,U,W,t){n=mxEvent.isAltDown(z)?n:O.getCenterInsertPoint(new mxRectangle(0,0,W,t));var C=null;O.getModel().beginUpdate();try{C="txt"==L?b.insertAsPreText(U,n.x,n.y):O.insertVertex(null,null,null,n.x,n.y,
+W,t,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(U)+";"),O.setAttributeForCell(C,"plantUmlData",JSON.stringify({data:X,format:L},null,2))}finally{O.getModel().endUpdate()}null!=C&&(O.setSelectionCell(C),O.scrollCellToVisible(C))},O=b.editor.graph,K="plantUmlTxt"==y?"txt":"plantUmlPng"==y?"png":"svg";"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml"==
+x&&"svg"==K?window.setTimeout(function(){b.spinner.stop();J(x,K,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",
+295,212)},200):b.generatePlantUmlImage(x,K,function(X,L,U){b.spinner.stop();J(x,K,X,L,U)},function(X){b.handleError(X)})}}else if("mermaid"==y)b.spinner.spin(document.body,mxResources.get("inserting"))&&(O=b.editor.graph,b.generateMermaidImage(x,K,function(X,L,U){n=mxEvent.isAltDown(z)?n:O.getCenterInsertPoint(new mxRectangle(0,0,L,U));b.spinner.stop();var W=null;O.getModel().beginUpdate();try{W=O.insertVertex(null,null,null,n.x,n.y,L,U,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+
+X+";"),O.setAttributeForCell(W,"mermaidData",JSON.stringify({data:x,config:EditorUi.defaultMermaidConfig},null,2))}finally{O.getModel().endUpdate()}null!=W&&(O.setSelectionCell(W),O.scrollCellToVisible(W))},function(X){b.handleError(X)}));else if("table"==y){y=null;for(var u=[],E=0,B={},D=0;D<A.length;D++){var G=mxUtils.trim(A[D]);if("primary key"==G.substring(0,11).toLowerCase()){var H=G.match(/\((.+)\)/);H&&H[1]&&(B[H[1]]=!0);A.splice(D,1)}else 0<G.toLowerCase().indexOf("primary key")&&(B[G.split(" ")[0]]=
+!0,A[D]=mxUtils.trim(G.replace(/primary key/i,"")))}for(D=0;D<A.length;D++)if(G=mxUtils.trim(A[D]),"create table"==G.substring(0,12).toLowerCase())G=mxUtils.trim(G.substring(12)),"("==G.charAt(G.length-1)&&(G=mxUtils.trim(G.substring(0,G.length-1))),y=new mxCell(G,new mxGeometry(E,0,160,40),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),y.vertex=!0,u.push(y),G=b.editor.graph.getPreferredSizeForCell(N),null!=
+G&&(y.geometry.width=G.width+10);else if(null!=y&&")"==G.charAt(0))E+=y.geometry.width+40,y=null;else if("("!=G&&null!=y){G=G.substring(0,","==G.charAt(G.length-1)?G.length-1:G.length);H=B[G.split(" ")[0]];var N=new mxCell("",new mxGeometry(0,0,160,30),"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom="+(H?"1":"0")+";");N.vertex=!0;var F=new mxCell(H?"PK":"",
+new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;"+(H?"fontStyle=1;":""));F.vertex=!0;N.insert(F);G=new mxCell(G,new mxGeometry(30,0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;align=left;top=0;left=0;bottom=0;right=0;spacingLeft=6;"+(H?"fontStyle=5;":""));G.vertex=!0;N.insert(G);G=b.editor.graph.getPreferredSizeForCell(G);null!=G&&y.geometry.width<G.width+30&&(y.geometry.width=Math.min(320,
+Math.max(y.geometry.width,G.width+30)));y.insert(N,H?0:null);y.geometry.height+=30}0<u.length&&(O=b.editor.graph,n=mxEvent.isAltDown(z)?n:O.getCenterInsertPoint(O.getBoundingBoxFromGeometry(u,!0)),O.setSelectionCells(O.importCells(u,n.x,n.y)),O.scrollCellToVisible(O.getSelectionCell()))}else if("list"==y){if(0<A.length){O=b.editor.graph;N=null;u=[];for(D=y=0;D<A.length;D++)";"!=A[D].charAt(0)&&(0==A[D].length?N=null:null==N?(N=new mxCell(A[D],new mxGeometry(y,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),
+N.vertex=!0,u.push(N),G=O.getPreferredSizeForCell(N),null!=G&&N.geometry.width<G.width+10&&(N.geometry.width=G.width+10),y+=N.geometry.width+40):"--"==A[D]?(G=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;"),G.vertex=!0,N.geometry.height+=G.geometry.height,N.insert(G)):0<A[D].length&&(E=new mxCell(A[D],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;"),
+E.vertex=!0,G=O.getPreferredSizeForCell(E),null!=G&&E.geometry.width<G.width&&(E.geometry.width=G.width),N.geometry.width=Math.max(N.geometry.width,E.geometry.width),N.geometry.height+=E.geometry.height,N.insert(E)));if(0<u.length){n=mxEvent.isAltDown(z)?n:O.getCenterInsertPoint(O.getBoundingBoxFromGeometry(u,!0));O.getModel().beginUpdate();try{u=O.importCells(u,n.x,n.y);G=[];for(D=0;D<u.length;D++)G.push(u[D]),G=G.concat(u[D].children);O.fireEvent(new mxEventObject("cellsInserted","cells",G))}finally{O.getModel().endUpdate()}O.setSelectionCells(u);
+O.scrollCellToVisible(O.getSelectionCell())}}}else{N=function(X){var L=I[X];null==L&&(L=new mxCell(X,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),L.vertex=!0,I[X]=L,u.push(L));return L};var I={};u=[];for(D=0;D<A.length;D++)if(";"!=A[D].charAt(0)){var Q=A[D].split("->");2<=Q.length&&(H=N(Q[0]),F=N(Q[Q.length-1]),Q=new mxCell(2<Q.length?Q[1]:"",new mxGeometry),Q.edge=!0,H.insertEdge(Q,!0),F.insertEdge(Q,!1),u.push(Q))}if(0<u.length){A=document.createElement("div");A.style.visibility="hidden";
document.body.appendChild(A);O=new Graph(A);O.getModel().beginUpdate();try{u=O.importCells(u);for(D=0;D<u.length;D++)O.getModel().isVertex(u[D])&&(G=O.getPreferredSizeForCell(u[D]),u[D].geometry.width=Math.max(u[D].geometry.width,G.width),u[D].geometry.height=Math.max(u[D].geometry.height,G.height));D=!0;"horizontalFlow"==y||"verticalFlow"==y?((new mxHierarchicalLayout(O,"horizontalFlow"==y?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH)).execute(O.getDefaultParent(),u),D=!1):"circle"==y?
(new mxCircleLayout(O)).execute(O.getDefaultParent()):(E=new mxFastOrganicLayout(O),E.disableEdgeStyle=!1,E.forceConstant=180,E.execute(O.getDefaultParent()));D&&(B=new mxParallelEdgeLayout(O),B.spacing=30,B.execute(O.getDefaultParent()))}finally{O.getModel().endUpdate()}O.clearCellOverlays();G=[];b.editor.graph.getModel().beginUpdate();try{u=O.getModel().getChildren(O.getDefaultParent()),n=mxEvent.isAltDown(z)?n:b.editor.graph.getCenterInsertPoint(O.getBoundingBoxFromGeometry(u,!0)),G=b.editor.graph.importCells(u,
n.x,n.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",G))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(G);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());O.destroy();A.parentNode.removeChild(A)}}}function m(){return"list"==d.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean\n\nAddress\n-street: String\n-city: String\n-state: String":"mermaid"==d.value?
@@ -11126,87 +11126,87 @@ l.setAttribute("value","horizontalFlow");mxUtils.write(l,mxResources.get("horizo
"selected");k=document.createElement("option");k.setAttribute("value","plantUmlPng");mxUtils.write(k,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");l=document.createElement("option");l.setAttribute("value","plantUmlTxt");mxUtils.write(l,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==f&&(d.appendChild(g),d.appendChild(k),d.appendChild(l));var q=m();v.value=q;e.appendChild(v);this.init=function(){v.focus()};
Graph.fileSupport&&(v.addEventListener("dragover",function(x){x.stopPropagation();x.preventDefault()},!1),v.addEventListener("drop",function(x){x.stopPropagation();x.preventDefault();if(0<x.dataTransfer.files.length){x=x.dataTransfer.files[0];var y=new FileReader;y.onload=function(z){v.value=z.target.result};y.readAsText(x)}},!1));e.appendChild(d);mxEvent.addListener(d,"change",function(){var x=m();if(0==v.value.length||v.value==q)q=x,v.value=q});b.isOffline()||"mermaid"!=f&&"plantUml"!=f||(g=mxUtils.button(mxResources.get("help"),
function(){b.openLink("mermaid"==f?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),g.className="geBtn",e.appendChild(g));g=mxUtils.button(mxResources.get("close"),function(){v.value==q?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});g.className="geBtn";b.editor.cancelFirst&&e.appendChild(g);k=mxUtils.button(mxResources.get("insert"),function(x){b.hideDialog();c(v.value,d.value,x)});e.appendChild(k);k.className="geBtn gePrimaryBtn";b.editor.cancelFirst||
-e.appendChild(g);this.container=e},NewDialog=function(b,e,f,c,m,n,v,d,g,k,l,p,q,x,y,z,A,K){function O(ea){null!=ea&&(Ca=Da=ea?135:140);ea=!0;if(null!=va)for(;H<va.length&&(ea||0!=mxUtils.mod(H,30));){var wa=va[H++];wa=E(wa.url,wa.libs,wa.title,wa.tooltip?wa.tooltip:wa.title,wa.select,wa.imgUrl,wa.info,wa.onClick,wa.preview,wa.noImg,wa.clibs);ea&&wa.click();ea=!1}}function L(){if(Y&&null!=x)f||b.hideDialog(),x(Y,Z,F.value);else if(c)f||b.hideDialog(),c(U,F.value,aa,P);else{var ea=F.value;null!=ea&&
-0<ea.length&&b.pickFolder(b.mode,function(wa){b.createFile(ea,U,null!=P&&0<P.length?P:null,null,function(){b.hideDialog()},null,wa,null,null!=S&&0<S.length?S:null)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}function u(ea,wa,ua,sa,ra,ya,ia){null!=T&&(T.style.backgroundColor="transparent",T.style.border="1px solid transparent");X.removeAttribute("disabled");U=wa;P=ua;S=ya;T=ea;Y=sa;aa=ia;Z=ra;T.style.backgroundColor=d;T.style.border=g}function E(ea,wa,ua,sa,ra,ya,ia,ma,
-ca,fa,oa){function la(Ma,Ta){null==Ea?(Pa=Ma,Pa=/^https?:\/\//.test(Pa)&&!b.editor.isCorsEnabledForUrl(Pa)?PROXY_URL+"?url="+encodeURIComponent(Pa):TEMPLATE_PATH+"/"+Pa,mxUtils.get(Pa,mxUtils.bind(this,function(Ua){200<=Ua.getStatus()&&299>=Ua.getStatus()&&(Ea=Ua.getText());Ta(Ea,Pa)}))):Ta(Ea,Pa)}function qa(Ma,Ta,Ua){if(null!=Ma&&mxUtils.isAncestorNode(document.body,ka)){Ma=mxUtils.parseXml(Ma);Ma=Editor.parseDiagramNode(Ma.documentElement);var Va=new mxCodec(Ma.ownerDocument),$a=new mxGraphModel;
-Va.decode(Ma,$a);Ma=$a.root.getChildAt(0).children;b.sidebar.createTooltip(ka,Ma,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!=ua?mxResources.get(ua,null,ua):null,!0,new mxPoint(Ta,Ua),!0,function(){Xa=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;u(ka,null,null,ea,ia,oa)},!0,!1)}}function pa(Ma,Ta){null==ea||Sa||
-b.sidebar.currentElt==ka?b.sidebar.hideTooltip():(b.sidebar.hideTooltip(),null!=Ha?(Ta='<mxfile><diagram id="d" name="n">'+Graph.compress('<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="" style="shape=image;image='+Ha.src+';imageAspect=1;" parent="1" vertex="1"><mxGeometry width="'+Ha.naturalWidth+'" height="'+Ha.naturalHeight+'" as="geometry" /></mxCell></root></mxGraphModel>')+"</diagram></mxfile>",qa(Ta,mxEvent.getClientX(Ma),mxEvent.getClientY(Ma))):(b.sidebar.currentElt=
-ka,Sa=!0,la(ea,function(Ua){Sa&&b.sidebar.currentElt==ka&&qa(Ua,mxEvent.getClientX(Ma),mxEvent.getClientY(Ma));Sa=!1})))}var ka=document.createElement("div");ka.className="geTemplate";ka.style.position="relative";ka.style.height=Ca+"px";ka.style.width=Da+"px";var Ea=null,Pa=ea;Editor.isDarkMode()&&(ka.style.filter="invert(100%)");null!=ua?ka.setAttribute("title",mxResources.get(ua,null,ua)):null!=sa&&0<sa.length&&ka.setAttribute("title",sa);var Sa=!1,Ha=null;if(null!=ya){ka.style.display="inline-flex";
-ka.style.justifyContent="center";ka.style.alignItems="center";ra=document.createElement("img");ra.setAttribute("src",ya);ra.setAttribute("alt",sa);ra.style.maxWidth=Ca+"px";ra.style.maxHeight=Da+"px";Ha=ra;var La=ya.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");ka.appendChild(ra);ra.onerror=function(){this.src!=La?this.src=La:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(ka,mxUtils.bind(this,function(Ma){u(ka,null,null,ea,ia,oa)}),null,null);mxEvent.addListener(ka,
-"dblclick",function(Ma){L();mxEvent.consume(Ma)})}else if(!fa&&null!=ea&&0<ea.length){var Qa=function(Ma){X.setAttribute("disabled","disabled");ka.style.backgroundColor="transparent";ka.style.border="1px solid transparent";R.spin(da);la(ea,function(Ta,Ua){R.stop();null!=Ta&&(u(ka,Ta,wa,null,null,oa,Ua),Ma&&L())})};ra=ca||TEMPLATE_PATH+"/"+ea.substring(0,ea.length-4)+".png";ka.style.backgroundImage="url("+ra+")";ka.style.backgroundPosition="center center";ka.style.backgroundRepeat="no-repeat";if(null!=
-ua){sa=document.createElement("table");sa.setAttribute("width","100%");sa.setAttribute("height","100%");sa.style.background=Editor.isDarkMode()?"transparent":"rgba(255,255,255,0.85)";sa.style.lineHeight="1.3em";sa.style.border="inherit";ya=document.createElement("tbody");ca=document.createElement("tr");fa=document.createElement("td");fa.setAttribute("align","center");fa.setAttribute("valign","middle");var Na=document.createElement("span");Na.style.display="inline-block";Na.style.padding="4px 8px 4px 8px";
-Na.style.userSelect="none";Na.style.borderRadius="3px";Na.style.background="rgba(255,255,255,0.85)";Na.style.overflow="hidden";Na.style.textOverflow="ellipsis";Na.style.maxWidth=Ca-34+"px";mxUtils.write(Na,mxResources.get(ua,null,ua));fa.appendChild(Na);ca.appendChild(fa);ya.appendChild(ca);sa.appendChild(ya);ka.appendChild(sa)}mxEvent.addGestureListeners(ka,mxUtils.bind(this,function(Ma){Qa()}),null,null);mxEvent.addListener(ka,"dblclick",function(Ma){Qa(!0);mxEvent.consume(Ma)})}else sa=document.createElement("table"),
-sa.setAttribute("width","100%"),sa.setAttribute("height","100%"),sa.style.lineHeight="1.3em",ya=document.createElement("tbody"),ca=document.createElement("tr"),fa=document.createElement("td"),fa.setAttribute("align","center"),fa.setAttribute("valign","middle"),Na=document.createElement("span"),Na.style.display="inline-block",Na.style.padding="4px 8px 4px 8px",Na.style.userSelect="none",Na.style.borderRadius="3px",Na.style.background="#ffffff",Na.style.overflow="hidden",Na.style.textOverflow="ellipsis",
-Na.style.maxWidth=Ca-34+"px",mxUtils.write(Na,mxResources.get(ua,null,ua)),fa.appendChild(Na),ca.appendChild(fa),ya.appendChild(ca),sa.appendChild(ya),ka.appendChild(sa),ra&&u(ka),mxEvent.addGestureListeners(ka,mxUtils.bind(this,function(Ma){u(ka,null,null,ea,ia)}),null,null),null!=ma?mxEvent.addListener(ka,"click",ma):(mxEvent.addListener(ka,"click",function(Ma){u(ka,null,null,ea,ia)}),mxEvent.addListener(ka,"dblclick",function(Ma){L();mxEvent.consume(Ma)}));if(null!=ea){var Ra=document.createElement("img");
-Ra.setAttribute("src",Sidebar.prototype.searchImage);Ra.setAttribute("title",mxResources.get("preview"));Ra.className="geActiveButton";Ra.style.position="absolute";Ra.style.cursor="default";Ra.style.padding="8px";Ra.style.right="0px";Ra.style.top="0px";ka.appendChild(Ra);var Xa=!1;mxEvent.addGestureListeners(Ra,mxUtils.bind(this,function(Ma){Xa=b.sidebar.currentElt==ka}),null,null);mxEvent.addListener(Ra,"click",mxUtils.bind(this,function(Ma){Xa||pa(Ma,Ra);mxEvent.consume(Ma)}))}da.appendChild(ka);
-return ka}function B(){function ea(pa,ka){var Ea=mxResources.get(pa);null==Ea&&(Ea=pa.substring(0,1).toUpperCase()+pa.substring(1));18<Ea.length&&(Ea=Ea.substring(0,18)+"&hellip;");return Ea+" ("+ka.length+")"}function wa(pa,ka,Ea){mxEvent.addListener(ka,"click",function(){Fa!=ka&&(Fa.style.backgroundColor="",Fa=ka,Fa.style.backgroundColor=v,da.scrollTop=0,da.innerText="",H=0,va=Ea?Ia[pa][Ea]:na[pa],W=null,O(!1))})}Ja&&(Ja=!1,mxEvent.addListener(da,"scroll",function(pa){da.scrollTop+da.clientHeight>=
-da.scrollHeight&&(O(),mxEvent.consume(pa))}));if(0<xa){var ua=document.createElement("div");ua.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ua,mxResources.get("custom"));Ga.appendChild(ua);for(var sa in Ka){var ra=document.createElement("div"),ya=sa;ua=Ka[sa];18<ya.length&&(ya=ya.substring(0,18)+"&hellip;");ra.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";
-ra.setAttribute("title",ya+" ("+ua.length+")");mxUtils.write(ra,ra.getAttribute("title"));null!=k&&(ra.style.padding=k);Ga.appendChild(ra);(function(pa,ka){mxEvent.addListener(ra,"click",function(){Fa!=ka&&(Fa.style.backgroundColor="",Fa=ka,Fa.style.backgroundColor=v,da.scrollTop=0,da.innerText="",H=0,va=Ka[pa],W=null,O(!1))})})(sa,ra)}ua=document.createElement("div");ua.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ua,"draw.io");Ga.appendChild(ua)}for(sa in na){ya=
-Ia[sa];var ia=ra=document.createElement(ya?"ul":"div");ua=na[sa];var ma=ea(sa,ua);if(null!=ya){var ca=document.createElement("li"),fa=document.createElement("div");fa.className="geTempTreeCaret";fa.setAttribute("title",ma);mxUtils.write(fa,ma);ia=fa;ca.appendChild(fa);ma=document.createElement("ul");ma.className="geTempTreeNested";ma.style.visibility="hidden";for(var oa in ya){var la=document.createElement("li"),qa=ea(oa,ya[oa]);la.setAttribute("title",qa);mxUtils.write(la,qa);wa(sa,la,oa);ma.appendChild(la)}ca.appendChild(ma);
-ra.className="geTempTree";ra.appendChild(ca);(function(pa,ka){mxEvent.addListener(ka,"click",function(){pa.style.visibility="visible";pa.classList.toggle("geTempTreeActive");pa.classList.toggle("geTempTreeNested")&&setTimeout(function(){pa.style.visibility="hidden"},550);ka.classList.toggle("geTempTreeCaret-down")})})(ma,fa)}else ra.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;",
-ra.setAttribute("title",ma),mxUtils.write(ra,ma);null!=k&&(ra.style.padding=k);Ga.appendChild(ra);null==Fa&&0<ua.length&&(Fa=ra,Fa.style.backgroundColor=v,va=ua);wa(sa,ia)}O(!1)}var D=500>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);f=null!=f?f:!0;m=null!=m?m:!1;v=null!=v?v:"#ebf2f9";d=null!=d?d:Editor.isDarkMode()?"#a2a2a2":"#e6eff8";g=null!=g?g:Editor.isDarkMode()?"1px dashed #00a8ff":"1px solid #ccd9ea";l=null!=l?l:EditorUi.templateFile;var G=document.createElement("div");
-G.style.userSelect="none";G.style.height="100%";var N=document.createElement("div");N.style.whiteSpace="nowrap";N.style.height="46px";f&&G.appendChild(N);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_TRELLO?IMAGE_PATH+"/trello-logo.svg":b.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";e||D||!f||N.appendChild(I);f&&mxUtils.write(N,(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_TRELLO&&null!=b.trello&&(I=b.trello.extension);var F=document.createElement("input");F.setAttribute("value",b.defaultFilename+I);F.style.marginLeft="10px";F.style.width=e||
-D?"144px":"244px";this.init=function(){f&&(F.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?F.select():document.execCommand("selectAll",!1,null));null!=da.parentNode&&null!=da.parentNode.parentNode&&mxEvent.addGestureListeners(da.parentNode.parentNode,mxUtils.bind(this,function(ea){b.sidebar.hideTooltip()}),null,null)};f&&(N.appendChild(F),K?F.style.width=e||D?"350px":"450px":(null!=b.editor.diagramFileTypes&&(K=FilenameDialog.createFileTypes(b,F,b.editor.diagramFileTypes),K.style.marginLeft=
-"6px",K.style.width=e||D?"80px":"180px",N.appendChild(K)),null!=b.editor.fileExtensions&&(D=FilenameDialog.createTypeHint(b,F,b.editor.fileExtensions),D.style.marginTop="12px",N.appendChild(D))));N=!1;var H=0,R=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}),X=mxUtils.button(z||mxResources.get("create"),function(){X.setAttribute("disabled","disabled");L();X.removeAttribute("disabled")});X.className="geBtn gePrimaryBtn";
-if(p||q){var J=[],W=null,V=null,t=null,C=function(ea){X.setAttribute("disabled","disabled");for(var wa=0;wa<J.length;wa++)J[wa].className=wa==ea?"geBtn gePrimaryBtn":"geBtn"};N=!0;z=document.createElement("div");z.style.whiteSpace="nowrap";z.style.height="30px";G.appendChild(z);D=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){Ga.style.display="";ja.style.display="";da.style.left="160px";C(0);da.scrollTop=0;da.innerText="";H=0;W!=va&&(va=W,na=V,xa=t,Ga.innerText="",B(),W=null)});
-J.push(D);z.appendChild(D);var M=function(ea){Ga.style.display="none";ja.style.display="none";da.style.left="30px";C(ea?-1:1);null==W&&(W=va);da.scrollTop=0;da.innerText="";R.spin(da);var wa=function(ua,sa,ra){H=0;R.stop();va=ua;ra=ra||{};var ya=0,ia;for(ia in ra)ya+=ra[ia].length;if(sa)da.innerHTML=sa;else if(0==ua.length&&0==ya)da.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found"));else if(da.innerText="",0<ya){Ga.style.display="";da.style.left="160px";Ga.innerText=
-"";xa=0;na={"draw.io":ua};for(ia in ra)na[ia]=ra[ia];B()}else O(!0)};ea?q(Q.value,wa):p(wa)};p&&(D=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){M()}),z.appendChild(D),J.push(D));if(q){D=document.createElement("span");D.style.marginLeft="10px";D.innerHTML=mxUtils.htmlEntities(mxResources.get("search")+":");z.appendChild(D);var Q=document.createElement("input");Q.style.marginRight="10px";Q.style.marginLeft="10px";Q.style.width="220px";mxEvent.addListener(Q,"keypress",function(ea){13==
-ea.keyCode&&M(!0)});z.appendChild(Q);D=mxUtils.button(mxResources.get("search"),function(){M(!0)});D.className="geBtn";z.appendChild(D)}C(0)}var P=null,S=null,U=null,T=null,Y=null,aa=null,Z=null,da=document.createElement("div");da.style.border="1px solid #d3d3d3";da.style.position="absolute";da.style.left="160px";da.style.right="34px";z=(f?72:40)+(N?30:0);da.style.top=z+"px";da.style.bottom="68px";da.style.margin="6px 0 0 -1px";da.style.padding="6px";da.style.overflow="auto";var ja=document.createElement("div");
-ja.style.cssText="position:absolute;left:30px;width:128px;top:"+z+"px;height:22px;margin-top: 6px;white-space: nowrap";var ha=document.createElement("input");ha.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px";ha.setAttribute("placeholder",mxResources.get("search"));ha.setAttribute("type","text");ja.appendChild(ha);var ba=document.createElement("img"),Aa="undefined"!=typeof Sidebar?Sidebar.prototype.searchImage:IMAGE_PATH+"/search.png";ba.setAttribute("src",
-Aa);ba.setAttribute("title",mxResources.get("search"));ba.style.position="relative";ba.style.left="-18px";ba.style.top="1px";ba.style.background="url('"+b.editor.transparentImage+"')";ja.appendChild(ba);mxEvent.addListener(ba,"click",function(){ba.getAttribute("src")==Dialog.prototype.closeImage&&(ba.setAttribute("src",Aa),ba.setAttribute("title",mxResources.get("search")),ha.value="",null!=Oa&&(Oa.click(),Oa=null));ha.focus()});mxEvent.addListener(ha,"keydown",mxUtils.bind(this,function(ea){if(13==
-ea.keyCode){var wa=ha.value;if(""==wa)null!=Oa&&(Oa.click(),Oa=null);else{if(null==NewDialog.tagsList[l]){var ua={};for(oa in na)for(var sa=na[oa],ra=0;ra<sa.length;ra++){var ya=sa[ra];if(null!=ya.tags)for(var ia=ya.tags.toLowerCase().split(";"),ma=0;ma<ia.length;ma++)null==ua[ia[ma]]&&(ua[ia[ma]]=[]),ua[ia[ma]].push(ya)}NewDialog.tagsList[l]=ua}var ca=wa.toLowerCase().split(" ");ua=NewDialog.tagsList[l];if(0<xa&&null==ua.__tagsList__){for(oa in Ka)for(sa=Ka[oa],ra=0;ra<sa.length;ra++)for(ya=sa[ra],
-ia=ya.title.split(" "),ia.push(oa),ma=0;ma<ia.length;ma++){var fa=ia[ma].toLowerCase();null==ua[fa]&&(ua[fa]=[]);ua[fa].push(ya)}ua.__tagsList__=!0}var oa=[];sa={};for(ra=ia=0;ra<ca.length;ra++)if(0<ca[ra].length){fa=ua[ca[ra]];var la={};oa=[];if(null!=fa)for(ma=0;ma<fa.length;ma++)ya=fa[ma],0==ia==(null==sa[ya.url])&&(la[ya.url]=!0,oa.push(ya));sa=la;ia++}da.scrollTop=0;da.innerText="";H=0;ua=document.createElement("div");ua.style.cssText="border: 1px solid #D3D3D3; padding: 6px; background: #F5F5F5;";
-mxUtils.write(ua,mxResources.get(0==oa.length?"noResultsFor":"resultsFor",[wa]));da.appendChild(ua);null!=Fa&&null==Oa&&(Fa.style.backgroundColor="",Oa=Fa,Fa=ua);va=oa;W=null;O(!1)}mxEvent.consume(ea)}}));mxEvent.addListener(ha,"keyup",mxUtils.bind(this,function(ea){""==ha.value?(ba.setAttribute("src",Aa),ba.setAttribute("title",mxResources.get("search"))):(ba.setAttribute("src",Dialog.prototype.closeImage),ba.setAttribute("title",mxResources.get("reset")))}));z+=23;var Ga=document.createElement("div");
-Ga.style.cssText="position:absolute;left:30px;width:128px;top:"+z+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(da,"scroll",function(){b.sidebar.hideTooltip()});var Ca=140,Da=140,na={},Ia={},Ka={},xa=0,Ja=!0,Fa=null,Oa=null;na.basic=[{title:"blankDiagram",select:!0}];var va=na.basic;if(!e){var za=function(){mxUtils.get(Ba,function(ea){if(!ta){ta=!0;ea=ea.getXml().documentElement.firstChild;for(var wa={};null!=ea;){if("undefined"!==typeof ea.getAttribute)if("clibs"==
-ea.nodeName){for(var ua=ea.getAttribute("name"),sa=ea.getElementsByTagName("add"),ra=[],ya=0;ya<sa.length;ya++)ra.push(encodeURIComponent(mxUtils.getTextContent(sa[ya])));null!=ua&&0<ra.length&&(wa[ua]=ra.join(";"))}else if(ra=ea.getAttribute("url"),null!=ra){sa=ea.getAttribute("section");ua=ea.getAttribute("subsection");if(null==sa&&(ya=ra.indexOf("/"),sa=ra.substring(0,ya),null==ua)){var ia=ra.indexOf("/",ya+1);-1<ia&&(ua=ra.substring(ya+1,ia))}ya=na[sa];null==ya&&(ya=[],na[sa]=ya);ra=ea.getAttribute("clibs");
-null!=wa[ra]&&(ra=wa[ra]);ra={url:ea.getAttribute("url"),libs:ea.getAttribute("libs"),title:ea.getAttribute("title"),tooltip:ea.getAttribute("name")||ea.getAttribute("url"),preview:ea.getAttribute("preview"),clibs:ra,tags:ea.getAttribute("tags")};ya.push(ra);null!=ua&&(ya=Ia[sa],null==ya&&(ya={},Ia[sa]=ya),sa=ya[ua],null==sa&&(sa=[],ya[ua]=sa),sa.push(ra))}ea=ea.nextSibling}R.stop();B()}})};G.appendChild(ja);G.appendChild(Ga);G.appendChild(da);var ta=!1,Ba=l;/^https?:\/\//.test(Ba)&&!b.editor.isCorsEnabledForUrl(Ba)&&
-(Ba=PROXY_URL+"?url="+encodeURIComponent(Ba));R.spin(da);null!=A?A(function(ea,wa){Ka=ea;t=xa=wa;za()},za):za();V=na}mxEvent.addListener(F,"keypress",function(ea){b.dialog.container.firstChild==G&&13==ea.keyCode&&L()});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()||!f||null!=c||m||(z=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),
-z.className="geBtn",A.appendChild(z));z=mxUtils.button(mxResources.get("cancel"),function(){null!=n&&n();b.hideDialog(!0)});z.className="geBtn";!b.editor.cancelFirst||m&&null==n||A.appendChild(z);e||"1"==urlParams.embed||m||mxClient.IS_ANDROID||mxClient.IS_IOS||"1"==urlParams.noDevice||(e=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var ea=new FilenameDialog(b,"",mxResources.get("create"),function(wa){null!=wa&&0<wa.length&&(wa=b.getUrl(window.location.pathname+"?mode="+b.mode+"&title="+
-encodeURIComponent(F.value)+"&create="+encodeURIComponent(wa)),null==b.getCurrentFile()?window.location.href=wa:window.openWindow(wa))},mxResources.get("url"));b.showDialog(ea.container,300,80,!0,!0);ea.init()}),e.className="geBtn",A.appendChild(e));Graph.fileSupport&&y&&(y=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var ea=document.createElement("input");ea.setAttribute("multiple","multiple");ea.setAttribute("type","file");mxEvent.addListener(ea,"change",function(wa){b.openFiles(ea.files,
-!0);ea.value=""});ea.style.display="none";document.body.appendChild(ea);b.newDlgFileInputElt=ea}b.newDlgFileInputElt.click()}),y.className="geBtn",A.appendChild(y));A.appendChild(X);b.editor.cancelFirst||null!=c||m&&null==n||A.appendChild(z);G.appendChild(A);this.container=G};NewDialog.tagsList={};
-var CreateDialog=function(b,e,f,c,m,n,v,d,g,k,l,p,q,x,y,z,A){function K(N,I,F,H){function R(){mxEvent.addListener(X,"click",function(){var C=F;if(v){var M=u.value,Q=M.lastIndexOf(".");if(0>e.lastIndexOf(".")&&0>Q){C=null!=C?C:G.value;var P="";C==App.MODE_GOOGLE?P=b.drive.extension:C==App.MODE_GITHUB?P=b.gitHub.extension:C==App.MODE_GITLAB?P=b.gitLab.extension:C==App.MODE_TRELLO?P=b.trello.extension:C==App.MODE_DROPBOX?P=b.dropbox.extension:C==App.MODE_ONEDRIVE?P=b.oneDrive.extension:C==App.MODE_DEVICE&&
-(P=".drawio");0<=Q&&(M=M.substring(0,Q));u.value=M+P}}O(F)})}var X=document.createElement("a");X.style.overflow="hidden";var J=document.createElement("img");J.src=N;J.setAttribute("border","0");J.setAttribute("align","absmiddle");J.style.width="60px";J.style.height="60px";J.style.paddingBottom="6px";X.style.display="inline-block";X.className="geBaseButton";X.style.position="relative";X.style.margin="4px";X.style.padding="8px 8px 10px 8px";X.style.whiteSpace="nowrap";X.appendChild(J);X.style.color=
-"gray";X.style.fontSize="11px";var W=document.createElement("div");X.appendChild(W);mxUtils.write(W,I);if(null!=H&&null==b[H]){J.style.visibility="hidden";mxUtils.setOpacity(W,10);var V=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});V.spin(X);var t=window.setTimeout(function(){null==b[H]&&(V.stop(),X.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[H]&&(window.clearTimeout(t),
-mxUtils.setOpacity(W,100),J.style.visibility="",V.stop(),R())}))}else R();B.appendChild(X);++D==p&&(mxUtils.br(B),D=0)}function O(N){var I=u.value;if(null==N||null!=I&&0<I.length)A&&b.hideDialog(),f(I,N,u)}l="1"==urlParams.noDevice?!1:l;v=null!=v?v:!0;d=null!=d?d:!0;p=null!=p?p:4;A=null!=A?A:!0;n=document.createElement("div");n.style.whiteSpace="nowrap";null==c&&b.addLanguageMenu(n);var L=document.createElement("h2");mxUtils.write(L,m||mxResources.get("create"));L.style.marginTop="0px";L.style.marginBottom=
-"24px";n.appendChild(L);mxUtils.write(n,mxResources.get("filename")+":");var u=document.createElement("input");u.setAttribute("value",e);u.style.width="200px";u.style.marginLeft="10px";u.style.marginBottom="20px";u.style.maxWidth="70%";this.init=function(){u.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?u.select():document.execCommand("selectAll",!1,null)};n.appendChild(u);null!=z&&(null!=b.editor.diagramFileTypes&&(m=FilenameDialog.createFileTypes(b,u,b.editor.diagramFileTypes),
+e.appendChild(g);this.container=e},NewDialog=function(b,e,f,c,m,n,v,d,g,k,l,p,q,x,y,z,A,J){function O(ia){null!=ia&&(Ca=Da=ia?135:140);ia=!0;if(null!=wa)for(;I<wa.length&&(ia||0!=mxUtils.mod(I,30));){var ja=wa[I++];ja=E(ja.url,ja.libs,ja.title,ja.tooltip?ja.tooltip:ja.title,ja.select,ja.imgUrl,ja.info,ja.onClick,ja.preview,ja.noImg,ja.clibs);ia&&ja.click();ia=!1}}function K(){if(Y&&null!=x)f||b.hideDialog(),x(Y,Z,F.value);else if(c)f||b.hideDialog(),c(T,F.value,ba,P);else{var ia=F.value;null!=ia&&
+0<ia.length&&b.pickFolder(b.mode,function(ja){b.createFile(ia,T,null!=P&&0<P.length?P:null,null,function(){b.hideDialog()},null,ja,null,null!=R&&0<R.length?R:null)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}function u(ia,ja,ua,xa,ra,Aa,fa){null!=V&&(V.style.backgroundColor="transparent",V.style.border="1px solid transparent");X.removeAttribute("disabled");T=ja;P=ua;R=Aa;V=ia;Y=xa;ba=fa;Z=ra;V.style.backgroundColor=d;V.style.border=g}function E(ia,ja,ua,xa,ra,Aa,fa,na,
+qa,ca,ha){function sa(Ma,Ta){null==ta?(Na=Ma,Na=/^https?:\/\//.test(Na)&&!b.editor.isCorsEnabledForUrl(Na)?PROXY_URL+"?url="+encodeURIComponent(Na):TEMPLATE_PATH+"/"+Na,mxUtils.get(Na,mxUtils.bind(this,function(Ua){200<=Ua.getStatus()&&299>=Ua.getStatus()&&(ta=Ua.getText());Ta(ta,Na)}))):Ta(ta,Na)}function la(Ma,Ta,Ua){if(null!=Ma&&mxUtils.isAncestorNode(document.body,oa)){Ma=mxUtils.parseXml(Ma);Ma=Editor.parseDiagramNode(Ma.documentElement);var Va=new mxCodec(Ma.ownerDocument),$a=new mxGraphModel;
+Va.decode(Ma,$a);Ma=$a.root.getChildAt(0).children;b.sidebar.createTooltip(oa,Ma,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!=ua?mxResources.get(ua,null,ua):null,!0,new mxPoint(Ta,Ua),!0,function(){Xa=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;u(oa,null,null,ia,fa,ha)},!0,!1)}}function ma(Ma,Ta){null==ia||Sa||
+b.sidebar.currentElt==oa?b.sidebar.hideTooltip():(b.sidebar.hideTooltip(),null!=Ga?(Ta='<mxfile><diagram id="d" name="n">'+Graph.compress('<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="" style="shape=image;image='+Ga.src+';imageAspect=1;" parent="1" vertex="1"><mxGeometry width="'+Ga.naturalWidth+'" height="'+Ga.naturalHeight+'" as="geometry" /></mxCell></root></mxGraphModel>')+"</diagram></mxfile>",la(Ta,mxEvent.getClientX(Ma),mxEvent.getClientY(Ma))):(b.sidebar.currentElt=
+oa,Sa=!0,sa(ia,function(Ua){Sa&&b.sidebar.currentElt==oa&&la(Ua,mxEvent.getClientX(Ma),mxEvent.getClientY(Ma));Sa=!1})))}var oa=document.createElement("div");oa.className="geTemplate";oa.style.position="relative";oa.style.height=Ca+"px";oa.style.width=Da+"px";var ta=null,Na=ia;Editor.isDarkMode()&&(oa.style.filter="invert(100%)");null!=ua?oa.setAttribute("title",mxResources.get(ua,null,ua)):null!=xa&&0<xa.length&&oa.setAttribute("title",xa);var Sa=!1,Ga=null;if(null!=Aa){oa.style.display="inline-flex";
+oa.style.justifyContent="center";oa.style.alignItems="center";ra=document.createElement("img");ra.setAttribute("src",Aa);ra.setAttribute("alt",xa);ra.style.maxWidth=Ca+"px";ra.style.maxHeight=Da+"px";Ga=ra;var La=Aa.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");oa.appendChild(ra);ra.onerror=function(){this.src!=La?this.src=La:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(oa,mxUtils.bind(this,function(Ma){u(oa,null,null,ia,fa,ha)}),null,null);mxEvent.addListener(oa,
+"dblclick",function(Ma){K();mxEvent.consume(Ma)})}else if(!ca&&null!=ia&&0<ia.length){var Qa=function(Ma){X.setAttribute("disabled","disabled");oa.style.backgroundColor="transparent";oa.style.border="1px solid transparent";Q.spin(da);sa(ia,function(Ta,Ua){Q.stop();null!=Ta&&(u(oa,Ta,ja,null,null,ha,Ua),Ma&&K())})};ra=qa||TEMPLATE_PATH+"/"+ia.substring(0,ia.length-4)+".png";oa.style.backgroundImage="url("+ra+")";oa.style.backgroundPosition="center center";oa.style.backgroundRepeat="no-repeat";if(null!=
+ua){xa=document.createElement("table");xa.setAttribute("width","100%");xa.setAttribute("height","100%");xa.style.background=Editor.isDarkMode()?"transparent":"rgba(255,255,255,0.85)";xa.style.lineHeight="1.3em";xa.style.border="inherit";Aa=document.createElement("tbody");qa=document.createElement("tr");ca=document.createElement("td");ca.setAttribute("align","center");ca.setAttribute("valign","middle");var Oa=document.createElement("span");Oa.style.display="inline-block";Oa.style.padding="4px 8px 4px 8px";
+Oa.style.userSelect="none";Oa.style.borderRadius="3px";Oa.style.background="rgba(255,255,255,0.85)";Oa.style.overflow="hidden";Oa.style.textOverflow="ellipsis";Oa.style.maxWidth=Ca-34+"px";mxUtils.write(Oa,mxResources.get(ua,null,ua));ca.appendChild(Oa);qa.appendChild(ca);Aa.appendChild(qa);xa.appendChild(Aa);oa.appendChild(xa)}mxEvent.addGestureListeners(oa,mxUtils.bind(this,function(Ma){Qa()}),null,null);mxEvent.addListener(oa,"dblclick",function(Ma){Qa(!0);mxEvent.consume(Ma)})}else xa=document.createElement("table"),
+xa.setAttribute("width","100%"),xa.setAttribute("height","100%"),xa.style.lineHeight="1.3em",Aa=document.createElement("tbody"),qa=document.createElement("tr"),ca=document.createElement("td"),ca.setAttribute("align","center"),ca.setAttribute("valign","middle"),Oa=document.createElement("span"),Oa.style.display="inline-block",Oa.style.padding="4px 8px 4px 8px",Oa.style.userSelect="none",Oa.style.borderRadius="3px",Oa.style.background="#ffffff",Oa.style.overflow="hidden",Oa.style.textOverflow="ellipsis",
+Oa.style.maxWidth=Ca-34+"px",mxUtils.write(Oa,mxResources.get(ua,null,ua)),ca.appendChild(Oa),qa.appendChild(ca),Aa.appendChild(qa),xa.appendChild(Aa),oa.appendChild(xa),ra&&u(oa),mxEvent.addGestureListeners(oa,mxUtils.bind(this,function(Ma){u(oa,null,null,ia,fa)}),null,null),null!=na?mxEvent.addListener(oa,"click",na):(mxEvent.addListener(oa,"click",function(Ma){u(oa,null,null,ia,fa)}),mxEvent.addListener(oa,"dblclick",function(Ma){K();mxEvent.consume(Ma)}));if(null!=ia){var Ra=document.createElement("img");
+Ra.setAttribute("src",Sidebar.prototype.searchImage);Ra.setAttribute("title",mxResources.get("preview"));Ra.className="geActiveButton";Ra.style.position="absolute";Ra.style.cursor="default";Ra.style.padding="8px";Ra.style.right="0px";Ra.style.top="0px";oa.appendChild(Ra);var Xa=!1;mxEvent.addGestureListeners(Ra,mxUtils.bind(this,function(Ma){Xa=b.sidebar.currentElt==oa}),null,null);mxEvent.addListener(Ra,"click",mxUtils.bind(this,function(Ma){Xa||ma(Ma,Ra);mxEvent.consume(Ma)}))}da.appendChild(oa);
+return oa}function B(){function ia(ma,oa){var ta=mxResources.get(ma);null==ta&&(ta=ma.substring(0,1).toUpperCase()+ma.substring(1));18<ta.length&&(ta=ta.substring(0,18)+"&hellip;");return ta+" ("+oa.length+")"}function ja(ma,oa,ta){mxEvent.addListener(oa,"click",function(){Fa!=oa&&(Fa.style.backgroundColor="",Fa=oa,Fa.style.backgroundColor=v,da.scrollTop=0,da.innerText="",I=0,wa=ta?Ha[ma][ta]:pa[ma],U=null,O(!1))})}Ia&&(Ia=!1,mxEvent.addListener(da,"scroll",function(ma){da.scrollTop+da.clientHeight>=
+da.scrollHeight&&(O(),mxEvent.consume(ma))}));if(0<ya){var ua=document.createElement("div");ua.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ua,mxResources.get("custom"));Ea.appendChild(ua);for(var xa in Ja){var ra=document.createElement("div"),Aa=xa;ua=Ja[xa];18<Aa.length&&(Aa=Aa.substring(0,18)+"&hellip;");ra.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";
+ra.setAttribute("title",Aa+" ("+ua.length+")");mxUtils.write(ra,ra.getAttribute("title"));null!=k&&(ra.style.padding=k);Ea.appendChild(ra);(function(ma,oa){mxEvent.addListener(ra,"click",function(){Fa!=oa&&(Fa.style.backgroundColor="",Fa=oa,Fa.style.backgroundColor=v,da.scrollTop=0,da.innerText="",I=0,wa=Ja[ma],U=null,O(!1))})})(xa,ra)}ua=document.createElement("div");ua.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ua,"draw.io");Ea.appendChild(ua)}for(xa in pa){Aa=
+Ha[xa];var fa=ra=document.createElement(Aa?"ul":"div");ua=pa[xa];var na=ia(xa,ua);if(null!=Aa){var qa=document.createElement("li"),ca=document.createElement("div");ca.className="geTempTreeCaret";ca.setAttribute("title",na);mxUtils.write(ca,na);fa=ca;qa.appendChild(ca);na=document.createElement("ul");na.className="geTempTreeNested";na.style.visibility="hidden";for(var ha in Aa){var sa=document.createElement("li"),la=ia(ha,Aa[ha]);sa.setAttribute("title",la);mxUtils.write(sa,la);ja(xa,sa,ha);na.appendChild(sa)}qa.appendChild(na);
+ra.className="geTempTree";ra.appendChild(qa);(function(ma,oa){mxEvent.addListener(oa,"click",function(){ma.style.visibility="visible";ma.classList.toggle("geTempTreeActive");ma.classList.toggle("geTempTreeNested")&&setTimeout(function(){ma.style.visibility="hidden"},550);oa.classList.toggle("geTempTreeCaret-down")})})(na,ca)}else ra.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;",
+ra.setAttribute("title",na),mxUtils.write(ra,na);null!=k&&(ra.style.padding=k);Ea.appendChild(ra);null==Fa&&0<ua.length&&(Fa=ra,Fa.style.backgroundColor=v,wa=ua);ja(xa,fa)}O(!1)}var D=500>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);f=null!=f?f:!0;m=null!=m?m:!1;v=null!=v?v:"#ebf2f9";d=null!=d?d:Editor.isDarkMode()?"#a2a2a2":"#e6eff8";g=null!=g?g:Editor.isDarkMode()?"1px dashed #00a8ff":"1px solid #ccd9ea";l=null!=l?l:EditorUi.templateFile;var G=document.createElement("div");
+G.style.userSelect="none";G.style.height="100%";var H=document.createElement("div");H.style.whiteSpace="nowrap";H.style.height="46px";f&&G.appendChild(H);var N=document.createElement("img");N.setAttribute("border","0");N.setAttribute("align","absmiddle");N.style.width="40px";N.style.height="40px";N.style.marginRight="10px";N.style.paddingBottom="4px";N.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_TRELLO?IMAGE_PATH+"/trello-logo.svg":b.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";e||D||!f||H.appendChild(N);f&&mxUtils.write(H,(D?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");N=".drawio";
+b.mode==App.MODE_GOOGLE&&null!=b.drive?N=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?N=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?N=b.oneDrive.extension:b.mode==App.MODE_GITHUB&&null!=b.gitHub?N=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?N=b.gitLab.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(N=b.trello.extension);var F=document.createElement("input");F.setAttribute("value",b.defaultFilename+N);F.style.marginLeft="10px";F.style.width=e||
+D?"144px":"244px";this.init=function(){f&&(F.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?F.select():document.execCommand("selectAll",!1,null));null!=da.parentNode&&null!=da.parentNode.parentNode&&mxEvent.addGestureListeners(da.parentNode.parentNode,mxUtils.bind(this,function(ia){b.sidebar.hideTooltip()}),null,null)};f&&(H.appendChild(F),J?F.style.width=e||D?"350px":"450px":(null!=b.editor.diagramFileTypes&&(J=FilenameDialog.createFileTypes(b,F,b.editor.diagramFileTypes),J.style.marginLeft=
+"6px",J.style.width=e||D?"80px":"180px",H.appendChild(J)),null!=b.editor.fileExtensions&&(D=FilenameDialog.createTypeHint(b,F,b.editor.fileExtensions),D.style.marginTop="12px",H.appendChild(D))));H=!1;var I=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}),X=mxUtils.button(z||mxResources.get("create"),function(){X.setAttribute("disabled","disabled");K();X.removeAttribute("disabled")});X.className="geBtn gePrimaryBtn";
+if(p||q){var L=[],U=null,W=null,t=null,C=function(ia){X.setAttribute("disabled","disabled");for(var ja=0;ja<L.length;ja++)L[ja].className=ja==ia?"geBtn gePrimaryBtn":"geBtn"};H=!0;z=document.createElement("div");z.style.whiteSpace="nowrap";z.style.height="30px";G.appendChild(z);D=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){Ea.style.display="";ea.style.display="";da.style.left="160px";C(0);da.scrollTop=0;da.innerText="";I=0;U!=wa&&(wa=U,pa=W,ya=t,Ea.innerText="",B(),U=null)});
+L.push(D);z.appendChild(D);var M=function(ia){Ea.style.display="none";ea.style.display="none";da.style.left="30px";C(ia?-1:1);null==U&&(U=wa);da.scrollTop=0;da.innerText="";Q.spin(da);var ja=function(ua,xa,ra){I=0;Q.stop();wa=ua;ra=ra||{};var Aa=0,fa;for(fa in ra)Aa+=ra[fa].length;if(xa)da.innerHTML=xa;else if(0==ua.length&&0==Aa)da.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found"));else if(da.innerText="",0<Aa){Ea.style.display="";da.style.left="160px";Ea.innerText=
+"";ya=0;pa={"draw.io":ua};for(fa in ra)pa[fa]=ra[fa];B()}else O(!0)};ia?q(S.value,ja):p(ja)};p&&(D=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){M()}),z.appendChild(D),L.push(D));if(q){D=document.createElement("span");D.style.marginLeft="10px";D.innerHTML=mxUtils.htmlEntities(mxResources.get("search")+":");z.appendChild(D);var S=document.createElement("input");S.style.marginRight="10px";S.style.marginLeft="10px";S.style.width="220px";mxEvent.addListener(S,"keypress",function(ia){13==
+ia.keyCode&&M(!0)});z.appendChild(S);D=mxUtils.button(mxResources.get("search"),function(){M(!0)});D.className="geBtn";z.appendChild(D)}C(0)}var P=null,R=null,T=null,V=null,Y=null,ba=null,Z=null,da=document.createElement("div");da.style.border="1px solid #d3d3d3";da.style.position="absolute";da.style.left="160px";da.style.right="34px";z=(f?72:40)+(H?30:0);da.style.top=z+"px";da.style.bottom="68px";da.style.margin="6px 0 0 -1px";da.style.padding="6px";da.style.overflow="auto";var ea=document.createElement("div");
+ea.style.cssText="position:absolute;left:30px;width:128px;top:"+z+"px;height:22px;margin-top: 6px;white-space: nowrap";var ka=document.createElement("input");ka.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px";ka.setAttribute("placeholder",mxResources.get("search"));ka.setAttribute("type","text");ea.appendChild(ka);var aa=document.createElement("img"),Ba="undefined"!=typeof Sidebar?Sidebar.prototype.searchImage:IMAGE_PATH+"/search.png";aa.setAttribute("src",
+Ba);aa.setAttribute("title",mxResources.get("search"));aa.style.position="relative";aa.style.left="-18px";aa.style.top="1px";aa.style.background="url('"+b.editor.transparentImage+"')";ea.appendChild(aa);mxEvent.addListener(aa,"click",function(){aa.getAttribute("src")==Dialog.prototype.closeImage&&(aa.setAttribute("src",Ba),aa.setAttribute("title",mxResources.get("search")),ka.value="",null!=Pa&&(Pa.click(),Pa=null));ka.focus()});mxEvent.addListener(ka,"keydown",mxUtils.bind(this,function(ia){if(13==
+ia.keyCode){var ja=ka.value;if(""==ja)null!=Pa&&(Pa.click(),Pa=null);else{if(null==NewDialog.tagsList[l]){var ua={};for(ha in pa)for(var xa=pa[ha],ra=0;ra<xa.length;ra++){var Aa=xa[ra];if(null!=Aa.tags)for(var fa=Aa.tags.toLowerCase().split(";"),na=0;na<fa.length;na++)null==ua[fa[na]]&&(ua[fa[na]]=[]),ua[fa[na]].push(Aa)}NewDialog.tagsList[l]=ua}var qa=ja.toLowerCase().split(" ");ua=NewDialog.tagsList[l];if(0<ya&&null==ua.__tagsList__){for(ha in Ja)for(xa=Ja[ha],ra=0;ra<xa.length;ra++)for(Aa=xa[ra],
+fa=Aa.title.split(" "),fa.push(ha),na=0;na<fa.length;na++){var ca=fa[na].toLowerCase();null==ua[ca]&&(ua[ca]=[]);ua[ca].push(Aa)}ua.__tagsList__=!0}var ha=[];xa={};for(ra=fa=0;ra<qa.length;ra++)if(0<qa[ra].length){ca=ua[qa[ra]];var sa={};ha=[];if(null!=ca)for(na=0;na<ca.length;na++)Aa=ca[na],0==fa==(null==xa[Aa.url])&&(sa[Aa.url]=!0,ha.push(Aa));xa=sa;fa++}da.scrollTop=0;da.innerText="";I=0;ua=document.createElement("div");ua.style.cssText="border: 1px solid #D3D3D3; padding: 6px; background: #F5F5F5;";
+mxUtils.write(ua,mxResources.get(0==ha.length?"noResultsFor":"resultsFor",[ja]));da.appendChild(ua);null!=Fa&&null==Pa&&(Fa.style.backgroundColor="",Pa=Fa,Fa=ua);wa=ha;U=null;O(!1)}mxEvent.consume(ia)}}));mxEvent.addListener(ka,"keyup",mxUtils.bind(this,function(ia){""==ka.value?(aa.setAttribute("src",Ba),aa.setAttribute("title",mxResources.get("search"))):(aa.setAttribute("src",Dialog.prototype.closeImage),aa.setAttribute("title",mxResources.get("reset")))}));z+=23;var Ea=document.createElement("div");
+Ea.style.cssText="position:absolute;left:30px;width:128px;top:"+z+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(da,"scroll",function(){b.sidebar.hideTooltip()});var Ca=140,Da=140,pa={},Ha={},Ja={},ya=0,Ia=!0,Fa=null,Pa=null;pa.basic=[{title:"blankDiagram",select:!0}];var wa=pa.basic;if(!e){var za=function(){mxUtils.get(Ka,function(ia){if(!va){va=!0;ia=ia.getXml().documentElement.firstChild;for(var ja={};null!=ia;){if("undefined"!==typeof ia.getAttribute)if("clibs"==
+ia.nodeName){for(var ua=ia.getAttribute("name"),xa=ia.getElementsByTagName("add"),ra=[],Aa=0;Aa<xa.length;Aa++)ra.push(encodeURIComponent(mxUtils.getTextContent(xa[Aa])));null!=ua&&0<ra.length&&(ja[ua]=ra.join(";"))}else if(ra=ia.getAttribute("url"),null!=ra){xa=ia.getAttribute("section");ua=ia.getAttribute("subsection");if(null==xa&&(Aa=ra.indexOf("/"),xa=ra.substring(0,Aa),null==ua)){var fa=ra.indexOf("/",Aa+1);-1<fa&&(ua=ra.substring(Aa+1,fa))}Aa=pa[xa];null==Aa&&(Aa=[],pa[xa]=Aa);ra=ia.getAttribute("clibs");
+null!=ja[ra]&&(ra=ja[ra]);ra={url:ia.getAttribute("url"),libs:ia.getAttribute("libs"),title:ia.getAttribute("title"),tooltip:ia.getAttribute("name")||ia.getAttribute("url"),preview:ia.getAttribute("preview"),clibs:ra,tags:ia.getAttribute("tags")};Aa.push(ra);null!=ua&&(Aa=Ha[xa],null==Aa&&(Aa={},Ha[xa]=Aa),xa=Aa[ua],null==xa&&(xa=[],Aa[ua]=xa),xa.push(ra))}ia=ia.nextSibling}Q.stop();B()}})};G.appendChild(ea);G.appendChild(Ea);G.appendChild(da);var va=!1,Ka=l;/^https?:\/\//.test(Ka)&&!b.editor.isCorsEnabledForUrl(Ka)&&
+(Ka=PROXY_URL+"?url="+encodeURIComponent(Ka));Q.spin(da);null!=A?A(function(ia,ja){Ja=ia;t=ya=ja;za()},za):za();W=pa}mxEvent.addListener(F,"keypress",function(ia){b.dialog.container.firstChild==G&&13==ia.keyCode&&K()});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()||!f||null!=c||m||(z=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),
+z.className="geBtn",A.appendChild(z));z=mxUtils.button(mxResources.get("cancel"),function(){null!=n&&n();b.hideDialog(!0)});z.className="geBtn";!b.editor.cancelFirst||m&&null==n||A.appendChild(z);e||"1"==urlParams.embed||m||mxClient.IS_ANDROID||mxClient.IS_IOS||"1"==urlParams.noDevice||(e=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var ia=new FilenameDialog(b,"",mxResources.get("create"),function(ja){null!=ja&&0<ja.length&&b.editor.loadUrl(ja,function(ua){T=ua;P=null;templateRealURl=
+ja;b.hideDialog();K()},function(ua){b.handleError(ua)})},mxResources.get("url"),null,null,null,!1);b.showDialog(ia.container,300,80,!0,!0);ia.init()}),e.className="geBtn",A.appendChild(e));Graph.fileSupport&&y&&(y=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var ia=document.createElement("input");ia.setAttribute("multiple","multiple");ia.setAttribute("type","file");mxEvent.addListener(ia,"change",function(ja){b.openFiles(ia.files,!0);ia.value=""});ia.style.display=
+"none";document.body.appendChild(ia);b.newDlgFileInputElt=ia}b.newDlgFileInputElt.click()}),y.className="geBtn",A.appendChild(y));A.appendChild(X);b.editor.cancelFirst||null!=c||m&&null==n||A.appendChild(z);G.appendChild(A);this.container=G};NewDialog.tagsList={};
+var CreateDialog=function(b,e,f,c,m,n,v,d,g,k,l,p,q,x,y,z,A){function J(H,N,F,I){function Q(){mxEvent.addListener(X,"click",function(){var C=F;if(v){var M=u.value,S=M.lastIndexOf(".");if(0>e.lastIndexOf(".")&&0>S){C=null!=C?C:G.value;var P="";C==App.MODE_GOOGLE?P=b.drive.extension:C==App.MODE_GITHUB?P=b.gitHub.extension:C==App.MODE_GITLAB?P=b.gitLab.extension:C==App.MODE_TRELLO?P=b.trello.extension:C==App.MODE_DROPBOX?P=b.dropbox.extension:C==App.MODE_ONEDRIVE?P=b.oneDrive.extension:C==App.MODE_DEVICE&&
+(P=".drawio");0<=S&&(M=M.substring(0,S));u.value=M+P}}O(F)})}var X=document.createElement("a");X.style.overflow="hidden";var L=document.createElement("img");L.src=H;L.setAttribute("border","0");L.setAttribute("align","absmiddle");L.style.width="60px";L.style.height="60px";L.style.paddingBottom="6px";X.style.display="inline-block";X.className="geBaseButton";X.style.position="relative";X.style.margin="4px";X.style.padding="8px 8px 10px 8px";X.style.whiteSpace="nowrap";X.appendChild(L);X.style.color=
+"gray";X.style.fontSize="11px";var U=document.createElement("div");X.appendChild(U);mxUtils.write(U,N);if(null!=I&&null==b[I]){L.style.visibility="hidden";mxUtils.setOpacity(U,10);var W=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});W.spin(X);var t=window.setTimeout(function(){null==b[I]&&(W.stop(),X.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[I]&&(window.clearTimeout(t),
+mxUtils.setOpacity(U,100),L.style.visibility="",W.stop(),Q())}))}else Q();B.appendChild(X);++D==p&&(mxUtils.br(B),D=0)}function O(H){var N=u.value;if(null==H||null!=N&&0<N.length)A&&b.hideDialog(),f(N,H,u)}l="1"==urlParams.noDevice?!1:l;v=null!=v?v:!0;d=null!=d?d:!0;p=null!=p?p:4;A=null!=A?A:!0;n=document.createElement("div");n.style.whiteSpace="nowrap";null==c&&b.addLanguageMenu(n);var K=document.createElement("h2");mxUtils.write(K,m||mxResources.get("create"));K.style.marginTop="0px";K.style.marginBottom=
+"24px";n.appendChild(K);mxUtils.write(n,mxResources.get("filename")+":");var u=document.createElement("input");u.setAttribute("value",e);u.style.width="200px";u.style.marginLeft="10px";u.style.marginBottom="20px";u.style.maxWidth="70%";this.init=function(){u.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?u.select():document.execCommand("selectAll",!1,null)};n.appendChild(u);null!=z&&(null!=b.editor.diagramFileTypes&&(m=FilenameDialog.createFileTypes(b,u,b.editor.diagramFileTypes),
m.style.marginLeft="6px",m.style.width="90px",n.appendChild(m)),n.appendChild(FilenameDialog.createTypeHint(b,u,z)));z=null;if("1"!=urlParams.noDevice&&null!=q&&null!=x&&"image/"==x.substring(0,6)&&("image/svg"!=x.substring(0,9)||mxClient.IS_SVG)){u.style.width="160px";m=document.createElement("img");var E=y?q:btoa(unescape(encodeURIComponent(q)));m.setAttribute("src","data:"+x+";base64,"+E);m.style.position="absolute";m.style.top="70px";m.style.right="100px";m.style.maxWidth="120px";m.style.maxHeight=
-"80px";mxUtils.setPrefixedStyle(m.style,"transform","translate(50%,-50%)");n.appendChild(m);mxClient.IS_FF||null==navigator.clipboard||"image/png"!=x||(z=mxUtils.button(mxResources.get("copy"),function(N){N=b.base64ToBlob(E,"image/png");N=new ClipboardItem({"image/png":N,"text/html":new Blob(['<img src="data:'+x+";base64,"+E+'">'],{type:"text/html"})});navigator.clipboard.write([N]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(I){b.handleError(I)}))}),
-z.style.marginTop="6px",z.className="geBtn");g&&Editor.popupsAllowed&&(m.style.cursor="pointer",mxEvent.addGestureListeners(m,null,null,function(N){mxEvent.isPopupTrigger(N)||O("_blank")}))}mxUtils.br(n);var B=document.createElement("div");B.style.textAlign="center";var D=0;B.style.marginTop="6px";n.appendChild(B);var G=document.createElement("select");G.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(q=document.createElement("option"),q.setAttribute("value",
-App.MODE_GOOGLE),mxUtils.write(q,mxResources.get("googleDrive")),G.appendChild(q),K(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(q,mxResources.get("oneDrive")),G.appendChild(q),b.mode==App.MODE_ONEDRIVE&&q.setAttribute("selected","selected"),K(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,
-"oneDrive")),"function"===typeof window.DropboxClient&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(q,mxResources.get("dropbox")),G.appendChild(q),b.mode==App.MODE_DROPBOX&&q.setAttribute("selected","selected"),K(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_GITHUB),mxUtils.write(q,mxResources.get("github")),G.appendChild(q),K(IMAGE_PATH+
-"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_GITLAB),mxUtils.write(q,mxResources.get("gitlab")),G.appendChild(q),K(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_TRELLO),mxUtils.write(q,mxResources.get("trello")),G.appendChild(q),K(IMAGE_PATH+"/trello-logo.svg",
-mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice)q=document.createElement("option"),q.setAttribute("value",App.MODE_DEVICE),mxUtils.write(q,mxResources.get("device")),G.appendChild(q),b.mode!=App.MODE_DEVICE&&d||q.setAttribute("selected","selected"),l&&K(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);d&&isLocalStorage&&"0"!=urlParams.browser&&(d=document.createElement("option"),
-d.setAttribute("value",App.MODE_BROWSER),mxUtils.write(d,mxResources.get("browser")),G.appendChild(d),b.mode==App.MODE_BROWSER&&d.setAttribute("selected","selected"),K(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));d=document.createElement("div");d.style.marginTop="26px";d.style.textAlign="center";null!=k&&(l=mxUtils.button(mxResources.get("help"),function(){b.openLink(k)}),l.className="geBtn",d.appendChild(l));l=mxUtils.button(mxResources.get(null!=c?"close":"cancel"),
+"80px";mxUtils.setPrefixedStyle(m.style,"transform","translate(50%,-50%)");n.appendChild(m);mxClient.IS_FF||null==navigator.clipboard||"image/png"!=x||(z=mxUtils.button(mxResources.get("copy"),function(H){H=b.base64ToBlob(E,"image/png");H=new ClipboardItem({"image/png":H,"text/html":new Blob(['<img src="data:'+x+";base64,"+E+'">'],{type:"text/html"})});navigator.clipboard.write([H]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(N){b.handleError(N)}))}),
+z.style.marginTop="6px",z.className="geBtn");g&&Editor.popupsAllowed&&(m.style.cursor="pointer",mxEvent.addGestureListeners(m,null,null,function(H){mxEvent.isPopupTrigger(H)||O("_blank")}))}mxUtils.br(n);var B=document.createElement("div");B.style.textAlign="center";var D=0;B.style.marginTop="6px";n.appendChild(B);var G=document.createElement("select");G.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(q=document.createElement("option"),q.setAttribute("value",
+App.MODE_GOOGLE),mxUtils.write(q,mxResources.get("googleDrive")),G.appendChild(q),J(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(q,mxResources.get("oneDrive")),G.appendChild(q),b.mode==App.MODE_ONEDRIVE&&q.setAttribute("selected","selected"),J(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,
+"oneDrive")),"function"===typeof window.DropboxClient&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(q,mxResources.get("dropbox")),G.appendChild(q),b.mode==App.MODE_DROPBOX&&q.setAttribute("selected","selected"),J(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_GITHUB),mxUtils.write(q,mxResources.get("github")),G.appendChild(q),J(IMAGE_PATH+
+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_GITLAB),mxUtils.write(q,mxResources.get("gitlab")),G.appendChild(q),J(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_TRELLO),mxUtils.write(q,mxResources.get("trello")),G.appendChild(q),J(IMAGE_PATH+"/trello-logo.svg",
+mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice)q=document.createElement("option"),q.setAttribute("value",App.MODE_DEVICE),mxUtils.write(q,mxResources.get("device")),G.appendChild(q),b.mode!=App.MODE_DEVICE&&d||q.setAttribute("selected","selected"),l&&J(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);d&&isLocalStorage&&"0"!=urlParams.browser&&(d=document.createElement("option"),
+d.setAttribute("value",App.MODE_BROWSER),mxUtils.write(d,mxResources.get("browser")),G.appendChild(d),b.mode==App.MODE_BROWSER&&d.setAttribute("selected","selected"),J(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));d=document.createElement("div");d.style.marginTop="26px";d.style.textAlign="center";null!=k&&(l=mxUtils.button(mxResources.get("help"),function(){b.openLink(k)}),l.className="geBtn",d.appendChild(l));l=mxUtils.button(mxResources.get(null!=c?"close":"cancel"),
function(){null!=c?c():(b.fileLoaded(null),b.hideDialog(),window.close(),window.location.href=b.getUrl())});l.className="geBtn";b.editor.cancelFirst&&null==c&&d.appendChild(l);null==c&&(q=mxUtils.button(mxResources.get("decideLater"),function(){O(null)}),q.className="geBtn",d.appendChild(q));g&&Editor.popupsAllowed&&(g=mxUtils.button(mxResources.get("openInNewWindow"),function(){O("_blank")}),g.className="geBtn",d.appendChild(g));CreateDialog.showDownloadButton&&(g=mxUtils.button(mxResources.get("download"),
-function(){O("download")}),g.className="geBtn",d.appendChild(g),null!=z&&(g.style.marginTop="6px",d.style.marginTop="6px"));null!=z&&(mxUtils.br(d),d.appendChild(z));b.editor.cancelFirst&&null==c||d.appendChild(l);mxEvent.addListener(u,"keypress",function(N){13==N.keyCode?O(App.MODE_DEVICE):27==N.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});n.appendChild(d);this.container=n};CreateDialog.showDownloadButton="1"!=urlParams.noDevice;
+function(){O("download")}),g.className="geBtn",d.appendChild(g),null!=z&&(g.style.marginTop="6px",d.style.marginTop="6px"));null!=z&&(mxUtils.br(d),d.appendChild(z));b.editor.cancelFirst&&null==c||d.appendChild(l);mxEvent.addListener(u,"keypress",function(H){13==H.keyCode?O(App.MODE_DEVICE):27==H.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});n.appendChild(d);this.container=n};CreateDialog.showDownloadButton="1"!=urlParams.noDevice;
var PopupDialog=function(b,e,f,c,m){m=null!=m?m:!0;var n=document.createElement("div");n.style.textAlign="left";n.style.height="100%";mxUtils.write(n,mxResources.get("fileOpenLocation"));mxUtils.br(n);mxUtils.br(n);var v=mxUtils.button(mxResources.get("openInThisWindow"),function(){m&&b.hideDialog();null!=c&&c()});v.className="geBtn";v.style.marginBottom="8px";v.style.width="280px";n.appendChild(v);mxUtils.br(n);var d=mxUtils.button(mxResources.get("openInNewWindow"),function(){m&&b.hideDialog();
null!=f&&f();b.openLink(e,null,!0)});d.className="geBtn gePrimaryBtn";d.style.width=v.style.width;n.appendChild(d);mxUtils.br(n);mxUtils.br(n);mxUtils.write(n,mxResources.get("allowPopups"));this.container=n},ImageDialog=function(b,e,f,c,m,n,v,d){function g(){0<p.value.length?O.removeAttribute("disabled"):O.setAttribute("disabled","disabled")}n=null!=n?n:!0;var k=b.editor.graph,l=document.createElement("div");mxUtils.write(l,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 p=document.createElement("input");p.setAttribute("value",f);p.setAttribute("type","text");p.setAttribute("spellcheck","false");p.setAttribute("autocorrect","off");p.setAttribute("autocomplete","off");p.setAttribute("autocapitalize","off");p.style.marginTop="6px";p.style.width=(Graph.fileSupport?460:340)-20+"px";p.style.backgroundImage="url('"+
Dialog.prototype.clearImage+"')";p.style.backgroundRepeat="no-repeat";p.style.backgroundPosition="100% 50%";p.style.paddingRight="14px";f=document.createElement("div");f.setAttribute("title",mxResources.get("reset"));f.style.position="relative";f.style.left="-16px";f.style.width="12px";f.style.height="14px";f.style.cursor="pointer";f.style.display="inline-block";f.style.top="3px";f.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(f,"click",function(){p.value="";p.focus()});
-e.appendChild(p);e.appendChild(f);l.appendChild(e);var q=d,x,y,z=function(L,u,E,B){var D="data:"==L.substring(0,5);!b.isOffline()||D&&"undefined"===typeof chrome?0<L.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(L,function(G){b.spinner.stop();b.hideDialog();var N=!1===B?1:null!=u&&null!=E?Math.max(u/G.width,E/G.height):Math.min(1,Math.min(520/G.width,520/G.height));n&&(L=b.convertDataUri(L));c(L,Math.round(Number(G.width)*N),Math.round(Number(G.height)*N),q,x,y)},
-function(){b.spinner.stop();c(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),c(L,null,null,q,x,y)):(L=b.convertDataUri(L),u=null==u?120:u,E=null==E?100:E,b.hideDialog(),c(L,u,E,q,x,y))},A=function(L,u){if(null!=L){var E=m?null:k.getModel().getGeometry(k.getSelectionCell());null!=E?z(L,E.width,E.height,u):z(L,null,null,u)}else b.hideDialog(),c(null)};this.init=function(){p.focus();if(Graph.fileSupport){p.setAttribute("placeholder",
-mxResources.get("dragImagesHere"));var L=l.parentNode,u=null;mxEvent.addListener(L,"dragleave",function(E){null!=u&&(u.parentNode.removeChild(u),u=null);E.stopPropagation();E.preventDefault()});mxEvent.addListener(L,"dragover",mxUtils.bind(this,function(E){null==u&&(!mxClient.IS_IE||10<document.documentMode)&&(u=b.highlightElement(L));E.stopPropagation();E.preventDefault()}));mxEvent.addListener(L,"drop",mxUtils.bind(this,function(E){null!=u&&(u.parentNode.removeChild(u),u=null);if(0<E.dataTransfer.files.length)b.importFiles(E.dataTransfer.files,
-0,0,b.maxImageSize,function(D,G,N,I,F,H,R,X){A(D,X)},function(){},function(D){return"image/"==D.type.substring(0,6)},function(D){for(var G=0;G<D.length;G++)D[G]()},!mxEvent.isControlDown(E),null,null,!0);else if(0<=mxUtils.indexOf(E.dataTransfer.types,"text/uri-list")){var B=E.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(B)&&A(decodeURIComponent(B))}E.stopPropagation();E.preventDefault()}),!1)}};d=document.createElement("div");d.style.marginTop="14px";d.style.textAlign=
-"center";f=mxUtils.button(mxResources.get("cancel"),function(){b.spinner.stop();b.hideDialog()});f.className="geBtn";b.editor.cancelFirst&&d.appendChild(f);ImageDialog.filePicked=function(L){L.action==google.picker.Action.PICKED&&null!=L.docs[0].thumbnails&&(L=L.docs[0].thumbnails[L.docs[0].thumbnails.length-1],null!=L&&(p.value=L.url));p.focus()};if(Graph.fileSupport){if(null==b.imgDlgFileInputElt){var K=document.createElement("input");K.setAttribute("multiple","multiple");K.setAttribute("type",
-"file");mxEvent.addListener(K,"change",function(L){null!=K.files&&(b.importFiles(K.files,0,0,b.maxImageSize,function(u,E,B,D,G,N){A(u)},function(){},function(u){return"image/"==u.type.substring(0,6)},function(u){for(var E=0;E<u.length;E++)u[E]()},!0),K.type="",K.type="file",K.value="")});K.style.display="none";document.body.appendChild(K);b.imgDlgFileInputElt=K}e=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});e.className="geBtn";d.appendChild(e)}mxEvent.addListener(p,
-"keypress",function(L){13==L.keyCode&&A(p.value)});var O=mxUtils.button(mxResources.get("crop"),function(){var L=new CropImageDialog(b,p.value,q,function(u,E,B){q=u;x=E;y=B});b.showDialog(L.container,300,390,!0,!0)});v&&(O.className="geBtn",d.appendChild(O));mxEvent.addListener(p,"change",function(L){q=null;g()});g();v=mxUtils.button(mxResources.get("apply"),function(){A(p.value)});v.className="geBtn gePrimaryBtn";d.appendChild(v);b.editor.cancelFirst||d.appendChild(f);Graph.fileSupport&&(d.style.marginTop=
-"120px",l.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",l.style.backgroundPosition="center 65%",l.style.backgroundRepeat="no-repeat",v=document.createElement("div"),v.style.position="absolute",v.style.width="420px",v.style.top="58%",v.style.textAlign="center",v.style.fontSize="18px",v.style.color="#a0c3ff",mxUtils.write(v,mxResources.get("dragImagesHere")),l.appendChild(v));l.appendChild(d);this.container=l},LinkDialog=function(b,e,f,c,m,n,v){function d(L,u,E){E=mxUtils.button("",E);
-E.className="geBtn";E.setAttribute("title",u);u=document.createElement("img");u.style.height="26px";u.style.width="26px";u.setAttribute("src",L);E.style.minWidth="42px";E.style.verticalAlign="middle";E.appendChild(u);O.appendChild(E)}var g=document.createElement("div");g.style.height="100%";mxUtils.write(g,mxResources.get("editLink")+":");var k=document.createElement("div");k.className="geTitle";k.style.backgroundColor="transparent";k.style.borderColor="transparent";k.style.whiteSpace="nowrap";k.style.textOverflow=
+e.appendChild(p);e.appendChild(f);l.appendChild(e);var q=d,x,y,z=function(K,u,E,B){var D="data:"==K.substring(0,5);!b.isOffline()||D&&"undefined"===typeof chrome?0<K.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(K,function(G){b.spinner.stop();b.hideDialog();var H=!1===B?1:null!=u&&null!=E?Math.max(u/G.width,E/G.height):Math.min(1,Math.min(520/G.width,520/G.height));n&&(K=b.convertDataUri(K));c(K,Math.round(Number(G.width)*H),Math.round(Number(G.height)*H),q,x,y)},
+function(){b.spinner.stop();c(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),c(K,null,null,q,x,y)):(K=b.convertDataUri(K),u=null==u?120:u,E=null==E?100:E,b.hideDialog(),c(K,u,E,q,x,y))},A=function(K,u){if(null!=K){var E=m?null:k.getModel().getGeometry(k.getSelectionCell());null!=E?z(K,E.width,E.height,u):z(K,null,null,u)}else b.hideDialog(),c(null)};this.init=function(){p.focus();if(Graph.fileSupport){p.setAttribute("placeholder",
+mxResources.get("dragImagesHere"));var K=l.parentNode,u=null;mxEvent.addListener(K,"dragleave",function(E){null!=u&&(u.parentNode.removeChild(u),u=null);E.stopPropagation();E.preventDefault()});mxEvent.addListener(K,"dragover",mxUtils.bind(this,function(E){null==u&&(!mxClient.IS_IE||10<document.documentMode)&&(u=b.highlightElement(K));E.stopPropagation();E.preventDefault()}));mxEvent.addListener(K,"drop",mxUtils.bind(this,function(E){null!=u&&(u.parentNode.removeChild(u),u=null);if(0<E.dataTransfer.files.length)b.importFiles(E.dataTransfer.files,
+0,0,b.maxImageSize,function(D,G,H,N,F,I,Q,X){A(D,X)},function(){},function(D){return"image/"==D.type.substring(0,6)},function(D){for(var G=0;G<D.length;G++)D[G]()},!mxEvent.isControlDown(E),null,null,!0);else if(0<=mxUtils.indexOf(E.dataTransfer.types,"text/uri-list")){var B=E.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(B)&&A(decodeURIComponent(B))}E.stopPropagation();E.preventDefault()}),!1)}};d=document.createElement("div");d.style.marginTop="14px";d.style.textAlign=
+"center";f=mxUtils.button(mxResources.get("cancel"),function(){b.spinner.stop();b.hideDialog()});f.className="geBtn";b.editor.cancelFirst&&d.appendChild(f);ImageDialog.filePicked=function(K){K.action==google.picker.Action.PICKED&&null!=K.docs[0].thumbnails&&(K=K.docs[0].thumbnails[K.docs[0].thumbnails.length-1],null!=K&&(p.value=K.url));p.focus()};if(Graph.fileSupport){if(null==b.imgDlgFileInputElt){var J=document.createElement("input");J.setAttribute("multiple","multiple");J.setAttribute("type",
+"file");mxEvent.addListener(J,"change",function(K){null!=J.files&&(b.importFiles(J.files,0,0,b.maxImageSize,function(u,E,B,D,G,H){A(u)},function(){},function(u){return"image/"==u.type.substring(0,6)},function(u){for(var E=0;E<u.length;E++)u[E]()},!0),J.type="",J.type="file",J.value="")});J.style.display="none";document.body.appendChild(J);b.imgDlgFileInputElt=J}e=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});e.className="geBtn";d.appendChild(e)}mxEvent.addListener(p,
+"keypress",function(K){13==K.keyCode&&A(p.value)});var O=mxUtils.button(mxResources.get("crop"),function(){var K=new CropImageDialog(b,p.value,q,function(u,E,B){q=u;x=E;y=B});b.showDialog(K.container,300,390,!0,!0)});v&&(O.className="geBtn",d.appendChild(O));mxEvent.addListener(p,"change",function(K){q=null;g()});g();v=mxUtils.button(mxResources.get("apply"),function(){A(p.value)});v.className="geBtn gePrimaryBtn";d.appendChild(v);b.editor.cancelFirst||d.appendChild(f);Graph.fileSupport&&(d.style.marginTop=
+"120px",l.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",l.style.backgroundPosition="center 65%",l.style.backgroundRepeat="no-repeat",v=document.createElement("div"),v.style.position="absolute",v.style.width="420px",v.style.top="58%",v.style.textAlign="center",v.style.fontSize="18px",v.style.color="#a0c3ff",mxUtils.write(v,mxResources.get("dragImagesHere")),l.appendChild(v));l.appendChild(d);this.container=l},LinkDialog=function(b,e,f,c,m,n,v){function d(K,u,E){E=mxUtils.button("",E);
+E.className="geBtn";E.setAttribute("title",u);u=document.createElement("img");u.style.height="26px";u.style.width="26px";u.setAttribute("src",K);E.style.minWidth="42px";E.style.verticalAlign="middle";E.appendChild(u);O.appendChild(E)}var g=document.createElement("div");g.style.height="100%";mxUtils.write(g,mxResources.get("editLink")+":");var k=document.createElement("div");k.className="geTitle";k.style.backgroundColor="transparent";k.style.borderColor="transparent";k.style.whiteSpace="nowrap";k.style.textOverflow=
"clip";k.style.cursor="default";k.style.paddingRight="20px";var l=document.createElement("input");l.setAttribute("placeholder",mxResources.get("dragUrlsHere"));l.setAttribute("type","text");l.style.marginTop="6px";l.style.width="97%";l.style.boxSizing="border-box";l.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";l.style.backgroundRepeat="no-repeat";l.style.backgroundPosition="100% 50%";l.style.paddingRight="14px";l.style.marginBottom="4px";var p=document.createElement("div");p.setAttribute("title",
mxResources.get("reset"));p.style.position="relative";p.style.left="-16px";p.style.width="12px";p.style.height="14px";p.style.cursor="pointer";p.style.display="inline-block";p.style.top="3px";p.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(p,"click",function(){l.value="";l.focus()});var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value","url");q.setAttribute("type","radio");q.setAttribute("name","geLinkDialogOption");
var x=document.createElement("input");x.style.cssText="margin-right:8px;margin-bottom:8px;";x.setAttribute("value","url");x.setAttribute("type","radio");x.setAttribute("name","geLinkDialogOption");var y=document.createElement("select");y.style.width="520px";var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.margin="0 6p 0 6px";null!=v&&(z.setAttribute("checked","checked"),z.defaultChecked=!0);v=null!=v?v:"_blank";z.setAttribute("title",v);n&&(l.style.width="340px");if(m&&
null!=b.pages){null!=e&&Graph.isPageLink(e)?(x.setAttribute("checked","checked"),x.defaultChecked=!0):(l.setAttribute("value",e),q.setAttribute("checked","checked"),q.defaultChecked=!0);k.appendChild(q);k.appendChild(l);k.appendChild(p);n&&(k.appendChild(z),mxUtils.write(k,mxResources.get("openInNewWindow")));mxUtils.br(k);k.appendChild(x);m=!1;for(n=0;n<b.pages.length;n++)p=document.createElement("option"),mxUtils.write(p,b.pages[n].getName()||mxResources.get("pageWithNumber",[n+1])),p.setAttribute("value",
"data:page/id,"+b.pages[n].getId()),e==p.getAttribute("value")&&(p.setAttribute("selected","selected"),m=!0),y.appendChild(p);if(!m&&x.checked){var A=document.createElement("option");mxUtils.write(A,mxResources.get("pageNotFound"));A.setAttribute("disabled","disabled");A.setAttribute("selected","selected");A.setAttribute("value","pageNotFound");y.appendChild(A);mxEvent.addListener(y,"change",function(){null==A.parentNode||A.selected||A.parentNode.removeChild(A)})}k.appendChild(y)}else l.setAttribute("value",
-e),k.appendChild(l),k.appendChild(p);g.appendChild(k);var K=mxUtils.button(f,function(){b.hideDialog();c(x.checked?"pageNotFound"!==y.value?y.value:e:l.value,LinkDialog.selectedDocs,z.checked?v:null)});K.style.verticalAlign="middle";K.className="geBtn gePrimaryBtn";this.init=function(){x.checked?y.focus():(l.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?l.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(y,"focus",function(){q.removeAttribute("checked");x.setAttribute("checked",
-"checked");x.checked=!0});mxEvent.addListener(l,"focus",function(){x.removeAttribute("checked");q.setAttribute("checked","checked");q.checked=!0});if(Graph.fileSupport){var L=g.parentNode,u=null;mxEvent.addListener(L,"dragleave",function(E){null!=u&&(u.parentNode.removeChild(u),u=null);E.stopPropagation();E.preventDefault()});mxEvent.addListener(L,"dragover",mxUtils.bind(this,function(E){null==u&&(!mxClient.IS_IE||10<document.documentMode)&&(u=b.highlightElement(L));E.stopPropagation();E.preventDefault()}));
-mxEvent.addListener(L,"drop",mxUtils.bind(this,function(E){null!=u&&(u.parentNode.removeChild(u),u=null);0<=mxUtils.indexOf(E.dataTransfer.types,"text/uri-list")&&(l.value=decodeURIComponent(E.dataTransfer.getData("text/uri-list")),q.setAttribute("checked","checked"),q.checked=!0,K.click());E.stopPropagation();E.preventDefault()}),!1)}};var O=document.createElement("div");O.style.marginTop="18px";O.style.textAlign="center";f=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/custom-links")});
-f.style.verticalAlign="middle";f.className="geBtn";O.appendChild(f);b.isOffline()&&!mxClient.IS_CHROMEAPP&&(f.style.display="none");f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});f.style.verticalAlign="middle";f.className="geBtn";b.editor.cancelFirst&&O.appendChild(f);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(L){if(L.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=L.docs;var u=L.docs[0].url;"application/mxe"==L.docs[0].mimeType||null!=L.docs[0].mimeType&&
-"application/vnd.jgraph."==L.docs[0].mimeType.substring(0,23)?u="https://www.draw.io/#G"+L.docs[0].id:"application/vnd.google-apps.folder"==L.docs[0].mimeType&&(u="https://drive.google.com/#folders/"+L.docs[0].id);l.value=u;l.focus()}else LinkDialog.selectedDocs=null;l.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=b.drive&&d(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googlePlus"),function(){b.spinner.spin(document.body,mxResources.get("authorizing"))&&b.drive.checkToken(mxUtils.bind(this,
-function(){b.spinner.stop();if(null==b.linkPicker){var L=b.drive.createLinkPicker();b.linkPicker=L.setCallback(function(u){LinkDialog.filePicked(u)}).build()}b.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&d(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(L){l.value=L[0].link;l.focus()}})});null!=b.oneDrive&&d(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),
-function(){b.oneDrive.pickFile(function(L,u){l.value=u.value[0].webUrl;l.focus()},!0)});null!=b.gitHub&&d(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){b.gitHub.pickFile(function(L){if(null!=L){L=L.split("/");var u=L[0],E=L[1],B=L[2];L=L.slice(3,L.length).join("/");l.value="https://github.com/"+u+"/"+E+"/blob/"+B+"/"+L;l.focus()}})});null!=b.gitLab&&d(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),function(){b.gitLab.pickFile(function(L){if(null!=L){L=L.split("/");var u=
-L[0],E=L[1],B=L[2];L=L.slice(3,L.length).join("/");l.value=DRAWIO_GITLAB_URL+"/"+u+"/"+E+"/blob/"+B+"/"+L;l.focus()}})});mxEvent.addListener(l,"keypress",function(L){13==L.keyCode&&(b.hideDialog(),c(x.checked?y.value:l.value,LinkDialog.selectedDocs))});O.appendChild(K);b.editor.cancelFirst||O.appendChild(f);g.appendChild(O);this.container=g},FeedbackDialog=function(b,e,f,c){var m=document.createElement("div"),n=document.createElement("div");mxUtils.write(n,mxResources.get("sendYourFeedback"));n.style.fontSize=
+e),k.appendChild(l),k.appendChild(p);g.appendChild(k);var J=mxUtils.button(f,function(){b.hideDialog();c(x.checked?"pageNotFound"!==y.value?y.value:e:l.value,LinkDialog.selectedDocs,z.checked?v:null)});J.style.verticalAlign="middle";J.className="geBtn gePrimaryBtn";this.init=function(){x.checked?y.focus():(l.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?l.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(y,"focus",function(){q.removeAttribute("checked");x.setAttribute("checked",
+"checked");x.checked=!0});mxEvent.addListener(l,"focus",function(){x.removeAttribute("checked");q.setAttribute("checked","checked");q.checked=!0});if(Graph.fileSupport){var K=g.parentNode,u=null;mxEvent.addListener(K,"dragleave",function(E){null!=u&&(u.parentNode.removeChild(u),u=null);E.stopPropagation();E.preventDefault()});mxEvent.addListener(K,"dragover",mxUtils.bind(this,function(E){null==u&&(!mxClient.IS_IE||10<document.documentMode)&&(u=b.highlightElement(K));E.stopPropagation();E.preventDefault()}));
+mxEvent.addListener(K,"drop",mxUtils.bind(this,function(E){null!=u&&(u.parentNode.removeChild(u),u=null);0<=mxUtils.indexOf(E.dataTransfer.types,"text/uri-list")&&(l.value=decodeURIComponent(E.dataTransfer.getData("text/uri-list")),q.setAttribute("checked","checked"),q.checked=!0,J.click());E.stopPropagation();E.preventDefault()}),!1)}};var O=document.createElement("div");O.style.marginTop="18px";O.style.textAlign="center";f=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/custom-links")});
+f.style.verticalAlign="middle";f.className="geBtn";O.appendChild(f);b.isOffline()&&!mxClient.IS_CHROMEAPP&&(f.style.display="none");f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});f.style.verticalAlign="middle";f.className="geBtn";b.editor.cancelFirst&&O.appendChild(f);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(K){if(K.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=K.docs;var u=K.docs[0].url;"application/mxe"==K.docs[0].mimeType||null!=K.docs[0].mimeType&&
+"application/vnd.jgraph."==K.docs[0].mimeType.substring(0,23)?u="https://www.draw.io/#G"+K.docs[0].id:"application/vnd.google-apps.folder"==K.docs[0].mimeType&&(u="https://drive.google.com/#folders/"+K.docs[0].id);l.value=u;l.focus()}else LinkDialog.selectedDocs=null;l.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=b.drive&&d(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googlePlus"),function(){b.spinner.spin(document.body,mxResources.get("authorizing"))&&b.drive.checkToken(mxUtils.bind(this,
+function(){b.spinner.stop();if(null==b.linkPicker){var K=b.drive.createLinkPicker();b.linkPicker=K.setCallback(function(u){LinkDialog.filePicked(u)}).build()}b.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&d(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(K){l.value=K[0].link;l.focus()}})});null!=b.oneDrive&&d(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),
+function(){b.oneDrive.pickFile(function(K,u){l.value=u.value[0].webUrl;l.focus()},!0)});null!=b.gitHub&&d(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){b.gitHub.pickFile(function(K){if(null!=K){K=K.split("/");var u=K[0],E=K[1],B=K[2];K=K.slice(3,K.length).join("/");l.value="https://github.com/"+u+"/"+E+"/blob/"+B+"/"+K;l.focus()}})});null!=b.gitLab&&d(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),function(){b.gitLab.pickFile(function(K){if(null!=K){K=K.split("/");var u=
+K[0],E=K[1],B=K[2];K=K.slice(3,K.length).join("/");l.value=DRAWIO_GITLAB_URL+"/"+u+"/"+E+"/blob/"+B+"/"+K;l.focus()}})});mxEvent.addListener(l,"keypress",function(K){13==K.keyCode&&(b.hideDialog(),c(x.checked?y.value:l.value,LinkDialog.selectedDocs))});O.appendChild(J);b.editor.cancelFirst||O.appendChild(f);g.appendChild(O);this.container=g},FeedbackDialog=function(b,e,f,c){var m=document.createElement("div"),n=document.createElement("div");mxUtils.write(n,mxResources.get("sendYourFeedback"));n.style.fontSize=
"18px";n.style.marginBottom="18px";m.appendChild(n);n=document.createElement("div");mxUtils.write(n,mxResources.get("yourEmailAddress")+(f?"":" ("+mxResources.get("required")+")"));m.appendChild(n);var v=document.createElement("input");v.setAttribute("type","text");v.style.marginTop="6px";v.style.width="600px";var d=mxUtils.button(mxResources.get("sendMessage"),function(){var p=l.value+(k.checked?"\nDiagram:\n"+(null!=c?c:mxUtils.getXml(b.getXmlFileData())):"")+"\nuserAgent:\n"+navigator.userAgent+
"\nappVersion:\n"+navigator.appVersion+"\nappName:\n"+navigator.appName+"\nplatform:\n"+navigator.platform;p.length>FeedbackDialog.maxAttachmentSize?b.alert(mxResources.get("drawingTooLarge")):(b.hideDialog(),b.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(v.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent((null!=e?e:"Feedback")+
":\n"+p),function(q){b.spinner.stop();200<=q.getStatus()&&299>=q.getStatus()?b.alert(mxResources.get("feedbackSent")):b.alert(mxResources.get("errorSendingFeedback"))},function(){b.spinner.stop();b.alert(mxResources.get("errorSendingFeedback"))}))});d.className="geBtn gePrimaryBtn";if(!f){d.setAttribute("disabled","disabled");var g=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;mxEvent.addListener(v,
@@ -11215,181 +11215,177 @@ f.appendChild(k);n=document.createElement("span");mxUtils.write(n," "+mxResource
m.appendChild(l);f=document.createElement("div");f.style.marginTop="26px";f.style.textAlign="right";n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});n.className="geBtn";b.editor.cancelFirst?(f.appendChild(n),f.appendChild(d)):(f.appendChild(d),f.appendChild(n));m.appendChild(f);this.container=m};FeedbackDialog.maxAttachmentSize=1E6;
var RevisionDialog=function(b,e,f){var c=document.createElement("div"),m=document.createElement("h3");m.style.marginTop="0px";mxUtils.write(m,mxResources.get("revisionHistory"));c.appendChild(m);m=document.createElement("div");m.style.position="absolute";m.style.overflow="auto";m.style.width="170px";m.style.height="378px";c.appendChild(m);var n=document.createElement("div");n.style.position="absolute";n.style.border="1px solid lightGray";n.style.left="199px";n.style.width="470px";n.style.height="376px";
n.style.overflow="hidden";var v=document.createElement("div");v.style.cssText="position:absolute;left:0;right:0;top:0;bottom:20px;text-align:center;transform:translate(0,50%);pointer-events:none;";n.appendChild(v);mxEvent.disableContextMenu(n);c.appendChild(n);var d=new Graph(n);d.setTooltips(!1);d.setEnabled(!1);d.setPanning(!0);d.panningHandler.ignoreCell=!0;d.panningHandler.useLeftButtonForPanning=!0;d.minFitScale=null;d.maxFitScale=null;d.centerZoom=!0;var g=0,k=null,l=0,p=d.getGlobalVariable;
-d.getGlobalVariable=function(T){return"page"==T&&null!=k&&null!=k[l]?k[l].getAttribute("name"):"pagenumber"==T?l+1:"pagecount"==T?null!=k?k.length:1:p.apply(this,arguments)};d.getLinkForCell=function(){return null};Editor.MathJaxRender&&d.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(T,Y){b.editor.graph.mathEnabled&&Editor.MathJaxRender(d.container)}));var q={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%"},x=new Spinner(q),y=b.getCurrentFile(),z=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),A={};for(q=0;q<z.length;q++)A[z[q].getAttribute("id")]=z[q];var K=null,O=null,L=null,u=null,E=mxUtils.button("",function(){null!=L&&d.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 B=mxUtils.button("",function(){null!=L&&d.zoomOut()});B.className="geSprite geSprite-zoomout";B.setAttribute("title",mxResources.get("zoomOut"));B.style.outline="none";B.style.border="none";B.style.margin="2px";B.setAttribute("disabled","disabled");mxUtils.setOpacity(B,20);var D=mxUtils.button("",function(){null!=L&&(d.maxFitScale=8,d.fit(8),d.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 G=mxUtils.button("",function(){null!=L&&(d.zoomActual(),d.center())});G.className="geSprite geSprite-actualsize";G.setAttribute("title",mxResources.get("actualSize"));G.style.outline="none";G.style.border="none";G.style.margin="2px";G.setAttribute("disabled","disabled");mxUtils.setOpacity(G,20);var N=mxUtils.button("",function(){});N.className="geSprite geSprite-middle";N.setAttribute("title",mxResources.get("compare"));
-N.style.outline="none";N.style.border="none";N.style.margin="2px";mxUtils.setOpacity(N,60);var I=n.cloneNode(!1);I.style.pointerEvent="none";n.parentNode.appendChild(I);var F=new Graph(I);F.setTooltips(!1);F.setEnabled(!1);F.setPanning(!0);F.panningHandler.ignoreCell=!0;F.panningHandler.useLeftButtonForPanning=!0;F.minFitScale=null;F.maxFitScale=null;F.centerZoom=!0;mxEvent.addGestureListeners(N,function(T){T=A[k[g].getAttribute("id")];mxUtils.setOpacity(N,20);v.innerText="";null==T?mxUtils.write(v,
-mxResources.get("pageNotFound")):(H.style.display="none",n.style.display="none",I.style.display="",I.style.backgroundColor=n.style.backgroundColor,T=Editor.parseDiagramNode(T),(new mxCodec(T.ownerDocument)).decode(T,F.getModel()),F.view.scaleAndTranslate(d.view.scale,d.view.translate.x,d.view.translate.y))},null,function(){mxUtils.setOpacity(N,60);v.innerText="";"none"==n.style.display&&(H.style.display="",n.style.display="",I.style.display="none")});var H=document.createElement("div");H.style.position=
-"absolute";H.style.textAlign="right";H.style.color="gray";H.style.marginTop="10px";H.style.backgroundColor="transparent";H.style.top="440px";H.style.right="32px";H.style.maxWidth="380px";H.style.cursor="default";var R=mxUtils.button(mxResources.get("download"),function(){if(null!=L){var T=mxUtils.getXml(L.documentElement),Y=b.getBaseFilename()+".drawio";b.isLocalFileSave()?b.saveLocalFile(T,Y,"text/xml"):(T="undefined"===typeof pako?"&xml="+encodeURIComponent(T):"&data="+encodeURIComponent(Graph.compress(T)),
-(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(Y)+"&format=xml"+T)).simulate(document,"_blank"))}});R.className="geBtn";R.setAttribute("disabled","disabled");var X=mxUtils.button(mxResources.get("restore"),function(T){null!=L&&null!=u&&(mxEvent.isShiftDown(T)?null!=L&&(T=b.getPagesForNode(L.documentElement),T=b.diffPages(b.pages,T),T=new TextareaDialog(b,mxResources.get("compare"),JSON.stringify(T,null,2),function(Y){if(0<Y.length)try{b.confirm(mxResources.get("areYouSure"),function(){y.patch([JSON.parse(Y)],
-null,!0);b.hideDialog();b.hideDialog()})}catch(aa){b.handleError(aa)}},null,null,null,null,null,!0,null,mxResources.get("merge")),b.showDialog(T.container,620,460,!0,!0),T.init()):b.confirm(mxResources.get("areYouSure"),function(){null!=f?f(u):b.spinner.spin(document.body,mxResources.get("restoring"))&&y.save(!0,function(Y){b.spinner.stop();b.replaceFileData(u);b.hideDialog()},function(Y){b.spinner.stop();b.editor.setStatus("");b.handleError(Y,null!=Y?mxResources.get("errorSavingFile"):null)})}))});
-X.className="geBtn";X.setAttribute("disabled","disabled");X.setAttribute("title","Shift+Click for Diff");var J=document.createElement("select");J.setAttribute("disabled","disabled");J.style.maxWidth="80px";J.style.position="relative";J.style.top="-2px";J.style.verticalAlign="bottom";J.style.marginRight="6px";J.style.display="none";var W=null;mxEvent.addListener(J,"change",function(T){null!=W&&(W(T),mxEvent.consume(T))});var V=mxUtils.button(mxResources.get("edit"),function(){null!=L&&(window.openFile=
-new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(L.documentElement)),b.openLink(b.getUrl(),null,!0))});V.className="geBtn";V.setAttribute("disabled","disabled");null!=f&&(V.style.display="none");var t=mxUtils.button(mxResources.get("show"),function(){null!=O&&b.openLink(O.getUrl(J.selectedIndex))});t.className="geBtn gePrimaryBtn";t.setAttribute("disabled","disabled");null!=f&&(t.style.display="none",X.className="geBtn gePrimaryBtn");z=document.createElement("div");
-z.style.position="absolute";z.style.top="482px";z.style.width="640px";z.style.textAlign="right";var C=document.createElement("div");C.className="geToolbarContainer";C.style.backgroundColor="transparent";C.style.padding="2px";C.style.border="none";C.style.left="199px";C.style.top="442px";var M=null;if(null!=e&&0<e.length){n.style.cursor="move";var Q=document.createElement("table");Q.style.border="1px solid lightGray";Q.style.borderCollapse="collapse";Q.style.borderSpacing="0px";Q.style.width="100%";
-var P=document.createElement("tbody"),S=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(g=mxUtils.indexOf(b.pages,b.currentPage));for(q=e.length-1;0<=q;q--){var U=function(T){var Y=new Date(T.modifiedDate),aa=null;if(0<=Y.getTime()){var Z=function(ja){x.stop();v.innerText="";var ha=mxUtils.parseXml(ja),ba=b.editor.extractGraphModel(ha.documentElement,!0);if(null!=ba){var Aa=function(Ca){null!=Ca&&(Ca=Ga(Editor.parseDiagramNode(Ca)));return Ca},Ga=function(Ca){var Da=Ca.getAttribute("background");
-if(null==Da||""==Da||Da==mxConstants.NONE)Da=d.defaultPageBackgroundColor;n.style.backgroundColor=Da;(new mxCodec(Ca.ownerDocument)).decode(Ca,d.getModel());d.maxFitScale=1;d.fit(8);d.center();return Ca};J.style.display="none";J.innerText="";L=ha;u=ja;k=parseSelectFunction=null;l=0;if("mxfile"==ba.nodeName){ha=ba.getElementsByTagName("diagram");k=[];for(ja=0;ja<ha.length;ja++)k.push(ha[ja]);l=Math.min(g,k.length-1);0<k.length&&Aa(k[l]);if(1<k.length)for(J.removeAttribute("disabled"),J.style.display=
-"",ja=0;ja<k.length;ja++)ha=document.createElement("option"),mxUtils.write(ha,k[ja].getAttribute("name")||mxResources.get("pageWithNumber",[ja+1])),ha.setAttribute("value",ja),ja==l&&ha.setAttribute("selected","selected"),J.appendChild(ha);W=function(){try{var Ca=parseInt(J.value);l=g=Ca;Aa(k[Ca])}catch(Da){J.value=g,b.handleError(Da)}}}else Ga(ba);ja=T.lastModifyingUserName;null!=ja&&20<ja.length&&(ja=ja.substring(0,20)+"...");H.innerText="";mxUtils.write(H,(null!=ja?ja+" ":"")+Y.toLocaleDateString()+
-" "+Y.toLocaleTimeString());H.setAttribute("title",aa.getAttribute("title"));E.removeAttribute("disabled");B.removeAttribute("disabled");D.removeAttribute("disabled");G.removeAttribute("disabled");N.removeAttribute("disabled");null!=y&&y.isRestricted()||(b.editor.graph.isEnabled()&&X.removeAttribute("disabled"),R.removeAttribute("disabled"),t.removeAttribute("disabled"),V.removeAttribute("disabled"));mxUtils.setOpacity(E,60);mxUtils.setOpacity(B,60);mxUtils.setOpacity(D,60);mxUtils.setOpacity(G,60);
-mxUtils.setOpacity(N,60)}else J.style.display="none",J.innerText="",H.innerText="",mxUtils.write(H,mxResources.get("errorLoadingFile")),mxUtils.write(v,mxResources.get("errorLoadingFile"))};aa=document.createElement("tr");aa.style.borderBottom="1px solid lightGray";aa.style.fontSize="12px";aa.style.cursor="pointer";var da=document.createElement("td");da.style.padding="6px";da.style.whiteSpace="nowrap";T==e[e.length-1]?mxUtils.write(da,mxResources.get("current")):Y.toDateString()===S?mxUtils.write(da,
-Y.toLocaleTimeString()):mxUtils.write(da,Y.toLocaleDateString()+" "+Y.toLocaleTimeString());aa.appendChild(da);aa.setAttribute("title",Y.toLocaleDateString()+" "+Y.toLocaleTimeString()+(null!=T.fileSize?" "+b.formatFileSize(parseInt(T.fileSize)):"")+(null!=T.lastModifyingUserName?" "+T.lastModifyingUserName:""));mxEvent.addListener(aa,"click",function(ja){O!=T&&(x.stop(),null!=K&&(K.style.backgroundColor=""),O=T,K=aa,K.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9",u=L=null,H.removeAttribute("title"),
-H.innerHTML=mxUtils.htmlEntities(mxResources.get("loading")+"..."),n.style.backgroundColor=d.defaultPageBackgroundColor,v.innerText="",d.getModel().clear(),X.setAttribute("disabled","disabled"),R.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"),N.setAttribute("disabled","disabled"),V.setAttribute("disabled","disabled"),t.setAttribute("disabled","disabled"),J.setAttribute("disabled",
-"disabled"),mxUtils.setOpacity(E,20),mxUtils.setOpacity(B,20),mxUtils.setOpacity(D,20),mxUtils.setOpacity(G,20),mxUtils.setOpacity(N,20),x.spin(n),T.getXml(function(ha){if(O==T)try{Z(ha)}catch(ba){H.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+": "+ba.message)}},function(ha){x.stop();J.style.display="none";J.innerText="";H.innerText="";mxUtils.write(H,mxResources.get("errorLoadingFile"));mxUtils.write(v,mxResources.get("errorLoadingFile"))}),mxEvent.consume(ja))});mxEvent.addListener(aa,
-"dblclick",function(ja){t.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(ja)},!1);P.appendChild(aa)}return aa}(e[q]);null!=U&&q==e.length-1&&(M=U)}Q.appendChild(P);m.appendChild(Q)}else null==y||null==b.drive&&y.constructor==window.DriveFile||null==b.dropbox&&y.constructor==window.DropboxFile?(n.style.display="none",C.style.display="none",mxUtils.write(m,mxResources.get("notAvailable"))):(n.style.display="none",C.style.display=
-"none",mxUtils.write(m,mxResources.get("noRevisions")));this.init=function(){null!=M&&M.click()};m=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});m.className="geBtn";C.appendChild(J);C.appendChild(E);C.appendChild(B);C.appendChild(G);C.appendChild(D);C.appendChild(N);b.editor.cancelFirst?(z.appendChild(m),z.appendChild(R),z.appendChild(V),z.appendChild(X),z.appendChild(t)):(z.appendChild(R),z.appendChild(V),z.appendChild(X),z.appendChild(t),z.appendChild(m));c.appendChild(z);
-c.appendChild(C);c.appendChild(H);this.container=c},DraftDialog=function(b,e,f,c,m,n,v,d,g){var k=document.createElement("div"),l=document.createElement("div");l.style.marginTop="0px";l.style.whiteSpace="nowrap";l.style.overflow="auto";l.style.lineHeight="normal";mxUtils.write(l,e);k.appendChild(l);var p=document.createElement("select"),q=mxUtils.bind(this,function(){O=mxUtils.parseXml(g[p.value].data);L=b.editor.extractGraphModel(O.documentElement,!0);u=0;this.init()});if(null!=g){p.style.marginLeft=
+d.getGlobalVariable=function(V){return"page"==V&&null!=k&&null!=k[l]?k[l].getAttribute("name"):"pagenumber"==V?l+1:"pagecount"==V?null!=k?k.length:1:p.apply(this,arguments)};d.getLinkForCell=function(){return null};Editor.MathJaxRender&&d.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(V,Y){b.editor.graph.mathEnabled&&Editor.MathJaxRender(d.container)}));var q={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%"},x=new Spinner(q),y=b.getCurrentFile(),z=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),A={};for(q=0;q<z.length;q++)A[z[q].getAttribute("id")]=z[q];var J=null,O=null,K=null,u=null,E=mxUtils.button("",function(){null!=K&&d.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 B=mxUtils.button("",function(){null!=K&&d.zoomOut()});B.className="geSprite geSprite-zoomout";B.setAttribute("title",mxResources.get("zoomOut"));B.style.outline="none";B.style.border="none";B.style.margin="2px";B.setAttribute("disabled","disabled");mxUtils.setOpacity(B,20);var D=mxUtils.button("",function(){null!=K&&(d.maxFitScale=8,d.fit(8),d.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 G=mxUtils.button("",function(){null!=K&&(d.zoomActual(),d.center())});G.className="geSprite geSprite-actualsize";G.setAttribute("title",mxResources.get("actualSize"));G.style.outline="none";G.style.border="none";G.style.margin="2px";G.setAttribute("disabled","disabled");mxUtils.setOpacity(G,20);var H=mxUtils.button("",function(){});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 N=n.cloneNode(!1);N.style.pointerEvent="none";n.parentNode.appendChild(N);var F=new Graph(N);F.setTooltips(!1);F.setEnabled(!1);F.setPanning(!0);F.panningHandler.ignoreCell=!0;F.panningHandler.useLeftButtonForPanning=!0;F.minFitScale=null;F.maxFitScale=null;F.centerZoom=!0;mxEvent.addGestureListeners(H,function(V){V=A[k[g].getAttribute("id")];mxUtils.setOpacity(H,20);v.innerText="";null==V?mxUtils.write(v,
+mxResources.get("pageNotFound")):(I.style.display="none",n.style.display="none",N.style.display="",N.style.backgroundColor=n.style.backgroundColor,V=Editor.parseDiagramNode(V),(new mxCodec(V.ownerDocument)).decode(V,F.getModel()),F.view.scaleAndTranslate(d.view.scale,d.view.translate.x,d.view.translate.y))},null,function(){mxUtils.setOpacity(H,60);v.innerText="";"none"==n.style.display&&(I.style.display="",n.style.display="",N.style.display="none")});var I=document.createElement("div");I.style.position=
+"absolute";I.style.textAlign="right";I.style.color="gray";I.style.marginTop="10px";I.style.backgroundColor="transparent";I.style.top="440px";I.style.right="32px";I.style.maxWidth="380px";I.style.cursor="default";var Q=mxUtils.button(mxResources.get("download"),function(){if(null!=K){var V=mxUtils.getXml(K.documentElement),Y=b.getBaseFilename()+".drawio";b.isLocalFileSave()?b.saveLocalFile(V,Y,"text/xml"):(V="undefined"===typeof pako?"&xml="+encodeURIComponent(V):"&data="+encodeURIComponent(Graph.compress(V)),
+(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(Y)+"&format=xml"+V)).simulate(document,"_blank"))}});Q.className="geBtn";Q.setAttribute("disabled","disabled");var X=mxUtils.button(mxResources.get("restore"),function(V){null!=K&&null!=u&&(mxEvent.isShiftDown(V)?null!=K&&(V=b.getPagesForNode(K.documentElement),V=b.diffPages(b.pages,V),V=new TextareaDialog(b,mxResources.get("compare"),JSON.stringify(V,null,2),function(Y){if(0<Y.length)try{b.confirm(mxResources.get("areYouSure"),function(){y.patch([JSON.parse(Y)],
+null,!0);b.hideDialog();b.hideDialog()})}catch(ba){b.handleError(ba)}},null,null,null,null,null,!0,null,mxResources.get("merge")),b.showDialog(V.container,620,460,!0,!0),V.init()):b.confirm(mxResources.get("areYouSure"),function(){null!=f?f(u):b.spinner.spin(document.body,mxResources.get("restoring"))&&y.save(!0,function(Y){b.spinner.stop();b.replaceFileData(u);b.hideDialog()},function(Y){b.spinner.stop();b.editor.setStatus("");b.handleError(Y,null!=Y?mxResources.get("errorSavingFile"):null)})}))});
+X.className="geBtn";X.setAttribute("disabled","disabled");X.setAttribute("title","Shift+Click for Diff");var L=document.createElement("select");L.setAttribute("disabled","disabled");L.style.maxWidth="80px";L.style.position="relative";L.style.top="-2px";L.style.verticalAlign="bottom";L.style.marginRight="6px";L.style.display="none";var U=null;mxEvent.addListener(L,"change",function(V){null!=U&&(U(V),mxEvent.consume(V))});var W=mxUtils.button(mxResources.get("edit"),function(){null!=K&&(window.openFile=
+new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(K.documentElement)),b.openLink(b.getUrl(),null,!0))});W.className="geBtn";W.setAttribute("disabled","disabled");null!=f&&(W.style.display="none");var t=mxUtils.button(mxResources.get("show"),function(){null!=O&&b.openLink(O.getUrl(L.selectedIndex))});t.className="geBtn gePrimaryBtn";t.setAttribute("disabled","disabled");null!=f&&(t.style.display="none",X.className="geBtn gePrimaryBtn");z=document.createElement("div");
+z.style.position="absolute";z.style.top="482px";z.style.width="640px";z.style.textAlign="right";var C=document.createElement("div");C.className="geToolbarContainer";C.style.backgroundColor="transparent";C.style.padding="2px";C.style.border="none";C.style.left="199px";C.style.top="442px";var M=null;if(null!=e&&0<e.length){n.style.cursor="move";var S=document.createElement("table");S.style.border="1px solid lightGray";S.style.borderCollapse="collapse";S.style.borderSpacing="0px";S.style.width="100%";
+var P=document.createElement("tbody"),R=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(g=mxUtils.indexOf(b.pages,b.currentPage));for(q=e.length-1;0<=q;q--){var T=function(V){var Y=new Date(V.modifiedDate),ba=null;if(0<=Y.getTime()){var Z=function(ea){x.stop();v.innerText="";var ka=mxUtils.parseXml(ea),aa=b.editor.extractGraphModel(ka.documentElement,!0);if(null!=aa){var Ba=function(Ca){null!=Ca&&(Ca=Ea(Editor.parseDiagramNode(Ca)));return Ca},Ea=function(Ca){var Da=Ca.getAttribute("background");
+if(null==Da||""==Da||Da==mxConstants.NONE)Da=d.defaultPageBackgroundColor;n.style.backgroundColor=Da;(new mxCodec(Ca.ownerDocument)).decode(Ca,d.getModel());d.maxFitScale=1;d.fit(8);d.center();return Ca};L.style.display="none";L.innerText="";K=ka;u=ea;k=parseSelectFunction=null;l=0;if("mxfile"==aa.nodeName){ka=aa.getElementsByTagName("diagram");k=[];for(ea=0;ea<ka.length;ea++)k.push(ka[ea]);l=Math.min(g,k.length-1);0<k.length&&Ba(k[l]);if(1<k.length)for(L.removeAttribute("disabled"),L.style.display=
+"",ea=0;ea<k.length;ea++)ka=document.createElement("option"),mxUtils.write(ka,k[ea].getAttribute("name")||mxResources.get("pageWithNumber",[ea+1])),ka.setAttribute("value",ea),ea==l&&ka.setAttribute("selected","selected"),L.appendChild(ka);U=function(){try{var Ca=parseInt(L.value);l=g=Ca;Ba(k[Ca])}catch(Da){L.value=g,b.handleError(Da)}}}else Ea(aa);ea=V.lastModifyingUserName;null!=ea&&20<ea.length&&(ea=ea.substring(0,20)+"...");I.innerText="";mxUtils.write(I,(null!=ea?ea+" ":"")+Y.toLocaleDateString()+
+" "+Y.toLocaleTimeString());I.setAttribute("title",ba.getAttribute("title"));E.removeAttribute("disabled");B.removeAttribute("disabled");D.removeAttribute("disabled");G.removeAttribute("disabled");H.removeAttribute("disabled");null!=y&&y.isRestricted()||(b.editor.graph.isEnabled()&&X.removeAttribute("disabled"),Q.removeAttribute("disabled"),t.removeAttribute("disabled"),W.removeAttribute("disabled"));mxUtils.setOpacity(E,60);mxUtils.setOpacity(B,60);mxUtils.setOpacity(D,60);mxUtils.setOpacity(G,60);
+mxUtils.setOpacity(H,60)}else L.style.display="none",L.innerText="",I.innerText="",mxUtils.write(I,mxResources.get("errorLoadingFile")),mxUtils.write(v,mxResources.get("errorLoadingFile"))};ba=document.createElement("tr");ba.style.borderBottom="1px solid lightGray";ba.style.fontSize="12px";ba.style.cursor="pointer";var da=document.createElement("td");da.style.padding="6px";da.style.whiteSpace="nowrap";V==e[e.length-1]?mxUtils.write(da,mxResources.get("current")):Y.toDateString()===R?mxUtils.write(da,
+Y.toLocaleTimeString()):mxUtils.write(da,Y.toLocaleDateString()+" "+Y.toLocaleTimeString());ba.appendChild(da);ba.setAttribute("title",Y.toLocaleDateString()+" "+Y.toLocaleTimeString()+(null!=V.fileSize?" "+b.formatFileSize(parseInt(V.fileSize)):"")+(null!=V.lastModifyingUserName?" "+V.lastModifyingUserName:""));mxEvent.addListener(ba,"click",function(ea){O!=V&&(x.stop(),null!=J&&(J.style.backgroundColor=""),O=V,J=ba,J.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9",u=K=null,I.removeAttribute("title"),
+I.innerHTML=mxUtils.htmlEntities(mxResources.get("loading")+"..."),n.style.backgroundColor=d.defaultPageBackgroundColor,v.innerText="",d.getModel().clear(),X.setAttribute("disabled","disabled"),Q.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"),W.setAttribute("disabled","disabled"),t.setAttribute("disabled","disabled"),L.setAttribute("disabled",
+"disabled"),mxUtils.setOpacity(E,20),mxUtils.setOpacity(B,20),mxUtils.setOpacity(D,20),mxUtils.setOpacity(G,20),mxUtils.setOpacity(H,20),x.spin(n),V.getXml(function(ka){if(O==V)try{Z(ka)}catch(aa){I.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+": "+aa.message)}},function(ka){x.stop();L.style.display="none";L.innerText="";I.innerText="";mxUtils.write(I,mxResources.get("errorLoadingFile"));mxUtils.write(v,mxResources.get("errorLoadingFile"))}),mxEvent.consume(ea))});mxEvent.addListener(ba,
+"dblclick",function(ea){t.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(ea)},!1);P.appendChild(ba)}return ba}(e[q]);null!=T&&q==e.length-1&&(M=T)}S.appendChild(P);m.appendChild(S)}else null==y||null==b.drive&&y.constructor==window.DriveFile||null==b.dropbox&&y.constructor==window.DropboxFile?(n.style.display="none",C.style.display="none",mxUtils.write(m,mxResources.get("notAvailable"))):(n.style.display="none",C.style.display=
+"none",mxUtils.write(m,mxResources.get("noRevisions")));this.init=function(){null!=M&&M.click()};m=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});m.className="geBtn";C.appendChild(L);C.appendChild(E);C.appendChild(B);C.appendChild(G);C.appendChild(D);C.appendChild(H);b.editor.cancelFirst?(z.appendChild(m),z.appendChild(Q),z.appendChild(W),z.appendChild(X),z.appendChild(t)):(z.appendChild(Q),z.appendChild(W),z.appendChild(X),z.appendChild(t),z.appendChild(m));c.appendChild(z);
+c.appendChild(C);c.appendChild(I);this.container=c},DraftDialog=function(b,e,f,c,m,n,v,d,g){var k=document.createElement("div"),l=document.createElement("div");l.style.marginTop="0px";l.style.whiteSpace="nowrap";l.style.overflow="auto";l.style.lineHeight="normal";mxUtils.write(l,e);k.appendChild(l);var p=document.createElement("select"),q=mxUtils.bind(this,function(){O=mxUtils.parseXml(g[p.value].data);K=b.editor.extractGraphModel(O.documentElement,!0);u=0;this.init()});if(null!=g){p.style.marginLeft=
"4px";for(e=0;e<g.length;e++){var x=document.createElement("option");x.setAttribute("value",e);var y=new Date(g[e].created),z=new Date(g[e].modified);mxUtils.write(x,y.toLocaleDateString()+" "+y.toLocaleTimeString()+" - "+(y.toDateString(),z.toDateString(),z.toLocaleDateString())+" "+z.toLocaleTimeString());p.appendChild(x)}l.appendChild(p);mxEvent.addListener(p,"change",q)}null==f&&(f=g[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);k.appendChild(A);var K=new Graph(A);K.setEnabled(!1);K.setPanning(!0);K.panningHandler.ignoreCell=!0;K.panningHandler.useLeftButtonForPanning=!0;K.minFitScale=null;K.maxFitScale=null;K.centerZoom=!0;var O=mxUtils.parseXml(f),L=b.editor.extractGraphModel(O.documentElement,!0),u=0,E=null,B=K.getGlobalVariable;K.getGlobalVariable=function(G){return"page"==
-G&&null!=E&&null!=E[u]?E[u].getAttribute("name"):"pagenumber"==G?u+1:"pagecount"==G?null!=E?E.length:1:B.apply(this,arguments)};K.getLinkForCell=function(){return null};f=mxUtils.button("",function(){K.zoomIn()});f.className="geSprite geSprite-zoomin";f.setAttribute("title",mxResources.get("zoomIn"));f.style.outline="none";f.style.border="none";f.style.margin="2px";mxUtils.setOpacity(f,60);l=mxUtils.button("",function(){K.zoomOut()});l.className="geSprite geSprite-zoomout";l.setAttribute("title",
-mxResources.get("zoomOut"));l.style.outline="none";l.style.border="none";l.style.margin="2px";mxUtils.setOpacity(l,60);e=mxUtils.button("",function(){K.maxFitScale=8;K.fit(8);K.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);x=mxUtils.button("",function(){K.zoomActual();K.center()});x.className="geSprite geSprite-actualsize";x.setAttribute("title",mxResources.get("actualSize"));
+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);k.appendChild(A);var J=new Graph(A);J.setEnabled(!1);J.setPanning(!0);J.panningHandler.ignoreCell=!0;J.panningHandler.useLeftButtonForPanning=!0;J.minFitScale=null;J.maxFitScale=null;J.centerZoom=!0;var O=mxUtils.parseXml(f),K=b.editor.extractGraphModel(O.documentElement,!0),u=0,E=null,B=J.getGlobalVariable;J.getGlobalVariable=function(G){return"page"==
+G&&null!=E&&null!=E[u]?E[u].getAttribute("name"):"pagenumber"==G?u+1:"pagecount"==G?null!=E?E.length:1:B.apply(this,arguments)};J.getLinkForCell=function(){return null};f=mxUtils.button("",function(){J.zoomIn()});f.className="geSprite geSprite-zoomin";f.setAttribute("title",mxResources.get("zoomIn"));f.style.outline="none";f.style.border="none";f.style.margin="2px";mxUtils.setOpacity(f,60);l=mxUtils.button("",function(){J.zoomOut()});l.className="geSprite geSprite-zoomout";l.setAttribute("title",
+mxResources.get("zoomOut"));l.style.outline="none";l.style.border="none";l.style.margin="2px";mxUtils.setOpacity(l,60);e=mxUtils.button("",function(){J.maxFitScale=8;J.fit(8);J.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);x=mxUtils.button("",function(){J.zoomActual();J.center()});x.className="geSprite geSprite-actualsize";x.setAttribute("title",mxResources.get("actualSize"));
x.style.outline="none";x.style.border="none";x.style.margin="2px";mxUtils.setOpacity(x,60);v=mxUtils.button(v||mxResources.get("discard"),function(){m.apply(this,[p.value,mxUtils.bind(this,function(){null!=p.parentNode&&(p.options[p.selectedIndex].parentNode.removeChild(p.options[p.selectedIndex]),0<p.options.length?(p.value=p.options[0].value,q()):b.hideDialog(!0))})])});v.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";n=mxUtils.button(n||mxResources.get("edit"),function(){c.apply(this,[p.value])});n.className="geBtn gePrimaryBtn";y=document.createElement("div");y.style.position="absolute";y.style.bottom="30px";y.style.right="40px";y.style.textAlign="right";z=document.createElement("div");z.className="geToolbarContainer";z.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";
-this.init=function(){function G(H){if(null!=H){var R=H.getAttribute("background");if(null==R||""==R||R==mxConstants.NONE)R=Editor.isDarkMode()?"transparent":"#ffffff";A.style.backgroundColor=R;(new mxCodec(H.ownerDocument)).decode(H,K.getModel());K.maxFitScale=1;K.fit(8);K.center()}return H}function N(H){null!=H&&(H=G(Editor.parseDiagramNode(H)));return H}mxEvent.addListener(D,"change",function(H){u=parseInt(D.value);N(E[u]);mxEvent.consume(H)});if("mxfile"==L.nodeName){var I=L.getElementsByTagName("diagram");
-E=[];for(var F=0;F<I.length;F++)E.push(I[F]);0<E.length&&N(E[u]);D.innerText="";if(1<E.length)for(D.style.display="",F=0;F<E.length;F++)I=document.createElement("option"),mxUtils.write(I,E[F].getAttribute("name")||mxResources.get("pageWithNumber",[F+1])),I.setAttribute("value",F),F==u&&I.setAttribute("selected","selected"),D.appendChild(I);else D.style.display="none"}else G(L)};z.appendChild(D);z.appendChild(f);z.appendChild(l);z.appendChild(x);z.appendChild(e);f=mxUtils.button(mxResources.get("cancel"),
-function(){b.hideDialog(!0)});f.className="geBtn";d=null!=d?mxUtils.button(mxResources.get("ignore"),d):null;null!=d&&(d.className="geBtn");b.editor.cancelFirst?(y.appendChild(f),null!=d&&y.appendChild(d),y.appendChild(v),y.appendChild(n)):(y.appendChild(n),y.appendChild(v),null!=d&&y.appendChild(d),y.appendChild(f));k.appendChild(y);k.appendChild(z);this.container=k},FindWindow=function(b,e,f,c,m,n){function v(V,t,C,M){if("object"===typeof t.value&&null!=t.value.attributes){t=t.value.attributes;
-for(var Q=0;Q<t.length;Q++)if("label"!=t[Q].nodeName){var P=mxUtils.trim(t[Q].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==V&&(M&&0<=P.indexOf(C)||!M&&P.substring(0,C.length)===C)||null!=V&&V.test(P))return!0}}return!1}function d(){x&&E.value?(R.removeAttribute("disabled"),X.removeAttribute("disabled")):(R.setAttribute("disabled","disabled"),X.setAttribute("disabled","disabled"));E.value&&u.value?J.removeAttribute("disabled"):J.setAttribute("disabled","disabled")}function g(V,
-t,C){F.innerText="";var M=l.model.getDescendants(l.model.getRoot()),Q=u.value.toLowerCase(),P=B.checked?new RegExp(Q):null,S=null;z=null;p!=Q&&(p=Q,q=null,y=!1);var U=null==q;if(0<Q.length){if(y){y=!1;for(var T,Y=0;Y<b.pages.length;Y++)if(b.currentPage==b.pages[Y]){T=Y;break}V=(T+1)%b.pages.length;q=null;do y=!1,M=b.pages[V],l=b.createTemporaryGraph(l.getStylesheet()),b.updatePageRoot(M),l.model.setRoot(M.root),V=(V+1)%b.pages.length;while(!g(!0,t,C)&&V!=T);q&&(q=null,C?b.editor.graph.model.execute(new SelectPage(b,
-M)):b.selectPage(M));y=!1;l=b.editor.graph;return g(!0,t,C)}for(Y=0;Y<M.length;Y++){T=l.view.getState(M[Y]);t&&null!=P&&(U=U||T==q);if(null!=T&&null!=T.cell.value&&(U||null==S)&&(l.model.isVertex(T.cell)||l.model.isEdge(T.cell))){null!=T.style&&"1"==T.style.html?(G.innerHTML=l.sanitizeHtml(l.getLabel(T.cell)),label=mxUtils.extractTextWithWhitespace([G])):label=l.getLabel(T.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var aa=0;t&&n&&null!=P&&T==q&&(label=label.substr(A),
-aa=A);var Z=""==E.value,da=Z;if(null==P&&(da&&0<=label.indexOf(Q)||!da&&label.substring(0,Q.length)===Q||Z&&v(P,T.cell,Q,da))||null!=P&&(P.test(label)||Z&&v(P,T.cell,Q,da)))if(n&&(null!=P?(Z=label.match(P),null!=Z&&0<Z.length&&(z=Z[0].toLowerCase(),A=aa+Z.index+z.length)):(z=Q,A=z.length)),U){S=T;break}else null==S&&(S=T)}U=U||T==q}}if(null!=S){if(Y==M.length&&D.checked)return q=null,y=!0,g(!0,t,C);q=S;l.scrollCellToVisible(q.cell);l.isEnabled()&&!l.isCellLocked(q.cell)?C||l.getSelectionCell()==q.cell&&
-1==l.getSelectionCount()||l.setSelectionCell(q.cell):l.highlightCell(q.cell)}else{if(!V&&D.checked)return y=!0,g(!0,t,C);l.isEnabled()&&!C&&l.clearSelection()}x=null!=S;n&&!V&&d();return 0==Q.length||null!=S}var k=b.actions.get("findReplace"),l=b.editor.graph,p=null,q=null,x=!1,y=!1,z=null,A=0,K=1,O=document.createElement("div");O.style.userSelect="none";O.style.overflow="hidden";O.style.padding="10px";O.style.height="100%";var L=n?"260px":"200px",u=document.createElement("input");u.setAttribute("placeholder",
-mxResources.get("find"));u.setAttribute("type","text");u.style.marginTop="4px";u.style.marginBottom="6px";u.style.width=L;u.style.fontSize="12px";u.style.borderRadius="4px";u.style.padding="6px";O.appendChild(u);mxUtils.br(O);if(n){var 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=L;E.style.fontSize="12px";E.style.borderRadius="4px";E.style.padding="6px";
-O.appendChild(E);mxUtils.br(O);mxEvent.addListener(E,"input",d)}var B=document.createElement("input");B.setAttribute("id","geFindWinRegExChck");B.setAttribute("type","checkbox");B.style.marginRight="4px";O.appendChild(B);L=document.createElement("label");L.setAttribute("for","geFindWinRegExChck");O.appendChild(L);mxUtils.write(L,mxResources.get("regularExpression"));O.appendChild(L);L=b.menus.createHelpLink("https://www.diagrams.net/doc/faq/find-shapes");L.style.position="relative";L.style.marginLeft=
-"6px";L.style.top="-1px";O.appendChild(L);mxUtils.br(O);var D=document.createElement("input");D.setAttribute("id","geFindWinAllPagesChck");D.setAttribute("type","checkbox");D.style.marginRight="4px";O.appendChild(D);L=document.createElement("label");L.setAttribute("for","geFindWinAllPagesChck");O.appendChild(L);mxUtils.write(L,mxResources.get("allPages"));O.appendChild(L);var G=document.createElement("div");mxUtils.br(O);L=document.createElement("div");L.style.left="0px";L.style.right="0px";L.style.marginTop=
-"6px";L.style.padding="0 6px 0 6px";L.style.textAlign="center";O.appendChild(L);var N=mxUtils.button(mxResources.get("reset"),function(){F.innerText="";u.value="";u.style.backgroundColor="";n&&(E.value="",d());p=q=null;y=!1;u.focus()});N.setAttribute("title",mxResources.get("reset"));N.style.float="none";N.style.width="120px";N.style.marginTop="6px";N.style.marginLeft="8px";N.style.overflow="hidden";N.style.textOverflow="ellipsis";N.className="geBtn";n||L.appendChild(N);var I=mxUtils.button(mxResources.get("find"),
-function(){try{u.style.backgroundColor=g()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(V){b.handleError(V)}});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";L.appendChild(I);var F=document.createElement("div");F.style.marginTop="10px";if(n){var H=function(V,t,C,M,Q){if(null==Q||"1"!=Q.html)return M=V.toLowerCase().indexOf(t,
-M),0>M?V:V.substr(0,M)+C+V.substr(M+t.length);var P=V;t=mxUtils.htmlEntities(t);Q=[];var S=-1;for(V=V.replace(/<br>/ig,"\n");-1<(S=V.indexOf("<",S+1));)Q.push(S);S=V.match(/<[^>]*>/g);V=V.replace(/<[^>]*>/g,"");M=V.toLowerCase().indexOf(t,M);if(0>M)return P;P=M+t.length;C=mxUtils.htmlEntities(C);V=V.substr(0,M)+C+V.substr(P);for(var U=0,T=0;T<Q.length;T++){if(Q[T]-U<M)V=V.substr(0,Q[T])+S[T]+V.substr(Q[T]);else{var Y=Q[T]-U<P?M+U:Q[T]+(C.length-t.length);V=V.substr(0,Y)+S[T]+V.substr(Y)}U+=S[T].length}return V.replace(/\n/g,
-"<br>")},R=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=z&&null!=q&&E.value){var V=q.cell,t=l.getLabel(V);l.isCellEditable(V)&&l.model.setValue(V,H(t,z,E.value,A-z.length,l.getCurrentCellStyle(V)));u.style.backgroundColor=g(!1,!0)?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}}catch(C){b.handleError(C)}});R.setAttribute("title",mxResources.get("replFind"));R.style.float="none";R.style.width="120px";R.style.marginTop="6px";R.style.marginLeft="8px";R.style.overflow="hidden";R.style.textOverflow=
-"ellipsis";R.className="geBtn gePrimaryBtn";R.setAttribute("disabled","disabled");L.appendChild(R);mxUtils.br(L);var X=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=z&&null!=q&&E.value){var V=q.cell,t=l.getLabel(V);l.model.setValue(V,H(t,z,E.value,A-z.length,l.getCurrentCellStyle(V)));R.setAttribute("disabled","disabled");X.setAttribute("disabled","disabled")}}catch(C){b.handleError(C)}});X.setAttribute("title",mxResources.get("replace"));X.style.float="none";X.style.width="120px";
-X.style.marginTop="6px";X.style.marginLeft="8px";X.style.overflow="hidden";X.style.textOverflow="ellipsis";X.className="geBtn gePrimaryBtn";X.setAttribute("disabled","disabled");L.appendChild(X);var J=mxUtils.button(mxResources.get("replaceAll"),function(){F.innerText="";if(E.value){p=null;var V=b.currentPage,t=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;l.getModel().beginUpdate();try{for(var C=0,M={};g(!1,!0,!0)&&100>C;){var Q=q.cell,P=l.getLabel(Q),S=M[Q.id];if(S&&S.replAllMrk==
-K&&S.replAllPos>=A)break;M[Q.id]={replAllMrk:K,replAllPos:A};l.isCellEditable(Q)&&(l.model.setValue(Q,H(P,z,E.value,A-z.length,l.getCurrentCellStyle(Q))),C++)}V!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,V));mxUtils.write(F,mxResources.get("matchesRepl",[C]))}catch(U){b.handleError(U)}finally{l.getModel().endUpdate(),b.editor.graph.setSelectionCells(t),b.editor.graph.rendering=!0}K++}});J.setAttribute("title",mxResources.get("replaceAll"));J.style.float="none";J.style.width="120px";
-J.style.marginTop="6px";J.style.marginLeft="8px";J.style.overflow="hidden";J.style.textOverflow="ellipsis";J.className="geBtn gePrimaryBtn";J.setAttribute("disabled","disabled");L.appendChild(J);mxUtils.br(L);L.appendChild(N);N=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));N.setAttribute("title",mxResources.get("close"));N.style.float="none";N.style.width="120px";N.style.marginTop="6px";N.style.marginLeft="8px";N.style.overflow="hidden";N.style.textOverflow=
-"ellipsis";N.className="geBtn";L.appendChild(N);mxUtils.br(L);L.appendChild(F)}else N.style.width="90px",I.style.width="90px";mxEvent.addListener(u,"keyup",function(V){if(91==V.keyCode||93==V.keyCode||17==V.keyCode)mxEvent.consume(V);else if(27==V.keyCode)k.funct();else if(p!=u.value.toLowerCase()||13==V.keyCode)try{u.style.backgroundColor=g()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(t){u.style.backgroundColor=Editor.isDarkMode()?"#ff0000":"#ffcfcf"}});mxEvent.addListener(O,"keydown",function(V){70==
-V.keyCode&&b.keyHandler.isControlDown(V)&&!mxEvent.isShiftDown(V)&&(k.funct(),mxEvent.consume(V))});this.window=new mxWindow(mxResources.get("find")+(n?"/"+mxResources.get("replace"):""),O,e,f,c,m,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit();this.window.isVisible()?(u.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?u.select():
-document.execCommand("selectAll",!1,null),null!=b.pages&&1<b.pages.length?D.removeAttribute("disabled"):(D.checked=!1,D.setAttribute("disabled","disabled"))):l.container.focus()}));this.window.setLocation=function(V,t){var C=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;V=Math.max(0,Math.min(V,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));t=Math.max(0,Math.min(t,C-this.table.clientHeight-("1"==
-urlParams.sketch?3:48)));this.getX()==V&&this.getY()==t||mxWindow.prototype.setLocation.apply(this,arguments)};var W=mxUtils.bind(this,function(){var V=this.window.getX(),t=this.window.getY();this.window.setLocation(V,t)});mxEvent.addListener(window,"resize",W);this.destroy=function(){mxEvent.removeListener(window,"resize",W);this.window.destroy()}},FreehandWindow=function(b,e,f,c,m,n){var v=b.editor.graph;b=document.createElement("div");b.style.textAlign="center";b.style.userSelect="none";b.style.overflow=
-"hidden";b.style.height="100%";if(n){var d=document.createElement("input");d.setAttribute("id","geFreehandBrush");d.setAttribute("type","checkbox");d.style.margin="10px 5px 0px 10px";d.style.float="left";b.appendChild(d);var g=document.createElement("label");g.setAttribute("for","geFreehandBrush");g.style.float="left";g.style.marginTop="10px";b.appendChild(g);mxUtils.write(g,mxResources.get("brush"));b.appendChild(g);mxUtils.br(b);var k=document.createElement("input");k.setAttribute("type","range");
-k.setAttribute("min","2");k.setAttribute("max","30");k.setAttribute("value",v.freehand.getBrushSize());k.style.width="90%";k.style.visibility="hidden";b.appendChild(k);mxUtils.br(b);mxEvent.addListener(d,"change",function(){v.freehand.setPerfectFreehandMode(this.checked);k.style.visibility=this.checked?"visible":"hidden"});mxEvent.addListener(k,"change",function(){v.freehand.setBrushSize(parseInt(this.value))})}var l=mxUtils.button(mxResources.get("startDrawing"),function(){v.freehand.isDrawing()?
-v.freehand.stopDrawing():v.freehand.startDrawing()});l.setAttribute("title",mxResources.get("startDrawing"));l.style.marginTop=n?"5px":"10px";l.style.width="90%";l.style.boxSizing="border-box";l.style.overflow="hidden";l.style.textOverflow="ellipsis";l.style.textAlign="center";l.className="geBtn gePrimaryBtn";b.appendChild(l);this.window=new mxWindow(mxResources.get("freehand"),b,e,f,c,m,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);
-v.addListener("freehandStateChanged",mxUtils.bind(this,function(){l.innerText="";mxUtils.write(l,mxResources.get(v.freehand.isDrawing()?"stopDrawing":"startDrawing"));l.setAttribute("title",mxResources.get(v.freehand.isDrawing()?"stopDrawing":"startDrawing"));l.className="geBtn"+(v.freehand.isDrawing()?"":" gePrimaryBtn")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){v.freehand.isDrawing()&&v.freehand.stopDrawing()}));
-this.window.setLocation=function(q,x){var y=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;q=Math.max(0,Math.min(q,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));x=Math.max(0,Math.min(x,y-this.table.clientHeight-("1"==urlParams.sketch?3:48)));this.getX()==q&&this.getY()==x||mxWindow.prototype.setLocation.apply(this,arguments)};var p=mxUtils.bind(this,function(){var q=this.window.getX(),x=this.window.getY();
-this.window.setLocation(q,x)});mxEvent.addListener(window,"resize",p);this.destroy=function(){mxEvent.removeListener(window,"resize",p);this.window.destroy()}},TagsWindow=function(b,e,f,c,m){var n=b.editor.graph,v=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(k,l){if(n.isEnabled()){var p=new FilenameDialog(b,"",mxResources.get("add"),function(q){b.hideDialog();if(null!=q&&0<q.length){q=q.split(" ");for(var x=[],y=0;y<q.length;y++){var z=
-mxUtils.trim(q[y]);""!=z&&0>mxUtils.indexOf(k,z)&&x.push(z)}0<x.length&&(n.isSelectionEmpty()?l(k.concat(x)):n.addTagsForCells(n.getSelectionCells(),x))}},mxResources.get("enterValue")+" ("+mxResources.get("tags")+")");b.showDialog(p.container,300,80,!0,!0);p.init()}}),d=v.div;this.window=new mxWindow(mxResources.get("tags"),d,e,f,c,m,!0,!0);this.window.minimumSize=new mxRectangle(0,0,212,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);
-this.window.addListener("show",mxUtils.bind(this,function(){v.refresh();this.window.fit()}));this.window.setLocation=function(k,l){var p=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;k=Math.max(0,Math.min(k,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));l=Math.max(0,Math.min(l,p-this.table.clientHeight-("1"==urlParams.sketch?3:48)));this.getX()==k&&this.getY()==l||mxWindow.prototype.setLocation.apply(this,
-arguments)};var g=mxUtils.bind(this,function(){var k=this.window.getX(),l=this.window.getY();this.window.setLocation(k,l)});mxEvent.addListener(window,"resize",g);this.destroy=function(){mxEvent.removeListener(window,"resize",g);this.window.destroy()}},AuthDialog=function(b,e,f,c){var m=document.createElement("div");m.style.textAlign="center";var n=document.createElement("p");n.style.fontSize="16pt";n.style.padding="0px";n.style.margin="0px";n.style.color="gray";mxUtils.write(n,mxResources.get("authorizationRequired"));
-var v="Unknown",d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.style.marginRight="10px";e==b.drive?(v=mxResources.get("googleDrive"),d.src=IMAGE_PATH+"/google-drive-logo-white.svg"):e==b.dropbox?(v=mxResources.get("dropbox"),d.src=IMAGE_PATH+"/dropbox-logo-white.svg"):e==b.oneDrive?(v=mxResources.get("oneDrive"),d.src=IMAGE_PATH+"/onedrive-logo-white.svg"):e==b.gitHub?(v=mxResources.get("github"),d.src=IMAGE_PATH+"/github-logo-white.svg"):e==b.gitLab?
-(v=mxResources.get("gitlab"),d.src=IMAGE_PATH+"/gitlab-logo.svg",d.style.width="32px"):e==b.trello&&(v=mxResources.get("trello"),d.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizeThisAppIn",[v]));var g=document.createElement("input");g.setAttribute("type","checkbox");v=mxUtils.button(mxResources.get("authorize"),function(){c(g.checked)});v.insertBefore(d,v.firstChild);v.style.marginTop="6px";v.className="geBigButton";v.style.fontSize=
-"18px";v.style.padding="14px";m.appendChild(n);m.appendChild(b);m.appendChild(v);f&&(f=document.createElement("p"),f.style.marginTop="20px",f.appendChild(g),n=document.createElement("span"),mxUtils.write(n," "+mxResources.get("rememberMe")),f.appendChild(n),m.appendChild(f),g.checked=!0,g.defaultChecked=!0,mxEvent.addListener(n,"click",function(k){g.checked=!g.checked;mxEvent.consume(k)}));this.container=m},MoreShapesDialog=function(b,e,f){f=null!=f?f:b.sidebar.entries;var c=document.createElement("div"),
-m=[];if(null!=b.sidebar.customEntries)for(var n=0;n<b.sidebar.customEntries.length;n++){for(var v=b.sidebar.customEntries[n],d={title:b.getResource(v.title),entries:[]},g=0;g<v.entries.length;g++){var k=v.entries[g];d.entries.push({id:k.id,title:b.getResource(k.title),desc:b.getResource(k.desc),image:k.preview})}m.push(d)}for(n=0;n<f.length;n++)if(null==b.sidebar.enabledLibraries)m.push(f[n]);else{d={title:f[n].title,entries:[]};for(g=0;g<f[n].entries.length;g++)0<=mxUtils.indexOf(b.sidebar.enabledLibraries,
-f[n].entries[g].id)&&d.entries.push(f[n].entries[g]);0<d.entries.length&&m.push(d)}f=m;if(e){n=mxUtils.bind(this,function(B){for(var D=0;D<B.length;D++)(function(G){var N=y.cloneNode(!1);N.style.fontWeight="bold";N.style.backgroundColor=Editor.isDarkMode()?"#505759":"#e5e5e5";N.style.padding="6px 0px 6px 20px";mxUtils.write(N,G.title);l.appendChild(N);for(var I=0;I<G.entries.length;I++)(function(F){var H=y.cloneNode(!1);H.style.cursor="pointer";H.style.padding="4px 0px 4px 20px";H.style.whiteSpace=
-"nowrap";H.style.overflow="hidden";H.style.textOverflow="ellipsis";H.setAttribute("title",F.title+" ("+F.id+")");var R=document.createElement("input");R.setAttribute("type","checkbox");R.checked=b.sidebar.isEntryVisible(F.id);R.defaultChecked=R.checked;H.appendChild(R);mxUtils.write(H," "+F.title);l.appendChild(H);var X=function(J){if(null==J||"INPUT"!=mxEvent.getSource(J).nodeName){p.style.textAlign="center";p.style.padding="0px";p.style.color="";p.innerText="";if(null!=F.desc){var W=document.createElement("pre");
-W.style.boxSizing="border-box";W.style.fontFamily="inherit";W.style.margin="20px";W.style.right="0px";W.style.textAlign="left";mxUtils.write(W,F.desc);p.appendChild(W)}null!=F.imageCallback?F.imageCallback(p):null!=F.image?p.innerHTML+='<img border="0" src="'+F.image+'"/>':null==F.desc&&(p.style.padding="20px",p.style.color="rgb(179, 179, 179)",mxUtils.write(p,mxResources.get("noPreview")));null!=q&&(q.style.backgroundColor="");q=H;q.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9";null!=
-J&&mxEvent.consume(J)}};mxEvent.addListener(H,"click",X);mxEvent.addListener(H,"dblclick",function(J){R.checked=!R.checked;mxEvent.consume(J)});x.push(function(){return R.checked?F.id:null});0==D&&0==I&&X()})(G.entries[I])})(B[D])});g=document.createElement("div");g.className="geDialogTitle";mxUtils.write(g,mxResources.get("shapes"));g.style.position="absolute";g.style.top="0px";g.style.left="0px";g.style.lineHeight="40px";g.style.height="40px";g.style.right="0px";var l=document.createElement("div"),
-p=document.createElement("div");l.style.position="absolute";l.style.top="40px";l.style.left="0px";l.style.width="202px";l.style.bottom="60px";l.style.overflow="auto";p.style.position="absolute";p.style.left="202px";p.style.right="0px";p.style.top="40px";p.style.bottom="60px";p.style.overflow="auto";p.style.borderLeft="1px solid rgb(211, 211, 211)";p.style.textAlign="center";var q=null,x=[],y=document.createElement("div");y.style.position="relative";y.style.left="0px";y.style.right="0px";n(f);c.style.padding=
-"30px";c.appendChild(g);c.appendChild(l);c.appendChild(p);f=document.createElement("div");f.className="geDialogFooter";f.style.position="absolute";f.style.paddingRight="16px";f.style.color="gray";f.style.left="0px";f.style.right="0px";f.style.bottom="0px";f.style.height="60px";f.style.lineHeight="52px";var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.position="relative";z.style.top="1px";z.checked=b.sidebar.sidebarTitles;z.defaultChecked=z.checked;f.appendChild(z);n=
-document.createElement("span");mxUtils.write(n," "+mxResources.get("labels"));n.style.paddingRight="20px";f.appendChild(n);mxEvent.addListener(n,"click",function(B){z.checked=!z.checked;mxEvent.consume(B)});var A=document.createElement("input");A.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)n=document.createElement("span"),n.style.paddingRight="20px",n.appendChild(A),mxUtils.write(n," "+mxResources.get("rememberThisSetting")),A.style.position="relative",A.style.top="1px",
-A.checked=!0,A.defaultChecked=!0,mxEvent.addListener(n,"click",function(B){mxEvent.getSource(B)!=A&&(A.checked=!A.checked,mxEvent.consume(B))}),f.appendChild(n);n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});n.className="geBtn";g=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var B=[],D=0;D<x.length;D++){var G=x[D].apply(this,arguments);null!=G&&B.push(G)}"1"==urlParams.sketch&&b.isSettingsEnabled()&&(D=mxUtils.indexOf(B,".scratchpad"),null!=b.scratchpad!=
-(0<=D&&0<B.splice(D,1).length)&&b.toggleScratchpad(),D=mxUtils.indexOf(B,"search"),mxSettings.settings.search=0<=D&&0<B.splice(D,1).length,b.sidebar.showPalette("search",mxSettings.settings.search),A.checked&&mxSettings.save());b.sidebar.showEntries(B.join(";"),A.checked,!0);b.setSidebarTitles(z.checked,A.checked)});g.className="geBtn gePrimaryBtn"}else{var K=document.createElement("table");n=document.createElement("tbody");c.style.height="100%";c.style.overflow="auto";g=document.createElement("tr");
-K.style.width="100%";e=document.createElement("td");m=document.createElement("td");v=document.createElement("td");var O=mxUtils.bind(this,function(B,D,G){var N=document.createElement("input");N.type="checkbox";K.appendChild(N);N.checked=b.sidebar.isEntryVisible(G);var I=document.createElement("span");mxUtils.write(I,D);D=document.createElement("div");D.style.display="block";D.appendChild(N);D.appendChild(I);mxEvent.addListener(I,"click",function(F){N.checked=!N.checked;mxEvent.consume(F)});B.appendChild(D);
-return function(){return N.checked?G:null}});g.appendChild(e);g.appendChild(m);g.appendChild(v);n.appendChild(g);K.appendChild(n);x=[];var L=0;for(n=0;n<f.length;n++)for(g=0;g<f[n].entries.length;g++)L++;var u=[e,m,v],E=0;for(n=0;n<f.length;n++)(function(B){for(var D=0;D<B.entries.length;D++){var G=B.entries[D];x.push(O(u[Math.floor(E/(L/3))],G.title,G.id));E++}})(f[n]);c.appendChild(K);f=document.createElement("div");f.style.marginTop="18px";f.style.textAlign="center";A=document.createElement("input");
-isLocalStorage&&(A.setAttribute("type","checkbox"),A.checked=!0,A.defaultChecked=!0,f.appendChild(A),n=document.createElement("span"),mxUtils.write(n," "+mxResources.get("rememberThisSetting")),f.appendChild(n),mxEvent.addListener(n,"click",function(B){A.checked=!A.checked;mxEvent.consume(B)}));c.appendChild(f);n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});n.className="geBtn";g=mxUtils.button(mxResources.get("apply"),function(){for(var B=["search"],D=0;D<x.length;D++){var G=
-x[D].apply(this,arguments);null!=G&&B.push(G)}b.sidebar.showEntries(0<B.length?B.join(";"):"",A.checked);b.hideDialog()});g.className="geBtn gePrimaryBtn";f=document.createElement("div");f.style.marginTop="26px";f.style.textAlign="right"}b.editor.cancelFirst?(f.appendChild(n),f.appendChild(g)):(f.appendChild(g),f.appendChild(n));c.appendChild(f);this.container=c},PluginsDialog=function(b,e,f,c){function m(){g=!0;if(0==d.length)v.innerHTML=mxUtils.htmlEntities(mxResources.get("noPlugins"));else{v.innerText=
-"";for(var y=0;y<d.length;y++){var z=document.createElement("span");z.style.whiteSpace="nowrap";var A=document.createElement("span");A.className="geSprite geSprite-delete";A.style.position="relative";A.style.cursor="pointer";A.style.top="5px";A.style.marginRight="4px";A.style.display="inline-block";z.appendChild(A);mxUtils.write(z,d[y]);v.appendChild(z);mxUtils.br(v);mxEvent.addListener(A,"click",function(K){return function(){b.confirm(mxResources.get("delete")+' "'+d[K]+'"?',function(){null!=f&&
-f(d[K]);d.splice(K,1);m()})}}(y))}}}var n=document.createElement("div"),v=document.createElement("div");v.style.height="180px";v.style.overflow="auto";var d=mxSettings.getPlugins().slice(),g=!1;n.appendChild(v);m();g=!1;var k=mxUtils.button(mxResources.get("add"),null!=e?function(){e(function(y){y&&0>mxUtils.indexOf(d,y)&&d.push(y);m()})}:function(){var y=document.createElement("div"),z=document.createElement("span");z.style.marginTop="6px";mxUtils.write(z,mxResources.get("builtinPlugins")+": ");
-y.appendChild(z);var A=document.createElement("select");A.style.width="150px";for(z=0;z<App.publicPlugin.length;z++){var K=document.createElement("option");mxUtils.write(K,App.publicPlugin[z]);K.value=App.publicPlugin[z];A.appendChild(K)}y.appendChild(A);mxUtils.br(y);mxUtils.br(y);z=mxUtils.button(mxResources.get("custom")+"...",function(){var O=new FilenameDialog(b,"",mxResources.get("add"),function(L){b.hideDialog();if(null!=L&&0<L.length){L=L.split(";");for(var u=0;u<L.length;u++){var E=L[u],
-B=App.pluginRegistry[E];null!=B&&(E=B);0<E.length&&0>mxUtils.indexOf(d,E)&&d.push(E)}m()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(O.container,300,80,!0,!0);O.init()});z.className="geBtn";y=new CustomDialog(b,y,mxUtils.bind(this,function(){var O=App.pluginRegistry[A.value];0>mxUtils.indexOf(d,O)&&(d.push(O),m())}),null,null,null,z);b.showDialog(y.container,300,100,!0,!0)});k.className="geBtn";var l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});
-l.className="geBtn";var p=mxUtils.button(c?mxResources.get("close"):mxResources.get("apply"),function(){g?(mxSettings.setPlugins(d),mxSettings.save(),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))):b.hideDialog()});p.className="geBtn gePrimaryBtn";var q=document.createElement("div");q.style.marginTop="14px";q.style.textAlign="right";var x=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/plugins")});x.className="geBtn";b.isOffline()&&
-!mxClient.IS_CHROMEAPP&&(x.style.display="none");q.appendChild(x);b.editor.cancelFirst?(c||q.appendChild(l),q.appendChild(k),q.appendChild(p)):(q.appendChild(k),q.appendChild(p),c||q.appendChild(l));n.appendChild(q);this.container=n},CropImageDialog=function(b,e,f,c){function m(){var B=A.checked,D=K.checked,G=x.geometry,N=g.width,I=g.height,F=(300-N)/2,H=(300-I)/2;G.x<F?(G.width-=F-G.x,G.x=F):G.x+G.width>F+N&&(G.width=F+N-G.x,G.x=Math.min(G.x,F+N));G.y<H?(G.height-=H-G.y,G.y=H):G.y+G.height>H+I&&
-(G.height=H+I-G.y,G.y=Math.min(G.y,H+I));var R=(G.x-F)/N*100;N=100-(G.x+G.width-F)/N*100;F=(G.y-H)/I*100;G=100-(G.y+G.height-H)/I*100;return"inset("+mxUtils.format(F)+"% "+mxUtils.format(N)+"% "+mxUtils.format(G)+"% "+mxUtils.format(R)+"%"+(B?" round "+q+"%":D?" round 50%":"")+")"}function n(B){null!=l&&(!0!==B&&(l.model.setGeometry(x,p.clone()),q=5,L.value=q),l.model.setStyle(x,y+m()),l.selectAll(),O.style.visibility=A.checked?"visible":"hidden")}var v=document.createElement("div"),d=document.createElement("div");
-d.style.height="300px";d.style.width="300px";d.style.display="inline-flex";d.style.justifyContent="center";d.style.alignItems="center";d.style.position="absolute";var g=document.createElement("img");g.onload=function(){function B(){l.model.setStyle(x,y+m())}l=new Graph(k);l.autoExtend=!1;l.autoScroll=!1;l.setGridEnabled(!1);l.setEnabled(!0);l.setPanning(!1);l.setConnectable(!1);l.getRubberband().setEnabled(!1);l.graphHandler.allowLivePreview=!1;var D=l.createVertexHandler;l.createVertexHandler=function(){var Q=
-D.apply(this,arguments);Q.livePreview=!1;return Q};if(null!=f)try{if("inset"==f.substring(0,5)){var G=x.geometry,N=g.width,I=g.height,F=(300-N)/2,H=(300-I)/2,R=f.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),X=parseFloat(R[0]),J=parseFloat(R[1]),W=parseFloat(R[2]),V=parseFloat(R[3]);isFinite(X)&&isFinite(J)&&isFinite(W)&&isFinite(V)?(G.x=V/100*N+F,G.y=X/100*I+H,G.width=(100-J)/100*N+F-G.x,G.height=(100-W)/100*I+H-G.y,"round"==R[4]?"50%"==R[5]?K.setAttribute("checked","checked"):(q=parseInt(R[5]),L.value=
-q,A.setAttribute("checked","checked"),O.style.visibility="visible"):z.setAttribute("checked","checked")):f=null}else f=null}catch(Q){}x.style=y+(f?f:m());x.vertex=!0;l.addCell(x,null,null,null,null);l.selectAll();l.addListener(mxEvent.CELLS_MOVED,B);l.addListener(mxEvent.CELLS_RESIZED,B);var t=l.graphHandler.mouseUp,C=l.graphHandler.mouseDown;l.graphHandler.mouseUp=function(){t.apply(this,arguments);k.style.backgroundColor="#fff9"};l.graphHandler.mouseDown=function(){C.apply(this,arguments);k.style.backgroundColor=
-""};l.dblClick=function(){};var M=l.getSelectionModel().changeSelection;l.getSelectionModel().changeSelection=function(){M.call(this,[x],[x])}};g.onerror=function(){g.onload=null;g.src=Editor.errorImage};g.setAttribute("src",e);g.style.maxWidth="300px";g.style.maxHeight="300px";d.appendChild(g);v.appendChild(d);var k=document.createElement("div");k.style.width="300px";k.style.height="300px";k.style.overflow="hidden";k.style.backgroundColor="#fff9";v.appendChild(k);var l=null,p=new mxGeometry(100,
-100,100,100),q=5,x=new mxCell("",p.clone(),""),y="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+e.replace(";base64","")+";clipPath=",z=document.createElement("input");z.setAttribute("type","radio");z.setAttribute("id","croppingRect");z.setAttribute("name","croppingShape");z.setAttribute("checked","checked");z.style.margin="5px";v.appendChild(z);e=document.createElement("label");e.setAttribute("for","croppingRect");mxUtils.write(e,mxResources.get("rectangle"));v.appendChild(e);
-var A=document.createElement("input");A.setAttribute("type","radio");A.setAttribute("id","croppingRounded");A.setAttribute("name","croppingShape");A.style.margin="5px";v.appendChild(A);e=document.createElement("label");e.setAttribute("for","croppingRounded");mxUtils.write(e,mxResources.get("rounded"));v.appendChild(e);var K=document.createElement("input");K.setAttribute("type","radio");K.setAttribute("id","croppingEllipse");K.setAttribute("name","croppingShape");K.style.margin="5px";v.appendChild(K);
-e=document.createElement("label");e.setAttribute("for","croppingEllipse");mxUtils.write(e,mxResources.get("ellipse"));v.appendChild(e);mxEvent.addListener(z,"change",n);mxEvent.addListener(A,"change",n);mxEvent.addListener(K,"change",n);var O=document.createElement("div");O.style.textAlign="center";O.style.visibility="hidden";var L=document.createElement("input");L.setAttribute("type","range");L.setAttribute("min","1");L.setAttribute("max","49");L.setAttribute("value",q);L.setAttribute("title",mxResources.get("arcSize"));
-O.appendChild(L);v.appendChild(O);mxEvent.addListener(L,"change",function(){q=this.value;n(!0)});e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});e.className="geBtn";d=mxUtils.button(mxResources.get("apply"),function(){c(m(),x.geometry.width,x.geometry.height);b.hideDialog()});d.className="geBtn gePrimaryBtn";var u=mxUtils.button(mxResources.get("reset"),function(){c(null,g.width,g.height);b.hideDialog()});u.className="geBtn";var E=document.createElement("div");E.style.marginTop=
-"10px";E.style.textAlign="right";b.editor.cancelFirst?(E.appendChild(e),E.appendChild(u),E.appendChild(d)):(E.appendChild(u),E.appendChild(d),E.appendChild(e));v.appendChild(E);this.container=v},EditGeometryDialog=function(b,e){var f=b.editor.graph,c=1==e.length?f.getCellGeometry(e[0]):null,m=document.createElement("div"),n=document.createElement("table"),v=document.createElement("tbody"),d=document.createElement("tr"),g=document.createElement("td"),k=document.createElement("td");n.style.paddingLeft=
-"6px";mxUtils.write(g,mxResources.get("relative")+":");var l=document.createElement("input");l.setAttribute("type","checkbox");null!=c&&c.relative&&(l.setAttribute("checked","checked"),l.defaultChecked=!0);this.init=function(){l.focus()};k.appendChild(l);d.appendChild(g);d.appendChild(k);v.appendChild(d);d=document.createElement("tr");g=document.createElement("td");k=document.createElement("td");mxUtils.write(g,mxResources.get("left")+":");var p=document.createElement("input");p.setAttribute("type",
-"text");p.style.width="100px";p.value=null!=c?c.x:"";k.appendChild(p);d.appendChild(g);d.appendChild(k);v.appendChild(d);d=document.createElement("tr");g=document.createElement("td");k=document.createElement("td");mxUtils.write(g,mxResources.get("top")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=null!=c?c.y:"";k.appendChild(q);d.appendChild(g);d.appendChild(k);v.appendChild(d);d=document.createElement("tr");g=document.createElement("td");
+this.init=function(){function G(I){if(null!=I){var Q=I.getAttribute("background");if(null==Q||""==Q||Q==mxConstants.NONE)Q=Editor.isDarkMode()?"transparent":"#ffffff";A.style.backgroundColor=Q;(new mxCodec(I.ownerDocument)).decode(I,J.getModel());J.maxFitScale=1;J.fit(8);J.center()}return I}function H(I){null!=I&&(I=G(Editor.parseDiagramNode(I)));return I}mxEvent.addListener(D,"change",function(I){u=parseInt(D.value);H(E[u]);mxEvent.consume(I)});if("mxfile"==K.nodeName){var N=K.getElementsByTagName("diagram");
+E=[];for(var F=0;F<N.length;F++)E.push(N[F]);0<E.length&&H(E[u]);D.innerText="";if(1<E.length)for(D.style.display="",F=0;F<E.length;F++)N=document.createElement("option"),mxUtils.write(N,E[F].getAttribute("name")||mxResources.get("pageWithNumber",[F+1])),N.setAttribute("value",F),F==u&&N.setAttribute("selected","selected"),D.appendChild(N);else D.style.display="none"}else G(K)};z.appendChild(D);z.appendChild(f);z.appendChild(l);z.appendChild(x);z.appendChild(e);f=mxUtils.button(mxResources.get("cancel"),
+function(){b.hideDialog(!0)});f.className="geBtn";d=null!=d?mxUtils.button(mxResources.get("ignore"),d):null;null!=d&&(d.className="geBtn");b.editor.cancelFirst?(y.appendChild(f),null!=d&&y.appendChild(d),y.appendChild(v),y.appendChild(n)):(y.appendChild(n),y.appendChild(v),null!=d&&y.appendChild(d),y.appendChild(f));k.appendChild(y);k.appendChild(z);this.container=k},FindWindow=function(b,e,f,c,m,n){function v(U,W,t,C){if("object"===typeof W.value&&null!=W.value.attributes){W=W.value.attributes;
+for(var M=0;M<W.length;M++)if("label"!=W[M].nodeName){var S=mxUtils.trim(W[M].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==U&&(C&&0<=S.indexOf(t)||!C&&S.substring(0,t.length)===t)||null!=U&&U.test(S))return!0}}return!1}function d(){x&&E.value?(Q.removeAttribute("disabled"),X.removeAttribute("disabled")):(Q.setAttribute("disabled","disabled"),X.setAttribute("disabled","disabled"));E.value&&u.value?L.removeAttribute("disabled"):L.setAttribute("disabled","disabled")}function g(U,
+W,t){F.innerText="";var C=l.model.getDescendants(l.model.getRoot()),M=u.value.toLowerCase(),S=B.checked?new RegExp(M):null,P=null;z=null;p!=M&&(p=M,q=null,y=!1);var R=null==q;if(0<M.length){if(y){y=!1;for(var T,V=0;V<b.pages.length;V++)if(b.currentPage==b.pages[V]){T=V;break}U=(T+1)%b.pages.length;q=null;do y=!1,C=b.pages[U],l=b.createTemporaryGraph(l.getStylesheet()),b.updatePageRoot(C),l.model.setRoot(C.root),U=(U+1)%b.pages.length;while(!g(!0,W,t)&&U!=T);q&&(q=null,t?b.editor.graph.model.execute(new SelectPage(b,
+C)):b.selectPage(C));y=!1;l=b.editor.graph;return g(!0,W,t)}for(V=0;V<C.length;V++){T=l.view.getState(C[V]);W&&null!=S&&(R=R||T==q);if(null!=T&&null!=T.cell.value&&(R||null==P)&&(l.model.isVertex(T.cell)||l.model.isEdge(T.cell))){null!=T.style&&"1"==T.style.html?(G.innerHTML=l.sanitizeHtml(l.getLabel(T.cell)),label=mxUtils.extractTextWithWhitespace([G])):label=l.getLabel(T.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var Y=0;W&&n&&null!=S&&T==q&&(label=label.substr(A),
+Y=A);var ba=""==E.value,Z=ba;if(null==S&&(Z&&0<=label.indexOf(M)||!Z&&label.substring(0,M.length)===M||ba&&v(S,T.cell,M,Z))||null!=S&&(S.test(label)||ba&&v(S,T.cell,M,Z)))if(n&&(null!=S?(ba=label.match(S),null!=ba&&0<ba.length&&(z=ba[0].toLowerCase(),A=Y+ba.index+z.length)):(z=M,A=z.length)),R){P=T;break}else null==P&&(P=T)}R=R||T==q}}if(null!=P){if(V==C.length&&D.checked)return q=null,y=!0,g(!0,W,t);q=P;l.scrollCellToVisible(q.cell);l.isEnabled()&&!l.isCellLocked(q.cell)?t||l.getSelectionCell()==
+q.cell&&1==l.getSelectionCount()||l.setSelectionCell(q.cell):l.highlightCell(q.cell)}else{if(!U&&D.checked)return y=!0,g(!0,W,t);l.isEnabled()&&!t&&l.clearSelection()}x=null!=P;n&&!U&&d();return 0==M.length||null!=P}var k=b.actions.get("findReplace"),l=b.editor.graph,p=null,q=null,x=!1,y=!1,z=null,A=0,J=1,O=document.createElement("div");O.style.userSelect="none";O.style.overflow="hidden";O.style.padding="10px";O.style.height="100%";var K=n?"260px":"200px",u=document.createElement("input");u.setAttribute("placeholder",
+mxResources.get("find"));u.setAttribute("type","text");u.style.marginTop="4px";u.style.marginBottom="6px";u.style.width=K;u.style.fontSize="12px";u.style.borderRadius="4px";u.style.padding="6px";O.appendChild(u);mxUtils.br(O);if(n){var 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=K;E.style.fontSize="12px";E.style.borderRadius="4px";E.style.padding="6px";
+O.appendChild(E);mxUtils.br(O);mxEvent.addListener(E,"input",d)}var B=document.createElement("input");B.setAttribute("id","geFindWinRegExChck");B.setAttribute("type","checkbox");B.style.marginRight="4px";O.appendChild(B);K=document.createElement("label");K.setAttribute("for","geFindWinRegExChck");O.appendChild(K);mxUtils.write(K,mxResources.get("regularExpression"));O.appendChild(K);K=b.menus.createHelpLink("https://www.diagrams.net/doc/faq/find-shapes");K.style.position="relative";K.style.marginLeft=
+"6px";K.style.top="-1px";O.appendChild(K);mxUtils.br(O);var D=document.createElement("input");D.setAttribute("id","geFindWinAllPagesChck");D.setAttribute("type","checkbox");D.style.marginRight="4px";O.appendChild(D);K=document.createElement("label");K.setAttribute("for","geFindWinAllPagesChck");O.appendChild(K);mxUtils.write(K,mxResources.get("allPages"));O.appendChild(K);var G=document.createElement("div");mxUtils.br(O);K=document.createElement("div");K.style.left="0px";K.style.right="0px";K.style.marginTop=
+"6px";K.style.padding="0 6px 0 6px";K.style.textAlign="center";O.appendChild(K);var H=mxUtils.button(mxResources.get("reset"),function(){F.innerText="";u.value="";u.style.backgroundColor="";n&&(E.value="",d());p=q=null;y=!1;u.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";n||K.appendChild(H);var N=mxUtils.button(mxResources.get("find"),
+function(){try{u.style.backgroundColor=g()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(U){b.handleError(U)}});N.setAttribute("title",mxResources.get("find")+" (Enter)");N.style.float="none";N.style.width="120px";N.style.marginTop="6px";N.style.marginLeft="8px";N.style.overflow="hidden";N.style.textOverflow="ellipsis";N.className="geBtn gePrimaryBtn";K.appendChild(N);var F=document.createElement("div");F.style.marginTop="10px";if(n){var I=function(U,W,t,C,M){if(null==M||"1"!=M.html)return C=U.toLowerCase().indexOf(W,
+C),0>C?U:U.substr(0,C)+t+U.substr(C+W.length);var S=U;W=mxUtils.htmlEntities(W);M=[];var P=-1;for(U=U.replace(/<br>/ig,"\n");-1<(P=U.indexOf("<",P+1));)M.push(P);P=U.match(/<[^>]*>/g);U=U.replace(/<[^>]*>/g,"");C=U.toLowerCase().indexOf(W,C);if(0>C)return S;S=C+W.length;t=mxUtils.htmlEntities(t);U=U.substr(0,C)+t+U.substr(S);for(var R=0,T=0;T<M.length;T++){if(M[T]-R<C)U=U.substr(0,M[T])+P[T]+U.substr(M[T]);else{var V=M[T]-R<S?C+R:M[T]+(t.length-W.length);U=U.substr(0,V)+P[T]+U.substr(V)}R+=P[T].length}return U.replace(/\n/g,
+"<br>")},Q=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=z&&null!=q&&E.value){var U=q.cell,W=l.getLabel(U);l.isCellEditable(U)&&l.model.setValue(U,I(W,z,E.value,A-z.length,l.getCurrentCellStyle(U)));u.style.backgroundColor=g(!1,!0)?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}}catch(t){b.handleError(t)}});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");K.appendChild(Q);mxUtils.br(K);var X=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=z&&null!=q&&E.value){var U=q.cell,W=l.getLabel(U);l.model.setValue(U,I(W,z,E.value,A-z.length,l.getCurrentCellStyle(U)));Q.setAttribute("disabled","disabled");X.setAttribute("disabled","disabled")}}catch(t){b.handleError(t)}});X.setAttribute("title",mxResources.get("replace"));X.style.float="none";X.style.width="120px";
+X.style.marginTop="6px";X.style.marginLeft="8px";X.style.overflow="hidden";X.style.textOverflow="ellipsis";X.className="geBtn gePrimaryBtn";X.setAttribute("disabled","disabled");K.appendChild(X);var L=mxUtils.button(mxResources.get("replaceAll"),function(){F.innerText="";if(E.value){p=null;var U=b.currentPage,W=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;l.getModel().beginUpdate();try{for(var t=0,C={};g(!1,!0,!0)&&100>t;){var M=q.cell,S=l.getLabel(M),P=C[M.id];if(P&&P.replAllMrk==
+J&&P.replAllPos>=A)break;C[M.id]={replAllMrk:J,replAllPos:A};l.isCellEditable(M)&&(l.model.setValue(M,I(S,z,E.value,A-z.length,l.getCurrentCellStyle(M))),t++)}U!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,U));mxUtils.write(F,mxResources.get("matchesRepl",[t]))}catch(R){b.handleError(R)}finally{l.getModel().endUpdate(),b.editor.graph.setSelectionCells(W),b.editor.graph.rendering=!0}J++}});L.setAttribute("title",mxResources.get("replaceAll"));L.style.float="none";L.style.width="120px";
+L.style.marginTop="6px";L.style.marginLeft="8px";L.style.overflow="hidden";L.style.textOverflow="ellipsis";L.className="geBtn gePrimaryBtn";L.setAttribute("disabled","disabled");K.appendChild(L);mxUtils.br(K);K.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";K.appendChild(H);mxUtils.br(K);K.appendChild(F)}else H.style.width="90px",N.style.width="90px";mxEvent.addListener(u,"keyup",function(U){if(91==U.keyCode||93==U.keyCode||17==U.keyCode)mxEvent.consume(U);else if(27==U.keyCode)k.funct();else if(p!=u.value.toLowerCase()||13==U.keyCode)try{u.style.backgroundColor=g()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(W){u.style.backgroundColor=Editor.isDarkMode()?"#ff0000":"#ffcfcf"}});mxEvent.addListener(O,"keydown",function(U){70==
+U.keyCode&&b.keyHandler.isControlDown(U)&&!mxEvent.isShiftDown(U)&&(k.funct(),mxEvent.consume(U))});this.window=new mxWindow(mxResources.get("find")+(n?"/"+mxResources.get("replace"):""),O,e,f,c,m,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit();this.window.isVisible()?(u.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?u.select():
+document.execCommand("selectAll",!1,null),null!=b.pages&&1<b.pages.length?D.removeAttribute("disabled"):(D.checked=!1,D.setAttribute("disabled","disabled"))):l.container.focus()}));b.installResizeHandler(this,!1)},FreehandWindow=function(b,e,f,c,m,n){var v=b.editor.graph,d=document.createElement("div");d.style.textAlign="center";d.style.userSelect="none";d.style.overflow="hidden";d.style.height="100%";if(n){var g=document.createElement("input");g.setAttribute("id","geFreehandBrush");g.setAttribute("type",
+"checkbox");g.style.margin="10px 5px 0px 10px";g.style.float="left";d.appendChild(g);var k=document.createElement("label");k.setAttribute("for","geFreehandBrush");k.style.float="left";k.style.marginTop="10px";d.appendChild(k);mxUtils.write(k,mxResources.get("brush"));d.appendChild(k);mxUtils.br(d);var l=document.createElement("input");l.setAttribute("type","range");l.setAttribute("min","2");l.setAttribute("max","30");l.setAttribute("value",v.freehand.getBrushSize());l.style.width="90%";l.style.visibility=
+"hidden";d.appendChild(l);mxUtils.br(d);mxEvent.addListener(g,"change",function(){v.freehand.setPerfectFreehandMode(this.checked);l.style.visibility=this.checked?"visible":"hidden"});mxEvent.addListener(l,"change",function(){v.freehand.setBrushSize(parseInt(this.value))})}var p=mxUtils.button(mxResources.get("startDrawing"),function(){v.freehand.isDrawing()?v.freehand.stopDrawing():v.freehand.startDrawing()});p.setAttribute("title",mxResources.get("startDrawing"));p.style.marginTop=n?"5px":"10px";
+p.style.width="90%";p.style.boxSizing="border-box";p.style.overflow="hidden";p.style.textOverflow="ellipsis";p.style.textAlign="center";p.className="geBtn gePrimaryBtn";d.appendChild(p);this.window=new mxWindow(mxResources.get("freehand"),d,e,f,c,m,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);v.addListener("freehandStateChanged",mxUtils.bind(this,function(){p.innerText="";mxUtils.write(p,mxResources.get(v.freehand.isDrawing()?
+"stopDrawing":"startDrawing"));p.setAttribute("title",mxResources.get(v.freehand.isDrawing()?"stopDrawing":"startDrawing"));p.className="geBtn"+(v.freehand.isDrawing()?"":" gePrimaryBtn")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){v.freehand.isDrawing()&&v.freehand.stopDrawing()}));b.installResizeHandler(this,!1)},TagsWindow=function(b,e,f,c,m){var n=b.editor.graph,v=b.editor.graph.createTagsDialog(mxUtils.bind(this,
+function(){return this.window.isVisible()}),null,function(g,k){if(n.isEnabled()){var l=new FilenameDialog(b,"",mxResources.get("add"),function(p){b.hideDialog();if(null!=p&&0<p.length){p=p.split(" ");for(var q=[],x=0;x<p.length;x++){var y=mxUtils.trim(p[x]);""!=y&&0>mxUtils.indexOf(g,y)&&q.push(y)}0<q.length&&(n.isSelectionEmpty()?k(g.concat(q)):n.addTagsForCells(n.getSelectionCells(),q))}},mxResources.get("enterValue")+" ("+mxResources.get("tags")+")");b.showDialog(l.container,300,80,!0,!0);l.init()}}),
+d=v.div;this.window=new mxWindow(mxResources.get("tags"),d,e,f,c,m,!0,!0);this.window.minimumSize=new mxRectangle(0,0,212,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){v.refresh();this.window.fit()}));b.installResizeHandler(this,!0)},AuthDialog=function(b,e,f,c){var m=document.createElement("div");m.style.textAlign="center";var n=document.createElement("p");n.style.fontSize=
+"16pt";n.style.padding="0px";n.style.margin="0px";n.style.color="gray";mxUtils.write(n,mxResources.get("authorizationRequired"));var v="Unknown",d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.style.marginRight="10px";e==b.drive?(v=mxResources.get("googleDrive"),d.src=IMAGE_PATH+"/google-drive-logo-white.svg"):e==b.dropbox?(v=mxResources.get("dropbox"),d.src=IMAGE_PATH+"/dropbox-logo-white.svg"):e==b.oneDrive?(v=mxResources.get("oneDrive"),d.src=
+IMAGE_PATH+"/onedrive-logo-white.svg"):e==b.gitHub?(v=mxResources.get("github"),d.src=IMAGE_PATH+"/github-logo-white.svg"):e==b.gitLab?(v=mxResources.get("gitlab"),d.src=IMAGE_PATH+"/gitlab-logo.svg",d.style.width="32px"):e==b.trello&&(v=mxResources.get("trello"),d.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizeThisAppIn",[v]));var g=document.createElement("input");g.setAttribute("type","checkbox");v=mxUtils.button(mxResources.get("authorize"),
+function(){c(g.checked)});v.insertBefore(d,v.firstChild);v.style.marginTop="6px";v.className="geBigButton";v.style.fontSize="18px";v.style.padding="14px";m.appendChild(n);m.appendChild(b);m.appendChild(v);f&&(f=document.createElement("p"),f.style.marginTop="20px",f.appendChild(g),n=document.createElement("span"),mxUtils.write(n," "+mxResources.get("rememberMe")),f.appendChild(n),m.appendChild(f),g.checked=!0,g.defaultChecked=!0,mxEvent.addListener(n,"click",function(k){g.checked=!g.checked;mxEvent.consume(k)}));
+this.container=m},MoreShapesDialog=function(b,e,f){f=null!=f?f:b.sidebar.entries;var c=document.createElement("div"),m=[];if(null!=b.sidebar.customEntries)for(var n=0;n<b.sidebar.customEntries.length;n++){for(var v=b.sidebar.customEntries[n],d={title:b.getResource(v.title),entries:[]},g=0;g<v.entries.length;g++){var k=v.entries[g];d.entries.push({id:k.id,title:b.getResource(k.title),desc:b.getResource(k.desc),image:k.preview})}m.push(d)}for(n=0;n<f.length;n++)if(null==b.sidebar.enabledLibraries)m.push(f[n]);
+else{d={title:f[n].title,entries:[]};for(g=0;g<f[n].entries.length;g++)0<=mxUtils.indexOf(b.sidebar.enabledLibraries,f[n].entries[g].id)&&d.entries.push(f[n].entries[g]);0<d.entries.length&&m.push(d)}f=m;if(e){n=mxUtils.bind(this,function(B){for(var D=0;D<B.length;D++)(function(G){var H=y.cloneNode(!1);H.style.fontWeight="bold";H.style.backgroundColor=Editor.isDarkMode()?"#505759":"#e5e5e5";H.style.padding="6px 0px 6px 20px";mxUtils.write(H,G.title);l.appendChild(H);for(var N=0;N<G.entries.length;N++)(function(F){var I=
+y.cloneNode(!1);I.style.cursor="pointer";I.style.padding="4px 0px 4px 20px";I.style.whiteSpace="nowrap";I.style.overflow="hidden";I.style.textOverflow="ellipsis";I.setAttribute("title",F.title+" ("+F.id+")");var Q=document.createElement("input");Q.setAttribute("type","checkbox");Q.checked=b.sidebar.isEntryVisible(F.id);Q.defaultChecked=Q.checked;I.appendChild(Q);mxUtils.write(I," "+F.title);l.appendChild(I);var X=function(L){if(null==L||"INPUT"!=mxEvent.getSource(L).nodeName){p.style.textAlign="center";
+p.style.padding="0px";p.style.color="";p.innerText="";if(null!=F.desc){var U=document.createElement("pre");U.style.boxSizing="border-box";U.style.fontFamily="inherit";U.style.margin="20px";U.style.right="0px";U.style.textAlign="left";mxUtils.write(U,F.desc);p.appendChild(U)}null!=F.imageCallback?F.imageCallback(p):null!=F.image?p.innerHTML+='<img border="0" src="'+F.image+'"/>':null==F.desc&&(p.style.padding="20px",p.style.color="rgb(179, 179, 179)",mxUtils.write(p,mxResources.get("noPreview")));
+null!=q&&(q.style.backgroundColor="");q=I;q.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9";null!=L&&mxEvent.consume(L)}};mxEvent.addListener(I,"click",X);mxEvent.addListener(I,"dblclick",function(L){Q.checked=!Q.checked;mxEvent.consume(L)});x.push(function(){return Q.checked?F.id:null});0==D&&0==N&&X()})(G.entries[N])})(B[D])});g=document.createElement("div");g.className="geDialogTitle";mxUtils.write(g,mxResources.get("shapes"));g.style.position="absolute";g.style.top="0px";g.style.left=
+"0px";g.style.lineHeight="40px";g.style.height="40px";g.style.right="0px";var l=document.createElement("div"),p=document.createElement("div");l.style.position="absolute";l.style.top="40px";l.style.left="0px";l.style.width="202px";l.style.bottom="60px";l.style.overflow="auto";p.style.position="absolute";p.style.left="202px";p.style.right="0px";p.style.top="40px";p.style.bottom="60px";p.style.overflow="auto";p.style.borderLeft="1px solid rgb(211, 211, 211)";p.style.textAlign="center";var q=null,x=[],
+y=document.createElement("div");y.style.position="relative";y.style.left="0px";y.style.right="0px";n(f);c.style.padding="30px";c.appendChild(g);c.appendChild(l);c.appendChild(p);f=document.createElement("div");f.className="geDialogFooter";f.style.position="absolute";f.style.paddingRight="16px";f.style.color="gray";f.style.left="0px";f.style.right="0px";f.style.bottom="0px";f.style.height="60px";f.style.lineHeight="52px";var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.position=
+"relative";z.style.top="1px";z.checked=b.sidebar.sidebarTitles;z.defaultChecked=z.checked;f.appendChild(z);n=document.createElement("span");mxUtils.write(n," "+mxResources.get("labels"));n.style.paddingRight="20px";f.appendChild(n);mxEvent.addListener(n,"click",function(B){z.checked=!z.checked;mxEvent.consume(B)});var A=document.createElement("input");A.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)n=document.createElement("span"),n.style.paddingRight="20px",n.appendChild(A),
+mxUtils.write(n," "+mxResources.get("rememberThisSetting")),A.style.position="relative",A.style.top="1px",A.checked=!0,A.defaultChecked=!0,mxEvent.addListener(n,"click",function(B){mxEvent.getSource(B)!=A&&(A.checked=!A.checked,mxEvent.consume(B))}),f.appendChild(n);n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});n.className="geBtn";g=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var B=[],D=0;D<x.length;D++){var G=x[D].apply(this,arguments);null!=G&&
+B.push(G)}"1"==urlParams.sketch&&b.isSettingsEnabled()&&(D=mxUtils.indexOf(B,".scratchpad"),null!=b.scratchpad!=(0<=D&&0<B.splice(D,1).length)&&b.toggleScratchpad(),D=mxUtils.indexOf(B,"search"),mxSettings.settings.search=0<=D&&0<B.splice(D,1).length,b.sidebar.showPalette("search",mxSettings.settings.search),A.checked&&mxSettings.save());b.sidebar.showEntries(B.join(";"),A.checked,!0);b.setSidebarTitles(z.checked,A.checked)});g.className="geBtn gePrimaryBtn"}else{var J=document.createElement("table");
+n=document.createElement("tbody");c.style.height="100%";c.style.overflow="auto";g=document.createElement("tr");J.style.width="100%";e=document.createElement("td");m=document.createElement("td");v=document.createElement("td");var O=mxUtils.bind(this,function(B,D,G){var H=document.createElement("input");H.type="checkbox";J.appendChild(H);H.checked=b.sidebar.isEntryVisible(G);var N=document.createElement("span");mxUtils.write(N,D);D=document.createElement("div");D.style.display="block";D.appendChild(H);
+D.appendChild(N);mxEvent.addListener(N,"click",function(F){H.checked=!H.checked;mxEvent.consume(F)});B.appendChild(D);return function(){return H.checked?G:null}});g.appendChild(e);g.appendChild(m);g.appendChild(v);n.appendChild(g);J.appendChild(n);x=[];var K=0;for(n=0;n<f.length;n++)for(g=0;g<f[n].entries.length;g++)K++;var u=[e,m,v],E=0;for(n=0;n<f.length;n++)(function(B){for(var D=0;D<B.entries.length;D++){var G=B.entries[D];x.push(O(u[Math.floor(E/(K/3))],G.title,G.id));E++}})(f[n]);c.appendChild(J);
+f=document.createElement("div");f.style.marginTop="18px";f.style.textAlign="center";A=document.createElement("input");isLocalStorage&&(A.setAttribute("type","checkbox"),A.checked=!0,A.defaultChecked=!0,f.appendChild(A),n=document.createElement("span"),mxUtils.write(n," "+mxResources.get("rememberThisSetting")),f.appendChild(n),mxEvent.addListener(n,"click",function(B){A.checked=!A.checked;mxEvent.consume(B)}));c.appendChild(f);n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});
+n.className="geBtn";g=mxUtils.button(mxResources.get("apply"),function(){for(var B=["search"],D=0;D<x.length;D++){var G=x[D].apply(this,arguments);null!=G&&B.push(G)}b.sidebar.showEntries(0<B.length?B.join(";"):"",A.checked);b.hideDialog()});g.className="geBtn gePrimaryBtn";f=document.createElement("div");f.style.marginTop="26px";f.style.textAlign="right"}b.editor.cancelFirst?(f.appendChild(n),f.appendChild(g)):(f.appendChild(g),f.appendChild(n));c.appendChild(f);this.container=c},PluginsDialog=function(b,
+e,f,c){function m(){g=!0;if(0==d.length)v.innerHTML=mxUtils.htmlEntities(mxResources.get("noPlugins"));else{v.innerText="";for(var y=0;y<d.length;y++){var z=document.createElement("span");z.style.whiteSpace="nowrap";var A=document.createElement("span");A.className="geSprite geSprite-delete";A.style.position="relative";A.style.cursor="pointer";A.style.top="5px";A.style.marginRight="4px";A.style.display="inline-block";z.appendChild(A);mxUtils.write(z,d[y]);v.appendChild(z);mxUtils.br(v);mxEvent.addListener(A,
+"click",function(J){return function(){b.confirm(mxResources.get("delete")+' "'+d[J]+'"?',function(){null!=f&&f(d[J]);d.splice(J,1);m()})}}(y))}}}var n=document.createElement("div"),v=document.createElement("div");v.style.height="180px";v.style.overflow="auto";var d=mxSettings.getPlugins().slice(),g=!1;n.appendChild(v);m();g=!1;var k=mxUtils.button(mxResources.get("add"),null!=e?function(){e(function(y){y&&0>mxUtils.indexOf(d,y)&&d.push(y);m()})}:function(){var y=document.createElement("div"),z=document.createElement("span");
+z.style.marginTop="6px";mxUtils.write(z,mxResources.get("builtinPlugins")+": ");y.appendChild(z);var A=document.createElement("select");A.style.width="150px";for(z=0;z<App.publicPlugin.length;z++){var J=document.createElement("option");mxUtils.write(J,App.publicPlugin[z]);J.value=App.publicPlugin[z];A.appendChild(J)}y.appendChild(A);mxUtils.br(y);mxUtils.br(y);z=mxUtils.button(mxResources.get("custom")+"...",function(){var O=new FilenameDialog(b,"",mxResources.get("add"),function(K){b.hideDialog();
+if(null!=K&&0<K.length){K=K.split(";");for(var u=0;u<K.length;u++){var E=K[u],B=App.pluginRegistry[E];null!=B&&(E=B);0<E.length&&0>mxUtils.indexOf(d,E)&&d.push(E)}m()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(O.container,300,80,!0,!0);O.init()});z.className="geBtn";y=new CustomDialog(b,y,mxUtils.bind(this,function(){var O=App.pluginRegistry[A.value];0>mxUtils.indexOf(d,O)&&(d.push(O),m())}),null,null,null,z);b.showDialog(y.container,300,100,!0,!0)});k.className=
+"geBtn";var l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});l.className="geBtn";var p=mxUtils.button(c?mxResources.get("close"):mxResources.get("apply"),function(){g?(mxSettings.setPlugins(d),mxSettings.save(),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))):b.hideDialog()});p.className="geBtn gePrimaryBtn";var q=document.createElement("div");q.style.marginTop="14px";q.style.textAlign="right";var x=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/plugins")});
+x.className="geBtn";b.isOffline()&&!mxClient.IS_CHROMEAPP&&(x.style.display="none");q.appendChild(x);b.editor.cancelFirst?(c||q.appendChild(l),q.appendChild(k),q.appendChild(p)):(q.appendChild(k),q.appendChild(p),c||q.appendChild(l));n.appendChild(q);this.container=n},CropImageDialog=function(b,e,f,c){function m(){var B=A.checked,D=J.checked,G=x.geometry,H=g.width,N=g.height,F=(300-H)/2,I=(300-N)/2;G.x<F?(G.width-=F-G.x,G.x=F):G.x+G.width>F+H&&(G.width=F+H-G.x,G.x=Math.min(G.x,F+H));G.y<I?(G.height-=
+I-G.y,G.y=I):G.y+G.height>I+N&&(G.height=I+N-G.y,G.y=Math.min(G.y,I+N));var Q=(G.x-F)/H*100;H=100-(G.x+G.width-F)/H*100;F=(G.y-I)/N*100;G=100-(G.y+G.height-I)/N*100;return"inset("+mxUtils.format(F)+"% "+mxUtils.format(H)+"% "+mxUtils.format(G)+"% "+mxUtils.format(Q)+"%"+(B?" round "+q+"%":D?" round 50%":"")+")"}function n(B){null!=l&&(!0!==B&&(l.model.setGeometry(x,p.clone()),q=5,K.value=q),l.model.setStyle(x,y+m()),l.selectAll(),O.style.visibility=A.checked?"visible":"hidden")}var v=document.createElement("div"),
+d=document.createElement("div");d.style.height="300px";d.style.width="300px";d.style.display="inline-flex";d.style.justifyContent="center";d.style.alignItems="center";d.style.position="absolute";var g=document.createElement("img");g.onload=function(){function B(){l.model.setStyle(x,y+m())}l=new Graph(k);l.autoExtend=!1;l.autoScroll=!1;l.setGridEnabled(!1);l.setEnabled(!0);l.setPanning(!1);l.setConnectable(!1);l.getRubberband().setEnabled(!1);l.graphHandler.allowLivePreview=!1;var D=l.createVertexHandler;
+l.createVertexHandler=function(){var S=D.apply(this,arguments);S.livePreview=!1;return S};if(null!=f)try{if("inset"==f.substring(0,5)){var G=x.geometry,H=g.width,N=g.height,F=(300-H)/2,I=(300-N)/2,Q=f.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),X=parseFloat(Q[0]),L=parseFloat(Q[1]),U=parseFloat(Q[2]),W=parseFloat(Q[3]);isFinite(X)&&isFinite(L)&&isFinite(U)&&isFinite(W)?(G.x=W/100*H+F,G.y=X/100*N+I,G.width=(100-L)/100*H+F-G.x,G.height=(100-U)/100*N+I-G.y,"round"==Q[4]?"50%"==Q[5]?J.setAttribute("checked",
+"checked"):(q=parseInt(Q[5]),K.value=q,A.setAttribute("checked","checked"),O.style.visibility="visible"):z.setAttribute("checked","checked")):f=null}else f=null}catch(S){}x.style=y+(f?f:m());x.vertex=!0;l.addCell(x,null,null,null,null);l.selectAll();l.addListener(mxEvent.CELLS_MOVED,B);l.addListener(mxEvent.CELLS_RESIZED,B);var t=l.graphHandler.mouseUp,C=l.graphHandler.mouseDown;l.graphHandler.mouseUp=function(){t.apply(this,arguments);k.style.backgroundColor="#fff9"};l.graphHandler.mouseDown=function(){C.apply(this,
+arguments);k.style.backgroundColor=""};l.dblClick=function(){};var M=l.getSelectionModel().changeSelection;l.getSelectionModel().changeSelection=function(){M.call(this,[x],[x])}};g.onerror=function(){g.onload=null;g.src=Editor.errorImage};g.setAttribute("src",e);g.style.maxWidth="300px";g.style.maxHeight="300px";d.appendChild(g);v.appendChild(d);var k=document.createElement("div");k.style.width="300px";k.style.height="300px";k.style.overflow="hidden";k.style.backgroundColor="#fff9";v.appendChild(k);
+var l=null,p=new mxGeometry(100,100,100,100),q=5,x=new mxCell("",p.clone(),""),y="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+e.replace(";base64","")+";clipPath=",z=document.createElement("input");z.setAttribute("type","radio");z.setAttribute("id","croppingRect");z.setAttribute("name","croppingShape");z.setAttribute("checked","checked");z.style.margin="5px";v.appendChild(z);e=document.createElement("label");e.setAttribute("for","croppingRect");mxUtils.write(e,mxResources.get("rectangle"));
+v.appendChild(e);var A=document.createElement("input");A.setAttribute("type","radio");A.setAttribute("id","croppingRounded");A.setAttribute("name","croppingShape");A.style.margin="5px";v.appendChild(A);e=document.createElement("label");e.setAttribute("for","croppingRounded");mxUtils.write(e,mxResources.get("rounded"));v.appendChild(e);var J=document.createElement("input");J.setAttribute("type","radio");J.setAttribute("id","croppingEllipse");J.setAttribute("name","croppingShape");J.style.margin="5px";
+v.appendChild(J);e=document.createElement("label");e.setAttribute("for","croppingEllipse");mxUtils.write(e,mxResources.get("ellipse"));v.appendChild(e);mxEvent.addListener(z,"change",n);mxEvent.addListener(A,"change",n);mxEvent.addListener(J,"change",n);var O=document.createElement("div");O.style.textAlign="center";O.style.visibility="hidden";var K=document.createElement("input");K.setAttribute("type","range");K.setAttribute("min","1");K.setAttribute("max","49");K.setAttribute("value",q);K.setAttribute("title",
+mxResources.get("arcSize"));O.appendChild(K);v.appendChild(O);mxEvent.addListener(K,"change",function(){q=this.value;n(!0)});e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});e.className="geBtn";d=mxUtils.button(mxResources.get("apply"),function(){c(m(),x.geometry.width,x.geometry.height);b.hideDialog()});d.className="geBtn gePrimaryBtn";var u=mxUtils.button(mxResources.get("reset"),function(){c(null,g.width,g.height);b.hideDialog()});u.className="geBtn";var E=document.createElement("div");
+E.style.marginTop="10px";E.style.textAlign="right";b.editor.cancelFirst?(E.appendChild(e),E.appendChild(u),E.appendChild(d)):(E.appendChild(u),E.appendChild(d),E.appendChild(e));v.appendChild(E);this.container=v},EditGeometryDialog=function(b,e){var f=b.editor.graph,c=1==e.length?f.getCellGeometry(e[0]):null,m=document.createElement("div"),n=document.createElement("table"),v=document.createElement("tbody"),d=document.createElement("tr"),g=document.createElement("td"),k=document.createElement("td");
+n.style.paddingLeft="6px";mxUtils.write(g,mxResources.get("relative")+":");var l=document.createElement("input");l.setAttribute("type","checkbox");null!=c&&c.relative&&(l.setAttribute("checked","checked"),l.defaultChecked=!0);this.init=function(){l.focus()};k.appendChild(l);d.appendChild(g);d.appendChild(k);v.appendChild(d);d=document.createElement("tr");g=document.createElement("td");k=document.createElement("td");mxUtils.write(g,mxResources.get("left")+":");var p=document.createElement("input");
+p.setAttribute("type","text");p.style.width="100px";p.value=null!=c?c.x:"";k.appendChild(p);d.appendChild(g);d.appendChild(k);v.appendChild(d);d=document.createElement("tr");g=document.createElement("td");k=document.createElement("td");mxUtils.write(g,mxResources.get("top")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=null!=c?c.y:"";k.appendChild(q);d.appendChild(g);d.appendChild(k);v.appendChild(d);d=document.createElement("tr");g=document.createElement("td");
k=document.createElement("td");mxUtils.write(g,mxResources.get("dx")+":");var x=document.createElement("input");x.setAttribute("type","text");x.style.width="100px";x.value=null!=c&&null!=c.offset?c.offset.x:"";k.appendChild(x);d.appendChild(g);d.appendChild(k);v.appendChild(d);d=document.createElement("tr");g=document.createElement("td");k=document.createElement("td");mxUtils.write(g,mxResources.get("dy")+":");var y=document.createElement("input");y.setAttribute("type","text");y.style.width="100px";
y.value=null!=c&&null!=c.offset?c.offset.y:"";k.appendChild(y);d.appendChild(g);d.appendChild(k);v.appendChild(d);d=document.createElement("tr");g=document.createElement("td");k=document.createElement("td");mxUtils.write(g,mxResources.get("width")+":");var z=document.createElement("input");z.setAttribute("type","text");z.style.width="100px";z.value=null!=c?c.width:"";k.appendChild(z);d.appendChild(g);d.appendChild(k);v.appendChild(d);d=document.createElement("tr");g=document.createElement("td");k=
-document.createElement("td");mxUtils.write(g,mxResources.get("height")+":");var A=document.createElement("input");A.setAttribute("type","text");A.style.width="100px";A.value=null!=c?c.height:"";k.appendChild(A);d.appendChild(g);d.appendChild(k);v.appendChild(d);d=document.createElement("tr");g=document.createElement("td");k=document.createElement("td");mxUtils.write(g,mxResources.get("rotation")+":");var K=document.createElement("input");K.setAttribute("type","text");K.style.width="100px";K.value=
-1==e.length?mxUtils.getValue(f.getCellStyle(e[0]),mxConstants.STYLE_ROTATION,0):"";k.appendChild(K);d.appendChild(g);d.appendChild(k);v.appendChild(d);n.appendChild(v);m.appendChild(n);c=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});c.className="geBtn";var O=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();f.getModel().beginUpdate();try{for(var L=0;L<e.length;L++){var u=f.getCellGeometry(e[L]);null!=u&&(u=u.clone(),f.isCellMovable(e[L])&&(u.relative=l.checked,
-0<mxUtils.trim(p.value).length&&(u.x=Number(p.value)),0<mxUtils.trim(q.value).length&&(u.y=Number(q.value)),0<mxUtils.trim(x.value).length&&(null==u.offset&&(u.offset=new mxPoint),u.offset.x=Number(x.value)),0<mxUtils.trim(y.value).length&&(null==u.offset&&(u.offset=new mxPoint),u.offset.y=Number(y.value))),f.isCellResizable(e[L])&&(0<mxUtils.trim(z.value).length&&(u.width=Number(z.value)),0<mxUtils.trim(A.value).length&&(u.height=Number(A.value))),f.getModel().setGeometry(e[L],u));0<mxUtils.trim(K.value).length&&
-f.setCellStyles(mxConstants.STYLE_ROTATION,Number(K.value),[e[L]])}}finally{f.getModel().endUpdate()}});O.className="geBtn gePrimaryBtn";mxEvent.addListener(m,"keypress",function(L){13==L.keyCode&&O.click()});n=document.createElement("div");n.style.marginTop="20px";n.style.textAlign="right";b.editor.cancelFirst?(n.appendChild(c),n.appendChild(O)):(n.appendChild(O),n.appendChild(c));m.appendChild(n);this.container=m},LibraryDialog=function(b,e,f,c,m,n){function v(D){for(D=document.elementFromPoint(D.clientX,
-D.clientY);null!=D&&D.parentNode!=x;)D=D.parentNode;var G=null;if(null!=D){var N=x.firstChild;for(G=0;null!=N&&N!=D;)N=N.nextSibling,G++}return G}function d(D,G,N,I,F,H,R,X,J){try{if(b.spinner.stop(),null==G||"image/"==G.substring(0,6))if(null==D&&null!=R||null==z[D]){var W=function(){U.innerText="";U.style.cursor="pointer";U.style.whiteSpace="nowrap";U.style.textOverflow="ellipsis";mxUtils.write(U,null!=T.title&&0<T.title.length?T.title:mxResources.get("untitled"));U.style.color=null==T.title||0==
-T.title.length?"#d0d0d0":""};x.style.backgroundImage="";y.style.display="none";var V=F,t=H;if(F>b.maxImageSize||H>b.maxImageSize){var C=Math.min(1,Math.min(b.maxImageSize/Math.max(1,F)),b.maxImageSize/Math.max(1,H));F*=C;H*=C}V>t?(t=Math.round(100*t/V),V=100):(V=Math.round(100*V/t),t=100);var M=document.createElement("div");M.setAttribute("draggable","true");M.style.display="inline-block";M.style.position="relative";M.style.padding="0 12px";M.style.cursor="move";mxUtils.setPrefixedStyle(M.style,"transition",
-"transform .1s ease-in-out");if(null!=D){var Q=document.createElement("img");Q.setAttribute("src",L.convert(D));Q.style.width=V+"px";Q.style.height=t+"px";Q.style.margin="10px";Q.style.paddingBottom=Math.floor((100-t)/2)+"px";Q.style.paddingLeft=Math.floor((100-V)/2)+"px";M.appendChild(Q)}else if(null!=R){var P=b.stringToCells(Graph.decompress(R.xml));0<P.length&&(b.sidebar.createThumb(P,100,100,M,null,!0,!1),M.firstChild.style.display="inline-block",M.firstChild.style.cursor="")}var S=document.createElement("img");
-S.setAttribute("src",Editor.closeBlackImage);S.setAttribute("border","0");S.setAttribute("title",mxResources.get("delete"));S.setAttribute("align","top");S.style.paddingTop="4px";S.style.position="absolute";S.style.marginLeft="-12px";S.style.zIndex="1";S.style.cursor="pointer";mxEvent.addListener(S,"dragstart",function(da){mxEvent.consume(da)});(function(da,ja,ha){mxEvent.addListener(S,"click",function(ba){z[ja]=null;for(var Aa=0;Aa<l.length;Aa++)if(null!=l[Aa].data&&l[Aa].data==ja||null!=l[Aa].xml&&
-null!=ha&&l[Aa].xml==ha.xml){l.splice(Aa,1);break}M.parentNode.removeChild(da);0==l.length&&(x.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",y.style.display="");mxEvent.consume(ba)});mxEvent.addListener(S,"dblclick",function(ba){mxEvent.consume(ba)})})(M,D,R);M.appendChild(S);M.style.marginBottom="30px";var U=document.createElement("div");U.style.position="absolute";U.style.boxSizing="border-box";U.style.bottom="-18px";U.style.left="10px";U.style.right="10px";U.style.backgroundColor=
-Editor.isDarkMode()?Editor.darkColor:"#ffffff";U.style.overflow="hidden";U.style.textAlign="center";var T=null;null!=D?(T={data:D,w:F,h:H,title:J},null!=X&&(T.aspect=X),z[D]=Q,l.push(T)):null!=R&&(R.aspect="fixed",l.push(R),T=R);mxEvent.addListener(U,"keydown",function(da){13==da.keyCode&&null!=O&&(O(),O=null,mxEvent.consume(da))});W();M.appendChild(U);mxEvent.addListener(U,"mousedown",function(da){"true"!=U.getAttribute("contentEditable")&&mxEvent.consume(da)});P=function(da){if(mxClient.IS_IOS||
-mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var ja=new FilenameDialog(b,T.title||"",mxResources.get("ok"),function(ha){null!=ha&&(T.title=ha,W())},mxResources.get("enterValue"));b.showDialog(ja.container,300,80,!0,!0);ja.init();mxEvent.consume(da)}else if("true"!=U.getAttribute("contentEditable")){null!=O&&(O(),O=null);if(null==T.title||0==T.title.length)U.innerText="";U.style.textOverflow="";U.style.whiteSpace="";U.style.cursor="text";U.style.color="";U.setAttribute("contentEditable",
-"true");mxUtils.setPrefixedStyle(U.style,"user-select","text");U.focus();document.execCommand("selectAll",!1,null);O=function(){U.removeAttribute("contentEditable");U.style.cursor="pointer";T.title=U.innerHTML;W()};mxEvent.consume(da)}};mxEvent.addListener(U,"click",P);mxEvent.addListener(M,"dblclick",P);x.appendChild(M);mxEvent.addListener(M,"dragstart",function(da){null==D&&null!=R&&(S.style.visibility="hidden",U.style.visibility="hidden");mxClient.IS_FF&&null!=R.xml&&da.dataTransfer.setData("Text",
-R.xml);A=v(da);mxClient.IS_GC&&(M.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(M.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(M,30);S.style.visibility="";U.style.visibility=""},0)});mxEvent.addListener(M,"dragend",function(da){"hidden"==S.style.visibility&&(S.style.visibility="",U.style.visibility="");A=null;mxUtils.setOpacity(M,100);mxUtils.setPrefixedStyle(M.style,"transform",null)})}else u||(u=!0,b.handleError({message:mxResources.get("fileExists")}));else{F=
-!1;try{if(V=mxUtils.parseXml(D),"mxlibrary"==V.documentElement.nodeName){t=JSON.parse(mxUtils.getTextContent(V.documentElement));if(null!=t&&0<t.length)for(var Y=0;Y<t.length;Y++)null!=t[Y].xml?d(null,null,0,0,0,0,t[Y]):d(t[Y].data,null,0,0,t[Y].w,t[Y].h,null,"fixed",t[Y].title);F=!0}else if("mxfile"==V.documentElement.nodeName){var aa=V.documentElement.getElementsByTagName("diagram");for(Y=0;Y<aa.length;Y++){t=mxUtils.getTextContent(aa[Y]);P=b.stringToCells(Graph.decompress(t));var Z=b.editor.graph.getBoundingBoxFromGeometry(P);
-d(null,null,0,0,0,0,{xml:t,w:Z.width,h:Z.height})}F=!0}}catch(da){}F||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(da){}return null}function g(D){D.dataTransfer.dropEffect=null!=A?"move":"copy";D.stopPropagation();D.preventDefault()}function k(D){D.stopPropagation();D.preventDefault();u=!1;K=v(D);if(null!=A)null!=K&&K<x.children.length?(l.splice(K>A?K-1:K,0,l.splice(A,1)[0]),x.insertBefore(x.children[A],x.children[K])):(l.push(l.splice(A,1)[0]),x.appendChild(x.children[A]));
-else if(0<D.dataTransfer.files.length)b.importFiles(D.dataTransfer.files,0,0,b.maxImageSize,E(D));else if(0<=mxUtils.indexOf(D.dataTransfer.types,"text/uri-list")){var G=decodeURIComponent(D.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(G)||/(\.png)($|\?)/i.test(G)||/(\.gif)($|\?)/i.test(G)||/(\.svg)($|\?)/i.test(G))&&b.loadImage(G,function(N){d(G,null,0,0,N.width,N.height);x.scrollTop=x.scrollHeight})}D.stopPropagation();D.preventDefault()}var l=[];f=document.createElement("div");
+document.createElement("td");mxUtils.write(g,mxResources.get("height")+":");var A=document.createElement("input");A.setAttribute("type","text");A.style.width="100px";A.value=null!=c?c.height:"";k.appendChild(A);d.appendChild(g);d.appendChild(k);v.appendChild(d);d=document.createElement("tr");g=document.createElement("td");k=document.createElement("td");mxUtils.write(g,mxResources.get("rotation")+":");var J=document.createElement("input");J.setAttribute("type","text");J.style.width="100px";J.value=
+1==e.length?mxUtils.getValue(f.getCellStyle(e[0]),mxConstants.STYLE_ROTATION,0):"";k.appendChild(J);d.appendChild(g);d.appendChild(k);v.appendChild(d);n.appendChild(v);m.appendChild(n);c=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});c.className="geBtn";var O=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();f.getModel().beginUpdate();try{for(var K=0;K<e.length;K++){var u=f.getCellGeometry(e[K]);null!=u&&(u=u.clone(),f.isCellMovable(e[K])&&(u.relative=l.checked,
+0<mxUtils.trim(p.value).length&&(u.x=Number(p.value)),0<mxUtils.trim(q.value).length&&(u.y=Number(q.value)),0<mxUtils.trim(x.value).length&&(null==u.offset&&(u.offset=new mxPoint),u.offset.x=Number(x.value)),0<mxUtils.trim(y.value).length&&(null==u.offset&&(u.offset=new mxPoint),u.offset.y=Number(y.value))),f.isCellResizable(e[K])&&(0<mxUtils.trim(z.value).length&&(u.width=Number(z.value)),0<mxUtils.trim(A.value).length&&(u.height=Number(A.value))),f.getModel().setGeometry(e[K],u));0<mxUtils.trim(J.value).length&&
+f.setCellStyles(mxConstants.STYLE_ROTATION,Number(J.value),[e[K]])}}finally{f.getModel().endUpdate()}});O.className="geBtn gePrimaryBtn";mxEvent.addListener(m,"keypress",function(K){13==K.keyCode&&O.click()});n=document.createElement("div");n.style.marginTop="20px";n.style.textAlign="right";b.editor.cancelFirst?(n.appendChild(c),n.appendChild(O)):(n.appendChild(O),n.appendChild(c));m.appendChild(n);this.container=m},LibraryDialog=function(b,e,f,c,m,n){function v(D){for(D=document.elementFromPoint(D.clientX,
+D.clientY);null!=D&&D.parentNode!=x;)D=D.parentNode;var G=null;if(null!=D){var H=x.firstChild;for(G=0;null!=H&&H!=D;)H=H.nextSibling,G++}return G}function d(D,G,H,N,F,I,Q,X,L){try{if(b.spinner.stop(),null==G||"image/"==G.substring(0,6))if(null==D&&null!=Q||null==z[D]){var U=function(){T.innerText="";T.style.cursor="pointer";T.style.whiteSpace="nowrap";T.style.textOverflow="ellipsis";mxUtils.write(T,null!=V.title&&0<V.title.length?V.title:mxResources.get("untitled"));T.style.color=null==V.title||0==
+V.title.length?"#d0d0d0":""};x.style.backgroundImage="";y.style.display="none";var W=F,t=I;if(F>b.maxImageSize||I>b.maxImageSize){var C=Math.min(1,Math.min(b.maxImageSize/Math.max(1,F)),b.maxImageSize/Math.max(1,I));F*=C;I*=C}W>t?(t=Math.round(100*t/W),W=100):(W=Math.round(100*W/t),t=100);var M=document.createElement("div");M.setAttribute("draggable","true");M.style.display="inline-block";M.style.position="relative";M.style.padding="0 12px";M.style.cursor="move";mxUtils.setPrefixedStyle(M.style,"transition",
+"transform .1s ease-in-out");if(null!=D){var S=document.createElement("img");S.setAttribute("src",K.convert(D));S.style.width=W+"px";S.style.height=t+"px";S.style.margin="10px";S.style.paddingBottom=Math.floor((100-t)/2)+"px";S.style.paddingLeft=Math.floor((100-W)/2)+"px";M.appendChild(S)}else if(null!=Q){var P=b.stringToCells(Graph.decompress(Q.xml));0<P.length&&(b.sidebar.createThumb(P,100,100,M,null,!0,!1),M.firstChild.style.display="inline-block",M.firstChild.style.cursor="")}var R=document.createElement("img");
+R.setAttribute("src",Editor.closeBlackImage);R.setAttribute("border","0");R.setAttribute("title",mxResources.get("delete"));R.setAttribute("align","top");R.style.paddingTop="4px";R.style.position="absolute";R.style.marginLeft="-12px";R.style.zIndex="1";R.style.cursor="pointer";mxEvent.addListener(R,"dragstart",function(da){mxEvent.consume(da)});(function(da,ea,ka){mxEvent.addListener(R,"click",function(aa){z[ea]=null;for(var Ba=0;Ba<l.length;Ba++)if(null!=l[Ba].data&&l[Ba].data==ea||null!=l[Ba].xml&&
+null!=ka&&l[Ba].xml==ka.xml){l.splice(Ba,1);break}M.parentNode.removeChild(da);0==l.length&&(x.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",y.style.display="");mxEvent.consume(aa)});mxEvent.addListener(R,"dblclick",function(aa){mxEvent.consume(aa)})})(M,D,Q);M.appendChild(R);M.style.marginBottom="30px";var T=document.createElement("div");T.style.position="absolute";T.style.boxSizing="border-box";T.style.bottom="-18px";T.style.left="10px";T.style.right="10px";T.style.backgroundColor=
+Editor.isDarkMode()?Editor.darkColor:"#ffffff";T.style.overflow="hidden";T.style.textAlign="center";var V=null;null!=D?(V={data:D,w:F,h:I,title:L},null!=X&&(V.aspect=X),z[D]=S,l.push(V)):null!=Q&&(Q.aspect="fixed",l.push(Q),V=Q);mxEvent.addListener(T,"keydown",function(da){13==da.keyCode&&null!=O&&(O(),O=null,mxEvent.consume(da))});U();M.appendChild(T);mxEvent.addListener(T,"mousedown",function(da){"true"!=T.getAttribute("contentEditable")&&mxEvent.consume(da)});P=function(da){if(mxClient.IS_IOS||
+mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var ea=new FilenameDialog(b,V.title||"",mxResources.get("ok"),function(ka){null!=ka&&(V.title=ka,U())},mxResources.get("enterValue"));b.showDialog(ea.container,300,80,!0,!0);ea.init();mxEvent.consume(da)}else if("true"!=T.getAttribute("contentEditable")){null!=O&&(O(),O=null);if(null==V.title||0==V.title.length)T.innerText="";T.style.textOverflow="";T.style.whiteSpace="";T.style.cursor="text";T.style.color="";T.setAttribute("contentEditable",
+"true");mxUtils.setPrefixedStyle(T.style,"user-select","text");T.focus();document.execCommand("selectAll",!1,null);O=function(){T.removeAttribute("contentEditable");T.style.cursor="pointer";V.title=T.innerHTML;U()};mxEvent.consume(da)}};mxEvent.addListener(T,"click",P);mxEvent.addListener(M,"dblclick",P);x.appendChild(M);mxEvent.addListener(M,"dragstart",function(da){null==D&&null!=Q&&(R.style.visibility="hidden",T.style.visibility="hidden");mxClient.IS_FF&&null!=Q.xml&&da.dataTransfer.setData("Text",
+Q.xml);A=v(da);mxClient.IS_GC&&(M.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(M.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(M,30);R.style.visibility="";T.style.visibility=""},0)});mxEvent.addListener(M,"dragend",function(da){"hidden"==R.style.visibility&&(R.style.visibility="",T.style.visibility="");A=null;mxUtils.setOpacity(M,100);mxUtils.setPrefixedStyle(M.style,"transform",null)})}else u||(u=!0,b.handleError({message:mxResources.get("fileExists")}));else{F=
+!1;try{if(W=mxUtils.parseXml(D),"mxlibrary"==W.documentElement.nodeName){t=JSON.parse(mxUtils.getTextContent(W.documentElement));if(null!=t&&0<t.length)for(var Y=0;Y<t.length;Y++)null!=t[Y].xml?d(null,null,0,0,0,0,t[Y]):d(t[Y].data,null,0,0,t[Y].w,t[Y].h,null,"fixed",t[Y].title);F=!0}else if("mxfile"==W.documentElement.nodeName){var ba=W.documentElement.getElementsByTagName("diagram");for(Y=0;Y<ba.length;Y++){t=mxUtils.getTextContent(ba[Y]);P=b.stringToCells(Graph.decompress(t));var Z=b.editor.graph.getBoundingBoxFromGeometry(P);
+d(null,null,0,0,0,0,{xml:t,w:Z.width,h:Z.height})}F=!0}}catch(da){}F||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(da){}return null}function g(D){D.dataTransfer.dropEffect=null!=A?"move":"copy";D.stopPropagation();D.preventDefault()}function k(D){D.stopPropagation();D.preventDefault();u=!1;J=v(D);if(null!=A)null!=J&&J<x.children.length?(l.splice(J>A?J-1:J,0,l.splice(A,1)[0]),x.insertBefore(x.children[A],x.children[J])):(l.push(l.splice(A,1)[0]),x.appendChild(x.children[A]));
+else if(0<D.dataTransfer.files.length)b.importFiles(D.dataTransfer.files,0,0,b.maxImageSize,E(D));else if(0<=mxUtils.indexOf(D.dataTransfer.types,"text/uri-list")){var G=decodeURIComponent(D.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(G)||/(\.png)($|\?)/i.test(G)||/(\.gif)($|\?)/i.test(G)||/(\.svg)($|\?)/i.test(G))&&b.loadImage(G,function(H){d(G,null,0,0,H.width,H.height);x.scrollTop=x.scrollHeight})}D.stopPropagation();D.preventDefault()}var l=[];f=document.createElement("div");
f.style.height="100%";var p=document.createElement("div");p.style.whiteSpace="nowrap";p.style.height="40px";f.appendChild(p);mxUtils.write(p,mxResources.get("filename")+":");null==e&&(e=b.defaultLibraryName+".xml");var q=document.createElement("input");q.setAttribute("value",e);q.style.marginRight="20px";q.style.marginLeft="10px";q.style.width="500px";null==m||m.isRenamable()||q.setAttribute("disabled","true");this.init=function(){if(null==m||m.isRenamable())q.focus(),mxClient.IS_GC||mxClient.IS_FF||
5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)};p.appendChild(q);var x=document.createElement("div");x.style.borderWidth="1px 0px 1px 0px";x.style.borderColor="#d3d3d3";x.style.borderStyle="solid";x.style.marginTop="6px";x.style.overflow="auto";x.style.height="340px";x.style.backgroundPosition="center center";x.style.backgroundRepeat="no-repeat";0==l.length&&Graph.fileSupport&&(x.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var y=document.createElement("div");
-y.style.position="absolute";y.style.width="640px";y.style.top="260px";y.style.textAlign="center";y.style.fontSize="22px";y.style.color="#a0c3ff";mxUtils.write(y,mxResources.get("dragImagesHere"));f.appendChild(y);var z={},A=null,K=null,O=null;e=function(D){"true"!=mxEvent.getSource(D).getAttribute("contentEditable")&&null!=O&&(O(),O=null,mxEvent.consume(D))};mxEvent.addListener(x,"mousedown",e);mxEvent.addListener(x,"pointerdown",e);mxEvent.addListener(x,"touchstart",e);var L=new mxUrlConverter,u=
-!1;if(null!=c)for(e=0;e<c.length;e++)p=c[e],d(p.data,null,0,0,p.w,p.h,p,p.aspect,p.title);mxEvent.addListener(x,"dragleave",function(D){y.style.cursor="";for(var G=mxEvent.getSource(D);null!=G;){if(G==x||G==y){D.stopPropagation();D.preventDefault();break}G=G.parentNode}});var E=function(D){return function(G,N,I,F,H,R,X,J,W){null!=W&&(/(\.v(dx|sdx?))($|\?)/i.test(W.name)||/(\.vs(x|sx?))($|\?)/i.test(W.name))?b.importVisio(W,mxUtils.bind(this,function(V){d(V,N,I,F,H,R,X,"fixed",mxEvent.isAltDown(D)?
-null:X.substring(0,X.lastIndexOf(".")).replace(/_/g," "))})):null!=W&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(G,W.name)?b.isExternalDataComms()?b.parseFile(W,mxUtils.bind(this,function(V){4==V.readyState&&(b.spinner.stop(),200<=V.status&&299>=V.status&&(d(V.responseText,N,I,F,H,R,X,"fixed",mxEvent.isAltDown(D)?null:X.substring(0,X.lastIndexOf(".")).replace(/_/g," ")),x.scrollTop=x.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):
-(d(G,N,I,F,H,R,X,"fixed",mxEvent.isAltDown(D)?null:X.substring(0,X.lastIndexOf(".")).replace(/_/g," ")),x.scrollTop=x.scrollHeight)}};mxEvent.addListener(x,"dragover",g);mxEvent.addListener(x,"drop",k);mxEvent.addListener(y,"dragover",g);mxEvent.addListener(y,"drop",k);f.appendChild(x);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&&
+y.style.position="absolute";y.style.width="640px";y.style.top="260px";y.style.textAlign="center";y.style.fontSize="22px";y.style.color="#a0c3ff";mxUtils.write(y,mxResources.get("dragImagesHere"));f.appendChild(y);var z={},A=null,J=null,O=null;e=function(D){"true"!=mxEvent.getSource(D).getAttribute("contentEditable")&&null!=O&&(O(),O=null,mxEvent.consume(D))};mxEvent.addListener(x,"mousedown",e);mxEvent.addListener(x,"pointerdown",e);mxEvent.addListener(x,"touchstart",e);var K=new mxUrlConverter,u=
+!1;if(null!=c)for(e=0;e<c.length;e++)p=c[e],d(p.data,null,0,0,p.w,p.h,p,p.aspect,p.title);mxEvent.addListener(x,"dragleave",function(D){y.style.cursor="";for(var G=mxEvent.getSource(D);null!=G;){if(G==x||G==y){D.stopPropagation();D.preventDefault();break}G=G.parentNode}});var E=function(D){return function(G,H,N,F,I,Q,X,L,U){null!=U&&(/(\.v(dx|sdx?))($|\?)/i.test(U.name)||/(\.vs(x|sx?))($|\?)/i.test(U.name))?b.importVisio(U,mxUtils.bind(this,function(W){d(W,H,N,F,I,Q,X,"fixed",mxEvent.isAltDown(D)?
+null:X.substring(0,X.lastIndexOf(".")).replace(/_/g," "))})):null!=U&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(G,U.name)?b.isExternalDataComms()?b.parseFile(U,mxUtils.bind(this,function(W){4==W.readyState&&(b.spinner.stop(),200<=W.status&&299>=W.status&&(d(W.responseText,H,N,F,I,Q,X,"fixed",mxEvent.isAltDown(D)?null:X.substring(0,X.lastIndexOf(".")).replace(/_/g," ")),x.scrollTop=x.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):
+(d(G,H,N,F,I,Q,X,"fixed",mxEvent.isAltDown(D)?null:X.substring(0,X.lastIndexOf(".")).replace(/_/g," ")),x.scrollTop=x.scrollHeight)}};mxEvent.addListener(x,"dragover",g);mxEvent.addListener(x,"drop",k);mxEvent.addListener(y,"dragover",g);mxEvent.addListener(y,"drop",k);f.appendChild(x);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==m||m.constructor!=DriveLibrary&&m.constructor!=GitHubLibrary||(p=mxUtils.button(mxResources.get("link"),function(){b.spinner.spin(document.body,mxResources.get("loading"))&&m.getPublicUrl(function(D){b.spinner.stop();if(null!=D){var G=b.getSearch("create title mode url drive splash state clibs ui".split(" "));G+=(0==G.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(D);D=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+
"/"+G,null,null,null,null,"Check out the library I made using @drawio");b.showDialog(D.container,450,240,!0);D.init()}else m.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(m.getId())}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),p.className="geBtn",c.appendChild(p));p=mxUtils.button(mxResources.get("export"),
function(){var D=b.createLibraryDataFromImages(l),G=q.value;/(\.xml)$/i.test(G)||(G+=".xml");b.isLocalFileSave()?b.saveLocalFile(D,G,"text/xml",null,null,!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(G)+"&format=xml&xml="+encodeURIComponent(D))).simulate(document,"_blank")});p.setAttribute("id","btnDownload");p.className="geBtn";c.appendChild(p);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var B=document.createElement("input");B.setAttribute("multiple","multiple");
-B.setAttribute("type","file");mxEvent.addListener(B,"change",function(D){u=!1;b.importFiles(B.files,0,0,b.maxImageSize,function(G,N,I,F,H,R,X,J,W){null!=B.files&&(E(D)(G,N,I,F,H,R,X,J,W),B.type="",B.type="file",B.value="")});x.scrollTop=x.scrollHeight});B.style.display="none";document.body.appendChild(B);b.libDlgFileInputElt=B}p=mxUtils.button(mxResources.get("import"),function(){null!=O&&(O(),O=null);b.libDlgFileInputElt.click()});p.setAttribute("id","btnAddImage");p.className="geBtn";c.appendChild(p)}p=
-mxUtils.button(mxResources.get("addImages"),function(){null!=O&&(O(),O=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(D,G,N){u=!1;if(null!=D){if("data:image/"==D.substring(0,11)){var I=D.indexOf(",");0<I&&(D=D.substring(0,I)+";base64,"+D.substring(I+1))}d(D,null,0,0,G,N);x.scrollTop=x.scrollHeight}})});p.setAttribute("id","btnAddImageUrl");p.className="geBtn";c.appendChild(p);this.saveBtnClickHandler=function(D,G,N,I){b.saveLibrary(D,G,N,I)};p=mxUtils.button(mxResources.get("save"),
+B.setAttribute("type","file");mxEvent.addListener(B,"change",function(D){u=!1;b.importFiles(B.files,0,0,b.maxImageSize,function(G,H,N,F,I,Q,X,L,U){null!=B.files&&(E(D)(G,H,N,F,I,Q,X,L,U),B.type="",B.type="file",B.value="")});x.scrollTop=x.scrollHeight});B.style.display="none";document.body.appendChild(B);b.libDlgFileInputElt=B}p=mxUtils.button(mxResources.get("import"),function(){null!=O&&(O(),O=null);b.libDlgFileInputElt.click()});p.setAttribute("id","btnAddImage");p.className="geBtn";c.appendChild(p)}p=
+mxUtils.button(mxResources.get("addImages"),function(){null!=O&&(O(),O=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(D,G,H){u=!1;if(null!=D){if("data:image/"==D.substring(0,11)){var N=D.indexOf(",");0<N&&(D=D.substring(0,N)+";base64,"+D.substring(N+1))}d(D,null,0,0,G,H);x.scrollTop=x.scrollHeight}})});p.setAttribute("id","btnAddImageUrl");p.className="geBtn";c.appendChild(p);this.saveBtnClickHandler=function(D,G,H,N){b.saveLibrary(D,G,H,N)};p=mxUtils.button(mxResources.get("save"),
mxUtils.bind(this,function(){null!=O&&(O(),O=null);this.saveBtnClickHandler(q.value,l,m,n)}));p.setAttribute("id","btnSave");p.className="geBtn gePrimaryBtn";c.appendChild(p);b.editor.cancelFirst||c.appendChild(e);f.appendChild(c);this.container=f},EditShapeDialog=function(b,e,f,c,m){c=null!=c?c:300;m=null!=m?m:120;var n=document.createElement("table"),v=document.createElement("tbody");n.style.cellPadding="4px";var d=document.createElement("tr");var g=document.createElement("td");g.setAttribute("colspan",
"2");g.style.fontSize="10pt";mxUtils.write(g,f);d.appendChild(g);v.appendChild(d);d=document.createElement("tr");g=document.createElement("td");var k=document.createElement("textarea");k.style.outline="none";k.style.resize="none";k.style.width=c-200+"px";k.style.height=m+"px";this.textarea=k;this.init=function(){k.focus();k.scrollTop=0};g.appendChild(k);d.appendChild(g);g=document.createElement("td");f=document.createElement("div");f.style.position="relative";f.style.border="1px solid gray";f.style.top=
"6px";f.style.width="200px";f.style.height=m+4+"px";f.style.overflow="hidden";f.style.marginBottom="16px";mxEvent.disableContextMenu(f);g.appendChild(f);var l=new Graph(f);l.setEnabled(!1);var p=b.editor.graph.cloneCell(e);l.addCells([p]);f=l.view.getState(p);var q="";null!=f.shape&&null!=f.shape.stencil&&(q=mxUtils.getPrettyXml(f.shape.stencil.desc));mxUtils.write(k,q||"");f=l.getGraphBounds();m=Math.min(160/f.width,(m-40)/f.height);l.view.scaleAndTranslate(m,20/m-f.x,20/m-f.y);d.appendChild(g);
v.appendChild(d);d=document.createElement("tr");g=document.createElement("td");g.setAttribute("colspan","2");g.style.paddingTop="2px";g.style.whiteSpace="nowrap";g.setAttribute("align","right");b.isOffline()||(m=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/shape-complex-create-edit")}),m.className="geBtn",g.appendChild(m));m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});m.className="geBtn";b.editor.cancelFirst&&g.appendChild(m);
-var x=function(y,z,A){var K=k.value,O=mxUtils.parseXml(K);K=mxUtils.getPrettyXml(O.documentElement);O=O.documentElement.getElementsByTagName("parsererror");if(null!=O&&0<O.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(A&&b.hideDialog(),O=!y.model.contains(z),!A||O||K!=q){K=Graph.compress(K);y.getModel().beginUpdate();try{if(O){var L=b.editor.graph.getFreeInsertPoint();z.geometry.x=L.x;z.geometry.y=L.y;y.addCell(z)}y.setCellStyles(mxConstants.STYLE_SHAPE,
-"stencil("+K+")",[z])}catch(u){throw u;}finally{y.getModel().endUpdate()}O&&(y.setSelectionCell(z),y.scrollCellToVisible(z))}};f=mxUtils.button(mxResources.get("preview"),function(){x(l,p,!1)});f.className="geBtn";g.appendChild(f);f=mxUtils.button(mxResources.get("apply"),function(){x(b.editor.graph,e,!0)});f.className="geBtn gePrimaryBtn";g.appendChild(f);b.editor.cancelFirst||g.appendChild(m);d.appendChild(g);v.appendChild(d);n.appendChild(v);this.container=n},CustomDialog=function(b,e,f,c,m,n,
+var x=function(y,z,A){var J=k.value,O=mxUtils.parseXml(J);J=mxUtils.getPrettyXml(O.documentElement);O=O.documentElement.getElementsByTagName("parsererror");if(null!=O&&0<O.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(A&&b.hideDialog(),O=!y.model.contains(z),!A||O||J!=q){J=Graph.compress(J);y.getModel().beginUpdate();try{if(O){var K=b.editor.graph.getFreeInsertPoint();z.geometry.x=K.x;z.geometry.y=K.y;y.addCell(z)}y.setCellStyles(mxConstants.STYLE_SHAPE,
+"stencil("+J+")",[z])}catch(u){throw u;}finally{y.getModel().endUpdate()}O&&(y.setSelectionCell(z),y.scrollCellToVisible(z))}};f=mxUtils.button(mxResources.get("preview"),function(){x(l,p,!1)});f.className="geBtn";g.appendChild(f);f=mxUtils.button(mxResources.get("apply"),function(){x(b.editor.graph,e,!0)});f.className="geBtn gePrimaryBtn";g.appendChild(f);b.editor.cancelFirst||g.appendChild(m);d.appendChild(g);v.appendChild(d);n.appendChild(v);this.container=n},CustomDialog=function(b,e,f,c,m,n,
v,d,g,k,l){var p=document.createElement("div");p.appendChild(e);var q=document.createElement("div");q.style.marginTop="30px";q.style.textAlign="center";null!=v&&q.appendChild(v);b.isOffline()||null==n||(e=mxUtils.button(mxResources.get("help"),function(){b.openLink(n)}),e.className="geBtn",q.appendChild(e));g=mxUtils.button(g||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c()});g.className="geBtn";d&&(g.style.display="none");b.editor.cancelFirst&&q.appendChild(g);m=mxUtils.button(m||
mxResources.get("ok"),mxUtils.bind(this,function(){k||b.hideDialog(null,null,this.container);if(null!=f){var x=f();if("string"===typeof x){b.showError(mxResources.get("error"),x);return}}k&&b.hideDialog(null,null,this.container)}));q.appendChild(m);m.className="geBtn gePrimaryBtn";b.editor.cancelFirst||q.appendChild(g);if(null!=l)for(d=0;d<l.length;d++)(function(x,y,z){x=mxUtils.button(x,function(A){y(A)});null!=z&&x.setAttribute("title",z);x.className="geBtn";q.appendChild(x)})(l[d][0],l[d][1],l[d][2]);
-p.appendChild(q);this.cancelBtn=g;this.okButton=m;this.container=p},TemplatesDialog=function(b,e,f,c,m,n,v,d,g,k,l,p,q,x,y){function z(ia){Ja.innerHTML=mxUtils.htmlEntities(ia);Ja.style.display="block";setTimeout(function(){Ja.style.display="none"},4E3)}function A(){null!=t&&(t.style.fontWeight="normal",t.style.textDecoration="none",C=t,t=null)}function K(ia,ma,ca,fa,oa,la,qa){if(-1<ia.className.indexOf("geTempDlgRadioBtnActive"))return!1;ia.className+=" geTempDlgRadioBtnActive";J.querySelector(".geTempDlgRadioBtn[data-id="+
-fa+"]").className="geTempDlgRadioBtn "+(qa?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");J.querySelector("."+ma).src="/images/"+ca+"-sel.svg";J.querySelector("."+oa).src="/images/"+la+".svg";return!0}function O(ia,ma,ca,fa){function oa(ka,Ea){null==qa?(ka=/^https?:\/\//.test(ka)&&!b.editor.isCorsEnabledForUrl(ka)?PROXY_URL+"?url="+encodeURIComponent(ka):TEMPLATE_PATH+"/"+ka,mxUtils.get(ka,mxUtils.bind(this,function(Pa){200<=Pa.getStatus()&&299>=Pa.getStatus()&&(qa=Pa.getText());Ea(qa)}))):Ea(qa)}
-function la(ka,Ea,Pa){if(null!=ka&&mxUtils.isAncestorNode(document.body,ma)&&(ka=mxUtils.parseXml(ka),ka=Editor.extractGraphModel(ka.documentElement,!0),null!=ka)){"mxfile"==ka.nodeName&&(ka=Editor.parseDiagramNode(ka.getElementsByTagName("diagram")[0]));var Sa=new mxCodec(ka.ownerDocument),Ha=new mxGraphModel;Sa.decode(ka,Ha);ka=Ha.root.getChildAt(0).children||[];b.sidebar.createTooltip(ma,ka,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!=ia.title?mxResources.get(ia.title,null,ia.title):null,!0,new mxPoint(Ea,Pa),!0,null,!0);var La=document.createElement("div");La.className="geTempDlgDialogMask";J.appendChild(La);var Qa=b.sidebar.hideTooltip;b.sidebar.hideTooltip=function(){La&&(J.removeChild(La),La=null,Qa.apply(this,arguments),b.sidebar.hideTooltip=Qa)};mxEvent.addListener(La,"click",function(){b.sidebar.hideTooltip()})}}var qa=null;if(Oa||b.sidebar.currentElt==
-ma)b.sidebar.hideTooltip();else{var pa=function(ka){Oa&&b.sidebar.currentElt==ma&&la(ka,mxEvent.getClientX(fa),mxEvent.getClientY(fa));Oa=!1;ca.src="/images/icon-search.svg"};b.sidebar.hideTooltip();b.sidebar.currentElt=ma;Oa=!0;ca.src="/images/aui-wait.gif";ia.isExt?g(ia,pa,function(){z(mxResources.get("cantLoadPrev"));Oa=!1;ca.src="/images/icon-search.svg"}):oa(ia.url,pa)}}function L(ia,ma,ca){if(null!=M){for(var fa=M.className.split(" "),oa=0;oa<fa.length;oa++)if(-1<fa[oa].indexOf("Active")){fa.splice(oa,
-1);break}M.className=fa.join(" ")}null!=ia?(M=ia,M.className+=" "+ma,Q=ca,Ia.className="geTempDlgCreateBtn"):(Q=M=null,Ia.className="geTempDlgCreateBtn geTempDlgBtnDisabled")}function u(ia,ma){if(null!=Q){var ca=function(pa){qa.isExternal?g(qa,function(ka){fa(ka,pa)},oa):qa.url?mxUtils.get(TEMPLATE_PATH+"/"+qa.url,mxUtils.bind(this,function(ka){200<=ka.getStatus()&&299>=ka.getStatus()?fa(ka.getText(),pa):oa()})):fa(b.emptyDiagramXml,pa)},fa=function(pa,ka){y||b.hideDialog(!0);e(pa,ka,qa,ma)},oa=function(){z(mxResources.get("cannotLoad"));
-la()},la=function(){Q=qa;Ia.className="geTempDlgCreateBtn";ma&&(Ka.className="geTempDlgOpenBtn")},qa=Q;Q=null;"boolean"!==typeof ma&&(ma=qa.isExternal&&p);1==ia?k(qa.url,qa):ma?(Ka.className="geTempDlgOpenBtn geTempDlgBtnDisabled geTempDlgBtnBusy",ca()):(Ia.className="geTempDlgCreateBtn geTempDlgBtnDisabled geTempDlgBtnBusy",ia=null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"),ia=new FilenameDialog(b,b.defaultFilename+".drawio",
-mxResources.get("ok"),ca,ia,function(pa){var ka=null!=pa&&0<pa.length;return ka&&y?(ca(pa),!1):ka},null,null,null,la,x?null:[]),b.showDialog(ia.container,350,80,!0,!0),ia.init())}}function E(ia){Ia.innerHTML=mxUtils.htmlEntities(mxResources.get(da||ia?"create":"copy"));ia=ia?"none":"";p&&(Ka.style.display=ia);for(var ma=J.querySelectorAll(".geTempDlgLinkToDiagram"),ca=0;ca<ma.length;ca++)ma[ca].style.display=ia}function B(ia,ma,ca,fa,oa){oa||(ha.innerText="",L(),T=ia,Y=fa);var la=null;if(ca){la=document.createElement("table");
-la.className="geTempDlgDiagramsListGrid";var qa=document.createElement("tr"),pa=document.createElement("th");pa.style.width="50%";pa.innerHTML=mxUtils.htmlEntities(mxResources.get("diagram"));qa.appendChild(pa);pa=document.createElement("th");pa.style.width="25%";pa.innerHTML=mxUtils.htmlEntities(mxResources.get("changedBy"));qa.appendChild(pa);pa=document.createElement("th");pa.style.width="25%";pa.innerHTML=mxUtils.htmlEntities(mxResources.get("lastModifiedOn"));qa.appendChild(pa);la.appendChild(qa);
-ha.appendChild(la)}for(qa=0;qa<ia.length;qa++){ia[qa].isExternal=!ma;var ka=ia[qa].url,Ea=(pa=mxUtils.htmlEntities(ma?mxResources.get(ia[qa].title,null,ia[qa].title):ia[qa].title))||ia[qa].url,Pa=ia[qa].imgUrl,Sa=mxUtils.htmlEntities(ia[qa].changedBy||""),Ha="";ia[qa].lastModifiedOn&&(Ha=b.timeSince(new Date(ia[qa].lastModifiedOn)),null==Ha&&(Ha=mxResources.get("lessThanAMinute")),Ha=mxUtils.htmlEntities(mxResources.get("timeAgo",[Ha],"{1} ago")));Pa||(Pa=TEMPLATE_PATH+"/"+ka.substring(0,ka.length-
-4)+".png");ka=ca?50:15;null!=pa&&pa.length>ka&&(pa=pa.substring(0,ka)+"&hellip;");if(ca){var La=document.createElement("tr");Pa=document.createElement("td");var Qa=document.createElement("img");Qa.src="/images/icon-search.svg";Qa.className="geTempDlgDiagramListPreviewBtn";Qa.setAttribute("title",mxResources.get("preview"));oa||Pa.appendChild(Qa);Ea=document.createElement("span");Ea.className="geTempDlgDiagramTitle";Ea.innerHTML=pa;Pa.appendChild(Ea);La.appendChild(Pa);Pa=document.createElement("td");
-Pa.innerHTML=Sa;La.appendChild(Pa);Pa=document.createElement("td");Pa.innerHTML=Ha;La.appendChild(Pa);la.appendChild(La);null==M&&(E(ma),L(La,"geTempDlgDiagramsListGridActive",ia[qa]));(function(Ma,Ta,Ua){mxEvent.addListener(La,"click",function(){M!=Ta&&(E(ma),L(Ta,"geTempDlgDiagramsListGridActive",Ma))});mxEvent.addListener(La,"dblclick",u);mxEvent.addListener(Qa,"click",function(Va){O(Ma,Ta,Ua,Va)})})(ia[qa],La,Qa)}else{var Na=document.createElement("div");Na.className="geTempDlgDiagramTile";Na.setAttribute("title",
-Ea);null==M&&(E(ma),L(Na,"geTempDlgDiagramTileActive",ia[qa]));Sa=document.createElement("div");Sa.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var Ra=document.createElement("img");Ra.style.display="none";(function(Ma,Ta,Ua){Ra.onload=function(){Ta.className="geTempDlgDiagramTileImg";Ma.style.display=""};Ra.onerror=function(){this.src!=Ua?this.src=Ua:Ta.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(Ra,Sa,Pa?Pa.replace(".drawio.xml","").replace(".drawio",
-"").replace(".xml",""):"");Ra.src=Pa;Sa.appendChild(Ra);Na.appendChild(Sa);Sa=document.createElement("div");Sa.className="geTempDlgDiagramTileLbl";Sa.innerHTML=null!=pa?pa:"";Na.appendChild(Sa);Qa=document.createElement("img");Qa.src="/images/icon-search.svg";Qa.className="geTempDlgDiagramPreviewBtn";Qa.setAttribute("title",mxResources.get("preview"));oa||Na.appendChild(Qa);(function(Ma,Ta,Ua){mxEvent.addListener(Na,"click",function(){M!=Ta&&(E(ma),L(Ta,"geTempDlgDiagramTileActive",Ma))});mxEvent.addListener(Na,
-"dblclick",u);mxEvent.addListener(Qa,"click",function(Va){O(Ma,Ta,Ua,Va)})})(ia[qa],Na,Qa);ha.appendChild(Na)}}for(var Xa in fa)ia=fa[Xa],0<ia.length&&(oa=document.createElement("div"),oa.className="geTempDlgImportCat",oa.innerHTML=mxResources.get(Xa,null,Xa),ha.appendChild(oa),B(ia,ma,ca,null,!0))}function D(ia,ma){na.innerHTML="";L();var ca=Math.floor(na.offsetWidth/150)-1;ma=!ma&&ia.length>ca?ca:ia.length;for(var fa=0;fa<ma;fa++){var oa=ia[fa];oa.isCategory=!0;var la=document.createElement("div"),
-qa=mxResources.get(oa.title);null==qa&&(qa=oa.title.substring(0,1).toUpperCase()+oa.title.substring(1));la.className="geTempDlgNewDiagramCatItem";la.setAttribute("title",qa);qa=mxUtils.htmlEntities(qa);15<qa.length&&(qa=qa.substring(0,15)+"&hellip;");null==M&&(E(!0),L(la,"geTempDlgNewDiagramCatItemActive",oa));var pa=document.createElement("div");pa.className="geTempDlgNewDiagramCatItemImg";var ka=document.createElement("img");ka.src=NEW_DIAGRAM_CATS_PATH+"/"+oa.img;pa.appendChild(ka);la.appendChild(pa);
-pa=document.createElement("div");pa.className="geTempDlgNewDiagramCatItemLbl";pa.innerHTML=qa;la.appendChild(pa);na.appendChild(la);(function(Ea,Pa){mxEvent.addListener(la,"click",function(){M!=Pa&&(E(!0),L(Pa,"geTempDlgNewDiagramCatItemActive",Ea))});mxEvent.addListener(la,"dblclick",u)})(oa,la)}la=document.createElement("div");la.className="geTempDlgNewDiagramCatItem";qa=mxResources.get("showAllTemps");la.setAttribute("title",qa);pa=document.createElement("div");pa.className="geTempDlgNewDiagramCatItemImg";
-pa.innerHTML="...";pa.style.fontSize="32px";la.appendChild(pa);pa=document.createElement("div");pa.className="geTempDlgNewDiagramCatItemLbl";pa.innerHTML=qa;la.appendChild(pa);na.appendChild(la);mxEvent.addListener(la,"click",function(){function Ea(){var Sa=Pa.querySelector(".geTemplateDrawioCatLink");null!=Sa?Sa.click():setTimeout(Ea,200)}da=!0;var Pa=J.querySelector(".geTemplatesList");Pa.style.display="block";Ga.style.width="";xa.style.display="";xa.value="";aa=null;Ea()});ja.style.display=ia.length<=
-ca?"none":""}function G(ia,ma,ca){function fa(Ra,Xa){var Ma=mxResources.get(Ra);null==Ma&&(Ma=Ra.substring(0,1).toUpperCase()+Ra.substring(1));Ra=Ma+" ("+Xa.length+")";var Ta=Ma=mxUtils.htmlEntities(Ma);15<Ma.length&&(Ma=Ma.substring(0,15)+"&hellip;");return{lbl:Ma+" ("+Xa.length+")",fullLbl:Ra,lblOnly:Ta}}function oa(Ra,Xa,Ma,Ta,Ua){mxEvent.addListener(Ma,"click",function(){t!=Ma&&(null!=t?(t.style.fontWeight="normal",t.style.textDecoration="none"):(Da.style.display="none",Ca.style.minHeight="100%"),
-t=Ma,t.style.fontWeight="bold",t.style.textDecoration="underline",Ga.scrollTop=0,W&&(V=!0),ba.innerHTML=Xa,Aa.style.display="none",B(Ua?ma[Ra]:Ta?Ba[Ra][Ta]:ia[Ra],Ua?!1:!0))})}var la=J.querySelector(".geTemplatesList");if(0<ca){ca=document.createElement("div");ca.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(ca,mxResources.get("custom"));la.appendChild(ca);for(var qa in ma){ca=document.createElement("div");var pa=ma[qa];
-pa=fa(qa,pa);ca.className="geTemplateCatLink";ca.setAttribute("title",pa.fullLbl);ca.innerHTML=pa.lbl;la.appendChild(ca);oa(qa,pa.lblOnly,ca,null,!0)}ca=document.createElement("div");ca.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(ca,"draw.io");la.appendChild(ca)}for(qa in ia){var ka=Ba[qa],Ea=ca=document.createElement(ka?"ul":"div");pa=ia[qa];pa=fa(qa,pa);if(null!=ka){var Pa=document.createElement("li"),Sa=document.createElement("div");
-Sa.className="geTempTreeCaret geTemplateCatLink geTemplateDrawioCatLink";Sa.style.padding="0";Sa.setAttribute("title",pa.fullLbl);Sa.innerHTML=pa.lbl;Ea=Sa;Pa.appendChild(Sa);var Ha=document.createElement("ul");Ha.className="geTempTreeNested";Ha.style.visibility="hidden";for(var La in ka){var Qa=document.createElement("li"),Na=fa(La,ka[La]);Qa.setAttribute("title",Na.fullLbl);Qa.innerHTML=Na.lbl;Qa.className="geTemplateCatLink";Qa.style.padding="0";Qa.style.margin="0";oa(qa,Na.lblOnly,Qa,La);Ha.appendChild(Qa)}Pa.appendChild(Ha);
-ca.className="geTempTree";ca.appendChild(Pa);(function(Ra,Xa){mxEvent.addListener(Xa,"click",function(){for(var Ma=Ra.querySelectorAll("li"),Ta=0;Ta<Ma.length;Ta++)Ma[Ta].style.margin="";Ra.style.visibility="visible";Ra.classList.toggle("geTempTreeActive");Ra.classList.toggle("geTempTreeNested")&&setTimeout(function(){for(var Ua=0;Ua<Ma.length;Ua++)Ma[Ua].style.margin="0";Ra.style.visibility="hidden"},250);Xa.classList.toggle("geTempTreeCaret-down")})})(Ha,Sa)}else ca.className="geTemplateCatLink geTemplateDrawioCatLink",
-ca.setAttribute("title",pa.fullLbl),ca.innerHTML=pa.lbl;la.appendChild(ca);oa(qa,pa.lblOnly,Ea)}}function N(){mxUtils.get(c,function(ia){if(!va){va=!0;ia=ia.getXml().documentElement.firstChild;for(var ma={};null!=ia;){if("undefined"!==typeof ia.getAttribute)if("clibs"==ia.nodeName){for(var ca=ia.getAttribute("name"),fa=ia.getElementsByTagName("add"),oa=[],la=0;la<fa.length;la++)oa.push(encodeURIComponent(mxUtils.getTextContent(fa[la])));null!=ca&&0<oa.length&&(ma[ca]=oa.join(";"))}else if(oa=ia.getAttribute("url"),
-null!=oa){fa=ia.getAttribute("section");ca=ia.getAttribute("subsection");if(null==fa&&(la=oa.indexOf("/"),fa=oa.substring(0,la),null==ca)){var qa=oa.indexOf("/",la+1);-1<qa&&(ca=oa.substring(la+1,qa))}la=ta[fa];null==la&&(ua++,la=[],ta[fa]=la);oa=ia.getAttribute("clibs");null!=ma[oa]&&(oa=ma[oa]);oa={url:ia.getAttribute("url"),libs:ia.getAttribute("libs"),title:ia.getAttribute("title")||ia.getAttribute("name"),preview:ia.getAttribute("preview"),clibs:oa,tags:ia.getAttribute("tags")};la.push(oa);null!=
-ca&&(la=Ba[fa],null==la&&(la={},Ba[fa]=la),fa=la[ca],null==fa&&(fa=[],la[ca]=fa),fa.push(oa))}ia=ia.nextSibling}G(ta,ea,sa)}})}function I(ia){v&&(Ga.scrollTop=0,ha.innerText="",Fa.spin(ha),V=!1,W=!0,ba.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag")),aa=null,v(ra,function(){z(mxResources.get("cannotLoad"));ra([])},ia?null:n))}function F(ia){if(""==ia)null!=C&&(C.click(),C=null);else{if(null==TemplatesDialog.tagsList[c]){var ma={};for(Ea in ta)for(var ca=ta[Ea],fa=0;fa<ca.length;fa++){var oa=
-ca[fa];if(null!=oa.tags)for(var la=oa.tags.toLowerCase().split(";"),qa=0;qa<la.length;qa++)null==ma[la[qa]]&&(ma[la[qa]]=[]),ma[la[qa]].push(oa)}TemplatesDialog.tagsList[c]=ma}var pa=ia.toLowerCase().split(" ");ma=TemplatesDialog.tagsList[c];if(0<sa&&null==ma.__tagsList__){for(Ea in ea)for(ca=ea[Ea],fa=0;fa<ca.length;fa++)for(oa=ca[fa],la=oa.title.split(" "),la.push(Ea),qa=0;qa<la.length;qa++){var ka=la[qa].toLowerCase();null==ma[ka]&&(ma[ka]=[]);ma[ka].push(oa)}ma.__tagsList__=!0}var Ea=[];ca={};
-for(fa=la=0;fa<pa.length;fa++)if(0<pa[fa].length){ka=ma[pa[fa]];var Pa={};Ea=[];if(null!=ka)for(qa=0;qa<ka.length;qa++)oa=ka[qa],0==la==(null==ca[oa.url])&&(Pa[oa.url]=!0,Ea.push(oa));ca=Pa;la++}0==Ea.length?ba.innerHTML=mxResources.get("noResultsFor",[ia]):B(Ea,!0)}}function H(ia){if(aa!=ia||S!=Z)A(),Ga.scrollTop=0,ha.innerText="",ba.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults"))+' "'+mxUtils.htmlEntities(ia)+'"',ya=null,da?F(ia):d&&(ia?(Fa.spin(ha),V=!1,W=!0,d(ia,ra,function(){z(mxResources.get("searchFailed"));
-ra([])},S?null:n)):I(S)),aa=ia,Z=S}function R(ia){null!=ya&&clearTimeout(ya);13==ia.keyCode?H(xa.value):ya=setTimeout(function(){H(xa.value)},1E3)}var X='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" '+(d?"":'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">'+
+p.appendChild(q);this.cancelBtn=g;this.okButton=m;this.container=p},TemplatesDialog=function(b,e,f,c,m,n,v,d,g,k,l,p,q,x,y){function z(fa){Ia.innerHTML=mxUtils.htmlEntities(fa);Ia.style.display="block";setTimeout(function(){Ia.style.display="none"},4E3)}function A(){null!=t&&(t.style.fontWeight="normal",t.style.textDecoration="none",C=t,t=null)}function J(fa,na,qa,ca,ha,sa,la){if(-1<fa.className.indexOf("geTempDlgRadioBtnActive"))return!1;fa.className+=" geTempDlgRadioBtnActive";L.querySelector(".geTempDlgRadioBtn[data-id="+
+ca+"]").className="geTempDlgRadioBtn "+(la?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");L.querySelector("."+na).src="/images/"+qa+"-sel.svg";L.querySelector("."+ha).src="/images/"+sa+".svg";return!0}function O(fa,na,qa,ca){function ha(oa,ta){null==la?(oa=/^https?:\/\//.test(oa)&&!b.editor.isCorsEnabledForUrl(oa)?PROXY_URL+"?url="+encodeURIComponent(oa):TEMPLATE_PATH+"/"+oa,mxUtils.get(oa,mxUtils.bind(this,function(Na){200<=Na.getStatus()&&299>=Na.getStatus()&&(la=Na.getText());ta(la)}))):ta(la)}
+function sa(oa,ta,Na){if(null!=oa&&mxUtils.isAncestorNode(document.body,na)&&(oa=mxUtils.parseXml(oa),oa=Editor.extractGraphModel(oa.documentElement,!0),null!=oa)){"mxfile"==oa.nodeName&&(oa=Editor.parseDiagramNode(oa.getElementsByTagName("diagram")[0]));var Sa=new mxCodec(oa.ownerDocument),Ga=new mxGraphModel;Sa.decode(oa,Ga);oa=Ga.root.getChildAt(0).children||[];b.sidebar.createTooltip(na,oa,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!=fa.title?mxResources.get(fa.title,null,fa.title):null,!0,new mxPoint(ta,Na),!0,null,!0);var La=document.createElement("div");La.className="geTempDlgDialogMask";L.appendChild(La);var Qa=b.sidebar.hideTooltip;b.sidebar.hideTooltip=function(){La&&(L.removeChild(La),La=null,Qa.apply(this,arguments),b.sidebar.hideTooltip=Qa)};mxEvent.addListener(La,"click",function(){b.sidebar.hideTooltip()})}}var la=null;if(Pa||b.sidebar.currentElt==
+na)b.sidebar.hideTooltip();else{var ma=function(oa){Pa&&b.sidebar.currentElt==na&&sa(oa,mxEvent.getClientX(ca),mxEvent.getClientY(ca));Pa=!1;qa.src="/images/icon-search.svg"};b.sidebar.hideTooltip();b.sidebar.currentElt=na;Pa=!0;qa.src="/images/aui-wait.gif";fa.isExt?g(fa,ma,function(){z(mxResources.get("cantLoadPrev"));Pa=!1;qa.src="/images/icon-search.svg"}):ha(fa.url,ma)}}function K(fa,na,qa){if(null!=M){for(var ca=M.className.split(" "),ha=0;ha<ca.length;ha++)if(-1<ca[ha].indexOf("Active")){ca.splice(ha,
+1);break}M.className=ca.join(" ")}null!=fa?(M=fa,M.className+=" "+na,S=qa,Ha.className="geTempDlgCreateBtn"):(S=M=null,Ha.className="geTempDlgCreateBtn geTempDlgBtnDisabled")}function u(fa,na){if(null!=S){var qa=function(ma){la.isExternal?g(la,function(oa){ca(oa,ma)},ha):la.url?mxUtils.get(TEMPLATE_PATH+"/"+la.url,mxUtils.bind(this,function(oa){200<=oa.getStatus()&&299>=oa.getStatus()?ca(oa.getText(),ma):ha()})):ca(b.emptyDiagramXml,ma)},ca=function(ma,oa){y||b.hideDialog(!0);e(ma,oa,la,na)},ha=function(){z(mxResources.get("cannotLoad"));
+sa()},sa=function(){S=la;Ha.className="geTempDlgCreateBtn";na&&(Ja.className="geTempDlgOpenBtn")},la=S;S=null;"boolean"!==typeof na&&(na=la.isExternal&&p);1==fa?k(la.url,la):na?(Ja.className="geTempDlgOpenBtn geTempDlgBtnDisabled geTempDlgBtnBusy",qa()):(Ha.className="geTempDlgCreateBtn geTempDlgBtnDisabled geTempDlgBtnBusy",fa=null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"),fa=new FilenameDialog(b,b.defaultFilename+".drawio",
+mxResources.get("ok"),qa,fa,function(ma){var oa=null!=ma&&0<ma.length;return oa&&y?(qa(ma),!1):oa},null,null,null,sa,x?null:[]),b.showDialog(fa.container,350,80,!0,!0),fa.init())}}function E(fa){Ha.innerHTML=mxUtils.htmlEntities(mxResources.get(da||fa?"create":"copy"));fa=fa?"none":"";p&&(Ja.style.display=fa);for(var na=L.querySelectorAll(".geTempDlgLinkToDiagram"),qa=0;qa<na.length;qa++)na[qa].style.display=fa}function B(fa,na,qa,ca,ha){ha||(ka.innerText="",K(),V=fa,Y=ca);var sa=null;if(qa){sa=document.createElement("table");
+sa.className="geTempDlgDiagramsListGrid";var la=document.createElement("tr"),ma=document.createElement("th");ma.style.width="50%";ma.innerHTML=mxUtils.htmlEntities(mxResources.get("diagram"));la.appendChild(ma);ma=document.createElement("th");ma.style.width="25%";ma.innerHTML=mxUtils.htmlEntities(mxResources.get("changedBy"));la.appendChild(ma);ma=document.createElement("th");ma.style.width="25%";ma.innerHTML=mxUtils.htmlEntities(mxResources.get("lastModifiedOn"));la.appendChild(ma);sa.appendChild(la);
+ka.appendChild(sa)}for(la=0;la<fa.length;la++){fa[la].isExternal=!na;var oa=fa[la].url,ta=(ma=mxUtils.htmlEntities(na?mxResources.get(fa[la].title,null,fa[la].title):fa[la].title))||fa[la].url,Na=fa[la].imgUrl,Sa=mxUtils.htmlEntities(fa[la].changedBy||""),Ga="";fa[la].lastModifiedOn&&(Ga=b.timeSince(new Date(fa[la].lastModifiedOn)),null==Ga&&(Ga=mxResources.get("lessThanAMinute")),Ga=mxUtils.htmlEntities(mxResources.get("timeAgo",[Ga],"{1} ago")));Na||(Na=TEMPLATE_PATH+"/"+oa.substring(0,oa.length-
+4)+".png");oa=qa?50:15;null!=ma&&ma.length>oa&&(ma=ma.substring(0,oa)+"&hellip;");if(qa){var La=document.createElement("tr");Na=document.createElement("td");var Qa=document.createElement("img");Qa.src="/images/icon-search.svg";Qa.className="geTempDlgDiagramListPreviewBtn";Qa.setAttribute("title",mxResources.get("preview"));ha||Na.appendChild(Qa);ta=document.createElement("span");ta.className="geTempDlgDiagramTitle";ta.innerHTML=ma;Na.appendChild(ta);La.appendChild(Na);Na=document.createElement("td");
+Na.innerHTML=Sa;La.appendChild(Na);Na=document.createElement("td");Na.innerHTML=Ga;La.appendChild(Na);sa.appendChild(La);null==M&&(E(na),K(La,"geTempDlgDiagramsListGridActive",fa[la]));(function(Ma,Ta,Ua){mxEvent.addListener(La,"click",function(){M!=Ta&&(E(na),K(Ta,"geTempDlgDiagramsListGridActive",Ma))});mxEvent.addListener(La,"dblclick",u);mxEvent.addListener(Qa,"click",function(Va){O(Ma,Ta,Ua,Va)})})(fa[la],La,Qa)}else{var Oa=document.createElement("div");Oa.className="geTempDlgDiagramTile";Oa.setAttribute("title",
+ta);null==M&&(E(na),K(Oa,"geTempDlgDiagramTileActive",fa[la]));Sa=document.createElement("div");Sa.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var Ra=document.createElement("img");Ra.style.display="none";(function(Ma,Ta,Ua){Ra.onload=function(){Ta.className="geTempDlgDiagramTileImg";Ma.style.display=""};Ra.onerror=function(){this.src!=Ua?this.src=Ua:Ta.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(Ra,Sa,Na?Na.replace(".drawio.xml","").replace(".drawio",
+"").replace(".xml",""):"");Ra.src=Na;Sa.appendChild(Ra);Oa.appendChild(Sa);Sa=document.createElement("div");Sa.className="geTempDlgDiagramTileLbl";Sa.innerHTML=null!=ma?ma:"";Oa.appendChild(Sa);Qa=document.createElement("img");Qa.src="/images/icon-search.svg";Qa.className="geTempDlgDiagramPreviewBtn";Qa.setAttribute("title",mxResources.get("preview"));ha||Oa.appendChild(Qa);(function(Ma,Ta,Ua){mxEvent.addListener(Oa,"click",function(){M!=Ta&&(E(na),K(Ta,"geTempDlgDiagramTileActive",Ma))});mxEvent.addListener(Oa,
+"dblclick",u);mxEvent.addListener(Qa,"click",function(Va){O(Ma,Ta,Ua,Va)})})(fa[la],Oa,Qa);ka.appendChild(Oa)}}for(var Xa in ca)fa=ca[Xa],0<fa.length&&(ha=document.createElement("div"),ha.className="geTempDlgImportCat",ha.innerHTML=mxResources.get(Xa,null,Xa),ka.appendChild(ha),B(fa,na,qa,null,!0))}function D(fa,na){pa.innerHTML="";K();var qa=Math.floor(pa.offsetWidth/150)-1;na=!na&&fa.length>qa?qa:fa.length;for(var ca=0;ca<na;ca++){var ha=fa[ca];ha.isCategory=!0;var sa=document.createElement("div"),
+la=mxResources.get(ha.title);null==la&&(la=ha.title.substring(0,1).toUpperCase()+ha.title.substring(1));sa.className="geTempDlgNewDiagramCatItem";sa.setAttribute("title",la);la=mxUtils.htmlEntities(la);15<la.length&&(la=la.substring(0,15)+"&hellip;");null==M&&(E(!0),K(sa,"geTempDlgNewDiagramCatItemActive",ha));var ma=document.createElement("div");ma.className="geTempDlgNewDiagramCatItemImg";var oa=document.createElement("img");oa.src=NEW_DIAGRAM_CATS_PATH+"/"+ha.img;ma.appendChild(oa);sa.appendChild(ma);
+ma=document.createElement("div");ma.className="geTempDlgNewDiagramCatItemLbl";ma.innerHTML=la;sa.appendChild(ma);pa.appendChild(sa);(function(ta,Na){mxEvent.addListener(sa,"click",function(){M!=Na&&(E(!0),K(Na,"geTempDlgNewDiagramCatItemActive",ta))});mxEvent.addListener(sa,"dblclick",u)})(ha,sa)}sa=document.createElement("div");sa.className="geTempDlgNewDiagramCatItem";la=mxResources.get("showAllTemps");sa.setAttribute("title",la);ma=document.createElement("div");ma.className="geTempDlgNewDiagramCatItemImg";
+ma.innerHTML="...";ma.style.fontSize="32px";sa.appendChild(ma);ma=document.createElement("div");ma.className="geTempDlgNewDiagramCatItemLbl";ma.innerHTML=la;sa.appendChild(ma);pa.appendChild(sa);mxEvent.addListener(sa,"click",function(){function ta(){var Sa=Na.querySelector(".geTemplateDrawioCatLink");null!=Sa?Sa.click():setTimeout(ta,200)}da=!0;var Na=L.querySelector(".geTemplatesList");Na.style.display="block";Ea.style.width="";ya.style.display="";ya.value="";ba=null;ta()});ea.style.display=fa.length<=
+qa?"none":""}function G(fa,na,qa){function ca(Ra,Xa){var Ma=mxResources.get(Ra);null==Ma&&(Ma=Ra.substring(0,1).toUpperCase()+Ra.substring(1));Ra=Ma+" ("+Xa.length+")";var Ta=Ma=mxUtils.htmlEntities(Ma);15<Ma.length&&(Ma=Ma.substring(0,15)+"&hellip;");return{lbl:Ma+" ("+Xa.length+")",fullLbl:Ra,lblOnly:Ta}}function ha(Ra,Xa,Ma,Ta,Ua){mxEvent.addListener(Ma,"click",function(){t!=Ma&&(null!=t?(t.style.fontWeight="normal",t.style.textDecoration="none"):(Da.style.display="none",Ca.style.minHeight="100%"),
+t=Ma,t.style.fontWeight="bold",t.style.textDecoration="underline",Ea.scrollTop=0,U&&(W=!0),aa.innerHTML=Xa,Ba.style.display="none",B(Ua?na[Ra]:Ta?Ka[Ra][Ta]:fa[Ra],Ua?!1:!0))})}var sa=L.querySelector(".geTemplatesList");if(0<qa){qa=document.createElement("div");qa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(qa,mxResources.get("custom"));sa.appendChild(qa);for(var la in na){qa=document.createElement("div");var ma=na[la];
+ma=ca(la,ma);qa.className="geTemplateCatLink";qa.setAttribute("title",ma.fullLbl);qa.innerHTML=ma.lbl;sa.appendChild(qa);ha(la,ma.lblOnly,qa,null,!0)}qa=document.createElement("div");qa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(qa,"draw.io");sa.appendChild(qa)}for(la in fa){var oa=Ka[la],ta=qa=document.createElement(oa?"ul":"div");ma=fa[la];ma=ca(la,ma);if(null!=oa){var Na=document.createElement("li"),Sa=document.createElement("div");
+Sa.className="geTempTreeCaret geTemplateCatLink geTemplateDrawioCatLink";Sa.style.padding="0";Sa.setAttribute("title",ma.fullLbl);Sa.innerHTML=ma.lbl;ta=Sa;Na.appendChild(Sa);var Ga=document.createElement("ul");Ga.className="geTempTreeNested";Ga.style.visibility="hidden";for(var La in oa){var Qa=document.createElement("li"),Oa=ca(La,oa[La]);Qa.setAttribute("title",Oa.fullLbl);Qa.innerHTML=Oa.lbl;Qa.className="geTemplateCatLink";Qa.style.padding="0";Qa.style.margin="0";ha(la,Oa.lblOnly,Qa,La);Ga.appendChild(Qa)}Na.appendChild(Ga);
+qa.className="geTempTree";qa.appendChild(Na);(function(Ra,Xa){mxEvent.addListener(Xa,"click",function(){for(var Ma=Ra.querySelectorAll("li"),Ta=0;Ta<Ma.length;Ta++)Ma[Ta].style.margin="";Ra.style.visibility="visible";Ra.classList.toggle("geTempTreeActive");Ra.classList.toggle("geTempTreeNested")&&setTimeout(function(){for(var Ua=0;Ua<Ma.length;Ua++)Ma[Ua].style.margin="0";Ra.style.visibility="hidden"},250);Xa.classList.toggle("geTempTreeCaret-down")})})(Ga,Sa)}else qa.className="geTemplateCatLink geTemplateDrawioCatLink",
+qa.setAttribute("title",ma.fullLbl),qa.innerHTML=ma.lbl;sa.appendChild(qa);ha(la,ma.lblOnly,ta)}}function H(){mxUtils.get(c,function(fa){if(!wa){wa=!0;fa=fa.getXml().documentElement.firstChild;for(var na={};null!=fa;){if("undefined"!==typeof fa.getAttribute)if("clibs"==fa.nodeName){for(var qa=fa.getAttribute("name"),ca=fa.getElementsByTagName("add"),ha=[],sa=0;sa<ca.length;sa++)ha.push(encodeURIComponent(mxUtils.getTextContent(ca[sa])));null!=qa&&0<ha.length&&(na[qa]=ha.join(";"))}else if(ha=fa.getAttribute("url"),
+null!=ha){ca=fa.getAttribute("section");qa=fa.getAttribute("subsection");if(null==ca&&(sa=ha.indexOf("/"),ca=ha.substring(0,sa),null==qa)){var la=ha.indexOf("/",sa+1);-1<la&&(qa=ha.substring(sa+1,la))}sa=va[ca];null==sa&&(ua++,sa=[],va[ca]=sa);ha=fa.getAttribute("clibs");null!=na[ha]&&(ha=na[ha]);ha={url:fa.getAttribute("url"),libs:fa.getAttribute("libs"),title:fa.getAttribute("title")||fa.getAttribute("name"),preview:fa.getAttribute("preview"),clibs:ha,tags:fa.getAttribute("tags")};sa.push(ha);null!=
+qa&&(sa=Ka[ca],null==sa&&(sa={},Ka[ca]=sa),ca=sa[qa],null==ca&&(ca=[],sa[qa]=ca),ca.push(ha))}fa=fa.nextSibling}G(va,ia,xa)}})}function N(fa){v&&(Ea.scrollTop=0,ka.innerText="",Fa.spin(ka),W=!1,U=!0,aa.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag")),ba=null,v(ra,function(){z(mxResources.get("cannotLoad"));ra([])},fa?null:n))}function F(fa){if(""==fa)null!=C&&(C.click(),C=null);else{if(null==TemplatesDialog.tagsList[c]){var na={};for(ta in va)for(var qa=va[ta],ca=0;ca<qa.length;ca++){var ha=
+qa[ca];if(null!=ha.tags)for(var sa=ha.tags.toLowerCase().split(";"),la=0;la<sa.length;la++)null==na[sa[la]]&&(na[sa[la]]=[]),na[sa[la]].push(ha)}TemplatesDialog.tagsList[c]=na}var ma=fa.toLowerCase().split(" ");na=TemplatesDialog.tagsList[c];if(0<xa&&null==na.__tagsList__){for(ta in ia)for(qa=ia[ta],ca=0;ca<qa.length;ca++)for(ha=qa[ca],sa=ha.title.split(" "),sa.push(ta),la=0;la<sa.length;la++){var oa=sa[la].toLowerCase();null==na[oa]&&(na[oa]=[]);na[oa].push(ha)}na.__tagsList__=!0}var ta=[];qa={};
+for(ca=sa=0;ca<ma.length;ca++)if(0<ma[ca].length){oa=na[ma[ca]];var Na={};ta=[];if(null!=oa)for(la=0;la<oa.length;la++)ha=oa[la],0==sa==(null==qa[ha.url])&&(Na[ha.url]=!0,ta.push(ha));qa=Na;sa++}0==ta.length?aa.innerHTML=mxResources.get("noResultsFor",[fa]):B(ta,!0)}}function I(fa){if(ba!=fa||R!=Z)A(),Ea.scrollTop=0,ka.innerText="",aa.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults"))+' "'+mxUtils.htmlEntities(fa)+'"',Aa=null,da?F(fa):d&&(fa?(Fa.spin(ka),W=!1,U=!0,d(fa,ra,function(){z(mxResources.get("searchFailed"));
+ra([])},R?null:n)):N(R)),ba=fa,Z=R}function Q(fa){null!=Aa&&clearTimeout(Aa);13==fa.keyCode?I(ya.value):Aa=setTimeout(function(){I(ya.value)},1E3)}var X='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" '+(d?"":'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>'+
-(q?'<span class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramHint">'+mxResources.get("linkToDiagramHint")+'</span><button class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramBtn">'+mxResources.get("linkToDiagram")+"</button>":"")+(p?'<div class="geTempDlgOpenBtn">'+mxResources.get("open")+"</div>":"")+'<div class="geTempDlgCreateBtn">'+mxResources.get("create")+'</div><div class="geTempDlgCancelBtn">'+mxResources.get("cancel")+"</div></div>",J=document.createElement("div");J.innerHTML=X;J.className=
-"geTemplateDlg";this.container=J;c=null!=c?c:TEMPLATE_PATH+"/index.xml";m=null!=m?m:NEW_DIAGRAM_CATS_PATH+"/index.xml";var W=!1,V=!1,t=null,C=null,M=null,Q=null,P=!1,S=!0,U=!1,T=[],Y=null,aa,Z,da=!1,ja=J.querySelector(".geTempDlgShowAllBtn"),ha=J.querySelector(".geTempDlgDiagramsTiles"),ba=J.querySelector(".geTempDlgDiagramsListTitle"),Aa=J.querySelector(".geTempDlgDiagramsListBtns"),Ga=J.querySelector(".geTempDlgContent"),Ca=J.querySelector(".geTempDlgDiagramsList"),Da=J.querySelector(".geTempDlgNewDiagramCat"),
-na=J.querySelector(".geTempDlgNewDiagramCatList"),Ia=J.querySelector(".geTempDlgCreateBtn"),Ka=J.querySelector(".geTempDlgOpenBtn"),xa=J.querySelector(".geTempDlgSearchBox"),Ja=J.querySelector(".geTempDlgErrMsg"),Fa=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(J.querySelector(".geTempDlgBack"),"click",function(){A();da=!1;J.querySelector(".geTemplatesList").style.display="none";Ga.style.width=
-"100%";Da.style.display="";Ca.style.minHeight="calc(100% - 280px)";xa.style.display=d?"":"none";xa.value="";aa=null;I(S)});mxEvent.addListener(J.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){K(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(S=!0,null==aa?I(S):H(aa))});mxEvent.addListener(J.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){K(this,"geTempDlgMyDiagramsBtnImg",
-"my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(S=!1,null==aa?I(S):H(aa))});mxEvent.addListener(J.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){K(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(U=!0,B(T,!1,U,Y))});mxEvent.addListener(J.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){K(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(U=!1,B(T,!1,U,Y))});
-var Oa=!1;mxEvent.addListener(ja,"click",function(){P?(Da.style.height="280px",na.style.height="190px",ja.innerHTML=mxUtils.htmlEntities(mxResources.get("showMore")),D(wa)):(Da.style.height="440px",na.style.height="355px",ja.innerHTML=mxUtils.htmlEntities(mxResources.get("showLess")),D(wa,!0));P=!P});var va=!1,za=!1,ta={},Ba={},ea={},wa=[],ua=1,sa=0;null!=l?l(function(ia,ma){ea=ia;sa=ma;N()},N):N();mxUtils.get(m,function(ia){if(!za){za=!0;for(ia=ia.getXml().documentElement.firstChild;null!=ia;)"undefined"!==
-typeof ia.getAttribute&&null!=ia.getAttribute("title")&&wa.push({img:ia.getAttribute("img"),libs:ia.getAttribute("libs"),clibs:ia.getAttribute("clibs"),title:ia.getAttribute("title")}),ia=ia.nextSibling;D(wa)}});var ra=function(ia,ma,ca){Aa.style.display="";Fa.stop();W=!1;if(V)V=!1;else if(ma)ha.innerHTML=ma;else{ca=ca||{};ma=0;for(var fa in ca)ma+=ca[fa].length;0==ia.length&&0==ma?ha.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams")):B(ia,!1,U,0==ma?null:ca)}};I(S);var ya=null;mxEvent.addListener(xa,
-"keyup",R);mxEvent.addListener(xa,"search",R);mxEvent.addListener(xa,"input",R);mxEvent.addListener(Ia,"click",function(ia){u(!1,!1)});p&&mxEvent.addListener(Ka,"click",function(ia){u(!1,!0)});q&&mxEvent.addListener(J.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(ia){u(!0)});mxEvent.addListener(J.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=f&&f();y||b.hideDialog(!0)})};TemplatesDialog.tagsList={};
+(q?'<span class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramHint">'+mxResources.get("linkToDiagramHint")+'</span><button class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramBtn">'+mxResources.get("linkToDiagram")+"</button>":"")+(p?'<div class="geTempDlgOpenBtn">'+mxResources.get("open")+"</div>":"")+'<div class="geTempDlgCreateBtn">'+mxResources.get("create")+'</div><div class="geTempDlgCancelBtn">'+mxResources.get("cancel")+"</div></div>",L=document.createElement("div");L.innerHTML=X;L.className=
+"geTemplateDlg";this.container=L;c=null!=c?c:TEMPLATE_PATH+"/index.xml";m=null!=m?m:NEW_DIAGRAM_CATS_PATH+"/index.xml";var U=!1,W=!1,t=null,C=null,M=null,S=null,P=!1,R=!0,T=!1,V=[],Y=null,ba,Z,da=!1,ea=L.querySelector(".geTempDlgShowAllBtn"),ka=L.querySelector(".geTempDlgDiagramsTiles"),aa=L.querySelector(".geTempDlgDiagramsListTitle"),Ba=L.querySelector(".geTempDlgDiagramsListBtns"),Ea=L.querySelector(".geTempDlgContent"),Ca=L.querySelector(".geTempDlgDiagramsList"),Da=L.querySelector(".geTempDlgNewDiagramCat"),
+pa=L.querySelector(".geTempDlgNewDiagramCatList"),Ha=L.querySelector(".geTempDlgCreateBtn"),Ja=L.querySelector(".geTempDlgOpenBtn"),ya=L.querySelector(".geTempDlgSearchBox"),Ia=L.querySelector(".geTempDlgErrMsg"),Fa=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(L.querySelector(".geTempDlgBack"),"click",function(){A();da=!1;L.querySelector(".geTemplatesList").style.display="none";Ea.style.width=
+"100%";Da.style.display="";Ca.style.minHeight="calc(100% - 280px)";ya.style.display=d?"":"none";ya.value="";ba=null;N(R)});mxEvent.addListener(L.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){J(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(R=!0,null==ba?N(R):I(ba))});mxEvent.addListener(L.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){J(this,"geTempDlgMyDiagramsBtnImg",
+"my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(R=!1,null==ba?N(R):I(ba))});mxEvent.addListener(L.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){J(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(T=!0,B(V,!1,T,Y))});mxEvent.addListener(L.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){J(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(T=!1,B(V,!1,T,Y))});
+var Pa=!1;mxEvent.addListener(ea,"click",function(){P?(Da.style.height="280px",pa.style.height="190px",ea.innerHTML=mxUtils.htmlEntities(mxResources.get("showMore")),D(ja)):(Da.style.height="440px",pa.style.height="355px",ea.innerHTML=mxUtils.htmlEntities(mxResources.get("showLess")),D(ja,!0));P=!P});var wa=!1,za=!1,va={},Ka={},ia={},ja=[],ua=1,xa=0;null!=l?l(function(fa,na){ia=fa;xa=na;H()},H):H();mxUtils.get(m,function(fa){if(!za){za=!0;for(fa=fa.getXml().documentElement.firstChild;null!=fa;)"undefined"!==
+typeof fa.getAttribute&&null!=fa.getAttribute("title")&&ja.push({img:fa.getAttribute("img"),libs:fa.getAttribute("libs"),clibs:fa.getAttribute("clibs"),title:fa.getAttribute("title")}),fa=fa.nextSibling;D(ja)}});var ra=function(fa,na,qa){Ba.style.display="";Fa.stop();U=!1;if(W)W=!1;else if(na)ka.innerHTML=na;else{qa=qa||{};na=0;for(var ca in qa)na+=qa[ca].length;0==fa.length&&0==na?ka.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams")):B(fa,!1,T,0==na?null:qa)}};N(R);var Aa=null;mxEvent.addListener(ya,
+"keyup",Q);mxEvent.addListener(ya,"search",Q);mxEvent.addListener(ya,"input",Q);mxEvent.addListener(Ha,"click",function(fa){u(!1,!1)});p&&mxEvent.addListener(Ja,"click",function(fa){u(!1,!0)});q&&mxEvent.addListener(L.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(fa){u(!0)});mxEvent.addListener(L.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=f&&f();y||b.hideDialog(!0)})};TemplatesDialog.tagsList={};
var BtnDialog=function(b,e,f,c){var m=document.createElement("div");m.style.textAlign="center";var n=document.createElement("p");n.style.fontSize="16pt";n.style.padding="0px";n.style.margin="0px";n.style.color="gray";mxUtils.write(n,mxResources.get("done"));var v="Unknown",d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.style.marginRight="10px";e==b.drive?(v=mxResources.get("googleDrive"),d.src=IMAGE_PATH+"/google-drive-logo-white.svg"):e==b.dropbox?
(v=mxResources.get("dropbox"),d.src=IMAGE_PATH+"/dropbox-logo-white.svg"):e==b.oneDrive?(v=mxResources.get("oneDrive"),d.src=IMAGE_PATH+"/onedrive-logo-white.svg"):e==b.gitHub?(v=mxResources.get("github"),d.src=IMAGE_PATH+"/github-logo-white.svg"):e==b.gitLab?(v=mxResources.get("gitlab"),d.src=IMAGE_PATH+"/gitlab-logo.svg"):e==b.trello&&(v=mxResources.get("trello"),d.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizedIn",[v],"You are now authorized in {1}"));
-f=mxUtils.button(f,c);f.insertBefore(d,f.firstChild);f.style.marginTop="6px";f.className="geBigButton";f.style.fontSize="18px";f.style.padding="14px";m.appendChild(n);m.appendChild(b);m.appendChild(f);this.container=m},FontDialog=function(b,e,f,c,m){function n(L){this.style.border="";13==L.keyCode&&O.click()}var v=document.createElement("table"),d=document.createElement("tbody");v.style.marginTop="8px";var g=document.createElement("tr");var k=document.createElement("td");k.colSpan=2;k.style.whiteSpace=
+f=mxUtils.button(f,c);f.insertBefore(d,f.firstChild);f.style.marginTop="6px";f.className="geBigButton";f.style.fontSize="18px";f.style.padding="14px";m.appendChild(n);m.appendChild(b);m.appendChild(f);this.container=m},FontDialog=function(b,e,f,c,m){function n(K){this.style.border="";13==K.keyCode&&O.click()}var v=document.createElement("table"),d=document.createElement("tbody");v.style.marginTop="8px";var g=document.createElement("tr");var k=document.createElement("td");k.colSpan=2;k.style.whiteSpace=
"nowrap";k.style.fontSize="10pt";k.style.fontWeight="bold";var l=document.createElement("input");l.style.cssText="margin-right:8px;margin-bottom:8px;";l.setAttribute("value","sysfonts");l.setAttribute("type","radio");l.setAttribute("name","current-fontdialog");l.setAttribute("id","fontdialog-sysfonts");k.appendChild(l);var p=document.createElement("label");p.setAttribute("for","fontdialog-sysfonts");mxUtils.write(p,mxResources.get("sysFonts",null,"System Fonts"));k.appendChild(p);g.appendChild(k);
d.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.whiteSpace="nowrap";k.style.fontSize="10pt";k.style.width="120px";k.style.paddingLeft="15px";mxUtils.write(k,mxResources.get("fontname",null,"Font Name")+":");g.appendChild(k);var q=document.createElement("input");"s"==c&&q.setAttribute("value",e);q.style.marginLeft="4px";q.style.width="250px";q.className="dlg_fontName_s";k=document.createElement("td");k.appendChild(q);g.appendChild(k);d.appendChild(g);g=document.createElement("tr");
k=document.createElement("td");k.colSpan=2;k.style.whiteSpace="nowrap";k.style.fontSize="10pt";k.style.fontWeight="bold";var x=document.createElement("input");x.style.cssText="margin-right:8px;margin-bottom:8px;";x.setAttribute("value","googlefonts");x.setAttribute("type","radio");x.setAttribute("name","current-fontdialog");x.setAttribute("id","fontdialog-googlefonts");k.appendChild(x);p=document.createElement("label");p.setAttribute("for","fontdialog-googlefonts");mxUtils.write(p,mxResources.get("googleFonts",
@@ -11397,11 +11393,11 @@ null,"Google Fonts"));k.appendChild(p);mxClient.IS_CHROMEAPP||b.isOffline()&&!Ed
g.appendChild(k);var y=document.createElement("input");"g"==c&&y.setAttribute("value",e);y.style.marginLeft="4px";y.style.width="250px";y.className="dlg_fontName_g";k=document.createElement("td");k.appendChild(y);g.appendChild(k);d.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.colSpan=2;k.style.whiteSpace="nowrap";k.style.fontSize="10pt";k.style.fontWeight="bold";var z=document.createElement("input");z.style.cssText="margin-right:8px;margin-bottom:8px;";z.setAttribute("value",
"webfonts");z.setAttribute("type","radio");z.setAttribute("name","current-fontdialog");z.setAttribute("id","fontdialog-webfonts");k.appendChild(z);p=document.createElement("label");p.setAttribute("for","fontdialog-webfonts");mxUtils.write(p,mxResources.get("webfonts",null,"Web Fonts"));k.appendChild(p);g.appendChild(k);Editor.enableWebFonts&&d.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.whiteSpace="nowrap";k.style.fontSize="10pt";k.style.width="120px";k.style.paddingLeft=
"15px";mxUtils.write(k,mxResources.get("fontname",null,"Font Name")+":");g.appendChild(k);var A=document.createElement("input");"w"==c&&(Editor.enableWebFonts?A.setAttribute("value",e):q.setAttribute("value",e));A.style.marginLeft="4px";A.style.width="250px";A.className="dlg_fontName_w";k=document.createElement("td");k.appendChild(A);g.appendChild(k);Editor.enableWebFonts&&d.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.style.whiteSpace="nowrap";k.style.fontSize="10pt";
-k.style.width="120px";k.style.paddingLeft="15px";mxUtils.write(k,mxResources.get("fontUrl",null,"Font URL")+":");g.appendChild(k);var K=document.createElement("input");K.setAttribute("value",f||"");K.style.marginLeft="4px";K.style.width="250px";K.className="dlg_fontUrl";k=document.createElement("td");k.appendChild(K);g.appendChild(k);Editor.enableWebFonts&&d.appendChild(g);this.init=function(){var L=q;"g"==c?L=y:"w"==c&&Editor.enableWebFonts&&(L=A);L.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?
-L.select():document.execCommand("selectAll",!1,null)};g=document.createElement("tr");k=document.createElement("td");k.colSpan=2;k.style.paddingTop="20px";k.style.whiteSpace="nowrap";k.setAttribute("align","right");b.isOffline()||(e=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/blog/external-fonts")}),e.className="geBtn",k.appendChild(e));e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();m()});e.className="geBtn";b.editor.cancelFirst&&k.appendChild(e);
-var O=mxUtils.button(mxResources.get("apply"),function(){if(l.checked){var L=q.value;var u="s"}else if(x.checked){L=y.value;var E=Editor.GOOGLE_FONTS+encodeURIComponent(L).replace(/%20/g,"+");u="g"}else z.checked&&(L=A.value,E=K.value,u="w");var B=E;var D=u,G=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null==L||0==L.length?(v.querySelector(".dlg_fontName_"+D).style.border="1px solid red",B=!1):"w"!=D||G.test(B)?B=!0:(v.querySelector(".dlg_fontUrl").style.border=
-"1px solid red",B=!1);B&&(m(L,E,u),b.hideDialog())});O.className="geBtn gePrimaryBtn";mxEvent.addListener(q,"keypress",n);mxEvent.addListener(y,"keypress",n);mxEvent.addListener(A,"keypress",n);mxEvent.addListener(K,"keypress",n);mxEvent.addListener(q,"focus",function(){l.setAttribute("checked","checked");l.checked=!0});mxEvent.addListener(y,"focus",function(){x.setAttribute("checked","checked");x.checked=!0});mxEvent.addListener(A,"focus",function(){z.setAttribute("checked","checked");z.checked=
-!0});mxEvent.addListener(K,"focus",function(){z.setAttribute("checked","checked");z.checked=!0});k.appendChild(O);b.editor.cancelFirst||k.appendChild(e);g.appendChild(k);d.appendChild(g);v.appendChild(d);this.container=v};
+k.style.width="120px";k.style.paddingLeft="15px";mxUtils.write(k,mxResources.get("fontUrl",null,"Font URL")+":");g.appendChild(k);var J=document.createElement("input");J.setAttribute("value",f||"");J.style.marginLeft="4px";J.style.width="250px";J.className="dlg_fontUrl";k=document.createElement("td");k.appendChild(J);g.appendChild(k);Editor.enableWebFonts&&d.appendChild(g);this.init=function(){var K=q;"g"==c?K=y:"w"==c&&Editor.enableWebFonts&&(K=A);K.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?
+K.select():document.execCommand("selectAll",!1,null)};g=document.createElement("tr");k=document.createElement("td");k.colSpan=2;k.style.paddingTop="20px";k.style.whiteSpace="nowrap";k.setAttribute("align","right");b.isOffline()||(e=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/blog/external-fonts")}),e.className="geBtn",k.appendChild(e));e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();m()});e.className="geBtn";b.editor.cancelFirst&&k.appendChild(e);
+var O=mxUtils.button(mxResources.get("apply"),function(){if(l.checked){var K=q.value;var u="s"}else if(x.checked){K=y.value;var E=Editor.GOOGLE_FONTS+encodeURIComponent(K).replace(/%20/g,"+");u="g"}else z.checked&&(K=A.value,E=J.value,u="w");var B=E;var D=u,G=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null==K||0==K.length?(v.querySelector(".dlg_fontName_"+D).style.border="1px solid red",B=!1):"w"!=D||G.test(B)?B=!0:(v.querySelector(".dlg_fontUrl").style.border=
+"1px solid red",B=!1);B&&(m(K,E,u),b.hideDialog())});O.className="geBtn gePrimaryBtn";mxEvent.addListener(q,"keypress",n);mxEvent.addListener(y,"keypress",n);mxEvent.addListener(A,"keypress",n);mxEvent.addListener(J,"keypress",n);mxEvent.addListener(q,"focus",function(){l.setAttribute("checked","checked");l.checked=!0});mxEvent.addListener(y,"focus",function(){x.setAttribute("checked","checked");x.checked=!0});mxEvent.addListener(A,"focus",function(){z.setAttribute("checked","checked");z.checked=
+!0});mxEvent.addListener(J,"focus",function(){z.setAttribute("checked","checked");z.checked=!0});k.appendChild(O);b.editor.cancelFirst||k.appendChild(e);g.appendChild(k);d.appendChild(g);v.appendChild(d);this.container=v};
function AspectDialog(b,e,f,c,m){this.aspect={pageId:e||(b.pages?b.pages[0].getId():null),layerIds:f||[]};e=document.createElement("div");var n=document.createElement("h5");n.style.margin="0 0 10px";mxUtils.write(n,mxResources.get("pages"));e.appendChild(n);f=document.createElement("div");f.className="geAspectDlgList";e.appendChild(f);n=document.createElement("h5");n.style.margin="0 0 10px";mxUtils.write(n,mxResources.get("layers"));e.appendChild(n);n=document.createElement("div");n.className="geAspectDlgList";
e.appendChild(n);this.pagesContainer=f;this.layersContainer=n;this.ui=b;f=document.createElement("div");f.style.marginTop="16px";f.style.textAlign="center";n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=m&&m()});n.className="geBtn";b.editor.cancelFirst&&f.appendChild(n);var v=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){b.hideDialog();c({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));f.appendChild(v);v.className="geBtn gePrimaryBtn";
b.editor.cancelFirst||f.appendChild(n);v.setAttribute("disabled","disabled");this.okBtn=v;e.appendChild(f);this.container=e}AspectDialog.prototype.init=function(){var b=this.ui.getFileData(!0);if(this.ui.pages)for(b=0;b<this.ui.pages.length;b++){var e=this.ui.updatePageRoot(this.ui.pages[b]);this.createPageItem(e.getId(),e.getName(),e.node)}else this.createPageItem("1","Page-1",mxUtils.parseXml(b).documentElement)};
@@ -11419,22 +11415,22 @@ l&&(p.setAttribute("checked","checked"),p.defaultChecked=!0);d=document.createEl
d.style.width="120px";mxUtils.write(d,mxResources.get("realtimeCollaboration")+":");m.appendChild(d);var q=document.createElement("input");q.setAttribute("type","checkbox");var x=c.isRealtimeEnabled();if(x="disabled"!=b.drive.getCustomProperty(c.desc,"collaboration"))q.setAttribute("checked","checked"),q.defaultChecked=!0;prevApply=n;n=function(){prevApply();b.hideDialog();q.checked!=x&&b.spinner.spin(document.body,mxResources.get("updatingDocument"))&&c.setRealtimeEnabled(q.checked,mxUtils.bind(this,
function(y){b.spinner.stop()}),mxUtils.bind(this,function(y){b.spinner.stop();b.showError(mxResources.get("error"),null!=y&&null!=y.error?y.error.message:mxResources.get("unknownError"),mxResources.get("ok"))}))};this.init=null!=this.init?this.init:function(){q.focus()};d=document.createElement("td");d.style.whiteSpace="nowrap";d.appendChild(q);d.appendChild(b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/2672"));m.appendChild(d);f.appendChild(m)}this.init=null!=this.init?this.init:
function(){};n=mxUtils.button(mxResources.get("apply"),n);n.className="geBtn gePrimaryBtn";m=document.createElement("tr");d=document.createElement("td");d.colSpan=2;d.style.paddingTop="20px";d.style.whiteSpace="nowrap";d.setAttribute("align","center");v=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});v.className="geBtn";b.editor.cancelFirst&&d.appendChild(v);d.appendChild(n);b.editor.cancelFirst||d.appendChild(v);m.appendChild(d);f.appendChild(m);e.appendChild(f);this.container=
-e},ConnectionPointsDialog=function(b,e){function f(){null!=m&&m.destroy()}var c=document.createElement("div");c.style.userSelect="none";var m=null;this.init=function(){function n(F,H){F=new mxCell("",new mxGeometry(F,H,6,6),"shape=mxgraph.basic.x;fillColor=#29b6f2;strokeColor=#29b6f2;points=[];rotatable=0;resizable=0;connectable=0;editable=0;");F.vertex=!0;F.cp=!0;return p.addCell(F)}function v(F){F=p.getSelectionCells();p.deleteCells(F)}function d(){var F=parseInt(D.value)||0;F=0>F?0:100<F?100:F;
-D.value=F;var H=parseInt(N.value)||0;H=0>H?0:100<H?100:H;N.value=H;var R=parseInt(G.value)||0,X=parseInt(I.value)||0;F=p.getConnectionPoint(y,new mxConnectionConstraint(new mxPoint(F/100,H/100),!1,null,R,X));H=p.getSelectionCell();if(null!=H){R=H.geometry.clone();X=p.view.scale;var J=p.view.translate;R.x=(F.x-3*X)/X-J.x;R.y=(F.y-3*X)/X-J.y;p.model.setGeometry(H,R)}}function g(F){var H=0,R=0,X=q.geometry,J=mxUtils.format((F.geometry.x+3-X.x)/X.width);F=mxUtils.format((F.geometry.y+3-X.y)/X.height);
-0>J?(H=J*X.width,J=0):1<J&&(H=(J-1)*X.width,J=1);0>F?(R=F*X.height,F=0):1<F&&(R=(F-1)*X.height,F=1);return{x:J,y:F,dx:parseInt(H),dy:parseInt(R)}}function k(){if(1==p.getSelectionCount()){var F=p.getSelectionCell();F=g(F);D.value=100*F.x;N.value=100*F.y;G.value=F.dx;I.value=F.dy;B.style.visibility=""}else B.style.visibility="hidden"}var l=document.createElement("div");l.style.width="350px";l.style.height="350px";l.style.overflow="hidden";l.style.border="1px solid lightGray";l.style.boxSizing="border-box";
-mxEvent.disableContextMenu(l);c.appendChild(l);var p=new Graph(l);p.autoExtend=!1;p.autoScroll=!1;p.setGridEnabled(!1);p.setEnabled(!0);p.setPanning(!0);p.setConnectable(!1);p.setTooltips(!1);p.minFitScale=null;p.maxFitScale=null;p.centerZoom=!0;p.maxFitScale=2;l=e.geometry;var q=new mxCell(e.value,new mxGeometry(0,0,l.width,l.height),e.style+";rotatable=0;resizable=0;connectable=0;editable=0;movable=0;");q.vertex=!0;p.addCell(q);p.dblClick=function(F,H){if(null!=H&&H!=q)p.setSelectionCell(H);else{H=
-mxUtils.convertPoint(p.container,mxEvent.getClientX(F),mxEvent.getClientY(F));mxEvent.consume(F);F=p.view.scale;var R=p.view.translate;p.setSelectionCell(n((H.x-3*F)/F-R.x,(H.y-3*F)/F-R.y))}};m=new mxKeyHandler(p);m.bindKey(46,v);m.bindKey(8,v);p.getRubberband().isForceRubberbandEvent=function(F){return 0==F.evt.button&&(null==F.getCell()||F.getCell()==q)};p.panningHandler.isForcePanningEvent=function(F){return 2==F.evt.button};var x=p.isCellSelectable;p.isCellSelectable=function(F){return F==q?!1:
+e},ConnectionPointsDialog=function(b,e){function f(){null!=m&&m.destroy()}var c=document.createElement("div");c.style.userSelect="none";var m=null;this.init=function(){function n(F,I){F=new mxCell("",new mxGeometry(F,I,6,6),"shape=mxgraph.basic.x;fillColor=#29b6f2;strokeColor=#29b6f2;points=[];rotatable=0;resizable=0;connectable=0;editable=0;");F.vertex=!0;F.cp=!0;return p.addCell(F)}function v(F){F=p.getSelectionCells();p.deleteCells(F)}function d(){var F=parseInt(D.value)||0;F=0>F?0:100<F?100:F;
+D.value=F;var I=parseInt(H.value)||0;I=0>I?0:100<I?100:I;H.value=I;var Q=parseInt(G.value)||0,X=parseInt(N.value)||0;F=p.getConnectionPoint(y,new mxConnectionConstraint(new mxPoint(F/100,I/100),!1,null,Q,X));I=p.getSelectionCell();if(null!=I){Q=I.geometry.clone();X=p.view.scale;var L=p.view.translate;Q.x=(F.x-3*X)/X-L.x;Q.y=(F.y-3*X)/X-L.y;p.model.setGeometry(I,Q)}}function g(F){var I=0,Q=0,X=q.geometry,L=mxUtils.format((F.geometry.x+3-X.x)/X.width);F=mxUtils.format((F.geometry.y+3-X.y)/X.height);
+0>L?(I=L*X.width,L=0):1<L&&(I=(L-1)*X.width,L=1);0>F?(Q=F*X.height,F=0):1<F&&(Q=(F-1)*X.height,F=1);return{x:L,y:F,dx:parseInt(I),dy:parseInt(Q)}}function k(){if(1==p.getSelectionCount()){var F=p.getSelectionCell();F=g(F);D.value=100*F.x;H.value=100*F.y;G.value=F.dx;N.value=F.dy;B.style.visibility=""}else B.style.visibility="hidden"}var l=document.createElement("div");l.style.width="350px";l.style.height="350px";l.style.overflow="hidden";l.style.border="1px solid lightGray";l.style.boxSizing="border-box";
+mxEvent.disableContextMenu(l);c.appendChild(l);var p=new Graph(l);p.autoExtend=!1;p.autoScroll=!1;p.setGridEnabled(!1);p.setEnabled(!0);p.setPanning(!0);p.setConnectable(!1);p.setTooltips(!1);p.minFitScale=null;p.maxFitScale=null;p.centerZoom=!0;p.maxFitScale=2;l=e.geometry;var q=new mxCell(e.value,new mxGeometry(0,0,l.width,l.height),e.style+";rotatable=0;resizable=0;connectable=0;editable=0;movable=0;");q.vertex=!0;p.addCell(q);p.dblClick=function(F,I){if(null!=I&&I!=q)p.setSelectionCell(I);else{I=
+mxUtils.convertPoint(p.container,mxEvent.getClientX(F),mxEvent.getClientY(F));mxEvent.consume(F);F=p.view.scale;var Q=p.view.translate;p.setSelectionCell(n((I.x-3*F)/F-Q.x,(I.y-3*F)/F-Q.y))}};m=new mxKeyHandler(p);m.bindKey(46,v);m.bindKey(8,v);p.getRubberband().isForceRubberbandEvent=function(F){return 0==F.evt.button&&(null==F.getCell()||F.getCell()==q)};p.panningHandler.isForcePanningEvent=function(F){return 2==F.evt.button};var x=p.isCellSelectable;p.isCellSelectable=function(F){return F==q?!1:
x.apply(this,arguments)};p.getLinkForCell=function(){return null};var y=p.view.getState(q);l=p.getAllConnectionConstraints(y);for(var z=0;null!=l&&z<l.length;z++){var A=p.getConnectionPoint(y,l[z]);n(A.x-3,A.y-3)}p.fit(8);p.center();z=mxUtils.button("",function(){p.zoomIn()});z.className="geSprite geSprite-zoomin";z.setAttribute("title",mxResources.get("zoomIn"));z.style.position="relative";z.style.outline="none";z.style.border="none";z.style.margin="2px";z.style.cursor="pointer";z.style.top=mxClient.IS_FF?
-"-6px":"0px";mxUtils.setOpacity(z,60);A=mxUtils.button("",function(){p.zoomOut()});A.className="geSprite geSprite-zoomout";A.setAttribute("title",mxResources.get("zoomOut"));A.style.position="relative";A.style.outline="none";A.style.border="none";A.style.margin="2px";A.style.cursor="pointer";A.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(A,60);var K=mxUtils.button("",function(){p.fit(8);p.center()});K.className="geSprite geSprite-fit";K.setAttribute("title",mxResources.get("fit"));K.style.position=
-"relative";K.style.outline="none";K.style.border="none";K.style.margin="2px";K.style.cursor="pointer";K.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(K,60);var O=mxUtils.button("",function(){p.zoomActual();p.center()});O.className="geSprite geSprite-actualsize";O.setAttribute("title",mxResources.get("actualSize"));O.style.position="relative";O.style.outline="none";O.style.border="none";O.style.margin="2px";O.style.cursor="pointer";O.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(O,
-60);var L=mxUtils.button("",v);L.className="geSprite geSprite-delete";L.setAttribute("title",mxResources.get("delete"));L.style.position="relative";L.style.outline="none";L.style.border="none";L.style.margin="2px";L.style.float="right";L.style.cursor="pointer";mxUtils.setOpacity(L,10);l=document.createElement("div");l.appendChild(z);l.appendChild(A);l.appendChild(O);l.appendChild(K);l.appendChild(L);c.appendChild(l);var u=document.createElement("input");u.setAttribute("type","number");u.setAttribute("min",
-"1");u.setAttribute("value","1");u.style.width="45px";u.style.position="relative";u.style.top=mxClient.IS_FF?"0px":"-4px";u.style.margin="0 4px 0 4px";l.appendChild(u);var E=document.createElement("select");E.style.position="relative";E.style.top=mxClient.IS_FF?"0px":"-4px";A=["left","right","top","bottom"];for(z=0;z<A.length;z++)K=A[z],O=document.createElement("option"),mxUtils.write(O,mxResources.get(K)),O.value=K,E.appendChild(O);l.appendChild(E);z=mxUtils.button(mxResources.get("add"),function(){var F=
-parseInt(u.value);F=1>F?1:100<F?100:F;u.value=F;for(var H=E.value,R=q.geometry,X=[],J=0;J<F;J++){switch(H){case "left":var W=R.x;var V=R.y+(J+1)*R.height/(F+1);break;case "right":W=R.x+R.width;V=R.y+(J+1)*R.height/(F+1);break;case "top":W=R.x+(J+1)*R.width/(F+1);V=R.y;break;case "bottom":W=R.x+(J+1)*R.width/(F+1),V=R.y+R.height}X.push(n(W-3,V-3))}p.setSelectionCells(X)});z.style.position="relative";z.style.marginLeft="8px";z.style.top=mxClient.IS_FF?"0px":"-4px";l.appendChild(z);var B=document.createElement("div");
+"-6px":"0px";mxUtils.setOpacity(z,60);A=mxUtils.button("",function(){p.zoomOut()});A.className="geSprite geSprite-zoomout";A.setAttribute("title",mxResources.get("zoomOut"));A.style.position="relative";A.style.outline="none";A.style.border="none";A.style.margin="2px";A.style.cursor="pointer";A.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(A,60);var J=mxUtils.button("",function(){p.fit(8);p.center()});J.className="geSprite geSprite-fit";J.setAttribute("title",mxResources.get("fit"));J.style.position=
+"relative";J.style.outline="none";J.style.border="none";J.style.margin="2px";J.style.cursor="pointer";J.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(J,60);var O=mxUtils.button("",function(){p.zoomActual();p.center()});O.className="geSprite geSprite-actualsize";O.setAttribute("title",mxResources.get("actualSize"));O.style.position="relative";O.style.outline="none";O.style.border="none";O.style.margin="2px";O.style.cursor="pointer";O.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(O,
+60);var K=mxUtils.button("",v);K.className="geSprite geSprite-delete";K.setAttribute("title",mxResources.get("delete"));K.style.position="relative";K.style.outline="none";K.style.border="none";K.style.margin="2px";K.style.float="right";K.style.cursor="pointer";mxUtils.setOpacity(K,10);l=document.createElement("div");l.appendChild(z);l.appendChild(A);l.appendChild(O);l.appendChild(J);l.appendChild(K);c.appendChild(l);var u=document.createElement("input");u.setAttribute("type","number");u.setAttribute("min",
+"1");u.setAttribute("value","1");u.style.width="45px";u.style.position="relative";u.style.top=mxClient.IS_FF?"0px":"-4px";u.style.margin="0 4px 0 4px";l.appendChild(u);var E=document.createElement("select");E.style.position="relative";E.style.top=mxClient.IS_FF?"0px":"-4px";A=["left","right","top","bottom"];for(z=0;z<A.length;z++)J=A[z],O=document.createElement("option"),mxUtils.write(O,mxResources.get(J)),O.value=J,E.appendChild(O);l.appendChild(E);z=mxUtils.button(mxResources.get("add"),function(){var F=
+parseInt(u.value);F=1>F?1:100<F?100:F;u.value=F;for(var I=E.value,Q=q.geometry,X=[],L=0;L<F;L++){switch(I){case "left":var U=Q.x;var W=Q.y+(L+1)*Q.height/(F+1);break;case "right":U=Q.x+Q.width;W=Q.y+(L+1)*Q.height/(F+1);break;case "top":U=Q.x+(L+1)*Q.width/(F+1);W=Q.y;break;case "bottom":U=Q.x+(L+1)*Q.width/(F+1),W=Q.y+Q.height}X.push(n(U-3,W-3))}p.setSelectionCells(X)});z.style.position="relative";z.style.marginLeft="8px";z.style.top=mxClient.IS_FF?"0px":"-4px";l.appendChild(z);var B=document.createElement("div");
B.style.margin="4px 0px 8px 0px";B.style.whiteSpace="nowrap";B.style.height="24px";l=document.createElement("span");mxUtils.write(l,mxResources.get("dx"));B.appendChild(l);var D=document.createElement("input");D.setAttribute("type","number");D.setAttribute("min","0");D.setAttribute("max","100");D.style.width="45px";D.style.margin="0 4px 0 4px";B.appendChild(D);mxUtils.write(B,"%");var G=document.createElement("input");G.setAttribute("type","number");G.style.width="45px";G.style.margin="0 4px 0 4px";
-B.appendChild(G);mxUtils.write(B,"pt");l=document.createElement("span");mxUtils.write(l,mxResources.get("dy"));l.style.marginLeft="12px";B.appendChild(l);var N=document.createElement("input");N.setAttribute("type","number");N.setAttribute("min","0");N.setAttribute("max","100");N.style.width="45px";N.style.margin="0 4px 0 4px";B.appendChild(N);mxUtils.write(B,"%");var I=document.createElement("input");I.setAttribute("type","number");I.style.width="45px";I.style.margin="0 4px 0 4px";B.appendChild(I);
-mxUtils.write(B,"pt");c.appendChild(B);k();p.getSelectionModel().addListener(mxEvent.CHANGE,function(){0<p.getSelectionCount()?mxUtils.setOpacity(L,60):mxUtils.setOpacity(L,10);k()});p.addListener(mxEvent.CELLS_MOVED,k);mxEvent.addListener(D,"change",d);mxEvent.addListener(N,"change",d);mxEvent.addListener(G,"change",d);mxEvent.addListener(I,"change",d);l=mxUtils.button(mxResources.get("cancel"),function(){f();b.hideDialog()});l.className="geBtn";z=mxUtils.button(mxResources.get("apply"),function(){var F=
-p.model.cells,H=[],R=[],X;for(X in F){var J=F[X];J.cp&&R.push(g(J))}R.sort(function(W,V){return W.x!=V.x?W.x-V.x:W.y!=V.y?W.y-V.y:W.dx!=V.dx?W.dx-V.dx:W.dy-V.dy});for(F=0;F<R.length;F++)0<F&&R[F].x==R[F-1].x&&R[F].y==R[F-1].y&&R[F].dx==R[F-1].dx&&R[F].dy==R[F-1].dy||H.push("["+R[F].x+","+R[F].y+",0,"+R[F].dx+","+R[F].dy+"]");b.editor.graph.setCellStyles("points","["+H.join(",")+"]",[e]);f();b.hideDialog()});z.className="geBtn gePrimaryBtn";A=mxUtils.button(mxResources.get("reset"),function(){b.editor.graph.setCellStyles("points",
-null,[e]);f();b.hideDialog()});A.className="geBtn";K=document.createElement("div");K.style.marginTop="10px";K.style.textAlign="right";b.editor.cancelFirst?(K.appendChild(l),K.appendChild(A),K.appendChild(z)):(K.appendChild(A),K.appendChild(z),K.appendChild(l));c.appendChild(K)};this.destroy=f;this.container=c};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"},
+B.appendChild(G);mxUtils.write(B,"pt");l=document.createElement("span");mxUtils.write(l,mxResources.get("dy"));l.style.marginLeft="12px";B.appendChild(l);var H=document.createElement("input");H.setAttribute("type","number");H.setAttribute("min","0");H.setAttribute("max","100");H.style.width="45px";H.style.margin="0 4px 0 4px";B.appendChild(H);mxUtils.write(B,"%");var N=document.createElement("input");N.setAttribute("type","number");N.style.width="45px";N.style.margin="0 4px 0 4px";B.appendChild(N);
+mxUtils.write(B,"pt");c.appendChild(B);k();p.getSelectionModel().addListener(mxEvent.CHANGE,function(){0<p.getSelectionCount()?mxUtils.setOpacity(K,60):mxUtils.setOpacity(K,10);k()});p.addListener(mxEvent.CELLS_MOVED,k);mxEvent.addListener(D,"change",d);mxEvent.addListener(H,"change",d);mxEvent.addListener(G,"change",d);mxEvent.addListener(N,"change",d);l=mxUtils.button(mxResources.get("cancel"),function(){f();b.hideDialog()});l.className="geBtn";z=mxUtils.button(mxResources.get("apply"),function(){var F=
+p.model.cells,I=[],Q=[],X;for(X in F){var L=F[X];L.cp&&Q.push(g(L))}Q.sort(function(U,W){return U.x!=W.x?U.x-W.x:U.y!=W.y?U.y-W.y:U.dx!=W.dx?U.dx-W.dx:U.dy-W.dy});for(F=0;F<Q.length;F++)0<F&&Q[F].x==Q[F-1].x&&Q[F].y==Q[F-1].y&&Q[F].dx==Q[F-1].dx&&Q[F].dy==Q[F-1].dy||I.push("["+Q[F].x+","+Q[F].y+",0,"+Q[F].dx+","+Q[F].dy+"]");b.editor.graph.setCellStyles("points","["+I.join(",")+"]",[e]);f();b.hideDialog()});z.className="geBtn gePrimaryBtn";A=mxUtils.button(mxResources.get("reset"),function(){b.editor.graph.setCellStyles("points",
+null,[e]);f();b.hideDialog()});A.className="geBtn";J=document.createElement("div");J.style.marginTop="10px";J.style.textAlign="right";b.editor.cancelFirst?(J.appendChild(l),J.appendChild(A),J.appendChild(z)):(J.appendChild(A),J.appendChild(z),J.appendChild(l));c.appendChild(J)};this.destroy=f;this.container=c};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"},
{description:"diagramXmlDesc",extension:"xml",mimeType:"text/xml"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.styles=[{},{commonStyle:{fontColor:"#5C5C5C",strokeColor:"#006658",fillColor:"#21C0A5"}},{commonStyle:{fontColor:"#095C86",strokeColor:"#AF45ED",fillColor:"#F694C1"},edgeStyle:{strokeColor:"#60E696"}},
{commonStyle:{fontColor:"#46495D",strokeColor:"#788AA3",fillColor:"#B2C9AB"}},{commonStyle:{fontColor:"#5AA9E6",strokeColor:"#FF6392",fillColor:"#FFE45E"}},{commonStyle:{fontColor:"#1D3557",strokeColor:"#457B9D",fillColor:"#A8DADC"},graph:{background:"#F1FAEE"}},{commonStyle:{fontColor:"#393C56",strokeColor:"#E07A5F",fillColor:"#F2CC8F"},graph:{background:"#F4F1DE",gridColor:"#D4D0C0"}},{commonStyle:{fontColor:"#143642",strokeColor:"#0F8B8D",fillColor:"#FAE5C7"},edgeStyle:{strokeColor:"#A8201A"},
graph:{background:"#DAD2D8",gridColor:"#ABA4A9"}},{commonStyle:{fontColor:"#FEFAE0",strokeColor:"#DDA15E",fillColor:"#BC6C25"},graph:{background:"#283618",gridColor:"#48632C"}},{commonStyle:{fontColor:"#E4FDE1",strokeColor:"#028090",fillColor:"#F45B69"},graph:{background:"#114B5F",gridColor:"#0B3240"}},{},{vertexStyle:{strokeColor:"#D0CEE2",fillColor:"#FAD9D5"},edgeStyle:{strokeColor:"#09555B"},commonStyle:{fontColor:"#1A1A1A"}},{vertexStyle:{strokeColor:"#BAC8D3",fillColor:"#09555B",fontColor:"#EEEEEE"},
@@ -11483,86 +11479,86 @@ C.isVertex(C.getParent(t.vertices[0])):!1}},{name:"editable",dispName:"Editable"
{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"fixedWidth",dispName:"Fixed Width",type:"bool",defVal:!1},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},
{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(t,C){var M=mxUtils.getValue(t.style,mxConstants.STYLE_FILLCOLOR,null);return C.editorUi.editor.graph.isSwimlane(t.vertices[0])||null==M||M==mxConstants.NONE||0==mxUtils.getValue(t.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(t.style,mxConstants.STYLE_OPACITY,100)||
null!=t.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(t,C){return 0<t.vertices.length&&C.editorUi.editor.graph.isContainer(t.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Collapsed state for vertices. Possible values are true or false. Default is false.\n#\n# collapsed: false\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
-Editor.createRoughCanvas=function(t){var C=rough.canvas({getContext:function(){return t}});C.draw=function(M){var Q=M.sets||[];M=M.options||this.getDefaultOptions();for(var P=0;P<Q.length;P++){var S=Q[P];switch(S.type){case "path":null!=M.stroke&&this._drawToContext(t,S,M);break;case "fillPath":this._drawToContext(t,S,M);break;case "fillSketch":this.fillSketch(t,S,M)}}};C.fillSketch=function(M,Q,P){var S=t.state.strokeColor,U=t.state.strokeWidth,T=t.state.strokeAlpha,Y=t.state.dashed,aa=P.fillWeight;
-0>aa&&(aa=P.strokeWidth/2);t.setStrokeAlpha(t.state.fillAlpha);t.setStrokeColor(P.fill||"");t.setStrokeWidth(aa);t.setDashed(!1);this._drawToContext(M,Q,P);t.setDashed(Y);t.setStrokeWidth(U);t.setStrokeColor(S);t.setStrokeAlpha(T)};C._drawToContext=function(M,Q,P){M.begin();for(var S=0;S<Q.ops.length;S++){var U=Q.ops[S],T=U.data;switch(U.op){case "move":M.moveTo(T[0],T[1]);break;case "bcurveTo":M.curveTo(T[0],T[1],T[2],T[3],T[4],T[5]);break;case "lineTo":M.lineTo(T[0],T[1])}}M.end();"fillPath"===
-Q.type&&P.filled?M.fill():M.stroke()};return C};(function(){function t(S,U,T){this.canvas=S;this.rc=U;this.shape=T;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,t.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,t.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,t.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
+Editor.createRoughCanvas=function(t){var C=rough.canvas({getContext:function(){return t}});C.draw=function(M){var S=M.sets||[];M=M.options||this.getDefaultOptions();for(var P=0;P<S.length;P++){var R=S[P];switch(R.type){case "path":null!=M.stroke&&this._drawToContext(t,R,M);break;case "fillPath":this._drawToContext(t,R,M);break;case "fillSketch":this.fillSketch(t,R,M)}}};C.fillSketch=function(M,S,P){var R=t.state.strokeColor,T=t.state.strokeWidth,V=t.state.strokeAlpha,Y=t.state.dashed,ba=P.fillWeight;
+0>ba&&(ba=P.strokeWidth/2);t.setStrokeAlpha(t.state.fillAlpha);t.setStrokeColor(P.fill||"");t.setStrokeWidth(ba);t.setDashed(!1);this._drawToContext(M,S,P);t.setDashed(Y);t.setStrokeWidth(T);t.setStrokeColor(R);t.setStrokeAlpha(V)};C._drawToContext=function(M,S,P){M.begin();for(var R=0;R<S.ops.length;R++){var T=S.ops[R],V=T.data;switch(T.op){case "move":M.moveTo(V[0],V[1]);break;case "bcurveTo":M.curveTo(V[0],V[1],V[2],V[3],V[4],V[5]);break;case "lineTo":M.lineTo(V[0],V[1])}}M.end();"fillPath"===
+S.type&&P.filled?M.fill():M.stroke()};return C};(function(){function t(R,T,V){this.canvas=R;this.rc=T;this.shape=V;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,t.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,t.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,t.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
mxUtils.bind(this,t.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,t.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,t.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,t.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,t.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
t.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,t.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,t.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,t.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,t.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,t.prototype.fillAndStroke);
-this.path=[];this.passThrough=!1}t.prototype.moveOp="M";t.prototype.lineOp="L";t.prototype.quadOp="Q";t.prototype.curveOp="C";t.prototype.closeOp="Z";t.prototype.getStyle=function(S,U){var T=1;if(null!=this.shape.state){var Y=this.shape.state.cell.id;if(null!=Y)for(var aa=0;aa<Y.length;aa++)T=(T<<5)-T+Y.charCodeAt(aa)<<0}T={strokeWidth:this.canvas.state.strokeWidth,seed:T,preserveVertices:!0};Y=this.rc.getDefaultOptions();T.stroke=S?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":this.canvas.state.strokeColor:
-mxConstants.NONE;S=null;(T.filled=U)?(T.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,S=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):T.fill="";T.bowing=mxUtils.getValue(this.shape.style,"bowing",Y.bowing);T.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",Y.hachureAngle);T.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",Y.curveFitting);T.roughness=mxUtils.getValue(this.shape.style,"jiggle",
-Y.roughness);T.simplification=mxUtils.getValue(this.shape.style,"simplification",Y.simplification);T.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",Y.disableMultiStroke);T.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",Y.disableMultiStrokeFill);U=mxUtils.getValue(this.shape.style,"hachureGap",-1);T.hachureGap="auto"==U?-1:U;T.dashGap=mxUtils.getValue(this.shape.style,"dashGap",U);T.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",
-U);T.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",U);U=mxUtils.getValue(this.shape.style,"fillWeight",-1);T.fillWeight="auto"==U?-1:U;U=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==U&&(U=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),U=null!=T.fill&&(null!=S||null!=U&&T.fill==U)?"solid":Y.fillStyle);T.fillStyle=U;return T};t.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,
-arguments):this.path=[]};t.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};t.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var S=2;S<arguments.length;S+=2)this.lastX=arguments[S-1],this.lastY=arguments[S],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};t.prototype.lineTo=function(S,U){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,
-S,U),this.lastX=S,this.lastY=U)};t.prototype.moveTo=function(S,U){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,S,U),this.lastX=S,this.lastY=U,this.firstX=S,this.firstY=U)};t.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};t.prototype.quadTo=function(S,U,T,Y){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,S,U,T,Y),this.lastX=T,this.lastY=Y)};
-t.prototype.curveTo=function(S,U,T,Y,aa,Z){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,S,U,T,Y,aa,Z),this.lastX=aa,this.lastY=Z)};t.prototype.arcTo=function(S,U,T,Y,aa,Z,da){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var ja=mxUtils.arcToCurves(this.lastX,this.lastY,S,U,T,Y,aa,Z,da);if(null!=ja)for(var ha=0;ha<ja.length;ha+=6)this.curveTo(ja[ha],ja[ha+1],ja[ha+2],ja[ha+3],ja[ha+4],ja[ha+5]);this.lastX=Z;this.lastY=da}};t.prototype.rect=
-function(S,U,T,Y){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(S,U,T,Y,this.getStyle(!0,!0)))};t.prototype.ellipse=function(S,U,T,Y){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(S+T/2,U+Y/2,T,Y,this.getStyle(!0,!0)))};t.prototype.roundrect=function(S,U,T,Y,aa,Z){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(S+
-aa,U),this.lineTo(S+T-aa,U),this.quadTo(S+T,U,S+T,U+Z),this.lineTo(S+T,U+Y-Z),this.quadTo(S+T,U+Y,S+T-aa,U+Y),this.lineTo(S+aa,U+Y),this.quadTo(S,U+Y,S,U+Y-Z),this.lineTo(S,U+Z),this.quadTo(S,U,S+aa,U))};t.prototype.drawPath=function(S){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),S)}catch(T){}this.passThrough=!1}else if(null!=this.nextShape){for(var U in S)this.nextShape.options[U]=S[U];S.stroke!=mxConstants.NONE&&null!=S.stroke||delete this.nextShape.options.stroke;
-S.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};t.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};t.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};t.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,
+this.path=[];this.passThrough=!1}t.prototype.moveOp="M";t.prototype.lineOp="L";t.prototype.quadOp="Q";t.prototype.curveOp="C";t.prototype.closeOp="Z";t.prototype.getStyle=function(R,T){var V=1;if(null!=this.shape.state){var Y=this.shape.state.cell.id;if(null!=Y)for(var ba=0;ba<Y.length;ba++)V=(V<<5)-V+Y.charCodeAt(ba)<<0}V={strokeWidth:this.canvas.state.strokeWidth,seed:V,preserveVertices:!0};Y=this.rc.getDefaultOptions();V.stroke=R?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":this.canvas.state.strokeColor:
+mxConstants.NONE;R=null;(V.filled=T)?(V.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,R=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):V.fill="";V.bowing=mxUtils.getValue(this.shape.style,"bowing",Y.bowing);V.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",Y.hachureAngle);V.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",Y.curveFitting);V.roughness=mxUtils.getValue(this.shape.style,"jiggle",
+Y.roughness);V.simplification=mxUtils.getValue(this.shape.style,"simplification",Y.simplification);V.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",Y.disableMultiStroke);V.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",Y.disableMultiStrokeFill);T=mxUtils.getValue(this.shape.style,"hachureGap",-1);V.hachureGap="auto"==T?-1:T;V.dashGap=mxUtils.getValue(this.shape.style,"dashGap",T);V.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",
+T);V.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",T);T=mxUtils.getValue(this.shape.style,"fillWeight",-1);V.fillWeight="auto"==T?-1:T;T=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==T&&(T=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),T=null!=V.fill&&(null!=R||null!=T&&V.fill==T)?"solid":Y.fillStyle);V.fillStyle=T;return V};t.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,
+arguments):this.path=[]};t.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};t.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var R=2;R<arguments.length;R+=2)this.lastX=arguments[R-1],this.lastY=arguments[R],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};t.prototype.lineTo=function(R,T){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,
+R,T),this.lastX=R,this.lastY=T)};t.prototype.moveTo=function(R,T){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,R,T),this.lastX=R,this.lastY=T,this.firstX=R,this.firstY=T)};t.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};t.prototype.quadTo=function(R,T,V,Y){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,R,T,V,Y),this.lastX=V,this.lastY=Y)};
+t.prototype.curveTo=function(R,T,V,Y,ba,Z){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,R,T,V,Y,ba,Z),this.lastX=ba,this.lastY=Z)};t.prototype.arcTo=function(R,T,V,Y,ba,Z,da){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var ea=mxUtils.arcToCurves(this.lastX,this.lastY,R,T,V,Y,ba,Z,da);if(null!=ea)for(var ka=0;ka<ea.length;ka+=6)this.curveTo(ea[ka],ea[ka+1],ea[ka+2],ea[ka+3],ea[ka+4],ea[ka+5]);this.lastX=Z;this.lastY=da}};t.prototype.rect=
+function(R,T,V,Y){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(R,T,V,Y,this.getStyle(!0,!0)))};t.prototype.ellipse=function(R,T,V,Y){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(R+V/2,T+Y/2,V,Y,this.getStyle(!0,!0)))};t.prototype.roundrect=function(R,T,V,Y,ba,Z){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(R+
+ba,T),this.lineTo(R+V-ba,T),this.quadTo(R+V,T,R+V,T+Z),this.lineTo(R+V,T+Y-Z),this.quadTo(R+V,T+Y,R+V-ba,T+Y),this.lineTo(R+ba,T+Y),this.quadTo(R,T+Y,R,T+Y-Z),this.lineTo(R,T+Z),this.quadTo(R,T,R+ba,T))};t.prototype.drawPath=function(R){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),R)}catch(V){}this.passThrough=!1}else if(null!=this.nextShape){for(var T in R)this.nextShape.options[T]=R[T];R.stroke!=mxConstants.NONE&&null!=R.stroke||delete this.nextShape.options.stroke;
+R.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};t.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};t.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};t.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,
!0))};t.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(S){return new t(S,Editor.createRoughCanvas(S),this)};var C=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(S){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?C.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(S):
-this.createRoughCanvas(S)};var M=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(S,U,T,Y,aa){null!=S.handJiggle&&S.handJiggle.passThrough||M.apply(this,arguments)};var Q=mxShape.prototype.paint;mxShape.prototype.paint=function(S){var U=S.addTolerance,T=!0;null!=this.style&&(T="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=S.handJiggle&&S.handJiggle.constructor==t&&!this.outline){S.save();var Y=this.fill,aa=this.stroke;this.stroke=
-this.fill=null;var Z=this.configurePointerEvents,da=S.setStrokeColor;S.setStrokeColor=function(){};var ja=S.setFillColor;S.setFillColor=function(){};T||null==Y||(this.configurePointerEvents=function(){});S.handJiggle.passThrough=!0;Q.apply(this,arguments);S.handJiggle.passThrough=!1;S.setFillColor=ja;S.setStrokeColor=da;this.configurePointerEvents=Z;this.stroke=aa;this.fill=Y;S.restore();T&&null!=Y&&(S.addTolerance=function(){})}Q.apply(this,arguments);S.addTolerance=U};var P=mxShape.prototype.paintGlassEffect;
-mxShape.prototype.paintGlassEffect=function(S,U,T,Y,aa,Z){null!=S.handJiggle&&S.handJiggle.constructor==t?(S.handJiggle.passThrough=!0,P.apply(this,arguments),S.handJiggle.passThrough=!1):P.apply(this,arguments)}})();Editor.fastCompress=function(t){return null==t||0==t.length||"undefined"===typeof pako?t:Graph.arrayBufferToString(pako.deflateRaw(t))};Editor.fastDecompress=function(t){return null==t||0==t.length||"undefined"===typeof pako?t:pako.inflateRaw(Graph.stringToArrayBuffer(atob(t)),{to:"string"})};
-Editor.extractGraphModel=function(t,C,M){if(null!=t&&"undefined"!==typeof pako){var Q=t.ownerDocument.getElementsByTagName("div"),P=[];if(null!=Q&&0<Q.length)for(var S=0;S<Q.length;S++)if("mxgraph"==Q[S].getAttribute("class")){P.push(Q[S]);break}0<P.length&&(Q=P[0].getAttribute("data-mxgraph"),null!=Q?(P=JSON.parse(Q),null!=P&&null!=P.xml&&(t=mxUtils.parseXml(P.xml),t=t.documentElement)):(P=P[0].getElementsByTagName("div"),0<P.length&&(Q=mxUtils.getTextContent(P[0]),Q=Graph.decompress(Q,null,M),0<
-Q.length&&(t=mxUtils.parseXml(Q),t=t.documentElement))))}if(null!=t&&"svg"==t.nodeName)if(Q=t.getAttribute("content"),null!=Q&&"<"!=Q.charAt(0)&&"%"!=Q.charAt(0)&&(Q=unescape(window.atob?atob(Q):Base64.decode(cont,Q))),null!=Q&&"%"==Q.charAt(0)&&(Q=decodeURIComponent(Q)),null!=Q&&0<Q.length)t=mxUtils.parseXml(Q).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==t||C||(P=null,"diagram"==t.nodeName?P=t:"mxfile"==t.nodeName&&(Q=t.getElementsByTagName("diagram"),0<Q.length&&
-(P=Q[Math.max(0,Math.min(Q.length-1,urlParams.page||0))])),null!=P&&(t=Editor.parseDiagramNode(P,M)));null==t||"mxGraphModel"==t.nodeName||C&&"mxfile"==t.nodeName||(t=null);return t};Editor.parseDiagramNode=function(t,C){var M=mxUtils.trim(mxUtils.getTextContent(t)),Q=null;0<M.length?(t=Graph.decompress(M,null,C),null!=t&&0<t.length&&(Q=mxUtils.parseXml(t).documentElement)):(t=mxUtils.getChildNodes(t),0<t.length&&(Q=mxUtils.createXmlDocument(),Q.appendChild(Q.importNode(t[0],!0)),Q=Q.documentElement));
-return Q};Editor.getDiagramNodeXml=function(t){var C=mxUtils.getTextContent(t),M=null;0<C.length?M=Graph.decompress(C):null!=t.firstChild&&(M=mxUtils.getXml(t.firstChild));return M};Editor.extractGraphModelFromPdf=function(t){t=t.substring(t.indexOf(",")+1);t=window.atob&&!mxClient.IS_SF?atob(t):Base64.decode(t,!0);if("%PDF-1.7"==t.substring(0,8)){var C=t.indexOf("EmbeddedFile");if(-1<C){var M=t.indexOf("stream",C)+9;if(0<t.substring(C,M).indexOf("application#2Fvnd.jgraph.mxfile"))return C=t.indexOf("endstream",
-M-1),pako.inflateRaw(Graph.stringToArrayBuffer(t.substring(M,C)),{to:"string"})}return null}M=null;C="";for(var Q=0,P=0,S=[],U=null;P<t.length;){var T=t.charCodeAt(P);P+=1;10!=T&&(C+=String.fromCharCode(T));T=="/Subject (%3Cmxfile".charCodeAt(Q)?Q++:Q=0;if(19==Q){var Y=t.indexOf("%3C%2Fmxfile%3E)",P)+15;P-=9;if(Y>P){M=t.substring(P,Y);break}}10==T&&("endobj"==C?U=null:"obj"==C.substring(C.length-3,C.length)||"xref"==C||"trailer"==C?(U=[],S[C.split(" ")[0]]=U):null!=U&&U.push(C),C="")}null==M&&(M=
-Editor.extractGraphModelFromXref(S));null!=M&&(M=decodeURIComponent(M.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return M};Editor.extractGraphModelFromXref=function(t){var C=t.trailer,M=null;null!=C&&(C=/.* \/Info (\d+) (\d+) R/g.exec(C.join("\n")),null!=C&&0<C.length&&(C=t[C[1]],null!=C&&(C=/.* \/Subject (\d+) (\d+) R/g.exec(C.join("\n")),null!=C&&0<C.length&&(t=t[C[1]],null!=t&&(t=t.join("\n"),M=t.substring(1,t.length-1))))));return M};Editor.extractParserError=function(t,C){var M=null;t=null!=
+this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(R){return new t(R,Editor.createRoughCanvas(R),this)};var C=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(R){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?C.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(R):
+this.createRoughCanvas(R)};var M=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(R,T,V,Y,ba){null!=R.handJiggle&&R.handJiggle.passThrough||M.apply(this,arguments)};var S=mxShape.prototype.paint;mxShape.prototype.paint=function(R){var T=R.addTolerance,V=!0;null!=this.style&&(V="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=R.handJiggle&&R.handJiggle.constructor==t&&!this.outline){R.save();var Y=this.fill,ba=this.stroke;this.stroke=
+this.fill=null;var Z=this.configurePointerEvents,da=R.setStrokeColor;R.setStrokeColor=function(){};var ea=R.setFillColor;R.setFillColor=function(){};V||null==Y||(this.configurePointerEvents=function(){});R.handJiggle.passThrough=!0;S.apply(this,arguments);R.handJiggle.passThrough=!1;R.setFillColor=ea;R.setStrokeColor=da;this.configurePointerEvents=Z;this.stroke=ba;this.fill=Y;R.restore();V&&null!=Y&&(R.addTolerance=function(){})}S.apply(this,arguments);R.addTolerance=T};var P=mxShape.prototype.paintGlassEffect;
+mxShape.prototype.paintGlassEffect=function(R,T,V,Y,ba,Z){null!=R.handJiggle&&R.handJiggle.constructor==t?(R.handJiggle.passThrough=!0,P.apply(this,arguments),R.handJiggle.passThrough=!1):P.apply(this,arguments)}})();Editor.fastCompress=function(t){return null==t||0==t.length||"undefined"===typeof pako?t:Graph.arrayBufferToString(pako.deflateRaw(t))};Editor.fastDecompress=function(t){return null==t||0==t.length||"undefined"===typeof pako?t:pako.inflateRaw(Graph.stringToArrayBuffer(atob(t)),{to:"string"})};
+Editor.extractGraphModel=function(t,C,M){if(null!=t&&"undefined"!==typeof pako){var S=t.ownerDocument.getElementsByTagName("div"),P=[];if(null!=S&&0<S.length)for(var R=0;R<S.length;R++)if("mxgraph"==S[R].getAttribute("class")){P.push(S[R]);break}0<P.length&&(S=P[0].getAttribute("data-mxgraph"),null!=S?(P=JSON.parse(S),null!=P&&null!=P.xml&&(t=mxUtils.parseXml(P.xml),t=t.documentElement)):(P=P[0].getElementsByTagName("div"),0<P.length&&(S=mxUtils.getTextContent(P[0]),S=Graph.decompress(S,null,M),0<
+S.length&&(t=mxUtils.parseXml(S),t=t.documentElement))))}if(null!=t&&"svg"==t.nodeName)if(S=t.getAttribute("content"),null!=S&&"<"!=S.charAt(0)&&"%"!=S.charAt(0)&&(S=unescape(window.atob?atob(S):Base64.decode(cont,S))),null!=S&&"%"==S.charAt(0)&&(S=decodeURIComponent(S)),null!=S&&0<S.length)t=mxUtils.parseXml(S).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==t||C||(P=null,"diagram"==t.nodeName?P=t:"mxfile"==t.nodeName&&(S=t.getElementsByTagName("diagram"),0<S.length&&
+(P=S[Math.max(0,Math.min(S.length-1,urlParams.page||0))])),null!=P&&(t=Editor.parseDiagramNode(P,M)));null==t||"mxGraphModel"==t.nodeName||C&&"mxfile"==t.nodeName||(t=null);return t};Editor.parseDiagramNode=function(t,C){var M=mxUtils.trim(mxUtils.getTextContent(t)),S=null;0<M.length?(t=Graph.decompress(M,null,C),null!=t&&0<t.length&&(S=mxUtils.parseXml(t).documentElement)):(t=mxUtils.getChildNodes(t),0<t.length&&(S=mxUtils.createXmlDocument(),S.appendChild(S.importNode(t[0],!0)),S=S.documentElement));
+return S};Editor.getDiagramNodeXml=function(t){var C=mxUtils.getTextContent(t),M=null;0<C.length?M=Graph.decompress(C):null!=t.firstChild&&(M=mxUtils.getXml(t.firstChild));return M};Editor.extractGraphModelFromPdf=function(t){t=t.substring(t.indexOf(",")+1);t=window.atob&&!mxClient.IS_SF?atob(t):Base64.decode(t,!0);if("%PDF-1.7"==t.substring(0,8)){var C=t.indexOf("EmbeddedFile");if(-1<C){var M=t.indexOf("stream",C)+9;if(0<t.substring(C,M).indexOf("application#2Fvnd.jgraph.mxfile"))return C=t.indexOf("endstream",
+M-1),pako.inflateRaw(Graph.stringToArrayBuffer(t.substring(M,C)),{to:"string"})}return null}M=null;C="";for(var S=0,P=0,R=[],T=null;P<t.length;){var V=t.charCodeAt(P);P+=1;10!=V&&(C+=String.fromCharCode(V));V=="/Subject (%3Cmxfile".charCodeAt(S)?S++:S=0;if(19==S){var Y=t.indexOf("%3C%2Fmxfile%3E)",P)+15;P-=9;if(Y>P){M=t.substring(P,Y);break}}10==V&&("endobj"==C?T=null:"obj"==C.substring(C.length-3,C.length)||"xref"==C||"trailer"==C?(T=[],R[C.split(" ")[0]]=T):null!=T&&T.push(C),C="")}null==M&&(M=
+Editor.extractGraphModelFromXref(R));null!=M&&(M=decodeURIComponent(M.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return M};Editor.extractGraphModelFromXref=function(t){var C=t.trailer,M=null;null!=C&&(C=/.* \/Info (\d+) (\d+) R/g.exec(C.join("\n")),null!=C&&0<C.length&&(C=t[C[1]],null!=C&&(C=/.* \/Subject (\d+) (\d+) R/g.exec(C.join("\n")),null!=C&&0<C.length&&(t=t[C[1]],null!=t&&(t=t.join("\n"),M=t.substring(1,t.length-1))))));return M};Editor.extractParserError=function(t,C){var M=null;t=null!=
t?t.getElementsByTagName("parsererror"):null;null!=t&&0<t.length&&(M=C||mxResources.get("invalidChars"),C=t[0].getElementsByTagName("div"),0<C.length&&(M=mxUtils.getTextContent(C[0])));return null!=M?mxUtils.trim(M):M};Editor.addRetryToError=function(t,C){null!=t&&(t=null!=t.error?t.error:t,null==t.retry&&(t.retry=C))};Editor.configure=function(t,C){if(null!=t){Editor.config=t;Editor.configVersion=t.version;Menus.prototype.defaultFonts=t.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=
t.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=t.defaultColors||ColorDialog.prototype.defaultColors;ColorDialog.prototype.colorNames=t.colorNames||ColorDialog.prototype.colorNames;StyleFormatPanel.prototype.defaultColorSchemes=t.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=t.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=t.autosaveDelay||DrawioFile.prototype.autosaveDelay;
t.debug&&(urlParams.test="1");null!=t.templateFile&&(EditorUi.templateFile=t.templateFile);null!=t.styles&&(Array.isArray(t.styles)?Editor.styles=t.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=t.globalVars&&(Editor.globalVars=t.globalVars);null!=t.compressXml&&(Editor.compressXml=t.compressXml);null!=t.includeDiagram&&(Editor.defaultIncludeDiagram=t.includeDiagram);null!=t.simpleLabels&&(Editor.simpleLabels=t.simpleLabels);null!=t.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=
t.oneDriveInlinePicker);null!=t.darkColor&&(Editor.darkColor=t.darkColor);null!=t.lightColor&&(Editor.lightColor=t.lightColor);null!=t.settingsName&&(Editor.configurationKey="."+t.settingsName+"-configuration",Editor.settingsKey="."+t.settingsName+"-config",mxSettings.key=Editor.settingsKey);t.customFonts&&(Menus.prototype.defaultFonts=t.customFonts.concat(Menus.prototype.defaultFonts));t.customPresetColors&&(ColorDialog.prototype.presetColors=t.customPresetColors.concat(ColorDialog.prototype.presetColors));
-null!=t.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=t.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=t.css){var M=document.createElement("style");M.setAttribute("type","text/css");M.appendChild(document.createTextNode(t.css));var Q=document.getElementsByTagName("script")[0];Q.parentNode.insertBefore(M,Q)}null!=t.libraries&&(Sidebar.prototype.customEntries=t.libraries);null!=t.enabledLibraries&&(Array.isArray(t.enabledLibraries)?Sidebar.prototype.enabledLibraries=
+null!=t.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=t.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=t.css){var M=document.createElement("style");M.setAttribute("type","text/css");M.appendChild(document.createTextNode(t.css));var S=document.getElementsByTagName("script")[0];S.parentNode.insertBefore(M,S)}null!=t.libraries&&(Sidebar.prototype.customEntries=t.libraries);null!=t.enabledLibraries&&(Array.isArray(t.enabledLibraries)?Sidebar.prototype.enabledLibraries=
t.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=t.defaultLibraries&&(Sidebar.prototype.defaultEntries=t.defaultLibraries);null!=t.defaultCustomLibraries&&(Editor.defaultCustomLibraries=t.defaultCustomLibraries);null!=t.enableCustomLibraries&&(Editor.enableCustomLibraries=t.enableCustomLibraries);null!=t.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=t.defaultVertexStyle);null!=t.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=t.defaultEdgeStyle);
null!=t.defaultPageVisible&&(Graph.prototype.defaultPageVisible=t.defaultPageVisible);null!=t.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=t.defaultGridEnabled);null!=t.zoomWheel&&(Graph.zoomWheel=t.zoomWheel);null!=t.zoomFactor&&(M=parseFloat(t.zoomFactor),!isNaN(M)&&1<M?Graph.prototype.zoomFactor=M:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=t.gridSteps&&(M=parseInt(t.gridSteps),!isNaN(M)&&0<M?mxGraphView.prototype.gridSteps=M:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));
-null!=t.pageFormat&&(M=parseInt(t.pageFormat.width),Q=parseInt(t.pageFormat.height),!isNaN(M)&&0<M&&!isNaN(Q)&&0<Q?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,M,Q),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));t.thumbWidth&&(Sidebar.prototype.thumbWidth=t.thumbWidth);t.thumbHeight&&(Sidebar.prototype.thumbHeight=t.thumbHeight);t.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=
+null!=t.pageFormat&&(M=parseInt(t.pageFormat.width),S=parseInt(t.pageFormat.height),!isNaN(M)&&0<M&&!isNaN(S)&&0<S?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,M,S),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));t.thumbWidth&&(Sidebar.prototype.thumbWidth=t.thumbWidth);t.thumbHeight&&(Sidebar.prototype.thumbHeight=t.thumbHeight);t.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=
t.emptyLibraryXml);t.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=t.emptyDiagramXml);t.sidebarWidth&&(EditorUi.prototype.hsplitPosition=t.sidebarWidth);t.sidebarTitles&&(Sidebar.prototype.sidebarTitles=t.sidebarTitles);t.sidebarTitleSize&&(M=parseInt(t.sidebarTitleSize),!isNaN(M)&&0<M?Sidebar.prototype.sidebarTitleSize=M:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));t.fontCss&&("string"===typeof t.fontCss?Editor.configureFontCss(t.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));
null!=t.autosaveDelay&&(M=parseInt(t.autosaveDelay),!isNaN(M)&&0<M?DrawioFile.prototype.autosaveDelay=M:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));if(null!=t.plugins&&!C)for(App.initPluginCallback(),C=0;C<t.plugins.length;C++)mxscript(t.plugins[C]);null!=t.maxImageBytes&&(EditorUi.prototype.maxImageBytes=t.maxImageBytes);null!=t.maxImageSize&&(EditorUi.prototype.maxImageSize=t.maxImageSize);null!=t.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=t.shareCursorPosition);
-null!=t.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=t.showRemoteCursors)}};Editor.configureFontCss=function(t){if(null!=t){Editor.prototype.fontCss=t;var C=document.getElementsByTagName("script")[0];if(null!=C&&null!=C.parentNode){var M=document.createElement("style");M.setAttribute("type","text/css");M.appendChild(document.createTextNode(t));C.parentNode.insertBefore(M,C);t=t.split("url(");for(M=1;M<t.length;M++){var Q=t[M].indexOf(")");Q=Editor.trimCssUrl(t[M].substring(0,Q));var P=
-document.createElement("link");P.setAttribute("rel","preload");P.setAttribute("href",Q);P.setAttribute("as","font");P.setAttribute("crossorigin","");C.parentNode.insertBefore(P,C)}}}};Editor.trimCssUrl=function(t){return t.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(t){t=null!=
+null!=t.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=t.showRemoteCursors)}};Editor.configureFontCss=function(t){if(null!=t){Editor.prototype.fontCss=t;var C=document.getElementsByTagName("script")[0];if(null!=C&&null!=C.parentNode){var M=document.createElement("style");M.setAttribute("type","text/css");M.appendChild(document.createTextNode(t));C.parentNode.insertBefore(M,C);t=t.split("url(");for(M=1;M<t.length;M++){var S=t[M].indexOf(")");S=Editor.trimCssUrl(t[M].substring(0,S));var P=
+document.createElement("link");P.setAttribute("rel","preload");P.setAttribute("href",S);P.setAttribute("as","font");P.setAttribute("crossorigin","");C.parentNode.insertBefore(P,C)}}}};Editor.trimCssUrl=function(t){return t.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(t){t=null!=
t?t:Editor.GUID_LENGTH;for(var C=[],M=0;M<t;M++)C.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return C.join("")};Editor.prototype.timeout=25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(t){t=null!=t&&"mxlibrary"!=t.nodeName?this.extractGraphModel(t):null;if(null!=t){var C=Editor.extractParserError(t,
-mxResources.get("invalidOrMissingFile"));if(C)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[t],"cause",[C]),Error(mxResources.get("notADiagramFile")+" ("+C+")");if("mxGraphModel"==t.nodeName){C=t.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=C&&""!=C)C!=this.graph.currentStyle&&(M=null!=this.graph.themes?this.graph.themes[C]:mxUtils.load(STYLE_PATH+"/"+C+".xml").getDocumentElement(),null!=M&&(Q=new mxCodec(M.ownerDocument),Q.decode(M,this.graph.getStylesheet())));
-else{var M=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=M){var Q=new mxCodec(M.ownerDocument);Q.decode(M,this.graph.getStylesheet())}}this.graph.currentStyle=C;this.graph.mathEnabled="1"==urlParams.math||"1"==t.getAttribute("math");C=t.getAttribute("backgroundImage");null!=C?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(C)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&
+mxResources.get("invalidOrMissingFile"));if(C)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[t],"cause",[C]),Error(mxResources.get("notADiagramFile")+" ("+C+")");if("mxGraphModel"==t.nodeName){C=t.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=C&&""!=C)C!=this.graph.currentStyle&&(M=null!=this.graph.themes?this.graph.themes[C]:mxUtils.load(STYLE_PATH+"/"+C+".xml").getDocumentElement(),null!=M&&(S=new mxCodec(M.ownerDocument),S.decode(M,this.graph.getStylesheet())));
+else{var M=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=M){var S=new mxCodec(M.ownerDocument);S.decode(M,this.graph.getStylesheet())}}this.graph.currentStyle=C;this.graph.mathEnabled="1"==urlParams.math||"1"==t.getAttribute("math");C=t.getAttribute("backgroundImage");null!=C?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(C)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&
this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==t.getAttribute("shadow"),!1);if(C=t.getAttribute("extFonts"))try{for(C=C.split("|").map(function(P){P=P.split("^");return{name:P[0],url:P[1]}}),M=0;M<C.length;M++)this.graph.addExtFont(C[M].name,C[M].url)}catch(P){console.log("ExtFonts format error: "+P.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||
-"Invalid data",toString:function(){return this.message}};};var e=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(t,C){t=null!=t?t:!0;var M=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&M.setAttribute("style",this.graph.currentStyle);var Q=this.graph.getBackgroundImageObject(this.graph.backgroundImage,C);null!=Q&&M.setAttribute("backgroundImage",JSON.stringify(Q));M.setAttribute("math",this.graph.mathEnabled?"1":"0");M.setAttribute("shadow",
-this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(Q=this.graph.extFonts.map(function(P){return P.name+"^"+P.url}),M.setAttribute("extFonts",Q.join("|")));return M};Editor.prototype.isDataSvg=function(t){try{var C=mxUtils.parseXml(t).documentElement.getAttribute("content");if(null!=C&&(null!=C&&"<"!=C.charAt(0)&&"%"!=C.charAt(0)&&(C=unescape(window.atob?atob(C):Base64.decode(cont,C))),null!=C&&"%"==C.charAt(0)&&(C=decodeURIComponent(C)),null!=C&&0<C.length)){var M=
-mxUtils.parseXml(C).documentElement;return"mxfile"==M.nodeName||"mxGraphModel"==M.nodeName}}catch(Q){}return!1};Editor.prototype.extractGraphModel=function(t,C,M){return Editor.extractGraphModel.apply(this,arguments)};var f=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();
+"Invalid data",toString:function(){return this.message}};};var e=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(t,C){t=null!=t?t:!0;var M=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&M.setAttribute("style",this.graph.currentStyle);var S=this.graph.getBackgroundImageObject(this.graph.backgroundImage,C);null!=S&&M.setAttribute("backgroundImage",JSON.stringify(S));M.setAttribute("math",this.graph.mathEnabled?"1":"0");M.setAttribute("shadow",
+this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(S=this.graph.extFonts.map(function(P){return P.name+"^"+P.url}),M.setAttribute("extFonts",S.join("|")));return M};Editor.prototype.isDataSvg=function(t){try{var C=mxUtils.parseXml(t).documentElement.getAttribute("content");if(null!=C&&(null!=C&&"<"!=C.charAt(0)&&"%"!=C.charAt(0)&&(C=unescape(window.atob?atob(C):Base64.decode(cont,C))),null!=C&&"%"==C.charAt(0)&&(C=decodeURIComponent(C)),null!=C&&0<C.length)){var M=
+mxUtils.parseXml(C).documentElement;return"mxfile"==M.nodeName||"mxGraphModel"==M.nodeName}}catch(S){}return!1};Editor.prototype.extractGraphModel=function(t,C,M){return Editor.extractGraphModel.apply(this,arguments)};var f=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();
f.apply(this,arguments)};var c=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){c.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(t,C){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){t=null!=t?t:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(P){try{MathJax.typesetClear([P]),
-MathJax.typeset([P]),Editor.onMathJaxDone()}catch(S){MathJax.typesetClear([P]),null!=S.retry?S.retry.then(function(){MathJax.typesetPromise([P]).then(Editor.onMathJaxDone)}):null!=window.console&&console.log("Error in MathJax: "+S.toString())}};window.MathJax=null!=C?C:{loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath"]},startup:{pageReady:function(){for(var P=0;P<Editor.mathJaxQueue.length;P++)Editor.doMathJaxRender(Editor.mathJaxQueue[P])}}};
-Editor.MathJaxRender=function(P){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(P):Editor.mathJaxQueue.push(P)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};Editor.onMathJaxDone=function(){};var M=Editor.prototype.init;Editor.prototype.init=function(){M.apply(this,arguments);var P=mxUtils.bind(this,function(S,U){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,
-P);this.graph.addListener(mxEvent.REFRESH,P)};C=document.getElementsByTagName("script");if(null!=C&&0<C.length){var Q=document.createElement("script");Q.setAttribute("type","text/javascript");Q.setAttribute("src",t);C[0].parentNode.appendChild(Q)}}};Editor.prototype.csvToArray=function(t){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(t))return null;
-var C=[];t.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(M,Q,P,S){void 0!==Q?C.push(Q.replace(/\\'/g,"'")):void 0!==P?C.push(P.replace(/\\"/g,'"')):void 0!==S&&C.push(S);return""});/,\s*$/.test(t)&&C.push("");return C};Editor.prototype.isCorsEnabledForUrl=function(t){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||t.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&
-null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(t)||"https://raw.githubusercontent.com/"===t.substring(0,34)||"https://fonts.googleapis.com/"===t.substring(0,29)||"https://fonts.gstatic.com/"===t.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var t=new mxUrlConverter;t.updateBaseUrl();var C=t.convert,M=this;t.convert=function(Q){if(null!=Q){var P="http://"==Q.substring(0,7)||"https://"==
-Q.substring(0,8);P&&!navigator.onLine?Q=Editor.svgBrokenImage.src:!P||Q.substring(0,t.baseUrl.length)==t.baseUrl||M.crossOriginImages&&M.isCorsEnabledForUrl(Q)?"chrome-extension://"==Q.substring(0,19)||mxClient.IS_CHROMEAPP||(Q=C.apply(this,arguments)):Q=PROXY_URL+"?url="+encodeURIComponent(Q)}return Q};return t};Editor.createSvgDataUri=function(t){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(t)))};Editor.prototype.convertImageToDataUri=function(t,C){try{var M=!0,Q=window.setTimeout(mxUtils.bind(this,
-function(){M=!1;C(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(t))mxUtils.get(t,mxUtils.bind(this,function(S){window.clearTimeout(Q);M&&C(Editor.createSvgDataUri(S.getText()))}),function(){window.clearTimeout(Q);M&&C(Editor.svgBrokenImage.src)});else{var P=new Image;this.crossOriginImages&&(P.crossOrigin="anonymous");P.onload=function(){window.clearTimeout(Q);if(M)try{var S=document.createElement("canvas"),U=S.getContext("2d");S.height=P.height;S.width=P.width;U.drawImage(P,0,0);
-C(S.toDataURL())}catch(T){C(Editor.svgBrokenImage.src)}};P.onerror=function(){window.clearTimeout(Q);M&&C(Editor.svgBrokenImage.src)};P.src=t}}catch(S){C(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(t,C,M,Q){null==Q&&(Q=this.createImageUrlConverter());var P=0,S=M||{};M=mxUtils.bind(this,function(U,T){U=t.getElementsByTagName(U);for(var Y=0;Y<U.length;Y++)mxUtils.bind(this,function(aa){try{if(null!=aa){var Z=Q.convert(aa.getAttribute(T));if(null!=Z&&"data:"!=Z.substring(0,5)){var da=
-S[Z];null==da?(P++,this.convertImageToDataUri(Z,function(ja){null!=ja&&(S[Z]=ja,aa.setAttribute(T,ja));P--;0==P&&C(t)})):aa.setAttribute(T,da)}else null!=Z&&aa.setAttribute(T,Z)}}catch(ja){}})(U[Y])});M("image","xlink:href");M("img","src");0==P&&C(t)};Editor.base64Encode=function(t){for(var C="",M=0,Q=t.length,P,S,U;M<Q;){P=t.charCodeAt(M++)&255;if(M==Q){C+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>2);C+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&
-3)<<4);C+="==";break}S=t.charCodeAt(M++);if(M==Q){C+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>2);C+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&3)<<4|(S&240)>>4);C+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((S&15)<<2);C+="=";break}U=t.charCodeAt(M++);C+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>2);C+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&
-3)<<4|(S&240)>>4);C+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((S&15)<<2|(U&192)>>6);C+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(U&63)}return C};Editor.prototype.loadUrl=function(t,C,M,Q,P,S,U,T){try{var Y=!U&&(Q||/(\.png)($|\?)/i.test(t)||/(\.jpe?g)($|\?)/i.test(t)||/(\.gif)($|\?)/i.test(t)||/(\.pdf)($|\?)/i.test(t));P=null!=P?P:!0;var aa=mxUtils.bind(this,function(){mxUtils.get(t,mxUtils.bind(this,function(Z){if(200<=Z.getStatus()&&
-299>=Z.getStatus()){if(null!=C){var da=Z.getText();if(Y){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){Z=mxUtilsBinaryToArray(Z.request.responseBody).toArray();da=Array(Z.length);for(var ja=0;ja<Z.length;ja++)da[ja]=String.fromCharCode(Z[ja]);da=da.join("")}S=null!=S?S:"data:image/png;base64,";da=S+Editor.base64Encode(da)}C(da)}}else null!=M&&(0==Z.getStatus()?M({message:mxResources.get("accessDenied")},Z):M({message:mxResources.get("error")+
-" "+Z.getStatus()},Z))}),function(Z){null!=M&&M({message:mxResources.get("error")+" "+Z.getStatus()})},Y,this.timeout,function(){P&&null!=M&&M({code:App.ERROR_TIMEOUT,retry:aa})},T)});aa()}catch(Z){null!=M&&M(Z)}};Editor.prototype.absoluteCssFonts=function(t){var C=null;if(null!=t){var M=t.split("url(");if(0<M.length){C=[M[0]];t=window.location.pathname;var Q=null!=t?t.lastIndexOf("/"):-1;0<=Q&&(t=t.substring(0,Q+1));Q=document.getElementsByTagName("base");var P=null;null!=Q&&0<Q.length&&(P=Q[0].getAttribute("href"));
-for(var S=1;S<M.length;S++)if(Q=M[S].indexOf(")"),0<Q){var U=Editor.trimCssUrl(M[S].substring(0,Q));this.graph.isRelativeUrl(U)&&(U=null!=P?P+U:window.location.protocol+"//"+window.location.hostname+("/"==U.charAt(0)?"":t)+U);C.push('url("'+U+'"'+M[S].substring(Q))}else C.push(M[S])}else C=[t]}return null!=C?C.join(""):null};Editor.prototype.mapFontUrl=function(t,C,M){/^https?:\/\//.test(C)&&!this.isCorsEnabledForUrl(C)&&(C=PROXY_URL+"?url="+encodeURIComponent(C));M(t,C)};Editor.prototype.embedCssFonts=
-function(t,C){var M=t.split("url("),Q=0;null==this.cachedFonts&&(this.cachedFonts={});var P=mxUtils.bind(this,function(){if(0==Q){for(var Y=[M[0]],aa=1;aa<M.length;aa++){var Z=M[aa].indexOf(")");Y.push('url("');Y.push(this.cachedFonts[Editor.trimCssUrl(M[aa].substring(0,Z))]);Y.push('"'+M[aa].substring(Z))}C(Y.join(""))}});if(0<M.length){for(t=1;t<M.length;t++){var S=M[t].indexOf(")"),U=null,T=M[t].indexOf("format(",S);0<T&&(U=Editor.trimCssUrl(M[t].substring(T+7,M[t].indexOf(")",T))));mxUtils.bind(this,
-function(Y){if(null==this.cachedFonts[Y]){this.cachedFonts[Y]=Y;Q++;var aa="application/x-font-ttf";if("svg"==U||/(\.svg)($|\?)/i.test(Y))aa="image/svg+xml";else if("otf"==U||"embedded-opentype"==U||/(\.otf)($|\?)/i.test(Y))aa="application/x-font-opentype";else if("woff"==U||/(\.woff)($|\?)/i.test(Y))aa="application/font-woff";else if("woff2"==U||/(\.woff2)($|\?)/i.test(Y))aa="application/font-woff2";else if("eot"==U||/(\.eot)($|\?)/i.test(Y))aa="application/vnd.ms-fontobject";else if("sfnt"==U||
-/(\.sfnt)($|\?)/i.test(Y))aa="application/font-sfnt";this.mapFontUrl(aa,Y,mxUtils.bind(this,function(Z,da){this.loadUrl(da,mxUtils.bind(this,function(ja){this.cachedFonts[Y]=ja;Q--;P()}),mxUtils.bind(this,function(ja){Q--;P()}),!0,null,"data:"+Z+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(M[t].substring(0,S)),U)}P()}else C(t)};Editor.prototype.loadFonts=function(t){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(C){this.resolvedFontCss=
-C;null!=t&&t()})):null!=t&&t()};Editor.prototype.createGoogleFontCache=function(){var t={},C;for(C in Graph.fontMapping)Graph.isCssFontUrl(C)&&(t[C]=Graph.fontMapping[C]);return t};Editor.prototype.embedExtFonts=function(t){var C=this.graph.getCustomFonts();if(0<C.length){var M=[],Q=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var P=mxUtils.bind(this,function(){0==Q&&this.embedCssFonts(M.join(""),t)}),S=0;S<C.length;S++)mxUtils.bind(this,function(U,T){Graph.isCssFontUrl(T)?
-null==this.cachedGoogleFonts[T]?(Q++,this.loadUrl(T,mxUtils.bind(this,function(Y){this.cachedGoogleFonts[T]=Y;M.push(Y+"\n");Q--;P()}),mxUtils.bind(this,function(Y){Q--;M.push("@import url("+T+");\n");P()}))):M.push(this.cachedGoogleFonts[T]+"\n"):M.push('@font-face {font-family: "'+U+'";src: url("'+T+'")}\n')})(C[S].name,C[S].url);P()}else t()};Editor.prototype.addMathCss=function(t){t=t.getElementsByTagName("defs");if(null!=t&&0<t.length)for(var C=document.getElementsByTagName("style"),M=0;M<C.length;M++){var Q=
-mxUtils.getTextContent(C[M]);0>Q.indexOf("mxPageSelector")&&0<Q.indexOf("MathJax")&&t[0].appendChild(C[M].cloneNode(!0))}};Editor.prototype.addFontCss=function(t,C){C=null!=C?C:this.absoluteCssFonts(this.fontCss);if(null!=C){var M=t.getElementsByTagName("defs"),Q=t.ownerDocument;0==M.length?(M=null!=Q.createElementNS?Q.createElementNS(mxConstants.NS_SVG,"defs"):Q.createElement("defs"),null!=t.firstChild?t.insertBefore(M,t.firstChild):t.appendChild(M)):M=M[0];t=null!=Q.createElementNS?Q.createElementNS(mxConstants.NS_SVG,
-"style"):Q.createElement("style");t.setAttribute("type","text/css");mxUtils.setTextContent(t,C);M.appendChild(t)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(t,C,M){var Q=mxClient.IS_FF?8192:16384;return Math.min(M,Math.min(Q/t,Q/C))};Editor.prototype.exportToCanvas=function(t,C,M,Q,P,S,U,T,Y,aa,Z,da,ja,ha,ba,Aa,Ga,Ca){try{S=null!=S?S:!0;U=null!=U?U:!0;da=null!=da?da:this.graph;ja=null!=ja?ja:0;var Da=
-Y?null:da.background;Da==mxConstants.NONE&&(Da=null);null==Da&&(Da=Q);null==Da&&0==Y&&(Da=Aa?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(da.getSvg(null,null,ja,ha,null,U,null,null,null,aa,null,Aa,Ga,Ca),mxUtils.bind(this,function(na){try{var Ia=new Image;Ia.onload=mxUtils.bind(this,function(){try{var xa=function(){mxClient.IS_SF?window.setTimeout(function(){va.drawImage(Ia,0,0);t(Ja,na)},0):(va.drawImage(Ia,0,0),t(Ja,na))},Ja=document.createElement("canvas"),Fa=parseInt(na.getAttribute("width")),
-Oa=parseInt(na.getAttribute("height"));T=null!=T?T:1;null!=C&&(T=S?Math.min(1,Math.min(3*C/(4*Oa),C/Fa)):C/Fa);T=this.getMaxCanvasScale(Fa,Oa,T);Fa=Math.ceil(T*Fa);Oa=Math.ceil(T*Oa);Ja.setAttribute("width",Fa);Ja.setAttribute("height",Oa);var va=Ja.getContext("2d");null!=Da&&(va.beginPath(),va.rect(0,0,Fa,Oa),va.fillStyle=Da,va.fill());1!=T&&va.scale(T,T);if(ba){var za=da.view,ta=za.scale;za.scale=1;var Ba=btoa(unescape(encodeURIComponent(za.createSvgGrid(za.gridColor))));za.scale=ta;Ba="data:image/svg+xml;base64,"+
-Ba;var ea=da.gridSize*za.gridSteps*T,wa=da.getGraphBounds(),ua=za.translate.x*ta,sa=za.translate.y*ta,ra=ua+(wa.x-ua)/ta-ja,ya=sa+(wa.y-sa)/ta-ja,ia=new Image;ia.onload=function(){try{for(var ma=-Math.round(ea-mxUtils.mod((ua-ra)*T,ea)),ca=-Math.round(ea-mxUtils.mod((sa-ya)*T,ea));ma<Fa;ma+=ea)for(var fa=ca;fa<Oa;fa+=ea)va.drawImage(ia,ma/T,fa/T);xa()}catch(oa){null!=P&&P(oa)}};ia.onerror=function(ma){null!=P&&P(ma)};ia.src=Ba}else xa()}catch(ma){null!=P&&P(ma)}});Ia.onerror=function(xa){null!=P&&
-P(xa)};aa&&this.graph.addSvgShadow(na);this.graph.mathEnabled&&this.addMathCss(na);var Ka=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(na,this.resolvedFontCss),Ia.src=Editor.createSvgDataUri(mxUtils.getXml(na))}catch(xa){null!=P&&P(xa)}});this.embedExtFonts(mxUtils.bind(this,function(xa){try{null!=xa&&this.addFontCss(na,xa),this.loadFonts(Ka)}catch(Ja){null!=P&&P(Ja)}}))}catch(xa){null!=P&&P(xa)}}),M,Z)}catch(na){null!=P&&P(na)}};Editor.crcTable=[];for(var m=0;256>
-m;m++)for(var n=m,v=0;8>v;v++)n=1==(n&1)?3988292384^n>>>1:n>>>1,Editor.crcTable[m]=n;Editor.updateCRC=function(t,C,M,Q){for(var P=0;P<Q;P++)t=Editor.crcTable[(t^C.charCodeAt(M+P))&255]^t>>>8;return t};Editor.crc32=function(t){for(var C=-1,M=0;M<t.length;M++)C=C>>>8^Editor.crcTable[(C^t.charCodeAt(M))&255];return(C^-1)>>>0};Editor.writeGraphModelToPng=function(t,C,M,Q,P){function S(Z,da){var ja=Y;Y+=da;return Z.substring(ja,Y)}function U(Z){Z=S(Z,4);return Z.charCodeAt(3)+(Z.charCodeAt(2)<<8)+(Z.charCodeAt(1)<<
-16)+(Z.charCodeAt(0)<<24)}function T(Z){return String.fromCharCode(Z>>24&255,Z>>16&255,Z>>8&255,Z&255)}t=t.substring(t.indexOf(",")+1);t=window.atob?atob(t):Base64.decode(t,!0);var Y=0;if(S(t,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=P&&P();else if(S(t,4),"IHDR"!=S(t,4))null!=P&&P();else{S(t,17);P=t.substring(0,Y);do{var aa=U(t);if("IDAT"==S(t,4)){P=t.substring(0,Y-8);"pHYs"==C&&"dpi"==M?(M=Math.round(Q/.0254),M=T(M)+T(M)+String.fromCharCode(1)):M=M+String.fromCharCode(0)+
-("zTXt"==C?String.fromCharCode(0):"")+Q;Q=4294967295;Q=Editor.updateCRC(Q,C,0,4);Q=Editor.updateCRC(Q,M,0,M.length);P+=T(M.length)+C+M+T(Q^4294967295);P+=t.substring(Y-8,t.length);break}P+=t.substring(Y-8,Y-4+aa);S(t,aa);S(t,4)}while(aa);return"data:image/png;base64,"+(window.btoa?btoa(P):Base64.encode(P,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var d=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(t,C){d.apply(this,
+MathJax.typeset([P]),Editor.onMathJaxDone()}catch(R){MathJax.typesetClear([P]),null!=R.retry?R.retry.then(function(){MathJax.typesetPromise([P]).then(Editor.onMathJaxDone)}):null!=window.console&&console.log("Error in MathJax: "+R.toString())}};window.MathJax=null!=C?C:{loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath"]},startup:{pageReady:function(){for(var P=0;P<Editor.mathJaxQueue.length;P++)Editor.doMathJaxRender(Editor.mathJaxQueue[P])}}};
+Editor.MathJaxRender=function(P){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(P):Editor.mathJaxQueue.push(P)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};Editor.onMathJaxDone=function(){};var M=Editor.prototype.init;Editor.prototype.init=function(){M.apply(this,arguments);var P=mxUtils.bind(this,function(R,T){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,
+P);this.graph.addListener(mxEvent.REFRESH,P)};C=document.getElementsByTagName("script");if(null!=C&&0<C.length){var S=document.createElement("script");S.setAttribute("type","text/javascript");S.setAttribute("src",t);C[0].parentNode.appendChild(S)}}};Editor.prototype.csvToArray=function(t){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(t))return null;
+var C=[];t.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(M,S,P,R){void 0!==S?C.push(S.replace(/\\'/g,"'")):void 0!==P?C.push(P.replace(/\\"/g,'"')):void 0!==R&&C.push(R);return""});/,\s*$/.test(t)&&C.push("");return C};Editor.prototype.isCorsEnabledForUrl=function(t){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||t.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&
+null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(t)||"https://raw.githubusercontent.com/"===t.substring(0,34)||"https://fonts.googleapis.com/"===t.substring(0,29)||"https://fonts.gstatic.com/"===t.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var t=new mxUrlConverter;t.updateBaseUrl();var C=t.convert,M=this;t.convert=function(S){if(null!=S){var P="http://"==S.substring(0,7)||"https://"==
+S.substring(0,8);P&&!navigator.onLine?S=Editor.svgBrokenImage.src:!P||S.substring(0,t.baseUrl.length)==t.baseUrl||M.crossOriginImages&&M.isCorsEnabledForUrl(S)?"chrome-extension://"==S.substring(0,19)||mxClient.IS_CHROMEAPP||(S=C.apply(this,arguments)):S=PROXY_URL+"?url="+encodeURIComponent(S)}return S};return t};Editor.createSvgDataUri=function(t){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(t)))};Editor.prototype.convertImageToDataUri=function(t,C){try{var M=!0,S=window.setTimeout(mxUtils.bind(this,
+function(){M=!1;C(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(t))mxUtils.get(t,mxUtils.bind(this,function(R){window.clearTimeout(S);M&&C(Editor.createSvgDataUri(R.getText()))}),function(){window.clearTimeout(S);M&&C(Editor.svgBrokenImage.src)});else{var P=new Image;this.crossOriginImages&&(P.crossOrigin="anonymous");P.onload=function(){window.clearTimeout(S);if(M)try{var R=document.createElement("canvas"),T=R.getContext("2d");R.height=P.height;R.width=P.width;T.drawImage(P,0,0);
+C(R.toDataURL())}catch(V){C(Editor.svgBrokenImage.src)}};P.onerror=function(){window.clearTimeout(S);M&&C(Editor.svgBrokenImage.src)};P.src=t}}catch(R){C(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(t,C,M,S){null==S&&(S=this.createImageUrlConverter());var P=0,R=M||{};M=mxUtils.bind(this,function(T,V){T=t.getElementsByTagName(T);for(var Y=0;Y<T.length;Y++)mxUtils.bind(this,function(ba){try{if(null!=ba){var Z=S.convert(ba.getAttribute(V));if(null!=Z&&"data:"!=Z.substring(0,5)){var da=
+R[Z];null==da?(P++,this.convertImageToDataUri(Z,function(ea){null!=ea&&(R[Z]=ea,ba.setAttribute(V,ea));P--;0==P&&C(t)})):ba.setAttribute(V,da)}else null!=Z&&ba.setAttribute(V,Z)}}catch(ea){}})(T[Y])});M("image","xlink:href");M("img","src");0==P&&C(t)};Editor.base64Encode=function(t){for(var C="",M=0,S=t.length,P,R,T;M<S;){P=t.charCodeAt(M++)&255;if(M==S){C+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>2);C+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&
+3)<<4);C+="==";break}R=t.charCodeAt(M++);if(M==S){C+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>2);C+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&3)<<4|(R&240)>>4);C+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&15)<<2);C+="=";break}T=t.charCodeAt(M++);C+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>2);C+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&
+3)<<4|(R&240)>>4);C+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&15)<<2|(T&192)>>6);C+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T&63)}return C};Editor.prototype.loadUrl=function(t,C,M,S,P,R,T,V){try{var Y=!T&&(S||/(\.png)($|\?)/i.test(t)||/(\.jpe?g)($|\?)/i.test(t)||/(\.gif)($|\?)/i.test(t)||/(\.pdf)($|\?)/i.test(t));P=null!=P?P:!0;var ba=mxUtils.bind(this,function(){mxUtils.get(t,mxUtils.bind(this,function(Z){if(200<=Z.getStatus()&&
+299>=Z.getStatus()){if(null!=C){var da=Z.getText();if(Y){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){Z=mxUtilsBinaryToArray(Z.request.responseBody).toArray();da=Array(Z.length);for(var ea=0;ea<Z.length;ea++)da[ea]=String.fromCharCode(Z[ea]);da=da.join("")}R=null!=R?R:"data:image/png;base64,";da=R+Editor.base64Encode(da)}C(da)}}else null!=M&&(0==Z.getStatus()?M({message:mxResources.get("accessDenied")},Z):404==Z.getStatus()?M({code:Z.getStatus()},
+Z):M({message:mxResources.get("error")+" "+Z.getStatus()},Z))}),function(Z){null!=M&&M({message:mxResources.get("error")+" "+Z.getStatus()})},Y,this.timeout,function(){P&&null!=M&&M({code:App.ERROR_TIMEOUT,retry:ba})},V)});ba()}catch(Z){null!=M&&M(Z)}};Editor.prototype.absoluteCssFonts=function(t){var C=null;if(null!=t){var M=t.split("url(");if(0<M.length){C=[M[0]];t=window.location.pathname;var S=null!=t?t.lastIndexOf("/"):-1;0<=S&&(t=t.substring(0,S+1));S=document.getElementsByTagName("base");var P=
+null;null!=S&&0<S.length&&(P=S[0].getAttribute("href"));for(var R=1;R<M.length;R++)if(S=M[R].indexOf(")"),0<S){var T=Editor.trimCssUrl(M[R].substring(0,S));this.graph.isRelativeUrl(T)&&(T=null!=P?P+T:window.location.protocol+"//"+window.location.hostname+("/"==T.charAt(0)?"":t)+T);C.push('url("'+T+'"'+M[R].substring(S))}else C.push(M[R])}else C=[t]}return null!=C?C.join(""):null};Editor.prototype.mapFontUrl=function(t,C,M){/^https?:\/\//.test(C)&&!this.isCorsEnabledForUrl(C)&&(C=PROXY_URL+"?url="+
+encodeURIComponent(C));M(t,C)};Editor.prototype.embedCssFonts=function(t,C){var M=t.split("url("),S=0;null==this.cachedFonts&&(this.cachedFonts={});var P=mxUtils.bind(this,function(){if(0==S){for(var Y=[M[0]],ba=1;ba<M.length;ba++){var Z=M[ba].indexOf(")");Y.push('url("');Y.push(this.cachedFonts[Editor.trimCssUrl(M[ba].substring(0,Z))]);Y.push('"'+M[ba].substring(Z))}C(Y.join(""))}});if(0<M.length){for(t=1;t<M.length;t++){var R=M[t].indexOf(")"),T=null,V=M[t].indexOf("format(",R);0<V&&(T=Editor.trimCssUrl(M[t].substring(V+
+7,M[t].indexOf(")",V))));mxUtils.bind(this,function(Y){if(null==this.cachedFonts[Y]){this.cachedFonts[Y]=Y;S++;var ba="application/x-font-ttf";if("svg"==T||/(\.svg)($|\?)/i.test(Y))ba="image/svg+xml";else if("otf"==T||"embedded-opentype"==T||/(\.otf)($|\?)/i.test(Y))ba="application/x-font-opentype";else if("woff"==T||/(\.woff)($|\?)/i.test(Y))ba="application/font-woff";else if("woff2"==T||/(\.woff2)($|\?)/i.test(Y))ba="application/font-woff2";else if("eot"==T||/(\.eot)($|\?)/i.test(Y))ba="application/vnd.ms-fontobject";
+else if("sfnt"==T||/(\.sfnt)($|\?)/i.test(Y))ba="application/font-sfnt";this.mapFontUrl(ba,Y,mxUtils.bind(this,function(Z,da){this.loadUrl(da,mxUtils.bind(this,function(ea){this.cachedFonts[Y]=ea;S--;P()}),mxUtils.bind(this,function(ea){S--;P()}),!0,null,"data:"+Z+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(M[t].substring(0,R)),T)}P()}else C(t)};Editor.prototype.loadFonts=function(t){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(C){this.resolvedFontCss=
+C;null!=t&&t()})):null!=t&&t()};Editor.prototype.createGoogleFontCache=function(){var t={},C;for(C in Graph.fontMapping)Graph.isCssFontUrl(C)&&(t[C]=Graph.fontMapping[C]);return t};Editor.prototype.embedExtFonts=function(t){var C=this.graph.getCustomFonts();if(0<C.length){var M=[],S=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var P=mxUtils.bind(this,function(){0==S&&this.embedCssFonts(M.join(""),t)}),R=0;R<C.length;R++)mxUtils.bind(this,function(T,V){Graph.isCssFontUrl(V)?
+null==this.cachedGoogleFonts[V]?(S++,this.loadUrl(V,mxUtils.bind(this,function(Y){this.cachedGoogleFonts[V]=Y;M.push(Y+"\n");S--;P()}),mxUtils.bind(this,function(Y){S--;M.push("@import url("+V+");\n");P()}))):M.push(this.cachedGoogleFonts[V]+"\n"):M.push('@font-face {font-family: "'+T+'";src: url("'+V+'")}\n')})(C[R].name,C[R].url);P()}else t()};Editor.prototype.addMathCss=function(t){t=t.getElementsByTagName("defs");if(null!=t&&0<t.length)for(var C=document.getElementsByTagName("style"),M=0;M<C.length;M++){var S=
+mxUtils.getTextContent(C[M]);0>S.indexOf("mxPageSelector")&&0<S.indexOf("MathJax")&&t[0].appendChild(C[M].cloneNode(!0))}};Editor.prototype.addFontCss=function(t,C){C=null!=C?C:this.absoluteCssFonts(this.fontCss);if(null!=C){var M=t.getElementsByTagName("defs"),S=t.ownerDocument;0==M.length?(M=null!=S.createElementNS?S.createElementNS(mxConstants.NS_SVG,"defs"):S.createElement("defs"),null!=t.firstChild?t.insertBefore(M,t.firstChild):t.appendChild(M)):M=M[0];t=null!=S.createElementNS?S.createElementNS(mxConstants.NS_SVG,
+"style"):S.createElement("style");t.setAttribute("type","text/css");mxUtils.setTextContent(t,C);M.appendChild(t)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(t,C,M){var S=mxClient.IS_FF?8192:16384;return Math.min(M,Math.min(S/t,S/C))};Editor.prototype.exportToCanvas=function(t,C,M,S,P,R,T,V,Y,ba,Z,da,ea,ka,aa,Ba,Ea,Ca){try{R=null!=R?R:!0;T=null!=T?T:!0;da=null!=da?da:this.graph;ea=null!=ea?ea:0;var Da=
+Y?null:da.background;Da==mxConstants.NONE&&(Da=null);null==Da&&(Da=S);null==Da&&0==Y&&(Da=Ba?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(da.getSvg(null,null,ea,ka,null,T,null,null,null,ba,null,Ba,Ea,Ca),mxUtils.bind(this,function(pa){try{var Ha=new Image;Ha.onload=mxUtils.bind(this,function(){try{var ya=function(){mxClient.IS_SF?window.setTimeout(function(){wa.drawImage(Ha,0,0);t(Ia,pa)},0):(wa.drawImage(Ha,0,0),t(Ia,pa))},Ia=document.createElement("canvas"),Fa=parseInt(pa.getAttribute("width")),
+Pa=parseInt(pa.getAttribute("height"));V=null!=V?V:1;null!=C&&(V=R?Math.min(1,Math.min(3*C/(4*Pa),C/Fa)):C/Fa);V=this.getMaxCanvasScale(Fa,Pa,V);Fa=Math.ceil(V*Fa);Pa=Math.ceil(V*Pa);Ia.setAttribute("width",Fa);Ia.setAttribute("height",Pa);var wa=Ia.getContext("2d");null!=Da&&(wa.beginPath(),wa.rect(0,0,Fa,Pa),wa.fillStyle=Da,wa.fill());1!=V&&wa.scale(V,V);if(aa){var za=da.view,va=za.scale;za.scale=1;var Ka=btoa(unescape(encodeURIComponent(za.createSvgGrid(za.gridColor))));za.scale=va;Ka="data:image/svg+xml;base64,"+
+Ka;var ia=da.gridSize*za.gridSteps*V,ja=da.getGraphBounds(),ua=za.translate.x*va,xa=za.translate.y*va,ra=ua+(ja.x-ua)/va-ea,Aa=xa+(ja.y-xa)/va-ea,fa=new Image;fa.onload=function(){try{for(var na=-Math.round(ia-mxUtils.mod((ua-ra)*V,ia)),qa=-Math.round(ia-mxUtils.mod((xa-Aa)*V,ia));na<Fa;na+=ia)for(var ca=qa;ca<Pa;ca+=ia)wa.drawImage(fa,na/V,ca/V);ya()}catch(ha){null!=P&&P(ha)}};fa.onerror=function(na){null!=P&&P(na)};fa.src=Ka}else ya()}catch(na){null!=P&&P(na)}});Ha.onerror=function(ya){null!=P&&
+P(ya)};ba&&this.graph.addSvgShadow(pa);this.graph.mathEnabled&&this.addMathCss(pa);var Ja=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(pa,this.resolvedFontCss),Ha.src=Editor.createSvgDataUri(mxUtils.getXml(pa))}catch(ya){null!=P&&P(ya)}});this.embedExtFonts(mxUtils.bind(this,function(ya){try{null!=ya&&this.addFontCss(pa,ya),this.loadFonts(Ja)}catch(Ia){null!=P&&P(Ia)}}))}catch(ya){null!=P&&P(ya)}}),M,Z)}catch(pa){null!=P&&P(pa)}};Editor.crcTable=[];for(var m=0;256>
+m;m++)for(var n=m,v=0;8>v;v++)n=1==(n&1)?3988292384^n>>>1:n>>>1,Editor.crcTable[m]=n;Editor.updateCRC=function(t,C,M,S){for(var P=0;P<S;P++)t=Editor.crcTable[(t^C.charCodeAt(M+P))&255]^t>>>8;return t};Editor.crc32=function(t){for(var C=-1,M=0;M<t.length;M++)C=C>>>8^Editor.crcTable[(C^t.charCodeAt(M))&255];return(C^-1)>>>0};Editor.writeGraphModelToPng=function(t,C,M,S,P){function R(Z,da){var ea=Y;Y+=da;return Z.substring(ea,Y)}function T(Z){Z=R(Z,4);return Z.charCodeAt(3)+(Z.charCodeAt(2)<<8)+(Z.charCodeAt(1)<<
+16)+(Z.charCodeAt(0)<<24)}function V(Z){return String.fromCharCode(Z>>24&255,Z>>16&255,Z>>8&255,Z&255)}t=t.substring(t.indexOf(",")+1);t=window.atob?atob(t):Base64.decode(t,!0);var Y=0;if(R(t,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=P&&P();else if(R(t,4),"IHDR"!=R(t,4))null!=P&&P();else{R(t,17);P=t.substring(0,Y);do{var ba=T(t);if("IDAT"==R(t,4)){P=t.substring(0,Y-8);"pHYs"==C&&"dpi"==M?(M=Math.round(S/.0254),M=V(M)+V(M)+String.fromCharCode(1)):M=M+String.fromCharCode(0)+
+("zTXt"==C?String.fromCharCode(0):"")+S;S=4294967295;S=Editor.updateCRC(S,C,0,4);S=Editor.updateCRC(S,M,0,M.length);P+=V(M.length)+C+M+V(S^4294967295);P+=t.substring(Y-8,t.length);break}P+=t.substring(Y-8,Y-4+ba);R(t,ba);R(t,4)}while(ba);return"data:image/png;base64,"+(window.btoa?btoa(P):Base64.encode(P,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var d=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(t,C){d.apply(this,
arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var g=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){g.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(t,C){var M=null;null!=t.editor.graph.getModel().getParent(C)?M=C.getId():null!=t.currentPage&&(M=t.currentPage.getId());return M});if(null!=window.StyleFormatPanel){var k=Format.prototype.init;
Format.prototype.init=function(){k.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var l=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?l.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var t=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=t&&t.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=
-function(t){return!1};var p=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(t){t=p.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var C=this.editorUi,M=C.editor.graph,Q=this.createOption(mxResources.get("shadow"),function(){return M.shadowVisible},function(P){var S=new ChangePageSetup(C);S.ignoreColor=!0;S.ignoreImage=!0;S.shadowVisible=P;M.model.execute(S)},{install:function(P){this.listener=function(){P(M.shadowVisible)};
-C.addListener("shadowVisibleChanged",this.listener)},destroy:function(){C.removeListener(this.listener)}});Editor.enableShadowOption||(Q.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(Q,60));t.appendChild(Q)}return t};var q=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(t){t=q.apply(this,arguments);var C=this.editorUi,M=C.editor.graph;if(M.isEnabled()){var Q=C.getCurrentFile();if(null!=Q&&Q.isAutosaveOptional()){var P=
-this.createOption(mxResources.get("autosave"),function(){return C.editor.autosave},function(U){C.editor.setAutosave(U);C.editor.autosave&&Q.isModified()&&Q.fileChanged()},{install:function(U){this.listener=function(){U(C.editor.autosave)};C.editor.addListener("autosaveChanged",this.listener)},destroy:function(){C.editor.removeListener(this.listener)}});t.appendChild(P)}}if(this.isMathOptionVisible()&&M.isEnabled()&&"undefined"!==typeof MathJax){P=this.createOption(mxResources.get("mathematicalTypesetting"),
-function(){return M.mathEnabled},function(U){C.actions.get("mathematicalTypesetting").funct()},{install:function(U){this.listener=function(){U(M.mathEnabled)};C.addListener("mathEnabledChanged",this.listener)},destroy:function(){C.removeListener(this.listener)}});P.style.paddingTop="5px";t.appendChild(P);var S=C.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");S.style.position="relative";S.style.marginLeft="6px";S.style.top="2px";P.appendChild(S)}return t};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=
+function(t){return!1};var p=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(t){t=p.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var C=this.editorUi,M=C.editor.graph,S=this.createOption(mxResources.get("shadow"),function(){return M.shadowVisible},function(P){var R=new ChangePageSetup(C);R.ignoreColor=!0;R.ignoreImage=!0;R.shadowVisible=P;M.model.execute(R)},{install:function(P){this.listener=function(){P(M.shadowVisible)};
+C.addListener("shadowVisibleChanged",this.listener)},destroy:function(){C.removeListener(this.listener)}});Editor.enableShadowOption||(S.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(S,60));t.appendChild(S)}return t};var q=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(t){t=q.apply(this,arguments);var C=this.editorUi,M=C.editor.graph;if(M.isEnabled()){var S=C.getCurrentFile();if(null!=S&&S.isAutosaveOptional()){var P=
+this.createOption(mxResources.get("autosave"),function(){return C.editor.autosave},function(T){C.editor.setAutosave(T);C.editor.autosave&&S.isModified()&&S.fileChanged()},{install:function(T){this.listener=function(){T(C.editor.autosave)};C.editor.addListener("autosaveChanged",this.listener)},destroy:function(){C.editor.removeListener(this.listener)}});t.appendChild(P)}}if(this.isMathOptionVisible()&&M.isEnabled()&&"undefined"!==typeof MathJax){P=this.createOption(mxResources.get("mathematicalTypesetting"),
+function(){return M.mathEnabled},function(T){C.actions.get("mathematicalTypesetting").funct()},{install:function(T){this.listener=function(){T(M.mathEnabled)};C.addListener("mathEnabledChanged",this.listener)},destroy:function(){C.removeListener(this.listener)}});P.style.paddingTop="5px";t.appendChild(P);var R=C.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");R.style.position="relative";R.style.marginLeft="6px";R.style.top="2px";P.appendChild(R)}return t};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=
[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",
dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",
type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",
@@ -11585,91 +11581,91 @@ defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName
stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",
font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},
{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=
-function(t,C,M){if(null!=C){var Q=function(S){if(null!=S)if(M)for(var U=0;U<S.length;U++)C[S[U].name]=S[U];else for(var T in C){var Y=!1;for(U=0;U<S.length;U++)if(S[U].name==T&&S[U].type==C[T].type){Y=!0;break}Y||delete C[T]}},P=this.editorUi.editor.graph.view.getState(t);null!=P&&null!=P.shape&&(P.shape.commonCustomPropAdded||(P.shape.commonCustomPropAdded=!0,P.shape.customProperties=P.shape.customProperties||[],P.cell.vertex?Array.prototype.push.apply(P.shape.customProperties,Editor.commonVertexProperties):
-Array.prototype.push.apply(P.shape.customProperties,Editor.commonEdgeProperties)),Q(P.shape.customProperties));t=t.getAttribute("customProperties");if(null!=t)try{Q(JSON.parse(t))}catch(S){}}};var x=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var t=this.editorUi.getSelectionState();"image"!=t.style.shape&&!t.containsLabel&&0<t.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));x.apply(this,arguments);if(Editor.enableCustomProperties){for(var C=
-{},M=t.vertices,Q=t.edges,P=0;P<M.length;P++)this.findCommonProperties(M[P],C,0==P);for(P=0;P<Q.length;P++)this.findCommonProperties(Q[P],C,0==M.length&&0==P);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(C).length&&this.container.appendChild(this.addProperties(this.createPanel(),C,t))}};var y=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(t){this.addActions(t,["copyStyle","pasteStyle"]);return y.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=
-!0;StyleFormatPanel.prototype.addProperties=function(t,C,M){function Q(va,za,ta,Ba){da.getModel().beginUpdate();try{var ea=[],wa=[];if(null!=ta.index){for(var ua=[],sa=ta.parentRow.nextSibling;sa&&sa.getAttribute("data-pName")==va;)ua.push(sa.getAttribute("data-pValue")),sa=sa.nextSibling;ta.index<ua.length?null!=Ba?ua.splice(Ba,1):ua[ta.index]=za:ua.push(za);null!=ta.size&&ua.length>ta.size&&(ua=ua.slice(0,ta.size));za=ua.join(",");null!=ta.countProperty&&(da.setCellStyles(ta.countProperty,ua.length,
-da.getSelectionCells()),ea.push(ta.countProperty),wa.push(ua.length))}da.setCellStyles(va,za,da.getSelectionCells());ea.push(va);wa.push(za);if(null!=ta.dependentProps)for(va=0;va<ta.dependentProps.length;va++){var ra=ta.dependentPropsDefVal[va],ya=ta.dependentPropsVals[va];if(ya.length>za)ya=ya.slice(0,za);else for(var ia=ya.length;ia<za;ia++)ya.push(ra);ya=ya.join(",");da.setCellStyles(ta.dependentProps[va],ya,da.getSelectionCells());ea.push(ta.dependentProps[va]);wa.push(ya)}if("function"==typeof ta.onChange)ta.onChange(da,
-za);Z.editorUi.fireEvent(new mxEventObject("styleChanged","keys",ea,"values",wa,"cells",da.getSelectionCells()))}finally{da.getModel().endUpdate()}}function P(va,za,ta){var Ba=mxUtils.getOffset(t,!0),ea=mxUtils.getOffset(va,!0);za.style.position="absolute";za.style.left=ea.x-Ba.x+"px";za.style.top=ea.y-Ba.y+"px";za.style.width=va.offsetWidth+"px";za.style.height=va.offsetHeight-(ta?4:0)+"px";za.style.zIndex=5}function S(va,za,ta){var Ba=document.createElement("div");Ba.style.width="32px";Ba.style.height=
-"4px";Ba.style.margin="2px";Ba.style.border="1px solid black";Ba.style.background=za&&"none"!=za?za:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(Z,function(ea){this.editorUi.pickColor(za,function(wa){Ba.style.background="none"==wa?"url('"+Dialog.prototype.noColorImage+"')":wa;Q(va,wa,ta)});mxEvent.consume(ea)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(Ba);return btn}function U(va,za,ta,Ba,ea,wa,ua){null!=za&&(za=za.split(","),
-ja.push({name:va,values:za,type:ta,defVal:Ba,countProperty:ea,parentRow:wa,isDeletable:!0,flipBkg:ua}));btn=mxUtils.button("+",mxUtils.bind(Z,function(sa){for(var ra=wa,ya=0;null!=ra.nextSibling;)if(ra.nextSibling.getAttribute("data-pName")==va)ra=ra.nextSibling,ya++;else break;var ia={type:ta,parentRow:wa,index:ya,isDeletable:!0,defVal:Ba,countProperty:ea};ya=aa(va,"",ia,0==ya%2,ua);Q(va,Ba,ia);ra.parentNode.insertBefore(ya,ra.nextSibling);mxEvent.consume(sa)}));btn.style.height="16px";btn.style.width=
-"25px";btn.className="geColorBtn";return btn}function T(va,za,ta,Ba,ea,wa,ua){if(0<ea){var sa=Array(ea);za=null!=za?za.split(","):[];for(var ra=0;ra<ea;ra++)sa[ra]=null!=za[ra]?za[ra]:null!=Ba?Ba:"";ja.push({name:va,values:sa,type:ta,defVal:Ba,parentRow:wa,flipBkg:ua,size:ea})}return document.createElement("div")}function Y(va,za,ta){var Ba=document.createElement("input");Ba.type="checkbox";Ba.checked="1"==za;mxEvent.addListener(Ba,"change",function(){Q(va,Ba.checked?"1":"0",ta)});return Ba}function aa(va,
-za,ta,Ba,ea){var wa=ta.dispName,ua=ta.type,sa=document.createElement("tr");sa.className="gePropRow"+(ea?"Dark":"")+(Ba?"Alt":"")+" gePropNonHeaderRow";sa.setAttribute("data-pName",va);sa.setAttribute("data-pValue",za);Ba=!1;null!=ta.index&&(sa.setAttribute("data-index",ta.index),wa=(null!=wa?wa:"")+"["+ta.index+"]",Ba=!0);var ra=document.createElement("td");ra.className="gePropRowCell";wa=mxResources.get(wa,null,wa);mxUtils.write(ra,wa);ra.setAttribute("title",wa);Ba&&(ra.style.textAlign="right");
-sa.appendChild(ra);ra=document.createElement("td");ra.className="gePropRowCell";if("color"==ua)ra.appendChild(S(va,za,ta));else if("bool"==ua||"boolean"==ua)ra.appendChild(Y(va,za,ta));else if("enum"==ua){var ya=ta.enumList;for(ea=0;ea<ya.length;ea++)if(wa=ya[ea],wa.val==za){mxUtils.write(ra,mxResources.get(wa.dispName,null,wa.dispName));break}mxEvent.addListener(ra,"click",mxUtils.bind(Z,function(){var ia=document.createElement("select");P(ra,ia);for(var ma=0;ma<ya.length;ma++){var ca=ya[ma],fa=
-document.createElement("option");fa.value=mxUtils.htmlEntities(ca.val);mxUtils.write(fa,mxResources.get(ca.dispName,null,ca.dispName));ia.appendChild(fa)}ia.value=za;t.appendChild(ia);mxEvent.addListener(ia,"change",function(){var oa=mxUtils.htmlEntities(ia.value);Q(va,oa,ta)});ia.focus();mxEvent.addListener(ia,"blur",function(){t.removeChild(ia)})}))}else"dynamicArr"==ua?ra.appendChild(U(va,za,ta.subType,ta.subDefVal,ta.countProperty,sa,ea)):"staticArr"==ua?ra.appendChild(T(va,za,ta.subType,ta.subDefVal,
-ta.size,sa,ea)):"readOnly"==ua?(ea=document.createElement("input"),ea.setAttribute("readonly",""),ea.value=za,ea.style.width="96px",ea.style.borderWidth="0px",ra.appendChild(ea)):(ra.innerHTML=mxUtils.htmlEntities(decodeURIComponent(za)),mxEvent.addListener(ra,"click",mxUtils.bind(Z,function(){function ia(){var ca=ma.value;ca=0==ca.length&&"string"!=ua?0:ca;ta.allowAuto&&(null!=ca.trim&&"auto"==ca.trim().toLowerCase()?(ca="auto",ua="string"):(ca=parseFloat(ca),ca=isNaN(ca)?0:ca));null!=ta.min&&ca<
-ta.min?ca=ta.min:null!=ta.max&&ca>ta.max&&(ca=ta.max);ca=encodeURIComponent(("int"==ua?parseInt(ca):ca)+"");Q(va,ca,ta)}var ma=document.createElement("input");P(ra,ma,!0);ma.value=decodeURIComponent(za);ma.className="gePropEditor";"int"!=ua&&"float"!=ua||ta.allowAuto||(ma.type="number",ma.step="int"==ua?"1":"any",null!=ta.min&&(ma.min=parseFloat(ta.min)),null!=ta.max&&(ma.max=parseFloat(ta.max)));t.appendChild(ma);mxEvent.addListener(ma,"keypress",function(ca){13==ca.keyCode&&ia()});ma.focus();mxEvent.addListener(ma,
-"blur",function(){ia()})})));ta.isDeletable&&(ea=mxUtils.button("-",mxUtils.bind(Z,function(ia){Q(va,"",ta,ta.index);mxEvent.consume(ia)})),ea.style.height="16px",ea.style.width="25px",ea.style.float="right",ea.className="geColorBtn",ra.appendChild(ea));sa.appendChild(ra);return sa}var Z=this,da=this.editorUi.editor.graph,ja=[];t.style.position="relative";t.style.padding="0";var ha=document.createElement("table");ha.className="geProperties";ha.style.whiteSpace="nowrap";ha.style.width="100%";var ba=
-document.createElement("tr");ba.className="gePropHeader";var Aa=document.createElement("th");Aa.className="gePropHeaderCell";var Ga=document.createElement("img");Ga.src=Sidebar.prototype.expandedImage;Ga.style.verticalAlign="middle";Aa.appendChild(Ga);mxUtils.write(Aa,mxResources.get("property"));ba.style.cursor="pointer";var Ca=function(){var va=ha.querySelectorAll(".gePropNonHeaderRow");if(Z.editorUi.propertiesCollapsed){Ga.src=Sidebar.prototype.collapsedImage;var za="none";for(var ta=t.childNodes.length-
-1;0<=ta;ta--)try{var Ba=t.childNodes[ta],ea=Ba.nodeName.toUpperCase();"INPUT"!=ea&&"SELECT"!=ea||t.removeChild(Ba)}catch(wa){}}else Ga.src=Sidebar.prototype.expandedImage,za="";for(ta=0;ta<va.length;ta++)va[ta].style.display=za};mxEvent.addListener(ba,"click",function(){Z.editorUi.propertiesCollapsed=!Z.editorUi.propertiesCollapsed;Ca()});ba.appendChild(Aa);Aa=document.createElement("th");Aa.className="gePropHeaderCell";Aa.innerHTML=mxResources.get("value");ba.appendChild(Aa);ha.appendChild(ba);var Da=
-!1,na=!1;ba=null;1==M.vertices.length&&0==M.edges.length?ba=M.vertices[0].id:0==M.vertices.length&&1==M.edges.length&&(ba=M.edges[0].id);null!=ba&&ha.appendChild(aa("id",mxUtils.htmlEntities(ba),{dispName:"ID",type:"readOnly"},!0,!1));for(var Ia in C)if(ba=C[Ia],"function"!=typeof ba.isVisible||ba.isVisible(M,this)){var Ka=null!=M.style[Ia]?mxUtils.htmlEntities(M.style[Ia]+""):null!=ba.getDefaultValue?ba.getDefaultValue(M,this):ba.defVal;if("separator"==ba.type)na=!na;else{if("staticArr"==ba.type)ba.size=
-parseInt(M.style[ba.sizeProperty]||C[ba.sizeProperty].defVal)||0;else if(null!=ba.dependentProps){var xa=ba.dependentProps,Ja=[],Fa=[];for(Aa=0;Aa<xa.length;Aa++){var Oa=M.style[xa[Aa]];Fa.push(C[xa[Aa]].subDefVal);Ja.push(null!=Oa?Oa.split(","):[])}ba.dependentPropsDefVal=Fa;ba.dependentPropsVals=Ja}ha.appendChild(aa(Ia,Ka,ba,Da,na));Da=!Da}}for(Aa=0;Aa<ja.length;Aa++)for(ba=ja[Aa],C=ba.parentRow,M=0;M<ba.values.length;M++)Ia=aa(ba.name,ba.values[M],{type:ba.type,parentRow:ba.parentRow,isDeletable:ba.isDeletable,
-index:M,defVal:ba.defVal,countProperty:ba.countProperty,size:ba.size},0==M%2,ba.flipBkg),C.parentNode.insertBefore(Ia,C.nextSibling),C=Ia;t.appendChild(ha);Ca();return t};StyleFormatPanel.prototype.addStyles=function(t){function C(ba){mxEvent.addListener(ba,"mouseenter",function(){ba.style.opacity="1"});mxEvent.addListener(ba,"mouseleave",function(){ba.style.opacity="0.5"})}var M=this.editorUi,Q=M.editor.graph,P=document.createElement("div");P.style.whiteSpace="nowrap";P.style.paddingLeft="24px";
-P.style.paddingRight="20px";t.style.paddingLeft="16px";t.style.paddingBottom="6px";t.style.position="relative";t.appendChild(P);var S="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(" "),U=document.createElement("div");U.style.whiteSpace="nowrap";U.style.position="relative";U.style.textAlign="center";U.style.width="210px";for(var T=[],Y=0;Y<this.defaultColorSchemes.length;Y++){var aa=
-document.createElement("div");aa.style.display="inline-block";aa.style.width="6px";aa.style.height="6px";aa.style.marginLeft="4px";aa.style.marginRight="3px";aa.style.borderRadius="3px";aa.style.cursor="pointer";aa.style.background="transparent";aa.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(ba){mxEvent.addListener(aa,"click",mxUtils.bind(this,function(){Z(ba)}))})(Y);T.push(aa);U.appendChild(aa)}var Z=mxUtils.bind(this,function(ba){null!=T[ba]&&(null!=this.format.currentScheme&&null!=
-T[this.format.currentScheme]&&(T[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=ba,da(this.defaultColorSchemes[this.format.currentScheme]),T[this.format.currentScheme].style.background="#84d7ff")}),da=mxUtils.bind(this,function(ba){var Aa=mxUtils.bind(this,function(Ca){var Da=mxUtils.button("",mxUtils.bind(this,function(Ka){Q.getModel().beginUpdate();try{for(var xa=M.getSelectionState().cells,Ja=0;Ja<xa.length;Ja++){for(var Fa=Q.getModel().getStyle(xa[Ja]),Oa=
-0;Oa<S.length;Oa++)Fa=mxUtils.removeStylename(Fa,S[Oa]);var va=Q.getModel().isVertex(xa[Ja])?Q.defaultVertexStyle:Q.defaultEdgeStyle;null!=Ca?(mxEvent.isShiftDown(Ka)||(Fa=""==Ca.fill?mxUtils.setStyle(Fa,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(Fa,mxConstants.STYLE_FILLCOLOR,Ca.fill||mxUtils.getValue(va,mxConstants.STYLE_FILLCOLOR,null)),Fa=mxUtils.setStyle(Fa,mxConstants.STYLE_GRADIENTCOLOR,Ca.gradient||mxUtils.getValue(va,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(Ka)||
-mxClient.IS_MAC&&mxEvent.isMetaDown(Ka)||!Q.getModel().isVertex(xa[Ja])||(Fa=mxUtils.setStyle(Fa,mxConstants.STYLE_FONTCOLOR,Ca.font||mxUtils.getValue(va,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(Ka)||(Fa=""==Ca.stroke?mxUtils.setStyle(Fa,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(Fa,mxConstants.STYLE_STROKECOLOR,Ca.stroke||mxUtils.getValue(va,mxConstants.STYLE_STROKECOLOR,null)))):(Fa=mxUtils.setStyle(Fa,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(va,mxConstants.STYLE_FILLCOLOR,
-"#ffffff")),Fa=mxUtils.setStyle(Fa,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(va,mxConstants.STYLE_STROKECOLOR,"#000000")),Fa=mxUtils.setStyle(Fa,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(va,mxConstants.STYLE_GRADIENTCOLOR,null)),Q.getModel().isVertex(xa[Ja])&&(Fa=mxUtils.setStyle(Fa,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(va,mxConstants.STYLE_FONTCOLOR,null))));Q.getModel().setStyle(xa[Ja],Fa)}}finally{Q.getModel().endUpdate()}}));Da.className="geStyleButton";Da.style.width="36px";
-Da.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";Da.style.margin="0px 6px 6px 0px";if(null!=Ca){var na="1"==urlParams.sketch?"2px solid":"1px solid";null!=Ca.gradient?mxClient.IS_IE&&10>document.documentMode?Da.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+Ca.fill+"', EndColorStr='"+Ca.gradient+"', GradientType=0)":Da.style.backgroundImage="linear-gradient("+Ca.fill+" 0px,"+Ca.gradient+" 100%)":Ca.fill==mxConstants.NONE?Da.style.background="url('"+Dialog.prototype.noColorImage+
-"')":Da.style.backgroundColor=""==Ca.fill?mxUtils.getValue(Q.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):Ca.fill||mxUtils.getValue(Q.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");Da.style.border=Ca.stroke==mxConstants.NONE?na+" transparent":""==Ca.stroke?na+" "+mxUtils.getValue(Q.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):na+" "+(Ca.stroke||mxUtils.getValue(Q.defaultVertexStyle,
-mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=Ca.title&&Da.setAttribute("title",Ca.title)}else{na=mxUtils.getValue(Q.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var Ia=mxUtils.getValue(Q.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");Da.style.backgroundColor=na;Da.style.border="1px solid "+Ia}Da.style.borderRadius="0";P.appendChild(Da)});P.innerText="";for(var Ga=0;Ga<ba.length;Ga++)0<Ga&&0==mxUtils.mod(Ga,4)&&mxUtils.br(P),Aa(ba[Ga])});
-null==this.format.currentScheme?Z(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):Z(this.format.currentScheme);Y=10>=this.defaultColorSchemes.length?28:8;var ja=document.createElement("div");ja.style.cssText="position:absolute;left:10px;top:8px;bottom:"+Y+"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(ja,"click",mxUtils.bind(this,function(){Z(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var ha=document.createElement("div");ha.style.cssText="position:absolute;left:202px;top:8px;bottom:"+Y+"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&&(t.appendChild(ja),t.appendChild(ha));mxEvent.addListener(ha,"click",mxUtils.bind(this,function(){Z(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));C(ja);C(ha);da(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&t.appendChild(U);return t};StyleFormatPanel.prototype.addEditOps=function(t){var C=this.editorUi.getSelectionState(),M=this.editorUi.editor.graph,Q=null;1==C.cells.length&&(Q=mxUtils.button(mxResources.get("editStyle"),
-mxUtils.bind(this,function(P){this.editorUi.actions.get("editStyle").funct()})),Q.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),Q.style.width="210px",Q.style.marginBottom="2px",t.appendChild(Q));M=1==C.cells.length?M.view.getState(C.cells[0]):null;null!=M&&null!=M.shape&&null!=M.shape.stencil?(C=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(P){this.editorUi.actions.get("editShape").funct()})),C.setAttribute("title",
-mxResources.get("editShape")),C.style.marginBottom="2px",null==Q?C.style.width="210px":(Q.style.width="104px",C.style.width="104px",C.style.marginLeft="2px"),t.appendChild(C)):C.image&&0<C.cells.length&&(C=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(P){this.editorUi.actions.get("image").funct()})),C.setAttribute("title",mxResources.get("editImage")),C.style.marginBottom="2px",null==Q?C.style.width="210px":(Q.style.width="104px",C.style.width="104px",C.style.marginLeft="2px"),
+function(t,C,M){if(null!=C){var S=function(R){if(null!=R)if(M)for(var T=0;T<R.length;T++)C[R[T].name]=R[T];else for(var V in C){var Y=!1;for(T=0;T<R.length;T++)if(R[T].name==V&&R[T].type==C[V].type){Y=!0;break}Y||delete C[V]}},P=this.editorUi.editor.graph.view.getState(t);null!=P&&null!=P.shape&&(P.shape.commonCustomPropAdded||(P.shape.commonCustomPropAdded=!0,P.shape.customProperties=P.shape.customProperties||[],P.cell.vertex?Array.prototype.push.apply(P.shape.customProperties,Editor.commonVertexProperties):
+Array.prototype.push.apply(P.shape.customProperties,Editor.commonEdgeProperties)),S(P.shape.customProperties));t=t.getAttribute("customProperties");if(null!=t)try{S(JSON.parse(t))}catch(R){}}};var x=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var t=this.editorUi.getSelectionState();"image"!=t.style.shape&&!t.containsLabel&&0<t.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));x.apply(this,arguments);if(Editor.enableCustomProperties){for(var C=
+{},M=t.vertices,S=t.edges,P=0;P<M.length;P++)this.findCommonProperties(M[P],C,0==P);for(P=0;P<S.length;P++)this.findCommonProperties(S[P],C,0==M.length&&0==P);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(C).length&&this.container.appendChild(this.addProperties(this.createPanel(),C,t))}};var y=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(t){this.addActions(t,["copyStyle","pasteStyle"]);return y.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=
+!0;StyleFormatPanel.prototype.addProperties=function(t,C,M){function S(wa,za,va,Ka){da.getModel().beginUpdate();try{var ia=[],ja=[];if(null!=va.index){for(var ua=[],xa=va.parentRow.nextSibling;xa&&xa.getAttribute("data-pName")==wa;)ua.push(xa.getAttribute("data-pValue")),xa=xa.nextSibling;va.index<ua.length?null!=Ka?ua.splice(Ka,1):ua[va.index]=za:ua.push(za);null!=va.size&&ua.length>va.size&&(ua=ua.slice(0,va.size));za=ua.join(",");null!=va.countProperty&&(da.setCellStyles(va.countProperty,ua.length,
+da.getSelectionCells()),ia.push(va.countProperty),ja.push(ua.length))}da.setCellStyles(wa,za,da.getSelectionCells());ia.push(wa);ja.push(za);if(null!=va.dependentProps)for(wa=0;wa<va.dependentProps.length;wa++){var ra=va.dependentPropsDefVal[wa],Aa=va.dependentPropsVals[wa];if(Aa.length>za)Aa=Aa.slice(0,za);else for(var fa=Aa.length;fa<za;fa++)Aa.push(ra);Aa=Aa.join(",");da.setCellStyles(va.dependentProps[wa],Aa,da.getSelectionCells());ia.push(va.dependentProps[wa]);ja.push(Aa)}if("function"==typeof va.onChange)va.onChange(da,
+za);Z.editorUi.fireEvent(new mxEventObject("styleChanged","keys",ia,"values",ja,"cells",da.getSelectionCells()))}finally{da.getModel().endUpdate()}}function P(wa,za,va){var Ka=mxUtils.getOffset(t,!0),ia=mxUtils.getOffset(wa,!0);za.style.position="absolute";za.style.left=ia.x-Ka.x+"px";za.style.top=ia.y-Ka.y+"px";za.style.width=wa.offsetWidth+"px";za.style.height=wa.offsetHeight-(va?4:0)+"px";za.style.zIndex=5}function R(wa,za,va){var Ka=document.createElement("div");Ka.style.width="32px";Ka.style.height=
+"4px";Ka.style.margin="2px";Ka.style.border="1px solid black";Ka.style.background=za&&"none"!=za?za:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(Z,function(ia){this.editorUi.pickColor(za,function(ja){Ka.style.background="none"==ja?"url('"+Dialog.prototype.noColorImage+"')":ja;S(wa,ja,va)});mxEvent.consume(ia)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(Ka);return btn}function T(wa,za,va,Ka,ia,ja,ua){null!=za&&(za=za.split(","),
+ea.push({name:wa,values:za,type:va,defVal:Ka,countProperty:ia,parentRow:ja,isDeletable:!0,flipBkg:ua}));btn=mxUtils.button("+",mxUtils.bind(Z,function(xa){for(var ra=ja,Aa=0;null!=ra.nextSibling;)if(ra.nextSibling.getAttribute("data-pName")==wa)ra=ra.nextSibling,Aa++;else break;var fa={type:va,parentRow:ja,index:Aa,isDeletable:!0,defVal:Ka,countProperty:ia};Aa=ba(wa,"",fa,0==Aa%2,ua);S(wa,Ka,fa);ra.parentNode.insertBefore(Aa,ra.nextSibling);mxEvent.consume(xa)}));btn.style.height="16px";btn.style.width=
+"25px";btn.className="geColorBtn";return btn}function V(wa,za,va,Ka,ia,ja,ua){if(0<ia){var xa=Array(ia);za=null!=za?za.split(","):[];for(var ra=0;ra<ia;ra++)xa[ra]=null!=za[ra]?za[ra]:null!=Ka?Ka:"";ea.push({name:wa,values:xa,type:va,defVal:Ka,parentRow:ja,flipBkg:ua,size:ia})}return document.createElement("div")}function Y(wa,za,va){var Ka=document.createElement("input");Ka.type="checkbox";Ka.checked="1"==za;mxEvent.addListener(Ka,"change",function(){S(wa,Ka.checked?"1":"0",va)});return Ka}function ba(wa,
+za,va,Ka,ia){var ja=va.dispName,ua=va.type,xa=document.createElement("tr");xa.className="gePropRow"+(ia?"Dark":"")+(Ka?"Alt":"")+" gePropNonHeaderRow";xa.setAttribute("data-pName",wa);xa.setAttribute("data-pValue",za);Ka=!1;null!=va.index&&(xa.setAttribute("data-index",va.index),ja=(null!=ja?ja:"")+"["+va.index+"]",Ka=!0);var ra=document.createElement("td");ra.className="gePropRowCell";ja=mxResources.get(ja,null,ja);mxUtils.write(ra,ja);ra.setAttribute("title",ja);Ka&&(ra.style.textAlign="right");
+xa.appendChild(ra);ra=document.createElement("td");ra.className="gePropRowCell";if("color"==ua)ra.appendChild(R(wa,za,va));else if("bool"==ua||"boolean"==ua)ra.appendChild(Y(wa,za,va));else if("enum"==ua){var Aa=va.enumList;for(ia=0;ia<Aa.length;ia++)if(ja=Aa[ia],ja.val==za){mxUtils.write(ra,mxResources.get(ja.dispName,null,ja.dispName));break}mxEvent.addListener(ra,"click",mxUtils.bind(Z,function(){var fa=document.createElement("select");P(ra,fa);for(var na=0;na<Aa.length;na++){var qa=Aa[na],ca=
+document.createElement("option");ca.value=mxUtils.htmlEntities(qa.val);mxUtils.write(ca,mxResources.get(qa.dispName,null,qa.dispName));fa.appendChild(ca)}fa.value=za;t.appendChild(fa);mxEvent.addListener(fa,"change",function(){var ha=mxUtils.htmlEntities(fa.value);S(wa,ha,va)});fa.focus();mxEvent.addListener(fa,"blur",function(){t.removeChild(fa)})}))}else"dynamicArr"==ua?ra.appendChild(T(wa,za,va.subType,va.subDefVal,va.countProperty,xa,ia)):"staticArr"==ua?ra.appendChild(V(wa,za,va.subType,va.subDefVal,
+va.size,xa,ia)):"readOnly"==ua?(ia=document.createElement("input"),ia.setAttribute("readonly",""),ia.value=za,ia.style.width="96px",ia.style.borderWidth="0px",ra.appendChild(ia)):(ra.innerHTML=mxUtils.htmlEntities(decodeURIComponent(za)),mxEvent.addListener(ra,"click",mxUtils.bind(Z,function(){function fa(){var qa=na.value;qa=0==qa.length&&"string"!=ua?0:qa;va.allowAuto&&(null!=qa.trim&&"auto"==qa.trim().toLowerCase()?(qa="auto",ua="string"):(qa=parseFloat(qa),qa=isNaN(qa)?0:qa));null!=va.min&&qa<
+va.min?qa=va.min:null!=va.max&&qa>va.max&&(qa=va.max);qa=encodeURIComponent(("int"==ua?parseInt(qa):qa)+"");S(wa,qa,va)}var na=document.createElement("input");P(ra,na,!0);na.value=decodeURIComponent(za);na.className="gePropEditor";"int"!=ua&&"float"!=ua||va.allowAuto||(na.type="number",na.step="int"==ua?"1":"any",null!=va.min&&(na.min=parseFloat(va.min)),null!=va.max&&(na.max=parseFloat(va.max)));t.appendChild(na);mxEvent.addListener(na,"keypress",function(qa){13==qa.keyCode&&fa()});na.focus();mxEvent.addListener(na,
+"blur",function(){fa()})})));va.isDeletable&&(ia=mxUtils.button("-",mxUtils.bind(Z,function(fa){S(wa,"",va,va.index);mxEvent.consume(fa)})),ia.style.height="16px",ia.style.width="25px",ia.style.float="right",ia.className="geColorBtn",ra.appendChild(ia));xa.appendChild(ra);return xa}var Z=this,da=this.editorUi.editor.graph,ea=[];t.style.position="relative";t.style.padding="0";var ka=document.createElement("table");ka.className="geProperties";ka.style.whiteSpace="nowrap";ka.style.width="100%";var aa=
+document.createElement("tr");aa.className="gePropHeader";var Ba=document.createElement("th");Ba.className="gePropHeaderCell";var Ea=document.createElement("img");Ea.src=Sidebar.prototype.expandedImage;Ea.style.verticalAlign="middle";Ba.appendChild(Ea);mxUtils.write(Ba,mxResources.get("property"));aa.style.cursor="pointer";var Ca=function(){var wa=ka.querySelectorAll(".gePropNonHeaderRow");if(Z.editorUi.propertiesCollapsed){Ea.src=Sidebar.prototype.collapsedImage;var za="none";for(var va=t.childNodes.length-
+1;0<=va;va--)try{var Ka=t.childNodes[va],ia=Ka.nodeName.toUpperCase();"INPUT"!=ia&&"SELECT"!=ia||t.removeChild(Ka)}catch(ja){}}else Ea.src=Sidebar.prototype.expandedImage,za="";for(va=0;va<wa.length;va++)wa[va].style.display=za};mxEvent.addListener(aa,"click",function(){Z.editorUi.propertiesCollapsed=!Z.editorUi.propertiesCollapsed;Ca()});aa.appendChild(Ba);Ba=document.createElement("th");Ba.className="gePropHeaderCell";Ba.innerHTML=mxResources.get("value");aa.appendChild(Ba);ka.appendChild(aa);var Da=
+!1,pa=!1;aa=null;1==M.vertices.length&&0==M.edges.length?aa=M.vertices[0].id:0==M.vertices.length&&1==M.edges.length&&(aa=M.edges[0].id);null!=aa&&ka.appendChild(ba("id",mxUtils.htmlEntities(aa),{dispName:"ID",type:"readOnly"},!0,!1));for(var Ha in C)if(aa=C[Ha],"function"!=typeof aa.isVisible||aa.isVisible(M,this)){var Ja=null!=M.style[Ha]?mxUtils.htmlEntities(M.style[Ha]+""):null!=aa.getDefaultValue?aa.getDefaultValue(M,this):aa.defVal;if("separator"==aa.type)pa=!pa;else{if("staticArr"==aa.type)aa.size=
+parseInt(M.style[aa.sizeProperty]||C[aa.sizeProperty].defVal)||0;else if(null!=aa.dependentProps){var ya=aa.dependentProps,Ia=[],Fa=[];for(Ba=0;Ba<ya.length;Ba++){var Pa=M.style[ya[Ba]];Fa.push(C[ya[Ba]].subDefVal);Ia.push(null!=Pa?Pa.split(","):[])}aa.dependentPropsDefVal=Fa;aa.dependentPropsVals=Ia}ka.appendChild(ba(Ha,Ja,aa,Da,pa));Da=!Da}}for(Ba=0;Ba<ea.length;Ba++)for(aa=ea[Ba],C=aa.parentRow,M=0;M<aa.values.length;M++)Ha=ba(aa.name,aa.values[M],{type:aa.type,parentRow:aa.parentRow,isDeletable:aa.isDeletable,
+index:M,defVal:aa.defVal,countProperty:aa.countProperty,size:aa.size},0==M%2,aa.flipBkg),C.parentNode.insertBefore(Ha,C.nextSibling),C=Ha;t.appendChild(ka);Ca();return t};StyleFormatPanel.prototype.addStyles=function(t){function C(aa){mxEvent.addListener(aa,"mouseenter",function(){aa.style.opacity="1"});mxEvent.addListener(aa,"mouseleave",function(){aa.style.opacity="0.5"})}var M=this.editorUi,S=M.editor.graph,P=document.createElement("div");P.style.whiteSpace="nowrap";P.style.paddingLeft="24px";
+P.style.paddingRight="20px";t.style.paddingLeft="16px";t.style.paddingBottom="6px";t.style.position="relative";t.appendChild(P);var R="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(" "),T=document.createElement("div");T.style.whiteSpace="nowrap";T.style.position="relative";T.style.textAlign="center";T.style.width="210px";for(var V=[],Y=0;Y<this.defaultColorSchemes.length;Y++){var ba=
+document.createElement("div");ba.style.display="inline-block";ba.style.width="6px";ba.style.height="6px";ba.style.marginLeft="4px";ba.style.marginRight="3px";ba.style.borderRadius="3px";ba.style.cursor="pointer";ba.style.background="transparent";ba.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(aa){mxEvent.addListener(ba,"click",mxUtils.bind(this,function(){Z(aa)}))})(Y);V.push(ba);T.appendChild(ba)}var Z=mxUtils.bind(this,function(aa){null!=V[aa]&&(null!=this.format.currentScheme&&null!=
+V[this.format.currentScheme]&&(V[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=aa,da(this.defaultColorSchemes[this.format.currentScheme]),V[this.format.currentScheme].style.background="#84d7ff")}),da=mxUtils.bind(this,function(aa){var Ba=mxUtils.bind(this,function(Ca){var Da=mxUtils.button("",mxUtils.bind(this,function(Ja){S.getModel().beginUpdate();try{for(var ya=M.getSelectionState().cells,Ia=0;Ia<ya.length;Ia++){for(var Fa=S.getModel().getStyle(ya[Ia]),Pa=
+0;Pa<R.length;Pa++)Fa=mxUtils.removeStylename(Fa,R[Pa]);var wa=S.getModel().isVertex(ya[Ia])?S.defaultVertexStyle:S.defaultEdgeStyle;null!=Ca?(mxEvent.isShiftDown(Ja)||(Fa=""==Ca.fill?mxUtils.setStyle(Fa,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(Fa,mxConstants.STYLE_FILLCOLOR,Ca.fill||mxUtils.getValue(wa,mxConstants.STYLE_FILLCOLOR,null)),Fa=mxUtils.setStyle(Fa,mxConstants.STYLE_GRADIENTCOLOR,Ca.gradient||mxUtils.getValue(wa,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(Ja)||
+mxClient.IS_MAC&&mxEvent.isMetaDown(Ja)||!S.getModel().isVertex(ya[Ia])||(Fa=mxUtils.setStyle(Fa,mxConstants.STYLE_FONTCOLOR,Ca.font||mxUtils.getValue(wa,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(Ja)||(Fa=""==Ca.stroke?mxUtils.setStyle(Fa,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(Fa,mxConstants.STYLE_STROKECOLOR,Ca.stroke||mxUtils.getValue(wa,mxConstants.STYLE_STROKECOLOR,null)))):(Fa=mxUtils.setStyle(Fa,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(wa,mxConstants.STYLE_FILLCOLOR,
+"#ffffff")),Fa=mxUtils.setStyle(Fa,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(wa,mxConstants.STYLE_STROKECOLOR,"#000000")),Fa=mxUtils.setStyle(Fa,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(wa,mxConstants.STYLE_GRADIENTCOLOR,null)),S.getModel().isVertex(ya[Ia])&&(Fa=mxUtils.setStyle(Fa,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(wa,mxConstants.STYLE_FONTCOLOR,null))));S.getModel().setStyle(ya[Ia],Fa)}}finally{S.getModel().endUpdate()}}));Da.className="geStyleButton";Da.style.width="36px";
+Da.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";Da.style.margin="0px 6px 6px 0px";if(null!=Ca){var pa="1"==urlParams.sketch?"2px solid":"1px solid";null!=Ca.gradient?mxClient.IS_IE&&10>document.documentMode?Da.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+Ca.fill+"', EndColorStr='"+Ca.gradient+"', GradientType=0)":Da.style.backgroundImage="linear-gradient("+Ca.fill+" 0px,"+Ca.gradient+" 100%)":Ca.fill==mxConstants.NONE?Da.style.background="url('"+Dialog.prototype.noColorImage+
+"')":Da.style.backgroundColor=""==Ca.fill?mxUtils.getValue(S.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):Ca.fill||mxUtils.getValue(S.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");Da.style.border=Ca.stroke==mxConstants.NONE?pa+" transparent":""==Ca.stroke?pa+" "+mxUtils.getValue(S.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):pa+" "+(Ca.stroke||mxUtils.getValue(S.defaultVertexStyle,
+mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=Ca.title&&Da.setAttribute("title",Ca.title)}else{pa=mxUtils.getValue(S.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var Ha=mxUtils.getValue(S.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");Da.style.backgroundColor=pa;Da.style.border="1px solid "+Ha}Da.style.borderRadius="0";P.appendChild(Da)});P.innerText="";for(var Ea=0;Ea<aa.length;Ea++)0<Ea&&0==mxUtils.mod(Ea,4)&&mxUtils.br(P),Ba(aa[Ea])});
+null==this.format.currentScheme?Z(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):Z(this.format.currentScheme);Y=10>=this.defaultColorSchemes.length?28:8;var ea=document.createElement("div");ea.style.cssText="position:absolute;left:10px;top:8px;bottom:"+Y+"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(ea,"click",mxUtils.bind(this,function(){Z(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var ka=document.createElement("div");ka.style.cssText="position:absolute;left:202px;top:8px;bottom:"+Y+"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&&(t.appendChild(ea),t.appendChild(ka));mxEvent.addListener(ka,"click",mxUtils.bind(this,function(){Z(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));C(ea);C(ka);da(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&t.appendChild(T);return t};StyleFormatPanel.prototype.addEditOps=function(t){var C=this.editorUi.getSelectionState(),M=this.editorUi.editor.graph,S=null;1==C.cells.length&&(S=mxUtils.button(mxResources.get("editStyle"),
+mxUtils.bind(this,function(P){this.editorUi.actions.get("editStyle").funct()})),S.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),S.style.width="210px",S.style.marginBottom="2px",t.appendChild(S));M=1==C.cells.length?M.view.getState(C.cells[0]):null;null!=M&&null!=M.shape&&null!=M.shape.stencil?(C=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(P){this.editorUi.actions.get("editShape").funct()})),C.setAttribute("title",
+mxResources.get("editShape")),C.style.marginBottom="2px",null==S?C.style.width="210px":(S.style.width="104px",C.style.width="104px",C.style.marginLeft="2px"),t.appendChild(C)):C.image&&0<C.cells.length&&(C=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(P){this.editorUi.actions.get("image").funct()})),C.setAttribute("title",mxResources.get("editImage")),C.style.marginBottom="2px",null==S?C.style.width="210px":(S.style.width="104px",C.style.width="104px",C.style.marginLeft="2px"),
t.appendChild(C));return t}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(t){return t.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(t){return Graph.isGoogleFontUrl(t)};Graph.createFontElement=function(t,
-C){var M=Graph.fontMapping[C];null==M&&Graph.isCssFontUrl(C)?(t=document.createElement("link"),t.setAttribute("rel","stylesheet"),t.setAttribute("type","text/css"),t.setAttribute("charset","UTF-8"),t.setAttribute("href",C)):(null==M&&(M='@font-face {\nfont-family: "'+t+'";\nsrc: url("'+C+'");\n}'),t=document.createElement("style"),mxUtils.write(t,M));return t};Graph.addFont=function(t,C,M){if(null!=t&&0<t.length&&null!=C&&0<C.length){var Q=t.toLowerCase();if("helvetica"!=Q&&"arial"!=t&&"sans-serif"!=
-Q){var P=Graph.customFontElements[Q];null!=P&&P.url!=C&&(P.elt.parentNode.removeChild(P.elt),P=null);null==P?(P=C,"http:"==C.substring(0,5)&&(P=PROXY_URL+"?url="+encodeURIComponent(C)),P={name:t,url:C,elt:Graph.createFontElement(t,P)},Graph.customFontElements[Q]=P,Graph.recentCustomFonts[Q]=P,C=document.getElementsByTagName("head")[0],null!=M&&("link"==P.elt.nodeName.toLowerCase()?(P.elt.onload=M,P.elt.onerror=M):M()),null!=C&&C.appendChild(P.elt)):null!=M&&M()}else null!=M&&M()}else null!=M&&M();
-return t};Graph.getFontUrl=function(t,C){t=Graph.customFontElements[t.toLowerCase()];null!=t&&(C=t.url);return C};Graph.processFontAttributes=function(t){t=t.getElementsByTagName("*");for(var C=0;C<t.length;C++){var M=t[C].getAttribute("data-font-src");if(null!=M){var Q="FONT"==t[C].nodeName?t[C].getAttribute("face"):t[C].style.fontFamily;null!=Q&&Graph.addFont(Q,M)}}};Graph.processFontStyle=function(t){if(null!=t){var C=mxUtils.getValue(t,"fontSource",null);if(null!=C){var M=mxUtils.getValue(t,mxConstants.STYLE_FONTFAMILY,
+C){var M=Graph.fontMapping[C];null==M&&Graph.isCssFontUrl(C)?(t=document.createElement("link"),t.setAttribute("rel","stylesheet"),t.setAttribute("type","text/css"),t.setAttribute("charset","UTF-8"),t.setAttribute("href",C)):(null==M&&(M='@font-face {\nfont-family: "'+t+'";\nsrc: url("'+C+'");\n}'),t=document.createElement("style"),mxUtils.write(t,M));return t};Graph.addFont=function(t,C,M){if(null!=t&&0<t.length&&null!=C&&0<C.length){var S=t.toLowerCase();if("helvetica"!=S&&"arial"!=t&&"sans-serif"!=
+S){var P=Graph.customFontElements[S];null!=P&&P.url!=C&&(P.elt.parentNode.removeChild(P.elt),P=null);null==P?(P=C,"http:"==C.substring(0,5)&&(P=PROXY_URL+"?url="+encodeURIComponent(C)),P={name:t,url:C,elt:Graph.createFontElement(t,P)},Graph.customFontElements[S]=P,Graph.recentCustomFonts[S]=P,C=document.getElementsByTagName("head")[0],null!=M&&("link"==P.elt.nodeName.toLowerCase()?(P.elt.onload=M,P.elt.onerror=M):M()),null!=C&&C.appendChild(P.elt)):null!=M&&M()}else null!=M&&M()}else null!=M&&M();
+return t};Graph.getFontUrl=function(t,C){t=Graph.customFontElements[t.toLowerCase()];null!=t&&(C=t.url);return C};Graph.processFontAttributes=function(t){t=t.getElementsByTagName("*");for(var C=0;C<t.length;C++){var M=t[C].getAttribute("data-font-src");if(null!=M){var S="FONT"==t[C].nodeName?t[C].getAttribute("face"):t[C].style.fontFamily;null!=S&&Graph.addFont(S,M)}}};Graph.processFontStyle=function(t){if(null!=t){var C=mxUtils.getValue(t,"fontSource",null);if(null!=C){var M=mxUtils.getValue(t,mxConstants.STYLE_FONTFAMILY,
null);null!=M&&Graph.addFont(M,decodeURIComponent(C))}}return t};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!=
urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var z=Graph.prototype.init;Graph.prototype.init=function(){function t(P){C=P}z.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var C=null;mxEvent.addListener(this.container,"mouseenter",t);mxEvent.addListener(this.container,"mousemove",t);mxEvent.addListener(this.container,"mouseleave",function(P){C=null});this.isMouseInsertPoint=function(){return null!=C};var M=this.getInsertPoint;
-this.getInsertPoint=function(){return null!=C?this.getPointForEvent(C):M.apply(this,arguments)};var Q=this.layoutManager.getLayout;this.layoutManager.getLayout=function(P){var S=this.graph.getCellStyle(P);if(null!=S&&"rack"==S.childLayout){var U=new mxStackLayout(this.graph,!1);U.gridSize=null!=S.rackUnitSize?parseFloat(S.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;U.marginLeft=S.marginLeft||0;U.marginRight=S.marginRight||0;U.marginTop=S.marginTop||0;U.marginBottom=
-S.marginBottom||0;U.allowGaps=S.allowGaps||0;U.horizontal="1"==mxUtils.getValue(S,"horizontalRack","0");U.resizeParent=!1;U.fill=!0;return U}return Q.apply(this,arguments)};this.updateGlobalUrlVariables()};var A=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(t,C){return Graph.processFontStyle(A.apply(this,arguments))};var K=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(t,C,M,Q,P,S,U,T,Y,aa,Z){K.apply(this,arguments);Graph.processFontAttributes(Z)};
-var O=mxText.prototype.redraw;mxText.prototype.redraw=function(){O.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(t,C,M){function Q(){for(var ba=U.getSelectionCells(),Aa=[],Ga=0;Ga<ba.length;Ga++)U.isCellVisible(ba[Ga])&&Aa.push(ba[Ga]);U.setSelectionCells(Aa)}function P(ba){U.setHiddenTags(ba?[]:T.slice());Q();U.refresh()}function S(ba,Aa){aa.innerText="";if(0<ba.length){var Ga=document.createElement("table");
-Ga.setAttribute("cellpadding","2");Ga.style.boxSizing="border-box";Ga.style.tableLayout="fixed";Ga.style.width="100%";var Ca=document.createElement("tbody");if(null!=ba&&0<ba.length)for(var Da=0;Da<ba.length;Da++)(function(na){var Ia=0>mxUtils.indexOf(U.hiddenTags,na),Ka=document.createElement("tr"),xa=document.createElement("td");xa.style.align="center";xa.style.width="16px";var Ja=document.createElement("img");Ja.setAttribute("src",Ia?Editor.visibleImage:Editor.hiddenImage);Ja.setAttribute("title",
-mxResources.get(Ia?"hideIt":"show",[na]));mxUtils.setOpacity(Ja,Ia?75:25);Ja.style.verticalAlign="middle";Ja.style.cursor="pointer";Ja.style.width="16px";if(C||Editor.isDarkMode())Ja.style.filter="invert(100%)";xa.appendChild(Ja);mxEvent.addListener(Ja,"click",function(Oa){mxEvent.isShiftDown(Oa)?P(0<=mxUtils.indexOf(U.hiddenTags,na)):(U.toggleHiddenTag(na),Q(),U.refresh());mxEvent.consume(Oa)});Ka.appendChild(xa);xa=document.createElement("td");xa.style.overflow="hidden";xa.style.whiteSpace="nowrap";
-xa.style.textOverflow="ellipsis";xa.style.verticalAlign="middle";xa.style.cursor="pointer";xa.setAttribute("title",na);a=document.createElement("a");mxUtils.write(a,na);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,Ia?100:40);xa.appendChild(a);mxEvent.addListener(xa,"click",function(Oa){if(mxEvent.isShiftDown(Oa)){P(!0);var va=U.getCellsForTags([na],null,null,!0);U.isEnabled()?U.setSelectionCells(va):U.highlightCells(va)}else if(Ia&&0<U.hiddenTags.length)P(!0);else{va=
-T.slice();var za=mxUtils.indexOf(va,na);va.splice(za,1);U.setHiddenTags(va);Q();U.refresh()}mxEvent.consume(Oa)});Ka.appendChild(xa);if(U.isEnabled()){xa=document.createElement("td");xa.style.verticalAlign="middle";xa.style.textAlign="center";xa.style.width="18px";if(null==Aa){xa.style.align="center";xa.style.width="16px";Ja=document.createElement("img");Ja.setAttribute("src",Editor.crossImage);Ja.setAttribute("title",mxResources.get("removeIt",[na]));mxUtils.setOpacity(Ja,Ia?75:25);Ja.style.verticalAlign=
-"middle";Ja.style.cursor="pointer";Ja.style.width="16px";if(C||Editor.isDarkMode())Ja.style.filter="invert(100%)";mxEvent.addListener(Ja,"click",function(Oa){var va=mxUtils.indexOf(T,na);0<=va&&T.splice(va,1);U.removeTagsForCells(U.model.getDescendants(U.model.getRoot()),[na]);U.refresh();mxEvent.consume(Oa)});xa.appendChild(Ja)}else{var Fa=document.createElement("input");Fa.setAttribute("type","checkbox");Fa.style.margin="0px";Fa.defaultChecked=null!=Aa&&0<=mxUtils.indexOf(Aa,na);Fa.checked=Fa.defaultChecked;
-Fa.style.background="transparent";Fa.setAttribute("title",mxResources.get(Fa.defaultChecked?"removeIt":"add",[na]));mxEvent.addListener(Fa,"change",function(Oa){Fa.checked?U.addTagsForCells(U.getSelectionCells(),[na]):U.removeTagsForCells(U.getSelectionCells(),[na]);mxEvent.consume(Oa)});xa.appendChild(Fa)}Ka.appendChild(xa)}Ca.appendChild(Ka)})(ba[Da]);Ga.appendChild(Ca);aa.appendChild(Ga)}}var U=this,T=U.hiddenTags.slice(),Y=document.createElement("div");Y.style.userSelect="none";Y.style.overflow=
-"hidden";Y.style.padding="10px";Y.style.height="100%";var aa=document.createElement("div");aa.style.boxSizing="border-box";aa.style.borderRadius="4px";aa.style.userSelect="none";aa.style.overflow="auto";aa.style.position="absolute";aa.style.left="10px";aa.style.right="10px";aa.style.top="10px";aa.style.border=U.isEnabled()?"1px solid #808080":"none";aa.style.bottom=U.isEnabled()?"48px":"10px";Y.appendChild(aa);var Z=mxUtils.button(mxResources.get("reset"),function(ba){U.setHiddenTags([]);mxEvent.isShiftDown(ba)||
-(T=U.hiddenTags.slice());Q();U.refresh()});Z.setAttribute("title",mxResources.get("reset"));Z.className="geBtn";Z.style.margin="0 4px 0 0";var da=mxUtils.button(mxResources.get("add"),function(){null!=M&&M(T,function(ba){T=ba;ja()})});da.setAttribute("title",mxResources.get("add"));da.className="geBtn";da.style.margin="0";U.addListener(mxEvent.ROOT,function(){T=U.hiddenTags.slice()});var ja=mxUtils.bind(this,function(ba,Aa){if(t()){ba=U.getAllTags();for(Aa=0;Aa<ba.length;Aa++)0>mxUtils.indexOf(T,
-ba[Aa])&&T.push(ba[Aa]);T.sort();U.isSelectionEmpty()?S(T):S(T,U.getCommonTagsForCells(U.getSelectionCells()))}});U.selectionModel.addListener(mxEvent.CHANGE,ja);U.model.addListener(mxEvent.CHANGE,ja);U.addListener(mxEvent.REFRESH,ja);var ha=document.createElement("div");ha.style.boxSizing="border-box";ha.style.whiteSpace="nowrap";ha.style.position="absolute";ha.style.overflow="hidden";ha.style.bottom="0px";ha.style.height="42px";ha.style.right="10px";ha.style.left="10px";U.isEnabled()&&(ha.appendChild(Z),
-ha.appendChild(da),Y.appendChild(ha));return{div:Y,refresh:ja}};Graph.prototype.getCustomFonts=function(){var t=this.extFonts;t=null!=t?t.slice():[];for(var C in Graph.customFontElements){var M=Graph.customFontElements[C];t.push({name:M.name,url:M.url})}return t};Graph.prototype.setFont=function(t,C){Graph.addFont(t,C);document.execCommand("fontname",!1,t);if(null!=C){var M=this.cellEditor.textarea.getElementsByTagName("font");C=Graph.getFontUrl(t,C);for(var Q=0;Q<M.length;Q++)M[Q].getAttribute("face")==
-t&&M[Q].getAttribute("data-font-src")!=C&&M[Q].setAttribute("data-font-src",C)}};var L=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return L.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 t=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=t)for(var C in t)this.globalVars[C]=
+this.getInsertPoint=function(){return null!=C?this.getPointForEvent(C):M.apply(this,arguments)};var S=this.layoutManager.getLayout;this.layoutManager.getLayout=function(P){var R=this.graph.getCellStyle(P);if(null!=R&&"rack"==R.childLayout){var T=new mxStackLayout(this.graph,!1);T.gridSize=null!=R.rackUnitSize?parseFloat(R.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;T.marginLeft=R.marginLeft||0;T.marginRight=R.marginRight||0;T.marginTop=R.marginTop||0;T.marginBottom=
+R.marginBottom||0;T.allowGaps=R.allowGaps||0;T.horizontal="1"==mxUtils.getValue(R,"horizontalRack","0");T.resizeParent=!1;T.fill=!0;return T}return S.apply(this,arguments)};this.updateGlobalUrlVariables()};var A=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(t,C){return Graph.processFontStyle(A.apply(this,arguments))};var J=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(t,C,M,S,P,R,T,V,Y,ba,Z){J.apply(this,arguments);Graph.processFontAttributes(Z)};
+var O=mxText.prototype.redraw;mxText.prototype.redraw=function(){O.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(t,C,M){function S(){for(var aa=T.getSelectionCells(),Ba=[],Ea=0;Ea<aa.length;Ea++)T.isCellVisible(aa[Ea])&&Ba.push(aa[Ea]);T.setSelectionCells(Ba)}function P(aa){T.setHiddenTags(aa?[]:V.slice());S();T.refresh()}function R(aa,Ba){ba.innerText="";if(0<aa.length){var Ea=document.createElement("table");
+Ea.setAttribute("cellpadding","2");Ea.style.boxSizing="border-box";Ea.style.tableLayout="fixed";Ea.style.width="100%";var Ca=document.createElement("tbody");if(null!=aa&&0<aa.length)for(var Da=0;Da<aa.length;Da++)(function(pa){var Ha=0>mxUtils.indexOf(T.hiddenTags,pa),Ja=document.createElement("tr"),ya=document.createElement("td");ya.style.align="center";ya.style.width="16px";var Ia=document.createElement("img");Ia.setAttribute("src",Ha?Editor.visibleImage:Editor.hiddenImage);Ia.setAttribute("title",
+mxResources.get(Ha?"hideIt":"show",[pa]));mxUtils.setOpacity(Ia,Ha?75:25);Ia.style.verticalAlign="middle";Ia.style.cursor="pointer";Ia.style.width="16px";if(C||Editor.isDarkMode())Ia.style.filter="invert(100%)";ya.appendChild(Ia);mxEvent.addListener(Ia,"click",function(Pa){mxEvent.isShiftDown(Pa)?P(0<=mxUtils.indexOf(T.hiddenTags,pa)):(T.toggleHiddenTag(pa),S(),T.refresh());mxEvent.consume(Pa)});Ja.appendChild(ya);ya=document.createElement("td");ya.style.overflow="hidden";ya.style.whiteSpace="nowrap";
+ya.style.textOverflow="ellipsis";ya.style.verticalAlign="middle";ya.style.cursor="pointer";ya.setAttribute("title",pa);a=document.createElement("a");mxUtils.write(a,pa);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,Ha?100:40);ya.appendChild(a);mxEvent.addListener(ya,"click",function(Pa){if(mxEvent.isShiftDown(Pa)){P(!0);var wa=T.getCellsForTags([pa],null,null,!0);T.isEnabled()?T.setSelectionCells(wa):T.highlightCells(wa)}else if(Ha&&0<T.hiddenTags.length)P(!0);else{wa=
+V.slice();var za=mxUtils.indexOf(wa,pa);wa.splice(za,1);T.setHiddenTags(wa);S();T.refresh()}mxEvent.consume(Pa)});Ja.appendChild(ya);if(T.isEnabled()){ya=document.createElement("td");ya.style.verticalAlign="middle";ya.style.textAlign="center";ya.style.width="18px";if(null==Ba){ya.style.align="center";ya.style.width="16px";Ia=document.createElement("img");Ia.setAttribute("src",Editor.crossImage);Ia.setAttribute("title",mxResources.get("removeIt",[pa]));mxUtils.setOpacity(Ia,Ha?75:25);Ia.style.verticalAlign=
+"middle";Ia.style.cursor="pointer";Ia.style.width="16px";if(C||Editor.isDarkMode())Ia.style.filter="invert(100%)";mxEvent.addListener(Ia,"click",function(Pa){var wa=mxUtils.indexOf(V,pa);0<=wa&&V.splice(wa,1);T.removeTagsForCells(T.model.getDescendants(T.model.getRoot()),[pa]);T.refresh();mxEvent.consume(Pa)});ya.appendChild(Ia)}else{var Fa=document.createElement("input");Fa.setAttribute("type","checkbox");Fa.style.margin="0px";Fa.defaultChecked=null!=Ba&&0<=mxUtils.indexOf(Ba,pa);Fa.checked=Fa.defaultChecked;
+Fa.style.background="transparent";Fa.setAttribute("title",mxResources.get(Fa.defaultChecked?"removeIt":"add",[pa]));mxEvent.addListener(Fa,"change",function(Pa){Fa.checked?T.addTagsForCells(T.getSelectionCells(),[pa]):T.removeTagsForCells(T.getSelectionCells(),[pa]);mxEvent.consume(Pa)});ya.appendChild(Fa)}Ja.appendChild(ya)}Ca.appendChild(Ja)})(aa[Da]);Ea.appendChild(Ca);ba.appendChild(Ea)}}var T=this,V=T.hiddenTags.slice(),Y=document.createElement("div");Y.style.userSelect="none";Y.style.overflow=
+"hidden";Y.style.padding="10px";Y.style.height="100%";var ba=document.createElement("div");ba.style.boxSizing="border-box";ba.style.borderRadius="4px";ba.style.userSelect="none";ba.style.overflow="auto";ba.style.position="absolute";ba.style.left="10px";ba.style.right="10px";ba.style.top="10px";ba.style.border=T.isEnabled()?"1px solid #808080":"none";ba.style.bottom=T.isEnabled()?"48px":"10px";Y.appendChild(ba);var Z=mxUtils.button(mxResources.get("reset"),function(aa){T.setHiddenTags([]);mxEvent.isShiftDown(aa)||
+(V=T.hiddenTags.slice());S();T.refresh()});Z.setAttribute("title",mxResources.get("reset"));Z.className="geBtn";Z.style.margin="0 4px 0 0";var da=mxUtils.button(mxResources.get("add"),function(){null!=M&&M(V,function(aa){V=aa;ea()})});da.setAttribute("title",mxResources.get("add"));da.className="geBtn";da.style.margin="0";T.addListener(mxEvent.ROOT,function(){V=T.hiddenTags.slice()});var ea=mxUtils.bind(this,function(aa,Ba){if(t()){aa=T.getAllTags();for(Ba=0;Ba<aa.length;Ba++)0>mxUtils.indexOf(V,
+aa[Ba])&&V.push(aa[Ba]);V.sort();T.isSelectionEmpty()?R(V):R(V,T.getCommonTagsForCells(T.getSelectionCells()))}});T.selectionModel.addListener(mxEvent.CHANGE,ea);T.model.addListener(mxEvent.CHANGE,ea);T.addListener(mxEvent.REFRESH,ea);var ka=document.createElement("div");ka.style.boxSizing="border-box";ka.style.whiteSpace="nowrap";ka.style.position="absolute";ka.style.overflow="hidden";ka.style.bottom="0px";ka.style.height="42px";ka.style.right="10px";ka.style.left="10px";T.isEnabled()&&(ka.appendChild(Z),
+ka.appendChild(da),Y.appendChild(ka));return{div:Y,refresh:ea}};Graph.prototype.getCustomFonts=function(){var t=this.extFonts;t=null!=t?t.slice():[];for(var C in Graph.customFontElements){var M=Graph.customFontElements[C];t.push({name:M.name,url:M.url})}return t};Graph.prototype.setFont=function(t,C){Graph.addFont(t,C);document.execCommand("fontname",!1,t);if(null!=C){var M=this.cellEditor.textarea.getElementsByTagName("font");C=Graph.getFontUrl(t,C);for(var S=0;S<M.length;S++)M[S].getAttribute("face")==
+t&&M[S].getAttribute("data-font-src")!=C&&M[S].setAttribute("data-font-src",C)}};var K=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return K.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 t=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=t)for(var C in t)this.globalVars[C]=
t[C]}catch(M){null!=window.console&&console.log("Error in vars URL parameter: "+M)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var u=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(t){var C=u.apply(this,arguments);null==C&&null!=this.globalVars&&(C=this.globalVars[t]);return C};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var t=this.themes["default-style2"];this.defaultStylesheet=
-(new mxCodec(t.ownerDocument)).decode(t)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var E=Graph.prototype.getSvg;Graph.prototype.getSvg=function(t,C,M,Q,P,S,U,T,Y,aa,Z,da,ja,ha){var ba=null,Aa=null,Ga=null;da||null==this.themes||"darkTheme"!=this.defaultThemeName||(ba=this.stylesheet,Aa=this.shapeForegroundColor,Ga=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?"#000000":Editor.lightColor,this.shapeBackgroundColor=
-"darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var Ca=E.apply(this,arguments),Da=this.getCustomFonts();if(Z&&0<Da.length){var na=Ca.ownerDocument,Ia=null!=na.createElementNS?na.createElementNS(mxConstants.NS_SVG,"style"):na.createElement("style");null!=na.setAttributeNS?Ia.setAttributeNS("type","text/css"):Ia.setAttribute("type","text/css");for(var Ka="",xa="",Ja=0;Ja<Da.length;Ja++){var Fa=Da[Ja].name,Oa=Da[Ja].url;Graph.isCssFontUrl(Oa)?
-Ka+="@import url("+Oa+");\n":xa+='@font-face {\nfont-family: "'+Fa+'";\nsrc: url("'+Oa+'");\n}\n'}Ia.appendChild(na.createTextNode(Ka+xa));Ca.getElementsByTagName("defs")[0].appendChild(Ia)}this.mathEnabled&&(document.body.appendChild(Ca),Editor.MathJaxRender(Ca),Ca.parentNode.removeChild(Ca));null!=ba&&(this.shapeBackgroundColor=Ga,this.shapeForegroundColor=Aa,this.stylesheet=ba,this.refresh());return Ca};var B=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(t){B.apply(this,
+(new mxCodec(t.ownerDocument)).decode(t)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var E=Graph.prototype.getSvg;Graph.prototype.getSvg=function(t,C,M,S,P,R,T,V,Y,ba,Z,da,ea,ka){var aa=null,Ba=null,Ea=null;da||null==this.themes||"darkTheme"!=this.defaultThemeName||(aa=this.stylesheet,Ba=this.shapeForegroundColor,Ea=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?"#000000":Editor.lightColor,this.shapeBackgroundColor=
+"darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var Ca=E.apply(this,arguments),Da=this.getCustomFonts();if(Z&&0<Da.length){var pa=Ca.ownerDocument,Ha=null!=pa.createElementNS?pa.createElementNS(mxConstants.NS_SVG,"style"):pa.createElement("style");null!=pa.setAttributeNS?Ha.setAttributeNS("type","text/css"):Ha.setAttribute("type","text/css");for(var Ja="",ya="",Ia=0;Ia<Da.length;Ia++){var Fa=Da[Ia].name,Pa=Da[Ia].url;Graph.isCssFontUrl(Pa)?
+Ja+="@import url("+Pa+");\n":ya+='@font-face {\nfont-family: "'+Fa+'";\nsrc: url("'+Pa+'");\n}\n'}Ha.appendChild(pa.createTextNode(Ja+ya));Ca.getElementsByTagName("defs")[0].appendChild(Ha)}this.mathEnabled&&(document.body.appendChild(Ca),Editor.MathJaxRender(Ca),Ca.parentNode.removeChild(Ca));null!=aa&&(this.shapeBackgroundColor=Ea,this.shapeForegroundColor=Ba,this.stylesheet=aa,this.refresh());return Ca};var B=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(t){B.apply(this,
arguments);null!=t.secondLabel&&(t.secondLabel.destroy(),t.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(t){return[t.shape,t.text,t.secondLabel,t.control]};var D=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){D.apply(this,arguments);this.enumerationState=0};var G=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(t){null!=t.shape&&this.redrawEnumerationState(t);return G.apply(this,arguments)};
mxGraphView.prototype.createEnumerationValue=function(t){t=decodeURIComponent(mxUtils.getValue(t.style,"enumerateValue",""));""==t&&(t=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(t)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(t){var C="1"==mxUtils.getValue(t.style,"enumerate",0);C&&null==t.secondLabel?(t.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),
-t.secondLabel.size=12,t.secondLabel.state=t,t.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(t,t.secondLabel)):C||null==t.secondLabel||(t.secondLabel.destroy(),t.secondLabel=null);C=t.secondLabel;if(null!=C){var M=t.view.scale,Q=this.createEnumerationValue(t);t=this.graph.model.isVertex(t.cell)?new mxRectangle(t.x+t.width-4*M,t.y+4*M,0,0):mxRectangle.fromPoint(t.view.getPoint(t));C.bounds.equals(t)&&C.value==Q&&C.scale==M||(C.bounds=t,C.value=Q,C.scale=
-M,C.redraw())}};var N=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){N.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var t=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;",t.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,t.ownerSVGElement))}};var I=Graph.prototype.refresh;Graph.prototype.refresh=function(){I.apply(this,
+t.secondLabel.size=12,t.secondLabel.state=t,t.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(t,t.secondLabel)):C||null==t.secondLabel||(t.secondLabel.destroy(),t.secondLabel=null);C=t.secondLabel;if(null!=C){var M=t.view.scale,S=this.createEnumerationValue(t);t=this.graph.model.isVertex(t.cell)?new mxRectangle(t.x+t.width-4*M,t.y+4*M,0,0):mxRectangle.fromPoint(t.view.getPoint(t));C.bounds.equals(t)&&C.value==S&&C.scale==M||(C.bounds=t,C.value=S,C.scale=
+M,C.redraw())}};var H=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){H.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var t=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;",t.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,t.ownerSVGElement))}};var N=Graph.prototype.refresh;Graph.prototype.refresh=function(){N.apply(this,
arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var F=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){F.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(t){"data:action/json,"==t.substring(0,17)&&(t=JSON.parse(t.substring(17)),null!=
-t.actions&&this.executeCustomActions(t.actions))};Graph.prototype.executeCustomActions=function(t,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 M=!1,Q=0,P=0,S=mxUtils.bind(this,function(){M||(M=!0,this.model.beginUpdate())}),U=mxUtils.bind(this,
-function(){M&&(M=!1,this.model.endUpdate())}),T=mxUtils.bind(this,function(){0<Q&&Q--;0==Q&&Y()}),Y=mxUtils.bind(this,function(){if(P<t.length){var aa=this.stoppingCustomActions,Z=t[P++],da=[];if(null!=Z.open)if(U(),this.isCustomLink(Z.open)){if(!this.customLinkClicked(Z.open))return}else this.openLink(Z.open);null==Z.wait||aa||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;T()}),Q++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,
-""!=Z.wait?parseInt(Z.wait):1E3),U());null!=Z.opacity&&null!=Z.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(Z.opacity,!0)),Z.opacity.value);null!=Z.fadeIn&&(Q++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Z.fadeIn,!0)),0,1,T,aa?0:Z.fadeIn.delay));null!=Z.fadeOut&&(Q++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Z.fadeOut,!0)),1,0,T,aa?0:Z.fadeOut.delay));null!=Z.wipeIn&&(da=da.concat(this.createWipeAnimations(this.getCellsForAction(Z.wipeIn,
-!0),!0)));null!=Z.wipeOut&&(da=da.concat(this.createWipeAnimations(this.getCellsForAction(Z.wipeOut,!0),!1)));null!=Z.toggle&&(S(),this.toggleCells(this.getCellsForAction(Z.toggle,!0)));if(null!=Z.show){S();var ja=this.getCellsForAction(Z.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(ja),1);this.setCellsVisible(ja,!0)}null!=Z.hide&&(S(),ja=this.getCellsForAction(Z.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(ja),0),this.setCellsVisible(ja,!1));null!=Z.toggleStyle&&null!=Z.toggleStyle.key&&
-(S(),this.toggleCellStyles(Z.toggleStyle.key,null!=Z.toggleStyle.defaultValue?Z.toggleStyle.defaultValue:"0",this.getCellsForAction(Z.toggleStyle,!0)));null!=Z.style&&null!=Z.style.key&&(S(),this.setCellStyles(Z.style.key,Z.style.value,this.getCellsForAction(Z.style,!0)));ja=[];null!=Z.select&&this.isEnabled()&&(ja=this.getCellsForAction(Z.select),this.setSelectionCells(ja));null!=Z.highlight&&(ja=this.getCellsForAction(Z.highlight),this.highlightCells(ja,Z.highlight.color,Z.highlight.duration,Z.highlight.opacity));
-null!=Z.scroll&&(ja=this.getCellsForAction(Z.scroll));null!=Z.viewbox&&this.fitWindow(Z.viewbox,Z.viewbox.border);0<ja.length&&this.scrollCellToVisible(ja[0]);if(null!=Z.tags){ja=[];null!=Z.tags.hidden&&(ja=ja.concat(Z.tags.hidden));if(null!=Z.tags.visible)for(var ha=this.getAllTags(),ba=0;ba<ha.length;ba++)0>mxUtils.indexOf(Z.tags.visible,ha[ba])&&0>mxUtils.indexOf(ja,ha[ba])&&ja.push(ha[ba]);this.setHiddenTags(ja);this.refresh()}0<da.length&&(Q++,this.executeAnimations(da,T,aa?1:Z.steps,aa?0:Z.delay));
-0==Q?Y():U()}else this.stoppingCustomActions=this.executingCustomActions=!1,U(),null!=C&&C()});Y()}};Graph.prototype.doUpdateCustomLinksForCell=function(t,C){var M=this.getLinkForCell(C);null!=M&&"data:action/json,"==M.substring(0,17)&&this.setLinkForCell(C,this.updateCustomLink(t,M));if(this.isHtmlLabel(C)){var Q=document.createElement("div");Q.innerHTML=this.sanitizeHtml(this.getLabel(C));for(var P=Q.getElementsByTagName("a"),S=!1,U=0;U<P.length;U++)M=P[U].getAttribute("href"),null!=M&&"data:action/json,"==
-M.substring(0,17)&&(P[U].setAttribute("href",this.updateCustomLink(t,M)),S=!0);S&&this.labelChanged(C,Q.innerHTML)}};Graph.prototype.updateCustomLink=function(t,C){if("data:action/json,"==C.substring(0,17))try{var M=JSON.parse(C.substring(17));null!=M.actions&&(this.updateCustomLinkActions(t,M.actions),C="data:action/json,"+JSON.stringify(M))}catch(Q){}return C};Graph.prototype.updateCustomLinkActions=function(t,C){for(var M=0;M<C.length;M++){var Q=C[M],P;for(P in Q)this.updateCustomLinkAction(t,
-Q[P],"cells"),this.updateCustomLinkAction(t,Q[P],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(t,C,M){if(null!=C&&null!=C[M]){for(var Q=[],P=0;P<C[M].length;P++)if("*"==C[M][P])Q.push(C[M][P]);else{var S=t[C[M][P]];null!=S?""!=S&&Q.push(S):Q.push(C[M][P])}C[M]=Q}};Graph.prototype.getCellsForAction=function(t,C){C=this.getCellsById(t.cells).concat(this.getCellsForTags(t.tags,null,C));if(null!=t.excludeCells){for(var M=[],Q=0;Q<C.length;Q++)0>t.excludeCells.indexOf(C[Q].id)&&M.push(C[Q]);
-C=M}return C};Graph.prototype.getCellsById=function(t){var C=[];if(null!=t)for(var M=0;M<t.length;M++)if("*"==t[M]){var Q=this.model.getRoot();C=C.concat(this.model.filterDescendants(function(S){return S!=Q},Q))}else{var P=this.model.getCell(t[M]);null!=P&&C.push(P)}return C};var H=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(t){return H.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(t))};Graph.prototype.setHiddenTags=function(t){this.hiddenTags=t;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};
+t.actions&&this.executeCustomActions(t.actions))};Graph.prototype.executeCustomActions=function(t,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 M=!1,S=0,P=0,R=mxUtils.bind(this,function(){M||(M=!0,this.model.beginUpdate())}),T=mxUtils.bind(this,
+function(){M&&(M=!1,this.model.endUpdate())}),V=mxUtils.bind(this,function(){0<S&&S--;0==S&&Y()}),Y=mxUtils.bind(this,function(){if(P<t.length){var ba=this.stoppingCustomActions,Z=t[P++],da=[];if(null!=Z.open)if(T(),this.isCustomLink(Z.open)){if(!this.customLinkClicked(Z.open))return}else this.openLink(Z.open);null==Z.wait||ba||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;V()}),S++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,
+""!=Z.wait?parseInt(Z.wait):1E3),T());null!=Z.opacity&&null!=Z.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(Z.opacity,!0)),Z.opacity.value);null!=Z.fadeIn&&(S++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Z.fadeIn,!0)),0,1,V,ba?0:Z.fadeIn.delay));null!=Z.fadeOut&&(S++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Z.fadeOut,!0)),1,0,V,ba?0:Z.fadeOut.delay));null!=Z.wipeIn&&(da=da.concat(this.createWipeAnimations(this.getCellsForAction(Z.wipeIn,
+!0),!0)));null!=Z.wipeOut&&(da=da.concat(this.createWipeAnimations(this.getCellsForAction(Z.wipeOut,!0),!1)));null!=Z.toggle&&(R(),this.toggleCells(this.getCellsForAction(Z.toggle,!0)));if(null!=Z.show){R();var ea=this.getCellsForAction(Z.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(ea),1);this.setCellsVisible(ea,!0)}null!=Z.hide&&(R(),ea=this.getCellsForAction(Z.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(ea),0),this.setCellsVisible(ea,!1));null!=Z.toggleStyle&&null!=Z.toggleStyle.key&&
+(R(),this.toggleCellStyles(Z.toggleStyle.key,null!=Z.toggleStyle.defaultValue?Z.toggleStyle.defaultValue:"0",this.getCellsForAction(Z.toggleStyle,!0)));null!=Z.style&&null!=Z.style.key&&(R(),this.setCellStyles(Z.style.key,Z.style.value,this.getCellsForAction(Z.style,!0)));ea=[];null!=Z.select&&this.isEnabled()&&(ea=this.getCellsForAction(Z.select),this.setSelectionCells(ea));null!=Z.highlight&&(ea=this.getCellsForAction(Z.highlight),this.highlightCells(ea,Z.highlight.color,Z.highlight.duration,Z.highlight.opacity));
+null!=Z.scroll&&(ea=this.getCellsForAction(Z.scroll));null!=Z.viewbox&&this.fitWindow(Z.viewbox,Z.viewbox.border);0<ea.length&&this.scrollCellToVisible(ea[0]);if(null!=Z.tags){ea=[];null!=Z.tags.hidden&&(ea=ea.concat(Z.tags.hidden));if(null!=Z.tags.visible)for(var ka=this.getAllTags(),aa=0;aa<ka.length;aa++)0>mxUtils.indexOf(Z.tags.visible,ka[aa])&&0>mxUtils.indexOf(ea,ka[aa])&&ea.push(ka[aa]);this.setHiddenTags(ea);this.refresh()}0<da.length&&(S++,this.executeAnimations(da,V,ba?1:Z.steps,ba?0:Z.delay));
+0==S?Y():T()}else this.stoppingCustomActions=this.executingCustomActions=!1,T(),null!=C&&C()});Y()}};Graph.prototype.doUpdateCustomLinksForCell=function(t,C){var M=this.getLinkForCell(C);null!=M&&"data:action/json,"==M.substring(0,17)&&this.setLinkForCell(C,this.updateCustomLink(t,M));if(this.isHtmlLabel(C)){var S=document.createElement("div");S.innerHTML=this.sanitizeHtml(this.getLabel(C));for(var P=S.getElementsByTagName("a"),R=!1,T=0;T<P.length;T++)M=P[T].getAttribute("href"),null!=M&&"data:action/json,"==
+M.substring(0,17)&&(P[T].setAttribute("href",this.updateCustomLink(t,M)),R=!0);R&&this.labelChanged(C,S.innerHTML)}};Graph.prototype.updateCustomLink=function(t,C){if("data:action/json,"==C.substring(0,17))try{var M=JSON.parse(C.substring(17));null!=M.actions&&(this.updateCustomLinkActions(t,M.actions),C="data:action/json,"+JSON.stringify(M))}catch(S){}return C};Graph.prototype.updateCustomLinkActions=function(t,C){for(var M=0;M<C.length;M++){var S=C[M],P;for(P in S)this.updateCustomLinkAction(t,
+S[P],"cells"),this.updateCustomLinkAction(t,S[P],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(t,C,M){if(null!=C&&null!=C[M]){for(var S=[],P=0;P<C[M].length;P++)if("*"==C[M][P])S.push(C[M][P]);else{var R=t[C[M][P]];null!=R?""!=R&&S.push(R):S.push(C[M][P])}C[M]=S}};Graph.prototype.getCellsForAction=function(t,C){C=this.getCellsById(t.cells).concat(this.getCellsForTags(t.tags,null,C));if(null!=t.excludeCells){for(var M=[],S=0;S<C.length;S++)0>t.excludeCells.indexOf(C[S].id)&&M.push(C[S]);
+C=M}return C};Graph.prototype.getCellsById=function(t){var C=[];if(null!=t)for(var M=0;M<t.length;M++)if("*"==t[M]){var S=this.model.getRoot();C=C.concat(this.model.filterDescendants(function(R){return R!=S},S))}else{var P=this.model.getCell(t[M]);null!=P&&C.push(P)}return C};var I=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(t){return I.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(t))};Graph.prototype.setHiddenTags=function(t){this.hiddenTags=t;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};
Graph.prototype.toggleHiddenTag=function(t){var C=mxUtils.indexOf(this.hiddenTags,t);0>C?this.hiddenTags.push(t):0<=C&&this.hiddenTags.splice(C,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(t){if(null==t||0==t.length||0==this.hiddenTags.length)return!1;t=t.split(" ");if(t.length>this.hiddenTags.length)return!1;for(var C=0;C<t.length;C++)if(0>mxUtils.indexOf(this.hiddenTags,t[C]))return!1;return!0};Graph.prototype.getCellsForTags=function(t,C,M,
-Q){var P=[];if(null!=t){C=null!=C?C:this.model.getDescendants(this.model.getRoot());for(var S=0,U={},T=0;T<t.length;T++)0<t[T].length&&(U[t[T]]=!0,S++);for(T=0;T<C.length;T++)if(M&&this.model.getParent(C[T])==this.model.root||this.model.isVertex(C[T])||this.model.isEdge(C[T])){var Y=this.getTagsForCell(C[T]),aa=!1;if(0<Y.length&&(Y=Y.split(" "),Y.length>=t.length)){for(var Z=aa=0;Z<Y.length&&aa<S;Z++)null!=U[Y[Z]]&&aa++;aa=aa==S}aa&&(1!=Q||this.isCellVisible(C[T]))&&P.push(C[T])}}return P};Graph.prototype.getAllTags=
-function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(t){for(var C=null,M=[],Q=0;Q<t.length;Q++){var P=this.getTagsForCell(t[Q]);M=[];if(0<P.length){P=P.split(" ");for(var S={},U=0;U<P.length;U++)if(null==C||null!=C[P[U]])S[P[U]]=!0,M.push(P[U]);C=S}else return[]}return M};Graph.prototype.getTagsForCells=function(t){for(var C=[],M={},Q=0;Q<t.length;Q++){var P=this.getTagsForCell(t[Q]);if(0<P.length){P=P.split(" ");for(var S=
-0;S<P.length;S++)null==M[P[S]]&&(M[P[S]]=!0,C.push(P[S]))}}return C};Graph.prototype.getTagsForCell=function(t){return this.getAttributeForCell(t,"tags","")};Graph.prototype.addTagsForCells=function(t,C){if(0<t.length&&0<C.length){this.model.beginUpdate();try{for(var M=0;M<t.length;M++){for(var Q=this.getTagsForCell(t[M]),P=Q.split(" "),S=!1,U=0;U<C.length;U++){var T=mxUtils.trim(C[U]);""!=T&&0>mxUtils.indexOf(P,T)&&(Q=0<Q.length?Q+" "+T:T,S=!0)}S&&this.setAttributeForCell(t[M],"tags",Q)}}finally{this.model.endUpdate()}}};
-Graph.prototype.removeTagsForCells=function(t,C){if(0<t.length&&0<C.length){this.model.beginUpdate();try{for(var M=0;M<t.length;M++){var Q=this.getTagsForCell(t[M]);if(0<Q.length){for(var P=Q.split(" "),S=!1,U=0;U<C.length;U++){var T=mxUtils.indexOf(P,C[U]);0<=T&&(P.splice(T,1),S=!0)}S&&this.setAttributeForCell(t[M],"tags",P.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(t){this.model.beginUpdate();try{for(var C=0;C<t.length;C++)this.model.setVisible(t[C],!this.model.isVisible(t[C]))}finally{this.model.endUpdate()}};
-Graph.prototype.setCellsVisible=function(t,C){this.model.beginUpdate();try{for(var M=0;M<t.length;M++)this.model.setVisible(t[M],C)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(t,C,M,Q){for(var P=0;P<t.length;P++)this.highlightCell(t[P],C,M,Q)};Graph.prototype.highlightCell=function(t,C,M,Q,P){C=null!=C?C:mxConstants.DEFAULT_VALID_COLOR;M=null!=M?M:1E3;t=this.view.getState(t);var S=null;null!=t&&(P=null!=P?P:4,P=Math.max(P+1,mxUtils.getValue(t.style,mxConstants.STYLE_STROKEWIDTH,
-1)+P),S=new mxCellHighlight(this,C,P,!1),null!=Q&&(S.opacity=Q),S.highlight(t),window.setTimeout(function(){null!=S.shape&&(mxUtils.setPrefixedStyle(S.shape.node.style,"transition","all 1200ms ease-in-out"),S.shape.node.style.opacity=0);window.setTimeout(function(){S.destroy()},1200)},M));return S};Graph.prototype.addSvgShadow=function(t,C,M,Q){M=null!=M?M:!1;Q=null!=Q?Q:!0;var P=t.ownerDocument,S=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"filter"):P.createElement("filter");S.setAttribute("id",
-this.shadowId);var U=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):P.createElement("feGaussianBlur");U.setAttribute("in","SourceAlpha");U.setAttribute("stdDeviation",this.svgShadowBlur);U.setAttribute("result","blur");S.appendChild(U);U=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feOffset"):P.createElement("feOffset");U.setAttribute("in","blur");U.setAttribute("dx",this.svgShadowSize);U.setAttribute("dy",this.svgShadowSize);U.setAttribute("result",
-"offsetBlur");S.appendChild(U);U=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feFlood"):P.createElement("feFlood");U.setAttribute("flood-color",this.svgShadowColor);U.setAttribute("flood-opacity",this.svgShadowOpacity);U.setAttribute("result","offsetColor");S.appendChild(U);U=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feComposite"):P.createElement("feComposite");U.setAttribute("in","offsetColor");U.setAttribute("in2","offsetBlur");U.setAttribute("operator","in");
-U.setAttribute("result","offsetBlur");S.appendChild(U);U=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feBlend"):P.createElement("feBlend");U.setAttribute("in","SourceGraphic");U.setAttribute("in2","offsetBlur");S.appendChild(U);U=t.getElementsByTagName("defs");0==U.length?(P=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"defs"):P.createElement("defs"),null!=t.firstChild?t.insertBefore(P,t.firstChild):t.appendChild(P)):P=U[0];P.appendChild(S);M||(C=null!=C?C:t.getElementsByTagName("g")[0],
-null!=C&&(C.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(t.getAttribute("width")))&&Q&&(t.setAttribute("width",parseInt(t.getAttribute("width"))+6),t.setAttribute("height",parseInt(t.getAttribute("height"))+6),C=t.getAttribute("viewBox"),null!=C&&0<C.length&&(C=C.split(" "),3<C.length&&(w=parseFloat(C[2])+6,h=parseFloat(C[3])+6,t.setAttribute("viewBox",C[0]+" "+C[1]+" "+w+" "+h))))));return S};Graph.prototype.setShadowVisible=function(t,C){mxClient.IS_SVG&&!mxClient.IS_SF&&(C=
+S){var P=[];if(null!=t){C=null!=C?C:this.model.getDescendants(this.model.getRoot());for(var R=0,T={},V=0;V<t.length;V++)0<t[V].length&&(T[t[V]]=!0,R++);for(V=0;V<C.length;V++)if(M&&this.model.getParent(C[V])==this.model.root||this.model.isVertex(C[V])||this.model.isEdge(C[V])){var Y=this.getTagsForCell(C[V]),ba=!1;if(0<Y.length&&(Y=Y.split(" "),Y.length>=t.length)){for(var Z=ba=0;Z<Y.length&&ba<R;Z++)null!=T[Y[Z]]&&ba++;ba=ba==R}ba&&(1!=S||this.isCellVisible(C[V]))&&P.push(C[V])}}return P};Graph.prototype.getAllTags=
+function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(t){for(var C=null,M=[],S=0;S<t.length;S++){var P=this.getTagsForCell(t[S]);M=[];if(0<P.length){P=P.split(" ");for(var R={},T=0;T<P.length;T++)if(null==C||null!=C[P[T]])R[P[T]]=!0,M.push(P[T]);C=R}else return[]}return M};Graph.prototype.getTagsForCells=function(t){for(var C=[],M={},S=0;S<t.length;S++){var P=this.getTagsForCell(t[S]);if(0<P.length){P=P.split(" ");for(var R=
+0;R<P.length;R++)null==M[P[R]]&&(M[P[R]]=!0,C.push(P[R]))}}return C};Graph.prototype.getTagsForCell=function(t){return this.getAttributeForCell(t,"tags","")};Graph.prototype.addTagsForCells=function(t,C){if(0<t.length&&0<C.length){this.model.beginUpdate();try{for(var M=0;M<t.length;M++){for(var S=this.getTagsForCell(t[M]),P=S.split(" "),R=!1,T=0;T<C.length;T++){var V=mxUtils.trim(C[T]);""!=V&&0>mxUtils.indexOf(P,V)&&(S=0<S.length?S+" "+V:V,R=!0)}R&&this.setAttributeForCell(t[M],"tags",S)}}finally{this.model.endUpdate()}}};
+Graph.prototype.removeTagsForCells=function(t,C){if(0<t.length&&0<C.length){this.model.beginUpdate();try{for(var M=0;M<t.length;M++){var S=this.getTagsForCell(t[M]);if(0<S.length){for(var P=S.split(" "),R=!1,T=0;T<C.length;T++){var V=mxUtils.indexOf(P,C[T]);0<=V&&(P.splice(V,1),R=!0)}R&&this.setAttributeForCell(t[M],"tags",P.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(t){this.model.beginUpdate();try{for(var C=0;C<t.length;C++)this.model.setVisible(t[C],!this.model.isVisible(t[C]))}finally{this.model.endUpdate()}};
+Graph.prototype.setCellsVisible=function(t,C){this.model.beginUpdate();try{for(var M=0;M<t.length;M++)this.model.setVisible(t[M],C)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(t,C,M,S){for(var P=0;P<t.length;P++)this.highlightCell(t[P],C,M,S)};Graph.prototype.highlightCell=function(t,C,M,S,P){C=null!=C?C:mxConstants.DEFAULT_VALID_COLOR;M=null!=M?M:1E3;t=this.view.getState(t);var R=null;null!=t&&(P=null!=P?P:4,P=Math.max(P+1,mxUtils.getValue(t.style,mxConstants.STYLE_STROKEWIDTH,
+1)+P),R=new mxCellHighlight(this,C,P,!1),null!=S&&(R.opacity=S),R.highlight(t),window.setTimeout(function(){null!=R.shape&&(mxUtils.setPrefixedStyle(R.shape.node.style,"transition","all 1200ms ease-in-out"),R.shape.node.style.opacity=0);window.setTimeout(function(){R.destroy()},1200)},M));return R};Graph.prototype.addSvgShadow=function(t,C,M,S){M=null!=M?M:!1;S=null!=S?S:!0;var P=t.ownerDocument,R=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"filter"):P.createElement("filter");R.setAttribute("id",
+this.shadowId);var T=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):P.createElement("feGaussianBlur");T.setAttribute("in","SourceAlpha");T.setAttribute("stdDeviation",this.svgShadowBlur);T.setAttribute("result","blur");R.appendChild(T);T=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feOffset"):P.createElement("feOffset");T.setAttribute("in","blur");T.setAttribute("dx",this.svgShadowSize);T.setAttribute("dy",this.svgShadowSize);T.setAttribute("result",
+"offsetBlur");R.appendChild(T);T=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feFlood"):P.createElement("feFlood");T.setAttribute("flood-color",this.svgShadowColor);T.setAttribute("flood-opacity",this.svgShadowOpacity);T.setAttribute("result","offsetColor");R.appendChild(T);T=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feComposite"):P.createElement("feComposite");T.setAttribute("in","offsetColor");T.setAttribute("in2","offsetBlur");T.setAttribute("operator","in");
+T.setAttribute("result","offsetBlur");R.appendChild(T);T=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feBlend"):P.createElement("feBlend");T.setAttribute("in","SourceGraphic");T.setAttribute("in2","offsetBlur");R.appendChild(T);T=t.getElementsByTagName("defs");0==T.length?(P=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"defs"):P.createElement("defs"),null!=t.firstChild?t.insertBefore(P,t.firstChild):t.appendChild(P)):P=T[0];P.appendChild(R);M||(C=null!=C?C:t.getElementsByTagName("g")[0],
+null!=C&&(C.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(t.getAttribute("width")))&&S&&(t.setAttribute("width",parseInt(t.getAttribute("width"))+6),t.setAttribute("height",parseInt(t.getAttribute("height"))+6),C=t.getAttribute("viewBox"),null!=C&&0<C.length&&(C=C.split(" "),3<C.length&&(w=parseFloat(C[2])+6,h=parseFloat(C[3])+6,t.setAttribute("viewBox",C[0]+" "+C[1]+" "+w+" "+h))))));return R};Graph.prototype.setShadowVisible=function(t,C){mxClient.IS_SVG&&!mxClient.IS_SF&&(C=
null!=C?C:!0,(this.shadowVisible=t)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),C&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var t=this.model.getChildCount(this.model.root),C=0;do var M=this.model.getChildAt(this.model.root,C);while(C++<t&&"1"==mxUtils.getValue(this.getCellStyle(M),"locked","0"));null!=M&&this.setDefaultParent(M)}};
mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.bpmn2=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.c4=
[SHAPES_PATH+"/mxC4.js"];mxStencilRegistry.libraries.cisco19=[SHAPES_PATH+"/mxCisco19.js",STENCIL_PATH+"/cisco19.xml"];mxStencilRegistry.libraries.cisco_safe=[SHAPES_PATH+"/mxCiscoSafe.js",STENCIL_PATH+"/cisco_safe/architecture.xml",STENCIL_PATH+"/cisco_safe/business_icons.xml",STENCIL_PATH+"/cisco_safe/capability.xml",STENCIL_PATH+"/cisco_safe/design.xml",STENCIL_PATH+"/cisco_safe/iot_things_icons.xml",STENCIL_PATH+"/cisco_safe/people_places_things_icons.xml",STENCIL_PATH+"/cisco_safe/security_icons.xml",
@@ -11682,35 +11678,35 @@ mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupN
"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.ibm=[SHAPES_PATH+"/mxIBM.js",STENCIL_PATH+"/ibm.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=
[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];mxStencilRegistry.libraries.veeam=
[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=
-[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(t){var C=null;null!=t&&0<t.length&&("ER"==t.substring(0,2)?C="mxgraph.er":"sysML"==t.substring(0,5)&&(C="mxgraph.sysml"));return C};var R=mxMarker.createMarker;mxMarker.createMarker=function(t,C,M,Q,P,S,U,T,Y,aa){if(null!=M&&null==mxMarker.markers[M]){var Z=this.getPackageForType(M);null!=Z&&mxStencilRegistry.getStencil(Z)}return R.apply(this,arguments)};var X=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(t,
-C,M,Q,P,S){"1"==mxUtils.getValue(C.style,"lineShape",null)&&t.setFillColor(mxUtils.getValue(C.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return X.apply(this,arguments)};PrintDialog.prototype.create=function(t,C){function M(){ja.value=Math.max(1,Math.min(T,Math.max(parseInt(ja.value),parseInt(da.value))));da.value=Math.max(1,Math.min(T,Math.min(parseInt(ja.value),parseInt(da.value))))}function Q(wa){function ua(Ha,La,Qa){var Na=Ha.useCssTransforms,Ra=Ha.currentTranslate,Xa=Ha.currentScale,Ma=
-Ha.view.translate,Ta=Ha.view.scale;Ha.useCssTransforms&&(Ha.useCssTransforms=!1,Ha.currentTranslate=new mxPoint(0,0),Ha.currentScale=1,Ha.view.translate=new mxPoint(0,0),Ha.view.scale=1);var Ua=Ha.getGraphBounds(),Va=0,$a=0,Wa=Ba.get(),ab=1/Ha.pageScale,Za=Ca.checked;if(Za){ab=parseInt(za.value);var gb=parseInt(ta.value);ab=Math.min(Wa.height*gb/(Ua.height/Ha.view.scale),Wa.width*ab/(Ua.width/Ha.view.scale))}else ab=parseInt(Ga.value)/(100*Ha.pageScale),isNaN(ab)&&(sa=1/Ha.pageScale,Ga.value="100 %");
-Wa=mxRectangle.fromRectangle(Wa);Wa.width=Math.ceil(Wa.width*sa);Wa.height=Math.ceil(Wa.height*sa);ab*=sa;!Za&&Ha.pageVisible?(Ua=Ha.getPageLayout(),Va-=Ua.x*Wa.width,$a-=Ua.y*Wa.height):Za=!0;if(null==La){La=PrintDialog.createPrintPreview(Ha,ab,Wa,0,Va,$a,Za);La.pageSelector=!1;La.mathEnabled=!1;ha.checked&&(La.isCellVisible=function(Ya){return Ha.isCellSelected(Ya)});Va=t.getCurrentFile();null!=Va&&(La.title=Va.getTitle());var hb=La.writeHead;La.writeHead=function(Ya){hb.apply(this,arguments);mxClient.IS_GC&&
-(Ya.writeln('<style type="text/css">'),Ya.writeln("@media print {"),Ya.writeln(".MathJax svg { shape-rendering: crispEdges; }"),Ya.writeln("}"),Ya.writeln("</style>"));null!=t.editor.fontCss&&(Ya.writeln('<style type="text/css">'),Ya.writeln(t.editor.fontCss),Ya.writeln("</style>"));for(var cb=Ha.getCustomFonts(),bb=0;bb<cb.length;bb++){var eb=cb[bb].name,db=cb[bb].url;Graph.isCssFontUrl(db)?Ya.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(db)+'" charset="UTF-8" type="text/css">'):
+[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(t){var C=null;null!=t&&0<t.length&&("ER"==t.substring(0,2)?C="mxgraph.er":"sysML"==t.substring(0,5)&&(C="mxgraph.sysml"));return C};var Q=mxMarker.createMarker;mxMarker.createMarker=function(t,C,M,S,P,R,T,V,Y,ba){if(null!=M&&null==mxMarker.markers[M]){var Z=this.getPackageForType(M);null!=Z&&mxStencilRegistry.getStencil(Z)}return Q.apply(this,arguments)};var X=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(t,
+C,M,S,P,R){"1"==mxUtils.getValue(C.style,"lineShape",null)&&t.setFillColor(mxUtils.getValue(C.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return X.apply(this,arguments)};PrintDialog.prototype.create=function(t,C){function M(){ea.value=Math.max(1,Math.min(V,Math.max(parseInt(ea.value),parseInt(da.value))));da.value=Math.max(1,Math.min(V,Math.min(parseInt(ea.value),parseInt(da.value))))}function S(ja){function ua(Ga,La,Qa){var Oa=Ga.useCssTransforms,Ra=Ga.currentTranslate,Xa=Ga.currentScale,Ma=
+Ga.view.translate,Ta=Ga.view.scale;Ga.useCssTransforms&&(Ga.useCssTransforms=!1,Ga.currentTranslate=new mxPoint(0,0),Ga.currentScale=1,Ga.view.translate=new mxPoint(0,0),Ga.view.scale=1);var Ua=Ga.getGraphBounds(),Va=0,$a=0,Wa=Ka.get(),ab=1/Ga.pageScale,Za=Ca.checked;if(Za){ab=parseInt(za.value);var gb=parseInt(va.value);ab=Math.min(Wa.height*gb/(Ua.height/Ga.view.scale),Wa.width*ab/(Ua.width/Ga.view.scale))}else ab=parseInt(Ea.value)/(100*Ga.pageScale),isNaN(ab)&&(xa=1/Ga.pageScale,Ea.value="100 %");
+Wa=mxRectangle.fromRectangle(Wa);Wa.width=Math.ceil(Wa.width*xa);Wa.height=Math.ceil(Wa.height*xa);ab*=xa;!Za&&Ga.pageVisible?(Ua=Ga.getPageLayout(),Va-=Ua.x*Wa.width,$a-=Ua.y*Wa.height):Za=!0;if(null==La){La=PrintDialog.createPrintPreview(Ga,ab,Wa,0,Va,$a,Za);La.pageSelector=!1;La.mathEnabled=!1;ka.checked&&(La.isCellVisible=function(Ya){return Ga.isCellSelected(Ya)});Va=t.getCurrentFile();null!=Va&&(La.title=Va.getTitle());var hb=La.writeHead;La.writeHead=function(Ya){hb.apply(this,arguments);mxClient.IS_GC&&
+(Ya.writeln('<style type="text/css">'),Ya.writeln("@media print {"),Ya.writeln(".MathJax svg { shape-rendering: crispEdges; }"),Ya.writeln("}"),Ya.writeln("</style>"));null!=t.editor.fontCss&&(Ya.writeln('<style type="text/css">'),Ya.writeln(t.editor.fontCss),Ya.writeln("</style>"));for(var cb=Ga.getCustomFonts(),bb=0;bb<cb.length;bb++){var eb=cb[bb].name,db=cb[bb].url;Graph.isCssFontUrl(db)?Ya.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(db)+'" charset="UTF-8" type="text/css">'):
(Ya.writeln('<style type="text/css">'),Ya.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(eb)+'";\nsrc: url("'+mxUtils.htmlEntities(db)+'");\n}'),Ya.writeln("</style>"))}};if("undefined"!==typeof MathJax){var ib=La.renderPage;La.renderPage=function(Ya,cb,bb,eb,db,kb){var jb=mxClient.NO_FO,fb=ib.apply(this,arguments);mxClient.NO_FO=jb;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:fb.className="geDisableMathJax";return fb}}Va=null;$a=P.shapeForegroundColor;Za=P.shapeBackgroundColor;
-Wa=P.enableFlowAnimation;P.enableFlowAnimation=!1;null!=P.themes&&"darkTheme"==P.defaultThemeName&&(Va=P.stylesheet,P.stylesheet=P.getDefaultStylesheet(),P.shapeForegroundColor="#000000",P.shapeBackgroundColor="#ffffff",P.refresh());La.open(null,null,Qa,!0);P.enableFlowAnimation=Wa;null!=Va&&(P.shapeForegroundColor=$a,P.shapeBackgroundColor=Za,P.stylesheet=Va,P.refresh())}else{Wa=Ha.background;if(null==Wa||""==Wa||Wa==mxConstants.NONE)Wa="#ffffff";La.backgroundColor=Wa;La.autoOrigin=Za;La.appendGraph(Ha,
-ab,Va,$a,Qa,!0);Qa=Ha.getCustomFonts();if(null!=La.wnd)for(Va=0;Va<Qa.length;Va++)$a=Qa[Va].name,Za=Qa[Va].url,Graph.isCssFontUrl(Za)?La.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Za)+'" charset="UTF-8" type="text/css">'):(La.wnd.document.writeln('<style type="text/css">'),La.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities($a)+'";\nsrc: url("'+mxUtils.htmlEntities(Za)+'");\n}'),La.wnd.document.writeln("</style>"))}Na&&(Ha.useCssTransforms=Na,
-Ha.currentTranslate=Ra,Ha.currentScale=Xa,Ha.view.translate=Ma,Ha.view.scale=Ta);return La}var sa=parseInt(ea.value)/100;isNaN(sa)&&(sa=1,ea.value="100 %");sa*=.75;var ra=null,ya=P.shapeForegroundColor,ia=P.shapeBackgroundColor;null!=P.themes&&"darkTheme"==P.defaultThemeName&&(ra=P.stylesheet,P.stylesheet=P.getDefaultStylesheet(),P.shapeForegroundColor="#000000",P.shapeBackgroundColor="#ffffff",P.refresh());var ma=da.value,ca=ja.value,fa=!aa.checked,oa=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(t,
-aa.checked,ma,ca,Ca.checked,za.value,ta.value,parseInt(Ga.value)/100,parseInt(ea.value)/100,Ba.get());else{fa&&(fa=ha.checked||ma==Y&&ca==Y);if(!fa&&null!=t.pages&&t.pages.length){var la=0;fa=t.pages.length-1;aa.checked||(la=parseInt(ma)-1,fa=parseInt(ca)-1);for(var qa=la;qa<=fa;qa++){var pa=t.pages[qa];ma=pa==t.currentPage?P:null;if(null==ma){ma=t.createTemporaryGraph(P.stylesheet);ma.shapeForegroundColor=P.shapeForegroundColor;ma.shapeBackgroundColor=P.shapeBackgroundColor;ca=!0;la=!1;var ka=null,
-Ea=null;null==pa.viewState&&null==pa.root&&t.updatePageRoot(pa);null!=pa.viewState&&(ca=pa.viewState.pageVisible,la=pa.viewState.mathEnabled,ka=pa.viewState.background,Ea=pa.viewState.backgroundImage,ma.extFonts=pa.viewState.extFonts);null!=Ea&&null!=Ea.originalSrc&&(Ea=t.createImageForPageLink(Ea.originalSrc,pa));ma.background=ka;ma.backgroundImage=null!=Ea?new mxImage(Ea.src,Ea.width,Ea.height,Ea.x,Ea.y):null;ma.pageVisible=ca;ma.mathEnabled=la;var Pa=ma.getGraphBounds;ma.getGraphBounds=function(){var Ha=
-Pa.apply(this,arguments),La=this.backgroundImage;if(null!=La&&null!=La.width&&null!=La.height){var Qa=this.view.translate,Na=this.view.scale;Ha=mxRectangle.fromRectangle(Ha);Ha.add(new mxRectangle((Qa.x+La.x)*Na,(Qa.y+La.y)*Na,La.width*Na,La.height*Na))}return Ha};var Sa=ma.getGlobalVariable;ma.getGlobalVariable=function(Ha){return"page"==Ha?pa.getName():"pagenumber"==Ha?qa+1:"pagecount"==Ha?null!=t.pages?t.pages.length:1:Sa.apply(this,arguments)};document.body.appendChild(ma.container);t.updatePageRoot(pa);
-ma.model.setRoot(pa.root)}oa=ua(ma,oa,qa!=fa);ma!=P&&ma.container.parentNode.removeChild(ma.container)}}else oa=ua(P);null==oa?t.handleError({message:mxResources.get("errorUpdatingPreview")}):(oa.mathEnabled&&(fa=oa.wnd.document,wa&&(oa.wnd.IMMEDIATE_PRINT=!0),fa.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),oa.closeDocument(),!oa.mathEnabled&&wa&&PrintDialog.printPreview(oa));null!=ra&&(P.shapeForegroundColor=ya,P.shapeBackgroundColor=ia,P.stylesheet=
-ra,P.refresh())}}var P=t.editor.graph,S=document.createElement("div"),U=document.createElement("h3");U.style.width="100%";U.style.textAlign="center";U.style.marginTop="0px";mxUtils.write(U,C||mxResources.get("print"));S.appendChild(U);var T=1,Y=1;U=document.createElement("div");U.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var aa=document.createElement("input");aa.style.cssText="margin-right:8px;margin-bottom:8px;";aa.setAttribute("value","all");aa.setAttribute("type",
-"radio");aa.setAttribute("name","pages-printdialog");U.appendChild(aa);C=document.createElement("span");mxUtils.write(C,mxResources.get("printAllPages"));U.appendChild(C);mxUtils.br(U);var Z=aa.cloneNode(!0);aa.setAttribute("checked","checked");Z.setAttribute("value","range");U.appendChild(Z);C=document.createElement("span");mxUtils.write(C,mxResources.get("pages")+":");U.appendChild(C);var da=document.createElement("input");da.style.cssText="margin:0 8px 0 8px;";da.setAttribute("value","1");da.setAttribute("type",
-"number");da.setAttribute("min","1");da.style.width="50px";U.appendChild(da);C=document.createElement("span");mxUtils.write(C,mxResources.get("to"));U.appendChild(C);var ja=da.cloneNode(!0);U.appendChild(ja);mxEvent.addListener(da,"focus",function(){Z.checked=!0});mxEvent.addListener(ja,"focus",function(){Z.checked=!0});mxEvent.addListener(da,"change",M);mxEvent.addListener(ja,"change",M);if(null!=t.pages&&(T=t.pages.length,null!=t.currentPage))for(C=0;C<t.pages.length;C++)if(t.currentPage==t.pages[C]){Y=
-C+1;da.value=Y;ja.value=Y;break}da.setAttribute("max",T);ja.setAttribute("max",T);t.isPagesEnabled()?1<T&&(S.appendChild(U),Z.checked=!0):Z.checked=!0;mxUtils.br(U);var ha=document.createElement("input");ha.setAttribute("value","all");ha.setAttribute("type","radio");ha.style.marginRight="8px";P.isSelectionEmpty()&&ha.setAttribute("disabled","disabled");var ba=document.createElement("div");ba.style.marginBottom="10px";1==T?(ha.setAttribute("type","checkbox"),ha.style.marginBottom="12px",ba.appendChild(ha)):
-(ha.setAttribute("name","pages-printdialog"),ha.style.marginBottom="8px",U.appendChild(ha));C=document.createElement("span");mxUtils.write(C,mxResources.get("selectionOnly"));ha.parentNode.appendChild(C);1==T&&mxUtils.br(ha.parentNode);var Aa=document.createElement("input");Aa.style.marginRight="8px";Aa.setAttribute("value","adjust");Aa.setAttribute("type","radio");Aa.setAttribute("name","printZoom");ba.appendChild(Aa);C=document.createElement("span");mxUtils.write(C,mxResources.get("adjustTo"));
-ba.appendChild(C);var Ga=document.createElement("input");Ga.style.cssText="margin:0 8px 0 8px;";Ga.setAttribute("value","100 %");Ga.style.width="50px";ba.appendChild(Ga);mxEvent.addListener(Ga,"focus",function(){Aa.checked=!0});S.appendChild(ba);U=U.cloneNode(!1);var Ca=Aa.cloneNode(!0);Ca.setAttribute("value","fit");Aa.setAttribute("checked","checked");C=document.createElement("div");C.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";C.appendChild(Ca);U.appendChild(C);ba=
-document.createElement("table");ba.style.display="inline-block";var Da=document.createElement("tbody"),na=document.createElement("tr"),Ia=na.cloneNode(!0),Ka=document.createElement("td"),xa=Ka.cloneNode(!0),Ja=Ka.cloneNode(!0),Fa=Ka.cloneNode(!0),Oa=Ka.cloneNode(!0),va=Ka.cloneNode(!0);Ka.style.textAlign="right";Fa.style.textAlign="right";mxUtils.write(Ka,mxResources.get("fitTo"));var za=document.createElement("input");za.style.cssText="margin:0 8px 0 8px;";za.setAttribute("value","1");za.setAttribute("min",
-"1");za.setAttribute("type","number");za.style.width="40px";xa.appendChild(za);C=document.createElement("span");mxUtils.write(C,mxResources.get("fitToSheetsAcross"));Ja.appendChild(C);mxUtils.write(Fa,mxResources.get("fitToBy"));var ta=za.cloneNode(!0);Oa.appendChild(ta);mxEvent.addListener(za,"focus",function(){Ca.checked=!0});mxEvent.addListener(ta,"focus",function(){Ca.checked=!0});C=document.createElement("span");mxUtils.write(C,mxResources.get("fitToSheetsDown"));va.appendChild(C);na.appendChild(Ka);
-na.appendChild(xa);na.appendChild(Ja);Ia.appendChild(Fa);Ia.appendChild(Oa);Ia.appendChild(va);Da.appendChild(na);Da.appendChild(Ia);ba.appendChild(Da);U.appendChild(ba);S.appendChild(U);U=document.createElement("div");C=document.createElement("div");C.style.fontWeight="bold";C.style.marginBottom="12px";mxUtils.write(C,mxResources.get("paperSize"));U.appendChild(C);C=document.createElement("div");C.style.marginBottom="12px";var Ba=PageSetupDialog.addPageFormatPanel(C,"printdialog",t.editor.graph.pageFormat||
-mxConstants.PAGE_FORMAT_A4_PORTRAIT);U.appendChild(C);C=document.createElement("span");mxUtils.write(C,mxResources.get("pageScale"));U.appendChild(C);var ea=document.createElement("input");ea.style.cssText="margin:0 8px 0 8px;";ea.setAttribute("value","100 %");ea.style.width="60px";U.appendChild(ea);S.appendChild(U);C=document.createElement("div");C.style.cssText="text-align:right;margin:48px 0 0 0;";U=mxUtils.button(mxResources.get("cancel"),function(){t.hideDialog()});U.className="geBtn";t.editor.cancelFirst&&
-C.appendChild(U);t.isOffline()||(ba=mxUtils.button(mxResources.get("help"),function(){P.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),ba.className="geBtn",C.appendChild(ba));PrintDialog.previewEnabled&&(ba=mxUtils.button(mxResources.get("preview"),function(){t.hideDialog();Q(!1)}),ba.className="geBtn",C.appendChild(ba));ba=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){t.hideDialog();Q(!0)});ba.className="geBtn gePrimaryBtn";C.appendChild(ba);t.editor.cancelFirst||
-C.appendChild(U);S.appendChild(C);this.container=S};var J=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 t=this.image;null!=t&&null!=t.src&&Graph.isPageLink(t.src)&&(t={originalSrc:t.src});this.page.viewState.backgroundImage=t}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 J.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 W=document.createElement("canvas"),V=new Image;V.onload=function(){try{W.getContext("2d").drawImage(V,0,0);var t=W.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=t&&6<t.length}catch(C){}};V.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(t){}})();
+Wa=P.enableFlowAnimation;P.enableFlowAnimation=!1;null!=P.themes&&"darkTheme"==P.defaultThemeName&&(Va=P.stylesheet,P.stylesheet=P.getDefaultStylesheet(),P.shapeForegroundColor="#000000",P.shapeBackgroundColor="#ffffff",P.refresh());La.open(null,null,Qa,!0);P.enableFlowAnimation=Wa;null!=Va&&(P.shapeForegroundColor=$a,P.shapeBackgroundColor=Za,P.stylesheet=Va,P.refresh())}else{Wa=Ga.background;if(null==Wa||""==Wa||Wa==mxConstants.NONE)Wa="#ffffff";La.backgroundColor=Wa;La.autoOrigin=Za;La.appendGraph(Ga,
+ab,Va,$a,Qa,!0);Qa=Ga.getCustomFonts();if(null!=La.wnd)for(Va=0;Va<Qa.length;Va++)$a=Qa[Va].name,Za=Qa[Va].url,Graph.isCssFontUrl(Za)?La.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Za)+'" charset="UTF-8" type="text/css">'):(La.wnd.document.writeln('<style type="text/css">'),La.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities($a)+'";\nsrc: url("'+mxUtils.htmlEntities(Za)+'");\n}'),La.wnd.document.writeln("</style>"))}Oa&&(Ga.useCssTransforms=Oa,
+Ga.currentTranslate=Ra,Ga.currentScale=Xa,Ga.view.translate=Ma,Ga.view.scale=Ta);return La}var xa=parseInt(ia.value)/100;isNaN(xa)&&(xa=1,ia.value="100 %");xa*=.75;var ra=null,Aa=P.shapeForegroundColor,fa=P.shapeBackgroundColor;null!=P.themes&&"darkTheme"==P.defaultThemeName&&(ra=P.stylesheet,P.stylesheet=P.getDefaultStylesheet(),P.shapeForegroundColor="#000000",P.shapeBackgroundColor="#ffffff",P.refresh());var na=da.value,qa=ea.value,ca=!ba.checked,ha=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(t,
+ba.checked,na,qa,Ca.checked,za.value,va.value,parseInt(Ea.value)/100,parseInt(ia.value)/100,Ka.get());else{ca&&(ca=ka.checked||na==Y&&qa==Y);if(!ca&&null!=t.pages&&t.pages.length){var sa=0;ca=t.pages.length-1;ba.checked||(sa=parseInt(na)-1,ca=parseInt(qa)-1);for(var la=sa;la<=ca;la++){var ma=t.pages[la];na=ma==t.currentPage?P:null;if(null==na){na=t.createTemporaryGraph(P.stylesheet);na.shapeForegroundColor=P.shapeForegroundColor;na.shapeBackgroundColor=P.shapeBackgroundColor;qa=!0;sa=!1;var oa=null,
+ta=null;null==ma.viewState&&null==ma.root&&t.updatePageRoot(ma);null!=ma.viewState&&(qa=ma.viewState.pageVisible,sa=ma.viewState.mathEnabled,oa=ma.viewState.background,ta=ma.viewState.backgroundImage,na.extFonts=ma.viewState.extFonts);null!=ta&&null!=ta.originalSrc&&(ta=t.createImageForPageLink(ta.originalSrc,ma));na.background=oa;na.backgroundImage=null!=ta?new mxImage(ta.src,ta.width,ta.height,ta.x,ta.y):null;na.pageVisible=qa;na.mathEnabled=sa;var Na=na.getGraphBounds;na.getGraphBounds=function(){var Ga=
+Na.apply(this,arguments),La=this.backgroundImage;if(null!=La&&null!=La.width&&null!=La.height){var Qa=this.view.translate,Oa=this.view.scale;Ga=mxRectangle.fromRectangle(Ga);Ga.add(new mxRectangle((Qa.x+La.x)*Oa,(Qa.y+La.y)*Oa,La.width*Oa,La.height*Oa))}return Ga};var Sa=na.getGlobalVariable;na.getGlobalVariable=function(Ga){return"page"==Ga?ma.getName():"pagenumber"==Ga?la+1:"pagecount"==Ga?null!=t.pages?t.pages.length:1:Sa.apply(this,arguments)};document.body.appendChild(na.container);t.updatePageRoot(ma);
+na.model.setRoot(ma.root)}ha=ua(na,ha,la!=ca);na!=P&&na.container.parentNode.removeChild(na.container)}}else ha=ua(P);null==ha?t.handleError({message:mxResources.get("errorUpdatingPreview")}):(ha.mathEnabled&&(ca=ha.wnd.document,ja&&(ha.wnd.IMMEDIATE_PRINT=!0),ca.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),ha.closeDocument(),!ha.mathEnabled&&ja&&PrintDialog.printPreview(ha));null!=ra&&(P.shapeForegroundColor=Aa,P.shapeBackgroundColor=fa,P.stylesheet=
+ra,P.refresh())}}var P=t.editor.graph,R=document.createElement("div"),T=document.createElement("h3");T.style.width="100%";T.style.textAlign="center";T.style.marginTop="0px";mxUtils.write(T,C||mxResources.get("print"));R.appendChild(T);var V=1,Y=1;T=document.createElement("div");T.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var ba=document.createElement("input");ba.style.cssText="margin-right:8px;margin-bottom:8px;";ba.setAttribute("value","all");ba.setAttribute("type",
+"radio");ba.setAttribute("name","pages-printdialog");T.appendChild(ba);C=document.createElement("span");mxUtils.write(C,mxResources.get("printAllPages"));T.appendChild(C);mxUtils.br(T);var Z=ba.cloneNode(!0);ba.setAttribute("checked","checked");Z.setAttribute("value","range");T.appendChild(Z);C=document.createElement("span");mxUtils.write(C,mxResources.get("pages")+":");T.appendChild(C);var da=document.createElement("input");da.style.cssText="margin:0 8px 0 8px;";da.setAttribute("value","1");da.setAttribute("type",
+"number");da.setAttribute("min","1");da.style.width="50px";T.appendChild(da);C=document.createElement("span");mxUtils.write(C,mxResources.get("to"));T.appendChild(C);var ea=da.cloneNode(!0);T.appendChild(ea);mxEvent.addListener(da,"focus",function(){Z.checked=!0});mxEvent.addListener(ea,"focus",function(){Z.checked=!0});mxEvent.addListener(da,"change",M);mxEvent.addListener(ea,"change",M);if(null!=t.pages&&(V=t.pages.length,null!=t.currentPage))for(C=0;C<t.pages.length;C++)if(t.currentPage==t.pages[C]){Y=
+C+1;da.value=Y;ea.value=Y;break}da.setAttribute("max",V);ea.setAttribute("max",V);t.isPagesEnabled()?1<V&&(R.appendChild(T),Z.checked=!0):Z.checked=!0;mxUtils.br(T);var ka=document.createElement("input");ka.setAttribute("value","all");ka.setAttribute("type","radio");ka.style.marginRight="8px";P.isSelectionEmpty()&&ka.setAttribute("disabled","disabled");var aa=document.createElement("div");aa.style.marginBottom="10px";1==V?(ka.setAttribute("type","checkbox"),ka.style.marginBottom="12px",aa.appendChild(ka)):
+(ka.setAttribute("name","pages-printdialog"),ka.style.marginBottom="8px",T.appendChild(ka));C=document.createElement("span");mxUtils.write(C,mxResources.get("selectionOnly"));ka.parentNode.appendChild(C);1==V&&mxUtils.br(ka.parentNode);var Ba=document.createElement("input");Ba.style.marginRight="8px";Ba.setAttribute("value","adjust");Ba.setAttribute("type","radio");Ba.setAttribute("name","printZoom");aa.appendChild(Ba);C=document.createElement("span");mxUtils.write(C,mxResources.get("adjustTo"));
+aa.appendChild(C);var Ea=document.createElement("input");Ea.style.cssText="margin:0 8px 0 8px;";Ea.setAttribute("value","100 %");Ea.style.width="50px";aa.appendChild(Ea);mxEvent.addListener(Ea,"focus",function(){Ba.checked=!0});R.appendChild(aa);T=T.cloneNode(!1);var Ca=Ba.cloneNode(!0);Ca.setAttribute("value","fit");Ba.setAttribute("checked","checked");C=document.createElement("div");C.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";C.appendChild(Ca);T.appendChild(C);aa=
+document.createElement("table");aa.style.display="inline-block";var Da=document.createElement("tbody"),pa=document.createElement("tr"),Ha=pa.cloneNode(!0),Ja=document.createElement("td"),ya=Ja.cloneNode(!0),Ia=Ja.cloneNode(!0),Fa=Ja.cloneNode(!0),Pa=Ja.cloneNode(!0),wa=Ja.cloneNode(!0);Ja.style.textAlign="right";Fa.style.textAlign="right";mxUtils.write(Ja,mxResources.get("fitTo"));var za=document.createElement("input");za.style.cssText="margin:0 8px 0 8px;";za.setAttribute("value","1");za.setAttribute("min",
+"1");za.setAttribute("type","number");za.style.width="40px";ya.appendChild(za);C=document.createElement("span");mxUtils.write(C,mxResources.get("fitToSheetsAcross"));Ia.appendChild(C);mxUtils.write(Fa,mxResources.get("fitToBy"));var va=za.cloneNode(!0);Pa.appendChild(va);mxEvent.addListener(za,"focus",function(){Ca.checked=!0});mxEvent.addListener(va,"focus",function(){Ca.checked=!0});C=document.createElement("span");mxUtils.write(C,mxResources.get("fitToSheetsDown"));wa.appendChild(C);pa.appendChild(Ja);
+pa.appendChild(ya);pa.appendChild(Ia);Ha.appendChild(Fa);Ha.appendChild(Pa);Ha.appendChild(wa);Da.appendChild(pa);Da.appendChild(Ha);aa.appendChild(Da);T.appendChild(aa);R.appendChild(T);T=document.createElement("div");C=document.createElement("div");C.style.fontWeight="bold";C.style.marginBottom="12px";mxUtils.write(C,mxResources.get("paperSize"));T.appendChild(C);C=document.createElement("div");C.style.marginBottom="12px";var Ka=PageSetupDialog.addPageFormatPanel(C,"printdialog",t.editor.graph.pageFormat||
+mxConstants.PAGE_FORMAT_A4_PORTRAIT);T.appendChild(C);C=document.createElement("span");mxUtils.write(C,mxResources.get("pageScale"));T.appendChild(C);var ia=document.createElement("input");ia.style.cssText="margin:0 8px 0 8px;";ia.setAttribute("value","100 %");ia.style.width="60px";T.appendChild(ia);R.appendChild(T);C=document.createElement("div");C.style.cssText="text-align:right;margin:48px 0 0 0;";T=mxUtils.button(mxResources.get("cancel"),function(){t.hideDialog()});T.className="geBtn";t.editor.cancelFirst&&
+C.appendChild(T);t.isOffline()||(aa=mxUtils.button(mxResources.get("help"),function(){P.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),aa.className="geBtn",C.appendChild(aa));PrintDialog.previewEnabled&&(aa=mxUtils.button(mxResources.get("preview"),function(){t.hideDialog();S(!1)}),aa.className="geBtn",C.appendChild(aa));aa=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){t.hideDialog();S(!0)});aa.className="geBtn gePrimaryBtn";C.appendChild(aa);t.editor.cancelFirst||
+C.appendChild(T);R.appendChild(C);this.container=R};var L=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 t=this.image;null!=t&&null!=t.src&&Graph.isPageLink(t.src)&&(t={originalSrc:t.src});this.page.viewState.backgroundImage=t}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 L.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 U=document.createElement("canvas"),W=new Image;W.onload=function(){try{U.getContext("2d").drawImage(W,0,0);var t=U.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=t&&6<t.length}catch(C){}};W.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(t){}})();
(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(e,f,c){c.ui=e.ui;return f};b.afterDecode=function(e,f,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(e,f,c){c.ui=e.ui;return f};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.0.2";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(e,f,c){c.ui=e.ui;return f};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.0.3";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=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&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;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(d,g,k,l,p,q,x){q=null!=q?q:0<=d.indexOf("NetworkError")||0<=d.indexOf("SecurityError")||0<=d.indexOf("NS_ERROR_FAILURE")||0<=d.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
@@ -11726,7 +11722,7 @@ d;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prot
this.editor.graph.defaultMathEnabled=d;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(d){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(d){return this.isOfflineApp()||!navigator.onLine||!d&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};
EditorUi.prototype.createSpinner=function(d,g,k){var l=null==d||null==g;k=null!=k?k:24;var p=new Spinner({lines:12,length:k,width:Math.round(k/3),radius:Math.round(k/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),q=p.spin;p.spin=function(y,z){var A=!1;this.active||(q.call(this,y),this.active=!0,null!=z&&(l&&(g=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/2-2),A=document.createElement("div"),
A.style.position="absolute",A.style.whiteSpace="nowrap",A.style.background="#4B4243",A.style.color="white",A.style.fontFamily=Editor.defaultHtmlFont,A.style.fontSize="9pt",A.style.padding="6px",A.style.paddingLeft="10px",A.style.paddingRight="10px",A.style.zIndex=2E9,A.style.left=Math.max(0,d)+"px",A.style.top=Math.max(0,g+70)+"px",mxUtils.setPrefixedStyle(A.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(A.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(A.style,
-"boxShadow","2px 2px 3px 0px #ddd"),"..."!=z.substring(z.length-3,z.length)&&"!"!=z.charAt(z.length-1)&&(z+="..."),A.innerHTML=z,y.appendChild(A),p.status=A),this.pause=mxUtils.bind(this,function(){var K=function(){};this.active&&(K=mxUtils.bind(this,function(){this.spin(y,z)}));this.stop();return K}),A=!0);return A};var x=p.stop;p.stop=function(){x.call(this);this.active=!1;null!=p.status&&null!=p.status.parentNode&&p.status.parentNode.removeChild(p.status);p.status=null};p.pause=function(){return function(){}};
+"boxShadow","2px 2px 3px 0px #ddd"),"..."!=z.substring(z.length-3,z.length)&&"!"!=z.charAt(z.length-1)&&(z+="..."),A.innerHTML=z,y.appendChild(A),p.status=A),this.pause=mxUtils.bind(this,function(){var J=function(){};this.active&&(J=mxUtils.bind(this,function(){this.spin(y,z)}));this.stop();return J}),A=!0);return A};var x=p.stop;p.stop=function(){x.call(this);this.active=!1;null!=p.status&&null!=p.status.parentNode&&p.status.parentNode.removeChild(p.status);p.status=null};p.pause=function(){return function(){}};
return p};EditorUi.prototype.isCompatibleString=function(d){try{var g=mxUtils.parseXml(d),k=this.editor.extractGraphModel(g.documentElement,!0);return null!=k&&0==k.getElementsByTagName("parsererror").length}catch(l){}return!1};EditorUi.prototype.isVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&
3==d.charCodeAt(2)&&4==d.charCodeAt(3)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&3==d.charCodeAt(2)&&6==d.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||60==d.charCodeAt(0)&&63==d.charCodeAt(1)&&120==d.charCodeAt(2)&&109==d.charCodeAt(3)&&108==d.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;
EditorUi.prototype.createKeyHandler=function(d){var g=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var k=g.getFunction,l=this.editor.graph,p=this;g.getFunction=function(q){if(l.isSelectionEmpty()&&null!=p.pages&&0<p.pages.length){var x=p.getSelectedPageIndex();if(mxEvent.isShiftDown(q)){if(37==q.keyCode)return function(){0<x&&p.movePage(x,x-1)};if(38==q.keyCode)return function(){0<x&&p.movePage(x,0)};if(39==q.keyCode)return function(){x<p.pages.length-1&&p.movePage(x,
@@ -11735,10 +11731,10 @@ var e=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGra
q?mxUtils.getXml(q):""}}catch(x){}return g};EditorUi.prototype.validateFileData=function(d){if(null!=d&&0<d.length){var g=d.indexOf('<meta charset="utf-8">');0<=g&&(d=d.slice(0,g)+'<meta charset="utf-8"/>'+d.slice(g+23-1,d.length));d=Graph.zapGremlins(d)}return d};EditorUi.prototype.replaceFileData=function(d){d=this.validateFileData(d);d=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:null;var g=null!=d?this.editor.extractGraphModel(d,!0):null;null!=g&&(d=g);if(null!=d){g=this.editor.graph;
g.model.beginUpdate();try{var k=null!=this.pages?this.pages.slice():null,l=d.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<l.length||1==l.length&&l[0].hasAttribute("name")){this.fileNode=d;this.pages=null!=this.pages?this.pages:[];for(var p=l.length-1;0<=p;p--){var q=this.updatePageRoot(new DiagramPage(l[p]));null==q.getName()&&q.setName(mxResources.get("pageWithNumber",[p+1]));g.model.execute(new ChangePage(this,q,0==p?q:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=
d.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(d.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),g.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(d),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=k)for(p=0;p<k.length;p++)g.model.execute(new ChangePage(this,k[p],null))}finally{g.model.endUpdate()}}};EditorUi.prototype.createFileData=
-function(d,g,k,l,p,q,x,y,z,A,K){g=null!=g?g:this.editor.graph;p=null!=p?p:!1;z=null!=z?z:!0;var O=null;if(null==k||k.getMode()==App.MODE_DEVICE||k.getMode()==App.MODE_BROWSER)var L="_blank";else O=L=l;if(null==d)return"";var u=d;if("mxfile"!=u.nodeName.toLowerCase()){if(K){var E=d.ownerDocument.createElement("diagram");E.setAttribute("id",Editor.guid());E.appendChild(d)}else{E=Graph.zapGremlins(mxUtils.getXml(d));u=Graph.compress(E);if(Graph.decompress(u)!=E)return E;E=d.ownerDocument.createElement("diagram");
+function(d,g,k,l,p,q,x,y,z,A,J){g=null!=g?g:this.editor.graph;p=null!=p?p:!1;z=null!=z?z:!0;var O=null;if(null==k||k.getMode()==App.MODE_DEVICE||k.getMode()==App.MODE_BROWSER)var K="_blank";else O=K=l;if(null==d)return"";var u=d;if("mxfile"!=u.nodeName.toLowerCase()){if(J){var E=d.ownerDocument.createElement("diagram");E.setAttribute("id",Editor.guid());E.appendChild(d)}else{E=Graph.zapGremlins(mxUtils.getXml(d));u=Graph.compress(E);if(Graph.decompress(u)!=E)return E;E=d.ownerDocument.createElement("diagram");
E.setAttribute("id",Editor.guid());mxUtils.setTextContent(E,u)}u=d.ownerDocument.createElement("mxfile");u.appendChild(E)}A?(u=u.cloneNode(!0),u.removeAttribute("modified"),u.removeAttribute("host"),u.removeAttribute("agent"),u.removeAttribute("etag"),u.removeAttribute("userAgent"),u.removeAttribute("version"),u.removeAttribute("editor"),u.removeAttribute("type")):(u.removeAttribute("userAgent"),u.removeAttribute("version"),u.removeAttribute("editor"),u.removeAttribute("pages"),u.removeAttribute("type"),
mxClient.IS_CHROMEAPP?u.setAttribute("host","Chrome"):EditorUi.isElectronApp?u.setAttribute("host","Electron"):u.setAttribute("host",window.location.hostname),u.setAttribute("modified",(new Date).toISOString()),u.setAttribute("agent",navigator.appVersion),u.setAttribute("version",EditorUi.VERSION),u.setAttribute("etag",Editor.guid()),d=null!=k?k.getMode():this.mode,null!=d&&u.setAttribute("type",d),1<u.getElementsByTagName("diagram").length&&null!=this.pages&&u.setAttribute("pages",this.pages.length));
-K=K?mxUtils.getPrettyXml(u):mxUtils.getXml(u);if(!q&&!p&&(x||null!=k&&/(\.html)$/i.test(k.getTitle())))K=this.getHtml2(mxUtils.getXml(u),g,null!=k?k.getTitle():null,L,O);else if(q||!p&&null!=k&&/(\.svg)$/i.test(k.getTitle()))null==k||k.getMode()!=App.MODE_DEVICE&&k.getMode()!=App.MODE_BROWSER||(l=null),K=this.getEmbeddedSvg(K,g,l,null,y,z,O);return K};EditorUi.prototype.getXmlFileData=function(d,g,k,l){d=null!=d?d:!0;g=null!=g?g:!1;k=null!=k?k:!Editor.compressXml;var p=this.editor.getGraphXml(d,l);
+J=J?mxUtils.getPrettyXml(u):mxUtils.getXml(u);if(!q&&!p&&(x||null!=k&&/(\.html)$/i.test(k.getTitle())))J=this.getHtml2(mxUtils.getXml(u),g,null!=k?k.getTitle():null,K,O);else if(q||!p&&null!=k&&/(\.svg)$/i.test(k.getTitle()))null==k||k.getMode()!=App.MODE_DEVICE&&k.getMode()!=App.MODE_BROWSER||(l=null),J=this.getEmbeddedSvg(J,g,l,null,y,z,O);return J};EditorUi.prototype.getXmlFileData=function(d,g,k,l){d=null!=d?d:!0;g=null!=g?g:!1;k=null!=k?k:!Editor.compressXml;var p=this.editor.getGraphXml(d,l);
if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(z){var A=z.getElementsByTagName("mxGraphModel");A=0<A.length?A[0]:null;null==A&&k?(A=mxUtils.trim(mxUtils.getTextContent(z)),z=z.cloneNode(!1),0<A.length&&(A=Graph.decompress(A),null!=A&&0<A.length&&z.appendChild(mxUtils.parseXml(A).documentElement))):null==A||k?z=z.cloneNode(!0):(z=z.cloneNode(!1),mxUtils.setTextContent(z,Graph.compressNode(A)));p.appendChild(z)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,
Graph.compressNode(p)),p=this.fileNode.cloneNode(!1),g)d(this.currentPage.node);else for(g=0;g<this.pages.length;g++){var q=this.pages[g],x=q.node;if(q!=this.currentPage)if(q.needsUpdate){var y=new mxCodec(mxUtils.createXmlDocument());y=y.encode(new mxGraphModel(q.root));this.editor.graph.saveViewState(q.viewState,y,null,l);EditorUi.removeChildNodes(x);mxUtils.setTextContent(x,Graph.compressNode(y));delete q.needsUpdate}else l&&(this.updatePageRoot(q),null!=q.viewState.backgroundImage&&(null!=q.viewState.backgroundImage.originalSrc?
q.viewState.backgroundImage=this.createImageForPageLink(q.viewState.backgroundImage.originalSrc,q):Graph.isPageLink(q.viewState.backgroundImage.src)&&(q.viewState.backgroundImage=this.createImageForPageLink(q.viewState.backgroundImage.src,q))),null!=q.viewState.backgroundImage&&null!=q.viewState.backgroundImage.originalSrc&&(y=new mxCodec(mxUtils.createXmlDocument()),y=y.encode(new mxGraphModel(q.root)),this.editor.graph.saveViewState(q.viewState,y,null,l),x=x.cloneNode(!1),mxUtils.setTextContent(x,
@@ -11748,8 +11744,8 @@ function(d){if(null!=d[EditorUi.DIFF_INSERT])for(var g=0;g<d[EditorUi.DIFF_INSER
delete d[EditorUi.DIFF_UPDATE][l]}mxUtils.isEmptyObject(d[EditorUi.DIFF_UPDATE])&&delete d[EditorUi.DIFF_UPDATE]}return d};EditorUi.prototype.anonymizeAttributes=function(d,g){if(null!=d.attributes)for(var k=0;k<d.attributes.length;k++)"as"!=d.attributes[k].name&&d.setAttribute(d.attributes[k].name,this.anonymizeString(d.attributes[k].value,g));if(null!=d.childNodes)for(k=0;k<d.childNodes.length;k++)this.anonymizeAttributes(d.childNodes[k],g)};EditorUi.prototype.anonymizeNode=function(d,g){g=d.getElementsByTagName("mxCell");
for(var k=0;k<g.length;k++)null!=g[k].getAttribute("value")&&g[k].setAttribute("value","["+g[k].getAttribute("value").length+"]"),null!=g[k].getAttribute("xmlValue")&&g[k].setAttribute("xmlValue","["+g[k].getAttribute("xmlValue").length+"]"),null!=g[k].getAttribute("style")&&g[k].setAttribute("style","["+g[k].getAttribute("style").length+"]"),null!=g[k].parentNode&&"root"!=g[k].parentNode.nodeName&&null!=g[k].parentNode.parentNode&&(g[k].setAttribute("id",g[k].parentNode.getAttribute("id")),g[k].parentNode.parentNode.replaceChild(g[k],
g[k].parentNode));return d};EditorUi.prototype.synchronizeCurrentFile=function(d){var g=this.getCurrentFile();null!=g&&(g.savingFile?this.handleError({message:mxResources.get("busy")}):!d&&g.invalidChecksum?g.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(g.clearAutosave(),this.editor.setStatus(""),d?g.reloadFile(mxUtils.bind(this,function(){g.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(k){g.handleFileError(k,!0)})):g.synchronizeFile(mxUtils.bind(this,
-function(){g.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(k){g.handleFileError(k,!0)}))))};EditorUi.prototype.getFileData=function(d,g,k,l,p,q,x,y,z,A,K){p=null!=p?p:!0;q=null!=q?q:!1;var O=this.editor.graph;if(g||!d&&null!=z&&/(\.svg)$/i.test(z.getTitle())){var L=null!=O.themes&&"darkTheme"==O.defaultThemeName;A=!1;if(L||null!=this.pages&&this.currentPage!=this.pages[0]){var u=O.getGlobalVariable;O=this.createTemporaryGraph(L?O.getDefaultStylesheet():O.getStylesheet());
-O.setBackgroundImage=this.editor.graph.setBackgroundImage;O.background=this.editor.graph.background;var E=this.pages[0];this.currentPage==E?O.setBackgroundImage(this.editor.graph.backgroundImage):null!=E.viewState&&null!=E.viewState&&O.setBackgroundImage(E.viewState.backgroundImage);O.getGlobalVariable=function(B){return"page"==B?E.getName():"pagenumber"==B?1:u.apply(this,arguments)};document.body.appendChild(O.container);O.model.setRoot(E.root)}}x=null!=x?x:this.getXmlFileData(p,q,A,K);z=null!=z?
+function(){g.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(k){g.handleFileError(k,!0)}))))};EditorUi.prototype.getFileData=function(d,g,k,l,p,q,x,y,z,A,J){p=null!=p?p:!0;q=null!=q?q:!1;var O=this.editor.graph;if(g||!d&&null!=z&&/(\.svg)$/i.test(z.getTitle())){var K=null!=O.themes&&"darkTheme"==O.defaultThemeName;A=!1;if(K||null!=this.pages&&this.currentPage!=this.pages[0]){var u=O.getGlobalVariable;O=this.createTemporaryGraph(K?O.getDefaultStylesheet():O.getStylesheet());
+O.setBackgroundImage=this.editor.graph.setBackgroundImage;O.background=this.editor.graph.background;var E=this.pages[0];this.currentPage==E?O.setBackgroundImage(this.editor.graph.backgroundImage):null!=E.viewState&&null!=E.viewState&&O.setBackgroundImage(E.viewState.backgroundImage);O.getGlobalVariable=function(B){return"page"==B?E.getName():"pagenumber"==B?1:u.apply(this,arguments)};document.body.appendChild(O.container);O.model.setRoot(E.root)}}x=null!=x?x:this.getXmlFileData(p,q,A,J);z=null!=z?
z:this.getCurrentFile();d=this.createFileData(x,O,z,window.location.href,d,g,k,l,p,y,A);O!=this.editor.graph&&O.container.parentNode.removeChild(O.container);return d};EditorUi.prototype.getHtml=function(d,g,k,l,p,q){q=null!=q?q:!0;var x=null,y=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=g){x=q?g.getGraphBounds():g.getBoundingBox(g.getSelectionCells());var z=g.view.scale;q=Math.floor(x.x/z-g.view.translate.x);z=Math.floor(x.y/z-g.view.translate.y);x=g.background;null==p&&(g=this.getBasenames().join(";"),
0<g.length&&(y=EditorUi.drawHost+"/embed.js?s="+g));d.setAttribute("x0",q);d.setAttribute("y0",z)}null!=d&&(d.setAttribute("pan","1"),d.setAttribute("zoom","1"),d.setAttribute("resize","0"),d.setAttribute("fit","0"),d.setAttribute("border","20"),d.setAttribute("links","1"),null!=l&&d.setAttribute("edit",l));null!=p&&(p=p.replace(/&/g,"&amp;"));d=null!=d?Graph.zapGremlins(mxUtils.getXml(d)):"";l=Graph.compress(d);Graph.decompress(l)!=d&&(l=encodeURIComponent(d));return(null==p?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':
"")+"<!DOCTYPE html>\n<html"+(null!=p?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==p?null!=k?"<title>"+mxUtils.htmlEntities(k)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=p?'<meta http-equiv="refresh" content="0;URL=\''+p+"'\"/>\n":"")+"</head>\n<body"+(null==p&&null!=x&&x!=mxConstants.NONE?' style="background-color:'+x+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+l+"</div>\n</div>\n"+
@@ -11760,19 +11756,19 @@ function(d){d=this.validateFileData(d);this.pages=this.fileNode=this.currentPage
"0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name"))){k=null;this.fileNode=g;this.pages=[];for(var l=0;l<d.length;l++)null==d[l].getAttribute("id")&&d[l].setAttribute("id",l),g=new DiagramPage(d[l]),null==g.getName()&&g.setName(mxResources.get("pageWithNumber",[l+1])),this.pages.push(g),null!=urlParams["page-id"]&&g.getId()==urlParams["page-id"]&&(k=g);this.currentPage=null!=k?k:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];g=this.currentPage.node}"0"!=
urlParams.pages&&null==this.fileNode&&null!=g&&(this.fileNode=g.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(g.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(g);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var p=urlParams["layer-ids"].split(" ");g={};for(l=0;l<p.length;l++)g[p[l]]=!0;var q=this.editor.graph.getModel(),
x=q.getChildren(q.root);for(l=0;l<x.length;l++){var y=x[l];q.setVisible(y,g[y.id]||!1)}}catch(z){}};EditorUi.prototype.getBaseFilename=function(d){var g=this.getCurrentFile();g=null!=g&&null!=g.getTitle()?g.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(g)||/(\.html)$/i.test(g)||/(\.svg)$/i.test(g)||/(\.png)$/i.test(g))g=g.substring(0,g.lastIndexOf("."));/(\.drawio)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf(".")));!d&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&
-0<this.currentPage.getName().length&&(g=g+"-"+this.currentPage.getName());return g};EditorUi.prototype.downloadFile=function(d,g,k,l,p,q,x,y,z,A,K,O){try{l=null!=l?l:this.editor.graph.isSelectionEmpty();var L=this.getBaseFilename("remoteSvg"==d?!1:!p),u=L+("xml"==d||"pdf"==d&&K?".drawio":"")+"."+d;if("xml"==d){var E=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,l,p,null,null,null,g);this.saveData(u,d,E,"text/xml")}else if("html"==d)E=this.getHtml2(this.getFileData(!0),this.editor.graph,
-L),this.saveData(u,d,E,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==d)u=L+".png";else if("jpeg"==d)u=L+".jpg";else if("remoteSvg"==d){u=L+".svg";d="svg";var B=parseInt(z);"string"===typeof y&&0<y.indexOf("%")&&(y=parseInt(y)/100);if(0<B){var D=this.editor.graph,G=D.getGraphBounds();var N=Math.ceil(G.width*y/D.view.scale+2*B);var I=Math.ceil(G.height*y/D.view.scale+2*B)}}this.saveRequest(u,d,mxUtils.bind(this,function(J,W){try{var V=
-this.editor.graph.pageVisible;0==q&&(this.editor.graph.pageVisible=q);var t=this.createDownloadRequest(J,d,l,W,x,p,y,z,A,K,O,N,I);this.editor.graph.pageVisible=V;return t}catch(C){this.handleError(C)}}))}else{var F=null,H=mxUtils.bind(this,function(J){J.length<=MAX_REQUEST_SIZE?this.saveData(u,"svg",J,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(F)}))});if("svg"==d){var R=this.editor.graph.background;
-if(x||R==mxConstants.NONE)R=null;var X=this.editor.graph.getSvg(R,null,null,null,null,l);k&&this.editor.graph.addSvgShadow(X);this.editor.convertImages(X,mxUtils.bind(this,mxUtils.bind(this,function(J){this.spinner.stop();H(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(J))})))}else u=L+".svg",F=this.getFileData(!1,!0,null,mxUtils.bind(this,function(J){this.spinner.stop();H(J)}),l)}}catch(J){this.handleError(J)}};EditorUi.prototype.createDownloadRequest=function(d,g,k,l,p,q,x,y,z,
-A,K,O,L){var u=this.editor.graph,E=u.getGraphBounds();k=this.getFileData(!0,null,null,null,k,0==q?!1:"xmlpng"!=g,null,null,null,!1,"pdf"==g);var B="",D="";if(E.width*E.height>MAX_AREA||k.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};A=A?"1":"0";"pdf"==g&&(null!=K?D="&from="+K.from+"&to="+K.to:0==q&&(D="&allPages=1"));"xmlpng"==g&&(A="1",g="png");if(("xmlpng"==g||"svg"==g)&&null!=this.pages&&null!=this.currentPage)for(q=0;q<this.pages.length;q++)if(this.pages[q]==this.currentPage){B=
+0<this.currentPage.getName().length&&(g=g+"-"+this.currentPage.getName());return g};EditorUi.prototype.downloadFile=function(d,g,k,l,p,q,x,y,z,A,J,O){try{l=null!=l?l:this.editor.graph.isSelectionEmpty();var K=this.getBaseFilename("remoteSvg"==d?!1:!p),u=K+("xml"==d||"pdf"==d&&J?".drawio":"")+"."+d;if("xml"==d){var E=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,l,p,null,null,null,g);this.saveData(u,d,E,"text/xml")}else if("html"==d)E=this.getHtml2(this.getFileData(!0),this.editor.graph,
+K),this.saveData(u,d,E,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==d)u=K+".png";else if("jpeg"==d)u=K+".jpg";else if("remoteSvg"==d){u=K+".svg";d="svg";var B=parseInt(z);"string"===typeof y&&0<y.indexOf("%")&&(y=parseInt(y)/100);if(0<B){var D=this.editor.graph,G=D.getGraphBounds();var H=Math.ceil(G.width*y/D.view.scale+2*B);var N=Math.ceil(G.height*y/D.view.scale+2*B)}}this.saveRequest(u,d,mxUtils.bind(this,function(L,U){try{var W=
+this.editor.graph.pageVisible;0==q&&(this.editor.graph.pageVisible=q);var t=this.createDownloadRequest(L,d,l,U,x,p,y,z,A,J,O,H,N);this.editor.graph.pageVisible=W;return t}catch(C){this.handleError(C)}}))}else{var F=null,I=mxUtils.bind(this,function(L){L.length<=MAX_REQUEST_SIZE?this.saveData(u,"svg",L,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(F)}))});if("svg"==d){var Q=this.editor.graph.background;
+if(x||Q==mxConstants.NONE)Q=null;var X=this.editor.graph.getSvg(Q,null,null,null,null,l);k&&this.editor.graph.addSvgShadow(X);this.editor.convertImages(X,mxUtils.bind(this,mxUtils.bind(this,function(L){this.spinner.stop();I(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(L))})))}else u=K+".svg",F=this.getFileData(!1,!0,null,mxUtils.bind(this,function(L){this.spinner.stop();I(L)}),l)}}catch(L){this.handleError(L)}};EditorUi.prototype.createDownloadRequest=function(d,g,k,l,p,q,x,y,z,
+A,J,O,K){var u=this.editor.graph,E=u.getGraphBounds();k=this.getFileData(!0,null,null,null,k,0==q?!1:"xmlpng"!=g,null,null,null,!1,"pdf"==g);var B="",D="";if(E.width*E.height>MAX_AREA||k.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};A=A?"1":"0";"pdf"==g&&(null!=J?D="&from="+J.from+"&to="+J.to:0==q&&(D="&allPages=1"));"xmlpng"==g&&(A="1",g="png");if(("xmlpng"==g||"svg"==g)&&null!=this.pages&&null!=this.currentPage)for(q=0;q<this.pages.length;q++)if(this.pages[q]==this.currentPage){B=
"&from="+q;break}q=u.background;"png"!=g&&"pdf"!=g&&"svg"!=g||!p?p||null!=q&&q!=mxConstants.NONE||(q="#ffffff"):q=mxConstants.NONE;p={globalVars:u.getExportVariables()};z&&(p.grid={size:u.gridSize,steps:u.view.gridSteps,color:u.view.gridColor});Graph.translateDiagram&&(p.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+g+B+D+"&bg="+(null!=q?q:mxConstants.NONE)+"&base64="+l+"&embedXml="+A+"&xml="+encodeURIComponent(k)+(null!=d?"&filename="+encodeURIComponent(d):"")+
-"&extras="+encodeURIComponent(JSON.stringify(p))+(null!=x?"&scale="+x:"")+(null!=y?"&border="+y:"")+(O&&isFinite(O)?"&w="+O:"")+(L&&isFinite(L)?"&h="+L:""))};EditorUi.prototype.setMode=function(d,g){this.mode=d};EditorUi.prototype.loadDescriptor=function(d,g,k){var l=window.location.hash,p=mxUtils.bind(this,function(q){var x=null!=d.data?d.data:"";null!=q&&0<q.length&&(0<x.length&&(x+="\n"),x+=q);q=new LocalFile(this,"csv"!=d.format&&0<x.length?x:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):
-this.defaultFilename,!0);q.getHash=function(){return l};this.fileLoaded(q);"csv"==d.format&&this.importCsv(x,mxUtils.bind(this,function(O){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=d.update){var y=null!=d.interval?parseInt(d.interval):6E4,z=null,A=mxUtils.bind(this,function(){var O=this.currentPage;mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(L){O===this.currentPage&&(200<=
-L.getStatus()&&300>=L.getStatus()?(this.updateDiagram(L.getText()),K()):this.handleError({message:mxResources.get("error")+" "+L.getStatus()}))}),mxUtils.bind(this,function(L){this.handleError(L)}))}),K=mxUtils.bind(this,function(){window.clearTimeout(z);z=window.setTimeout(A,y)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){K();A()}));K();A()}null!=g&&g()});null!=d.url&&0<d.url.length?this.editor.loadUrl(d.url,mxUtils.bind(this,function(q){p(q)}),mxUtils.bind(this,function(q){null!=
-k&&k(q)})):p("")};EditorUi.prototype.updateDiagram=function(d){function g(I){var F=new mxCellOverlay(I.image||p.warningImage,I.tooltip,I.align,I.valign,I.offset);F.addListener(mxEvent.CLICK,function(H,R){l.alert(I.tooltip)});return F}var k=null,l=this;if(null!=d&&0<d.length&&(k=mxUtils.parseXml(d),d=null!=k?k.documentElement:null,null!=d&&"updates"==d.nodeName)){var p=this.editor.graph,q=p.getModel();q.beginUpdate();var x=null;try{for(d=d.firstChild;null!=d;){if("update"==d.nodeName){var y=q.getCell(d.getAttribute("id"));
-if(null!=y){try{var z=d.getAttribute("value");if(null!=z){var A=mxUtils.parseXml(z).documentElement;if(null!=A)if("1"==A.getAttribute("replace-value"))q.setValue(y,A);else for(var K=A.attributes,O=0;O<K.length;O++)p.setAttributeForCell(y,K[O].nodeName,0<K[O].nodeValue.length?K[O].nodeValue:null)}}catch(I){null!=window.console&&console.log("Error in value for "+y.id+": "+I)}try{var L=d.getAttribute("style");null!=L&&p.model.setStyle(y,L)}catch(I){null!=window.console&&console.log("Error in style for "+
-y.id+": "+I)}try{var u=d.getAttribute("icon");if(null!=u){var E=0<u.length?JSON.parse(u):null;null!=E&&E.append||p.removeCellOverlays(y);null!=E&&p.addCellOverlay(y,g(E))}}catch(I){null!=window.console&&console.log("Error in icon for "+y.id+": "+I)}try{var B=d.getAttribute("geometry");if(null!=B){B=JSON.parse(B);var D=p.getCellGeometry(y);if(null!=D){D=D.clone();for(key in B){var G=parseFloat(B[key]);"dx"==key?D.x+=G:"dy"==key?D.y+=G:"dw"==key?D.width+=G:"dh"==key?D.height+=G:D[key]=parseFloat(B[key])}p.model.setGeometry(y,
-D)}}}catch(I){null!=window.console&&console.log("Error in icon for "+y.id+": "+I)}}}else if("model"==d.nodeName){for(var N=d.firstChild;null!=N&&N.nodeType!=mxConstants.NODETYPE_ELEMENT;)N=N.nextSibling;null!=N&&(new mxCodec(d.firstChild)).decode(N,q)}else if("view"==d.nodeName){if(d.hasAttribute("scale")&&(p.view.scale=parseFloat(d.getAttribute("scale"))),d.hasAttribute("dx")||d.hasAttribute("dy"))p.view.translate=new mxPoint(parseFloat(d.getAttribute("dx")||0),parseFloat(d.getAttribute("dy")||0))}else"fit"==
+"&extras="+encodeURIComponent(JSON.stringify(p))+(null!=x?"&scale="+x:"")+(null!=y?"&border="+y:"")+(O&&isFinite(O)?"&w="+O:"")+(K&&isFinite(K)?"&h="+K:""))};EditorUi.prototype.setMode=function(d,g){this.mode=d};EditorUi.prototype.loadDescriptor=function(d,g,k){var l=window.location.hash,p=mxUtils.bind(this,function(q){var x=null!=d.data?d.data:"";null!=q&&0<q.length&&(0<x.length&&(x+="\n"),x+=q);q=new LocalFile(this,"csv"!=d.format&&0<x.length?x:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):
+this.defaultFilename,!0);q.getHash=function(){return l};this.fileLoaded(q);"csv"==d.format&&this.importCsv(x,mxUtils.bind(this,function(O){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=d.update){var y=null!=d.interval?parseInt(d.interval):6E4,z=null,A=mxUtils.bind(this,function(){var O=this.currentPage;mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(K){O===this.currentPage&&(200<=
+K.getStatus()&&300>=K.getStatus()?(this.updateDiagram(K.getText()),J()):this.handleError({message:mxResources.get("error")+" "+K.getStatus()}))}),mxUtils.bind(this,function(K){this.handleError(K)}))}),J=mxUtils.bind(this,function(){window.clearTimeout(z);z=window.setTimeout(A,y)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){J();A()}));J();A()}null!=g&&g()});null!=d.url&&0<d.url.length?this.editor.loadUrl(d.url,mxUtils.bind(this,function(q){p(q)}),mxUtils.bind(this,function(q){null!=
+k&&k(q)})):p("")};EditorUi.prototype.updateDiagram=function(d){function g(N){var F=new mxCellOverlay(N.image||p.warningImage,N.tooltip,N.align,N.valign,N.offset);F.addListener(mxEvent.CLICK,function(I,Q){l.alert(N.tooltip)});return F}var k=null,l=this;if(null!=d&&0<d.length&&(k=mxUtils.parseXml(d),d=null!=k?k.documentElement:null,null!=d&&"updates"==d.nodeName)){var p=this.editor.graph,q=p.getModel();q.beginUpdate();var x=null;try{for(d=d.firstChild;null!=d;){if("update"==d.nodeName){var y=q.getCell(d.getAttribute("id"));
+if(null!=y){try{var z=d.getAttribute("value");if(null!=z){var A=mxUtils.parseXml(z).documentElement;if(null!=A)if("1"==A.getAttribute("replace-value"))q.setValue(y,A);else for(var J=A.attributes,O=0;O<J.length;O++)p.setAttributeForCell(y,J[O].nodeName,0<J[O].nodeValue.length?J[O].nodeValue:null)}}catch(N){null!=window.console&&console.log("Error in value for "+y.id+": "+N)}try{var K=d.getAttribute("style");null!=K&&p.model.setStyle(y,K)}catch(N){null!=window.console&&console.log("Error in style for "+
+y.id+": "+N)}try{var u=d.getAttribute("icon");if(null!=u){var E=0<u.length?JSON.parse(u):null;null!=E&&E.append||p.removeCellOverlays(y);null!=E&&p.addCellOverlay(y,g(E))}}catch(N){null!=window.console&&console.log("Error in icon for "+y.id+": "+N)}try{var B=d.getAttribute("geometry");if(null!=B){B=JSON.parse(B);var D=p.getCellGeometry(y);if(null!=D){D=D.clone();for(key in B){var G=parseFloat(B[key]);"dx"==key?D.x+=G:"dy"==key?D.y+=G:"dw"==key?D.width+=G:"dh"==key?D.height+=G:D[key]=parseFloat(B[key])}p.model.setGeometry(y,
+D)}}}catch(N){null!=window.console&&console.log("Error in icon for "+y.id+": "+N)}}}else if("model"==d.nodeName){for(var H=d.firstChild;null!=H&&H.nodeType!=mxConstants.NODETYPE_ELEMENT;)H=H.nextSibling;null!=H&&(new mxCodec(d.firstChild)).decode(H,q)}else if("view"==d.nodeName){if(d.hasAttribute("scale")&&(p.view.scale=parseFloat(d.getAttribute("scale"))),d.hasAttribute("dx")||d.hasAttribute("dy"))p.view.translate=new mxPoint(parseFloat(d.getAttribute("dx")||0),parseFloat(d.getAttribute("dy")||0))}else"fit"==
d.nodeName&&(x=d.hasAttribute("max-scale")?parseFloat(d.getAttribute("max-scale")):1);d=d.nextSibling}}finally{q.endUpdate()}null!=x&&this.chromelessResize&&this.chromelessResize(!0,x)}return k};EditorUi.prototype.getCopyFilename=function(d,g){var k=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;d="";var l=k.lastIndexOf(".");0<=l&&(d=k.substring(l),k=k.substring(0,l));if(g){g=k;var p=new Date;k=p.getFullYear();l=p.getMonth()+1;var q=p.getDate(),x=p.getHours(),y=p.getMinutes();p=p.getSeconds();
k=g+(" "+(k+"-"+l+"-"+q+"-"+x+"-"+y+"-"+p))}return k=mxResources.get("copyOf",[k])+d};EditorUi.prototype.fileLoaded=function(d,g){var k=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var l=!1;this.hideDialog();null!=k&&(EditorUi.debug("File.closed",[k]),k.removeListener(this.descriptorChangedListener),k.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var p=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);
null!=k&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!g&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerText="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();g||this.showSplash()});if(null!=d)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility=
@@ -11781,29 +11777,29 @@ this.editor.setStatus('<span class="geStatusAlert">'+mxUtils.htmlEntities(mxReso
"1"==urlParams.sketch?"sketch":uiTheme;if(null==q)q="default";else if("sketch"==q||"min"==q)q+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:d.getMode().toUpperCase()+"-OPEN-FILE-"+d.getHash(),action:"size_"+d.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+q})}EditorUi.debug("File.opened",[d]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==d.getMode()&&d.getMode()!=App.MODE_DEVICE&&null!=
d.getMode())try{this.addRecent({id:d.getHash(),title:d.getTitle(),mode:d.getMode()})}catch(x){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(x){}}catch(x){this.fileLoadedError=x;if(null!=d)try{d.close()}catch(y){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=d?d.getHash():"none"),action:"message_"+x.message,label:"stack_"+x.stack})}catch(y){}d=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,
mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=k?this.fileLoaded(k)||p():p()});g?d():this.handleError(x,mxResources.get("errorLoadingFile"),d,!0,null,null,!0)}else p();return l};EditorUi.prototype.getHashValueForPages=function(d,g){var k=0,l=new mxGraphModel,p=new mxCodec;null!=g&&(g.byteCount=0,g.attrCount=0,g.eltCount=0,g.nodeCount=0);for(var q=0;q<d.length;q++){this.updatePageRoot(d[q]);var x=d[q].node.cloneNode(!1);x.removeAttribute("name");l.root=d[q].root;
-var y=p.encode(l);this.editor.graph.saveViewState(d[q].viewState,y,!0);y.removeAttribute("pageWidth");y.removeAttribute("pageHeight");x.appendChild(y);null!=g&&(g.eltCount+=x.getElementsByTagName("*").length,g.nodeCount+=x.getElementsByTagName("mxCell").length);k=(k<<5)-k+this.hashValue(x,function(z,A,K,O){return!O||"mxGeometry"!=z.nodeName&&"mxPoint"!=z.nodeName||"x"!=A&&"y"!=A&&"width"!=A&&"height"!=A?O&&"mxCell"==z.nodeName&&"previous"==A?null:K:Math.round(K)},g)<<0}return k};EditorUi.prototype.hashValue=
+var y=p.encode(l);this.editor.graph.saveViewState(d[q].viewState,y,!0);y.removeAttribute("pageWidth");y.removeAttribute("pageHeight");x.appendChild(y);null!=g&&(g.eltCount+=x.getElementsByTagName("*").length,g.nodeCount+=x.getElementsByTagName("mxCell").length);k=(k<<5)-k+this.hashValue(x,function(z,A,J,O){return!O||"mxGeometry"!=z.nodeName&&"mxPoint"!=z.nodeName||"x"!=A&&"y"!=A&&"width"!=A&&"height"!=A?O&&"mxCell"==z.nodeName&&"previous"==A?null:J:Math.round(J)},g)<<0}return k};EditorUi.prototype.hashValue=
function(d,g,k){var l=0;if(null!=d&&"object"===typeof d&&"number"===typeof d.nodeType&&"string"===typeof d.nodeName&&"function"===typeof d.getAttribute){null!=d.nodeName&&(l^=this.hashValue(d.nodeName,g,k));if(null!=d.attributes){null!=k&&(k.attrCount+=d.attributes.length);for(var p=0;p<d.attributes.length;p++){var q=d.attributes[p].name,x=null!=g?g(d,q,d.attributes[p].value,!0):d.attributes[p].value;null!=x&&(l^=this.hashValue(q,g,k)+this.hashValue(x,g,k))}}if(null!=d.childNodes)for(p=0;p<d.childNodes.length;p++)l=
(l<<5)-l+this.hashValue(d.childNodes[p],g,k)<<0}else if(null!=d&&"function"!==typeof d){d=String(d);g=0;null!=k&&(k.byteCount+=d.length);for(p=0;p<d.length;p++)g=(g<<5)-g+d.charCodeAt(p)<<0;l^=g}return l};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(d,g,k,l,p,q,x){};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(d){null==d&&(d=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,d,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(d){var g=mxUtils.createXmlDocument(),k=g.createElement("mxlibrary");mxUtils.setTextContent(k,JSON.stringify(d));g.appendChild(k);return mxUtils.getXml(g)};EditorUi.prototype.closeLibrary=function(d){null!=d&&(this.removeLibrarySidebar(d.getHash()),
d.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(d.getHash()),".scratchpad"==d.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(d){var g=this.sidebar.palettes[d];if(null!=g){for(var k=0;k<g.length;k++)g[k].parentNode.removeChild(g[k]);delete this.sidebar.palettes[d]}};EditorUi.prototype.repositionLibrary=function(d){var g=this.sidebar.container;if(null==d){var k=this.sidebar.palettes["L.scratchpad"];null==k&&(k=this.sidebar.palettes.search);null!=k&&(d=k[k.length-
1].nextSibling)}d=null!=d?d:g.firstChild.nextSibling.nextSibling;k=g.lastChild;var l=k.previousSibling;g.insertBefore(k,d);g.insertBefore(l,k)};EditorUi.prototype.loadLibrary=function(d,g){var k=mxUtils.parseXml(d.getData());if("mxlibrary"==k.documentElement.nodeName){var l=JSON.parse(mxUtils.getTextContent(k.documentElement));this.libraryLoaded(d,l,k.documentElement.getAttribute("title"),g)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(d){return""};
-EditorUi.prototype.libraryLoaded=function(d,g,k,l){if(null!=this.sidebar){d.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(d.getHash());".scratchpad"==d.title&&(this.scratchpad=d);var p=this.sidebar.palettes[d.getHash()];p=null!=p?p[p.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var q=null,x=mxUtils.bind(this,function(N,I){0==N.length&&d.isEditable()?(null==q&&(q=document.createElement("div"),q.className="geDropTarget",mxUtils.write(q,mxResources.get("dragElementsHere"))),
-I.appendChild(q)):this.addLibraryEntries(N,I)});null!=this.sidebar&&null!=g&&this.sidebar.addEntries(g);null==k&&(k=d.getTitle(),null!=k&&/(\.xml)$/i.test(k)&&(k=k.substring(0,k.lastIndexOf("."))));var y=this.sidebar.addPalette(d.getHash(),k,null!=l?l:!0,mxUtils.bind(this,function(N){x(g,N)}));this.repositionLibrary(p);var z=y.parentNode.previousSibling;l=z.getAttribute("title");null!=l&&0<l.length&&".scratchpad"!=d.title&&z.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+l);var A=document.createElement("div");
-A.style.position="absolute";A.style.right="0px";A.style.top="0px";A.style.padding="8px";A.style.backgroundColor="inherit";z.style.position="relative";var K=document.createElement("img");K.setAttribute("src",Editor.crossImage);K.setAttribute("title",mxResources.get("close"));K.setAttribute("valign","absmiddle");K.setAttribute("border","0");K.style.position="relative";K.style.top="2px";K.style.width="14px";K.style.cursor="pointer";K.style.margin="0 3px";Editor.isDarkMode()&&(K.style.filter="invert(100%)");
-var O=null;if(".scratchpad"!=d.title||this.closableScratchpad)A.appendChild(K),mxEvent.addListener(K,"click",mxUtils.bind(this,function(N){if(!mxEvent.isConsumed(N)){var I=mxUtils.bind(this,function(){this.closeLibrary(d)});null!=O?this.confirm(mxResources.get("allChangesLost"),null,I,mxResources.get("cancel"),mxResources.get("discardChanges")):I();mxEvent.consume(N)}}));if(d.isEditable()){var L=this.editor.graph,u=null,E=mxUtils.bind(this,function(N){this.showLibraryDialog(d.getTitle(),y,g,d,d.getMode());
-mxEvent.consume(N)}),B=mxUtils.bind(this,function(N){d.setModified(!0);d.isAutosave()?(null!=u&&null!=u.parentNode&&u.parentNode.removeChild(u),u=K.cloneNode(!1),u.setAttribute("src",Editor.spinImage),u.setAttribute("title",mxResources.get("saving")),u.style.cursor="default",u.style.marginRight="2px",u.style.marginTop="-2px",A.insertBefore(u,A.firstChild),z.style.paddingRight=18*A.childNodes.length+"px",this.saveLibrary(d.getTitle(),g,d,d.getMode(),!0,!0,function(){null!=u&&null!=u.parentNode&&(u.parentNode.removeChild(u),
-z.style.paddingRight=18*A.childNodes.length+"px")})):null==O&&(O=K.cloneNode(!1),O.setAttribute("src",Editor.saveImage),O.setAttribute("title",mxResources.get("save")),A.insertBefore(O,A.firstChild),mxEvent.addListener(O,"click",mxUtils.bind(this,function(I){this.saveLibrary(d.getTitle(),g,d,d.getMode(),d.constructor==LocalLibrary,!0,function(){null==O||d.isModified()||(z.style.paddingRight=18*A.childNodes.length+"px",O.parentNode.removeChild(O),O=null)});mxEvent.consume(I)})),z.style.paddingRight=
-18*A.childNodes.length+"px")}),D=mxUtils.bind(this,function(N,I,F,H){N=L.cloneCells(mxUtils.sortCells(L.model.getTopmostCells(N)));for(var R=0;R<N.length;R++){var X=L.getCellGeometry(N[R]);null!=X&&X.translate(-I.x,-I.y)}y.appendChild(this.sidebar.createVertexTemplateFromCells(N,I.width,I.height,H||"",!0,null,!1));N={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(N))),w:I.width,h:I.height};null!=H&&(N.title=H);g.push(N);B(F);null!=q&&null!=q.parentNode&&0<g.length&&(q.parentNode.removeChild(q),
-q=null)}),G=mxUtils.bind(this,function(N){if(L.isSelectionEmpty())L.getRubberband().isActive()?(L.getRubberband().execute(N),L.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var I=L.getSelectionCells(),F=L.view.getBounds(I),H=L.view.scale;F.x/=H;F.y/=H;F.width/=H;F.height/=H;F.x-=L.view.translate.x;F.y-=L.view.translate.y;D(I,F)}mxEvent.consume(N)});mxEvent.addGestureListeners(y,function(){},mxUtils.bind(this,function(N){L.isMouseDown&&
-null!=L.panningManager&&null!=L.graphHandler.first&&(L.graphHandler.suspend(),null!=L.graphHandler.hint&&(L.graphHandler.hint.style.visibility="hidden"),y.style.backgroundColor="#f1f3f4",y.style.cursor="copy",L.panningManager.stop(),L.autoScroll=!1,mxEvent.consume(N))}),mxUtils.bind(this,function(N){L.isMouseDown&&null!=L.panningManager&&null!=L.graphHandler&&(y.style.backgroundColor="",y.style.cursor="default",this.sidebar.showTooltips=!0,L.panningManager.stop(),L.graphHandler.reset(),L.isMouseDown=
-!1,L.autoScroll=!0,G(N),mxEvent.consume(N))}));mxEvent.addListener(y,"mouseleave",mxUtils.bind(this,function(N){L.isMouseDown&&null!=L.graphHandler.first&&(L.graphHandler.resume(),null!=L.graphHandler.hint&&(L.graphHandler.hint.style.visibility="visible"),y.style.backgroundColor="",y.style.cursor="",L.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(y,"dragover",mxUtils.bind(this,function(N){y.style.backgroundColor="#f1f3f4";N.dataTransfer.dropEffect="copy";y.style.cursor="copy";this.sidebar.hideTooltip();
-N.stopPropagation();N.preventDefault()})),mxEvent.addListener(y,"drop",mxUtils.bind(this,function(N){y.style.cursor="";y.style.backgroundColor="";0<N.dataTransfer.files.length&&this.importFiles(N.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(I,F,H,R,X,J,W,V,t){if(null!=I&&"image/"==F.substring(0,6))I="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(I),I=[new mxCell("",new mxGeometry(0,0,X,J),I)],I[0].vertex=!0,
-D(I,new mxRectangle(0,0,X,J),N,mxEvent.isAltDown(N)?null:W.substring(0,W.lastIndexOf(".")).replace(/_/g," ")),null!=q&&null!=q.parentNode&&0<g.length&&(q.parentNode.removeChild(q),q=null);else{var C=!1,M=mxUtils.bind(this,function(Q,P){null!=Q&&"application/pdf"==P&&(P=Editor.extractGraphModelFromPdf(Q),null!=P&&0<P.length&&(Q=P));if(null!=Q)if(Q=mxUtils.parseXml(Q),"mxlibrary"==Q.documentElement.nodeName)try{var S=JSON.parse(mxUtils.getTextContent(Q.documentElement));x(S,y);g=g.concat(S);B(N);this.spinner.stop();
-C=!0}catch(aa){}else if("mxfile"==Q.documentElement.nodeName)try{var U=Q.documentElement.getElementsByTagName("diagram");for(S=0;S<U.length;S++){var T=this.stringToCells(Editor.getDiagramNodeXml(U[S])),Y=this.editor.graph.getBoundingBoxFromGeometry(T);D(T,new mxRectangle(0,0,Y.width,Y.height),N)}C=!0}catch(aa){null!=window.console&&console.log("error in drop handler:",aa)}C||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=q&&null!=q.parentNode&&0<g.length&&
-(q.parentNode.removeChild(q),q=null)});null!=t&&null!=W&&(/(\.v(dx|sdx?))($|\?)/i.test(W)||/(\.vs(x|sx?))($|\?)/i.test(W))?this.importVisio(t,function(Q){M(Q,"text/xml")},null,W):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(I,W)&&null!=t?this.isExternalDataComms()?this.parseFile(t,mxUtils.bind(this,function(Q){4==Q.readyState&&(this.spinner.stop(),200<=Q.status&&299>=Q.status?M(Q.responseText,"text/xml"):this.handleError({message:mxResources.get(413==Q.status?"drawingTooLarge":"invalidOrMissingFile")},
-mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):M(I,F)}}));N.stopPropagation();N.preventDefault()})),mxEvent.addListener(y,"dragleave",function(N){y.style.cursor="";y.style.backgroundColor="";N.stopPropagation();N.preventDefault()}));K=K.cloneNode(!1);K.setAttribute("src",Editor.editImage);K.setAttribute("title",mxResources.get("edit"));A.insertBefore(K,A.firstChild);mxEvent.addListener(K,"click",E);mxEvent.addListener(y,
-"dblclick",function(N){mxEvent.getSource(N)==y&&E(N)});l=K.cloneNode(!1);l.setAttribute("src",Editor.plusImage);l.setAttribute("title",mxResources.get("add"));A.insertBefore(l,A.firstChild);mxEvent.addListener(l,"click",G);this.isOffline()||".scratchpad"!=d.title||null==EditorUi.scratchpadHelpLink||(l=document.createElement("span"),l.setAttribute("title",mxResources.get("help")),l.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(l,"?"),mxEvent.addGestureListeners(l,
-mxUtils.bind(this,function(N){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(N)})),A.insertBefore(l,A.firstChild))}z.appendChild(A);z.style.paddingRight=18*A.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(d,g){for(var k=0;k<d.length;k++){var l=d[k],p=l.data;if(null!=p){p=this.convertDataUri(p);var q="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==l.aspect&&(q+="aspect=fixed;");g.appendChild(this.sidebar.createVertexTemplate(q+
+EditorUi.prototype.libraryLoaded=function(d,g,k,l){if(null!=this.sidebar){d.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(d.getHash());".scratchpad"==d.title&&(this.scratchpad=d);var p=this.sidebar.palettes[d.getHash()];p=null!=p?p[p.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var q=null,x=mxUtils.bind(this,function(H,N){0==H.length&&d.isEditable()?(null==q&&(q=document.createElement("div"),q.className="geDropTarget",mxUtils.write(q,mxResources.get("dragElementsHere"))),
+N.appendChild(q)):this.addLibraryEntries(H,N)});null!=this.sidebar&&null!=g&&this.sidebar.addEntries(g);null==k&&(k=d.getTitle(),null!=k&&/(\.xml)$/i.test(k)&&(k=k.substring(0,k.lastIndexOf("."))));var y=this.sidebar.addPalette(d.getHash(),k,null!=l?l:!0,mxUtils.bind(this,function(H){x(g,H)}));this.repositionLibrary(p);var z=y.parentNode.previousSibling;l=z.getAttribute("title");null!=l&&0<l.length&&".scratchpad"!=d.title&&z.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+l);var A=document.createElement("div");
+A.style.position="absolute";A.style.right="0px";A.style.top="0px";A.style.padding="8px";A.style.backgroundColor="inherit";z.style.position="relative";var J=document.createElement("img");J.setAttribute("src",Editor.crossImage);J.setAttribute("title",mxResources.get("close"));J.setAttribute("valign","absmiddle");J.setAttribute("border","0");J.style.position="relative";J.style.top="2px";J.style.width="14px";J.style.cursor="pointer";J.style.margin="0 3px";Editor.isDarkMode()&&(J.style.filter="invert(100%)");
+var O=null;if(".scratchpad"!=d.title||this.closableScratchpad)A.appendChild(J),mxEvent.addListener(J,"click",mxUtils.bind(this,function(H){if(!mxEvent.isConsumed(H)){var N=mxUtils.bind(this,function(){this.closeLibrary(d)});null!=O?this.confirm(mxResources.get("allChangesLost"),null,N,mxResources.get("cancel"),mxResources.get("discardChanges")):N();mxEvent.consume(H)}}));if(d.isEditable()){var K=this.editor.graph,u=null,E=mxUtils.bind(this,function(H){this.showLibraryDialog(d.getTitle(),y,g,d,d.getMode());
+mxEvent.consume(H)}),B=mxUtils.bind(this,function(H){d.setModified(!0);d.isAutosave()?(null!=u&&null!=u.parentNode&&u.parentNode.removeChild(u),u=J.cloneNode(!1),u.setAttribute("src",Editor.spinImage),u.setAttribute("title",mxResources.get("saving")),u.style.cursor="default",u.style.marginRight="2px",u.style.marginTop="-2px",A.insertBefore(u,A.firstChild),z.style.paddingRight=18*A.childNodes.length+"px",this.saveLibrary(d.getTitle(),g,d,d.getMode(),!0,!0,function(){null!=u&&null!=u.parentNode&&(u.parentNode.removeChild(u),
+z.style.paddingRight=18*A.childNodes.length+"px")})):null==O&&(O=J.cloneNode(!1),O.setAttribute("src",Editor.saveImage),O.setAttribute("title",mxResources.get("save")),A.insertBefore(O,A.firstChild),mxEvent.addListener(O,"click",mxUtils.bind(this,function(N){this.saveLibrary(d.getTitle(),g,d,d.getMode(),d.constructor==LocalLibrary,!0,function(){null==O||d.isModified()||(z.style.paddingRight=18*A.childNodes.length+"px",O.parentNode.removeChild(O),O=null)});mxEvent.consume(N)})),z.style.paddingRight=
+18*A.childNodes.length+"px")}),D=mxUtils.bind(this,function(H,N,F,I){H=K.cloneCells(mxUtils.sortCells(K.model.getTopmostCells(H)));for(var Q=0;Q<H.length;Q++){var X=K.getCellGeometry(H[Q]);null!=X&&X.translate(-N.x,-N.y)}y.appendChild(this.sidebar.createVertexTemplateFromCells(H,N.width,N.height,I||"",!0,null,!1));H={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(H))),w:N.width,h:N.height};null!=I&&(H.title=I);g.push(H);B(F);null!=q&&null!=q.parentNode&&0<g.length&&(q.parentNode.removeChild(q),
+q=null)}),G=mxUtils.bind(this,function(H){if(K.isSelectionEmpty())K.getRubberband().isActive()?(K.getRubberband().execute(H),K.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var N=K.getSelectionCells(),F=K.view.getBounds(N),I=K.view.scale;F.x/=I;F.y/=I;F.width/=I;F.height/=I;F.x-=K.view.translate.x;F.y-=K.view.translate.y;D(N,F)}mxEvent.consume(H)});mxEvent.addGestureListeners(y,function(){},mxUtils.bind(this,function(H){K.isMouseDown&&
+null!=K.panningManager&&null!=K.graphHandler.first&&(K.graphHandler.suspend(),null!=K.graphHandler.hint&&(K.graphHandler.hint.style.visibility="hidden"),y.style.backgroundColor="#f1f3f4",y.style.cursor="copy",K.panningManager.stop(),K.autoScroll=!1,mxEvent.consume(H))}),mxUtils.bind(this,function(H){K.isMouseDown&&null!=K.panningManager&&null!=K.graphHandler&&(y.style.backgroundColor="",y.style.cursor="default",this.sidebar.showTooltips=!0,K.panningManager.stop(),K.graphHandler.reset(),K.isMouseDown=
+!1,K.autoScroll=!0,G(H),mxEvent.consume(H))}));mxEvent.addListener(y,"mouseleave",mxUtils.bind(this,function(H){K.isMouseDown&&null!=K.graphHandler.first&&(K.graphHandler.resume(),null!=K.graphHandler.hint&&(K.graphHandler.hint.style.visibility="visible"),y.style.backgroundColor="",y.style.cursor="",K.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(y,"dragover",mxUtils.bind(this,function(H){y.style.backgroundColor="#f1f3f4";H.dataTransfer.dropEffect="copy";y.style.cursor="copy";this.sidebar.hideTooltip();
+H.stopPropagation();H.preventDefault()})),mxEvent.addListener(y,"drop",mxUtils.bind(this,function(H){y.style.cursor="";y.style.backgroundColor="";0<H.dataTransfer.files.length&&this.importFiles(H.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(N,F,I,Q,X,L,U,W,t){if(null!=N&&"image/"==F.substring(0,6))N="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(N),N=[new mxCell("",new mxGeometry(0,0,X,L),N)],N[0].vertex=!0,
+D(N,new mxRectangle(0,0,X,L),H,mxEvent.isAltDown(H)?null:U.substring(0,U.lastIndexOf(".")).replace(/_/g," ")),null!=q&&null!=q.parentNode&&0<g.length&&(q.parentNode.removeChild(q),q=null);else{var C=!1,M=mxUtils.bind(this,function(S,P){null!=S&&"application/pdf"==P&&(P=Editor.extractGraphModelFromPdf(S),null!=P&&0<P.length&&(S=P));if(null!=S)if(S=mxUtils.parseXml(S),"mxlibrary"==S.documentElement.nodeName)try{var R=JSON.parse(mxUtils.getTextContent(S.documentElement));x(R,y);g=g.concat(R);B(H);this.spinner.stop();
+C=!0}catch(ba){}else if("mxfile"==S.documentElement.nodeName)try{var T=S.documentElement.getElementsByTagName("diagram");for(R=0;R<T.length;R++){var V=this.stringToCells(Editor.getDiagramNodeXml(T[R])),Y=this.editor.graph.getBoundingBoxFromGeometry(V);D(V,new mxRectangle(0,0,Y.width,Y.height),H)}C=!0}catch(ba){null!=window.console&&console.log("error in drop handler:",ba)}C||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=q&&null!=q.parentNode&&0<g.length&&
+(q.parentNode.removeChild(q),q=null)});null!=t&&null!=U&&(/(\.v(dx|sdx?))($|\?)/i.test(U)||/(\.vs(x|sx?))($|\?)/i.test(U))?this.importVisio(t,function(S){M(S,"text/xml")},null,U):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(N,U)&&null!=t?this.isExternalDataComms()?this.parseFile(t,mxUtils.bind(this,function(S){4==S.readyState&&(this.spinner.stop(),200<=S.status&&299>=S.status?M(S.responseText,"text/xml"):this.handleError({message:mxResources.get(413==S.status?"drawingTooLarge":"invalidOrMissingFile")},
+mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):M(N,F)}}));H.stopPropagation();H.preventDefault()})),mxEvent.addListener(y,"dragleave",function(H){y.style.cursor="";y.style.backgroundColor="";H.stopPropagation();H.preventDefault()}));J=J.cloneNode(!1);J.setAttribute("src",Editor.editImage);J.setAttribute("title",mxResources.get("edit"));A.insertBefore(J,A.firstChild);mxEvent.addListener(J,"click",E);mxEvent.addListener(y,
+"dblclick",function(H){mxEvent.getSource(H)==y&&E(H)});l=J.cloneNode(!1);l.setAttribute("src",Editor.plusImage);l.setAttribute("title",mxResources.get("add"));A.insertBefore(l,A.firstChild);mxEvent.addListener(l,"click",G);this.isOffline()||".scratchpad"!=d.title||null==EditorUi.scratchpadHelpLink||(l=document.createElement("span"),l.setAttribute("title",mxResources.get("help")),l.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(l,"?"),mxEvent.addGestureListeners(l,
+mxUtils.bind(this,function(H){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(H)})),A.insertBefore(l,A.firstChild))}z.appendChild(A);z.style.paddingRight=18*A.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(d,g){for(var k=0;k<d.length;k++){var l=d[k],p=l.data;if(null!=p){p=this.convertDataUri(p);var q="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==l.aspect&&(q+="aspect=fixed;");g.appendChild(this.sidebar.createVertexTemplate(q+
"image="+p,l.w,l.h,"",l.title||"",!1,null,!0))}else null!=l.xml&&(p=this.stringToCells(Graph.decompress(l.xml)),0<p.length&&g.appendChild(this.sidebar.createVertexTemplateFromCells(p,l.w,l.h,l.title||"",!0,null,!0)))}};EditorUi.prototype.getResource=function(d){return null!=d?d[mxLanguage]||d.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.shapeBackgroundColor=Editor.darkColor,Graph.prototype.shapeForegroundColor=Editor.lightColor,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=
@@ -11813,27 +11809,27 @@ Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);d.init()};EditorUi.pro
function(q){q&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));d.init()};var f=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(d){var g=f.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(k){this.editor.graph.isSelectionEmpty()&&g.refresh()}));return g};EditorUi.prototype.createSidebarFooterContainer=function(){var d=this.createDiv("geSidebarContainer geSidebarFooter");d.style.position="absolute";d.style.overflow=
"hidden";var g=document.createElement("a");g.className="geTitle";g.style.color="#DF6C0C";g.style.fontWeight="bold";g.style.height="100%";g.style.paddingTop="9px";g.innerHTML="<span>+</span>";var k=g.getElementsByTagName("span")[0];k.style.fontSize="18px";k.style.marginRight="5px";mxUtils.write(g,mxResources.get("moreShapes")+"...");mxEvent.addListener(g,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(l){l.preventDefault()}));mxEvent.addListener(g,"click",mxUtils.bind(this,
function(l){this.actions.get("shapes").funct();mxEvent.consume(l)}));d.appendChild(g);return d};EditorUi.prototype.handleError=function(d,g,k,l,p,q,x){var y=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},z=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!=d.message)try{x?null!=window.console&&console.error("EditorUi.handleError:",d):EditorUi.logError("Caught: "+(""==d.message&&null!=d.name)?d.name:d.message,d.filename,d.lineNumber,
-d.columnNumber,d,"INFO")}catch(u){}if(null!=z||null!=g){x=mxUtils.htmlEntities(mxResources.get("unknownError"));var A=mxResources.get("ok"),K=null;g=null!=g?g:mxResources.get("error");if(null!=z){null!=z.retry&&(A=mxResources.get("cancel"),K=function(){y();z.retry()});if(404==z.code||404==z.status||403==z.code){x=403==z.code?null!=z.message?mxUtils.htmlEntities(z.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=p?p:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=
+d.columnNumber,d,"INFO")}catch(u){}if(null!=z||null!=g){x=mxUtils.htmlEntities(mxResources.get("unknownError"));var A=mxResources.get("ok"),J=null;g=null!=g?g:mxResources.get("error");if(null!=z){null!=z.retry&&(A=mxResources.get("cancel"),J=function(){y();z.retry()});if(404==z.code||404==z.status||403==z.code){x=403==z.code?null!=z.message?mxUtils.htmlEntities(z.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=p?p:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=
this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var O=null!=p?null:null!=q?q:window.location.hash;if(null!=O&&("#G"==O.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==O.substring(0,45))&&(null!=d&&null!=d.error&&(null!=d.error.errors&&0<d.error.errors.length&&"fileAccess"==d.error.errors[0].reason||null!=d.error.data&&0<d.error.data.length&&"fileAccess"==d.error.data[0].reason)||404==z.code||404==z.status)){O="#U"==O.substring(0,
-2)?O.substring(45,O.lastIndexOf("%26ex")):O.substring(2);this.showError(g,x,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+O);this.handleError(d,g,k,l,p)}),K,mxResources.get("changeUser"),mxUtils.bind(this,function(){function u(){G.innerText="";for(var N=0;N<E.length;N++){var I=document.createElement("option");mxUtils.write(I,E[N].displayName);I.value=N;G.appendChild(I);I=document.createElement("option");I.innerHTML="&nbsp;&nbsp;&nbsp;";
-mxUtils.write(I,"<"+E[N].email+">");I.setAttribute("disabled","disabled");G.appendChild(I)}I=document.createElement("option");mxUtils.write(I,mxResources.get("addAccount"));I.value=E.length;G.appendChild(I)}var E=this.drive.getUsersList(),B=document.createElement("div"),D=document.createElement("span");D.style.marginTop="6px";mxUtils.write(D,mxResources.get("changeUser")+": ");B.appendChild(D);var G=document.createElement("select");G.style.width="200px";u();mxEvent.addListener(G,"change",mxUtils.bind(this,
-function(){var N=G.value,I=E.length!=N;I&&this.drive.setUser(E[N]);this.drive.authorize(I,mxUtils.bind(this,function(){I||(E=this.drive.getUsersList(),u())}),mxUtils.bind(this,function(F){this.handleError(F)}),!0)}));B.appendChild(G);B=new CustomDialog(this,B,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(B.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=k&&k()}),480,150);return}}null!=z.message?
-x=""==z.message&&null!=z.name?mxUtils.htmlEntities(z.name):mxUtils.htmlEntities(z.message):null!=z.response&&null!=z.response.error?x=mxUtils.htmlEntities(z.response.error):"undefined"!==typeof window.App&&(z.code==App.ERROR_TIMEOUT?x=mxUtils.htmlEntities(mxResources.get("timeout")):z.code==App.ERROR_BUSY?x=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof z&&0<z.length&&(x=mxUtils.htmlEntities(z)))}var L=q=null;null!=z&&null!=z.helpLink?(q=mxResources.get("help"),L=mxUtils.bind(this,
-function(){return this.editor.graph.openLink(z.helpLink)})):null!=z&&null!=z.ownerEmail&&(q=mxResources.get("contactOwner"),x+=mxUtils.htmlEntities(" ("+q+": "+z.ownerEmail+")"),L=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(z.ownerEmail))}));this.showError(g,x,A,k,K,null,null,q,L,null,null,null,l?k:null)}else null!=k&&k()};EditorUi.prototype.alert=function(d,g,k){d=new ErrorDialog(this,null,d,mxResources.get("ok"),g);this.showDialog(d.container,k||340,100,!0,!1);
+2)?O.substring(45,O.lastIndexOf("%26ex")):O.substring(2);this.showError(g,x,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+O);this.handleError(d,g,k,l,p)}),J,mxResources.get("changeUser"),mxUtils.bind(this,function(){function u(){G.innerText="";for(var H=0;H<E.length;H++){var N=document.createElement("option");mxUtils.write(N,E[H].displayName);N.value=H;G.appendChild(N);N=document.createElement("option");N.innerHTML="&nbsp;&nbsp;&nbsp;";
+mxUtils.write(N,"<"+E[H].email+">");N.setAttribute("disabled","disabled");G.appendChild(N)}N=document.createElement("option");mxUtils.write(N,mxResources.get("addAccount"));N.value=E.length;G.appendChild(N)}var E=this.drive.getUsersList(),B=document.createElement("div"),D=document.createElement("span");D.style.marginTop="6px";mxUtils.write(D,mxResources.get("changeUser")+": ");B.appendChild(D);var G=document.createElement("select");G.style.width="200px";u();mxEvent.addListener(G,"change",mxUtils.bind(this,
+function(){var H=G.value,N=E.length!=H;N&&this.drive.setUser(E[H]);this.drive.authorize(N,mxUtils.bind(this,function(){N||(E=this.drive.getUsersList(),u())}),mxUtils.bind(this,function(F){this.handleError(F)}),!0)}));B.appendChild(G);B=new CustomDialog(this,B,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(B.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=k&&k()}),480,150);return}}null!=z.message?
+x=""==z.message&&null!=z.name?mxUtils.htmlEntities(z.name):mxUtils.htmlEntities(z.message):null!=z.response&&null!=z.response.error?x=mxUtils.htmlEntities(z.response.error):"undefined"!==typeof window.App&&(z.code==App.ERROR_TIMEOUT?x=mxUtils.htmlEntities(mxResources.get("timeout")):z.code==App.ERROR_BUSY?x=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof z&&0<z.length&&(x=mxUtils.htmlEntities(z)))}var K=q=null;null!=z&&null!=z.helpLink?(q=mxResources.get("help"),K=mxUtils.bind(this,
+function(){return this.editor.graph.openLink(z.helpLink)})):null!=z&&null!=z.ownerEmail&&(q=mxResources.get("contactOwner"),x+=mxUtils.htmlEntities(" ("+q+": "+z.ownerEmail+")"),K=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(z.ownerEmail))}));this.showError(g,x,A,k,J,null,null,q,K,null,null,null,l?k:null)}else null!=k&&k()};EditorUi.prototype.alert=function(d,g,k){d=new ErrorDialog(this,null,d,mxResources.get("ok"),g);this.showDialog(d.container,k||340,100,!0,!1);
d.init()};EditorUi.prototype.confirm=function(d,g,k,l,p,q){var x=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},y=Math.min(200,28*Math.ceil(d.length/50));d=new ConfirmDialog(this,d,function(){x();null!=g&&g()},function(){x();null!=k&&k()},l,p,null,null,null,null,y);this.showDialog(d.container,340,46+y,!0,q);d.init()};EditorUi.prototype.showBanner=function(d,g,k,l){var p=!1;if(!(this.bannerShowing||this["hideBanner"+d]||isLocalStorage&&null!=mxSettings.settings&&null!=
mxSettings.settings["close"+d])){var q=document.createElement("div");q.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(q.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(q.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(q.style,"transition","all 1s ease");q.className="geBtn gePrimaryBtn";
p=document.createElement("img");p.setAttribute("src",IMAGE_PATH+"/logo.png");p.setAttribute("border","0");p.setAttribute("align","absmiddle");p.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";q.appendChild(p);p=document.createElement("img");p.setAttribute("src",Dialog.prototype.closeImage);p.setAttribute("title",mxResources.get(l?"doNotShowAgain":"close"));p.setAttribute("border","0");p.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";
q.appendChild(p);mxUtils.write(q,g);document.body.appendChild(q);this.bannerShowing=!0;g=document.createElement("div");g.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var x=document.createElement("input");x.setAttribute("type","checkbox");x.setAttribute("id","geDoNotShowAgainCheckbox");x.style.marginRight="6px";if(!l){g.appendChild(x);var y=document.createElement("label");y.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(y,mxResources.get("doNotShowAgain"));g.appendChild(y);
-q.style.paddingBottom="30px";q.appendChild(g)}var z=mxUtils.bind(this,function(){null!=q.parentNode&&(q.parentNode.removeChild(q),this.bannerShowing=!1,x.checked||l)&&(this["hideBanner"+d]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+d]=Date.now(),mxSettings.save()))});mxEvent.addListener(p,"click",mxUtils.bind(this,function(K){mxEvent.consume(K);z()}));var A=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(q.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,
-function(){z()}),1E3)});mxEvent.addListener(q,"click",mxUtils.bind(this,function(K){var O=mxEvent.getSource(K);O!=x&&O!=y?(null!=k&&k(),z(),mxEvent.consume(K)):A()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(q.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(A,3E4);p=!0}return p};EditorUi.prototype.setCurrentFile=function(d){null!=d&&(d.opened=new Date);this.currentFile=d};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=
+q.style.paddingBottom="30px";q.appendChild(g)}var z=mxUtils.bind(this,function(){null!=q.parentNode&&(q.parentNode.removeChild(q),this.bannerShowing=!1,x.checked||l)&&(this["hideBanner"+d]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+d]=Date.now(),mxSettings.save()))});mxEvent.addListener(p,"click",mxUtils.bind(this,function(J){mxEvent.consume(J);z()}));var A=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(q.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,
+function(){z()}),1E3)});mxEvent.addListener(q,"click",mxUtils.bind(this,function(J){var O=mxEvent.getSource(J);O!=x&&O!=y?(null!=k&&k(),z(),mxEvent.consume(J)):A()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(q.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(A,3E4);p=!0}return p};EditorUi.prototype.setCurrentFile=function(d){null!=d&&(d.opened=new Date);this.currentFile=d};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=
function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(d,g,k,l){d=d.toDataURL("image/"+k);if(null!=d&&6<d.length)null!=g&&(d=Editor.writeGraphModelToPng(d,"tEXt","mxfile",encodeURIComponent(g))),0<l&&(d=Editor.writeGraphModelToPng(d,"pHYs","dpi",l));else throw{message:mxResources.get("unknownError")};return d};EditorUi.prototype.saveCanvas=function(d,g,k,l,p){var q="jpeg"==k?"jpg":k;l=this.getBaseFilename(l)+(null!=g?".drawio":"")+"."+q;d=this.createImageDataUri(d,
g,k,p);this.saveData(l,q,d.substring(d.lastIndexOf(",")+1),"image/"+k,!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(d,g){d=new TextareaDialog(this,d,g,null,null,mxResources.get("close"));this.showDialog(d.container,620,460,
!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(d,g,k,l,p,q){"text/xml"!=k||/(\.drawio)$/i.test(g)||/(\.xml)$/i.test(g)||/(\.svg)$/i.test(g)||/(\.html)$/i.test(g)||(g=g+"."+(null!=q?q:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)d=l?this.base64ToBlob(d,k):new Blob([d],{type:k}),navigator.msSaveOrOpenBlob(d,g);else if(mxClient.IS_IE)k=window.open("about:blank","_blank"),null==k?mxUtils.popup(d,!0):(k.document.write(d),
k.document.close(),k.document.execCommand("SaveAs",!0,g),k.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==k||"image/"!=k.substring(0,6)?this.showTextDialog(g+":",d):this.openInNewWindow(d,k,l);else{var x=document.createElement("a");q=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof x.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var y=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);q=65==(y?parseInt(y[2],10):
!1)?!1:q}if(q||this.isOffline()){x.href=URL.createObjectURL(l?this.base64ToBlob(d,k):new Blob([d],{type:k}));q?x.download=g:x.setAttribute("target","_blank");document.body.appendChild(x);try{window.setTimeout(function(){URL.revokeObjectURL(x.href)},2E4),x.click(),x.parentNode.removeChild(x)}catch(z){}}else this.createEchoRequest(d,g,k,l,p).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(d,g,k,l,p,q){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,d+(null!=
k?"&mime="+k:"")+(null!=p?"&format="+p:"")+(null!=q?"&base64="+q:"")+(null!=g?"&filename="+encodeURIComponent(g):"")+(l?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(d,g){g=g||"";d=atob(d);for(var k=d.length,l=Math.ceil(k/1024),p=Array(l),q=0;q<l;++q){for(var x=1024*q,y=Math.min(x+1024,k),z=Array(y-x),A=0;x<y;++A,++x)z[A]=d[x].charCodeAt(0);p[q]=new Uint8Array(z)}return new Blob(p,{type:g})};EditorUi.prototype.saveLocalFile=function(d,g,k,l,p,q,x,y){q=null!=q?q:!1;x=null!=x?x:"vsdx"!=
-p&&(!mxClient.IS_IOS||!navigator.standalone);p=this.getServiceCount(q);isLocalStorage&&p++;var z=4>=p?2:6<p?4:3;g=new CreateDialog(this,g,mxUtils.bind(this,function(A,K){try{if("_blank"==K)if(null!=k&&"image/"==k.substring(0,6))this.openInNewWindow(d,k,l);else if(null!=k&&"text/html"==k.substring(0,9)){var O=new EmbedDialog(this,d);this.showDialog(O.container,450,240,!0,!0);O.init()}else{var L=window.open("about:blank");null==L?mxUtils.popup(d,!0):(L.document.write("<pre>"+mxUtils.htmlEntities(d,
-!1)+"</pre>"),L.document.close())}else K==App.MODE_DEVICE||"download"==K?this.doSaveLocalFile(d,A,k,l,null,y):null!=A&&0<A.length&&this.pickFolder(K,mxUtils.bind(this,function(u){try{this.exportFile(d,A,k,l,K,u)}catch(E){this.handleError(E)}}))}catch(u){this.handleError(u)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,q,x,null,1<p,z,d,k,l);q=this.isServices(p)?p>z?390:280:160;this.showDialog(g.container,420,q,!0,!0);g.init()};EditorUi.prototype.openInNewWindow=
+p&&(!mxClient.IS_IOS||!navigator.standalone);p=this.getServiceCount(q);isLocalStorage&&p++;var z=4>=p?2:6<p?4:3;g=new CreateDialog(this,g,mxUtils.bind(this,function(A,J){try{if("_blank"==J)if(null!=k&&"image/"==k.substring(0,6))this.openInNewWindow(d,k,l);else if(null!=k&&"text/html"==k.substring(0,9)){var O=new EmbedDialog(this,d);this.showDialog(O.container,450,240,!0,!0);O.init()}else{var K=window.open("about:blank");null==K?mxUtils.popup(d,!0):(K.document.write("<pre>"+mxUtils.htmlEntities(d,
+!1)+"</pre>"),K.document.close())}else J==App.MODE_DEVICE||"download"==J?this.doSaveLocalFile(d,A,k,l,null,y):null!=A&&0<A.length&&this.pickFolder(J,mxUtils.bind(this,function(u){try{this.exportFile(d,A,k,l,J,u)}catch(E){this.handleError(E)}}))}catch(u){this.handleError(u)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,q,x,null,1<p,z,d,k,l);q=this.isServices(p)?p>z?390:280:160;this.showDialog(g.container,420,q,!0,!0);g.init()};EditorUi.prototype.openInNewWindow=
function(d,g,k){var l=window.open("about:blank");null==l||null==l.document?mxUtils.popup(d,!0):("image/svg+xml"!=g||mxClient.IS_SVG?"image/svg+xml"!=g||this.editor.graph.mathEnabled?(d=k?d:btoa(unescape(encodeURIComponent(d))),l.document.write('<html><img style="max-width:100%;" src="data:'+g+";base64,"+d+'"/></html>')):l.document.write("<html>"+d+"</html>"):l.document.write("<html><pre>"+mxUtils.htmlEntities(d,!1)+"</pre></html>"),l.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(d){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var g=d(mxUtils.bind(this,function(l){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=
@@ -11846,12 +11842,12 @@ null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(
"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=q.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";q=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=q.zIndex;var x=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});x.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(y){x.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var z=this.createImageDataUri(y,null,"png");y=document.createElement("img");y.style.maxWidth="140px";y.style.maxHeight="140px";y.style.cursor="pointer";y.style.backgroundColor="white";y.setAttribute("title",mxResources.get("openInNewWindow"));
y.setAttribute("border","0");y.setAttribute("src",z);this.exportDialog.appendChild(y);mxEvent.addListener(y,"click",mxUtils.bind(this,function(){this.openInNewWindow(z.substring(z.indexOf(",")+1),"image/png",!0);p.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(y){this.spinner.stop();this.handleError(y)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",p);document.body.appendChild(this.exportDialog)}mxEvent.consume(l)}),
-Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(d,g,k,l,p){this.isLocalFileSave()?this.saveLocalFile(k,d,l,p,g):this.saveRequest(d,g,mxUtils.bind(this,function(q,x){return this.createEchoRequest(k,q,l,p,g,x)}),k,p,l)};EditorUi.prototype.saveRequest=function(d,g,k,l,p,q,x){x=null!=x?x:!mxClient.IS_IOS||!navigator.standalone;var y=this.getServiceCount(!1);isLocalStorage&&y++;var z=4>=y?2:6<y?4:3;d=new CreateDialog(this,d,mxUtils.bind(this,function(A,K){if("_blank"==
-K||null!=A&&0<A.length){var O=k("_blank"==K?null:A,K==App.MODE_DEVICE||"download"==K||null==K||"_blank"==K?"0":"1");null!=O&&(K==App.MODE_DEVICE||"download"==K||"_blank"==K?O.simulate(document,"_blank"):this.pickFolder(K,mxUtils.bind(this,function(L){q=null!=q?q:"pdf"==g?"application/pdf":"image/"+g;if(null!=l)try{this.exportFile(l,A,q,!0,K,L)}catch(u){this.handleError(u)}else this.spinner.spin(document.body,mxResources.get("saving"))&&O.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=
-O.getStatus()&&299>=O.getStatus())try{this.exportFile(O.getText(),A,q,!0,K,L)}catch(u){this.handleError(u)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(u){this.spinner.stop();this.handleError(u)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,x,null,1<y,z,l,q,p);y=this.isServices(y)?4<y?390:280:160;this.showDialog(d.container,420,y,!0,!0);d.init()};EditorUi.prototype.isServices=function(d){return 1!=
-d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,g,k,l,p,q){};EditorUi.prototype.pickFolder=function(d,g,k){g(null)};EditorUi.prototype.exportSvg=function(d,g,k,l,p,q,x,y,z,A,K,O,L,u){if(this.spinner.spin(document.body,mxResources.get("export")))try{var E=this.editor.graph.isSelectionEmpty();k=null!=k?k:E;var B=g?null:this.editor.graph.background;B==mxConstants.NONE&&(B=null);null==B&&0==g&&(B=K?this.editor.graph.defaultPageBackgroundColor:
-"#ffffff");var D=this.editor.graph.getSvg(B,d,x,y,null,k,null,null,"blank"==A?"_blank":"self"==A?"_top":null,null,!L,K,O);l&&this.editor.graph.addSvgShadow(D);var G=this.getBaseFilename()+(p?".drawio":"")+".svg";u=null!=u?u:mxUtils.bind(this,function(F){this.isLocalFileSave()||F.length<=MAX_REQUEST_SIZE?this.saveData(G,"svg",F,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(F)}))});var N=mxUtils.bind(this,
-function(F){this.spinner.stop();p&&F.setAttribute("content",this.getFileData(!0,null,null,null,k,z,null,null,null,!1));u(Graph.xmlDeclaration+"\n"+(p?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(F))});this.editor.graph.mathEnabled&&this.editor.addMathCss(D);var I=mxUtils.bind(this,function(F){q?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(F,N,this.thumbImageCache)):N(F)});L?this.embedFonts(D,I):(this.editor.addFontCss(D),I(D))}catch(F){this.handleError(F)}};
+Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(d,g,k,l,p){this.isLocalFileSave()?this.saveLocalFile(k,d,l,p,g):this.saveRequest(d,g,mxUtils.bind(this,function(q,x){return this.createEchoRequest(k,q,l,p,g,x)}),k,p,l)};EditorUi.prototype.saveRequest=function(d,g,k,l,p,q,x){x=null!=x?x:!mxClient.IS_IOS||!navigator.standalone;var y=this.getServiceCount(!1);isLocalStorage&&y++;var z=4>=y?2:6<y?4:3;d=new CreateDialog(this,d,mxUtils.bind(this,function(A,J){if("_blank"==
+J||null!=A&&0<A.length){var O=k("_blank"==J?null:A,J==App.MODE_DEVICE||"download"==J||null==J||"_blank"==J?"0":"1");null!=O&&(J==App.MODE_DEVICE||"download"==J||"_blank"==J?O.simulate(document,"_blank"):this.pickFolder(J,mxUtils.bind(this,function(K){q=null!=q?q:"pdf"==g?"application/pdf":"image/"+g;if(null!=l)try{this.exportFile(l,A,q,!0,J,K)}catch(u){this.handleError(u)}else this.spinner.spin(document.body,mxResources.get("saving"))&&O.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=
+O.getStatus()&&299>=O.getStatus())try{this.exportFile(O.getText(),A,q,!0,J,K)}catch(u){this.handleError(u)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(u){this.spinner.stop();this.handleError(u)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,x,null,1<y,z,l,q,p);y=this.isServices(y)?4<y?390:280:160;this.showDialog(d.container,420,y,!0,!0);d.init()};EditorUi.prototype.isServices=function(d){return 1!=
+d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,g,k,l,p,q){};EditorUi.prototype.pickFolder=function(d,g,k){g(null)};EditorUi.prototype.exportSvg=function(d,g,k,l,p,q,x,y,z,A,J,O,K,u){if(this.spinner.spin(document.body,mxResources.get("export")))try{var E=this.editor.graph.isSelectionEmpty();k=null!=k?k:E;var B=g?null:this.editor.graph.background;B==mxConstants.NONE&&(B=null);null==B&&0==g&&(B=J?this.editor.graph.defaultPageBackgroundColor:
+"#ffffff");var D=this.editor.graph.getSvg(B,d,x,y,null,k,null,null,"blank"==A?"_blank":"self"==A?"_top":null,null,!K,J,O);l&&this.editor.graph.addSvgShadow(D);var G=this.getBaseFilename()+(p?".drawio":"")+".svg";u=null!=u?u:mxUtils.bind(this,function(F){this.isLocalFileSave()||F.length<=MAX_REQUEST_SIZE?this.saveData(G,"svg",F,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(F)}))});var H=mxUtils.bind(this,
+function(F){this.spinner.stop();p&&F.setAttribute("content",this.getFileData(!0,null,null,null,k,z,null,null,null,!1));u(Graph.xmlDeclaration+"\n"+(p?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(F))});this.editor.graph.mathEnabled&&this.editor.addMathCss(D);var N=mxUtils.bind(this,function(F){q?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(F,H,this.thumbImageCache)):H(F)});K?this.embedFonts(D,N):(this.editor.addFontCss(D),N(D))}catch(F){this.handleError(F)}};
EditorUi.prototype.addRadiobox=function(d,g,k,l,p,q,x){return this.addCheckbox(d,k,l,p,q,x,!0,g)};EditorUi.prototype.addCheckbox=function(d,g,k,l,p,q,x,y){q=null!=q?q:!0;var z=document.createElement("input");z.style.marginRight="8px";z.style.marginTop="16px";z.setAttribute("type",x?"radio":"checkbox");x="geCheckbox-"+Editor.guid();z.id=x;null!=y&&z.setAttribute("name",y);k&&(z.setAttribute("checked","checked"),z.defaultChecked=!0);l&&z.setAttribute("disabled","disabled");q&&(d.appendChild(z),k=document.createElement("label"),
mxUtils.write(k,g),k.setAttribute("for",x),d.appendChild(k),p||mxUtils.br(d));return z};EditorUi.prototype.addEditButton=function(d,g){var k=this.addCheckbox(d,mxResources.get("edit")+":",!0,null,!0);k.style.marginLeft="24px";var l=this.getCurrentFile(),p="";null!=l&&l.getMode()!=App.MODE_DEVICE&&l.getMode()!=App.MODE_BROWSER&&(p=window.location.href);var q=document.createElement("select");q.style.maxWidth="200px";q.style.width="auto";q.style.marginLeft="8px";q.style.marginRight="10px";q.className=
"geBtn";l=document.createElement("option");l.setAttribute("value","blank");mxUtils.write(l,mxResources.get("makeCopy"));q.appendChild(l);l=document.createElement("option");l.setAttribute("value","custom");mxUtils.write(l,mxResources.get("custom")+"...");q.appendChild(l);d.appendChild(q);mxEvent.addListener(q,"change",mxUtils.bind(this,function(){if("custom"==q.value){var x=new FilenameDialog(this,p,mxResources.get("ok"),function(y){null!=y?p=y:q.value="blank"},mxResources.get("url"),null,null,null,
@@ -11862,130 +11858,130 @@ mxUtils.write(g,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe
mxClient.IS_EDGE?"6px":"1px";x.className="geColorBtn";d.appendChild(x);mxUtils.br(d);return{getColor:function(){return q},getTarget:function(){return l.value},focus:function(){l.focus()}}};EditorUi.prototype.createUrlParameters=function(d,g,k,l,p,q,x){x=null!=x?x:[];l&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||x.push("lightbox=1"),"auto"!=d&&x.push("target="+d),null!=g&&g!=mxConstants.NONE&&x.push("highlight="+("#"==g.charAt(0)?g.substring(1):g)),null!=p&&0<p.length&&
x.push("edit="+encodeURIComponent(p)),q&&x.push("layers=1"),this.editor.graph.foldingEnabled&&x.push("nav=1"));k&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&x.push("page-id="+this.currentPage.getId());return x};EditorUi.prototype.createLink=function(d,g,k,l,p,q,x,y,z,A){z=this.createUrlParameters(d,g,k,l,p,q,z);d=this.getCurrentFile();g=!0;null!=x?k="#U"+encodeURIComponent(x):(d=this.getCurrentFile(),y||null==d||d.constructor!=window.DriveFile?k="#R"+encodeURIComponent(k?
this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(k="#"+d.getHash(),g=!1));g&&null!=d&&null!=d.getTitle()&&d.getTitle()!=this.defaultFilename&&z.push("title="+encodeURIComponent(d.getTitle()));A&&1<k.length&&(z.push("open="+k.substring(1)),k="");return(l&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+
-"/"+(0<z.length?"?"+z.join("&"):"")+k};EditorUi.prototype.createHtml=function(d,g,k,l,p,q,x,y,z,A,K,O){this.getBasenames();var L={};""!=p&&p!=mxConstants.NONE&&(L.highlight=p);"auto"!==l&&(L.target=l);A||(L.lightbox=!1);L.nav=this.editor.graph.foldingEnabled;k=parseInt(k);isNaN(k)||100==k||(L.zoom=k/100);k=[];x&&(k.push("pages"),L.resize=!0,null!=this.pages&&null!=this.currentPage&&(L.page=mxUtils.indexOf(this.pages,this.currentPage)));g&&(k.push("zoom"),L.resize=!0);y&&k.push("layers");z&&k.push("tags");
-0<k.length&&(A&&k.push("lightbox"),L.toolbar=k.join(" "));null!=K&&0<K.length&&(L.edit=K);null!=d?L.url=d:L.xml=this.getFileData(!0,null,null,null,null,!x);g='<div class="mxgraph" style="'+(q?"max-width:100%;":"")+(""!=k?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(L))+'"></div>';d=null!=d?"&fetch="+encodeURIComponent(d):"";O(g,'<script type="text/javascript" src="'+(0<d.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+
+"/"+(0<z.length?"?"+z.join("&"):"")+k};EditorUi.prototype.createHtml=function(d,g,k,l,p,q,x,y,z,A,J,O){this.getBasenames();var K={};""!=p&&p!=mxConstants.NONE&&(K.highlight=p);"auto"!==l&&(K.target=l);A||(K.lightbox=!1);K.nav=this.editor.graph.foldingEnabled;k=parseInt(k);isNaN(k)||100==k||(K.zoom=k/100);k=[];x&&(k.push("pages"),K.resize=!0,null!=this.pages&&null!=this.currentPage&&(K.page=mxUtils.indexOf(this.pages,this.currentPage)));g&&(k.push("zoom"),K.resize=!0);y&&k.push("layers");z&&k.push("tags");
+0<k.length&&(A&&k.push("lightbox"),K.toolbar=k.join(" "));null!=J&&0<J.length&&(K.edit=J);null!=d?K.url=d:K.xml=this.getFileData(!0,null,null,null,null,!x);g='<div class="mxgraph" style="'+(q?"max-width:100%;":"")+(""!=k?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(K))+'"></div>';d=null!=d?"&fetch="+encodeURIComponent(d):"";O(g,'<script type="text/javascript" src="'+(0<d.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+
"/embed2.js?")+d:"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(d,g,k,l){var p=document.createElement("div");p.style.whiteSpace="nowrap";var q=document.createElement("h3");mxUtils.write(q,mxResources.get("html"));q.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";p.appendChild(q);var x=document.createElement("div");
x.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var y=document.createElement("input");y.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";y.setAttribute("value","url");y.setAttribute("type","radio");y.setAttribute("name","type-embedhtmldialog");q=y.cloneNode(!0);q.setAttribute("value","copy");x.appendChild(q);var z=document.createElement("span");mxUtils.write(z,mxResources.get("includeCopyOfMyDiagram"));x.appendChild(z);mxUtils.br(x);x.appendChild(y);
z=document.createElement("span");mxUtils.write(z,mxResources.get("publicDiagramUrl"));x.appendChild(z);var A=this.getCurrentFile();null==k&&null!=A&&A.constructor==window.DriveFile&&(z=document.createElement("a"),z.style.paddingLeft="12px",z.style.color="gray",z.style.cursor="pointer",mxUtils.write(z,mxResources.get("share")),x.appendChild(z),mxEvent.addListener(z,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(A.getId())})));q.setAttribute("checked","checked");null==
-k&&y.setAttribute("disabled","disabled");p.appendChild(x);var K=this.addLinkSection(p),O=this.addCheckbox(p,mxResources.get("zoom"),!0,null,!0);mxUtils.write(p,":");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="100%";p.appendChild(L);var u=this.addCheckbox(p,mxResources.get("fit"),!0);x=null!=this.pages&&1<this.pages.length;var E=E=this.addCheckbox(p,mxResources.get("allPages"),
-x,!x),B=this.addCheckbox(p,mxResources.get("layers"),!0),D=this.addCheckbox(p,mxResources.get("tags"),!0),G=this.addCheckbox(p,mxResources.get("lightbox"),!0),N=null;x=380;if(EditorUi.enableHtmlEditOption){N=this.addEditButton(p,G);var I=N.getEditInput();I.style.marginBottom="16px";x+=50;mxEvent.addListener(G,"change",function(){G.checked?I.removeAttribute("disabled"):I.setAttribute("disabled","disabled");I.checked&&G.checked?N.getEditSelect().removeAttribute("disabled"):N.getEditSelect().setAttribute("disabled",
-"disabled")})}d=new CustomDialog(this,p,mxUtils.bind(this,function(){l(y.checked?k:null,O.checked,L.value,K.getTarget(),K.getColor(),u.checked,E.checked,B.checked,D.checked,G.checked,null!=N?N.getLink():null)}),null,d,g);this.showDialog(d.container,340,x,!0,!0);q.focus()};EditorUi.prototype.showPublishLinkDialog=function(d,g,k,l,p,q,x,y){var z=document.createElement("div");z.style.whiteSpace="nowrap";var A=document.createElement("h3");mxUtils.write(A,d||mxResources.get("link"));A.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";
-z.appendChild(A);var K=this.getCurrentFile();d=0;if(null==K||K.constructor!=window.DriveFile||g)x=null!=x?x:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{d=80;x=null!=x?x:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";A=document.createElement("div");A.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var O=document.createElement("div");O.style.whiteSpace="normal";mxUtils.write(O,mxResources.get("linkAccountRequired"));
-A.appendChild(O);O=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(K.getId())}));O.style.marginTop="12px";O.className="geBtn";A.appendChild(O);z.appendChild(A);O=document.createElement("a");O.style.paddingLeft="12px";O.style.color="gray";O.style.fontSize="11px";O.style.cursor="pointer";mxUtils.write(O,mxResources.get("check"));A.appendChild(O);mxEvent.addListener(O,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&
-this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(H){this.spinner.stop();H=new ErrorDialog(this,null,mxResources.get(null!=H?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(H.container,300,80,!0,!1);H.init()}))}))}var L=null,u=null;if(null!=k||null!=l)d+=30,mxUtils.write(z,mxResources.get("width")+":"),L=document.createElement("input"),L.setAttribute("type","text"),L.style.marginRight="16px",L.style.width="50px",L.style.marginLeft="6px",L.style.marginRight=
-"16px",L.style.marginBottom="10px",L.value="100%",z.appendChild(L),mxUtils.write(z,mxResources.get("height")+":"),u=document.createElement("input"),u.setAttribute("type","text"),u.style.width="50px",u.style.marginLeft="6px",u.style.marginBottom="10px",u.value=l+"px",z.appendChild(u),mxUtils.br(z);var E=this.addLinkSection(z,q);k=null!=this.pages&&1<this.pages.length;var B=null;if(null==K||K.constructor!=window.DriveFile||g)B=this.addCheckbox(z,mxResources.get("allPages"),k,!k);var D=this.addCheckbox(z,
-mxResources.get("lightbox"),!0,null,null,!q),G=this.addEditButton(z,D),N=G.getEditInput();q&&(N.style.marginLeft=D.style.marginLeft,D.style.display="none",d-=20);var I=this.addCheckbox(z,mxResources.get("layers"),!0);I.style.marginLeft=N.style.marginLeft;I.style.marginTop="8px";var F=this.addCheckbox(z,mxResources.get("tags"),!0);F.style.marginLeft=N.style.marginLeft;F.style.marginBottom="16px";F.style.marginTop="16px";mxEvent.addListener(D,"change",function(){D.checked?(I.removeAttribute("disabled"),
-N.removeAttribute("disabled")):(I.setAttribute("disabled","disabled"),N.setAttribute("disabled","disabled"));N.checked&&D.checked?G.getEditSelect().removeAttribute("disabled"):G.getEditSelect().setAttribute("disabled","disabled")});g=new CustomDialog(this,z,mxUtils.bind(this,function(){p(E.getTarget(),E.getColor(),null==B?!0:B.checked,D.checked,G.getLink(),I.checked,null!=L?L.value:null,null!=u?u.value:null,F.checked)}),null,mxResources.get("create"),x,y);this.showDialog(g.container,340,300+d,!0,
-!0);null!=L?(L.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?L.select():document.execCommand("selectAll",!1,null)):E.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,g,k,l,p){var q=document.createElement("div");q.style.whiteSpace="nowrap";var x=document.createElement("h3");mxUtils.write(x,mxResources.get("image"));x.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(p?"10":"4")+"px";q.appendChild(x);if(p){mxUtils.write(q,mxResources.get("zoom")+
+k&&y.setAttribute("disabled","disabled");p.appendChild(x);var J=this.addLinkSection(p),O=this.addCheckbox(p,mxResources.get("zoom"),!0,null,!0);mxUtils.write(p,":");var K=document.createElement("input");K.setAttribute("type","text");K.style.marginRight="16px";K.style.width="60px";K.style.marginLeft="4px";K.style.marginRight="12px";K.value="100%";p.appendChild(K);var u=this.addCheckbox(p,mxResources.get("fit"),!0);x=null!=this.pages&&1<this.pages.length;var E=E=this.addCheckbox(p,mxResources.get("allPages"),
+x,!x),B=this.addCheckbox(p,mxResources.get("layers"),!0),D=this.addCheckbox(p,mxResources.get("tags"),!0),G=this.addCheckbox(p,mxResources.get("lightbox"),!0),H=null;x=380;if(EditorUi.enableHtmlEditOption){H=this.addEditButton(p,G);var N=H.getEditInput();N.style.marginBottom="16px";x+=50;mxEvent.addListener(G,"change",function(){G.checked?N.removeAttribute("disabled"):N.setAttribute("disabled","disabled");N.checked&&G.checked?H.getEditSelect().removeAttribute("disabled"):H.getEditSelect().setAttribute("disabled",
+"disabled")})}d=new CustomDialog(this,p,mxUtils.bind(this,function(){l(y.checked?k:null,O.checked,K.value,J.getTarget(),J.getColor(),u.checked,E.checked,B.checked,D.checked,G.checked,null!=H?H.getLink():null)}),null,d,g);this.showDialog(d.container,340,x,!0,!0);q.focus()};EditorUi.prototype.showPublishLinkDialog=function(d,g,k,l,p,q,x,y){var z=document.createElement("div");z.style.whiteSpace="nowrap";var A=document.createElement("h3");mxUtils.write(A,d||mxResources.get("link"));A.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";
+z.appendChild(A);var J=this.getCurrentFile();d=0;if(null==J||J.constructor!=window.DriveFile||g)x=null!=x?x:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{d=80;x=null!=x?x:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";A=document.createElement("div");A.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var O=document.createElement("div");O.style.whiteSpace="normal";mxUtils.write(O,mxResources.get("linkAccountRequired"));
+A.appendChild(O);O=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(J.getId())}));O.style.marginTop="12px";O.className="geBtn";A.appendChild(O);z.appendChild(A);O=document.createElement("a");O.style.paddingLeft="12px";O.style.color="gray";O.style.fontSize="11px";O.style.cursor="pointer";mxUtils.write(O,mxResources.get("check"));A.appendChild(O);mxEvent.addListener(O,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&
+this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(I){this.spinner.stop();I=new ErrorDialog(this,null,mxResources.get(null!=I?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(I.container,300,80,!0,!1);I.init()}))}))}var K=null,u=null;if(null!=k||null!=l)d+=30,mxUtils.write(z,mxResources.get("width")+":"),K=document.createElement("input"),K.setAttribute("type","text"),K.style.marginRight="16px",K.style.width="50px",K.style.marginLeft="6px",K.style.marginRight=
+"16px",K.style.marginBottom="10px",K.value="100%",z.appendChild(K),mxUtils.write(z,mxResources.get("height")+":"),u=document.createElement("input"),u.setAttribute("type","text"),u.style.width="50px",u.style.marginLeft="6px",u.style.marginBottom="10px",u.value=l+"px",z.appendChild(u),mxUtils.br(z);var E=this.addLinkSection(z,q);k=null!=this.pages&&1<this.pages.length;var B=null;if(null==J||J.constructor!=window.DriveFile||g)B=this.addCheckbox(z,mxResources.get("allPages"),k,!k);var D=this.addCheckbox(z,
+mxResources.get("lightbox"),!0,null,null,!q),G=this.addEditButton(z,D),H=G.getEditInput();q&&(H.style.marginLeft=D.style.marginLeft,D.style.display="none",d-=20);var N=this.addCheckbox(z,mxResources.get("layers"),!0);N.style.marginLeft=H.style.marginLeft;N.style.marginTop="8px";var F=this.addCheckbox(z,mxResources.get("tags"),!0);F.style.marginLeft=H.style.marginLeft;F.style.marginBottom="16px";F.style.marginTop="16px";mxEvent.addListener(D,"change",function(){D.checked?(N.removeAttribute("disabled"),
+H.removeAttribute("disabled")):(N.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"));H.checked&&D.checked?G.getEditSelect().removeAttribute("disabled"):G.getEditSelect().setAttribute("disabled","disabled")});g=new CustomDialog(this,z,mxUtils.bind(this,function(){p(E.getTarget(),E.getColor(),null==B?!0:B.checked,D.checked,G.getLink(),N.checked,null!=K?K.value:null,null!=u?u.value:null,F.checked)}),null,mxResources.get("create"),x,y);this.showDialog(g.container,340,300+d,!0,
+!0);null!=K?(K.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?K.select():document.execCommand("selectAll",!1,null)):E.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,g,k,l,p){var q=document.createElement("div");q.style.whiteSpace="nowrap";var x=document.createElement("h3");mxUtils.write(x,mxResources.get("image"));x.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(p?"10":"4")+"px";q.appendChild(x);if(p){mxUtils.write(q,mxResources.get("zoom")+
":");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=this.lastExportZoom||"100%";q.appendChild(y);mxUtils.write(q,mxResources.get("borderWidth")+":");var z=document.createElement("input");z.setAttribute("type","text");z.style.marginRight="16px";z.style.width="60px";z.style.marginLeft="4px";z.value=this.lastExportBorder||"0";q.appendChild(z);mxUtils.br(q)}var A=this.addCheckbox(q,
-mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),K=l?null:this.addCheckbox(q,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);x=this.editor.graph;var O=l?null:this.addCheckbox(q,mxResources.get("transparentBackground"),x.background==mxConstants.NONE||null==x.background);null!=O&&(O.style.marginBottom="16px");d=new CustomDialog(this,q,mxUtils.bind(this,function(){var L=parseInt(y.value)/100||1,u=parseInt(z.value)||0;k(!A.checked,null!=K?K.checked:!1,
-null!=O?O.checked:!1,L,u)}),null,d,g);this.showDialog(d.container,300,(p?25:0)+(l?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,g,k,l,p,q,x,y,z){x=null!=x?x:Editor.defaultIncludeDiagram;var A=document.createElement("div");A.style.whiteSpace="nowrap";var K=this.editor.graph,O="jpeg"==y?220:300,L=document.createElement("h3");mxUtils.write(L,d);L.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";A.appendChild(L);mxUtils.write(A,mxResources.get("zoom")+":");
+mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),J=l?null:this.addCheckbox(q,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);x=this.editor.graph;var O=l?null:this.addCheckbox(q,mxResources.get("transparentBackground"),x.background==mxConstants.NONE||null==x.background);null!=O&&(O.style.marginBottom="16px");d=new CustomDialog(this,q,mxUtils.bind(this,function(){var K=parseInt(y.value)/100||1,u=parseInt(z.value)||0;k(!A.checked,null!=J?J.checked:!1,
+null!=O?O.checked:!1,K,u)}),null,d,g);this.showDialog(d.container,300,(p?25:0)+(l?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,g,k,l,p,q,x,y,z){x=null!=x?x:Editor.defaultIncludeDiagram;var A=document.createElement("div");A.style.whiteSpace="nowrap";var J=this.editor.graph,O="jpeg"==y?220:300,K=document.createElement("h3");mxUtils.write(K,d);K.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";A.appendChild(K);mxUtils.write(A,mxResources.get("zoom")+":");
var u=document.createElement("input");u.setAttribute("type","text");u.style.marginRight="16px";u.style.width="60px";u.style.marginLeft="4px";u.style.marginRight="12px";u.value=this.lastExportZoom||"100%";A.appendChild(u);mxUtils.write(A,mxResources.get("borderWidth")+":");var E=document.createElement("input");E.setAttribute("type","text");E.style.marginRight="16px";E.style.width="60px";E.style.marginLeft="4px";E.value=this.lastExportBorder||"0";A.appendChild(E);mxUtils.br(A);var B=this.addCheckbox(A,
-mxResources.get("selectionOnly"),!1,K.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 G=document.createElement("select");G.style.marginTop="16px";G.style.marginLeft="8px";d=["selectionOnly","diagram","page"];var N={};for(L=0;L<d.length;L++)if(!K.isSelectionEmpty()||"selectionOnly"!=d[L]){var I=document.createElement("option");mxUtils.write(I,
-mxResources.get(d[L]));I.setAttribute("value",d[L]);G.appendChild(I);N[d[L]]=I}z?(mxUtils.write(A,mxResources.get("size")+":"),A.appendChild(G),mxUtils.br(A),O+=26,mxEvent.addListener(G,"change",function(){"selectionOnly"==G.value&&(B.checked=!0)})):q&&(A.appendChild(D),mxUtils.write(A,mxResources.get("crop")),mxUtils.br(A),O+=30,mxEvent.addListener(B,"change",function(){B.checked?D.removeAttribute("disabled"):D.setAttribute("disabled","disabled")}));K.isSelectionEmpty()?z&&(B.style.display="none",
-B.nextSibling.style.display="none",B.nextSibling.nextSibling.style.display="none",O-=30):(G.value="diagram",D.setAttribute("checked","checked"),D.defaultChecked=!0,mxEvent.addListener(B,"change",function(){G.value=B.checked?"selectionOnly":"diagram"}));var F=this.addCheckbox(A,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=y),H=null;Editor.isDarkMode()&&(H=this.addCheckbox(A,mxResources.get("dark"),!0),O+=26);var R=this.addCheckbox(A,mxResources.get("shadow"),K.shadowVisible),X=null;
-if("png"==y||"jpeg"==y)X=this.addCheckbox(A,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),O+=30;var J=this.addCheckbox(A,mxResources.get("includeCopyOfMyDiagram"),x,null,null,"jpeg"!=y);J.style.marginBottom="16px";var W=document.createElement("input");W.style.marginBottom="16px";W.style.marginRight="8px";W.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||W.setAttribute("disabled","disabled");var V=document.createElement("select");V.style.maxWidth=
-"260px";V.style.marginLeft="8px";V.style.marginRight="10px";V.style.marginBottom="16px";V.className="geBtn";q=document.createElement("option");q.setAttribute("value","none");mxUtils.write(q,mxResources.get("noChange"));V.appendChild(q);q=document.createElement("option");q.setAttribute("value","embedFonts");mxUtils.write(q,mxResources.get("embedFonts"));V.appendChild(q);q=document.createElement("option");q.setAttribute("value","lblToSvg");mxUtils.write(q,mxResources.get("lblToSvg"));this.isOffline()||
-EditorUi.isElectronApp||V.appendChild(q);mxEvent.addListener(V,"change",mxUtils.bind(this,function(){"lblToSvg"==V.value?(W.checked=!0,W.setAttribute("disabled","disabled"),N.page.style.display="none","page"==G.value&&(G.value="diagram"),R.checked=!1,R.setAttribute("disabled","disabled"),C.style.display="inline-block",t.style.display="none"):"disabled"==W.getAttribute("disabled")&&(W.checked=!1,W.removeAttribute("disabled"),R.removeAttribute("disabled"),N.page.style.display="",C.style.display="none",
-t.style.display="")}));g&&(A.appendChild(W),mxUtils.write(A,mxResources.get("embedImages")),mxUtils.br(A),mxUtils.write(A,mxResources.get("txtSettings")+":"),A.appendChild(V),mxUtils.br(A),O+=60);var t=document.createElement("select");t.style.maxWidth="260px";t.style.marginLeft="8px";t.style.marginRight="10px";t.className="geBtn";g=document.createElement("option");g.setAttribute("value","auto");mxUtils.write(g,mxResources.get("automatic"));t.appendChild(g);g=document.createElement("option");g.setAttribute("value",
+mxResources.get("selectionOnly"),!1,J.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 G=document.createElement("select");G.style.marginTop="16px";G.style.marginLeft="8px";d=["selectionOnly","diagram","page"];var H={};for(K=0;K<d.length;K++)if(!J.isSelectionEmpty()||"selectionOnly"!=d[K]){var N=document.createElement("option");mxUtils.write(N,
+mxResources.get(d[K]));N.setAttribute("value",d[K]);G.appendChild(N);H[d[K]]=N}z?(mxUtils.write(A,mxResources.get("size")+":"),A.appendChild(G),mxUtils.br(A),O+=26,mxEvent.addListener(G,"change",function(){"selectionOnly"==G.value&&(B.checked=!0)})):q&&(A.appendChild(D),mxUtils.write(A,mxResources.get("crop")),mxUtils.br(A),O+=30,mxEvent.addListener(B,"change",function(){B.checked?D.removeAttribute("disabled"):D.setAttribute("disabled","disabled")}));J.isSelectionEmpty()?z&&(B.style.display="none",
+B.nextSibling.style.display="none",B.nextSibling.nextSibling.style.display="none",O-=30):(G.value="diagram",D.setAttribute("checked","checked"),D.defaultChecked=!0,mxEvent.addListener(B,"change",function(){G.value=B.checked?"selectionOnly":"diagram"}));var F=this.addCheckbox(A,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=y),I=null;Editor.isDarkMode()&&(I=this.addCheckbox(A,mxResources.get("dark"),!0),O+=26);var Q=this.addCheckbox(A,mxResources.get("shadow"),J.shadowVisible),X=null;
+if("png"==y||"jpeg"==y)X=this.addCheckbox(A,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),O+=30;var L=this.addCheckbox(A,mxResources.get("includeCopyOfMyDiagram"),x,null,null,"jpeg"!=y);L.style.marginBottom="16px";var U=document.createElement("input");U.style.marginBottom="16px";U.style.marginRight="8px";U.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||U.setAttribute("disabled","disabled");var W=document.createElement("select");W.style.maxWidth=
+"260px";W.style.marginLeft="8px";W.style.marginRight="10px";W.style.marginBottom="16px";W.className="geBtn";q=document.createElement("option");q.setAttribute("value","none");mxUtils.write(q,mxResources.get("noChange"));W.appendChild(q);q=document.createElement("option");q.setAttribute("value","embedFonts");mxUtils.write(q,mxResources.get("embedFonts"));W.appendChild(q);q=document.createElement("option");q.setAttribute("value","lblToSvg");mxUtils.write(q,mxResources.get("lblToSvg"));this.isOffline()||
+EditorUi.isElectronApp||W.appendChild(q);mxEvent.addListener(W,"change",mxUtils.bind(this,function(){"lblToSvg"==W.value?(U.checked=!0,U.setAttribute("disabled","disabled"),H.page.style.display="none","page"==G.value&&(G.value="diagram"),Q.checked=!1,Q.setAttribute("disabled","disabled"),C.style.display="inline-block",t.style.display="none"):"disabled"==U.getAttribute("disabled")&&(U.checked=!1,U.removeAttribute("disabled"),Q.removeAttribute("disabled"),H.page.style.display="",C.style.display="none",
+t.style.display="")}));g&&(A.appendChild(U),mxUtils.write(A,mxResources.get("embedImages")),mxUtils.br(A),mxUtils.write(A,mxResources.get("txtSettings")+":"),A.appendChild(W),mxUtils.br(A),O+=60);var t=document.createElement("select");t.style.maxWidth="260px";t.style.marginLeft="8px";t.style.marginRight="10px";t.className="geBtn";g=document.createElement("option");g.setAttribute("value","auto");mxUtils.write(g,mxResources.get("automatic"));t.appendChild(g);g=document.createElement("option");g.setAttribute("value",
"blank");mxUtils.write(g,mxResources.get("openInNewWindow"));t.appendChild(g);g=document.createElement("option");g.setAttribute("value","self");mxUtils.write(g,mxResources.get("openInThisWindow"));t.appendChild(g);var C=document.createElement("div");mxUtils.write(C,mxResources.get("LinksLost"));C.style.margin="7px";C.style.display="none";"svg"==y&&(mxUtils.write(A,mxResources.get("links")+":"),A.appendChild(t),A.appendChild(C),mxUtils.br(A),mxUtils.br(A),O+=50);k=new CustomDialog(this,A,mxUtils.bind(this,
-function(){this.lastExportBorder=E.value;this.lastExportZoom=u.value;p(u.value,F.checked,!B.checked,R.checked,J.checked,W.checked,E.value,D.checked,!1,t.value,null!=X?X.checked:null,null!=H?H.checked:null,G.value,"embedFonts"==V.value,"lblToSvg"==V.value)}),null,k,l);this.showDialog(k.container,340,O,!0,!0,null,null,null,null,!0);u.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?u.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,
-g,k,l,p){var q=document.createElement("div");q.style.whiteSpace="nowrap";var x=this.editor.graph;if(null!=g){var y=document.createElement("h3");mxUtils.write(y,g);y.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";q.appendChild(y)}var z=this.addCheckbox(q,mxResources.get("fit"),!0),A=this.addCheckbox(q,mxResources.get("shadow"),x.shadowVisible&&l,!l),K=this.addCheckbox(q,k),O=this.addCheckbox(q,mxResources.get("lightbox"),!0),L=this.addEditButton(q,O),u=L.getEditInput(),
-E=1<x.model.getChildCount(x.model.getRoot()),B=this.addCheckbox(q,mxResources.get("layers"),E,!E);B.style.marginLeft=u.style.marginLeft;B.style.marginBottom="12px";B.style.marginTop="8px";mxEvent.addListener(O,"change",function(){O.checked?(E&&B.removeAttribute("disabled"),u.removeAttribute("disabled")):(B.setAttribute("disabled","disabled"),u.setAttribute("disabled","disabled"));u.checked&&O.checked?L.getEditSelect().removeAttribute("disabled"):L.getEditSelect().setAttribute("disabled","disabled")});
-g=new CustomDialog(this,q,mxUtils.bind(this,function(){d(z.checked,A.checked,K.checked,O.checked,L.getLink(),B.checked)}),null,mxResources.get("embed"),p);this.showDialog(g.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,g,k,l,p,q,x,y){function z(u){var E=" ",B="";l&&(E=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(null!=K?"&page="+K:"")+(p?"&edit=_blank":"")+(q?"&layers=1":"")+"');}})(this);\"",B+="cursor:pointer;");d&&(B+="max-width:100%;");var D="";k&&(D=' width="'+Math.round(A.width)+'" height="'+Math.round(A.height)+'"');x('<img src="'+u+'"'+D+(""!=B?' style="'+B+'"':"")+E+"/>")}var A=this.editor.graph.getGraphBounds(),K=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(u){var E=l?this.getFileData(!0):null;u=
-this.createImageDataUri(u,E,"png");z(u)}),null,null,null,mxUtils.bind(this,function(u){y({message:mxResources.get("unknownError")})}),null,!0,k?2:1,null,g,null,null,Editor.defaultBorder);else if(g=this.getFileData(!0),A.width*A.height<=MAX_AREA&&g.length<=MAX_REQUEST_SIZE){var O="";k&&(O="&w="+Math.round(2*A.width)+"&h="+Math.round(2*A.height));var L=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(l?"1":"0")+O+"&xml="+encodeURIComponent(g));L.send(mxUtils.bind(this,function(){200<=L.getStatus()&&
-299>=L.getStatus()?z("data:image/png;base64,"+L.getText()):y({message:mxResources.get("unknownError")})}))}else y({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(d,g,k,l,p,q,x){var y=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!k),z=y.getElementsByTagName("a");if(null!=z)for(var A=0;A<z.length;A++){var K=z[A].getAttribute("href");null!=K&&"#"==K.charAt(0)&&"_blank"==z[A].getAttribute("target")&&z[A].removeAttribute("target")}l&&
-y.setAttribute("content",this.getFileData(!0));g&&this.editor.graph.addSvgShadow(y);if(k){var O=" ",L="";l&&(O="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"+(p?"&edit=_blank":"")+(q?"&layers=1":
-"")+"');}})(this);\"",L+="cursor:pointer;");d&&(L+="max-width:100%;");this.editor.convertImages(y,mxUtils.bind(this,function(u){x('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(u))+'"'+(""!=L?' style="'+L+'"':"")+O+"/>")}))}else L="",l&&(g=this.getSelectedPageIndex(),y.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!=g?"&page="+g:"")+(p?"&edit=_blank":"")+(q?"&layers=1":"")+"');}}})(this);"),L+="cursor:pointer;"),d&&(d=parseInt(y.getAttribute("width")),p=parseInt(y.getAttribute("height")),y.setAttribute("viewBox","-0.5 -0.5 "+d+" "+p),L+="max-width:100%;max-height:"+p+"px;",y.removeAttribute("height")),""!=L&&y.setAttribute("style",L),this.editor.addFontCss(y),this.editor.graph.mathEnabled&&this.editor.addMathCss(y),x(mxUtils.getXml(y))};EditorUi.prototype.timeSince=function(d){d=
+function(){this.lastExportBorder=E.value;this.lastExportZoom=u.value;p(u.value,F.checked,!B.checked,Q.checked,L.checked,U.checked,E.value,D.checked,!1,t.value,null!=X?X.checked:null,null!=I?I.checked:null,G.value,"embedFonts"==W.value,"lblToSvg"==W.value)}),null,k,l);this.showDialog(k.container,340,O,!0,!0,null,null,null,null,!0);u.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?u.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,
+g,k,l,p){var q=document.createElement("div");q.style.whiteSpace="nowrap";var x=this.editor.graph;if(null!=g){var y=document.createElement("h3");mxUtils.write(y,g);y.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";q.appendChild(y)}var z=this.addCheckbox(q,mxResources.get("fit"),!0),A=this.addCheckbox(q,mxResources.get("shadow"),x.shadowVisible&&l,!l),J=this.addCheckbox(q,k),O=this.addCheckbox(q,mxResources.get("lightbox"),!0),K=this.addEditButton(q,O),u=K.getEditInput(),
+E=1<x.model.getChildCount(x.model.getRoot()),B=this.addCheckbox(q,mxResources.get("layers"),E,!E);B.style.marginLeft=u.style.marginLeft;B.style.marginBottom="12px";B.style.marginTop="8px";mxEvent.addListener(O,"change",function(){O.checked?(E&&B.removeAttribute("disabled"),u.removeAttribute("disabled")):(B.setAttribute("disabled","disabled"),u.setAttribute("disabled","disabled"));u.checked&&O.checked?K.getEditSelect().removeAttribute("disabled"):K.getEditSelect().setAttribute("disabled","disabled")});
+g=new CustomDialog(this,q,mxUtils.bind(this,function(){d(z.checked,A.checked,J.checked,O.checked,K.getLink(),B.checked)}),null,mxResources.get("embed"),p);this.showDialog(g.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,g,k,l,p,q,x,y){function z(u){var E=" ",B="";l&&(E=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(null!=J?"&page="+J:"")+(p?"&edit=_blank":"")+(q?"&layers=1":"")+"');}})(this);\"",B+="cursor:pointer;");d&&(B+="max-width:100%;");var D="";k&&(D=' width="'+Math.round(A.width)+'" height="'+Math.round(A.height)+'"');x('<img src="'+u+'"'+D+(""!=B?' style="'+B+'"':"")+E+"/>")}var A=this.editor.graph.getGraphBounds(),J=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(u){var E=l?this.getFileData(!0):null;u=
+this.createImageDataUri(u,E,"png");z(u)}),null,null,null,mxUtils.bind(this,function(u){y({message:mxResources.get("unknownError")})}),null,!0,k?2:1,null,g,null,null,Editor.defaultBorder);else if(g=this.getFileData(!0),A.width*A.height<=MAX_AREA&&g.length<=MAX_REQUEST_SIZE){var O="";k&&(O="&w="+Math.round(2*A.width)+"&h="+Math.round(2*A.height));var K=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(l?"1":"0")+O+"&xml="+encodeURIComponent(g));K.send(mxUtils.bind(this,function(){200<=K.getStatus()&&
+299>=K.getStatus()?z("data:image/png;base64,"+K.getText()):y({message:mxResources.get("unknownError")})}))}else y({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(d,g,k,l,p,q,x){var y=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!k),z=y.getElementsByTagName("a");if(null!=z)for(var A=0;A<z.length;A++){var J=z[A].getAttribute("href");null!=J&&"#"==J.charAt(0)&&"_blank"==z[A].getAttribute("target")&&z[A].removeAttribute("target")}l&&
+y.setAttribute("content",this.getFileData(!0));g&&this.editor.graph.addSvgShadow(y);if(k){var O=" ",K="";l&&(O="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"+(p?"&edit=_blank":"")+(q?"&layers=1":
+"")+"');}})(this);\"",K+="cursor:pointer;");d&&(K+="max-width:100%;");this.editor.convertImages(y,mxUtils.bind(this,function(u){x('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(u))+'"'+(""!=K?' style="'+K+'"':"")+O+"/>")}))}else K="",l&&(g=this.getSelectedPageIndex(),y.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!=g?"&page="+g:"")+(p?"&edit=_blank":"")+(q?"&layers=1":"")+"');}}})(this);"),K+="cursor:pointer;"),d&&(d=parseInt(y.getAttribute("width")),p=parseInt(y.getAttribute("height")),y.setAttribute("viewBox","-0.5 -0.5 "+d+" "+p),K+="max-width:100%;max-height:"+p+"px;",y.removeAttribute("height")),""!=K&&y.setAttribute("style",K),this.editor.addFontCss(y),this.editor.graph.mathEnabled&&this.editor.addMathCss(y),x(mxUtils.getXml(y))};EditorUi.prototype.timeSince=function(d){d=
Math.floor((new Date-d)/1E3);var g=Math.floor(d/31536E3);if(1<g)return g+" "+mxResources.get("years");g=Math.floor(d/2592E3);if(1<g)return g+" "+mxResources.get("months");g=Math.floor(d/86400);if(1<g)return g+" "+mxResources.get("days");g=Math.floor(d/3600);if(1<g)return g+" "+mxResources.get("hours");g=Math.floor(d/60);return 1<g?g+" "+mxResources.get("minutes"):1==g?g+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(d,g){if(null!=d){var k=null;if("diagram"==d.nodeName)k=
d;else if("mxfile"==d.nodeName){var l=d.getElementsByTagName("diagram");if(0<l.length){k=l[0];var p=g.getGlobalVariable;g.getGlobalVariable=function(q){return"page"==q?k.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==q?1:p.apply(this,arguments)}}}null!=k&&(d=Editor.parseDiagramNode(k))}l=this.editor.graph;try{this.editor.graph=g,this.editor.setGraphXml(d)}catch(q){}finally{this.editor.graph=l}return d};EditorUi.prototype.getPngFileProperties=function(d){var g=1,k=0;if(null!=
d){if(d.hasAttribute("scale")){var l=parseFloat(d.getAttribute("scale"));!isNaN(l)&&0<l&&(g=l)}d.hasAttribute("border")&&(l=parseInt(d.getAttribute("border")),!isNaN(l)&&0<l&&(k=l))}return{scale:g,border:k}};EditorUi.prototype.getEmbeddedPng=function(d,g,k,l,p){try{var q=this.editor.graph,x=null!=q.themes&&"darkTheme"==q.defaultThemeName,y=null;if(null!=k&&0<k.length)q=this.createTemporaryGraph(x?q.getDefaultStylesheet():q.getStylesheet()),document.body.appendChild(q.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(k).documentElement,
-!0),q),y=k;else if(x||null!=this.pages&&this.currentPage!=this.pages[0]){q=this.createTemporaryGraph(x?q.getDefaultStylesheet():q.getStylesheet());var z=q.getGlobalVariable;q.setBackgroundImage=this.editor.graph.setBackgroundImage;var A=this.pages[0];this.currentPage==A?q.setBackgroundImage(this.editor.graph.backgroundImage):null!=A.viewState&&null!=A.viewState&&q.setBackgroundImage(A.viewState.backgroundImage);q.getGlobalVariable=function(K){return"page"==K?A.getName():"pagenumber"==K?1:z.apply(this,
-arguments)};document.body.appendChild(q.container);q.model.setRoot(A.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(K){try{null==y&&(y=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var O=K.toDataURL("image/png");O=Editor.writeGraphModelToPng(O,"tEXt","mxfile",encodeURIComponent(y));d(O.substring(O.lastIndexOf(",")+1));q!=this.editor.graph&&q.container.parentNode.removeChild(q.container)}catch(L){null!=g&&g(L)}}),null,null,null,mxUtils.bind(this,function(K){null!=g&&
-g(K)}),null,null,l,null,q.shadowVisible,null,q,p,null,null,null,"diagram",null)}catch(K){null!=g&&g(K)}};EditorUi.prototype.getEmbeddedSvg=function(d,g,k,l,p,q,x,y,z,A,K,O,L){y=null!=y?y:!0;K=null!=K?K:0;x=null!=z?z:g.background;x==mxConstants.NONE&&(x=null);q=g.getSvg(x,A,K,null,null,q,null,null,null,g.shadowVisible||O,null,L,"diagram");(g.shadowVisible||O)&&g.addSvgShadow(q,null,null,0==K);null!=d&&q.setAttribute("content",d);null!=k&&q.setAttribute("resource",k);var u=mxUtils.bind(this,function(E){E=
+!0),q),y=k;else if(x||null!=this.pages&&this.currentPage!=this.pages[0]){q=this.createTemporaryGraph(x?q.getDefaultStylesheet():q.getStylesheet());var z=q.getGlobalVariable;q.setBackgroundImage=this.editor.graph.setBackgroundImage;var A=this.pages[0];this.currentPage==A?q.setBackgroundImage(this.editor.graph.backgroundImage):null!=A.viewState&&null!=A.viewState&&q.setBackgroundImage(A.viewState.backgroundImage);q.getGlobalVariable=function(J){return"page"==J?A.getName():"pagenumber"==J?1:z.apply(this,
+arguments)};document.body.appendChild(q.container);q.model.setRoot(A.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(J){try{null==y&&(y=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var O=J.toDataURL("image/png");O=Editor.writeGraphModelToPng(O,"tEXt","mxfile",encodeURIComponent(y));d(O.substring(O.lastIndexOf(",")+1));q!=this.editor.graph&&q.container.parentNode.removeChild(q.container)}catch(K){null!=g&&g(K)}}),null,null,null,mxUtils.bind(this,function(J){null!=g&&
+g(J)}),null,null,l,null,q.shadowVisible,null,q,p,null,null,null,"diagram",null)}catch(J){null!=g&&g(J)}};EditorUi.prototype.getEmbeddedSvg=function(d,g,k,l,p,q,x,y,z,A,J,O,K){y=null!=y?y:!0;J=null!=J?J:0;x=null!=z?z:g.background;x==mxConstants.NONE&&(x=null);q=g.getSvg(x,A,J,null,null,q,null,null,null,g.shadowVisible||O,null,K,"diagram");(g.shadowVisible||O)&&g.addSvgShadow(q,null,null,0==J);null!=d&&q.setAttribute("content",d);null!=k&&q.setAttribute("resource",k);var u=mxUtils.bind(this,function(E){E=
(l?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(E);null!=p&&p(E);return E});g.mathEnabled&&this.editor.addMathCss(q);if(null!=p)this.embedFonts(q,mxUtils.bind(this,function(E){y?this.editor.convertImages(E,mxUtils.bind(this,function(B){u(B)})):u(E)}));else return u(q)};EditorUi.prototype.embedFonts=function(d,g){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(d,this.editor.resolvedFontCss),
-this.editor.embedExtFonts(mxUtils.bind(this,function(k){try{null!=k&&this.editor.addFontCss(d,k),g(d)}catch(l){g(d)}}))}catch(k){g(d)}}))};EditorUi.prototype.exportImage=function(d,g,k,l,p,q,x,y,z,A,K,O,L){z=null!=z?z:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var u=this.editor.graph.isSelectionEmpty();k=null!=k?k:u;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(E){this.spinner.stop();try{this.saveCanvas(E,
-p?this.getFileData(!0,null,null,null,k,y):null,z,null==this.pages||0==this.pages.length,K)}catch(B){this.handleError(B)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(E){this.spinner.stop();this.handleError(E)}),null,k,d||1,g,l,null,null,q,x,A,O,L)}catch(E){this.spinner.stop(),this.handleError(E)}}};EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.importXml=function(d,g,k,l,p,q,x){g=null!=g?g:0;k=null!=k?k:0;var y=[];try{var z=
-this.editor.graph;if(null!=d&&0<d.length){z.model.beginUpdate();try{var A=mxUtils.parseXml(d);d={};var K=this.editor.extractGraphModel(A.documentElement,null!=this.pages);if(null!=K&&"mxfile"==K.nodeName&&null!=this.pages){var O=K.getElementsByTagName("diagram");if(1==O.length&&!q){if(K=Editor.parseDiagramNode(O[0]),null!=this.currentPage&&(d[O[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var L=O[0].getAttribute("name");null!=L&&""!=L&&this.editor.graph.model.execute(new RenamePage(this,
-this.currentPage,L))}}else if(0<O.length){q=[];var u=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(d[O[0].getAttribute("id")]=this.pages[0].getId(),K=Editor.parseDiagramNode(O[0]),l=!1,u=1);for(;u<O.length;u++){var E=O[u].getAttribute("id");O[u].removeAttribute("id");var B=this.updatePageRoot(new DiagramPage(O[u]));d[E]=O[u].getAttribute("id");var D=this.pages.length;null==B.getName()&&B.setName(mxResources.get("pageWithNumber",[D+1]));z.model.execute(new ChangePage(this,B,B,D,
-!0));q.push(B)}this.updatePageLinks(d,q)}}if(null!=K&&"mxGraphModel"===K.nodeName){y=z.importGraphModel(K,g,k,l);if(null!=y)for(u=0;u<y.length;u++)this.updatePageLinksForCell(d,y[u]);var G=z.parseBackgroundImage(K.getAttribute("backgroundImage"));if(null!=G&&null!=G.originalSrc){this.updateBackgroundPageLink(d,G);var N=new ChangePageSetup(this,null,G);N.ignoreColor=!0;z.model.execute(N)}}x&&this.insertHandler(y,null,null,z.defaultVertexStyle,z.defaultEdgeStyle,!1,!0)}finally{z.model.endUpdate()}}}catch(I){if(p)throw I;
-this.handleError(I)}return y};EditorUi.prototype.updatePageLinks=function(d,g){for(var k=0;k<g.length;k++)this.updatePageLinksForCell(d,g[k].root),null!=g[k].viewState&&this.updateBackgroundPageLink(d,g[k].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,g){try{if(null!=g&&Graph.isPageLink(g.originalSrc)){var k=d[g.originalSrc.substring(g.originalSrc.indexOf(",")+1)];null!=k&&(g.originalSrc="data:page/id,"+k)}}catch(l){}};EditorUi.prototype.updatePageLinksForCell=
+this.editor.embedExtFonts(mxUtils.bind(this,function(k){try{null!=k&&this.editor.addFontCss(d,k),g(d)}catch(l){g(d)}}))}catch(k){g(d)}}))};EditorUi.prototype.exportImage=function(d,g,k,l,p,q,x,y,z,A,J,O,K){z=null!=z?z:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var u=this.editor.graph.isSelectionEmpty();k=null!=k?k:u;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(E){this.spinner.stop();try{this.saveCanvas(E,
+p?this.getFileData(!0,null,null,null,k,y):null,z,null==this.pages||0==this.pages.length,J)}catch(B){this.handleError(B)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(E){this.spinner.stop();this.handleError(E)}),null,k,d||1,g,l,null,null,q,x,A,O,K)}catch(E){this.spinner.stop(),this.handleError(E)}}};EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.importXml=function(d,g,k,l,p,q,x){g=null!=g?g:0;k=null!=k?k:0;var y=[];try{var z=
+this.editor.graph;if(null!=d&&0<d.length){z.model.beginUpdate();try{var A=mxUtils.parseXml(d);d={};var J=this.editor.extractGraphModel(A.documentElement,null!=this.pages);if(null!=J&&"mxfile"==J.nodeName&&null!=this.pages){var O=J.getElementsByTagName("diagram");if(1==O.length&&!q){if(J=Editor.parseDiagramNode(O[0]),null!=this.currentPage&&(d[O[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var K=O[0].getAttribute("name");null!=K&&""!=K&&this.editor.graph.model.execute(new RenamePage(this,
+this.currentPage,K))}}else if(0<O.length){q=[];var u=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(d[O[0].getAttribute("id")]=this.pages[0].getId(),J=Editor.parseDiagramNode(O[0]),l=!1,u=1);for(;u<O.length;u++){var E=O[u].getAttribute("id");O[u].removeAttribute("id");var B=this.updatePageRoot(new DiagramPage(O[u]));d[E]=O[u].getAttribute("id");var D=this.pages.length;null==B.getName()&&B.setName(mxResources.get("pageWithNumber",[D+1]));z.model.execute(new ChangePage(this,B,B,D,
+!0));q.push(B)}this.updatePageLinks(d,q)}}if(null!=J&&"mxGraphModel"===J.nodeName){y=z.importGraphModel(J,g,k,l);if(null!=y)for(u=0;u<y.length;u++)this.updatePageLinksForCell(d,y[u]);var G=z.parseBackgroundImage(J.getAttribute("backgroundImage"));if(null!=G&&null!=G.originalSrc){this.updateBackgroundPageLink(d,G);var H=new ChangePageSetup(this,null,G);H.ignoreColor=!0;z.model.execute(H)}}x&&this.insertHandler(y,null,null,z.defaultVertexStyle,z.defaultEdgeStyle,!1,!0)}finally{z.model.endUpdate()}}}catch(N){if(p)throw N;
+this.handleError(N)}return y};EditorUi.prototype.updatePageLinks=function(d,g){for(var k=0;k<g.length;k++)this.updatePageLinksForCell(d,g[k].root),null!=g[k].viewState&&this.updateBackgroundPageLink(d,g[k].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,g){try{if(null!=g&&Graph.isPageLink(g.originalSrc)){var k=d[g.originalSrc.substring(g.originalSrc.indexOf(",")+1)];null!=k&&(g.originalSrc="data:page/id,"+k)}}catch(l){}};EditorUi.prototype.updatePageLinksForCell=
function(d,g){var k=document.createElement("div"),l=this.editor.graph,p=l.getLinkForCell(g);null!=p&&l.setLinkForCell(g,this.updatePageLink(d,p));if(l.isHtmlLabel(g)){k.innerHTML=l.sanitizeHtml(l.getLabel(g));for(var q=k.getElementsByTagName("a"),x=!1,y=0;y<q.length;y++)p=q[y].getAttribute("href"),null!=p&&(q[y].setAttribute("href",this.updatePageLink(d,p)),x=!0);x&&l.labelChanged(g,k.innerHTML)}for(y=0;y<l.model.getChildCount(g);y++)this.updatePageLinksForCell(d,l.model.getChildAt(g,y))};EditorUi.prototype.updatePageLink=
function(d,g){if(Graph.isPageLink(g)){var k=d[g.substring(g.indexOf(",")+1)];g=null!=k?"data:page/id,"+k:null}else if("data:action/json,"==g.substring(0,17))try{var l=JSON.parse(g.substring(17));if(null!=l.actions){for(var p=0;p<l.actions.length;p++){var q=l.actions[p];if(null!=q.open&&Graph.isPageLink(q.open)){var x=q.open.substring(q.open.indexOf(",")+1);k=d[x];null!=k?q.open="data:page/id,"+k:null==this.getPageById(x)&&delete q.open}}g="data:action/json,"+JSON.stringify(l)}}catch(y){}return g};
EditorUi.prototype.isRemoteVisioFormat=function(d){return/(\.v(sd|dx))($|\?)/i.test(d)||/(\.vs(s|x))($|\?)/i.test(d)};EditorUi.prototype.importVisio=function(d,g,k,l,p){l=null!=l?l:d.name;k=null!=k?k:mxUtils.bind(this,function(x){this.handleError(x)});var q=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var x=this.isRemoteVisioFormat(l);try{var y="UNKNOWN-VISIO",z=l.lastIndexOf(".");if(0<=z&&z<l.length)y=l.substring(z+1).toUpperCase();else{var A=l.lastIndexOf("/");0<=
-A&&A<l.length&&(l=l.substring(A+1))}EditorUi.logEvent({category:y+"-MS-IMPORT-FILE",action:"filename_"+l,label:x?"remote":"local"})}catch(O){}if(x)if(null==VSD_CONVERT_URL||this.isOffline())k({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{x=new FormData;x.append("file1",d,l);var K=new XMLHttpRequest;K.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(l)?"?stencil=1":""));K.responseType="blob";this.addRemoteServiceSecurityCheck(K);
-null!=p&&K.setRequestHeader("x-convert-custom",p);K.onreadystatechange=mxUtils.bind(this,function(){if(4==K.readyState)if(200<=K.status&&299>=K.status)try{var O=K.response;if("text/xml"==O.type){var L=new FileReader;L.onload=mxUtils.bind(this,function(u){try{g(u.target.result)}catch(E){k({message:mxResources.get("errorLoadingFile")})}});L.readAsText(O)}else this.doImportVisio(O,g,k,l)}catch(u){k(u)}else try{""==K.responseType||"text"==K.responseType?k({message:K.responseText}):(L=new FileReader,L.onload=
-function(){k({message:JSON.parse(L.result).Message})},L.readAsText(K.response))}catch(u){k({})}});K.send(x)}else try{this.doImportVisio(d,g,k,l)}catch(O){k(O)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?q():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",q))};EditorUi.prototype.importGraphML=function(d,g,k){k=null!=k?k:mxUtils.bind(this,function(p){this.handleError(p)});
+A&&A<l.length&&(l=l.substring(A+1))}EditorUi.logEvent({category:y+"-MS-IMPORT-FILE",action:"filename_"+l,label:x?"remote":"local"})}catch(O){}if(x)if(null==VSD_CONVERT_URL||this.isOffline())k({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{x=new FormData;x.append("file1",d,l);var J=new XMLHttpRequest;J.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(l)?"?stencil=1":""));J.responseType="blob";this.addRemoteServiceSecurityCheck(J);
+null!=p&&J.setRequestHeader("x-convert-custom",p);J.onreadystatechange=mxUtils.bind(this,function(){if(4==J.readyState)if(200<=J.status&&299>=J.status)try{var O=J.response;if("text/xml"==O.type){var K=new FileReader;K.onload=mxUtils.bind(this,function(u){try{g(u.target.result)}catch(E){k({message:mxResources.get("errorLoadingFile")})}});K.readAsText(O)}else this.doImportVisio(O,g,k,l)}catch(u){k(u)}else try{""==J.responseType||"text"==J.responseType?k({message:J.responseText}):(K=new FileReader,K.onload=
+function(){k({message:JSON.parse(K.result).Message})},K.readAsText(J.response))}catch(u){k({})}});J.send(x)}else try{this.doImportVisio(d,g,k,l)}catch(O){k(O)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?q():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",q))};EditorUi.prototype.importGraphML=function(d,g,k){k=null!=k?k:mxUtils.bind(this,function(p){this.handleError(p)});
var l=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(d,g,k)}catch(p){k(p)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?l():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",l))};EditorUi.prototype.exportVisio=function(d){var g=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(d)||
this.handleError({message:mxResources.get("unknownError")})}catch(k){this.handleError(k)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?g():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",g))};EditorUi.prototype.convertLucidChart=function(d,g,k){var l=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{var p=
JSON.parse(d);g(LucidImporter.importState(p));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+d.length}),null!=window.console&&"1"==urlParams.test){var q=[(new Date).toISOString(),"convertLucidChart",p];null!=p.state&&q.push(JSON.parse(p.state));if(null!=p.svgThumbs)for(var x=0;x<p.svgThumbs.length;x++)q.push(Editor.createSvgDataUri(p.svgThumbs[x]));null!=p.thumb&&q.push(p.thumb);console.log.apply(console,q)}}catch(y){}}catch(y){null!=window.console&&console.error(y),k(y)}else k({message:mxResources.get("serviceUnavailableOrBlocked")})});
"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(l,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",l)})})})}):mxscript("js/extensions.min.js",l))};EditorUi.prototype.generateMermaidImage=function(d,
g,k,l){var p=this,q=function(){try{this.loadingMermaid=!1,g=null!=g?g:mxUtils.clone(EditorUi.defaultMermaidConfig),g.securityLevel="strict",g.startOnLoad=!1,Editor.isDarkMode()&&(g.theme="dark"),mermaid.mermaidAPI.initialize(g),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),d,function(x){try{if(mxClient.IS_IE||mxClient.IS_IE11)x=x.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var y=mxUtils.parseXml(x).getElementsByTagName("svg");
-if(0<y.length){var z=parseFloat(y[0].getAttribute("width")),A=parseFloat(y[0].getAttribute("height"));if(isNaN(z)||isNaN(A))try{var K=y[0].getAttribute("viewBox").split(/\s+/);z=parseFloat(K[2]);A=parseFloat(K[3])}catch(O){z=z||100,A=A||100}k(p.convertDataUri(Editor.createSvgDataUri(x)),z,A)}else l({message:mxResources.get("invalidInput")})}catch(O){l(O)}})}catch(x){l(x)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?q():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",
+if(0<y.length){var z=parseFloat(y[0].getAttribute("width")),A=parseFloat(y[0].getAttribute("height"));if(isNaN(z)||isNaN(A))try{var J=y[0].getAttribute("viewBox").split(/\s+/);z=parseFloat(J[2]);A=parseFloat(J[3])}catch(O){z=z||100,A=A||100}k(p.convertDataUri(Editor.createSvgDataUri(x)),z,A)}else l({message:mxResources.get("invalidInput")})}catch(O){l(O)}})}catch(x){l(x)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?q():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",
q):mxscript("js/extensions.min.js",q))};EditorUi.prototype.generatePlantUmlImage=function(d,g,k,l){function p(y,z,A){c1=y>>2;c2=(y&3)<<4|z>>4;c3=(z&15)<<2|A>>6;c4=A&63;r="";r+=q(c1&63);r+=q(c2&63);r+=q(c3&63);return r+=q(c4&63)}function q(y){if(10>y)return String.fromCharCode(48+y);y-=10;if(26>y)return String.fromCharCode(65+y);y-=26;if(26>y)return String.fromCharCode(97+y);y-=26;return 0==y?"-":1==y?"_":"?"}var x=new XMLHttpRequest;x.open("GET",("txt"==g?PLANT_URL+"/txt/":"png"==g?PLANT_URL+"/png/":
-PLANT_URL+"/svg/")+function(y){r="";for(i=0;i<y.length;i+=3)r=i+2==y.length?r+p(y.charCodeAt(i),y.charCodeAt(i+1),0):i+1==y.length?r+p(y.charCodeAt(i),0,0):r+p(y.charCodeAt(i),y.charCodeAt(i+1),y.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=g&&(x.responseType="blob");x.onload=function(y){if(200<=this.status&&300>this.status)if("txt"==g)k(this.response);else{var z=new FileReader;z.readAsDataURL(this.response);z.onloadend=function(A){var K=new Image;K.onload=
-function(){try{var O=K.width,L=K.height;if(0==O&&0==L){var u=z.result,E=u.indexOf(","),B=decodeURIComponent(escape(atob(u.substring(E+1)))),D=mxUtils.parseXml(B).getElementsByTagName("svg");0<D.length&&(O=parseFloat(D[0].getAttribute("width")),L=parseFloat(D[0].getAttribute("height")))}k(z.result,O,L)}catch(G){l(G)}};K.src=z.result};z.onerror=function(A){l(A)}}else l(y)};x.onerror=function(y){l(y)};x.send()};EditorUi.prototype.insertAsPreText=function(d,g,k){var l=this.editor.graph,p=null;l.getModel().beginUpdate();
-try{p=l.insertVertex(null,null,"<pre>"+d+"</pre>",g,k,1,1,"text;html=1;align=left;verticalAlign=top;"),l.updateCellSize(p,!0)}finally{l.getModel().endUpdate()}return p};EditorUi.prototype.insertTextAt=function(d,g,k,l,p,q,x,y){q=null!=q?q:!0;x=null!=x?x:!0;if(null!=d)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(d.replace(/\s+/g," "),mxUtils.bind(this,function(L){4==
-L.readyState&&200<=L.status&&299>=L.status&&this.editor.graph.setSelectionCells(this.insertTextAt(L.responseText,g,k,!0))}));else if("data:"==d.substring(0,5)||!this.isOffline()&&(p||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d))){var z=this.editor.graph;if("data:application/pdf;base64,"==d.substring(0,28)){var A=Editor.extractGraphModelFromPdf(d);if(null!=A&&0<A.length)return this.importXml(A,g,k,q,!0,y)}if(Editor.isPngDataUrl(d)&&(A=Editor.extractGraphModelFromPng(d),null!=A&&0<A.length))return this.importXml(A,
-g,k,q,!0,y);if("data:image/svg+xml;"==d.substring(0,19))try{A=null;"data:image/svg+xml;base64,"==d.substring(0,26)?(A=d.substring(d.indexOf(",")+1),A=window.atob&&!mxClient.IS_SF?atob(A):Base64.decode(A,!0)):A=decodeURIComponent(d.substring(d.indexOf(",")+1));var K=this.importXml(A,g,k,q,!0,y);if(0<K.length)return K}catch(L){}this.loadImage(d,mxUtils.bind(this,function(L){if("data:"==d.substring(0,5))this.resizeImage(L,d,mxUtils.bind(this,function(B,D,G){z.setSelectionCell(z.insertVertex(null,null,
-"",z.snap(g),z.snap(k),D,G,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(B)+";"))}),x,this.maxImageSize);else{var u=Math.min(1,Math.min(this.maxImageSize/L.width,this.maxImageSize/L.height)),E=Math.round(L.width*u);L=Math.round(L.height*u);z.setSelectionCell(z.insertVertex(null,null,"",z.snap(g),z.snap(k),E,L,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-d+";"))}}),mxUtils.bind(this,function(){var L=null;z.getModel().beginUpdate();try{L=z.insertVertex(z.getDefaultParent(),null,d,z.snap(g),z.snap(k),1,1,"text;"+(l?"html=1;":"")),z.updateCellSize(L),z.fireEvent(new mxEventObject("textInserted","cells",[L]))}finally{z.getModel().endUpdate()}z.setSelectionCell(L)}))}else{d=Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,g,k,q,null,y);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this,
-function(L){this.editor.graph.setSelectionCells(this.importXml(L,g,k,q,null,y))}),mxUtils.bind(this,function(L){this.handleError(L)}));else{z=this.editor.graph;p=null;z.getModel().beginUpdate();try{p=z.insertVertex(z.getDefaultParent(),null,"",z.snap(g),z.snap(k),1,1,"text;whiteSpace=wrap;"+(l?"html=1;":""));z.fireEvent(new mxEventObject("textInserted","cells",[p]));"<"==d.charAt(0)&&d.indexOf(">")==d.length-1&&(d=mxUtils.htmlEntities(d));d.length>this.maxTextBytes&&(d=d.substring(0,this.maxTextBytes)+
+PLANT_URL+"/svg/")+function(y){r="";for(i=0;i<y.length;i+=3)r=i+2==y.length?r+p(y.charCodeAt(i),y.charCodeAt(i+1),0):i+1==y.length?r+p(y.charCodeAt(i),0,0):r+p(y.charCodeAt(i),y.charCodeAt(i+1),y.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=g&&(x.responseType="blob");x.onload=function(y){if(200<=this.status&&300>this.status)if("txt"==g)k(this.response);else{var z=new FileReader;z.readAsDataURL(this.response);z.onloadend=function(A){var J=new Image;J.onload=
+function(){try{var O=J.width,K=J.height;if(0==O&&0==K){var u=z.result,E=u.indexOf(","),B=decodeURIComponent(escape(atob(u.substring(E+1)))),D=mxUtils.parseXml(B).getElementsByTagName("svg");0<D.length&&(O=parseFloat(D[0].getAttribute("width")),K=parseFloat(D[0].getAttribute("height")))}k(z.result,O,K)}catch(G){l(G)}};J.src=z.result};z.onerror=function(A){l(A)}}else l(y)};x.onerror=function(y){l(y)};x.send()};EditorUi.prototype.insertAsPreText=function(d,g,k){var l=this.editor.graph,p=null;l.getModel().beginUpdate();
+try{p=l.insertVertex(null,null,"<pre>"+d+"</pre>",g,k,1,1,"text;html=1;align=left;verticalAlign=top;"),l.updateCellSize(p,!0)}finally{l.getModel().endUpdate()}return p};EditorUi.prototype.insertTextAt=function(d,g,k,l,p,q,x,y){q=null!=q?q:!0;x=null!=x?x:!0;if(null!=d)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(d.replace(/\s+/g," "),mxUtils.bind(this,function(K){4==
+K.readyState&&200<=K.status&&299>=K.status&&this.editor.graph.setSelectionCells(this.insertTextAt(K.responseText,g,k,!0))}));else if("data:"==d.substring(0,5)||!this.isOffline()&&(p||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d))){var z=this.editor.graph;if("data:application/pdf;base64,"==d.substring(0,28)){var A=Editor.extractGraphModelFromPdf(d);if(null!=A&&0<A.length)return this.importXml(A,g,k,q,!0,y)}if(Editor.isPngDataUrl(d)&&(A=Editor.extractGraphModelFromPng(d),null!=A&&0<A.length))return this.importXml(A,
+g,k,q,!0,y);if("data:image/svg+xml;"==d.substring(0,19))try{A=null;"data:image/svg+xml;base64,"==d.substring(0,26)?(A=d.substring(d.indexOf(",")+1),A=window.atob&&!mxClient.IS_SF?atob(A):Base64.decode(A,!0)):A=decodeURIComponent(d.substring(d.indexOf(",")+1));var J=this.importXml(A,g,k,q,!0,y);if(0<J.length)return J}catch(K){}this.loadImage(d,mxUtils.bind(this,function(K){if("data:"==d.substring(0,5))this.resizeImage(K,d,mxUtils.bind(this,function(B,D,G){z.setSelectionCell(z.insertVertex(null,null,
+"",z.snap(g),z.snap(k),D,G,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(B)+";"))}),x,this.maxImageSize);else{var u=Math.min(1,Math.min(this.maxImageSize/K.width,this.maxImageSize/K.height)),E=Math.round(K.width*u);K=Math.round(K.height*u);z.setSelectionCell(z.insertVertex(null,null,"",z.snap(g),z.snap(k),E,K,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+d+";"))}}),mxUtils.bind(this,function(){var K=null;z.getModel().beginUpdate();try{K=z.insertVertex(z.getDefaultParent(),null,d,z.snap(g),z.snap(k),1,1,"text;"+(l?"html=1;":"")),z.updateCellSize(K),z.fireEvent(new mxEventObject("textInserted","cells",[K]))}finally{z.getModel().endUpdate()}z.setSelectionCell(K)}))}else{d=Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,g,k,q,null,y);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this,
+function(K){this.editor.graph.setSelectionCells(this.importXml(K,g,k,q,null,y))}),mxUtils.bind(this,function(K){this.handleError(K)}));else{z=this.editor.graph;p=null;z.getModel().beginUpdate();try{p=z.insertVertex(z.getDefaultParent(),null,"",z.snap(g),z.snap(k),1,1,"text;whiteSpace=wrap;"+(l?"html=1;":""));z.fireEvent(new mxEventObject("textInserted","cells",[p]));"<"==d.charAt(0)&&d.indexOf(">")==d.length-1&&(d=mxUtils.htmlEntities(d));d.length>this.maxTextBytes&&(d=d.substring(0,this.maxTextBytes)+
"...");p.value=d;z.updateCellSize(p);if(0<this.maxTextWidth&&p.geometry.width>this.maxTextWidth){var O=z.getPreferredSizeForCell(p,this.maxTextWidth);p.geometry.width=O.width;p.geometry.height=O.height}Graph.isLink(p.value)&&z.setLinkForCell(p,p.value);p.geometry.width+=z.gridSize;p.geometry.height+=z.gridSize}finally{z.getModel().endUpdate()}return[p]}}return[]};EditorUi.prototype.formatFileSize=function(d){var g=-1;do d/=1024,g++;while(1024<d);return Math.max(d,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[g]};
EditorUi.prototype.convertDataUri=function(d){if("data:"==d.substring(0,5)){var g=d.indexOf(";");0<g&&(d=d.substring(0,g)+d.substring(d.indexOf(",",g+1)))}return d};EditorUi.prototype.isRemoteFileFormat=function(d,g){return/("contentType":\s*"application\/gliffy\+json")/.test(d)};EditorUi.prototype.isLucidChartData=function(d){return null!=d&&('{"state":"{\\"Properties\\":'==d.substring(0,26)||'{"Properties":'==d.substring(0,14))};EditorUi.prototype.importLocalFile=function(d,g){if(d&&Graph.fileSupport){if(null==
this.importFileInputElt){var k=document.createElement("input");k.setAttribute("type","file");mxEvent.addListener(k,"change",mxUtils.bind(this,function(){null!=k.files&&(this.importFiles(k.files,null,null,this.maxImageSize),k.type="",k.type="file",k.value="")}));k.style.display="none";document.body.appendChild(k);this.importFileInputElt=k}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(x,y){StorageFile.listFiles(this,
"F",x,y)});window.openBrowserFile=mxUtils.bind(this,function(x,y,z){StorageFile.getFileContent(this,x,y,z)});window.deleteBrowserFile=mxUtils.bind(this,function(x,y,z){StorageFile.deleteFile(this,x,y,z)});if(!g){var l=Editor.useLocalStorage;Editor.useLocalStorage=!d}window.openFile=new OpenFile(mxUtils.bind(this,function(x){this.hideDialog(x)}));window.openFile.setConsumer(mxUtils.bind(this,function(x,y){null!=y&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(y)?(x=new Blob([x],{type:"application/octet-stream"}),
this.importVisio(x,mxUtils.bind(this,function(z){this.importXml(z,0,0,!0)}),null,y)):this.editor.graph.setSelectionCells(this.importXml(x,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!g){var p=this.dialog,q=p.close;this.dialog.close=mxUtils.bind(this,function(x){Editor.useLocalStorage=l;q.apply(p,arguments);x&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};
-EditorUi.prototype.importZipFile=function(d,g,k){var l=this,p=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(q){if(mxUtils.isEmptyObject(q.files))k();else{var x=0,y,z=!1;q.forEach(function(A,K){A=K.name.toLowerCase();"diagram/diagram.xml"==A?(z=!0,K.async("string").then(function(O){0==O.indexOf("<mxfile ")?g(O):k()})):0==A.indexOf("versions/")&&(A=parseInt(A.substr(9)),A>x&&(x=A,y=K))});0<x?y.async("string").then(function(A){(new XMLHttpRequest).upload&&
-l.isRemoteFileFormat(A,d.name)?l.isOffline()?l.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,k):l.parseFileData(A,mxUtils.bind(this,function(K){4==K.readyState&&(200<=K.status&&299>=K.status?g(K.responseText):k())}),d.name):k()}):z||k()}},function(q){k(q)}):k()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?p():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",p))};EditorUi.prototype.importFile=function(d,g,k,l,p,q,x,y,z,A,K,O){A=null!=
-A?A:!0;var L=!1,u=null,E=mxUtils.bind(this,function(B){var D=null;null!=B&&"<mxlibrary"==B.substring(0,10)?this.loadLibrary(new LocalLibrary(this,B,x)):D=this.importXml(B,k,l,A,null,null!=O?mxEvent.isControlDown(O):null);null!=y&&y(D)});"image"==g.substring(0,5)?(z=!1,"image/png"==g.substring(0,9)&&(g=K?null:this.extractGraphModelFromPng(d),null!=g&&0<g.length&&(u=this.importXml(g,k,l,A,null,null!=O?mxEvent.isControlDown(O):null),z=!0)),z||(g=this.editor.graph,z=d.indexOf(";"),0<z&&(d=d.substring(0,
-z)+d.substring(d.indexOf(",",z+1))),A&&g.isGridEnabled()&&(k=g.snap(k),l=g.snap(l)),u=[g.insertVertex(null,null,"",k,l,p,q,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+d+";")])):/(\.*<graphml )/.test(d)?(L=!0,this.importGraphML(d,E)):null!=z&&null!=x&&(/(\.v(dx|sdx?))($|\?)/i.test(x)||/(\.vs(x|sx?))($|\?)/i.test(x))?(L=!0,this.importVisio(z,E)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,x)?this.isOffline()?
-this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(L=!0,p=mxUtils.bind(this,function(B){4==B.readyState&&(200<=B.status&&299>=B.status?E(B.responseText):null!=y&&y(null))}),null!=d?this.parseFileData(d,p,x):this.parseFile(z,p,x)):0==d.indexOf("PK")&&null!=z?(L=!0,this.importZipFile(z,E,mxUtils.bind(this,function(){u=this.insertTextAt(this.validateFileData(d),k,l,!0,null,A);y(u)}))):/(\.v(sd|dx))($|\?)/i.test(x)||/(\.vs(s|x))($|\?)/i.test(x)||(u=this.insertTextAt(this.validateFileData(d),
-k,l,!0,null,A,null,null!=O?mxEvent.isControlDown(O):null));L||null==y||y(u);return u};EditorUi.prototype.importFiles=function(d,g,k,l,p,q,x,y,z,A,K,O,L){l=null!=l?l:this.maxImageSize;A=null!=A?A:this.maxImageBytes;var u=null!=g&&null!=k,E=!0;g=null!=g?g:0;k=null!=k?k:0;var B=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var D=K||this.resampleThreshold,G=0;G<d.length;G++)if("image/svg"!==d[G].type.substring(0,9)&&"image/"===d[G].type.substring(0,6)&&d[G].size>D){B=!0;break}var N=mxUtils.bind(this,function(){var I=
-this.editor.graph,F=I.gridSize;p=null!=p?p:mxUtils.bind(this,function(V,t,C,M,Q,P,S,U,T){try{return null!=V&&"<mxlibrary"==V.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,V,S)),null):this.importFile(V,t,C,M,Q,P,S,U,T,u,O,L)}catch(Y){return this.handleError(Y),null}});q=null!=q?q:mxUtils.bind(this,function(V){I.setSelectionCells(V)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var H=d.length,R=H,X=[],J=mxUtils.bind(this,function(V,t){X[V]=t;if(0==
---R){this.spinner.stop();if(null!=y)y(X);else{var C=[];I.getModel().beginUpdate();try{for(V=0;V<X.length;V++){var M=X[V]();null!=M&&(C=C.concat(M))}}finally{I.getModel().endUpdate()}}q(C)}}),W=0;W<H;W++)mxUtils.bind(this,function(V){var t=d[V];if(null!=t){var C=new FileReader;C.onload=mxUtils.bind(this,function(M){if(null==x||x(t))if("image/"==t.type.substring(0,6))if("image/svg"==t.type.substring(0,9)){var Q=Graph.clipSvgDataUri(M.target.result),P=Q.indexOf(",");P=decodeURIComponent(escape(atob(Q.substring(P+
-1))));var S=mxUtils.parseXml(P);P=S.getElementsByTagName("svg");if(0<P.length){P=P[0];var U=O?null:P.getAttribute("content");null!=U&&"<"!=U.charAt(0)&&"%"!=U.charAt(0)&&(U=unescape(window.atob?atob(U):Base64.decode(U,!0)));null!=U&&"%"==U.charAt(0)&&(U=decodeURIComponent(U));null==U||"<mxfile "!==U.substring(0,8)&&"<mxGraphModel "!==U.substring(0,14)?J(V,mxUtils.bind(this,function(){try{if(null!=S){var aa=S.getElementsByTagName("svg");if(0<aa.length){var Z=aa[0],da=Z.getAttribute("width"),ja=Z.getAttribute("height");
-da=null!=da&&"%"!=da.charAt(da.length-1)?parseFloat(da):NaN;ja=null!=ja&&"%"!=ja.charAt(ja.length-1)?parseFloat(ja):NaN;var ha=Z.getAttribute("viewBox");if(null==ha||0==ha.length)Z.setAttribute("viewBox","0 0 "+da+" "+ja);else if(isNaN(da)||isNaN(ja)){var ba=ha.split(" ");3<ba.length&&(da=parseFloat(ba[2]),ja=parseFloat(ba[3]))}Q=Editor.createSvgDataUri(mxUtils.getXml(Z));var Aa=Math.min(1,Math.min(l/Math.max(1,da)),l/Math.max(1,ja)),Ga=p(Q,t.type,g+V*F,k+V*F,Math.max(1,Math.round(da*Aa)),Math.max(1,
-Math.round(ja*Aa)),t.name);if(isNaN(da)||isNaN(ja)){var Ca=new Image;Ca.onload=mxUtils.bind(this,function(){da=Math.max(1,Ca.width);ja=Math.max(1,Ca.height);Ga[0].geometry.width=da;Ga[0].geometry.height=ja;Z.setAttribute("viewBox","0 0 "+da+" "+ja);Q=Editor.createSvgDataUri(mxUtils.getXml(Z));var Da=Q.indexOf(";");0<Da&&(Q=Q.substring(0,Da)+Q.substring(Q.indexOf(",",Da+1)));I.setCellStyles("image",Q,[Ga[0]])});Ca.src=Editor.createSvgDataUri(mxUtils.getXml(Z))}return Ga}}}catch(Da){}return null})):
-J(V,mxUtils.bind(this,function(){return p(U,"text/xml",g+V*F,k+V*F,0,0,t.name)}))}else J(V,mxUtils.bind(this,function(){return null}))}else{P=!1;if("image/png"==t.type){var T=O?null:this.extractGraphModelFromPng(M.target.result);if(null!=T&&0<T.length){var Y=new Image;Y.src=M.target.result;J(V,mxUtils.bind(this,function(){return p(T,"text/xml",g+V*F,k+V*F,Y.width,Y.height,t.name)}));P=!0}}P||(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(M.target.result,mxUtils.bind(this,function(aa){this.resizeImage(aa,M.target.result,mxUtils.bind(this,function(Z,da,ja){J(V,mxUtils.bind(this,function(){if(null!=Z&&Z.length<A){var ha=E&&this.isResampleImageSize(t.size,K)?Math.min(1,Math.min(l/da,l/ja)):1;return p(Z,t.type,g+V*F,k+V*F,Math.round(da*ha),Math.round(ja*ha),t.name)}this.handleError({message:mxResources.get("imageTooBig")});
-return null}))}),E,l,K,t.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else Q=M.target.result,p(Q,t.type,g+V*F,k+V*F,240,160,t.name,function(aa){J(V,function(){return aa})},t)});/(\.v(dx|sdx?))($|\?)/i.test(t.name)||/(\.vs(x|sx?))($|\?)/i.test(t.name)?p(null,t.type,g+V*F,k+V*F,240,160,t.name,function(M){J(V,function(){return M})},t):"image"==t.type.substring(0,5)||"application/pdf"==t.type?C.readAsDataURL(t):C.readAsText(t)}})(W)});if(B){B=
-[];for(G=0;G<d.length;G++)B.push(d[G]);d=B;this.confirmImageResize(function(I){E=I;N()},z)}else N()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(d,g){g=null!=g?g:!1;var k=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},l=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():
+EditorUi.prototype.importZipFile=function(d,g,k){var l=this,p=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(q){if(mxUtils.isEmptyObject(q.files))k();else{var x=0,y,z=!1;q.forEach(function(A,J){A=J.name.toLowerCase();"diagram/diagram.xml"==A?(z=!0,J.async("string").then(function(O){0==O.indexOf("<mxfile ")?g(O):k()})):0==A.indexOf("versions/")&&(A=parseInt(A.substr(9)),A>x&&(x=A,y=J))});0<x?y.async("string").then(function(A){(new XMLHttpRequest).upload&&
+l.isRemoteFileFormat(A,d.name)?l.isOffline()?l.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,k):l.parseFileData(A,mxUtils.bind(this,function(J){4==J.readyState&&(200<=J.status&&299>=J.status?g(J.responseText):k())}),d.name):k()}):z||k()}},function(q){k(q)}):k()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?p():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",p))};EditorUi.prototype.importFile=function(d,g,k,l,p,q,x,y,z,A,J,O){A=null!=
+A?A:!0;var K=!1,u=null,E=mxUtils.bind(this,function(B){var D=null;null!=B&&"<mxlibrary"==B.substring(0,10)?this.loadLibrary(new LocalLibrary(this,B,x)):D=this.importXml(B,k,l,A,null,null!=O?mxEvent.isControlDown(O):null);null!=y&&y(D)});"image"==g.substring(0,5)?(z=!1,"image/png"==g.substring(0,9)&&(g=J?null:this.extractGraphModelFromPng(d),null!=g&&0<g.length&&(u=this.importXml(g,k,l,A,null,null!=O?mxEvent.isControlDown(O):null),z=!0)),z||(g=this.editor.graph,z=d.indexOf(";"),0<z&&(d=d.substring(0,
+z)+d.substring(d.indexOf(",",z+1))),A&&g.isGridEnabled()&&(k=g.snap(k),l=g.snap(l)),u=[g.insertVertex(null,null,"",k,l,p,q,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+d+";")])):/(\.*<graphml )/.test(d)?(K=!0,this.importGraphML(d,E)):null!=z&&null!=x&&(/(\.v(dx|sdx?))($|\?)/i.test(x)||/(\.vs(x|sx?))($|\?)/i.test(x))?(K=!0,this.importVisio(z,E)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,x)?this.isOffline()?
+this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(K=!0,p=mxUtils.bind(this,function(B){4==B.readyState&&(200<=B.status&&299>=B.status?E(B.responseText):null!=y&&y(null))}),null!=d?this.parseFileData(d,p,x):this.parseFile(z,p,x)):0==d.indexOf("PK")&&null!=z?(K=!0,this.importZipFile(z,E,mxUtils.bind(this,function(){u=this.insertTextAt(this.validateFileData(d),k,l,!0,null,A);y(u)}))):/(\.v(sd|dx))($|\?)/i.test(x)||/(\.vs(s|x))($|\?)/i.test(x)||(u=this.insertTextAt(this.validateFileData(d),
+k,l,!0,null,A,null,null!=O?mxEvent.isControlDown(O):null));K||null==y||y(u);return u};EditorUi.prototype.importFiles=function(d,g,k,l,p,q,x,y,z,A,J,O,K){l=null!=l?l:this.maxImageSize;A=null!=A?A:this.maxImageBytes;var u=null!=g&&null!=k,E=!0;g=null!=g?g:0;k=null!=k?k:0;var B=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var D=J||this.resampleThreshold,G=0;G<d.length;G++)if("image/svg"!==d[G].type.substring(0,9)&&"image/"===d[G].type.substring(0,6)&&d[G].size>D){B=!0;break}var H=mxUtils.bind(this,function(){var N=
+this.editor.graph,F=N.gridSize;p=null!=p?p:mxUtils.bind(this,function(W,t,C,M,S,P,R,T,V){try{return null!=W&&"<mxlibrary"==W.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,W,R)),null):this.importFile(W,t,C,M,S,P,R,T,V,u,O,K)}catch(Y){return this.handleError(Y),null}});q=null!=q?q:mxUtils.bind(this,function(W){N.setSelectionCells(W)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var I=d.length,Q=I,X=[],L=mxUtils.bind(this,function(W,t){X[W]=t;if(0==
+--Q){this.spinner.stop();if(null!=y)y(X);else{var C=[];N.getModel().beginUpdate();try{for(W=0;W<X.length;W++){var M=X[W]();null!=M&&(C=C.concat(M))}}finally{N.getModel().endUpdate()}}q(C)}}),U=0;U<I;U++)mxUtils.bind(this,function(W){var t=d[W];if(null!=t){var C=new FileReader;C.onload=mxUtils.bind(this,function(M){if(null==x||x(t))if("image/"==t.type.substring(0,6))if("image/svg"==t.type.substring(0,9)){var S=Graph.clipSvgDataUri(M.target.result),P=S.indexOf(",");P=decodeURIComponent(escape(atob(S.substring(P+
+1))));var R=mxUtils.parseXml(P);P=R.getElementsByTagName("svg");if(0<P.length){P=P[0];var T=O?null:P.getAttribute("content");null!=T&&"<"!=T.charAt(0)&&"%"!=T.charAt(0)&&(T=unescape(window.atob?atob(T):Base64.decode(T,!0)));null!=T&&"%"==T.charAt(0)&&(T=decodeURIComponent(T));null==T||"<mxfile "!==T.substring(0,8)&&"<mxGraphModel "!==T.substring(0,14)?L(W,mxUtils.bind(this,function(){try{if(null!=R){var ba=R.getElementsByTagName("svg");if(0<ba.length){var Z=ba[0],da=Z.getAttribute("width"),ea=Z.getAttribute("height");
+da=null!=da&&"%"!=da.charAt(da.length-1)?parseFloat(da):NaN;ea=null!=ea&&"%"!=ea.charAt(ea.length-1)?parseFloat(ea):NaN;var ka=Z.getAttribute("viewBox");if(null==ka||0==ka.length)Z.setAttribute("viewBox","0 0 "+da+" "+ea);else if(isNaN(da)||isNaN(ea)){var aa=ka.split(" ");3<aa.length&&(da=parseFloat(aa[2]),ea=parseFloat(aa[3]))}S=Editor.createSvgDataUri(mxUtils.getXml(Z));var Ba=Math.min(1,Math.min(l/Math.max(1,da)),l/Math.max(1,ea)),Ea=p(S,t.type,g+W*F,k+W*F,Math.max(1,Math.round(da*Ba)),Math.max(1,
+Math.round(ea*Ba)),t.name);if(isNaN(da)||isNaN(ea)){var Ca=new Image;Ca.onload=mxUtils.bind(this,function(){da=Math.max(1,Ca.width);ea=Math.max(1,Ca.height);Ea[0].geometry.width=da;Ea[0].geometry.height=ea;Z.setAttribute("viewBox","0 0 "+da+" "+ea);S=Editor.createSvgDataUri(mxUtils.getXml(Z));var Da=S.indexOf(";");0<Da&&(S=S.substring(0,Da)+S.substring(S.indexOf(",",Da+1)));N.setCellStyles("image",S,[Ea[0]])});Ca.src=Editor.createSvgDataUri(mxUtils.getXml(Z))}return Ea}}}catch(Da){}return null})):
+L(W,mxUtils.bind(this,function(){return p(T,"text/xml",g+W*F,k+W*F,0,0,t.name)}))}else L(W,mxUtils.bind(this,function(){return null}))}else{P=!1;if("image/png"==t.type){var V=O?null:this.extractGraphModelFromPng(M.target.result);if(null!=V&&0<V.length){var Y=new Image;Y.src=M.target.result;L(W,mxUtils.bind(this,function(){return p(V,"text/xml",g+W*F,k+W*F,Y.width,Y.height,t.name)}));P=!0}}P||(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(M.target.result,mxUtils.bind(this,function(ba){this.resizeImage(ba,M.target.result,mxUtils.bind(this,function(Z,da,ea){L(W,mxUtils.bind(this,function(){if(null!=Z&&Z.length<A){var ka=E&&this.isResampleImageSize(t.size,J)?Math.min(1,Math.min(l/da,l/ea)):1;return p(Z,t.type,g+W*F,k+W*F,Math.round(da*ka),Math.round(ea*ka),t.name)}this.handleError({message:mxResources.get("imageTooBig")});
+return null}))}),E,l,J,t.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else S=M.target.result,p(S,t.type,g+W*F,k+W*F,240,160,t.name,function(ba){L(W,function(){return ba})},t)});/(\.v(dx|sdx?))($|\?)/i.test(t.name)||/(\.vs(x|sx?))($|\?)/i.test(t.name)?p(null,t.type,g+W*F,k+W*F,240,160,t.name,function(M){L(W,function(){return M})},t):"image"==t.type.substring(0,5)||"application/pdf"==t.type?C.readAsDataURL(t):C.readAsText(t)}})(U)});if(B){B=
+[];for(G=0;G<d.length;G++)B.push(d[G]);d=B;this.confirmImageResize(function(N){E=N;H()},z)}else H()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(d,g){g=null!=g?g:!1;var k=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},l=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():
null,p=function(q,x){if(q||g)mxSettings.setResizeImages(q?x:null),mxSettings.save();k();d(x)};null==l||g?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(q){p(q,!0)},function(q){p(q,!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):p(!1,l)};EditorUi.prototype.parseFile=function(d,g,k){k=null!=k?k:d.name;var l=new FileReader;l.onload=mxUtils.bind(this,function(){this.parseFileData(l.result,g,k)});l.readAsText(d)};EditorUi.prototype.parseFileData=function(d,g,k){var l=new XMLHttpRequest;l.open("POST",OPEN_URL);l.setRequestHeader("Content-Type","application/x-www-form-urlencoded");l.onreadystatechange=function(){g(l)};l.send("format=xml&filename="+encodeURIComponent(k)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",
-action:"size_"+file.size})}catch(p){}};EditorUi.prototype.isResampleImageSize=function(d,g){g=null!=g?g:this.resampleThreshold;return d>g};EditorUi.prototype.resizeImage=function(d,g,k,l,p,q,x){p=null!=p?p:this.maxImageSize;var y=Math.max(1,d.width),z=Math.max(1,d.height);if(l&&this.isResampleImageSize(null!=x?x:g.length,q))try{var A=Math.max(y/p,z/p);if(1<A){var K=Math.round(y/A),O=Math.round(z/A),L=document.createElement("canvas");L.width=K;L.height=O;L.getContext("2d").drawImage(d,0,0,K,O);var u=
-L.toDataURL();if(u.length<g.length){var E=document.createElement("canvas");E.width=K;E.height=O;var B=E.toDataURL();u!==B&&(g=u,y=K,z=O)}}}catch(D){}k(g,y,z)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,g,k){try{var l=new Image;l.onload=function(){l.width=0<l.width?l.width:120;l.height=0<l.height?l.height:120;g(l)};null!=k&&(l.onerror=k);l.src=d}catch(p){if(null!=k)k(p);else throw p;}};EditorUi.prototype.getDefaultSketchMode=
+action:"size_"+file.size})}catch(p){}};EditorUi.prototype.isResampleImageSize=function(d,g){g=null!=g?g:this.resampleThreshold;return d>g};EditorUi.prototype.resizeImage=function(d,g,k,l,p,q,x){p=null!=p?p:this.maxImageSize;var y=Math.max(1,d.width),z=Math.max(1,d.height);if(l&&this.isResampleImageSize(null!=x?x:g.length,q))try{var A=Math.max(y/p,z/p);if(1<A){var J=Math.round(y/A),O=Math.round(z/A),K=document.createElement("canvas");K.width=J;K.height=O;K.getContext("2d").drawImage(d,0,0,J,O);var u=
+K.toDataURL();if(u.length<g.length){var E=document.createElement("canvas");E.width=J;E.height=O;var B=E.toDataURL();u!==B&&(g=u,y=J,z=O)}}}catch(D){}k(g,y,z)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,g,k){try{var l=new Image;l.onload=function(){l.width=0<l.width?l.width:120;l.height=0<l.height?l.height:120;g(l)};null!=k&&(l.onerror=k);l.src=d}catch(p){if(null!=k)k(p);else throw p;}};EditorUi.prototype.getDefaultSketchMode=
function(){var d="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?urlParams.rough:d)};var m=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:this.getDefaultSketchMode()),null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=
mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());var d=this,g=this.editor.graph;Editor.isDarkMode()&&(g.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);Graph.touchStyle&&(g.panningHandler.isPanningTrigger=function(D){var G=D.getEvent();return null==D.getState()&&!mxEvent.isMouseEvent(G)&&!g.freehand.isDrawing()||mxEvent.isPopupTrigger(G)&&(null==D.getState()||mxEvent.isControlDown(G)||mxEvent.isShiftDown(G))});g.cellEditor.editPlantUmlData=function(D,
-G,N){var I=JSON.parse(N);G=new TextareaDialog(d,mxResources.get("plantUml")+":",I.data,function(F){null!=F&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(F,I.format,function(H,R,X){d.spinner.stop();g.getModel().beginUpdate();try{if("txt"==I.format)g.labelChanged(D,"<pre>"+H+"</pre>"),g.updateCellSize(D,!0);else{g.setCellStyles("image",d.convertDataUri(H),[D]);var J=g.model.getGeometry(D);null!=J&&(J=J.clone(),J.width=R,J.height=X,g.cellsResized([D],[J],!1))}g.setAttributeForCell(D,
-"plantUmlData",JSON.stringify({data:F,format:I.format}))}finally{g.getModel().endUpdate()}},function(H){d.handleError(H)})},null,null,400,220);d.showDialog(G.container,420,300,!0,!0);G.init()};g.cellEditor.editMermaidData=function(D,G,N){var I=JSON.parse(N);G=new TextareaDialog(d,mxResources.get("mermaid")+":",I.data,function(F){null!=F&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(F,I.config,function(H,R,X){d.spinner.stop();g.getModel().beginUpdate();try{g.setCellStyles("image",
-H,[D]);var J=g.model.getGeometry(D);null!=J&&(J=J.clone(),J.width=Math.max(J.width,R),J.height=Math.max(J.height,X),g.cellsResized([D],[J],!1));g.setAttributeForCell(D,"mermaidData",JSON.stringify({data:F,config:I.config},null,2))}finally{g.getModel().endUpdate()}},function(H){d.handleError(H)})},null,null,400,220);d.showDialog(G.container,420,300,!0,!0);G.init()};var k=g.cellEditor.startEditing;g.cellEditor.startEditing=function(D,G){try{var N=this.graph.getAttributeForCell(D,"plantUmlData");if(null!=
-N)this.editPlantUmlData(D,G,N);else if(N=this.graph.getAttributeForCell(D,"mermaidData"),null!=N)this.editMermaidData(D,G,N);else{var I=g.getCellStyle(D);"1"==mxUtils.getValue(I,"metaEdit","0")?d.showDataDialog(D):k.apply(this,arguments)}}catch(F){d.handleError(F)}};g.getLinkTitle=function(D){return d.getLinkTitle(D)};g.customLinkClicked=function(D){var G=!1;try{d.handleCustomLink(D),G=!0}catch(N){d.handleError(N)}return G};var l=g.parseBackgroundImage;g.parseBackgroundImage=function(D){var G=l.apply(this,
+G,H){var N=JSON.parse(H);G=new TextareaDialog(d,mxResources.get("plantUml")+":",N.data,function(F){null!=F&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(F,N.format,function(I,Q,X){d.spinner.stop();g.getModel().beginUpdate();try{if("txt"==N.format)g.labelChanged(D,"<pre>"+I+"</pre>"),g.updateCellSize(D,!0);else{g.setCellStyles("image",d.convertDataUri(I),[D]);var L=g.model.getGeometry(D);null!=L&&(L=L.clone(),L.width=Q,L.height=X,g.cellsResized([D],[L],!1))}g.setAttributeForCell(D,
+"plantUmlData",JSON.stringify({data:F,format:N.format}))}finally{g.getModel().endUpdate()}},function(I){d.handleError(I)})},null,null,400,220);d.showDialog(G.container,420,300,!0,!0);G.init()};g.cellEditor.editMermaidData=function(D,G,H){var N=JSON.parse(H);G=new TextareaDialog(d,mxResources.get("mermaid")+":",N.data,function(F){null!=F&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(F,N.config,function(I,Q,X){d.spinner.stop();g.getModel().beginUpdate();try{g.setCellStyles("image",
+I,[D]);var L=g.model.getGeometry(D);null!=L&&(L=L.clone(),L.width=Math.max(L.width,Q),L.height=Math.max(L.height,X),g.cellsResized([D],[L],!1));g.setAttributeForCell(D,"mermaidData",JSON.stringify({data:F,config:N.config},null,2))}finally{g.getModel().endUpdate()}},function(I){d.handleError(I)})},null,null,400,220);d.showDialog(G.container,420,300,!0,!0);G.init()};var k=g.cellEditor.startEditing;g.cellEditor.startEditing=function(D,G){try{var H=this.graph.getAttributeForCell(D,"plantUmlData");if(null!=
+H)this.editPlantUmlData(D,G,H);else if(H=this.graph.getAttributeForCell(D,"mermaidData"),null!=H)this.editMermaidData(D,G,H);else{var N=g.getCellStyle(D);"1"==mxUtils.getValue(N,"metaEdit","0")?d.showDataDialog(D):k.apply(this,arguments)}}catch(F){d.handleError(F)}};g.getLinkTitle=function(D){return d.getLinkTitle(D)};g.customLinkClicked=function(D){var G=!1;try{d.handleCustomLink(D),G=!0}catch(H){d.handleError(H)}return G};var l=g.parseBackgroundImage;g.parseBackgroundImage=function(D){var G=l.apply(this,
arguments);null!=G&&null!=G.src&&Graph.isPageLink(G.src)&&(G={originalSrc:G.src});return G};var p=g.setBackgroundImage;g.setBackgroundImage=function(D){null!=D&&null!=D.originalSrc&&(D=d.createImageForPageLink(D.originalSrc,d.currentPage,this));p.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){g.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){g.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",
-mxUtils.bind(this,function(D,G){D=null!=g.backgroundImage?g.backgroundImage.originalSrc:null;if(null!=D){var N=D.indexOf(",");if(0<N)for(D=D.substring(N+1),G=G.getProperty("patches"),N=0;N<G.length;N++)if(null!=G[N][EditorUi.DIFF_UPDATE]&&null!=G[N][EditorUi.DIFF_UPDATE][D]||null!=G[N][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(G[N][EditorUi.DIFF_REMOVE],D)){g.refreshBackgroundImage();break}}}));var q=g.getBackgroundImageObject;g.getBackgroundImageObject=function(D,G){var N=q.apply(this,arguments);
-if(null!=N&&null!=N.originalSrc)if(!G)N={src:N.originalSrc};else if(G&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var I=this.stylesheet,F=this.shapeForegroundColor,H=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";N=d.createImageForPageLink(N.originalSrc);this.shapeBackgroundColor=H;this.shapeForegroundColor=F;this.stylesheet=I}return N};var x=this.clearDefaultStyle;this.clearDefaultStyle=function(){x.apply(this,
+mxUtils.bind(this,function(D,G){D=null!=g.backgroundImage?g.backgroundImage.originalSrc:null;if(null!=D){var H=D.indexOf(",");if(0<H)for(D=D.substring(H+1),G=G.getProperty("patches"),H=0;H<G.length;H++)if(null!=G[H][EditorUi.DIFF_UPDATE]&&null!=G[H][EditorUi.DIFF_UPDATE][D]||null!=G[H][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(G[H][EditorUi.DIFF_REMOVE],D)){g.refreshBackgroundImage();break}}}));var q=g.getBackgroundImageObject;g.getBackgroundImageObject=function(D,G){var H=q.apply(this,arguments);
+if(null!=H&&null!=H.originalSrc)if(!G)H={src:H.originalSrc};else if(G&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var N=this.stylesheet,F=this.shapeForegroundColor,I=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";H=d.createImageForPageLink(H.originalSrc);this.shapeBackgroundColor=I;this.shapeForegroundColor=F;this.stylesheet=N}return H};var x=this.clearDefaultStyle;this.clearDefaultStyle=function(){x.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 y=d.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(D){D=null!=D?D:"";"1"==urlParams.dev&&(D+=(0<D.length?"&":"?")+"dev=1");return y.apply(this,arguments)};
-var z=g.addClickHandler;g.addClickHandler=function(D,G,N){var I=G;G=function(F,H){if(null==H){var R=mxEvent.getSource(F);"a"==R.nodeName.toLowerCase()&&(H=R.getAttribute("href"))}null!=H&&g.isCustomLink(H)&&(mxEvent.isTouchEvent(F)||!mxEvent.isPopupTrigger(F))&&g.customLinkClicked(H)&&mxEvent.consume(F);null!=I&&I(F,H)};z.call(this,D,G,N)};m.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(g.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var A=Menus.prototype.addPopupMenuEditItems;
-this.menus.addPopupMenuEditItems=function(D,G,N){d.editor.graph.isSelectionEmpty()?A.apply(this,arguments):d.menus.addMenuItems(D,"delete - cut copy copyAsImage - duplicate".split(" "),null,N)}}d.actions.get("print").funct=function(){d.showDialog((new PrintDialog(d)).container,360,null!=d.pages&&1<d.pages.length?470:390,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var K=g.getExportVariables;g.getExportVariables=function(){var D=K.apply(this,arguments),G=d.getCurrentFile();null!=
+var z=g.addClickHandler;g.addClickHandler=function(D,G,H){var N=G;G=function(F,I){if(null==I){var Q=mxEvent.getSource(F);"a"==Q.nodeName.toLowerCase()&&(I=Q.getAttribute("href"))}null!=I&&g.isCustomLink(I)&&(mxEvent.isTouchEvent(F)||!mxEvent.isPopupTrigger(F))&&g.customLinkClicked(I)&&mxEvent.consume(F);null!=N&&N(F,I)};z.call(this,D,G,H)};m.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(g.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var A=Menus.prototype.addPopupMenuEditItems;
+this.menus.addPopupMenuEditItems=function(D,G,H){d.editor.graph.isSelectionEmpty()?A.apply(this,arguments):d.menus.addMenuItems(D,"delete - cut copy copyAsImage - duplicate".split(" "),null,H)}}d.actions.get("print").funct=function(){d.showDialog((new PrintDialog(d)).container,360,null!=d.pages&&1<d.pages.length?470:390,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var J=g.getExportVariables;g.getExportVariables=function(){var D=J.apply(this,arguments),G=d.getCurrentFile();null!=
G&&(D.filename=G.getTitle());D.pagecount=null!=d.pages?d.pages.length:1;D.page=null!=d.currentPage?d.currentPage.getName():"";D.pagenumber=null!=d.pages&&null!=d.currentPage?mxUtils.indexOf(d.pages,d.currentPage)+1:1;return D};var O=g.getGlobalVariable;g.getGlobalVariable=function(D){var G=d.getCurrentFile();return"filename"==D&&null!=G?G.getTitle():"page"==D&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==D?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+1:1:
-"pagecount"==D?null!=d.pages?d.pages.length:1:O.apply(this,arguments)};var L=g.labelLinkClicked;g.labelLinkClicked=function(D,G,N){var I=G.getAttribute("href");if(null==I||!g.isCustomLink(I)||!mxEvent.isTouchEvent(N)&&mxEvent.isPopupTrigger(N))L.apply(this,arguments);else{if(!g.isEnabled()||null!=D&&g.isCellLocked(D.cell))g.customLinkClicked(I),g.getRubberband().reset();mxEvent.consume(N)}};this.editor.getOrCreateFilename=function(){var D=d.defaultFilename,G=d.getCurrentFile();null!=G&&(D=null!=G.getTitle()?
+"pagecount"==D?null!=d.pages?d.pages.length:1:O.apply(this,arguments)};var K=g.labelLinkClicked;g.labelLinkClicked=function(D,G,H){var N=G.getAttribute("href");if(null==N||!g.isCustomLink(N)||!mxEvent.isTouchEvent(H)&&mxEvent.isPopupTrigger(H))K.apply(this,arguments);else{if(!g.isEnabled()||null!=D&&g.isCellLocked(D.cell))g.customLinkClicked(N),g.getRubberband().reset();mxEvent.consume(H)}};this.editor.getOrCreateFilename=function(){var D=d.defaultFilename,G=d.getCurrentFile();null!=G&&(D=null!=G.getTitle()?
G.getTitle():D);return D};var u=this.actions.get("print");u.setEnabled(!mxClient.IS_IOS||!navigator.standalone);u.visible=u.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"insertRectangle"),this.keyHandler.bindAction(75,
-!0,"insertEllipse",!0),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&g.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(D){var G=g.cellEditor.text2,N=null;null!=G&&(mxEvent.addListener(G,"dragleave",function(I){null!=N&&(N.parentNode.removeChild(N),N=null);I.stopPropagation();
-I.preventDefault()}),mxEvent.addListener(G,"dragover",mxUtils.bind(this,function(I){null==N&&(!mxClient.IS_IE||10<document.documentMode)&&(N=this.highlightElement(G));I.stopPropagation();I.preventDefault()})),mxEvent.addListener(G,"drop",mxUtils.bind(this,function(I){null!=N&&(N.parentNode.removeChild(N),N=null);if(0<I.dataTransfer.files.length)this.importFiles(I.dataTransfer.files,0,0,this.maxImageSize,function(H,R,X,J,W,V){g.insertImage(H,W,V)},function(){},function(H){return"image/"==H.type.substring(0,
-6)},function(H){for(var R=0;R<H.length;R++)H[R]()},mxEvent.isControlDown(I));else if(0<=mxUtils.indexOf(I.dataTransfer.types,"text/uri-list")){var F=I.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(F)?this.loadImage(decodeURIComponent(F),mxUtils.bind(this,function(H){var R=Math.max(1,H.width);H=Math.max(1,H.height);var X=this.maxImageSize;X=Math.min(1,Math.min(X/Math.max(1,R)),X/Math.max(1,H));g.insertImage(decodeURIComponent(F),R*X,H*X)})):document.execCommand("insertHTML",
-!1,I.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(I.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,I.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(I.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,I.dataTransfer.getData("text/plain"));I.stopPropagation();I.preventDefault()})))}));this.isSettingsEnabled()&&(u=this.editor.graph.view,u.setUnit(mxSettings.getUnit()),u.addListener("unitChanged",function(D,G){mxSettings.setUnit(G.getProperty("unit"));
+!0,"insertEllipse",!0),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&g.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(D){var G=g.cellEditor.text2,H=null;null!=G&&(mxEvent.addListener(G,"dragleave",function(N){null!=H&&(H.parentNode.removeChild(H),H=null);N.stopPropagation();
+N.preventDefault()}),mxEvent.addListener(G,"dragover",mxUtils.bind(this,function(N){null==H&&(!mxClient.IS_IE||10<document.documentMode)&&(H=this.highlightElement(G));N.stopPropagation();N.preventDefault()})),mxEvent.addListener(G,"drop",mxUtils.bind(this,function(N){null!=H&&(H.parentNode.removeChild(H),H=null);if(0<N.dataTransfer.files.length)this.importFiles(N.dataTransfer.files,0,0,this.maxImageSize,function(I,Q,X,L,U,W){g.insertImage(I,U,W)},function(){},function(I){return"image/"==I.type.substring(0,
+6)},function(I){for(var Q=0;Q<I.length;Q++)I[Q]()},mxEvent.isControlDown(N));else if(0<=mxUtils.indexOf(N.dataTransfer.types,"text/uri-list")){var F=N.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(F)?this.loadImage(decodeURIComponent(F),mxUtils.bind(this,function(I){var Q=Math.max(1,I.width);I=Math.max(1,I.height);var X=this.maxImageSize;X=Math.min(1,Math.min(X/Math.max(1,Q)),X/Math.max(1,I));g.insertImage(decodeURIComponent(F),Q*X,I*X)})):document.execCommand("insertHTML",
+!1,N.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(N.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,N.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(N.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,N.dataTransfer.getData("text/plain"));N.stopPropagation();N.preventDefault()})))}));this.isSettingsEnabled()&&(u=this.editor.graph.view,u.setUnit(mxSettings.getUnit()),u.addListener("unitChanged",function(D,G){mxSettings.setUnit(G.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,u.unit),this.refresh());if("1"==urlParams.styledev){u=document.getElementById("geFooter");null!=u&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left=
"2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),u.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(D,G){0<this.editor.graph.getSelectionCount()?(D=this.editor.graph.getSelectionCell(),
D=this.editor.graph.getModel().getStyle(D),this.styleInput.value=D||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var E=this.isSelectionAllowed;this.isSelectionAllowed=function(D){return mxEvent.getSource(D)==this.styleInput?!0:E.apply(this,arguments)}}u=document.getElementById("geInfo");null!=u&&u.parentNode.removeChild(u);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var B=null;mxEvent.addListener(g.container,"dragleave",function(D){g.isEnabled()&&
(null!=B&&(B.parentNode.removeChild(B),B=null),D.stopPropagation(),D.preventDefault())});mxEvent.addListener(g.container,"dragover",mxUtils.bind(this,function(D){null==B&&(!mxClient.IS_IE||10<document.documentMode)&&(B=this.highlightElement(g.container));null!=this.sidebar&&this.sidebar.hideTooltip();D.stopPropagation();D.preventDefault()}));mxEvent.addListener(g.container,"drop",mxUtils.bind(this,function(D){null!=B&&(B.parentNode.removeChild(B),B=null);if(g.isEnabled()){var G=mxUtils.convertPoint(g.container,
-mxEvent.getClientX(D),mxEvent.getClientY(D)),N=D.dataTransfer.files,I=g.view.translate,F=g.view.scale,H=G.x/F-I.x,R=G.y/F-I.y;if(0<N.length)G=1==N.length&&this.isBlankFile()&&!this.canUndo()&&("image/svg"===N[0].type.substring(0,9)||"image/"!==N[0].type.substring(0,6)||/(\.drawio.png)$/i.test(N[0].name)),"1"!=urlParams.embed&&(mxEvent.isShiftDown(D)||G)?(!mxEvent.isShiftDown(D)&&G&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(N,!0)):(mxEvent.isAltDown(D)&&(R=H=null),this.importFiles(N,
-H,R,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(D),null,null,mxEvent.isShiftDown(D),D));else{mxEvent.isAltDown(D)&&(R=H=0);var X=0<=mxUtils.indexOf(D.dataTransfer.types,"text/uri-list")?D.dataTransfer.getData("text/uri-list"):null;N=this.extractGraphModelFromEvent(D,null!=this.pages);if(null!=N)g.setSelectionCells(this.importXml(N,H,R,!0));else if(0<=mxUtils.indexOf(D.dataTransfer.types,"text/html")){var J=D.dataTransfer.getData("text/html");N=document.createElement("div");N.innerHTML=
-g.sanitizeHtml(J);var W=null;G=N.getElementsByTagName("img");null!=G&&1==G.length?(J=G[0].getAttribute("src"),null==J&&(J=G[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(J)||(W=!0)):(G=N.getElementsByTagName("a"),null!=G&&1==G.length?J=G[0].getAttribute("href"):(N=N.getElementsByTagName("pre"),null!=N&&1==N.length&&(J=mxUtils.getTextContent(N[0]))));var V=!0,t=mxUtils.bind(this,function(){g.setSelectionCells(this.insertTextAt(J,H,R,!0,W,null,V,mxEvent.isControlDown(D)))});W&&null!=
-J&&J.length>this.resampleThreshold?this.confirmImageResize(function(C){V=C;t()},mxEvent.isControlDown(D)):t()}else null!=X&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(X)?this.loadImage(decodeURIComponent(X),mxUtils.bind(this,function(C){var M=Math.max(1,C.width);C=Math.max(1,C.height);var Q=this.maxImageSize;Q=Math.min(1,Math.min(Q/Math.max(1,M)),Q/Math.max(1,C));g.setSelectionCell(g.insertVertex(null,null,"",H,R,M*Q,C*Q,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-X+";"))}),mxUtils.bind(this,function(C){g.setSelectionCells(this.insertTextAt(X,H,R,!0))})):0<=mxUtils.indexOf(D.dataTransfer.types,"text/plain")&&g.setSelectionCells(this.insertTextAt(D.dataTransfer.getData("text/plain"),H,R,!0))}}D.stopPropagation();D.preventDefault()}),!1)}g.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var d=this.editor.graph;d.container.addEventListener("paste",
-mxUtils.bind(this,function(g){if(!mxEvent.isConsumed(g))try{for(var k=g.clipboardData||g.originalEvent.clipboardData,l=!1,p=0;p<k.types.length;p++)if("text/"===k.types[p].substring(0,5)){l=!0;break}if(!l){var q=k.items;for(index in q){var x=q[index];if("file"===x.kind){if(d.isEditing())this.importFiles([x.getAsFile()],0,0,this.maxImageSize,function(z,A,K,O,L,u){d.insertImage(z,L,u)},function(){},function(z){return"image/"==z.type.substring(0,6)},function(z){for(var A=0;A<z.length;A++)z[A]()});else{var y=
+mxEvent.getClientX(D),mxEvent.getClientY(D)),H=D.dataTransfer.files,N=g.view.translate,F=g.view.scale,I=G.x/F-N.x,Q=G.y/F-N.y;if(0<H.length)G=1==H.length&&this.isBlankFile()&&!this.canUndo()&&("image/svg"===H[0].type.substring(0,9)||"image/"!==H[0].type.substring(0,6)||/(\.drawio.png)$/i.test(H[0].name)),"1"!=urlParams.embed&&(mxEvent.isShiftDown(D)||G)?(!mxEvent.isShiftDown(D)&&G&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(H,!0)):(mxEvent.isAltDown(D)&&(Q=I=null),this.importFiles(H,
+I,Q,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(D),null,null,mxEvent.isShiftDown(D),D));else{mxEvent.isAltDown(D)&&(Q=I=0);var X=0<=mxUtils.indexOf(D.dataTransfer.types,"text/uri-list")?D.dataTransfer.getData("text/uri-list"):null;H=this.extractGraphModelFromEvent(D,null!=this.pages);if(null!=H)g.setSelectionCells(this.importXml(H,I,Q,!0));else if(0<=mxUtils.indexOf(D.dataTransfer.types,"text/html")){var L=D.dataTransfer.getData("text/html");H=document.createElement("div");H.innerHTML=
+g.sanitizeHtml(L);var U=null;G=H.getElementsByTagName("img");null!=G&&1==G.length?(L=G[0].getAttribute("src"),null==L&&(L=G[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(L)||(U=!0)):(G=H.getElementsByTagName("a"),null!=G&&1==G.length?L=G[0].getAttribute("href"):(H=H.getElementsByTagName("pre"),null!=H&&1==H.length&&(L=mxUtils.getTextContent(H[0]))));var W=!0,t=mxUtils.bind(this,function(){g.setSelectionCells(this.insertTextAt(L,I,Q,!0,U,null,W,mxEvent.isControlDown(D)))});U&&null!=
+L&&L.length>this.resampleThreshold?this.confirmImageResize(function(C){W=C;t()},mxEvent.isControlDown(D)):t()}else null!=X&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(X)?this.loadImage(decodeURIComponent(X),mxUtils.bind(this,function(C){var M=Math.max(1,C.width);C=Math.max(1,C.height);var S=this.maxImageSize;S=Math.min(1,Math.min(S/Math.max(1,M)),S/Math.max(1,C));g.setSelectionCell(g.insertVertex(null,null,"",I,Q,M*S,C*S,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+X+";"))}),mxUtils.bind(this,function(C){g.setSelectionCells(this.insertTextAt(X,I,Q,!0))})):0<=mxUtils.indexOf(D.dataTransfer.types,"text/plain")&&g.setSelectionCells(this.insertTextAt(D.dataTransfer.getData("text/plain"),I,Q,!0))}}D.stopPropagation();D.preventDefault()}),!1)}g.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var d=this.editor.graph;d.container.addEventListener("paste",
+mxUtils.bind(this,function(g){if(!mxEvent.isConsumed(g))try{for(var k=g.clipboardData||g.originalEvent.clipboardData,l=!1,p=0;p<k.types.length;p++)if("text/"===k.types[p].substring(0,5)){l=!0;break}if(!l){var q=k.items;for(index in q){var x=q[index];if("file"===x.kind){if(d.isEditing())this.importFiles([x.getAsFile()],0,0,this.maxImageSize,function(z,A,J,O,K,u){d.insertImage(z,K,u)},function(){},function(z){return"image/"==z.type.substring(0,6)},function(z){for(var A=0;A<z.length;A++)z[A]()});else{var y=
this.editor.graph.getInsertPoint();this.importFiles([x.getAsFile()],y.x,y.y,this.maxImageSize);mxEvent.consume(g)}break}}}}catch(z){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function d(){window.setTimeout(function(){k.innerHTML="&nbsp;";k.focus();document.execCommand("selectAll",!1,null)},0)}var g=this.editor.graph,k=document.createElement("div");k.setAttribute("autocomplete","off");k.setAttribute("autocorrect","off");k.setAttribute("autocapitalize","off");k.setAttribute("spellcheck",
"false");k.style.textRendering="optimizeSpeed";k.style.fontFamily="monospace";k.style.wordBreak="break-all";k.style.background="transparent";k.style.color="transparent";k.style.position="absolute";k.style.whiteSpace="nowrap";k.style.overflow="hidden";k.style.display="block";k.style.fontSize="1";k.style.zIndex="-1";k.style.resize="none";k.style.outline="none";k.style.width="1px";k.style.height="1px";mxUtils.setOpacity(k,0);k.contentEditable=!0;k.innerHTML="&nbsp;";var l=!1;this.keyHandler.bindControlKey(88,
null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(q){var x=mxEvent.getSource(q);null==g.container||!g.isEnabled()||g.isMouseDown||g.isEditing()||null!=this.dialog||"INPUT"==x.nodeName||"TEXTAREA"==x.nodeName||224!=q.keyCode&&(mxClient.IS_MAC||17!=q.keyCode)&&(!mxClient.IS_MAC||91!=q.keyCode&&93!=q.keyCode)||l||(k.style.left=g.container.scrollLeft+10+"px",k.style.top=g.container.scrollTop+10+"px",
@@ -12009,9 +12005,9 @@ mxUtils.sortCells(k.model.getTopmostCells(k.getSelectionCells())),p=mxUtils.getX
g=mxUtils.getXml(g.encodeCells(d)),navigator.clipboard.writeText(g))}return d};EditorUi.prototype.pasteXml=function(d,g,k,l){var p=this.editor.graph,q=null;p.lastPasteXml==d?p.pasteCounter++:(p.lastPasteXml=d,p.pasteCounter=0);var x=p.pasteCounter*p.gridSize;if(k||this.isCompatibleString(d))q=this.importXml(d,x,x),p.setSelectionCells(q);else if(g&&1==p.getSelectionCount()){x=p.getStartEditingCell(p.getSelectionCell(),l);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&"image"==p.getCurrentCellStyle(x)[mxConstants.STYLE_SHAPE])p.setCellStyles(mxConstants.STYLE_IMAGE,
d,[x]);else{p.model.beginUpdate();try{p.labelChanged(x,d),Graph.isLink(d)&&p.setLinkForCell(x,d)}finally{p.model.endUpdate()}}p.setSelectionCell(x)}else q=p.getInsertPoint(),p.isMouseInsertPoint()&&(x=0,p.lastPasteXml==d&&0<p.pasteCounter&&p.pasteCounter--),q=this.insertTextAt(d,q.x+x,q.y+x,!0),p.setSelectionCells(q);p.isSelectionEmpty()||(p.scrollCellToVisible(p.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(p.view.getState(p.getSelectionCell())));return q};EditorUi.prototype.pasteCells=
function(d,g,k,l){if(!mxEvent.isConsumed(d)){var p=g,q=!1;if(k&&null!=d.clipboardData&&d.clipboardData.getData){var x=d.clipboardData.getData("text/plain"),y=!1;if(null!=x&&0<x.length&&"%3CmxGraphModel%3E"==x.substring(0,18))try{var z=decodeURIComponent(x);this.isCompatibleString(z)&&(y=!0,x=z)}catch(O){}y=y?null:d.clipboardData.getData("text/html");null!=y&&0<y.length?(p=this.parseHtmlData(y),q="text/plain"!=p.getAttribute("data-type")):null!=x&&0<x.length&&(p=document.createElement("div"),mxUtils.setTextContent(p,
-y))}x=p.getElementsByTagName("span");if(null!=x&&0<x.length&&"application/vnd.lucid.chart.objects"===x[0].getAttribute("data-lucid-type"))k=x[0].getAttribute("data-lucid-content"),null!=k&&0<k.length&&(this.convertLucidChart(k,mxUtils.bind(this,function(O){var L=this.editor.graph;L.lastPasteXml==O?L.pasteCounter++:(L.lastPasteXml=O,L.pasteCounter=0);var u=L.pasteCounter*L.gridSize;L.setSelectionCells(this.importXml(O,u,u));L.scrollCellToVisible(L.getSelectionCell())}),mxUtils.bind(this,function(O){this.handleError(O)})),
+y))}x=p.getElementsByTagName("span");if(null!=x&&0<x.length&&"application/vnd.lucid.chart.objects"===x[0].getAttribute("data-lucid-type"))k=x[0].getAttribute("data-lucid-content"),null!=k&&0<k.length&&(this.convertLucidChart(k,mxUtils.bind(this,function(O){var K=this.editor.graph;K.lastPasteXml==O?K.pasteCounter++:(K.lastPasteXml=O,K.pasteCounter=0);var u=K.pasteCounter*K.gridSize;K.setSelectionCells(this.importXml(O,u,u));K.scrollCellToVisible(K.getSelectionCell())}),mxUtils.bind(this,function(O){this.handleError(O)})),
mxEvent.consume(d));else{q=q?p.innerHTML:mxUtils.trim(null==p.innerText?mxUtils.getTextContent(p):p.innerText);y=!1;try{var A=q.lastIndexOf("%3E");0<=A&&A<q.length-3&&(q=q.substring(0,A+3))}catch(O){}try{x=p.getElementsByTagName("span"),(z=null!=x&&0<x.length?mxUtils.trim(decodeURIComponent(x[0].textContent)):decodeURIComponent(q))&&(this.isCompatibleString(z)||0==z.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(y=!0,q=z)}catch(O){}try{if(null!=q&&0<q.length){if(0==q.substring(0,
-20).replace(/\s/g,"").indexOf('{"isProtected":'))try{"undefined"!==typeof MiroImporter&&(q=(new MiroImporter).importMiroJson(JSON.parse(q)))}catch(O){console.log("Miro import error:",O)}this.pasteXml(q,l,y,d);try{mxEvent.consume(d)}catch(O){}}else if(!k){var K=this.editor.graph;K.lastPasteXml=null;K.pasteCounter=0}}catch(O){this.handleError(O)}}}g.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(d){if(Graph.fileSupport)for(var g=null,k=0;k<d.length;k++)mxEvent.addListener(d[k],"dragleave",
+20).replace(/\s/g,"").indexOf('{"isProtected":'))try{"undefined"!==typeof MiroImporter&&(q=(new MiroImporter).importMiroJson(JSON.parse(q)))}catch(O){console.log("Miro import error:",O)}this.pasteXml(q,l,y,d);try{mxEvent.consume(d)}catch(O){}}else if(!k){var J=this.editor.graph;J.lastPasteXml=null;J.pasteCounter=0}}catch(O){this.handleError(O)}}}g.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(d){if(Graph.fileSupport)for(var g=null,k=0;k<d.length;k++)mxEvent.addListener(d[k],"dragleave",
function(l){null!=g&&(g.parentNode.removeChild(g),g=null);l.stopPropagation();l.preventDefault()}),mxEvent.addListener(d[k],"dragover",mxUtils.bind(this,function(l){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==g&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(g=this.highlightElement());l.stopPropagation();l.preventDefault()})),mxEvent.addListener(d[k],"drop",mxUtils.bind(this,function(l){null!=g&&(g.parentNode.removeChild(g),g=null);if(this.editor.graph.isEnabled()||
"1"!=urlParams.embed)if(0<l.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(l.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(l)&&!mxEvent.isShiftDown(l)):this.openFiles(l.dataTransfer.files,!0);else{var p=this.extractGraphModelFromEvent(l);if(null==p){var q=null!=l.dataTransfer?l.dataTransfer:l.clipboardData;null!=q&&(10==document.documentMode||11==document.documentMode?p=q.getData("Text"):(p=null,p=0<=mxUtils.indexOf(q.types,
"text/uri-list")?l.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(q.types,"text/html")?q.getData("text/html"):null,null!=p&&0<p.length?(q=document.createElement("div"),q.innerHTML=this.editor.graph.sanitizeHtml(p),q=q.getElementsByTagName("img"),0<q.length&&(p=q[0].getAttribute("src"))):0<=mxUtils.indexOf(q.types,"text/plain")&&(p=q.getData("text/plain"))),null!=p&&(Editor.isPngDataUrl(p)?(p=Editor.extractGraphModelFromPng(p),null!=p&&0<p.length&&this.openLocalFile(p,null,!0)):this.isRemoteFileFormat(p)?
@@ -12035,58 +12031,58 @@ if(null==g||0==g.length)g=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile
this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(d,g){null!=d?d.getPublicUrl(g):g(null)};EditorUi.prototype.createLoadMessage=function(d){var g=this.editor.graph;return{event:d,pageVisible:g.pageVisible,translate:g.view.translate,bounds:g.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:g.view.scale,page:g.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(d){var g=this.editor.graph;
g.isEditing()&&g.stopEditing(!g.isInvokesStopCellEditing());var k=window.opener||window.parent;if(this.editor.modified){var l=g.background;if(null==l||l==mxConstants.NONE)l=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),g,null,!0,mxUtils.bind(this,function(p){k.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=d?!d:!0,data:Editor.createSvgDataUri(p)}),"*")}),null,null,!0,l,1,this.embedExportBorder)}else d||
k.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");d||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,g.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler=function(d){var g=null,k=!1,l=!1,p=null,q=mxUtils.bind(this,function(z,A){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,q);mxEvent.addListener(window,"message",mxUtils.bind(this,function(z){if(z.source==(window.opener||window.parent)){var A=z.data,K=null,O=mxUtils.bind(this,function(T){if(null!=T&&"function"===typeof T.charAt&&"<"!=T.charAt(0))try{Editor.isPngDataUrl(T)?T=Editor.extractGraphModelFromPng(T):"data:image/svg+xml;base64,"==T.substring(0,
-26)?T=atob(T.substring(26)):"data:image/svg+xml;utf8,"==T.substring(0,24)&&(T=T.substring(24)),null!=T&&("%"==T.charAt(0)?T=decodeURIComponent(T):"<"!=T.charAt(0)&&(T=Graph.decompress(T)))}catch(Y){}return T});if("json"==urlParams.proto){var L=!1;try{A=JSON.parse(A),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[z],"data",[A])}catch(T){A=null}try{if(null==A)return;if("dialog"==A.action){this.showError(null!=A.titleKey?mxResources.get(A.titleKey):A.title,null!=A.messageKey?mxResources.get(A.messageKey):
-A.message,null!=A.buttonKey?mxResources.get(A.buttonKey):A.button);null!=A.modified&&(this.editor.modified=A.modified);return}if("layout"==A.action){this.executeLayouts(this.editor.graph.createLayouts(A.layouts));return}if("prompt"==A.action){this.spinner.stop();var u=new FilenameDialog(this,A.defaultValue||"",null!=A.okKey?mxResources.get(A.okKey):A.ok,function(T){null!=T?x.postMessage(JSON.stringify({event:"prompt",value:T,message:A}),"*"):x.postMessage(JSON.stringify({event:"prompt-cancel",message:A}),
+urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,q);mxEvent.addListener(window,"message",mxUtils.bind(this,function(z){if(z.source==(window.opener||window.parent)){var A=z.data,J=null,O=mxUtils.bind(this,function(V){if(null!=V&&"function"===typeof V.charAt&&"<"!=V.charAt(0))try{Editor.isPngDataUrl(V)?V=Editor.extractGraphModelFromPng(V):"data:image/svg+xml;base64,"==V.substring(0,
+26)?V=atob(V.substring(26)):"data:image/svg+xml;utf8,"==V.substring(0,24)&&(V=V.substring(24)),null!=V&&("%"==V.charAt(0)?V=decodeURIComponent(V):"<"!=V.charAt(0)&&(V=Graph.decompress(V)))}catch(Y){}return V});if("json"==urlParams.proto){var K=!1;try{A=JSON.parse(A),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[z],"data",[A])}catch(V){A=null}try{if(null==A)return;if("dialog"==A.action){this.showError(null!=A.titleKey?mxResources.get(A.titleKey):A.title,null!=A.messageKey?mxResources.get(A.messageKey):
+A.message,null!=A.buttonKey?mxResources.get(A.buttonKey):A.button);null!=A.modified&&(this.editor.modified=A.modified);return}if("layout"==A.action){this.executeLayouts(this.editor.graph.createLayouts(A.layouts));return}if("prompt"==A.action){this.spinner.stop();var u=new FilenameDialog(this,A.defaultValue||"",null!=A.okKey?mxResources.get(A.okKey):A.ok,function(V){null!=V?x.postMessage(JSON.stringify({event:"prompt",value:V,message:A}),"*"):x.postMessage(JSON.stringify({event:"prompt-cancel",message:A}),
"*")},null!=A.titleKey?mxResources.get(A.titleKey):A.title);this.showDialog(u.container,300,80,!0,!1);u.init();return}if("draft"==A.action){var E=O(A.xml);this.spinner.stop();u=new DraftDialog(this,mxResources.get("draftFound",[A.name||this.defaultFilename]),E,mxUtils.bind(this,function(){this.hideDialog();x.postMessage(JSON.stringify({event:"draft",result:"edit",message:A}),"*")}),mxUtils.bind(this,function(){this.hideDialog();x.postMessage(JSON.stringify({event:"draft",result:"discard",message:A}),
-"*")}),A.editKey?mxResources.get(A.editKey):null,A.discardKey?mxResources.get(A.discardKey):null,A.ignore?mxUtils.bind(this,function(){this.hideDialog();x.postMessage(JSON.stringify({event:"draft",result:"ignore",message:A}),"*")}):null);this.showDialog(u.container,640,480,!0,!1,mxUtils.bind(this,function(T){T&&this.actions.get("exit").funct()}));try{u.init()}catch(T){x.postMessage(JSON.stringify({event:"draft",error:T.toString(),message:A}),"*")}return}if("template"==A.action){this.spinner.stop();
-var B=1==A.enableRecent,D=1==A.enableSearch,G=1==A.enableCustomTemp;if("1"==urlParams.newTempDlg&&!A.templatesOnly&&null!=A.callback){var N=this.getCurrentUser(),I=new TemplatesDialog(this,function(T,Y,aa){T=T||this.emptyDiagramXml;x.postMessage(JSON.stringify({event:"template",xml:T,blank:T==this.emptyDiagramXml,name:Y,tempUrl:aa.url,libs:aa.libs,builtIn:null!=aa.info&&null!=aa.info.custContentId,message:A}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=N?
-N.id:null,B?mxUtils.bind(this,function(T,Y,aa){this.remoteInvoke("getRecentDiagrams",[aa],null,T,Y)}):null,D?mxUtils.bind(this,function(T,Y,aa,Z){this.remoteInvoke("searchDiagrams",[T,Z],null,Y,aa)}):null,mxUtils.bind(this,function(T,Y,aa){this.remoteInvoke("getFileContent",[T.url],null,Y,aa)}),null,G?mxUtils.bind(this,function(T){this.remoteInvoke("getCustomTemplates",null,null,T,function(){T({},0)})}):null,!1,!1,!0,!0);this.showDialog(I.container,window.innerWidth,window.innerHeight,!0,!1,null,
-!1,!0);return}u=new NewDialog(this,!1,A.templatesOnly?!1:null!=A.callback,mxUtils.bind(this,function(T,Y,aa,Z){T=T||this.emptyDiagramXml;null!=A.callback?x.postMessage(JSON.stringify({event:"template",xml:T,blank:T==this.emptyDiagramXml,name:Y,tempUrl:aa,libs:Z,builtIn:!0,message:A}),"*"):(d(T,z,T!=this.emptyDiagramXml,A.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,B?mxUtils.bind(this,function(T){this.remoteInvoke("getRecentDiagrams",[null],null,
-T,function(){T(null,"Network Error!")})}):null,D?mxUtils.bind(this,function(T,Y){this.remoteInvoke("searchDiagrams",[T,null],null,Y,function(){Y(null,"Network Error!")})}):null,mxUtils.bind(this,function(T,Y,aa){x.postMessage(JSON.stringify({event:"template",docUrl:T,info:Y,name:aa}),"*")}),null,null,G?mxUtils.bind(this,function(T){this.remoteInvoke("getCustomTemplates",null,null,T,function(){T({},0)})}):null,1==A.withoutType);this.showDialog(u.container,620,460,!0,!1,mxUtils.bind(this,function(T){this.sidebar.hideTooltip();
-T&&this.actions.get("exit").funct()}));u.init();return}if("textContent"==A.action){var F=this.getDiagramTextContent();x.postMessage(JSON.stringify({event:"textContent",data:F,message:A}),"*");return}if("status"==A.action){null!=A.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(A.messageKey))):null!=A.message&&this.editor.setStatus(mxUtils.htmlEntities(A.message));null!=A.modified&&(this.editor.modified=A.modified);return}if("spinner"==A.action){var H=null!=A.messageKey?mxResources.get(A.messageKey):
-A.message;null==A.show||A.show?this.spinner.spin(document.body,H):this.spinner.stop();return}if("exit"==A.action){this.actions.get("exit").funct();return}if("viewport"==A.action){null!=A.viewport&&(this.embedViewport=A.viewport);return}if("snapshot"==A.action){this.sendEmbeddedSvgExport(!0);return}if("export"==A.action){if("png"==A.format||"xmlpng"==A.format){if(null==A.spin&&null==A.spinKey||this.spinner.spin(document.body,null!=A.spinKey?mxResources.get(A.spinKey):A.spin)){var R=null!=A.xml?A.xml:
-this.getFileData(!0);this.editor.graph.setEnabled(!1);var X=this.editor.graph,J=mxUtils.bind(this,function(T){this.editor.graph.setEnabled(!0);this.spinner.stop();var Y=this.createLoadMessage("export");Y.format=A.format;Y.message=A;Y.data=T;Y.xml=R;x.postMessage(JSON.stringify(Y),"*")}),W=mxUtils.bind(this,function(T){null==T&&(T=Editor.blankImage);"xmlpng"==A.format&&(T=Editor.writeGraphModelToPng(T,"tEXt","mxfile",encodeURIComponent(R)));X!=this.editor.graph&&X.container.parentNode.removeChild(X.container);
-J(T)}),V=A.pageId||(null!=this.pages?A.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var t=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=V){var T=X.getGlobalVariable;X=this.createTemporaryGraph(X.getStylesheet());for(var Y,aa=0;aa<this.pages.length;aa++)if(this.pages[aa].getId()==V){Y=this.updatePageRoot(this.pages[aa]);break}null==Y&&(Y=this.currentPage);X.getGlobalVariable=function(ha){return"page"==ha?Y.getName():"pagenumber"==
-ha?1:T.apply(this,arguments)};document.body.appendChild(X.container);X.model.setRoot(Y.root)}if(null!=A.layerIds){var Z=X.model,da=Z.getChildCells(Z.getRoot()),ja={};for(aa=0;aa<A.layerIds.length;aa++)ja[A.layerIds[aa]]=!0;for(aa=0;aa<da.length;aa++)Z.setVisible(da[aa],ja[da[aa].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(ha){W(ha.toDataURL("image/png"))}),A.width,null,A.background,mxUtils.bind(this,function(){W(null)}),null,null,A.scale,A.transparent,A.shadow,null,X,A.border,null,
-A.grid,A.keepTheme)});null!=A.xml&&0<A.xml.length&&(k=!0,this.setFileData(R),k=!1);t()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==A.format?"1":"0")+(null!=V?"&pageId="+V:"")+(null!=A.layerIds&&0<A.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:A.layerIds})):"")+(null!=A.scale?"&scale="+A.scale:"")+"&base64=1&xml="+encodeURIComponent(R))).send(mxUtils.bind(this,function(T){200<=T.getStatus()&&299>=T.getStatus()?J("data:image/png;base64,"+T.getText()):
-W(null)}),mxUtils.bind(this,function(){W(null)}))}}else if(t=mxUtils.bind(this,function(){var T=this.createLoadMessage("export");T.message=A;if("html2"==A.format||"html"==A.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var Y=this.getXmlFileData();T.xml=mxUtils.getXml(Y);T.data=this.getFileData(null,null,!0,null,null,null,Y);T.format=A.format}else if("html"==A.format)Y=this.editor.getGraphXml(),T.data=this.getHtml(Y,this.editor.graph),T.xml=mxUtils.getXml(Y),T.format=A.format;
-else{mxSvgCanvas2D.prototype.foAltText=null;Y=null!=A.background?A.background:this.editor.graph.background;Y==mxConstants.NONE&&(Y=null);T.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);T.format="svg";var aa=mxUtils.bind(this,function(Z){this.editor.graph.setEnabled(!0);this.spinner.stop();T.data=Editor.createSvgDataUri(Z);x.postMessage(JSON.stringify(T),"*")});if("xmlsvg"==A.format)(null==A.spin&&null==A.spinKey||this.spinner.spin(document.body,null!=A.spinKey?mxResources.get(A.spinKey):
-A.spin))&&this.getEmbeddedSvg(T.xml,this.editor.graph,null,!0,aa,null,null,A.embedImages,Y,A.scale,A.border,A.shadow,A.keepTheme);else if(null==A.spin&&null==A.spinKey||this.spinner.spin(document.body,null!=A.spinKey?mxResources.get(A.spinKey):A.spin))this.editor.graph.setEnabled(!1),Y=this.editor.graph.getSvg(Y,A.scale,A.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||A.shadow,null,A.keepTheme),(this.editor.graph.shadowVisible||A.shadow)&&this.editor.graph.addSvgShadow(Y),this.embedFonts(Y,
-mxUtils.bind(this,function(Z){A.embedImages||null==A.embedImages?this.editor.convertImages(Z,mxUtils.bind(this,function(da){aa(mxUtils.getXml(da))})):aa(mxUtils.getXml(Z))}));return}x.postMessage(JSON.stringify(T),"*")}),null!=A.xml&&0<A.xml.length){if(this.editor.graph.mathEnabled){var C=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){C.apply(this,arguments);t()}}k=!0;this.setFileData(A.xml);k=!1;this.editor.graph.mathEnabled||t()}else t();return}if("load"==A.action){L=A.toSketch;l=1==A.autosave;
+"*")}),A.editKey?mxResources.get(A.editKey):null,A.discardKey?mxResources.get(A.discardKey):null,A.ignore?mxUtils.bind(this,function(){this.hideDialog();x.postMessage(JSON.stringify({event:"draft",result:"ignore",message:A}),"*")}):null);this.showDialog(u.container,640,480,!0,!1,mxUtils.bind(this,function(V){V&&this.actions.get("exit").funct()}));try{u.init()}catch(V){x.postMessage(JSON.stringify({event:"draft",error:V.toString(),message:A}),"*")}return}if("template"==A.action){this.spinner.stop();
+var B=1==A.enableRecent,D=1==A.enableSearch,G=1==A.enableCustomTemp;if("1"==urlParams.newTempDlg&&!A.templatesOnly&&null!=A.callback){var H=this.getCurrentUser(),N=new TemplatesDialog(this,function(V,Y,ba){V=V||this.emptyDiagramXml;x.postMessage(JSON.stringify({event:"template",xml:V,blank:V==this.emptyDiagramXml,name:Y,tempUrl:ba.url,libs:ba.libs,builtIn:null!=ba.info&&null!=ba.info.custContentId,message:A}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=H?
+H.id:null,B?mxUtils.bind(this,function(V,Y,ba){this.remoteInvoke("getRecentDiagrams",[ba],null,V,Y)}):null,D?mxUtils.bind(this,function(V,Y,ba,Z){this.remoteInvoke("searchDiagrams",[V,Z],null,Y,ba)}):null,mxUtils.bind(this,function(V,Y,ba){this.remoteInvoke("getFileContent",[V.url],null,Y,ba)}),null,G?mxUtils.bind(this,function(V){this.remoteInvoke("getCustomTemplates",null,null,V,function(){V({},0)})}):null,!1,!1,!0,!0);this.showDialog(N.container,window.innerWidth,window.innerHeight,!0,!1,null,
+!1,!0);return}u=new NewDialog(this,!1,A.templatesOnly?!1:null!=A.callback,mxUtils.bind(this,function(V,Y,ba,Z){V=V||this.emptyDiagramXml;null!=A.callback?x.postMessage(JSON.stringify({event:"template",xml:V,blank:V==this.emptyDiagramXml,name:Y,tempUrl:ba,libs:Z,builtIn:!0,message:A}),"*"):(d(V,z,V!=this.emptyDiagramXml,A.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,B?mxUtils.bind(this,function(V){this.remoteInvoke("getRecentDiagrams",[null],null,
+V,function(){V(null,"Network Error!")})}):null,D?mxUtils.bind(this,function(V,Y){this.remoteInvoke("searchDiagrams",[V,null],null,Y,function(){Y(null,"Network Error!")})}):null,mxUtils.bind(this,function(V,Y,ba){x.postMessage(JSON.stringify({event:"template",docUrl:V,info:Y,name:ba}),"*")}),null,null,G?mxUtils.bind(this,function(V){this.remoteInvoke("getCustomTemplates",null,null,V,function(){V({},0)})}):null,1==A.withoutType);this.showDialog(u.container,620,460,!0,!1,mxUtils.bind(this,function(V){this.sidebar.hideTooltip();
+V&&this.actions.get("exit").funct()}));u.init();return}if("textContent"==A.action){var F=this.getDiagramTextContent();x.postMessage(JSON.stringify({event:"textContent",data:F,message:A}),"*");return}if("status"==A.action){null!=A.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(A.messageKey))):null!=A.message&&this.editor.setStatus(mxUtils.htmlEntities(A.message));null!=A.modified&&(this.editor.modified=A.modified);return}if("spinner"==A.action){var I=null!=A.messageKey?mxResources.get(A.messageKey):
+A.message;null==A.show||A.show?this.spinner.spin(document.body,I):this.spinner.stop();return}if("exit"==A.action){this.actions.get("exit").funct();return}if("viewport"==A.action){null!=A.viewport&&(this.embedViewport=A.viewport);return}if("snapshot"==A.action){this.sendEmbeddedSvgExport(!0);return}if("export"==A.action){if("png"==A.format||"xmlpng"==A.format){if(null==A.spin&&null==A.spinKey||this.spinner.spin(document.body,null!=A.spinKey?mxResources.get(A.spinKey):A.spin)){var Q=null!=A.xml?A.xml:
+this.getFileData(!0);this.editor.graph.setEnabled(!1);var X=this.editor.graph,L=mxUtils.bind(this,function(V){this.editor.graph.setEnabled(!0);this.spinner.stop();var Y=this.createLoadMessage("export");Y.format=A.format;Y.message=A;Y.data=V;Y.xml=Q;x.postMessage(JSON.stringify(Y),"*")}),U=mxUtils.bind(this,function(V){null==V&&(V=Editor.blankImage);"xmlpng"==A.format&&(V=Editor.writeGraphModelToPng(V,"tEXt","mxfile",encodeURIComponent(Q)));X!=this.editor.graph&&X.container.parentNode.removeChild(X.container);
+L(V)}),W=A.pageId||(null!=this.pages?A.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var t=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=W){var V=X.getGlobalVariable;X=this.createTemporaryGraph(X.getStylesheet());for(var Y,ba=0;ba<this.pages.length;ba++)if(this.pages[ba].getId()==W){Y=this.updatePageRoot(this.pages[ba]);break}null==Y&&(Y=this.currentPage);X.getGlobalVariable=function(ka){return"page"==ka?Y.getName():"pagenumber"==
+ka?1:V.apply(this,arguments)};document.body.appendChild(X.container);X.model.setRoot(Y.root)}if(null!=A.layerIds){var Z=X.model,da=Z.getChildCells(Z.getRoot()),ea={};for(ba=0;ba<A.layerIds.length;ba++)ea[A.layerIds[ba]]=!0;for(ba=0;ba<da.length;ba++)Z.setVisible(da[ba],ea[da[ba].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(ka){U(ka.toDataURL("image/png"))}),A.width,null,A.background,mxUtils.bind(this,function(){U(null)}),null,null,A.scale,A.transparent,A.shadow,null,X,A.border,null,
+A.grid,A.keepTheme)});null!=A.xml&&0<A.xml.length&&(k=!0,this.setFileData(Q),k=!1);t()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==A.format?"1":"0")+(null!=W?"&pageId="+W:"")+(null!=A.layerIds&&0<A.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:A.layerIds})):"")+(null!=A.scale?"&scale="+A.scale:"")+"&base64=1&xml="+encodeURIComponent(Q))).send(mxUtils.bind(this,function(V){200<=V.getStatus()&&299>=V.getStatus()?L("data:image/png;base64,"+V.getText()):
+U(null)}),mxUtils.bind(this,function(){U(null)}))}}else if(t=mxUtils.bind(this,function(){var V=this.createLoadMessage("export");V.message=A;if("html2"==A.format||"html"==A.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var Y=this.getXmlFileData();V.xml=mxUtils.getXml(Y);V.data=this.getFileData(null,null,!0,null,null,null,Y);V.format=A.format}else if("html"==A.format)Y=this.editor.getGraphXml(),V.data=this.getHtml(Y,this.editor.graph),V.xml=mxUtils.getXml(Y),V.format=A.format;
+else{mxSvgCanvas2D.prototype.foAltText=null;Y=null!=A.background?A.background:this.editor.graph.background;Y==mxConstants.NONE&&(Y=null);V.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);V.format="svg";var ba=mxUtils.bind(this,function(Z){this.editor.graph.setEnabled(!0);this.spinner.stop();V.data=Editor.createSvgDataUri(Z);x.postMessage(JSON.stringify(V),"*")});if("xmlsvg"==A.format)(null==A.spin&&null==A.spinKey||this.spinner.spin(document.body,null!=A.spinKey?mxResources.get(A.spinKey):
+A.spin))&&this.getEmbeddedSvg(V.xml,this.editor.graph,null,!0,ba,null,null,A.embedImages,Y,A.scale,A.border,A.shadow,A.keepTheme);else if(null==A.spin&&null==A.spinKey||this.spinner.spin(document.body,null!=A.spinKey?mxResources.get(A.spinKey):A.spin))this.editor.graph.setEnabled(!1),Y=this.editor.graph.getSvg(Y,A.scale,A.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||A.shadow,null,A.keepTheme),(this.editor.graph.shadowVisible||A.shadow)&&this.editor.graph.addSvgShadow(Y),this.embedFonts(Y,
+mxUtils.bind(this,function(Z){A.embedImages||null==A.embedImages?this.editor.convertImages(Z,mxUtils.bind(this,function(da){ba(mxUtils.getXml(da))})):ba(mxUtils.getXml(Z))}));return}x.postMessage(JSON.stringify(V),"*")}),null!=A.xml&&0<A.xml.length){if(this.editor.graph.mathEnabled){var C=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){C.apply(this,arguments);t()}}k=!0;this.setFileData(A.xml);k=!1;this.editor.graph.mathEnabled||t()}else t();return}if("load"==A.action){K=A.toSketch;l=1==A.autosave;
this.hideDialog();null!=A.modified&&null==urlParams.modified&&(urlParams.modified=A.modified);null!=A.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=A.saveAndExit);null!=A.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=A.noSaveBtn);if(null!=A.rough){var M=Editor.sketchMode;this.doSetSketchMode(A.rough);M!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=A.dark&&(M=Editor.darkMode,this.doSetDarkMode(A.dark),M!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));
-null!=A.border&&(this.embedExportBorder=A.border);null!=A.background&&(this.embedExportBackground=A.background);null!=A.viewport&&(this.embedViewport=A.viewport);this.embedExitPoint=null;if(null!=A.rect){var Q=this.embedExportBorder;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.top=A.rect.top+"px";this.diagramContainer.style.left=A.rect.left+"px";this.diagramContainer.style.height=A.rect.height+"px";this.diagramContainer.style.width=A.rect.width+"px";this.diagramContainer.style.bottom=
-"";this.diagramContainer.style.right="";K=mxUtils.bind(this,function(){var T=this.editor.graph,Y=T.maxFitScale;T.maxFitScale=A.maxFitScale;T.fit(2*Q);T.maxFitScale=Y;T.container.scrollTop-=2*Q;T.container.scrollLeft-=2*Q;this.fireEvent(new mxEventObject("editInlineStart","data",[A]))})}null!=A.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=A.noExitBtn);null!=A.title&&null!=this.buttonContainer&&(E=document.createElement("span"),mxUtils.write(E,A.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),
-this.buttonContainer.appendChild(E),this.embedFilenameSpan=E);try{A.libs&&this.sidebar.showEntries(A.libs)}catch(T){}A=null!=A.xmlpng?this.extractGraphModelFromPng(A.xmlpng):null!=A.descriptor?A.descriptor:A.xml}else{if("merge"==A.action){var P=this.getCurrentFile();null!=P&&(E=O(A.xml),null!=E&&""!=E&&P.mergeFile(new LocalFile(this,E),function(){x.postMessage(JSON.stringify({event:"merge",message:A}),"*")},function(T){x.postMessage(JSON.stringify({event:"merge",message:A,error:T}),"*")}))}else"remoteInvokeReady"==
-A.action?this.handleRemoteInvokeReady(x):"remoteInvoke"==A.action?this.handleRemoteInvoke(A,z.origin):"remoteInvokeResponse"==A.action?this.handleRemoteInvokeResponse(A):x.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(A)}),"*");return}}catch(T){this.handleError(T)}}var S=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),U=mxUtils.bind(this,function(T,Y){k=!0;try{d(T,
-Y,null,L)}catch(aa){this.handleError(aa)}k=!1;null!=urlParams.modified&&this.editor.setStatus("");p=S();l&&null==g&&(g=mxUtils.bind(this,function(aa,Z){aa=S();aa==p||k||(Z=this.createLoadMessage("autosave"),Z.xml=aa,(window.opener||window.parent).postMessage(JSON.stringify(Z),"*"));p=aa}),this.editor.graph.model.addListener(mxEvent.CHANGE,g),this.editor.graph.addListener("gridSizeChanged",g),this.editor.graph.addListener("shadowVisibleChanged",g),this.addListener("pageFormatChanged",g),this.addListener("pageScaleChanged",
-g),this.addListener("backgroundColorChanged",g),this.addListener("backgroundImageChanged",g),this.addListener("foldingEnabledChanged",g),this.addListener("mathEnabledChanged",g),this.addListener("gridEnabledChanged",g),this.addListener("guidesEnabledChanged",g),this.addListener("pageViewChanged",g));if("1"==urlParams.returnbounds||"json"==urlParams.proto)Y=this.createLoadMessage("load"),Y.xml=T,x.postMessage(JSON.stringify(Y),"*");null!=K&&K()});null!=A&&"function"===typeof A.substring&&"data:application/vnd.visio;base64,"==
-A.substring(0,34)?(O="0M8R4KGxGuE"==A.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(A.substring(A.indexOf(",")+1)),function(T){U(T,z)},mxUtils.bind(this,function(T){this.handleError(T)}),O)):null!=A&&"function"===typeof A.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(A,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(A,mxUtils.bind(this,function(T){4==T.readyState&&200<=T.status&&299>=T.status&&
-"<mxGraphModel"==T.responseText.substring(0,13)&&U(T.responseText,z)}),""):null!=A&&"function"===typeof A.substring&&this.isLucidChartData(A)?this.convertLucidChart(A,mxUtils.bind(this,function(T){U(T)}),mxUtils.bind(this,function(T){this.handleError(T)})):null==A||"object"!==typeof A||null==A.format||null==A.data&&null==A.url?(A=O(A),U(A,z)):this.loadDescriptor(A,mxUtils.bind(this,function(T){U(S(),z)}),mxUtils.bind(this,function(T){this.handleError(T,mxResources.get("errorLoadingFile"))}))}}));
-var x=window.opener||window.parent;q="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";x.postMessage(q,"*");if("json"==urlParams.proto){var y=this.editor.graph.openLink;this.editor.graph.openLink=function(z,A,K){y.apply(this,arguments);x.postMessage(JSON.stringify({event:"openLink",href:z,target:A,allowOpener:K}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar&&"1"!=urlParams.embedInline){var d=document.createElement("div");d.style.display=
+null!=A.border&&(this.embedExportBorder=A.border);null!=A.background&&(this.embedExportBackground=A.background);null!=A.viewport&&(this.embedViewport=A.viewport);this.embedExitPoint=null;if(null!=A.rect){var S=this.embedExportBorder;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.top=A.rect.top+"px";this.diagramContainer.style.left=A.rect.left+"px";this.diagramContainer.style.height=A.rect.height+"px";this.diagramContainer.style.width=A.rect.width+"px";this.diagramContainer.style.bottom=
+"";this.diagramContainer.style.right="";J=mxUtils.bind(this,function(){var V=this.editor.graph,Y=V.maxFitScale;V.maxFitScale=A.maxFitScale;V.fit(2*S);V.maxFitScale=Y;V.container.scrollTop-=2*S;V.container.scrollLeft-=2*S;this.fireEvent(new mxEventObject("editInlineStart","data",[A]))})}null!=A.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=A.noExitBtn);null!=A.title&&null!=this.buttonContainer&&(E=document.createElement("span"),mxUtils.write(E,A.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),
+this.buttonContainer.appendChild(E),this.embedFilenameSpan=E);try{A.libs&&this.sidebar.showEntries(A.libs)}catch(V){}A=null!=A.xmlpng?this.extractGraphModelFromPng(A.xmlpng):null!=A.descriptor?A.descriptor:A.xml}else{if("merge"==A.action){var P=this.getCurrentFile();null!=P&&(E=O(A.xml),null!=E&&""!=E&&P.mergeFile(new LocalFile(this,E),function(){x.postMessage(JSON.stringify({event:"merge",message:A}),"*")},function(V){x.postMessage(JSON.stringify({event:"merge",message:A,error:V}),"*")}))}else"remoteInvokeReady"==
+A.action?this.handleRemoteInvokeReady(x):"remoteInvoke"==A.action?this.handleRemoteInvoke(A,z.origin):"remoteInvokeResponse"==A.action?this.handleRemoteInvokeResponse(A):x.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(A)}),"*");return}}catch(V){this.handleError(V)}}var R=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),T=mxUtils.bind(this,function(V,Y){k=!0;try{d(V,
+Y,null,K)}catch(ba){this.handleError(ba)}k=!1;null!=urlParams.modified&&this.editor.setStatus("");p=R();l&&null==g&&(g=mxUtils.bind(this,function(ba,Z){ba=R();ba==p||k||(Z=this.createLoadMessage("autosave"),Z.xml=ba,(window.opener||window.parent).postMessage(JSON.stringify(Z),"*"));p=ba}),this.editor.graph.model.addListener(mxEvent.CHANGE,g),this.editor.graph.addListener("gridSizeChanged",g),this.editor.graph.addListener("shadowVisibleChanged",g),this.addListener("pageFormatChanged",g),this.addListener("pageScaleChanged",
+g),this.addListener("backgroundColorChanged",g),this.addListener("backgroundImageChanged",g),this.addListener("foldingEnabledChanged",g),this.addListener("mathEnabledChanged",g),this.addListener("gridEnabledChanged",g),this.addListener("guidesEnabledChanged",g),this.addListener("pageViewChanged",g));if("1"==urlParams.returnbounds||"json"==urlParams.proto)Y=this.createLoadMessage("load"),Y.xml=V,x.postMessage(JSON.stringify(Y),"*");null!=J&&J()});null!=A&&"function"===typeof A.substring&&"data:application/vnd.visio;base64,"==
+A.substring(0,34)?(O="0M8R4KGxGuE"==A.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(A.substring(A.indexOf(",")+1)),function(V){T(V,z)},mxUtils.bind(this,function(V){this.handleError(V)}),O)):null!=A&&"function"===typeof A.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(A,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(A,mxUtils.bind(this,function(V){4==V.readyState&&200<=V.status&&299>=V.status&&
+"<mxGraphModel"==V.responseText.substring(0,13)&&T(V.responseText,z)}),""):null!=A&&"function"===typeof A.substring&&this.isLucidChartData(A)?this.convertLucidChart(A,mxUtils.bind(this,function(V){T(V)}),mxUtils.bind(this,function(V){this.handleError(V)})):null==A||"object"!==typeof A||null==A.format||null==A.data&&null==A.url?(A=O(A),T(A,z)):this.loadDescriptor(A,mxUtils.bind(this,function(V){T(R(),z)}),mxUtils.bind(this,function(V){this.handleError(V,mxResources.get("errorLoadingFile"))}))}}));
+var x=window.opener||window.parent;q="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";x.postMessage(q,"*");if("json"==urlParams.proto){var y=this.editor.graph.openLink;this.editor.graph.openLink=function(z,A,J){y.apply(this,arguments);x.postMessage(JSON.stringify({event:"openLink",href:z,target:A,allowOpener:J}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar&&"1"!=urlParams.embedInline){var d=document.createElement("div");d.style.display=
"inline-block";d.style.position="absolute";d.style.paddingTop="atlas"==uiTheme||"1"==urlParams.atlas?"2px":"0px";d.style.paddingLeft="8px";d.style.paddingBottom="2px";var g=document.createElement("button");g.className="geBigButton";var k=g;if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var l="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(g,l);g.setAttribute("title",l);mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));
d.appendChild(g)}}else mxUtils.write(g,mxResources.get("save")),g.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),d.appendChild(g),"1"==urlParams.saveAndExit&&(g=document.createElement("a"),mxUtils.write(g,mxResources.get("saveAndExit")),g.setAttribute("title",mxResources.get("saveAndExit")),g.className="geBigButton geBigStandardButton",g.style.marginLeft="6px",mxEvent.addListener(g,
"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),d.appendChild(g),k=g);"1"!=urlParams.noExitBtn&&(g=document.createElement("a"),k="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(g,k),g.setAttribute("title",k),g.className="geBigButton geBigStandardButton",g.style.marginLeft="6px",mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),d.appendChild(g),k=g);k.style.marginRight="20px";this.toolbar.container.appendChild(d);
this.toolbar.staticElements.push(d);d.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(d){this.importCsv(d)}),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.loadOrgChartLayouts=function(d){var g=mxUtils.bind(this,function(){this.loadingOrgChart=!1;this.spinner.stop();d()});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?g():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.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",g)})})}):mxscript(DRAWIO_BASE_URL+"/js/orgchart.min.js",g))};EditorUi.prototype.importCsv=function(d,g){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(d,g)}))};EditorUi.prototype.doImportCsv=function(d,g){try{var k=d.split("\n"),l=[],p=[],q=[],x={};if(0<k.length){var y={},z=this.editor.graph,A=null,K=null,O=null,L=null,u=null,E=null,B=null,D="whiteSpace=wrap;html=1;",G=null,N=null,I="",F="auto",H="auto",R=!1,X=null,J=null,
-W=40,V=40,t=100,C=0,M=function(){null!=g?g(Ba):(z.setSelectionCells(Ba),z.scrollCellToVisible(z.getSelectionCell()))},Q=z.getFreeInsertPoint(),P=Q.x,S=Q.y;Q=S;var U=null,T="auto";N=null;for(var Y=[],aa=null,Z=null,da=0;da<k.length&&"#"==k[da].charAt(0);){d=k[da].replace(/\r$/,"");for(da++;da<k.length&&"\\"==d.charAt(d.length-1)&&"#"==k[da].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(k[da].substring(1)),da++;if("#"!=d.charAt(1)){var ja=d.indexOf(":");if(0<ja){var ha=mxUtils.trim(d.substring(1,
-ja)),ba=mxUtils.trim(d.substring(ja+1));"label"==ha?U=z.sanitizeHtml(ba):"labelname"==ha&&0<ba.length&&"-"!=ba?u=ba:"labels"==ha&&0<ba.length&&"-"!=ba?B=JSON.parse(ba):"style"==ha?K=ba:"parentstyle"==ha?D=ba:"unknownStyle"==ha&&"-"!=ba?E=ba:"stylename"==ha&&0<ba.length&&"-"!=ba?L=ba:"styles"==ha&&0<ba.length&&"-"!=ba?O=JSON.parse(ba):"vars"==ha&&0<ba.length&&"-"!=ba?A=JSON.parse(ba):"identity"==ha&&0<ba.length&&"-"!=ba?G=ba:"parent"==ha&&0<ba.length&&"-"!=ba?N=ba:"namespace"==ha&&0<ba.length&&"-"!=
-ba?I=ba:"width"==ha?F=ba:"height"==ha?H=ba:"collapsed"==ha&&"-"!=ba?R="true"==ba:"left"==ha&&0<ba.length?X=ba:"top"==ha&&0<ba.length?J=ba:"ignore"==ha?Z=ba.split(","):"connect"==ha?Y.push(JSON.parse(ba)):"link"==ha?aa=ba:"padding"==ha?C=parseFloat(ba):"edgespacing"==ha?W=parseFloat(ba):"nodespacing"==ha?V=parseFloat(ba):"levelspacing"==ha?t=parseFloat(ba):"layout"==ha&&(T=ba)}}}if(null==k[da])throw Error(mxResources.get("invalidOrMissingFile"));var Aa=this.editor.csvToArray(k[da].replace(/\r$/,""));
-ja=d=null;ha=[];for(ba=0;ba<Aa.length;ba++)G==Aa[ba]&&(d=ba),N==Aa[ba]&&(ja=ba),ha.push(mxUtils.trim(Aa[ba]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==U&&(U="%"+ha[0]+"%");if(null!=Y)for(var Ga=0;Ga<Y.length;Ga++)null==y[Y[Ga].to]&&(y[Y[Ga].to]={});G=[];for(ba=da+1;ba<k.length;ba++){var Ca=this.editor.csvToArray(k[ba].replace(/\r$/,""));if(null==Ca){var Da=40<k[ba].length?k[ba].substring(0,40)+"...":k[ba];throw Error(Da+" ("+ba+"):\n"+mxResources.get("containsValidationErrors"));
-}0<Ca.length&&G.push(Ca)}z.model.beginUpdate();try{for(ba=0;ba<G.length;ba++){Ca=G[ba];var na=null,Ia=null!=d?I+Ca[d]:null;k=!1;null!=Ia&&(na=z.model.getCell(Ia),k=null==na||0<=mxUtils.indexOf(l,na));var Ka=new mxCell(U,new mxGeometry(P,Q,0,0),K||"whiteSpace=wrap;html=1;");Ka.collapsed=R;Ka.vertex=!0;Ka.id=Ia;null==na||k||z.model.setCollapsed(na,R);for(var xa=0;xa<Ca.length;xa++)z.setAttributeForCell(Ka,ha[xa],Ca[xa]),null==na||k||z.setAttributeForCell(na,ha[xa],Ca[xa]);if(null!=u&&null!=B){var Ja=
-B[Ka.getAttribute(u)];null!=Ja&&(z.labelChanged(Ka,Ja),null==na||k||z.cellLabelChanged(na,Ja))}if(null!=L&&null!=O){var Fa=O[Ka.getAttribute(L)];null!=Fa&&(Ka.style=Fa)}z.setAttributeForCell(Ka,"placeholders","1");Ka.style=z.replacePlaceholders(Ka,Ka.style,A);null==na||k?z.fireEvent(new mxEventObject("cellsInserted","cells",[Ka])):(z.model.setStyle(na,Ka.style),0>mxUtils.indexOf(q,na)&&q.push(na),z.fireEvent(new mxEventObject("cellsInserted","cells",[na])));k=null!=na;na=Ka;if(!k)for(Ga=0;Ga<Y.length;Ga++)y[Y[Ga].to][na.getAttribute(Y[Ga].to)]=
-na;null!=aa&&"link"!=aa&&(z.setLinkForCell(na,na.getAttribute(aa)),z.setAttributeForCell(na,aa,null));var Oa=this.editor.graph.getPreferredSizeForCell(na);N=null!=ja?z.model.getCell(I+Ca[ja]):null;if(na.vertex){Da=null!=N?0:P;da=null!=N?0:S;null!=X&&null!=na.getAttribute(X)&&(na.geometry.x=Da+parseFloat(na.getAttribute(X)));null!=J&&null!=na.getAttribute(J)&&(na.geometry.y=da+parseFloat(na.getAttribute(J)));var va="@"==F.charAt(0)?na.getAttribute(F.substring(1)):null;na.geometry.width=null!=va&&"auto"!=
-va?parseFloat(na.getAttribute(F.substring(1))):"auto"==F||"auto"==va?Oa.width+C:parseFloat(F);var za="@"==H.charAt(0)?na.getAttribute(H.substring(1)):null;na.geometry.height=null!=za&&"auto"!=za?parseFloat(za):"auto"==H||"auto"==za?Oa.height+C:parseFloat(H);Q+=na.geometry.height+V}k?(null==x[Ia]&&(x[Ia]=[]),x[Ia].push(na)):(l.push(na),null!=N?(N.style=z.replacePlaceholders(N,D,A),z.addCell(na,N),p.push(N)):q.push(z.addCell(na)))}for(ba=0;ba<p.length;ba++)va="@"==F.charAt(0)?p[ba].getAttribute(F.substring(1)):
-null,za="@"==H.charAt(0)?p[ba].getAttribute(H.substring(1)):null,"auto"!=F&&"auto"!=va||"auto"!=H&&"auto"!=za||z.updateGroupBounds([p[ba]],C,!0);var ta=q.slice(),Ba=q.slice();for(Ga=0;Ga<Y.length;Ga++){var ea=Y[Ga];for(ba=0;ba<l.length;ba++){na=l[ba];var wa=mxUtils.bind(this,function(pa,ka,Ea){var Pa=ka.getAttribute(Ea.from);if(null!=Pa&&""!=Pa){Pa=Pa.split(",");for(var Sa=0;Sa<Pa.length;Sa++){var Ha=y[Ea.to][Pa[Sa]];if(null==Ha&&null!=E){Ha=new mxCell(Pa[Sa],new mxGeometry(P,S,0,0),E);Ha.style=z.replacePlaceholders(ka,
-Ha.style,A);var La=this.editor.graph.getPreferredSizeForCell(Ha);Ha.geometry.width=La.width+C;Ha.geometry.height=La.height+C;y[Ea.to][Pa[Sa]]=Ha;Ha.vertex=!0;Ha.id=Pa[Sa];q.push(z.addCell(Ha))}if(null!=Ha){La=Ea.label;null!=Ea.fromlabel&&(La=(ka.getAttribute(Ea.fromlabel)||"")+(La||""));null!=Ea.sourcelabel&&(La=z.replacePlaceholders(ka,Ea.sourcelabel,A)+(La||""));null!=Ea.tolabel&&(La=(La||"")+(Ha.getAttribute(Ea.tolabel)||""));null!=Ea.targetlabel&&(La=(La||"")+z.replacePlaceholders(Ha,Ea.targetlabel,
-A));var Qa="target"==Ea.placeholders==!Ea.invert?Ha:pa;Qa=null!=Ea.style?z.replacePlaceholders(Qa,Ea.style,A):z.createCurrentEdgeStyle();La=z.insertEdge(null,null,La||"",Ea.invert?Ha:pa,Ea.invert?pa:Ha,Qa);if(null!=Ea.labels)for(Qa=0;Qa<Ea.labels.length;Qa++){var Na=Ea.labels[Qa],Ra=new mxCell(Na.label||Qa,new mxGeometry(null!=Na.x?Na.x:0,null!=Na.y?Na.y:0,0,0),"resizable=0;html=1;");Ra.vertex=!0;Ra.connectable=!1;Ra.geometry.relative=!0;null!=Na.placeholders&&(Ra.value=z.replacePlaceholders("target"==
-Na.placeholders==!Ea.invert?Ha:pa,Ra.value,A));if(null!=Na.dx||null!=Na.dy)Ra.geometry.offset=new mxPoint(null!=Na.dx?Na.dx:0,null!=Na.dy?Na.dy:0);La.insert(Ra)}Ba.push(La);mxUtils.remove(Ea.invert?pa:Ha,ta)}}}});wa(na,na,ea);if(null!=x[na.id])for(xa=0;xa<x[na.id].length;xa++)wa(na,x[na.id][xa],ea)}}if(null!=Z)for(ba=0;ba<l.length;ba++)for(na=l[ba],xa=0;xa<Z.length;xa++)z.setAttributeForCell(na,mxUtils.trim(Z[xa]),null);if(0<q.length){var ua=new mxParallelEdgeLayout(z);ua.spacing=W;ua.checkOverlap=
-!0;var sa=function(){0<ua.spacing&&ua.execute(z.getDefaultParent());for(var pa=0;pa<q.length;pa++){var ka=z.getCellGeometry(q[pa]);ka.x=Math.round(z.snap(ka.x));ka.y=Math.round(z.snap(ka.y));"auto"==F&&(ka.width=Math.round(z.snap(ka.width)));"auto"==H&&(ka.height=Math.round(z.snap(ka.height)))}};if("["==T.charAt(0)){var ra=M;z.view.validate();this.executeLayouts(z.createLayouts(JSON.parse(T)),function(){sa();ra()});M=null}else if("circle"==T){var ya=new mxCircleLayout(z);ya.disableEdgeStyle=!1;ya.resetEdges=
-!1;var ia=ya.isVertexIgnored;ya.isVertexIgnored=function(pa){return ia.apply(this,arguments)||0>mxUtils.indexOf(q,pa)};this.executeLayout(function(){ya.execute(z.getDefaultParent());sa()},!0,M);M=null}else if("horizontaltree"==T||"verticaltree"==T||"auto"==T&&Ba.length==2*q.length-1&&1==ta.length){z.view.validate();var ma=new mxCompactTreeLayout(z,"horizontaltree"==T);ma.levelDistance=V;ma.edgeRouting=!1;ma.resetEdges=!1;this.executeLayout(function(){ma.execute(z.getDefaultParent(),0<ta.length?ta[0]:
-null)},!0,M);M=null}else if("horizontalflow"==T||"verticalflow"==T||"auto"==T&&1==ta.length){z.view.validate();var ca=new mxHierarchicalLayout(z,"horizontalflow"==T?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ca.intraCellSpacing=V;ca.parallelEdgeSpacing=W;ca.interRankCellSpacing=t;ca.disableEdgeStyle=!1;this.executeLayout(function(){ca.execute(z.getDefaultParent(),Ba);z.moveCells(Ba,P,S)},!0,M);M=null}else if("orgchart"==T){z.view.validate();var fa=new mxOrgChartLayout(z,2,t,V),oa=fa.isVertexIgnored;
-fa.isVertexIgnored=function(pa){return oa.apply(this,arguments)||0>mxUtils.indexOf(q,pa)};this.executeLayout(function(){fa.execute(z.getDefaultParent());sa()},!0,M);M=null}else if("organic"==T||"auto"==T&&Ba.length>q.length){z.view.validate();var la=new mxFastOrganicLayout(z);la.forceConstant=3*V;la.disableEdgeStyle=!1;la.resetEdges=!1;var qa=la.isVertexIgnored;la.isVertexIgnored=function(pa){return qa.apply(this,arguments)||0>mxUtils.indexOf(q,pa)};this.executeLayout(function(){la.execute(z.getDefaultParent());
-sa()},!0,M);M=null}}this.hideDialog()}finally{z.model.endUpdate()}null!=M&&M()}}catch(pa){this.handleError(pa)}};EditorUi.prototype.getSearch=function(d){var g="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=d&&0<window.location.search.length){var k="?",l;for(l in urlParams)0>mxUtils.indexOf(d,l)&&null!=urlParams[l]&&(g+=k+l+"="+urlParams[l],k="&")}else g=window.location.search;return g};EditorUi.prototype.getUrl=function(d){d=null!=d?d:window.location.pathname;var g=0<d.indexOf("?")?1:0;
+function(){mxscript("js/orgchart/mxOrgChartLayout.js",g)})})}):mxscript(DRAWIO_BASE_URL+"/js/orgchart.min.js",g))};EditorUi.prototype.importCsv=function(d,g){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(d,g)}))};EditorUi.prototype.doImportCsv=function(d,g){try{var k=d.split("\n"),l=[],p=[],q=[],x={};if(0<k.length){var y={},z=this.editor.graph,A=null,J=null,O=null,K=null,u=null,E=null,B=null,D="whiteSpace=wrap;html=1;",G=null,H=null,N="",F="auto",I="auto",Q=!1,X=null,L=null,
+U=40,W=40,t=100,C=0,M=function(){null!=g?g(Ka):(z.setSelectionCells(Ka),z.scrollCellToVisible(z.getSelectionCell()))},S=z.getFreeInsertPoint(),P=S.x,R=S.y;S=R;var T=null,V="auto";H=null;for(var Y=[],ba=null,Z=null,da=0;da<k.length&&"#"==k[da].charAt(0);){d=k[da].replace(/\r$/,"");for(da++;da<k.length&&"\\"==d.charAt(d.length-1)&&"#"==k[da].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(k[da].substring(1)),da++;if("#"!=d.charAt(1)){var ea=d.indexOf(":");if(0<ea){var ka=mxUtils.trim(d.substring(1,
+ea)),aa=mxUtils.trim(d.substring(ea+1));"label"==ka?T=z.sanitizeHtml(aa):"labelname"==ka&&0<aa.length&&"-"!=aa?u=aa:"labels"==ka&&0<aa.length&&"-"!=aa?B=JSON.parse(aa):"style"==ka?J=aa:"parentstyle"==ka?D=aa:"unknownStyle"==ka&&"-"!=aa?E=aa:"stylename"==ka&&0<aa.length&&"-"!=aa?K=aa:"styles"==ka&&0<aa.length&&"-"!=aa?O=JSON.parse(aa):"vars"==ka&&0<aa.length&&"-"!=aa?A=JSON.parse(aa):"identity"==ka&&0<aa.length&&"-"!=aa?G=aa:"parent"==ka&&0<aa.length&&"-"!=aa?H=aa:"namespace"==ka&&0<aa.length&&"-"!=
+aa?N=aa:"width"==ka?F=aa:"height"==ka?I=aa:"collapsed"==ka&&"-"!=aa?Q="true"==aa:"left"==ka&&0<aa.length?X=aa:"top"==ka&&0<aa.length?L=aa:"ignore"==ka?Z=aa.split(","):"connect"==ka?Y.push(JSON.parse(aa)):"link"==ka?ba=aa:"padding"==ka?C=parseFloat(aa):"edgespacing"==ka?U=parseFloat(aa):"nodespacing"==ka?W=parseFloat(aa):"levelspacing"==ka?t=parseFloat(aa):"layout"==ka&&(V=aa)}}}if(null==k[da])throw Error(mxResources.get("invalidOrMissingFile"));var Ba=this.editor.csvToArray(k[da].replace(/\r$/,""));
+ea=d=null;ka=[];for(aa=0;aa<Ba.length;aa++)G==Ba[aa]&&(d=aa),H==Ba[aa]&&(ea=aa),ka.push(mxUtils.trim(Ba[aa]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==T&&(T="%"+ka[0]+"%");if(null!=Y)for(var Ea=0;Ea<Y.length;Ea++)null==y[Y[Ea].to]&&(y[Y[Ea].to]={});G=[];for(aa=da+1;aa<k.length;aa++){var Ca=this.editor.csvToArray(k[aa].replace(/\r$/,""));if(null==Ca){var Da=40<k[aa].length?k[aa].substring(0,40)+"...":k[aa];throw Error(Da+" ("+aa+"):\n"+mxResources.get("containsValidationErrors"));
+}0<Ca.length&&G.push(Ca)}z.model.beginUpdate();try{for(aa=0;aa<G.length;aa++){Ca=G[aa];var pa=null,Ha=null!=d?N+Ca[d]:null;k=!1;null!=Ha&&(pa=z.model.getCell(Ha),k=null==pa||0<=mxUtils.indexOf(l,pa));var Ja=new mxCell(T,new mxGeometry(P,S,0,0),J||"whiteSpace=wrap;html=1;");Ja.collapsed=Q;Ja.vertex=!0;Ja.id=Ha;null==pa||k||z.model.setCollapsed(pa,Q);for(var ya=0;ya<Ca.length;ya++)z.setAttributeForCell(Ja,ka[ya],Ca[ya]),null==pa||k||z.setAttributeForCell(pa,ka[ya],Ca[ya]);if(null!=u&&null!=B){var Ia=
+B[Ja.getAttribute(u)];null!=Ia&&(z.labelChanged(Ja,Ia),null==pa||k||z.cellLabelChanged(pa,Ia))}if(null!=K&&null!=O){var Fa=O[Ja.getAttribute(K)];null!=Fa&&(Ja.style=Fa)}z.setAttributeForCell(Ja,"placeholders","1");Ja.style=z.replacePlaceholders(Ja,Ja.style,A);null==pa||k?z.fireEvent(new mxEventObject("cellsInserted","cells",[Ja])):(z.model.setStyle(pa,Ja.style),0>mxUtils.indexOf(q,pa)&&q.push(pa),z.fireEvent(new mxEventObject("cellsInserted","cells",[pa])));k=null!=pa;pa=Ja;if(!k)for(Ea=0;Ea<Y.length;Ea++)y[Y[Ea].to][pa.getAttribute(Y[Ea].to)]=
+pa;null!=ba&&"link"!=ba&&(z.setLinkForCell(pa,pa.getAttribute(ba)),z.setAttributeForCell(pa,ba,null));var Pa=this.editor.graph.getPreferredSizeForCell(pa);H=null!=ea?z.model.getCell(N+Ca[ea]):null;if(pa.vertex){Da=null!=H?0:P;da=null!=H?0:R;null!=X&&null!=pa.getAttribute(X)&&(pa.geometry.x=Da+parseFloat(pa.getAttribute(X)));null!=L&&null!=pa.getAttribute(L)&&(pa.geometry.y=da+parseFloat(pa.getAttribute(L)));var wa="@"==F.charAt(0)?pa.getAttribute(F.substring(1)):null;pa.geometry.width=null!=wa&&"auto"!=
+wa?parseFloat(pa.getAttribute(F.substring(1))):"auto"==F||"auto"==wa?Pa.width+C:parseFloat(F);var za="@"==I.charAt(0)?pa.getAttribute(I.substring(1)):null;pa.geometry.height=null!=za&&"auto"!=za?parseFloat(za):"auto"==I||"auto"==za?Pa.height+C:parseFloat(I);S+=pa.geometry.height+W}k?(null==x[Ha]&&(x[Ha]=[]),x[Ha].push(pa)):(l.push(pa),null!=H?(H.style=z.replacePlaceholders(H,D,A),z.addCell(pa,H),p.push(H)):q.push(z.addCell(pa)))}for(aa=0;aa<p.length;aa++)wa="@"==F.charAt(0)?p[aa].getAttribute(F.substring(1)):
+null,za="@"==I.charAt(0)?p[aa].getAttribute(I.substring(1)):null,"auto"!=F&&"auto"!=wa||"auto"!=I&&"auto"!=za||z.updateGroupBounds([p[aa]],C,!0);var va=q.slice(),Ka=q.slice();for(Ea=0;Ea<Y.length;Ea++){var ia=Y[Ea];for(aa=0;aa<l.length;aa++){pa=l[aa];var ja=mxUtils.bind(this,function(ma,oa,ta){var Na=oa.getAttribute(ta.from);if(null!=Na&&""!=Na){Na=Na.split(",");for(var Sa=0;Sa<Na.length;Sa++){var Ga=y[ta.to][Na[Sa]];if(null==Ga&&null!=E){Ga=new mxCell(Na[Sa],new mxGeometry(P,R,0,0),E);Ga.style=z.replacePlaceholders(oa,
+Ga.style,A);var La=this.editor.graph.getPreferredSizeForCell(Ga);Ga.geometry.width=La.width+C;Ga.geometry.height=La.height+C;y[ta.to][Na[Sa]]=Ga;Ga.vertex=!0;Ga.id=Na[Sa];q.push(z.addCell(Ga))}if(null!=Ga){La=ta.label;null!=ta.fromlabel&&(La=(oa.getAttribute(ta.fromlabel)||"")+(La||""));null!=ta.sourcelabel&&(La=z.replacePlaceholders(oa,ta.sourcelabel,A)+(La||""));null!=ta.tolabel&&(La=(La||"")+(Ga.getAttribute(ta.tolabel)||""));null!=ta.targetlabel&&(La=(La||"")+z.replacePlaceholders(Ga,ta.targetlabel,
+A));var Qa="target"==ta.placeholders==!ta.invert?Ga:ma;Qa=null!=ta.style?z.replacePlaceholders(Qa,ta.style,A):z.createCurrentEdgeStyle();La=z.insertEdge(null,null,La||"",ta.invert?Ga:ma,ta.invert?ma:Ga,Qa);if(null!=ta.labels)for(Qa=0;Qa<ta.labels.length;Qa++){var Oa=ta.labels[Qa],Ra=new mxCell(Oa.label||Qa,new mxGeometry(null!=Oa.x?Oa.x:0,null!=Oa.y?Oa.y:0,0,0),"resizable=0;html=1;");Ra.vertex=!0;Ra.connectable=!1;Ra.geometry.relative=!0;null!=Oa.placeholders&&(Ra.value=z.replacePlaceholders("target"==
+Oa.placeholders==!ta.invert?Ga:ma,Ra.value,A));if(null!=Oa.dx||null!=Oa.dy)Ra.geometry.offset=new mxPoint(null!=Oa.dx?Oa.dx:0,null!=Oa.dy?Oa.dy:0);La.insert(Ra)}Ka.push(La);mxUtils.remove(ta.invert?ma:Ga,va)}}}});ja(pa,pa,ia);if(null!=x[pa.id])for(ya=0;ya<x[pa.id].length;ya++)ja(pa,x[pa.id][ya],ia)}}if(null!=Z)for(aa=0;aa<l.length;aa++)for(pa=l[aa],ya=0;ya<Z.length;ya++)z.setAttributeForCell(pa,mxUtils.trim(Z[ya]),null);if(0<q.length){var ua=new mxParallelEdgeLayout(z);ua.spacing=U;ua.checkOverlap=
+!0;var xa=function(){0<ua.spacing&&ua.execute(z.getDefaultParent());for(var ma=0;ma<q.length;ma++){var oa=z.getCellGeometry(q[ma]);oa.x=Math.round(z.snap(oa.x));oa.y=Math.round(z.snap(oa.y));"auto"==F&&(oa.width=Math.round(z.snap(oa.width)));"auto"==I&&(oa.height=Math.round(z.snap(oa.height)))}};if("["==V.charAt(0)){var ra=M;z.view.validate();this.executeLayouts(z.createLayouts(JSON.parse(V)),function(){xa();ra()});M=null}else if("circle"==V){var Aa=new mxCircleLayout(z);Aa.disableEdgeStyle=!1;Aa.resetEdges=
+!1;var fa=Aa.isVertexIgnored;Aa.isVertexIgnored=function(ma){return fa.apply(this,arguments)||0>mxUtils.indexOf(q,ma)};this.executeLayout(function(){Aa.execute(z.getDefaultParent());xa()},!0,M);M=null}else if("horizontaltree"==V||"verticaltree"==V||"auto"==V&&Ka.length==2*q.length-1&&1==va.length){z.view.validate();var na=new mxCompactTreeLayout(z,"horizontaltree"==V);na.levelDistance=W;na.edgeRouting=!1;na.resetEdges=!1;this.executeLayout(function(){na.execute(z.getDefaultParent(),0<va.length?va[0]:
+null)},!0,M);M=null}else if("horizontalflow"==V||"verticalflow"==V||"auto"==V&&1==va.length){z.view.validate();var qa=new mxHierarchicalLayout(z,"horizontalflow"==V?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);qa.intraCellSpacing=W;qa.parallelEdgeSpacing=U;qa.interRankCellSpacing=t;qa.disableEdgeStyle=!1;this.executeLayout(function(){qa.execute(z.getDefaultParent(),Ka);z.moveCells(Ka,P,R)},!0,M);M=null}else if("orgchart"==V){z.view.validate();var ca=new mxOrgChartLayout(z,2,t,W),ha=ca.isVertexIgnored;
+ca.isVertexIgnored=function(ma){return ha.apply(this,arguments)||0>mxUtils.indexOf(q,ma)};this.executeLayout(function(){ca.execute(z.getDefaultParent());xa()},!0,M);M=null}else if("organic"==V||"auto"==V&&Ka.length>q.length){z.view.validate();var sa=new mxFastOrganicLayout(z);sa.forceConstant=3*W;sa.disableEdgeStyle=!1;sa.resetEdges=!1;var la=sa.isVertexIgnored;sa.isVertexIgnored=function(ma){return la.apply(this,arguments)||0>mxUtils.indexOf(q,ma)};this.executeLayout(function(){sa.execute(z.getDefaultParent());
+xa()},!0,M);M=null}}this.hideDialog()}finally{z.model.endUpdate()}null!=M&&M()}}catch(ma){this.handleError(ma)}};EditorUi.prototype.getSearch=function(d){var g="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=d&&0<window.location.search.length){var k="?",l;for(l in urlParams)0>mxUtils.indexOf(d,l)&&null!=urlParams[l]&&(g+=k+l+"="+urlParams[l],k="&")}else g=window.location.search;return g};EditorUi.prototype.getUrl=function(d){d=null!=d?d:window.location.pathname;var g=0<d.indexOf("?")?1:0;
if("1"==urlParams.offline)d+=window.location.search;else{var k="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),l;for(l in urlParams)0>mxUtils.indexOf(k,l)&&(d=0==g?d+"?":d+"&",null!=urlParams[l]&&(d+=l+"="+urlParams[l],g++))}return d};EditorUi.prototype.showLinkDialog=function(d,g,k,l,p){d=new LinkDialog(this,d,g,k,!0,l,p);this.showDialog(d.container,560,130,!0,!0);d.init()};EditorUi.prototype.getServiceCount=function(d){var g=1;null==this.drive&&
"function"!==typeof window.DriveClient||g++;null==this.dropbox&&"function"!==typeof window.DropboxClient||g++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||g++;null!=this.gitHub&&g++;null!=this.gitLab&&g++;d&&isLocalStorage&&"1"==urlParams.browser&&g++;return g};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var d=this.getCurrentFile(),g=null!=d||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(g);
this.menus.get("viewZoom").setEnabled(g);var k=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==d||d.isRestricted());this.actions.get("makeCopy").setEnabled(!k);this.actions.get("print").setEnabled(!k);this.menus.get("exportAs").setEnabled(!k);this.menus.get("embed").setEnabled(!k);k="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(k);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(k),this.menus.get("newLibrary").setEnabled(k));
@@ -12096,23 +12092,23 @@ null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMen
this.actions.get("connectionArrows").setEnabled(l);this.actions.get("connectionPoints").setEnabled(l);this.actions.get("copyStyle").setEnabled(l&&!d.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(l&&0<k.cells.length);this.actions.get("editGeometry").setEnabled(0<k.vertices.length);this.actions.get("createShape").setEnabled(l);this.actions.get("createRevision").setEnabled(l);this.actions.get("moveToFolder").setEnabled(null!=g);this.actions.get("makeCopy").setEnabled(null!=g&&!g.isRestricted());
this.actions.get("editDiagram").setEnabled(l&&(null==g||!g.isRestricted()));this.actions.get("publishLink").setEnabled(null!=g&&!g.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!=g&&g.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=
g);this.menus.get("publish").setEnabled(null!=g&&!g.isRestricted());g=this.actions.get("findReplace");g.setEnabled("hidden"!=this.diagramContainer.style.visibility);g.label=mxResources.get("find")+(d.isEnabled()?"/"+mxResources.get("replace"):"")+"...";d=d.view.getState(d.getSelectionCell());this.actions.get("editShape").setEnabled(l&&null!=d&&null!=d.shape&&null!=d.shape.stencil)};var v=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),
-this.exportDialog=null);v.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(d,g,k,l,p,q,x,y){var z=d.editor.graph;if("xml"==k)d.hideDialog(),d.saveData(g,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");else if("svg"==k)d.hideDialog(),d.saveData(g,"svg",mxUtils.getXml(z.getSvg(l,p,q)),"image/svg+xml");else{var A=d.getFileData(!0,null,null,null,null,!0),K=z.getGraphBounds(),O=Math.floor(K.width*p/
-z.view.scale),L=Math.floor(K.height*p/z.view.scale);if(A.length<=MAX_REQUEST_SIZE&&O*L<MAX_AREA)if(d.hideDialog(),"png"!=k&&"jpg"!=k&&"jpeg"!=k||!d.isExportToCanvas()){var u={globalVars:z.getExportVariables()};y&&(u.grid={size:z.gridSize,steps:z.view.gridSteps,color:z.view.gridColor});d.saveRequest(g,k,function(E,B){return new mxXmlRequest(EXPORT_URL,"format="+k+"&base64="+(B||"0")+(null!=E?"&filename="+encodeURIComponent(E):"")+"&extras="+encodeURIComponent(JSON.stringify(u))+(0<x?"&dpi="+x:"")+
-"&bg="+(null!=l?l:"none")+"&w="+O+"&h="+L+"&border="+q+"&xml="+encodeURIComponent(A))})}else"png"==k?d.exportImage(p,null==l||"none"==l,!0,!1,!1,q,!0,!1,null,y,x):d.exportImage(p,!1,!0,!1,!1,q,!0,!1,"jpeg",y);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var d=this.editor.graph,g="";if(null!=this.pages)for(var k=0;k<this.pages.length;k++){var l=d;this.currentPage!=this.pages[k]&&(l=this.createTemporaryGraph(d.getStylesheet()),
+this.exportDialog=null);v.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(d,g,k,l,p,q,x,y){var z=d.editor.graph;if("xml"==k)d.hideDialog(),d.saveData(g,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");else if("svg"==k)d.hideDialog(),d.saveData(g,"svg",mxUtils.getXml(z.getSvg(l,p,q)),"image/svg+xml");else{var A=d.getFileData(!0,null,null,null,null,!0),J=z.getGraphBounds(),O=Math.floor(J.width*p/
+z.view.scale),K=Math.floor(J.height*p/z.view.scale);if(A.length<=MAX_REQUEST_SIZE&&O*K<MAX_AREA)if(d.hideDialog(),"png"!=k&&"jpg"!=k&&"jpeg"!=k||!d.isExportToCanvas()){var u={globalVars:z.getExportVariables()};y&&(u.grid={size:z.gridSize,steps:z.view.gridSteps,color:z.view.gridColor});d.saveRequest(g,k,function(E,B){return new mxXmlRequest(EXPORT_URL,"format="+k+"&base64="+(B||"0")+(null!=E?"&filename="+encodeURIComponent(E):"")+"&extras="+encodeURIComponent(JSON.stringify(u))+(0<x?"&dpi="+x:"")+
+"&bg="+(null!=l?l:"none")+"&w="+O+"&h="+K+"&border="+q+"&xml="+encodeURIComponent(A))})}else"png"==k?d.exportImage(p,null==l||"none"==l,!0,!1,!1,q,!0,!1,null,y,x):d.exportImage(p,!1,!0,!1,!1,q,!0,!1,"jpeg",y);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var d=this.editor.graph,g="";if(null!=this.pages)for(var k=0;k<this.pages.length;k++){var l=d;this.currentPage!=this.pages[k]&&(l=this.createTemporaryGraph(d.getStylesheet()),
this.updatePageRoot(this.pages[k]),l.model.setRoot(this.pages[k].root));g+=this.pages[k].getName()+" "+l.getIndexableText()+" "}else g=d.getIndexableText();this.editor.graph.setEnabled(!0);return g};EditorUi.prototype.showRemotelyStoredLibrary=function(d){var g={},k=document.createElement("div");k.style.whiteSpace="nowrap";var l=document.createElement("h3");mxUtils.write(l,mxUtils.htmlEntities(d));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(l);var p=
document.createElement("div");p.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";p.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var q={};try{var x=mxSettings.getCustomLibraries();for(d=0;d<x.length;d++){var y=x[d];if("R"==y.substring(0,1)){var z=JSON.parse(decodeURIComponent(y.substring(1)));q[z[0]]={id:z[0],title:z[1],downloadUrl:z[2]}}}}catch(A){}this.remoteInvoke("getCustomLibraries",null,null,function(A){p.innerText="";
-if(0==A.length)p.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var K=0;K<A.length;K++){var O=A[K];q[O.id]&&(g[O.id]=O);var L=this.addCheckbox(p,O.title,q[O.id]);(function(u,E){mxEvent.addListener(E,"change",function(){this.checked?g[u.id]=u:delete g[u.id]})})(O,L)}},mxUtils.bind(this,function(A){p.innerText="";var K=document.createElement("div");K.style.padding="8px";K.style.textAlign="center";mxUtils.write(K,
-mxResources.get("error")+": ");mxUtils.write(K,null!=A&&null!=A.message?A.message:mxResources.get("unknownError"));p.appendChild(K)}));k.appendChild(p);k=new CustomDialog(this,k,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var A=0,K;for(K in g)null==q[K]&&(A++,mxUtils.bind(this,function(O){this.remoteInvoke("getFileContent",[O.downloadUrl],null,mxUtils.bind(this,function(L){A--;0==A&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,L,O))}catch(u){this.handleError(u,
-mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){A--;0==A&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(g[K]));for(K in q)g[K]||this.closeLibrary(new RemoteLibrary(this,null,q[K]));0==A&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(k.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,
+if(0==A.length)p.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var J=0;J<A.length;J++){var O=A[J];q[O.id]&&(g[O.id]=O);var K=this.addCheckbox(p,O.title,q[O.id]);(function(u,E){mxEvent.addListener(E,"change",function(){this.checked?g[u.id]=u:delete g[u.id]})})(O,K)}},mxUtils.bind(this,function(A){p.innerText="";var J=document.createElement("div");J.style.padding="8px";J.style.textAlign="center";mxUtils.write(J,
+mxResources.get("error")+": ");mxUtils.write(J,null!=A&&null!=A.message?A.message:mxResources.get("unknownError"));p.appendChild(J)}));k.appendChild(p);k=new CustomDialog(this,k,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var A=0,J;for(J in g)null==q[J]&&(A++,mxUtils.bind(this,function(O){this.remoteInvoke("getFileContent",[O.downloadUrl],null,mxUtils.bind(this,function(K){A--;0==A&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,K,O))}catch(u){this.handleError(u,
+mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){A--;0==A&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(g[J]));for(J in q)g[J]||this.closeLibrary(new RemoteLibrary(this,null,q[J]));0==A&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(k.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(d){this.remoteWin=d;for(var g=0;g<this.remoteInvokeQueue.length;g++)d.postMessage(this.remoteInvokeQueue[g],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(d){var g=
d.msgMarkers,k=this.remoteInvokeCallbacks[g.callbackId];if(null==k)throw Error("No callback for "+(null!=g?g.callbackId:"null"));d.error?k.error&&k.error(d.error.errResp):k.callback&&k.callback.apply(this,d.resp);this.remoteInvokeCallbacks[g.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,g,k,l,p){var q=!0,x=window.setTimeout(mxUtils.bind(this,function(){q=!1;p({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),y=mxUtils.bind(this,function(){window.clearTimeout(x);
-q&&l.apply(this,arguments)}),z=mxUtils.bind(this,function(){window.clearTimeout(x);q&&p.apply(this,arguments)});k=k||{};k.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:y,error:z});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:g,msgMarkers:k});null!=this.remoteWin?this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,g){var k=mxUtils.bind(this,function(A,K){var O={event:"remoteInvokeResponse",
-msgMarkers:d.msgMarkers};null!=K?O.error={errResp:K}:null!=A&&(O.resp=A);this.remoteWin.postMessage(JSON.stringify(O),"*")});try{var l=d.funtionName,p=this.remoteInvokableFns[l];if(null!=p&&"function"===typeof this[l]){if(p.allowedDomains){for(var q=!1,x=0;x<p.allowedDomains.length;x++)if(g=="https://"+p.allowedDomains[x]){q=!0;break}if(!q){k(null,"Invalid Call: "+l+" is not allowed.");return}}var y=d.functionArgs;Array.isArray(y)||(y=[]);if(p.isAsync)y.push(function(){k(Array.prototype.slice.apply(arguments))}),
+q&&l.apply(this,arguments)}),z=mxUtils.bind(this,function(){window.clearTimeout(x);q&&p.apply(this,arguments)});k=k||{};k.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:y,error:z});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:g,msgMarkers:k});null!=this.remoteWin?this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,g){var k=mxUtils.bind(this,function(A,J){var O={event:"remoteInvokeResponse",
+msgMarkers:d.msgMarkers};null!=J?O.error={errResp:J}:null!=A&&(O.resp=A);this.remoteWin.postMessage(JSON.stringify(O),"*")});try{var l=d.funtionName,p=this.remoteInvokableFns[l];if(null!=p&&"function"===typeof this[l]){if(p.allowedDomains){for(var q=!1,x=0;x<p.allowedDomains.length;x++)if(g=="https://"+p.allowedDomains[x]){q=!0;break}if(!q){k(null,"Invalid Call: "+l+" is not allowed.");return}}var y=d.functionArgs;Array.isArray(y)||(y=[]);if(p.isAsync)y.push(function(){k(Array.prototype.slice.apply(arguments))}),
y.push(function(A){k(null,A||"Unkown Error")}),this[l].apply(this,y);else{var z=this[l].apply(this,y);k([z])}}else k(null,"Invalid Call: "+l+" is not found.")}catch(A){k(null,"Invalid Call: An error occurred, "+A.message)}};EditorUi.prototype.openDatabase=function(d,g){if(null==this.database){var k=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=k)try{var l=k.open("database",2);l.onupgradeneeded=function(p){try{var q=l.result;1>p.oldVersion&&q.createObjectStore("objects",{keyPath:"key"});
2>p.oldVersion&&(q.createObjectStore("files",{keyPath:"title"}),q.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(x){null!=g&&g(x)}};l.onsuccess=mxUtils.bind(this,function(p){var q=l.result;this.database=q;EditorUi.migrateStorageFiles&&(StorageFile.migrate(q),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(x){if(!x||
-"1"==urlParams.forceMigration){var y=document.createElement("iframe");y.style.display="none";y.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(y);var z=!0,A=!1,K,O=0,L=mxUtils.bind(this,function(){A=!0;this.setDatabaseItem(".drawioMigrated3",!0);y.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),u=mxUtils.bind(this,function(){O++;E()}),E=mxUtils.bind(this,function(){try{if(O>=
-K.length)L();else{var D=K[O];StorageFile.getFileContent(this,D,mxUtils.bind(this,function(G){null==G||".scratchpad"==D&&G==this.emptyLibraryXml?y.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[D]}),"*"):u()}),u)}}catch(G){console.log(G)}}),B=mxUtils.bind(this,function(D){try{this.setDatabaseItem(null,[{title:D.title,size:D.data.length,lastModified:Date.now(),type:D.isLib?"L":"F"},{title:D.title,data:D.data}],u,u,["filesInfo","files"])}catch(G){console.log(G)}});
-x=mxUtils.bind(this,function(D){try{if(D.source==y.contentWindow){var G={};try{G=JSON.parse(D.data)}catch(N){}"init"==G.event?(y.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),y.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=G.event||A||(z?null!=G.resp&&0<G.resp.length&&null!=G.resp[0]?(K=G.resp[0],z=!1,E()):L():null!=G.resp&&0<G.resp.length&&null!=G.resp[0]?B(G.resp[0]):u())}}catch(N){console.log(N)}});
+"1"==urlParams.forceMigration){var y=document.createElement("iframe");y.style.display="none";y.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(y);var z=!0,A=!1,J,O=0,K=mxUtils.bind(this,function(){A=!0;this.setDatabaseItem(".drawioMigrated3",!0);y.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),u=mxUtils.bind(this,function(){O++;E()}),E=mxUtils.bind(this,function(){try{if(O>=
+J.length)K();else{var D=J[O];StorageFile.getFileContent(this,D,mxUtils.bind(this,function(G){null==G||".scratchpad"==D&&G==this.emptyLibraryXml?y.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[D]}),"*"):u()}),u)}}catch(G){console.log(G)}}),B=mxUtils.bind(this,function(D){try{this.setDatabaseItem(null,[{title:D.title,size:D.data.length,lastModified:Date.now(),type:D.isLib?"L":"F"},{title:D.title,data:D.data}],u,u,["filesInfo","files"])}catch(G){console.log(G)}});
+x=mxUtils.bind(this,function(D){try{if(D.source==y.contentWindow){var G={};try{G=JSON.parse(D.data)}catch(H){}"init"==G.event?(y.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),y.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=G.event||A||(z?null!=G.resp&&0<G.resp.length&&null!=G.resp[0]?(J=G.resp[0],z=!1,E()):K():null!=G.resp&&0<G.resp.length&&null!=G.resp[0]?B(G.resp[0]):u())}}catch(H){console.log(H)}});
window.addEventListener("message",x)}})));d(q);q.onversionchange=function(){q.close()}});l.onerror=g;l.onblocked=function(){}}catch(p){null!=g&&g(p)}else null!=g&&g()}else d(this.database)};EditorUi.prototype.setDatabaseItem=function(d,g,k,l,p){this.openDatabase(mxUtils.bind(this,function(q){try{p=p||"objects";Array.isArray(p)||(p=[p],d=[d],g=[g]);var x=q.transaction(p,"readwrite");x.oncomplete=k;x.onerror=l;for(q=0;q<p.length;q++)x.objectStore(p[q]).put(null!=d&&null!=d[q]?{key:d[q],data:g[q]}:g[q])}catch(y){null!=
l&&l(y)}}),l)};EditorUi.prototype.removeDatabaseItem=function(d,g,k,l){this.openDatabase(mxUtils.bind(this,function(p){l=l||"objects";Array.isArray(l)||(l=[l],d=[d]);p=p.transaction(l,"readwrite");p.oncomplete=g;p.onerror=k;for(var q=0;q<l.length;q++)p.objectStore(l[q]).delete(d[q])}),k)};EditorUi.prototype.getDatabaseItem=function(d,g,k,l){this.openDatabase(mxUtils.bind(this,function(p){try{l=l||"objects";var q=p.transaction([l],"readonly").objectStore(l).get(d);q.onsuccess=function(){g(q.result)};
q.onerror=k}catch(x){null!=k&&k(x)}}),k)};EditorUi.prototype.getDatabaseItems=function(d,g,k){this.openDatabase(mxUtils.bind(this,function(l){try{k=k||"objects";var p=l.transaction([k],"readonly").objectStore(k).openCursor(IDBKeyRange.lowerBound(0)),q=[];p.onsuccess=function(x){null==x.target.result?d(q):(q.push(x.target.result.value),x.target.result.continue())};p.onerror=g}catch(x){null!=g&&g(x)}}),g)};EditorUi.prototype.getDatabaseItemKeys=function(d,g,k){this.openDatabase(mxUtils.bind(this,function(l){try{k=
@@ -12120,45 +12116,44 @@ k||"objects";var p=l.transaction([k],"readonly").objectStore(k).getAllKeys();p.o
!1};EditorUi.prototype.getComments=function(d,g){var k=this.getCurrentFile();null!=k?k.getComments(d,g):d([])};EditorUi.prototype.addComment=function(d,g,k){var l=this.getCurrentFile();null!=l?l.addComment(d,g,k):g(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var d=this.getCurrentFile();return null!=d?d.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var d=this.getCurrentFile();return null!=d?d.canComment():!0};EditorUi.prototype.newComment=function(d,g){var k=this.getCurrentFile();
return null!=k?k.newComment(d,g):new DrawioComment(this,null,d,Date.now(),Date.now(),!1,g)};EditorUi.prototype.isRevisionHistorySupported=function(){var d=this.getCurrentFile();return null!=d&&d.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(d,g){var k=this.getCurrentFile();null!=k&&k.getRevisions?k.getRevisions(d,g):g({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var d=this.getCurrentFile();return null!=d&&(d.constructor==
DriveFile&&d.isEditable()||d.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(d){d.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(d,g,k,l,p,q,x,y){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(d,g,k,l,p,q,x,y)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(d)};
-EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,g){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(d,g)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,g,k,l,p,q,x,y,z,A,K,O,L,u,E,B){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");
-return this.editor.exportToCanvas(d,g,k,l,p,q,x,y,z,A,K,O,L,u,E,B)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(d,g,k,l){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(d,g,k,l)};EditorUi.prototype.convertImageToDataUri=function(d,g){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");
+EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,g){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(d,g)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,g,k,l,p,q,x,y,z,A,J,O,K,u,E,B){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");
+return this.editor.exportToCanvas(d,g,k,l,p,q,x,y,z,A,J,O,K,u,E,B)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(d,g,k,l){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(d,g,k,l)};EditorUi.prototype.convertImageToDataUri=function(d,g){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");
return this.editor.convertImageToDataUri(d,g)};EditorUi.prototype.base64Encode=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(d)};EditorUi.prototype.updateCRC=function(d,g,k,l){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(d,g,k,l)};EditorUi.prototype.crc32=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(d)};EditorUi.prototype.writeGraphModelToPng=function(d,g,k,l,p){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");
return Editor.writeGraphModelToPng(d,g,k,l,p)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var d=[],g=0;g<localStorage.length;g++){var k=localStorage.key(g),l=localStorage.getItem(k);if(0<k.length&&(".scratchpad"==k||"."!=k.charAt(0))&&0<l.length){var p="<mxfile "===l.substring(0,8)||"<?xml"===l.substring(0,5)||"\x3c!--[if IE]>"===l.substring(0,12);l="<mxlibrary>"===l.substring(0,11);(p||
l)&&d.push(k)}}return d};EditorUi.prototype.getLocalStorageFile=function(d){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var g=localStorage.getItem(d);return{title:d,data:g,isLib:"<mxlibrary>"===g.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(b,e,f,c,m,n){function v(){for(var I=O.getElementsByTagName("div"),F=0,H=0;H<I.length;H++)"none"!=I[H].style.display&&I[H].parentNode==O&&F++;L.style.display=0==F?"block":"none"}function d(I,F,H,R){function X(){F.removeChild(V);F.removeChild(t);W.style.display="block";J.style.display="block"}z={div:F,comment:I,saveCallback:H,deleteOnCancel:R};var J=F.querySelector(".geCommentTxt"),W=F.querySelector(".geCommentActionsList"),V=document.createElement("textarea");V.className=
-"geCommentEditTxtArea";V.style.minHeight=J.offsetHeight+"px";V.value=I.content;F.insertBefore(V,J);var t=document.createElement("div");t.className="geCommentEditBtns";var C=mxUtils.button(mxResources.get("cancel"),function(){R?(F.parentNode.removeChild(F),v()):X();z=null});C.className="geCommentEditBtn";t.appendChild(C);var M=mxUtils.button(mxResources.get("save"),function(){J.innerText="";I.content=V.value;mxUtils.write(J,I.content);X();H(I);z=null});mxEvent.addListener(V,"keydown",mxUtils.bind(this,
-function(Q){mxEvent.isConsumed(Q)||((mxEvent.isControlDown(Q)||mxClient.IS_MAC&&mxEvent.isMetaDown(Q))&&13==Q.keyCode?(M.click(),mxEvent.consume(Q)):27==Q.keyCode&&(C.click(),mxEvent.consume(Q)))}));M.focus();M.className="geCommentEditBtn gePrimaryBtn";t.appendChild(M);F.insertBefore(t,J);W.style.display="none";J.style.display="none";V.focus()}function g(I,F){F.innerText="";I=new Date(I.modifiedDate);var H=b.timeSince(I);null==H&&(H=mxResources.get("lessThanAMinute"));mxUtils.write(F,mxResources.get("timeAgo",
-[H],"{1} ago"));F.setAttribute("title",I.toLocaleDateString()+" "+I.toLocaleTimeString())}function k(I){var F=document.createElement("img");F.className="geCommentBusyImg";F.src=IMAGE_PATH+"/spin.gif";I.appendChild(F);I.busyImg=F}function l(I){I.style.border="1px solid red";I.removeChild(I.busyImg)}function p(I){I.style.border="";I.removeChild(I.busyImg)}function q(I,F,H,R,X){function J(S,U,T){var Y=document.createElement("li");Y.className="geCommentAction";var aa=document.createElement("a");aa.className=
-"geCommentActionLnk";mxUtils.write(aa,S);Y.appendChild(aa);mxEvent.addListener(aa,"click",function(Z){U(Z,I);Z.preventDefault();mxEvent.consume(Z)});P.appendChild(Y);T&&(Y.style.display="none")}function W(){function S(Y){U.push(T);if(null!=Y.replies)for(var aa=0;aa<Y.replies.length;aa++)T=T.nextSibling,S(Y.replies[aa])}var U=[],T=t;S(I);return{pdiv:T,replies:U}}function V(S,U,T,Y,aa){function Z(){k(ba);I.addReply(ha,function(Aa){ha.id=Aa;I.replies.push(ha);p(ba);T&&T()},function(Aa){da();l(ba);b.handleError(Aa,
-null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},Y,aa)}function da(){d(ha,ba,function(Aa){Z()},!0)}var ja=W().pdiv,ha=b.newComment(S,b.getCurrentUser());ha.pCommentId=I.id;null==I.replies&&(I.replies=[]);var ba=q(ha,I.replies,ja,R+1);U?da():Z()}if(X||!I.isResolved){L.style.display="none";var t=document.createElement("div");t.className="geCommentContainer";t.setAttribute("data-commentId",I.id);t.style.marginLeft=20*R+5+"px";I.isResolved&&!Editor.isDarkMode()&&(t.style.backgroundColor=
-"ghostWhite");var C=document.createElement("div");C.className="geCommentHeader";var M=document.createElement("img");M.className="geCommentUserImg";M.src=I.user.pictureUrl||Editor.userImage;C.appendChild(M);M=document.createElement("div");M.className="geCommentHeaderTxt";C.appendChild(M);var Q=document.createElement("div");Q.className="geCommentUsername";mxUtils.write(Q,I.user.displayName||"");M.appendChild(Q);Q=document.createElement("div");Q.className="geCommentDate";Q.setAttribute("data-commentId",
-I.id);g(I,Q);M.appendChild(Q);t.appendChild(C);C=document.createElement("div");C.className="geCommentTxt";mxUtils.write(C,I.content||"");t.appendChild(C);I.isLocked&&(t.style.opacity="0.5");C=document.createElement("div");C.className="geCommentActions";var P=document.createElement("ul");P.className="geCommentActionsList";C.appendChild(P);x||I.isLocked||0!=R&&!y||J(mxResources.get("reply"),function(){V("",!0)},I.isResolved);M=b.getCurrentUser();null==M||M.id!=I.user.id||x||I.isLocked||(J(mxResources.get("edit"),
-function(){function S(){d(I,t,function(){k(t);I.editComment(I.content,function(){p(t)},function(U){l(t);S();b.handleError(U,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}S()},I.isResolved),J(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){k(t);I.deleteComment(function(S){if(!0===S){S=t.querySelector(".geCommentTxt");S.innerText="";mxUtils.write(S,mxResources.get("msgDeleted"));var U=t.querySelectorAll(".geCommentAction");for(S=
-0;S<U.length;S++)U[S].parentNode.removeChild(U[S]);p(t);t.style.opacity="0.5"}else{U=W(I).replies;for(S=0;S<U.length;S++)O.removeChild(U[S]);for(S=0;S<F.length;S++)if(F[S]==I){F.splice(S,1);break}L.style.display=0==O.getElementsByTagName("div").length?"block":"none"}},function(S){l(t);b.handleError(S,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},I.isResolved));x||I.isLocked||0!=R||J(I.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(S){function U(){var T=
-S.target;T.innerText="";I.isResolved=!I.isResolved;mxUtils.write(T,I.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var Y=I.isResolved?"none":"",aa=W(I).replies,Z=Editor.isDarkMode()?"transparent":I.isResolved?"ghostWhite":"white",da=0;da<aa.length;da++){aa[da].style.backgroundColor=Z;for(var ja=aa[da].querySelectorAll(".geCommentAction"),ha=0;ha<ja.length;ha++)ja[ha]!=T.parentNode&&(ja[ha].style.display=Y);B||(aa[da].style.display="none")}v()}I.isResolved?V(mxResources.get("reOpened")+
-": ",!0,U,!1,!0):V(mxResources.get("markedAsResolved"),!1,U,!0)});t.appendChild(C);null!=H?O.insertBefore(t,H.nextSibling):O.appendChild(t);for(H=0;null!=I.replies&&H<I.replies.length;H++)C=I.replies[H],C.isResolved=I.isResolved,q(C,I.replies,null,R+1,X);null!=z&&(z.comment.id==I.id?(X=I.content,I.content=z.comment.content,d(I,t,z.saveCallback,z.deleteOnCancel),I.content=X):null==z.comment.id&&z.comment.pCommentId==I.id&&(O.appendChild(z.div),d(z.comment,z.div,z.saveCallback,z.deleteOnCancel)));return t}}
-var x=!b.canComment(),y=b.canReplyToReplies(),z=null,A=document.createElement("div");A.className="geCommentsWin";A.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var K=EditorUi.compactUi?"26px":"30px",O=document.createElement("div");O.className="geCommentsList";O.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";O.style.bottom=parseInt(K)+7+"px";A.appendChild(O);var L=document.createElement("span");L.style.cssText="display:none;padding-top:10px;text-align:center;";
-mxUtils.write(L,mxResources.get("noCommentsFound"));var u=document.createElement("div");u.className="geToolbarContainer geCommentsToolbar";u.style.height=K;u.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";u.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";K=document.createElement("a");K.className="geButton";if(!x){var E=K.cloneNode();E.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';E.setAttribute("title",mxResources.get("create")+
-"...");mxEvent.addListener(E,"click",function(I){function F(){d(H,R,function(X){k(R);b.addComment(X,function(J){X.id=J;D.push(X);p(R)},function(J){l(R);F();b.handleError(J,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var H=b.newComment("",b.getCurrentUser()),R=q(H,D,null,0);F();I.preventDefault();mxEvent.consume(I)});u.appendChild(E)}E=K.cloneNode();E.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';E.setAttribute("title",mxResources.get("showResolved"));
-var B=!1;Editor.isDarkMode()&&(E.style.filter="invert(100%)");mxEvent.addListener(E,"click",function(I){this.className=(B=!B)?"geButton geCheckedBtn":"geButton";G();I.preventDefault();mxEvent.consume(I)});u.appendChild(E);b.commentsRefreshNeeded()&&(E=K.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(I){G();
-I.preventDefault();mxEvent.consume(I)}),u.appendChild(E));b.commentsSaveNeeded()&&(K=K.cloneNode(),K.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',K.setAttribute("title",mxResources.get("save")),Editor.isDarkMode()&&(K.style.filter="invert(100%)"),mxEvent.addListener(K,"click",function(I){n();I.preventDefault();mxEvent.consume(I)}),u.appendChild(K));A.appendChild(u);var D=[],G=mxUtils.bind(this,function(){this.hasError=!1;if(null!=z)try{z.div=z.div.cloneNode(!0);
-var I=z.div.querySelector(".geCommentEditTxtArea"),F=z.div.querySelector(".geCommentEditBtns");z.comment.content=I.value;I.parentNode.removeChild(I);F.parentNode.removeChild(F)}catch(H){b.handleError(H)}O.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";y=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(H){function R(X){if(null!=X){X.sort(function(W,V){return new Date(W.modifiedDate)-
-new Date(V.modifiedDate)});for(var J=0;J<X.length;J++)R(X[J].replies)}}H.sort(function(X,J){return new Date(X.modifiedDate)-new Date(J.modifiedDate)});O.innerText="";O.appendChild(L);L.style.display="block";D=H;for(H=0;H<D.length;H++)R(D[H].replies),q(D[H],D,null,0,B);null!=z&&null==z.comment.id&&null==z.comment.pCommentId&&(O.appendChild(z.div),d(z.comment,z.div,z.saveCallback,z.deleteOnCancel))},mxUtils.bind(this,function(H){O.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(H&&H.message?
-": "+H.message:""));this.hasError=!0})):O.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});G();this.refreshComments=G;u=mxUtils.bind(this,function(){function I(J){var W=H[J.id];if(null!=W)for(g(J,W),W=0;null!=J.replies&&W<J.replies.length;W++)I(J.replies[W])}if(this.window.isVisible()){for(var F=O.querySelectorAll(".geCommentDate"),H={},R=0;R<F.length;R++){var X=F[R];H[X.getAttribute("data-commentId")]=X}for(R=0;R<D.length;R++)I(D[R])}});setInterval(u,6E4);this.refreshCommentsTime=u;this.window=
-new mxWindow(mxResources.get("comments"),A,e,f,c,m,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(I,F){var H=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;I=Math.max(0,Math.min(I,(window.innerWidth||
-document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));F=Math.max(0,Math.min(F,H-this.table.clientHeight-48));this.getX()==I&&this.getY()==F||mxWindow.prototype.setLocation.apply(this,arguments)};var N=mxUtils.bind(this,function(){var I=this.window.getX(),F=this.window.getY();this.window.setLocation(I,F)});mxEvent.addListener(window,"resize",N);this.destroy=function(){mxEvent.removeListener(window,"resize",N);this.window.destroy()}},ConfirmDialog=function(b,e,f,
-c,m,n,v,d,g,k,l){var p=document.createElement("div");p.style.textAlign="center";l=null!=l?l:44;var q=document.createElement("div");q.style.padding="6px";q.style.overflow="auto";q.style.maxHeight=l+"px";q.style.lineHeight="1.2em";mxUtils.write(q,e);p.appendChild(q);null!=k&&(q=document.createElement("div"),q.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",k),q.appendChild(e),p.appendChild(q));k=document.createElement("div");k.style.textAlign="center";k.style.whiteSpace=
-"nowrap";var x=document.createElement("input");x.setAttribute("type","checkbox");n=mxUtils.button(n||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c(x.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&&k.appendChild(n);var y=mxUtils.button(m||mxResources.get("ok"),function(){b.hideDialog();null!=f&&f(x.checked)});k.appendChild(y);null!=v?(y.innerHTML=
-v+"<br>"+y.innerHTML+"<br>",y.style.paddingBottom="8px",y.style.paddingTop="8px",y.style.height="auto",y.className="geBtn",y.style.width="40%"):y.className="geBtn gePrimaryBtn";b.editor.cancelFirst||k.appendChild(n);p.appendChild(k);g?(k.style.marginTop="10px",q=document.createElement("p"),q.style.marginTop="20px",q.style.marginBottom="0px",q.appendChild(x),m=document.createElement("span"),mxUtils.write(m," "+mxResources.get("rememberThisSetting")),q.appendChild(m),p.appendChild(q),mxEvent.addListener(m,
-"click",function(z){x.checked=!x.checked;mxEvent.consume(z)})):k.style.marginTop="12px";this.init=function(){y.focus()};this.container=p};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.transientViewStateProperties="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0,extFonts:!0};
+var CommentsWindow=function(b,e,f,c,m,n){function v(){for(var H=O.getElementsByTagName("div"),N=0,F=0;F<H.length;F++)"none"!=H[F].style.display&&H[F].parentNode==O&&N++;K.style.display=0==N?"block":"none"}function d(H,N,F,I){function Q(){N.removeChild(U);N.removeChild(W);L.style.display="block";X.style.display="block"}z={div:N,comment:H,saveCallback:F,deleteOnCancel:I};var X=N.querySelector(".geCommentTxt"),L=N.querySelector(".geCommentActionsList"),U=document.createElement("textarea");U.className=
+"geCommentEditTxtArea";U.style.minHeight=X.offsetHeight+"px";U.value=H.content;N.insertBefore(U,X);var W=document.createElement("div");W.className="geCommentEditBtns";var t=mxUtils.button(mxResources.get("cancel"),function(){I?(N.parentNode.removeChild(N),v()):Q();z=null});t.className="geCommentEditBtn";W.appendChild(t);var C=mxUtils.button(mxResources.get("save"),function(){X.innerText="";H.content=U.value;mxUtils.write(X,H.content);Q();F(H);z=null});mxEvent.addListener(U,"keydown",mxUtils.bind(this,
+function(M){mxEvent.isConsumed(M)||((mxEvent.isControlDown(M)||mxClient.IS_MAC&&mxEvent.isMetaDown(M))&&13==M.keyCode?(C.click(),mxEvent.consume(M)):27==M.keyCode&&(t.click(),mxEvent.consume(M)))}));C.focus();C.className="geCommentEditBtn gePrimaryBtn";W.appendChild(C);N.insertBefore(W,X);L.style.display="none";X.style.display="none";U.focus()}function g(H,N){N.innerText="";H=new Date(H.modifiedDate);var F=b.timeSince(H);null==F&&(F=mxResources.get("lessThanAMinute"));mxUtils.write(N,mxResources.get("timeAgo",
+[F],"{1} ago"));N.setAttribute("title",H.toLocaleDateString()+" "+H.toLocaleTimeString())}function k(H){var N=document.createElement("img");N.className="geCommentBusyImg";N.src=IMAGE_PATH+"/spin.gif";H.appendChild(N);H.busyImg=N}function l(H){H.style.border="1px solid red";H.removeChild(H.busyImg)}function p(H){H.style.border="";H.removeChild(H.busyImg)}function q(H,N,F,I,Q){function X(P,R,T){var V=document.createElement("li");V.className="geCommentAction";var Y=document.createElement("a");Y.className=
+"geCommentActionLnk";mxUtils.write(Y,P);V.appendChild(Y);mxEvent.addListener(Y,"click",function(ba){R(ba,H);ba.preventDefault();mxEvent.consume(ba)});S.appendChild(V);T&&(V.style.display="none")}function L(){function P(V){R.push(T);if(null!=V.replies)for(var Y=0;Y<V.replies.length;Y++)T=T.nextSibling,P(V.replies[Y])}var R=[],T=W;P(H);return{pdiv:T,replies:R}}function U(P,R,T,V,Y){function ba(){k(ka);H.addReply(ea,function(aa){ea.id=aa;H.replies.push(ea);p(ka);T&&T()},function(aa){Z();l(ka);b.handleError(aa,
+null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},V,Y)}function Z(){d(ea,ka,function(aa){ba()},!0)}var da=L().pdiv,ea=b.newComment(P,b.getCurrentUser());ea.pCommentId=H.id;null==H.replies&&(H.replies=[]);var ka=q(ea,H.replies,da,I+1);R?Z():ba()}if(Q||!H.isResolved){K.style.display="none";var W=document.createElement("div");W.className="geCommentContainer";W.setAttribute("data-commentId",H.id);W.style.marginLeft=20*I+5+"px";H.isResolved&&!Editor.isDarkMode()&&(W.style.backgroundColor=
+"ghostWhite");var t=document.createElement("div");t.className="geCommentHeader";var C=document.createElement("img");C.className="geCommentUserImg";C.src=H.user.pictureUrl||Editor.userImage;t.appendChild(C);C=document.createElement("div");C.className="geCommentHeaderTxt";t.appendChild(C);var M=document.createElement("div");M.className="geCommentUsername";mxUtils.write(M,H.user.displayName||"");C.appendChild(M);M=document.createElement("div");M.className="geCommentDate";M.setAttribute("data-commentId",
+H.id);g(H,M);C.appendChild(M);W.appendChild(t);t=document.createElement("div");t.className="geCommentTxt";mxUtils.write(t,H.content||"");W.appendChild(t);H.isLocked&&(W.style.opacity="0.5");t=document.createElement("div");t.className="geCommentActions";var S=document.createElement("ul");S.className="geCommentActionsList";t.appendChild(S);x||H.isLocked||0!=I&&!y||X(mxResources.get("reply"),function(){U("",!0)},H.isResolved);C=b.getCurrentUser();null==C||C.id!=H.user.id||x||H.isLocked||(X(mxResources.get("edit"),
+function(){function P(){d(H,W,function(){k(W);H.editComment(H.content,function(){p(W)},function(R){l(W);P();b.handleError(R,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}P()},H.isResolved),X(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){k(W);H.deleteComment(function(P){if(!0===P){P=W.querySelector(".geCommentTxt");P.innerText="";mxUtils.write(P,mxResources.get("msgDeleted"));var R=W.querySelectorAll(".geCommentAction");for(P=
+0;P<R.length;P++)R[P].parentNode.removeChild(R[P]);p(W);W.style.opacity="0.5"}else{R=L(H).replies;for(P=0;P<R.length;P++)O.removeChild(R[P]);for(P=0;P<N.length;P++)if(N[P]==H){N.splice(P,1);break}K.style.display=0==O.getElementsByTagName("div").length?"block":"none"}},function(P){l(W);b.handleError(P,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},H.isResolved));x||H.isLocked||0!=I||X(H.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(P){function R(){var T=
+P.target;T.innerText="";H.isResolved=!H.isResolved;mxUtils.write(T,H.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var V=H.isResolved?"none":"",Y=L(H).replies,ba=Editor.isDarkMode()?"transparent":H.isResolved?"ghostWhite":"white",Z=0;Z<Y.length;Z++){Y[Z].style.backgroundColor=ba;for(var da=Y[Z].querySelectorAll(".geCommentAction"),ea=0;ea<da.length;ea++)da[ea]!=T.parentNode&&(da[ea].style.display=V);B||(Y[Z].style.display="none")}v()}H.isResolved?U(mxResources.get("reOpened")+
+": ",!0,R,!1,!0):U(mxResources.get("markedAsResolved"),!1,R,!0)});W.appendChild(t);null!=F?O.insertBefore(W,F.nextSibling):O.appendChild(W);for(F=0;null!=H.replies&&F<H.replies.length;F++)t=H.replies[F],t.isResolved=H.isResolved,q(t,H.replies,null,I+1,Q);null!=z&&(z.comment.id==H.id?(Q=H.content,H.content=z.comment.content,d(H,W,z.saveCallback,z.deleteOnCancel),H.content=Q):null==z.comment.id&&z.comment.pCommentId==H.id&&(O.appendChild(z.div),d(z.comment,z.div,z.saveCallback,z.deleteOnCancel)));return W}}
+var x=!b.canComment(),y=b.canReplyToReplies(),z=null,A=document.createElement("div");A.className="geCommentsWin";A.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var J=EditorUi.compactUi?"26px":"30px",O=document.createElement("div");O.className="geCommentsList";O.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";O.style.bottom=parseInt(J)+7+"px";A.appendChild(O);var K=document.createElement("span");K.style.cssText="display:none;padding-top:10px;text-align:center;";
+mxUtils.write(K,mxResources.get("noCommentsFound"));var u=document.createElement("div");u.className="geToolbarContainer geCommentsToolbar";u.style.height=J;u.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";u.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";J=document.createElement("a");J.className="geButton";if(!x){var E=J.cloneNode();E.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';E.setAttribute("title",mxResources.get("create")+
+"...");mxEvent.addListener(E,"click",function(H){function N(){d(F,I,function(Q){k(I);b.addComment(Q,function(X){Q.id=X;D.push(Q);p(I)},function(X){l(I);N();b.handleError(X,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var F=b.newComment("",b.getCurrentUser()),I=q(F,D,null,0);N();H.preventDefault();mxEvent.consume(H)});u.appendChild(E)}E=J.cloneNode();E.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';E.setAttribute("title",mxResources.get("showResolved"));
+var B=!1;Editor.isDarkMode()&&(E.style.filter="invert(100%)");mxEvent.addListener(E,"click",function(H){this.className=(B=!B)?"geButton geCheckedBtn":"geButton";G();H.preventDefault();mxEvent.consume(H)});u.appendChild(E);b.commentsRefreshNeeded()&&(E=J.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(H){G();
+H.preventDefault();mxEvent.consume(H)}),u.appendChild(E));b.commentsSaveNeeded()&&(J=J.cloneNode(),J.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',J.setAttribute("title",mxResources.get("save")),Editor.isDarkMode()&&(J.style.filter="invert(100%)"),mxEvent.addListener(J,"click",function(H){n();H.preventDefault();mxEvent.consume(H)}),u.appendChild(J));A.appendChild(u);var D=[],G=mxUtils.bind(this,function(){this.hasError=!1;if(null!=z)try{z.div=z.div.cloneNode(!0);
+var H=z.div.querySelector(".geCommentEditTxtArea"),N=z.div.querySelector(".geCommentEditBtns");z.comment.content=H.value;H.parentNode.removeChild(H);N.parentNode.removeChild(N)}catch(F){b.handleError(F)}O.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";y=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(F){function I(Q){if(null!=Q){Q.sort(function(L,U){return new Date(L.modifiedDate)-
+new Date(U.modifiedDate)});for(var X=0;X<Q.length;X++)I(Q[X].replies)}}F.sort(function(Q,X){return new Date(Q.modifiedDate)-new Date(X.modifiedDate)});O.innerText="";O.appendChild(K);K.style.display="block";D=F;for(F=0;F<D.length;F++)I(D[F].replies),q(D[F],D,null,0,B);null!=z&&null==z.comment.id&&null==z.comment.pCommentId&&(O.appendChild(z.div),d(z.comment,z.div,z.saveCallback,z.deleteOnCancel))},mxUtils.bind(this,function(F){O.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(F&&F.message?
+": "+F.message:""));this.hasError=!0})):O.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});G();this.refreshComments=G;u=mxUtils.bind(this,function(){function H(X){var L=F[X.id];if(null!=L)for(g(X,L),L=0;null!=X.replies&&L<X.replies.length;L++)H(X.replies[L])}if(this.window.isVisible()){for(var N=O.querySelectorAll(".geCommentDate"),F={},I=0;I<N.length;I++){var Q=N[I];F[Q.getAttribute("data-commentId")]=Q}for(I=0;I<D.length;I++)H(D[I])}});setInterval(u,6E4);this.refreshCommentsTime=u;this.window=
+new mxWindow(mxResources.get("comments"),A,e,f,c,m,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,e,f,c,m,n,v,d,g,k,l){var p=document.createElement("div");p.style.textAlign="center";l=null!=l?l:44;var q=
+document.createElement("div");q.style.padding="6px";q.style.overflow="auto";q.style.maxHeight=l+"px";q.style.lineHeight="1.2em";mxUtils.write(q,e);p.appendChild(q);null!=k&&(q=document.createElement("div"),q.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",k),q.appendChild(e),p.appendChild(q));k=document.createElement("div");k.style.textAlign="center";k.style.whiteSpace="nowrap";var x=document.createElement("input");x.setAttribute("type","checkbox");n=mxUtils.button(n||
+mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c(x.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&&k.appendChild(n);var y=mxUtils.button(m||mxResources.get("ok"),function(){b.hideDialog();null!=f&&f(x.checked)});k.appendChild(y);null!=v?(y.innerHTML=v+"<br>"+y.innerHTML+"<br>",y.style.paddingBottom="8px",y.style.paddingTop="8px",y.style.height=
+"auto",y.className="geBtn",y.style.width="40%"):y.className="geBtn gePrimaryBtn";b.editor.cancelFirst||k.appendChild(n);p.appendChild(k);g?(k.style.marginTop="10px",q=document.createElement("p"),q.style.marginTop="20px",q.style.marginBottom="0px",q.appendChild(x),m=document.createElement("span"),mxUtils.write(m," "+mxResources.get("rememberThisSetting")),q.appendChild(m),p.appendChild(q),mxEvent.addListener(m,"click",function(z){x.checked=!x.checked;mxEvent.consume(z)})):k.style.marginTop="12px";
+this.init=function(){y.focus()};this.container=p};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.transientViewStateProperties="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0,extFonts:!0};
EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,overlays:!0,mxObjectId:!0,mxTransient:!0};EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.applyPatches=function(b,e,f,c,m){if(null!=e)for(var n=0;n<e.length;n++)null!=e[n]&&(b=this.patchPages(b,e[n],f,c,m));return b};
EditorUi.prototype.patchPages=function(b,e,f,c,m){var n={},v=[],d={},g={},k={},l={};if(null!=c&&null!=c[EditorUi.DIFF_UPDATE])for(var p in c[EditorUi.DIFF_UPDATE])n[p]=c[EditorUi.DIFF_UPDATE][p];if(null!=e[EditorUi.DIFF_REMOVE])for(c=0;c<e[EditorUi.DIFF_REMOVE].length;c++)g[e[EditorUi.DIFF_REMOVE][c]]=!0;if(null!=e[EditorUi.DIFF_INSERT])for(c=0;c<e[EditorUi.DIFF_INSERT].length;c++)d[e[EditorUi.DIFF_INSERT][c].previous]=e[EditorUi.DIFF_INSERT][c];if(null!=e[EditorUi.DIFF_UPDATE])for(p in e[EditorUi.DIFF_UPDATE])c=
-e[EditorUi.DIFF_UPDATE][p],null!=c.previous&&(l[c.previous]=p);if(null!=b){var q="";for(c=0;c<b.length;c++){var x=b[c].getId();k[x]=b[c];null!=l[q]||g[x]||null!=e[EditorUi.DIFF_UPDATE]&&null!=e[EditorUi.DIFF_UPDATE][x]&&null!=e[EditorUi.DIFF_UPDATE][x].previous||(l[q]=x);q=x}}var y={},z=mxUtils.bind(this,function(K){var O=null!=K?K.getId():"";if(null!=K&&!y[O]){y[O]=!0;v.push(K);var L=null!=e[EditorUi.DIFF_UPDATE]?e[EditorUi.DIFF_UPDATE][O]:null;null!=L&&(this.updatePageRoot(K),null!=L.name&&K.setName(L.name),
-null!=L.view&&this.patchViewState(K,L.view),null!=L.cells&&this.patchPage(K,L.cells,n[K.getId()],m),!f||null==L.cells&&null==L.view||(K.needsUpdate=!0))}K=l[O];null!=K&&(delete l[O],z(k[K]));K=d[O];null!=K&&(delete d[O],A(K))}),A=mxUtils.bind(this,function(K){K=mxUtils.parseXml(K.data).documentElement;K=new DiagramPage(K);this.updatePageRoot(K);var O=k[K.getId()];null==O?z(K):(this.patchPage(O,this.diffPages([O],[K]),n[O.getId()],m),f&&(O.needsUpdate=!0))});z();for(p in l)z(k[l[p]]),delete l[p];for(p in d)A(d[p]),
+e[EditorUi.DIFF_UPDATE][p],null!=c.previous&&(l[c.previous]=p);if(null!=b){var q="";for(c=0;c<b.length;c++){var x=b[c].getId();k[x]=b[c];null!=l[q]||g[x]||null!=e[EditorUi.DIFF_UPDATE]&&null!=e[EditorUi.DIFF_UPDATE][x]&&null!=e[EditorUi.DIFF_UPDATE][x].previous||(l[q]=x);q=x}}var y={},z=mxUtils.bind(this,function(J){var O=null!=J?J.getId():"";if(null!=J&&!y[O]){y[O]=!0;v.push(J);var K=null!=e[EditorUi.DIFF_UPDATE]?e[EditorUi.DIFF_UPDATE][O]:null;null!=K&&(this.updatePageRoot(J),null!=K.name&&J.setName(K.name),
+null!=K.view&&this.patchViewState(J,K.view),null!=K.cells&&this.patchPage(J,K.cells,n[J.getId()],m),!f||null==K.cells&&null==K.view||(J.needsUpdate=!0))}J=l[O];null!=J&&(delete l[O],z(k[J]));J=d[O];null!=J&&(delete d[O],A(J))}),A=mxUtils.bind(this,function(J){J=mxUtils.parseXml(J.data).documentElement;J=new DiagramPage(J);this.updatePageRoot(J);var O=k[J.getId()];null==O?z(J):(this.patchPage(O,this.diffPages([O],[J]),n[O.getId()],m),f&&(O.needsUpdate=!0))});z();for(p in l)z(k[l[p]]),delete l[p];for(p in d)A(d[p]),
delete d[p];return v};EditorUi.prototype.patchViewState=function(b,e){if(null!=b.viewState&&null!=e){b==this.currentPage&&(b.viewState=this.editor.graph.getViewState());for(var f in e)try{this.patchViewStateProperty(b,e,f)}catch(c){}b==this.currentPage&&this.editor.graph.setViewState(b.viewState,!0)}};EditorUi.prototype.patchViewStateProperty=function(b,e,f){b.viewState[f]=JSON.parse(e[f])};
EditorUi.prototype.createParentLookup=function(b,e){function f(k){var l=c[k];null==l&&(l={inserted:[],moved:{}},c[k]=l);return l}var c={};if(null!=e[EditorUi.DIFF_INSERT])for(var m=0;m<e[EditorUi.DIFF_INSERT].length;m++){var n=e[EditorUi.DIFF_INSERT][m],v=null!=n.parent?n.parent:"",d=null!=n.previous?n.previous:"";f(v).inserted[d]=n}if(null!=e[EditorUi.DIFF_UPDATE])for(var g in e[EditorUi.DIFF_UPDATE])n=e[EditorUi.DIFF_UPDATE][g],null!=n.previous&&(v=n.parent,null==v&&(m=b.getCell(g),null!=m&&(m=
b.getParent(m),null!=m&&(v=m.getId()))),null!=v&&(f(v).moved[n.previous]=g));return c};
-EditorUi.prototype.patchPage=function(b,e,f,c){var m=b==this.currentPage?this.editor.graph.model:new mxGraphModel(b.root),n=this.createParentLookup(m,e);m.beginUpdate();try{var v=m.updateEdgeParent,d=new mxDictionary,g=[];m.updateEdgeParent=function(A,K){!d.get(A)&&c&&(d.put(A,!0),g.push(A))};var k=n[""],l=null!=k&&null!=k.inserted?k.inserted[""]:null,p=null;null!=l&&(p=this.getCellForJson(l));if(null==p){var q=null!=k&&null!=k.moved?k.moved[""]:null;null!=q&&(p=m.getCell(q))}null!=p&&(m.setRoot(p),
+EditorUi.prototype.patchPage=function(b,e,f,c){var m=b==this.currentPage?this.editor.graph.model:new mxGraphModel(b.root),n=this.createParentLookup(m,e);m.beginUpdate();try{var v=m.updateEdgeParent,d=new mxDictionary,g=[];m.updateEdgeParent=function(A,J){!d.get(A)&&c&&(d.put(A,!0),g.push(A))};var k=n[""],l=null!=k&&null!=k.inserted?k.inserted[""]:null,p=null;null!=l&&(p=this.getCellForJson(l));if(null==p){var q=null!=k&&null!=k.moved?k.moved[""]:null;null!=q&&(p=m.getCell(q))}null!=p&&(m.setRoot(p),
b.root=p);this.patchCellRecursive(b,m,m.root,n,e);if(null!=e[EditorUi.DIFF_REMOVE])for(var x=0;x<e[EditorUi.DIFF_REMOVE].length;x++){var y=m.getCell(e[EditorUi.DIFF_REMOVE][x]);null!=y&&m.remove(y)}if(null!=e[EditorUi.DIFF_UPDATE]){var z=null!=f&&null!=f.cells?f.cells[EditorUi.DIFF_UPDATE]:null;for(q in e[EditorUi.DIFF_UPDATE])this.patchCell(m,m.getCell(q),e[EditorUi.DIFF_UPDATE][q],null!=z?z[q]:null)}if(null!=e[EditorUi.DIFF_INSERT])for(x=0;x<e[EditorUi.DIFF_INSERT].length;x++)l=e[EditorUi.DIFF_INSERT][x],
y=m.getCell(l.id),null!=y&&(m.setTerminal(y,m.getCell(l.source),!0),m.setTerminal(y,m.getCell(l.target),!1));m.updateEdgeParent=v;if(c&&0<g.length)for(x=0;x<g.length;x++)m.contains(g[x])&&m.updateEdgeParent(g[x])}finally{m.endUpdate()}};
EditorUi.prototype.patchCellRecursive=function(b,e,f,c,m){if(null!=f){var n=c[f.getId()],v=null!=n&&null!=n.inserted?n.inserted:{};n=null!=n&&null!=n.moved?n.moved:{};for(var d=0,g=e.getChildCount(f),k="",l=0;l<g;l++){var p=e.getChildAt(f,l).getId();null==n[k]&&(null==m[EditorUi.DIFF_UPDATE]||null==m[EditorUi.DIFF_UPDATE][p]||null==m[EditorUi.DIFF_UPDATE][p].previous&&null==m[EditorUi.DIFF_UPDATE][p].parent)&&(n[k]=p);k=p}g=mxUtils.bind(this,function(q,x){var y=null!=q?q.getId():"";null!=q&&x&&(x=
@@ -12241,8 +12236,8 @@ DrawioFileSync.prototype.reloadDescriptor=function(){this.file.loadDescriptor(mx
DrawioFileSync.prototype.updateDescriptor=function(b){this.file.setDescriptor(b);this.file.descriptorChanged();this.start()};
DrawioFileSync.prototype.catchup=function(b,e,f,c){if(null!=b&&(null==c||!c())){var m=this.file.getCurrentRevisionId(),n=this.file.getDescriptorRevisionId(b);EditorUi.debug("DrawioFileSync.catchup",[this],"desc",[b],"from",m,"to",n,"valid",this.isValidState());if(m==n)this.file.patchDescriptor(this.file.getDescriptor(),b),null!=e&&e(!0);else if(this.isValidState()){var v=this.file.getDescriptorSecret(b);if(null==v||"1"==urlParams.lockdown)this.reload(e,f,c);else{var d=0,g=!1,k=mxUtils.bind(this,function(){if(null==
c||!c())if(m!=this.file.getCurrentRevisionId())null!=e&&e(!0);else if(this.isValidState()){this.scheduleCleanup(!0);var l=!0,p=window.setTimeout(mxUtils.bind(this,function(){l=!1;this.reload(e,f,c)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(m)+"&to="+encodeURIComponent(n)+(null!=v?"&secret="+encodeURIComponent(v):""),mxUtils.bind(this,function(q){this.file.stats.bytesReceived+=q.getText().length;window.clearTimeout(p);if(l&&
-(null==c||!c()))if(m!=this.file.getCurrentRevisionId())null!=e&&e(!0);else if(this.isValidState()){var x=null,y=[];EditorUi.debug("DrawioFileSync.doCatchup",[this],"req",[q],"status",q.getStatus(),"cacheReadyRetryCount",d,"maxCacheReadyRetries",this.maxCacheReadyRetries);if(200<=q.getStatus()&&299>=q.getStatus()&&0<q.getText().length)try{var z=JSON.parse(q.getText());if(null!=z&&0<z.length)for(var A=0;A<z.length;A++){var K=this.stringToObject(z[A]);if(K.v>DrawioFileSync.PROTOCOL){g=!0;y=[];break}else if(K.v===
-DrawioFileSync.PROTOCOL&&null!=K.d)x=K.d.checksum,y.push(K.d.patch);else{g=!0;y=[];break}}EditorUi.debug("DrawioFileSync.doCatchup",[this],"response",[z],"failed",g,"temp",y,"checksum",x)}catch(O){y=[],null!=window.console&&"1"==urlParams.test&&console.log(O)}try{0<y.length?(this.file.stats.cacheHits++,this.merge(y,x,b,e,f,c)):d<=this.maxCacheReadyRetries-1&&!g&&401!=q.getStatus()&&503!=q.getStatus()&&410!=q.getStatus()?(d++,this.file.stats.cacheMiss++,window.setTimeout(k,(d+1)*this.cacheReadyDelay)):
+(null==c||!c()))if(m!=this.file.getCurrentRevisionId())null!=e&&e(!0);else if(this.isValidState()){var x=null,y=[];EditorUi.debug("DrawioFileSync.doCatchup",[this],"req",[q],"status",q.getStatus(),"cacheReadyRetryCount",d,"maxCacheReadyRetries",this.maxCacheReadyRetries);if(200<=q.getStatus()&&299>=q.getStatus()&&0<q.getText().length)try{var z=JSON.parse(q.getText());if(null!=z&&0<z.length)for(var A=0;A<z.length;A++){var J=this.stringToObject(z[A]);if(J.v>DrawioFileSync.PROTOCOL){g=!0;y=[];break}else if(J.v===
+DrawioFileSync.PROTOCOL&&null!=J.d)x=J.d.checksum,y.push(J.d.patch);else{g=!0;y=[];break}}EditorUi.debug("DrawioFileSync.doCatchup",[this],"response",[z],"failed",g,"temp",y,"checksum",x)}catch(O){y=[],null!=window.console&&"1"==urlParams.test&&console.log(O)}try{0<y.length?(this.file.stats.cacheHits++,this.merge(y,x,b,e,f,c)):d<=this.maxCacheReadyRetries-1&&!g&&401!=q.getStatus()&&503!=q.getStatus()&&410!=q.getStatus()?(d++,this.file.stats.cacheMiss++,window.setTimeout(k,(d+1)*this.cacheReadyDelay)):
(this.file.stats.cacheFail++,this.reload(e,f,c))}catch(O){null!=f&&f(O)}}else null!=f&&f()}))}else null!=f&&f()});window.setTimeout(k,this.cacheReadyDelay)}}else null!=f&&f()}};DrawioFileSync.prototype.reload=function(b,e,f,c){this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=b&&b()}),mxUtils.bind(this,function(m){null!=e&&e(m)}),f,c)};
DrawioFileSync.prototype.descriptorChanged=function(b){this.lastModified=this.file.getLastModifiedDate();if(null!=this.channelId){var e=this.objectToString(this.createMessage({a:"desc",m:this.lastModified.getTime()})),f=this.file.getCurrentRevisionId(),c=this.objectToString({});mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(b)+"&to="+encodeURIComponent(f)+"&msg="+encodeURIComponent(e)+"&data="+encodeURIComponent(c));this.file.stats.bytesSent+=c.length;this.file.stats.msgSent++;
EditorUi.debug("DrawioFileSync.descriptorChanged",[this],"from",b,"to",f)}this.updateStatus()};DrawioFileSync.prototype.objectToString=function(b){b=Graph.compress(JSON.stringify(b));null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.encrypt(b,this.key).toString());return b};DrawioFileSync.prototype.stringToObject=function(b){null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.decrypt(b,this.key).toString(CryptoJS.enc.Utf8));return JSON.parse(Graph.decompress(b))};
@@ -12319,9 +12314,9 @@ function(){return this.user};DriveClient.prototype.getUsersList=function(){var f
this.setUser(null);b=null};DriveClient.prototype.execute=function(f){var c=mxUtils.bind(this,function(m){this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(n,v){this.authorize(!1,mxUtils.bind(this,function(){null!=v&&v();f()}),mxUtils.bind(this,function(d){var g=null!=d.message?d.message:mxResources.get("cannotLogin");null!=d&&null!=d.error&&403==d.error.code&&null!=d.error.data&&0<d.error.data.length&&"domainPolicy"==d.error.data[0].reason&&(g=d.error.message);this.logout();this.ui.showError(mxResources.get("error"),
g,mxResources.get("help"),mxUtils.bind(this,function(){this.ui.openLink("https://www.diagrams.net/doc/faq/gsuite-authorisation-troubleshoot")}),null,mxResources.get("ok"))}),n)}))});this.authorize(!0,f,c)};DriveClient.prototype.executeRequest=function(f,c,m){try{var n=!0,v=null,d=0;null!=this.requestThread&&window.clearTimeout(this.requestThread);var g=mxUtils.bind(this,function(){try{this.requestThread=null;this.currentRequest=f;null!=v&&window.clearTimeout(v);v=window.setTimeout(mxUtils.bind(this,
function(){n=!1;null!=m&&m({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:g})}),this.ui.timeout);var k=null,l=!1;"string"===typeof f.params?k=f.params:null!=f.params&&(k=JSON.stringify(f.params),l=!0);var p=f.fullUrl||this.GDriveBaseUrl+f.url;l&&(p+=(0<p.indexOf("?")?"&":"?")+"alt=json");var q=new mxXmlRequest(p,k,f.method||"GET");q.setRequestHeaders=mxUtils.bind(this,function(x,y){if(null!=f.headers)for(var z in f.headers)x.setRequestHeader(z,f.headers[z]);else null!=f.contentType?
-x.setRequestHeader("Content-Type",f.contentType):l&&x.setRequestHeader("Content-Type","application/json");x.setRequestHeader("Authorization","Bearer "+b)});q.send(mxUtils.bind(this,function(x){try{if(window.clearTimeout(v),n){try{var y=JSON.parse(x.getText())}catch(K){y=null}if(200<=x.getStatus()&&299>=x.getStatus())null!=c&&c(y);else{var z=null!=y&&null!=y.error?null!=y.error.data?y.error.data:y.error.errors:null,A=null!=z&&0<z.length?z[0].reason:null;null==m||null==y||null==y.error||-1!=y.error.code&&
+x.setRequestHeader("Content-Type",f.contentType):l&&x.setRequestHeader("Content-Type","application/json");x.setRequestHeader("Authorization","Bearer "+b)});q.send(mxUtils.bind(this,function(x){try{if(window.clearTimeout(v),n){try{var y=JSON.parse(x.getText())}catch(J){y=null}if(200<=x.getStatus()&&299>=x.getStatus())null!=c&&c(y);else{var z=null!=y&&null!=y.error?null!=y.error.data?y.error.data:y.error.errors:null,A=null!=z&&0<z.length?z[0].reason:null;null==m||null==y||null==y.error||-1!=y.error.code&&
(403!=y.error.code||"domainPolicy"!=A&&"The requested mime type change is forbidden."!=y.error.message)?null!=y&&null!=y.error&&(401==y.error.code||403==y.error.code&&"rateLimitExceeded"!=A)?403==y.error.code&&this.retryAuth||401==y.error.code&&this.retryAuth&&"authError"==A?(null!=m&&m(y),this.retryAuth=!1):(this.retryAuth=!0,this.execute(g)):null!=y&&null!=y.error&&412!=y.error.code&&404!=y.error.code&&400!=y.error.code&&this.currentRequest==f&&d<this.maxRetries?(d++,this.requestThread=window.setTimeout(g,
-Math.round(Math.pow(2,d)*(1+.1*(Math.random()-.5))*this.coolOff))):null!=m&&m(y):m(y)}}}catch(K){if(null!=m)m(K);else throw K;}}))}catch(x){if(null!=m)m(x);else throw x;}});null!=b&&this.authCalled?g():this.execute(g)}catch(k){if(null!=m)m(k);else throw k;}};DriveClient.prototype.createAuthWin=function(f){return window.open(f?f:"about:blank","gdauth",["width=525,height=525","top="+(window.screenY+Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join())};
+Math.round(Math.pow(2,d)*(1+.1*(Math.random()-.5))*this.coolOff))):null!=m&&m(y):m(y)}}}catch(J){if(null!=m)m(J);else throw J;}}))}catch(x){if(null!=m)m(x);else throw x;}});null!=b&&this.authCalled?g():this.execute(g)}catch(k){if(null!=m)m(k);else throw k;}};DriveClient.prototype.createAuthWin=function(f){return window.open(f?f:"about:blank","gdauth",["width=525,height=525","top="+(window.screenY+Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join())};
DriveClient.prototype.authorize=function(f,c,m,n,v){this.isExtAuth&&!f?window.parent.driveAuth(mxUtils.bind(this,function(d){this.updateAuthInfo(d,!0,!0,c,m)}),m):(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(d){200<=d.getStatus()&&299>=d.getStatus()?this.authorizeStep2(d.getText(),f,c,m,n,v):null!=m&&m(d)}),m)};DriveClient.prototype.updateAuthInfo=function(f,c,m,n,v){b=f.access_token;delete f.access_token;f.expires=Date.now()+1E3*parseInt(f.expires_in);
f.remember=c;this.resetTokenRefresh(f);this.authCalled=!0;if(m||null==this.user){var d=JSON.stringify(f);this.updateUser(mxUtils.bind(this,function(){var g=JSON.parse(d);this.setPersistentToken(g,!c);null!=n&&n()}),v)}else null!=n&&(this.setPersistentToken(f,!c),n())};DriveClient.prototype.authorizeStep2=function(f,c,m,n,v,d){try{null!=this.ui.stateArg&&null!=this.ui.stateArg.userId&&(this.userId=this.ui.stateArg.userId,null!=this.user&&this.user.id!=this.userId&&(this.user=null));if(null==this.userId){var g=
JSON.parse(this.getPersistentToken(!0));g&&null!=g.current&&(this.userId=g.current.userId)}if(c&&null==this.userId)null!=n&&n();else if(c)(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname+"&token="+f)+"&userId="+this.userId,null,"GET")).send(mxUtils.bind(this,function(l){200<=l.getStatus()&&299>=l.getStatus()?(l=JSON.parse(l.getText()),this.updateAuthInfo(l,!0,!1,m,n)):(0!=l.getStatus()&&this.logout(),null!=n&&n(l))}),n);else{var k=
@@ -12336,22 +12331,22 @@ m){return this.getFile(f,c,m,!0,!0)};DriveClient.prototype.loadDescriptor=functi
c,m)}),m):this.loadDescriptor(f,mxUtils.bind(this,function(d){try{if(null!=this.user){var g=/\.png$/i.test(d.title);/\.v(dx|sdx?)$/i.test(d.title)||/\.gliffy$/i.test(d.title)||!this.ui.useCanvasForExport&&g?this.ui.convertFile(d.downloadUrl,d.title,d.mimeType,this.extension,c,m,null,{Authorization:"Bearer "+b}):n||v||d.mimeType==this.libraryMimeType||d.mimeType==this.xmlMimeType?this.getXmlFile(d,c,m,!0,v):this.getXmlFile(d,c,m)}else m({message:mxResources.get("loggedOut")})}catch(k){if(null!=m)m(k);
else throw k;}}),m)};DriveClient.prototype.isGoogleRealtimeMimeType=function(f){return null!=f&&"application/vnd.jgraph.mxfile."==f.substring(0,30)};DriveClient.prototype.getXmlFile=function(f,c,m,n,v){try{var d={Authorization:"Bearer "+b},g=f.downloadUrl;if(null==g)null!=m&&m({message:mxResources.get("exportOptionsDisabledDetails")});else{var k=0,l=mxUtils.bind(this,function(){this.ui.editor.loadUrl(g,mxUtils.bind(this,function(p){try{if(null==p)m({message:mxResources.get("invalidOrMissingFile")});
else if(f.mimeType==this.libraryMimeType||v)f.mimeType!=this.libraryMimeType||v?c(new DriveLibrary(this.ui,p,f)):m({message:mxResources.get("notADiagramFile")});else{var q=!1;if(/\.png$/i.test(f.title)){var x=p.lastIndexOf(",");if(0<x){var y=this.ui.extractGraphModelFromPng(p);if(null!=y&&0<y.length)p=y;else try{y=p.substring(x+1);var z=!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(y):atob(y),A=this.ui.editor.extractGraphModel(mxUtils.parseXml(z).documentElement,!0);null==A||0<A.getElementsByTagName("parsererror").length?
-q=!0:p=z}catch(K){q=!0}}}else/\.pdf$/i.test(f.title)?(y=Editor.extractGraphModelFromPdf(p),null!=y&&0<y.length&&(q=!0,p=y)):"data:image/png;base64,PG14ZmlsZS"==p.substring(0,32)&&(z=p.substring(22),p=window.atob&&!mxClient.IS_SF?atob(z):Base64.decode(z));Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(p,g)?this.ui.parseFileData(p,mxUtils.bind(this,function(K){try{4==K.readyState&&(200<=K.status&&299>=K.status?c(new LocalFile(this.ui,K.responseText,f.title+this.extension,
-!0)):null!=m&&m({message:mxResources.get("errorLoadingFile")}))}catch(O){if(null!=m)m(O);else throw O;}}),f.title):c(q?new LocalFile(this.ui,p,f.title,!0):new DriveFile(this.ui,p,f))}}catch(K){if(null!=m)m(K);else throw K;}}),mxUtils.bind(this,function(p,q){if(k<this.maxRetries&&null!=q&&403==q.getStatus())k++,window.setTimeout(l,2*k*this.coolOff*(1+.1*(Math.random()-.5)));else if(null!=m)m(p);else throw p;}),null!=f.mimeType&&"image/"==f.mimeType.substring(0,6)&&"image/svg"!=f.mimeType.substring(0,
+q=!0:p=z}catch(J){q=!0}}}else/\.pdf$/i.test(f.title)?(y=Editor.extractGraphModelFromPdf(p),null!=y&&0<y.length&&(q=!0,p=y)):"data:image/png;base64,PG14ZmlsZS"==p.substring(0,32)&&(z=p.substring(22),p=window.atob&&!mxClient.IS_SF?atob(z):Base64.decode(z));Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(p,g)?this.ui.parseFileData(p,mxUtils.bind(this,function(J){try{4==J.readyState&&(200<=J.status&&299>=J.status?c(new LocalFile(this.ui,J.responseText,f.title+this.extension,
+!0)):null!=m&&m({message:mxResources.get("errorLoadingFile")}))}catch(O){if(null!=m)m(O);else throw O;}}),f.title):c(q?new LocalFile(this.ui,p,f.title,!0):new DriveFile(this.ui,p,f))}}catch(J){if(null!=m)m(J);else throw J;}}),mxUtils.bind(this,function(p,q){if(k<this.maxRetries&&null!=q&&403==q.getStatus())k++,window.setTimeout(l,2*k*this.coolOff*(1+.1*(Math.random()-.5)));else if(null!=m)m(p);else throw p;}),null!=f.mimeType&&"image/"==f.mimeType.substring(0,6)&&"image/svg"!=f.mimeType.substring(0,
9)||/\.png$/i.test(f.title)||/\.jpe?g$/i.test(f.title)||/\.pdf$/i.test(f.title),null,null,null,d)});l()}}catch(p){if(null!=m)m(p);else throw p;}};DriveClient.prototype.saveFile=function(f,c,m,n,v,d,g,k,l){try{var p=0;f.saveLevel=1;var q=mxUtils.bind(this,function(D){if(null!=n)n(D);else throw D;try{if(!f.isConflict(D)){var G="sl_"+f.saveLevel+"-error_"+(f.getErrorMessage(D)||"unknown");null!=D&&null!=D.error&&null!=D.error.code&&(G+="-code_"+D.error.code);EditorUi.logEvent({category:"ERROR-SAVE-FILE-"+
-f.getHash()+"-rev_"+f.desc.headRevisionId+"-mod_"+f.desc.modifiedDate+"-size_"+f.getSize()+"-mime_"+f.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(f.isAutosave()?"":"-noauto")+(f.changeListenerEnabled?"":"-nolisten")+(f.inConflictState?"-conflict":"")+(f.invalidChecksum?"-invalid":""),action:G,label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync")})}}catch(N){}}),x=mxUtils.bind(this,function(D){q(D);try{EditorUi.logError(D.message,null,null,
-D)}catch(G){}});if(f.isEditable()&&null!=f.desc){var y=(new Date).getTime(),z=f.desc.etag,A=f.desc.modifiedDate,K=f.desc.headRevisionId,O=this.ui.useCanvasForExport&&/(\.png)$/i.test(f.getTitle());d=null!=d?d:!1;var L=null,u=!1,E={mimeType:f.desc.mimeType,title:f.getTitle()};if(this.isGoogleRealtimeMimeType(E.mimeType))E.mimeType=this.xmlMimeType,L=f.desc,u=c=!0;else if("application/octet-stream"==E.mimeType||"1"==urlParams["override-mime"]&&E.mimeType!=this.xmlMimeType)E.mimeType=this.xmlMimeType;
-var B=mxUtils.bind(this,function(D,G,N){try{f.saveLevel=3;f.constructor==DriveFile&&(null==k&&(k=[]),null==f.getChannelId()&&k.push({key:"channel",value:Editor.guid(32)}),null==f.getChannelKey()&&k.push({key:"key",value:Editor.guid(32)}),k.push({key:"secret",value:null!=l?l:Editor.guid(32)}));N||(null!=D||d||(D=this.placeholderThumbnail,G=this.placeholderMimeType),null!=D&&null!=G&&(E.thumbnail={image:D,mimeType:G}));var I=f.getData(),F=mxUtils.bind(this,function(X){try{if(f.saveDelay=(new Date).getTime()-
-y,f.saveLevel=11,null==X)q({message:mxResources.get("errorSavingFile")+": Empty response"});else{var J=(new Date(X.modifiedDate)).getTime()-(new Date(A)).getTime();if(0>=J||z==X.etag||c&&K==X.headRevisionId){f.saveLevel=12;var W=[];0>=J&&W.push("invalid modified time");z==X.etag&&W.push("stale etag");c&&K==X.headRevisionId&&W.push("stale revision");var V=W.join(", ");q({message:mxResources.get("errorSavingFile")+": "+V},X);try{EditorUi.logError("Critical: Error saving to Google Drive "+f.desc.id,
-null,"from-"+K+"."+A+"-"+this.ui.hashValue(z)+"-to-"+X.headRevisionId+"."+X.modifiedDate+"-"+this.ui.hashValue(X.etag)+(0<V.length?"-errors-"+V:""),"user-"+(null!=this.user?this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync"))}catch(t){}}else if(f.saveLevel=null,m(X,I),null!=L){this.executeRequest({url:"/files/"+L.id+"/revisions/"+L.headRevisionId+"?supportsAllDrives=true"},mxUtils.bind(this,mxUtils.bind(this,function(t){t.pinned=!0;this.executeRequest({url:"/files/"+L.id+"/revisions/"+
-L.headRevisionId,method:"PUT",params:t})})));try{EditorUi.logEvent({category:f.convertedFrom+"-CONVERT-FILE-"+f.getHash(),action:"from_"+L.id+"."+L.headRevisionId+"-to_"+f.desc.id+"."+f.desc.headRevisionId,label:null!=this.user?"user_"+this.user.id:"nouser"+(null!=f.sync?"-client_"+f.sync.clientId:"nosync")})}catch(t){}}}}catch(t){x(t)}}),H=mxUtils.bind(this,function(X,J){f.saveLevel=4;try{null!=k&&(E.properties=k);var W=g||f.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?
-null:f.getCurrentEtag(),V=mxUtils.bind(this,function(M){f.saveLevel=5;try{var Q=f.desc.mimeType!=this.xmlMimeType&&f.desc.mimeType!=this.mimeType&&f.desc.mimeType!=this.libraryMimeType,P=!0,S=null;try{S=window.setTimeout(mxUtils.bind(this,function(){P=!1;q({code:App.ERROR_TIMEOUT})}),5*this.ui.timeout)}catch(U){}this.executeRequest(this.createUploadRequest(f.getId(),E,X,c||M||Q,J,M?null:W,u),mxUtils.bind(this,function(U){window.clearTimeout(S);P&&F(U)}),mxUtils.bind(this,function(U){window.clearTimeout(S);
-if(P){f.saveLevel=6;try{f.isConflict(U)?this.executeRequest({url:"/files/"+f.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(T){f.saveLevel=7;try{if(null!=T&&T.etag==W)if(p<this.staleEtagMaxRetries){p++;var Y=2*p*this.coolOff*(1+.1*(Math.random()-.5));window.setTimeout(t,Y);"1"==urlParams.test&&EditorUi.debug("DriveClient: Stale Etag Detected","retry",p,"delay",Y)}else{t(!0);try{EditorUi.logEvent({category:"STALE-ETAG-SAVE-FILE-"+f.getHash(),action:"rev_"+
-f.desc.headRevisionId+"-mod_"+f.desc.modifiedDate+"-size_"+f.getSize()+"-mime_"+f.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(f.isAutosave()?"":"-noauto")+(f.changeListenerEnabled?"":"-nolisten")+(f.inConflictState?"-conflict":"")+(f.invalidChecksum?"-invalid":""),label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync")})}catch(aa){}}else"1"==urlParams.test&&T.headRevisionId==K&&EditorUi.debug("DriveClient: Remote Etag Changed","local",W,
-"remote",T.etag,"rev",f.desc.headRevisionId,"response",[T],"file",[f]),q(U,T)}catch(aa){x(aa)}}),mxUtils.bind(this,function(){q(U)})):q(U)}catch(T){x(T)}}}))}catch(U){x(U)}}),t=mxUtils.bind(this,function(M){f.saveLevel=9;if(M||null==W)V(M);else{var Q=!0,P=null;try{P=window.setTimeout(mxUtils.bind(this,function(){Q=!1;q({code:App.ERROR_TIMEOUT})}),3*this.ui.timeout)}catch(S){}this.executeRequest({url:"/files/"+f.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(S){window.clearTimeout(P);
-if(Q){f.saveLevel=10;try{null!=S&&S.headRevisionId==K?("1"==urlParams.test&&W!=S.etag&&EditorUi.debug("DriveClient: Preflight Etag Update","from",W,"to",S.etag,"rev",f.desc.headRevisionId,"response",[S],"file",[f]),W=S.etag,V(M)):q({error:{code:412}},S)}catch(U){x(U)}}}),mxUtils.bind(this,function(S){window.clearTimeout(P);Q&&(f.saveLevel=11,q(S))}))}});if(O&&null==D){f.saveLevel=8;var C=new Image;C.onload=mxUtils.bind(this,function(){try{var M=this.thumbnailWidth/C.width,Q=document.createElement("canvas");
-Q.width=this.thumbnailWidth;Q.height=Math.floor(C.height*M);Q.getContext("2d").drawImage(C,0,0,Q.width,Q.height);var P=Q.toDataURL();P=P.substring(P.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");E.thumbnail={image:P,mimeType:"image/png"};t(!1)}catch(S){try{t(!1)}catch(U){x(U)}}});C.src="data:image/png;base64,"+X}else t(!1)}catch(M){x(M)}});if(O){var R=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(X){H(X,!0)}),q,this.ui.getCurrentFile()!=f?
-I:null,R.scale,R.border)}else H(I,!1)}catch(X){x(X)}});try{f.saveLevel=2,(d||O||f.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(D){try{var G=null;try{null!=D&&(G=D.toDataURL("image/png")),null!=G&&(G=G.length>this.maxThumbnailSize?null:G.substring(G.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(N){G=null}B(G,"image/png")}catch(N){x(N)}})))&&
+f.getHash()+"-rev_"+f.desc.headRevisionId+"-mod_"+f.desc.modifiedDate+"-size_"+f.getSize()+"-mime_"+f.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(f.isAutosave()?"":"-noauto")+(f.changeListenerEnabled?"":"-nolisten")+(f.inConflictState?"-conflict":"")+(f.invalidChecksum?"-invalid":""),action:G,label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync")})}}catch(H){}}),x=mxUtils.bind(this,function(D){q(D);try{EditorUi.logError(D.message,null,null,
+D)}catch(G){}});if(f.isEditable()&&null!=f.desc){var y=(new Date).getTime(),z=f.desc.etag,A=f.desc.modifiedDate,J=f.desc.headRevisionId,O=this.ui.useCanvasForExport&&/(\.png)$/i.test(f.getTitle());d=null!=d?d:!1;var K=null,u=!1,E={mimeType:f.desc.mimeType,title:f.getTitle()};if(this.isGoogleRealtimeMimeType(E.mimeType))E.mimeType=this.xmlMimeType,K=f.desc,u=c=!0;else if("application/octet-stream"==E.mimeType||"1"==urlParams["override-mime"]&&E.mimeType!=this.xmlMimeType)E.mimeType=this.xmlMimeType;
+var B=mxUtils.bind(this,function(D,G,H){try{f.saveLevel=3;f.constructor==DriveFile&&(null==k&&(k=[]),null==f.getChannelId()&&k.push({key:"channel",value:Editor.guid(32)}),null==f.getChannelKey()&&k.push({key:"key",value:Editor.guid(32)}),k.push({key:"secret",value:null!=l?l:Editor.guid(32)}));H||(null!=D||d||(D=this.placeholderThumbnail,G=this.placeholderMimeType),null!=D&&null!=G&&(E.thumbnail={image:D,mimeType:G}));var N=f.getData(),F=mxUtils.bind(this,function(X){try{if(f.saveDelay=(new Date).getTime()-
+y,f.saveLevel=11,null==X)q({message:mxResources.get("errorSavingFile")+": Empty response"});else{var L=(new Date(X.modifiedDate)).getTime()-(new Date(A)).getTime();if(0>=L||z==X.etag||c&&J==X.headRevisionId){f.saveLevel=12;var U=[];0>=L&&U.push("invalid modified time");z==X.etag&&U.push("stale etag");c&&J==X.headRevisionId&&U.push("stale revision");var W=U.join(", ");q({message:mxResources.get("errorSavingFile")+": "+W},X);try{EditorUi.logError("Critical: Error saving to Google Drive "+f.desc.id,
+null,"from-"+J+"."+A+"-"+this.ui.hashValue(z)+"-to-"+X.headRevisionId+"."+X.modifiedDate+"-"+this.ui.hashValue(X.etag)+(0<W.length?"-errors-"+W:""),"user-"+(null!=this.user?this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync"))}catch(t){}}else if(f.saveLevel=null,m(X,N),null!=K){this.executeRequest({url:"/files/"+K.id+"/revisions/"+K.headRevisionId+"?supportsAllDrives=true"},mxUtils.bind(this,mxUtils.bind(this,function(t){t.pinned=!0;this.executeRequest({url:"/files/"+K.id+"/revisions/"+
+K.headRevisionId,method:"PUT",params:t})})));try{EditorUi.logEvent({category:f.convertedFrom+"-CONVERT-FILE-"+f.getHash(),action:"from_"+K.id+"."+K.headRevisionId+"-to_"+f.desc.id+"."+f.desc.headRevisionId,label:null!=this.user?"user_"+this.user.id:"nouser"+(null!=f.sync?"-client_"+f.sync.clientId:"nosync")})}catch(t){}}}}catch(t){x(t)}}),I=mxUtils.bind(this,function(X,L){f.saveLevel=4;try{null!=k&&(E.properties=k);var U=g||f.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?
+null:f.getCurrentEtag(),W=mxUtils.bind(this,function(M){f.saveLevel=5;try{var S=f.desc.mimeType!=this.xmlMimeType&&f.desc.mimeType!=this.mimeType&&f.desc.mimeType!=this.libraryMimeType,P=!0,R=null;try{R=window.setTimeout(mxUtils.bind(this,function(){P=!1;q({code:App.ERROR_TIMEOUT})}),5*this.ui.timeout)}catch(T){}this.executeRequest(this.createUploadRequest(f.getId(),E,X,c||M||S,L,M?null:U,u),mxUtils.bind(this,function(T){window.clearTimeout(R);P&&F(T)}),mxUtils.bind(this,function(T){window.clearTimeout(R);
+if(P){f.saveLevel=6;try{f.isConflict(T)?this.executeRequest({url:"/files/"+f.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(V){f.saveLevel=7;try{if(null!=V&&V.etag==U)if(p<this.staleEtagMaxRetries){p++;var Y=2*p*this.coolOff*(1+.1*(Math.random()-.5));window.setTimeout(t,Y);"1"==urlParams.test&&EditorUi.debug("DriveClient: Stale Etag Detected","retry",p,"delay",Y)}else{t(!0);try{EditorUi.logEvent({category:"STALE-ETAG-SAVE-FILE-"+f.getHash(),action:"rev_"+
+f.desc.headRevisionId+"-mod_"+f.desc.modifiedDate+"-size_"+f.getSize()+"-mime_"+f.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(f.isAutosave()?"":"-noauto")+(f.changeListenerEnabled?"":"-nolisten")+(f.inConflictState?"-conflict":"")+(f.invalidChecksum?"-invalid":""),label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync")})}catch(ba){}}else"1"==urlParams.test&&V.headRevisionId==J&&EditorUi.debug("DriveClient: Remote Etag Changed","local",U,
+"remote",V.etag,"rev",f.desc.headRevisionId,"response",[V],"file",[f]),q(T,V)}catch(ba){x(ba)}}),mxUtils.bind(this,function(){q(T)})):q(T)}catch(V){x(V)}}}))}catch(T){x(T)}}),t=mxUtils.bind(this,function(M){f.saveLevel=9;if(M||null==U)W(M);else{var S=!0,P=null;try{P=window.setTimeout(mxUtils.bind(this,function(){S=!1;q({code:App.ERROR_TIMEOUT})}),3*this.ui.timeout)}catch(R){}this.executeRequest({url:"/files/"+f.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(R){window.clearTimeout(P);
+if(S){f.saveLevel=10;try{null!=R&&R.headRevisionId==J?("1"==urlParams.test&&U!=R.etag&&EditorUi.debug("DriveClient: Preflight Etag Update","from",U,"to",R.etag,"rev",f.desc.headRevisionId,"response",[R],"file",[f]),U=R.etag,W(M)):q({error:{code:412}},R)}catch(T){x(T)}}}),mxUtils.bind(this,function(R){window.clearTimeout(P);S&&(f.saveLevel=11,q(R))}))}});if(O&&null==D){f.saveLevel=8;var C=new Image;C.onload=mxUtils.bind(this,function(){try{var M=this.thumbnailWidth/C.width,S=document.createElement("canvas");
+S.width=this.thumbnailWidth;S.height=Math.floor(C.height*M);S.getContext("2d").drawImage(C,0,0,S.width,S.height);var P=S.toDataURL();P=P.substring(P.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");E.thumbnail={image:P,mimeType:"image/png"};t(!1)}catch(R){try{t(!1)}catch(T){x(T)}}});C.src="data:image/png;base64,"+X}else t(!1)}catch(M){x(M)}});if(O){var Q=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(X){I(X,!0)}),q,this.ui.getCurrentFile()!=f?
+N:null,Q.scale,Q.border)}else I(N,!1)}catch(X){x(X)}});try{f.saveLevel=2,(d||O||f.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(D){try{var G=null;try{null!=D&&(G=D.toDataURL("image/png")),null!=G&&(G=G.length>this.maxThumbnailSize?null:G.substring(G.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(H){G=null}B(G,"image/png")}catch(H){x(H)}})))&&
B(null,null,f.constructor!=DriveLibrary)}catch(D){x(D)}}else this.ui.editor.graph.reset(),q({message:mxResources.get("readOnly")})}catch(D){x(D)}};DriveClient.prototype.insertFile=function(f,c,m,n,v,d,g){d=null!=d?d:this.xmlMimeType;f={mimeType:d,title:f};null!=m&&(f.parents=[{kind:"drive#fileLink",id:m}]);this.executeRequest(this.createUploadRequest(null,f,c,!1,g),mxUtils.bind(this,function(k){d==this.libraryMimeType?n(new DriveLibrary(this.ui,c,k)):0==k?null!=v&&v({message:mxResources.get("errorSavingFile")}):
n(new DriveFile(this.ui,c,k))}),v)};DriveClient.prototype.createUploadRequest=function(f,c,m,n,v,d,g){v=null!=v?v:!1;var k={"Content-Type":'multipart/mixed; boundary="-------314159265358979323846"'};null!=d&&(k["If-Match"]=d);f={fullUrl:"https://content.googleapis.com/upload/drive/v2/files"+(null!=f?"/"+f:"")+"?uploadType=multipart&supportsAllDrives=true&enforceSingleParent=true&fields="+this.allFields,method:null!=f?"PUT":"POST",headers:k,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!=m?v?m:!window.btoa||mxClient.IS_IE||mxClient.IS_IE11?Base64.encode(m):Graph.base64EncodeUnicode(m):"")+"\r\n---------314159265358979323846--"};n||(f.fullUrl+="&newRevision=false");g&&(f.fullUrl+="&pinned=true");return f};DriveClient.prototype.createLinkPicker=function(){var f=e.linkPicker;if(null==f||e.linkPickerToken!=b){e.linkPickerToken=b;f=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0);
@@ -12472,26 +12467,26 @@ f+"/contents/"+c+"?ref="+m+g,null,"HEAD");this.executeRequest(e,mxUtils.bind(thi
e+"?ref="+k;var l={Authorization:"token "+b};v=e.split("/");this.ui.convertFile(n,0<v.length?v[v.length-1]:e,null,this.extension,f,c,null,l)}else c({message:mxResources.get("accessDenied")});else v="&t="+(new Date).getTime(),e=new mxXmlRequest(this.baseUrl+"/repos/"+d+"/"+g+"/contents/"+e+"?ref="+k+v,null,"GET"),this.executeRequest(e,mxUtils.bind(this,function(p){try{f(this.createGitHubFile(d,g,k,JSON.parse(p.getText()),m))}catch(q){c(q)}}),c)};GitHubClient.prototype.createGitHubFile=function(e,f,
c,m,n){e={org:e,repo:f,ref:c,name:m.name,path:m.path,sha:m.sha,html_url:m.html_url,download_url:m.download_url};f=m.content;"base64"===m.encoding&&(/\.jpe?g$/i.test(m.name)?f="data:image/jpeg;base64,"+f:/\.gif$/i.test(m.name)?f="data:image/gif;base64,"+f:/\.png$/i.test(m.name)?(m=this.ui.extractGraphModelFromPng(f),f=null!=m&&0<m.length?m:"data:image/png;base64,"+f):f=Base64.decode(f));return n?new GitHubLibrary(this.ui,f,e):new GitHubFile(this.ui,f,e)};GitHubClient.prototype.insertLibrary=function(e,
f,c,m,n){this.insertFile(e,f,c,m,!0,n,!1)};GitHubClient.prototype.insertFile=function(e,f,c,m,n,v,d){n=null!=n?n:!1;v=v.split("/");var g=v[0],k=v[1],l=v[2],p=v.slice(3,v.length).join("/");0<p.length&&(p+="/");p+=e;this.checkExists(g+"/"+k+"/"+l+"/"+p,!0,mxUtils.bind(this,function(q,x){q?n?(d||(f=Base64.encode(f)),this.showCommitDialog(e,!0,mxUtils.bind(this,function(y){this.writeFile(g,k,l,p,y,f,x,mxUtils.bind(this,function(z){try{var A=JSON.parse(z.getText());c(this.createGitHubFile(g,k,l,A.content,
-n))}catch(K){m(K)}}),m)}),m)):c(new GitHubFile(this.ui,f,{org:g,repo:k,ref:l,name:e,path:p,sha:x,isNew:!0})):m()}))};GitHubClient.prototype.showCommitDialog=function(e,f,c,m){var n=this.ui.spinner.pause();e=new FilenameDialog(this.ui,mxResources.get(f?"addedFile":"updateFile",[e]),mxResources.get("ok"),mxUtils.bind(this,function(v){n();c(v)}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){m()}),null,280);this.ui.showDialog(e.container,400,80,!0,!1);e.init()};GitHubClient.prototype.writeFile=
+n))}catch(J){m(J)}}),m)}),m)):c(new GitHubFile(this.ui,f,{org:g,repo:k,ref:l,name:e,path:p,sha:x,isNew:!0})):m()}))};GitHubClient.prototype.showCommitDialog=function(e,f,c,m){var n=this.ui.spinner.pause();e=new FilenameDialog(this.ui,mxResources.get(f?"addedFile":"updateFile",[e]),mxResources.get("ok"),mxUtils.bind(this,function(v){n();c(v)}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){m()}),null,280);this.ui.showDialog(e.container,400,80,!0,!1);e.init()};GitHubClient.prototype.writeFile=
function(e,f,c,m,n,v,d,g,k){v.length>=this.maxFileSize?k({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(v.length)+" / 1 MB)"}):(c={path:m,branch:decodeURIComponent(c),message:n,content:v},null!=d&&(c.sha=d),e=new mxXmlRequest(this.baseUrl+"/repos/"+e+"/"+f+"/contents/"+m,JSON.stringify(c),"PUT"),this.executeRequest(e,mxUtils.bind(this,function(l){g(l)}),mxUtils.bind(this,function(l){404==l.code&&(l.helpLink=this.baseHostUrl+"/settings/connections/applications/"+this.clientId,
l.code=null);k(l)})))};GitHubClient.prototype.checkExists=function(e,f,c){var m=e.split("/"),n=m[0],v=m[1],d=m[2];e=m.slice(3,m.length).join("/");this.getSha(n,v,e,d,mxUtils.bind(this,function(g){if(f){var k=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[e]),function(){k();c(!0,g)},function(){k();c(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){c(!1)})}),mxUtils.bind(this,function(g){c(!0)}),
!0)};GitHubClient.prototype.saveFile=function(e,f,c,m,n){var v=e.meta.org,d=e.meta.repo,g=e.meta.ref,k=e.meta.path,l=mxUtils.bind(this,function(q,x){this.writeFile(v,d,g,k,n,x,q,mxUtils.bind(this,function(y){delete e.meta.isNew;f(JSON.parse(y.getText()).content.sha)}),mxUtils.bind(this,function(y){c(y)}))}),p=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(k)){var q=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(x){l(e.meta.sha,
x)}),c,this.ui.getCurrentFile()!=e?e.getData():null,q.scale,q.border)}else l(e.meta.sha,Base64.encode(e.getData()))});m?this.getSha(v,d,k,g,mxUtils.bind(this,function(q){e.meta.sha=q;p()}),c):p()};GitHubClient.prototype.pickLibrary=function(e){this.pickFile(e)};GitHubClient.prototype.pickFolder=function(e){this.showGitHubDialog(!1,e)};GitHubClient.prototype.pickFile=function(e){e=null!=e?e:mxUtils.bind(this,function(f){this.ui.loadFile("H"+encodeURIComponent(f))});this.showGitHubDialog(!0,e)};GitHubClient.prototype.showGitHubDialog=
function(e,f){var c=null,m=null,n=null,v=null,d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.height="304px";var g=document.createElement("h3");mxUtils.write(g,mxResources.get(e?"selectFile":"selectFolder"));g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(g);var k=document.createElement("div");k.style.whiteSpace="nowrap";k.style.border="1px solid lightgray";k.style.boxSizing="border-box";k.style.padding="4px";
k.style.overflow="auto";k.style.lineHeight="1.2em";k.style.height="274px";d.appendChild(k);var l=document.createElement("div");l.style.textOverflow="ellipsis";l.style.boxSizing="border-box";l.style.overflow="hidden";l.style.padding="4px";l.style.width="100%";var p=new CustomDialog(this.ui,d,mxUtils.bind(this,function(){f(c+"/"+m+"/"+encodeURIComponent(n)+"/"+v)}),null,null,"https://www.diagrams.net/blog/single-repository-diagrams",null,null,null,null,[[mxResources.get("refresh"),mxUtils.bind(this,
-function(){L()})],[mxResources.get("authorize"),mxUtils.bind(this,function(){this.ui.openLink("test.draw.io"==window.location.hostname?"https://github.com/apps/diagrams-net-app-test":"https://github.com/apps/draw-io-app")})]]);this.ui.showDialog(p.container,420,370,!0,!0);e&&p.okButton.parentNode.removeChild(p.okButton);var q=mxUtils.bind(this,function(u,E,B,D){var G=document.createElement("a");G.setAttribute("title",u);G.style.cursor="pointer";mxUtils.write(G,u);mxEvent.addListener(G,"click",E);
-D&&(G.style.textDecoration="underline");null!=B&&(u=l.cloneNode(),u.style.padding=B,u.appendChild(G),G=u);return G}),x=mxUtils.bind(this,function(u){var E=document.createElement("div");E.style.marginBottom="8px";E.appendChild(q(c+"/"+m,mxUtils.bind(this,function(){v=null;L()}),null,!0));u||(mxUtils.write(E," / "),E.appendChild(q(decodeURIComponent(n),mxUtils.bind(this,function(){v=null;O()}),null,!0)));if(null!=v&&0<v.length){var B=v.split("/");for(u=0;u<B.length;u++)(function(D){mxUtils.write(E,
-" / ");E.appendChild(q(B[D],mxUtils.bind(this,function(){v=B.slice(0,D+1).join("/");K()}),null,!0))})(u)}k.appendChild(E)}),y=mxUtils.bind(this,function(u){this.ui.handleError(u,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(v=n=m=c=null,L()):this.ui.hideDialog()}),null,{})}),z=null,A=null,K=mxUtils.bind(this,function(u){null==u&&(k.innerText="",u=1);var E=new mxXmlRequest(this.baseUrl+"/repos/"+c+"/"+m+"/contents/"+v+"?ref="+encodeURIComponent(n)+"&per_page=100&page="+
-u,null,"GET");this.ui.spinner.spin(k,mxResources.get("loading"));p.okButton.removeAttribute("disabled");null!=A&&(mxEvent.removeListener(k,"scroll",A),A=null);null!=z&&null!=z.parentNode&&z.parentNode.removeChild(z);z=document.createElement("a");z.style.display="block";z.style.cursor="pointer";mxUtils.write(z,mxResources.get("more")+"...");var B=mxUtils.bind(this,function(){K(u+1)});mxEvent.addListener(z,"click",B);this.executeRequest(E,mxUtils.bind(this,function(D){this.ui.spinner.stop();1==u&&(x(),
-k.appendChild(q("../ [Up]",mxUtils.bind(this,function(){if(""==v)v=null,L();else{var F=v.split("/");v=F.slice(0,F.length-1).join("/");K()}}),"4px")));var G=JSON.parse(D.getText());if(null==G||0==G.length)mxUtils.write(k,mxResources.get("noFiles"));else{var N=!0,I=0;D=mxUtils.bind(this,function(F){for(var H=0;H<G.length;H++)mxUtils.bind(this,function(R,X){if(F==("dir"==R.type)){X=l.cloneNode();X.style.backgroundColor=N?Editor.isDarkMode()?"#000000":"#eeeeee":"";N=!N;var J=document.createElement("img");
-J.src=IMAGE_PATH+"/"+("dir"==R.type?"folder.png":"file.png");J.setAttribute("align","absmiddle");J.style.marginRight="4px";J.style.marginTop="-4px";J.width=20;X.appendChild(J);X.appendChild(q(R.name+("dir"==R.type?"/":""),mxUtils.bind(this,function(){"dir"==R.type?(v=R.path,K()):e&&"file"==R.type&&(this.ui.hideDialog(),f(c+"/"+m+"/"+encodeURIComponent(n)+"/"+R.path))})));k.appendChild(X);I++}})(G[H],H)});D(!0);e&&D(!1)}}),y,!0)}),O=mxUtils.bind(this,function(u,E){null==u&&(k.innerText="",u=1);var B=
+function(){K()})],[mxResources.get("authorize"),mxUtils.bind(this,function(){this.ui.openLink("test.draw.io"==window.location.hostname?"https://github.com/apps/diagrams-net-app-test":"https://github.com/apps/draw-io-app")})]]);this.ui.showDialog(p.container,420,370,!0,!0);e&&p.okButton.parentNode.removeChild(p.okButton);var q=mxUtils.bind(this,function(u,E,B,D){var G=document.createElement("a");G.setAttribute("title",u);G.style.cursor="pointer";mxUtils.write(G,u);mxEvent.addListener(G,"click",E);
+D&&(G.style.textDecoration="underline");null!=B&&(u=l.cloneNode(),u.style.padding=B,u.appendChild(G),G=u);return G}),x=mxUtils.bind(this,function(u){var E=document.createElement("div");E.style.marginBottom="8px";E.appendChild(q(c+"/"+m,mxUtils.bind(this,function(){v=null;K()}),null,!0));u||(mxUtils.write(E," / "),E.appendChild(q(decodeURIComponent(n),mxUtils.bind(this,function(){v=null;O()}),null,!0)));if(null!=v&&0<v.length){var B=v.split("/");for(u=0;u<B.length;u++)(function(D){mxUtils.write(E,
+" / ");E.appendChild(q(B[D],mxUtils.bind(this,function(){v=B.slice(0,D+1).join("/");J()}),null,!0))})(u)}k.appendChild(E)}),y=mxUtils.bind(this,function(u){this.ui.handleError(u,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(v=n=m=c=null,K()):this.ui.hideDialog()}),null,{})}),z=null,A=null,J=mxUtils.bind(this,function(u){null==u&&(k.innerText="",u=1);var E=new mxXmlRequest(this.baseUrl+"/repos/"+c+"/"+m+"/contents/"+v+"?ref="+encodeURIComponent(n)+"&per_page=100&page="+
+u,null,"GET");this.ui.spinner.spin(k,mxResources.get("loading"));p.okButton.removeAttribute("disabled");null!=A&&(mxEvent.removeListener(k,"scroll",A),A=null);null!=z&&null!=z.parentNode&&z.parentNode.removeChild(z);z=document.createElement("a");z.style.display="block";z.style.cursor="pointer";mxUtils.write(z,mxResources.get("more")+"...");var B=mxUtils.bind(this,function(){J(u+1)});mxEvent.addListener(z,"click",B);this.executeRequest(E,mxUtils.bind(this,function(D){this.ui.spinner.stop();1==u&&(x(),
+k.appendChild(q("../ [Up]",mxUtils.bind(this,function(){if(""==v)v=null,K();else{var F=v.split("/");v=F.slice(0,F.length-1).join("/");J()}}),"4px")));var G=JSON.parse(D.getText());if(null==G||0==G.length)mxUtils.write(k,mxResources.get("noFiles"));else{var H=!0,N=0;D=mxUtils.bind(this,function(F){for(var I=0;I<G.length;I++)mxUtils.bind(this,function(Q,X){if(F==("dir"==Q.type)){X=l.cloneNode();X.style.backgroundColor=H?Editor.isDarkMode()?"#000000":"#eeeeee":"";H=!H;var L=document.createElement("img");
+L.src=IMAGE_PATH+"/"+("dir"==Q.type?"folder.png":"file.png");L.setAttribute("align","absmiddle");L.style.marginRight="4px";L.style.marginTop="-4px";L.width=20;X.appendChild(L);X.appendChild(q(Q.name+("dir"==Q.type?"/":""),mxUtils.bind(this,function(){"dir"==Q.type?(v=Q.path,J()):e&&"file"==Q.type&&(this.ui.hideDialog(),f(c+"/"+m+"/"+encodeURIComponent(n)+"/"+Q.path))})));k.appendChild(X);N++}})(G[I],I)});D(!0);e&&D(!1)}}),y,!0)}),O=mxUtils.bind(this,function(u,E){null==u&&(k.innerText="",u=1);var B=
new mxXmlRequest(this.baseUrl+"/repos/"+c+"/"+m+"/branches?per_page=100&page="+u,null,"GET");p.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(k,mxResources.get("loading"));null!=A&&(mxEvent.removeListener(k,"scroll",A),A=null);null!=z&&null!=z.parentNode&&z.parentNode.removeChild(z);z=document.createElement("a");z.style.display="block";z.style.cursor="pointer";mxUtils.write(z,mxResources.get("more")+"...");var D=mxUtils.bind(this,function(){O(u+1)});mxEvent.addListener(z,"click",
-D);this.executeRequest(B,mxUtils.bind(this,function(G){this.ui.spinner.stop();1==u&&(x(!0),k.appendChild(q("../ [Up]",mxUtils.bind(this,function(){v=null;L()}),"4px")));G=JSON.parse(G.getText());if(null==G||0==G.length)mxUtils.write(k,mxResources.get("noFiles"));else if(1==G.length&&E)n=G[0].name,v="",K();else{for(var N=0;N<G.length;N++)mxUtils.bind(this,function(I,F){var H=l.cloneNode();H.style.backgroundColor=0==F%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";H.appendChild(q(I.name,mxUtils.bind(this,
-function(){n=I.name;v="";K()})));k.appendChild(H)})(G[N],N);100==G.length&&(k.appendChild(z),A=function(){k.scrollTop>=k.scrollHeight-k.offsetHeight&&D()},mxEvent.addListener(k,"scroll",A))}}),y)}),L=mxUtils.bind(this,function(u){null==u&&(k.innerText="",u=1);var E=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+u,null,"GET");p.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(k,mxResources.get("loading"));null!=A&&mxEvent.removeListener(k,"scroll",A);null!=z&&null!=
-z.parentNode&&z.parentNode.removeChild(z);z=document.createElement("a");z.style.display="block";z.style.cursor="pointer";mxUtils.write(z,mxResources.get("more")+"...");var B=mxUtils.bind(this,function(){L(u+1)});mxEvent.addListener(z,"click",B);this.executeRequest(E,mxUtils.bind(this,function(D){this.ui.spinner.stop();D=JSON.parse(D.getText());if(null==D||0==D.length)mxUtils.write(k,mxResources.get("noFiles"));else{1==u&&(k.appendChild(q(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var N=
-new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(I){if(null!=I){var F=I.split("/");if(1<F.length){I=F[0];var H=F[1];3>F.length?(c=I,m=H,v=n=null,O()):this.ui.spinner.spin(k,mxResources.get("loading"))&&(F=encodeURIComponent(F.slice(2,F.length).join("/")),this.getFile(I+"/"+H+"/"+F,mxUtils.bind(this,function(R){this.ui.spinner.stop();c=R.meta.org;m=R.meta.repo;n=decodeURIComponent(R.meta.ref);v="";K()}),mxUtils.bind(this,function(R){this.ui.spinner.stop();
-this.ui.handleError({message:mxResources.get("fileNotFound")})})))}else this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})}}),mxResources.get("enterValue"));this.ui.showDialog(N.container,300,80,!0,!1);N.init()}))),mxUtils.br(k),mxUtils.br(k));for(var G=0;G<D.length;G++)mxUtils.bind(this,function(N,I){var F=l.cloneNode();F.style.backgroundColor=0==I%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";F.appendChild(q(N.full_name,mxUtils.bind(this,function(){c=N.owner.login;
-m=N.name;v="";O(null,!0)})));k.appendChild(F)})(D[G],G)}100==D.length&&(k.appendChild(z),A=function(){k.scrollTop>=k.scrollHeight-k.offsetHeight&&B()},mxEvent.addListener(k,"scroll",A))}),y)});L()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);b=null}})();TrelloFile=function(b,e,f){DrawioFile.call(this,b,e);this.meta=f;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};TrelloFile.prototype.getSize=function(){return this.meta.bytes};
+D);this.executeRequest(B,mxUtils.bind(this,function(G){this.ui.spinner.stop();1==u&&(x(!0),k.appendChild(q("../ [Up]",mxUtils.bind(this,function(){v=null;K()}),"4px")));G=JSON.parse(G.getText());if(null==G||0==G.length)mxUtils.write(k,mxResources.get("noFiles"));else if(1==G.length&&E)n=G[0].name,v="",J();else{for(var H=0;H<G.length;H++)mxUtils.bind(this,function(N,F){var I=l.cloneNode();I.style.backgroundColor=0==F%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";I.appendChild(q(N.name,mxUtils.bind(this,
+function(){n=N.name;v="";J()})));k.appendChild(I)})(G[H],H);100==G.length&&(k.appendChild(z),A=function(){k.scrollTop>=k.scrollHeight-k.offsetHeight&&D()},mxEvent.addListener(k,"scroll",A))}}),y)}),K=mxUtils.bind(this,function(u){null==u&&(k.innerText="",u=1);var E=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+u,null,"GET");p.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(k,mxResources.get("loading"));null!=A&&mxEvent.removeListener(k,"scroll",A);null!=z&&null!=
+z.parentNode&&z.parentNode.removeChild(z);z=document.createElement("a");z.style.display="block";z.style.cursor="pointer";mxUtils.write(z,mxResources.get("more")+"...");var B=mxUtils.bind(this,function(){K(u+1)});mxEvent.addListener(z,"click",B);this.executeRequest(E,mxUtils.bind(this,function(D){this.ui.spinner.stop();D=JSON.parse(D.getText());if(null==D||0==D.length)mxUtils.write(k,mxResources.get("noFiles"));else{1==u&&(k.appendChild(q(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var H=
+new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(N){if(null!=N){var F=N.split("/");if(1<F.length){N=F[0];var I=F[1];3>F.length?(c=N,m=I,v=n=null,O()):this.ui.spinner.spin(k,mxResources.get("loading"))&&(F=encodeURIComponent(F.slice(2,F.length).join("/")),this.getFile(N+"/"+I+"/"+F,mxUtils.bind(this,function(Q){this.ui.spinner.stop();c=Q.meta.org;m=Q.meta.repo;n=decodeURIComponent(Q.meta.ref);v="";J()}),mxUtils.bind(this,function(Q){this.ui.spinner.stop();
+this.ui.handleError({message:mxResources.get("fileNotFound")})})))}else this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})}}),mxResources.get("enterValue"));this.ui.showDialog(H.container,300,80,!0,!1);H.init()}))),mxUtils.br(k),mxUtils.br(k));for(var G=0;G<D.length;G++)mxUtils.bind(this,function(H,N){var F=l.cloneNode();F.style.backgroundColor=0==N%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";F.appendChild(q(H.full_name,mxUtils.bind(this,function(){c=H.owner.login;
+m=H.name;v="";O(null,!0)})));k.appendChild(F)})(D[G],G)}100==D.length&&(k.appendChild(z),A=function(){k.scrollTop>=k.scrollHeight-k.offsetHeight&&B()},mxEvent.addListener(k,"scroll",A))}),y)});K()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);b=null}})();TrelloFile=function(b,e,f){DrawioFile.call(this,b,e);this.meta=f;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};TrelloFile.prototype.getSize=function(){return this.meta.bytes};
TrelloFile.prototype.save=function(b,e,f){this.doSave(this.getTitle(),e,f)};TrelloFile.prototype.saveAs=function(b,e,f){this.doSave(b,e,f)};TrelloFile.prototype.doSave=function(b,e,f){var c=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=c;this.saveFile(b,!1,e,f)}),f])};
TrelloFile.prototype.saveFile=function(b,e,f,c){this.isEditable()?this.savingFile?null!=c&&(this.saveNeededCounter++,c({code:App.ERROR_BUSY})):(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.getTitle()==b?this.ui.trello.saveFile(this,mxUtils.bind(this,function(m){this.setModified(this.getShadowModified());this.savingFile=!1;this.meta=m;this.contentChanged();null!=f&&f();0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(b,e,f,c))}),mxUtils.bind(this,
function(m){this.savingFile=!1;null!=c&&c(m)})):this.ui.pickFolder(App.MODE_TRELLO,mxUtils.bind(this,function(m){this.ui.trello.insertFile(b,this.getData(),mxUtils.bind(this,function(n){this.savingFile=!1;null!=f&&f();this.ui.fileLoaded(n);0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(b,e,f,c))}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}),!1,m)}))):null!=f&&f()};TrelloLibrary=function(b,e,f){TrelloFile.call(this,b,e,f)};mxUtils.extend(TrelloLibrary,TrelloFile);TrelloLibrary.prototype.doSave=function(b,e,f){this.saveFile(b,!1,e,f)};TrelloLibrary.prototype.open=function(){};TrelloClient=function(b){DrawioClient.call(this,b,"tauth");Trello.setKey(this.key)};mxUtils.extend(TrelloClient,DrawioClient);TrelloClient.prototype.key="e89d109082298ce91f6576f82f458551";TrelloClient.prototype.baseUrl="https://api.trello.com/1/";TrelloClient.prototype.SEPARATOR="|$|";TrelloClient.prototype.maxFileSize=1E7;TrelloClient.prototype.extension=".xml";
@@ -12506,12 +12501,12 @@ TrelloClient.prototype.writeFile=function(b,e,f,c,m){if(null!=b&&null!=e)if(e.le
b);var k=new XMLHttpRequest;k.responseType="json";k.onreadystatechange=mxUtils.bind(this,function(){if(4===k.readyState&&(window.clearTimeout(d),v))if(200==k.status){var l=k.response;l.compoundId=f+this.SEPARATOR+l.id;c(l)}else 401==k.status?this.authenticate(n,m,!0):m()});k.open("POST",this.baseUrl+"cards/"+f+"/attachments");k.send(g)});this.authenticate(n,m)}else m({message:mxResources.get("unknownError")})};TrelloClient.prototype.pickLibrary=function(b){this.pickFile(b)};
TrelloClient.prototype.pickFolder=function(b){this.authenticate(mxUtils.bind(this,function(){this.showTrelloDialog(!1,b)}),mxUtils.bind(this,function(e){this.ui.showError(mxResources.get("error"),e)}))};TrelloClient.prototype.pickFile=function(b,e){b=null!=b?b:mxUtils.bind(this,function(f){this.ui.loadFile("T"+encodeURIComponent(f))});this.authenticate(mxUtils.bind(this,function(){this.showTrelloDialog(!0,b)}),mxUtils.bind(this,function(f){this.ui.showError(mxResources.get("error"),f,mxResources.get("ok"))}))};
TrelloClient.prototype.showTrelloDialog=function(b,e){var f=null,c="@me",m=0,n=document.createElement("div");n.style.whiteSpace="nowrap";n.style.overflow="hidden";n.style.height="224px";var v=document.createElement("h3");mxUtils.write(v,b?mxResources.get("selectFile"):mxResources.get("selectCard"));v.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";n.appendChild(v);var d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.overflow="auto";d.style.height=
-"194px";n.appendChild(d);n=new CustomDialog(this.ui,n);this.ui.showDialog(n.container,340,290,!0,!0);n.okButton.parentNode.removeChild(n.okButton);var g=mxUtils.bind(this,function(y,z,A){m++;var K=document.createElement("div");K.style="width:100%;text-overflow:ellipsis;overflow:hidden;vertical-align:middle;padding:2px 0 2px 0;background:"+(0==m%2?Editor.isDarkMode()?"#000":"#eee":Editor.isDarkMode()?"":"#fff");var O=document.createElement("a");O.style.cursor="pointer";if(null!=A){var L=document.createElement("img");
-L.src=A.url;L.width=A.width;L.height=A.height;L.style="border: 1px solid black;margin:5px;vertical-align:middle";O.appendChild(L)}mxUtils.write(O,y);mxEvent.addListener(O,"click",z);K.appendChild(O);return K}),k=mxUtils.bind(this,function(y){this.ui.handleError(y,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),l=mxUtils.bind(this,function(){m=0;d.innerText="";this.ui.spinner.spin(d,mxResources.get("loading"));var y=mxUtils.bind(this,function(){Trello.cards.get(f+
-"/attachments",{fields:"id,name,previews"},mxUtils.bind(this,function(z){this.ui.spinner.stop();d.appendChild(g("../ [Up]",mxUtils.bind(this,function(){x()})));mxUtils.br(d);null==z||0==z.length?mxUtils.write(d,mxResources.get("noFiles")):mxUtils.bind(this,function(){for(var A=0;A<z.length;A++)mxUtils.bind(this,function(K){d.appendChild(g(K.name,mxUtils.bind(this,function(){this.ui.hideDialog();e(f+this.SEPARATOR+K.id)}),null!=K.previews?K.previews[0]:null))})(z[A])})()}),mxUtils.bind(this,function(z){401==
+"194px";n.appendChild(d);n=new CustomDialog(this.ui,n);this.ui.showDialog(n.container,340,290,!0,!0);n.okButton.parentNode.removeChild(n.okButton);var g=mxUtils.bind(this,function(y,z,A){m++;var J=document.createElement("div");J.style="width:100%;text-overflow:ellipsis;overflow:hidden;vertical-align:middle;padding:2px 0 2px 0;background:"+(0==m%2?Editor.isDarkMode()?"#000":"#eee":Editor.isDarkMode()?"":"#fff");var O=document.createElement("a");O.style.cursor="pointer";if(null!=A){var K=document.createElement("img");
+K.src=A.url;K.width=A.width;K.height=A.height;K.style="border: 1px solid black;margin:5px;vertical-align:middle";O.appendChild(K)}mxUtils.write(O,y);mxEvent.addListener(O,"click",z);J.appendChild(O);return J}),k=mxUtils.bind(this,function(y){this.ui.handleError(y,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),l=mxUtils.bind(this,function(){m=0;d.innerText="";this.ui.spinner.spin(d,mxResources.get("loading"));var y=mxUtils.bind(this,function(){Trello.cards.get(f+
+"/attachments",{fields:"id,name,previews"},mxUtils.bind(this,function(z){this.ui.spinner.stop();d.appendChild(g("../ [Up]",mxUtils.bind(this,function(){x()})));mxUtils.br(d);null==z||0==z.length?mxUtils.write(d,mxResources.get("noFiles")):mxUtils.bind(this,function(){for(var A=0;A<z.length;A++)mxUtils.bind(this,function(J){d.appendChild(g(J.name,mxUtils.bind(this,function(){this.ui.hideDialog();e(f+this.SEPARATOR+J.id)}),null!=J.previews?J.previews[0]:null))})(z[A])})()}),mxUtils.bind(this,function(z){401==
z.status?this.authenticate(y,k,!0):null!=k&&k(z)}))});y()}),p=null,q=null,x=mxUtils.bind(this,function(y){null==y&&(m=0,d.innerText="",y=1);this.ui.spinner.spin(d,mxResources.get("loading"));null!=p&&null!=p.parentNode&&p.parentNode.removeChild(p);p=document.createElement("a");p.style.display="block";p.style.cursor="pointer";mxUtils.write(p,mxResources.get("more")+"...");var z=mxUtils.bind(this,function(){mxEvent.removeListener(d,"scroll",q);x(y+1)});mxEvent.addListener(p,"click",z);var A=mxUtils.bind(this,
-function(){Trello.get("search",{query:""==mxUtils.trim(c)?"is:open":c,cards_limit:100,cards_page:y-1},mxUtils.bind(this,function(K){this.ui.spinner.stop();K=null!=K?K.cards:null;if(null==K||0==K.length)mxUtils.write(d,mxResources.get("noFiles"));else{1==y&&(d.appendChild(g(mxResources.get("filterCards")+"...",mxUtils.bind(this,function(){var L=new FilenameDialog(this.ui,c,mxResources.get("ok"),mxUtils.bind(this,function(u){null!=u&&(c=u,x())}),mxResources.get("filterCards"),null,null,"http://help.trello.com/article/808-searching-for-cards-all-boards");
-this.ui.showDialog(L.container,300,80,!0,!1);L.init()}))),mxUtils.br(d));for(var O=0;O<K.length;O++)mxUtils.bind(this,function(L){d.appendChild(g(L.name,mxUtils.bind(this,function(){b?(f=L.id,l()):(this.ui.hideDialog(),e(L.id))})))})(K[O]);100==K.length&&(d.appendChild(p),q=function(){d.scrollTop>=d.scrollHeight-d.offsetHeight&&z()},mxEvent.addListener(d,"scroll",q))}}),mxUtils.bind(this,function(K){401==K.status?this.authenticate(A,k,!0):null!=k&&k({message:K.responseText})}))});A()});x()};
+function(){Trello.get("search",{query:""==mxUtils.trim(c)?"is:open":c,cards_limit:100,cards_page:y-1},mxUtils.bind(this,function(J){this.ui.spinner.stop();J=null!=J?J.cards:null;if(null==J||0==J.length)mxUtils.write(d,mxResources.get("noFiles"));else{1==y&&(d.appendChild(g(mxResources.get("filterCards")+"...",mxUtils.bind(this,function(){var K=new FilenameDialog(this.ui,c,mxResources.get("ok"),mxUtils.bind(this,function(u){null!=u&&(c=u,x())}),mxResources.get("filterCards"),null,null,"http://help.trello.com/article/808-searching-for-cards-all-boards");
+this.ui.showDialog(K.container,300,80,!0,!1);K.init()}))),mxUtils.br(d));for(var O=0;O<J.length;O++)mxUtils.bind(this,function(K){d.appendChild(g(K.name,mxUtils.bind(this,function(){b?(f=K.id,l()):(this.ui.hideDialog(),e(K.id))})))})(J[O]);100==J.length&&(d.appendChild(p),q=function(){d.scrollTop>=d.scrollHeight-d.offsetHeight&&z()},mxEvent.addListener(d,"scroll",q))}}),mxUtils.bind(this,function(J){401==J.status?this.authenticate(A,k,!0):null!=k&&k({message:J.responseText})}))});A()});x()};
TrelloClient.prototype.isAuthorized=function(){try{return null!=localStorage.trello_token}catch(b){}return!1};TrelloClient.prototype.logout=function(){localStorage.removeItem("trello_token");Trello.deauthorize()};GitLabFile=function(b,e,f){GitHubFile.call(this,b,e,f);this.peer=this.ui.gitLab};mxUtils.extend(GitLabFile,GitHubFile);GitLabFile.prototype.share=function(){this.ui.editor.graph.openLink(DRAWIO_GITLAB_URL+"/"+encodeURIComponent(this.meta.org)+"/"+encodeURIComponent(this.meta.repo)+"/-/project_members")};
GitLabFile.prototype.getId=function(){return this.meta.org+"/"+(null!=this.meta.repo?encodeURIComponent(this.meta.repo)+"/"+(null!=this.meta.ref?this.meta.ref+(null!=this.meta.path?"/"+this.meta.path:""):""):"")};GitLabFile.prototype.getHash=function(){return encodeURIComponent("A"+this.getId())};GitLabFile.prototype.isConflict=function(b){return null!=b&&400==b.status};GitLabFile.prototype.getMode=function(){return App.MODE_GITLAB};GitLabFile.prototype.getDescriptorEtag=function(b){return b.last_commit_id};
GitLabFile.prototype.setDescriptorEtag=function(b,e){b.last_commit_id=e};GitLabLibrary=function(b,e,f){GitLabFile.call(this,b,e,f)};mxUtils.extend(GitLabLibrary,GitLabFile);GitLabLibrary.prototype.doSave=function(b,e,f){this.saveFile(b,!1,e,f)};GitLabLibrary.prototype.open=function(){};(function(){var b=null;window.GitLabClient=function(e){GitHubClient.call(this,e,"gitlabauth")};mxUtils.extend(GitLabClient,GitHubClient);GitLabClient.prototype.clientId=DRAWIO_GITLAB_ID;GitLabClient.prototype.scope="api%20read_repository%20write_repository";GitLabClient.prototype.baseUrl=DRAWIO_GITLAB_URL+"/api/v4";GitLabClient.prototype.maxFileSize=1E7;GitLabClient.prototype.authToken="Bearer";GitLabClient.prototype.redirectUri=window.location.protocol+"//"+window.location.host+"/gitlab";GitLabClient.prototype.authenticate=
@@ -12523,11 +12518,11 @@ l);p.setRequestHeader("PRIVATE_TOKEN",l);p.setRequestHeader("Content-Type","appl
null!=q.errors&&0<q.errors.length&&(p="too_large"==q.errors[0].code)}catch(x){}c({message:mxResources.get(p?"drawingTooLarge":"forbidden")})}else 404===e.getStatus()?c({message:this.getErrorMessage(e,mxResources.get("fileNotFound"))}):400===e.getStatus()?c({status:400}):c({status:e.getStatus(),message:this.getErrorMessage(e,mxResources.get("error")+" "+e.getStatus())})}),mxUtils.bind(this,function(p){window.clearTimeout(k);g&&c(p)}))}),v=mxUtils.bind(this,function(d){null==this.user?this.updateUser(function(){v(!0)},
c,d):n(d)});null==b?this.authenticate(function(){v(!0)},c):v(!1)};GitLabClient.prototype.getRefIndex=function(e,f,c,m,n,v){if(null!=n)c(e,n);else{var d=e.length-2,g=mxUtils.bind(this,function(){if(2>d)m({message:mxResources.get("fileNotFound")});else{var k=Math.max(d-1,0),l=e.slice(0,k).join("/");k=e[k];var p=e[d],q=e.slice(d+1,e.length).join("/");l=this.baseUrl+"/projects/"+encodeURIComponent(l+"/"+k)+"/repository/"+(f?v?"branches?per_page=1&page=1&ref="+p:"tree?path="+q+"&ref="+p:"files/"+encodeURIComponent(q)+
"?ref="+p);var x=new mxXmlRequest(l,null,"HEAD");this.executeRequest(x,mxUtils.bind(this,function(){200==x.getStatus()?c(e,d):m({message:mxResources.get("fileNotFound")})}),mxUtils.bind(this,function(){404==x.getStatus()?(d--,g()):m({message:mxResources.get("fileNotFound")})}))}});g()}};GitLabClient.prototype.getFile=function(e,f,c,m,n,v){m=null!=m?m:!1;this.getRefIndex(e.split("/"),!1,mxUtils.bind(this,function(d,g){var k=Math.max(g-1,0),l=d.slice(0,k).join("/"),p=d[k],q=d[g];e=d.slice(g+1,d.length).join("/");
-d=/\.png$/i.test(e);if(!n&&(/\.v(dx|sdx?)$/i.test(e)||/\.gliffy$/i.test(e)||/\.pdf$/i.test(e)||!this.ui.useCanvasForExport&&d))if(null!=b){k="&t="+(new Date).getTime();var x=this.baseUrl+"/projects/"+encodeURIComponent(l+"/"+p)+"/repository/files/"+encodeURIComponent(e)+"?ref="+q;d=e.split("/");this.ui.convertFile(x+k,0<d.length?d[d.length-1]:e,null,this.extension,f,c,mxUtils.bind(this,function(y,z,A){y=new mxXmlRequest(y,null,"GET");this.executeRequest(y,mxUtils.bind(this,function(K){try{z(this.getFileContent(JSON.parse(K.getText())))}catch(O){A(O)}}),
+d=/\.png$/i.test(e);if(!n&&(/\.v(dx|sdx?)$/i.test(e)||/\.gliffy$/i.test(e)||/\.pdf$/i.test(e)||!this.ui.useCanvasForExport&&d))if(null!=b){k="&t="+(new Date).getTime();var x=this.baseUrl+"/projects/"+encodeURIComponent(l+"/"+p)+"/repository/files/"+encodeURIComponent(e)+"?ref="+q;d=e.split("/");this.ui.convertFile(x+k,0<d.length?d[d.length-1]:e,null,this.extension,f,c,mxUtils.bind(this,function(y,z,A){y=new mxXmlRequest(y,null,"GET");this.executeRequest(y,mxUtils.bind(this,function(J){try{z(this.getFileContent(JSON.parse(J.getText())))}catch(O){A(O)}}),
A)}))}else c({message:mxResources.get("accessDenied")});else k="&t="+(new Date).getTime(),x=this.baseUrl+"/projects/"+encodeURIComponent(l+"/"+p)+"/repository/files/"+encodeURIComponent(e)+"?ref="+q,d=new mxXmlRequest(x+k,null,"GET"),this.executeRequest(d,mxUtils.bind(this,function(y){try{f(this.createGitLabFile(l,p,q,JSON.parse(y.getText()),m,g))}catch(z){c(z)}}),c)}),c,v)};GitLabClient.prototype.getFileContent=function(e){var f=e.file_name,c=e.content;"base64"===e.encoding&&(/\.jpe?g$/i.test(f)?
c="data:image/jpeg;base64,"+c:/\.gif$/i.test(f)?c="data:image/gif;base64,"+c:/\.pdf$/i.test(f)?c="data:application/pdf;base64,"+c:/\.png$/i.test(f)?(e=this.ui.extractGraphModelFromPng(c),c=null!=e&&0<e.length?e:"data:image/png;base64,"+c):c=Base64.decode(c));return c};GitLabClient.prototype.createGitLabFile=function(e,f,c,m,n,v){var d=DRAWIO_GITLAB_URL+"/";e={org:e,repo:f,ref:c,name:m.file_name,path:m.file_path,html_url:d+e+"/"+f+"/blob/"+c+"/"+m.file_path,download_url:d+e+"/"+f+"/raw/"+c+"/"+m.file_path+
"?inline=false",last_commit_id:m.last_commit_id,refPos:v};m=this.getFileContent(m);return n?new GitLabLibrary(this.ui,m,e):new GitLabFile(this.ui,m,e)};GitLabClient.prototype.insertFile=function(e,f,c,m,n,v,d){n=null!=n?n:!1;v=v.split("/");this.getRefIndex(v,!0,mxUtils.bind(this,function(g,k){var l=Math.max(k-1,0),p=g.slice(0,l).join("/"),q=g[l],x=g[k];path=g.slice(k+1,g.length).join("/");0<path.length&&(path+="/");path+=e;this.checkExists(p+"/"+q+"/"+x+"/"+path,!0,mxUtils.bind(this,function(y,z){y?
-n?(d||(f=Base64.encode(f)),this.showCommitDialog(e,!0,mxUtils.bind(this,function(A){this.writeFile(p,q,x,path,A,f,z,mxUtils.bind(this,function(K){try{var O=JSON.parse(K.getText());c(this.createGitLabFile(p,q,x,null!=O.content?O.content:O,n,k))}catch(L){m(L)}}),m)}),m)):(y=DRAWIO_GITLAB_URL+"/",c(new GitLabFile(this.ui,f,{org:p,repo:q,ref:x,name:e,path:path,html_url:y+p+"/"+q+"/blob/"+x+"/"+path,download_url:y+p+"/"+q+"/raw/"+x+"/"+path+"?inline=false",refPos:k,last_commit_id:z,isNew:!0}))):m()}))}),
+n?(d||(f=Base64.encode(f)),this.showCommitDialog(e,!0,mxUtils.bind(this,function(A){this.writeFile(p,q,x,path,A,f,z,mxUtils.bind(this,function(J){try{var O=JSON.parse(J.getText());c(this.createGitLabFile(p,q,x,null!=O.content?O.content:O,n,k))}catch(K){m(K)}}),m)}),m)):(y=DRAWIO_GITLAB_URL+"/",c(new GitLabFile(this.ui,f,{org:p,repo:q,ref:x,name:e,path:path,html_url:y+p+"/"+q+"/blob/"+x+"/"+path,download_url:y+p+"/"+q+"/raw/"+x+"/"+path+"?inline=false",refPos:k,last_commit_id:z,isNew:!0}))):m()}))}),
m,null,4>=v.length)};GitLabClient.prototype.checkExists=function(e,f,c){this.getFile(e,mxUtils.bind(this,function(m){if(f){var n=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[e]),function(){n();c(!0,m.getCurrentEtag())},function(){n();c(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){c(!1)})}),mxUtils.bind(this,function(m){c(!0)}),null,!0)};GitLabClient.prototype.writeFile=function(e,
f,c,m,n,v,d,g,k){if(v.length>=this.maxFileSize)k({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(v.length)+" / 10 MB)"});else{var l="POST";c={path:encodeURIComponent(m),branch:decodeURIComponent(c),commit_message:n,content:v,encoding:"base64"};null!=d&&(c.last_commit_id=d,l="PUT");e=this.baseUrl+"/projects/"+encodeURIComponent(e+"/"+f)+"/repository/files/"+encodeURIComponent(m);l=new mxXmlRequest(e,JSON.stringify(c),l);this.executeRequest(l,mxUtils.bind(this,function(p){g(p)}),
k)}};GitLabClient.prototype.saveFile=function(e,f,c,m,n){var v=e.meta.org,d=e.meta.repo,g=e.meta.ref,k=e.meta.path,l=mxUtils.bind(this,function(q,x){this.writeFile(v,d,g,k,n,x,q,mxUtils.bind(this,function(y){delete e.meta.isNew;this.getFile(v+"/"+d+"/"+g+"/"+k,mxUtils.bind(this,function(z){z.getData()==e.getData()?f(z.getCurrentEtag()):f({content:e.getCurrentEtag()})}),c,null,null,e.meta.refPos)}),c)}),p=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(k)){var q=this.ui.getPngFileProperties(this.ui.fileNode);
@@ -12535,41 +12530,41 @@ this.ui.getEmbeddedPng(mxUtils.bind(this,function(x){l(e.meta.last_commit_id,x)}
encodeURIComponent(f))});this.showGitLabDialog(!0,e)};GitLabClient.prototype.showGitLabDialog=function(e,f){var c=null,m=null,n=null,v=null,d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.height="304px";var g=document.createElement("h3");mxUtils.write(g,mxResources.get(e?"selectFile":"selectFolder"));g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";d.appendChild(g);var k=document.createElement("div");k.style.whiteSpace=
"nowrap";k.style.border="1px solid lightgray";k.style.boxSizing="border-box";k.style.padding="4px";k.style.overflow="auto";k.style.lineHeight="1.2em";k.style.height="274px";d.appendChild(k);var l=document.createElement("div");l.style.textOverflow="ellipsis";l.style.boxSizing="border-box";l.style.overflow="hidden";l.style.padding="4px";l.style.width="100%";var p=new CustomDialog(this.ui,d,mxUtils.bind(this,function(){f(c+"/"+m+"/"+encodeURIComponent(n)+"/"+v)}));this.ui.showDialog(p.container,420,
370,!0,!0);e&&p.okButton.parentNode.removeChild(p.okButton);var q=mxUtils.bind(this,function(u,E,B,D){var G=document.createElement("a");G.setAttribute("title",u);G.style.cursor="pointer";mxUtils.write(G,u);mxEvent.addListener(G,"click",E);D&&(G.style.textDecoration="underline");null!=B&&(u=l.cloneNode(),u.style.padding=B,u.appendChild(G),G=u);return G}),x=mxUtils.bind(this,function(u){var E=document.createElement("div");E.style.marginBottom="8px";E.appendChild(q(c+"/"+m,mxUtils.bind(this,function(){v=
-null;L()}),null,!0));u||(mxUtils.write(E," / "),E.appendChild(q(decodeURIComponent(n),mxUtils.bind(this,function(){v=null;O()}),null,!0)));if(null!=v&&0<v.length){var B=v.split("/");for(u=0;u<B.length;u++)(function(D){mxUtils.write(E," / ");E.appendChild(q(B[D],mxUtils.bind(this,function(){v=B.slice(0,D+1).join("/");K()}),null,!0))})(u)}k.appendChild(E)}),y=mxUtils.bind(this,function(u){this.ui.handleError(u,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(v=n=m=c=null,
-L()):this.ui.hideDialog()}))}),z=null,A=null,K=mxUtils.bind(this,function(u){null==u&&(k.innerText="",u=1);var E=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(c+"/"+m)+"/repository/tree?path="+v+"&ref="+n+"&per_page=100&page="+u,null,"GET");this.ui.spinner.spin(k,mxResources.get("loading"));p.okButton.removeAttribute("disabled");null!=A&&(mxEvent.removeListener(k,"scroll",A),A=null);null!=z&&null!=z.parentNode&&z.parentNode.removeChild(z);z=document.createElement("a");z.style.display=
-"block";z.style.cursor="pointer";mxUtils.write(z,mxResources.get("more")+"...");var B=mxUtils.bind(this,function(){K(u+1)});mxEvent.addListener(z,"click",B);this.executeRequest(E,mxUtils.bind(this,function(D){this.ui.spinner.stop();1==u&&(x(!n),k.appendChild(q("../ [Up]",mxUtils.bind(this,function(){if(""==v)v=null,L();else{var F=v.split("/");v=F.slice(0,F.length-1).join("/");K()}}),"4px")));var G=JSON.parse(D.getText());if(null==G||0==G.length)mxUtils.write(k,mxResources.get("noFiles"));else{var N=
-!0,I=0;D=mxUtils.bind(this,function(F){for(var H=0;H<G.length;H++)mxUtils.bind(this,function(R){if(F==("tree"==R.type)){var X=l.cloneNode();X.style.backgroundColor=N?Editor.isDarkMode()?"#000000":"#eeeeee":"";N=!N;var J=document.createElement("img");J.src=IMAGE_PATH+"/"+("tree"==R.type?"folder.png":"file.png");J.setAttribute("align","absmiddle");J.style.marginRight="4px";J.style.marginTop="-4px";J.width=20;X.appendChild(J);X.appendChild(q(R.name+("tree"==R.type?"/":""),mxUtils.bind(this,function(){"tree"==
-R.type?(v=R.path,K()):e&&"blob"==R.type&&(this.ui.hideDialog(),f(c+"/"+m+"/"+n+"/"+R.path))})));k.appendChild(X);I++}})(G[H])});D(!0);e&&D(!1);100==I&&(k.appendChild(z),A=function(){k.scrollTop>=k.scrollHeight-k.offsetHeight&&B()},mxEvent.addListener(k,"scroll",A))}}),y,!0)}),O=mxUtils.bind(this,function(u,E){null==u&&(k.innerText="",u=1);var B=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(c+"/"+m)+"/repository/branches?per_page=100&page="+u,null,"GET");p.okButton.setAttribute("disabled",
+null;K()}),null,!0));u||(mxUtils.write(E," / "),E.appendChild(q(decodeURIComponent(n),mxUtils.bind(this,function(){v=null;O()}),null,!0)));if(null!=v&&0<v.length){var B=v.split("/");for(u=0;u<B.length;u++)(function(D){mxUtils.write(E," / ");E.appendChild(q(B[D],mxUtils.bind(this,function(){v=B.slice(0,D+1).join("/");J()}),null,!0))})(u)}k.appendChild(E)}),y=mxUtils.bind(this,function(u){this.ui.handleError(u,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(v=n=m=c=null,
+K()):this.ui.hideDialog()}))}),z=null,A=null,J=mxUtils.bind(this,function(u){null==u&&(k.innerText="",u=1);var E=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(c+"/"+m)+"/repository/tree?path="+v+"&ref="+n+"&per_page=100&page="+u,null,"GET");this.ui.spinner.spin(k,mxResources.get("loading"));p.okButton.removeAttribute("disabled");null!=A&&(mxEvent.removeListener(k,"scroll",A),A=null);null!=z&&null!=z.parentNode&&z.parentNode.removeChild(z);z=document.createElement("a");z.style.display=
+"block";z.style.cursor="pointer";mxUtils.write(z,mxResources.get("more")+"...");var B=mxUtils.bind(this,function(){J(u+1)});mxEvent.addListener(z,"click",B);this.executeRequest(E,mxUtils.bind(this,function(D){this.ui.spinner.stop();1==u&&(x(!n),k.appendChild(q("../ [Up]",mxUtils.bind(this,function(){if(""==v)v=null,K();else{var F=v.split("/");v=F.slice(0,F.length-1).join("/");J()}}),"4px")));var G=JSON.parse(D.getText());if(null==G||0==G.length)mxUtils.write(k,mxResources.get("noFiles"));else{var H=
+!0,N=0;D=mxUtils.bind(this,function(F){for(var I=0;I<G.length;I++)mxUtils.bind(this,function(Q){if(F==("tree"==Q.type)){var X=l.cloneNode();X.style.backgroundColor=H?Editor.isDarkMode()?"#000000":"#eeeeee":"";H=!H;var L=document.createElement("img");L.src=IMAGE_PATH+"/"+("tree"==Q.type?"folder.png":"file.png");L.setAttribute("align","absmiddle");L.style.marginRight="4px";L.style.marginTop="-4px";L.width=20;X.appendChild(L);X.appendChild(q(Q.name+("tree"==Q.type?"/":""),mxUtils.bind(this,function(){"tree"==
+Q.type?(v=Q.path,J()):e&&"blob"==Q.type&&(this.ui.hideDialog(),f(c+"/"+m+"/"+n+"/"+Q.path))})));k.appendChild(X);N++}})(G[I])});D(!0);e&&D(!1);100==N&&(k.appendChild(z),A=function(){k.scrollTop>=k.scrollHeight-k.offsetHeight&&B()},mxEvent.addListener(k,"scroll",A))}}),y,!0)}),O=mxUtils.bind(this,function(u,E){null==u&&(k.innerText="",u=1);var B=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(c+"/"+m)+"/repository/branches?per_page=100&page="+u,null,"GET");p.okButton.setAttribute("disabled",
"disabled");this.ui.spinner.spin(k,mxResources.get("loading"));null!=A&&(mxEvent.removeListener(k,"scroll",A),A=null);null!=z&&null!=z.parentNode&&z.parentNode.removeChild(z);z=document.createElement("a");z.style.display="block";z.style.cursor="pointer";mxUtils.write(z,mxResources.get("more")+"...");var D=mxUtils.bind(this,function(){O(u+1)});mxEvent.addListener(z,"click",D);this.executeRequest(B,mxUtils.bind(this,function(G){this.ui.spinner.stop();1==u&&(x(!0),k.appendChild(q("../ [Up]",mxUtils.bind(this,
-function(){v=null;L()}),"4px")));G=JSON.parse(G.getText());if(null==G||0==G.length)mxUtils.write(k,mxResources.get("noFiles"));else if(1==G.length&&E)n=G[0].name,v="",K();else{for(var N=0;N<G.length;N++)mxUtils.bind(this,function(I,F){var H=l.cloneNode();H.style.backgroundColor=0==F%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";H.appendChild(q(I.name,mxUtils.bind(this,function(){n=encodeURIComponent(I.name);v="";K()})));k.appendChild(H)})(G[N],N);100==G.length&&(k.appendChild(z),A=function(){k.scrollTop>=
-k.scrollHeight-k.offsetHeight&&D()},mxEvent.addListener(k,"scroll",A))}}),y)});p.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(k,mxResources.get("loading"));var L=mxUtils.bind(this,function(u){var E=this.ui.spinner,B=0;this.ui.spinner.stop();var D=function(){E.spin(k,mxResources.get("loading"));B+=1},G=function(){--B;0===B&&E.stop()};null==u&&(k.innerText="",u=1);null!=A&&(mxEvent.removeListener(k,"scroll",A),A=null);null!=z&&null!=z.parentNode&&z.parentNode.removeChild(z);z=document.createElement("a");
-z.style.display="block";z.style.cursor="pointer";mxUtils.write(z,mxResources.get("more")+"...");var N=mxUtils.bind(this,function(){0===B&&L(u+1)});mxEvent.addListener(z,"click",N);var I=mxUtils.bind(this,function(H){D();var R=new mxXmlRequest(this.baseUrl+"/groups?per_page=100",null,"GET");this.executeRequest(R,mxUtils.bind(this,function(X){H(JSON.parse(X.getText()));G()}),y)}),F=mxUtils.bind(this,function(H,R){D();var X=new mxXmlRequest(this.baseUrl+"/groups/"+H.id+"/projects?per_page=100",null,
-"GET");this.executeRequest(X,mxUtils.bind(this,function(J){R(H,JSON.parse(J.getText()));G()}),y)});I(mxUtils.bind(this,function(H){if(null==this.user)mxUtils.write(k,mxResources.get("loggedOut"));else{D();var R=new mxXmlRequest(this.baseUrl+"/users/"+this.user.id+"/projects?per_page=100&page="+u,null,"GET");this.executeRequest(R,mxUtils.bind(this,function(X){X=JSON.parse(X.getText());if(null!=X&&0!=X.length||null!=H&&0!=H.length){1==u&&(k.appendChild(q(mxResources.get("enterValue")+"...",mxUtils.bind(this,
-function(){if(0===B){var V=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(t){null!=t&&(t=t.split("/"),1<t.length?(c=t[0],m=t[1],n=v=null,2<t.length?(n=encodeURIComponent(t.slice(2,t.length).join("/")),K()):O(null,!0)):(this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})))}),mxResources.get("enterValue"));this.ui.showDialog(V.container,300,80,!0,!1);V.init()}}))),mxUtils.br(k),mxUtils.br(k));for(var J=!0,W=0;W<X.length;W++)mxUtils.bind(this,
-function(V){var t=l.cloneNode();t.style.backgroundColor=J?Editor.isDarkMode()?"#000000":"#eeeeee":"";J=!J;t.appendChild(q(V.name_with_namespace,mxUtils.bind(this,function(){0===B&&(c=V.owner.username,m=V.path,v="",O(null,!0))})));k.appendChild(t)})(X[W]);for(W=0;W<H.length;W++)D(),F(H[W],mxUtils.bind(this,function(V,t){G();for(var C=0;C<t.length;C++){var M=l.cloneNode();M.style.backgroundColor=J?"dark"==uiTheme?"#000000":"#eeeeee":"";J=!J;mxUtils.bind(this,function(Q){M.appendChild(q(Q.name_with_namespace,
-mxUtils.bind(this,function(){0===B&&(c=V.full_path,m=Q.path,v="",O(null,!0))})));k.appendChild(M)})(t[C])}}));G()}else G(),mxUtils.write(k,mxResources.get("noFiles"));100==X.length&&(k.appendChild(z),A=function(){k.scrollTop>=k.scrollHeight-k.offsetHeight&&N()},mxEvent.addListener(k,"scroll",A))}),y)}}))});b?this.user?L():this.updateUser(function(){L()},y,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){L()},y,!0)}),y)};GitLabClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+
+function(){v=null;K()}),"4px")));G=JSON.parse(G.getText());if(null==G||0==G.length)mxUtils.write(k,mxResources.get("noFiles"));else if(1==G.length&&E)n=G[0].name,v="",J();else{for(var H=0;H<G.length;H++)mxUtils.bind(this,function(N,F){var I=l.cloneNode();I.style.backgroundColor=0==F%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";I.appendChild(q(N.name,mxUtils.bind(this,function(){n=encodeURIComponent(N.name);v="";J()})));k.appendChild(I)})(G[H],H);100==G.length&&(k.appendChild(z),A=function(){k.scrollTop>=
+k.scrollHeight-k.offsetHeight&&D()},mxEvent.addListener(k,"scroll",A))}}),y)});p.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(k,mxResources.get("loading"));var K=mxUtils.bind(this,function(u){var E=this.ui.spinner,B=0;this.ui.spinner.stop();var D=function(){E.spin(k,mxResources.get("loading"));B+=1},G=function(){--B;0===B&&E.stop()};null==u&&(k.innerText="",u=1);null!=A&&(mxEvent.removeListener(k,"scroll",A),A=null);null!=z&&null!=z.parentNode&&z.parentNode.removeChild(z);z=document.createElement("a");
+z.style.display="block";z.style.cursor="pointer";mxUtils.write(z,mxResources.get("more")+"...");var H=mxUtils.bind(this,function(){0===B&&K(u+1)});mxEvent.addListener(z,"click",H);var N=mxUtils.bind(this,function(I){D();var Q=new mxXmlRequest(this.baseUrl+"/groups?per_page=100",null,"GET");this.executeRequest(Q,mxUtils.bind(this,function(X){I(JSON.parse(X.getText()));G()}),y)}),F=mxUtils.bind(this,function(I,Q){D();var X=new mxXmlRequest(this.baseUrl+"/groups/"+I.id+"/projects?per_page=100",null,
+"GET");this.executeRequest(X,mxUtils.bind(this,function(L){Q(I,JSON.parse(L.getText()));G()}),y)});N(mxUtils.bind(this,function(I){if(null==this.user)mxUtils.write(k,mxResources.get("loggedOut"));else{D();var Q=new mxXmlRequest(this.baseUrl+"/users/"+this.user.id+"/projects?per_page=100&page="+u,null,"GET");this.executeRequest(Q,mxUtils.bind(this,function(X){X=JSON.parse(X.getText());if(null!=X&&0!=X.length||null!=I&&0!=I.length){1==u&&(k.appendChild(q(mxResources.get("enterValue")+"...",mxUtils.bind(this,
+function(){if(0===B){var W=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(t){null!=t&&(t=t.split("/"),1<t.length?(c=t[0],m=t[1],n=v=null,2<t.length?(n=encodeURIComponent(t.slice(2,t.length).join("/")),J()):O(null,!0)):(this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})))}),mxResources.get("enterValue"));this.ui.showDialog(W.container,300,80,!0,!1);W.init()}}))),mxUtils.br(k),mxUtils.br(k));for(var L=!0,U=0;U<X.length;U++)mxUtils.bind(this,
+function(W){var t=l.cloneNode();t.style.backgroundColor=L?Editor.isDarkMode()?"#000000":"#eeeeee":"";L=!L;t.appendChild(q(W.name_with_namespace,mxUtils.bind(this,function(){0===B&&(c=W.owner.username,m=W.path,v="",O(null,!0))})));k.appendChild(t)})(X[U]);for(U=0;U<I.length;U++)D(),F(I[U],mxUtils.bind(this,function(W,t){G();for(var C=0;C<t.length;C++){var M=l.cloneNode();M.style.backgroundColor=L?"dark"==uiTheme?"#000000":"#eeeeee":"";L=!L;mxUtils.bind(this,function(S){M.appendChild(q(S.name_with_namespace,
+mxUtils.bind(this,function(){0===B&&(c=W.full_path,m=S.path,v="",O(null,!0))})));k.appendChild(M)})(t[C])}}));G()}else G(),mxUtils.write(k,mxResources.get("noFiles"));100==X.length&&(k.appendChild(z),A=function(){k.scrollTop>=k.scrollHeight-k.offsetHeight&&H()},mxEvent.addListener(k,"scroll",A))}),y)}}))});b?this.user?K():this.updateUser(function(){K()},y,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){K()},y,!0)}),y)};GitLabClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+
"?doLogout=1&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname));this.clearPersistentToken();this.setUser(null);b=null;this.setToken(null)}})();DrawioComment=function(b,e,f,c,m,n,v){this.file=b;this.id=e;this.content=f;this.modifiedDate=c;this.createdDate=m;this.isResolved=n;this.user=v;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,f,c,m){e()};DrawioComment.prototype.editComment=function(b,e,f){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DriveComment=function(b,e,f,c,m,n,v,d){DrawioComment.call(this,b,e,f,c,m,n,v);this.pCommentId=d};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(b,e,f,c,m){b={content:b.content};c?b.verb="resolve":m&&(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(n){e(n.replyId)}),f)};
DriveComment.prototype.editComment=function(b,e,f){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,f)};
-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,f,c,m,n,v,d,g,k,l,p,q,x){function y(S,U){U=U||document;return U.querySelector(S)}function z(S,U,T){if(null==S["@microsoft.graph.downloadUrl"])if(null==S.parentReference)T();else{c(S.id,S.parentReference.driveId,function(Z){z(Z,U,T)},T);return}var Y=new XMLHttpRequest;Y.open("GET",S["@microsoft.graph.downloadUrl"]);var aa=S.file?"image/png"==S.file.mimeType:!1;Y.onreadystatechange=function(){if(4==this.readyState){if(200<=this.status&&299>=this.status)try{var Z=Y.responseText;
-aa&&(Z="data:image/png;base64,"+Editor.base64Encode(Z),Z=Editor.extractGraphModelFromPng(Z));var da=mxUtils.parseXml(Z),ja="mxlibrary"==da.documentElement.nodeName?da.documentElement:Editor.extractGraphModel(da.documentElement);if(null!=ja){U(ja.ownerDocument);return}}catch(ha){}T()}};aa&&Y.overrideMimeType&&Y.overrideMimeType("text/plain; charset=x-user-defined");Y.send()}function A(){p&&null!=F?I.exportToCanvas(function(S){S=EditorUi.prototype.createImageDataUri(S,null,"png");v(H,S);n(H)},400,null,
-null,function(S){console.log(S)},600,null,null,null,null,null,F):(v(H,void 0),n(H))}function K(S){function U(T){M.style.background="transparent";M.innerText="";var Y=document.createElement("div");Y.className="odPreviewStatus";mxUtils.write(Y,T);M.appendChild(Y);N.stop()}if(null!=M)if(M.style.background="transparent",M.innerText="",null==S||S.folder||/\.drawiolib$/.test(S.name))U(mxResources.get("noPreview"));else try{null!=S.remoteItem&&(S=S.remoteItem),V=S,N.spin(M),z(S,function(T){N.stop();if(V==
-S)if("mxlibrary"==T.documentElement.nodeName)U(mxResources.get("noPreview"));else{var Y=T.getElementsByTagName("diagram");F=AspectDialog.prototype.createViewer(M,0==Y.length?T.documentElement:Y[0],null,"transparent")}},function(){H=null;U(mxResources.get("notADiagramFile"))})}catch(T){H=null,U(mxResources.get("notADiagramFile"))}}function O(){var S=y(".odFilesBreadcrumb");if(null!=S){S.innerText="";for(var U=0;U<J.length-1;U++){var T=document.createElement("span");T.className="odBCFolder";T.innerHTML=
-mxUtils.htmlEntities(J[U].name||mxResources.get("home"));S.appendChild(T);(function(aa,Z){T.addEventListener("click",function(){e(null);J=J.slice(0,Z);u(aa.driveId,aa.folderId,aa.siteId,aa.name)})})(J[U],U);var Y=document.createElement("span");Y.innerHTML=" &gt; ";S.appendChild(Y)}null!=J[J.length-1]&&(U=document.createElement("span"),U.innerHTML=mxUtils.htmlEntities(1==J.length?mxResources.get("officeSelDiag"):J[J.length-1].name||mxResources.get("home")),S.appendChild(U))}}function L(){if(null!=
-H&&!X)if("sharepoint"==R)u("site",null,H.id,H.displayName);else if("site"==R)u("subsite",null,H.id,H.name);else{var S=H.folder;H=H.remoteItem?H.remoteItem:H;var U=(H.parentReference?H.parentReference.driveId:null)||R,T=H.id;S?u(U,T,null,H.name):A()}}function u(S,U,T,Y,aa){function Z(Da){N.stop();var na=document.createElement("table");na.className="odFileListGrid";for(var Ia=null,Ka=0,xa=0;null!=Da&&xa<Da.length;xa++){var Ja=Da[xa];if(1!=ja||!Ja.webUrl||0<Ja.webUrl.indexOf("sharepoint.com/sites/")||
-0>Ja.webUrl.indexOf("sharepoint.com/")){var Fa=Ja.displayName||Ja.name,Oa=mxUtils.htmlEntities(Ja.description||Fa);ja&&(Ja.folder=2==ja?{isRoot:!0}:!0);var va=null!=Ja.folder;if(!g||va){var za=document.createElement("tr");za.className=Ka++%2?"odOddRow":"odEvenRow";var ta=document.createElement("td");ta.style.width="36px";var Ba=document.createElement("img");Ba.src="/images/"+(va?"folder.png":"file.png");Ba.className="odFileImg";ta.appendChild(Ba);za.appendChild(ta);ta=document.createElement("td");
-va=document.createElement("div");va.className="odFileTitle";va.innerHTML=mxUtils.htmlEntities(Fa);va.setAttribute("title",Oa);ta.appendChild(va);za.appendChild(ta);na.appendChild(za);null==Ia&&(Ia=za,Ia.className+=" odRowSelected",H=Ja,R=S,x||e(H));(function(ea,wa){za.addEventListener("dblclick",L);za.addEventListener("click",function(){Ia!=wa&&(Ia.className=Ia.className.replace("odRowSelected",""),Ia=wa,Ia.className+=" odRowSelected",H=ea,R=S,x||e(H))})})(Ja,za)}}}0==Ka?(Da=document.createElement("div"),
-Da.className="odEmptyFolder",Da.innerHTML=mxUtils.htmlEntities(mxResources.get("folderEmpty",null,"Folder is empty!")),ba.appendChild(Da)):ba.appendChild(na);O();X=!1}if(!X){y(".odCatsList").style.display="block";y(".odFilesSec").style.display="block";null!=M&&(M.innerText="",M.style.top="50%");var da=X=!0,ja=0;W=arguments;var ha=setTimeout(function(){X=da=!1;N.stop();d(mxResources.get("timeout"))},2E4),ba=y(".odFilesList");ba.innerText="";N.spin(ba);switch(S){case "recent":J=[{name:mxResources.get("recent",
-null,"Recent"),driveId:S}];var Aa=m()||{};var Ga=[],Ca;for(Ca in Aa)Ga.push(Aa[Ca]);clearTimeout(ha);Z(Ga);return;case "shared":Aa="/me/drive/sharedWithMe";J=[{name:mxResources.get("sharedWithMe",null,"Shared With Me"),driveId:S}];break;case "sharepoint":Aa="/sites?search=";J=[{name:mxResources.get("sharepointSites",null,"Sharepoint Sites"),driveId:S}];ja=1;break;case "site":J.push({name:Y,driveId:S,folderId:U,siteId:T});Aa="/sites/"+T+"/drives";ja=2;break;case "subsite":J.push({name:Y,driveId:S,
-folderId:U,siteId:T});Aa="/drives/"+T+(U?"/items/"+U:"/root")+"/children";break;case "search":S=R;J=[{driveId:S,name:mxResources.get("back",null,"Back")}];aa=encodeURIComponent(aa.replace(/'/g,"\\'"));Aa=S?"/drives/"+S+"/root/search(q='"+aa+"')":"/me/drive/root/search(q='"+aa+"')";break;default:null==U?J=[{driveId:S}]:J.push({name:Y,driveId:S,folderId:U}),Aa=(S?"/drives/"+S:"/me/drive")+(U?"/items/"+U:"/root")+"/children"}ja||(Aa+=(0<Aa.indexOf("?")?"&":"?")+"select=id,name,description,parentReference,file,createdBy,lastModifiedBy,lastModifiedDateTime,size,folder,remoteItem,@microsoft.graph.downloadUrl");
-f(Aa,function(Da){if(da){clearTimeout(ha);Da=Da.value||[];for(var na=x||ja?Da:[],Ia=0;!ja&&!x&&Ia<Da.length;Ia++){var Ka=Da[Ia],xa=Ka.file?Ka.file.mimeType:null;(Ka.folder||"text/html"==xa||"text/xml"==xa||"application/xml"==xa||"image/png"==xa||/\.svg$/.test(Ka.name)||/\.html$/.test(Ka.name)||/\.xml$/.test(Ka.name)||/\.png$/.test(Ka.name)||/\.drawio$/.test(Ka.name)||/\.drawiolib$/.test(Ka.name))&&na.push(Ka)}Z(na)}},function(Da){if(da){clearTimeout(ha);var na=null;try{na=JSON.parse(Da.responseText).error.message}catch(Ia){}d(mxResources.get("errorFetchingFolder",
-null,"Error fetching folder items")+(null!=na?" ("+na+")":""));X=!1;N.stop()}})}}function E(S){Q.className=Q.className.replace("odCatSelected","");Q=S;Q.className+=" odCatSelected"}function B(S){X||(P=null,u("search",null,null,null,S))}var D="";null==e&&(e=K,D='<div style="text-align: center;" class="odPreview"></div>');null==m&&(m=function(){var S=null;try{S=JSON.parse(localStorage.getItem("mxODPickerRecentList"))}catch(U){}return S});null==n&&(n=function(S){if(null!=S){var U=m()||{};delete S["@microsoft.graph.downloadUrl"];
-U[S.id]=S;localStorage.setItem("mxODPickerRecentList",JSON.stringify(U))}});D='<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">'+
+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,f,c,m,n,v,d,g,k,l,p,q,x){function y(R,T){T=T||document;return T.querySelector(R)}function z(R,T,V){if(null==R["@microsoft.graph.downloadUrl"])if(null==R.parentReference)V();else{c(R.id,R.parentReference.driveId,function(Z){z(Z,T,V)},V);return}var Y=new XMLHttpRequest;Y.open("GET",R["@microsoft.graph.downloadUrl"]);var ba=R.file?"image/png"==R.file.mimeType:!1;Y.onreadystatechange=function(){if(4==this.readyState){if(200<=this.status&&299>=this.status)try{var Z=Y.responseText;
+ba&&(Z="data:image/png;base64,"+Editor.base64Encode(Z),Z=Editor.extractGraphModelFromPng(Z));var da=mxUtils.parseXml(Z),ea="mxlibrary"==da.documentElement.nodeName?da.documentElement:Editor.extractGraphModel(da.documentElement);if(null!=ea){T(ea.ownerDocument);return}}catch(ka){}V()}};ba&&Y.overrideMimeType&&Y.overrideMimeType("text/plain; charset=x-user-defined");Y.send()}function A(){p&&null!=F?N.exportToCanvas(function(R){R=EditorUi.prototype.createImageDataUri(R,null,"png");v(I,R);n(I)},400,null,
+null,function(R){console.log(R)},600,null,null,null,null,null,F):(v(I,void 0),n(I))}function J(R){function T(V){M.style.background="transparent";M.innerText="";var Y=document.createElement("div");Y.className="odPreviewStatus";mxUtils.write(Y,V);M.appendChild(Y);H.stop()}if(null!=M)if(M.style.background="transparent",M.innerText="",null==R||R.folder||/\.drawiolib$/.test(R.name))T(mxResources.get("noPreview"));else try{null!=R.remoteItem&&(R=R.remoteItem),W=R,H.spin(M),z(R,function(V){H.stop();if(W==
+R)if("mxlibrary"==V.documentElement.nodeName)T(mxResources.get("noPreview"));else{var Y=V.getElementsByTagName("diagram");F=AspectDialog.prototype.createViewer(M,0==Y.length?V.documentElement:Y[0],null,"transparent")}},function(){I=null;T(mxResources.get("notADiagramFile"))})}catch(V){I=null,T(mxResources.get("notADiagramFile"))}}function O(){var R=y(".odFilesBreadcrumb");if(null!=R){R.innerText="";for(var T=0;T<L.length-1;T++){var V=document.createElement("span");V.className="odBCFolder";V.innerHTML=
+mxUtils.htmlEntities(L[T].name||mxResources.get("home"));R.appendChild(V);(function(ba,Z){V.addEventListener("click",function(){e(null);L=L.slice(0,Z);u(ba.driveId,ba.folderId,ba.siteId,ba.name)})})(L[T],T);var Y=document.createElement("span");Y.innerHTML=" &gt; ";R.appendChild(Y)}null!=L[L.length-1]&&(T=document.createElement("span"),T.innerHTML=mxUtils.htmlEntities(1==L.length?mxResources.get("officeSelDiag"):L[L.length-1].name||mxResources.get("home")),R.appendChild(T))}}function K(){if(null!=
+I&&!X)if("sharepoint"==Q)u("site",null,I.id,I.displayName);else if("site"==Q)u("subsite",null,I.id,I.name);else{var R=I.folder;I=I.remoteItem?I.remoteItem:I;var T=(I.parentReference?I.parentReference.driveId:null)||Q,V=I.id;R?u(T,V,null,I.name):A()}}function u(R,T,V,Y,ba){function Z(Da){H.stop();var pa=document.createElement("table");pa.className="odFileListGrid";for(var Ha=null,Ja=0,ya=0;null!=Da&&ya<Da.length;ya++){var Ia=Da[ya];if(1!=ea||!Ia.webUrl||0<Ia.webUrl.indexOf("sharepoint.com/sites/")||
+0>Ia.webUrl.indexOf("sharepoint.com/")){var Fa=Ia.displayName||Ia.name,Pa=mxUtils.htmlEntities(Ia.description||Fa);ea&&(Ia.folder=2==ea?{isRoot:!0}:!0);var wa=null!=Ia.folder;if(!g||wa){var za=document.createElement("tr");za.className=Ja++%2?"odOddRow":"odEvenRow";var va=document.createElement("td");va.style.width="36px";var Ka=document.createElement("img");Ka.src="/images/"+(wa?"folder.png":"file.png");Ka.className="odFileImg";va.appendChild(Ka);za.appendChild(va);va=document.createElement("td");
+wa=document.createElement("div");wa.className="odFileTitle";wa.innerHTML=mxUtils.htmlEntities(Fa);wa.setAttribute("title",Pa);va.appendChild(wa);za.appendChild(va);pa.appendChild(za);null==Ha&&(Ha=za,Ha.className+=" odRowSelected",I=Ia,Q=R,x||e(I));(function(ia,ja){za.addEventListener("dblclick",K);za.addEventListener("click",function(){Ha!=ja&&(Ha.className=Ha.className.replace("odRowSelected",""),Ha=ja,Ha.className+=" odRowSelected",I=ia,Q=R,x||e(I))})})(Ia,za)}}}0==Ja?(Da=document.createElement("div"),
+Da.className="odEmptyFolder",Da.innerHTML=mxUtils.htmlEntities(mxResources.get("folderEmpty",null,"Folder is empty!")),aa.appendChild(Da)):aa.appendChild(pa);O();X=!1}if(!X){y(".odCatsList").style.display="block";y(".odFilesSec").style.display="block";null!=M&&(M.innerText="",M.style.top="50%");var da=X=!0,ea=0;U=arguments;var ka=setTimeout(function(){X=da=!1;H.stop();d(mxResources.get("timeout"))},2E4),aa=y(".odFilesList");aa.innerText="";H.spin(aa);switch(R){case "recent":L=[{name:mxResources.get("recent",
+null,"Recent"),driveId:R}];var Ba=m()||{};var Ea=[],Ca;for(Ca in Ba)Ea.push(Ba[Ca]);clearTimeout(ka);Z(Ea);return;case "shared":Ba="/me/drive/sharedWithMe";L=[{name:mxResources.get("sharedWithMe",null,"Shared With Me"),driveId:R}];break;case "sharepoint":Ba="/sites?search=";L=[{name:mxResources.get("sharepointSites",null,"Sharepoint Sites"),driveId:R}];ea=1;break;case "site":L.push({name:Y,driveId:R,folderId:T,siteId:V});Ba="/sites/"+V+"/drives";ea=2;break;case "subsite":L.push({name:Y,driveId:R,
+folderId:T,siteId:V});Ba="/drives/"+V+(T?"/items/"+T:"/root")+"/children";break;case "search":R=Q;L=[{driveId:R,name:mxResources.get("back",null,"Back")}];ba=encodeURIComponent(ba.replace(/'/g,"\\'"));Ba=R?"/drives/"+R+"/root/search(q='"+ba+"')":"/me/drive/root/search(q='"+ba+"')";break;default:null==T?L=[{driveId:R}]:L.push({name:Y,driveId:R,folderId:T}),Ba=(R?"/drives/"+R:"/me/drive")+(T?"/items/"+T:"/root")+"/children"}ea||(Ba+=(0<Ba.indexOf("?")?"&":"?")+"select=id,name,description,parentReference,file,createdBy,lastModifiedBy,lastModifiedDateTime,size,folder,remoteItem,@microsoft.graph.downloadUrl");
+f(Ba,function(Da){if(da){clearTimeout(ka);Da=Da.value||[];for(var pa=x||ea?Da:[],Ha=0;!ea&&!x&&Ha<Da.length;Ha++){var Ja=Da[Ha],ya=Ja.file?Ja.file.mimeType:null;(Ja.folder||"text/html"==ya||"text/xml"==ya||"application/xml"==ya||"image/png"==ya||/\.svg$/.test(Ja.name)||/\.html$/.test(Ja.name)||/\.xml$/.test(Ja.name)||/\.png$/.test(Ja.name)||/\.drawio$/.test(Ja.name)||/\.drawiolib$/.test(Ja.name))&&pa.push(Ja)}Z(pa)}},function(Da){if(da){clearTimeout(ka);var pa=null;try{pa=JSON.parse(Da.responseText).error.message}catch(Ha){}d(mxResources.get("errorFetchingFolder",
+null,"Error fetching folder items")+(null!=pa?" ("+pa+")":""));X=!1;H.stop()}})}}function E(R){S.className=S.className.replace("odCatSelected","");S=R;S.className+=" odCatSelected"}function B(R){X||(P=null,u("search",null,null,null,R))}var D="";null==e&&(e=J,D='<div style="text-align: center;" class="odPreview"></div>');null==m&&(m=function(){var R=null;try{R=JSON.parse(localStorage.getItem("mxODPickerRecentList"))}catch(T){}return R});null==n&&(n=function(R){if(null!=R){var T=m()||{};delete R["@microsoft.graph.downloadUrl"];
+T[R.id]=R;localStorage.setItem("mxODPickerRecentList",JSON.stringify(T))}});D='<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>'+
D+(k?'<div id="odBackBtn" class="odLinkBtn">&lt; '+mxUtils.htmlEntities(mxResources.get("back"))+"</div>":"")+(l?'<button id="odSubmitBtn" class="odSubmitBtn">'+mxUtils.htmlEntities(mxResources.get(g?"save":"open"))+"</button>":"");var G=null!=window.Editor&&null!=Editor.isDarkMode&&Editor.isDarkMode();G=".odCatsList *, .odFilesSec * { user-select: none; }.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 {"+
(G?"":"\tbackground-color: #eeeeee;")+"}.odEvenRow {"+(G?"":"\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;}";
-var N=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}),I=new Editor,F=null,H=null,R=null,X=!1,J=[],W=null,V=null;this.getSelectedItem=function(){null!=H&&n(H);return H};if(null==y("#mxODPickerCss")){var t=document.head||document.getElementsByTagName("head")[0],C=document.createElement("style");t.appendChild(C);C.type="text/css";C.id="mxODPickerCss";C.appendChild(document.createTextNode(G))}b.innerHTML=
-D;var M=y(".odPreview"),Q=y("#odFiles");b=function(S,U){U=U||document;return U.querySelectorAll(S)}(".odCatListTitle");for(D=0;D<b.length;D++)b[D].addEventListener("click",function(){H=V=null;if(!X)switch(E(this),this.id){case "odFiles":u();break;case "odRecent":u("recent");break;case "odShared":u("shared");break;case "odSharepoint":u("sharepoint")}});var P=null;y("#odSearchBox").addEventListener("keyup",function(S){var U=this;null!=P&&clearTimeout(P);13==S.keyCode?B(U.value):P=setTimeout(function(){B(U.value)},
-500)});y("#refreshOD").addEventListener("click",function(){null!=W&&(e(null),u.apply(this,W))});k&&y("#odBackBtn").addEventListener("click",k);l&&y("#odSubmitBtn").addEventListener("click",A);null!=q?(k=q.pop(),"sharepoint"==q[0].driveId&&E(y("#odSharepoint")),J=q,u(k.driveId,k.folderId,k.siteId,k.name)):u()};App=function(b,e,f){EditorUi.call(this,b,e,null!=f?f:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var c=this.getCurrentFile();if(null!=c&&c.isModified()){var m={category:"DISCARD-FILE-"+c.getHash(),action:(c.savingFile?"saving":"")+(c.savingFile&&null!=c.savingFileTime?"_"+Math.round((Date.now()-c.savingFileTime.getTime())/1E3):"")+(null!=c.saveLevel?"-sl_"+c.saveLevel:"")+"-age_"+(null!=
+var H=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}),N=new Editor,F=null,I=null,Q=null,X=!1,L=[],U=null,W=null;this.getSelectedItem=function(){null!=I&&n(I);return I};if(null==y("#mxODPickerCss")){var t=document.head||document.getElementsByTagName("head")[0],C=document.createElement("style");t.appendChild(C);C.type="text/css";C.id="mxODPickerCss";C.appendChild(document.createTextNode(G))}b.innerHTML=
+D;var M=y(".odPreview"),S=y("#odFiles");b=function(R,T){T=T||document;return T.querySelectorAll(R)}(".odCatListTitle");for(D=0;D<b.length;D++)b[D].addEventListener("click",function(){I=W=null;if(!X)switch(E(this),this.id){case "odFiles":u();break;case "odRecent":u("recent");break;case "odShared":u("shared");break;case "odSharepoint":u("sharepoint")}});var P=null;y("#odSearchBox").addEventListener("keyup",function(R){var T=this;null!=P&&clearTimeout(P);13==R.keyCode?B(T.value):P=setTimeout(function(){B(T.value)},
+500)});y("#refreshOD").addEventListener("click",function(){null!=U&&(e(null),u.apply(this,U))});k&&y("#odBackBtn").addEventListener("click",k);l&&y("#odSubmitBtn").addEventListener("click",A);null!=q?(k=q.pop(),"sharepoint"==q[0].driveId&&E(y("#odSharepoint")),L=q,u(k.driveId,k.folderId,k.siteId,k.name)):u()};App=function(b,e,f){EditorUi.call(this,b,e,null!=f?f:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var c=this.getCurrentFile();if(null!=c&&c.isModified()){var m={category:"DISCARD-FILE-"+c.getHash(),action:(c.savingFile?"saving":"")+(c.savingFile&&null!=c.savingFileTime?"_"+Math.round((Date.now()-c.savingFileTime.getTime())/1E3):"")+(null!=c.saveLevel?"-sl_"+c.saveLevel:"")+"-age_"+(null!=
c.ageStart?Math.round((Date.now()-c.ageStart.getTime())/1E3):"x")+(this.editor.autosave?"":"-nosave")+(c.isAutosave()?"":"-noauto")+"-open_"+(null!=c.opened?Math.round((Date.now()-c.opened.getTime())/1E3):"x")+"-save_"+(null!=c.lastSaved?Math.round((Date.now()-c.lastSaved.getTime())/1E3):"x")+"-change_"+(null!=c.lastChanged?Math.round((Date.now()-c.lastChanged.getTime())/1E3):"x")+"-alive_"+Math.round((Date.now()-App.startTime.getTime())/1E3),label:null!=c.sync?"client_"+c.sync.clientId:"nosync"};
c.constructor==DriveFile&&null!=c.desc&&null!=this.drive&&(m.label+=(null!=this.drive.user?"-user_"+this.drive.user.id:"-nouser")+"-rev_"+c.desc.headRevisionId+"-mod_"+c.desc.modifiedDate+"-size_"+c.getSize()+"-mime_"+c.desc.mimeType);EditorUi.logEvent(m)}}));this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(){var c=this.getCurrentFile();null!=c&&EditorUi.logEvent({category:(this.editor.autosave?"ON":"OFF")+"-AUTOSAVE-FILE-"+c.getHash(),action:"changed",label:"autosave_"+(this.editor.autosave?
"on":"off")})}));mxClient.IS_SVG?mxGraph.prototype.warningImage.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE7SURBVHjaYvz//z8DJQAggBjwGXDuHMP/tWuD/uPTCxBAOA0AaQRK/f/+XeJ/cbHlf1wGAAQQTgPu3QNLgfHSpZo4DQAIIKwGwGyH4e/fFbG6AiQJEEAs2Ew2NFzH8OOHBMO6dT/A/KCg7wxGRh+wuhQggDBcALMdFIAcHBxgDGJjcwVIIUAAYbhAUXEdVos4OO4DXcGBIQ4QQCguQPY7sgtgAYruCpAgQACx4LJdU1OCwctLEcyWlLwPJF+AXQE0EMUBAAEEdwF6yMOiD4RRY0QT7gqQAEAAseDzu6XldYYPH9DD4joQa8L5AAEENgWb7SBcXa0JDQMBrK4AcQACiAlfyOMCEFdAnAYQQEz4FLa0XGf4/v0H0IIPONUABBAjyBmMjIwMS5cK/L927QORbtBkaG29DtYLEGAAH6f7oq3Zc+kAAAAASUVORK5CYII=":
@@ -12587,12 +12582,12 @@ App.getStoredMode=function(){var b=null;null==b&&isLocalStorage&&(b=localStorage
2)?mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,null,"dropboxjs",App.DROPBOX_APPKEY,!0)}):"0"==urlParams.chrome&&(window.DropboxClient=null):window.DropboxClient=null),"function"===typeof window.OneDriveClient&&("0"!=urlParams.od&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?App.mode==App.MODE_ONEDRIVE||null!=window.location.hash&&"#W"==window.location.hash.substring(0,2)?mxscript(App.ONEDRIVE_URL):"0"==urlParams.chrome&&(window.OneDriveClient=
null):window.OneDriveClient=null),"function"===typeof window.TrelloClient&&("1"==urlParams.tr&&isSvgBrowser&&!mxClient.IS_IE11&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_TRELLO||null!=window.location.hash&&"#T"==window.location.hash.substring(0,2)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL)}):"0"==urlParams.chrome&&(window.TrelloClient=null):window.TrelloClient=null)))})();
App.clearServiceWorker=function(b,e){navigator.serviceWorker.getRegistrations().then(function(f){if(null!=f&&0<f.length){for(var c=0;c<f.length;c++)f[c].unregister();null!=b&&b()}})["catch"](function(){null!=e&&e()})};
-App.main=function(b,e){function f(l){mxUtils.getAll("1"!=urlParams.dev?[l]:[l,STYLE_PATH+"/default.xml"],function(p){function q(){var L=null!=e?e():new App(new Editor("0"==urlParams.chrome||"min"==uiTheme,null,null,null,"0"!=urlParams.chrome));if(null!=window.mxscript){if("function"===typeof window.DropboxClient&&null==window.Dropbox&&null!=window.DrawDropboxClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&isSvgBrowser&&(null==document.documentMode||
+App.main=function(b,e){function f(l){mxUtils.getAll("1"!=urlParams.dev?[l]:[l,STYLE_PATH+"/default.xml"],function(p){function q(){var K=null!=e?e():new App(new Editor("0"==urlParams.chrome||"min"==uiTheme,null,null,null,"0"!=urlParams.chrome));if(null!=window.mxscript){if("function"===typeof window.DropboxClient&&null==window.Dropbox&&null!=window.DrawDropboxClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&isSvgBrowser&&(null==document.documentMode||
9<document.documentMode))mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,function(){DrawDropboxClientCallback()},"dropboxjs",App.DROPBOX_APPKEY)});else if("undefined"===typeof window.Dropbox||"undefined"===typeof window.Dropbox.choose)window.DropboxClient=null;"function"===typeof window.OneDriveClient&&"undefined"===typeof OneDrive&&null!=window.DrawOneDriveClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&(null==navigator.userAgent||
0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.ONEDRIVE_URL,window.DrawOneDriveClientCallback):"undefined"===typeof window.OneDrive&&(window.OneDriveClient=null);"function"===typeof window.TrelloClient&&!mxClient.IS_IE11&&"undefined"===typeof window.Trello&&null!=window.DrawTrelloClientCallback&&"1"==urlParams.tr&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL,
-function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null)}null!=b&&b(L);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("App.start",[L,(new Date).getTime()-t0.getTime()+"ms"]),null!=urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))}mxResources.parse(p[0].getText());if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var x=function(L){if(null!=L)for(var u=0;u<L.length;u++)if(!y[L[u]])throw Error(mxResources.get("invalidInput")+
-' "'+L[u])+'"';return!0},y={},z;for(z in App.pluginRegistry)y[App.pluginRegistry[z]]=!0;var A=JSON.parse(Graph.decompress(window.location.hash.substring(9)));if(null!=A&&x(A.plugins)){EditorUi.debug("Setting configuration",JSON.stringify(A));if(null!=A.merge){var K=localStorage.getItem(Editor.configurationKey);if(null!=K)try{var O=JSON.parse(K);for(z in A.merge)O[z]=A.merge[z];A=O}catch(L){window.location.hash="",alert(L)}else A=A.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&
-(localStorage.setItem(Editor.configurationKey,JSON.stringify(A)),window.location.hash="",window.location.reload())}window.location.hash=""}catch(L){window.location.hash="",alert(L)}1<p.length&&(Graph.prototype.defaultThemes["default-style2"]=p[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=p[1].getDocumentElement());"1"==urlParams.dev||EditorUi.isElectronApp?q():(mxStencilRegistry.allowEval=!1,App.loadScripts(["js/shapes-14-6-5.min.js","js/stencils.min.js","js/extensions.min.js"],
+function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null)}null!=b&&b(K);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("App.start",[K,(new Date).getTime()-t0.getTime()+"ms"]),null!=urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))}mxResources.parse(p[0].getText());if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var x=function(K){if(null!=K)for(var u=0;u<K.length;u++)if(!y[K[u]])throw Error(mxResources.get("invalidInput")+
+' "'+K[u])+'"';return!0},y={},z;for(z in App.pluginRegistry)y[App.pluginRegistry[z]]=!0;var A=JSON.parse(Graph.decompress(window.location.hash.substring(9)));if(null!=A&&x(A.plugins)){EditorUi.debug("Setting configuration",JSON.stringify(A));if(null!=A.merge){var J=localStorage.getItem(Editor.configurationKey);if(null!=J)try{var O=JSON.parse(J);for(z in A.merge)O[z]=A.merge[z];A=O}catch(K){window.location.hash="",alert(K)}else A=A.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&
+(localStorage.setItem(Editor.configurationKey,JSON.stringify(A)),window.location.hash="",window.location.reload())}window.location.hash=""}catch(K){window.location.hash="",alert(K)}1<p.length&&(Graph.prototype.defaultThemes["default-style2"]=p[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=p[1].getDocumentElement());"1"==urlParams.dev||EditorUi.isElectronApp?q():(mxStencilRegistry.allowEval=!1,App.loadScripts(["js/shapes-14-6-5.min.js","js/stencils.min.js","js/extensions.min.js"],
q))},function(p){p=document.getElementById("geStatus");null!=p&&(p.innerHTML="Error loading page. <a>Please try refreshing.</a>",p.getElementsByTagName("a")[0].onclick=function(){mxLanguage="en";f(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))})})}function c(){try{if(null!=mxSettings.settings){document.body.style.backgroundColor="dark"==uiTheme||mxSettings.settings.darkMode?Editor.darkColor:"#ffffff";if(null!=mxSettings.settings.autosaveDelay){var l=
parseInt(mxSettings.settings.autosaveDelay);!isNaN(l)&&0<l?(DrawioFile.prototype.autosaveDelay=l,EditorUi.debug("Setting autosaveDelay",l)):EditorUi.debug("Invalid autosaveDelay",l)}null!=mxSettings.settings.defaultEdgeLength&&(l=parseInt(mxSettings.settings.defaultEdgeLength),!isNaN(l)&&0<l?(Graph.prototype.defaultEdgeLength=l,EditorUi.debug("Using defaultEdgeLength",l)):EditorUi.debug("Invalid defaultEdgeLength",l))}}catch(q){null!=window.console&&console.error(q)}if(null!=Menus.prototype.defaultFonts)for(l=
0;l<Menus.prototype.defaultFonts.length;l++){var p=Menus.prototype.defaultFonts[l];"string"!==typeof p&&null!=p.fontFamily&&null!=p.fontUrl&&Graph.addFont(p.fontFamily,p.fontUrl)}mxResources.loadDefaultBundle=!1;f(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))}window.onerror=function(l,p,q,x,y){EditorUi.logError("Global: "+(null!=l?l:""),p,q,x,y,null,!0)};if(window.top==window.self&&(/ac\.draw\.io$/.test(window.location.hostname)||/ac-ent\.draw\.io$/.test(window.location.hostname)||
@@ -12653,9 +12648,9 @@ 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 f=!1;try{var c=!0,m=window.setTimeout(mxUtils.bind(this,function(){c=!1;e(null)}),this.timeout),n=mxUtils.bind(this,function(G){window.clearTimeout(m);c&&e(G)});null==this.thumbImageCache&&(this.thumbImageCache={});var v=this.editor.graph,d=v.backgroundImage,g=null!=v.themes&&"darkTheme"==v.defaultThemeName;if(null!=this.pages&&(g||this.currentPage!=this.pages[0])){var k=v.getGlobalVariable;v=this.createTemporaryGraph(v.getStylesheet());v.setBackgroundImage=
this.editor.graph.setBackgroundImage;var l=this.pages[0];this.currentPage==l?v.setBackgroundImage(d):null!=l.viewState&&null!=l.viewState&&(d=l.viewState.backgroundImage,v.setBackgroundImage(d));v.getGlobalVariable=function(G){return"page"==G?l.getName():"pagenumber"==G?1:k.apply(this,arguments)};v.getGlobalVariable=k;document.body.appendChild(v.container);v.model.setRoot(l.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(G){try{v!=this.editor.graph&&
-null!=v.container.parentNode&&v.container.parentNode.removeChild(v.container)}catch(N){G=null}n(G)}),b,this.thumbImageCache,"#ffffff",function(){n()},null,null,null,null,null,null,v,null,null,null,null,"diagram",null),f=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var p=document.createElement("canvas"),q=v.getGraphBounds(),x=v.view.translate,y=v.view.scale;null!=d&&(q=mxRectangle.fromRectangle(q),q.add(new mxRectangle((x.x+d.x)*y,(x.y+d.y)*y,d.width*y,d.height*y)));var z=b/q.width;
-z=Math.min(1,Math.min(3*b/(4*q.height),z));var A=Math.floor(q.x),K=Math.floor(q.y);p.setAttribute("width",Math.ceil(z*(q.width+4)));p.setAttribute("height",Math.ceil(z*(q.height+4)));var O=p.getContext("2d");O.scale(z,z);O.translate(-A,-K);var L=v.background;if(null==L||""==L||L==mxConstants.NONE)L="#ffffff";O.save();O.fillStyle=L;O.fillRect(A,K,Math.ceil(q.width+4),Math.ceil(q.height+4));O.restore();if(null!=d){var u=new Image;u.src=d.src;O.drawImage(u,d.x*z,d.y*z,d.width*z,d.height*z)}var E=new mxJsCanvas(p),
-B=new mxAsyncCanvas(this.thumbImageCache);E.images=this.thumbImageCache.images;var D=new mxImageExport;D.drawShape=function(G,N){G.shape instanceof mxShape&&G.shape.checkBounds()&&(N.save(),N.translate(.5,.5),G.shape.paint(N),N.translate(-.5,-.5),N.restore())};D.drawText=function(G,N){};D.drawState(v.getView().getState(v.model.root),B);B.finish(mxUtils.bind(this,function(){try{D.drawState(v.getView().getState(v.model.root),E),v!=this.editor.graph&&null!=v.container.parentNode&&v.container.parentNode.removeChild(v.container)}catch(G){p=
+null!=v.container.parentNode&&v.container.parentNode.removeChild(v.container)}catch(H){G=null}n(G)}),b,this.thumbImageCache,"#ffffff",function(){n()},null,null,null,null,null,null,v,null,null,null,null,"diagram",null),f=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var p=document.createElement("canvas"),q=v.getGraphBounds(),x=v.view.translate,y=v.view.scale;null!=d&&(q=mxRectangle.fromRectangle(q),q.add(new mxRectangle((x.x+d.x)*y,(x.y+d.y)*y,d.width*y,d.height*y)));var z=b/q.width;
+z=Math.min(1,Math.min(3*b/(4*q.height),z));var A=Math.floor(q.x),J=Math.floor(q.y);p.setAttribute("width",Math.ceil(z*(q.width+4)));p.setAttribute("height",Math.ceil(z*(q.height+4)));var O=p.getContext("2d");O.scale(z,z);O.translate(-A,-J);var K=v.background;if(null==K||""==K||K==mxConstants.NONE)K="#ffffff";O.save();O.fillStyle=K;O.fillRect(A,J,Math.ceil(q.width+4),Math.ceil(q.height+4));O.restore();if(null!=d){var u=new Image;u.src=d.src;O.drawImage(u,d.x*z,d.y*z,d.width*z,d.height*z)}var E=new mxJsCanvas(p),
+B=new mxAsyncCanvas(this.thumbImageCache);E.images=this.thumbImageCache.images;var D=new mxImageExport;D.drawShape=function(G,H){G.shape instanceof mxShape&&G.shape.checkBounds()&&(H.save(),H.translate(.5,.5),G.shape.paint(H),H.translate(-.5,-.5),H.restore())};D.drawText=function(G,H){};D.drawState(v.getView().getState(v.model.root),B);B.finish(mxUtils.bind(this,function(){try{D.drawState(v.getView().getState(v.model.root),E),v!=this.editor.graph&&null!=v.container.parentNode&&v.container.parentNode.removeChild(v.container)}catch(G){p=
null}n(p)}));f=!0}}catch(G){f=!1,null!=v&&v!=this.editor.graph&&null!=v.container.parentNode&&v.container.parentNode.removeChild(v.container)}f||window.clearTimeout(m);return f};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,f){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(f)try{if(isLocalStorage)localStorage.setItem(".mode",e);else if("undefined"!=typeof Storage){var m=new Date;m.setYear(m.getFullYear()+1);document.cookie="MODE="+e+"; expires="+m.toUTCString()}}catch(n){}}})();
@@ -12681,7 +12676,7 @@ this.dialog)if("1"==urlParams.demo)d=Editor.useLocalStorage,this.createFile(this
function(){var g=decodeURIComponent(urlParams.viewbox||"");if(""!=g)try{var k=JSON.parse(g);this.editor.graph.fitWindow(k,k.border)}catch(l){console.error(l)}})):"0"!=urlParams.splash||null!=urlParams.mode?this.loadFile():EditorUi.isElectronApp||this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0):this.checkDrafts())}}),f=decodeURIComponent(urlParams.create||"");if((null==window.location.hash||1>=window.location.hash.length)&&null!=f&&0<f.length&&this.spinner.spin(document.body,
mxResources.get("loading"))){var c=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create","title"]))}),m=mxUtils.bind(this,function(n){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,n,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var v=urlParams.title;v=null!=v?decodeURIComponent(v):this.defaultFilename;n=this.getServiceCount(!0);isLocalStorage&&n++;var d=4>=
n?2:6<n?4:3;v=new CreateDialog(this,v,mxUtils.bind(this,function(g,k){if(null==k){this.hideDialog();var l=Editor.useLocalStorage;this.createFile(0<g.length?g:this.defaultFilename,this.getFileData(),null,null,null,!0,null,!0);Editor.useLocalStorage=l}else this.pickFolder(k,mxUtils.bind(this,function(p){this.createFile(g,this.getFileData(!0),null,k,null,!0,p)}))}),null,null,null,null,"1"==urlParams.browser,null,null,!0,d,null,null,null,this.editor.fileExtensions);this.showDialog(v.container,420,n>d?
-390:280,!0,!1,mxUtils.bind(this,function(g){g&&null==this.getCurrentFile()&&this.showSplash()}));v.init()}});f=decodeURIComponent(f);if("http://"!=f.substring(0,7)&&"https://"!=f.substring(0,8))try{null!=window.opener&&null!=window.opener[f]?m(window.opener[f]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(n){this.handleError(n,mxResources.get("errorLoadingFile"))}else this.loadTemplate(f,function(n){m(n)},mxUtils.bind(this,function(){this.handleError(null,mxResources.get("errorLoadingFile"),
+390:280,!0,!1,mxUtils.bind(this,function(g){g&&null==this.getCurrentFile()&&this.showSplash()}));v.init()}});f=decodeURIComponent(f);if("http://"!=f.substring(0,7)&&"https://"!=f.substring(0,8))try{null!=window.opener&&null!=window.opener[f]?m(window.opener[f]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(n){this.handleError(n,mxResources.get("errorLoadingFile"))}else this.loadTemplate(f,function(n){m(n)},mxUtils.bind(this,function(n){this.handleError(n,mxResources.get("errorLoadingFile"),
c)}))}else(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.state&&null!=this.stateArg&&"open"==this.stateArg.action?null!=this.stateArg.ids&&(window.history&&window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state"])),window.location.hash="G"+this.stateArg.ids[0]):(null==window.location.hash||1>=window.location.hash.length)&&null!=this.drive&&null!=this.stateArg&&"create"==this.stateArg.action?(window.history&&
window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state"])),this.setMode(App.MODE_GOOGLE),"0"==urlParams.splash?this.createFile(null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename):this.actions.get("new").funct()):(null!=urlParams.open&&window.history&&window.history.replaceState&&(window.history.replaceState(null,null,window.location.pathname+this.getSearch(["open","sketch"])),window.location.hash=urlParams.open),
e())}}catch(n){this.handleError(n)}};App.prototype.loadDraft=function(b,e){this.createFile(this.defaultFilename,b,null,null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){var f=this.getCurrentFile();null!=f&&(f.fileChanged(),null!=e&&e())}),0)}),null,null,!0)};
@@ -12729,14 +12724,14 @@ this.drive.insertFile(b,e,v,mxUtils.bind(this,function(p){k();this.fileCreated(p
function(p,q){var x=new LocalFile(this,e,q.name,null,p,q);x.saveFile(q.name,!1,mxUtils.bind(this,function(){this.fileCreated(x,f,n,m,g)}),l,!0)}),mxUtils.bind(this,function(p){"AbortError"!=p.name&&l(p)}),this.createFileSystemOptions(b))):(k(),this.fileCreated(new LocalFile(this,e,b,null==c),f,n,m,g))}catch(p){k(),this.handleError(p)}}};
App.prototype.fileCreated=function(b,e,f,c,m){var n=window.location.pathname;null!=e&&0<e.length&&(n+="?libs="+e);null!=m&&0<m.length&&(n+="?clibs="+m);n=this.getUrl(n);b.getMode()!=App.MODE_DEVICE&&(n+="#"+b.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var v=b.getData();v=0<v.length?this.editor.extractGraphModel(mxUtils.parseXml(v).documentElement,!0):null;var d=window.location.protocol+"//"+window.location.hostname+n,g=v,k=null;null!=v&&/\.svg$/i.test(b.getTitle())&&
(k=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(k.container),g=this.decodeNodeIntoGraph(g,k));b.setData(this.createFileData(v,k,b,d));null!=k&&k.container.parentNode.removeChild(k.container);var l=mxUtils.bind(this,function(){this.spinner.stop()}),p=mxUtils.bind(this,function(){l();var q=this.getCurrentFile();null==f&&null!=q&&(f=!q.isModified()&&null==q.getMode());var x=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b);f&&b.addAllSavedStatus();
-null!=e&&this.sidebar.showEntries(e);if(null!=m){for(var z=[],A=m.split(";"),K=0;K<A.length;K++)z.push(decodeURIComponent(A[K]));this.loadLibraries(z)}}),y=mxUtils.bind(this,function(){f||null==q||!q.isModified()?x():this.confirm(mxResources.get("allChangesLost"),null,x,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=c&&c();null==f||f?y():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),b.getTitle(),
+null!=e&&this.sidebar.showEntries(e);if(null!=m){for(var z=[],A=m.split(";"),J=0;J<A.length;J++)z.push(decodeURIComponent(A[J]));this.loadLibraries(z)}}),y=mxUtils.bind(this,function(){f||null==q||!q.isModified()?x():this.confirm(mxResources.get("allChangesLost"),null,x,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=c&&c();null==f||f?y():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),b.getTitle(),
null==b.getMode())),null!=c&&c(),window.openWindow(n,null,y))});b.constructor==LocalFile?p():b.saveFile(b.getTitle(),!1,mxUtils.bind(this,function(){p()}),mxUtils.bind(this,function(q){l();null!=q&&"AbortError"==q.name||this.handleError(q)}))}};
App.prototype.loadFile=function(b,e,f,c,m){if("1"==urlParams.openInSameWin||navigator.standalone)e=!0;this.hideDialog();var n=mxUtils.bind(this,function(){if(null==b||0==b.length)this.editor.setStatus(""),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==b.charAt(0))if(this.spinner.stop(),isLocalStorage){var g=mxUtils.bind(this,function(x){this.handleError(x,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var y=this.getCurrentFile();
window.location.hash=null!=y?y.getHash():""}))});b=decodeURIComponent(b.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(x){null!=x?(this.fileLoaded(new StorageFile(this,x,b)),null!=c&&c()):g({message:mxResources.get("fileNotFound")})}),g)}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var x=this.getCurrentFile();window.location.hash=null!=x?x.getHash():""}));else if(null!=f)this.spinner.stop(),
this.fileLoaded(f),null!=c&&c();else if("S"==b.charAt(0))this.spinner.stop(),this.alert("[Deprecation] #S is no longer supported, go to https://app.diagrams.net/?desc="+b.substring(1).substring(0,10),mxUtils.bind(this,function(){window.location.href="https://app.diagrams.net/?desc="+b.substring(1)}));else if("R"==b.charAt(0)){this.spinner.stop();var k=decodeURIComponent(b.substring(1));"<"!=k.charAt(0)&&(k=Graph.decompress(k));k=new LocalFile(this,k,null!=urlParams.title?decodeURIComponent(urlParams.title):
this.defaultFilename,!0);k.getHash=function(){return b};this.fileLoaded(k);null!=c&&c()}else if("E"==b.charAt(0))null==this.getCurrentFile()?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile")):this.remoteInvoke("getDraftFileContent",null,null,mxUtils.bind(this,function(x,y){this.spinner.stop();this.fileLoaded(new EmbedFile(this,x,y));null!=c&&c()}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},
mxResources.get("errorLoadingFile"))}));else if("U"==b.charAt(0)){var l=decodeURIComponent(b.substring(1)),p=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=l.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var x=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var y=l.substring(31,l.lastIndexOf("&ex"));this.loadFile("G"+y,e,null,mxUtils.bind(this,function(){var z=this.getCurrentFile();null!=z&&this.editor.chromeless&&
-!this.editor.editable&&(z.getHash=function(){return"G"+y},window.location.hash="#"+z.getHash());null!=c&&c()}));return!0}return!1});!x()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",x);return!0});this.loadTemplate(l,mxUtils.bind(this,function(x){this.spinner.stop();if(null!=x&&0<x.length){var y=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var z=l,A=l.lastIndexOf("."),K=z.lastIndexOf("/");A>K&&0<K&&(z=z.substring(K+1,A),A=l.substring(A),
+!this.editor.editable&&(z.getHash=function(){return"G"+y},window.location.hash="#"+z.getHash());null!=c&&c()}));return!0}return!1});!x()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",x);return!0});this.loadTemplate(l,mxUtils.bind(this,function(x){this.spinner.stop();if(null!=x&&0<x.length){var y=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var z=l,A=l.lastIndexOf("."),J=z.lastIndexOf("/");A>J&&0<J&&(z=z.substring(J+1,A),A=l.substring(A),
this.useCanvasForExport||".png"!=A||(A=".drawio"),".svg"===A||".xml"===A||".html"===A||".png"===A||".drawio"===A)&&(y=z+A)}x=new LocalFile(this,x,null!=urlParams.title?decodeURIComponent(urlParams.title):y,!0);x.getHash=function(){return b};this.fileLoaded(x,!0)?null!=c&&c():p()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else p()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,
function(){p()||(this.spinner.stop(),this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile")))}),null!=urlParams["template-filename"]?decodeURIComponent(urlParams["template-filename"]):null)}else if(k=null,"G"==b.charAt(0)?k=this.drive:"D"==b.charAt(0)?k=this.dropbox:"W"==b.charAt(0)?k=this.oneDrive:"H"==b.charAt(0)?k=this.gitHub:"A"==b.charAt(0)?k=this.gitLab:"T"==b.charAt(0)&&(k=this.trello),null==k)this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},
mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var x=this.getCurrentFile();window.location.hash=null!=x?x.getHash():""}));else{var q=b.charAt(0);b=decodeURIComponent(b.substring(1));k.getFile(b,mxUtils.bind(this,function(x){this.spinner.stop();this.fileLoaded(x);var y=this.getCurrentFile();null==y?(window.location.hash="",this.showSplash()):this.editor.chromeless&&!this.editor.editable?(y.getHash=function(){return q+b},window.location.hash="#"+y.getHash()):x==y&&null==x.getMode()&&
@@ -12745,10 +12740,10 @@ v=this.getCurrentFile(),d=mxUtils.bind(this,function(){m||null==v||!v.isModified
App.prototype.getLibraryStorageHint=function(b){var e=b.getTitle();b.constructor!=LocalLibrary&&(e+="\n"+b.getHash());b.constructor==DriveLibrary?e+=" ("+mxResources.get("googleDrive")+")":b.constructor==GitHubLibrary?e+=" ("+mxResources.get("github")+")":b.constructor==TrelloLibrary?e+=" ("+mxResources.get("trello")+")":b.constructor==DropboxLibrary?e+=" ("+mxResources.get("dropbox")+")":b.constructor==OneDriveLibrary?e+=" ("+mxResources.get("oneDrive")+")":b.constructor==StorageLibrary?e+=" ("+
mxResources.get("browser")+")":b.constructor==LocalLibrary&&(e+=" ("+mxResources.get("device")+")");return e};App.prototype.restoreLibraries=function(){function b(f){for(var c=0;c<f.length;c++)""!=f[c]&&0>mxUtils.indexOf(e,f[c])&&e.push(f[c])}var e=[];b(mxSettings.getCustomLibraries());b((urlParams.clibs||"").split(";"));this.loadLibraries(e)};
App.prototype.loadLibraries=function(b,e){if(null!=this.sidebar){null==this.loadedLibraries&&(this.loadedLibraries={});var f=mxUtils.bind(this,function(k,l){l||mxSettings.removeCustomLibrary(k);delete this.loadedLibraries[k]}),c=0,m=[],n=0<b.length&&"L.scratchpad"==b[0]?1:0,v=mxUtils.bind(this,function(){if(0==c){if(null!=b)for(var k=b.length-1;0<=k;k--)null!=m[k]&&this.loadLibrary(m[k],k<=n);null!=e&&e()}});if(null!=b)for(var d=0;d<b.length;d++){var g=encodeURIComponent(decodeURIComponent(b[d]));
-mxUtils.bind(this,function(k,l){if(null!=k&&0<k.length&&null==this.loadedLibraries[k]&&null==this.sidebar.palettes[k]){this.loadedLibraries[k]=!0;c++;var p=mxUtils.bind(this,function(K){m[l]=K;c--;v()}),q=mxUtils.bind(this,function(K){f(k,K);c--;v()}),x=k.substring(0,1);if("L"==x)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var K=decodeURIComponent(k.substring(1));StorageFile.getFileContent(this,K,mxUtils.bind(this,function(O){".scratchpad"==K&&null==
-O&&(O=this.emptyLibraryXml);null!=O?p(new StorageLibrary(this,O,K)):q()}),q)}catch(O){q()}}),0);else if("U"==x){var y=decodeURIComponent(k.substring(1));this.isOffline()||this.loadTemplate(y,mxUtils.bind(this,function(K){null!=K&&0<K.length?p(new UrlLibrary(this,K,y)):q()}),function(){q()},null,!0)}else if("R"==x){x=decodeURIComponent(k.substring(1));try{x=JSON.parse(x);var z={id:x[0],title:x[1],downloadUrl:x[2]};this.remoteInvoke("getFileContent",[z.downloadUrl],null,mxUtils.bind(this,function(K){try{p(new RemoteLibrary(this,
-K,z))}catch(O){q()}}),function(){q()})}catch(K){q()}}else if("S"==x&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(k.substring(1)),function(K){p(K)},q)}catch(K){q()}else{var A=null;"G"==x?null!=this.drive&&null!=this.drive.user&&(A=this.drive):"H"==x?null!=this.gitHub&&null!=this.gitHub.getUser()&&(A=this.gitHub):"T"==x?null!=this.trello&&this.trello.isAuthorized()&&(A=this.trello):"D"==x?null!=this.dropbox&&null!=this.dropbox.getUser()&&(A=this.dropbox):"W"==x&&null!=this.oneDrive&&
-null!=this.oneDrive.getUser()&&(A=this.oneDrive);null!=A?A.getLibrary(decodeURIComponent(k.substring(1)),mxUtils.bind(this,function(K){try{p(K)}catch(O){q()}}),function(K){q()}):q(!0)}}})(g,d)}v()}};
+mxUtils.bind(this,function(k,l){if(null!=k&&0<k.length&&null==this.loadedLibraries[k]&&null==this.sidebar.palettes[k]){this.loadedLibraries[k]=!0;c++;var p=mxUtils.bind(this,function(J){m[l]=J;c--;v()}),q=mxUtils.bind(this,function(J){f(k,J);c--;v()}),x=k.substring(0,1);if("L"==x)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var J=decodeURIComponent(k.substring(1));StorageFile.getFileContent(this,J,mxUtils.bind(this,function(O){".scratchpad"==J&&null==
+O&&(O=this.emptyLibraryXml);null!=O?p(new StorageLibrary(this,O,J)):q()}),q)}catch(O){q()}}),0);else if("U"==x){var y=decodeURIComponent(k.substring(1));this.isOffline()||this.loadTemplate(y,mxUtils.bind(this,function(J){null!=J&&0<J.length?p(new UrlLibrary(this,J,y)):q()}),function(){q()},null,!0)}else if("R"==x){x=decodeURIComponent(k.substring(1));try{x=JSON.parse(x);var z={id:x[0],title:x[1],downloadUrl:x[2]};this.remoteInvoke("getFileContent",[z.downloadUrl],null,mxUtils.bind(this,function(J){try{p(new RemoteLibrary(this,
+J,z))}catch(O){q()}}),function(){q()})}catch(J){q()}}else if("S"==x&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(k.substring(1)),function(J){p(J)},q)}catch(J){q()}else{var A=null;"G"==x?null!=this.drive&&null!=this.drive.user&&(A=this.drive):"H"==x?null!=this.gitHub&&null!=this.gitHub.getUser()&&(A=this.gitHub):"T"==x?null!=this.trello&&this.trello.isAuthorized()&&(A=this.trello):"D"==x?null!=this.dropbox&&null!=this.dropbox.getUser()&&(A=this.dropbox):"W"==x&&null!=this.oneDrive&&
+null!=this.oneDrive.getUser()&&(A=this.oneDrive);null!=A?A.getLibrary(decodeURIComponent(k.substring(1)),mxUtils.bind(this,function(J){try{p(J)}catch(O){q()}}),function(J){q()}):q(!0)}}})(g,d)}v()}};
App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer){var b=this.getCurrentFile();"1"==urlParams.embed&&("atlas"==uiTheme||"1"==urlParams.atlas?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="1"==urlParams.noLangIcon?"0":"25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"));this.commentsSupported()&&"1"!=urlParams.sketch?null==this.commentButton&&
(this.commentButton=document.createElement("a"),this.commentButton.setAttribute("title",mxResources.get("comments")),this.commentButton.className="geToolbarButton",this.commentButton.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;float:left;cursor:pointer;width:24px;height:24px;background-size:24px 24px;background-position:center center;background-repeat:no-repeat;background-image:url("+Editor.commentImage+");","atlas"==uiTheme?(this.commentButton.style.marginRight=
"10px",this.commentButton.style.marginTop="-3px"):this.commentButton.style.marginTop="min"==uiTheme?"1px":"1"==urlParams.atlas?"-2px":"-5px",mxEvent.addListener(this.commentButton,"click",mxUtils.bind(this,function(){this.actions.get("comments").funct()})),this.buttonContainer.appendChild(this.commentButton),"dark"==uiTheme||"atlas"==uiTheme)&&(this.commentButton.style.filter="invert(100%)"):null!=this.commentButton&&(this.commentButton.parentNode.removeChild(this.commentButton),this.commentButton=
@@ -12830,24 +12825,24 @@ var m=document.createElement("img");mxUtils.setOpacity(m,50);m.style.height="16p
Menus.prototype.init=function(){function f(u,E,B){this.ui=u;this.previousExtFonts=this.extFonts=E;this.prevCustomFonts=this.customFonts=B}e.apply(this,arguments);var c=this.editorUi,m=c.editor.graph,n=mxUtils.bind(m,m.isEnabled),v=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),d=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&
(null==document.documentMode||9<document.documentMode),g=("www.draw.io"==window.location.hostname||"test.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"app.diagrams.net"==window.location.hostname)&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!mxClient.IS_IOS&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode),k="1"==urlParams.tr&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode);mxClient.IS_SVG||
c.isOffline()||((new Image).src=IMAGE_PATH+"/help.png");"1"==urlParams.noFileMenu&&(this.defaultMenuItems=this.defaultMenuItems.filter(function(u){return"file"!=u}));c.actions.addAction("new...",function(){var u=c.isOffline();if(u||"1"!=urlParams.newTempDlg||c.mode!=App.MODE_GOOGLE){var E=new NewDialog(c,u,!(c.mode==App.MODE_DEVICE&&"chooseFileSystemEntries"in window));c.showDialog(E.container,u?350:620,u?70:460,!0,!0,function(D){c.sidebar.hideTooltip();D&&null==c.getCurrentFile()&&c.showSplash()});
-E.init()}else{var B=function(D){return{id:D.id,isExt:!0,url:D.downloadUrl,title:D.title,imgUrl:D.thumbnailLink,changedBy:D.lastModifyingUserName,lastModifiedOn:D.modifiedDate}};u=new TemplatesDialog(c,function(D,G,N){var I=N.libs,F=N.clibs;c.pickFolder(c.mode,function(H){c.createFile(G,D,null!=I&&0<I.length?I:null,null,function(){c.hideDialog()},null,H,null,null!=F&&0<F.length?F:null)},null==c.stateArg||null==c.stateArg.folderId)},null,null,null,"user",function(D,G,N){var I=new Date;I.setDate(I.getDate()-
-7);c.drive.listFiles(null,I,N?!0:!1,function(F){for(var H=[],R=0;R<F.items.length;R++)H.push(B(F.items[R]));D(H)},G)},function(D,G,N,I){c.drive.listFiles(D,null,I?!0:!1,function(F){for(var H=[],R=0;R<F.items.length;R++)H.push(B(F.items[R]));G(H)},N)},function(D,G,N){c.drive.getFile(D.id,function(I){G(I.data)},N)},null,null,!1,!1);c.showDialog(u.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}});c.actions.put("insertTemplate",new Action(mxResources.get("template")+"...",function(){if(m.isEnabled()&&
+E.init()}else{var B=function(D){return{id:D.id,isExt:!0,url:D.downloadUrl,title:D.title,imgUrl:D.thumbnailLink,changedBy:D.lastModifyingUserName,lastModifiedOn:D.modifiedDate}};u=new TemplatesDialog(c,function(D,G,H){var N=H.libs,F=H.clibs;c.pickFolder(c.mode,function(I){c.createFile(G,D,null!=N&&0<N.length?N:null,null,function(){c.hideDialog()},null,I,null,null!=F&&0<F.length?F:null)},null==c.stateArg||null==c.stateArg.folderId)},null,null,null,"user",function(D,G,H){var N=new Date;N.setDate(N.getDate()-
+7);c.drive.listFiles(null,N,H?!0:!1,function(F){for(var I=[],Q=0;Q<F.items.length;Q++)I.push(B(F.items[Q]));D(I)},G)},function(D,G,H,N){c.drive.listFiles(D,null,N?!0:!1,function(F){for(var I=[],Q=0;Q<F.items.length;Q++)I.push(B(F.items[Q]));G(I)},H)},function(D,G,H){c.drive.getFile(D.id,function(N){G(N.data)},H)},null,null,!1,!1);c.showDialog(u.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}});c.actions.put("insertTemplate",new Action(mxResources.get("template")+"...",function(){if(m.isEnabled()&&
!m.isCellLocked(m.getDefaultParent())){var u=new NewDialog(c,null,!1,function(E){c.hideDialog();if(null!=E){var B=c.editor.graph.getFreeInsertPoint();m.setSelectionCells(c.importXml(E,Math.max(B.x,20),Math.max(B.y,20),!0,null,null,!0));m.scrollCellToVisible(m.getSelectionCell())}},null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"));c.showDialog(u.container,620,460,!0,!0,function(){c.sidebar.hideTooltip()});u.init()}})).isEnabled=n;var l=c.actions.addAction("shareCursor",
function(){c.setShareCursorPosition(!c.isShareCursorPosition())});l.setToggleAction(!0);l.setSelectedCallback(function(){return c.isShareCursorPosition()});l=c.actions.addAction("showRemoteCursors",function(){c.setShowRemoteCursors(!c.isShowRemoteCursors())});l.setToggleAction(!0);l.setSelectedCallback(function(){return c.isShowRemoteCursors()});l=c.actions.addAction("points",function(){c.editor.graph.view.setUnit(mxConstants.POINTS)});l.setToggleAction(!0);l.setSelectedCallback(function(){return c.editor.graph.view.unit==
mxConstants.POINTS});l=c.actions.addAction("inches",function(){c.editor.graph.view.setUnit(mxConstants.INCHES)});l.setToggleAction(!0);l.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.INCHES});l=c.actions.addAction("millimeters",function(){c.editor.graph.view.setUnit(mxConstants.MILLIMETERS)});l.setToggleAction(!0);l.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.MILLIMETERS});l=c.actions.addAction("meters",function(){c.editor.graph.view.setUnit(mxConstants.METERS)});
l.setToggleAction(!0);l.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.METERS});this.put("units",new Menu(mxUtils.bind(this,function(u,E){this.addMenuItems(u,["points","inches","millimeters","meters"],E)})));l=c.actions.addAction("ruler",function(){mxSettings.setRulerOn(!mxSettings.isRulerOn());mxSettings.save();null!=c.ruler?(c.ruler.destroy(),c.ruler=null):c.ruler=new mxDualRuler(c,c.editor.graph.view.unit);c.refresh()});l.setEnabled(c.canvasSupported&&9!=document.documentMode);
l.setToggleAction(!0);l.setSelectedCallback(function(){return null!=c.ruler});l=c.actions.addAction("fullscreen",function(){"1"==urlParams.embedInline?c.setInlineFullscreen(!Editor.inlineFullscreen):null==document.fullscreenElement?document.body.requestFullscreen():document.exitFullscreen()});l.visible="1"==urlParams.embedInline||window==window.top&&document.fullscreenEnabled&&null!=document.body.requestFullscreen;l.setToggleAction(!0);l.setSelectedCallback(function(){return"1"==urlParams.embedInline?
-Editor.inlineFullscreen:null!=document.fullscreenElement});c.actions.addAction("properties...",function(){var u=new FilePropertiesDialog(c);c.showDialog(u.container,320,120,!0,!0);u.init()}).isEnabled=n;window.mxFreehand&&(c.actions.put("insertFreehand",new Action(mxResources.get("freehand")+"...",function(u){m.isEnabled()&&(null==this.freehandWindow&&(u=!mxClient.IS_IE&&!mxClient.IS_IE11,this.freehandWindow=new FreehandWindow(c,document.body.offsetWidth-420,102,176,u?120:84,u)),m.freehand.isDrawing()?
-m.freehand.stopDrawing():m.freehand.startDrawing(),this.freehandWindow.window.setVisible(m.freehand.isDrawing()))})).isEnabled=function(){return n()&&mxClient.IS_SVG});c.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var u=document.createElement("div");u.style.whiteSpace="nowrap";var E=null==c.pages||1>=c.pages.length,B=document.createElement("h3");mxUtils.write(B,mxResources.get("formatXml"));B.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
-u.appendChild(B);var D=c.addCheckbox(u,mxResources.get("selectionOnly"),!1,m.isSelectionEmpty()),G=c.addCheckbox(u,mxResources.get("compressed"),!0),N=c.addCheckbox(u,mxResources.get("allPages"),!E,E);N.style.marginBottom="16px";mxEvent.addListener(D,"change",function(){D.checked?N.setAttribute("disabled","disabled"):N.removeAttribute("disabled")});u=new CustomDialog(c,u,mxUtils.bind(this,function(){c.downloadFile("xml",!G.checked,null,!D.checked,E||!N.checked)}),null,mxResources.get("export"));c.showDialog(u.container,
-300,200,!0,!0)}));Editor.enableExportUrl&&c.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){c.showPublishLinkDialog(mxResources.get("url"),!0,null,null,function(u,E,B,D,G,N,I,F,H){I=[];H&&I.push("tags=%7B%7D");u=new EmbedDialog(c,c.createLink(u,E,B,D,G,N,null,!0,I));c.showDialog(u.container,450,240,!0,!0);u.init()})}));c.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),
-function(u){c.spinner.stop();c.showHtmlDialog(mxResources.get("export"),null,u,function(E,B,D,G,N,I,F,H,R,X,J){c.createHtml(E,B,D,G,N,I,F,H,R,X,J,mxUtils.bind(this,function(W,V){var t=c.getBaseFilename(F);W='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+mxUtils.htmlEntities(t)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+W+"\n"+V+"\n</body>\n</html>";c.saveData(t+(".drawio"==t.substring(t.lenth-7)?"":".drawio")+
-".html","html",W,"text/html")}))})})}));c.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){if(EditorUi.isElectronApp||!c.isOffline()&&!c.printPdfExport){var u=null==c.pages||1>=c.pages.length,E=document.createElement("div");E.style.whiteSpace="nowrap";var B=document.createElement("h3");mxUtils.write(B,mxResources.get("formatPdf"));B.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";E.appendChild(B);var D=function(){F!=this&&this.checked?
-(V.removeAttribute("disabled"),V.checked=!m.pageVisible):(V.setAttribute("disabled","disabled"),V.checked=!1)};B=200;var G=1,N=null;if(c.pdfPageExport&&!u){var I=function(){J.value=Math.max(1,Math.min(G,Math.max(parseInt(J.value),parseInt(R.value))));R.value=Math.max(1,Math.min(G,Math.min(parseInt(J.value),parseInt(R.value))))},F=c.addRadiobox(E,"pages",mxResources.get("allPages"),!0),H=c.addRadiobox(E,"pages",mxResources.get("pages")+":",!1,null,!0),R=document.createElement("input");R.style.cssText=
-"margin:0 8px 0 8px;";R.setAttribute("value","1");R.setAttribute("type","number");R.setAttribute("min","1");R.style.width="50px";E.appendChild(R);var X=document.createElement("span");mxUtils.write(X,mxResources.get("to"));E.appendChild(X);var J=R.cloneNode(!0);E.appendChild(J);mxEvent.addListener(R,"focus",function(){H.checked=!0});mxEvent.addListener(J,"focus",function(){H.checked=!0});mxEvent.addListener(R,"change",I);mxEvent.addListener(J,"change",I);if(null!=c.pages&&(G=c.pages.length,null!=c.currentPage))for(I=
-0;I<c.pages.length;I++)if(c.currentPage==c.pages[I]){N=I+1;R.value=N;J.value=N;break}R.setAttribute("max",G);J.setAttribute("max",G);mxUtils.br(E);var W=c.addRadiobox(E,"pages",mxResources.get("selectionOnly"),!1,m.isSelectionEmpty()),V=c.addCheckbox(E,mxResources.get("crop"),!1,!0),t=c.addCheckbox(E,mxResources.get("grid"),!1,!1);mxEvent.addListener(F,"change",D);mxEvent.addListener(H,"change",D);mxEvent.addListener(W,"change",D);B+=64}else W=c.addCheckbox(E,mxResources.get("selectionOnly"),!1,m.isSelectionEmpty()),
-V=c.addCheckbox(E,mxResources.get("crop"),!m.pageVisible||!c.pdfPageExport,!c.pdfPageExport),t=c.addCheckbox(E,mxResources.get("grid"),!1,!1),c.pdfPageExport||mxEvent.addListener(W,"change",D);D=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"draw.io"==c.getServiceName();var C=null,M=null;if(EditorUi.isElectronApp||D)M=c.addCheckbox(E,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram),B+=30;D&&(C=c.addCheckbox(E,mxResources.get("transparentBackground"),!1),B+=30);E=new CustomDialog(c,
-E,mxUtils.bind(this,function(){var Q=null;if(!u){Q=parseInt(R.value);var P=parseInt(J.value);Q=F.checked||Q==N&&P==N?null:{from:Math.max(0,Math.min(G-1,Q-1)),to:Math.max(0,Math.min(G-1,P-1))}}c.downloadFile("pdf",null,null,!W.checked,u?!0:!F.checked&&null==Q,!V.checked,null!=C&&C.checked,null,null,t.checked,null!=M&&M.checked,Q)}),null,mxResources.get("export"));c.showDialog(E.container,300,B,!0,!0)}else c.showDialog((new PrintDialog(c,mxResources.get("formatPdf"))).container,360,null!=c.pages&&1<
+Editor.inlineFullscreen:null!=document.fullscreenElement});c.actions.addAction("properties...",function(){var u=new FilePropertiesDialog(c);c.showDialog(u.container,320,120,!0,!0);u.init()}).isEnabled=n;window.mxFreehand&&(c.actions.put("insertFreehand",new Action(mxResources.get("freehand")+"...",function(){if(m.isEnabled()){if(null==this.freehandWindow){var u=!mxClient.IS_IE&&!mxClient.IS_IE11;this.freehandWindow=new FreehandWindow(c,document.body.offsetWidth-420,102,176,u?120:84,u)}m.freehand.isDrawing()?
+m.freehand.stopDrawing():m.freehand.startDrawing();this.freehandWindow.window.setVisible(m.freehand.isDrawing())}})).isEnabled=function(){return n()&&mxClient.IS_SVG});c.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var u=document.createElement("div");u.style.whiteSpace="nowrap";var E=null==c.pages||1>=c.pages.length,B=document.createElement("h3");mxUtils.write(B,mxResources.get("formatXml"));B.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
+u.appendChild(B);var D=c.addCheckbox(u,mxResources.get("selectionOnly"),!1,m.isSelectionEmpty()),G=c.addCheckbox(u,mxResources.get("compressed"),!0),H=c.addCheckbox(u,mxResources.get("allPages"),!E,E);H.style.marginBottom="16px";mxEvent.addListener(D,"change",function(){D.checked?H.setAttribute("disabled","disabled"):H.removeAttribute("disabled")});u=new CustomDialog(c,u,mxUtils.bind(this,function(){c.downloadFile("xml",!G.checked,null,!D.checked,E||!H.checked)}),null,mxResources.get("export"));c.showDialog(u.container,
+300,200,!0,!0)}));Editor.enableExportUrl&&c.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){c.showPublishLinkDialog(mxResources.get("url"),!0,null,null,function(u,E,B,D,G,H,N,F,I){N=[];I&&N.push("tags=%7B%7D");u=new EmbedDialog(c,c.createLink(u,E,B,D,G,H,null,!0,N));c.showDialog(u.container,450,240,!0,!0);u.init()})}));c.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),
+function(u){c.spinner.stop();c.showHtmlDialog(mxResources.get("export"),null,u,function(E,B,D,G,H,N,F,I,Q,X,L){c.createHtml(E,B,D,G,H,N,F,I,Q,X,L,mxUtils.bind(this,function(U,W){var t=c.getBaseFilename(F);U='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+mxUtils.htmlEntities(t)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+U+"\n"+W+"\n</body>\n</html>";c.saveData(t+(".drawio"==t.substring(t.lenth-7)?"":".drawio")+
+".html","html",U,"text/html")}))})})}));c.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){if(EditorUi.isElectronApp||!c.isOffline()&&!c.printPdfExport){var u=null==c.pages||1>=c.pages.length,E=document.createElement("div");E.style.whiteSpace="nowrap";var B=document.createElement("h3");mxUtils.write(B,mxResources.get("formatPdf"));B.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";E.appendChild(B);var D=function(){F!=this&&this.checked?
+(W.removeAttribute("disabled"),W.checked=!m.pageVisible):(W.setAttribute("disabled","disabled"),W.checked=!1)};B=200;var G=1,H=null;if(c.pdfPageExport&&!u){var N=function(){L.value=Math.max(1,Math.min(G,Math.max(parseInt(L.value),parseInt(Q.value))));Q.value=Math.max(1,Math.min(G,Math.min(parseInt(L.value),parseInt(Q.value))))},F=c.addRadiobox(E,"pages",mxResources.get("allPages"),!0),I=c.addRadiobox(E,"pages",mxResources.get("pages")+":",!1,null,!0),Q=document.createElement("input");Q.style.cssText=
+"margin:0 8px 0 8px;";Q.setAttribute("value","1");Q.setAttribute("type","number");Q.setAttribute("min","1");Q.style.width="50px";E.appendChild(Q);var X=document.createElement("span");mxUtils.write(X,mxResources.get("to"));E.appendChild(X);var L=Q.cloneNode(!0);E.appendChild(L);mxEvent.addListener(Q,"focus",function(){I.checked=!0});mxEvent.addListener(L,"focus",function(){I.checked=!0});mxEvent.addListener(Q,"change",N);mxEvent.addListener(L,"change",N);if(null!=c.pages&&(G=c.pages.length,null!=c.currentPage))for(N=
+0;N<c.pages.length;N++)if(c.currentPage==c.pages[N]){H=N+1;Q.value=H;L.value=H;break}Q.setAttribute("max",G);L.setAttribute("max",G);mxUtils.br(E);var U=c.addRadiobox(E,"pages",mxResources.get("selectionOnly"),!1,m.isSelectionEmpty()),W=c.addCheckbox(E,mxResources.get("crop"),!1,!0),t=c.addCheckbox(E,mxResources.get("grid"),!1,!1);mxEvent.addListener(F,"change",D);mxEvent.addListener(I,"change",D);mxEvent.addListener(U,"change",D);B+=64}else U=c.addCheckbox(E,mxResources.get("selectionOnly"),!1,m.isSelectionEmpty()),
+W=c.addCheckbox(E,mxResources.get("crop"),!m.pageVisible||!c.pdfPageExport,!c.pdfPageExport),t=c.addCheckbox(E,mxResources.get("grid"),!1,!1),c.pdfPageExport||mxEvent.addListener(U,"change",D);D=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"draw.io"==c.getServiceName();var C=null,M=null;if(EditorUi.isElectronApp||D)M=c.addCheckbox(E,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram),B+=30;D&&(C=c.addCheckbox(E,mxResources.get("transparentBackground"),!1),B+=30);E=new CustomDialog(c,
+E,mxUtils.bind(this,function(){var S=null;if(!u){S=parseInt(Q.value);var P=parseInt(L.value);S=F.checked||S==H&&P==H?null:{from:Math.max(0,Math.min(G-1,S-1)),to:Math.max(0,Math.min(G-1,P-1))}}c.downloadFile("pdf",null,null,!U.checked,u?!0:!F.checked&&null==S,!W.checked,null!=C&&C.checked,null,null,t.checked,null!=M&&M.checked,S)}),null,mxResources.get("export"));c.showDialog(E.container,300,B,!0,!0)}else c.showDialog((new PrintDialog(c,mxResources.get("formatPdf"))).container,360,null!=c.pages&&1<
c.pages.length&&(c.editor.editable||"1"!=urlParams["hide-pages"])?470:390,!0,!0)}));c.actions.addAction("open...",function(){c.pickFile()});c.actions.addAction("close",function(){function u(){null!=E&&E.removeDraft();c.fileLoaded(null)}var E=c.getCurrentFile();null!=E&&E.isModified()?c.confirm(mxResources.get("allChangesLost"),null,u,mxResources.get("cancel"),mxResources.get("discardChanges")):u()});c.actions.addAction("editShape...",mxUtils.bind(this,function(){m.getSelectionCells();if(1==m.getSelectionCount()){var u=
m.getSelectionCell(),E=m.view.getState(u);null!=E&&null!=E.shape&&null!=E.shape.stencil&&(u=new EditShapeDialog(c,u,mxResources.get("editShape")+":",630,400),c.showDialog(u.container,640,480,!0,!1),u.init())}}));c.actions.addAction("revisionHistory...",function(){c.isRevisionHistorySupported()?c.spinner.spin(document.body,mxResources.get("loading"))&&c.getRevisions(mxUtils.bind(this,function(u,E){c.spinner.stop();u=new RevisionDialog(c,u,E);c.showDialog(u.container,640,480,!0,!0);u.init()}),mxUtils.bind(this,
function(u){c.handleError(u)})):c.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"))});c.actions.addAction("createRevision",function(){c.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");l=c.actions.addAction("synchronize",function(){c.synchronizeCurrentFile("none"==DrawioFile.SYNC)},null,null,"Alt+Shift+S");"none"==DrawioFile.SYNC&&(l.label=mxResources.get("refresh"));c.actions.addAction("upload...",function(){var u=c.getCurrentFile();null!=u&&(window.drawdata=
@@ -12855,9 +12850,9 @@ c.getFileData(),u=null!=u.getTitle()?u.getTitle():c.defaultFilename,c.openLink(w
l.isEnabled=n);isLocalStorage&&(l=c.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),l.setToggleAction(!0),l.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var p=c.actions.addAction("autosave",function(){c.editor.setAutosave(!c.editor.autosave)});p.setToggleAction(!0);p.setSelectedCallback(function(){return p.isEnabled()&&c.editor.autosave});c.actions.addAction("editGeometry...",function(){for(var u=
m.getSelectionCells(),E=[],B=0;B<u.length;B++)m.getModel().isVertex(u[B])&&E.push(u[B]);0<E.length&&(u=new EditGeometryDialog(c,E),c.showDialog(u.container,200,270,!0,!0),u.init())},null,null,Editor.ctrlKey+"+Shift+M");var q=null;c.actions.addAction("copyStyle",function(){m.isEnabled()&&!m.isSelectionEmpty()&&(q=m.copyStyle(m.getSelectionCell()))},null,null,Editor.ctrlKey+"+Shift+C");c.actions.addAction("pasteStyle",function(){m.isEnabled()&&!m.isSelectionEmpty()&&null!=q&&m.pasteStyle(q,m.getSelectionCells())},
null,null,Editor.ctrlKey+"+Shift+V");c.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!c.isOffline()){var u=new BackgroundImageDialog(c,function(E){c.setBackgroundImage(E)});c.showDialog(u.container,400,170,!0,!0);u.init()}}));c.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){c.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,
-function(u,E,B,D,G,N,I,F,H,R,X,J,W,V,t){H=parseInt(u);!isNaN(H)&&0<H&&(t?c.downloadFile("remoteSvg",null,null,B,null,F,E,u,I,null,G):c.exportSvg(H/100,E,B,D,G,N,I,!F,!1,R,J,W,V))}),!0,null,"svg",!0)}));c.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){c.isExportToCanvas()?c.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(u,E,B,D,G,N,I,F,H,R,X,J,W){u=parseInt(u);!isNaN(u)&&
-0<u&&c.exportImage(u/100,E,B,D,G,I,!F,!1,null,X,null,J,W)}),!0,Editor.defaultIncludeDiagram,"png",!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(u,E,B,D,G){c.downloadFile(E?"xmlpng":"png",null,null,u,null,null,B,D,G)}),!1,!0)}));c.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){c.isExportToCanvas()?c.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",
-mxUtils.bind(this,function(u,E,B,D,G,N,I,F,H,R,X,J,W){u=parseInt(u);!isNaN(u)&&0<u&&c.exportImage(u/100,!1,B,D,!1,I,!F,!1,"jpeg",X,null,J,W)}),!0,!1,"jpeg",!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(u,E,B,D,G){c.downloadFile("jpeg",null,null,u,null,null,null,D,G)}),!0,!0)}));l=c.actions.addAction("copyAsImage",mxUtils.bind(this,function(){var u=mxUtils.sortCells(m.model.getTopmostCells(m.getSelectionCells())),
+function(u,E,B,D,G,H,N,F,I,Q,X,L,U,W,t){I=parseInt(u);!isNaN(I)&&0<I&&(t?c.downloadFile("remoteSvg",null,null,B,null,F,E,u,N,null,G):c.exportSvg(I/100,E,B,D,G,H,N,!F,!1,Q,L,U,W))}),!0,null,"svg",!0)}));c.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){c.isExportToCanvas()?c.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(u,E,B,D,G,H,N,F,I,Q,X,L,U){u=parseInt(u);!isNaN(u)&&
+0<u&&c.exportImage(u/100,E,B,D,G,N,!F,!1,null,X,null,L,U)}),!0,Editor.defaultIncludeDiagram,"png",!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(u,E,B,D,G){c.downloadFile(E?"xmlpng":"png",null,null,u,null,null,B,D,G)}),!1,!0)}));c.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){c.isExportToCanvas()?c.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",
+mxUtils.bind(this,function(u,E,B,D,G,H,N,F,I,Q,X,L,U){u=parseInt(u);!isNaN(u)&&0<u&&c.exportImage(u/100,!1,B,D,!1,N,!F,!1,"jpeg",X,null,L,U)}),!0,!1,"jpeg",!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(u,E,B,D,G){c.downloadFile("jpeg",null,null,u,null,null,null,D,G)}),!0,!0)}));l=c.actions.addAction("copyAsImage",mxUtils.bind(this,function(){var u=mxUtils.sortCells(m.model.getTopmostCells(m.getSelectionCells())),
E=mxUtils.getXml(0==u.length?c.editor.getGraphXml():m.encodeCells(u));c.copyImage(u,E)}));l.visible=Editor.enableNativeCipboard&&c.isExportToCanvas()&&!mxClient.IS_SF;l=c.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){m.setShadowVisible(!m.shadowVisible)}));l.setToggleAction(!0);l.setSelectedCallback(function(){return m.shadowVisible});c.actions.put("about",new Action(mxResources.get("about")+" "+EditorUi.VERSION+"...",function(){c.isOffline()||mxClient.IS_CHROMEAPP||
EditorUi.isElectronApp?c.alert(c.editor.appName+" "+EditorUi.VERSION):c.openLink("https://www.diagrams.net/")}));c.actions.addAction("support...",function(){EditorUi.isElectronApp?c.openLink("https://github.com/jgraph/drawio-desktop/wiki/Getting-Support"):c.openLink("https://github.com/jgraph/drawio/wiki/Getting-Support")});c.actions.addAction("exportOptionsDisabled...",function(){c.handleError({message:mxResources.get("exportOptionsDisabledDetails")},mxResources.get("exportOptionsDisabled"))});c.actions.addAction("keyboardShortcuts...",
function(){!mxClient.IS_SVG||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?c.openLink("https://viewer.diagrams.net/#Uhttps%3A%2F%2Fviewer.diagrams.net%2Fshortcuts.svg"):c.openLink("shortcuts.svg")});c.actions.addAction("feedback...",function(){var u=new FeedbackDialog(c);c.showDialog(u.container,610,360,!0,!1);u.init()});c.actions.addAction("quickStart...",function(){c.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});l=c.actions.addAction("tags",mxUtils.bind(this,function(){null==this.tagsWindow?
@@ -12866,119 +12861,119 @@ this.tagsWindow&&this.tagsWindow.window.isVisible()}));l=c.actions.addAction("fi
this[E].window.setVisible(!0)}else this[E].window.setVisible(!this[E].window.isVisible())}),null,null,Editor.ctrlKey+"+F");l.setToggleAction(!0);l.setSelectedCallback(mxUtils.bind(this,function(){var u=m.isEnabled()?"findReplaceWindow":"findWindow";return null!=this[u]&&this[u].window.isVisible()}));c.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){var u=null==c.pages||1>=c.pages.length;if(u)c.exportVisio();else{var E=document.createElement("div");E.style.whiteSpace=
"nowrap";var B=document.createElement("h3");mxUtils.write(B,mxResources.get("formatVsdx"));B.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";E.appendChild(B);var D=c.addCheckbox(E,mxResources.get("allPages"),!u,u);D.style.marginBottom="16px";u=new CustomDialog(c,E,mxUtils.bind(this,function(){c.exportVisio(!D.checked)}),null,mxResources.get("export"));c.showDialog(u.container,300,130,!0,!0)}}));isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&c.actions.addAction("configuration...",
function(){var u=document.createElement("input");u.setAttribute("type","checkbox");u.style.marginRight="4px";u.checked=mxSettings.getShowStartScreen();u.defaultChecked=u.checked;if(c.isSettingsEnabled()&&"1"==urlParams.sketch){var E=document.createElement("span");E.style["float"]="right";E.style.cursor="pointer";E.style.userSelect="none";E.style.marginTop="-4px";E.appendChild(u);mxUtils.write(E,mxResources.get("showStartScreen"));mxEvent.addListener(E,"click",function(G){mxEvent.getSource(G)!=u&&
-(u.checked=!u.checked)});header=E}var B=localStorage.getItem(Editor.configurationKey);E=[[mxResources.get("reset"),function(G,N){c.confirm(mxResources.get("areYouSure"),function(){try{mxEvent.isShiftDown(G)?(localStorage.removeItem(Editor.settingsKey),localStorage.removeItem(".drawio-config")):(localStorage.removeItem(Editor.configurationKey),c.hideDialog(),c.alert(mxResources.get("restartForChangeRequired")))}catch(I){c.handleError(I)}})},"Shift+Click to Reset Settings"]];var D=c.actions.get("plugins");
-null!=D&&"1"==urlParams.sketch&&E.push([mxResources.get("plugins"),D.funct]);EditorUi.isElectronApp||E.push([mxResources.get("share"),function(G,N){if(0<N.value.length)try{var I=JSON.parse(N.value),F=window.location.protocol+"//"+window.location.host+"/"+c.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(I)),H=new EmbedDialog(c,F);c.showDialog(H.container,450,240,!0);H.init()}catch(R){c.handleError(R)}else c.handleError({message:mxResources.get("invalidInput")})}]);E=new TextareaDialog(c,mxResources.get("configuration")+
-":",null!=B?JSON.stringify(JSON.parse(B),null,2):"",function(G){if(null!=G)try{if(null!=u.parentNode&&(mxSettings.setShowStartScreen(u.checked),mxSettings.save()),G==B)c.hideDialog();else{if(0<G.length){var N=JSON.parse(G);localStorage.setItem(Editor.configurationKey,JSON.stringify(N))}else localStorage.removeItem(Editor.configurationKey);c.hideDialog();c.alert(mxResources.get("restartForChangeRequired"))}}catch(I){c.handleError(I)}},null,null,null,null,null,!0,null,null,"https://www.diagrams.net/doc/faq/configure-diagram-editor",
-E,u.parentNode);c.showDialog(E.container,620,460,!0,!1);E.init()});if(mxClient.IS_CHROMEAPP||isLocalStorage){this.put("language",new Menu(mxUtils.bind(this,function(u,E){var B=mxUtils.bind(this,function(G){var N=""==G?mxResources.get("automatic"):mxLanguageMap[G],I=null;""!=N&&(I=u.addItem(N,null,mxUtils.bind(this,function(){mxSettings.setLanguage(G);mxSettings.save();mxClient.language=G;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);c.alert(mxResources.get("restartForChangeRequired"))}),
-E),(G==mxLanguage||""==G&&null==mxLanguage)&&u.addCheckmark(I,Editor.checkmarkImage));return I});B("");u.addSeparator(E);for(var D in mxLanguageMap)B(D)})));var x=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(u){var E=x.apply(this,arguments);if(null!=E&&"1"!=urlParams.noLangIcon){var B=this.get("language");if(null!=B){B=E.addMenu("",B.funct);B.setAttribute("title",mxResources.get("language"));B.style.width="16px";B.style.paddingTop="2px";B.style.paddingLeft="4px";B.style.zIndex=
+(u.checked=!u.checked)});header=E}var B=localStorage.getItem(Editor.configurationKey);E=[[mxResources.get("reset"),function(G,H){c.confirm(mxResources.get("areYouSure"),function(){try{mxEvent.isShiftDown(G)?(localStorage.removeItem(Editor.settingsKey),localStorage.removeItem(".drawio-config")):(localStorage.removeItem(Editor.configurationKey),c.hideDialog(),c.alert(mxResources.get("restartForChangeRequired")))}catch(N){c.handleError(N)}})},"Shift+Click to Reset Settings"]];var D=c.actions.get("plugins");
+null!=D&&"1"==urlParams.sketch&&E.push([mxResources.get("plugins"),D.funct]);EditorUi.isElectronApp||E.push([mxResources.get("share"),function(G,H){if(0<H.value.length)try{var N=JSON.parse(H.value),F=window.location.protocol+"//"+window.location.host+"/"+c.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(N)),I=new EmbedDialog(c,F);c.showDialog(I.container,450,240,!0);I.init()}catch(Q){c.handleError(Q)}else c.handleError({message:mxResources.get("invalidInput")})}]);E=new TextareaDialog(c,mxResources.get("configuration")+
+":",null!=B?JSON.stringify(JSON.parse(B),null,2):"",function(G){if(null!=G)try{if(null!=u.parentNode&&(mxSettings.setShowStartScreen(u.checked),mxSettings.save()),G==B)c.hideDialog();else{if(0<G.length){var H=JSON.parse(G);localStorage.setItem(Editor.configurationKey,JSON.stringify(H))}else localStorage.removeItem(Editor.configurationKey);c.hideDialog();c.alert(mxResources.get("restartForChangeRequired"))}}catch(N){c.handleError(N)}},null,null,null,null,null,!0,null,null,"https://www.diagrams.net/doc/faq/configure-diagram-editor",
+E,u.parentNode);c.showDialog(E.container,620,460,!0,!1);E.init()});if(mxClient.IS_CHROMEAPP||isLocalStorage){this.put("language",new Menu(mxUtils.bind(this,function(u,E){var B=mxUtils.bind(this,function(G){var H=""==G?mxResources.get("automatic"):mxLanguageMap[G],N=null;""!=H&&(N=u.addItem(H,null,mxUtils.bind(this,function(){mxSettings.setLanguage(G);mxSettings.save();mxClient.language=G;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);c.alert(mxResources.get("restartForChangeRequired"))}),
+E),(G==mxLanguage||""==G&&null==mxLanguage)&&u.addCheckmark(N,Editor.checkmarkImage));return N});B("");u.addSeparator(E);for(var D in mxLanguageMap)B(D)})));var x=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(u){var E=x.apply(this,arguments);if(null!=E&&"1"!=urlParams.noLangIcon){var B=this.get("language");if(null!=B){B=E.addMenu("",B.funct);B.setAttribute("title",mxResources.get("language"));B.style.width="16px";B.style.paddingTop="2px";B.style.paddingLeft="4px";B.style.zIndex=
"1";B.style.position="absolute";B.style.display="block";B.style.cursor="pointer";B.style.right="17px";"atlas"==uiTheme?(B.style.top="6px",B.style.right="15px"):B.style.top="min"==uiTheme?"2px":"0px";var D=document.createElement("div");D.style.backgroundImage="url("+Editor.globeImage+")";D.style.backgroundPosition="center center";D.style.backgroundRepeat="no-repeat";D.style.backgroundSize="19px 19px";D.style.position="absolute";D.style.height="19px";D.style.width="19px";D.style.marginTop="2px";D.style.zIndex=
"1";B.appendChild(D);mxUtils.setOpacity(B,40);"1"==urlParams.winCtrls&&(B.style.right="95px",B.style.width="19px",B.style.height="19px",B.style.webkitAppRegion="no-drag",D.style.webkitAppRegion="no-drag");if("atlas"==uiTheme||"dark"==uiTheme)B.style.opacity="0.85",B.style.filter="invert(100%)";document.body.appendChild(B);E.langIcon=B}}return E}}c.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];
c.actions.addAction("runLayout",function(){var u=new TextareaDialog(c,"Run Layouts:",JSON.stringify(c.customLayoutConfig,null,2),function(E){if(0<E.length)try{var B=JSON.parse(E);c.executeLayouts(m.createLayouts(B));c.customLayoutConfig=B;c.hideDialog()}catch(D){c.handleError(D)}},null,null,null,null,function(E,B){var D=mxUtils.button(mxResources.get("copy"),function(){try{var G=B.value;B.value=JSON.stringify(JSON.parse(G));B.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?B.select():
-document.execCommand("selectAll",!1,null);document.execCommand("copy");c.alert(mxResources.get("copiedToClipboard"));B.value=G}catch(N){c.handleError(N)}});D.setAttribute("title","copy");D.className="geBtn";E.appendChild(D)},!0,null,null,"https://www.diagrams.net/doc/faq/apply-layouts");c.showDialog(u.container,620,460,!0,!0);u.init()});l=this.get("layout");var y=l.funct;l.funct=function(u,E){y.apply(this,arguments);u.addItem(mxResources.get("orgChart"),null,function(){var B=null,D=20,G=20,N=function(){if("undefined"!==
-typeof mxOrgChartLayout&&null!=B){var V=c.editor.graph,t=new mxOrgChartLayout(V,B,D,G),C=V.getDefaultParent();1<V.model.getChildCount(V.getSelectionCell())&&(C=V.getSelectionCell());t.execute(C)}},I=document.createElement("div"),F=document.createElement("div");F.style.marginTop="6px";F.style.display="inline-block";F.style.width="140px";mxUtils.write(F,mxResources.get("orgChartType")+": ");I.appendChild(F);var H=document.createElement("select");H.style.width="200px";H.style.boxSizing="border-box";
-F=[mxResources.get("linear"),mxResources.get("hanger2"),mxResources.get("hanger4"),mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")];for(var R=0;R<F.length;R++){var X=document.createElement("option");mxUtils.write(X,F[R]);X.value=R;2==R&&X.setAttribute("selected","selected");H.appendChild(X)}mxEvent.addListener(H,"change",function(){B=H.value});I.appendChild(H);F=document.createElement("div");F.style.marginTop=
-"6px";F.style.display="inline-block";F.style.width="140px";mxUtils.write(F,mxResources.get("parentChildSpacing")+": ");I.appendChild(F);var J=document.createElement("input");J.type="number";J.value=D;J.style.width="200px";J.style.boxSizing="border-box";I.appendChild(J);mxEvent.addListener(J,"change",function(){D=J.value});F=document.createElement("div");F.style.marginTop="6px";F.style.display="inline-block";F.style.width="140px";mxUtils.write(F,mxResources.get("siblingSpacing")+": ");I.appendChild(F);
-var W=document.createElement("input");W.type="number";W.value=G;W.style.width="200px";W.style.boxSizing="border-box";I.appendChild(W);mxEvent.addListener(W,"change",function(){G=W.value});I=new CustomDialog(c,I,function(){null==B&&(B=2);c.loadOrgChartLayouts(N)});c.showDialog(I.container,355,140,!0,!0)},E,null,n());u.addSeparator(E);u.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){var B=new mxParallelEdgeLayout(m);B.checkOverlap=!0;c.prompt(mxResources.get("spacing"),B.spacing,
+document.execCommand("selectAll",!1,null);document.execCommand("copy");c.alert(mxResources.get("copiedToClipboard"));B.value=G}catch(H){c.handleError(H)}});D.setAttribute("title","copy");D.className="geBtn";E.appendChild(D)},!0,null,null,"https://www.diagrams.net/doc/faq/apply-layouts");c.showDialog(u.container,620,460,!0,!0);u.init()});l=this.get("layout");var y=l.funct;l.funct=function(u,E){y.apply(this,arguments);u.addItem(mxResources.get("orgChart"),null,function(){var B=null,D=20,G=20,H=function(){if("undefined"!==
+typeof mxOrgChartLayout&&null!=B){var W=c.editor.graph,t=new mxOrgChartLayout(W,B,D,G),C=W.getDefaultParent();1<W.model.getChildCount(W.getSelectionCell())&&(C=W.getSelectionCell());t.execute(C)}},N=document.createElement("div"),F=document.createElement("div");F.style.marginTop="6px";F.style.display="inline-block";F.style.width="140px";mxUtils.write(F,mxResources.get("orgChartType")+": ");N.appendChild(F);var I=document.createElement("select");I.style.width="200px";I.style.boxSizing="border-box";
+F=[mxResources.get("linear"),mxResources.get("hanger2"),mxResources.get("hanger4"),mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")];for(var Q=0;Q<F.length;Q++){var X=document.createElement("option");mxUtils.write(X,F[Q]);X.value=Q;2==Q&&X.setAttribute("selected","selected");I.appendChild(X)}mxEvent.addListener(I,"change",function(){B=I.value});N.appendChild(I);F=document.createElement("div");F.style.marginTop=
+"6px";F.style.display="inline-block";F.style.width="140px";mxUtils.write(F,mxResources.get("parentChildSpacing")+": ");N.appendChild(F);var L=document.createElement("input");L.type="number";L.value=D;L.style.width="200px";L.style.boxSizing="border-box";N.appendChild(L);mxEvent.addListener(L,"change",function(){D=L.value});F=document.createElement("div");F.style.marginTop="6px";F.style.display="inline-block";F.style.width="140px";mxUtils.write(F,mxResources.get("siblingSpacing")+": ");N.appendChild(F);
+var U=document.createElement("input");U.type="number";U.value=G;U.style.width="200px";U.style.boxSizing="border-box";N.appendChild(U);mxEvent.addListener(U,"change",function(){G=U.value});N=new CustomDialog(c,N,function(){null==B&&(B=2);c.loadOrgChartLayouts(H)});c.showDialog(N.container,355,140,!0,!0)},E,null,n());u.addSeparator(E);u.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){var B=new mxParallelEdgeLayout(m);B.checkOverlap=!0;c.prompt(mxResources.get("spacing"),B.spacing,
mxUtils.bind(this,function(D){B.spacing=D;c.executeLayout(function(){B.execute(m.getDefaultParent(),m.isSelectionEmpty()?null:m.getSelectionCells())},!1)}))}),E);u.addSeparator(E);c.menus.addMenuItem(u,"runLayout",E,null,null,mxResources.get("apply")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(u,E){if(!mxClient.IS_CHROMEAPP&&c.isOffline())this.addMenuItems(u,["about"],E);else{var B=u.addItem("Search:",null,null,E,null,null,!1);B.style.backgroundColor=Editor.isDarkMode()?"#505759":
-"whiteSmoke";B.style.cursor="default";var D=document.createElement("input");D.setAttribute("type","text");D.setAttribute("size","25");D.style.marginLeft="8px";mxEvent.addListener(D,"keydown",mxUtils.bind(this,function(G){var N=mxUtils.trim(D.value);13==G.keyCode&&0<N.length?(this.editorUi.openLink("https://www.diagrams.net/search?src="+(EditorUi.isElectronApp?"DESKTOP":encodeURIComponent(location.host))+"&search="+encodeURIComponent(N)),D.value="",EditorUi.logEvent({category:"SEARCH-HELP",action:"search",
-label:N}),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0)):27==G.keyCode&&(D.value="")}));B.firstChild.nextSibling.appendChild(D);mxEvent.addGestureListeners(D,function(G){document.activeElement!=D&&D.focus();mxEvent.consume(G)},function(G){mxEvent.consume(G)},function(G){mxEvent.consume(G)});window.setTimeout(function(){D.focus()},0);EditorUi.isElectronApp?(c.actions.addAction("website...",function(){c.openLink("https://www.diagrams.net")}),c.actions.addAction("check4Updates",
+"whiteSmoke";B.style.cursor="default";var D=document.createElement("input");D.setAttribute("type","text");D.setAttribute("size","25");D.style.marginLeft="8px";mxEvent.addListener(D,"keydown",mxUtils.bind(this,function(G){var H=mxUtils.trim(D.value);13==G.keyCode&&0<H.length?(this.editorUi.openLink("https://www.diagrams.net/search?src="+(EditorUi.isElectronApp?"DESKTOP":encodeURIComponent(location.host))+"&search="+encodeURIComponent(H)),D.value="",EditorUi.logEvent({category:"SEARCH-HELP",action:"search",
+label:H}),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0)):27==G.keyCode&&(D.value="")}));B.firstChild.nextSibling.appendChild(D);mxEvent.addGestureListeners(D,function(G){document.activeElement!=D&&D.focus();mxEvent.consume(G)},function(G){mxEvent.consume(G)},function(G){mxEvent.consume(G)});window.setTimeout(function(){D.focus()},0);EditorUi.isElectronApp?(c.actions.addAction("website...",function(){c.openLink("https://www.diagrams.net")}),c.actions.addAction("check4Updates",
function(){c.checkForUpdates()}),this.addMenuItems(u,"- keyboardShortcuts quickStart website support -".split(" "),E),"1"!=urlParams.disableUpdate&&this.addMenuItems(u,["check4Updates"],E),this.addMenuItems(u,["openDevTools","-","about"],E)):this.addMenuItems(u,"- keyboardShortcuts quickStart support - about".split(" "),E)}"1"==urlParams.test&&(u.addSeparator(E),this.addSubmenu("testDevelop",u,E))})));mxResources.parse("diagramLanguage=Diagram Language");c.actions.addAction("diagramLanguage...",function(){var u=
prompt("Language Code",Graph.diagramLanguage||"");null!=u&&(Graph.diagramLanguage=0<u.length?u:null,m.refresh())});if("1"==urlParams.test){mxResources.parse("testDevelop=Develop");mxResources.parse("showBoundingBox=Show bounding box");mxResources.parse("createSidebarEntry=Create Sidebar Entry");mxResources.parse("testCheckFile=Check File");mxResources.parse("testDiff=Diff/Sync");mxResources.parse("testInspectPages=Check Pages");mxResources.parse("testFixPages=Fix Pages");mxResources.parse("testInspect=Inspect");
mxResources.parse("testShowConsole=Show Console");mxResources.parse("testXmlImageExport=XML Image Export");mxResources.parse("testOptimize=Remove Inline Images");c.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){if(!m.isSelectionEmpty()){var u=m.cloneCells(m.getSelectionCells()),E=m.getBoundingBoxFromGeometry(u);u=m.moveCells(u,-E.x,-E.y);c.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+E.width+", "+E.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(m.encodeCells(u)))+
"'),")}}));c.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var u=m.getGraphBounds(),E=m.view.translate,B=m.view.scale;m.insertVertex(m.getDefaultParent(),null,"",u.x/B-E.x,u.y/B-E.y,u.width/B,u.height/B,"fillColor=none;strokeColor=red;")}));c.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var u=null!=c.pages&&null!=c.getCurrentFile()?c.getCurrentFile().getAnonymizedXmlForPages(c.pages):"";u=new TextareaDialog(c,"Paste Data:",u,function(E){if(0<E.length)try{var B=
-function(F){function H(P){if(null==Q[P]){if(Q[P]=!0,null!=J[P]){for(;0<J[P].length;){var S=J[P].pop();H(S)}delete J[P]}}else mxLog.debug(R+": Visited: "+P)}var R=F.parentNode.id,X=F.childNodes;F={};for(var J={},W=null,V={},t=0;t<X.length;t++){var C=X[t];if(null!=C.id&&0<C.id.length)if(null==F[C.id]){F[C.id]=C.id;var M=C.getAttribute("parent");null==M?null!=W?mxLog.debug(R+": Multiple roots: "+C.id):W=C.id:(null==J[M]&&(J[M]=[]),J[M].push(C.id))}else V[C.id]=C.id}X=Object.keys(V);0<X.length?(X=R+": "+
-X.length+" Duplicates: "+X.join(", "),mxLog.debug(X+" (see console)")):mxLog.debug(R+": Checked");var Q={};null==W?mxLog.debug(R+": No root"):(H(W),Object.keys(Q).length!=Object.keys(F).length&&(mxLog.debug(R+": Invalid tree: (see console)"),console.log(R+": Invalid tree",J)))};"<"!=E.charAt(0)&&(E=Graph.decompress(E),mxLog.debug("See console for uncompressed XML"),console.log("xml",E));var D=mxUtils.parseXml(E),G=c.getPagesForNode(D.documentElement,"mxGraphModel");if(null!=G&&0<G.length)try{var N=
-c.getHashValueForPages(G);mxLog.debug("Checksum: ",N)}catch(F){mxLog.debug("Error: ",F.message)}else mxLog.debug("No pages found for checksum");var I=D.getElementsByTagName("root");for(E=0;E<I.length;E++)B(I[E]);mxLog.show()}catch(F){c.handleError(F),null!=window.console&&console.error(F)}});c.showDialog(u.container,620,460,!0,!0);u.init()}));var z=null;c.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=c.pages){var u=new TextareaDialog(c,"Diff/Sync:","",function(E){var B=c.getCurrentFile();
+function(F){function I(P){if(null==S[P]){if(S[P]=!0,null!=L[P]){for(;0<L[P].length;){var R=L[P].pop();I(R)}delete L[P]}}else mxLog.debug(Q+": Visited: "+P)}var Q=F.parentNode.id,X=F.childNodes;F={};for(var L={},U=null,W={},t=0;t<X.length;t++){var C=X[t];if(null!=C.id&&0<C.id.length)if(null==F[C.id]){F[C.id]=C.id;var M=C.getAttribute("parent");null==M?null!=U?mxLog.debug(Q+": Multiple roots: "+C.id):U=C.id:(null==L[M]&&(L[M]=[]),L[M].push(C.id))}else W[C.id]=C.id}X=Object.keys(W);0<X.length?(X=Q+": "+
+X.length+" Duplicates: "+X.join(", "),mxLog.debug(X+" (see console)")):mxLog.debug(Q+": Checked");var S={};null==U?mxLog.debug(Q+": No root"):(I(U),Object.keys(S).length!=Object.keys(F).length&&(mxLog.debug(Q+": Invalid tree: (see console)"),console.log(Q+": Invalid tree",L)))};"<"!=E.charAt(0)&&(E=Graph.decompress(E),mxLog.debug("See console for uncompressed XML"),console.log("xml",E));var D=mxUtils.parseXml(E),G=c.getPagesForNode(D.documentElement,"mxGraphModel");if(null!=G&&0<G.length)try{var H=
+c.getHashValueForPages(G);mxLog.debug("Checksum: ",H)}catch(F){mxLog.debug("Error: ",F.message)}else mxLog.debug("No pages found for checksum");var N=D.getElementsByTagName("root");for(E=0;E<N.length;E++)B(N[E]);mxLog.show()}catch(F){c.handleError(F),null!=window.console&&console.error(F)}});c.showDialog(u.container,620,460,!0,!0);u.init()}));var z=null;c.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=c.pages){var u=new TextareaDialog(c,"Diff/Sync:","",function(E){var B=c.getCurrentFile();
if(0<E.length&&null!=B)try{var D=JSON.parse(E);B.patch([D],null,!0);c.hideDialog()}catch(G){c.handleError(G)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(E,B){z=c.getPagesForXml(c.getFileData(!0));u.textarea.value="Snapshot updated "+(new Date).toLocaleString()+" Checksum "+c.getHashValueForPages(z)}],["Diff",function(E,B){try{u.textarea.value=JSON.stringify(c.diffPages(z,c.pages),null,2)}catch(D){c.handleError(D)}}]]);null==z?(z=c.getPagesForXml(c.getFileData(!0)),u.textarea.value=
"Snapshot created "+(new Date).toLocaleString()+" Checksum "+c.getHashValueForPages(z)):u.textarea.value=JSON.stringify(c.diffPages(z,c.pages),null,2);c.showDialog(u.container,620,460,!0,!0);u.init()}else c.alert("No pages")}));c.actions.addAction("testInspectPages",mxUtils.bind(this,function(){var u=c.getCurrentFile();console.log("editorUi",c,"file",u);if(null!=u&&u.isRealtime()){console.log("Checksum ownPages",c.getHashValueForPages(u.ownPages));console.log("Checksum theirPages",c.getHashValueForPages(u.theirPages));
console.log("diff ownPages/theirPages",c.diffPages(u.ownPages,u.theirPages));var E=u.getShadowPages();null!=E&&(console.log("Checksum shadowPages",c.getHashValueForPages(E)),console.log("diff shadowPages/ownPages",c.diffPages(E,u.ownPages)),console.log("diff ownPages/shadowPages",c.diffPages(u.ownPages,E)),console.log("diff theirPages/shadowPages",c.diffPages(u.theirPages,E)));null!=u.sync&&null!=u.sync.snapshot&&(console.log("Checksum snapshot",c.getHashValueForPages(u.sync.snapshot)),console.log("diff ownPages/snapshot",
c.diffPages(u.ownPages,u.sync.snapshot)),console.log("diff theirPages/snapshot",c.diffPages(u.theirPages,u.sync.snapshot)),null!=c.pages&&console.log("diff snapshot/actualPages",c.diffPages(u.sync.snapshot,c.pages)));null!=c.pages&&(console.log("diff ownPages/actualPages",c.diffPages(u.ownPages,c.pages)),console.log("diff theirPages/actualPages",c.diffPages(u.theirPages,c.pages)))}null!=u&&console.log("Shadow pages",[c.getXmlForPages(u.getShadowPages())]);null!=c.pages&&console.log("Checksum actualPages",
c.getHashValueForPages(c.pages))}));c.actions.addAction("testFixPages",mxUtils.bind(this,function(){console.log("editorUi",c);var u=c.getCurrentFile();null!=u&&u.isRealtime()&&null!=u.shadowPages&&(console.log("patching actualPages to shadowPages",u.patch([c.diffPages(u.shadowPages,c.pages)])),u.ownPages=c.clonePages(c.pages),u.theirPages=c.clonePages(c.pages),u.shadowPages=c.clonePages(c.pages),null!=u.sync&&(u.sync.snapshot=c.clonePages(c.pages)))}));c.actions.addAction("testOptimize",mxUtils.bind(this,
-function(){m.model.beginUpdate();try{var u=m.model.cells,E=0,B=[],D=[],G;for(G in u){var N=u[G],I=m.getCurrentCellStyle(N)[mxConstants.STYLE_IMAGE];null!=I&&"data:"==I.substring(0,5)&&(null==B[I]&&(B[I]=(B[I]||0)+1,E++),D.push(N))}m.setCellStyles(mxConstants.STYLE_IMAGE,null,D);console.log("Removed",E,"image(s) from",D.length,"cell(s): ",[D,B])}finally{m.model.endUpdate()}}));c.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(c,m.getModel())}));c.actions.addAction("testXmlImageExport",
-mxUtils.bind(this,function(){var u=new mxImageExport,E=m.getGraphBounds(),B=m.view.scale,D=mxUtils.createXmlDocument(),G=D.createElement("output");D.appendChild(G);D=new mxXmlCanvas2D(G);D.translate(Math.floor((1-E.x)/B),Math.floor((1-E.y)/B));D.scale(1/B);var N=0,I=D.save;D.save=function(){N++;I.apply(this,arguments)};var F=D.restore;D.restore=function(){N--;F.apply(this,arguments)};var H=u.drawShape;u.drawShape=function(R){mxLog.debug("entering shape",R,N);H.apply(this,arguments);mxLog.debug("leaving shape",
-R,N)};u.drawState(m.getView().getState(m.model.root),D);mxLog.show();mxLog.debug(mxUtils.getXml(G));mxLog.debug("stateCounter",N)}));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(u,E){this.addMenuItems(u,"createSidebarEntry showBoundingBox - testInspectPages testFixPages - testCheckFile testDiff - testInspect testOptimize - testXmlImageExport - testShowConsole".split(" "),
+function(){m.model.beginUpdate();try{var u=m.model.cells,E=0,B=[],D=[],G;for(G in u){var H=u[G],N=m.getCurrentCellStyle(H)[mxConstants.STYLE_IMAGE];null!=N&&"data:"==N.substring(0,5)&&(null==B[N]&&(B[N]=(B[N]||0)+1,E++),D.push(H))}m.setCellStyles(mxConstants.STYLE_IMAGE,null,D);console.log("Removed",E,"image(s) from",D.length,"cell(s): ",[D,B])}finally{m.model.endUpdate()}}));c.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(c,m.getModel())}));c.actions.addAction("testXmlImageExport",
+mxUtils.bind(this,function(){var u=new mxImageExport,E=m.getGraphBounds(),B=m.view.scale,D=mxUtils.createXmlDocument(),G=D.createElement("output");D.appendChild(G);D=new mxXmlCanvas2D(G);D.translate(Math.floor((1-E.x)/B),Math.floor((1-E.y)/B));D.scale(1/B);var H=0,N=D.save;D.save=function(){H++;N.apply(this,arguments)};var F=D.restore;D.restore=function(){H--;F.apply(this,arguments)};var I=u.drawShape;u.drawShape=function(Q){mxLog.debug("entering shape",Q,H);I.apply(this,arguments);mxLog.debug("leaving shape",
+Q,H)};u.drawState(m.getView().getState(m.model.root),D);mxLog.show();mxLog.debug(mxUtils.getXml(G));mxLog.debug("stateCounter",H)}));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(u,E){this.addMenuItems(u,"createSidebarEntry showBoundingBox - testInspectPages testFixPages - testCheckFile testDiff - testInspect testOptimize - testXmlImageExport - testShowConsole".split(" "),
E)})))}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(u){m.isEnabled()&&(u=new mxCell("",new mxGeometry(0,0,120,120),c.defaultCustomShapeStyle),u.vertex=!0,u=new EditShapeDialog(c,
-u,mxResources.get("editShape")+":",630,400),c.showDialog(u.container,640,480,!0,!1),u.init())})).isEnabled=n;c.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(u){c.spinner.stop();c.showHtmlDialog(mxResources.get("create"),"https://www.diagrams.net/doc/faq/embed-html-options",u,function(E,B,D,G,N,I,F,H,R,X,J){c.createHtml(E,B,D,G,N,I,F,H,R,X,J,mxUtils.bind(this,function(W,
-V){var t=new EmbedDialog(c,W+"\n"+V,null,null,function(){var C=window.open(),M=C.document;if(null!=M){"CSS1Compat"===document.compatMode&&M.writeln("<!DOCTYPE html>");M.writeln("<html>");M.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');M.writeln("<body>");M.writeln(W);var Q=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;Q&&M.writeln(V);M.writeln("</body>");M.writeln("</html>");M.close();if(!Q){var P=C.document.createElement("div");
-P.marginLeft="26px";P.marginTop="26px";mxUtils.write(P,mxResources.get("updatingDocument"));Q=C.document.createElement("img");Q.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");Q.style.marginLeft="6px";P.appendChild(Q);C.document.body.insertBefore(P,C.document.body.firstChild);window.setTimeout(function(){var S=document.createElement("script");S.type="text/javascript";S.src=/<script.*?src="(.*?)"/.exec(V)[1];M.body.appendChild(S);P.parentNode.removeChild(P)},
+u,mxResources.get("editShape")+":",630,400),c.showDialog(u.container,640,480,!0,!1),u.init())})).isEnabled=n;c.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(u){c.spinner.stop();c.showHtmlDialog(mxResources.get("create"),"https://www.diagrams.net/doc/faq/embed-html-options",u,function(E,B,D,G,H,N,F,I,Q,X,L){c.createHtml(E,B,D,G,H,N,F,I,Q,X,L,mxUtils.bind(this,function(U,
+W){var t=new EmbedDialog(c,U+"\n"+W,null,null,function(){var C=window.open(),M=C.document;if(null!=M){"CSS1Compat"===document.compatMode&&M.writeln("<!DOCTYPE html>");M.writeln("<html>");M.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');M.writeln("<body>");M.writeln(U);var S=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;S&&M.writeln(W);M.writeln("</body>");M.writeln("</html>");M.close();if(!S){var P=C.document.createElement("div");
+P.marginLeft="26px";P.marginTop="26px";mxUtils.write(P,mxResources.get("updatingDocument"));S=C.document.createElement("img");S.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");S.style.marginLeft="6px";P.appendChild(S);C.document.body.insertBefore(P,C.document.body.firstChild);window.setTimeout(function(){var R=document.createElement("script");R.type="text/javascript";R.src=/<script.*?src="(.*?)"/.exec(W)[1];M.body.appendChild(R);P.parentNode.removeChild(P)},
20)}}else c.handleError({message:mxResources.get("errorUpdatingPreview")})});c.showDialog(t.container,450,240,!0,!0);t.init()}))})})}));c.actions.put("liveImage",new Action("Live image...",function(){var u=c.getCurrentFile();null!=u&&c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(E){c.spinner.stop();null!=E?(E=new EmbedDialog(c,'<img src="'+(u.constructor!=DriveFile?E:"https://drive.google.com/uc?id="+u.getId())+'"/>'),c.showDialog(E.container,
-450,240,!0,!0),E.init()):c.handleError({message:mxResources.get("invalidPublicUrl")})})}));c.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){c.showEmbedImageDialog(function(u,E,B,D,G,N){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedImage(u,E,B,D,G,N,function(I){c.spinner.stop();I=new EmbedDialog(c,I);c.showDialog(I.container,450,240,!0,!0);I.init()},function(I){c.spinner.stop();c.handleError(I)})},mxResources.get("image"),mxResources.get("retina"),
-c.isExportToCanvas())}));c.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){c.showEmbedImageDialog(function(u,E,B,D,G,N){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedSvg(u,E,B,D,G,N,function(I){c.spinner.stop();I=new EmbedDialog(c,I);c.showDialog(I.container,450,240,!0,!0);I.init()},function(I){c.spinner.stop();c.handleError(I)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.diagrams.net/doc/faq/embed-svg.html")}));
-c.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var u=m.getGraphBounds();c.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil(u.height/m.view.scale)+2,function(E,B,D,G,N,I,F,H,R){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(X){c.spinner.stop();var J=[];R&&J.push("tags=%7B%7D");X=new EmbedDialog(c,'<iframe frameborder="0" style="width:'+F+";height:"+H+';" src="'+c.createLink(E,B,D,G,N,I,X,null,
-J)+'"></iframe>');c.showDialog(X.container,450,240,!0,!0);X.init()})},!0)}));c.actions.put("embedNotion",new Action(mxResources.get("notion")+"...",function(){var u=document.createElement("div");u.style.position="absolute";u.style.bottom="30px";u.style.textAlign="center";u.style.width="100%";u.style.left="0px";var E=document.createElement("a");E.setAttribute("href","javascript:void(0);");E.setAttribute("target","_blank");E.style.cursor="pointer";mxUtils.write(E,mxResources.get("getNotionChromeExtension"));
-u.appendChild(E);mxEvent.addListener(E,"click",function(B){c.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");mxEvent.consume(B)});c.showPublishLinkDialog(mxResources.get("notion"),null,null,null,function(B,D,G,N,I,F,H,R,X){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(J){c.spinner.stop();var W=["border=0"];X&&W.push("tags=%7B%7D");J=new EmbedDialog(c,c.createLink(B,D,G,N,I,F,J,null,W,!0));
-c.showDialog(J.container,450,240,!0,!0);J.init()})},!0,"https://www.diagrams.net/blog/drawio-notion",u)}));c.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){c.showPublishLinkDialog(null,null,null,null,function(u,E,B,D,G,N,I,F,H){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(R){c.spinner.stop();var X=[];H&&X.push("tags=%7B%7D");R=new EmbedDialog(c,c.createLink(u,E,B,D,G,N,R,null,X));c.showDialog(R.container,450,240,
-!0,!0);R.init()})})}));c.actions.addAction("microsoftOffice...",function(){c.openLink("https://office.draw.io")});c.actions.addAction("googleDocs...",function(){c.openLink("http://docsaddon.draw.io")});c.actions.addAction("googleSlides...",function(){c.openLink("https://slidesaddon.draw.io")});c.actions.addAction("googleSheets...",function(){c.openLink("https://sheetsaddon.draw.io")});c.actions.addAction("googleSites...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),
+450,240,!0,!0),E.init()):c.handleError({message:mxResources.get("invalidPublicUrl")})})}));c.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){c.showEmbedImageDialog(function(u,E,B,D,G,H){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedImage(u,E,B,D,G,H,function(N){c.spinner.stop();N=new EmbedDialog(c,N);c.showDialog(N.container,450,240,!0,!0);N.init()},function(N){c.spinner.stop();c.handleError(N)})},mxResources.get("image"),mxResources.get("retina"),
+c.isExportToCanvas())}));c.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){c.showEmbedImageDialog(function(u,E,B,D,G,H){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedSvg(u,E,B,D,G,H,function(N){c.spinner.stop();N=new EmbedDialog(c,N);c.showDialog(N.container,450,240,!0,!0);N.init()},function(N){c.spinner.stop();c.handleError(N)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.diagrams.net/doc/faq/embed-svg.html")}));
+c.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var u=m.getGraphBounds();c.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil(u.height/m.view.scale)+2,function(E,B,D,G,H,N,F,I,Q){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(X){c.spinner.stop();var L=[];Q&&L.push("tags=%7B%7D");X=new EmbedDialog(c,'<iframe frameborder="0" style="width:'+F+";height:"+I+';" src="'+c.createLink(E,B,D,G,H,N,X,null,
+L)+'"></iframe>');c.showDialog(X.container,450,240,!0,!0);X.init()})},!0)}));c.actions.put("embedNotion",new Action(mxResources.get("notion")+"...",function(){var u=document.createElement("div");u.style.position="absolute";u.style.bottom="30px";u.style.textAlign="center";u.style.width="100%";u.style.left="0px";var E=document.createElement("a");E.setAttribute("href","javascript:void(0);");E.setAttribute("target","_blank");E.style.cursor="pointer";mxUtils.write(E,mxResources.get("getNotionChromeExtension"));
+u.appendChild(E);mxEvent.addListener(E,"click",function(B){c.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");mxEvent.consume(B)});c.showPublishLinkDialog(mxResources.get("notion"),null,null,null,function(B,D,G,H,N,F,I,Q,X){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(L){c.spinner.stop();var U=["border=0"];X&&U.push("tags=%7B%7D");L=new EmbedDialog(c,c.createLink(B,D,G,H,N,F,L,null,U,!0));
+c.showDialog(L.container,450,240,!0,!0);L.init()})},!0,"https://www.diagrams.net/blog/drawio-notion",u)}));c.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){c.showPublishLinkDialog(null,null,null,null,function(u,E,B,D,G,H,N,F,I){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(Q){c.spinner.stop();var X=[];I&&X.push("tags=%7B%7D");Q=new EmbedDialog(c,c.createLink(u,E,B,D,G,H,Q,null,X));c.showDialog(Q.container,450,240,
+!0,!0);Q.init()})})}));c.actions.addAction("microsoftOffice...",function(){c.openLink("https://office.draw.io")});c.actions.addAction("googleDocs...",function(){c.openLink("http://docsaddon.draw.io")});c.actions.addAction("googleSlides...",function(){c.openLink("https://slidesaddon.draw.io")});c.actions.addAction("googleSheets...",function(){c.openLink("https://sheetsaddon.draw.io")});c.actions.addAction("googleSites...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),
function(u){c.spinner.stop();u=new GoogleSitesDialog(c,u);c.showDialog(u.container,420,256,!0,!0);u.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)l=c.actions.addAction("scratchpad",function(){c.toggleScratchpad()}),l.setToggleAction(!0),l.setSelectedCallback(function(){return null!=c.scratchpad}),"0"!=urlParams.plugins&&c.actions.addAction("plugins...",function(){c.showDialog((new PluginsDialog(c)).container,380,240,!0,!1)});l=c.actions.addAction("search",function(){var u=c.sidebar.isEntryVisible("search");
c.sidebar.showPalette("search",!u);isLocalStorage&&(mxSettings.settings.search=!u,mxSettings.save())});l.label=mxResources.get("searchShapes");l.setToggleAction(!0);l.setSelectedCallback(function(){return c.sidebar.isEntryVisible("search")});"1"==urlParams.embed&&(c.actions.get("save").funct=function(u){m.isEditing()&&m.stopEditing();var E="0"!=urlParams.pages||null!=c.pages&&1<c.pages.length?c.getFileData(!0):mxUtils.getXml(c.editor.getGraphXml());if("json"==urlParams.proto){var B=c.createLoadMessage("save");
B.xml=E;u&&(B.exit=!0);E=JSON.stringify(B)}(window.opener||window.parent).postMessage(E,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(c.editor.modified=!1,c.editor.setStatus(""));u=c.getCurrentFile();null==u||u.constructor==EmbedFile||u.constructor==LocalFile&&null==u.mode||c.saveFile()},c.actions.addAction("saveAndExit",function(){"1"==urlParams.toSvg?c.sendEmbeddedSvgExport():c.actions.get("save").funct(!0)}).label="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),
c.actions.addAction("exit",function(){if("1"==urlParams.embedInline)c.sendEmbeddedSvgExport();else{var u=function(){c.editor.modified=!1;var E="json"==urlParams.proto?JSON.stringify({event:"exit",modified:c.editor.modified}):"";(window.opener||window.parent).postMessage(E,"*")};c.editor.modified?c.confirm(mxResources.get("allChangesLost"),null,u,mxResources.get("cancel"),mxResources.get("discardChanges")):u()}}));this.put("exportAs",new Menu(mxUtils.bind(this,function(u,E){c.isExportToCanvas()?(this.addMenuItems(u,
["exportPng"],E),c.jpgSupported&&this.addMenuItems(u,["exportJpg"],E)):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(u,["exportPng","exportJpg"],E);this.addMenuItems(u,["exportSvg","-"],E);c.isOffline()||c.printPdfExport?this.addMenuItems(u,["exportPdf"],E):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(u,["exportPdf"],E);mxClient.IS_IE||"undefined"===typeof VsdxExport&&c.isOffline()||this.addMenuItems(u,["exportVsdx"],E);this.addMenuItems(u,["-",
-"exportHtml","exportXml","exportUrl"],E);c.isOffline()||(u.addSeparator(E),this.addMenuItem(u,"export",E).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.put("importFrom",new Menu(mxUtils.bind(this,function(u,E){function B(N){N.pickFile(function(I){c.spinner.spin(document.body,mxResources.get("loading"))&&N.getFile(I,function(F){var H="data:image/"==F.getData().substring(0,11)?G(F.getTitle()):"text/xml";/\.svg$/i.test(F.getTitle())&&!c.editor.isDataSvg(F.getData())&&(F.setData(Editor.createSvgDataUri(F.getData())),
-H="image/svg+xml");D(F.getData(),H,F.getTitle())},function(F){c.handleError(F,null!=F?mxResources.get("errorLoadingFile"):null)},N==c.drive)},!0)}var D=mxUtils.bind(this,function(N,I,F){var H=m.view,R=m.getGraphBounds(),X=m.snap(Math.ceil(Math.max(0,R.x/H.scale-H.translate.x)+4*m.gridSize)),J=m.snap(Math.ceil(Math.max(0,(R.y+R.height)/H.scale-H.translate.y)+4*m.gridSize));"data:image/"==N.substring(0,11)?c.loadImage(N,mxUtils.bind(this,function(W){var V=!0,t=mxUtils.bind(this,function(){c.resizeImage(W,
-N,mxUtils.bind(this,function(C,M,Q){C=V?Math.min(1,Math.min(c.maxImageSize/M,c.maxImageSize/Q)):1;c.importFile(N,I,X,J,Math.round(M*C),Math.round(Q*C),F,function(P){c.spinner.stop();m.setSelectionCells(P);m.scrollCellToVisible(m.getSelectionCell())})}),V)});N.length>c.resampleThreshold?c.confirmImageResize(function(C){V=C;t()}):t()}),mxUtils.bind(this,function(){c.handleError({message:mxResources.get("cannotOpenFile")})})):c.importFile(N,I,X,J,0,0,F,function(W){c.spinner.stop();m.setSelectionCells(W);
-m.scrollCellToVisible(m.getSelectionCell())})}),G=mxUtils.bind(this,function(N){var I="text/xml";/\.png$/i.test(N)?I="image/png":/\.jpe?g$/i.test(N)?I="image/jpg":/\.gif$/i.test(N)?I="image/gif":/\.pdf$/i.test(N)&&(I="application/pdf");return I});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?u.addItem(mxResources.get("googleDrive")+"...",null,function(){B(c.drive)},E):v&&"function"===typeof window.DriveClient&&u.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+
+"exportHtml","exportXml","exportUrl"],E);c.isOffline()||(u.addSeparator(E),this.addMenuItem(u,"export",E).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.put("importFrom",new Menu(mxUtils.bind(this,function(u,E){function B(H){H.pickFile(function(N){c.spinner.spin(document.body,mxResources.get("loading"))&&H.getFile(N,function(F){var I="data:image/"==F.getData().substring(0,11)?G(F.getTitle()):"text/xml";/\.svg$/i.test(F.getTitle())&&!c.editor.isDataSvg(F.getData())&&(F.setData(Editor.createSvgDataUri(F.getData())),
+I="image/svg+xml");D(F.getData(),I,F.getTitle())},function(F){c.handleError(F,null!=F?mxResources.get("errorLoadingFile"):null)},H==c.drive)},!0)}var D=mxUtils.bind(this,function(H,N,F){var I=m.view,Q=m.getGraphBounds(),X=m.snap(Math.ceil(Math.max(0,Q.x/I.scale-I.translate.x)+4*m.gridSize)),L=m.snap(Math.ceil(Math.max(0,(Q.y+Q.height)/I.scale-I.translate.y)+4*m.gridSize));"data:image/"==H.substring(0,11)?c.loadImage(H,mxUtils.bind(this,function(U){var W=!0,t=mxUtils.bind(this,function(){c.resizeImage(U,
+H,mxUtils.bind(this,function(C,M,S){C=W?Math.min(1,Math.min(c.maxImageSize/M,c.maxImageSize/S)):1;c.importFile(H,N,X,L,Math.round(M*C),Math.round(S*C),F,function(P){c.spinner.stop();m.setSelectionCells(P);m.scrollCellToVisible(m.getSelectionCell())})}),W)});H.length>c.resampleThreshold?c.confirmImageResize(function(C){W=C;t()}):t()}),mxUtils.bind(this,function(){c.handleError({message:mxResources.get("cannotOpenFile")})})):c.importFile(H,N,X,L,0,0,F,function(U){c.spinner.stop();m.setSelectionCells(U);
+m.scrollCellToVisible(m.getSelectionCell())})}),G=mxUtils.bind(this,function(H){var N="text/xml";/\.png$/i.test(H)?N="image/png":/\.jpe?g$/i.test(H)?N="image/jpg":/\.gif$/i.test(H)?N="image/gif":/\.pdf$/i.test(H)&&(N="application/pdf");return N});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?u.addItem(mxResources.get("googleDrive")+"...",null,function(){B(c.drive)},E):v&&"function"===typeof window.DriveClient&&u.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+
"...)",null,function(){},E,null,!1));null!=c.oneDrive?u.addItem(mxResources.get("oneDrive")+"...",null,function(){B(c.oneDrive)},E):g&&"function"===typeof window.OneDriveClient&&u.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},E,null,!1);null!=c.dropbox?u.addItem(mxResources.get("dropbox")+"...",null,function(){B(c.dropbox)},E):d&&"function"===typeof window.DropboxClient&&u.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,
function(){},E,null,!1);u.addSeparator(E);null!=c.gitHub&&u.addItem(mxResources.get("github")+"...",null,function(){B(c.gitHub)},E);null!=c.gitLab&&u.addItem(mxResources.get("gitlab")+"...",null,function(){B(c.gitLab)},E);null!=c.trello?u.addItem(mxResources.get("trello")+"...",null,function(){B(c.trello)},E):k&&"function"===typeof window.TrelloClient&&u.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},E,null,!1);u.addSeparator(E);isLocalStorage&&"0"!=urlParams.browser&&
-u.addItem(mxResources.get("browser")+"...",null,function(){c.importLocalFile(!1)},E);"1"!=urlParams.noDevice&&u.addItem(mxResources.get("device")+"...",null,function(){c.importLocalFile(!0)},E);c.isOffline()||(u.addSeparator(E),u.addItem(mxResources.get("url")+"...",null,function(){var N=new FilenameDialog(c,"",mxResources.get("import"),function(I){if(null!=I&&0<I.length&&c.spinner.spin(document.body,mxResources.get("loading"))){var F=/(\.png)($|\?)/i.test(I)?"image/png":"text/xml";c.editor.loadUrl(PROXY_URL+
-"?url="+encodeURIComponent(I),function(H){D(H,F,I)},function(){c.spinner.stop();c.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==F)}},mxResources.get("url"));c.showDialog(N.container,300,80,!0,!0);N.init()},E))}))).isEnabled=n;this.put("theme",new Menu(mxUtils.bind(this,function(u,E){var B="1"==urlParams.sketch?"sketch":mxSettings.getUi(),D=u.addItem(mxResources.get("automatic"),null,function(){mxSettings.setUi("");c.alert(mxResources.get("restartForChangeRequired"))},E);"kennedy"!=
+u.addItem(mxResources.get("browser")+"...",null,function(){c.importLocalFile(!1)},E);"1"!=urlParams.noDevice&&u.addItem(mxResources.get("device")+"...",null,function(){c.importLocalFile(!0)},E);c.isOffline()||(u.addSeparator(E),u.addItem(mxResources.get("url")+"...",null,function(){var H=new FilenameDialog(c,"",mxResources.get("import"),function(N){if(null!=N&&0<N.length&&c.spinner.spin(document.body,mxResources.get("loading"))){var F=/(\.png)($|\?)/i.test(N)?"image/png":"text/xml";c.editor.loadUrl(PROXY_URL+
+"?url="+encodeURIComponent(N),function(I){D(I,F,N)},function(){c.spinner.stop();c.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==F)}},mxResources.get("url"));c.showDialog(H.container,300,80,!0,!0);H.init()},E))}))).isEnabled=n;this.put("theme",new Menu(mxUtils.bind(this,function(u,E){var B="1"==urlParams.sketch?"sketch":mxSettings.getUi(),D=u.addItem(mxResources.get("automatic"),null,function(){mxSettings.setUi("");c.alert(mxResources.get("restartForChangeRequired"))},E);"kennedy"!=
B&&"atlas"!=B&&"dark"!=B&&"min"!=B&&"sketch"!=B&&u.addCheckmark(D,Editor.checkmarkImage);u.addSeparator(E);D=u.addItem(mxResources.get("default"),null,function(){mxSettings.setUi("kennedy");c.alert(mxResources.get("restartForChangeRequired"))},E);"kennedy"==B&&u.addCheckmark(D,Editor.checkmarkImage);D=u.addItem(mxResources.get("minimal"),null,function(){mxSettings.setUi("min");c.alert(mxResources.get("restartForChangeRequired"))},E);"min"==B&&u.addCheckmark(D,Editor.checkmarkImage);D=u.addItem(mxResources.get("atlas"),
null,function(){mxSettings.setUi("atlas");c.alert(mxResources.get("restartForChangeRequired"))},E);"atlas"==B&&u.addCheckmark(D,Editor.checkmarkImage);if("dark"==B||!mxClient.IS_IE&&!mxClient.IS_IE11)D=u.addItem(mxResources.get("dark"),null,function(){mxSettings.setUi("dark");c.alert(mxResources.get("restartForChangeRequired"))},E),"dark"==B&&u.addCheckmark(D,Editor.checkmarkImage);u.addSeparator(E);D=u.addItem(mxResources.get("sketch"),null,function(){mxSettings.setUi("sketch");c.alert(mxResources.get("restartForChangeRequired"))},
E);"sketch"==B&&u.addCheckmark(D,Editor.checkmarkImage)})));l=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var u=this.editorUi.getCurrentFile();if(null!=u)if(u.constructor==LocalFile&&null!=u.fileHandle)c.showSaveFilePicker(mxUtils.bind(c,function(B,D){u.invalidFileHandle=null;u.fileHandle=B;u.title=D.name;u.desc=D;c.save(D.name)}),null,c.createFileSystemOptions(u.getTitle()));else{var E=null!=u.getTitle()?u.getTitle():this.editorUi.defaultFilename;E=new FilenameDialog(this.editorUi,
E,mxResources.get("rename"),mxUtils.bind(this,function(B){null!=B&&0<B.length&&null!=u&&B!=u.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&u.rename(B,mxUtils.bind(this,function(D){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(D){this.editorUi.handleError(D,null!=D?mxResources.get("errorRenamingFile"):null)}))}),u.constructor==DriveFile||u.constructor==StorageFile?mxResources.get("diagramName"):null,function(B){if(null!=B&&0<B.length)return!0;c.showError(mxResources.get("error"),
mxResources.get("invalidName"),mxResources.get("ok"));return!1},null,null,null,null,c.editor.fileExtensions);this.editorUi.showDialog(E.container,340,96,!0,!0);E.init()}}));l.isEnabled=function(){return this.enabled&&n.apply(this,arguments)};l.visible="1"!=urlParams.embed;c.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var u=c.getCurrentFile();if(null!=u){var E=c.getCopyFilename(u);u.constructor==DriveFile?(E=new CreateDialog(c,E,mxUtils.bind(this,function(B,D){"_blank"==D?c.editor.editAsNew(c.getFileData(),
-B):("download"==D&&(D=App.MODE_GOOGLE),null!=B&&0<B.length&&(D==App.MODE_GOOGLE?c.spinner.spin(document.body,mxResources.get("saving"))&&u.saveAs(B,mxUtils.bind(this,function(G){u.desc=G;u.save(!1,mxUtils.bind(this,function(){c.spinner.stop();u.setModified(!1);u.addAllSavedStatus()}),mxUtils.bind(this,function(N){c.handleError(N)}))}),mxUtils.bind(this,function(G){c.handleError(G)})):c.createFile(B,c.getFileData(!0),null,D)))}),mxUtils.bind(this,function(){c.hideDialog()}),mxResources.get("makeCopy"),
-mxResources.get("create"),null,null,!0,null,!0,null,null,null,null,c.editor.fileExtensions),c.showDialog(E.container,420,380,!0,!0),E.init()):c.editor.editAsNew(this.editorUi.getFileData(!0),E)}}));c.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var u=c.getCurrentFile();if(u.getMode()==App.MODE_GOOGLE||u.getMode()==App.MODE_ONEDRIVE){var E=!1;if(u.getMode()==App.MODE_GOOGLE&&null!=u.desc.parents)for(var B=0;B<u.desc.parents.length;B++)if(u.desc.parents[B].isRoot){E=!0;break}c.pickFolder(u.getMode(),
-mxUtils.bind(this,function(D){c.spinner.spin(document.body,mxResources.get("moving"))&&u.move(D,mxUtils.bind(this,function(G){c.spinner.stop()}),mxUtils.bind(this,function(G){c.handleError(G)}))}),null,!0,E)}}));this.put("publish",new Menu(mxUtils.bind(this,function(u,E){this.addMenuItems(u,["publishLink"],E)})));c.actions.put("useOffline",new Action(mxResources.get("useOffline")+"...",function(){c.openLink("https://app.draw.io/")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){try{var u=
-c.getCurrentFile();null!=u&&u.share()}catch(E){c.handleError(E)}}));this.put("embed",new Menu(mxUtils.bind(this,function(u,E){var B=c.getCurrentFile();null==B||B.getMode()!=App.MODE_GOOGLE&&B.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(B.getTitle())||this.addMenuItems(u,["liveImage","-"],E);this.addMenuItems(u,["embedImage","embedSvg","-","embedHtml"],E);navigator.standalone||c.isOffline()||this.addMenuItems(u,["embedIframe"],E);"1"==urlParams.embed||c.isOffline()||this.addMenuItems(u,"- googleDocs googleSlides googleSheets - microsoftOffice - embedNotion".split(" "),
-E)})));c.addInsertItem=function(u,E,B,D){("plantUml"!=D||EditorUi.enablePlantUml&&!c.isOffline())&&u.addItem(B,null,mxUtils.bind(this,function(){if("fromText"==D||"formatSql"==D||"plantUml"==D||"mermaid"==D){var G=new ParseDialog(c,B,D);c.showDialog(G.container,620,420,!0,!1);c.dialog.container.style.overflow="auto"}else G=new CreateGraphDialog(c,B,D),c.showDialog(G.container,620,420,!0,!1);G.init()}),E,null,n())};var A=function(u,E,B,D){var G=new mxCell(u,new mxGeometry(0,0,E,B),D);G.vertex=!0;u=
-m.getCenterInsertPoint(m.getBoundingBoxFromGeometry([G],!0));G.geometry.x=u.x;G.geometry.y=u.y;m.getModel().beginUpdate();try{G=m.addCell(G),m.fireEvent(new mxEventObject("cellsInserted","cells",[G]))}finally{m.getModel().endUpdate()}m.scrollCellToVisible(G);m.setSelectionCell(G);m.container.focus();m.editAfterInsert&&m.startEditing(G);window.setTimeout(function(){null!=c.hoverIcons&&c.hoverIcons.update(m.view.getState(G))},0);return G};c.actions.put("insertText",new Action(mxResources.get("text"),
-function(){m.isEnabled()&&!m.isCellLocked(m.getDefaultParent())&&m.startEditingAtCell(A("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;"))}),null,null,Editor.ctrlKey+"+Shift+X").isEnabled=n;c.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(){m.isEnabled()&&!m.isCellLocked(m.getDefaultParent())&&A("",120,60,"whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+K").isEnabled=n;c.actions.put("insertEllipse",
-new Action(mxResources.get("ellipse"),function(){m.isEnabled()&&!m.isCellLocked(m.getDefaultParent())&&A("",80,80,"ellipse;whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+Shift+K").isEnabled=n;c.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(){m.isEnabled()&&!m.isCellLocked(m.getDefaultParent())&&A("",80,80,"rhombus;whiteSpace=wrap;html=1;")})).isEnabled=n;c.addInsertMenuItems=mxUtils.bind(this,function(u,E,B){for(var D=0;D<B.length;D++)"-"==B[D]?u.addSeparator(E):
-c.addInsertItem(u,E,mxResources.get(B[D])+"...",B[D])});this.put("insert",new Menu(mxUtils.bind(this,function(u,E){this.addMenuItems(u,"insertRectangle insertEllipse insertRhombus - insertText insertLink - createShape insertFreehand - insertImage".split(" "),E);c.insertTemplateEnabled&&!c.isOffline()&&this.addMenuItems(u,["insertTemplate"],E);u.addSeparator(E);this.addSubmenu("insertLayout",u,E,mxResources.get("layout"));this.addSubmenu("insertAdvanced",u,E,mxResources.get("advanced"))})));this.put("insertLayout",
-new Menu(mxUtils.bind(this,function(u,E){c.addInsertMenuItems(u,E,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(u,E){c.addInsertMenuItems(u,E,["fromText","plantUml","mermaid","-","formatSql"]);u.addItem(mxResources.get("csv")+"...",null,function(){c.showImportCsvDialog()},E,null,n())})));this.put("openRecent",new Menu(function(u,E){var B=c.getRecent();if(null!=B){for(var D=0;D<B.length;D++)(function(G){var N=
-G.mode;N==App.MODE_GOOGLE?N="googleDrive":N==App.MODE_ONEDRIVE&&(N="oneDrive");u.addItem(G.title+" ("+mxResources.get(N)+")",null,function(){c.loadFile(G.id)},E)})(B[D]);u.addSeparator(E)}u.addItem(mxResources.get("reset"),null,function(){c.resetRecent()},E)}));this.put("openFrom",new Menu(function(u,E){null!=c.drive?u.addItem(mxResources.get("googleDrive")+"...",null,function(){c.pickFile(App.MODE_GOOGLE)},E):v&&"function"===typeof window.DriveClient&&u.addItem(mxResources.get("googleDrive")+" ("+
-mxResources.get("loading")+"...)",null,function(){},E,null,!1);null!=c.oneDrive?u.addItem(mxResources.get("oneDrive")+"...",null,function(){c.pickFile(App.MODE_ONEDRIVE)},E):g&&"function"===typeof window.OneDriveClient&&u.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},E,null,!1);null!=c.dropbox?u.addItem(mxResources.get("dropbox")+"...",null,function(){c.pickFile(App.MODE_DROPBOX)},E):d&&"function"===typeof window.DropboxClient&&u.addItem(mxResources.get("dropbox")+
-" ("+mxResources.get("loading")+"...)",null,function(){},E,null,!1);u.addSeparator(E);null!=c.gitHub&&u.addItem(mxResources.get("github")+"...",null,function(){c.pickFile(App.MODE_GITHUB)},E);null!=c.gitLab&&u.addItem(mxResources.get("gitlab")+"...",null,function(){c.pickFile(App.MODE_GITLAB)},E);null!=c.trello?u.addItem(mxResources.get("trello")+"...",null,function(){c.pickFile(App.MODE_TRELLO)},E):k&&"function"===typeof window.TrelloClient&&u.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+
-"...)",null,function(){},E,null,!1);u.addSeparator(E);isLocalStorage&&"0"!=urlParams.browser&&u.addItem(mxResources.get("browser")+"...",null,function(){c.pickFile(App.MODE_BROWSER)},E);"1"!=urlParams.noDevice&&u.addItem(mxResources.get("device")+"...",null,function(){c.pickFile(App.MODE_DEVICE)},E);c.isOffline()||(u.addSeparator(E),u.addItem(mxResources.get("url")+"...",null,function(){var B=new FilenameDialog(c,"",mxResources.get("open"),function(D){null!=D&&0<D.length&&(null==c.getCurrentFile()?
-window.location.hash="#U"+encodeURIComponent(D):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(D)))},mxResources.get("url"));c.showDialog(B.container,300,80,!0,!0);B.init()},E))}));Editor.enableCustomLibraries&&(this.put("newLibrary",new Menu(function(u,E){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?u.addItem(mxResources.get("googleDrive")+"...",null,function(){c.showLibraryDialog(null,
-null,null,null,App.MODE_GOOGLE)},E):v&&"function"===typeof window.DriveClient&&u.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},E,null,!1));null!=c.oneDrive?u.addItem(mxResources.get("oneDrive")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},E):g&&"function"===typeof window.OneDriveClient&&u.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},E,null,!1);null!=c.dropbox?u.addItem(mxResources.get("dropbox")+
-"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},E):d&&"function"===typeof window.DropboxClient&&u.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},E,null,!1);u.addSeparator(E);null!=c.gitHub&&u.addItem(mxResources.get("github")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},E);null!=c.gitLab&&u.addItem(mxResources.get("gitlab")+"...",null,function(){c.showLibraryDialog(null,null,null,null,
-App.MODE_GITLAB)},E);null!=c.trello?u.addItem(mxResources.get("trello")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},E):k&&"function"===typeof window.TrelloClient&&u.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},E,null,!1);u.addSeparator(E);isLocalStorage&&"0"!=urlParams.browser&&u.addItem(mxResources.get("browser")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},E);"1"!=urlParams.noDevice&&
-u.addItem(mxResources.get("device")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},E)})),this.put("openLibraryFrom",new Menu(function(u,E){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?u.addItem(mxResources.get("googleDrive")+"...",null,function(){c.pickLibrary(App.MODE_GOOGLE)},E):v&&"function"===typeof window.DriveClient&&u.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},E,null,!1));
-null!=c.oneDrive?u.addItem(mxResources.get("oneDrive")+"...",null,function(){c.pickLibrary(App.MODE_ONEDRIVE)},E):g&&"function"===typeof window.OneDriveClient&&u.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},E,null,!1);null!=c.dropbox?u.addItem(mxResources.get("dropbox")+"...",null,function(){c.pickLibrary(App.MODE_DROPBOX)},E):d&&"function"===typeof window.DropboxClient&&u.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,
-function(){},E,null,!1);u.addSeparator(E);null!=c.gitHub&&u.addItem(mxResources.get("github")+"...",null,function(){c.pickLibrary(App.MODE_GITHUB)},E);null!=c.gitLab&&u.addItem(mxResources.get("gitlab")+"...",null,function(){c.pickLibrary(App.MODE_GITLAB)},E);null!=c.trello?u.addItem(mxResources.get("trello")+"...",null,function(){c.pickLibrary(App.MODE_TRELLO)},E):k&&"function"===typeof window.TrelloClient&&u.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},
-E,null,!1);u.addSeparator(E);isLocalStorage&&"0"!=urlParams.browser&&u.addItem(mxResources.get("browser")+"...",null,function(){c.pickLibrary(App.MODE_BROWSER)},E);"1"!=urlParams.noDevice&&u.addItem(mxResources.get("device")+"...",null,function(){c.pickLibrary(App.MODE_DEVICE)},E);c.isOffline()||(u.addSeparator(E),u.addItem(mxResources.get("url")+"...",null,function(){var B=new FilenameDialog(c,"",mxResources.get("open"),function(D){if(null!=D&&0<D.length&&c.spinner.spin(document.body,mxResources.get("loading"))){var G=
-D;c.editor.isCorsEnabledForUrl(D)||(G=PROXY_URL+"?url="+encodeURIComponent(D));mxUtils.get(G,function(N){if(200<=N.getStatus()&&299>=N.getStatus()){c.spinner.stop();try{c.loadLibrary(new UrlLibrary(this,N.getText(),D))}catch(I){c.handleError(I,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()},E));"1"==urlParams.confLib&&(u.addSeparator(E),u.addItem(mxResources.get("confluenceCloud")+"...",null,function(){c.showRemotelyStoredLibrary(mxResources.get("libraries"))},E))})));this.put("edit",new Menu(mxUtils.bind(this,function(u,E){this.addMenuItems(u,"undo redo - cut copy copyAsImage paste delete - duplicate - findReplace - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));
+B):("download"==D&&(D=App.MODE_GOOGLE),null!=B&&0<B.length&&(D==App.MODE_GOOGLE?c.spinner.spin(document.body,mxResources.get("saving"))&&u.saveAs(B,mxUtils.bind(this,function(G){u.desc=G;u.save(!1,mxUtils.bind(this,function(){c.spinner.stop();u.setModified(!1);u.addAllSavedStatus()}),mxUtils.bind(this,function(H){c.handleError(H)}))}),mxUtils.bind(this,function(G){c.handleError(G)})):c.createFile(B,c.getFileData(!0),null,D)))}),mxUtils.bind(this,function(){c.hideDialog()}),mxResources.get("makeCopy"),
+mxResources.get("create"),null,null,!0,null,!0,null,null,null,null,c.editor.fileExtensions),c.showDialog(E.container,420,380,!0,!0),E.init()):c.editor.editAsNew(this.editorUi.getFileData(!0),E)}}));c.actions.put("openFolder",new Action(mxResources.get("openIt",[mxResources.get("folder")])+"...",function(u,E){c.appIconClicked(E)}));c.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var u=c.getCurrentFile();if(u.getMode()==App.MODE_GOOGLE||u.getMode()==App.MODE_ONEDRIVE){var E=!1;if(u.getMode()==
+App.MODE_GOOGLE&&null!=u.desc.parents)for(var B=0;B<u.desc.parents.length;B++)if(u.desc.parents[B].isRoot){E=!0;break}c.pickFolder(u.getMode(),mxUtils.bind(this,function(D){c.spinner.spin(document.body,mxResources.get("moving"))&&u.move(D,mxUtils.bind(this,function(G){c.spinner.stop()}),mxUtils.bind(this,function(G){c.handleError(G)}))}),null,!0,E)}}));this.put("publish",new Menu(mxUtils.bind(this,function(u,E){this.addMenuItems(u,["publishLink"],E)})));c.actions.put("useOffline",new Action(mxResources.get("useOffline")+
+"...",function(){c.openLink("https://app.draw.io/")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){try{var u=c.getCurrentFile();null!=u&&u.share()}catch(E){c.handleError(E)}}));this.put("embed",new Menu(mxUtils.bind(this,function(u,E){var B=c.getCurrentFile();null==B||B.getMode()!=App.MODE_GOOGLE&&B.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(B.getTitle())||this.addMenuItems(u,["liveImage","-"],E);this.addMenuItems(u,["embedImage","embedSvg","-","embedHtml"],E);navigator.standalone||
+c.isOffline()||this.addMenuItems(u,["embedIframe"],E);"1"==urlParams.embed||c.isOffline()||this.addMenuItems(u,"- googleDocs googleSlides googleSheets - microsoftOffice - embedNotion".split(" "),E)})));c.addInsertItem=function(u,E,B,D){("plantUml"!=D||EditorUi.enablePlantUml&&!c.isOffline())&&u.addItem(B,null,mxUtils.bind(this,function(){if("fromText"==D||"formatSql"==D||"plantUml"==D||"mermaid"==D){var G=new ParseDialog(c,B,D);c.showDialog(G.container,620,420,!0,!1);c.dialog.container.style.overflow=
+"auto"}else G=new CreateGraphDialog(c,B,D),c.showDialog(G.container,620,420,!0,!1);G.init()}),E,null,n())};var A=function(u,E,B,D){var G=new mxCell(u,new mxGeometry(0,0,E,B),D);G.vertex=!0;u=m.getCenterInsertPoint(m.getBoundingBoxFromGeometry([G],!0));G.geometry.x=u.x;G.geometry.y=u.y;m.getModel().beginUpdate();try{G=m.addCell(G),m.fireEvent(new mxEventObject("cellsInserted","cells",[G]))}finally{m.getModel().endUpdate()}m.scrollCellToVisible(G);m.setSelectionCell(G);m.container.focus();m.editAfterInsert&&
+m.startEditing(G);window.setTimeout(function(){null!=c.hoverIcons&&c.hoverIcons.update(m.view.getState(G))},0);return G};c.actions.put("insertText",new Action(mxResources.get("text"),function(){m.isEnabled()&&!m.isCellLocked(m.getDefaultParent())&&m.startEditingAtCell(A("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;"))}),null,null,Editor.ctrlKey+"+Shift+X").isEnabled=n;c.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),
+function(){m.isEnabled()&&!m.isCellLocked(m.getDefaultParent())&&A("",120,60,"whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+K").isEnabled=n;c.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(){m.isEnabled()&&!m.isCellLocked(m.getDefaultParent())&&A("",80,80,"ellipse;whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+Shift+K").isEnabled=n;c.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(){m.isEnabled()&&!m.isCellLocked(m.getDefaultParent())&&
+A("",80,80,"rhombus;whiteSpace=wrap;html=1;")})).isEnabled=n;c.addInsertMenuItems=mxUtils.bind(this,function(u,E,B){for(var D=0;D<B.length;D++)"-"==B[D]?u.addSeparator(E):c.addInsertItem(u,E,mxResources.get(B[D])+"...",B[D])});this.put("insert",new Menu(mxUtils.bind(this,function(u,E){this.addMenuItems(u,"insertRectangle insertEllipse insertRhombus - insertText insertLink - createShape insertFreehand - insertImage".split(" "),E);c.insertTemplateEnabled&&!c.isOffline()&&this.addMenuItems(u,["insertTemplate"],
+E);u.addSeparator(E);this.addSubmenu("insertLayout",u,E,mxResources.get("layout"));this.addSubmenu("insertAdvanced",u,E,mxResources.get("advanced"))})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(u,E){c.addInsertMenuItems(u,E,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(u,E){c.addInsertMenuItems(u,E,["fromText","plantUml","mermaid","-","formatSql"]);u.addItem(mxResources.get("csv")+
+"...",null,function(){c.showImportCsvDialog()},E,null,n())})));this.put("openRecent",new Menu(function(u,E){var B=c.getRecent();if(null!=B){for(var D=0;D<B.length;D++)(function(G){var H=G.mode;H==App.MODE_GOOGLE?H="googleDrive":H==App.MODE_ONEDRIVE&&(H="oneDrive");u.addItem(G.title+" ("+mxResources.get(H)+")",null,function(){c.loadFile(G.id)},E)})(B[D]);u.addSeparator(E)}u.addItem(mxResources.get("reset"),null,function(){c.resetRecent()},E)}));this.put("openFrom",new Menu(function(u,E){null!=c.drive?
+u.addItem(mxResources.get("googleDrive")+"...",null,function(){c.pickFile(App.MODE_GOOGLE)},E):v&&"function"===typeof window.DriveClient&&u.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},E,null,!1);null!=c.oneDrive?u.addItem(mxResources.get("oneDrive")+"...",null,function(){c.pickFile(App.MODE_ONEDRIVE)},E):g&&"function"===typeof window.OneDriveClient&&u.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},E,
+null,!1);null!=c.dropbox?u.addItem(mxResources.get("dropbox")+"...",null,function(){c.pickFile(App.MODE_DROPBOX)},E):d&&"function"===typeof window.DropboxClient&&u.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},E,null,!1);u.addSeparator(E);null!=c.gitHub&&u.addItem(mxResources.get("github")+"...",null,function(){c.pickFile(App.MODE_GITHUB)},E);null!=c.gitLab&&u.addItem(mxResources.get("gitlab")+"...",null,function(){c.pickFile(App.MODE_GITLAB)},E);null!=
+c.trello?u.addItem(mxResources.get("trello")+"...",null,function(){c.pickFile(App.MODE_TRELLO)},E):k&&"function"===typeof window.TrelloClient&&u.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},E,null,!1);u.addSeparator(E);isLocalStorage&&"0"!=urlParams.browser&&u.addItem(mxResources.get("browser")+"...",null,function(){c.pickFile(App.MODE_BROWSER)},E);"1"!=urlParams.noDevice&&u.addItem(mxResources.get("device")+"...",null,function(){c.pickFile(App.MODE_DEVICE)},
+E);c.isOffline()||(u.addSeparator(E),u.addItem(mxResources.get("url")+"...",null,function(){var B=new FilenameDialog(c,"",mxResources.get("open"),function(D){null!=D&&0<D.length&&(null==c.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(D):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(D)))},mxResources.get("url"));c.showDialog(B.container,300,80,!0,!0);B.init()},E))}));Editor.enableCustomLibraries&&
+(this.put("newLibrary",new Menu(function(u,E){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?u.addItem(mxResources.get("googleDrive")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},E):v&&"function"===typeof window.DriveClient&&u.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},E,null,!1));null!=c.oneDrive?u.addItem(mxResources.get("oneDrive")+"...",null,function(){c.showLibraryDialog(null,
+null,null,null,App.MODE_ONEDRIVE)},E):g&&"function"===typeof window.OneDriveClient&&u.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},E,null,!1);null!=c.dropbox?u.addItem(mxResources.get("dropbox")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},E):d&&"function"===typeof window.DropboxClient&&u.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},E,null,!1);u.addSeparator(E);null!=
+c.gitHub&&u.addItem(mxResources.get("github")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},E);null!=c.gitLab&&u.addItem(mxResources.get("gitlab")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_GITLAB)},E);null!=c.trello?u.addItem(mxResources.get("trello")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},E):k&&"function"===typeof window.TrelloClient&&u.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+
+"...)",null,function(){},E,null,!1);u.addSeparator(E);isLocalStorage&&"0"!=urlParams.browser&&u.addItem(mxResources.get("browser")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},E);"1"!=urlParams.noDevice&&u.addItem(mxResources.get("device")+"...",null,function(){c.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},E)})),this.put("openLibraryFrom",new Menu(function(u,E){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?u.addItem(mxResources.get("googleDrive")+
+"...",null,function(){c.pickLibrary(App.MODE_GOOGLE)},E):v&&"function"===typeof window.DriveClient&&u.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},E,null,!1));null!=c.oneDrive?u.addItem(mxResources.get("oneDrive")+"...",null,function(){c.pickLibrary(App.MODE_ONEDRIVE)},E):g&&"function"===typeof window.OneDriveClient&&u.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},E,null,!1);null!=c.dropbox?u.addItem(mxResources.get("dropbox")+
+"...",null,function(){c.pickLibrary(App.MODE_DROPBOX)},E):d&&"function"===typeof window.DropboxClient&&u.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},E,null,!1);u.addSeparator(E);null!=c.gitHub&&u.addItem(mxResources.get("github")+"...",null,function(){c.pickLibrary(App.MODE_GITHUB)},E);null!=c.gitLab&&u.addItem(mxResources.get("gitlab")+"...",null,function(){c.pickLibrary(App.MODE_GITLAB)},E);null!=c.trello?u.addItem(mxResources.get("trello")+"...",
+null,function(){c.pickLibrary(App.MODE_TRELLO)},E):k&&"function"===typeof window.TrelloClient&&u.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},E,null,!1);u.addSeparator(E);isLocalStorage&&"0"!=urlParams.browser&&u.addItem(mxResources.get("browser")+"...",null,function(){c.pickLibrary(App.MODE_BROWSER)},E);"1"!=urlParams.noDevice&&u.addItem(mxResources.get("device")+"...",null,function(){c.pickLibrary(App.MODE_DEVICE)},E);c.isOffline()||(u.addSeparator(E),
+u.addItem(mxResources.get("url")+"...",null,function(){var B=new FilenameDialog(c,"",mxResources.get("open"),function(D){if(null!=D&&0<D.length&&c.spinner.spin(document.body,mxResources.get("loading"))){var G=D;c.editor.isCorsEnabledForUrl(D)||(G=PROXY_URL+"?url="+encodeURIComponent(D));mxUtils.get(G,function(H){if(200<=H.getStatus()&&299>=H.getStatus()){c.spinner.stop();try{c.loadLibrary(new UrlLibrary(this,H.getText(),D))}catch(N){c.handleError(N,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()},E));"1"==urlParams.confLib&&(u.addSeparator(E),u.addItem(mxResources.get("confluenceCloud")+"...",null,function(){c.showRemotelyStoredLibrary(mxResources.get("libraries"))},E))})));this.put("edit",new Menu(mxUtils.bind(this,function(u,E){this.addMenuItems(u,"undo redo - cut copy copyAsImage paste delete - duplicate - findReplace - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));
l=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 u=!this.commentsWindow.window.isVisible();
-this.commentsWindow.window.setVisible(u);this.commentsWindow.refreshCommentsTime();u&&this.commentsWindow.hasError&&this.commentsWindow.refreshComments()}}));l.setToggleAction(!0);l.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)}));l=this.get("viewPanels");var K=l.funct;l.funct=
-function(u,E){K.apply(this,arguments);c.menus.addMenuItems(u,["tags"],E);c.commentsSupported()&&c.menus.addMenuItems(u,["comments"],E)};this.put("view",new Menu(mxUtils.bind(this,function(u,E){this.addMenuItems(u,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers","tags"]).concat(c.commentsSupported()?["comments","-"]:["-"]));this.addMenuItems(u,["-","search"],E);if(isLocalStorage||mxClient.IS_CHROMEAPP){var B=this.addMenuItem(u,"scratchpad",E);(!c.isOffline()||mxClient.IS_CHROMEAPP||
+this.commentsWindow.window.setVisible(u);this.commentsWindow.refreshCommentsTime();u&&this.commentsWindow.hasError&&this.commentsWindow.refreshComments()}}));l.setToggleAction(!0);l.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)}));l=this.get("viewPanels");var J=l.funct;l.funct=
+function(u,E){J.apply(this,arguments);c.menus.addMenuItems(u,["tags"],E);c.commentsSupported()&&c.menus.addMenuItems(u,["comments"],E)};this.put("view",new Menu(mxUtils.bind(this,function(u,E){this.addMenuItems(u,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers","tags"]).concat(c.commentsSupported()?["comments","-"]:["-"]));this.addMenuItems(u,["-","search"],E);if(isLocalStorage||mxClient.IS_CHROMEAPP){var B=this.addMenuItem(u,"scratchpad",E);(!c.isOffline()||mxClient.IS_CHROMEAPP||
EditorUi.isElectronApp)&&this.addLinkToItem(B,"https://www.diagrams.net/doc/faq/scratchpad")}this.addMenuItems(u,["shapes","-","pageView","pageScale"]);this.addSubmenu("units",u,E);this.addMenuItems(u,"- scrollbars tooltips ruler - grid guides".split(" "),E);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(u,"shadowVisible",E);this.addMenuItems(u,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),E);"1"!=urlParams.sketch&&this.addMenuItems(u,
-["-","fullscreen"],E)})));if(EditorUi.isElectronApp){var O="1"==urlParams.enableSpellCheck;l=c.actions.addAction("spellCheck",function(){c.toggleSpellCheck();O=!O;c.alert(mxResources.get("restartForChangeRequired"))});l.setToggleAction(!0);l.setSelectedCallback(function(){return O});var L="1"==urlParams.enableStoreBkp;l=c.actions.addAction("autoBkp",function(){c.toggleStoreBkp();L=!L});l.setToggleAction(!0);l.setSelectedCallback(function(){return L});c.actions.addAction("openDevTools",function(){c.openDevTools()});
+["-","fullscreen"],E)})));if(EditorUi.isElectronApp){var O="1"==urlParams.enableSpellCheck;l=c.actions.addAction("spellCheck",function(){c.toggleSpellCheck();O=!O;c.alert(mxResources.get("restartForChangeRequired"))});l.setToggleAction(!0);l.setSelectedCallback(function(){return O});var K="1"==urlParams.enableStoreBkp;l=c.actions.addAction("autoBkp",function(){c.toggleStoreBkp();K=!K});l.setToggleAction(!0);l.setSelectedCallback(function(){return K});c.actions.addAction("openDevTools",function(){c.openDevTools()});
c.actions.addAction("drafts...",function(){var u=new FilenameDialog(c,EditorUi.draftSaveDelay/1E3+"",mxResources.get("apply"),mxUtils.bind(this,function(E){E=parseInt(E);0<=E&&(EditorUi.draftSaveDelay=1E3*E,EditorUi.enableDrafts=0<E,mxSettings.setDraftSaveDelay(E),mxSettings.save())}),mxResources.get("draftSaveInt"),null,null,null,null,null,null,50,250);c.showDialog(u.container,320,80,!0,!0);u.init()})}this.put("extras",new Menu(mxUtils.bind(this,function(u,E){"1"==urlParams.noLangIcon&&(this.addSubmenu("language",
u,E),u.addSeparator(E));"1"!=urlParams.embed&&(this.addSubmenu("theme",u,E),u.addSeparator(E));if("undefined"!==typeof MathJax){var B=this.addMenuItem(u,"mathematicalTypesetting",E);(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(B,"https://www.diagrams.net/doc/faq/math-typesetting")}EditorUi.isElectronApp&&this.addMenuItems(u,["spellCheck","autoBkp","drafts"],E);this.addMenuItems(u,["copyConnect","collapseExpand","-"],E);"1"!=urlParams.embed&&(B=c.getCurrentFile(),
null!=B&&B.isRealtimeEnabled()&&B.isRealtimeSupported()&&this.addMenuItems(u,["showRemoteCursors","shareCursor"],E),this.addMenuItems(u,["autosave"],E));u.addSeparator(E);!c.isOfflineApp()&&isLocalStorage&&this.addMenuItem(u,"plugins",E);this.addMenuItems(u,["-","editDiagram"],E);Graph.translateDiagram&&this.addMenuItems(u,["diagramLanguage"]);u.addSeparator(E);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&this.addMenuItems(u,["showStartScreen"],E);this.addMenuItems(u,["configuration"],
-E);u.addSeparator(E);"1"==urlParams.newTempDlg&&(c.actions.addAction("templates",function(){function D(N){return{id:N.id,isExt:!0,url:N.downloadUrl,title:N.title,imgUrl:N.thumbnailLink,changedBy:N.lastModifyingUserName,lastModifiedOn:N.modifiedDate}}var G=new TemplatesDialog(c,function(N){console.log(arguments)},null,null,null,"user",function(N,I,F){var H=new Date;H.setDate(H.getDate()-7);c.drive.listFiles(null,H,F?!0:!1,function(R){for(var X=[],J=0;J<R.items.length;J++)X.push(D(R.items[J]));N(X)},
-I)},function(N,I,F,H){c.drive.listFiles(N,null,H?!0:!1,function(R){for(var X=[],J=0;J<R.items.length;J++)X.push(D(R.items[J]));I(X)},F)},function(N,I,F){c.drive.getFile(N.id,function(H){I(H.data)},F)},null,function(N){N({Test:[]},1)},!0,!1);c.showDialog(G.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}),this.addMenuItem(u,"templates",E))})));this.put("file",new Menu(mxUtils.bind(this,function(u,E){if("1"==urlParams.embed)this.addSubmenu("importFrom",u,E),this.addSubmenu("exportAs",
+E);u.addSeparator(E);"1"==urlParams.newTempDlg&&(c.actions.addAction("templates",function(){function D(H){return{id:H.id,isExt:!0,url:H.downloadUrl,title:H.title,imgUrl:H.thumbnailLink,changedBy:H.lastModifyingUserName,lastModifiedOn:H.modifiedDate}}var G=new TemplatesDialog(c,function(H){console.log(arguments)},null,null,null,"user",function(H,N,F){var I=new Date;I.setDate(I.getDate()-7);c.drive.listFiles(null,I,F?!0:!1,function(Q){for(var X=[],L=0;L<Q.items.length;L++)X.push(D(Q.items[L]));H(X)},
+N)},function(H,N,F,I){c.drive.listFiles(H,null,I?!0:!1,function(Q){for(var X=[],L=0;L<Q.items.length;L++)X.push(D(Q.items[L]));N(X)},F)},function(H,N,F){c.drive.getFile(H.id,function(I){N(I.data)},F)},null,function(H){H({Test:[]},1)},!0,!1);c.showDialog(G.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}),this.addMenuItem(u,"templates",E))})));this.put("file",new Menu(mxUtils.bind(this,function(u,E){if("1"==urlParams.embed)this.addSubmenu("importFrom",u,E),this.addSubmenu("exportAs",
u,E),this.addSubmenu("embed",u,E),"1"==urlParams.libraries&&(this.addMenuItems(u,["-"],E),this.addSubmenu("newLibrary",u,E),this.addSubmenu("openLibraryFrom",u,E)),c.isRevisionHistorySupported()&&this.addMenuItems(u,["-","revisionHistory"],E),this.addMenuItems(u,["-","pageSetup","print","-","rename"],E),"1"!=urlParams.embedInline&&("1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.addMenuItems(u,["saveAndExit"],E):(this.addMenuItems(u,["save"],E),"1"==urlParams.saveAndExit&&this.addMenuItems(u,
["saveAndExit"],E))),"1"!=urlParams.noExitBtn&&this.addMenuItems(u,["exit"],E);else{var B=this.editorUi.getCurrentFile();if(null!=B&&B.constructor==DriveFile){B.isRestricted()&&this.addMenuItems(u,["exportOptionsDisabled"],E);this.addMenuItems(u,["save","-","share"],E);var D=this.addMenuItem(u,"synchronize",E);(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(D,"https://www.diagrams.net/doc/faq/synchronize");u.addSeparator(E)}else this.addMenuItems(u,["new"],E);this.addSubmenu("openFrom",
u,E);isLocalStorage&&this.addSubmenu("openRecent",u,E);null!=B&&B.constructor==DriveFile?this.addMenuItems(u,["new","-","rename","makeCopy","moveToFolder"],E):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==B||B.constructor==LocalFile&&null==B.fileHandle||(u.addSeparator(E),D=this.addMenuItem(u,"synchronize",E),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(D,"https://www.diagrams.net/doc/faq/synchronize")),this.addMenuItems(u,["-","save","saveAs","-"],E),
mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=c.getServiceName()||c.isOfflineApp()||null==B||this.addMenuItems(u,["share","-"],E),this.addMenuItems(u,["rename"],E),c.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(u,["upload"],E):(this.addMenuItems(u,["makeCopy"],E),null!=B&&B.constructor==OneDriveFile&&this.addMenuItems(u,["moveToFolder"],E)));u.addSeparator(E);this.addSubmenu("importFrom",u,E);this.addSubmenu("exportAs",u,E);u.addSeparator(E);
this.addSubmenu("embed",u,E);this.addSubmenu("publish",u,E);u.addSeparator(E);this.addSubmenu("newLibrary",u,E);this.addSubmenu("openLibraryFrom",u,E);c.isRevisionHistorySupported()&&this.addMenuItems(u,["-","revisionHistory"],E);null!=B&&null!=c.fileNode&&"1"!=urlParams.embedInline&&(D=null!=B.getTitle()?B.getTitle():c.defaultFilename,(B.constructor==DriveFile&&null!=B.sync&&B.sync.isConnected()||!/(\.html)$/i.test(D)&&!/(\.svg)$/i.test(D))&&this.addMenuItems(u,["-","properties"]));this.addMenuItems(u,
["-","pageSetup"],E);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(u,["print"],E);this.addMenuItems(u,["-","close"])}})));f.prototype.execute=function(){var u=this.ui.editor.graph;this.customFonts=this.prevCustomFonts;this.prevCustomFonts=this.ui.menus.customFonts;this.ui.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts));this.extFonts=this.previousExtFonts;for(var E=u.extFonts,B=0;null!=E&&B<E.length;B++){var D=document.getElementById("extFont_"+E[B].name);
-null!=D&&D.parentNode.removeChild(D)}u.extFonts=[];for(B=0;null!=this.previousExtFonts&&B<this.previousExtFonts.length;B++)this.ui.editor.graph.addExtFont(this.previousExtFonts[B].name,this.previousExtFonts[B].url);this.previousExtFonts=E};this.put("fontFamily",new Menu(mxUtils.bind(this,function(u,E){for(var B=mxUtils.bind(this,function(J,W,V,t,C){var M=c.editor.graph;t=this.styleChange(u,t||J,"1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],
-"1"!=urlParams["ext-fonts"]?[J,null!=W?encodeURIComponent(W):null,null]:[J],null,E,function(){"1"!=urlParams["ext-fonts"]?M.setFont(J,W):(document.execCommand("fontname",!1,J),M.addExtFont(J,W));c.fireEvent(new mxEventObject("styleChanged","keys","1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"values","1"!=urlParams["ext-fonts"]?[J,null!=W?encodeURIComponent(W):null,null]:[J],"cells",[M.cellEditor.getEditingCell()]))},function(){M.updateLabelElements(M.getSelectionCells(),
-function(Q){Q.removeAttribute("face");Q.style.fontFamily=null;"PRE"==Q.nodeName&&M.replaceElement(Q,"div")});"1"==urlParams["ext-fonts"]&&M.addExtFont(J,W)});V&&(V=document.createElement("span"),V.className="geSprite geSprite-delete",V.style.cursor="pointer",V.style.display="inline-block",t.firstChild.nextSibling.nextSibling.appendChild(V),mxEvent.addListener(V,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(Q){if("1"!=urlParams["ext-fonts"]){delete Graph.recentCustomFonts[J.toLowerCase()];
-for(var P=0;P<this.customFonts.length;P++)if(this.customFonts[P].name==J&&this.customFonts[P].url==W){this.customFonts.splice(P,1);c.fireEvent(new mxEventObject("customFontsChanged"));break}}else{var S=mxUtils.clone(this.editorUi.editor.graph.extFonts);if(null!=S&&0<S.length)for(P=0;P<S.length;P++)if(S[P].name==J){S.splice(P,1);break}var U=mxUtils.clone(this.customFonts);for(P=0;P<U.length;P++)if(U[P].name==J){U.splice(P,1);break}P=new f(this.editorUi,S,U);this.editorUi.editor.graph.model.execute(P)}this.editorUi.hideCurrentMenu();
-mxEvent.consume(Q)})));Graph.addFont(J,W);t.firstChild.nextSibling.style.fontFamily=J;null!=C&&t.setAttribute("title",C)}),D={},G=0;G<this.defaultFonts.length;G++){var N=this.defaultFonts[G];"string"===typeof N?B(N):null!=N.fontFamily&&null!=N.fontUrl&&(D[encodeURIComponent(N.fontFamily)+"@"+encodeURIComponent(N.fontUrl)]=!0,B(N.fontFamily,N.fontUrl))}u.addSeparator(E);if("1"!=urlParams["ext-fonts"]){N=function(J){var W=encodeURIComponent(J.name)+(null==J.url?"":"@"+encodeURIComponent(J.url));if(!D[W]){for(var V=
-J.name,t=0;null!=F[V.toLowerCase()];)V=J.name+" ("+ ++t+")";null==I[W]&&(H.push({name:J.name,url:J.url,label:V,title:J.url}),F[V.toLowerCase()]=J,I[W]=J)}};var I={},F={},H=[];for(G=0;G<this.customFonts.length;G++)N(this.customFonts[G]);for(var R in Graph.recentCustomFonts)N(Graph.recentCustomFonts[R]);H.sort(function(J,W){return J.label<W.label?-1:J.label>W.label?1:0});if(0<H.length){for(G=0;G<H.length;G++)B(H[G].name,H[G].url,!0,H[G].label,H[G].url);u.addSeparator(E)}u.addItem(mxResources.get("reset"),
-null,mxUtils.bind(this,function(){Graph.recentCustomFonts={};this.customFonts=[];c.fireEvent(new mxEventObject("customFontsChanged"))}),E);u.addSeparator(E)}else{R=this.editorUi.editor.graph.extFonts;if(null!=R&&0<R.length){N={};var X=!1;for(G=0;G<this.customFonts.length;G++)N[this.customFonts[G].name]=!0;for(G=0;G<R.length;G++)N[R[G].name]||(this.customFonts.push(R[G]),X=!0);X&&this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts))}if(0<this.customFonts.length){for(G=
-0;G<this.customFonts.length;G++)R=this.customFonts[G].name,N=this.customFonts[G].url,B(R,N,!0),this.editorUi.editor.graph.addExtFont(R,N,!0);u.addSeparator(E);u.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){var J=new f(this.editorUi,[],[]);c.editor.graph.model.execute(J)}),E);u.addSeparator(E)}}u.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var J=this.editorUi.editor.graph,W=J.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],V=
-"s",t=null;if("1"!=urlParams["ext-fonts"]&&J.isEditing()){var C=J.getSelectedEditingElement();null!=C&&(C=mxUtils.getCurrentStyle(C),null!=C&&(W=Graph.stripQuotes(C.fontFamily),t=Graph.getFontUrl(W,null),null!=t&&(Graph.isGoogleFontUrl(t)?(t=null,V="g"):V="w")))}else C=J.getView().getState(J.getSelectionCell()),null!=C&&(W=C.style[mxConstants.STYLE_FONTFAMILY]||W,"1"!=urlParams["ext-fonts"]?(C=C.style.fontSource,null!=C&&(C=decodeURIComponent(C),Graph.isGoogleFontUrl(C)?V="g":(V="w",t=C))):(V=C.style.FType||
-V,"w"==V&&(t=this.editorUi.editor.graph.extFonts,C=null,null!=t&&(C=t.find(function(Q){return Q.name==W})),t=null!=C?C.url:mxResources.get("urlNotFound",null,"URL not found"))));null!=t&&t.substring(0,PROXY_URL.length)==PROXY_URL&&(t=decodeURIComponent(t.substr((PROXY_URL+"?url=").length)));var M=null;document.activeElement==J.cellEditor.textarea&&(M=J.cellEditor.saveSelection());V=new FontDialog(this.editorUi,W,t,V,mxUtils.bind(this,function(Q,P,S){null!=M&&(J.cellEditor.restoreSelection(M),M=null);
-if(null!=Q&&0<Q.length)if("1"!=urlParams["ext-fonts"]&&J.isEditing())J.setFont(Q,P);else{J.getModel().beginUpdate();try{J.stopEditing(!1);"1"!=urlParams["ext-fonts"]?(J.setCellStyles(mxConstants.STYLE_FONTFAMILY,Q),J.setCellStyles("fontSource",null!=P?encodeURIComponent(P):null),J.setCellStyles("FType",null)):(J.setCellStyles(mxConstants.STYLE_FONTFAMILY,Q),"s"!=S&&(J.setCellStyles("FType",S),0==P.indexOf("http://")&&(P=PROXY_URL+"?url="+encodeURIComponent(P)),this.editorUi.editor.graph.addExtFont(Q,
-P)));S=!0;for(var U=0;U<this.customFonts.length;U++)if(this.customFonts[U].name==Q){S=!1;break}S&&(this.customFonts.push({name:Q,url:P}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))}finally{J.getModel().endUpdate()}}}));this.editorUi.showDialog(V.container,380,Editor.enableWebFonts?250:180,!0,!0);V.init()}),E,null,!0)})))}})();function DiagramPage(b,e){this.node=b;null!=e?this.node.setAttribute("id",e):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
+null!=D&&D.parentNode.removeChild(D)}u.extFonts=[];for(B=0;null!=this.previousExtFonts&&B<this.previousExtFonts.length;B++)this.ui.editor.graph.addExtFont(this.previousExtFonts[B].name,this.previousExtFonts[B].url);this.previousExtFonts=E};this.put("fontFamily",new Menu(mxUtils.bind(this,function(u,E){for(var B=mxUtils.bind(this,function(L,U,W,t,C){var M=c.editor.graph;t=this.styleChange(u,t||L,"1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],
+"1"!=urlParams["ext-fonts"]?[L,null!=U?encodeURIComponent(U):null,null]:[L],null,E,function(){"1"!=urlParams["ext-fonts"]?M.setFont(L,U):(document.execCommand("fontname",!1,L),M.addExtFont(L,U));c.fireEvent(new mxEventObject("styleChanged","keys","1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"values","1"!=urlParams["ext-fonts"]?[L,null!=U?encodeURIComponent(U):null,null]:[L],"cells",[M.cellEditor.getEditingCell()]))},function(){M.updateLabelElements(M.getSelectionCells(),
+function(S){S.removeAttribute("face");S.style.fontFamily=null;"PRE"==S.nodeName&&M.replaceElement(S,"div")});"1"==urlParams["ext-fonts"]&&M.addExtFont(L,U)});W&&(W=document.createElement("span"),W.className="geSprite geSprite-delete",W.style.cursor="pointer",W.style.display="inline-block",t.firstChild.nextSibling.nextSibling.appendChild(W),mxEvent.addListener(W,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(S){if("1"!=urlParams["ext-fonts"]){delete Graph.recentCustomFonts[L.toLowerCase()];
+for(var P=0;P<this.customFonts.length;P++)if(this.customFonts[P].name==L&&this.customFonts[P].url==U){this.customFonts.splice(P,1);c.fireEvent(new mxEventObject("customFontsChanged"));break}}else{var R=mxUtils.clone(this.editorUi.editor.graph.extFonts);if(null!=R&&0<R.length)for(P=0;P<R.length;P++)if(R[P].name==L){R.splice(P,1);break}var T=mxUtils.clone(this.customFonts);for(P=0;P<T.length;P++)if(T[P].name==L){T.splice(P,1);break}P=new f(this.editorUi,R,T);this.editorUi.editor.graph.model.execute(P)}this.editorUi.hideCurrentMenu();
+mxEvent.consume(S)})));Graph.addFont(L,U);t.firstChild.nextSibling.style.fontFamily=L;null!=C&&t.setAttribute("title",C)}),D={},G=0;G<this.defaultFonts.length;G++){var H=this.defaultFonts[G];"string"===typeof H?B(H):null!=H.fontFamily&&null!=H.fontUrl&&(D[encodeURIComponent(H.fontFamily)+"@"+encodeURIComponent(H.fontUrl)]=!0,B(H.fontFamily,H.fontUrl))}u.addSeparator(E);if("1"!=urlParams["ext-fonts"]){H=function(L){var U=encodeURIComponent(L.name)+(null==L.url?"":"@"+encodeURIComponent(L.url));if(!D[U]){for(var W=
+L.name,t=0;null!=F[W.toLowerCase()];)W=L.name+" ("+ ++t+")";null==N[U]&&(I.push({name:L.name,url:L.url,label:W,title:L.url}),F[W.toLowerCase()]=L,N[U]=L)}};var N={},F={},I=[];for(G=0;G<this.customFonts.length;G++)H(this.customFonts[G]);for(var Q in Graph.recentCustomFonts)H(Graph.recentCustomFonts[Q]);I.sort(function(L,U){return L.label<U.label?-1:L.label>U.label?1:0});if(0<I.length){for(G=0;G<I.length;G++)B(I[G].name,I[G].url,!0,I[G].label,I[G].url);u.addSeparator(E)}u.addItem(mxResources.get("reset"),
+null,mxUtils.bind(this,function(){Graph.recentCustomFonts={};this.customFonts=[];c.fireEvent(new mxEventObject("customFontsChanged"))}),E);u.addSeparator(E)}else{Q=this.editorUi.editor.graph.extFonts;if(null!=Q&&0<Q.length){H={};var X=!1;for(G=0;G<this.customFonts.length;G++)H[this.customFonts[G].name]=!0;for(G=0;G<Q.length;G++)H[Q[G].name]||(this.customFonts.push(Q[G]),X=!0);X&&this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts))}if(0<this.customFonts.length){for(G=
+0;G<this.customFonts.length;G++)Q=this.customFonts[G].name,H=this.customFonts[G].url,B(Q,H,!0),this.editorUi.editor.graph.addExtFont(Q,H,!0);u.addSeparator(E);u.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){var L=new f(this.editorUi,[],[]);c.editor.graph.model.execute(L)}),E);u.addSeparator(E)}}u.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var L=this.editorUi.editor.graph,U=L.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],W=
+"s",t=null;if("1"!=urlParams["ext-fonts"]&&L.isEditing()){var C=L.getSelectedEditingElement();null!=C&&(C=mxUtils.getCurrentStyle(C),null!=C&&(U=Graph.stripQuotes(C.fontFamily),t=Graph.getFontUrl(U,null),null!=t&&(Graph.isGoogleFontUrl(t)?(t=null,W="g"):W="w")))}else C=L.getView().getState(L.getSelectionCell()),null!=C&&(U=C.style[mxConstants.STYLE_FONTFAMILY]||U,"1"!=urlParams["ext-fonts"]?(C=C.style.fontSource,null!=C&&(C=decodeURIComponent(C),Graph.isGoogleFontUrl(C)?W="g":(W="w",t=C))):(W=C.style.FType||
+W,"w"==W&&(t=this.editorUi.editor.graph.extFonts,C=null,null!=t&&(C=t.find(function(S){return S.name==U})),t=null!=C?C.url:mxResources.get("urlNotFound",null,"URL not found"))));null!=t&&t.substring(0,PROXY_URL.length)==PROXY_URL&&(t=decodeURIComponent(t.substr((PROXY_URL+"?url=").length)));var M=null;document.activeElement==L.cellEditor.textarea&&(M=L.cellEditor.saveSelection());W=new FontDialog(this.editorUi,U,t,W,mxUtils.bind(this,function(S,P,R){null!=M&&(L.cellEditor.restoreSelection(M),M=null);
+if(null!=S&&0<S.length)if("1"!=urlParams["ext-fonts"]&&L.isEditing())L.setFont(S,P);else{L.getModel().beginUpdate();try{L.stopEditing(!1);"1"!=urlParams["ext-fonts"]?(L.setCellStyles(mxConstants.STYLE_FONTFAMILY,S),L.setCellStyles("fontSource",null!=P?encodeURIComponent(P):null),L.setCellStyles("FType",null)):(L.setCellStyles(mxConstants.STYLE_FONTFAMILY,S),"s"!=R&&(L.setCellStyles("FType",R),0==P.indexOf("http://")&&(P=PROXY_URL+"?url="+encodeURIComponent(P)),this.editorUi.editor.graph.addExtFont(S,
+P)));R=!0;for(var T=0;T<this.customFonts.length;T++)if(this.customFonts[T].name==S){R=!1;break}R&&(this.customFonts.push({name:S,url:P}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))}finally{L.getModel().endUpdate()}}}));this.editorUi.showDialog(W.container,380,Editor.enableWebFonts?250:180,!0,!0);W.init()}),E,null,!0)})))}})();function DiagramPage(b,e){this.node=b;null!=e?this.node.setAttribute("id",e):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
DiagramPage.prototype.setName=function(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};function RenamePage(b,e,f){this.ui=b;this.page=e;this.previous=this.name=f}RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
function MovePage(b,e,f){this.ui=b;this.oldIndex=e;this.newIndex=f}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var b=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
function SelectPage(b,e,f){this.ui=b;this.previousPage=this.page=e;this.neverShown=!0;null!=e&&(this.neverShown=null==e.viewState,this.ui.updatePageRoot(e),null!=f&&(e.viewState=f,this.neverShown=!1))}
@@ -13044,41 +13039,41 @@ EditorUi.drawHost:"https://"+window.location.host)+"/"+m+"#"+c.getHash()}}return
EditorUi.prototype.createPageMenu=function(b,e){return mxUtils.bind(this,function(f,c){var m=this.editor.graph;f.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,b)+1)}),c);f.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),c);f.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(b,e)}),c);null!=this.getLinkForPage(b)&&(f.addSeparator(c),f.addItem(mxResources.get("link"),
null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(n,v,d,g,k,l){n=this.createUrlParameters(n,v,d,g,k,l);d||n.push("hide-pages=1");m.isSelectionEmpty()||(d=m.getBoundingBox(m.getSelectionCells()),v=m.view.translate,k=m.view.scale,d.width/=k,d.height/=k,d.x=d.x/k-v.x,d.y=d.y/k-v.y,n.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(d.x),y:Math.round(d.y),width:Math.round(d.width),height:Math.round(d.height),border:100}))));
g=new EmbedDialog(this,this.getLinkForPage(b,n,g));this.showDialog(g.container,450,240,!0,!0);g.init()}))})));f.addSeparator(c);f.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),c);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(f.addSeparator(c),f.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,
-!0,!0))}),c))})};(function(){var b=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(e){b.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(e,f,c){c.ui=e.ui;return f};b.afterDecode=function(e,f,c){e=c.oldIndex;c.oldIndex=c.newIndex;c.newIndex=e;return c};mxCodecRegistry.register(b)})();
+!0,!0))}),c))})};(function(){var b=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(){b.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(e,f,c){c.ui=e.ui;return f};b.afterDecode=function(e,f,c){e=c.oldIndex;c.oldIndex=c.newIndex;c.newIndex=e;return c};mxCodecRegistry.register(b)})();
(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(e,f,c){c.ui=e.ui;return f};b.afterDecode=function(e,f,c){e=c.previous;c.previous=c.name;c.name=e;return c};mxCodecRegistry.register(b)})();
(function(){var b=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" "));b.afterEncode=function(e,f,c){c.setAttribute("relatedPage",f.relatedPage.getId());null==f.index&&(c.setAttribute("name",f.relatedPage.getName()),null!=f.relatedPage.viewState&&c.setAttribute("viewState",JSON.stringify(f.relatedPage.viewState,function(m,n){return 0>mxUtils.indexOf(EditorUi.transientViewStateProperties,m)?n:void 0})),null!=f.relatedPage.root&&e.encodeCell(f.relatedPage.root,
c));return c};b.beforeDecode=function(e,f,c){c.ui=e.ui;c.relatedPage=c.ui.getPageById(f.getAttribute("relatedPage"));if(null==c.relatedPage){var m=f.ownerDocument.createElement("diagram");m.setAttribute("id",f.getAttribute("relatedPage"));m.setAttribute("name",f.getAttribute("name"));c.relatedPage=new DiagramPage(m);m=f.getAttribute("viewState");null!=m&&(c.relatedPage.viewState=JSON.parse(m),f.removeAttribute("viewState"));f=f.cloneNode(!0);m=f.firstChild;if(null!=m)for(c.relatedPage.root=e.decodeCell(m,
!1),c=m.nextSibling,m.parentNode.removeChild(m),m=c;null!=m;){c=m.nextSibling;if(m.nodeType==mxConstants.NODETYPE_ELEMENT){var n=m.getAttribute("id");null==e.lookup(n)&&e.decodeCell(m)}m.parentNode.removeChild(m);m=c}}return f};b.afterDecode=function(e,f,c){c.index=c.previousIndex;return c};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(c,m,n,v,d){m=null!=m?m:!1;null==n&&(n=this.getFoldableCells(this.getSelectionCells(),c));this.stopEditing();this.model.beginUpdate();try{for(var g=n.slice(),k=0;k<n.length;k++)"1"==mxUtils.getValue(this.getCurrentCellStyle(n[k]),"treeFolding","0")&&this.foldTreeCell(c,n[k]);n=g;n=b.apply(this,arguments)}finally{this.model.endUpdate()}return n};Graph.prototype.foldTreeCell=
function(c,m){this.model.beginUpdate();try{var n=[];this.traverse(m,!0,mxUtils.bind(this,function(d,g){var k=null!=g&&this.isTreeEdge(g);k&&n.push(g);d==m||null!=g&&!k||n.push(d);return(null==g||k)&&(d==m||!this.model.isCollapsed(d))}));this.model.setCollapsed(m,c);for(var v=0;v<n.length;v++)this.model.setVisible(n[v],!c)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(c){return!this.isEdgeIgnored(c)};Graph.prototype.getTreeEdges=function(c,m,n,v,d,g){return this.model.filterCells(this.getEdges(c,
-m,n,v,d,g),mxUtils.bind(this,function(k){return this.isTreeEdge(k)}))};Graph.prototype.getIncomingTreeEdges=function(c,m){return this.getTreeEdges(c,m,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(c,m){return this.getTreeEdges(c,m,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function c(H){return z.isVertex(H)&&n(H)}function m(H){var R=
-!1;null!=H&&(R="1"==y.getCurrentCellStyle(H).treeMoving);return R}function n(H){var R=!1;null!=H&&(H=z.getParent(H),R=y.view.getState(H),R="tree"==(null!=R?R.style:y.getCellStyle(H)).containerType);return R}function v(H){var R=!1;null!=H&&(H=z.getParent(H),R=y.view.getState(H),y.view.getState(H),R=null!=(null!=R?R.style:y.getCellStyle(H)).childLayout);return R}function d(H){H=y.view.getState(H);if(null!=H){var R=y.getIncomingTreeEdges(H.cell);if(0<R.length&&(R=y.view.getState(R[0]),null!=R&&(R=R.absolutePoints,
-null!=R&&0<R.length&&(R=R[R.length-1],null!=R)))){if(R.y==H.y&&Math.abs(R.x-H.getCenterX())<H.width/2)return mxConstants.DIRECTION_SOUTH;if(R.y==H.y+H.height&&Math.abs(R.x-H.getCenterX())<H.width/2)return mxConstants.DIRECTION_NORTH;if(R.x>H.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function g(H,R){R=null!=R?R:!0;y.model.beginUpdate();try{var X=y.model.getParent(H),J=y.getIncomingTreeEdges(H),W=y.cloneCells([J[0],H]);y.model.setTerminal(W[0],y.model.getTerminal(J[0],
-!0),!0);var V=d(H),t=X.geometry;V==mxConstants.DIRECTION_SOUTH||V==mxConstants.DIRECTION_NORTH?W[1].geometry.x+=R?H.geometry.width+10:-W[1].geometry.width-10:W[1].geometry.y+=R?H.geometry.height+10:-W[1].geometry.height-10;y.view.currentRoot!=X&&(W[1].geometry.x-=t.x,W[1].geometry.y-=t.y);var C=y.view.getState(H),M=y.view.scale;if(null!=C){var Q=mxRectangle.fromRectangle(C);V==mxConstants.DIRECTION_SOUTH||V==mxConstants.DIRECTION_NORTH?Q.x+=(R?H.geometry.width+10:-W[1].geometry.width-10)*M:Q.y+=(R?
-H.geometry.height+10:-W[1].geometry.height-10)*M;var P=y.getOutgoingTreeEdges(y.model.getTerminal(J[0],!0));if(null!=P){for(var S=V==mxConstants.DIRECTION_SOUTH||V==mxConstants.DIRECTION_NORTH,U=t=J=0;U<P.length;U++){var T=y.model.getTerminal(P[U],!1);if(V==d(T)){var Y=y.view.getState(T);T!=H&&null!=Y&&(S&&R!=Y.getCenterX()<C.getCenterX()||!S&&R!=Y.getCenterY()<C.getCenterY())&&mxUtils.intersects(Q,Y)&&(J=10+Math.max(J,(Math.min(Q.x+Q.width,Y.x+Y.width)-Math.max(Q.x,Y.x))/M),t=10+Math.max(t,(Math.min(Q.y+
-Q.height,Y.y+Y.height)-Math.max(Q.y,Y.y))/M))}}S?t=0:J=0;for(U=0;U<P.length;U++)if(T=y.model.getTerminal(P[U],!1),V==d(T)&&(Y=y.view.getState(T),T!=H&&null!=Y&&(S&&R!=Y.getCenterX()<C.getCenterX()||!S&&R!=Y.getCenterY()<C.getCenterY()))){var aa=[];y.traverse(Y.cell,!0,function(Z,da){var ja=null!=da&&y.isTreeEdge(da);ja&&aa.push(da);(null==da||ja)&&aa.push(Z);return null==da||ja});y.moveCells(aa,(R?1:-1)*J,(R?1:-1)*t)}}}return y.addCells(W,X)}finally{y.model.endUpdate()}}function k(H){y.model.beginUpdate();
-try{var R=d(H),X=y.getIncomingTreeEdges(H),J=y.cloneCells([X[0],H]);y.model.setTerminal(X[0],J[1],!1);y.model.setTerminal(J[0],J[1],!0);y.model.setTerminal(J[0],H,!1);var W=y.model.getParent(H),V=W.geometry,t=[];y.view.currentRoot!=W&&(J[1].geometry.x-=V.x,J[1].geometry.y-=V.y);y.traverse(H,!0,function(Q,P){var S=null!=P&&y.isTreeEdge(P);S&&t.push(P);(null==P||S)&&t.push(Q);return null==P||S});var C=H.geometry.width+40,M=H.geometry.height+40;R==mxConstants.DIRECTION_SOUTH?C=0:R==mxConstants.DIRECTION_NORTH?
-(C=0,M=-M):R==mxConstants.DIRECTION_WEST?(C=-C,M=0):R==mxConstants.DIRECTION_EAST&&(M=0);y.moveCells(t,C,M);return y.addCells(J,W)}finally{y.model.endUpdate()}}function l(H,R){y.model.beginUpdate();try{var X=y.model.getParent(H),J=y.getIncomingTreeEdges(H),W=d(H);0==J.length&&(J=[y.createEdge(X,null,"",null,null,y.createCurrentEdgeStyle())],W=R);var V=y.cloneCells([J[0],H]);y.model.setTerminal(V[0],H,!0);if(null==y.model.getTerminal(V[0],!1)){y.model.setTerminal(V[0],V[1],!1);var t=y.getCellStyle(V[1]).newEdgeStyle;
-if(null!=t)try{var C=JSON.parse(t),M;for(M in C)y.setCellStyles(M,C[M],[V[0]]),"edgeStyle"==M&&"elbowEdgeStyle"==C[M]&&y.setCellStyles("elbow",W==mxConstants.DIRECTION_SOUTH||W==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[V[0]])}catch(Y){}}J=y.getOutgoingTreeEdges(H);var Q=X.geometry;R=[];y.view.currentRoot==X&&(Q=new mxRectangle);for(t=0;t<J.length;t++){var P=y.model.getTerminal(J[t],!1);null!=P&&R.push(P)}var S=y.view.getBounds(R),U=y.view.translate,T=y.view.scale;W==mxConstants.DIRECTION_SOUTH?
-(V[1].geometry.x=null==S?H.geometry.x+(H.geometry.width-V[1].geometry.width)/2:(S.x+S.width)/T-U.x-Q.x+10,V[1].geometry.y+=V[1].geometry.height-Q.y+40):W==mxConstants.DIRECTION_NORTH?(V[1].geometry.x=null==S?H.geometry.x+(H.geometry.width-V[1].geometry.width)/2:(S.x+S.width)/T-U.x+-Q.x+10,V[1].geometry.y-=V[1].geometry.height+Q.y+40):(V[1].geometry.x=W==mxConstants.DIRECTION_WEST?V[1].geometry.x-(V[1].geometry.width+Q.x+40):V[1].geometry.x+(V[1].geometry.width-Q.x+40),V[1].geometry.y=null==S?H.geometry.y+
-(H.geometry.height-V[1].geometry.height)/2:(S.y+S.height)/T-U.y+-Q.y+10);return y.addCells(V,X)}finally{y.model.endUpdate()}}function p(H,R,X){H=y.getOutgoingTreeEdges(H);X=y.view.getState(X);var J=[];if(null!=X&&null!=H){for(var W=0;W<H.length;W++){var V=y.view.getState(y.model.getTerminal(H[W],!1));null!=V&&(!R&&Math.min(V.x+V.width,X.x+X.width)>=Math.max(V.x,X.x)||R&&Math.min(V.y+V.height,X.y+X.height)>=Math.max(V.y,X.y))&&J.push(V)}J.sort(function(t,C){return R?t.x+t.width-C.x-C.width:t.y+t.height-
-C.y-C.height})}return J}function q(H,R){var X=d(H),J=R==mxConstants.DIRECTION_EAST||R==mxConstants.DIRECTION_WEST;(X==mxConstants.DIRECTION_EAST||X==mxConstants.DIRECTION_WEST)==J&&X!=R?x.actions.get("selectParent").funct():X==R?(R=y.getOutgoingTreeEdges(H),null!=R&&0<R.length&&y.setSelectionCell(y.model.getTerminal(R[0],!1))):(X=y.getIncomingTreeEdges(H),null!=X&&0<X.length&&(J=p(y.model.getTerminal(X[0],!0),J,H),H=y.view.getState(H),null!=H&&(H=mxUtils.indexOf(J,H),0<=H&&(H+=R==mxConstants.DIRECTION_NORTH||
-R==mxConstants.DIRECTION_WEST?-1:1,0<=H&&H<=J.length-1&&y.setSelectionCell(J[H].cell)))))}var x=this,y=x.editor.graph,z=y.getModel(),A=x.menus.createPopupMenu;x.menus.createPopupMenu=function(H,R,X){A.apply(this,arguments);if(1==y.getSelectionCount()){R=y.getSelectionCell();var J=y.getOutgoingTreeEdges(R);H.addSeparator();0<J.length&&(c(y.getSelectionCell())&&this.addMenuItems(H,["selectChildren"],null,X),this.addMenuItems(H,["selectDescendants"],null,X));c(y.getSelectionCell())?(H.addSeparator(),
-0<y.getIncomingTreeEdges(R).length&&this.addMenuItems(H,["selectSiblings","selectParent"],null,X)):0<y.model.getEdgeCount(R)&&this.addMenuItems(H,["selectConnections"],null,X)}};x.actions.addAction("selectChildren",function(){if(y.isEnabled()&&1==y.getSelectionCount()){var H=y.getSelectionCell();H=y.getOutgoingTreeEdges(H);if(null!=H){for(var R=[],X=0;X<H.length;X++)R.push(y.model.getTerminal(H[X],!1));y.setSelectionCells(R)}}},null,null,"Alt+Shift+X");x.actions.addAction("selectSiblings",function(){if(y.isEnabled()&&
-1==y.getSelectionCount()){var H=y.getSelectionCell();H=y.getIncomingTreeEdges(H);if(null!=H&&0<H.length&&(H=y.getOutgoingTreeEdges(y.model.getTerminal(H[0],!0)),null!=H)){for(var R=[],X=0;X<H.length;X++)R.push(y.model.getTerminal(H[X],!1));y.setSelectionCells(R)}}},null,null,"Alt+Shift+S");x.actions.addAction("selectParent",function(){if(y.isEnabled()&&1==y.getSelectionCount()){var H=y.getSelectionCell();H=y.getIncomingTreeEdges(H);null!=H&&0<H.length&&y.setSelectionCell(y.model.getTerminal(H[0],
-!0))}},null,null,"Alt+Shift+P");x.actions.addAction("selectDescendants",function(H,R){H=y.getSelectionCell();if(y.isEnabled()&&y.model.isVertex(H)){if(null!=R&&mxEvent.isAltDown(R))y.setSelectionCells(y.model.getTreeEdges(H,null==R||!mxEvent.isShiftDown(R),null==R||!mxEvent.isControlDown(R)));else{var X=[];y.traverse(H,!0,function(J,W){var V=null!=W&&y.isTreeEdge(W);V&&X.push(W);null!=W&&!V||null!=R&&mxEvent.isShiftDown(R)||X.push(J);return null==W||V})}y.setSelectionCells(X)}},null,null,"Alt+Shift+D");
-var K=y.removeCells;y.removeCells=function(H,R){R=null!=R?R:!0;null==H&&(H=this.getDeletableCells(this.getSelectionCells()));R&&(H=this.getDeletableCells(this.addAllEdges(H)));for(var X=[],J=0;J<H.length;J++){var W=H[J];z.isEdge(W)&&n(W)&&(X.push(W),W=z.getTerminal(W,!1));if(c(W)){var V=[];y.traverse(W,!0,function(t,C){var M=null!=C&&y.isTreeEdge(C);M&&V.push(C);(null==C||M)&&V.push(t);return null==C||M});0<V.length&&(X=X.concat(V),W=y.getIncomingTreeEdges(H[J]),H=H.concat(W))}else null!=W&&X.push(H[J])}H=
-X;return K.apply(this,arguments)};x.hoverIcons.getStateAt=function(H,R,X){return c(H.cell)?null:this.graph.view.getState(this.graph.getCellAt(R,X))};var O=y.duplicateCells;y.duplicateCells=function(H,R){H=null!=H?H:this.getSelectionCells();for(var X=H.slice(0),J=0;J<X.length;J++){var W=y.view.getState(X[J]);if(null!=W&&c(W.cell)){var V=y.getIncomingTreeEdges(W.cell);for(W=0;W<V.length;W++)mxUtils.remove(V[W],H)}}this.model.beginUpdate();try{var t=O.call(this,H,R);if(t.length==H.length)for(J=0;J<H.length;J++)if(c(H[J])){var C=
-y.getIncomingTreeEdges(t[J]);V=y.getIncomingTreeEdges(H[J]);if(0==C.length&&0<V.length){var M=this.cloneCell(V[0]);this.addEdge(M,y.getDefaultParent(),this.model.getTerminal(V[0],!0),t[J])}}}finally{this.model.endUpdate()}return t};var L=y.moveCells;y.moveCells=function(H,R,X,J,W,V,t){var C=null;this.model.beginUpdate();try{var M=W,Q=this.getCurrentCellStyle(W);if(null!=H&&c(W)&&"1"==mxUtils.getValue(Q,"treeFolding","0")){for(var P=0;P<H.length;P++)if(c(H[P])||y.model.isEdge(H[P])&&null==y.model.getTerminal(H[P],
-!0)){W=y.model.getParent(H[P]);break}if(null!=M&&W!=M&&null!=this.view.getState(H[0])){var S=y.getIncomingTreeEdges(H[0]);if(0<S.length){var U=y.view.getState(y.model.getTerminal(S[0],!0));if(null!=U){var T=y.view.getState(M);null!=T&&(R=(T.getCenterX()-U.getCenterX())/y.view.scale,X=(T.getCenterY()-U.getCenterY())/y.view.scale)}}}}C=L.apply(this,arguments);if(null!=C&&null!=H&&C.length==H.length)for(P=0;P<C.length;P++)if(this.model.isEdge(C[P]))c(M)&&0>mxUtils.indexOf(C,this.model.getTerminal(C[P],
-!0))&&this.model.setTerminal(C[P],M,!0);else if(c(H[P])&&(S=y.getIncomingTreeEdges(H[P]),0<S.length))if(!J)c(M)&&0>mxUtils.indexOf(H,this.model.getTerminal(S[0],!0))&&this.model.setTerminal(S[0],M,!0);else if(0==y.getIncomingTreeEdges(C[P]).length){Q=M;if(null==Q||Q==y.model.getParent(H[P]))Q=y.model.getTerminal(S[0],!0);J=this.cloneCell(S[0]);this.addEdge(J,y.getDefaultParent(),Q,C[P])}}finally{this.model.endUpdate()}return C};if(null!=x.sidebar){var u=x.sidebar.dropAndConnect;x.sidebar.dropAndConnect=
-function(H,R,X,J){var W=y.model,V=null;W.beginUpdate();try{if(V=u.apply(this,arguments),c(H))for(var t=0;t<V.length;t++)if(W.isEdge(V[t])&&null==W.getTerminal(V[t],!0)){W.setTerminal(V[t],H,!0);var C=y.getCellGeometry(V[t]);C.points=null;null!=C.getTerminalPoint(!0)&&C.setTerminalPoint(null,!0)}}finally{W.endUpdate()}return V}}var E={88:x.actions.get("selectChildren"),84:x.actions.get("selectSubtree"),80:x.actions.get("selectParent"),83:x.actions.get("selectSiblings")},B=x.onKeyDown;x.onKeyDown=function(H){try{if(y.isEnabled()&&
-!y.isEditing()&&c(y.getSelectionCell())&&1==y.getSelectionCount()){var R=null;0<y.getIncomingTreeEdges(y.getSelectionCell()).length&&(9==H.which?R=mxEvent.isShiftDown(H)?k(y.getSelectionCell()):l(y.getSelectionCell()):13==H.which&&(R=g(y.getSelectionCell(),!mxEvent.isShiftDown(H))));if(null!=R&&0<R.length)1==R.length&&y.model.isEdge(R[0])?y.setSelectionCell(y.model.getTerminal(R[0],!1)):y.setSelectionCell(R[R.length-1]),null!=x.hoverIcons&&x.hoverIcons.update(y.view.getState(y.getSelectionCell())),
-y.startEditingAtCell(y.getSelectionCell()),mxEvent.consume(H);else if(mxEvent.isAltDown(H)&&mxEvent.isShiftDown(H)){var X=E[H.keyCode];null!=X&&(X.funct(H),mxEvent.consume(H))}else 37==H.keyCode?(q(y.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(H)):38==H.keyCode?(q(y.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(H)):39==H.keyCode?(q(y.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(H)):40==H.keyCode&&(q(y.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
-mxEvent.consume(H))}}catch(J){x.handleError(J)}mxEvent.isConsumed(H)||B.apply(this,arguments)};var D=y.connectVertex;y.connectVertex=function(H,R,X,J,W,V,t){var C=y.getIncomingTreeEdges(H);if(c(H)){var M=d(H),Q=M==mxConstants.DIRECTION_EAST||M==mxConstants.DIRECTION_WEST,P=R==mxConstants.DIRECTION_EAST||R==mxConstants.DIRECTION_WEST;return M==R||0==C.length?l(H,R):Q==P?k(H):g(H,R!=mxConstants.DIRECTION_NORTH&&R!=mxConstants.DIRECTION_WEST)}return D.apply(this,arguments)};y.getSubtree=function(H){var R=
-[H];!m(H)&&!c(H)||v(H)||y.traverse(H,!0,function(X,J){var W=null!=J&&y.isTreeEdge(J);W&&0>mxUtils.indexOf(R,J)&&R.push(J);(null==J||W)&&0>mxUtils.indexOf(R,X)&&R.push(X);return null==J||W});return R};var G=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){G.apply(this,arguments);(m(this.state.cell)||c(this.state.cell))&&!v(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(H){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(H),mxEvent.getClientY(H),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(H);
-this.graph.isMouseDown=!0;x.hoverIcons.reset();mxEvent.consume(H)})))};var N=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){N.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(H){I.apply(this,
-arguments);null!=this.moveHandle&&(this.moveHandle.style.display=H?"":"none")};var F=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(H,R){F.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var f=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var c=f.apply(this,arguments),m=this.graph;return c.concat([this.addEntry("tree container",
+m,n,v,d,g),mxUtils.bind(this,function(k){return this.isTreeEdge(k)}))};Graph.prototype.getIncomingTreeEdges=function(c,m){return this.getTreeEdges(c,m,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(c,m){return this.getTreeEdges(c,m,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function c(I){return z.isVertex(I)&&n(I)}function m(I){var Q=
+!1;null!=I&&(Q="1"==y.getCurrentCellStyle(I).treeMoving);return Q}function n(I){var Q=!1;null!=I&&(I=z.getParent(I),Q=y.view.getState(I),Q="tree"==(null!=Q?Q.style:y.getCellStyle(I)).containerType);return Q}function v(I){var Q=!1;null!=I&&(I=z.getParent(I),Q=y.view.getState(I),y.view.getState(I),Q=null!=(null!=Q?Q.style:y.getCellStyle(I)).childLayout);return Q}function d(I){I=y.view.getState(I);if(null!=I){var Q=y.getIncomingTreeEdges(I.cell);if(0<Q.length&&(Q=y.view.getState(Q[0]),null!=Q&&(Q=Q.absolutePoints,
+null!=Q&&0<Q.length&&(Q=Q[Q.length-1],null!=Q)))){if(Q.y==I.y&&Math.abs(Q.x-I.getCenterX())<I.width/2)return mxConstants.DIRECTION_SOUTH;if(Q.y==I.y+I.height&&Math.abs(Q.x-I.getCenterX())<I.width/2)return mxConstants.DIRECTION_NORTH;if(Q.x>I.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function g(I,Q){Q=null!=Q?Q:!0;y.model.beginUpdate();try{var X=y.model.getParent(I),L=y.getIncomingTreeEdges(I),U=y.cloneCells([L[0],I]);y.model.setTerminal(U[0],y.model.getTerminal(L[0],
+!0),!0);var W=d(I),t=X.geometry;W==mxConstants.DIRECTION_SOUTH||W==mxConstants.DIRECTION_NORTH?U[1].geometry.x+=Q?I.geometry.width+10:-U[1].geometry.width-10:U[1].geometry.y+=Q?I.geometry.height+10:-U[1].geometry.height-10;y.view.currentRoot!=X&&(U[1].geometry.x-=t.x,U[1].geometry.y-=t.y);var C=y.view.getState(I),M=y.view.scale;if(null!=C){var S=mxRectangle.fromRectangle(C);W==mxConstants.DIRECTION_SOUTH||W==mxConstants.DIRECTION_NORTH?S.x+=(Q?I.geometry.width+10:-U[1].geometry.width-10)*M:S.y+=(Q?
+I.geometry.height+10:-U[1].geometry.height-10)*M;var P=y.getOutgoingTreeEdges(y.model.getTerminal(L[0],!0));if(null!=P){for(var R=W==mxConstants.DIRECTION_SOUTH||W==mxConstants.DIRECTION_NORTH,T=t=L=0;T<P.length;T++){var V=y.model.getTerminal(P[T],!1);if(W==d(V)){var Y=y.view.getState(V);V!=I&&null!=Y&&(R&&Q!=Y.getCenterX()<C.getCenterX()||!R&&Q!=Y.getCenterY()<C.getCenterY())&&mxUtils.intersects(S,Y)&&(L=10+Math.max(L,(Math.min(S.x+S.width,Y.x+Y.width)-Math.max(S.x,Y.x))/M),t=10+Math.max(t,(Math.min(S.y+
+S.height,Y.y+Y.height)-Math.max(S.y,Y.y))/M))}}R?t=0:L=0;for(T=0;T<P.length;T++)if(V=y.model.getTerminal(P[T],!1),W==d(V)&&(Y=y.view.getState(V),V!=I&&null!=Y&&(R&&Q!=Y.getCenterX()<C.getCenterX()||!R&&Q!=Y.getCenterY()<C.getCenterY()))){var ba=[];y.traverse(Y.cell,!0,function(Z,da){var ea=null!=da&&y.isTreeEdge(da);ea&&ba.push(da);(null==da||ea)&&ba.push(Z);return null==da||ea});y.moveCells(ba,(Q?1:-1)*L,(Q?1:-1)*t)}}}return y.addCells(U,X)}finally{y.model.endUpdate()}}function k(I){y.model.beginUpdate();
+try{var Q=d(I),X=y.getIncomingTreeEdges(I),L=y.cloneCells([X[0],I]);y.model.setTerminal(X[0],L[1],!1);y.model.setTerminal(L[0],L[1],!0);y.model.setTerminal(L[0],I,!1);var U=y.model.getParent(I),W=U.geometry,t=[];y.view.currentRoot!=U&&(L[1].geometry.x-=W.x,L[1].geometry.y-=W.y);y.traverse(I,!0,function(S,P){var R=null!=P&&y.isTreeEdge(P);R&&t.push(P);(null==P||R)&&t.push(S);return null==P||R});var C=I.geometry.width+40,M=I.geometry.height+40;Q==mxConstants.DIRECTION_SOUTH?C=0:Q==mxConstants.DIRECTION_NORTH?
+(C=0,M=-M):Q==mxConstants.DIRECTION_WEST?(C=-C,M=0):Q==mxConstants.DIRECTION_EAST&&(M=0);y.moveCells(t,C,M);return y.addCells(L,U)}finally{y.model.endUpdate()}}function l(I,Q){y.model.beginUpdate();try{var X=y.model.getParent(I),L=y.getIncomingTreeEdges(I),U=d(I);0==L.length&&(L=[y.createEdge(X,null,"",null,null,y.createCurrentEdgeStyle())],U=Q);var W=y.cloneCells([L[0],I]);y.model.setTerminal(W[0],I,!0);if(null==y.model.getTerminal(W[0],!1)){y.model.setTerminal(W[0],W[1],!1);var t=y.getCellStyle(W[1]).newEdgeStyle;
+if(null!=t)try{var C=JSON.parse(t),M;for(M in C)y.setCellStyles(M,C[M],[W[0]]),"edgeStyle"==M&&"elbowEdgeStyle"==C[M]&&y.setCellStyles("elbow",U==mxConstants.DIRECTION_SOUTH||U==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[W[0]])}catch(Y){}}L=y.getOutgoingTreeEdges(I);var S=X.geometry;Q=[];y.view.currentRoot==X&&(S=new mxRectangle);for(t=0;t<L.length;t++){var P=y.model.getTerminal(L[t],!1);null!=P&&Q.push(P)}var R=y.view.getBounds(Q),T=y.view.translate,V=y.view.scale;U==mxConstants.DIRECTION_SOUTH?
+(W[1].geometry.x=null==R?I.geometry.x+(I.geometry.width-W[1].geometry.width)/2:(R.x+R.width)/V-T.x-S.x+10,W[1].geometry.y+=W[1].geometry.height-S.y+40):U==mxConstants.DIRECTION_NORTH?(W[1].geometry.x=null==R?I.geometry.x+(I.geometry.width-W[1].geometry.width)/2:(R.x+R.width)/V-T.x+-S.x+10,W[1].geometry.y-=W[1].geometry.height+S.y+40):(W[1].geometry.x=U==mxConstants.DIRECTION_WEST?W[1].geometry.x-(W[1].geometry.width+S.x+40):W[1].geometry.x+(W[1].geometry.width-S.x+40),W[1].geometry.y=null==R?I.geometry.y+
+(I.geometry.height-W[1].geometry.height)/2:(R.y+R.height)/V-T.y+-S.y+10);return y.addCells(W,X)}finally{y.model.endUpdate()}}function p(I,Q,X){I=y.getOutgoingTreeEdges(I);X=y.view.getState(X);var L=[];if(null!=X&&null!=I){for(var U=0;U<I.length;U++){var W=y.view.getState(y.model.getTerminal(I[U],!1));null!=W&&(!Q&&Math.min(W.x+W.width,X.x+X.width)>=Math.max(W.x,X.x)||Q&&Math.min(W.y+W.height,X.y+X.height)>=Math.max(W.y,X.y))&&L.push(W)}L.sort(function(t,C){return Q?t.x+t.width-C.x-C.width:t.y+t.height-
+C.y-C.height})}return L}function q(I,Q){var X=d(I),L=Q==mxConstants.DIRECTION_EAST||Q==mxConstants.DIRECTION_WEST;(X==mxConstants.DIRECTION_EAST||X==mxConstants.DIRECTION_WEST)==L&&X!=Q?x.actions.get("selectParent").funct():X==Q?(Q=y.getOutgoingTreeEdges(I),null!=Q&&0<Q.length&&y.setSelectionCell(y.model.getTerminal(Q[0],!1))):(X=y.getIncomingTreeEdges(I),null!=X&&0<X.length&&(L=p(y.model.getTerminal(X[0],!0),L,I),I=y.view.getState(I),null!=I&&(I=mxUtils.indexOf(L,I),0<=I&&(I+=Q==mxConstants.DIRECTION_NORTH||
+Q==mxConstants.DIRECTION_WEST?-1:1,0<=I&&I<=L.length-1&&y.setSelectionCell(L[I].cell)))))}var x=this,y=x.editor.graph,z=y.getModel(),A=x.menus.createPopupMenu;x.menus.createPopupMenu=function(I,Q,X){A.apply(this,arguments);if(1==y.getSelectionCount()){Q=y.getSelectionCell();var L=y.getOutgoingTreeEdges(Q);I.addSeparator();0<L.length&&(c(y.getSelectionCell())&&this.addMenuItems(I,["selectChildren"],null,X),this.addMenuItems(I,["selectDescendants"],null,X));c(y.getSelectionCell())?(I.addSeparator(),
+0<y.getIncomingTreeEdges(Q).length&&this.addMenuItems(I,["selectSiblings","selectParent"],null,X)):0<y.model.getEdgeCount(Q)&&this.addMenuItems(I,["selectConnections"],null,X)}};x.actions.addAction("selectChildren",function(){if(y.isEnabled()&&1==y.getSelectionCount()){var I=y.getSelectionCell();I=y.getOutgoingTreeEdges(I);if(null!=I){for(var Q=[],X=0;X<I.length;X++)Q.push(y.model.getTerminal(I[X],!1));y.setSelectionCells(Q)}}},null,null,"Alt+Shift+X");x.actions.addAction("selectSiblings",function(){if(y.isEnabled()&&
+1==y.getSelectionCount()){var I=y.getSelectionCell();I=y.getIncomingTreeEdges(I);if(null!=I&&0<I.length&&(I=y.getOutgoingTreeEdges(y.model.getTerminal(I[0],!0)),null!=I)){for(var Q=[],X=0;X<I.length;X++)Q.push(y.model.getTerminal(I[X],!1));y.setSelectionCells(Q)}}},null,null,"Alt+Shift+S");x.actions.addAction("selectParent",function(){if(y.isEnabled()&&1==y.getSelectionCount()){var I=y.getSelectionCell();I=y.getIncomingTreeEdges(I);null!=I&&0<I.length&&y.setSelectionCell(y.model.getTerminal(I[0],
+!0))}},null,null,"Alt+Shift+P");x.actions.addAction("selectDescendants",function(I,Q){I=y.getSelectionCell();if(y.isEnabled()&&y.model.isVertex(I)){if(null!=Q&&mxEvent.isAltDown(Q))y.setSelectionCells(y.model.getTreeEdges(I,null==Q||!mxEvent.isShiftDown(Q),null==Q||!mxEvent.isControlDown(Q)));else{var X=[];y.traverse(I,!0,function(L,U){var W=null!=U&&y.isTreeEdge(U);W&&X.push(U);null!=U&&!W||null!=Q&&mxEvent.isShiftDown(Q)||X.push(L);return null==U||W})}y.setSelectionCells(X)}},null,null,"Alt+Shift+D");
+var J=y.removeCells;y.removeCells=function(I,Q){Q=null!=Q?Q:!0;null==I&&(I=this.getDeletableCells(this.getSelectionCells()));Q&&(I=this.getDeletableCells(this.addAllEdges(I)));for(var X=[],L=0;L<I.length;L++){var U=I[L];z.isEdge(U)&&n(U)&&(X.push(U),U=z.getTerminal(U,!1));if(c(U)){var W=[];y.traverse(U,!0,function(t,C){var M=null!=C&&y.isTreeEdge(C);M&&W.push(C);(null==C||M)&&W.push(t);return null==C||M});0<W.length&&(X=X.concat(W),U=y.getIncomingTreeEdges(I[L]),I=I.concat(U))}else null!=U&&X.push(I[L])}I=
+X;return J.apply(this,arguments)};x.hoverIcons.getStateAt=function(I,Q,X){return c(I.cell)?null:this.graph.view.getState(this.graph.getCellAt(Q,X))};var O=y.duplicateCells;y.duplicateCells=function(I,Q){I=null!=I?I:this.getSelectionCells();for(var X=I.slice(0),L=0;L<X.length;L++){var U=y.view.getState(X[L]);if(null!=U&&c(U.cell)){var W=y.getIncomingTreeEdges(U.cell);for(U=0;U<W.length;U++)mxUtils.remove(W[U],I)}}this.model.beginUpdate();try{var t=O.call(this,I,Q);if(t.length==I.length)for(L=0;L<I.length;L++)if(c(I[L])){var C=
+y.getIncomingTreeEdges(t[L]);W=y.getIncomingTreeEdges(I[L]);if(0==C.length&&0<W.length){var M=this.cloneCell(W[0]);this.addEdge(M,y.getDefaultParent(),this.model.getTerminal(W[0],!0),t[L])}}}finally{this.model.endUpdate()}return t};var K=y.moveCells;y.moveCells=function(I,Q,X,L,U,W,t){var C=null;this.model.beginUpdate();try{var M=U,S=this.getCurrentCellStyle(U);if(null!=I&&c(U)&&"1"==mxUtils.getValue(S,"treeFolding","0")){for(var P=0;P<I.length;P++)if(c(I[P])||y.model.isEdge(I[P])&&null==y.model.getTerminal(I[P],
+!0)){U=y.model.getParent(I[P]);break}if(null!=M&&U!=M&&null!=this.view.getState(I[0])){var R=y.getIncomingTreeEdges(I[0]);if(0<R.length){var T=y.view.getState(y.model.getTerminal(R[0],!0));if(null!=T){var V=y.view.getState(M);null!=V&&(Q=(V.getCenterX()-T.getCenterX())/y.view.scale,X=(V.getCenterY()-T.getCenterY())/y.view.scale)}}}}C=K.apply(this,arguments);if(null!=C&&null!=I&&C.length==I.length)for(P=0;P<C.length;P++)if(this.model.isEdge(C[P]))c(M)&&0>mxUtils.indexOf(C,this.model.getTerminal(C[P],
+!0))&&this.model.setTerminal(C[P],M,!0);else if(c(I[P])&&(R=y.getIncomingTreeEdges(I[P]),0<R.length))if(!L)c(M)&&0>mxUtils.indexOf(I,this.model.getTerminal(R[0],!0))&&this.model.setTerminal(R[0],M,!0);else if(0==y.getIncomingTreeEdges(C[P]).length){S=M;if(null==S||S==y.model.getParent(I[P]))S=y.model.getTerminal(R[0],!0);L=this.cloneCell(R[0]);this.addEdge(L,y.getDefaultParent(),S,C[P])}}finally{this.model.endUpdate()}return C};if(null!=x.sidebar){var u=x.sidebar.dropAndConnect;x.sidebar.dropAndConnect=
+function(I,Q,X,L){var U=y.model,W=null;U.beginUpdate();try{if(W=u.apply(this,arguments),c(I))for(var t=0;t<W.length;t++)if(U.isEdge(W[t])&&null==U.getTerminal(W[t],!0)){U.setTerminal(W[t],I,!0);var C=y.getCellGeometry(W[t]);C.points=null;null!=C.getTerminalPoint(!0)&&C.setTerminalPoint(null,!0)}}finally{U.endUpdate()}return W}}var E={88:x.actions.get("selectChildren"),84:x.actions.get("selectSubtree"),80:x.actions.get("selectParent"),83:x.actions.get("selectSiblings")},B=x.onKeyDown;x.onKeyDown=function(I){try{if(y.isEnabled()&&
+!y.isEditing()&&c(y.getSelectionCell())&&1==y.getSelectionCount()){var Q=null;0<y.getIncomingTreeEdges(y.getSelectionCell()).length&&(9==I.which?Q=mxEvent.isShiftDown(I)?k(y.getSelectionCell()):l(y.getSelectionCell()):13==I.which&&(Q=g(y.getSelectionCell(),!mxEvent.isShiftDown(I))));if(null!=Q&&0<Q.length)1==Q.length&&y.model.isEdge(Q[0])?y.setSelectionCell(y.model.getTerminal(Q[0],!1)):y.setSelectionCell(Q[Q.length-1]),null!=x.hoverIcons&&x.hoverIcons.update(y.view.getState(y.getSelectionCell())),
+y.startEditingAtCell(y.getSelectionCell()),mxEvent.consume(I);else if(mxEvent.isAltDown(I)&&mxEvent.isShiftDown(I)){var X=E[I.keyCode];null!=X&&(X.funct(I),mxEvent.consume(I))}else 37==I.keyCode?(q(y.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(I)):38==I.keyCode?(q(y.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(I)):39==I.keyCode?(q(y.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(I)):40==I.keyCode&&(q(y.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
+mxEvent.consume(I))}}catch(L){x.handleError(L)}mxEvent.isConsumed(I)||B.apply(this,arguments)};var D=y.connectVertex;y.connectVertex=function(I,Q,X,L,U,W,t){var C=y.getIncomingTreeEdges(I);if(c(I)){var M=d(I),S=M==mxConstants.DIRECTION_EAST||M==mxConstants.DIRECTION_WEST,P=Q==mxConstants.DIRECTION_EAST||Q==mxConstants.DIRECTION_WEST;return M==Q||0==C.length?l(I,Q):S==P?k(I):g(I,Q!=mxConstants.DIRECTION_NORTH&&Q!=mxConstants.DIRECTION_WEST)}return D.apply(this,arguments)};y.getSubtree=function(I){var Q=
+[I];!m(I)&&!c(I)||v(I)||y.traverse(I,!0,function(X,L){var U=null!=L&&y.isTreeEdge(L);U&&0>mxUtils.indexOf(Q,L)&&Q.push(L);(null==L||U)&&0>mxUtils.indexOf(Q,X)&&Q.push(X);return null==L||U});return Q};var G=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){G.apply(this,arguments);(m(this.state.cell)||c(this.state.cell))&&!v(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(I){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(I),mxEvent.getClientY(I),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(I);
+this.graph.isMouseDown=!0;x.hoverIcons.reset();mxEvent.consume(I)})))};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 N=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(I){N.apply(this,
+arguments);null!=this.moveHandle&&(this.moveHandle.style.display=I?"":"none")};var F=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(I,Q){F.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var f=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var c=f.apply(this,arguments),m=this.graph;return c.concat([this.addEntry("tree container",
function(){var n=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");n.vertex=!0;var v=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');v.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 g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");g.geometry.relative=!0;g.edge=!0;v.insertEdge(g,!0);d.insertEdge(g,!1);n.insert(g);n.insert(v);n.insert(d);return sb.createVertexTemplateFromCells([n],n.geometry.width,n.geometry.height,n.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var n=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");
n.vertex=!0;var v=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};');v.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};');
@@ -13096,20 +13091,19 @@ l.geometry.relative=!0;l.edge=!0;v.insertEdge(l,!0);k.insertEdge(l,!1);n.insert(
v.geometry.setTerminalPoint(new mxPoint(0,0),!0);v.geometry.relative=!0;v.edge=!0;n.insertEdge(v,!1);return sb.createVertexTemplateFromCells([n,v],n.geometry.width,n.geometry.height,n.value)}),this.addEntry("tree sub sections",function(){var n=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");n.vertex=!0;var v=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");
v.geometry.setTerminalPoint(new mxPoint(110,-40),!0);v.geometry.relative=!0;v.edge=!0;n.insertEdge(v,!1);var d=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");d.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");g.geometry.setTerminalPoint(new mxPoint(110,-40),!0);g.geometry.relative=
!0;g.edge=!0;d.insertEdge(g,!1);return sb.createVertexTemplateFromCells([v,g,n,d],220,60,"Sub Sections")})])}}})();EditorUi.windowed="0"!=urlParams.windows;
-EditorUi.initMinimalTheme=function(){function b(B,D){if(EditorUi.windowed){var G=B.editor.graph;G.popupMenuHandler.hideMenu();if(null==B.formatWindow){D="1"==urlParams.sketch?Math.max(10,B.diagramContainer.clientWidth-241):Math.max(10,B.diagramContainer.clientWidth-248);var N="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;G="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,G.container.clientHeight-10);B.formatWindow=new n(B,mxResources.get("format"),D,N,240,G,function(F){var H=
-B.createFormat(F);H.init();B.addListener("darkModeChanged",mxUtils.bind(this,function(){H.refresh()}));return H});B.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){B.formatWindow.window.fit()}));B.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else B.formatWindow.window.setVisible(null!=D?D:!B.formatWindow.window.isVisible())}else{if(null==B.formatElt){B.formatElt=m();var I=B.createFormat(B.formatElt);I.init();B.formatElt.style.border="none";B.formatElt.style.width=
-"240px";B.formatElt.style.borderLeft="1px solid gray";B.formatElt.style.right="0px";B.addListener("darkModeChanged",mxUtils.bind(this,function(){I.refresh()}))}G=B.diagramContainer.parentNode;null!=B.formatElt.parentNode?(B.formatElt.parentNode.removeChild(B.formatElt),G.style.right="0px"):(G.parentNode.appendChild(B.formatElt),G.style.right=B.formatElt.style.width)}}function e(B,D){function G(H,R){var X=B.menus.get(H);H=F.addMenu(R,mxUtils.bind(this,function(){X.funct.apply(this,arguments)}));H.style.cssText=
-"position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;";H.className="geTitle";D.appendChild(H);return H}var N=document.createElement("div");N.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";N.className="geTitle";var I=document.createElement("span");I.style.fontSize="18px";I.style.marginRight="5px";
-I.innerHTML="+";N.appendChild(I);mxUtils.write(N,mxResources.get("moreShapes"));D.appendChild(N);mxEvent.addListener(N,"click",function(){B.actions.get("shapes").funct()});var F=new Menubar(B,D);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?N.style.bottom="0":null!=B.actions.get("newLibrary")?(N=document.createElement("div"),N.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",
-N.className="geTitle",I=document.createElement("span"),I.style.cssText="position:relative;top:6px;",mxUtils.write(I,mxResources.get("newLibrary")),N.appendChild(I),D.appendChild(N),mxEvent.addListener(N,"click",B.actions.get("newLibrary").funct),N=document.createElement("div"),N.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;",N.className="geTitle",I=document.createElement("span"),
-I.style.cssText="position:relative;top:6px;",mxUtils.write(I,mxResources.get("openLibrary")),N.appendChild(I),D.appendChild(N),mxEvent.addListener(N,"click",B.actions.get("openLibrary").funct)):(N=G("newLibrary",mxResources.get("newLibrary")),N.style.boxSizing="border-box",N.style.paddingRight="6px",N.style.paddingLeft="6px",N.style.height="32px",N.style.left="0",N=G("openLibraryFrom",mxResources.get("openLibraryFrom")),N.style.borderLeft="1px solid lightgray",N.style.boxSizing="border-box",N.style.paddingRight=
-"6px",N.style.paddingLeft="6px",N.style.height="32px",N.style.left="50%");D.appendChild(B.sidebar.container);D.style.overflow="hidden"}function f(B,D){if(EditorUi.windowed){var G=B.editor.graph;G.popupMenuHandler.hideMenu();if(null==B.sidebarWindow){D=Math.min(G.container.clientWidth-10,218);var N="1"==urlParams.embedInline?650:Math.min(G.container.clientHeight-40,650);B.sidebarWindow=new n(B,mxResources.get("shapes"),"1"==urlParams.sketch&&"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&
-"1"!=urlParams.embedInline?Math.max(30,(G.container.clientHeight-N)/2):56,D-6,N-6,function(I){e(B,I)});B.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){B.sidebarWindow.window.fit()}));B.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);B.sidebarWindow.window.setVisible(!0);isLocalStorage&&B.getLocalData("sidebar",function(I){B.sidebar.showEntries(I,null,!0)});B.restoreLibraries()}else B.sidebarWindow.window.setVisible(null!=D?D:!B.sidebarWindow.window.isVisible())}else null==
+EditorUi.initMinimalTheme=function(){function b(B,D){if(EditorUi.windowed){var G=B.editor.graph;G.popupMenuHandler.hideMenu();if(null==B.formatWindow){D="1"==urlParams.sketch?Math.max(10,B.diagramContainer.clientWidth-241):Math.max(10,B.diagramContainer.clientWidth-248);var H="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;G="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,G.container.clientHeight-10);B.formatWindow=new n(B,mxResources.get("format"),D,H,240,G,function(F){var I=
+B.createFormat(F);I.init();B.addListener("darkModeChanged",mxUtils.bind(this,function(){I.refresh()}));return I});B.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){B.formatWindow.window.fit()}));B.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else B.formatWindow.window.setVisible(null!=D?D:!B.formatWindow.window.isVisible())}else{if(null==B.formatElt){B.formatElt=m();var N=B.createFormat(B.formatElt);N.init();B.formatElt.style.border="none";B.formatElt.style.width=
+"240px";B.formatElt.style.borderLeft="1px solid gray";B.formatElt.style.right="0px";B.addListener("darkModeChanged",mxUtils.bind(this,function(){N.refresh()}))}G=B.diagramContainer.parentNode;null!=B.formatElt.parentNode?(B.formatElt.parentNode.removeChild(B.formatElt),G.style.right="0px"):(G.parentNode.appendChild(B.formatElt),G.style.right=B.formatElt.style.width)}}function e(B,D){function G(I,Q){var X=B.menus.get(I);I=F.addMenu(Q,mxUtils.bind(this,function(){X.funct.apply(this,arguments)}));I.style.cssText=
+"position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;";I.className="geTitle";D.appendChild(I);return I}var H=document.createElement("div");H.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";H.className="geTitle";var N=document.createElement("span");N.style.fontSize="18px";N.style.marginRight="5px";
+N.innerHTML="+";H.appendChild(N);mxUtils.write(H,mxResources.get("moreShapes"));D.appendChild(H);mxEvent.addListener(H,"click",function(){B.actions.get("shapes").funct()});var F=new Menubar(B,D);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?H.style.bottom="0":null!=B.actions.get("newLibrary")?(H=document.createElement("div"),H.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",
+H.className="geTitle",N=document.createElement("span"),N.style.cssText="position:relative;top:6px;",mxUtils.write(N,mxResources.get("newLibrary")),H.appendChild(N),D.appendChild(H),mxEvent.addListener(H,"click",B.actions.get("newLibrary").funct),H=document.createElement("div"),H.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;",H.className="geTitle",N=document.createElement("span"),
+N.style.cssText="position:relative;top:6px;",mxUtils.write(N,mxResources.get("openLibrary")),H.appendChild(N),D.appendChild(H),mxEvent.addListener(H,"click",B.actions.get("openLibrary").funct)):(H=G("newLibrary",mxResources.get("newLibrary")),H.style.boxSizing="border-box",H.style.paddingRight="6px",H.style.paddingLeft="6px",H.style.height="32px",H.style.left="0",H=G("openLibraryFrom",mxResources.get("openLibraryFrom")),H.style.borderLeft="1px solid lightgray",H.style.boxSizing="border-box",H.style.paddingRight=
+"6px",H.style.paddingLeft="6px",H.style.height="32px",H.style.left="50%");D.appendChild(B.sidebar.container);D.style.overflow="hidden"}function f(B,D){if(EditorUi.windowed){var G=B.editor.graph;G.popupMenuHandler.hideMenu();if(null==B.sidebarWindow){D=Math.min(G.container.clientWidth-10,218);var H="1"==urlParams.embedInline?650:Math.min(G.container.clientHeight-40,650);B.sidebarWindow=new n(B,mxResources.get("shapes"),"1"==urlParams.sketch&&"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&
+"1"!=urlParams.embedInline?Math.max(30,(G.container.clientHeight-H)/2):56,D-6,H-6,function(N){e(B,N)});B.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){B.sidebarWindow.window.fit()}));B.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);B.sidebarWindow.window.setVisible(!0);isLocalStorage&&B.getLocalData("sidebar",function(N){B.sidebar.showEntries(N,null,!0)});B.restoreLibraries()}else B.sidebarWindow.window.setVisible(null!=D?D:!B.sidebarWindow.window.isVisible())}else null==
B.sidebarElt&&(B.sidebarElt=m(),e(B,B.sidebarElt),B.sidebarElt.style.border="none",B.sidebarElt.style.width="210px",B.sidebarElt.style.borderRight="1px solid gray"),G=B.diagramContainer.parentNode,null!=B.sidebarElt.parentNode?(B.sidebarElt.parentNode.removeChild(B.sidebarElt),G.style.left="0px"):(G.parentNode.appendChild(B.sidebarElt),G.style.left=B.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=
-null;else{var c=0;try{c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(B){}var m=function(){var B=document.createElement("div");B.className="geSidebarContainer";B.style.position="absolute";B.style.width="100%";B.style.height="100%";B.style.border="1px solid whiteSmoke";B.style.overflowX="hidden";B.style.overflowY="auto";return B},n=function(B,D,G,N,I,F,H){var R=m();H(R);this.window=new mxWindow(D,R,G,N,I,F,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);
-this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.setLocation=function(X,J){var W=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,V=this.table.firstChild.firstChild.firstChild;X=Math.max(0,Math.min(X,(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-V.clientWidth-2));J=Math.max(0,Math.min(J,W-V.clientHeight-2));this.getX()==X&&this.getY()==J||mxWindow.prototype.setLocation.apply(this,
-arguments)};mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(X){null==X&&(X=window.event);return null!=X&&B.isSelectionAllowed(X)}))};Editor.checkmarkImage=Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;
-mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');
+null;else{var c=0;try{c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(B){}var m=function(){var B=document.createElement("div");B.className="geSidebarContainer";B.style.position="absolute";B.style.width="100%";B.style.height="100%";B.style.border="1px solid whiteSmoke";B.style.overflowX="hidden";B.style.overflowY="auto";return B},n=function(B,D,G,H,N,F,I){var Q=m();I(Q);this.window=new mxWindow(D,Q,G,H,N,F,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);
+this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);B.installResizeHandler(this,!0);mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(X){null==X&&(X=window.event);return null!=X&&B.isSelectionAllowed(X)}))};Editor.checkmarkImage=Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;
+mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');
mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR="#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR="#C0C0C0";mxConstants.HIGHLIGHT_STROKEWIDTH=5;mxConstants.HIGHLIGHT_OPACITY=35;mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity=
"0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur="1.2";Format.inactiveTabBackgroundColor="#f0f0f0";mxGraphHandler.prototype.previewColor="#C0C0C0";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight="1"==urlParams.sketch?1:46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert="1"!=urlParams.sketch&&!mxClient.IS_IOS&&!mxClient.IS_ANDROID;
EditorUi.prototype.setDarkMode=function(B){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetDarkMode(B);null==urlParams.dark&&(mxSettings.settings.darkMode=B,mxSettings.save());this.fireEvent(new mxEventObject("darkModeChanged"))}),0)};var v=document.createElement("link");v.setAttribute("rel","stylesheet");v.setAttribute("href",STYLE_PATH+"/dark.css");v.setAttribute("charset","UTF-8");v.setAttribute("type",
@@ -13129,152 +13123,152 @@ Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMo
EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");g.apply(this,arguments)};var k=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){k.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var l=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(B,
D){null!=D.shortcut&&900>c&&!mxClient.IS_IOS?B.firstChild.nextSibling.setAttribute("title",D.shortcut):l.apply(this,arguments)};var p=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){p.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.innerText="";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"));if("none"!=B.style.display){B.style.display="inline-block";var D=this.getCurrentFile();if(null!=D&&D.isRealtimeEnabled()&&D.isRealtimeSupported()){var G=document.createElement("img");G.setAttribute("border","0");G.style.position="absolute";G.style.left="18px";G.style.top="2px";G.style.width="12px";G.style.height=
-"12px";var N=D.getRealtimeError();D=D.getRealtimeState();var I=mxResources.get("realtimeCollaboration");1==D?(G.src=Editor.syncImage,I+=" ("+mxResources.get("online")+")"):(G.src=Editor.syncProblemImage,I=null!=N&&null!=N.message?I+(" ("+N.message+")"):I+(" ("+mxResources.get("disconnected")+")"));G.setAttribute("title",I);B.style.paddingRight="4px";B.appendChild(G)}}}};var q=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){q.apply(this,arguments);if(null!=this.shareButton){var B=
+"12px";var H=D.getRealtimeError();D=D.getRealtimeState();var N=mxResources.get("realtimeCollaboration");1==D?(G.src=Editor.syncImage,N+=" ("+mxResources.get("online")+")"):(G.src=Editor.syncProblemImage,N=null!=H&&null!=H.message?N+(" ("+H.message+")"):N+(" ("+mxResources.get("disconnected")+")"));G.setAttribute("title",N);B.style.paddingRight="4px";B.appendChild(G)}}}};var q=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){q.apply(this,arguments);if(null!=this.shareButton){var B=
this.shareButton;B.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";B.className="geToolbarButton";B.innerText="";B.style.backgroundImage="url("+Editor.shareImage+")";B.style.backgroundPosition="center center";B.style.backgroundRepeat="no-repeat";B.style.backgroundSize="24px 24px";B.style.height="24px";B.style.width="24px";"1"==urlParams.sketch&&(this.shareButton.style.display="none")}null!=this.buttonContainer&&(this.buttonContainer.style.marginTop=
"-2px",this.buttonContainer.style.paddingTop="4px")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer&&"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 D=document.createElement("a");D.className="geMenuItem gePrimaryBtn";D.style.marginLeft="8px";D.style.padding="6px";if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var G="1"==urlParams.publishClose?
mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(D,G);D.setAttribute("title",G);mxEvent.addListener(D,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));B.appendChild(D)}}else mxUtils.write(D,mxResources.get("save")),D.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(D,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),B.appendChild(D),"1"==urlParams.saveAndExit&&(D=document.createElement("a"),
mxUtils.write(D,mxResources.get("saveAndExit")),D.setAttribute("title",mxResources.get("saveAndExit")),D.className="geMenuItem",D.style.marginLeft="6px",D.style.padding="6px",mxEvent.addListener(D,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),B.appendChild(D));"1"!=urlParams.noExitBtn&&(D=document.createElement("a"),G="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(D,G),D.setAttribute("title",G),D.className="geMenuItem",
D.style.marginLeft="6px",D.style.padding="6px",mxEvent.addListener(D,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),B.appendChild(D));this.buttonContainer.appendChild(B);this.buttonContainer.style.top="6px";this.editor.fireEvent(new mxEventObject("statusChanged"))}};var x=Sidebar.prototype.getTooltipOffset;Sidebar.prototype.getTooltipOffset=function(B,D){if(null==this.editorUi.sidebarWindow||mxUtils.isAncestorNode(this.editorUi.picker,B)){var G=mxUtils.getOffset(this.editorUi.picker);
-G.x+=this.editorUi.picker.offsetWidth+4;G.y+=B.offsetTop-D.height/2+16;return G}var N=x.apply(this,arguments);G=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);N.x+=G.x-16;N.y+=G.y;return N};var y=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(B,D,G){var N=this.editorUi.editor.graph;B.smartSeparators=!0;y.apply(this,arguments);"1"==urlParams.sketch?N.isEnabled()&&(B.addSeparator(),1==N.getSelectionCount()&&this.addMenuItems(B,["-","lockUnlock"],null,G)):1==N.getSelectionCount()?
-(N.isCellFoldable(N.getSelectionCell())&&this.addMenuItems(B,N.isCellCollapsed(D)?["expand"]:["collapse"],null,G),this.addMenuItems(B,["collapsible","-","lockUnlock","enterGroup"],null,G),B.addSeparator(),this.addSubmenu("layout",B)):N.isSelectionEmpty()&&N.isEnabled()?(B.addSeparator(),this.addMenuItems(B,["editData"],null,G),B.addSeparator(),this.addSubmenu("layout",B),this.addSubmenu("insert",B),this.addMenuItems(B,["-","exitGroup"],null,G)):N.isEnabled()&&this.addMenuItems(B,["-","lockUnlock"],
+G.x+=this.editorUi.picker.offsetWidth+4;G.y+=B.offsetTop-D.height/2+16;return G}var H=x.apply(this,arguments);G=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);H.x+=G.x-16;H.y+=G.y;return H};var y=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(B,D,G){var H=this.editorUi.editor.graph;B.smartSeparators=!0;y.apply(this,arguments);"1"==urlParams.sketch?H.isEnabled()&&(B.addSeparator(),1==H.getSelectionCount()&&this.addMenuItems(B,["-","lockUnlock"],null,G)):1==H.getSelectionCount()?
+(H.isCellFoldable(H.getSelectionCell())&&this.addMenuItems(B,H.isCellCollapsed(D)?["expand"]:["collapse"],null,G),this.addMenuItems(B,["collapsible","-","lockUnlock","enterGroup"],null,G),B.addSeparator(),this.addSubmenu("layout",B)):H.isSelectionEmpty()&&H.isEnabled()?(B.addSeparator(),this.addMenuItems(B,["editData"],null,G),B.addSeparator(),this.addSubmenu("layout",B),this.addSubmenu("insert",B),this.addMenuItems(B,["-","exitGroup"],null,G)):H.isEnabled()&&this.addMenuItems(B,["-","lockUnlock"],
null,G)};var z=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(B,D,G){z.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(B,["copyAsImage"],null,G)};EditorUi.prototype.toggleFormatPanel=function(B){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=B?B:!this.formatWindow.window.isVisible()):b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var A=EditorUi.prototype.destroy;EditorUi.prototype.destroy=
function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.window.setVisible(!1),this.actions.outlineWindow.window.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.window.setVisible(!1),
this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.window.setVisible(!1),this.menus.tagsWindow.window.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.window.setVisible(!1),this.menus.findWindow.window.destroy(),this.menus.findWindow=null);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.window.setVisible(!1),this.menus.findReplaceWindow.window.destroy(),this.menus.findReplaceWindow=
-null);A.apply(this,arguments)};var K=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(B){K.apply(this,arguments);if(B){var D=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=D&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=D||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),
-null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var O=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(B){B=O.apply(this,arguments);var D=this.editorUi,G=D.editor.graph;if(G.isEnabled()&&"1"==urlParams.sketch){var N=this.createOption(mxResources.get("sketch"),function(){return Editor.sketchMode},function(I,F){D.setSketchMode(!Editor.sketchMode);null!=F&&mxEvent.isShiftDown(F)||G.updateCellStyles({sketch:I?
-"1":null},G.getVerticesAndEdges())},{install:function(I){this.listener=function(){I(Editor.sketchMode)};D.addListener("sketchModeChanged",this.listener)},destroy:function(){D.removeListener(this.listener)}});B.appendChild(N)}return B};var L=Menus.prototype.init;Menus.prototype.init=function(){L.apply(this,arguments);var B=this.editorUi,D=B.editor.graph;B.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";B.actions.get("createShape").label=mxResources.get("shape")+"...";B.actions.get("outline").label=
-mxResources.get("outline")+"...";B.actions.get("layers").label=mxResources.get("layers")+"...";B.actions.get("tags").label=mxResources.get("tags")+"...";B.actions.get("comments").label=mxResources.get("comments")+"...";var G=B.actions.put("toggleDarkMode",new Action(mxResources.get("dark"),function(J){B.setDarkMode(!Editor.darkMode)}));G.setToggleAction(!0);G.setSelectedCallback(function(){return Editor.isDarkMode()});G=B.actions.put("toggleSketchMode",new Action(mxResources.get("sketch"),function(J){B.setSketchMode(!Editor.sketchMode)}));
-G.setToggleAction(!0);G.setSelectedCallback(function(){return Editor.sketchMode});G=B.actions.put("togglePagesVisible",new Action(mxResources.get("pages"),function(J){B.setPagesVisible(!Editor.pagesVisible)}));G.setToggleAction(!0);G.setSelectedCallback(function(){return Editor.pagesVisible});B.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){D.popupMenuHandler.hideMenu();B.showImportCsvDialog()}));B.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var J=
-new ParseDialog(B,"Insert from Text");B.showDialog(J.container,620,420,!0,!1);J.init()}));B.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var J=new ParseDialog(B,"Insert from Text","formatSql");B.showDialog(J.container,620,420,!0,!1);J.init()}));B.actions.put("toggleShapes",new Action(mxResources.get("1"==urlParams.sketch?"moreShapes":"shapes")+"...",function(){f(B)},null,null,Editor.ctrlKey+"+Shift+K"));B.actions.put("toggleFormat",new Action(mxResources.get("format")+
-"...",function(){b(B)})).shortcut=B.actions.get("formatPanel").shortcut;EditorUi.enablePlantUml&&!B.isOffline()&&B.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var J=new ParseDialog(B,mxResources.get("plantUml")+"...","plantUml");B.showDialog(J.container,620,420,!0,!1);J.init()}));B.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var J=new ParseDialog(B,mxResources.get("mermaid")+"...","mermaid");B.showDialog(J.container,620,420,!0,!1);
-J.init()}));var N=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,function(J,W){var V=this.editorUi.editor.graph,t=V.getSelectionCell();N.call(this,J,t,null,W);this.addMenuItems(J,["editTooltip"],W);V.model.isVertex(t)&&this.addMenuItems(J,["editGeometry"],W);this.addMenuItems(J,["-","edit"],W)})));this.addPopupMenuCellEditItems=function(J,W,V,t){J.addSeparator();this.addSubmenu("editCell",J,t,mxResources.get("edit"))};this.put("file",new Menu(mxUtils.bind(this,function(J,
-W){var V=B.getCurrentFile();B.menus.addMenuItems(J,["new"],W);B.menus.addSubmenu("openFrom",J,W);isLocalStorage&&this.addSubmenu("openRecent",J,W);J.addSeparator(W);null!=V&&V.constructor==DriveFile?B.menus.addMenuItems(J,["save","rename","makeCopy","moveToFolder"],W):(B.menus.addMenuItems(J,["save","saveAs","-","rename"],W),B.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(J,["upload"],W):B.menus.addMenuItems(J,["makeCopy"],W));J.addSeparator(W);
-null!=V&&(V.isRevisionHistorySupported()&&B.menus.addMenuItems(J,["revisionHistory"],W),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||V.constructor==LocalFile&&null==V.fileHandle||B.menus.addMenuItems(J,["synchronize"],W));B.menus.addMenuItems(J,["autosave"],W);if(null!=V&&(J.addSeparator(W),V.constructor==DriveFile&&B.menus.addMenuItems(J,["share"],W),null!=B.fileNode&&"1"!=urlParams.embedInline)){var t=null!=V.getTitle()?V.getTitle():B.defaultFilename;(V.constructor==DriveFile&&null!=V.sync&&V.sync.isConnected()||
-!/(\.html)$/i.test(t)&&!/(\.svg)$/i.test(t))&&this.addMenuItems(J,["-","properties"],W)}})));this.put("diagram",new Menu(mxUtils.bind(this,function(J,W){var V=B.getCurrentFile();B.menus.addSubmenu("extras",J,W,mxResources.get("preferences"));J.addSeparator(W);if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)B.menus.addMenuItems(J,"new open - synchronize - save saveAs -".split(" "),W);else if("1"==urlParams.embed||B.mode==App.MODE_ATLAS){"1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&B.menus.addMenuItems(J,
-["-","save"],W);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||B.mode==App.MODE_ATLAS)B.menus.addMenuItems(J,["saveAndExit"],W),null!=V&&V.isRevisionHistorySupported()&&B.menus.addMenuItems(J,["revisionHistory"],W);J.addSeparator(W)}else B.mode==App.MODE_ATLAS?B.menus.addMenuItems(J,["save","synchronize","-"],W):"1"!=urlParams.noFileMenu&&("1"!=urlParams.sketch?(B.menus.addMenuItems(J,["new"],W),B.menus.addSubmenu("openFrom",J,W),isLocalStorage&&this.addSubmenu("openRecent",
-J,W),J.addSeparator(W),null!=V&&(V.constructor==DriveFile&&B.menus.addMenuItems(J,["share"],W),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||V.constructor==LocalFile||B.menus.addMenuItems(J,["synchronize"],W)),J.addSeparator(W),B.menus.addSubmenu("save",J,W)):B.menus.addSubmenu("file",J,W));B.menus.addSubmenu("exportAs",J,W);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?B.menus.addMenuItems(J,["import"],W):"1"!=urlParams.noFileMenu&&B.menus.addSubmenu("importFrom",J,W);B.commentsSupported()&&B.menus.addMenuItems(J,
-["-","comments"],W);B.menus.addMenuItems(J,"- findReplace outline layers tags - pageSetup".split(" "),W);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||B.menus.addMenuItems(J,["print"],W);"1"!=urlParams.sketch&&null!=V&&null!=B.fileNode&&"1"!=urlParams.embedInline&&(V=null!=V.getTitle()?V.getTitle():B.defaultFilename,/(\.html)$/i.test(V)||/(\.svg)$/i.test(V)||this.addMenuItems(J,["-","properties"]));J.addSeparator(W);B.menus.addSubmenu("help",J,W);"1"==urlParams.embed||B.mode==
-App.MODE_ATLAS?("1"!=urlParams.noExitBtn||B.mode==App.MODE_ATLAS)&&B.menus.addMenuItems(J,["-","exit"],W):"1"!=urlParams.noFileMenu&&B.menus.addMenuItems(J,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(J,W){var V=B.getCurrentFile();null!=V&&V.constructor==DriveFile?B.menus.addMenuItems(J,["save","makeCopy","-","rename","moveToFolder"],W):(B.menus.addMenuItems(J,["save","saveAs","-","rename"],W),B.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&
-this.addMenuItems(J,["upload"],W):B.menus.addMenuItems(J,["makeCopy"],W));B.menus.addMenuItems(J,["-","autosave"],W);null!=V&&V.isRevisionHistorySupported()&&B.menus.addMenuItems(J,["-","revisionHistory"],W)})));var I=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(J,W){I.funct(J,W);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||B.menus.addMenuItems(J,["publishLink"],W);B.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(J.addSeparator(W),B.menus.addSubmenu("embed",J,W))})));
-var F=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(J,W){B.menus.addInsertTableCellItem(J,W)})));if("1"==urlParams.sketch){var H=this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(J,W){H.funct(J,W);this.addMenuItems(J,["-","pageScale","-","ruler"],W)})))}this.put("extras",new Menu(mxUtils.bind(this,function(J,W){null!=F&&B.menus.addSubmenu("language",J,W);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&B.mode!=App.MODE_ATLAS&&B.menus.addSubmenu("theme",
-J,W);B.menus.addSubmenu("units",J,W);J.addSeparator(W);"1"!=urlParams.sketch&&B.menus.addMenuItems(J,"pageScale ruler scrollbars - tooltips copyConnect collapseExpand".split(" "),W);"1"!=urlParams.embedInline&&"1"!=urlParams.sketch&&"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&B.mode!=App.MODE_ATLAS&&B.menus.addMenuItems(J,["-","showStartScreen","search","scratchpad"],W);J.addSeparator(W);"1"==urlParams.sketch?B.menus.addMenuItems(J,"configuration - copyConnect collapseExpand tooltips -".split(" "),
-W):(B.mode!=App.MODE_ATLAS&&B.menus.addMenuItem(J,"configuration",W),!B.isOfflineApp()&&isLocalStorage&&B.mode!=App.MODE_ATLAS&&B.menus.addMenuItem(J,"plugins",W));EditorUi.isElectronApp&&B.menus.addMenuItems(J,["-","spellCheck","autoBkp","drafts","-"],W);var V=B.getCurrentFile();null!=V&&V.isRealtimeEnabled()&&V.isRealtimeSupported()&&this.addMenuItems(J,["-","showRemoteCursors","shareCursor","-"],W);J.addSeparator(W);B.mode!=App.MODE_ATLAS&&this.addMenuItems(J,["fullscreen"],W);("1"!=urlParams.embedInline&&
-Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(J,["toggleDarkMode"],W);J.addSeparator(W)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(J,W){B.menus.addMenuItems(J,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),W)})));mxUtils.bind(this,function(){var J=this.get("insert"),W=J.funct;J.funct=function(V,t){"1"==urlParams.sketch?(B.insertTemplateEnabled&&!B.isOffline()&&B.menus.addMenuItems(V,["insertTemplate"],t),
-B.menus.addMenuItems(V,["insertImage","insertLink","-"],t),B.menus.addSubmenu("insertAdvanced",V,t,mxResources.get("advanced")),B.menus.addSubmenu("layout",V,t)):(W.apply(this,arguments),B.menus.addSubmenu("table",V,t))}})();var R="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),X=function(J,W,V,t){J.addItem(V,null,mxUtils.bind(this,function(){var C=new CreateGraphDialog(B,V,t);B.showDialog(C.container,620,420,!0,!1);C.init()}),W)};this.put("insertLayout",
-new Menu(mxUtils.bind(this,function(J,W){for(var V=0;V<R.length;V++)"-"==R[V]?J.addSeparator(W):X(J,W,mxResources.get(R[V])+"...",R[V])})))};EditorUi.prototype.installFormatToolbar=function(B){var D=this.editor.graph,G=document.createElement("div");G.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%;";D.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,
-function(N,I){0<D.getSelectionCount()?(B.appendChild(G),G.innerHTML="Selected: "+D.getSelectionCount()):null!=G.parentNode&&G.parentNode.removeChild(G)}))};var u=!1;EditorUi.prototype.initFormatWindow=function(){if(!u&&null!=this.formatWindow){u=!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(D){mxEvent.getSource(D)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var E=EditorUi.prototype.init;EditorUi.prototype.init=function(){function B(ca,fa,oa){var la=F.menus.get(ca),qa=J.addMenu(mxResources.get(ca),
-mxUtils.bind(this,function(){la.funct.apply(this,arguments)}),X);qa.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";qa.style.display="inline-block";qa.style.boxSizing="border-box";qa.style.top="6px";qa.style.marginRight="6px";qa.style.height="30px";qa.style.paddingTop="6px";qa.style.paddingBottom="6px";qa.style.cursor="pointer";qa.setAttribute("title",mxResources.get(ca));F.menus.menuCreated(la,qa,"geMenuItem");null!=oa?(qa.style.backgroundImage="url("+oa+")",qa.style.backgroundPosition=
-"center center",qa.style.backgroundRepeat="no-repeat",qa.style.backgroundSize="24px 24px",qa.style.width="34px",qa.innerText=""):fa||(qa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",qa.style.backgroundPosition="right 6px center",qa.style.backgroundRepeat="no-repeat",qa.style.paddingRight="22px");return qa}function D(ca,fa,oa,la,qa,pa){var ka=document.createElement("a");ka.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";ka.style.display="inline-block";ka.style.boxSizing=
-"border-box";ka.style.height="30px";ka.style.padding="6px";ka.style.position="relative";ka.style.verticalAlign="top";ka.style.top="0px";"1"==urlParams.sketch&&(ka.style.borderStyle="none",ka.style.boxShadow="none",ka.style.padding="6px",ka.style.margin="0px");null!=F.statusContainer?R.insertBefore(ka,F.statusContainer):R.appendChild(ka);null!=pa?(ka.style.backgroundImage="url("+pa+")",ka.style.backgroundPosition="center center",ka.style.backgroundRepeat="no-repeat",ka.style.backgroundSize="24px 24px",
-ka.style.width="34px"):mxUtils.write(ka,ca);mxEvent.addListener(ka,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(Ea){Ea.preventDefault()}));mxEvent.addListener(ka,"click",function(Ea){"disabled"!=ka.getAttribute("disabled")&&fa(Ea);mxEvent.consume(Ea)});null==oa&&(ka.style.marginRight="4px");null!=la&&ka.setAttribute("title",la);null!=qa&&(ca=function(){qa.isEnabled()?(ka.removeAttribute("disabled"),ka.style.cursor="pointer"):(ka.setAttribute("disabled","disabled"),ka.style.cursor=
-"default")},qa.addListener("stateChanged",ca),H.addListener("enabledChanged",ca),ca());return ka}function G(ca,fa,oa){oa=document.createElement("div");oa.className="geMenuItem";oa.style.display="inline-block";oa.style.verticalAlign="top";oa.style.marginRight="6px";oa.style.padding="0 4px 0 4px";oa.style.height="30px";oa.style.position="relative";oa.style.top="0px";"1"==urlParams.sketch&&(oa.style.boxShadow="none");for(var la=0;la<ca.length;la++)null!=ca[la]&&("1"==urlParams.sketch&&(ca[la].style.padding=
-"10px 8px",ca[la].style.width="30px"),ca[la].style.margin="0px",ca[la].style.boxShadow="none",oa.appendChild(ca[la]));null!=fa&&mxUtils.setOpacity(oa,fa);null!=F.statusContainer&&"1"!=urlParams.sketch?R.insertBefore(oa,F.statusContainer):R.appendChild(oa);return oa}function N(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(S.style.left=58>P.offsetTop-P.offsetHeight/2?"70px":"10px");else{for(var ca=R.firstChild;null!=ca;){var fa=ca.nextSibling;"geMenuItem"!=ca.className&&"geItem"!=ca.className||
-ca.parentNode.removeChild(ca);ca=fa}X=R.firstChild;c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;ca=1E3>c||"1"==urlParams.sketch;var oa=null;ca||(oa=B("diagram"));fa=ca?B("diagram",null,Editor.drawLogoImage):null;null!=fa&&(oa=fa);G([oa,D(mxResources.get("shapes"),F.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),F.actions.get("image"),ca?Editor.shapesImage:null),D(mxResources.get("format"),F.actions.get("toggleFormat").funct,null,mxResources.get("format")+
-" ("+F.actions.get("formatPanel").shortcut+")",F.actions.get("image"),ca?Editor.formatImage:null)],ca?60:null);fa=B("insert",!0,ca?M:null);G([fa,D(mxResources.get("delete"),F.actions.get("delete").funct,null,mxResources.get("delete"),F.actions.get("delete"),ca?Editor.trashImage:null)],ca?60:null);411<=c&&(G([xa,Ja],60),520<=c&&G([wa,640<=c?D("",Ca.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",Ca,Editor.zoomInImage):null,640<=c?D("",Da.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+
-" -)",Da,Editor.zoomOutImage):null],60))}null!=oa&&(mxEvent.disableContextMenu(oa),mxEvent.addGestureListeners(oa,mxUtils.bind(this,function(la){(mxEvent.isShiftDown(la)||mxEvent.isAltDown(la)||mxEvent.isMetaDown(la)||mxEvent.isControlDown(la)||mxEvent.isPopupTrigger(la))&&F.appIconClicked(la)}),null,null));fa=F.menus.get("language");null!=fa&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=c&&"1"!=urlParams.sketch?(null==sa&&(fa=J.addMenu("",fa.funct),fa.setAttribute("title",mxResources.get("language")),
-fa.className="geToolbarButton",fa.style.backgroundImage="url("+Editor.globeImage+")",fa.style.backgroundPosition="center center",fa.style.backgroundRepeat="no-repeat",fa.style.backgroundSize="24px 24px",fa.style.position="absolute",fa.style.height="24px",fa.style.width="24px",fa.style.zIndex="1",fa.style.right="8px",fa.style.cursor="pointer",fa.style.top="1"==urlParams.embed?"12px":"11px",R.appendChild(fa),sa=fa),F.buttonContainer.style.paddingRight="34px"):(F.buttonContainer.style.paddingRight="4px",
-null!=sa&&(sa.parentNode.removeChild(sa),sa=null))}E.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 I=document.createElement("div");I.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";I.style.bottom="1"!=urlParams.embed||
-"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(I);"1"==urlParams.sketch&&null!=this.sidebar&&this.isSettingsEnabled()&&(this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save()),this.sidebar.showPalette("search",mxSettings.settings.search));if("1"!=urlParams.sketch&&1E3<=c||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])f(this,!0),null!=
-this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));var F=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==F.embedViewport)mxUtils.fit(this.div);else{var ca=parseInt(this.div.offsetLeft),fa=parseInt(this.div.offsetWidth),oa=F.embedViewport.x+F.embedViewport.width,la=parseInt(this.div.offsetTop),qa=parseInt(this.div.offsetHeight),pa=F.embedViewport.y+F.embedViewport.height;
-this.div.style.left=Math.max(F.embedViewport.x,Math.min(ca,oa-fa))+"px";this.div.style.top=Math.max(F.embedViewport.y,Math.min(la,pa-qa))+"px";this.div.style.height=Math.min(F.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(F.embedViewport.width,parseInt(this.div.style.width))+"px"}};this.keyHandler.bindAction(75,!0,"toggleShapes",!0);EditorUi.windowed&&("1"==urlParams.sketch||1E3<=c)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?(this.initFormatWindow(),
-I=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>c||708>I)?this.formatWindow.window.toggleMinimized():this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));F=this;var H=F.editor.graph;F.toolbar=this.createToolbar(F.createDiv("geToolbar"));F.defaultLibraryName=mxResources.get("untitledLibrary");var R=document.createElement("div");R.className="geMenubarContainer";var X=null,J=new Menubar(F,R);F.statusContainer=
-F.createStatusContainer();F.statusContainer.style.position="relative";F.statusContainer.style.maxWidth="";F.statusContainer.style.marginTop="7px";F.statusContainer.style.marginLeft="6px";F.statusContainer.style.color="gray";F.statusContainer.style.cursor="default";var W=F.hideCurrentMenu;F.hideCurrentMenu=function(){W.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var V=F.descriptorChanged;F.descriptorChanged=function(){V.apply(this,arguments);var ca=F.getCurrentFile();if(null!=
-ca&&null!=ca.getTitle()){var fa=ca.getMode();"google"==fa?fa="googleDrive":"github"==fa?fa="gitHub":"gitlab"==fa?fa="gitLab":"onedrive"==fa&&(fa="oneDrive");fa=mxResources.get(fa);R.setAttribute("title",ca.getTitle()+(null!=fa?" ("+fa+")":""))}else R.removeAttribute("title")};F.setStatusText(F.editor.getStatus());R.appendChild(F.statusContainer);F.buttonContainer=document.createElement("div");F.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";
-R.appendChild(F.buttonContainer);F.menubarContainer=F.buttonContainer;F.tabContainer=document.createElement("div");F.tabContainer.className="geTabContainer";F.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";I=F.diagramContainer.parentNode;var t=document.createElement("div");t.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";F.diagramContainer.style.top="1"==urlParams.sketch?
-"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){t.style.top="20px";F.titlebar=document.createElement("div");F.titlebar.style.cssText="position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var C=document.createElement("div");C.style.cssText="max-width: calc(100% - 100px);text-overflow: ellipsis;user-select:none;height:20px;margin: 2px 10px;font-size: 12px;white-space: nowrap;overflow: hidden;";F.titlebar.appendChild(C);I.appendChild(F.titlebar)}C=
-F.menus.get("viewZoom");var M="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,Q="1"==urlParams.sketch?document.createElement("div"):null,P="1"==urlParams.sketch?document.createElement("div"):null,S="1"==urlParams.sketch?document.createElement("div"):null,U=mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.refresh();H.refresh();H.view.validateBackground()});F.addListener("darkModeChanged",U);F.addListener("sketchModeChanged",U);var T=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)S.style.left=
-"10px",S.style.top="10px",P.style.left="10px",P.style.top="60px",Q.style.top="10px",Q.style.right="12px",Q.style.left="",F.diagramContainer.setAttribute("data-bounds",F.diagramContainer.style.top+" "+F.diagramContainer.style.left+" "+F.diagramContainer.style.width+" "+F.diagramContainer.style.height),F.diagramContainer.style.top="0px",F.diagramContainer.style.left="0px",F.diagramContainer.style.bottom="0px",F.diagramContainer.style.right="0px",F.diagramContainer.style.width="",F.diagramContainer.style.height=
-"";else{var ca=F.diagramContainer.getAttribute("data-bounds");if(null!=ca){F.diagramContainer.style.background="transparent";F.diagramContainer.removeAttribute("data-bounds");var fa=H.getGraphBounds();ca=ca.split(" ");F.diagramContainer.style.top=ca[0];F.diagramContainer.style.left=ca[1];F.diagramContainer.style.width=fa.width+50+"px";F.diagramContainer.style.height=fa.height+46+"px";F.diagramContainer.style.bottom="";F.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",
-rect:F.diagramContainer.getBoundingClientRect()}),"*");F.refresh()}S.style.left=F.diagramContainer.offsetLeft+"px";S.style.top=F.diagramContainer.offsetTop-S.offsetHeight-4+"px";P.style.display="";P.style.left=F.diagramContainer.offsetLeft-P.offsetWidth-4+"px";P.style.top=F.diagramContainer.offsetTop+"px";Q.style.left=F.diagramContainer.offsetLeft+F.diagramContainer.offsetWidth-Q.offsetWidth+"px";Q.style.top=S.style.top;Q.style.right="";F.bottomResizer.style.left=F.diagramContainer.offsetLeft+(F.diagramContainer.offsetWidth-
-F.bottomResizer.offsetWidth)/2+"px";F.bottomResizer.style.top=F.diagramContainer.offsetTop+F.diagramContainer.offsetHeight-F.bottomResizer.offsetHeight/2-1+"px";F.rightResizer.style.left=F.diagramContainer.offsetLeft+F.diagramContainer.offsetWidth-F.rightResizer.offsetWidth/2-1+"px";F.rightResizer.style.top=F.diagramContainer.offsetTop+(F.diagramContainer.offsetHeight-F.bottomResizer.offsetHeight)/2+"px"}F.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";F.rightResizer.style.visibility=
-F.bottomResizer.style.visibility;R.style.display="none";S.style.visibility="";Q.style.visibility=""}),Y=mxUtils.bind(this,function(){Fa.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";T()});U=mxUtils.bind(this,function(){Y();b(F,!0);F.initFormatWindow();var ca=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(ca.x+
-ca.width+4,ca.y)});F.addListener("inlineFullscreenChanged",Y);F.addListener("editInlineStart",U);"1"==urlParams.embedInline&&F.addListener("darkModeChanged",U);F.addListener("editInlineStop",mxUtils.bind(this,function(ca){F.diagramContainer.style.width="10px";F.diagramContainer.style.height="10px";F.diagramContainer.style.border="";F.bottomResizer.style.visibility="hidden";F.rightResizer.style.visibility="hidden";S.style.visibility="hidden";Q.style.visibility="hidden";P.style.display="none"}));if(null!=
-F.hoverIcons){var aa=F.hoverIcons.update;F.hoverIcons.update=function(){H.freehand.isDrawing()||aa.apply(this,arguments)}}if(null!=H.freehand){var Z=H.freehand.createStyle;H.freehand.createStyle=function(ca){return Z.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){P.className="geToolbarContainer";Q.className="geToolbarContainer";S.className="geToolbarContainer";R.className="geToolbarContainer";F.picker=P;var da=!1;"1"!=urlParams.embed&&"atlassian"!=F.getServiceName()&&(mxEvent.addListener(R,
-"mouseenter",function(){F.statusContainer.style.display="inline-block"}),mxEvent.addListener(R,"mouseleave",function(){da||(F.statusContainer.style.display="none")}));var ja=mxUtils.bind(this,function(ca){null!=F.notificationBtn&&(null!=ca?F.notificationBtn.setAttribute("title",ca):F.notificationBtn.removeAttribute("title"))});R.style.visibility=20>R.clientWidth?"hidden":"";F.editor.addListener("statusChanged",mxUtils.bind(this,function(){F.setStatusText(F.editor.getStatus());if("1"!=urlParams.embed&&
-"atlassian"!=F.getServiceName())if(F.statusContainer.style.display="inline-block",da=!0,1==F.statusContainer.children.length&&""==F.editor.getStatus())R.style.visibility="hidden";else{if(0==F.statusContainer.children.length||1==F.statusContainer.children.length&&"function"===typeof F.statusContainer.firstChild.getAttribute&&null==F.statusContainer.firstChild.getAttribute("class")){var ca=null!=F.statusContainer.firstChild&&"function"===typeof F.statusContainer.firstChild.getAttribute?F.statusContainer.firstChild.getAttribute("title"):
-F.editor.getStatus();ja(ca);var fa=F.getCurrentFile();fa=null!=fa?fa.savingStatusKey:DrawioFile.prototype.savingStatusKey;ca==mxResources.get(fa)+"..."?(F.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(fa))+'..."src="'+Editor.tailSpin+'">',F.statusContainer.style.display="inline-block",da=!0):6<F.buttonContainer.clientWidth&&(F.statusContainer.style.display="none",da=!1)}else F.statusContainer.style.display="inline-block",ja(null),da=!0;R.style.visibility=20>R.clientWidth&&
-!da?"hidden":""}}));ea=B("diagram",null,Editor.menuImage);ea.style.boxShadow="none";ea.style.padding="6px";ea.style.margin="0px";S.appendChild(ea);mxEvent.disableContextMenu(ea);mxEvent.addGestureListeners(ea,mxUtils.bind(this,function(ca){(mxEvent.isShiftDown(ca)||mxEvent.isAltDown(ca)||mxEvent.isMetaDown(ca)||mxEvent.isControlDown(ca)||mxEvent.isPopupTrigger(ca))&&this.appIconClicked(ca)}),null,null);F.statusContainer.style.position="";F.statusContainer.style.display="none";F.statusContainer.style.margin=
-"0px";F.statusContainer.style.padding="6px 0px";F.statusContainer.style.maxWidth=Math.min(c-240,280)+"px";F.statusContainer.style.display="inline-block";F.statusContainer.style.textOverflow="ellipsis";F.buttonContainer.style.position="";F.buttonContainer.style.paddingRight="0px";F.buttonContainer.style.display="inline-block";var ha=document.createElement("a");ha.style.padding="0px";ha.style.boxShadow="none";ha.className="geMenuItem";ha.style.display="inline-block";ha.style.width="40px";ha.style.height=
-"12px";ha.style.marginBottom="-2px";ha.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";ha.style.backgroundPosition="top center";ha.style.backgroundRepeat="no-repeat";ha.setAttribute("title","Minimize");var ba=!1,Aa=mxUtils.bind(this,function(){P.innerText="";if(!ba){var ca=function(la,qa,pa){la=D("",la.funct,null,qa,la,pa);la.style.width="40px";la.style.opacity="0.7";return fa(la,null,"pointer")},fa=function(la,qa,pa){null!=qa&&la.setAttribute("title",qa);la.style.cursor=null!=
-pa?pa:"default";la.style.margin="2px 0px";P.appendChild(la);mxUtils.br(P);return la};fa(F.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text"),!0,!1,null,!0,!0),mxResources.get("text")+" ("+Editor.ctrlKey+"+Shift+X)");fa(F.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,!1,null,!0),mxResources.get("note"));fa(F.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle"),!0,!1,null,!0),mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");fa(F.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse"),!0,!1,null,!0),mxResources.get("ellipse"));(function(){var la=new mxCell("",new mxGeometry(0,0,H.defaultEdgeLength,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");
-la.geometry.setTerminalPoint(new mxPoint(0,0),!0);la.geometry.setTerminalPoint(new mxPoint(la.geometry.width,0),!1);la.geometry.points=[];la.geometry.relative=!0;la.edge=!0;fa(F.sidebar.createEdgeTemplateFromCells([la],la.geometry.width,la.geometry.height,mxResources.get("line"),!0,null,!0,!1),mxResources.get("line"));la=la.clone();la.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";la.geometry.width=H.defaultEdgeLength+20;la.geometry.setTerminalPoint(new mxPoint(0,
-20),!0);la.geometry.setTerminalPoint(new mxPoint(la.geometry.width,20),!1);la=fa(F.sidebar.createEdgeTemplateFromCells([la],la.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"));la.style.borderBottom="1px solid "+(Editor.isDarkMode()?"#505050":"lightgray");la.style.paddingBottom="14px";la.style.marginBottom="14px"})();ca(F.actions.get("insertFreehand"),mxResources.get("freehand"),Editor.freehandImage);var oa=F.actions.get("toggleShapes");ca(oa,mxResources.get("shapes")+
-" ("+oa.shortcut+")",M);ea=B("table",null,Editor.calendarImage);ea.style.boxShadow="none";ea.style.opacity="0.7";ea.style.padding="6px";ea.style.margin="0px";ea.style.width="37px";fa(ea,null,"pointer");ea=B("insert",null,Editor.plusImage);ea.style.boxShadow="none";ea.style.opacity="0.7";ea.style.padding="6px";ea.style.margin="0px";ea.style.width="37px";fa(ea,null,"pointer")}"1"!=urlParams.embedInline&&P.appendChild(ha)});mxEvent.addListener(ha,"click",mxUtils.bind(this,function(){ba?(mxUtils.setPrefixedStyle(P.style,
-"transform","translate(0, -50%)"),P.style.padding="8px 6px 4px",P.style.top="50%",P.style.bottom="",P.style.height="",ha.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",ha.style.width="40px",ha.style.height="12px",ha.setAttribute("title","Minimize"),ba=!1,Aa()):(P.innerText="",P.appendChild(ha),mxUtils.setPrefixedStyle(P.style,"transform","translate(0, 0)"),P.style.top="",P.style.bottom="12px",P.style.padding="0px",P.style.height="24px",ha.style.height="24px",ha.style.backgroundImage=
-"url("+Editor.plusImage+")",ha.setAttribute("title",mxResources.get("insert")),ha.style.width="24px",ba=!0)}));Aa();F.addListener("darkModeChanged",Aa);F.addListener("sketchModeChanged",Aa)}else F.editor.addListener("statusChanged",mxUtils.bind(this,function(){F.setStatusText(F.editor.getStatus())}));if(null!=C){var Ga=function(ca){mxEvent.isShiftDown(ca)?(F.hideCurrentMenu(),F.actions.get("smartFit").funct(),mxEvent.consume(ca)):mxEvent.isAltDown(ca)&&(F.hideCurrentMenu(),F.actions.get("customZoom").funct(),
-mxEvent.consume(ca))},Ca=F.actions.get("zoomIn"),Da=F.actions.get("zoomOut"),na=F.actions.get("resetView");U=F.actions.get("fullscreen");var Ia=F.actions.get("undo"),Ka=F.actions.get("redo"),xa=D("",Ia.funct,null,mxResources.get("undo")+" ("+Ia.shortcut+")",Ia,Editor.undoImage),Ja=D("",Ka.funct,null,mxResources.get("redo")+" ("+Ka.shortcut+")",Ka,Editor.redoImage),Fa=D("",U.funct,null,mxResources.get("fullscreen"),U,Editor.fullscreenImage);if(null!=Q){na=function(){Ba.style.display=null!=F.pages&&
-("0"!=urlParams.pages||1<F.pages.length||Editor.pagesVisible)?"inline-block":"none"};var Oa=function(){Ba.innerText="";if(null!=F.currentPage){mxUtils.write(Ba,F.currentPage.getName());var ca=null!=F.pages?F.pages.length:1,fa=F.getPageIndex(F.currentPage);fa=null!=fa?fa+1:1;var oa=F.currentPage.getId();Ba.setAttribute("title",F.currentPage.getName()+" ("+fa+"/"+ca+")"+(null!=oa?" ["+oa+"]":""))}};Fa.parentNode.removeChild(Fa);var va=F.actions.get("delete"),za=D("",va.funct,null,mxResources.get("delete"),
-va,Editor.trashImage);za.style.opacity="0.1";S.appendChild(za);va.addListener("stateChanged",function(){za.style.opacity=va.enabled?"":"0.1"});var ta=function(){xa.style.display=0<F.editor.undoManager.history.length||H.isEditing()?"inline-block":"none";Ja.style.display=xa.style.display;xa.style.opacity=Ia.enabled?"":"0.1";Ja.style.opacity=Ka.enabled?"":"0.1"};S.appendChild(xa);S.appendChild(Ja);Ia.addListener("stateChanged",ta);Ka.addListener("stateChanged",ta);ta();var Ba=this.createPageMenuTab(!1,
-!0);Ba.style.display="none";Ba.style.position="";Ba.style.marginLeft="";Ba.style.top="";Ba.style.left="";Ba.style.height="100%";Ba.style.lineHeight="";Ba.style.borderStyle="none";Ba.style.padding="3px 0";Ba.style.margin="0px";Ba.style.background="";Ba.style.border="";Ba.style.boxShadow="none";Ba.style.verticalAlign="top";Ba.style.width="auto";Ba.style.maxWidth="160px";Ba.style.position="relative";Ba.style.padding="6px";Ba.style.textOverflow="ellipsis";Ba.style.opacity="0.8";Q.appendChild(Ba);F.editor.addListener("pagesPatched",
-Oa);F.editor.addListener("pageSelected",Oa);F.editor.addListener("pageRenamed",Oa);F.editor.addListener("fileLoaded",Oa);Oa();F.addListener("fileDescriptorChanged",na);F.addListener("pagesVisibleChanged",na);F.editor.addListener("pagesPatched",na);na();na=D("",Da.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",Da,Editor.zoomOutImage);Q.appendChild(na);var ea=J.addMenu("100%",C.funct);ea.setAttribute("title",mxResources.get("zoom"));ea.innerHTML="100%";ea.style.display=
-"inline-block";ea.style.color="inherit";ea.style.cursor="pointer";ea.style.textAlign="center";ea.style.whiteSpace="nowrap";ea.style.paddingRight="10px";ea.style.textDecoration="none";ea.style.verticalAlign="top";ea.style.padding="6px 0";ea.style.fontSize="14px";ea.style.width="40px";ea.style.opacity="0.4";Q.appendChild(ea);C=D("",Ca.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",Ca,Editor.zoomInImage);Q.appendChild(C);U.visible&&(Q.appendChild(Fa),mxEvent.addListener(document,
-"fullscreenchange",function(){Fa.style.backgroundImage="url("+(null!=document.fullscreenElement?Editor.fullscreenExitImage:Editor.fullscreenImage)+")"}));"1"==urlParams.embedInline&&(C=F.actions.get("exit"),Q.appendChild(D("",C.funct,null,mxResources.get("exit"),C,Editor.closeImage)));F.tabContainer.style.visibility="hidden";R.style.cssText="position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px 0px 6px 6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
-S.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";Q.style.cssText="position:absolute;right:14px;bottom:14px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";t.appendChild(S);t.appendChild(Q);P.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";
-mxClient.IS_POINTER&&(P.style.touchAction="none");t.appendChild(P);window.setTimeout(function(){mxUtils.setPrefixedStyle(P.style,"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(t)}else{var wa=D("",Ga,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",na,Editor.zoomFitImage);R.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";ea=J.addMenu("100%",
-C.funct);ea.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");ea.style.whiteSpace="nowrap";ea.style.paddingRight="10px";ea.style.textDecoration="none";ea.style.textDecoration="none";ea.style.overflow="hidden";ea.style.visibility="hidden";ea.style.textAlign="center";ea.style.cursor="pointer";ea.style.height=parseInt(F.tabContainerHeight)-1+"px";ea.style.lineHeight=parseInt(F.tabContainerHeight)+1+"px";ea.style.position="absolute";ea.style.display="block";ea.style.fontSize="12px";ea.style.width=
-"59px";ea.style.right="0px";ea.style.bottom="0px";ea.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";ea.style.backgroundPosition="right 6px center";ea.style.backgroundRepeat="no-repeat";t.appendChild(ea)}(function(ca){mxEvent.addListener(ca,"click",Ga);var fa=mxUtils.bind(this,function(){ca.innerText="";mxUtils.write(ca,Math.round(100*F.editor.graph.view.scale)+"%")});F.editor.graph.view.addListener(mxEvent.EVENT_SCALE,fa);F.editor.addListener("resetGraphView",fa);F.editor.addListener("pageSelected",
-fa)})(ea);var ua=F.setGraphEnabled;F.setGraphEnabled=function(){ua.apply(this,arguments);null!=this.tabContainer&&(ea.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==Q?this.tabContainerHeight+"px":"0px")}}t.appendChild(R);t.appendChild(F.diagramContainer);I.appendChild(t);F.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=c)&&"1"!=urlParams.embedInline&&b(this,!0);null==Q&&t.appendChild(F.tabContainer);
-var sa=null;N();mxEvent.addListener(window,"resize",function(){N();null!=F.sidebarWindow&&F.sidebarWindow.window.fit();null!=F.formatWindow&&F.formatWindow.window.fit();null!=F.actions.outlineWindow&&F.actions.outlineWindow.window.fit();null!=F.actions.layersWindow&&F.actions.layersWindow.window.fit();null!=F.menus.tagsWindow&&F.menus.tagsWindow.window.fit();null!=F.menus.findWindow&&F.menus.findWindow.window.fit();null!=F.menus.findReplaceWindow&&F.menus.findReplaceWindow.window.fit()});if("1"==
-urlParams.embedInline){document.body.style.cursor="text";P.style.transform="";mxEvent.addGestureListeners(F.diagramContainer.parentNode,function(ca){mxEvent.getSource(ca)==F.diagramContainer.parentNode&&(F.embedExitPoint=new mxPoint(mxEvent.getClientX(ca),mxEvent.getClientY(ca)),F.sendEmbeddedSvgExport())});I=document.createElement("div");I.style.position="absolute";I.style.width="10px";I.style.height="10px";I.style.borderRadius="5px";I.style.border="1px solid gray";I.style.background="#ffffff";I.style.cursor=
-"row-resize";F.diagramContainer.parentNode.appendChild(I);F.bottomResizer=I;var ra=null,ya=null,ia=null,ma=null;mxEvent.addGestureListeners(I,function(ca){ma=parseInt(F.diagramContainer.style.height);ya=mxEvent.getClientY(ca);H.popupMenuHandler.hideMenu();mxEvent.consume(ca)});I=I.cloneNode(!1);I.style.cursor="col-resize";F.diagramContainer.parentNode.appendChild(I);F.rightResizer=I;mxEvent.addGestureListeners(I,function(ca){ia=parseInt(F.diagramContainer.style.width);ra=mxEvent.getClientX(ca);H.popupMenuHandler.hideMenu();
-mxEvent.consume(ca)});mxEvent.addGestureListeners(document.body,null,function(ca){var fa=!1;null!=ra&&(F.diagramContainer.style.width=Math.max(20,ia+mxEvent.getClientX(ca)-ra)+"px",fa=!0);null!=ya&&(F.diagramContainer.style.height=Math.max(20,ma+mxEvent.getClientY(ca)-ya)+"px",fa=!0);fa&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:F.diagramContainer.getBoundingClientRect()}),"*"),T(),F.refresh())},function(ca){null==ra&&null==
-ya||mxEvent.consume(ca);ya=ra=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";F.bottomResizer.style.visibility="hidden";F.rightResizer.style.visibility="hidden";S.style.visibility="hidden";Q.style.visibility="hidden";P.style.display="none"}"1"==urlParams.prefetchFonts&&F.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,m,n,v){var d=m.y,g=m.x,k=!1,l=!1;if(null!=this.states&&null!=c&&null!=m){var p=this,q=new mxCellState,x=this.graph.getView().scale,y=Math.max(2,this.getGuideTolerance()/2);q.x=c.x+g;q.y=c.y+d;q.width=c.width;q.height=c.height;for(var z=[],A=[],K=0;K<this.states.length;K++){var O=this.states[K];O instanceof mxCellState&&(v||!this.graph.isCellSelected(O.cell))&&((q.x>=O.x&&q.x<=O.x+O.width||O.x>=q.x&&O.x<=q.x+q.width)&&(q.y>
-O.y+O.height+4||q.y+q.height+4<O.y)?z.push(O):(q.y>=O.y&&q.y<=O.y+O.height||O.y>=q.y&&O.y<=q.y+q.height)&&(q.x>O.x+O.width+4||q.x+q.width+4<O.x)&&A.push(O))}var L=0,u=0,E=O=0,B=0,D=0,G=0,N=0,I=5*x;if(1<z.length){z.push(q);z.sort(function(X,J){return X.y-J.y});var F=!1;K=q==z[0];x=q==z[z.length-1];if(!K&&!x)for(K=1;K<z.length-1;K++)if(q==z[K]){x=z[K-1];K=z[K+1];O=u=E=(K.y-x.y-x.height-q.height)/2;break}for(K=0;K<z.length-1;K++){x=z[K];var H=z[K+1],R=q==x||q==H;H=H.y-x.y-x.height;F|=q==x;if(0==u&&0==
-L)u=H,L=1;else if(Math.abs(u-H)<=(R||1==K&&F?y:0))L+=1;else if(1<L&&F){z=z.slice(0,K+1);break}else if(3<=z.length-K&&!F)L=0,O=u=0!=E?E:0,z.splice(0,0==K?1:K),K=-1;else break;0!=O||R||(u=O=H)}3==z.length&&z[1]==q&&(O=0)}if(1<A.length){A.push(q);A.sort(function(X,J){return X.x-J.x});F=!1;K=q==A[0];x=q==A[A.length-1];if(!K&&!x)for(K=1;K<A.length-1;K++)if(q==A[K]){x=A[K-1];K=A[K+1];G=D=N=(K.x-x.x-x.width-q.width)/2;break}for(K=0;K<A.length-1;K++){x=A[K];H=A[K+1];R=q==x||q==H;H=H.x-x.x-x.width;F|=q==x;
-if(0==D&&0==B)D=H,B=1;else if(Math.abs(D-H)<=(R||1==K&&F?y:0))B+=1;else if(1<B&&F){A=A.slice(0,K+1);break}else if(3<=A.length-K&&!F)B=0,G=D=0!=N?N:0,A.splice(0,0==K?1:K),K=-1;else break;0!=G||R||(D=G=H)}3==A.length&&A[1]==q&&(G=0)}y=function(X,J,W,V){var t=[];if(V){V=I;var C=0}else V=0,C=I;t.push(new mxPoint(X.x-V,X.y-C));t.push(new mxPoint(X.x+V,X.y+C));t.push(X);t.push(J);t.push(new mxPoint(J.x-V,J.y-C));t.push(new mxPoint(J.x+V,J.y+C));if(null!=W)return W.points=t,W;X=new mxPolyline(t,mxConstants.GUIDE_COLOR,
-mxConstants.GUIDE_STROKEWIDTH);X.dialect=mxConstants.DIALECT_SVG;X.pointerEvents=!1;X.init(p.graph.getView().getOverlayPane());return X};D=function(X,J){if(X&&null!=p.guidesArrHor)for(X=0;X<p.guidesArrHor.length;X++)p.guidesArrHor[X].node.style.visibility="hidden";if(J&&null!=p.guidesArrVer)for(X=0;X<p.guidesArrVer.length;X++)p.guidesArrVer[X].node.style.visibility="hidden"};if(1<B&&B==A.length-1){B=[];N=p.guidesArrHor;k=[];g=0;K=A[0]==q?1:0;F=A[K].y+A[K].height;if(0<G)for(K=0;K<A.length-1;K++)x=
-A[K],H=A[K+1],q==x?(g=H.x-x.width-G,k.push(new mxPoint(g+x.width+I,F)),k.push(new mxPoint(H.x-I,F))):q==H?(k.push(new mxPoint(x.x+x.width+I,F)),g=x.x+x.width+G,k.push(new mxPoint(g-I,F))):(k.push(new mxPoint(x.x+x.width+I,F)),k.push(new mxPoint(H.x-I,F)));else x=A[0],K=A[2],g=x.x+x.width+(K.x-x.x-x.width-q.width)/2,k.push(new mxPoint(x.x+x.width+I,F)),k.push(new mxPoint(g-I,F)),k.push(new mxPoint(g+q.width+I,F)),k.push(new mxPoint(K.x-I,F));for(K=0;K<k.length;K+=2)A=k[K],G=k[K+1],A=y(A,G,null!=N?
-N[K/2]:null),A.node.style.visibility="visible",A.redraw(),B.push(A);for(K=k.length/2;null!=N&&K<N.length;K++)N[K].destroy();p.guidesArrHor=B;g-=c.x;k=!0}else D(!0);if(1<L&&L==z.length-1){B=[];N=p.guidesArrVer;l=[];d=0;K=z[0]==q?1:0;L=z[K].x+z[K].width;if(0<O)for(K=0;K<z.length-1;K++)x=z[K],H=z[K+1],q==x?(d=H.y-x.height-O,l.push(new mxPoint(L,d+x.height+I)),l.push(new mxPoint(L,H.y-I))):q==H?(l.push(new mxPoint(L,x.y+x.height+I)),d=x.y+x.height+O,l.push(new mxPoint(L,d-I))):(l.push(new mxPoint(L,x.y+
-x.height+I)),l.push(new mxPoint(L,H.y-I)));else x=z[0],K=z[2],d=x.y+x.height+(K.y-x.y-x.height-q.height)/2,l.push(new mxPoint(L,x.y+x.height+I)),l.push(new mxPoint(L,d-I)),l.push(new mxPoint(L,d+q.height+I)),l.push(new mxPoint(L,K.y-I));for(K=0;K<l.length;K+=2)A=l[K],G=l[K+1],A=y(A,G,null!=N?N[K/2]:null,!0),A.node.style.visibility="visible",A.redraw(),B.push(A);for(K=l.length/2;null!=N&&K<N.length;K++)N[K].destroy();p.guidesArrVer=B;d-=c.y;l=!0}else D(!1,!0)}if(k||l)return q=new mxPoint(g,d),z=b.call(this,
+null);A.apply(this,arguments)};var J=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(B){J.apply(this,arguments);if(B){var D=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=D&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=D||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),
+null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var O=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(B){B=O.apply(this,arguments);var D=this.editorUi,G=D.editor.graph;if(G.isEnabled()&&"1"==urlParams.sketch){var H=this.createOption(mxResources.get("sketch"),function(){return Editor.sketchMode},function(N,F){D.setSketchMode(!Editor.sketchMode);null!=F&&mxEvent.isShiftDown(F)||G.updateCellStyles({sketch:N?
+"1":null},G.getVerticesAndEdges())},{install:function(N){this.listener=function(){N(Editor.sketchMode)};D.addListener("sketchModeChanged",this.listener)},destroy:function(){D.removeListener(this.listener)}});B.appendChild(H)}return B};var K=Menus.prototype.init;Menus.prototype.init=function(){K.apply(this,arguments);var B=this.editorUi,D=B.editor.graph;B.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";B.actions.get("createShape").label=mxResources.get("shape")+"...";B.actions.get("outline").label=
+mxResources.get("outline")+"...";B.actions.get("layers").label=mxResources.get("layers")+"...";B.actions.get("tags").label=mxResources.get("tags")+"...";B.actions.get("comments").label=mxResources.get("comments")+"...";var G=B.actions.put("toggleDarkMode",new Action(mxResources.get("dark"),function(L){B.setDarkMode(!Editor.darkMode)}));G.setToggleAction(!0);G.setSelectedCallback(function(){return Editor.isDarkMode()});G=B.actions.put("toggleSketchMode",new Action(mxResources.get("sketch"),function(L){B.setSketchMode(!Editor.sketchMode)}));
+G.setToggleAction(!0);G.setSelectedCallback(function(){return Editor.sketchMode});G=B.actions.put("togglePagesVisible",new Action(mxResources.get("pages"),function(L){B.setPagesVisible(!Editor.pagesVisible)}));G.setToggleAction(!0);G.setSelectedCallback(function(){return Editor.pagesVisible});B.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){D.popupMenuHandler.hideMenu();B.showImportCsvDialog()}));B.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var L=
+new ParseDialog(B,"Insert from Text");B.showDialog(L.container,620,420,!0,!1);L.init()}));B.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var L=new ParseDialog(B,"Insert from Text","formatSql");B.showDialog(L.container,620,420,!0,!1);L.init()}));B.actions.put("toggleShapes",new Action(mxResources.get("1"==urlParams.sketch?"moreShapes":"shapes")+"...",function(){f(B)},null,null,Editor.ctrlKey+"+Shift+K"));B.actions.put("toggleFormat",new Action(mxResources.get("format")+
+"...",function(){b(B)})).shortcut=B.actions.get("formatPanel").shortcut;EditorUi.enablePlantUml&&!B.isOffline()&&B.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var L=new ParseDialog(B,mxResources.get("plantUml")+"...","plantUml");B.showDialog(L.container,620,420,!0,!1);L.init()}));B.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var L=new ParseDialog(B,mxResources.get("mermaid")+"...","mermaid");B.showDialog(L.container,620,420,!0,!1);
+L.init()}));var H=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,function(L,U){var W=this.editorUi.editor.graph,t=W.getSelectionCell();H.call(this,L,t,null,U);this.addMenuItems(L,["editTooltip"],U);W.model.isVertex(t)&&this.addMenuItems(L,["editGeometry"],U);this.addMenuItems(L,["-","edit"],U)})));this.addPopupMenuCellEditItems=function(L,U,W,t){L.addSeparator();this.addSubmenu("editCell",L,t,mxResources.get("edit"))};this.put("file",new Menu(mxUtils.bind(this,function(L,
+U){var W=B.getCurrentFile();B.menus.addMenuItems(L,["new"],U);B.menus.addSubmenu("openFrom",L,U);isLocalStorage&&this.addSubmenu("openRecent",L,U);L.addSeparator(U);null!=W&&W.constructor==DriveFile?B.menus.addMenuItems(L,["save","rename","makeCopy","moveToFolder"],U):(B.menus.addMenuItems(L,["save","saveAs","-","rename"],U),B.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(L,["upload"],U):B.menus.addMenuItems(L,["makeCopy"],U));L.addSeparator(U);
+null!=W&&(W.isRevisionHistorySupported()&&B.menus.addMenuItems(L,["revisionHistory"],U),W.constructor==DriveFile&&B.menus.addMenuItems(L,["openFolder"],U),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||W.constructor==LocalFile&&null==W.fileHandle||B.menus.addMenuItems(L,["synchronize"],U));B.menus.addMenuItems(L,["autosave"],U);if(null!=W){L.addSeparator(U);"1"==urlParams.sketch&&B.commentsSupported()&&B.menus.addMenuItems(L,["comments"],U);if(null!=B.fileNode&&"1"!=urlParams.embedInline){var t=null!=
+W.getTitle()?W.getTitle():B.defaultFilename;(W.constructor==DriveFile&&null!=W.sync&&W.sync.isConnected()||!/(\.html)$/i.test(t)&&!/(\.svg)$/i.test(t))&&this.addMenuItems(L,["properties"],U)}W.constructor==DriveFile&&B.menus.addMenuItems(L,["share"],U)}})));this.put("diagram",new Menu(mxUtils.bind(this,function(L,U){var W=B.getCurrentFile();B.menus.addSubmenu("extras",L,U,mxResources.get("preferences"));L.addSeparator(U);if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)B.menus.addMenuItems(L,"new open - synchronize - save saveAs -".split(" "),
+U);else if("1"==urlParams.embed||B.mode==App.MODE_ATLAS){"1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&B.menus.addMenuItems(L,["-","save"],U);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||B.mode==App.MODE_ATLAS)B.menus.addMenuItems(L,["saveAndExit"],U),null!=W&&W.isRevisionHistorySupported()&&B.menus.addMenuItems(L,["revisionHistory"],U);L.addSeparator(U)}else B.mode==App.MODE_ATLAS?B.menus.addMenuItems(L,["save","synchronize","-"],U):"1"!=urlParams.noFileMenu&&
+("1"!=urlParams.sketch?(B.menus.addMenuItems(L,["new"],U),B.menus.addSubmenu("openFrom",L,U),isLocalStorage&&this.addSubmenu("openRecent",L,U),L.addSeparator(U),null!=W&&(W.constructor==DriveFile&&B.menus.addMenuItems(L,["share"],U),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||W.constructor==LocalFile||B.menus.addMenuItems(L,["synchronize"],U)),L.addSeparator(U),B.menus.addSubmenu("save",L,U)):B.menus.addSubmenu("file",L,U));B.menus.addSubmenu("exportAs",L,U);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?
+B.menus.addMenuItems(L,["import"],U):"1"!=urlParams.noFileMenu&&B.menus.addSubmenu("importFrom",L,U);"1"!=urlParams.embed&&"1"==urlParams.sketch&&"1"!=urlParams.noFileMenu||!B.commentsSupported()||B.menus.addMenuItems(L,["-","comments"],U);B.menus.addMenuItems(L,"- findReplace layers tags - pageSetup".split(" "),U);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||B.menus.addMenuItems(L,["print"],U);"1"!=urlParams.sketch&&null!=W&&null!=B.fileNode&&"1"!=urlParams.embedInline&&(W=null!=
+W.getTitle()?W.getTitle():B.defaultFilename,/(\.html)$/i.test(W)||/(\.svg)$/i.test(W)||this.addMenuItems(L,["-","properties"]));L.addSeparator(U);B.menus.addSubmenu("help",L,U);"1"==urlParams.embed||B.mode==App.MODE_ATLAS?("1"!=urlParams.noExitBtn||B.mode==App.MODE_ATLAS)&&B.menus.addMenuItems(L,["-","exit"],U):"1"!=urlParams.noFileMenu&&B.menus.addMenuItems(L,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(L,U){var W=B.getCurrentFile();null!=W&&W.constructor==DriveFile?B.menus.addMenuItems(L,
+["save","makeCopy","-","rename","moveToFolder"],U):(B.menus.addMenuItems(L,["save","saveAs","-","rename"],U),B.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(L,["upload"],U):B.menus.addMenuItems(L,["makeCopy"],U));B.menus.addMenuItems(L,["-","autosave"],U);null!=W&&W.isRevisionHistorySupported()&&B.menus.addMenuItems(L,["-","revisionHistory"],U)})));var N=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(L,U){N.funct(L,
+U);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||B.menus.addMenuItems(L,["publishLink"],U);B.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(L.addSeparator(U),B.menus.addSubmenu("embed",L,U))})));var F=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(L,U){B.menus.addInsertTableCellItem(L,U)})));if("1"==urlParams.sketch){var I=this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(L,U){I.funct(L,U);this.addMenuItems(L,["-","pageScale","-","ruler"],U)})))}this.put("extras",
+new Menu(mxUtils.bind(this,function(L,U){null!=F&&B.menus.addSubmenu("language",L,U);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&B.mode!=App.MODE_ATLAS&&B.menus.addSubmenu("theme",L,U);B.menus.addSubmenu("units",L,U);L.addSeparator(U);"1"!=urlParams.sketch&&B.menus.addMenuItems(L,"pageScale ruler scrollbars - tooltips copyConnect collapseExpand".split(" "),U);"1"!=urlParams.embedInline&&"1"!=urlParams.sketch&&"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&B.mode!=App.MODE_ATLAS&&
+B.menus.addMenuItems(L,["-","showStartScreen","search","scratchpad"],U);L.addSeparator(U);"1"==urlParams.sketch?B.menus.addMenuItems(L,"configuration - copyConnect collapseExpand tooltips -".split(" "),U):(B.mode!=App.MODE_ATLAS&&B.menus.addMenuItem(L,"configuration",U),!B.isOfflineApp()&&isLocalStorage&&B.mode!=App.MODE_ATLAS&&B.menus.addMenuItem(L,"plugins",U));EditorUi.isElectronApp&&B.menus.addMenuItems(L,["-","spellCheck","autoBkp","drafts","-"],U);var W=B.getCurrentFile();null!=W&&W.isRealtimeEnabled()&&
+W.isRealtimeSupported()&&this.addMenuItems(L,["-","showRemoteCursors","shareCursor","-"],U);L.addSeparator(U);B.mode!=App.MODE_ATLAS&&this.addMenuItems(L,["fullscreen"],U);("1"!=urlParams.embedInline&&Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(L,["toggleDarkMode"],U);L.addSeparator(U)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(L,U){B.menus.addMenuItems(L,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),
+U)})));mxUtils.bind(this,function(){var L=this.get("insert"),U=L.funct;L.funct=function(W,t){"1"==urlParams.sketch?(B.insertTemplateEnabled&&!B.isOffline()&&B.menus.addMenuItems(W,["insertTemplate"],t),B.menus.addMenuItems(W,["insertImage","insertLink","-"],t),B.menus.addSubmenu("insertAdvanced",W,t,mxResources.get("advanced")),B.menus.addSubmenu("layout",W,t)):(U.apply(this,arguments),B.menus.addSubmenu("table",W,t))}})();var Q="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),
+X=function(L,U,W,t){L.addItem(W,null,mxUtils.bind(this,function(){var C=new CreateGraphDialog(B,W,t);B.showDialog(C.container,620,420,!0,!1);C.init()}),U)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(L,U){for(var W=0;W<Q.length;W++)"-"==Q[W]?L.addSeparator(U):X(L,U,mxResources.get(Q[W])+"...",Q[W])})))};EditorUi.prototype.installFormatToolbar=function(B){var D=this.editor.graph,G=document.createElement("div");G.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%;";
+D.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(H,N){0<D.getSelectionCount()?(B.appendChild(G),G.innerHTML="Selected: "+D.getSelectionCount()):null!=G.parentNode&&G.parentNode.removeChild(G)}))};var u=!1;EditorUi.prototype.initFormatWindow=function(){if(!u&&null!=this.formatWindow){u=!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(D){mxEvent.getSource(D)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var E=EditorUi.prototype.init;EditorUi.prototype.init=function(){function B(ca,
+ha,sa){var la=F.menus.get(ca),ma=L.addMenu(mxResources.get(ca),mxUtils.bind(this,function(){la.funct.apply(this,arguments)}),X);ma.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";ma.style.display="inline-block";ma.style.boxSizing="border-box";ma.style.top="6px";ma.style.marginRight="6px";ma.style.height="30px";ma.style.paddingTop="6px";ma.style.paddingBottom="6px";ma.style.cursor="pointer";ma.setAttribute("title",mxResources.get(ca));F.menus.menuCreated(la,ma,"geMenuItem");null!=sa?
+(ma.style.backgroundImage="url("+sa+")",ma.style.backgroundPosition="center center",ma.style.backgroundRepeat="no-repeat",ma.style.backgroundSize="24px 24px",ma.style.width="34px",ma.innerText=""):ha||(ma.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",ma.style.backgroundPosition="right 6px center",ma.style.backgroundRepeat="no-repeat",ma.style.paddingRight="22px");return ma}function D(ca,ha,sa,la,ma,oa){var ta=document.createElement("a");ta.className="1"==urlParams.sketch?"geToolbarButton":
+"geMenuItem";ta.style.display="inline-block";ta.style.boxSizing="border-box";ta.style.height="30px";ta.style.padding="6px";ta.style.position="relative";ta.style.verticalAlign="top";ta.style.top="0px";"1"==urlParams.sketch&&(ta.style.borderStyle="none",ta.style.boxShadow="none",ta.style.padding="6px",ta.style.margin="0px");null!=F.statusContainer?Q.insertBefore(ta,F.statusContainer):Q.appendChild(ta);null!=oa?(ta.style.backgroundImage="url("+oa+")",ta.style.backgroundPosition="center center",ta.style.backgroundRepeat=
+"no-repeat",ta.style.backgroundSize="24px 24px",ta.style.width="34px"):mxUtils.write(ta,ca);mxEvent.addListener(ta,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(Na){Na.preventDefault()}));mxEvent.addListener(ta,"click",function(Na){"disabled"!=ta.getAttribute("disabled")&&ha(Na);mxEvent.consume(Na)});null==sa&&(ta.style.marginRight="4px");null!=la&&ta.setAttribute("title",la);null!=ma&&(ca=function(){ma.isEnabled()?(ta.removeAttribute("disabled"),ta.style.cursor="pointer"):
+(ta.setAttribute("disabled","disabled"),ta.style.cursor="default")},ma.addListener("stateChanged",ca),I.addListener("enabledChanged",ca),ca());return ta}function G(ca,ha,sa){sa=document.createElement("div");sa.className="geMenuItem";sa.style.display="inline-block";sa.style.verticalAlign="top";sa.style.marginRight="6px";sa.style.padding="0 4px 0 4px";sa.style.height="30px";sa.style.position="relative";sa.style.top="0px";"1"==urlParams.sketch&&(sa.style.boxShadow="none");for(var la=0;la<ca.length;la++)null!=
+ca[la]&&("1"==urlParams.sketch&&(ca[la].style.padding="10px 8px",ca[la].style.width="30px"),ca[la].style.margin="0px",ca[la].style.boxShadow="none",sa.appendChild(ca[la]));null!=ha&&mxUtils.setOpacity(sa,ha);null!=F.statusContainer&&"1"!=urlParams.sketch?Q.insertBefore(sa,F.statusContainer):Q.appendChild(sa);return sa}function H(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(T.style.left=58>R.offsetTop-R.offsetHeight/2?"70px":"10px");else{for(var ca=Q.firstChild;null!=ca;){var ha=ca.nextSibling;
+"geMenuItem"!=ca.className&&"geItem"!=ca.className||ca.parentNode.removeChild(ca);ca=ha}X=Q.firstChild;c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;ca=1E3>c||"1"==urlParams.sketch;var sa=null;ca||(sa=B("diagram"));ha=ca?B("diagram",null,Editor.drawLogoImage):null;null!=ha&&(sa=ha);G([sa,D(mxResources.get("shapes"),F.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),F.actions.get("image"),ca?Editor.shapesImage:null),D(mxResources.get("format"),
+F.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+F.actions.get("formatPanel").shortcut+")",F.actions.get("image"),ca?Editor.formatImage:null)],ca?60:null);ha=B("insert",!0,ca?S:null);G([ha,D(mxResources.get("delete"),F.actions.get("delete").funct,null,mxResources.get("delete"),F.actions.get("delete"),ca?Editor.trashImage:null)],ca?60:null);411<=c&&(G([Ia,Fa],60),520<=c&&G([ua,640<=c?D("",Da.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",Da,Editor.zoomInImage):
+null,640<=c?D("",pa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",pa,Editor.zoomOutImage):null],60))}null!=sa&&(mxEvent.disableContextMenu(sa),mxEvent.addGestureListeners(sa,mxUtils.bind(this,function(la){(mxEvent.isShiftDown(la)||mxEvent.isAltDown(la)||mxEvent.isMetaDown(la)||mxEvent.isControlDown(la)||mxEvent.isPopupTrigger(la))&&F.appIconClicked(la)}),null,null));ha=F.menus.get("language");null!=ha&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=c&&"1"!=urlParams.sketch?
+(null==ra&&(ha=L.addMenu("",ha.funct),ha.setAttribute("title",mxResources.get("language")),ha.className="geToolbarButton",ha.style.backgroundImage="url("+Editor.globeImage+")",ha.style.backgroundPosition="center center",ha.style.backgroundRepeat="no-repeat",ha.style.backgroundSize="24px 24px",ha.style.position="absolute",ha.style.height="24px",ha.style.width="24px",ha.style.zIndex="1",ha.style.right="8px",ha.style.cursor="pointer",ha.style.top="1"==urlParams.embed?"12px":"11px",Q.appendChild(ha),
+ra=ha),F.buttonContainer.style.paddingRight="34px"):(F.buttonContainer.style.paddingRight="4px",null!=ra&&(ra.parentNode.removeChild(ra),ra=null))}E.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 N=document.createElement("div");N.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";
+N.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(N);"1"==urlParams.sketch&&null!=this.sidebar&&this.isSettingsEnabled()&&(this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save()),this.sidebar.showPalette("search",mxSettings.settings.search));if("1"!=urlParams.sketch&&1E3<=c||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])f(this,
+!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));var F=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==F.embedViewport)mxUtils.fit(this.div);else{var ca=parseInt(this.div.offsetLeft),ha=parseInt(this.div.offsetWidth),sa=F.embedViewport.x+F.embedViewport.width,la=parseInt(this.div.offsetTop),ma=parseInt(this.div.offsetHeight),oa=F.embedViewport.y+
+F.embedViewport.height;this.div.style.left=Math.max(F.embedViewport.x,Math.min(ca,sa-ha))+"px";this.div.style.top=Math.max(F.embedViewport.y,Math.min(la,oa-ma))+"px";this.div.style.height=Math.min(F.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(F.embedViewport.width,parseInt(this.div.style.width))+"px"}};this.keyHandler.bindAction(75,!0,"toggleShapes",!0);EditorUi.windowed&&("1"==urlParams.sketch||1E3<=c)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?
+(this.initFormatWindow(),N=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>c||708>N)?this.formatWindow.window.toggleMinimized():this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));F=this;var I=F.editor.graph;F.toolbar=this.createToolbar(F.createDiv("geToolbar"));F.defaultLibraryName=mxResources.get("untitledLibrary");var Q=document.createElement("div");Q.className="geMenubarContainer";var X=null,L=new Menubar(F,
+Q);F.statusContainer=F.createStatusContainer();F.statusContainer.style.position="relative";F.statusContainer.style.maxWidth="";F.statusContainer.style.marginTop="7px";F.statusContainer.style.marginLeft="6px";F.statusContainer.style.color="gray";F.statusContainer.style.cursor="default";var U=F.hideCurrentMenu;F.hideCurrentMenu=function(){U.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var W=F.descriptorChanged;F.descriptorChanged=function(){W.apply(this,arguments);var ca=F.getCurrentFile();
+if(null!=ca&&null!=ca.getTitle()){var ha=ca.getMode();"google"==ha?ha="googleDrive":"github"==ha?ha="gitHub":"gitlab"==ha?ha="gitLab":"onedrive"==ha&&(ha="oneDrive");ha=mxResources.get(ha);Q.setAttribute("title",ca.getTitle()+(null!=ha?" ("+ha+")":""))}else Q.removeAttribute("title")};F.setStatusText(F.editor.getStatus());Q.appendChild(F.statusContainer);F.buttonContainer=document.createElement("div");F.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";
+Q.appendChild(F.buttonContainer);F.menubarContainer=F.buttonContainer;F.tabContainer=document.createElement("div");F.tabContainer.className="geTabContainer";F.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";N=F.diagramContainer.parentNode;var t=document.createElement("div");t.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";F.diagramContainer.style.top="1"==urlParams.sketch?
+"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){t.style.top="20px";F.titlebar=document.createElement("div");F.titlebar.style.cssText="position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var C=document.createElement("div");C.style.cssText="max-width: calc(100% - 100px);text-overflow: ellipsis;user-select:none;height:20px;margin: 2px 10px;font-size: 12px;white-space: nowrap;overflow: hidden;";F.titlebar.appendChild(C);N.appendChild(F.titlebar)}C=
+F.menus.get("viewZoom");var M=C.funct;C.funct=function(ca,ha){M.apply(this,arguments);F.menus.addMenuItems(ca,["-","outline"],ha)};var S="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,P="1"==urlParams.sketch?document.createElement("div"):null,R="1"==urlParams.sketch?document.createElement("div"):null,T="1"==urlParams.sketch?document.createElement("div"):null,V=mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.refresh();I.refresh();I.view.validateBackground()});F.addListener("darkModeChanged",
+V);F.addListener("sketchModeChanged",V);var Y=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)T.style.left="10px",T.style.top="10px",R.style.left="10px",R.style.top="60px",P.style.top="10px",P.style.right="12px",P.style.left="",F.diagramContainer.setAttribute("data-bounds",F.diagramContainer.style.top+" "+F.diagramContainer.style.left+" "+F.diagramContainer.style.width+" "+F.diagramContainer.style.height),F.diagramContainer.style.top="0px",F.diagramContainer.style.left="0px",F.diagramContainer.style.bottom=
+"0px",F.diagramContainer.style.right="0px",F.diagramContainer.style.width="",F.diagramContainer.style.height="";else{var ca=F.diagramContainer.getAttribute("data-bounds");if(null!=ca){F.diagramContainer.style.background="transparent";F.diagramContainer.removeAttribute("data-bounds");var ha=I.getGraphBounds();ca=ca.split(" ");F.diagramContainer.style.top=ca[0];F.diagramContainer.style.left=ca[1];F.diagramContainer.style.width=ha.width+50+"px";F.diagramContainer.style.height=ha.height+46+"px";F.diagramContainer.style.bottom=
+"";F.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:F.diagramContainer.getBoundingClientRect()}),"*");F.refresh()}T.style.left=F.diagramContainer.offsetLeft+"px";T.style.top=F.diagramContainer.offsetTop-T.offsetHeight-4+"px";R.style.display="";R.style.left=F.diagramContainer.offsetLeft-R.offsetWidth-4+"px";R.style.top=F.diagramContainer.offsetTop+"px";P.style.left=F.diagramContainer.offsetLeft+F.diagramContainer.offsetWidth-P.offsetWidth+
+"px";P.style.top=T.style.top;P.style.right="";F.bottomResizer.style.left=F.diagramContainer.offsetLeft+(F.diagramContainer.offsetWidth-F.bottomResizer.offsetWidth)/2+"px";F.bottomResizer.style.top=F.diagramContainer.offsetTop+F.diagramContainer.offsetHeight-F.bottomResizer.offsetHeight/2-1+"px";F.rightResizer.style.left=F.diagramContainer.offsetLeft+F.diagramContainer.offsetWidth-F.rightResizer.offsetWidth/2-1+"px";F.rightResizer.style.top=F.diagramContainer.offsetTop+(F.diagramContainer.offsetHeight-
+F.bottomResizer.offsetHeight)/2+"px"}F.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";F.rightResizer.style.visibility=F.bottomResizer.style.visibility;Q.style.display="none";T.style.visibility="";P.style.visibility=""}),ba=mxUtils.bind(this,function(){Pa.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";
+Y()});V=mxUtils.bind(this,function(){ba();b(F,!0);F.initFormatWindow();var ca=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(ca.x+ca.width+4,ca.y)});F.addListener("inlineFullscreenChanged",ba);F.addListener("editInlineStart",V);"1"==urlParams.embedInline&&F.addListener("darkModeChanged",V);F.addListener("editInlineStop",mxUtils.bind(this,function(ca){F.diagramContainer.style.width="10px";F.diagramContainer.style.height="10px";F.diagramContainer.style.border="";
+F.bottomResizer.style.visibility="hidden";F.rightResizer.style.visibility="hidden";T.style.visibility="hidden";P.style.visibility="hidden";R.style.display="none"}));if(null!=F.hoverIcons){var Z=F.hoverIcons.update;F.hoverIcons.update=function(){I.freehand.isDrawing()||Z.apply(this,arguments)}}if(null!=I.freehand){var da=I.freehand.createStyle;I.freehand.createStyle=function(ca){return da.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){R.className="geToolbarContainer";P.className="geToolbarContainer";
+T.className="geToolbarContainer";Q.className="geToolbarContainer";F.picker=R;var ea=!1;"1"!=urlParams.embed&&"atlassian"!=F.getServiceName()&&(mxEvent.addListener(Q,"mouseenter",function(){F.statusContainer.style.display="inline-block"}),mxEvent.addListener(Q,"mouseleave",function(){ea||(F.statusContainer.style.display="none")}));var ka=mxUtils.bind(this,function(ca){null!=F.notificationBtn&&(null!=ca?F.notificationBtn.setAttribute("title",ca):F.notificationBtn.removeAttribute("title"))});Q.style.visibility=
+20>Q.clientWidth?"hidden":"";F.editor.addListener("statusChanged",mxUtils.bind(this,function(){F.setStatusText(F.editor.getStatus());if("1"!=urlParams.embed&&"atlassian"!=F.getServiceName())if(F.statusContainer.style.display="inline-block",ea=!0,1==F.statusContainer.children.length&&""==F.editor.getStatus())Q.style.visibility="hidden";else{if(0==F.statusContainer.children.length||1==F.statusContainer.children.length&&"function"===typeof F.statusContainer.firstChild.getAttribute&&null==F.statusContainer.firstChild.getAttribute("class")){var ca=
+null!=F.statusContainer.firstChild&&"function"===typeof F.statusContainer.firstChild.getAttribute?F.statusContainer.firstChild.getAttribute("title"):F.editor.getStatus();ka(ca);var ha=F.getCurrentFile();ha=null!=ha?ha.savingStatusKey:DrawioFile.prototype.savingStatusKey;ca==mxResources.get(ha)+"..."?(F.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(ha))+'..."src="'+Editor.tailSpin+'">',F.statusContainer.style.display="inline-block",ea=!0):6<F.buttonContainer.clientWidth&&
+(F.statusContainer.style.display="none",ea=!1)}else F.statusContainer.style.display="inline-block",ka(null),ea=!0;Q.style.visibility=20>Q.clientWidth&&!ea?"hidden":""}}));ja=B("diagram",null,Editor.menuImage);ja.style.boxShadow="none";ja.style.padding="6px";ja.style.margin="0px";T.appendChild(ja);mxEvent.disableContextMenu(ja);mxEvent.addGestureListeners(ja,mxUtils.bind(this,function(ca){(mxEvent.isShiftDown(ca)||mxEvent.isAltDown(ca)||mxEvent.isMetaDown(ca)||mxEvent.isControlDown(ca)||mxEvent.isPopupTrigger(ca))&&
+this.appIconClicked(ca)}),null,null);F.statusContainer.style.position="";F.statusContainer.style.display="none";F.statusContainer.style.margin="0px";F.statusContainer.style.padding="6px 0px";F.statusContainer.style.maxWidth=Math.min(c-240,280)+"px";F.statusContainer.style.display="inline-block";F.statusContainer.style.textOverflow="ellipsis";F.buttonContainer.style.position="";F.buttonContainer.style.paddingRight="0px";F.buttonContainer.style.display="inline-block";var aa=document.createElement("a");
+aa.style.padding="0px";aa.style.boxShadow="none";aa.className="geMenuItem";aa.style.display="inline-block";aa.style.width="40px";aa.style.height="12px";aa.style.marginBottom="-2px";aa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";aa.style.backgroundPosition="top center";aa.style.backgroundRepeat="no-repeat";aa.setAttribute("title","Minimize");var Ba=!1,Ea=mxUtils.bind(this,function(){R.innerText="";if(!Ba){var ca=function(la,ma,oa){la=D("",la.funct,null,ma,la,oa);la.style.width=
+"40px";la.style.opacity="0.7";return ha(la,null,"pointer")},ha=function(la,ma,oa){null!=ma&&la.setAttribute("title",ma);la.style.cursor=null!=oa?oa:"default";la.style.margin="2px 0px";R.appendChild(la);mxUtils.br(R);return la};ha(F.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text"),!0,!1,null,!0,!0),mxResources.get("text")+" ("+Editor.ctrlKey+"+Shift+X)");ha(F.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,!1,null,!0),mxResources.get("note"));ha(F.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle"),!0,!1,null,!0),mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");ha(F.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse"),!0,!1,null,!0),mxResources.get("ellipse"));(function(){var la=new mxCell("",new mxGeometry(0,0,I.defaultEdgeLength,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");
+la.geometry.setTerminalPoint(new mxPoint(0,0),!0);la.geometry.setTerminalPoint(new mxPoint(la.geometry.width,0),!1);la.geometry.points=[];la.geometry.relative=!0;la.edge=!0;ha(F.sidebar.createEdgeTemplateFromCells([la],la.geometry.width,la.geometry.height,mxResources.get("line"),!0,null,!0,!1),mxResources.get("line"));la=la.clone();la.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";la.geometry.width=I.defaultEdgeLength+20;la.geometry.setTerminalPoint(new mxPoint(0,
+20),!0);la.geometry.setTerminalPoint(new mxPoint(la.geometry.width,20),!1);la=ha(F.sidebar.createEdgeTemplateFromCells([la],la.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"));la.style.borderBottom="1px solid "+(Editor.isDarkMode()?"#505050":"lightgray");la.style.paddingBottom="14px";la.style.marginBottom="14px"})();ca(F.actions.get("insertFreehand"),mxResources.get("freehand"),Editor.freehandImage);var sa=F.actions.get("toggleShapes");ca(sa,mxResources.get("shapes")+
+" ("+sa.shortcut+")",S);ja=B("table",null,Editor.calendarImage);ja.style.boxShadow="none";ja.style.opacity="0.7";ja.style.padding="6px";ja.style.margin="0px";ja.style.width="37px";ha(ja,null,"pointer");ja=B("insert",null,Editor.plusImage);ja.style.boxShadow="none";ja.style.opacity="0.7";ja.style.padding="6px";ja.style.margin="0px";ja.style.width="37px";ha(ja,null,"pointer")}"1"!=urlParams.embedInline&&R.appendChild(aa)});mxEvent.addListener(aa,"click",mxUtils.bind(this,function(){Ba?(mxUtils.setPrefixedStyle(R.style,
+"transform","translate(0, -50%)"),R.style.padding="8px 6px 4px",R.style.top="50%",R.style.bottom="",R.style.height="",aa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",aa.style.width="40px",aa.style.height="12px",aa.setAttribute("title","Minimize"),Ba=!1,Ea()):(R.innerText="",R.appendChild(aa),mxUtils.setPrefixedStyle(R.style,"transform","translate(0, 0)"),R.style.top="",R.style.bottom="12px",R.style.padding="0px",R.style.height="24px",aa.style.height="24px",aa.style.backgroundImage=
+"url("+Editor.plusImage+")",aa.setAttribute("title",mxResources.get("insert")),aa.style.width="24px",Ba=!0)}));Ea();F.addListener("darkModeChanged",Ea);F.addListener("sketchModeChanged",Ea)}else F.editor.addListener("statusChanged",mxUtils.bind(this,function(){F.setStatusText(F.editor.getStatus())}));if(null!=C){var Ca=function(ca){mxEvent.isShiftDown(ca)?(F.hideCurrentMenu(),F.actions.get("smartFit").funct(),mxEvent.consume(ca)):mxEvent.isAltDown(ca)&&(F.hideCurrentMenu(),F.actions.get("customZoom").funct(),
+mxEvent.consume(ca))},Da=F.actions.get("zoomIn"),pa=F.actions.get("zoomOut"),Ha=F.actions.get("resetView");V=F.actions.get("fullscreen");var Ja=F.actions.get("undo"),ya=F.actions.get("redo"),Ia=D("",Ja.funct,null,mxResources.get("undo")+" ("+Ja.shortcut+")",Ja,Editor.undoImage),Fa=D("",ya.funct,null,mxResources.get("redo")+" ("+ya.shortcut+")",ya,Editor.redoImage),Pa=D("",V.funct,null,mxResources.get("fullscreen"),V,Editor.fullscreenImage);if(null!=P){Ha=function(){ia.style.display=null!=F.pages&&
+("0"!=urlParams.pages||1<F.pages.length||Editor.pagesVisible)?"inline-block":"none"};var wa=function(){ia.innerText="";if(null!=F.currentPage){mxUtils.write(ia,F.currentPage.getName());var ca=null!=F.pages?F.pages.length:1,ha=F.getPageIndex(F.currentPage);ha=null!=ha?ha+1:1;var sa=F.currentPage.getId();ia.setAttribute("title",F.currentPage.getName()+" ("+ha+"/"+ca+")"+(null!=sa?" ["+sa+"]":""))}};Pa.parentNode.removeChild(Pa);var za=F.actions.get("delete"),va=D("",za.funct,null,mxResources.get("delete"),
+za,Editor.trashImage);va.style.opacity="0.1";T.appendChild(va);za.addListener("stateChanged",function(){va.style.opacity=za.enabled?"":"0.1"});var Ka=function(){Ia.style.display=0<F.editor.undoManager.history.length||I.isEditing()?"inline-block":"none";Fa.style.display=Ia.style.display;Ia.style.opacity=Ja.enabled?"":"0.1";Fa.style.opacity=ya.enabled?"":"0.1"};T.appendChild(Ia);T.appendChild(Fa);Ja.addListener("stateChanged",Ka);ya.addListener("stateChanged",Ka);Ka();var ia=this.createPageMenuTab(!1,
+!0);ia.style.display="none";ia.style.position="";ia.style.marginLeft="";ia.style.top="";ia.style.left="";ia.style.height="100%";ia.style.lineHeight="";ia.style.borderStyle="none";ia.style.padding="3px 0";ia.style.margin="0px";ia.style.background="";ia.style.border="";ia.style.boxShadow="none";ia.style.verticalAlign="top";ia.style.width="auto";ia.style.maxWidth="160px";ia.style.position="relative";ia.style.padding="6px";ia.style.textOverflow="ellipsis";ia.style.opacity="0.8";P.appendChild(ia);F.editor.addListener("pagesPatched",
+wa);F.editor.addListener("pageSelected",wa);F.editor.addListener("pageRenamed",wa);F.editor.addListener("fileLoaded",wa);wa();F.addListener("fileDescriptorChanged",Ha);F.addListener("pagesVisibleChanged",Ha);F.editor.addListener("pagesPatched",Ha);Ha();Ha=D("",pa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",pa,Editor.zoomOutImage);P.appendChild(Ha);var ja=L.addMenu("100%",C.funct);ja.setAttribute("title",mxResources.get("zoom"));ja.innerHTML="100%";ja.style.display=
+"inline-block";ja.style.color="inherit";ja.style.cursor="pointer";ja.style.textAlign="center";ja.style.whiteSpace="nowrap";ja.style.paddingRight="10px";ja.style.textDecoration="none";ja.style.verticalAlign="top";ja.style.padding="6px 0";ja.style.fontSize="14px";ja.style.width="40px";ja.style.opacity="0.4";P.appendChild(ja);C=D("",Da.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",Da,Editor.zoomInImage);P.appendChild(C);V.visible&&(P.appendChild(Pa),mxEvent.addListener(document,
+"fullscreenchange",function(){Pa.style.backgroundImage="url("+(null!=document.fullscreenElement?Editor.fullscreenExitImage:Editor.fullscreenImage)+")"}));"1"==urlParams.embedInline&&(C=F.actions.get("exit"),P.appendChild(D("",C.funct,null,mxResources.get("exit"),C,Editor.closeImage)));F.tabContainer.style.visibility="hidden";Q.style.cssText="position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px 0px 6px 6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
+T.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";P.style.cssText="position:absolute;right:14px;bottom:14px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";t.appendChild(T);t.appendChild(P);R.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";
+mxClient.IS_POINTER&&(R.style.touchAction="none");t.appendChild(R);window.setTimeout(function(){mxUtils.setPrefixedStyle(R.style,"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(t)}else{var ua=D("",Ca,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",Ha,Editor.zoomFitImage);Q.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";ja=L.addMenu("100%",
+C.funct);ja.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");ja.style.whiteSpace="nowrap";ja.style.paddingRight="10px";ja.style.textDecoration="none";ja.style.textDecoration="none";ja.style.overflow="hidden";ja.style.visibility="hidden";ja.style.textAlign="center";ja.style.cursor="pointer";ja.style.height=parseInt(F.tabContainerHeight)-1+"px";ja.style.lineHeight=parseInt(F.tabContainerHeight)+1+"px";ja.style.position="absolute";ja.style.display="block";ja.style.fontSize="12px";ja.style.width=
+"59px";ja.style.right="0px";ja.style.bottom="0px";ja.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";ja.style.backgroundPosition="right 6px center";ja.style.backgroundRepeat="no-repeat";t.appendChild(ja)}(function(ca){mxEvent.addListener(ca,"click",Ca);var ha=mxUtils.bind(this,function(){ca.innerText="";mxUtils.write(ca,Math.round(100*F.editor.graph.view.scale)+"%")});F.editor.graph.view.addListener(mxEvent.EVENT_SCALE,ha);F.editor.addListener("resetGraphView",ha);F.editor.addListener("pageSelected",
+ha)})(ja);var xa=F.setGraphEnabled;F.setGraphEnabled=function(){xa.apply(this,arguments);null!=this.tabContainer&&(ja.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==P?this.tabContainerHeight+"px":"0px")}}t.appendChild(Q);t.appendChild(F.diagramContainer);N.appendChild(t);F.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=c)&&"1"!=urlParams.embedInline&&b(this,!0);null==P&&t.appendChild(F.tabContainer);
+var ra=null;H();mxEvent.addListener(window,"resize",function(){H();null!=F.sidebarWindow&&F.sidebarWindow.window.fit();null!=F.formatWindow&&F.formatWindow.window.fit();null!=F.actions.outlineWindow&&F.actions.outlineWindow.window.fit();null!=F.actions.layersWindow&&F.actions.layersWindow.window.fit();null!=F.menus.tagsWindow&&F.menus.tagsWindow.window.fit();null!=F.menus.findWindow&&F.menus.findWindow.window.fit();null!=F.menus.findReplaceWindow&&F.menus.findReplaceWindow.window.fit()});if("1"==
+urlParams.embedInline){document.body.style.cursor="text";R.style.transform="";mxEvent.addGestureListeners(F.diagramContainer.parentNode,function(ca){mxEvent.getSource(ca)==F.diagramContainer.parentNode&&(F.embedExitPoint=new mxPoint(mxEvent.getClientX(ca),mxEvent.getClientY(ca)),F.sendEmbeddedSvgExport())});N=document.createElement("div");N.style.position="absolute";N.style.width="10px";N.style.height="10px";N.style.borderRadius="5px";N.style.border="1px solid gray";N.style.background="#ffffff";N.style.cursor=
+"row-resize";F.diagramContainer.parentNode.appendChild(N);F.bottomResizer=N;var Aa=null,fa=null,na=null,qa=null;mxEvent.addGestureListeners(N,function(ca){qa=parseInt(F.diagramContainer.style.height);fa=mxEvent.getClientY(ca);I.popupMenuHandler.hideMenu();mxEvent.consume(ca)});N=N.cloneNode(!1);N.style.cursor="col-resize";F.diagramContainer.parentNode.appendChild(N);F.rightResizer=N;mxEvent.addGestureListeners(N,function(ca){na=parseInt(F.diagramContainer.style.width);Aa=mxEvent.getClientX(ca);I.popupMenuHandler.hideMenu();
+mxEvent.consume(ca)});mxEvent.addGestureListeners(document.body,null,function(ca){var ha=!1;null!=Aa&&(F.diagramContainer.style.width=Math.max(20,na+mxEvent.getClientX(ca)-Aa)+"px",ha=!0);null!=fa&&(F.diagramContainer.style.height=Math.max(20,qa+mxEvent.getClientY(ca)-fa)+"px",ha=!0);ha&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:F.diagramContainer.getBoundingClientRect()}),"*"),Y(),F.refresh())},function(ca){null==Aa&&null==
+fa||mxEvent.consume(ca);fa=Aa=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";F.bottomResizer.style.visibility="hidden";F.rightResizer.style.visibility="hidden";T.style.visibility="hidden";P.style.visibility="hidden";R.style.display="none"}"1"==urlParams.prefetchFonts&&F.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,m,n,v){var d=m.y,g=m.x,k=!1,l=!1;if(null!=this.states&&null!=c&&null!=m){var p=this,q=new mxCellState,x=this.graph.getView().scale,y=Math.max(2,this.getGuideTolerance()/2);q.x=c.x+g;q.y=c.y+d;q.width=c.width;q.height=c.height;for(var z=[],A=[],J=0;J<this.states.length;J++){var O=this.states[J];O instanceof mxCellState&&(v||!this.graph.isCellSelected(O.cell))&&((q.x>=O.x&&q.x<=O.x+O.width||O.x>=q.x&&O.x<=q.x+q.width)&&(q.y>
+O.y+O.height+4||q.y+q.height+4<O.y)?z.push(O):(q.y>=O.y&&q.y<=O.y+O.height||O.y>=q.y&&O.y<=q.y+q.height)&&(q.x>O.x+O.width+4||q.x+q.width+4<O.x)&&A.push(O))}var K=0,u=0,E=O=0,B=0,D=0,G=0,H=0,N=5*x;if(1<z.length){z.push(q);z.sort(function(X,L){return X.y-L.y});var F=!1;J=q==z[0];x=q==z[z.length-1];if(!J&&!x)for(J=1;J<z.length-1;J++)if(q==z[J]){x=z[J-1];J=z[J+1];O=u=E=(J.y-x.y-x.height-q.height)/2;break}for(J=0;J<z.length-1;J++){x=z[J];var I=z[J+1],Q=q==x||q==I;I=I.y-x.y-x.height;F|=q==x;if(0==u&&0==
+K)u=I,K=1;else if(Math.abs(u-I)<=(Q||1==J&&F?y:0))K+=1;else if(1<K&&F){z=z.slice(0,J+1);break}else if(3<=z.length-J&&!F)K=0,O=u=0!=E?E:0,z.splice(0,0==J?1:J),J=-1;else break;0!=O||Q||(u=O=I)}3==z.length&&z[1]==q&&(O=0)}if(1<A.length){A.push(q);A.sort(function(X,L){return X.x-L.x});F=!1;J=q==A[0];x=q==A[A.length-1];if(!J&&!x)for(J=1;J<A.length-1;J++)if(q==A[J]){x=A[J-1];J=A[J+1];G=D=H=(J.x-x.x-x.width-q.width)/2;break}for(J=0;J<A.length-1;J++){x=A[J];I=A[J+1];Q=q==x||q==I;I=I.x-x.x-x.width;F|=q==x;
+if(0==D&&0==B)D=I,B=1;else if(Math.abs(D-I)<=(Q||1==J&&F?y:0))B+=1;else if(1<B&&F){A=A.slice(0,J+1);break}else if(3<=A.length-J&&!F)B=0,G=D=0!=H?H:0,A.splice(0,0==J?1:J),J=-1;else break;0!=G||Q||(D=G=I)}3==A.length&&A[1]==q&&(G=0)}y=function(X,L,U,W){var t=[];if(W){W=N;var C=0}else W=0,C=N;t.push(new mxPoint(X.x-W,X.y-C));t.push(new mxPoint(X.x+W,X.y+C));t.push(X);t.push(L);t.push(new mxPoint(L.x-W,L.y-C));t.push(new mxPoint(L.x+W,L.y+C));if(null!=U)return U.points=t,U;X=new mxPolyline(t,mxConstants.GUIDE_COLOR,
+mxConstants.GUIDE_STROKEWIDTH);X.dialect=mxConstants.DIALECT_SVG;X.pointerEvents=!1;X.init(p.graph.getView().getOverlayPane());return X};D=function(X,L){if(X&&null!=p.guidesArrHor)for(X=0;X<p.guidesArrHor.length;X++)p.guidesArrHor[X].node.style.visibility="hidden";if(L&&null!=p.guidesArrVer)for(X=0;X<p.guidesArrVer.length;X++)p.guidesArrVer[X].node.style.visibility="hidden"};if(1<B&&B==A.length-1){B=[];H=p.guidesArrHor;k=[];g=0;J=A[0]==q?1:0;F=A[J].y+A[J].height;if(0<G)for(J=0;J<A.length-1;J++)x=
+A[J],I=A[J+1],q==x?(g=I.x-x.width-G,k.push(new mxPoint(g+x.width+N,F)),k.push(new mxPoint(I.x-N,F))):q==I?(k.push(new mxPoint(x.x+x.width+N,F)),g=x.x+x.width+G,k.push(new mxPoint(g-N,F))):(k.push(new mxPoint(x.x+x.width+N,F)),k.push(new mxPoint(I.x-N,F)));else x=A[0],J=A[2],g=x.x+x.width+(J.x-x.x-x.width-q.width)/2,k.push(new mxPoint(x.x+x.width+N,F)),k.push(new mxPoint(g-N,F)),k.push(new mxPoint(g+q.width+N,F)),k.push(new mxPoint(J.x-N,F));for(J=0;J<k.length;J+=2)A=k[J],G=k[J+1],A=y(A,G,null!=H?
+H[J/2]:null),A.node.style.visibility="visible",A.redraw(),B.push(A);for(J=k.length/2;null!=H&&J<H.length;J++)H[J].destroy();p.guidesArrHor=B;g-=c.x;k=!0}else D(!0);if(1<K&&K==z.length-1){B=[];H=p.guidesArrVer;l=[];d=0;J=z[0]==q?1:0;K=z[J].x+z[J].width;if(0<O)for(J=0;J<z.length-1;J++)x=z[J],I=z[J+1],q==x?(d=I.y-x.height-O,l.push(new mxPoint(K,d+x.height+N)),l.push(new mxPoint(K,I.y-N))):q==I?(l.push(new mxPoint(K,x.y+x.height+N)),d=x.y+x.height+O,l.push(new mxPoint(K,d-N))):(l.push(new mxPoint(K,x.y+
+x.height+N)),l.push(new mxPoint(K,I.y-N)));else x=z[0],J=z[2],d=x.y+x.height+(J.y-x.y-x.height-q.height)/2,l.push(new mxPoint(K,x.y+x.height+N)),l.push(new mxPoint(K,d-N)),l.push(new mxPoint(K,d+q.height+N)),l.push(new mxPoint(K,J.y-N));for(J=0;J<l.length;J+=2)A=l[J],G=l[J+1],A=y(A,G,null!=H?H[J/2]:null,!0),A.node.style.visibility="visible",A.redraw(),B.push(A);for(J=l.length/2;null!=H&&J<H.length;J++)H[J].destroy();p.guidesArrVer=B;d-=c.y;l=!0}else D(!1,!0)}if(k||l)return q=new mxPoint(g,d),z=b.call(this,
c,q,n,v),k&&!l?q.y=z.y:l&&!k&&(q.x=z.x),z.y!=q.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),z.x!=q.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),q;D(!0,!0);return b.apply(this,arguments)};var e=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(c){e.call(this,c);var m=this.guidesArrVer,n=this.guidesArrHor;if(null!=m)for(var v=0;v<m.length;v++)m[v].node.style.visibility=c?"visible":"hidden";if(null!=
-n)for(v=0;v<n.length;v++)n[v].node.style.visibility=c?"visible":"hidden"};var f=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){f.call(this);var c=this.guidesArrVer,m=this.guidesArrHor;if(null!=c){for(var n=0;n<c.length;n++)c[n].destroy();this.guidesArrVer=null}if(null!=m){for(n=0;n<m.length;n++)m[n].destroy();this.guidesArrHor=null}}})();function mxRuler(b,e,f,c){function m(){var L=b.diagramContainer;p.style.top=L.offsetTop-g+"px";p.style.left=L.offsetLeft-g+"px";p.style.width=(f?0:L.offsetWidth)+g+"px";p.style.height=(f?L.offsetHeight:0)+g+"px"}function n(L,u,E){if(null!=v)return L;var B;return function(){var D=this,G=arguments,N=E&&!B;clearTimeout(B);B=setTimeout(function(){B=null;E||L.apply(D,G)},u);N&&L.apply(D,G)}}var v=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,
+n)for(v=0;v<n.length;v++)n[v].node.style.visibility=c?"visible":"hidden"};var f=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){f.call(this);var c=this.guidesArrVer,m=this.guidesArrHor;if(null!=c){for(var n=0;n<c.length;n++)c[n].destroy();this.guidesArrVer=null}if(null!=m){for(n=0;n<m.length;n++)m[n].destroy();this.guidesArrHor=null}}})();function mxRuler(b,e,f,c){function m(){var K=b.diagramContainer;p.style.top=K.offsetTop-g+"px";p.style.left=K.offsetLeft-g+"px";p.style.width=(f?0:K.offsetWidth)+g+"px";p.style.height=(f?K.offsetHeight:0)+g+"px"}function n(K,u,E){if(null!=v)return K;var B;return function(){var D=this,G=arguments,H=E&&!B;clearTimeout(B);B=setTimeout(function(){B=null;E||K.apply(D,G)},u);H&&K.apply(D,G)}}var v=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,
d=window.cancelAnimationFrame||window.mozCancelAnimationFrame,g=this.RULER_THICKNESS,k=this;this.unit=e;var l=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"},p=document.createElement("div");p.style.position="absolute";this.updateStyle=mxUtils.bind(this,function(){l=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"};p.style.background=l.bkgClr;p.style[f?"borderRight":"borderBottom"]="0.5px solid "+l.strokeClr;p.style.borderLeft="0.5px solid "+l.strokeClr});this.updateStyle();document.body.appendChild(p);mxEvent.disableContextMenu(p);this.editorUiRefresh=b.refresh;b.refresh=
-function(L){k.editorUiRefresh.apply(b,arguments);m()};m();var q=document.createElement("canvas");q.width=p.offsetWidth;q.height=p.offsetHeight;p.style.overflow="hidden";q.style.position="relative";p.appendChild(q);var x=q.getContext("2d");this.ui=b;var y=b.editor.graph;this.graph=y;this.container=p;this.canvas=q;var z=function(L,u,E,B,D){L=Math.round(L);u=Math.round(u);E=Math.round(E);B=Math.round(B);x.beginPath();x.moveTo(L+.5,u+.5);x.lineTo(E+.5,B+.5);x.stroke();D&&(f?(x.save(),x.translate(L,u),
-x.rotate(-Math.PI/2),x.fillText(D,0,0),x.restore()):x.fillText(D,L,u))},A=function(){x.clearRect(0,0,q.width,q.height);x.beginPath();x.lineWidth=.7;x.strokeStyle=l.strokeClr;x.setLineDash([]);x.font="9px Arial";x.textAlign="center";var L=y.view.scale,u=y.view.getBackgroundPageBounds(),E=y.view.translate,B=y.pageVisible;E=B?g+(f?u.y-y.container.scrollTop:u.x-y.container.scrollLeft):g+(f?E.y*L-y.container.scrollTop:E.x*L-y.container.scrollLeft);var D=0;B&&(D=y.getPageLayout(),D=f?D.y*y.pageFormat.height:
-D.x*y.pageFormat.width);var G;switch(k.unit){case mxConstants.POINTS:var N=G=10;var I=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:G=10;N=mxConstants.PIXELS_PER_MM;I=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:G=20;N=mxConstants.PIXELS_PER_MM;I=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:G=.5>=L||4<=L?8:16,N=mxConstants.PIXELS_PER_INCH/G,I=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var F=N;2<=L?F=N/(2*Math.floor(L/2)):.5>=L&&(F=N*Math.floor(1/L/2)*(k.unit==
-mxConstants.MILLIMETERS?2:1));N=null;u=B?Math.min(E+(f?u.height:u.width),f?q.height:q.width):f?q.height:q.width;if(B)if(x.fillStyle=l.outBkgClr,f){var H=E-g;0<H&&x.fillRect(0,g,g,H);u<q.height&&x.fillRect(0,u,g,q.height)}else H=E-g,0<H&&x.fillRect(g,0,H,g),u<q.width&&x.fillRect(u,0,q.width,g);x.fillStyle=l.fontClr;for(B=B?E:E%(F*L);B<=u;B+=F*L)if(H=Math.round((B-E)/L/F),!(B<g||H==N)){N=H;var R=null;0==H%G&&(R=k.formatText(D+H*F)+"");f?z(g-I[Math.abs(H)%G],B,g,B,R):z(B,g-I[Math.abs(H)%G],B,g,R)}x.lineWidth=
-1;z(f?0:g,f?g:0,g,g);x.fillStyle=l.cornerClr;x.fillRect(0,0,g,g)},K=-1,O=function(){null!=v?(null!=d&&d(K),K=v(A)):A()};this.drawRuler=O;this.sizeListener=e=n(function(){var L=y.container;f?(L=L.offsetHeight+g,q.height!=L&&(q.height=L,p.style.height=L+"px",O())):(L=L.offsetWidth+g,q.width!=L&&(q.width=L,p.style.width=L+"px",O()))},10);this.pageListener=function(){O()};this.scrollListener=c=n(function(){var L=f?y.container.scrollTop:y.container.scrollLeft;k.lastScroll!=L&&(k.lastScroll=L,O())},10);
-this.unitListener=function(L,u){k.setUnit(u.getProperty("unit"))};y.addListener(mxEvent.SIZE,e);y.container.addEventListener("scroll",c);y.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(L){l=L;p.style.background=l.bkgClr;A()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(L,u,E,B){if(f&&4<L.height||
-!f&&4<L.width){if(null!=k.guidePart)try{x.putImageData(k.guidePart.imgData1,k.guidePart.x1,k.guidePart.y1),x.putImageData(k.guidePart.imgData2,k.guidePart.x2,k.guidePart.y2),x.putImageData(k.guidePart.imgData3,k.guidePart.x3,k.guidePart.y3)}catch(V){}var D=k.origGuideMove.apply(this,arguments);try{x.lineWidth=.5;x.strokeStyle=l.guideClr;x.setLineDash([2]);if(f){var G=L.y+D.y+g-this.graph.container.scrollTop;var N=0;var I=G+L.height/2;var F=g/2;var H=G+L.height;var R=0;var X=x.getImageData(N,G-1,g,
-3);z(N,G,g,G);G--;var J=x.getImageData(F,I-1,g,3);z(F,I,g,I);I--;var W=x.getImageData(R,H-1,g,3);z(R,H,g,H);H--}else G=0,N=L.x+D.x+g-this.graph.container.scrollLeft,I=g/2,F=N+L.width/2,H=0,R=N+L.width,X=x.getImageData(N-1,G,3,g),z(N,G,N,g),N--,J=x.getImageData(F-1,I,3,g),z(F,I,F,g),F--,W=x.getImageData(R-1,H,3,g),z(R,H,R,g),R--;if(null==k.guidePart||k.guidePart.x1!=N||k.guidePart.y1!=G)k.guidePart={imgData1:X,x1:N,y1:G,imgData2:J,x2:F,y2:I,imgData3:W,x3:R,y3:H}}catch(V){}}else D=k.origGuideMove.apply(this,
-arguments);return D};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var L=k.origGuideDestroy.apply(this,arguments);if(null!=k.guidePart)try{x.putImageData(k.guidePart.imgData1,k.guidePart.x1,k.guidePart.y1),x.putImageData(k.guidePart.imgData2,k.guidePart.x2,k.guidePart.y2),x.putImageData(k.guidePart.imgData3,k.guidePart.x3,k.guidePart.y3),k.guidePart=null}catch(u){}return L}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;
+function(K){k.editorUiRefresh.apply(b,arguments);m()};m();var q=document.createElement("canvas");q.width=p.offsetWidth;q.height=p.offsetHeight;p.style.overflow="hidden";q.style.position="relative";p.appendChild(q);var x=q.getContext("2d");this.ui=b;var y=b.editor.graph;this.graph=y;this.container=p;this.canvas=q;var z=function(K,u,E,B,D){K=Math.round(K);u=Math.round(u);E=Math.round(E);B=Math.round(B);x.beginPath();x.moveTo(K+.5,u+.5);x.lineTo(E+.5,B+.5);x.stroke();D&&(f?(x.save(),x.translate(K,u),
+x.rotate(-Math.PI/2),x.fillText(D,0,0),x.restore()):x.fillText(D,K,u))},A=function(){x.clearRect(0,0,q.width,q.height);x.beginPath();x.lineWidth=.7;x.strokeStyle=l.strokeClr;x.setLineDash([]);x.font="9px Arial";x.textAlign="center";var K=y.view.scale,u=y.view.getBackgroundPageBounds(),E=y.view.translate,B=y.pageVisible;E=B?g+(f?u.y-y.container.scrollTop:u.x-y.container.scrollLeft):g+(f?E.y*K-y.container.scrollTop:E.x*K-y.container.scrollLeft);var D=0;B&&(D=y.getPageLayout(),D=f?D.y*y.pageFormat.height:
+D.x*y.pageFormat.width);var G;switch(k.unit){case mxConstants.POINTS:var H=G=10;var N=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:G=10;H=mxConstants.PIXELS_PER_MM;N=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:G=20;H=mxConstants.PIXELS_PER_MM;N=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:G=.5>=K||4<=K?8:16,H=mxConstants.PIXELS_PER_INCH/G,N=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var F=H;2<=K?F=H/(2*Math.floor(K/2)):.5>=K&&(F=H*Math.floor(1/K/2)*(k.unit==
+mxConstants.MILLIMETERS?2:1));H=null;u=B?Math.min(E+(f?u.height:u.width),f?q.height:q.width):f?q.height:q.width;if(B)if(x.fillStyle=l.outBkgClr,f){var I=E-g;0<I&&x.fillRect(0,g,g,I);u<q.height&&x.fillRect(0,u,g,q.height)}else I=E-g,0<I&&x.fillRect(g,0,I,g),u<q.width&&x.fillRect(u,0,q.width,g);x.fillStyle=l.fontClr;for(B=B?E:E%(F*K);B<=u;B+=F*K)if(I=Math.round((B-E)/K/F),!(B<g||I==H)){H=I;var Q=null;0==I%G&&(Q=k.formatText(D+I*F)+"");f?z(g-N[Math.abs(I)%G],B,g,B,Q):z(B,g-N[Math.abs(I)%G],B,g,Q)}x.lineWidth=
+1;z(f?0:g,f?g:0,g,g);x.fillStyle=l.cornerClr;x.fillRect(0,0,g,g)},J=-1,O=function(){null!=v?(null!=d&&d(J),J=v(A)):A()};this.drawRuler=O;this.sizeListener=e=n(function(){var K=y.container;f?(K=K.offsetHeight+g,q.height!=K&&(q.height=K,p.style.height=K+"px",O())):(K=K.offsetWidth+g,q.width!=K&&(q.width=K,p.style.width=K+"px",O()))},10);this.pageListener=function(){O()};this.scrollListener=c=n(function(){var K=f?y.container.scrollTop:y.container.scrollLeft;k.lastScroll!=K&&(k.lastScroll=K,O())},10);
+this.unitListener=function(K,u){k.setUnit(u.getProperty("unit"))};y.addListener(mxEvent.SIZE,e);y.container.addEventListener("scroll",c);y.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(K){l=K;p.style.background=l.bkgClr;A()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(K,u,E,B){if(f&&4<K.height||
+!f&&4<K.width){if(null!=k.guidePart)try{x.putImageData(k.guidePart.imgData1,k.guidePart.x1,k.guidePart.y1),x.putImageData(k.guidePart.imgData2,k.guidePart.x2,k.guidePart.y2),x.putImageData(k.guidePart.imgData3,k.guidePart.x3,k.guidePart.y3)}catch(W){}var D=k.origGuideMove.apply(this,arguments);try{x.lineWidth=.5;x.strokeStyle=l.guideClr;x.setLineDash([2]);if(f){var G=K.y+D.y+g-this.graph.container.scrollTop;var H=0;var N=G+K.height/2;var F=g/2;var I=G+K.height;var Q=0;var X=x.getImageData(H,G-1,g,
+3);z(H,G,g,G);G--;var L=x.getImageData(F,N-1,g,3);z(F,N,g,N);N--;var U=x.getImageData(Q,I-1,g,3);z(Q,I,g,I);I--}else G=0,H=K.x+D.x+g-this.graph.container.scrollLeft,N=g/2,F=H+K.width/2,I=0,Q=H+K.width,X=x.getImageData(H-1,G,3,g),z(H,G,H,g),H--,L=x.getImageData(F-1,N,3,g),z(F,N,F,g),F--,U=x.getImageData(Q-1,I,3,g),z(Q,I,Q,g),Q--;if(null==k.guidePart||k.guidePart.x1!=H||k.guidePart.y1!=G)k.guidePart={imgData1:X,x1:H,y1:G,imgData2:L,x2:F,y2:N,imgData3:U,x3:Q,y3:I}}catch(W){}}else D=k.origGuideMove.apply(this,
+arguments);return D};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var K=k.origGuideDestroy.apply(this,arguments);if(null!=k.guidePart)try{x.putImageData(k.guidePart.imgData1,k.guidePart.x1,k.guidePart.y1),x.putImageData(k.guidePart.imgData2,k.guidePart.x2,k.guidePart.y2),x.putImageData(k.guidePart.imgData3,k.guidePart.x3,k.guidePart.y3),k.guidePart=null}catch(u){}return K}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;
mxRuler.prototype.setUnit=function(b){this.unit=b;this.drawRuler()};mxRuler.prototype.formatText=function(b){switch(this.unit){case mxConstants.POINTS:return Math.round(b);case mxConstants.MILLIMETERS:return(b/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(b/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(b/mxConstants.PIXELS_PER_INCH).toFixed(2)}};
mxRuler.prototype.destroy=function(){this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.graph.removeListener(this.sizeListener);this.graph.container.removeEventListener("scroll",this.scrollListener);this.graph.view.removeListener("unitChanged",this.unitListener);this.ui.removeListener("pageViewChanged",this.pageListener);this.ui.removeListener("pageScaleChanged",this.pageListener);this.ui.removeListener("pageFormatChanged",
this.pageListener);null!=this.container&&this.container.parentNode.removeChild(this.container)};
function mxDualRuler(b,e){var f=new mxPoint(mxRuler.prototype.RULER_THICKNESS,mxRuler.prototype.RULER_THICKNESS);this.editorUiGetDiagContOffset=b.getDiagramContainerOffset;b.getDiagramContainerOffset=function(){return f};this.editorUiRefresh=b.refresh;this.ui=b;this.origGuideMove=mxGuide.prototype.move;this.origGuideDestroy=mxGuide.prototype.destroy;this.vRuler=new mxRuler(b,e,!0);this.hRuler=new mxRuler(b,e,!1,!0);e=mxUtils.bind(this,function(c){var m=!1;mxEvent.addGestureListeners(c,mxUtils.bind(this,
function(n){m=null!=b.currentMenu;mxEvent.consume(n)}),null,mxUtils.bind(this,function(n){if(b.editor.graph.isEnabled()&&!b.editor.graph.isMouseDown&&(mxEvent.isTouchEvent(n)||mxEvent.isPopupTrigger(n))){b.editor.graph.popupMenuHandler.hideMenu();b.hideCurrentMenu();if(!mxEvent.isTouchEvent(n)||!m){var v=new mxPopupMenu(mxUtils.bind(this,function(k,l){b.menus.addMenuItems(k,["points","inches","millimeters","meters"],l)}));v.div.className+=" geMenubarMenu";v.smartSeparators=!0;v.showDisabled=!0;v.autoExpand=
!0;v.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(v,arguments);b.resetCurrentMenu();v.destroy()});var d=mxEvent.getClientX(n),g=mxEvent.getClientY(n);v.popup(d,g,null,n);b.setCurrentMenu(v,c)}mxEvent.consume(n)}}))});e(this.hRuler.container);e(this.vRuler.container);this.vRuler.drawRuler();this.hRuler.drawRuler()}mxDualRuler.prototype.updateStyle=function(){this.vRuler.updateStyle();this.hRuler.updateStyle();this.vRuler.drawRuler();this.hRuler.drawRuler()};
-mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var e=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=e){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var f=mxFreehand.prototype.NORMAL_SMOOTHING,c=null,m=[],n,v=[],d,g=!1,k=!0,l=!0,p=!0,q=!0,x=[],y=!1,z=!0,A=!1,K={size:12,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},O=!1;this.setClosedPath=function(I){g=I};this.setAutoClose=function(I){k=I};this.setAutoInsert=
-function(I){l=I};this.setAutoScroll=function(I){p=I};this.setOpenFill=function(I){q=I};this.setStopClickEnabled=function(I){z=I};this.setSelectInserted=function(I){A=I};this.setSmoothing=function(I){f=I};this.setPerfectFreehandMode=function(I){O=I};this.setBrushSize=function(I){K.size=I};this.getBrushSize=function(){return K.size};var L=function(I){y=I;b.getRubberband().setEnabled(!I);b.graphHandler.setSelectEnabled(!I);b.graphHandler.setMoveEnabled(!I);b.container.style.cursor=I?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};
-this.startDrawing=function(){L(!0)};this.isDrawing=function(){return y};var u=mxUtils.bind(this,function(I){if(c){var F=d.length,H=z&&0<v.length&&null!=d&&2>d.length;H||v.push.apply(v,d);d=[];v.push(null);m.push(c);c=null;(H||l)&&this.stopDrawing();l&&2<=F&&this.startDrawing();mxEvent.consume(I)}}),E=new mxCell;E.edge=!0;var B=function(){var I=b.getCurrentCellStyle(E);I=mxUtils.getValue(b.currentVertexStyle,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(I,mxConstants.STYLE_STROKECOLOR,"#000"));"default"==
-I&&(I=b.shapeForegroundColor);return I};this.createStyle=function(I){var F=";fillColor=none;";O&&(F=";lineShape=1;");return mxConstants.STYLE_SHAPE+"="+I+F};this.stopDrawing=function(){if(0<m.length){if(O){for(var I=[],F=0;F<v.length;F++)null!=v[F]&&I.push([v[F].x,v[F].y]);I=PerfectFreehand.getStroke(I,K);v=[];for(F=0;F<I.length;F++)v.push({x:I[F][0],y:I[F][1]});v.push(null)}I=v[0].x;var H=v[0].x,R=v[0].y,X=v[0].y;for(F=1;F<v.length;F++)null!=v[F]&&(I=Math.max(I,v[F].x),H=Math.min(H,v[F].x),R=Math.max(R,
-v[F].y),X=Math.min(X,v[F].y));I-=H;R-=X;if(0<I&&0<R){var J=100/I,W=100/R;v.map(function(Q){if(null==Q)return Q;Q.x=(Q.x-H)*J;Q.y=(Q.y-X)*W;return Q});var V='<shape strokewidth="inherit"><foreground>',t=0;for(F=0;F<v.length;F++){var C=v[F];if(null==C){C=!1;t=v[t];var M=v[F-1];!g&&k&&(C=t.x-M.x,M=t.y-M.y,C=Math.sqrt(C*C+M*M)<=b.tolerance);if(g||C)V+='<line x="'+t.x.toFixed(2)+'" y="'+t.y.toFixed(2)+'"/>';V+="</path>"+(q||g||C?"<fillstroke/>":"<stroke/>");t=F+1}else V=F==t?V+('<path><move x="'+C.x.toFixed(2)+
-'" y="'+C.y.toFixed(2)+'"/>'):V+('<line x="'+C.x.toFixed(2)+'" y="'+C.y.toFixed(2)+'"/>')}V+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){F=this.createStyle("stencil("+Graph.compress(V)+")");V=b.view.scale;t=b.view.translate;F=new mxCell("",new mxGeometry(H/V-t.x,X/V-t.y,I/V,R/V),F);F.vertex=1;b.model.beginUpdate();try{F=b.addCell(F),b.fireEvent(new mxEventObject("cellsInserted","cells",[F])),b.fireEvent(new mxEventObject("freehandInserted","cell",F))}finally{b.model.endUpdate()}A&&
-b.setSelectionCells([F])}}for(F=0;F<m.length;F++)m[F].parentNode.removeChild(m[F]);c=null;m=[];v=[]}L(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(I,F){I=F.getProperty("eventName");F=F.getProperty("event");I==mxEvent.MOUSE_MOVE&&y&&(null!=F.sourceState&&F.sourceState.setCursor("crosshair"),F.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(I,F){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(I=F.getEvent(),y&&!mxEvent.isPopupTrigger(I)&&!mxEvent.isMultiTouchEvent(I))){var H=
-parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1);H=Math.max(1,H*b.view.scale);var R=B();c=document.createElementNS("http://www.w3.org/2000/svg","path");c.setAttribute("fill",O?R:"none");c.setAttribute("stroke",R);c.setAttribute("stroke-width",H);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(R=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",R=R.split(" ").map(function(X){return parseFloat(X)*H}).join(" "),c.setAttribute("stroke-dasharray",R));x=[];I=D(I);G(I);
-n="M"+I.x+" "+I.y;v.push(I);d=[];c.setAttribute("d",O?PerfectFreehand.getSvgPathFromStroke([[I.x,I.y]],K):n);e.appendChild(c);F.consume()}}),mouseMove:mxUtils.bind(this,function(I,F){if(c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){I=F.getEvent();I=D(I);G(I);var H=N(0);if(H)if(v.push(H),O){var R=[];for(H=0;H<v.length;H++)R.push([v[H].x,v[H].y]);d=[];for(var X=2;X<x.length;X+=2)H=N(X),R.push([H.x,H.y]),d.push(H);c.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(R,K))}else{n+=" L"+
-H.x+" "+H.y;R="";d=[];for(X=2;X<x.length;X+=2)H=N(X),R+=" L"+H.x+" "+H.y,d.push(H);c.setAttribute("d",n+R)}p&&(H=b.view.translate,b.scrollRectToVisible((new mxRectangle(I.x-H.x,I.y-H.y)).grow(20)));F.consume()}}),mouseUp:mxUtils.bind(this,function(I,F){c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(u(F.getEvent()),F.consume())})});var D=function(I){return mxUtils.convertPoint(b.container,mxEvent.getClientX(I),mxEvent.getClientY(I))},G=function(I){for(x.push(I);x.length>f;)x.shift()},N=
-function(I){var F=x.length;if(1===F%2||F>=f){var H=0,R=0,X,J=0;for(X=I;X<F;X++)J++,I=x[X],H+=I.x,R+=I.y;return{x:H/J,y:R/J}}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;function P2PCollab(b,e,f){function c(J,W){if(!N){var V=e.file.getCurrentUser();if(G&&null!=V&&null!=V.email&&(W=JSON.stringify({from:u,id:z,type:J,sessionId:e.clientId,userId:V.id,username:V.displayName,data:W,protocol:DrawioFileSync.PROTOCOL,editor:EditorUi.VERSION}),I&&"cursor"!=J&&EditorUi.debug("P2PCollab: sending to socket server",[W]),z++,J=!I&&("cursor"==J||"selectionChange"==J),D&&!J&&X("message",W),J))for(p2pId in B)B[p2pId].send(W)}}function m(J){if(b.shareCursorPosition&&!l.isMouseDown){var W=
-mxUtils.getOffset(l.container),V=l.view.translate,t=l.view.scale,C=null!=b.currentPage?b.currentPage.getId():null;c("cursor",{pageId:C,x:Math.round((J.getX()-W.x+l.container.scrollLeft)/t-V.x),y:Math.round((J.getY()-W.y+l.container.scrollTop)/t-V.y)})}}function n(J,W){var V=null!=b.currentPage?b.currentPage.getId():null;if(null!=J&&null!=J.cursor&&null!=J.lastCursor)if(null!=J.lastCursor.hide||!b.isShowRemoteCursors()||null!=J.lastCursor.pageId&&J.lastCursor.pageId!=V)J.cursor.style.display="none";
-else{V=function(){var S=Math.max(l.container.scrollLeft,Math.min(l.container.scrollLeft+l.container.clientWidth-J.cursor.clientWidth,M)),U=Math.max(l.container.scrollTop-22,Math.min(l.container.scrollTop+l.container.clientHeight-J.cursor.clientHeight,Q));P.style.opacity=S!=M||U!=Q?0:1;J.cursor.style.left=S+"px";J.cursor.style.top=U+"px";J.cursor.style.display=""};var t=l.view.translate,C=l.view.scale,M=(t.x+J.lastCursor.x)*C+8,Q=(t.y+J.lastCursor.y)*C-12,P=J.cursor.getElementsByTagName("img")[0];
-W?(mxUtils.setPrefixedStyle(J.cursor.style,"transition","all 600ms ease-out"),mxUtils.setPrefixedStyle(P.style,"transition","all 600ms ease-out"),window.setTimeout(V,0)):(mxUtils.setPrefixedStyle(J.cursor.style,"transition",null),mxUtils.setPrefixedStyle(P.style,"transition",null),V())}}function v(J,W){function V(){if(null==y[C]){var Y=L[C];null==Y&&(Y=p%x.length,L[C]=Y,p++);var aa=x[Y];Y=11<Y?"black":"white";y[C]={cursor:document.createElement("div"),color:aa,selection:{}};K[W]=C;M=y[C].cursor;M.style.pointerEvents=
-"none";M.style.position="absolute";M.style.display="none";M.style.opacity="0.9";M.style.zIndex=5E3;var Z=document.createElement("img");mxUtils.setPrefixedStyle(Z.style,"transform","rotate(-45deg)translateX(-14px)");Z.setAttribute("src",Graph.createSvgImage(8,12,'<path d="M 4 0 L 8 12 L 4 10 L 0 12 Z" stroke="'+aa+'" fill="'+aa+'"/>').src);Z.style.width="10px";M.appendChild(Z);Z=document.createElement("div");Z.style.backgroundColor=aa;Z.style.color=Y;Z.style.fontSize="9pt";Z.style.padding="3px 7px";
-Z.style.marginTop="8px";Z.style.borderRadius="10px";Z.style.maxWidth="100px";Z.style.overflow="hidden";Z.style.textOverflow="ellipsis";Z.style.whiteSpace="nowrap";mxUtils.write(Z,t);M.appendChild(Z);b.diagramContainer.appendChild(M)}else M=y[C].cursor;Q=y[C].selection}if(!N){J=JSON.parse(J);I&&"cursor"!=J.type&&EditorUi.debug("P2PCollab: msg received",[J]);if(null!=W){if(J.from==u||A[J.from]>=J.id){EditorUi.debug("P2PCollab: Dropped Message",J,u,A[J.from]);return}A[J.from]=J.id}var t=J.username?J.username:
-"Anonymous",C=J.sessionId,M,Q;null!=y[C]&&(clearTimeout(y[C].inactiveTO),y[C].inactiveTO=setTimeout(function(){g(null,C)},12E4));var P=J.data;switch(J.type){case "cursor":V();y[C].lastCursor=P;n(y[C],!0);break;case "diff":try{J=e.stringToObject(decodeURIComponent(P.patch)),e.receiveRemoteChanges(J.d)}catch(Y){EditorUi.debug("P2PCollab: Diff msg error",Y)}break;case "selectionChange":if("0"!=urlParams["remote-selection"]){var S=null!=b.currentPage?b.currentPage.getId():null;if(null==S||null!=P.pageId&&
-P.pageId==S){V();for(S=0;S<P.removed.length;S++){var U=P.removed[S];if(null!=U){var T=Q[U];delete Q[U];null!=T&&T.destroy()}}for(S=0;S<P.added.length;S++)U=P.added[S],null!=U&&(T=l.model.getCell(U),null!=T&&(Q[U]=l.highlightCell(T,y[C].color,6E4,70,3)))}}}e.file.fireEvent(new mxEventObject("realtimeMessage","message",J))}}function d(J,W){if(!I&&SimplePeer.WEBRTC_SUPPORT){var V=new SimplePeer({initiator:W,config:{iceServers:[{urls:"stun:54.89.235.160:3478"}]}});V.on("signal",function(t){X("sendSignal",
-{to:J,from:u,signal:t})});V.on("error",function(t){delete E[J];EditorUi.debug("P2PCollab: p2p socket error",t);!N&&W&&V.destroyed&&O[J]&&(EditorUi.debug("P2PCollab: p2p socket reconnecting",J),d(J,!0))});V.on("connect",function(){delete E[J];null==B[J]||B[J].destroyed?(B[J]=V,O[J]=!0,EditorUi.debug("P2PCollab: p2p socket connected",J)):(V.noP2PMapDel=!0,V.destroy(),EditorUi.debug("P2PCollab: p2p socket duplicate",J))});V.on("close",function(){V.noP2PMapDel||(EditorUi.debug("P2PCollab: p2p socket closed",
-J),k(K[J]),delete B[J])});V.on("data",v);return E[J]=V}}function g(J,W){k(W||K[J]);null!=J&&(delete K[J],O[J]=!1)}function k(J){var W=y[J];if(null!=W){var V=W.selection,t;for(t in V)null!=V[t]&&V[t].destroy();null!=W.cursor&&null!=W.cursor.parentNode&&W.cursor.parentNode.removeChild(W.cursor);clearTimeout(W.inactiveTO);delete y[J]}}var l=b.editor.graph,p=0,q=null,x="#e6194b #3cb44b #4363d8 #f58231 #911eb4 #f032e6 #469990 #9A6324 #800000 #808000 #000075 #a9a9a9 #ffe119 #42d4f4 #bfef45 #fabed4 #dcbeff #fffac8 #aaffc3 #ffd8b1".split(" "),
-y={},z=1,A={},K={},O={},L={},u,E={},B={},D=!0,G=!1,N=!1,I="0"!=urlParams["no-p2p"],F=!1,H=0,R=null,X=mxUtils.bind(this,function(J,W){if(!N)try{null!=q?(q.send(JSON.stringify({action:J,msg:W})),I||EditorUi.debug("P2PCollab: sending to socket server",[J],[W])):this.joinFile(!0)}catch(V){R=V,e.file.fireEvent(new mxEventObject("realtimeStateChanged")),EditorUi.debug("P2PCollab:","sendReply error",arguments,V)}});this.sendMessage=c;this.sendDiff=function(J){this.sendMessage("diff",{patch:J})};this.getState=
-function(){return null!=q?q.readyState:3};this.getLastError=function(){return R};this.mouseListeners={startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(J,W){},mouseMove:function(J,W){var V,t=-1;return function(){clearTimeout(V);var C=this,M=arguments,Q=function(){V=null;t=Date.now();J.apply(C,M)};Date.now()-t>W?Q():V=setTimeout(Q,W)}}(function(J,W){m(W)},200),mouseUp:function(J,W){m(W)}};l.addMouseListener(this.mouseListeners);this.shareCursorPositionListener=function(){b.isShareCursorPosition()||
-c("cursor",{hide:!0})};b.addListener("shareCursorPositionChanged",this.shareCursorPositionListener);this.selectionChangeListener=function(J,W){J=function(C){return null!=C?C.id:null};var V=null!=b.currentPage?b.currentPage.getId():null,t=W.getProperty("added");W=W.getProperty("removed");c("selectionChange",{pageId:V,removed:t?t.map(J):[],added:W?W.map(J):[]})};l.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionChangeListener);this.cursorHandler=mxUtils.bind(this,function(){for(var J in y)n(y[J])});
-mxEvent.addListener(l.container,"scroll",this.cursorHandler);l.getView().addListener(mxEvent.SCALE,this.cursorHandler);l.getView().addListener(mxEvent.TRANSLATE,this.cursorHandler);l.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.cursorHandler);b.addListener("showRemoteCursorsChanged",this.cursorHandler);b.editor.addListener("pageSelected",this.cursorHandler);this.joinFile=function(J){if(!N)try{F&&(EditorUi.debug("P2PCollab: joinInProgress on",F),R="busy");F=++H;try{null!=q&&(EditorUi.debug("P2PCollab: force closing socket on",
-q.joinId),q.close(1E3),q=null)}catch(t){EditorUi.debug("P2PCollab: closing socket error",t)}var W=new WebSocket(window.RT_WEBSOCKET_URL+"?id="+f);W.addEventListener("open",function(t){q=W;q.joinId=F;F=!1;e.file.fireEvent(new mxEventObject("realtimeStateChanged"));EditorUi.debug("P2PCollab: open socket",q.joinId);J&&e.scheduleCleanup()});W.addEventListener("message",mxUtils.bind(this,function(t){I||EditorUi.debug("P2PCollab: msg received",[t]);var C=JSON.parse(t.data);I&&"message"!=C.action&&EditorUi.debug("P2PCollab: msg received",
-[t]);switch(C.action){case "message":v(C.msg,C.from);break;case "clientsList":t=C.msg;u=t.cId;G=!0;for(C=0;C<t.list.length;C++)d(t.list[C],!0);break;case "signal":t=C.msg;I||(E[t.from]?C=E[t.from]:(C=d(t.from,!1),D=!0),C.signal(t.signal));break;case "newClient":D=!0;break;case "clientLeft":g(C.msg);break;case "sendSignalFailed":t=C.msg,EditorUi.debug("P2PCollab: signal failed (socket not found on server)",t),delete E[t.to],O[t.to]=!1}}));var V=!1;W.addEventListener("close",mxUtils.bind(this,function(t){EditorUi.debug("P2PCollab: WebSocket closed",
-W.joinId,"reconnecting",t.code,t.reason);EditorUi.debug("P2PCollab: closing socket on",W.joinId);N||1E3==t.code||H!=W.joinId||(F==H&&(EditorUi.debug("P2PCollab: joinInProgress in close on",W.joinId),F=!1),V||(EditorUi.debug("P2PCollab: calling rejoin on",W.joinId),V=!0,this.joinFile(!0)));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));W.addEventListener("error",mxUtils.bind(this,function(t){EditorUi.debug("P2PCollab: WebSocket error, reconnecting",t);EditorUi.debug("P2PCollab: error socket on",
-W.joinId);N||H!=W.joinId||(F==H&&(EditorUi.debug("P2PCollab: joinInProgress in error on",W.joinId),F=!1),V||(EditorUi.debug("P2PCollab: calling rejoin on",W.joinId),V=!0,this.joinFile(!0)));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}catch(t){R=t,e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}};this.destroy=function(){if(!N){EditorUi.debug("P2PCollab: destroyed");N=!0;for(sessionId in y)k(sessionId);null!=
+mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var e=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=e){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var f=mxFreehand.prototype.NORMAL_SMOOTHING,c=null,m=[],n,v=[],d,g=!1,k=!0,l=!0,p=!0,q=!0,x=[],y=!1,z=!0,A=!1,J={size:12,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},O=!1;this.setClosedPath=function(N){g=N};this.setAutoClose=function(N){k=N};this.setAutoInsert=
+function(N){l=N};this.setAutoScroll=function(N){p=N};this.setOpenFill=function(N){q=N};this.setStopClickEnabled=function(N){z=N};this.setSelectInserted=function(N){A=N};this.setSmoothing=function(N){f=N};this.setPerfectFreehandMode=function(N){O=N};this.setBrushSize=function(N){J.size=N};this.getBrushSize=function(){return J.size};var K=function(N){y=N;b.getRubberband().setEnabled(!N);b.graphHandler.setSelectEnabled(!N);b.graphHandler.setMoveEnabled(!N);b.container.style.cursor=N?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};
+this.startDrawing=function(){K(!0)};this.isDrawing=function(){return y};var u=mxUtils.bind(this,function(N){if(c){var F=d.length,I=z&&0<v.length&&null!=d&&2>d.length;I||v.push.apply(v,d);d=[];v.push(null);m.push(c);c=null;(I||l)&&this.stopDrawing();l&&2<=F&&this.startDrawing();mxEvent.consume(N)}}),E=new mxCell;E.edge=!0;var B=function(){var N=b.getCurrentCellStyle(E);N=mxUtils.getValue(b.currentVertexStyle,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(N,mxConstants.STYLE_STROKECOLOR,"#000"));"default"==
+N&&(N=b.shapeForegroundColor);return N};this.createStyle=function(N){var F=";fillColor=none;";O&&(F=";lineShape=1;");return mxConstants.STYLE_SHAPE+"="+N+F};this.stopDrawing=function(){if(0<m.length){if(O){for(var N=[],F=0;F<v.length;F++)null!=v[F]&&N.push([v[F].x,v[F].y]);N=PerfectFreehand.getStroke(N,J);v=[];for(F=0;F<N.length;F++)v.push({x:N[F][0],y:N[F][1]});v.push(null)}N=v[0].x;var I=v[0].x,Q=v[0].y,X=v[0].y;for(F=1;F<v.length;F++)null!=v[F]&&(N=Math.max(N,v[F].x),I=Math.min(I,v[F].x),Q=Math.max(Q,
+v[F].y),X=Math.min(X,v[F].y));N-=I;Q-=X;if(0<N&&0<Q){var L=100/N,U=100/Q;v.map(function(S){if(null==S)return S;S.x=(S.x-I)*L;S.y=(S.y-X)*U;return S});var W='<shape strokewidth="inherit"><foreground>',t=0;for(F=0;F<v.length;F++){var C=v[F];if(null==C){C=!1;t=v[t];var M=v[F-1];!g&&k&&(C=t.x-M.x,M=t.y-M.y,C=Math.sqrt(C*C+M*M)<=b.tolerance);if(g||C)W+='<line x="'+t.x.toFixed(2)+'" y="'+t.y.toFixed(2)+'"/>';W+="</path>"+(q||g||C?"<fillstroke/>":"<stroke/>");t=F+1}else W=F==t?W+('<path><move x="'+C.x.toFixed(2)+
+'" y="'+C.y.toFixed(2)+'"/>'):W+('<line x="'+C.x.toFixed(2)+'" y="'+C.y.toFixed(2)+'"/>')}W+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){F=this.createStyle("stencil("+Graph.compress(W)+")");W=b.view.scale;t=b.view.translate;F=new mxCell("",new mxGeometry(I/W-t.x,X/W-t.y,N/W,Q/W),F);F.vertex=1;b.model.beginUpdate();try{F=b.addCell(F),b.fireEvent(new mxEventObject("cellsInserted","cells",[F])),b.fireEvent(new mxEventObject("freehandInserted","cell",F))}finally{b.model.endUpdate()}A&&
+b.setSelectionCells([F])}}for(F=0;F<m.length;F++)m[F].parentNode.removeChild(m[F]);c=null;m=[];v=[]}K(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(N,F){N=F.getProperty("eventName");F=F.getProperty("event");N==mxEvent.MOUSE_MOVE&&y&&(null!=F.sourceState&&F.sourceState.setCursor("crosshair"),F.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(N,F){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(N=F.getEvent(),y&&!mxEvent.isPopupTrigger(N)&&!mxEvent.isMultiTouchEvent(N))){var I=
+parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1);I=Math.max(1,I*b.view.scale);var Q=B();c=document.createElementNS("http://www.w3.org/2000/svg","path");c.setAttribute("fill",O?Q:"none");c.setAttribute("stroke",Q);c.setAttribute("stroke-width",I);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(Q=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",Q=Q.split(" ").map(function(X){return parseFloat(X)*I}).join(" "),c.setAttribute("stroke-dasharray",Q));x=[];N=D(N);G(N);
+n="M"+N.x+" "+N.y;v.push(N);d=[];c.setAttribute("d",O?PerfectFreehand.getSvgPathFromStroke([[N.x,N.y]],J):n);e.appendChild(c);F.consume()}}),mouseMove:mxUtils.bind(this,function(N,F){if(c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){N=F.getEvent();N=D(N);G(N);var I=H(0);if(I)if(v.push(I),O){var Q=[];for(I=0;I<v.length;I++)Q.push([v[I].x,v[I].y]);d=[];for(var X=2;X<x.length;X+=2)I=H(X),Q.push([I.x,I.y]),d.push(I);c.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(Q,J))}else{n+=" L"+
+I.x+" "+I.y;Q="";d=[];for(X=2;X<x.length;X+=2)I=H(X),Q+=" L"+I.x+" "+I.y,d.push(I);c.setAttribute("d",n+Q)}p&&(I=b.view.translate,b.scrollRectToVisible((new mxRectangle(N.x-I.x,N.y-I.y)).grow(20)));F.consume()}}),mouseUp:mxUtils.bind(this,function(N,F){c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(u(F.getEvent()),F.consume())})});var D=function(N){return mxUtils.convertPoint(b.container,mxEvent.getClientX(N),mxEvent.getClientY(N))},G=function(N){for(x.push(N);x.length>f;)x.shift()},H=
+function(N){var F=x.length;if(1===F%2||F>=f){var I=0,Q=0,X,L=0;for(X=N;X<F;X++)L++,N=x[X],I+=N.x,Q+=N.y;return{x:I/L,y:Q/L}}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;function P2PCollab(b,e,f){function c(L,U){if(!H){var W=e.file.getCurrentUser();if(G&&null!=W&&null!=W.email&&(U=JSON.stringify({from:u,id:z,type:L,sessionId:e.clientId,userId:W.id,username:W.displayName,data:U,protocol:DrawioFileSync.PROTOCOL,editor:EditorUi.VERSION}),N&&"cursor"!=L&&EditorUi.debug("P2PCollab: sending to socket server",[U]),z++,L=!N&&("cursor"==L||"selectionChange"==L),D&&!L&&X("message",U),L))for(p2pId in B)B[p2pId].send(U)}}function m(L){if(b.shareCursorPosition&&!l.isMouseDown){var U=
+mxUtils.getOffset(l.container),W=l.view.translate,t=l.view.scale,C=null!=b.currentPage?b.currentPage.getId():null;c("cursor",{pageId:C,x:Math.round((L.getX()-U.x+l.container.scrollLeft)/t-W.x),y:Math.round((L.getY()-U.y+l.container.scrollTop)/t-W.y)})}}function n(L,U){var W=null!=b.currentPage?b.currentPage.getId():null;if(null!=L&&null!=L.cursor&&null!=L.lastCursor)if(null!=L.lastCursor.hide||!b.isShowRemoteCursors()||null!=L.lastCursor.pageId&&L.lastCursor.pageId!=W)L.cursor.style.display="none";
+else{W=function(){var R=Math.max(l.container.scrollLeft,Math.min(l.container.scrollLeft+l.container.clientWidth-L.cursor.clientWidth,M)),T=Math.max(l.container.scrollTop-22,Math.min(l.container.scrollTop+l.container.clientHeight-L.cursor.clientHeight,S));P.style.opacity=R!=M||T!=S?0:1;L.cursor.style.left=R+"px";L.cursor.style.top=T+"px";L.cursor.style.display=""};var t=l.view.translate,C=l.view.scale,M=(t.x+L.lastCursor.x)*C+8,S=(t.y+L.lastCursor.y)*C-12,P=L.cursor.getElementsByTagName("img")[0];
+U?(mxUtils.setPrefixedStyle(L.cursor.style,"transition","all 600ms ease-out"),mxUtils.setPrefixedStyle(P.style,"transition","all 600ms ease-out"),window.setTimeout(W,0)):(mxUtils.setPrefixedStyle(L.cursor.style,"transition",null),mxUtils.setPrefixedStyle(P.style,"transition",null),W())}}function v(L,U){function W(){if(null==y[C]){var Y=K[C];null==Y&&(Y=p%x.length,K[C]=Y,p++);var ba=x[Y];Y=11<Y?"black":"white";y[C]={cursor:document.createElement("div"),color:ba,selection:{}};J[U]=C;M=y[C].cursor;M.style.pointerEvents=
+"none";M.style.position="absolute";M.style.display="none";M.style.opacity="0.9";M.style.zIndex=5E3;var Z=document.createElement("img");mxUtils.setPrefixedStyle(Z.style,"transform","rotate(-45deg)translateX(-14px)");Z.setAttribute("src",Graph.createSvgImage(8,12,'<path d="M 4 0 L 8 12 L 4 10 L 0 12 Z" stroke="'+ba+'" fill="'+ba+'"/>').src);Z.style.width="10px";M.appendChild(Z);Z=document.createElement("div");Z.style.backgroundColor=ba;Z.style.color=Y;Z.style.fontSize="9pt";Z.style.padding="3px 7px";
+Z.style.marginTop="8px";Z.style.borderRadius="10px";Z.style.maxWidth="100px";Z.style.overflow="hidden";Z.style.textOverflow="ellipsis";Z.style.whiteSpace="nowrap";mxUtils.write(Z,t);M.appendChild(Z);b.diagramContainer.appendChild(M)}else M=y[C].cursor;S=y[C].selection}if(!H){L=JSON.parse(L);N&&"cursor"!=L.type&&EditorUi.debug("P2PCollab: msg received",[L]);if(null!=U){if(L.from==u||A[L.from]>=L.id){EditorUi.debug("P2PCollab: Dropped Message",L,u,A[L.from]);return}A[L.from]=L.id}var t=L.username?L.username:
+"Anonymous",C=L.sessionId,M,S;null!=y[C]&&(clearTimeout(y[C].inactiveTO),y[C].inactiveTO=setTimeout(function(){g(null,C)},12E4));var P=L.data;switch(L.type){case "cursor":W();y[C].lastCursor=P;n(y[C],!0);break;case "diff":try{L=e.stringToObject(decodeURIComponent(P.patch)),e.receiveRemoteChanges(L.d)}catch(Y){EditorUi.debug("P2PCollab: Diff msg error",Y)}break;case "selectionChange":if("0"!=urlParams["remote-selection"]){var R=null!=b.currentPage?b.currentPage.getId():null;if(null==R||null!=P.pageId&&
+P.pageId==R){W();for(R=0;R<P.removed.length;R++){var T=P.removed[R];if(null!=T){var V=S[T];delete S[T];null!=V&&V.destroy()}}for(R=0;R<P.added.length;R++)T=P.added[R],null!=T&&(V=l.model.getCell(T),null!=V&&(S[T]=l.highlightCell(V,y[C].color,6E4,70,3)))}}}e.file.fireEvent(new mxEventObject("realtimeMessage","message",L))}}function d(L,U){if(!N&&SimplePeer.WEBRTC_SUPPORT){var W=new SimplePeer({initiator:U,config:{iceServers:[{urls:"stun:54.89.235.160:3478"}]}});W.on("signal",function(t){X("sendSignal",
+{to:L,from:u,signal:t})});W.on("error",function(t){delete E[L];EditorUi.debug("P2PCollab: p2p socket error",t);!H&&U&&W.destroyed&&O[L]&&(EditorUi.debug("P2PCollab: p2p socket reconnecting",L),d(L,!0))});W.on("connect",function(){delete E[L];null==B[L]||B[L].destroyed?(B[L]=W,O[L]=!0,EditorUi.debug("P2PCollab: p2p socket connected",L)):(W.noP2PMapDel=!0,W.destroy(),EditorUi.debug("P2PCollab: p2p socket duplicate",L))});W.on("close",function(){W.noP2PMapDel||(EditorUi.debug("P2PCollab: p2p socket closed",
+L),k(J[L]),delete B[L])});W.on("data",v);return E[L]=W}}function g(L,U){k(U||J[L]);null!=L&&(delete J[L],O[L]=!1)}function k(L){var U=y[L];if(null!=U){var W=U.selection,t;for(t in W)null!=W[t]&&W[t].destroy();null!=U.cursor&&null!=U.cursor.parentNode&&U.cursor.parentNode.removeChild(U.cursor);clearTimeout(U.inactiveTO);delete y[L]}}var l=b.editor.graph,p=0,q=null,x="#e6194b #3cb44b #4363d8 #f58231 #911eb4 #f032e6 #469990 #9A6324 #800000 #808000 #000075 #a9a9a9 #ffe119 #42d4f4 #bfef45 #fabed4 #dcbeff #fffac8 #aaffc3 #ffd8b1".split(" "),
+y={},z=1,A={},J={},O={},K={},u,E={},B={},D=!0,G=!1,H=!1,N="0"!=urlParams["no-p2p"],F=!1,I=0,Q=null,X=mxUtils.bind(this,function(L,U){if(!H)try{null!=q?(q.send(JSON.stringify({action:L,msg:U})),N||EditorUi.debug("P2PCollab: sending to socket server",[L],[U])):this.joinFile(!0)}catch(W){Q=W,e.file.fireEvent(new mxEventObject("realtimeStateChanged")),EditorUi.debug("P2PCollab:","sendReply error",arguments,W)}});this.sendMessage=c;this.sendDiff=function(L){this.sendMessage("diff",{patch:L})};this.getState=
+function(){return null!=q?q.readyState:3};this.getLastError=function(){return Q};this.mouseListeners={startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(L,U){},mouseMove:function(L,U){var W,t=-1;return function(){clearTimeout(W);var C=this,M=arguments,S=function(){W=null;t=Date.now();L.apply(C,M)};Date.now()-t>U?S():W=setTimeout(S,U)}}(function(L,U){m(U)},200),mouseUp:function(L,U){m(U)}};l.addMouseListener(this.mouseListeners);this.shareCursorPositionListener=function(){b.isShareCursorPosition()||
+c("cursor",{hide:!0})};b.addListener("shareCursorPositionChanged",this.shareCursorPositionListener);this.selectionChangeListener=function(L,U){L=function(C){return null!=C?C.id:null};var W=null!=b.currentPage?b.currentPage.getId():null,t=U.getProperty("added");U=U.getProperty("removed");c("selectionChange",{pageId:W,removed:t?t.map(L):[],added:U?U.map(L):[]})};l.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionChangeListener);this.cursorHandler=mxUtils.bind(this,function(){for(var L in y)n(y[L])});
+mxEvent.addListener(l.container,"scroll",this.cursorHandler);l.getView().addListener(mxEvent.SCALE,this.cursorHandler);l.getView().addListener(mxEvent.TRANSLATE,this.cursorHandler);l.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.cursorHandler);b.addListener("showRemoteCursorsChanged",this.cursorHandler);b.editor.addListener("pageSelected",this.cursorHandler);this.joinFile=function(L){if(!H)try{F&&(EditorUi.debug("P2PCollab: joinInProgress on",F),Q="busy");F=++I;try{null!=q&&(EditorUi.debug("P2PCollab: force closing socket on",
+q.joinId),q.close(1E3),q=null)}catch(t){EditorUi.debug("P2PCollab: closing socket error",t)}var U=new WebSocket(window.RT_WEBSOCKET_URL+"?id="+f);U.addEventListener("open",function(t){q=U;q.joinId=F;F=!1;e.file.fireEvent(new mxEventObject("realtimeStateChanged"));EditorUi.debug("P2PCollab: open socket",q.joinId);L&&e.scheduleCleanup()});U.addEventListener("message",mxUtils.bind(this,function(t){N||EditorUi.debug("P2PCollab: msg received",[t]);var C=JSON.parse(t.data);N&&"message"!=C.action&&EditorUi.debug("P2PCollab: msg received",
+[t]);switch(C.action){case "message":v(C.msg,C.from);break;case "clientsList":t=C.msg;u=t.cId;G=!0;for(C=0;C<t.list.length;C++)d(t.list[C],!0);break;case "signal":t=C.msg;N||(E[t.from]?C=E[t.from]:(C=d(t.from,!1),D=!0),C.signal(t.signal));break;case "newClient":D=!0;break;case "clientLeft":g(C.msg);break;case "sendSignalFailed":t=C.msg,EditorUi.debug("P2PCollab: signal failed (socket not found on server)",t),delete E[t.to],O[t.to]=!1}}));var W=!1;U.addEventListener("close",mxUtils.bind(this,function(t){EditorUi.debug("P2PCollab: WebSocket closed",
+U.joinId,"reconnecting",t.code,t.reason);EditorUi.debug("P2PCollab: closing socket on",U.joinId);H||1E3==t.code||I!=U.joinId||(F==I&&(EditorUi.debug("P2PCollab: joinInProgress in close on",U.joinId),F=!1),W||(EditorUi.debug("P2PCollab: calling rejoin on",U.joinId),W=!0,this.joinFile(!0)));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));U.addEventListener("error",mxUtils.bind(this,function(t){EditorUi.debug("P2PCollab: WebSocket error, reconnecting",t);EditorUi.debug("P2PCollab: error socket on",
+U.joinId);H||I!=U.joinId||(F==I&&(EditorUi.debug("P2PCollab: joinInProgress in error on",U.joinId),F=!1),W||(EditorUi.debug("P2PCollab: calling rejoin on",U.joinId),W=!0,this.joinFile(!0)));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}catch(t){Q=t,e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}};this.destroy=function(){if(!H){EditorUi.debug("P2PCollab: destroyed");H=!0;for(sessionId in y)k(sessionId);null!=
this.mouseListeners&&l.removeMouseListener(this.mouseListeners);null!=this.selectionChangeListener&&l.getSelectionModel().removeListener(this.selectionChangeListener);null!=this.shareCursorPositionListener&&b.removeListener(this.shareCursorPositionListener);null!=this.cursorHandler&&(mxEvent.removeListener(l.container,"scroll",this.cursorHandler),l.getView().removeListener(mxEvent.SCALE,this.cursorHandler),l.getView().removeListener(mxEvent.TRANSLATE,this.cursorHandler),l.getView().removeListener(mxEvent.SCALE_AND_TRANSLATE,
-this.cursorHandler),b.editor.removeListener("pageSelected",this.cursorHandler),b.removeListener(this.cursorHandler));null!=q&&(q.close(1E3),q=null);for(var J in B)null!=B[J]&&B[J].destroy();e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}}};
+this.cursorHandler),b.editor.removeListener("pageSelected",this.cursorHandler),b.removeListener(this.cursorHandler));null!=q&&(q.close(1E3),q=null);for(var L in B)null!=B[L]&&B[L].destroy();e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}}};
diff --git a/src/main/webapp/js/diagramly/App.js b/src/main/webapp/js/diagramly/App.js
index 348feca3..25836f4e 100644
--- a/src/main/webapp/js/diagramly/App.js
+++ b/src/main/webapp/js/diagramly/App.js
@@ -3394,9 +3394,9 @@ App.prototype.start = function()
this.loadTemplate(value, function(text)
{
showCreateDialog(text);
- }, mxUtils.bind(this, function()
+ }, mxUtils.bind(this, function(e)
{
- this.handleError(null, mxResources.get('errorLoadingFile'), reconnect);
+ this.handleError(e, mxResources.get('errorLoadingFile'), reconnect);
}));
}
}
diff --git a/src/main/webapp/js/diagramly/Dialogs.js b/src/main/webapp/js/diagramly/Dialogs.js
index 1bfdf9ff..2d4a7ab2 100644
--- a/src/main/webapp/js/diagramly/Dialogs.js
+++ b/src/main/webapp/js/diagramly/Dialogs.js
@@ -4036,8 +4036,8 @@ var NewDialog = function(editorUi, compact, showName, callback, createOnly, canc
btns.appendChild(cancelBtn);
}
- if (!compact && urlParams['embed'] != '1' && !createOnly &&
- !mxClient.IS_ANDROID && !mxClient.IS_IOS && urlParams['noDevice'] != '1')
+ if (!compact && urlParams['embed'] != '1' && !createOnly && !mxClient.IS_ANDROID &&
+ !mxClient.IS_IOS && urlParams['noDevice'] != '1')
{
var fromTmpBtn = mxUtils.button(mxResources.get('fromTemplateUrl'), function()
{
@@ -4045,20 +4045,20 @@ var NewDialog = function(editorUi, compact, showName, callback, createOnly, canc
{
if (fileUrl != null && fileUrl.length > 0)
{
- var url = editorUi.getUrl(window.location.pathname + '?mode=' + editorUi.mode +
- '&title=' + encodeURIComponent(nameInput.value) +
- '&create=' + encodeURIComponent(fileUrl));
-
- if (editorUi.getCurrentFile() == null)
+ editorUi.editor.loadUrl(fileUrl, function(data)
{
- window.location.href = url;
- }
- else
+ templateXml = data;
+ templateLibs = null;
+ templateRealURl = fileUrl;
+
+ editorUi.hideDialog();
+ create();
+ }, function(err)
{
- window.openWindow(url);
- }
+ editorUi.handleError(err);
+ });
}
- }, mxResources.get('url'));
+ }, mxResources.get('url'), null, null, null, false);
editorUi.showDialog(dlg.container, 300, 80, true, true);
dlg.init();
});
@@ -7612,35 +7612,7 @@ var FindWindow = function(ui, x, y, w, h, withReplace)
}
}));
- this.window.setLocation = function(x, y)
- {
- var iw = window.innerWidth || document.body.clientWidth || document.documentElement.clientWidth;
- var ih = window.innerHeight || document.body.clientHeight || document.documentElement.clientHeight;
-
- x = Math.max(0, Math.min(x, iw - this.table.clientWidth));
- y = Math.max(0, Math.min(y, ih - this.table.clientHeight - ((urlParams['sketch'] == '1') ? 3 : 48)));
-
- if (this.getX() != x || this.getY() != y)
- {
- mxWindow.prototype.setLocation.apply(this, arguments);
- }
- };
-
- var resizeListener = mxUtils.bind(this, function()
- {
- var x = this.window.getX();
- var y = this.window.getY();
-
- this.window.setLocation(x, y);
- });
-
- mxEvent.addListener(window, 'resize', resizeListener);
-
- this.destroy = function()
- {
- mxEvent.removeListener(window, 'resize', resizeListener);
- this.window.destroy();
- }
+ ui.installResizeHandler(this, false);
};
/**
@@ -7746,35 +7718,7 @@ var FreehandWindow = function(editorUi, x, y, w, h, withBrush)
}
}));
- this.window.setLocation = function(x, y)
- {
- var iw = window.innerWidth || document.body.clientWidth || document.documentElement.clientWidth;
- var ih = window.innerHeight || document.body.clientHeight || document.documentElement.clientHeight;
-
- x = Math.max(0, Math.min(x, iw - this.table.clientWidth));
- y = Math.max(0, Math.min(y, ih - this.table.clientHeight - ((urlParams['sketch'] == '1') ? 3 : 48)));
-
- if (this.getX() != x || this.getY() != y)
- {
- mxWindow.prototype.setLocation.apply(this, arguments);
- }
- };
-
- var resizeListener = mxUtils.bind(this, function()
- {
- var x = this.window.getX();
- var y = this.window.getY();
-
- this.window.setLocation(x, y);
- });
-
- mxEvent.addListener(window, 'resize', resizeListener);
-
- this.destroy = function()
- {
- mxEvent.removeListener(window, 'resize', resizeListener);
- this.window.destroy();
- }
+ editorUi.installResizeHandler(this, false);
};
/**
@@ -7844,35 +7788,7 @@ var TagsWindow = function(editorUi, x, y, w, h)
this.window.fit();
}));
- this.window.setLocation = function(x, y)
- {
- var iw = window.innerWidth || document.body.clientWidth || document.documentElement.clientWidth;
- var ih = window.innerHeight || document.body.clientHeight || document.documentElement.clientHeight;
-
- x = Math.max(0, Math.min(x, iw - this.table.clientWidth));
- y = Math.max(0, Math.min(y, ih - this.table.clientHeight - ((urlParams['sketch'] == '1') ? 3 : 48)));
-
- if (this.getX() != x || this.getY() != y)
- {
- mxWindow.prototype.setLocation.apply(this, arguments);
- }
- };
-
- var resizeListener = mxUtils.bind(this, function()
- {
- var x = this.window.getX();
- var y = this.window.getY();
-
- this.window.setLocation(x, y);
- });
-
- mxEvent.addListener(window, 'resize', resizeListener);
-
- this.destroy = function()
- {
- mxEvent.removeListener(window, 'resize', resizeListener);
- this.window.destroy();
- }
+ editorUi.installResizeHandler(this, true);
};
/**
diff --git a/src/main/webapp/js/diagramly/Editor.js b/src/main/webapp/js/diagramly/Editor.js
index d6959e03..e2970e8a 100644
--- a/src/main/webapp/js/diagramly/Editor.js
+++ b/src/main/webapp/js/diagramly/Editor.js
@@ -2933,6 +2933,10 @@
// Handles CORS errors
error({message: mxResources.get('accessDenied')}, req);
}
+ else if (req.getStatus() == 404)
+ {
+ error({code: req.getStatus()}, req);
+ }
else
{
error({message: mxResources.get('error') + ' ' + req.getStatus()}, req);
diff --git a/src/main/webapp/js/diagramly/EditorUi.js b/src/main/webapp/js/diagramly/EditorUi.js
index 17939bf6..fdd14362 100644
--- a/src/main/webapp/js/diagramly/EditorUi.js
+++ b/src/main/webapp/js/diagramly/EditorUi.js
@@ -16238,35 +16238,7 @@ var CommentsWindow = function(editorUi, x, y, w, h, saveCallback)
this.window.fit();
}));
- this.window.setLocation = function(x, y)
- {
- var iw = window.innerWidth || document.body.clientWidth || document.documentElement.clientWidth;
- var ih = window.innerHeight || document.body.clientHeight || document.documentElement.clientHeight;
-
- x = Math.max(0, Math.min(x, iw - this.table.clientWidth));
- y = Math.max(0, Math.min(y, ih - this.table.clientHeight - 48));
-
- if (this.getX() != x || this.getY() != y)
- {
- mxWindow.prototype.setLocation.apply(this, arguments);
- }
- };
-
- var resizeListener = mxUtils.bind(this, function()
- {
- var x = this.window.getX();
- var y = this.window.getY();
-
- this.window.setLocation(x, y);
- });
-
- mxEvent.addListener(window, 'resize', resizeListener);
-
- this.destroy = function()
- {
- mxEvent.removeListener(window, 'resize', resizeListener);
- this.window.destroy();
- }
+ editorUi.installResizeHandler(this, true);
};
/**
diff --git a/src/main/webapp/js/diagramly/Init.js b/src/main/webapp/js/diagramly/Init.js
index a6bc7d9a..8f938e31 100644
--- a/src/main/webapp/js/diagramly/Init.js
+++ b/src/main/webapp/js/diagramly/Init.js
@@ -135,6 +135,8 @@ window.mxLanguageMap = window.mxLanguageMap ||
'gl' : 'Galego',
'it' : 'Italiano',
'hu' : 'Magyar',
+ 'lt' : 'Lietuvių',
+ 'lv' : 'Latviešu',
'nl' : 'Nederlands',
'no' : 'Norsk',
'pl' : 'Polski',
diff --git a/src/main/webapp/js/diagramly/Menus.js b/src/main/webapp/js/diagramly/Menus.js
index 8aca6dc8..a3ecae78 100644
--- a/src/main/webapp/js/diagramly/Menus.js
+++ b/src/main/webapp/js/diagramly/Menus.js
@@ -307,7 +307,7 @@
if (window.mxFreehand)
{
- editorUi.actions.put('insertFreehand', new Action(mxResources.get('freehand') + '...', function(evt)
+ editorUi.actions.put('insertFreehand', new Action(mxResources.get('freehand') + '...', function()
{
if (graph.isEnabled())
{
@@ -3061,6 +3061,11 @@
}
}
}));
+
+ editorUi.actions.put('openFolder', new Action(mxResources.get('openIt', [mxResources.get('folder')]) + '...', function(evt, trigger)
+ {
+ editorUi.appIconClicked(trigger);
+ }));
editorUi.actions.addAction('moveToFolder...', mxUtils.bind(this, function()
{
@@ -4096,7 +4101,8 @@
if (file != null && file.constructor == DriveFile)
{
- this.addMenuItems(menu, ['new', '-', 'rename', 'makeCopy', 'moveToFolder'], parent);
+ this.addMenuItems(menu, ['new', '-', 'rename',
+ 'makeCopy', 'moveToFolder'], parent);
}
else
{
diff --git a/src/main/webapp/js/diagramly/Minimal.js b/src/main/webapp/js/diagramly/Minimal.js
index 50c28f6a..37e25a07 100644
--- a/src/main/webapp/js/diagramly/Minimal.js
+++ b/src/main/webapp/js/diagramly/Minimal.js
@@ -55,22 +55,9 @@ EditorUi.initMinimalTheme = function()
this.window.setResizable(true);
this.window.setClosable(true);
this.window.setVisible(true);
-
- this.window.setLocation = function(x, y)
- {
- var iiw = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
- var ih = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
-
- var title = this.table.firstChild.firstChild.firstChild;
- x = Math.max(0, Math.min(x, iiw - title.clientWidth - 2));
- y = Math.max(0, Math.min(y, ih - title.clientHeight - 2));
-
- if (this.getX() != x || this.getY() != y)
- {
- mxWindow.prototype.setLocation.apply(this, arguments);
- }
- };
-
+
+ editorUi.installResizeHandler(this, true);
+
// Workaround for text selection starting in Safari
// when dragging shapes outside of window
if (mxClient.IS_SF)
@@ -1223,7 +1210,8 @@ EditorUi.initMinimalTheme = function()
if (file != null && file.constructor == DriveFile)
{
- ui.menus.addMenuItems(menu, ['save', 'rename', 'makeCopy', 'moveToFolder'], parent);
+ ui.menus.addMenuItems(menu, ['save', 'rename',
+ 'makeCopy', 'moveToFolder'], parent);
}
else
{
@@ -1251,6 +1239,11 @@ EditorUi.initMinimalTheme = function()
ui.menus.addMenuItems(menu, ['revisionHistory'], parent);
}
+ if (file.constructor == DriveFile)
+ {
+ ui.menus.addMenuItems(menu, ['openFolder'], parent);
+ }
+
if (!mxClient.IS_CHROMEAPP && !EditorUi.isElectronApp &&
(file.constructor != LocalFile || file.fileHandle != null))
{
@@ -1263,12 +1256,12 @@ EditorUi.initMinimalTheme = function()
if (file != null)
{
menu.addSeparator(parent);
-
- if (file.constructor == DriveFile)
+
+ if (urlParams['sketch'] == '1' && ui.commentsSupported())
{
- ui.menus.addMenuItems(menu, ['share'], parent);
+ ui.menus.addMenuItems(menu, ['comments'], parent);
}
-
+
if (ui.fileNode != null && urlParams['embedInline'] != '1')
{
var filename = (file.getTitle() != null) ?
@@ -1278,9 +1271,14 @@ EditorUi.initMinimalTheme = function()
file.sync.isConnected()) || (!/(\.html)$/i.test(filename) &&
!/(\.svg)$/i.test(filename)))
{
- this.addMenuItems(menu, ['-', 'properties'], parent);
+ this.addMenuItems(menu, ['properties'], parent);
}
}
+
+ if (file.constructor == DriveFile)
+ {
+ ui.menus.addMenuItems(menu, ['share'], parent);
+ }
}
})));
@@ -1369,12 +1367,13 @@ EditorUi.initMinimalTheme = function()
ui.menus.addSubmenu('importFrom', menu, parent);
}
- if (ui.commentsSupported())
+ if ((urlParams['embed'] == '1' || urlParams['sketch'] != '1' ||
+ urlParams['noFileMenu'] == '1') && ui.commentsSupported())
{
ui.menus.addMenuItems(menu, ['-', 'comments'], parent);
}
- ui.menus.addMenuItems(menu, ['-', 'findReplace', 'outline',
+ ui.menus.addMenuItems(menu, ['-', 'findReplace',
'layers', 'tags', '-', 'pageSetup'], parent);
// Cannot use print in standalone mode on iOS as we cannot open new windows
@@ -2089,7 +2088,16 @@ EditorUi.initMinimalTheme = function()
previousParent.appendChild(ui.titlebar);
}
+ // Adds outline option to zoom menu
var viewZoomMenu = ui.menus.get('viewZoom');
+ var viewZoomMenuFunct = viewZoomMenu.funct;
+
+ viewZoomMenu.funct = function(menu, parent)
+ {
+ viewZoomMenuFunct.apply(this, arguments);
+ ui.menus.addMenuItems(menu, ['-', 'outline'], parent);
+ };
+
var insertImage = (urlParams['sketch'] != '1') ? Editor.plusImage : Editor.shapesImage;
var footer = (urlParams['sketch'] == '1') ? document.createElement('div') : null;
var picker = (urlParams['sketch'] == '1') ? document.createElement('div') : null;
diff --git a/src/main/webapp/js/diagramly/Pages.js b/src/main/webapp/js/diagramly/Pages.js
index 9a10bd3e..0ca9afb9 100644
--- a/src/main/webapp/js/diagramly/Pages.js
+++ b/src/main/webapp/js/diagramly/Pages.js
@@ -1324,7 +1324,7 @@ EditorUi.prototype.updateTabContainer = function()
var btnWidth = (this.editor.isChromelessView()) ? 29 : 59;
var tabWidth = Math.min(140, Math.max(20, (this.tabContainer.clientWidth - btnWidth) / this.pages.length) + 1);
var startIndex = null;
-
+
for (var i = 0; i < this.pages.length; i++)
{
// Install drag and drop for page reorder
@@ -1917,7 +1917,7 @@ EditorUi.prototype.createPageMenu = function(page, label)
{
var editorUiRefresh = EditorUi.prototype.refresh;
- EditorUi.prototype.refresh = function(sizeDidChange)
+ EditorUi.prototype.refresh = function()
{
editorUiRefresh.apply(this, arguments);
this.updateTabContainer();
diff --git a/src/main/webapp/js/grapheditor/Dialogs.js b/src/main/webapp/js/grapheditor/Dialogs.js
index 4c149155..0bd56633 100644
--- a/src/main/webapp/js/grapheditor/Dialogs.js
+++ b/src/main/webapp/js/grapheditor/Dialogs.js
@@ -1975,38 +1975,12 @@ var OutlineWindow = function(editorUi, x, y, w, h)
this.window.setClosable(true);
this.window.setVisible(true);
- this.window.setLocation = function(x, y)
- {
- var iw = window.innerWidth || document.body.clientWidth || document.documentElement.clientWidth;
- var ih = window.innerHeight || document.body.clientHeight || document.documentElement.clientHeight;
-
- x = Math.max(0, Math.min(x, iw - this.table.clientWidth));
- y = Math.max(0, Math.min(y, ih - this.table.clientHeight - ((urlParams['sketch'] == '1') ? 3 : 48)));
-
- if (this.getX() != x || this.getY() != y)
- {
- mxWindow.prototype.setLocation.apply(this, arguments);
- }
- };
-
- var resizeListener = mxUtils.bind(this, function()
- {
- var x = this.window.getX();
- var y = this.window.getY();
-
- this.window.setLocation(x, y);
- });
-
- mxEvent.addListener(window, 'resize', resizeListener);
-
var outline = editorUi.createOutline(this.window);
- this.destroy = function()
+ editorUi.installResizeHandler(this, true, function()
{
- mxEvent.removeListener(window, 'resize', resizeListener);
- this.window.destroy();
outline.destroy();
- }
+ });
this.window.addListener(mxEvent.SHOW, mxUtils.bind(this, function()
{
@@ -2030,10 +2004,7 @@ var OutlineWindow = function(editorUi, x, y, w, h)
}));
outline.init(div);
-
- var zoomInAction = editorUi.actions.get('zoomIn');
- var zoomOutAction = editorUi.actions.get('zoomOut');
-
+
mxEvent.addMouseWheelListener(function(evt, up)
{
var outlineWheel = false;
@@ -2716,34 +2687,5 @@ var LayersWindow = function(editorUi, x, y, w, h)
// Make refresh available via instance
this.refreshLayers = refresh;
-
- this.window.setLocation = function(x, y)
- {
- var iw = window.innerWidth || document.body.clientWidth || document.documentElement.clientWidth;
- var ih = window.innerHeight || document.body.clientHeight || document.documentElement.clientHeight;
-
- x = Math.max(0, Math.min(x, iw - this.table.clientWidth));
- y = Math.max(0, Math.min(y, ih - this.table.clientHeight - ((urlParams['sketch'] == '1') ? 3 : 48)));
-
- if (this.getX() != x || this.getY() != y)
- {
- mxWindow.prototype.setLocation.apply(this, arguments);
- }
- };
-
- var resizeListener = mxUtils.bind(this, function()
- {
- var x = this.window.getX();
- var y = this.window.getY();
-
- this.window.setLocation(x, y);
- });
-
- mxEvent.addListener(window, 'resize', resizeListener);
-
- this.destroy = function()
- {
- mxEvent.removeListener(window, 'resize', resizeListener);
- this.window.destroy();
- }
+ editorUi.installResizeHandler(this, true);
};
diff --git a/src/main/webapp/js/grapheditor/EditorUi.js b/src/main/webapp/js/grapheditor/EditorUi.js
index c76ee0bd..91e06d29 100644
--- a/src/main/webapp/js/grapheditor/EditorUi.js
+++ b/src/main/webapp/js/grapheditor/EditorUi.js
@@ -3874,6 +3874,71 @@ EditorUi.prototype.setPageVisible = function(value)
};
/**
+ * Loads the stylesheet for this graph.
+ */
+EditorUi.prototype.installResizeHandler = function(dialog, resizable, destroy)
+{
+ if (resizable)
+ {
+ dialog.window.setSize = function(w, h)
+ {
+ if (!this.minimized)
+ {
+ var iw = window.innerWidth || document.body.clientWidth || document.documentElement.clientWidth;
+ var ih = window.innerHeight || document.body.clientHeight || document.documentElement.clientHeight;
+ w = Math.min(w, iw - this.getX());
+ h = Math.min(h, ih - this.getY());
+ }
+
+ mxWindow.prototype.setSize.apply(this, arguments);
+ };
+ }
+
+ dialog.window.setLocation = function(x, y)
+ {
+ var iw = window.innerWidth || document.body.clientWidth || document.documentElement.clientWidth;
+ var ih = window.innerHeight || document.body.clientHeight || document.documentElement.clientHeight;
+
+ var w = parseInt(this.div.style.width);
+ var h = parseInt(this.div.style.height);
+
+ x = Math.max(0, Math.min(x, iw - w));
+ y = Math.max(0, Math.min(y, ih - h));
+
+ if (this.getX() != x || this.getY() != y)
+ {
+ mxWindow.prototype.setLocation.apply(this, arguments);
+ }
+
+ if (resizable && !this.minimized)
+ {
+ this.setSize(w, h);
+ }
+ };
+
+ var resizeListener = mxUtils.bind(this, function()
+ {
+ var x = dialog.window.getX();
+ var y = dialog.window.getY();
+
+ dialog.window.setLocation(x, y);
+ });
+
+ mxEvent.addListener(window, 'resize', resizeListener);
+
+ dialog.destroy = function()
+ {
+ mxEvent.removeListener(window, 'resize', resizeListener);
+ dialog.window.destroy();
+
+ if (destroy != null)
+ {
+ destroy();
+ }
+ }
+};
+
+/**
* Class: ChangeGridColor
*
* Undoable change to grid color.
@@ -4304,7 +4369,7 @@ EditorUi.prototype.refresh = function(sizeDidChange)
if (this.tabContainer != null)
{
this.tabContainer.style.bottom = (this.footerHeight + off) + 'px';
- this.tabContainer.style.right = this.diagramContainer.style.right;
+ this.tabContainer.style.right = fw + 'px';
th = this.tabContainer.clientHeight;
}
diff --git a/src/main/webapp/js/integrate.min.js b/src/main/webapp/js/integrate.min.js
index 9f76d658..cc35be2f 100644
--- a/src/main/webapp/js/integrate.min.js
+++ b/src/main/webapp/js/integrate.min.js
@@ -457,8 +457,8 @@ window.DRAWIO_GITHUB_ID=window.DRAWIO_GITHUB_ID||"Iv1.98d62f0431e40543";window.D
window.RT_WEBSOCKET_URL=window.RT_WEBSOCKET_URL||"wss://"+("test.draw.io"==window.location.hostname?"app.diagrams.net":window.location.hostname)+"/rt";window.SHAPES_PATH=window.SHAPES_PATH||"shapes";window.GRAPH_IMAGE_PATH=window.GRAPH_IMAGE_PATH||"img";window.ICONSEARCH_PATH=window.ICONSEARCH_PATH||((null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE")||urlParams.dev)&&"file:"!=window.location.protocol?"iconSearch":window.DRAWIO_BASE_URL+"/iconSearch");
window.TEMPLATE_PATH=window.TEMPLATE_PATH||"templates";window.NEW_DIAGRAM_CATS_PATH=window.NEW_DIAGRAM_CATS_PATH||"newDiagramCats";window.PLUGINS_BASE_PATH=window.PLUGINS_BASE_PATH||"";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||RESOURCES_PATH+"/dia";window.DRAWIO_CONFIG=window.DRAWIO_CONFIG||null;window.mxLoadResources=window.mxLoadResources||!1;
window.mxLanguage=window.mxLanguage||function(){var a=urlParams.lang;if(null==a&&"undefined"!=typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).language||null);if(!a&&window.mxIsElectron&&(a=urlParams.appLang,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.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",lt:"Lietuvių",lv:"Latviešu",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)}
"1"==urlParams.extAuth&&/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent)&&(urlParams.gapi="0",urlParams.noDevice="1","1"!=urlParams.lightbox&&(urlParams.lightbox="1",urlParams.layers="1",urlParams.viewerOnlyMsg="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");function setCurrentXml(a,b){null!=window.parent&&null!=window.parent.openFile&&window.parent.openFile.setData(a,b)}
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");
@@ -469,7 +469,7 @@ if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==url
"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");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,ADD_ATTR:["target","content"]};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:"20.0.2",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.0.3",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)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints,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]"!==
@@ -2296,8 +2296,8 @@ H);this.exportColor(G)};this.fromRGB=function(y,F,H,G){0>y&&(y=0);1<y&&(y=1);0>F
function(y,F){return(y=y.match(/^\W*([0-9A-F]{3}([0-9A-F]{3})?)\W*$/i))?(6===y[1].length?this.fromRGB(parseInt(y[1].substr(0,2),16)/255,parseInt(y[1].substr(2,2),16)/255,parseInt(y[1].substr(4,2),16)/255,F):this.fromRGB(parseInt(y[1].charAt(0)+y[1].charAt(0),16)/255,parseInt(y[1].charAt(1)+y[1].charAt(1),16)/255,parseInt(y[1].charAt(2)+y[1].charAt(2),16)/255,F),!0):!1};this.toString=function(){return(256|Math.round(255*this.rgb[0])).toString(16).substr(1)+(256|Math.round(255*this.rgb[1])).toString(16).substr(1)+
(256|Math.round(255*this.rgb[2])).toString(16).substr(1)};var q=this,t="hvs"===this.pickerMode.toLowerCase()?1:0,u=mxJSColor.fetchElement(this.valueElement),x=mxJSColor.fetchElement(this.styleElement),A=!1,E=!1,C=1,D=2,B=4,v=8;u&&(b=function(){q.fromString(u.value,C);p()},mxJSColor.addEvent(u,"keyup",b),mxJSColor.addEvent(u,"input",b),mxJSColor.addEvent(u,"blur",l),u.setAttribute("autocomplete","off"));x&&(x.jscStyle={backgroundImage:x.style.backgroundImage,backgroundColor:x.style.backgroundColor,
color:x.style.color});switch(t){case 0:mxJSColor.requireImage("hs.png");break;case 1:mxJSColor.requireImage("hv.png")}this.importColor()}};mxJSColor.install();
-Editor=function(a,b,f,d,g){mxEventSource.call(this);this.chromeless=null!=a?a:this.chromeless;this.initStencilRegistry();this.graph=d||this.createGraph(b,f);this.editable=null!=g?g:!a;this.undoManager=this.createUndoManager();this.status="";this.getOrCreateFilename=function(){return this.filename||mxResources.get("drawing",[Editor.pageCounter])+".xml"};this.getFilename=function(){return this.filename};this.setStatus=function(e){this.status=e;this.fireEvent(new mxEventObject("statusChanged"))};this.getStatus=
-function(){return this.status};this.graphChangeListener=function(e,k){e=null!=k?k.getProperty("edit"):null;null!=e&&e.ignoreEdit||this.setModified(!0)};this.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.graphChangeListener.apply(this,arguments)}));this.graph.resetViewOnRootChange=!1;this.init()};Editor.pageCounter=0;
+Editor=function(a,b,f,e,g){mxEventSource.call(this);this.chromeless=null!=a?a:this.chromeless;this.initStencilRegistry();this.graph=e||this.createGraph(b,f);this.editable=null!=g?g:!a;this.undoManager=this.createUndoManager();this.status="";this.getOrCreateFilename=function(){return this.filename||mxResources.get("drawing",[Editor.pageCounter])+".xml"};this.getFilename=function(){return this.filename};this.setStatus=function(d){this.status=d;this.fireEvent(new mxEventObject("statusChanged"))};this.getStatus=
+function(){return this.status};this.graphChangeListener=function(d,k){d=null!=k?k.getProperty("edit"):null;null!=d&&d.ignoreEdit||this.setModified(!0)};this.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.graphChangeListener.apply(this,arguments)}));this.graph.resetViewOnRootChange=!1;this.init()};Editor.pageCounter=0;
(function(){try{for(var a=window;null!=a.opener&&"undefined"!==typeof a.opener.Editor&&!isNaN(a.opener.Editor.pageCounter)&&a.opener!=a;)a=a.opener;null!=a&&(a.Editor.pageCounter++,Editor.pageCounter=a.Editor.pageCounter)}catch(b){}})();Editor.defaultHtmlFont='-apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", system-ui, ui-sans-serif, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"';Editor.useLocalStorage="undefined"!=typeof Storage&&mxClient.IS_IOS;
Editor.rowMoveImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAEBAMAAACw6DhOAAAAGFBMVEUzMzP///9tbW1QUFCKiopBQUF8fHxfX1/IXlmXAAAAFElEQVQImWNgNVdzYBAUFBRggLMAEzYBy29kEPgAAAAASUVORK5CYII=":IMAGE_PATH+"/thumb_horz.png";
Editor.lightCheckmarkImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhFQAVAMQfAGxsbHx8fIqKioaGhvb29nJycvr6+sDAwJqamltbW5OTk+np6YGBgeTk5Ly8vJiYmP39/fLy8qWlpa6ursjIyOLi4vj4+N/f3+3t7fT09LCwsHZ2dubm5r6+vmZmZv///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OEY4NTZERTQ5QUFBMTFFMUE5MTVDOTM5MUZGMTE3M0QiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OEY4NTZERTU5QUFBMTFFMUE5MTVDOTM5MUZGMTE3M0QiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4Rjg1NkRFMjlBQUExMUUxQTkxNUM5MzkxRkYxMTczRCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4Rjg1NkRFMzlBQUExMUUxQTkxNUM5MzkxRkYxMTczRCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAB8ALAAAAAAVABUAAAVI4CeOZGmeaKqubKtylktSgCOLRyLd3+QJEJnh4VHcMoOfYQXQLBcBD4PA6ngGlIInEHEhPOANRkaIFhq8SuHCE1Hb8Lh8LgsBADs=":IMAGE_PATH+
@@ -2330,12 +2330,12 @@ Editor.outlineImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53M
Editor.saveImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE5IDEydjdINXYtN0gzdjdjMCAxLjEuOSAyIDIgMmgxNGMxLjEgMCAyLS45IDItMnYtN2gtMnptLTYgLjY3bDIuNTktMi41OEwxNyAxMS41bC01IDUtNS01IDEuNDEtMS40MUwxMSAxMi42N1YzaDJ2OS42N3oiLz48L3N2Zz4=";
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:"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.lightColor="#f0f0f0";Editor.isPngDataUrl=function(a){return null!=a&&"data:image/png;"==a.substring(0,15)};Editor.isPngData=function(a){return 8<a.length&&137==a.charCodeAt(0)&&80==a.charCodeAt(1)&&78==a.charCodeAt(2)&&71==a.charCodeAt(3)&&13==a.charCodeAt(4)&&10==a.charCodeAt(5)&&26==a.charCodeAt(6)&&10==a.charCodeAt(7)};
-Editor.extractGraphModelFromPng=function(a){var b=null;try{var f=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(g,e,k){g=d.substring(g+8,g+8+k);"zTXt"==e?(k=g.indexOf(String.fromCharCode(0)),"mxGraphModel"==g.substring(0,k)&&(g=pako.inflateRaw(Graph.stringToArrayBuffer(g.substring(k+2)),{to:"string"}).replace(/\+/g," "),null!=g&&0<g.length&&(b=g))):"tEXt"==e&&(g=g.split(String.fromCharCode(0)),1<g.length&&("mxGraphModel"==
-g[0]||"mxfile"==g[0])&&(b=g[1]));if(null!=b||"IDAT"==e)return!0}))}catch(g){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};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.extractGraphModelFromPng=function(a){var b=null;try{var f=a.substring(a.indexOf(",")+1),e=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0);EditorUi.parsePng(e,mxUtils.bind(this,function(g,d,k){g=e.substring(g+8,g+8+k);"zTXt"==d?(k=g.indexOf(String.fromCharCode(0)),"mxGraphModel"==g.substring(0,k)&&(g=pako.inflateRaw(Graph.stringToArrayBuffer(g.substring(k+2)),{to:"string"}).replace(/\+/g," "),null!=g&&0<g.length&&(b=g))):"tEXt"==d&&(g=g.split(String.fromCharCode(0)),1<g.length&&("mxGraphModel"==
+g[0]||"mxfile"==g[0])&&(b=g[1]));if(null!=b||"IDAT"==d)return!0}))}catch(g){}null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};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){b=null!=b?"?title="+encodeURIComponent(b):"";null!=urlParams.ui&&(b+=(0<b.length?"&":"?")+"ui="+urlParams.ui);if("undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var f=null,d=mxUtils.bind(this,function(g){"ready"==g.data&&g.source==f&&(mxEvent.removeListener(window,"message",d),f.postMessage(a,"*"))});mxEvent.addListener(window,"message",d);f=this.graph.openLink(this.getEditBlankUrl(b+(0<b.length?"&":"?")+"client=1"),
-null,!0)}else this.graph.openLink(this.getEditBlankUrl(b)+"#R"+encodeURIComponent(a))};Editor.prototype.createGraph=function(a,b){a=new Graph(null,b,null,null,a);a.transparentBackground=!1;var f=a.isCssTransformsSupported,d=this;a.isCssTransformsSupported=function(){return f.apply(this,arguments)&&(!d.chromeless||!mxClient.IS_SF)};this.chromeless||(a.isBlankLink=function(g){return!this.isExternalProtocol(g)});return a};
+Editor.prototype.editAsNew=function(a,b){b=null!=b?"?title="+encodeURIComponent(b):"";null!=urlParams.ui&&(b+=(0<b.length?"&":"?")+"ui="+urlParams.ui);if("undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)){var f=null,e=mxUtils.bind(this,function(g){"ready"==g.data&&g.source==f&&(mxEvent.removeListener(window,"message",e),f.postMessage(a,"*"))});mxEvent.addListener(window,"message",e);f=this.graph.openLink(this.getEditBlankUrl(b+(0<b.length?"&":"?")+"client=1"),
+null,!0)}else this.graph.openLink(this.getEditBlankUrl(b)+"#R"+encodeURIComponent(a))};Editor.prototype.createGraph=function(a,b){a=new Graph(null,b,null,null,a);a.transparentBackground=!1;var f=a.isCssTransformsSupported,e=this;a.isCssTransformsSupported=function(){return f.apply(this,arguments)&&(!e.chromeless||!mxClient.IS_SF)};this.chromeless||(a.isBlankLink=function(g){return!this.isExternalProtocol(g)});return a};
Editor.prototype.resetGraph=function(){this.graph.gridEnabled=this.graph.defaultGridEnabled&&(!this.isChromelessView()||"1"==urlParams.grid);this.graph.graphHandler.guidesEnabled=!0;this.graph.setTooltips(!0);this.graph.setConnectable(!0);this.graph.foldingEnabled=!0;this.graph.scrollbars=this.graph.defaultScrollbars;this.graph.pageVisible=this.graph.defaultPageVisible;this.graph.pageBreaksVisible=this.graph.pageVisible;this.graph.preferPageSize=this.graph.pageBreaksVisible;this.graph.background=
null;this.graph.pageScale=mxGraph.prototype.pageScale;this.graph.pageFormat=mxGraph.prototype.pageFormat;this.graph.currentScale=1;this.graph.currentTranslate.x=0;this.graph.currentTranslate.y=0;this.updateGraphComponents();this.graph.view.setScale(1)};
Editor.prototype.readGraphState=function(a){var b=a.getAttribute("grid");if(null==b||""==b)b=this.graph.defaultGridEnabled?"1":"0";this.graph.gridEnabled="0"!=b&&(!this.isChromelessView()||"1"==urlParams.grid);this.graph.gridSize=parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize;this.graph.graphHandler.guidesEnabled="0"!=a.getAttribute("guides");this.graph.setTooltips("0"!=a.getAttribute("tooltips"));this.graph.setConnectable("0"!=a.getAttribute("connect"));this.graph.connectionArrowsEnabled=
@@ -2347,62 +2347,62 @@ Editor.prototype.getGraphXml=function(a){a=(null!=a?a:1)?(new mxCodec(mxUtils.cr
this.graph.gridSize);a.setAttribute("guides",this.graph.graphHandler.guidesEnabled?"1":"0");a.setAttribute("tooltips",this.graph.tooltipHandler.isEnabled()?"1":"0");a.setAttribute("connect",this.graph.connectionHandler.isEnabled()?"1":"0");a.setAttribute("arrows",this.graph.connectionArrowsEnabled?"1":"0");a.setAttribute("fold",this.graph.foldingEnabled?"1":"0");a.setAttribute("page",this.graph.pageVisible?"1":"0");a.setAttribute("pageScale",this.graph.pageScale);a.setAttribute("pageWidth",this.graph.pageFormat.width);
a.setAttribute("pageHeight",this.graph.pageFormat.height);null!=this.graph.background&&a.setAttribute("background",this.graph.background);return a};Editor.prototype.updateGraphComponents=function(){var a=this.graph;null!=a.container&&(a.view.validateBackground(),a.container.style.overflow=a.scrollbars?"auto":this.defaultGraphOverflow,this.fireEvent(new mxEventObject("updateGraphComponents")))};Editor.prototype.setModified=function(a){this.modified=a};
Editor.prototype.setFilename=function(a){this.filename=a};
-Editor.prototype.createUndoManager=function(){var a=this.graph,b=new mxUndoManager;this.undoListener=function(d,g){b.undoableEditHappened(g.getProperty("edit"))};var f=mxUtils.bind(this,function(d,g){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,f);a.getView().addListener(mxEvent.UNDO,f);f=function(d,g){d=a.getSelectionCellsForChanges(g.getProperty("edit").changes,function(k){return!(k instanceof mxChildChange)});if(0<d.length){a.getModel();g=[];for(var e=0;e<d.length;e++)null!=
-a.view.getState(d[e])&&g.push(d[e]);a.setSelectionCells(g)}};b.addListener(mxEvent.UNDO,f);b.addListener(mxEvent.REDO,f);return b};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};
+Editor.prototype.createUndoManager=function(){var a=this.graph,b=new mxUndoManager;this.undoListener=function(e,g){b.undoableEditHappened(g.getProperty("edit"))};var f=mxUtils.bind(this,function(e,g){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,f);a.getView().addListener(mxEvent.UNDO,f);f=function(e,g){e=a.getSelectionCellsForChanges(g.getProperty("edit").changes,function(k){return!(k instanceof mxChildChange)});if(0<e.length){a.getModel();g=[];for(var d=0;d<e.length;d++)null!=
+a.view.getState(e[d])&&g.push(e[d]);a.setSelectionCells(g)}};b.addListener(mxEvent.UNDO,f);b.addListener(mxEvent.REDO,f);return b};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};
OpenFile.prototype.error=function(a){this.cancel(!0);mxUtils.alert(a)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(a){null!=this.done&&this.done(null!=a?a:!0)};
-function Dialog(a,b,f,d,g,e,k,n,u,m,r){var x=u?57:0,B=f,C=d,G=u?0:64,J=Editor.inlineFullscreen||null==a.embedViewport?mxUtils.getDocumentSize():mxUtils.clone(a.embedViewport);null==a.embedViewport&&null!=window.innerHeight&&(J.height=window.innerHeight);var D=J.height,N=Math.max(1,Math.round((J.width-f-G)/2)),Q=Math.max(1,Math.round((D-d-a.footerHeight)/3));b.style.maxHeight="100%";f=null!=document.body?Math.min(f,document.body.scrollWidth-G):f;d=Math.min(d,D-G);0<a.dialogs.length&&(this.zIndex+=
-2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=D+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));J=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=J.x+"px";this.bg.style.top=J.y+"px";N+=J.x;Q+=J.y;Editor.inlineFullscreen||null==a.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px",
-Q+=a.embedViewport.y,N+=a.embedViewport.x);g&&document.body.appendChild(this.bg);var R=a.createDiv(u?"geTransDialog":"geDialog");g=this.getPosition(N,Q,f,d);N=g.x;Q=g.y;R.style.width=f+"px";R.style.height=d+"px";R.style.left=N+"px";R.style.top=Q+"px";R.style.zIndex=this.zIndex;R.appendChild(b);document.body.appendChild(R);!n&&b.clientHeight>R.clientHeight-G&&(b.style.overflowY="auto");b.style.overflowX="hidden";if(e&&(e=document.createElement("img"),e.setAttribute("src",Dialog.prototype.closeImage),
-e.setAttribute("title",mxResources.get("close")),e.className="geDialogClose",e.style.top=Q+14+"px",e.style.left=N+f+38-x+"px",e.style.zIndex=this.zIndex,mxEvent.addListener(e,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(e),this.dialogImg=e,!r)){var P=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(Z){P=!0}),null,mxUtils.bind(this,function(Z){P&&(a.hideDialog(!0),P=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=m){var Z=m();
-null!=Z&&(B=f=Z.w,C=d=Z.h)}Z=mxUtils.getDocumentSize();D=Z.height;this.bg.style.height=D+"px";Editor.inlineFullscreen||null==a.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");N=Math.max(1,Math.round((Z.width-f-G)/2));Q=Math.max(1,Math.round((D-d-a.footerHeight)/3));f=null!=document.body?Math.min(B,document.body.scrollWidth-G):B;d=Math.min(C,D-G);Z=this.getPosition(N,Q,f,d);N=Z.x;Q=Z.y;R.style.left=N+"px";R.style.top=Q+"px";R.style.width=f+"px";R.style.height=d+"px";!n&&
-b.clientHeight>R.clientHeight-G&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=Q+14+"px",this.dialogImg.style.left=N+f+38-x+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=k;this.container=R;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
+function Dialog(a,b,f,e,g,d,k,n,u,m,r){var x=u?57:0,B=f,C=e,F=u?0:64,J=Editor.inlineFullscreen||null==a.embedViewport?mxUtils.getDocumentSize():mxUtils.clone(a.embedViewport);null==a.embedViewport&&null!=window.innerHeight&&(J.height=window.innerHeight);var D=J.height,N=Math.max(1,Math.round((J.width-f-F)/2)),S=Math.max(1,Math.round((D-e-a.footerHeight)/3));b.style.maxHeight="100%";f=null!=document.body?Math.min(f,document.body.scrollWidth-F):f;e=Math.min(e,D-F);0<a.dialogs.length&&(this.zIndex+=
+2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=D+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));J=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=J.x+"px";this.bg.style.top=J.y+"px";N+=J.x;S+=J.y;Editor.inlineFullscreen||null==a.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px",
+S+=a.embedViewport.y,N+=a.embedViewport.x);g&&document.body.appendChild(this.bg);var T=a.createDiv(u?"geTransDialog":"geDialog");g=this.getPosition(N,S,f,e);N=g.x;S=g.y;T.style.width=f+"px";T.style.height=e+"px";T.style.left=N+"px";T.style.top=S+"px";T.style.zIndex=this.zIndex;T.appendChild(b);document.body.appendChild(T);!n&&b.clientHeight>T.clientHeight-F&&(b.style.overflowY="auto");b.style.overflowX="hidden";if(d&&(d=document.createElement("img"),d.setAttribute("src",Dialog.prototype.closeImage),
+d.setAttribute("title",mxResources.get("close")),d.className="geDialogClose",d.style.top=S+14+"px",d.style.left=N+f+38-x+"px",d.style.zIndex=this.zIndex,mxEvent.addListener(d,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(d),this.dialogImg=d,!r)){var P=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(Z){P=!0}),null,mxUtils.bind(this,function(Z){P&&(a.hideDialog(!0),P=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=m){var Z=m();
+null!=Z&&(B=f=Z.w,C=e=Z.h)}Z=mxUtils.getDocumentSize();D=Z.height;this.bg.style.height=D+"px";Editor.inlineFullscreen||null==a.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");N=Math.max(1,Math.round((Z.width-f-F)/2));S=Math.max(1,Math.round((D-e-a.footerHeight)/3));f=null!=document.body?Math.min(B,document.body.scrollWidth-F):B;e=Math.min(C,D-F);Z=this.getPosition(N,S,f,e);N=Z.x;S=Z.y;T.style.left=N+"px";T.style.top=S+"px";T.style.width=f+"px";T.style.height=e+"px";!n&&
+b.clientHeight>T.clientHeight-F&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=S+14+"px",this.dialogImg.style.left=N+f+38-x+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=k;this.container=T;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":IMAGE_PATH+
"/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png";
Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==":IMAGE_PATH+
"/clear.gif";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(a,b){return new mxPoint(a,b)};Dialog.prototype.close=function(a,b){if(null!=this.onDialogClose){if(0==this.onDialogClose(a,b))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)};
-var ErrorDialog=function(a,b,f,d,g,e,k,n,u,m,r){u=null!=u?u:!0;var x=document.createElement("div");x.style.textAlign="center";if(null!=b){var B=document.createElement("div");B.style.padding="0px";B.style.margin="0px";B.style.fontSize="18px";B.style.paddingBottom="16px";B.style.marginBottom="10px";B.style.borderBottom="1px solid #c0c0c0";B.style.color="gray";B.style.whiteSpace="nowrap";B.style.textOverflow="ellipsis";B.style.overflow="hidden";mxUtils.write(B,b);B.setAttribute("title",b);x.appendChild(B)}b=
-document.createElement("div");b.style.lineHeight="1.2em";b.style.padding="6px";b.innerHTML=f;x.appendChild(b);f=document.createElement("div");f.style.marginTop="12px";f.style.textAlign="center";null!=e&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();e()}),b.className="geBtn",f.appendChild(b),f.style.textAlign="center");null!=m&&(m=mxUtils.button(m,function(){null!=r&&r()}),m.className="geBtn",f.appendChild(m));var C=mxUtils.button(d,function(){u&&a.hideDialog();null!=g&&g()});
-C.className="geBtn";f.appendChild(C);null!=k&&(d=mxUtils.button(k,function(){u&&a.hideDialog();null!=n&&n()}),d.className="geBtn gePrimaryBtn",f.appendChild(d));this.init=function(){C.focus()};x.appendChild(f);this.container=x},PrintDialog=function(a,b){this.create(a,b)};
-PrintDialog.prototype.create=function(a){function b(C){var G=k.checked||m.checked,J=parseInt(x.value)/100;isNaN(J)&&(J=1,x.value="100%");J*=.75;var D=f.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,N=1/f.pageScale;if(G){var Q=k.checked?1:parseInt(r.value);isNaN(Q)||(N=mxUtils.getScaleForPageCount(Q,f,D))}f.getGraphBounds();var R=Q=0;D=mxRectangle.fromRectangle(D);D.width=Math.ceil(D.width*J);D.height=Math.ceil(D.height*J);N*=J;!G&&f.pageVisible?(J=f.getPageLayout(),Q-=J.x*D.width,R-=J.y*D.height):
-G=!0;G=PrintDialog.createPrintPreview(f,N,D,0,Q,R,G);G.open();C&&PrintDialog.printPreview(G)}var f=a.editor.graph,d=document.createElement("table");d.style.width="100%";d.style.height="100%";var g=document.createElement("tbody");var e=document.createElement("tr");var k=document.createElement("input");k.setAttribute("type","checkbox");var n=document.createElement("td");n.setAttribute("colspan","2");n.style.fontSize="10pt";n.appendChild(k);var u=document.createElement("span");mxUtils.write(u," "+mxResources.get("fitPage"));
-n.appendChild(u);mxEvent.addListener(u,"click",function(C){k.checked=!k.checked;m.checked=!k.checked;mxEvent.consume(C)});mxEvent.addListener(k,"change",function(){m.checked=!k.checked});e.appendChild(n);g.appendChild(e);e=e.cloneNode(!1);var m=document.createElement("input");m.setAttribute("type","checkbox");n=document.createElement("td");n.style.fontSize="10pt";n.appendChild(m);u=document.createElement("span");mxUtils.write(u," "+mxResources.get("posterPrint")+":");n.appendChild(u);mxEvent.addListener(u,
-"click",function(C){m.checked=!m.checked;k.checked=!m.checked;mxEvent.consume(C)});e.appendChild(n);var r=document.createElement("input");r.setAttribute("value","1");r.setAttribute("type","number");r.setAttribute("min","1");r.setAttribute("size","4");r.setAttribute("disabled","disabled");r.style.width="50px";n=document.createElement("td");n.style.fontSize="10pt";n.appendChild(r);mxUtils.write(n," "+mxResources.get("pages")+" (max)");e.appendChild(n);g.appendChild(e);mxEvent.addListener(m,"change",
-function(){m.checked?r.removeAttribute("disabled"):r.setAttribute("disabled","disabled");k.checked=!m.checked});e=e.cloneNode(!1);n=document.createElement("td");mxUtils.write(n,mxResources.get("pageScale")+":");e.appendChild(n);n=document.createElement("td");var x=document.createElement("input");x.setAttribute("value","100 %");x.setAttribute("size","5");x.style.width="50px";n.appendChild(x);e.appendChild(n);g.appendChild(e);e=document.createElement("tr");n=document.createElement("td");n.colSpan=2;
+var ErrorDialog=function(a,b,f,e,g,d,k,n,u,m,r){u=null!=u?u:!0;var x=document.createElement("div");x.style.textAlign="center";if(null!=b){var B=document.createElement("div");B.style.padding="0px";B.style.margin="0px";B.style.fontSize="18px";B.style.paddingBottom="16px";B.style.marginBottom="10px";B.style.borderBottom="1px solid #c0c0c0";B.style.color="gray";B.style.whiteSpace="nowrap";B.style.textOverflow="ellipsis";B.style.overflow="hidden";mxUtils.write(B,b);B.setAttribute("title",b);x.appendChild(B)}b=
+document.createElement("div");b.style.lineHeight="1.2em";b.style.padding="6px";b.innerHTML=f;x.appendChild(b);f=document.createElement("div");f.style.marginTop="12px";f.style.textAlign="center";null!=d&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();d()}),b.className="geBtn",f.appendChild(b),f.style.textAlign="center");null!=m&&(m=mxUtils.button(m,function(){null!=r&&r()}),m.className="geBtn",f.appendChild(m));var C=mxUtils.button(e,function(){u&&a.hideDialog();null!=g&&g()});
+C.className="geBtn";f.appendChild(C);null!=k&&(e=mxUtils.button(k,function(){u&&a.hideDialog();null!=n&&n()}),e.className="geBtn gePrimaryBtn",f.appendChild(e));this.init=function(){C.focus()};x.appendChild(f);this.container=x},PrintDialog=function(a,b){this.create(a,b)};
+PrintDialog.prototype.create=function(a){function b(C){var F=k.checked||m.checked,J=parseInt(x.value)/100;isNaN(J)&&(J=1,x.value="100%");J*=.75;var D=f.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,N=1/f.pageScale;if(F){var S=k.checked?1:parseInt(r.value);isNaN(S)||(N=mxUtils.getScaleForPageCount(S,f,D))}f.getGraphBounds();var T=S=0;D=mxRectangle.fromRectangle(D);D.width=Math.ceil(D.width*J);D.height=Math.ceil(D.height*J);N*=J;!F&&f.pageVisible?(J=f.getPageLayout(),S-=J.x*D.width,T-=J.y*D.height):
+F=!0;F=PrintDialog.createPrintPreview(f,N,D,0,S,T,F);F.open();C&&PrintDialog.printPreview(F)}var f=a.editor.graph,e=document.createElement("table");e.style.width="100%";e.style.height="100%";var g=document.createElement("tbody");var d=document.createElement("tr");var k=document.createElement("input");k.setAttribute("type","checkbox");var n=document.createElement("td");n.setAttribute("colspan","2");n.style.fontSize="10pt";n.appendChild(k);var u=document.createElement("span");mxUtils.write(u," "+mxResources.get("fitPage"));
+n.appendChild(u);mxEvent.addListener(u,"click",function(C){k.checked=!k.checked;m.checked=!k.checked;mxEvent.consume(C)});mxEvent.addListener(k,"change",function(){m.checked=!k.checked});d.appendChild(n);g.appendChild(d);d=d.cloneNode(!1);var m=document.createElement("input");m.setAttribute("type","checkbox");n=document.createElement("td");n.style.fontSize="10pt";n.appendChild(m);u=document.createElement("span");mxUtils.write(u," "+mxResources.get("posterPrint")+":");n.appendChild(u);mxEvent.addListener(u,
+"click",function(C){m.checked=!m.checked;k.checked=!m.checked;mxEvent.consume(C)});d.appendChild(n);var r=document.createElement("input");r.setAttribute("value","1");r.setAttribute("type","number");r.setAttribute("min","1");r.setAttribute("size","4");r.setAttribute("disabled","disabled");r.style.width="50px";n=document.createElement("td");n.style.fontSize="10pt";n.appendChild(r);mxUtils.write(n," "+mxResources.get("pages")+" (max)");d.appendChild(n);g.appendChild(d);mxEvent.addListener(m,"change",
+function(){m.checked?r.removeAttribute("disabled"):r.setAttribute("disabled","disabled");k.checked=!m.checked});d=d.cloneNode(!1);n=document.createElement("td");mxUtils.write(n,mxResources.get("pageScale")+":");d.appendChild(n);n=document.createElement("td");var x=document.createElement("input");x.setAttribute("value","100 %");x.setAttribute("size","5");x.style.width="50px";n.appendChild(x);d.appendChild(n);g.appendChild(d);d=document.createElement("tr");n=document.createElement("td");n.colSpan=2;
n.style.paddingTop="20px";n.setAttribute("align","right");u=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});u.className="geBtn";a.editor.cancelFirst&&n.appendChild(u);if(PrintDialog.previewEnabled){var B=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});B.className="geBtn";n.appendChild(B)}B=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});B.className="geBtn gePrimaryBtn";n.appendChild(B);a.editor.cancelFirst||
-n.appendChild(u);e.appendChild(n);g.appendChild(e);d.appendChild(g);this.container=d};PrintDialog.printPreview=function(a){try{if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}}catch(f){}};
-PrintDialog.createPrintPreview=function(a,b,f,d,g,e,k){b=new mxPrintPreview(a,b,f,d,g,e);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=k;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var n=b.writeHead;b.writeHead=function(u){n.apply(this,arguments);u.writeln('<style type="text/css">');u.writeln("@media screen {");u.writeln(" body > div { padding:30px;box-sizing:content-box; }");u.writeln("}");u.writeln("</style>")};return b};
+n.appendChild(u);d.appendChild(n);g.appendChild(d);e.appendChild(g);this.container=e};PrintDialog.printPreview=function(a){try{if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}}catch(f){}};
+PrintDialog.createPrintPreview=function(a,b,f,e,g,d,k){b=new mxPrintPreview(a,b,f,e,g,d);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=k;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var n=b.writeHead;b.writeHead=function(u){n.apply(this,arguments);u.writeln('<style type="text/css">');u.writeln("@media screen {");u.writeln(" body > div { padding:30px;box-sizing:content-box; }");u.writeln("}");u.writeln("</style>")};return b};
PrintDialog.previewEnabled=!0;
-var PageSetupDialog=function(a){function b(){null==r||r==mxConstants.NONE?(m.style.backgroundColor="",m.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(m.style.backgroundColor=r,m.style.backgroundImage="")}function f(){var D=G;null!=D&&Graph.isPageLink(D.src)&&(D=a.createImageForPageLink(D.src,null));null!=D&&null!=D.src?(C.setAttribute("src",D.src),C.style.display=""):(C.removeAttribute("src"),C.style.display="none")}var d=a.editor.graph,g=document.createElement("table");g.style.width=
-"100%";g.style.height="100%";var e=document.createElement("tbody");var k=document.createElement("tr");var n=document.createElement("td");n.style.verticalAlign="top";n.style.fontSize="10pt";mxUtils.write(n,mxResources.get("paperSize")+":");k.appendChild(n);n=document.createElement("td");n.style.verticalAlign="top";n.style.fontSize="10pt";var u=PageSetupDialog.addPageFormatPanel(n,"pagesetupdialog",d.pageFormat);k.appendChild(n);e.appendChild(k);k=document.createElement("tr");n=document.createElement("td");
-mxUtils.write(n,mxResources.get("background")+":");k.appendChild(n);n=document.createElement("td");n.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var m=document.createElement("button");m.style.width="22px";m.style.height="22px";m.style.cursor="pointer";m.style.marginRight="20px";m.style.backgroundPosition="center center";m.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(m.style.position="relative",m.style.top="-6px");var r=d.background;b();mxEvent.addListener(m,
-"click",function(D){a.pickColor(r||"none",function(N){r=N;b()});mxEvent.consume(D)});n.appendChild(m);mxUtils.write(n,mxResources.get("gridSize")+":");var x=document.createElement("input");x.setAttribute("type","number");x.setAttribute("min","0");x.style.width="40px";x.style.marginLeft="6px";x.value=d.getGridSize();n.appendChild(x);mxEvent.addListener(x,"change",function(){var D=parseInt(x.value);x.value=Math.max(1,isNaN(D)?d.getGridSize():D)});k.appendChild(n);e.appendChild(k);k=document.createElement("tr");
+var PageSetupDialog=function(a){function b(){null==r||r==mxConstants.NONE?(m.style.backgroundColor="",m.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(m.style.backgroundColor=r,m.style.backgroundImage="")}function f(){var D=F;null!=D&&Graph.isPageLink(D.src)&&(D=a.createImageForPageLink(D.src,null));null!=D&&null!=D.src?(C.setAttribute("src",D.src),C.style.display=""):(C.removeAttribute("src"),C.style.display="none")}var e=a.editor.graph,g=document.createElement("table");g.style.width=
+"100%";g.style.height="100%";var d=document.createElement("tbody");var k=document.createElement("tr");var n=document.createElement("td");n.style.verticalAlign="top";n.style.fontSize="10pt";mxUtils.write(n,mxResources.get("paperSize")+":");k.appendChild(n);n=document.createElement("td");n.style.verticalAlign="top";n.style.fontSize="10pt";var u=PageSetupDialog.addPageFormatPanel(n,"pagesetupdialog",e.pageFormat);k.appendChild(n);d.appendChild(k);k=document.createElement("tr");n=document.createElement("td");
+mxUtils.write(n,mxResources.get("background")+":");k.appendChild(n);n=document.createElement("td");n.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var m=document.createElement("button");m.style.width="22px";m.style.height="22px";m.style.cursor="pointer";m.style.marginRight="20px";m.style.backgroundPosition="center center";m.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(m.style.position="relative",m.style.top="-6px");var r=e.background;b();mxEvent.addListener(m,
+"click",function(D){a.pickColor(r||"none",function(N){r=N;b()});mxEvent.consume(D)});n.appendChild(m);mxUtils.write(n,mxResources.get("gridSize")+":");var x=document.createElement("input");x.setAttribute("type","number");x.setAttribute("min","0");x.style.width="40px";x.style.marginLeft="6px";x.value=e.getGridSize();n.appendChild(x);mxEvent.addListener(x,"change",function(){var D=parseInt(x.value);x.value=Math.max(1,isNaN(D)?e.getGridSize():D)});k.appendChild(n);d.appendChild(k);k=document.createElement("tr");
n=document.createElement("td");mxUtils.write(n,mxResources.get("image")+":");k.appendChild(n);n=document.createElement("td");var B=document.createElement("button");B.className="geBtn";B.style.margin="0px";mxUtils.write(B,mxResources.get("change")+"...");var C=document.createElement("img");C.setAttribute("valign","middle");C.style.verticalAlign="middle";C.style.border="1px solid lightGray";C.style.borderRadius="4px";C.style.marginRight="14px";C.style.maxWidth="100px";C.style.cursor="pointer";C.style.height=
-"60px";C.style.padding="4px";var G=d.backgroundImage,J=function(D){a.showBackgroundImageDialog(function(N,Q){Q||(G=N,f())},G);mxEvent.consume(D)};mxEvent.addListener(B,"click",J);mxEvent.addListener(C,"click",J);f();n.appendChild(C);n.appendChild(B);k.appendChild(n);e.appendChild(k);k=document.createElement("tr");n=document.createElement("td");n.colSpan=2;n.style.paddingTop="16px";n.setAttribute("align","right");B=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});B.className="geBtn";
-a.editor.cancelFirst&&n.appendChild(B);J=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var D=parseInt(x.value);isNaN(D)||d.gridSize===D||d.setGridSize(D);D=new ChangePageSetup(a,r,G,u.get());D.ignoreColor=d.background==r;D.ignoreImage=(null!=d.backgroundImage?d.backgroundImage.src:null)===(null!=G?G.src:null);d.pageFormat.width==D.previousFormat.width&&d.pageFormat.height==D.previousFormat.height&&D.ignoreColor&&D.ignoreImage||d.model.execute(D)});J.className="geBtn gePrimaryBtn";
-n.appendChild(J);a.editor.cancelFirst||n.appendChild(B);k.appendChild(n);e.appendChild(k);g.appendChild(e);this.container=g};
-PageSetupDialog.addPageFormatPanel=function(a,b,f,d){function g(Z,U,V){if(V||x!=document.activeElement&&B!=document.activeElement){Z=!1;for(U=0;U<G.length;U++)V=G[U],Q?"custom"==V.key&&(n.value=V.key,Q=!1):null!=V.format&&("a4"==V.key?826==f.width?(f=mxRectangle.fromRectangle(f),f.width=827):826==f.height&&(f=mxRectangle.fromRectangle(f),f.height=827):"a5"==V.key&&(584==f.width?(f=mxRectangle.fromRectangle(f),f.width=583):584==f.height&&(f=mxRectangle.fromRectangle(f),f.height=583)),f.width==V.format.width&&
-f.height==V.format.height?(n.value=V.key,e.setAttribute("checked","checked"),e.defaultChecked=!0,e.checked=!0,k.removeAttribute("checked"),k.defaultChecked=!1,k.checked=!1,Z=!0):f.width==V.format.height&&f.height==V.format.width&&(n.value=V.key,e.removeAttribute("checked"),e.defaultChecked=!1,e.checked=!1,k.setAttribute("checked","checked"),k.defaultChecked=!0,Z=k.checked=!0));Z?(u.style.display="",r.style.display="none"):(x.value=f.width/100,B.value=f.height/100,e.setAttribute("checked","checked"),
-n.value="custom",u.style.display="none",r.style.display="")}}b="format-"+b;var e=document.createElement("input");e.setAttribute("name",b);e.setAttribute("type","radio");e.setAttribute("value","portrait");var k=document.createElement("input");k.setAttribute("name",b);k.setAttribute("type","radio");k.setAttribute("value","landscape");var n=document.createElement("select");n.style.marginBottom="8px";n.style.borderRadius="4px";n.style.border="1px solid rgb(160, 160, 160)";n.style.width="206px";var u=
-document.createElement("div");u.style.marginLeft="4px";u.style.width="210px";u.style.height="24px";e.style.marginRight="6px";u.appendChild(e);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));u.appendChild(b);k.style.marginLeft="10px";k.style.marginRight="6px";u.appendChild(k);var m=document.createElement("span");m.style.width="100px";mxUtils.write(m,mxResources.get("landscape"));u.appendChild(m);var r=document.createElement("div");r.style.marginLeft=
-"4px";r.style.width="210px";r.style.height="24px";var x=document.createElement("input");x.setAttribute("size","7");x.style.textAlign="right";r.appendChild(x);mxUtils.write(r," in x ");var B=document.createElement("input");B.setAttribute("size","7");B.style.textAlign="right";r.appendChild(B);mxUtils.write(r," in");u.style.display="none";r.style.display="none";for(var C={},G=PageSetupDialog.getFormats(),J=0;J<G.length;J++){var D=G[J];C[D.key]=D;var N=document.createElement("option");N.setAttribute("value",
-D.key);mxUtils.write(N,D.title);n.appendChild(N)}var Q=!1;g();a.appendChild(n);mxUtils.br(a);a.appendChild(u);a.appendChild(r);var R=f,P=function(Z,U){Z=C[n.value];null!=Z.format?(x.value=Z.format.width/100,B.value=Z.format.height/100,r.style.display="none",u.style.display=""):(u.style.display="none",r.style.display="");Z=parseFloat(x.value);if(isNaN(Z)||0>=Z)x.value=f.width/100;Z=parseFloat(B.value);if(isNaN(Z)||0>=Z)B.value=f.height/100;Z=new mxRectangle(0,0,Math.floor(100*parseFloat(x.value)),
-Math.floor(100*parseFloat(B.value)));"custom"!=n.value&&k.checked&&(Z=new mxRectangle(0,0,Z.height,Z.width));U&&Q||Z.width==R.width&&Z.height==R.height||(R=Z,null!=d&&d(R))};mxEvent.addListener(b,"click",function(Z){e.checked=!0;P(Z);mxEvent.consume(Z)});mxEvent.addListener(m,"click",function(Z){k.checked=!0;P(Z);mxEvent.consume(Z)});mxEvent.addListener(x,"blur",P);mxEvent.addListener(x,"click",P);mxEvent.addListener(B,"blur",P);mxEvent.addListener(B,"click",P);mxEvent.addListener(k,"change",P);mxEvent.addListener(e,
-"change",P);mxEvent.addListener(n,"change",function(Z){Q="custom"==n.value;P(Z,!0)});P();return{set:function(Z){f=Z;g(null,null,!0)},get:function(){return R},widthInput:x,heightInput:B}};
+"60px";C.style.padding="4px";var F=e.backgroundImage,J=function(D){a.showBackgroundImageDialog(function(N,S){S||(F=N,f())},F);mxEvent.consume(D)};mxEvent.addListener(B,"click",J);mxEvent.addListener(C,"click",J);f();n.appendChild(C);n.appendChild(B);k.appendChild(n);d.appendChild(k);k=document.createElement("tr");n=document.createElement("td");n.colSpan=2;n.style.paddingTop="16px";n.setAttribute("align","right");B=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});B.className="geBtn";
+a.editor.cancelFirst&&n.appendChild(B);J=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var D=parseInt(x.value);isNaN(D)||e.gridSize===D||e.setGridSize(D);D=new ChangePageSetup(a,r,F,u.get());D.ignoreColor=e.background==r;D.ignoreImage=(null!=e.backgroundImage?e.backgroundImage.src:null)===(null!=F?F.src:null);e.pageFormat.width==D.previousFormat.width&&e.pageFormat.height==D.previousFormat.height&&D.ignoreColor&&D.ignoreImage||e.model.execute(D)});J.className="geBtn gePrimaryBtn";
+n.appendChild(J);a.editor.cancelFirst||n.appendChild(B);k.appendChild(n);d.appendChild(k);g.appendChild(d);this.container=g};
+PageSetupDialog.addPageFormatPanel=function(a,b,f,e){function g(Z,U,V){if(V||x!=document.activeElement&&B!=document.activeElement){Z=!1;for(U=0;U<F.length;U++)V=F[U],S?"custom"==V.key&&(n.value=V.key,S=!1):null!=V.format&&("a4"==V.key?826==f.width?(f=mxRectangle.fromRectangle(f),f.width=827):826==f.height&&(f=mxRectangle.fromRectangle(f),f.height=827):"a5"==V.key&&(584==f.width?(f=mxRectangle.fromRectangle(f),f.width=583):584==f.height&&(f=mxRectangle.fromRectangle(f),f.height=583)),f.width==V.format.width&&
+f.height==V.format.height?(n.value=V.key,d.setAttribute("checked","checked"),d.defaultChecked=!0,d.checked=!0,k.removeAttribute("checked"),k.defaultChecked=!1,k.checked=!1,Z=!0):f.width==V.format.height&&f.height==V.format.width&&(n.value=V.key,d.removeAttribute("checked"),d.defaultChecked=!1,d.checked=!1,k.setAttribute("checked","checked"),k.defaultChecked=!0,Z=k.checked=!0));Z?(u.style.display="",r.style.display="none"):(x.value=f.width/100,B.value=f.height/100,d.setAttribute("checked","checked"),
+n.value="custom",u.style.display="none",r.style.display="")}}b="format-"+b;var d=document.createElement("input");d.setAttribute("name",b);d.setAttribute("type","radio");d.setAttribute("value","portrait");var k=document.createElement("input");k.setAttribute("name",b);k.setAttribute("type","radio");k.setAttribute("value","landscape");var n=document.createElement("select");n.style.marginBottom="8px";n.style.borderRadius="4px";n.style.border="1px solid rgb(160, 160, 160)";n.style.width="206px";var u=
+document.createElement("div");u.style.marginLeft="4px";u.style.width="210px";u.style.height="24px";d.style.marginRight="6px";u.appendChild(d);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));u.appendChild(b);k.style.marginLeft="10px";k.style.marginRight="6px";u.appendChild(k);var m=document.createElement("span");m.style.width="100px";mxUtils.write(m,mxResources.get("landscape"));u.appendChild(m);var r=document.createElement("div");r.style.marginLeft=
+"4px";r.style.width="210px";r.style.height="24px";var x=document.createElement("input");x.setAttribute("size","7");x.style.textAlign="right";r.appendChild(x);mxUtils.write(r," in x ");var B=document.createElement("input");B.setAttribute("size","7");B.style.textAlign="right";r.appendChild(B);mxUtils.write(r," in");u.style.display="none";r.style.display="none";for(var C={},F=PageSetupDialog.getFormats(),J=0;J<F.length;J++){var D=F[J];C[D.key]=D;var N=document.createElement("option");N.setAttribute("value",
+D.key);mxUtils.write(N,D.title);n.appendChild(N)}var S=!1;g();a.appendChild(n);mxUtils.br(a);a.appendChild(u);a.appendChild(r);var T=f,P=function(Z,U){Z=C[n.value];null!=Z.format?(x.value=Z.format.width/100,B.value=Z.format.height/100,r.style.display="none",u.style.display=""):(u.style.display="none",r.style.display="");Z=parseFloat(x.value);if(isNaN(Z)||0>=Z)x.value=f.width/100;Z=parseFloat(B.value);if(isNaN(Z)||0>=Z)B.value=f.height/100;Z=new mxRectangle(0,0,Math.floor(100*parseFloat(x.value)),
+Math.floor(100*parseFloat(B.value)));"custom"!=n.value&&k.checked&&(Z=new mxRectangle(0,0,Z.height,Z.width));U&&S||Z.width==T.width&&Z.height==T.height||(T=Z,null!=e&&e(T))};mxEvent.addListener(b,"click",function(Z){d.checked=!0;P(Z);mxEvent.consume(Z)});mxEvent.addListener(m,"click",function(Z){k.checked=!0;P(Z);mxEvent.consume(Z)});mxEvent.addListener(x,"blur",P);mxEvent.addListener(x,"click",P);mxEvent.addListener(B,"blur",P);mxEvent.addListener(B,"click",P);mxEvent.addListener(k,"change",P);mxEvent.addListener(d,
+"change",P);mxEvent.addListener(n,"change",function(Z){S="custom"==n.value;P(Z,!0)});P();return{set:function(Z){f=Z;g(null,null,!0)},get:function(){return T},widthInput:x,heightInput:B}};
PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",
format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},
{key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,900,1600)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1200,1920)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1200,1600)},{key:"custom",title:mxResources.get("custom"),format:null}]};
-var FilenameDialog=function(a,b,f,d,g,e,k,n,u,m,r,x,B){u=null!=u?u:!0;var C=document.createElement("table"),G=document.createElement("tbody");C.style.position="absolute";C.style.top="30px";C.style.left="20px";var J=document.createElement("tr");var D=document.createElement("td");D.style.textOverflow="ellipsis";D.style.textAlign="right";D.style.maxWidth=(B?B+15:100)+"px";D.style.fontSize="10pt";D.style.width=(B?B:84)+"px";mxUtils.write(D,(g||mxResources.get("filename"))+":");J.appendChild(D);var N=
-document.createElement("input");N.setAttribute("value",b||"");N.style.marginLeft="4px";N.style.width=null!=x?x+"px":"180px";var Q=mxUtils.button(f,function(){if(null==e||e(N.value))u&&a.hideDialog(),d(N.value)});Q.className="geBtn gePrimaryBtn";this.init=function(){if(null!=g||null==k)if(N.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?N.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var R=C.parentNode;if(null!=R){var P=null;mxEvent.addListener(R,"dragleave",
-function(Z){null!=P&&(P.style.backgroundColor="",P=null);Z.stopPropagation();Z.preventDefault()});mxEvent.addListener(R,"dragover",mxUtils.bind(this,function(Z){null==P&&(!mxClient.IS_IE||10<document.documentMode)&&(P=N,P.style.backgroundColor="#ebf2f9");Z.stopPropagation();Z.preventDefault()}));mxEvent.addListener(R,"drop",mxUtils.bind(this,function(Z){null!=P&&(P.style.backgroundColor="",P=null);0<=mxUtils.indexOf(Z.dataTransfer.types,"text/uri-list")&&(N.value=decodeURIComponent(Z.dataTransfer.getData("text/uri-list")),
-Q.click());Z.stopPropagation();Z.preventDefault()}))}}};D=document.createElement("td");D.style.whiteSpace="nowrap";D.appendChild(N);J.appendChild(D);if(null!=g||null==k)G.appendChild(J),null!=r&&(D.appendChild(FilenameDialog.createTypeHint(a,N,r)),null!=a.editor.diagramFileTypes&&(J=document.createElement("tr"),D=document.createElement("td"),D.style.textOverflow="ellipsis",D.style.textAlign="right",D.style.maxWidth="100px",D.style.fontSize="10pt",D.style.width="84px",mxUtils.write(D,mxResources.get("type")+
-":"),J.appendChild(D),D=document.createElement("td"),D.style.whiteSpace="nowrap",J.appendChild(D),b=FilenameDialog.createFileTypes(a,N,a.editor.diagramFileTypes),b.style.marginLeft="4px",b.style.width="198px",D.appendChild(b),N.style.width=null!=x?x-40+"px":"190px",J.appendChild(D),G.appendChild(J)));null!=k&&(J=document.createElement("tr"),D=document.createElement("td"),D.colSpan=2,D.appendChild(k),J.appendChild(D),G.appendChild(J));J=document.createElement("tr");D=document.createElement("td");D.colSpan=
-2;D.style.paddingTop=null!=r?"12px":"20px";D.style.whiteSpace="nowrap";D.setAttribute("align","right");r=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=m&&m()});r.className="geBtn";a.editor.cancelFirst&&D.appendChild(r);null!=n&&(x=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(n)}),x.className="geBtn",D.appendChild(x));mxEvent.addListener(N,"keypress",function(R){13==R.keyCode&&Q.click()});D.appendChild(Q);a.editor.cancelFirst||D.appendChild(r);
-J.appendChild(D);G.appendChild(J);C.appendChild(G);this.container=C};FilenameDialog.filenameHelpLink=null;
-FilenameDialog.createTypeHint=function(a,b,f){var d=document.createElement("img");d.style.backgroundPosition="center bottom";d.style.backgroundRepeat="no-repeat";d.style.margin="2px 0 0 4px";d.style.verticalAlign="top";d.style.cursor="pointer";d.style.height="16px";d.style.width="16px";mxUtils.setOpacity(d,70);var g=function(){d.setAttribute("src",Editor.helpImage);d.setAttribute("title",mxResources.get("help"));for(var e=0;e<f.length;e++)if(0<f[e].ext.length&&b.value.toLowerCase().substring(b.value.length-
-f[e].ext.length-1)=="."+f[e].ext){d.setAttribute("title",mxResources.get(f[e].title));break}};mxEvent.addListener(b,"keyup",g);mxEvent.addListener(b,"change",g);mxEvent.addListener(d,"click",function(e){var k=d.getAttribute("title");d.getAttribute("src")==Editor.helpImage?a.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=k&&a.showError(null,k,mxResources.get("help"),function(){a.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);mxEvent.consume(e)});
-g();return d};
-FilenameDialog.createFileTypes=function(a,b,f){var d=document.createElement("select");for(a=0;a<f.length;a++){var g=document.createElement("option");g.setAttribute("value",a);mxUtils.write(g,mxResources.get(f[a].description)+" (."+f[a].extension+")");d.appendChild(g)}mxEvent.addListener(d,"change",function(e){e=f[d.value].extension;var k=b.value.lastIndexOf(".drawio.");k=0<k?k:b.value.lastIndexOf(".");"drawio"!=e&&(e="drawio."+e);b.value=0<k?b.value.substring(0,k+1)+e:b.value+"."+e;"createEvent"in
-document?(e=document.createEvent("HTMLEvents"),e.initEvent("change",!1,!0),b.dispatchEvent(e)):b.fireEvent("onchange")});a=function(e){e=b.value.toLowerCase();for(var k=0,n=0;n<f.length;n++){var u=f[n].extension,m=null;"drawio"!=u&&(m=u,u=".drawio."+u);if(e.substring(e.length-u.length-1)=="."+u||null!=m&&e.substring(e.length-m.length-1)=="."+m){k=n;break}}d.value=k};mxEvent.addListener(b,"change",a);mxEvent.addListener(b,"keyup",a);a();return d};
+var FilenameDialog=function(a,b,f,e,g,d,k,n,u,m,r,x,B){u=null!=u?u:!0;var C=document.createElement("table"),F=document.createElement("tbody");C.style.position="absolute";C.style.top="30px";C.style.left="20px";var J=document.createElement("tr");var D=document.createElement("td");D.style.textOverflow="ellipsis";D.style.textAlign="right";D.style.maxWidth=(B?B+15:100)+"px";D.style.fontSize="10pt";D.style.width=(B?B:84)+"px";mxUtils.write(D,(g||mxResources.get("filename"))+":");J.appendChild(D);var N=
+document.createElement("input");N.setAttribute("value",b||"");N.style.marginLeft="4px";N.style.width=null!=x?x+"px":"180px";var S=mxUtils.button(f,function(){if(null==d||d(N.value))u&&a.hideDialog(),e(N.value)});S.className="geBtn gePrimaryBtn";this.init=function(){if(null!=g||null==k)if(N.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?N.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var T=C.parentNode;if(null!=T){var P=null;mxEvent.addListener(T,"dragleave",
+function(Z){null!=P&&(P.style.backgroundColor="",P=null);Z.stopPropagation();Z.preventDefault()});mxEvent.addListener(T,"dragover",mxUtils.bind(this,function(Z){null==P&&(!mxClient.IS_IE||10<document.documentMode)&&(P=N,P.style.backgroundColor="#ebf2f9");Z.stopPropagation();Z.preventDefault()}));mxEvent.addListener(T,"drop",mxUtils.bind(this,function(Z){null!=P&&(P.style.backgroundColor="",P=null);0<=mxUtils.indexOf(Z.dataTransfer.types,"text/uri-list")&&(N.value=decodeURIComponent(Z.dataTransfer.getData("text/uri-list")),
+S.click());Z.stopPropagation();Z.preventDefault()}))}}};D=document.createElement("td");D.style.whiteSpace="nowrap";D.appendChild(N);J.appendChild(D);if(null!=g||null==k)F.appendChild(J),null!=r&&(D.appendChild(FilenameDialog.createTypeHint(a,N,r)),null!=a.editor.diagramFileTypes&&(J=document.createElement("tr"),D=document.createElement("td"),D.style.textOverflow="ellipsis",D.style.textAlign="right",D.style.maxWidth="100px",D.style.fontSize="10pt",D.style.width="84px",mxUtils.write(D,mxResources.get("type")+
+":"),J.appendChild(D),D=document.createElement("td"),D.style.whiteSpace="nowrap",J.appendChild(D),b=FilenameDialog.createFileTypes(a,N,a.editor.diagramFileTypes),b.style.marginLeft="4px",b.style.width="198px",D.appendChild(b),N.style.width=null!=x?x-40+"px":"190px",J.appendChild(D),F.appendChild(J)));null!=k&&(J=document.createElement("tr"),D=document.createElement("td"),D.colSpan=2,D.appendChild(k),J.appendChild(D),F.appendChild(J));J=document.createElement("tr");D=document.createElement("td");D.colSpan=
+2;D.style.paddingTop=null!=r?"12px":"20px";D.style.whiteSpace="nowrap";D.setAttribute("align","right");r=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=m&&m()});r.className="geBtn";a.editor.cancelFirst&&D.appendChild(r);null!=n&&(x=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(n)}),x.className="geBtn",D.appendChild(x));mxEvent.addListener(N,"keypress",function(T){13==T.keyCode&&S.click()});D.appendChild(S);a.editor.cancelFirst||D.appendChild(r);
+J.appendChild(D);F.appendChild(J);C.appendChild(F);this.container=C};FilenameDialog.filenameHelpLink=null;
+FilenameDialog.createTypeHint=function(a,b,f){var e=document.createElement("img");e.style.backgroundPosition="center bottom";e.style.backgroundRepeat="no-repeat";e.style.margin="2px 0 0 4px";e.style.verticalAlign="top";e.style.cursor="pointer";e.style.height="16px";e.style.width="16px";mxUtils.setOpacity(e,70);var g=function(){e.setAttribute("src",Editor.helpImage);e.setAttribute("title",mxResources.get("help"));for(var d=0;d<f.length;d++)if(0<f[d].ext.length&&b.value.toLowerCase().substring(b.value.length-
+f[d].ext.length-1)=="."+f[d].ext){e.setAttribute("title",mxResources.get(f[d].title));break}};mxEvent.addListener(b,"keyup",g);mxEvent.addListener(b,"change",g);mxEvent.addListener(e,"click",function(d){var k=e.getAttribute("title");e.getAttribute("src")==Editor.helpImage?a.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=k&&a.showError(null,k,mxResources.get("help"),function(){a.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);mxEvent.consume(d)});
+g();return e};
+FilenameDialog.createFileTypes=function(a,b,f){var e=document.createElement("select");for(a=0;a<f.length;a++){var g=document.createElement("option");g.setAttribute("value",a);mxUtils.write(g,mxResources.get(f[a].description)+" (."+f[a].extension+")");e.appendChild(g)}mxEvent.addListener(e,"change",function(d){d=f[e.value].extension;var k=b.value.lastIndexOf(".drawio.");k=0<k?k:b.value.lastIndexOf(".");"drawio"!=d&&(d="drawio."+d);b.value=0<k?b.value.substring(0,k+1)+d:b.value+"."+d;"createEvent"in
+document?(d=document.createEvent("HTMLEvents"),d.initEvent("change",!1,!0),b.dispatchEvent(d)):b.fireEvent("onchange")});a=function(d){d=b.value.toLowerCase();for(var k=0,n=0;n<f.length;n++){var u=f[n].extension,m=null;"drawio"!=u&&(m=u,u=".drawio."+u);if(d.substring(d.length-u.length-1)=="."+u||null!=m&&d.substring(d.length-m.length-1)=="."+m){k=n;break}}e.value=k};mxEvent.addListener(b,"change",a);mxEvent.addListener(b,"keyup",a);a();return e};
(function(){mxGraphView.prototype.validateBackgroundPage=function(){var k=this.graph;if(null!=k.container&&!k.transparentBackground){if(k.pageVisible){var n=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var u=k.container.firstChild;null!=u&&u.nodeType!=mxConstants.NODETYPE_ELEMENT;)u=u.nextSibling;null!=u&&(this.backgroundPageShape=this.createBackgroundPageShape(n),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,
this.backgroundPageShape.init(k.container),u.style.position="absolute",k.container.insertBefore(this.backgroundPageShape.node,u),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(m){k.dblClick(m)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(m){k.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(m))}),mxUtils.bind(this,function(m){null!=
k.tooltipHandler&&k.tooltipHandler.isHideOnHover()&&k.tooltipHandler.hide();k.isMouseDown&&!mxEvent.isConsumed(m)&&k.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(m))}),mxUtils.bind(this,function(m){k.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(m))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=n,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};
@@ -2411,154 +2411,157 @@ mxGraphView.prototype.validateBackgroundStyles=function(){var k=this.graph,n=nul
k.defaultPageBorderColor,k.container.className="geDiagramContainer geDiagramBackdrop",u.style.backgroundImage="none",u.style.backgroundColor=""):(k.container.className="geDiagramContainer",u.style.backgroundPosition=r,u.style.backgroundColor=n,u.style.backgroundImage=m)};mxGraphView.prototype.createSvgGrid=function(k){for(var n=this.graph.gridSize*this.scale;n<this.minGridSize;)n*=2;for(var u=this.gridSteps*n,m=[],r=1;r<this.gridSteps;r++){var x=r*n;m.push("M 0 "+x+" L "+u+" "+x+" M "+x+" 0 L "+x+
" "+u)}return'<svg width="'+u+'" height="'+u+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+u+'" height="'+u+'" patternUnits="userSpaceOnUse"><path d="'+m.join(" ")+'" fill="none" stroke="'+k+'" opacity="0.2" stroke-width="1"/><path d="M '+u+" 0 L 0 0 0 "+u+'" fill="none" stroke="'+k+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(k,n){a.apply(this,arguments);
if(null!=this.shiftPreview1){var u=this.view.canvas;null!=u.ownerSVGElement&&(u=u.ownerSVGElement);var m=this.gridSize*this.view.scale*this.view.gridSteps;m=-Math.round(m-mxUtils.mod(this.view.translate.x*this.view.scale+k,m))+"px "+-Math.round(m-mxUtils.mod(this.view.translate.y*this.view.scale+n,m))+"px";u.style.backgroundPosition=m}};mxGraph.prototype.updatePageBreaks=function(k,n,u){var m=this.view.scale,r=this.view.translate,x=this.pageFormat,B=m*this.pageScale,C=this.view.getBackgroundPageBounds();
-n=C.width;u=C.height;var G=new mxRectangle(m*r.x,m*r.y,x.width*B,x.height*B),J=(k=k&&Math.min(G.width,G.height)>this.minPageBreakDist)?Math.ceil(u/G.height)-1:0,D=k?Math.ceil(n/G.width)-1:0,N=C.x+n,Q=C.y+u;null==this.horizontalPageBreaks&&0<J&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<D&&(this.verticalPageBreaks=[]);k=mxUtils.bind(this,function(R){if(null!=R){for(var P=R==this.horizontalPageBreaks?J:D,Z=0;Z<=P;Z++){var U=R==this.horizontalPageBreaks?[new mxPoint(Math.round(C.x),
-Math.round(C.y+(Z+1)*G.height)),new mxPoint(Math.round(N),Math.round(C.y+(Z+1)*G.height))]:[new mxPoint(Math.round(C.x+(Z+1)*G.width),Math.round(C.y)),new mxPoint(Math.round(C.x+(Z+1)*G.width),Math.round(Q))];null!=R[Z]?(R[Z].points=U,R[Z].redraw()):(U=new mxPolyline(U,this.pageBreakColor),U.dialect=this.dialect,U.isDashed=this.pageBreakDashed,U.pointerEvents=!1,U.init(this.view.backgroundPane),U.redraw(),R[Z]=U)}for(Z=P;Z<R.length;Z++)R[Z].destroy();R.splice(P,R.length-P)}});k(this.horizontalPageBreaks);
+n=C.width;u=C.height;var F=new mxRectangle(m*r.x,m*r.y,x.width*B,x.height*B),J=(k=k&&Math.min(F.width,F.height)>this.minPageBreakDist)?Math.ceil(u/F.height)-1:0,D=k?Math.ceil(n/F.width)-1:0,N=C.x+n,S=C.y+u;null==this.horizontalPageBreaks&&0<J&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<D&&(this.verticalPageBreaks=[]);k=mxUtils.bind(this,function(T){if(null!=T){for(var P=T==this.horizontalPageBreaks?J:D,Z=0;Z<=P;Z++){var U=T==this.horizontalPageBreaks?[new mxPoint(Math.round(C.x),
+Math.round(C.y+(Z+1)*F.height)),new mxPoint(Math.round(N),Math.round(C.y+(Z+1)*F.height))]:[new mxPoint(Math.round(C.x+(Z+1)*F.width),Math.round(C.y)),new mxPoint(Math.round(C.x+(Z+1)*F.width),Math.round(S))];null!=T[Z]?(T[Z].points=U,T[Z].redraw()):(U=new mxPolyline(U,this.pageBreakColor),U.dialect=this.dialect,U.isDashed=this.pageBreakDashed,U.pointerEvents=!1,U.init(this.view.backgroundPane),U.redraw(),T[Z]=U)}for(Z=P;Z<T.length;Z++)T[Z].destroy();T.splice(P,T.length-P)}});k(this.horizontalPageBreaks);
k(this.verticalPageBreaks)};var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(k,n,u){for(var m=0;m<n.length;m++){if(this.graph.isTableCell(n[m])||this.graph.isTableRow(n[m]))return!1;if(this.graph.getModel().isVertex(n[m])){var r=this.graph.getCellGeometry(n[m]);if(null!=r&&r.relative)return!1}}return b.apply(this,arguments)};var f=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var k=
f.apply(this,arguments);k.intersects=mxUtils.bind(this,function(n,u){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(k,arguments)});return k};mxGraphView.prototype.createBackgroundPageShape=function(k){return new mxRectangleShape(k,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var k=this.getGraphBounds(),n=0<k.width?k.x/this.scale-this.translate.x:0,u=0<k.height?k.y/this.scale-this.translate.y:0,m=this.graph.pageFormat,
-r=this.graph.pageScale,x=m.width*r;m=m.height*r;r=Math.floor(Math.min(0,n)/x);var B=Math.floor(Math.min(0,u)/m);return new mxRectangle(this.scale*(this.translate.x+r*x),this.scale*(this.translate.y+B*m),this.scale*(Math.ceil(Math.max(1,n+k.width/this.scale)/x)-r)*x,this.scale*(Math.ceil(Math.max(1,u+k.height/this.scale)/m)-B)*m)};var d=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(k,n){d.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
-this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=k+"px",this.view.backgroundPageShape.node.style.marginTop=n+"px")};var g=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(k,n,u,m,r,x){var B=g.apply(this,arguments);null==x||x||mxEvent.addListener(B,"mousedown",function(C){mxEvent.consume(C)});return B};var e=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
-function(k,n,u){var m=this.graph.model.getParent(k);if(n){var r=this.graph.model.isEdge(k)?null:this.graph.getCellGeometry(k);r=!this.graph.model.isEdge(m)&&!this.graph.isSiblingSelected(k)&&(null!=r&&r.relative||!this.graph.isContainer(m)||this.graph.isPart(k))}else if(r=e.apply(this,arguments),this.graph.isTableCell(k)||this.graph.isTableRow(k))r=m,this.graph.isTable(r)||(r=this.graph.model.getParent(r)),r=!this.graph.selectionCellsHandler.isHandled(r)||this.graph.isCellSelected(r)&&this.graph.isToggleEvent(u.getEvent())||
-this.graph.isCellSelected(k)&&!this.graph.isToggleEvent(u.getEvent())||this.graph.isTableCell(k)&&this.graph.isCellSelected(m);return r};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(k){k=k.getCell();for(var n=this.graph.getModel(),u=n.getParent(k),m=this.graph.view.getState(u),r=this.graph.isCellSelected(k);null!=m&&(n.isVertex(u)||n.isEdge(u));){var x=this.graph.isCellSelected(u);r=r||x;if(x||!r&&(this.graph.isTableCell(k)||this.graph.isTableRow(k)))k=u;u=n.getParent(u)}return k}})();EditorUi=function(a,b,f){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var d=this.editor.graph;d.lightbox=f;var g=d.getGraphBounds;d.getGraphBounds=function(){var F=g.apply(this,arguments),L=this.backgroundImage;if(null!=L&&null!=L.width&&null!=L.height){var T=this.view.translate,ca=this.view.scale;F=mxRectangle.fromRectangle(F);F.add(new mxRectangle((T.x+L.x)*ca,(T.y+L.y)*ca,L.width*ca,L.height*ca))}return F};d.useCssTransforms&&(this.lazyZoomDelay=
-0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);this.selectionStateListener=mxUtils.bind(this,function(F,L){this.clearSelectionState()});d.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);
-d.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);d.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);d.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);d.getView().addListener("unitChanged",this.selectionStateListener);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,d.isEnabled=function(){return!1},d.panningHandler.isForcePanningEvent=function(F){return!mxEvent.isPopupTrigger(F.getEvent())});this.actions=new Actions(this);this.menus=
-this.createMenus();if(!d.standalone){var e="rounded shadow glass dashed dashPattern labelBackgroundColor labelBorderColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents".split(" "),k="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" "),
-n="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" "),u=!1,m=!1;this.setDefaultStyle=function(F){try{var L=d.getCellStyle(F,!1),T=[],ca=[],fa;for(fa in L)T.push(L[fa]),ca.push(fa);d.getModel().isEdge(F)?d.currentEdgeStyle={}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",ca,"values",T,"cells",[F]));d.getModel().isEdge(F)?m=!0:u=!0}catch(wa){this.handleError(wa)}};this.clearDefaultStyle=function(){d.currentEdgeStyle=
-mxUtils.clone(d.defaultEdgeStyle);d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);u=m=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var r=["fontFamily","fontSource","fontSize","fontColor"];for(b=0;b<r.length;b++)0>mxUtils.indexOf(e,r[b])&&e.push(r[b]);var x="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),B=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],
-["strokeColor","strokeWidth"],["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(b=0;b<B.length;b++)for(f=0;f<B[b].length;f++)e.push(B[b][f]);for(b=0;b<k.length;b++)0>mxUtils.indexOf(e,k[b])&&e.push(k[b]);var C=function(F,L,T,ca,fa,wa,W){ca=null!=ca?ca:d.currentVertexStyle;fa=null!=fa?fa:d.currentEdgeStyle;wa=null!=wa?wa:!0;T=null!=T?T:d.getModel();if(W){W=[];for(var aa=0;aa<F.length;aa++)W=W.concat(T.getDescendants(F[aa]));F=W}T.beginUpdate();try{for(aa=0;aa<F.length;aa++){var oa=
-F[aa];if(L)var sa=["fontSize","fontFamily","fontColor"];else{var Ka=T.getStyle(oa),Ha=null!=Ka?Ka.split(";"):[];sa=e.slice();for(var ua=0;ua<Ha.length;ua++){var Ca=Ha[ua],ra=Ca.indexOf("=");if(0<=ra){var Da=Ca.substring(0,ra),Ua=mxUtils.indexOf(sa,Da);0<=Ua&&sa.splice(Ua,1);for(W=0;W<B.length;W++){var db=B[W];if(0<=mxUtils.indexOf(db,Da))for(var Ta=0;Ta<db.length;Ta++){var $a=mxUtils.indexOf(sa,db[Ta]);0<=$a&&sa.splice($a,1)}}}}}var Xa=T.isEdge(oa);W=Xa?fa:ca;var Va=T.getStyle(oa);for(ua=0;ua<sa.length;ua++){Da=
-sa[ua];var Ya=W[Da];null!=Ya&&"edgeStyle"!=Da&&("shape"!=Da||Xa)&&(!Xa||wa||0>mxUtils.indexOf(n,Da))&&(Va=mxUtils.setStyle(Va,Da,Ya))}Editor.simpleLabels&&(Va=mxUtils.setStyle(mxUtils.setStyle(Va,"html",null),"whiteSpace",null));T.setStyle(oa,Va)}}finally{T.endUpdate()}return F};d.addListener("cellsInserted",function(F,L){C(L.getProperty("cells"),null,null,null,null,!0,!0)});d.addListener("textInserted",function(F,L){C(L.getProperty("cells"),!0)});this.insertHandler=C;this.createDivs();this.createUi();
-this.refresh();var G=mxUtils.bind(this,function(F){null==F&&(F=window.event);return d.isEditing()||null!=F&&this.isSelectionAllowed(F)});this.container==document.body&&(this.menubarContainer.onselectstart=G,this.menubarContainer.onmousedown=G,this.toolbarContainer.onselectstart=G,this.toolbarContainer.onmousedown=G,this.diagramContainer.onselectstart=G,this.diagramContainer.onmousedown=G,this.sidebarContainer.onselectstart=G,this.sidebarContainer.onmousedown=G,this.formatContainer.onselectstart=G,
-this.formatContainer.onmousedown=G,this.footerContainer.onselectstart=G,this.footerContainer.onmousedown=G,null!=this.tabContainer&&(this.tabContainer.onselectstart=G));!this.editor.chromeless||this.editor.editable?(b=function(F){if(null!=F){var L=mxEvent.getSource(F);if("A"==L.nodeName)for(;null!=L;){if("geHint"==L.className)return!0;L=L.parentNode}}return G(F)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",
-b):this.diagramContainer.oncontextmenu=b):d.panningHandler.usePopupTrigger=!1;d.init(this.diagramContainer);mxClient.IS_SVG&&null!=d.view.getDrawPane()&&(b=d.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=d.graphHandler){var J=d.graphHandler.start;d.graphHandler.start=function(){null!=ba.hoverIcons&&ba.hoverIcons.reset();J.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(F){var L=
-mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(F)-L.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(F)-L.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var D=!1,N=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(F,L){return D||N.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(F){32!=F.which||d.isEditing()?mxEvent.isConsumed(F)||
-27!=F.keyCode||this.hideDialog(null,!0):(D=!0,this.hoverIcons.reset(),d.container.style.cursor="move",d.isEditing()||mxEvent.getSource(F)!=d.container||mxEvent.consume(F))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(F){d.container.style.cursor="";D=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var Q=d.panningHandler.isForcePanningEvent;d.panningHandler.isForcePanningEvent=function(F){return Q.apply(this,arguments)||D||mxEvent.isMouseEvent(F.getEvent())&&
-(this.usePopupTrigger||!mxEvent.isPopupTrigger(F.getEvent()))&&(!mxEvent.isControlDown(F.getEvent())&&mxEvent.isRightMouseButton(F.getEvent())||mxEvent.isMiddleMouseButton(F.getEvent()))};var R=d.cellEditor.isStopEditingEvent;d.cellEditor.isStopEditingEvent=function(F){return R.apply(this,arguments)||13==F.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(F)||mxClient.IS_MAC&&mxEvent.isMetaDown(F)||mxClient.IS_SF&&mxEvent.isShiftDown(F))};var P=d.isZoomWheelEvent;d.isZoomWheelEvent=function(){return D||
-P.apply(this,arguments)};var Z=!1,U=null,V=null,ia=null,ha=mxUtils.bind(this,function(){if(null!=this.toolbar&&Z!=d.cellEditor.isContentEditing()){for(var F=this.toolbar.container.firstChild,L=[];null!=F;){var T=F.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,F)&&(F.parentNode.removeChild(F),L.push(F));F=T}F=this.toolbar.fontMenu;T=this.toolbar.sizeMenu;if(null==ia)this.toolbar.createTextToolbar();else{for(var ca=0;ca<ia.length;ca++)this.toolbar.container.appendChild(ia[ca]);this.toolbar.fontMenu=
-U;this.toolbar.sizeMenu=V}Z=d.cellEditor.isContentEditing();U=F;V=T;ia=L}}),ba=this,qa=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){qa.apply(this,arguments);ha();if(d.cellEditor.isContentEditing()){var F=!1,L=function(){F||(F=!0,window.setTimeout(function(){var T=d.getSelectedEditingElement();null!=T&&(T=mxUtils.getCurrentStyle(T),null!=T&&null!=ba.toolbar&&(ba.toolbar.setFontName(Graph.stripQuotes(T.fontFamily)),ba.toolbar.setFontSize(parseInt(T.fontSize))));F=!1},0))};mxEvent.addListener(d.cellEditor.textarea,
-"input",L);mxEvent.addListener(d.cellEditor.textarea,"touchend",L);mxEvent.addListener(d.cellEditor.textarea,"mouseup",L);mxEvent.addListener(d.cellEditor.textarea,"keyup",L);L()}};var O=d.cellEditor.stopEditing;d.cellEditor.stopEditing=function(F,L){try{O.apply(this,arguments),ha()}catch(T){ba.handleError(T)}};d.container.setAttribute("tabindex","0");d.container.style.cursor="default";if(window.self===window.top&&null!=d.container.parentNode)try{d.container.focus()}catch(F){}var S=d.fireMouseEvent;
-d.fireMouseEvent=function(F,L,T){F==mxEvent.MOUSE_DOWN&&this.container.focus();S.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(F,L,T){this.menus.createPopupMenu(F,L,T)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(F){d.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};d.connectionHandler.addListener(mxEvent.CONNECT,function(F,
-L){var T=[L.getProperty("cell")];L.getProperty("terminalInserted")&&(T.push(L.getProperty("terminal")),window.setTimeout(function(){null!=ba.hoverIcons&&ba.hoverIcons.update(d.view.getState(T[T.length-1]))},0));C(T)});this.addListener("styleChanged",mxUtils.bind(this,function(F,L){var T=L.getProperty("cells"),ca=F=!1;if(0<T.length)for(var fa=0;fa<T.length&&(F=d.getModel().isVertex(T[fa])||F,!(ca=d.getModel().isEdge(T[fa])||ca)||!F);fa++);else ca=F=!0;F=F&&!u;ca=ca&&!m;T=L.getProperty("keys");L=L.getProperty("values");
-for(fa=0;fa<T.length;fa++){var wa=0<=mxUtils.indexOf(r,T[fa]);if("strokeColor"!=T[fa]||null!=L[fa]&&"none"!=L[fa])if(0<=mxUtils.indexOf(k,T[fa]))ca||0<=mxUtils.indexOf(x,T[fa])?null==L[fa]?delete d.currentEdgeStyle[T[fa]]:d.currentEdgeStyle[T[fa]]=L[fa]:F&&0<=mxUtils.indexOf(e,T[fa])&&(null==L[fa]?delete d.currentVertexStyle[T[fa]]:d.currentVertexStyle[T[fa]]=L[fa]);else if(0<=mxUtils.indexOf(e,T[fa])){if(F||wa)null==L[fa]?delete d.currentVertexStyle[T[fa]]:d.currentVertexStyle[T[fa]]=L[fa];if(ca||
-wa||0<=mxUtils.indexOf(x,T[fa]))null==L[fa]?delete d.currentEdgeStyle[T[fa]]:d.currentEdgeStyle[T[fa]]=L[fa]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(d.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==d.currentEdgeStyle.edgeStyle&&"1"==d.currentEdgeStyle.curved?"geSprite geSprite-curved":
-"straight"==d.currentEdgeStyle.edgeStyle||"none"==d.currentEdgeStyle.edgeStyle||null==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):
-"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==d.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==d.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==d.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"))}));null!=this.toolbar&&(a=mxUtils.bind(this,function(){var F=d.currentVertexStyle.fontFamily||"Helvetica",L=String(d.currentVertexStyle.fontSize||
-"12"),T=d.getView().getState(d.getSelectionCell());null!=T&&(F=T.style[mxConstants.STYLE_FONTFAMILY]||F,L=T.style[mxConstants.STYLE_FONTSIZE]||L,10<F.length&&(F=F.substring(0,8)+"..."));this.toolbar.setFontName(F);this.toolbar.setFontSize(L)}),d.getSelectionModel().addListener(mxEvent.CHANGE,a),d.getModel().addListener(mxEvent.CHANGE,a));d.addListener(mxEvent.CELLS_ADDED,function(F,L){F=L.getProperty("cells");L=L.getProperty("parent");null!=L&&d.getModel().isLayer(L)&&!d.isCellVisible(L)&&null!=F&&
-0<F.length&&d.getModel().setVisible(L,!0)});this.gestureHandler=mxUtils.bind(this,function(F){null!=this.currentMenu&&mxEvent.getSource(F)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});
-mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){d.view.validateBackground()}));this.addListener("backgroundColorChanged",
-mxUtils.bind(this,function(){d.view.validateBackground()}));d.addListener("gridSizeChanged",mxUtils.bind(this,function(){d.isGridEnabled()&&d.view.validateBackground()}));this.editor.resetGraph()}this.init();d.standalone||this.open()};EditorUi.compactUi=!0;
-EditorUi.parsePng=function(a,b,f){function d(n,u){var m=e;e+=u;return n.substring(m,e)}function g(n){n=d(n,4);return n.charCodeAt(3)+(n.charCodeAt(2)<<8)+(n.charCodeAt(1)<<16)+(n.charCodeAt(0)<<24)}var e=0;if(d(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=f&&f();else if(d(a,4),"IHDR"!=d(a,4))null!=f&&f();else{d(a,17);do{f=g(a);var k=d(a,4);if(null!=b&&b(e-8,k,f))break;value=d(a,f);d(a,4);if("IEND"==k)break}while(f)}};mxUtils.extend(EditorUi,mxEventSource);
+r=this.graph.pageScale,x=m.width*r;m=m.height*r;r=Math.floor(Math.min(0,n)/x);var B=Math.floor(Math.min(0,u)/m);return new mxRectangle(this.scale*(this.translate.x+r*x),this.scale*(this.translate.y+B*m),this.scale*(Math.ceil(Math.max(1,n+k.width/this.scale)/x)-r)*x,this.scale*(Math.ceil(Math.max(1,u+k.height/this.scale)/m)-B)*m)};var e=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(k,n){e.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
+this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=k+"px",this.view.backgroundPageShape.node.style.marginTop=n+"px")};var g=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(k,n,u,m,r,x){var B=g.apply(this,arguments);null==x||x||mxEvent.addListener(B,"mousedown",function(C){mxEvent.consume(C)});return B};var d=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
+function(k,n,u){var m=this.graph.model.getParent(k);if(n){var r=this.graph.model.isEdge(k)?null:this.graph.getCellGeometry(k);r=!this.graph.model.isEdge(m)&&!this.graph.isSiblingSelected(k)&&(null!=r&&r.relative||!this.graph.isContainer(m)||this.graph.isPart(k))}else if(r=d.apply(this,arguments),this.graph.isTableCell(k)||this.graph.isTableRow(k))r=m,this.graph.isTable(r)||(r=this.graph.model.getParent(r)),r=!this.graph.selectionCellsHandler.isHandled(r)||this.graph.isCellSelected(r)&&this.graph.isToggleEvent(u.getEvent())||
+this.graph.isCellSelected(k)&&!this.graph.isToggleEvent(u.getEvent())||this.graph.isTableCell(k)&&this.graph.isCellSelected(m);return r};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(k){k=k.getCell();for(var n=this.graph.getModel(),u=n.getParent(k),m=this.graph.view.getState(u),r=this.graph.isCellSelected(k);null!=m&&(n.isVertex(u)||n.isEdge(u));){var x=this.graph.isCellSelected(u);r=r||x;if(x||!r&&(this.graph.isTableCell(k)||this.graph.isTableRow(k)))k=u;u=n.getParent(u)}return k}})();EditorUi=function(a,b,f){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var e=this.editor.graph;e.lightbox=f;var g=e.getGraphBounds;e.getGraphBounds=function(){var G=g.apply(this,arguments),K=this.backgroundImage;if(null!=K&&null!=K.width&&null!=K.height){var Q=this.view.translate,ba=this.view.scale;G=mxRectangle.fromRectangle(G);G.add(new mxRectangle((Q.x+K.x)*ba,(Q.y+K.y)*ba,K.width*ba,K.height*ba))}return G};e.useCssTransforms&&(this.lazyZoomDelay=
+0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);this.selectionStateListener=mxUtils.bind(this,function(G,K){this.clearSelectionState()});e.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);
+e.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);e.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);e.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);e.getView().addListener("unitChanged",this.selectionStateListener);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,e.isEnabled=function(){return!1},e.panningHandler.isForcePanningEvent=function(G){return!mxEvent.isPopupTrigger(G.getEvent())});this.actions=new Actions(this);this.menus=
+this.createMenus();if(!e.standalone){var d="rounded shadow glass dashed dashPattern labelBackgroundColor labelBorderColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents".split(" "),k="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" "),
+n="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" "),u=!1,m=!1;this.setDefaultStyle=function(G){try{var K=e.getCellStyle(G,!1),Q=[],ba=[],la;for(la in K)Q.push(K[la]),ba.push(la);e.getModel().isEdge(G)?e.currentEdgeStyle={}:e.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",ba,"values",Q,"cells",[G]));e.getModel().isEdge(G)?m=!0:u=!0}catch(ra){this.handleError(ra)}};this.clearDefaultStyle=function(){e.currentEdgeStyle=
+mxUtils.clone(e.defaultEdgeStyle);e.currentVertexStyle=mxUtils.clone(e.defaultVertexStyle);u=m=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var r=["fontFamily","fontSource","fontSize","fontColor"];for(b=0;b<r.length;b++)0>mxUtils.indexOf(d,r[b])&&d.push(r[b]);var x="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),B=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],
+["strokeColor","strokeWidth"],["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(b=0;b<B.length;b++)for(f=0;f<B[b].length;f++)d.push(B[b][f]);for(b=0;b<k.length;b++)0>mxUtils.indexOf(d,k[b])&&d.push(k[b]);var C=function(G,K,Q,ba,la,ra,X){ba=null!=ba?ba:e.currentVertexStyle;la=null!=la?la:e.currentEdgeStyle;ra=null!=ra?ra:!0;Q=null!=Q?Q:e.getModel();if(X){X=[];for(var ca=0;ca<G.length;ca++)X=X.concat(Q.getDescendants(G[ca]));G=X}Q.beginUpdate();try{for(ca=0;ca<G.length;ca++){var oa=
+G[ca];if(K)var ta=["fontSize","fontFamily","fontColor"];else{var Ka=Q.getStyle(oa),Ha=null!=Ka?Ka.split(";"):[];ta=d.slice();for(var va=0;va<Ha.length;va++){var Ca=Ha[va],sa=Ca.indexOf("=");if(0<=sa){var Da=Ca.substring(0,sa),Ua=mxUtils.indexOf(ta,Da);0<=Ua&&ta.splice(Ua,1);for(X=0;X<B.length;X++){var db=B[X];if(0<=mxUtils.indexOf(db,Da))for(var Ta=0;Ta<db.length;Ta++){var $a=mxUtils.indexOf(ta,db[Ta]);0<=$a&&ta.splice($a,1)}}}}}var Xa=Q.isEdge(oa);X=Xa?la:ba;var Va=Q.getStyle(oa);for(va=0;va<ta.length;va++){Da=
+ta[va];var Ya=X[Da];null!=Ya&&"edgeStyle"!=Da&&("shape"!=Da||Xa)&&(!Xa||ra||0>mxUtils.indexOf(n,Da))&&(Va=mxUtils.setStyle(Va,Da,Ya))}Editor.simpleLabels&&(Va=mxUtils.setStyle(mxUtils.setStyle(Va,"html",null),"whiteSpace",null));Q.setStyle(oa,Va)}}finally{Q.endUpdate()}return G};e.addListener("cellsInserted",function(G,K){C(K.getProperty("cells"),null,null,null,null,!0,!0)});e.addListener("textInserted",function(G,K){C(K.getProperty("cells"),!0)});this.insertHandler=C;this.createDivs();this.createUi();
+this.refresh();var F=mxUtils.bind(this,function(G){null==G&&(G=window.event);return e.isEditing()||null!=G&&this.isSelectionAllowed(G)});this.container==document.body&&(this.menubarContainer.onselectstart=F,this.menubarContainer.onmousedown=F,this.toolbarContainer.onselectstart=F,this.toolbarContainer.onmousedown=F,this.diagramContainer.onselectstart=F,this.diagramContainer.onmousedown=F,this.sidebarContainer.onselectstart=F,this.sidebarContainer.onmousedown=F,this.formatContainer.onselectstart=F,
+this.formatContainer.onmousedown=F,this.footerContainer.onselectstart=F,this.footerContainer.onmousedown=F,null!=this.tabContainer&&(this.tabContainer.onselectstart=F));!this.editor.chromeless||this.editor.editable?(b=function(G){if(null!=G){var K=mxEvent.getSource(G);if("A"==K.nodeName)for(;null!=K;){if("geHint"==K.className)return!0;K=K.parentNode}}return F(G)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",
+b):this.diagramContainer.oncontextmenu=b):e.panningHandler.usePopupTrigger=!1;e.init(this.diagramContainer);mxClient.IS_SVG&&null!=e.view.getDrawPane()&&(b=e.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=e.graphHandler){var J=e.graphHandler.start;e.graphHandler.start=function(){null!=ea.hoverIcons&&ea.hoverIcons.reset();J.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(G){var K=
+mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(G)-K.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(G)-K.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var D=!1,N=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(G,K){return D||N.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(G){32!=G.which||e.isEditing()?mxEvent.isConsumed(G)||
+27!=G.keyCode||this.hideDialog(null,!0):(D=!0,this.hoverIcons.reset(),e.container.style.cursor="move",e.isEditing()||mxEvent.getSource(G)!=e.container||mxEvent.consume(G))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(G){e.container.style.cursor="";D=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var S=e.panningHandler.isForcePanningEvent;e.panningHandler.isForcePanningEvent=function(G){return S.apply(this,arguments)||D||mxEvent.isMouseEvent(G.getEvent())&&
+(this.usePopupTrigger||!mxEvent.isPopupTrigger(G.getEvent()))&&(!mxEvent.isControlDown(G.getEvent())&&mxEvent.isRightMouseButton(G.getEvent())||mxEvent.isMiddleMouseButton(G.getEvent()))};var T=e.cellEditor.isStopEditingEvent;e.cellEditor.isStopEditingEvent=function(G){return T.apply(this,arguments)||13==G.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(G)||mxClient.IS_MAC&&mxEvent.isMetaDown(G)||mxClient.IS_SF&&mxEvent.isShiftDown(G))};var P=e.isZoomWheelEvent;e.isZoomWheelEvent=function(){return D||
+P.apply(this,arguments)};var Z=!1,U=null,V=null,aa=null,ia=mxUtils.bind(this,function(){if(null!=this.toolbar&&Z!=e.cellEditor.isContentEditing()){for(var G=this.toolbar.container.firstChild,K=[];null!=G;){var Q=G.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,G)&&(G.parentNode.removeChild(G),K.push(G));G=Q}G=this.toolbar.fontMenu;Q=this.toolbar.sizeMenu;if(null==aa)this.toolbar.createTextToolbar();else{for(var ba=0;ba<aa.length;ba++)this.toolbar.container.appendChild(aa[ba]);this.toolbar.fontMenu=
+U;this.toolbar.sizeMenu=V}Z=e.cellEditor.isContentEditing();U=G;V=Q;aa=K}}),ea=this,qa=e.cellEditor.startEditing;e.cellEditor.startEditing=function(){qa.apply(this,arguments);ia();if(e.cellEditor.isContentEditing()){var G=!1,K=function(){G||(G=!0,window.setTimeout(function(){var Q=e.getSelectedEditingElement();null!=Q&&(Q=mxUtils.getCurrentStyle(Q),null!=Q&&null!=ea.toolbar&&(ea.toolbar.setFontName(Graph.stripQuotes(Q.fontFamily)),ea.toolbar.setFontSize(parseInt(Q.fontSize))));G=!1},0))};mxEvent.addListener(e.cellEditor.textarea,
+"input",K);mxEvent.addListener(e.cellEditor.textarea,"touchend",K);mxEvent.addListener(e.cellEditor.textarea,"mouseup",K);mxEvent.addListener(e.cellEditor.textarea,"keyup",K);K()}};var O=e.cellEditor.stopEditing;e.cellEditor.stopEditing=function(G,K){try{O.apply(this,arguments),ia()}catch(Q){ea.handleError(Q)}};e.container.setAttribute("tabindex","0");e.container.style.cursor="default";if(window.self===window.top&&null!=e.container.parentNode)try{e.container.focus()}catch(G){}var R=e.fireMouseEvent;
+e.fireMouseEvent=function(G,K,Q){G==mxEvent.MOUSE_DOWN&&this.container.focus();R.apply(this,arguments)};e.popupMenuHandler.autoExpand=!0;null!=this.menus&&(e.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(G,K,Q){this.menus.createPopupMenu(G,K,Q)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(G){e.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};e.connectionHandler.addListener(mxEvent.CONNECT,function(G,
+K){var Q=[K.getProperty("cell")];K.getProperty("terminalInserted")&&(Q.push(K.getProperty("terminal")),window.setTimeout(function(){null!=ea.hoverIcons&&ea.hoverIcons.update(e.view.getState(Q[Q.length-1]))},0));C(Q)});this.addListener("styleChanged",mxUtils.bind(this,function(G,K){var Q=K.getProperty("cells"),ba=G=!1;if(0<Q.length)for(var la=0;la<Q.length&&(G=e.getModel().isVertex(Q[la])||G,!(ba=e.getModel().isEdge(Q[la])||ba)||!G);la++);else ba=G=!0;G=G&&!u;ba=ba&&!m;Q=K.getProperty("keys");K=K.getProperty("values");
+for(la=0;la<Q.length;la++){var ra=0<=mxUtils.indexOf(r,Q[la]);if("strokeColor"!=Q[la]||null!=K[la]&&"none"!=K[la])if(0<=mxUtils.indexOf(k,Q[la]))ba||0<=mxUtils.indexOf(x,Q[la])?null==K[la]?delete e.currentEdgeStyle[Q[la]]:e.currentEdgeStyle[Q[la]]=K[la]:G&&0<=mxUtils.indexOf(d,Q[la])&&(null==K[la]?delete e.currentVertexStyle[Q[la]]:e.currentVertexStyle[Q[la]]=K[la]);else if(0<=mxUtils.indexOf(d,Q[la])){if(G||ra)null==K[la]?delete e.currentVertexStyle[Q[la]]:e.currentVertexStyle[Q[la]]=K[la];if(ba||
+ra||0<=mxUtils.indexOf(x,Q[la]))null==K[la]?delete e.currentEdgeStyle[Q[la]]:e.currentEdgeStyle[Q[la]]=K[la]}}null!=this.toolbar&&(this.toolbar.setFontName(e.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(e.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==e.currentEdgeStyle.edgeStyle&&"1"==e.currentEdgeStyle.curved?"geSprite geSprite-curved":
+"straight"==e.currentEdgeStyle.edgeStyle||"none"==e.currentEdgeStyle.edgeStyle||null==e.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==e.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==e.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==e.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==e.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==e.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):
+"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==e.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==e.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==e.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"))}));null!=this.toolbar&&(a=mxUtils.bind(this,function(){var G=e.currentVertexStyle.fontFamily||"Helvetica",K=String(e.currentVertexStyle.fontSize||
+"12"),Q=e.getView().getState(e.getSelectionCell());null!=Q&&(G=Q.style[mxConstants.STYLE_FONTFAMILY]||G,K=Q.style[mxConstants.STYLE_FONTSIZE]||K,10<G.length&&(G=G.substring(0,8)+"..."));this.toolbar.setFontName(G);this.toolbar.setFontSize(K)}),e.getSelectionModel().addListener(mxEvent.CHANGE,a),e.getModel().addListener(mxEvent.CHANGE,a));e.addListener(mxEvent.CELLS_ADDED,function(G,K){G=K.getProperty("cells");K=K.getProperty("parent");null!=K&&e.getModel().isLayer(K)&&!e.isCellVisible(K)&&null!=G&&
+0<G.length&&e.getModel().setVisible(K,!0)});this.gestureHandler=mxUtils.bind(this,function(G){null!=this.currentMenu&&mxEvent.getSource(G)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});
+mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){e.view.validateBackground()}));this.addListener("backgroundColorChanged",
+mxUtils.bind(this,function(){e.view.validateBackground()}));e.addListener("gridSizeChanged",mxUtils.bind(this,function(){e.isGridEnabled()&&e.view.validateBackground()}));this.editor.resetGraph()}this.init();e.standalone||this.open()};EditorUi.compactUi=!0;
+EditorUi.parsePng=function(a,b,f){function e(n,u){var m=d;d+=u;return n.substring(m,d)}function g(n){n=e(n,4);return n.charCodeAt(3)+(n.charCodeAt(2)<<8)+(n.charCodeAt(1)<<16)+(n.charCodeAt(0)<<24)}var d=0;if(e(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=f&&f();else if(e(a,4),"IHDR"!=e(a,4))null!=f&&f();else{e(a,17);do{f=g(a);var k=e(a,4);if(null!=b&&b(d-8,k,f))break;value=e(a,f);e(a,4);if("IEND"==k)break}while(f)}};mxUtils.extend(EditorUi,mxEventSource);
EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.menubarHeight=30;EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.toolbarHeight=38;EditorUi.prototype.footerHeight=28;EditorUi.prototype.sidebarFooterHeight=34;EditorUi.prototype.hsplitPosition=640>=screen.width?118:"large"!=urlParams["sidebar-entries"]?212:240;EditorUi.prototype.allowAnimation=!0;EditorUi.prototype.lightboxMaxFitScale=2;
EditorUi.prototype.lightboxVerticalDivider=4;EditorUi.prototype.hsplitClickEnabled=!1;
-EditorUi.prototype.init=function(){var a=this.editor.graph;if(!a.standalone){"0"!=urlParams["shape-picker"]&&this.installShapePicker();mxEvent.addListener(a.container,"scroll",mxUtils.bind(this,function(){a.tooltipHandler.hide();null!=a.connectionHandler&&null!=a.connectionHandler.constraintHandler&&a.connectionHandler.constraintHandler.reset()}));a.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){a.tooltipHandler.hide();var d=a.getRubberband();null!=d&&d.cancel()}));mxEvent.addListener(a.container,
-"keydown",mxUtils.bind(this,function(d){this.onKeyDown(d)}));mxEvent.addListener(a.container,"keypress",mxUtils.bind(this,function(d){this.onKeyPress(d)}));this.addUndoListener();this.addBeforeUnloadListener();a.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));a.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));var b=a.setDefaultParent,f=this;this.editor.graph.setDefaultParent=function(){b.apply(this,
+EditorUi.prototype.init=function(){var a=this.editor.graph;if(!a.standalone){"0"!=urlParams["shape-picker"]&&this.installShapePicker();mxEvent.addListener(a.container,"scroll",mxUtils.bind(this,function(){a.tooltipHandler.hide();null!=a.connectionHandler&&null!=a.connectionHandler.constraintHandler&&a.connectionHandler.constraintHandler.reset()}));a.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){a.tooltipHandler.hide();var e=a.getRubberband();null!=e&&e.cancel()}));mxEvent.addListener(a.container,
+"keydown",mxUtils.bind(this,function(e){this.onKeyDown(e)}));mxEvent.addListener(a.container,"keypress",mxUtils.bind(this,function(e){this.onKeyPress(e)}));this.addUndoListener();this.addBeforeUnloadListener();a.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));a.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.updateActionStates()}));var b=a.setDefaultParent,f=this;this.editor.graph.setDefaultParent=function(){b.apply(this,
arguments);f.updateActionStates()};a.editLink=f.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()}};EditorUi.prototype.clearSelectionState=function(){this.selectionState=null};EditorUi.prototype.getSelectionState=function(){null==this.selectionState&&(this.selectionState=this.createSelectionState());return this.selectionState};
-EditorUi.prototype.createSelectionState=function(){for(var a=this.editor.graph,b=a.getSelectionCells(),f=this.initSelectionState(),d=!0,g=0;g<b.length;g++){var e=a.getCurrentCellStyle(b[g]);"0"!=mxUtils.getValue(e,mxConstants.STYLE_EDITABLE,"1")&&(this.updateSelectionStateForCell(f,b[g],b,d),d=!1)}this.updateSelectionStateForTableCells(f);return f};
+EditorUi.prototype.createSelectionState=function(){for(var a=this.editor.graph,b=a.getSelectionCells(),f=this.initSelectionState(),e=!0,g=0;g<b.length;g++){var d=a.getCurrentCellStyle(b[g]);"0"!=mxUtils.getValue(d,mxConstants.STYLE_EDITABLE,"1")&&(this.updateSelectionStateForCell(f,b[g],b,e),e=!1)}this.updateSelectionStateForTableCells(f);return f};
EditorUi.prototype.initSelectionState=function(){return{vertices:[],edges:[],cells:[],x:null,y:null,width:null,height:null,style:{},containsImage:!1,containsLabel:!1,fill:!0,glass:!0,rounded:!0,autoSize:!1,image:!0,shadow:!0,lineJumps:!0,resizable:!0,table:!1,cell:!1,row:!1,movable:!0,rotatable:!0,stroke:!0,swimlane:!1,unlocked:this.editor.graph.isEnabled(),connections:!1}};
-EditorUi.prototype.updateSelectionStateForTableCells=function(a){if(1<a.cells.length&&a.cell){for(var b=mxUtils.sortCells(a.cells),f=this.editor.graph.model,d=f.getParent(b[0]),g=f.getParent(d),e=d.getIndex(b[0]),k=g.getIndex(d),n=null,u=1,m=1,r=0,x=k<g.getChildCount()-1?f.getChildAt(f.getChildAt(g,k+1),e):null;r<b.length-1;){var B=b[++r];null==x||x!=B||null!=n&&u!=n||(n=u,u=0,m++,d=f.getParent(x),x=k+m<g.getChildCount()?f.getChildAt(f.getChildAt(g,k+m),e):null);var C=this.editor.graph.view.getState(B);
-if(B==f.getChildAt(d,e+u)&&null!=C&&1==mxUtils.getValue(C.style,"colspan",1)&&1==mxUtils.getValue(C.style,"rowspan",1))u++;else break}r==m*u-1&&(a.mergeCell=b[0],a.colspan=u,a.rowspan=m)}};
-EditorUi.prototype.updateSelectionStateForCell=function(a,b,f,d){f=this.editor.graph;a.cells.push(b);if(f.getModel().isVertex(b)){a.connections=0<f.model.getEdgeCount(b);a.unlocked=a.unlocked&&!f.isCellLocked(b);a.resizable=a.resizable&&f.isCellResizable(b);a.rotatable=a.rotatable&&f.isCellRotatable(b);a.movable=a.movable&&f.isCellMovable(b)&&!f.isTableRow(b)&&!f.isTableCell(b);a.swimlane=a.swimlane||f.isSwimlane(b);a.table=a.table||f.isTable(b);a.cell=a.cell||f.isTableCell(b);a.row=a.row||f.isTableRow(b);
-a.vertices.push(b);var g=f.getCellGeometry(b);if(null!=g&&(0<g.width?null==a.width?a.width=g.width:a.width!=g.width&&(a.width=""):a.containsLabel=!0,0<g.height?null==a.height?a.height=g.height:a.height!=g.height&&(a.height=""):a.containsLabel=!0,!g.relative||null!=g.offset)){var e=g.relative?g.offset.x:g.x;g=g.relative?g.offset.y:g.y;null==a.x?a.x=e:a.x!=e&&(a.x="");null==a.y?a.y=g:a.y!=g&&(a.y="")}}else f.getModel().isEdge(b)&&(a.edges.push(b),a.connections=!0,a.resizable=!1,a.rotatable=!1,a.movable=
-!1);b=f.view.getState(b);null!=b&&(a.autoSize=a.autoSize||f.isAutoSizeState(b),a.glass=a.glass&&f.isGlassState(b),a.rounded=a.rounded&&f.isRoundedState(b),a.lineJumps=a.lineJumps&&f.isLineJumpState(b),a.image=a.image&&f.isImageState(b),a.shadow=a.shadow&&f.isShadowState(b),a.fill=a.fill&&f.isFillState(b),a.stroke=a.stroke&&f.isStrokeState(b),e=mxUtils.getValue(b.style,mxConstants.STYLE_SHAPE,null),a.containsImage=a.containsImage||"image"==e,f.mergeStyle(b.style,a.style,d))};
-EditorUi.prototype.installShapePicker=function(){var a=this.editor.graph,b=this;a.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(u,m){"mouseDown"==m.getProperty("eventName")&&b.hideShapePicker()}));var f=mxUtils.bind(this,function(){b.hideShapePicker(!0)});a.addListener("wheel",f);a.addListener(mxEvent.ESCAPE,f);a.view.addListener(mxEvent.SCALE,f);a.view.addListener(mxEvent.SCALE_AND_TRANSLATE,f);a.getSelectionModel().addListener(mxEvent.CHANGE,f);var d=a.popupMenuHandler.isMenuShowing;
-a.popupMenuHandler.isMenuShowing=function(){return d.apply(this,arguments)||null!=b.shapePicker};var g=a.dblClick;a.dblClick=function(u,m){if(this.isEnabled())if(null!=m||null==b.sidebar||mxEvent.isShiftDown(u)||a.isCellLocked(a.getDefaultParent()))g.apply(this,arguments);else{var r=mxUtils.convertPoint(this.container,mxEvent.getClientX(u),mxEvent.getClientY(u));mxEvent.consume(u);window.setTimeout(mxUtils.bind(this,function(){b.showShapePicker(r.x,r.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",
-f);var e=this.hoverIcons.drag;this.hoverIcons.drag=function(){b.hideShapePicker();e.apply(this,arguments)};var k=this.hoverIcons.execute;this.hoverIcons.execute=function(u,m,r){var x=r.getEvent();this.graph.isCloneEvent(x)||mxEvent.isShiftDown(x)?k.apply(this,arguments):this.graph.connectVertex(u.cell,m,this.graph.defaultEdgeLength,x,null,null,mxUtils.bind(this,function(B,C,G){var J=a.getCompositeParent(u.cell);B=a.getCellGeometry(J);for(r.consume();null!=J&&a.model.isVertex(J)&&null!=B&&B.relative;)cell=
-J,J=a.model.getParent(cell),B=a.getCellGeometry(J);window.setTimeout(mxUtils.bind(this,function(){b.showShapePicker(r.getGraphX(),r.getGraphY(),J,mxUtils.bind(this,function(D){G(D);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(D))}),m)}),30)}),mxUtils.bind(this,function(B){this.graph.selectCellsForConnectVertex(B,x,this)}))};var n=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(u,m){null!=n&&window.clearTimeout(n);n=window.setTimeout(mxUtils.bind(this,function(){var r=
-m.getProperty("arrow"),x=m.getProperty("direction"),B=m.getProperty("event");r=r.getBoundingClientRect();var C=mxUtils.getOffset(a.container),G=a.container.scrollLeft+r.x-C.x;C=a.container.scrollTop+r.y-C.y;var J=a.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),D=b.showShapePicker(G,C,J,mxUtils.bind(this,function(N){null!=N&&a.connectVertex(J,x,a.defaultEdgeLength,B,!0,!0,function(Q,R,P){P(N);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(N))},
-function(Q){a.selectCellsForConnectVertex(Q)},B,this.hoverIcons)}),x,!0);this.centerShapePicker(D,r,G,C,x);mxUtils.setOpacity(D,30);mxEvent.addListener(D,"mouseenter",function(){mxUtils.setOpacity(D,100)});mxEvent.addListener(D,"mouseleave",function(){b.hideShapePicker()})}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(u,m){null!=n&&window.clearTimeout(n)}))}};
-EditorUi.prototype.centerShapePicker=function(a,b,f,d,g){if(g==mxConstants.DIRECTION_EAST||g==mxConstants.DIRECTION_WEST)a.style.width="40px";var e=a.getBoundingClientRect();g==mxConstants.DIRECTION_NORTH?(f-=e.width/2-10,d-=e.height+6):g==mxConstants.DIRECTION_SOUTH?(f-=e.width/2-10,d+=b.height+6):g==mxConstants.DIRECTION_WEST?(f-=e.width+6,d-=e.height/2-10):g==mxConstants.DIRECTION_EAST&&(f+=b.width+6,d-=e.height/2-10);a.style.left=f+"px";a.style.top=d+"px"};
-EditorUi.prototype.showShapePicker=function(a,b,f,d,g,e){a=this.createShapePicker(a,b,f,d,g,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(f,e),e);null!=a&&(null==this.hoverIcons||e||this.hoverIcons.reset(),e=this.editor.graph,e.popupMenuHandler.hideMenu(),e.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=d,this.shapePicker=a);return a};
-EditorUi.prototype.createShapePicker=function(a,b,f,d,g,e,k,n){var u=null;if(null!=k&&0<k.length){var m=this,r=this.editor.graph;u=document.createElement("div");g=r.view.getState(f);var x=null==f||null!=g&&r.isTransparentState(g)?null:r.copyStyle(f);f=6>k.length?35*k.length:140;u.className="geToolbarContainer geSidebarContainer";u.style.cssText="position:absolute;left:"+a+"px;top:"+b+"px;width:"+f+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+
+EditorUi.prototype.updateSelectionStateForTableCells=function(a){if(1<a.cells.length&&a.cell){for(var b=mxUtils.sortCells(a.cells),f=this.editor.graph.model,e=f.getParent(b[0]),g=f.getParent(e),d=e.getIndex(b[0]),k=g.getIndex(e),n=null,u=1,m=1,r=0,x=k<g.getChildCount()-1?f.getChildAt(f.getChildAt(g,k+1),d):null;r<b.length-1;){var B=b[++r];null==x||x!=B||null!=n&&u!=n||(n=u,u=0,m++,e=f.getParent(x),x=k+m<g.getChildCount()?f.getChildAt(f.getChildAt(g,k+m),d):null);var C=this.editor.graph.view.getState(B);
+if(B==f.getChildAt(e,d+u)&&null!=C&&1==mxUtils.getValue(C.style,"colspan",1)&&1==mxUtils.getValue(C.style,"rowspan",1))u++;else break}r==m*u-1&&(a.mergeCell=b[0],a.colspan=u,a.rowspan=m)}};
+EditorUi.prototype.updateSelectionStateForCell=function(a,b,f,e){f=this.editor.graph;a.cells.push(b);if(f.getModel().isVertex(b)){a.connections=0<f.model.getEdgeCount(b);a.unlocked=a.unlocked&&!f.isCellLocked(b);a.resizable=a.resizable&&f.isCellResizable(b);a.rotatable=a.rotatable&&f.isCellRotatable(b);a.movable=a.movable&&f.isCellMovable(b)&&!f.isTableRow(b)&&!f.isTableCell(b);a.swimlane=a.swimlane||f.isSwimlane(b);a.table=a.table||f.isTable(b);a.cell=a.cell||f.isTableCell(b);a.row=a.row||f.isTableRow(b);
+a.vertices.push(b);var g=f.getCellGeometry(b);if(null!=g&&(0<g.width?null==a.width?a.width=g.width:a.width!=g.width&&(a.width=""):a.containsLabel=!0,0<g.height?null==a.height?a.height=g.height:a.height!=g.height&&(a.height=""):a.containsLabel=!0,!g.relative||null!=g.offset)){var d=g.relative?g.offset.x:g.x;g=g.relative?g.offset.y:g.y;null==a.x?a.x=d:a.x!=d&&(a.x="");null==a.y?a.y=g:a.y!=g&&(a.y="")}}else f.getModel().isEdge(b)&&(a.edges.push(b),a.connections=!0,a.resizable=!1,a.rotatable=!1,a.movable=
+!1);b=f.view.getState(b);null!=b&&(a.autoSize=a.autoSize||f.isAutoSizeState(b),a.glass=a.glass&&f.isGlassState(b),a.rounded=a.rounded&&f.isRoundedState(b),a.lineJumps=a.lineJumps&&f.isLineJumpState(b),a.image=a.image&&f.isImageState(b),a.shadow=a.shadow&&f.isShadowState(b),a.fill=a.fill&&f.isFillState(b),a.stroke=a.stroke&&f.isStrokeState(b),d=mxUtils.getValue(b.style,mxConstants.STYLE_SHAPE,null),a.containsImage=a.containsImage||"image"==d,f.mergeStyle(b.style,a.style,e))};
+EditorUi.prototype.installShapePicker=function(){var a=this.editor.graph,b=this;a.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(u,m){"mouseDown"==m.getProperty("eventName")&&b.hideShapePicker()}));var f=mxUtils.bind(this,function(){b.hideShapePicker(!0)});a.addListener("wheel",f);a.addListener(mxEvent.ESCAPE,f);a.view.addListener(mxEvent.SCALE,f);a.view.addListener(mxEvent.SCALE_AND_TRANSLATE,f);a.getSelectionModel().addListener(mxEvent.CHANGE,f);var e=a.popupMenuHandler.isMenuShowing;
+a.popupMenuHandler.isMenuShowing=function(){return e.apply(this,arguments)||null!=b.shapePicker};var g=a.dblClick;a.dblClick=function(u,m){if(this.isEnabled())if(null!=m||null==b.sidebar||mxEvent.isShiftDown(u)||a.isCellLocked(a.getDefaultParent()))g.apply(this,arguments);else{var r=mxUtils.convertPoint(this.container,mxEvent.getClientX(u),mxEvent.getClientY(u));mxEvent.consume(u);window.setTimeout(mxUtils.bind(this,function(){b.showShapePicker(r.x,r.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",
+f);var d=this.hoverIcons.drag;this.hoverIcons.drag=function(){b.hideShapePicker();d.apply(this,arguments)};var k=this.hoverIcons.execute;this.hoverIcons.execute=function(u,m,r){var x=r.getEvent();this.graph.isCloneEvent(x)||mxEvent.isShiftDown(x)?k.apply(this,arguments):this.graph.connectVertex(u.cell,m,this.graph.defaultEdgeLength,x,null,null,mxUtils.bind(this,function(B,C,F){var J=a.getCompositeParent(u.cell);B=a.getCellGeometry(J);for(r.consume();null!=J&&a.model.isVertex(J)&&null!=B&&B.relative;)cell=
+J,J=a.model.getParent(cell),B=a.getCellGeometry(J);window.setTimeout(mxUtils.bind(this,function(){b.showShapePicker(r.getGraphX(),r.getGraphY(),J,mxUtils.bind(this,function(D){F(D);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(D))}),m)}),30)}),mxUtils.bind(this,function(B){this.graph.selectCellsForConnectVertex(B,x,this)}))};var n=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(u,m){null!=n&&window.clearTimeout(n);n=window.setTimeout(mxUtils.bind(this,function(){var r=
+m.getProperty("arrow"),x=m.getProperty("direction"),B=m.getProperty("event");r=r.getBoundingClientRect();var C=mxUtils.getOffset(a.container),F=a.container.scrollLeft+r.x-C.x;C=a.container.scrollTop+r.y-C.y;var J=a.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),D=b.showShapePicker(F,C,J,mxUtils.bind(this,function(N){null!=N&&a.connectVertex(J,x,a.defaultEdgeLength,B,!0,!0,function(S,T,P){P(N);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(N))},
+function(S){a.selectCellsForConnectVertex(S)},B,this.hoverIcons)}),x,!0);this.centerShapePicker(D,r,F,C,x);mxUtils.setOpacity(D,30);mxEvent.addListener(D,"mouseenter",function(){mxUtils.setOpacity(D,100)});mxEvent.addListener(D,"mouseleave",function(){b.hideShapePicker()})}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(u,m){null!=n&&window.clearTimeout(n)}))}};
+EditorUi.prototype.centerShapePicker=function(a,b,f,e,g){if(g==mxConstants.DIRECTION_EAST||g==mxConstants.DIRECTION_WEST)a.style.width="40px";var d=a.getBoundingClientRect();g==mxConstants.DIRECTION_NORTH?(f-=d.width/2-10,e-=d.height+6):g==mxConstants.DIRECTION_SOUTH?(f-=d.width/2-10,e+=b.height+6):g==mxConstants.DIRECTION_WEST?(f-=d.width+6,e-=d.height/2-10):g==mxConstants.DIRECTION_EAST&&(f+=b.width+6,e-=d.height/2-10);a.style.left=f+"px";a.style.top=e+"px"};
+EditorUi.prototype.showShapePicker=function(a,b,f,e,g,d){a=this.createShapePicker(a,b,f,e,g,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(f,d),d);null!=a&&(null==this.hoverIcons||d||this.hoverIcons.reset(),d=this.editor.graph,d.popupMenuHandler.hideMenu(),d.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=e,this.shapePicker=a);return a};
+EditorUi.prototype.createShapePicker=function(a,b,f,e,g,d,k,n){var u=null;if(null!=k&&0<k.length){var m=this,r=this.editor.graph;u=document.createElement("div");g=r.view.getState(f);var x=null==f||null!=g&&r.isTransparentState(g)?null:r.copyStyle(f);f=6>k.length?35*k.length:140;u.className="geToolbarContainer geSidebarContainer";u.style.cssText="position:absolute;left:"+a+"px;top:"+b+"px;width:"+f+"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+";";n||mxUtils.setPrefixedStyle(u.style,"transform","translate(-22px,-22px)");null!=r.background&&r.background!=mxConstants.NONE&&(u.style.backgroundColor=r.background);r.container.appendChild(u);f=mxUtils.bind(this,function(B){var C=document.createElement("a");C.className="geItem";C.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";u.appendChild(C);null!=x&&"1"!=urlParams.sketch?
-this.sidebar.graph.pasteStyle(x,[B]):m.insertHandler([B],""!=B.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([B],25,25,C,null,!0,!1,B.geometry.width,B.geometry.height);mxEvent.addListener(C,"click",function(){var G=r.cloneCell(B);if(null!=d)d(G);else{G.geometry.x=r.snap(Math.round(a/r.view.scale)-r.view.translate.x-B.geometry.width/2);G.geometry.y=r.snap(Math.round(b/r.view.scale)-r.view.translate.y-B.geometry.height/2);r.model.beginUpdate();try{r.addCell(G)}finally{r.model.endUpdate()}r.setSelectionCell(G);
-r.scrollCellToVisible(G);r.startEditingAtCell(G);null!=m.hoverIcons&&m.hoverIcons.update(r.view.getState(G))}null!=e&&e()})});for(g=0;g<(n?Math.min(k.length,4):k.length);g++)f(k[g]);k=u.offsetTop+u.clientHeight-(r.container.scrollTop+r.container.offsetHeight);0<k&&(u.style.top=Math.max(r.container.scrollTop+22,b-k)+"px");k=u.offsetLeft+u.clientWidth-(r.container.scrollLeft+r.container.offsetWidth);0<k&&(u.style.left=Math.max(r.container.scrollLeft+22,a-k)+"px")}return u};
-EditorUi.prototype.getCellsForShapePicker=function(a,b){b=mxUtils.bind(this,function(f,d,g,e){return this.editor.graph.createVertex(null,null,e||"",0,0,d||120,g||60,f,!1)});return[null!=a?this.editor.graph.cloneCell(a):b("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;",40,20,"Text"),b("whiteSpace=wrap;html=1;"),b("ellipse;whiteSpace=wrap;html=1;"),b("rhombus;whiteSpace=wrap;html=1;",80,80),b("rounded=1;whiteSpace=wrap;html=1;"),b("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),
+this.sidebar.graph.pasteStyle(x,[B]):m.insertHandler([B],""!=B.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([B],25,25,C,null,!0,!1,B.geometry.width,B.geometry.height);mxEvent.addListener(C,"click",function(){var F=r.cloneCell(B);if(null!=e)e(F);else{F.geometry.x=r.snap(Math.round(a/r.view.scale)-r.view.translate.x-B.geometry.width/2);F.geometry.y=r.snap(Math.round(b/r.view.scale)-r.view.translate.y-B.geometry.height/2);r.model.beginUpdate();try{r.addCell(F)}finally{r.model.endUpdate()}r.setSelectionCell(F);
+r.scrollCellToVisible(F);r.startEditingAtCell(F);null!=m.hoverIcons&&m.hoverIcons.update(r.view.getState(F))}null!=d&&d()})});for(g=0;g<(n?Math.min(k.length,4):k.length);g++)f(k[g]);k=u.offsetTop+u.clientHeight-(r.container.scrollTop+r.container.offsetHeight);0<k&&(u.style.top=Math.max(r.container.scrollTop+22,b-k)+"px");k=u.offsetLeft+u.clientWidth-(r.container.scrollLeft+r.container.offsetWidth);0<k&&(u.style.left=Math.max(r.container.scrollLeft+22,a-k)+"px")}return u};
+EditorUi.prototype.getCellsForShapePicker=function(a,b){b=mxUtils.bind(this,function(f,e,g,d){return this.editor.graph.createVertex(null,null,d||"",0,0,e||120,g||60,f,!1)});return[null!=a?this.editor.graph.cloneCell(a):b("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;",40,20,"Text"),b("whiteSpace=wrap;html=1;"),b("ellipse;whiteSpace=wrap;html=1;"),b("rhombus;whiteSpace=wrap;html=1;",80,80),b("rounded=1;whiteSpace=wrap;html=1;"),b("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),
b("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,60),b("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",120,80),b("shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,80),b("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;"),b("triangle;whiteSpace=wrap;html=1;",60,80),b("shape=document;whiteSpace=wrap;html=1;boundedLbl=1;",120,80),b("shape=tape;whiteSpace=wrap;html=1;",120,100),b("ellipse;shape=cloud;whiteSpace=wrap;html=1;",
120,80),b("shape=singleArrow;whiteSpace=wrap;html=1;arrowWidth=0.4;arrowSize=0.4;",80,60),b("shape=waypoint;sketch=0;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;",40,40)]};EditorUi.prototype.hideShapePicker=function(a){null!=this.shapePicker&&(this.shapePicker.parentNode.removeChild(this.shapePicker),this.shapePicker=null,a||null==this.shapePickerCallback||this.shapePickerCallback(),this.shapePickerCallback=null)};
-EditorUi.prototype.onKeyDown=function(a){var b=this.editor.graph;if(9==a.which&&b.isEnabled()&&!mxEvent.isControlDown(a)){if(b.isEditing())if(mxEvent.isAltDown(a))b.stopEditing(!1);else try{var f=b.cellEditor.isContentEditing()&&b.cellEditor.isTextSelected();if(window.getSelection&&b.cellEditor.isContentEditing()&&!f&&!mxClient.IS_IE&&!mxClient.IS_IE11){var d=window.getSelection(),g=0<d.rangeCount?d.getRangeAt(0).commonAncestorContainer:null;f=null!=g&&("LI"==g.nodeName||null!=g.parentNode&&"LI"==
-g.parentNode.nodeName)}f?document.execCommand(mxEvent.isShiftDown(a)?"outdent":"indent",!1,null):mxEvent.isShiftDown(a)?b.stopEditing(!1):b.cellEditor.insertTab(b.cellEditor.isContentEditing()?null:4)}catch(e){}else mxEvent.isAltDown(a)?b.selectParentCell():b.selectCell(!mxEvent.isShiftDown(a));mxEvent.consume(a)}};
+EditorUi.prototype.onKeyDown=function(a){var b=this.editor.graph;if(9==a.which&&b.isEnabled()&&!mxEvent.isControlDown(a)){if(b.isEditing())if(mxEvent.isAltDown(a))b.stopEditing(!1);else try{var f=b.cellEditor.isContentEditing()&&b.cellEditor.isTextSelected();if(window.getSelection&&b.cellEditor.isContentEditing()&&!f&&!mxClient.IS_IE&&!mxClient.IS_IE11){var e=window.getSelection(),g=0<e.rangeCount?e.getRangeAt(0).commonAncestorContainer:null;f=null!=g&&("LI"==g.nodeName||null!=g.parentNode&&"LI"==
+g.parentNode.nodeName)}f?document.execCommand(mxEvent.isShiftDown(a)?"outdent":"indent",!1,null):mxEvent.isShiftDown(a)?b.stopEditing(!1):b.cellEditor.insertTab(b.cellEditor.isContentEditing()?null:4)}catch(d){}else mxEvent.isAltDown(a)?b.selectParentCell():b.selectCell(!mxEvent.isShiftDown(a));mxEvent.consume(a)}};
EditorUi.prototype.onKeyPress=function(a){var b=this.editor.graph;!this.isImmediateEditingEvent(a)||b.isEditing()||b.isSelectionEmpty()||0===a.which||27===a.which||mxEvent.isAltDown(a)||mxEvent.isControlDown(a)||mxEvent.isMetaDown(a)||(b.escape(),b.startEditing(),mxClient.IS_FF&&(b=b.cellEditor,null!=b.textarea&&(b.textarea.innerHTML=String.fromCharCode(a.which),a=document.createRange(),a.selectNodeContents(b.textarea),a.collapse(!1),b=window.getSelection(),b.removeAllRanges(),b.addRange(a))))};
EditorUi.prototype.isImmediateEditingEvent=function(a){return!0};
-EditorUi.prototype.updateCssForMarker=function(a,b,f,d,g){a.style.verticalAlign="top";a.style.height="21px";a.style.width="21px";a.innerText="";"flexArrow"==f?a.className=null!=d&&d!=mxConstants.NONE?"geSprite geSprite-"+b+"blocktrans":"geSprite geSprite-noarrow":(f=this.getImageForMarker(d,g),null!=f?(d=document.createElement("img"),d.style.position="absolute",d.style.marginTop="0.5px",d.setAttribute("src",f),a.className="","end"==b&&mxUtils.setPrefixedStyle(d.style,"transform","scaleX(-1)"),Editor.isDarkMode()&&
-(d.style.filter="invert(100%)"),a.appendChild(d)):(a.className="geSprite geSprite-noarrow",a.innerHTML=mxUtils.htmlEntities(mxResources.get("none")),a.style.backgroundImage="none",a.style.verticalAlign="top",a.style.marginTop="4px",a.style.fontSize="10px",a.style.filter="none",a.style.color=this.defaultStrokeColor,a.nextSibling.style.marginTop="0px"))};
+EditorUi.prototype.updateCssForMarker=function(a,b,f,e,g){a.style.verticalAlign="top";a.style.height="21px";a.style.width="21px";a.innerText="";"flexArrow"==f?a.className=null!=e&&e!=mxConstants.NONE?"geSprite geSprite-"+b+"blocktrans":"geSprite geSprite-noarrow":(f=this.getImageForMarker(e,g),null!=f?(e=document.createElement("img"),e.style.position="absolute",e.style.marginTop="0.5px",e.setAttribute("src",f),a.className="","end"==b&&mxUtils.setPrefixedStyle(e.style,"transform","scaleX(-1)"),Editor.isDarkMode()&&
+(e.style.filter="invert(100%)"),a.appendChild(e)):(a.className="geSprite geSprite-noarrow",a.innerHTML=mxUtils.htmlEntities(mxResources.get("none")),a.style.backgroundImage="none",a.style.verticalAlign="top",a.style.marginTop="4px",a.style.fontSize="10px",a.style.filter="none",a.style.color=this.defaultStrokeColor,a.nextSibling.style.marginTop="0px"))};
EditorUi.prototype.getImageForMarker=function(a,b){var f=null;a==mxConstants.ARROW_CLASSIC?f="1"!=b?Format.classicMarkerImage.src:Format.classicFilledMarkerImage.src:a==mxConstants.ARROW_CLASSIC_THIN?f="1"!=b?Format.classicThinMarkerImage.src:Format.openThinFilledMarkerImage.src:a==mxConstants.ARROW_OPEN?f=Format.openFilledMarkerImage.src:a==mxConstants.ARROW_OPEN_THIN?f=Format.openThinFilledMarkerImage.src:a==mxConstants.ARROW_BLOCK?f="1"!=b?Format.blockMarkerImage.src:Format.blockFilledMarkerImage.src:
a==mxConstants.ARROW_BLOCK_THIN?f="1"!=b?Format.blockThinMarkerImage.src:Format.blockThinFilledMarkerImage.src:a==mxConstants.ARROW_OVAL?f="1"!=b?Format.ovalMarkerImage.src:Format.ovalFilledMarkerImage.src:a==mxConstants.ARROW_DIAMOND?f="1"!=b?Format.diamondMarkerImage.src:Format.diamondFilledMarkerImage.src:a==mxConstants.ARROW_DIAMOND_THIN?f="1"!=b?Format.diamondThinMarkerImage.src:Format.diamondThinFilledMarkerImage.src:"doubleBlock"==a?f="1"!=b?Format.doubleBlockMarkerImage.src:Format.doubleBlockFilledMarkerImage.src:
"box"==a?f=Format.boxMarkerImage.src:"halfCircle"==a?f=Format.halfCircleMarkerImage.src:"openAsync"==a?f=Format.openAsyncFilledMarkerImage.src:"async"==a?f="1"!=b?Format.asyncMarkerImage.src:Format.asyncFilledMarkerImage.src:"dash"==a?f=Format.dashMarkerImage.src:"baseDash"==a?f=Format.baseDashMarkerImage.src:"cross"==a?f=Format.crossMarkerImage.src:"circle"==a?f=Format.circleMarkerImage.src:"circlePlus"==a?f=Format.circlePlusMarkerImage.src:"ERone"==a?f=Format.EROneMarkerImage.src:"ERmandOne"==a?
f=Format.ERmandOneMarkerImage.src:"ERmany"==a?f=Format.ERmanyMarkerImage.src:"ERoneToMany"==a?f=Format.ERoneToManyMarkerImage.src:"ERzeroToOne"==a?f=Format.ERzeroToOneMarkerImage.src:"ERzeroToMany"==a&&(f=Format.ERzeroToManyMarkerImage.src);return f};EditorUi.prototype.createMenus=function(){return null};
EditorUi.prototype.updatePasteActionStates=function(){var a=this.editor.graph,b=this.actions.get("paste"),f=this.actions.get("pasteHere");b.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(!mxClient.IS_FF&&null!=navigator.clipboard||!mxClipboard.isEmpty())&&a.isEnabled()&&!a.isCellLocked(a.getDefaultParent()));f.setEnabled(b.isEnabled())};
-EditorUi.prototype.initClipboard=function(){var a=this,b=mxClipboard.cut;mxClipboard.cut=function(e){e.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):b.apply(this,arguments);a.updatePasteActionStates()};mxClipboard.copy=function(e){var k=null;if(e.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{k=k||e.getSelectionCells();k=e.getExportableCells(e.model.getTopmostCells(k));for(var n={},u=e.createCellLookup(k),m=e.cloneCells(k,null,n),r=new mxGraphModel,x=r.getChildAt(r.getRoot(),
-0),B=0;B<m.length;B++){r.add(x,m[B]);var C=e.view.getState(k[B]);if(null!=C){var G=e.getCellGeometry(m[B]);null!=G&&G.relative&&!r.isEdge(k[B])&&null==u[mxObjectIdentity.get(r.getParent(k[B]))]&&(G.offset=null,G.relative=!1,G.x=C.x/C.view.scale-C.view.translate.x,G.y=C.y/C.view.scale-C.view.translate.y)}}e.updateCustomLinks(e.createCellMapping(n,u),m);mxClipboard.insertCount=1;mxClipboard.setCells(m)}a.updatePasteActionStates();return k};var f=mxClipboard.paste;mxClipboard.paste=function(e){var k=
-null;e.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):k=f.apply(this,arguments);a.updatePasteActionStates();return k};var d=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){d.apply(this,arguments);a.updatePasteActionStates()};var g=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(e,k){g.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};
+EditorUi.prototype.initClipboard=function(){var a=this,b=mxClipboard.cut;mxClipboard.cut=function(d){d.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):b.apply(this,arguments);a.updatePasteActionStates()};mxClipboard.copy=function(d){var k=null;if(d.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{k=k||d.getSelectionCells();k=d.getExportableCells(d.model.getTopmostCells(k));for(var n={},u=d.createCellLookup(k),m=d.cloneCells(k,null,n),r=new mxGraphModel,x=r.getChildAt(r.getRoot(),
+0),B=0;B<m.length;B++){r.add(x,m[B]);var C=d.view.getState(k[B]);if(null!=C){var F=d.getCellGeometry(m[B]);null!=F&&F.relative&&!r.isEdge(k[B])&&null==u[mxObjectIdentity.get(r.getParent(k[B]))]&&(F.offset=null,F.relative=!1,F.x=C.x/C.view.scale-C.view.translate.x,F.y=C.y/C.view.scale-C.view.translate.y)}}d.updateCustomLinks(d.createCellMapping(n,u),m);mxClipboard.insertCount=1;mxClipboard.setCells(m)}a.updatePasteActionStates();return k};var f=mxClipboard.paste;mxClipboard.paste=function(d){var k=
+null;d.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):k=f.apply(this,arguments);a.updatePasteActionStates();return k};var e=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){e.apply(this,arguments);a.updatePasteActionStates()};var g=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(d,k){g.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};
EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=400;EditorUi.prototype.buttonZoomDelay=600;
-EditorUi.prototype.initCanvas=function(){var a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var F=this.graph.getPageLayout(),L=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+F.x*L.width),this.scale*(this.translate.y+F.y*L.height),this.scale*F.width*L.width,
-this.scale*F.height*L.height)};a.getPreferredPageSize=function(F,L,T){F=this.getPageLayout();L=this.getPageSize();return new mxRectangle(0,0,F.width*L.width,F.height*L.height)};var b=null,f=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(F,L,T,ca){if(null!=a.container&&!a.isViewer()){T=null!=T?T:0;ca=null!=ca?ca:0;var fa=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),wa=mxUtils.hasScrollbars(a.container),W=a.view.translate,aa=a.view.scale,
-oa=mxRectangle.fromRectangle(fa);oa.x=oa.x/aa-W.x;oa.y=oa.y/aa-W.y;oa.width/=aa;oa.height/=aa;W=a.container.scrollTop;var sa=a.container.scrollLeft,Ka=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)Ka+=3;var Ha=a.container.offsetWidth-Ka;Ka=a.container.offsetHeight-Ka;F=F?Math.max(.3,Math.min(L||1,Ha/oa.width)):aa;L=(Ha-F*oa.width)/2/F;var ua=0==this.lightboxVerticalDivider?0:(Ka-F*oa.height)/this.lightboxVerticalDivider/F;wa&&(L=Math.max(L,0),ua=Math.max(ua,
-0));if(wa||fa.width<Ha||fa.height<Ka)a.view.scaleAndTranslate(F,Math.floor(L-oa.x),Math.floor(ua-oa.y)),a.container.scrollTop=W*F/aa,a.container.scrollLeft=sa*F/aa;else if(0!=T||0!=ca)fa=a.view.translate,a.view.setTranslate(Math.floor(fa.x+T/aa),Math.floor(fa.y+ca/aa))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var d=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",d);this.destroyFunctions.push(function(){mxEvent.removeListener(window,
-"resize",d)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(F){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(F){a.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=
+EditorUi.prototype.initCanvas=function(){var a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var G=this.graph.getPageLayout(),K=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+G.x*K.width),this.scale*(this.translate.y+G.y*K.height),this.scale*G.width*K.width,
+this.scale*G.height*K.height)};a.getPreferredPageSize=function(G,K,Q){G=this.getPageLayout();K=this.getPageSize();return new mxRectangle(0,0,G.width*K.width,G.height*K.height)};var b=null,f=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(G,K,Q,ba){if(null!=a.container&&!a.isViewer()){Q=null!=Q?Q:0;ba=null!=ba?ba:0;var la=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),ra=mxUtils.hasScrollbars(a.container),X=a.view.translate,ca=a.view.scale,
+oa=mxRectangle.fromRectangle(la);oa.x=oa.x/ca-X.x;oa.y=oa.y/ca-X.y;oa.width/=ca;oa.height/=ca;X=a.container.scrollTop;var ta=a.container.scrollLeft,Ka=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)Ka+=3;var Ha=a.container.offsetWidth-Ka;Ka=a.container.offsetHeight-Ka;G=G?Math.max(.3,Math.min(K||1,Ha/oa.width)):ca;K=(Ha-G*oa.width)/2/G;var va=0==this.lightboxVerticalDivider?0:(Ka-G*oa.height)/this.lightboxVerticalDivider/G;ra&&(K=Math.max(K,0),va=Math.max(va,
+0));if(ra||la.width<Ha||la.height<Ka)a.view.scaleAndTranslate(G,Math.floor(K-oa.x),Math.floor(va-oa.y)),a.container.scrollTop=X*G/ca,a.container.scrollLeft=ta*G/ca;else if(0!=Q||0!=ba)la=a.view.translate,a.view.setTranslate(Math.floor(la.x+Q/ca),Math.floor(la.y+ba/ca))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var e=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",e);this.destroyFunctions.push(function(){mxEvent.removeListener(window,
+"resize",e)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(G){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(G){a.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=a.isViewer()?"0":"50%";mxClient.IS_IE||mxClient.IS_IE11?(this.chromelessToolbar.style.backgroundColor="#ffffff",this.chromelessToolbar.style.border="3px solid black"):this.chromelessToolbar.style.backgroundColor="#000000";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,
-"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var e=mxUtils.bind(this,function(){var F=mxUtils.getCurrentStyle(a.container);a.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=F?parseInt(F["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",e);e();var k=0;e=mxUtils.bind(this,function(F,L,T){k++;
-var ca=document.createElement("span");ca.style.paddingLeft="8px";ca.style.paddingRight="8px";ca.style.cursor="pointer";mxEvent.addListener(ca,"click",F);null!=T&&ca.setAttribute("title",T);F=document.createElement("img");F.setAttribute("border","0");F.setAttribute("src",L);F.style.width="36px";F.style.filter="invert(100%)";ca.appendChild(F);this.chromelessToolbar.appendChild(ca);return ca});null!=g.backBtn&&e(mxUtils.bind(this,function(F){window.location.href=g.backBtn.url;mxEvent.consume(F)}),Editor.backImage,
-mxResources.get("back",null,"Back"));if(this.isPagesEnabled()){var n=e(mxUtils.bind(this,function(F){this.actions.get("previousPage").funct();mxEvent.consume(F)}),Editor.previousImage,mxResources.get("previousPage")),u=document.createElement("div");u.style.fontFamily=Editor.defaultHtmlFont;u.style.display="inline-block";u.style.verticalAlign="top";u.style.fontWeight="bold";u.style.marginTop="8px";u.style.fontSize="14px";u.style.color=mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";this.chromelessToolbar.appendChild(u);
-var m=e(mxUtils.bind(this,function(F){this.actions.get("nextPage").funct();mxEvent.consume(F)}),Editor.nextImage,mxResources.get("nextPage")),r=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(u.innerText="",mxUtils.write(u,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});n.style.paddingLeft="0px";n.style.paddingRight="4px";m.style.paddingLeft="4px";m.style.paddingRight="0px";var x=mxUtils.bind(this,function(){null!=this.pages&&
-1<this.pages.length&&null!=this.currentPage?(m.style.display="",n.style.display="",u.style.display="inline-block"):(m.style.display="none",n.style.display="none",u.style.display="none");r()});this.editor.addListener("resetGraphView",x);this.editor.addListener("pageSelected",r)}e(mxUtils.bind(this,function(F){this.actions.get("zoomOut").funct();mxEvent.consume(F)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");e(mxUtils.bind(this,function(F){this.actions.get("zoomIn").funct();
-mxEvent.consume(F)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");e(mxUtils.bind(this,function(F){a.isLightboxView()?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(F)}),Editor.zoomFitImage,mxResources.get("fit"));var B=null,C=null,G=mxUtils.bind(this,function(F){null!=B&&(window.clearTimeout(B),B=null);null!=C&&(window.clearTimeout(C),C=null);B=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,
-0);B=null;C=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";C=null}),600)}),F||200)}),J=mxUtils.bind(this,function(F){null!=B&&(window.clearTimeout(B),B=null);null!=C&&(window.clearTimeout(C),C=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,F||30)});if("1"==urlParams.layers){this.layersDialog=null;var D=e(mxUtils.bind(this,function(F){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),
-this.layersDialog=null;else{this.layersDialog=a.createLayersDialog(null,!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var L=D.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=L.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));L=mxUtils.getCurrentStyle(this.editor.graph.container);
-this.layersDialog.style.zIndex=L.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(F)}),Editor.layersImage,mxResources.get("layers")),N=a.getModel();N.addListener(mxEvent.CHANGE,function(){D.style.display=1<N.getChildCount(N.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(e);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||e(mxUtils.bind(this,function(F){null!=
-this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(F)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(x=0;x<this.lightboxToolbarActions.length;x++){var Q=this.lightboxToolbarActions[x];Q.elem=e(Q.fn,Q.icon,Q.tooltip)}null!=g.refreshBtn&&e(mxUtils.bind(this,function(F){g.refreshBtn.url?window.location.href=g.refreshBtn.url:
-window.location.reload();mxEvent.consume(F)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"));null!=g.fullscreenBtn&&window.self!==window.top&&e(mxUtils.bind(this,function(F){g.fullscreenBtn.url?a.openLink(g.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(F)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(g.closeBtn&&window.self===window.top||a.lightbox&&("1"==urlParams.close||this.container!=document.body))&&e(mxUtils.bind(this,
-function(F){"1"==urlParams.close||g.closeBtn?window.close():(this.destroy(),mxEvent.consume(F))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";a.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(F){mxEvent.isTouchEvent(F)||(mxEvent.isShiftDown(F)||
-J(30),G())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(F){mxEvent.consume(F)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(F){a.tooltipHandler.resetTimer();a.tooltipHandler.hideTooltip();mxEvent.isShiftDown(F)?G():J(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(F){mxEvent.isShiftDown(F)?G():J(100);mxEvent.consume(F)}));mxEvent.addListener(this.chromelessToolbar,
-"mouseleave",mxUtils.bind(this,function(F){mxEvent.isTouchEvent(F)||J(30)}));var R=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(F,L){this.startX=L.getGraphX();this.startY=L.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(F,L){},mouseUp:function(F,L){mxEvent.isTouchEvent(L.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<R&&Math.abs(this.scrollTop-a.container.scrollTop)<R&&
-Math.abs(this.startX-L.getGraphX())<R&&Math.abs(this.startY-L.getGraphY())<R&&(0<parseFloat(f.chromelessToolbar.style.opacity||0)?G():J(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var P=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var F=this.graph.getPagePadding(),L=this.graph.getPageSize();this.translate.x=F.x-(this.x0||0)*L.width;this.translate.y=F.y-(this.y0||0)*L.height}P.apply(this,
-arguments)};if(!a.isViewer()){var Z=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var F=this.getPageLayout(),L=this.getPagePadding(),T=this.getPageSize(),ca=Math.ceil(2*L.x+F.width*T.width),fa=Math.ceil(2*L.y+F.height*T.height),wa=a.minimumGraphSize;if(null==wa||wa.width!=ca||wa.height!=fa)a.minimumGraphSize=new mxRectangle(0,0,ca,fa);ca=L.x-F.x*T.width;L=L.y-F.y*T.height;this.autoTranslate||this.view.translate.x==ca&&this.view.translate.y==
-L?Z.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=F.x,this.view.y0=F.y,F=a.view.translate.x,T=a.view.translate.y,a.view.setTranslate(ca,L),a.container.scrollLeft+=Math.round((ca-F)*a.view.scale),a.container.scrollTop+=Math.round((L-T)*a.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var U=a.view.getBackgroundPane(),V=a.view.getDrawPane();a.cumulativeZoomFactor=1;var ia=null,ha=null,ba=null,qa=null,O=null,S=function(F){null!=
-ia&&window.clearTimeout(ia);0<=F&&window.setTimeout(function(){if(!a.isMouseDown||qa)ia=window.setTimeout(mxUtils.bind(this,function(){a.isFastZoomEnabled()&&(null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null)),V.style.transformOrigin="",U.style.transformOrigin="",mxClient.IS_SF?(V.style.transform="scale(1)",
-U.style.transform="scale(1)",window.setTimeout(function(){V.style.transform="";U.style.transform=""},0)):(V.style.transform="",U.style.transform=""),a.view.getDecoratorPane().style.opacity="",a.view.getOverlayPane().style.opacity="");var L=new mxPoint(a.container.scrollLeft,a.container.scrollTop),T=mxUtils.getOffset(a.container),ca=a.view.scale,fa=0,wa=0;null!=ha&&(fa=a.container.offsetWidth/2-ha.x+T.x,wa=a.container.offsetHeight/2-ha.y+T.y);a.zoom(a.cumulativeZoomFactor,null,a.isFastZoomEnabled()?
-20:null);a.view.scale!=ca&&(null!=ba&&(fa+=L.x-ba.x,wa+=L.y-ba.y),null!=b&&f.chromelessResize(!1,null,fa*(a.cumulativeZoomFactor-1),wa*(a.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==fa&&0==wa||(a.container.scrollLeft-=fa*(a.cumulativeZoomFactor-1),a.container.scrollTop-=wa*(a.cumulativeZoomFactor-1)));null!=O&&V.setAttribute("filter",O);a.cumulativeZoomFactor=1;O=qa=ha=ba=ia=null}),null!=F?F:a.isFastZoomEnabled()?f.wheelZoomDelay:f.lazyZoomDelay)},0)};a.lazyZoom=function(F,L,
-T,ca){ca=null!=ca?ca:this.zoomFactor;(L=L||!a.scrollbars)&&(ha=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/2));F?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=ca,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-
-.05)/this.view.scale:(this.cumulativeZoomFactor/=ca,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;a.isFastZoomEnabled()&&(null==O&&""!=V.getAttribute("filter")&&(O=V.getAttribute("filter"),V.removeAttribute("filter")),ba=new mxPoint(a.container.scrollLeft,a.container.scrollTop),F=L||null==ha?a.container.scrollLeft+a.container.clientWidth/
-2:ha.x+a.container.scrollLeft-a.container.offsetLeft,ca=L||null==ha?a.container.scrollTop+a.container.clientHeight/2:ha.y+a.container.scrollTop-a.container.offsetTop,V.style.transformOrigin=F+"px "+ca+"px",V.style.transform="scale("+this.cumulativeZoomFactor+")",U.style.transformOrigin=F+"px "+ca+"px",U.style.transform="scale("+this.cumulativeZoomFactor+")",null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(F=a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(F.style,
-"transform-origin",(L||null==ha?a.container.clientWidth/2+a.container.scrollLeft-F.offsetLeft+"px":ha.x+a.container.scrollLeft-F.offsetLeft-a.container.offsetLeft+"px")+" "+(L||null==ha?a.container.clientHeight/2+a.container.scrollTop-F.offsetTop+"px":ha.y+a.container.scrollTop-F.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(F.style,"transform","scale("+this.cumulativeZoomFactor+")")),a.view.getDecoratorPane().style.opacity="0",a.view.getOverlayPane().style.opacity="0",null!=f.hoverIcons&&
-f.hoverIcons.reset());S(a.isFastZoomEnabled()?T:0)};mxEvent.addGestureListeners(a.container,function(F){null!=ia&&window.clearTimeout(ia)},null,function(F){1!=a.cumulativeZoomFactor&&S(0)});mxEvent.addListener(a.container,"scroll",function(F){null==ia||a.isMouseDown||1==a.cumulativeZoomFactor||S(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(F,L,T,ca,fa){a.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!a.scrollbars&&!T&&a.isScrollWheelEvent(F))T=
-a.view.getTranslate(),ca=40/a.view.scale,mxEvent.isShiftDown(F)?a.view.setTranslate(T.x+(L?-ca:ca),T.y):a.view.setTranslate(T.x,T.y+(L?ca:-ca));else if(T||a.isZoomWheelEvent(F))for(var wa=mxEvent.getSource(F);null!=wa;){if(wa==a.container)return a.tooltipHandler.hideTooltip(),ha=null!=ca&&null!=fa?new mxPoint(ca,fa):new mxPoint(mxEvent.getClientX(F),mxEvent.getClientY(F)),qa=T,T=a.zoomFactor,ca=null,F.ctrlKey&&null!=F.deltaY&&40>Math.abs(F.deltaY)&&Math.round(F.deltaY)!=F.deltaY?T=1+Math.abs(F.deltaY)/
-20*(T-1):null!=F.movementY&&"pointermove"==F.type&&(T=1+Math.max(1,Math.abs(F.movementY))/20*(T-1),ca=-1),a.lazyZoom(L,null,ca,T),mxEvent.consume(F),!1;wa=wa.parentNode}}),a.container);a.panningHandler.zoomGraph=function(F){a.cumulativeZoomFactor=F.scale;a.lazyZoom(0<F.scale,!0);mxEvent.consume(F)}};EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(b){this.actions.get("print").funct();mxEvent.consume(b)}),Editor.printImage,mxResources.get("print"))};
+"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var d=mxUtils.bind(this,function(){var G=mxUtils.getCurrentStyle(a.container);a.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=G?parseInt(G["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",d);d();var k=0;d=mxUtils.bind(this,function(G,K,Q){k++;
+var ba=document.createElement("span");ba.style.paddingLeft="8px";ba.style.paddingRight="8px";ba.style.cursor="pointer";mxEvent.addListener(ba,"click",G);null!=Q&&ba.setAttribute("title",Q);G=document.createElement("img");G.setAttribute("border","0");G.setAttribute("src",K);G.style.width="36px";G.style.filter="invert(100%)";ba.appendChild(G);this.chromelessToolbar.appendChild(ba);return ba});null!=g.backBtn&&d(mxUtils.bind(this,function(G){window.location.href=g.backBtn.url;mxEvent.consume(G)}),Editor.backImage,
+mxResources.get("back",null,"Back"));if(this.isPagesEnabled()){var n=d(mxUtils.bind(this,function(G){this.actions.get("previousPage").funct();mxEvent.consume(G)}),Editor.previousImage,mxResources.get("previousPage")),u=document.createElement("div");u.style.fontFamily=Editor.defaultHtmlFont;u.style.display="inline-block";u.style.verticalAlign="top";u.style.fontWeight="bold";u.style.marginTop="8px";u.style.fontSize="14px";u.style.color=mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";this.chromelessToolbar.appendChild(u);
+var m=d(mxUtils.bind(this,function(G){this.actions.get("nextPage").funct();mxEvent.consume(G)}),Editor.nextImage,mxResources.get("nextPage")),r=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(u.innerText="",mxUtils.write(u,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});n.style.paddingLeft="0px";n.style.paddingRight="4px";m.style.paddingLeft="4px";m.style.paddingRight="0px";var x=mxUtils.bind(this,function(){null!=this.pages&&
+1<this.pages.length&&null!=this.currentPage?(m.style.display="",n.style.display="",u.style.display="inline-block"):(m.style.display="none",n.style.display="none",u.style.display="none");r()});this.editor.addListener("resetGraphView",x);this.editor.addListener("pageSelected",r)}d(mxUtils.bind(this,function(G){this.actions.get("zoomOut").funct();mxEvent.consume(G)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");d(mxUtils.bind(this,function(G){this.actions.get("zoomIn").funct();
+mxEvent.consume(G)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");d(mxUtils.bind(this,function(G){a.isLightboxView()?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(G)}),Editor.zoomFitImage,mxResources.get("fit"));var B=null,C=null,F=mxUtils.bind(this,function(G){null!=B&&(window.clearTimeout(B),B=null);null!=C&&(window.clearTimeout(C),C=null);B=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,
+0);B=null;C=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";C=null}),600)}),G||200)}),J=mxUtils.bind(this,function(G){null!=B&&(window.clearTimeout(B),B=null);null!=C&&(window.clearTimeout(C),C=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,G||30)});if("1"==urlParams.layers){this.layersDialog=null;var D=d(mxUtils.bind(this,function(G){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),
+this.layersDialog=null;else{this.layersDialog=a.createLayersDialog(null,!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var K=D.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=K.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));K=mxUtils.getCurrentStyle(this.editor.graph.container);
+this.layersDialog.style.zIndex=K.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(G)}),Editor.layersImage,mxResources.get("layers")),N=a.getModel();N.addListener(mxEvent.CHANGE,function(){D.style.display=1<N.getChildCount(N.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(d);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||d(mxUtils.bind(this,function(G){null!=
+this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(G)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(x=0;x<this.lightboxToolbarActions.length;x++){var S=this.lightboxToolbarActions[x];S.elem=d(S.fn,S.icon,S.tooltip)}null!=g.refreshBtn&&d(mxUtils.bind(this,function(G){g.refreshBtn.url?window.location.href=g.refreshBtn.url:
+window.location.reload();mxEvent.consume(G)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"));null!=g.fullscreenBtn&&window.self!==window.top&&d(mxUtils.bind(this,function(G){g.fullscreenBtn.url?a.openLink(g.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(G)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(g.closeBtn&&window.self===window.top||a.lightbox&&("1"==urlParams.close||this.container!=document.body))&&d(mxUtils.bind(this,
+function(G){"1"==urlParams.close||g.closeBtn?window.close():(this.destroy(),mxEvent.consume(G))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";a.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(G){mxEvent.isTouchEvent(G)||(mxEvent.isShiftDown(G)||
+J(30),F())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(G){mxEvent.consume(G)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(G){a.tooltipHandler.resetTimer();a.tooltipHandler.hideTooltip();mxEvent.isShiftDown(G)?F():J(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(G){mxEvent.isShiftDown(G)?F():J(100);mxEvent.consume(G)}));mxEvent.addListener(this.chromelessToolbar,
+"mouseleave",mxUtils.bind(this,function(G){mxEvent.isTouchEvent(G)||J(30)}));var T=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(G,K){this.startX=K.getGraphX();this.startY=K.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(G,K){},mouseUp:function(G,K){mxEvent.isTouchEvent(K.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<T&&Math.abs(this.scrollTop-a.container.scrollTop)<T&&
+Math.abs(this.startX-K.getGraphX())<T&&Math.abs(this.startY-K.getGraphY())<T&&(0<parseFloat(f.chromelessToolbar.style.opacity||0)?F():J(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var P=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var G=this.graph.getPagePadding(),K=this.graph.getPageSize();this.translate.x=G.x-(this.x0||0)*K.width;this.translate.y=G.y-(this.y0||0)*K.height}P.apply(this,
+arguments)};if(!a.isViewer()){var Z=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var G=this.getPageLayout(),K=this.getPagePadding(),Q=this.getPageSize(),ba=Math.ceil(2*K.x+G.width*Q.width),la=Math.ceil(2*K.y+G.height*Q.height),ra=a.minimumGraphSize;if(null==ra||ra.width!=ba||ra.height!=la)a.minimumGraphSize=new mxRectangle(0,0,ba,la);ba=K.x-G.x*Q.width;K=K.y-G.y*Q.height;this.autoTranslate||this.view.translate.x==ba&&this.view.translate.y==
+K?Z.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=G.x,this.view.y0=G.y,G=a.view.translate.x,Q=a.view.translate.y,a.view.setTranslate(ba,K),a.container.scrollLeft+=Math.round((ba-G)*a.view.scale),a.container.scrollTop+=Math.round((K-Q)*a.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var U=a.view.getBackgroundPane(),V=a.view.getDrawPane();a.cumulativeZoomFactor=1;var aa=null,ia=null,ea=null,qa=null,O=null,R=function(G){null!=
+aa&&window.clearTimeout(aa);0<=G&&window.setTimeout(function(){if(!a.isMouseDown||qa)aa=window.setTimeout(mxUtils.bind(this,function(){a.isFastZoomEnabled()&&(null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null)),V.style.transformOrigin="",U.style.transformOrigin="",mxClient.IS_SF?(V.style.transform="scale(1)",
+U.style.transform="scale(1)",window.setTimeout(function(){V.style.transform="";U.style.transform=""},0)):(V.style.transform="",U.style.transform=""),a.view.getDecoratorPane().style.opacity="",a.view.getOverlayPane().style.opacity="");var K=new mxPoint(a.container.scrollLeft,a.container.scrollTop),Q=mxUtils.getOffset(a.container),ba=a.view.scale,la=0,ra=0;null!=ia&&(la=a.container.offsetWidth/2-ia.x+Q.x,ra=a.container.offsetHeight/2-ia.y+Q.y);a.zoom(a.cumulativeZoomFactor,null,a.isFastZoomEnabled()?
+20:null);a.view.scale!=ba&&(null!=ea&&(la+=K.x-ea.x,ra+=K.y-ea.y),null!=b&&f.chromelessResize(!1,null,la*(a.cumulativeZoomFactor-1),ra*(a.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==la&&0==ra||(a.container.scrollLeft-=la*(a.cumulativeZoomFactor-1),a.container.scrollTop-=ra*(a.cumulativeZoomFactor-1)));null!=O&&V.setAttribute("filter",O);a.cumulativeZoomFactor=1;O=qa=ia=ea=aa=null}),null!=G?G:a.isFastZoomEnabled()?f.wheelZoomDelay:f.lazyZoomDelay)},0)};a.lazyZoom=function(G,K,
+Q,ba){ba=null!=ba?ba:this.zoomFactor;(K=K||!a.scrollbars)&&(ia=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/2));G?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=ba,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-
+.05)/this.view.scale:(this.cumulativeZoomFactor/=ba,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;a.isFastZoomEnabled()&&(null==O&&""!=V.getAttribute("filter")&&(O=V.getAttribute("filter"),V.removeAttribute("filter")),ea=new mxPoint(a.container.scrollLeft,a.container.scrollTop),G=K||null==ia?a.container.scrollLeft+a.container.clientWidth/
+2:ia.x+a.container.scrollLeft-a.container.offsetLeft,ba=K||null==ia?a.container.scrollTop+a.container.clientHeight/2:ia.y+a.container.scrollTop-a.container.offsetTop,V.style.transformOrigin=G+"px "+ba+"px",V.style.transform="scale("+this.cumulativeZoomFactor+")",U.style.transformOrigin=G+"px "+ba+"px",U.style.transform="scale("+this.cumulativeZoomFactor+")",null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(G=a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(G.style,
+"transform-origin",(K||null==ia?a.container.clientWidth/2+a.container.scrollLeft-G.offsetLeft+"px":ia.x+a.container.scrollLeft-G.offsetLeft-a.container.offsetLeft+"px")+" "+(K||null==ia?a.container.clientHeight/2+a.container.scrollTop-G.offsetTop+"px":ia.y+a.container.scrollTop-G.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(G.style,"transform","scale("+this.cumulativeZoomFactor+")")),a.view.getDecoratorPane().style.opacity="0",a.view.getOverlayPane().style.opacity="0",null!=f.hoverIcons&&
+f.hoverIcons.reset());R(a.isFastZoomEnabled()?Q:0)};mxEvent.addGestureListeners(a.container,function(G){null!=aa&&window.clearTimeout(aa)},null,function(G){1!=a.cumulativeZoomFactor&&R(0)});mxEvent.addListener(a.container,"scroll",function(G){null==aa||a.isMouseDown||1==a.cumulativeZoomFactor||R(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(G,K,Q,ba,la){a.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!a.scrollbars&&!Q&&a.isScrollWheelEvent(G))Q=
+a.view.getTranslate(),ba=40/a.view.scale,mxEvent.isShiftDown(G)?a.view.setTranslate(Q.x+(K?-ba:ba),Q.y):a.view.setTranslate(Q.x,Q.y+(K?ba:-ba));else if(Q||a.isZoomWheelEvent(G))for(var ra=mxEvent.getSource(G);null!=ra;){if(ra==a.container)return a.tooltipHandler.hideTooltip(),ia=null!=ba&&null!=la?new mxPoint(ba,la):new mxPoint(mxEvent.getClientX(G),mxEvent.getClientY(G)),qa=Q,Q=a.zoomFactor,ba=null,G.ctrlKey&&null!=G.deltaY&&40>Math.abs(G.deltaY)&&Math.round(G.deltaY)!=G.deltaY?Q=1+Math.abs(G.deltaY)/
+20*(Q-1):null!=G.movementY&&"pointermove"==G.type&&(Q=1+Math.max(1,Math.abs(G.movementY))/20*(Q-1),ba=-1),a.lazyZoom(K,null,ba,Q),mxEvent.consume(G),!1;ra=ra.parentNode}}),a.container);a.panningHandler.zoomGraph=function(G){a.cumulativeZoomFactor=G.scale;a.lazyZoom(0<G.scale,!0);mxEvent.consume(G)}};EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(b){this.actions.get("print").funct();mxEvent.consume(b)}),Editor.printImage,mxResources.get("print"))};
EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(a){return Graph.createOffscreenGraph(a)};EditorUi.prototype.addChromelessClickHandler=function(){var a=urlParams.highlight;null!=a&&0<a.length&&(a="#"+a);this.editor.graph.addClickHandler(a)};
EditorUi.prototype.toggleFormatPanel=function(a){a=null!=a?a:0==this.formatWidth;null!=this.format&&(this.formatWidth=a?240:0,this.formatContainer.style.display=a?"":"none",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};
EditorUi.prototype.lightboxFit=function(a){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var b=urlParams.border,f=60;null!=b&&(f=parseInt(b));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(f,null,null,null,null,null,a);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var a=this.editor.graph.getModel();return 1==a.getChildCount(a.root)&&0==a.getChildCount(a.getChildAt(a.root,0))};
EditorUi.prototype.isSelectionAllowed=function(a){return"SELECT"==mxEvent.getSource(a).nodeName||"INPUT"==mxEvent.getSource(a).nodeName&&mxUtils.isAncestorNode(this.formatContainer,mxEvent.getSource(a))};EditorUi.prototype.addBeforeUnloadListener=function(){window.onbeforeunload=mxUtils.bind(this,function(){if(!this.editor.isChromelessView())return this.onBeforeUnload()})};EditorUi.prototype.onBeforeUnload=function(){if(this.editor.modified)return mxResources.get("allChangesLost")};
-EditorUi.prototype.open=function(){try{null!=window.opener&&null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var f=mxUtils.parseXml(a);this.editor.setGraphXml(f.documentElement);this.editor.setModified(!1);this.editor.undoManager.clear();null!=b&&(this.editor.setFilename(b),this.updateDocumentTitle())}catch(d){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+d.message)}}))}catch(a){}this.editor.graph.view.validate();this.editor.graph.sizeDidChange();
-this.editor.fireEvent(new mxEventObject("resetGraphView"))};EditorUi.prototype.showPopupMenu=function(a,b,f,d){this.editor.graph.popupMenuHandler.hideMenu();var g=new mxPopupMenu(a);g.div.className+=" geMenubarMenu";g.smartSeparators=!0;g.showDisabled=!0;g.autoExpand=!0;g.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(g,arguments);g.destroy()});g.popup(b,f,null,d);this.setCurrentMenu(g)};
+EditorUi.prototype.open=function(){try{null!=window.opener&&null!=window.opener.openFile&&window.opener.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var f=mxUtils.parseXml(a);this.editor.setGraphXml(f.documentElement);this.editor.setModified(!1);this.editor.undoManager.clear();null!=b&&(this.editor.setFilename(b),this.updateDocumentTitle())}catch(e){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+e.message)}}))}catch(a){}this.editor.graph.view.validate();this.editor.graph.sizeDidChange();
+this.editor.fireEvent(new mxEventObject("resetGraphView"))};EditorUi.prototype.showPopupMenu=function(a,b,f,e){this.editor.graph.popupMenuHandler.hideMenu();var g=new mxPopupMenu(a);g.div.className+=" geMenubarMenu";g.smartSeparators=!0;g.showDisabled=!0;g.autoExpand=!0;g.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(g,arguments);g.destroy()});g.popup(b,f,null,e);this.setCurrentMenu(g)};
EditorUi.prototype.setCurrentMenu=function(a,b){this.currentMenuElt=b;this.currentMenu=a};EditorUi.prototype.resetCurrentMenu=function(){this.currentMenu=this.currentMenuElt=null};EditorUi.prototype.hideCurrentMenu=function(){null!=this.currentMenu&&(this.currentMenu.hideMenu(),this.resetCurrentMenu())};EditorUi.prototype.updateDocumentTitle=function(){var a=this.editor.getOrCreateFilename();null!=this.editor.appName&&(a+=" - "+this.editor.appName);document.title=a};
EditorUi.prototype.createHoverIcons=function(){return new HoverIcons(this.editor.graph)};EditorUi.prototype.redo=function(){try{this.editor.graph.isEditing()?document.execCommand("redo",!1,null):this.editor.undoManager.redo()}catch(a){}};EditorUi.prototype.undo=function(){try{var a=this.editor.graph;if(a.isEditing()){var b=a.cellEditor.textarea.innerHTML;document.execCommand("undo",!1,null);b==a.cellEditor.textarea.innerHTML&&(a.stopEditing(!0),this.editor.undoManager.undo())}else this.editor.undoManager.undo()}catch(f){}};
EditorUi.prototype.canRedo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canRedo()};EditorUi.prototype.canUndo=function(){return this.editor.graph.isEditing()||this.editor.undoManager.canUndo()};EditorUi.prototype.getEditBlankXml=function(){return mxUtils.getXml(this.editor.getGraphXml())};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0,f;for(f in urlParams)a=0==b?a+"?":a+"&",a+=f+"="+urlParams[f],b++;return a};
EditorUi.prototype.setScrollbars=function(a){var b=this.editor.graph,f=b.container.style.overflow;b.scrollbars=a;this.editor.updateGraphComponents();f!=b.container.style.overflow&&(b.container.scrollTop=0,b.container.scrollLeft=0,b.view.scaleAndTranslate(1,0,0),this.resetScrollbars());this.fireEvent(new mxEventObject("scrollbarsChanged"))};EditorUi.prototype.hasScrollbars=function(){return this.editor.graph.scrollbars};
EditorUi.prototype.resetScrollbars=function(){var a=this.editor.graph;if(!this.editor.extendCanvas)a.container.scrollTop=0,a.container.scrollLeft=0,mxUtils.hasScrollbars(a.container)||a.view.setTranslate(0,0);else if(!this.editor.isChromelessView())if(mxUtils.hasScrollbars(a.container))if(a.pageVisible){var b=a.getPagePadding();a.container.scrollTop=Math.floor(b.y-this.editor.initialTopSpacing)-1;a.container.scrollLeft=Math.floor(Math.min(b.x,(a.container.scrollWidth-a.container.clientWidth)/2))-
1;b=a.getGraphBounds();0<b.width&&0<b.height&&(b.x>a.container.scrollLeft+.9*a.container.clientWidth&&(a.container.scrollLeft=Math.min(b.x+b.width-a.container.clientWidth,b.x-10)),b.y>a.container.scrollTop+.9*a.container.clientHeight&&(a.container.scrollTop=Math.min(b.y+b.height-a.container.clientHeight,b.y-10)))}else{b=a.getGraphBounds();var f=Math.max(b.width,a.scrollTileSize.width*a.view.scale);a.container.scrollTop=Math.floor(Math.max(0,b.y-Math.max(20,(a.container.clientHeight-Math.max(b.height,
-a.scrollTileSize.height*a.view.scale))/4)));a.container.scrollLeft=Math.floor(Math.max(0,b.x-Math.max(0,(a.container.clientWidth-f)/2)))}else{b=mxRectangle.fromRectangle(a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds());f=a.view.translate;var d=a.view.scale;b.x=b.x/d-f.x;b.y=b.y/d-f.y;b.width/=d;b.height/=d;a.view.setTranslate(Math.floor(Math.max(0,(a.container.clientWidth-b.width)/2)-b.x+2),Math.floor((a.pageVisible?0:Math.max(0,(a.container.clientHeight-b.height)/4))-b.y+1))}};
-EditorUi.prototype.setPageVisible=function(a){var b=this.editor.graph,f=mxUtils.hasScrollbars(b.container),d=0,g=0;f&&(d=b.view.translate.x*b.view.scale-b.container.scrollLeft,g=b.view.translate.y*b.view.scale-b.container.scrollTop);b.pageVisible=a;b.pageBreaksVisible=a;b.preferPageSize=a;b.view.validateBackground();if(f){var e=b.getSelectionCells();b.clearSelection();b.setSelectionCells(e)}b.sizeDidChange();f&&(b.container.scrollLeft=b.view.translate.x*b.view.scale-d,b.container.scrollTop=b.view.translate.y*
-b.view.scale-g);b.defaultPageVisible=a;this.fireEvent(new mxEventObject("pageViewChanged"))};function ChangeGridColor(a,b){this.ui=a;this.color=b}ChangeGridColor.prototype.execute=function(){var a=this.ui.editor.graph.view.gridColor;this.ui.setGridColor(this.color);this.color=a};(function(){var a=new mxObjectCodec(new ChangeGridColor,["ui"]);mxCodecRegistry.register(a)})();
-function ChangePageSetup(a,b,f,d,g){this.ui=a;this.previousColor=this.color=b;this.previousImage=this.image=f;this.previousFormat=this.format=d;this.previousPageScale=this.pageScale=g;this.ignoreImage=this.ignoreColor=!1}
+a.scrollTileSize.height*a.view.scale))/4)));a.container.scrollLeft=Math.floor(Math.max(0,b.x-Math.max(0,(a.container.clientWidth-f)/2)))}else{b=mxRectangle.fromRectangle(a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds());f=a.view.translate;var e=a.view.scale;b.x=b.x/e-f.x;b.y=b.y/e-f.y;b.width/=e;b.height/=e;a.view.setTranslate(Math.floor(Math.max(0,(a.container.clientWidth-b.width)/2)-b.x+2),Math.floor((a.pageVisible?0:Math.max(0,(a.container.clientHeight-b.height)/4))-b.y+1))}};
+EditorUi.prototype.setPageVisible=function(a){var b=this.editor.graph,f=mxUtils.hasScrollbars(b.container),e=0,g=0;f&&(e=b.view.translate.x*b.view.scale-b.container.scrollLeft,g=b.view.translate.y*b.view.scale-b.container.scrollTop);b.pageVisible=a;b.pageBreaksVisible=a;b.preferPageSize=a;b.view.validateBackground();if(f){var d=b.getSelectionCells();b.clearSelection();b.setSelectionCells(d)}b.sizeDidChange();f&&(b.container.scrollLeft=b.view.translate.x*b.view.scale-e,b.container.scrollTop=b.view.translate.y*
+b.view.scale-g);b.defaultPageVisible=a;this.fireEvent(new mxEventObject("pageViewChanged"))};
+EditorUi.prototype.installResizeHandler=function(a,b,f){b&&(a.window.setSize=function(g,d){if(!this.minimized){var k=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;g=Math.min(g,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.getX());d=Math.min(d,k-this.getY())}mxWindow.prototype.setSize.apply(this,arguments)});a.window.setLocation=function(g,d){var k=window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth,
+n=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight,u=parseInt(this.div.style.width),m=parseInt(this.div.style.height);g=Math.max(0,Math.min(g,k-u));d=Math.max(0,Math.min(d,n-m));this.getX()==g&&this.getY()==d||mxWindow.prototype.setLocation.apply(this,arguments);b&&!this.minimized&&this.setSize(u,m)};var e=mxUtils.bind(this,function(){var g=a.window.getX(),d=a.window.getY();a.window.setLocation(g,d)});mxEvent.addListener(window,"resize",e);a.destroy=function(){mxEvent.removeListener(window,
+"resize",e);a.window.destroy();null!=f&&f()}};function ChangeGridColor(a,b){this.ui=a;this.color=b}ChangeGridColor.prototype.execute=function(){var a=this.ui.editor.graph.view.gridColor;this.ui.setGridColor(this.color);this.color=a};(function(){var a=new mxObjectCodec(new ChangeGridColor,["ui"]);mxCodecRegistry.register(a)})();
+function ChangePageSetup(a,b,f,e,g){this.ui=a;this.previousColor=this.color=b;this.previousImage=this.image=f;this.previousFormat=this.format=e;this.previousPageScale=this.pageScale=g;this.ignoreImage=this.ignoreColor=!1}
ChangePageSetup.prototype.execute=function(){var a=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var b=a.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=b}if(!this.ignoreImage){this.image=this.previousImage;b=a.backgroundImage;var f=this.previousImage;null!=f&&null!=f.src&&"data:page/id,"==f.src.substring(0,13)&&(f=this.ui.createImageForPageLink(f.src,this.ui.currentPage));this.ui.setBackgroundImage(f);this.previousImage=b}null!=this.previousFormat&&
(this.format=this.previousFormat,b=a.pageFormat,this.previousFormat.width!=b.width||this.previousFormat.height!=b.height)&&(this.ui.setPageFormat(this.previousFormat),this.previousFormat=b);null!=this.foldingEnabled&&this.foldingEnabled!=this.ui.editor.graph.foldingEnabled&&(this.ui.setFoldingEnabled(this.foldingEnabled),this.foldingEnabled=!this.foldingEnabled);null!=this.previousPageScale&&(a=this.ui.editor.graph.pageScale,this.previousPageScale!=a&&(this.ui.setPageScale(this.previousPageScale),
-this.previousPageScale=a))};(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat","previousPageScale"]);a.afterDecode=function(b,f,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;d.previousPageScale=d.pageScale;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);return d};mxCodecRegistry.register(a)})();
+this.previousPageScale=a))};(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat","previousPageScale"]);a.afterDecode=function(b,f,e){e.previousColor=e.color;e.previousImage=e.image;e.previousFormat=e.format;e.previousPageScale=e.pageScale;null!=e.foldingEnabled&&(e.foldingEnabled=!e.foldingEnabled);return e};mxCodecRegistry.register(a)})();
EditorUi.prototype.setBackgroundColor=function(a){this.editor.graph.background=a;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("backgroundColorChanged"))};EditorUi.prototype.setFoldingEnabled=function(a){this.editor.graph.foldingEnabled=a;this.editor.graph.view.revalidate();this.fireEvent(new mxEventObject("foldingEnabledChanged"))};
EditorUi.prototype.setPageFormat=function(a,b){b=null!=b?b:"1"==urlParams.sketch;this.editor.graph.pageFormat=a;b||(this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct());this.fireEvent(new mxEventObject("pageFormatChanged"))};
EditorUi.prototype.setPageScale=function(a){this.editor.graph.pageScale=a;this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct();this.fireEvent(new mxEventObject("pageScaleChanged"))};EditorUi.prototype.setGridColor=function(a){this.editor.graph.view.gridColor=a;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("gridColorChanged"))};
-EditorUi.prototype.addUndoListener=function(){var a=this.actions.get("undo"),b=this.actions.get("redo"),f=this.editor.undoManager,d=mxUtils.bind(this,function(){a.setEnabled(this.canUndo());b.setEnabled(this.canRedo())});f.addListener(mxEvent.ADD,d);f.addListener(mxEvent.UNDO,d);f.addListener(mxEvent.REDO,d);f.addListener(mxEvent.CLEAR,d);var g=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){g.apply(this,arguments);d()};var e=this.editor.graph.cellEditor.stopEditing;
-this.editor.graph.cellEditor.stopEditing=function(k,n){e.apply(this,arguments);d()};d()};
-EditorUi.prototype.updateActionStates=function(){for(var a=this.editor.graph,b=this.getSelectionState(),f=a.isEnabled()&&!a.isCellLocked(a.getDefaultParent()),d="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 strokeColor sharp snapToGrid".split(" "),g=0;g<d.length;g++)this.actions.get(d[g]).setEnabled(0<b.cells.length);
+EditorUi.prototype.addUndoListener=function(){var a=this.actions.get("undo"),b=this.actions.get("redo"),f=this.editor.undoManager,e=mxUtils.bind(this,function(){a.setEnabled(this.canUndo());b.setEnabled(this.canRedo())});f.addListener(mxEvent.ADD,e);f.addListener(mxEvent.UNDO,e);f.addListener(mxEvent.REDO,e);f.addListener(mxEvent.CLEAR,e);var g=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){g.apply(this,arguments);e()};var d=this.editor.graph.cellEditor.stopEditing;
+this.editor.graph.cellEditor.stopEditing=function(k,n){d.apply(this,arguments);e()};e()};
+EditorUi.prototype.updateActionStates=function(){for(var a=this.editor.graph,b=this.getSelectionState(),f=a.isEnabled()&&!a.isCellLocked(a.getDefaultParent()),e="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 strokeColor sharp snapToGrid".split(" "),g=0;g<e.length;g++)this.actions.get(e[g]).setEnabled(0<b.cells.length);
this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);this.actions.get("pasteSize").setEnabled(null!=this.copiedSize&&0<b.vertices.length);this.actions.get("pasteData").setEnabled(null!=this.copiedValue&&0<b.cells.length);this.actions.get("setAsDefaultStyle").setEnabled(1==a.getSelectionCount());this.actions.get("lockUnlock").setEnabled(!a.isSelectionEmpty());this.actions.get("bringForward").setEnabled(1==b.cells.length);this.actions.get("sendBackward").setEnabled(1==
b.cells.length);this.actions.get("rotation").setEnabled(1==b.vertices.length);this.actions.get("wordWrap").setEnabled(1==b.vertices.length);this.actions.get("autosize").setEnabled(1==b.vertices.length);this.actions.get("copySize").setEnabled(1==b.vertices.length);this.actions.get("clearWaypoints").setEnabled(b.connections);this.actions.get("curved").setEnabled(0<b.edges.length);this.actions.get("turn").setEnabled(0<b.cells.length);this.actions.get("group").setEnabled(!b.row&&!b.cell&&(1<b.cells.length||
1==b.vertices.length&&0==a.model.getChildCount(b.cells[0])&&!a.isContainer(b.vertices[0])));this.actions.get("ungroup").setEnabled(!b.row&&!b.cell&&!b.table&&0<b.vertices.length&&(a.isContainer(b.vertices[0])||0<a.getModel().getChildCount(b.vertices[0])));this.actions.get("removeFromGroup").setEnabled(1==b.cells.length&&a.getModel().isVertex(a.getModel().getParent(b.cells[0])));this.actions.get("collapsible").setEnabled(1==b.vertices.length&&(0<a.model.getChildCount(b.vertices[0])||a.isContainer(b.vertices[0])));
this.actions.get("exitGroup").setEnabled(null!=a.view.currentRoot);this.actions.get("home").setEnabled(null!=a.view.currentRoot);this.actions.get("enterGroup").setEnabled(1==b.cells.length&&a.isValidRoot(b.cells[0]));this.actions.get("editLink").setEnabled(1==b.cells.length);this.actions.get("openLink").setEnabled(1==b.cells.length&&null!=a.getLinkForCell(b.cells[0]));this.actions.get("guides").setEnabled(a.isEnabled());this.actions.get("selectVertices").setEnabled(f);this.actions.get("selectEdges").setEnabled(f);
-this.actions.get("selectAll").setEnabled(f);this.actions.get("selectNone").setEnabled(f);d=1==b.vertices.length&&a.isCellFoldable(b.vertices[0]);this.actions.get("expand").setEnabled(d);this.actions.get("collapse").setEnabled(d);this.menus.get("navigation").setEnabled(0<b.cells.length||null!=a.view.currentRoot);this.menus.get("layout").setEnabled(f);this.menus.get("insert").setEnabled(f);this.menus.get("direction").setEnabled(b.unlocked&&1==b.vertices.length);this.menus.get("distribute").setEnabled(b.unlocked&&
+this.actions.get("selectAll").setEnabled(f);this.actions.get("selectNone").setEnabled(f);e=1==b.vertices.length&&a.isCellFoldable(b.vertices[0]);this.actions.get("expand").setEnabled(e);this.actions.get("collapse").setEnabled(e);this.menus.get("navigation").setEnabled(0<b.cells.length||null!=a.view.currentRoot);this.menus.get("layout").setEnabled(f);this.menus.get("insert").setEnabled(f);this.menus.get("direction").setEnabled(b.unlocked&&1==b.vertices.length);this.menus.get("distribute").setEnabled(b.unlocked&&
1<b.vertices.length);this.menus.get("align").setEnabled(b.unlocked&&0<b.cells.length);this.updatePasteActionStates()};EditorUi.prototype.zeroOffset=new mxPoint(0,0);EditorUi.prototype.getDiagramContainerOffset=function(){return this.zeroOffset};
-EditorUi.prototype.refresh=function(a){a=null!=a?a:!0;var b=this.container.clientWidth,f=this.container.clientHeight;this.container==document.body&&(b=document.body.clientWidth||document.documentElement.clientWidth,f=document.documentElement.clientHeight);var d=0;mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&window.innerHeight!=document.documentElement.clientHeight&&(d=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var g=Math.max(0,Math.min(this.hsplitPosition,
-b-this.splitSize-20));b=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",b+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",b+=this.toolbarHeight);0<b&&(b+=1);var e=0;if(null!=this.sidebarFooterContainer){var k=this.footerHeight+d;e=Math.max(0,Math.min(f-b-k,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=g+"px";this.sidebarFooterContainer.style.height=
-e+"px";this.sidebarFooterContainer.style.bottom=k+"px"}f=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=b+"px";this.sidebarContainer.style.width=g+"px";this.formatContainer.style.top=b+"px";this.formatContainer.style.width=f+"px";this.formatContainer.style.display=null!=this.format?"":"none";k=this.getDiagramContainerOffset();var n=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+d+"px";this.hsplit.style.left=g+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=n+"px");0<this.footerHeight&&(this.footerContainer.style.bottom=d+"px");g=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+d+"px",this.tabContainer.style.right=this.diagramContainer.style.right,g=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+
-e+d+"px";this.formatContainer.style.bottom=this.footerHeight+d+"px";"1"!=urlParams.embedInline&&(this.diagramContainer.style.left=n+k.x+"px",this.diagramContainer.style.top=b+k.y+"px",this.diagramContainer.style.right=f+"px",this.diagramContainer.style.bottom=this.footerHeight+d+g+"px");a&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
+EditorUi.prototype.refresh=function(a){a=null!=a?a:!0;var b=this.container.clientWidth,f=this.container.clientHeight;this.container==document.body&&(b=document.body.clientWidth||document.documentElement.clientWidth,f=document.documentElement.clientHeight);var e=0;mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&window.innerHeight!=document.documentElement.clientHeight&&(e=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var g=Math.max(0,Math.min(this.hsplitPosition,
+b-this.splitSize-20));b=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",b+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",b+=this.toolbarHeight);0<b&&(b+=1);var d=0;if(null!=this.sidebarFooterContainer){var k=this.footerHeight+e;d=Math.max(0,Math.min(f-b-k,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=g+"px";this.sidebarFooterContainer.style.height=
+d+"px";this.sidebarFooterContainer.style.bottom=k+"px"}f=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=b+"px";this.sidebarContainer.style.width=g+"px";this.formatContainer.style.top=b+"px";this.formatContainer.style.width=f+"px";this.formatContainer.style.display=null!=this.format?"":"none";k=this.getDiagramContainerOffset();var n=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+e+"px";this.hsplit.style.left=g+"px";this.footerContainer.style.display=0==this.footerHeight?"none":"";null!=this.tabContainer&&(this.tabContainer.style.left=n+"px");0<this.footerHeight&&(this.footerContainer.style.bottom=e+"px");g=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+e+"px",this.tabContainer.style.right=f+"px",g=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+d+e+"px";this.formatContainer.style.bottom=
+this.footerHeight+e+"px";"1"!=urlParams.embedInline&&(this.diagramContainer.style.left=n+k.x+"px",this.diagramContainer.style.top=b+k.y+"px",this.diagramContainer.style.right=f+"px",this.diagramContainer.style.bottom=this.footerHeight+e+g+"px");a&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
EditorUi.prototype.createDivs=function(){this.menubarContainer=this.createDiv("geMenubarContainer");this.toolbarContainer=this.createDiv("geToolbarContainer");this.sidebarContainer=this.createDiv("geSidebarContainer");this.formatContainer=this.createDiv("geSidebarContainer geFormatContainer");this.diagramContainer=this.createDiv("geDiagramContainer");this.footerContainer=this.createDiv("geFooterContainer");this.hsplit=this.createDiv("geHsplit");this.hsplit.setAttribute("title",mxResources.get("collapseExpand"));
this.menubarContainer.style.top="0px";this.menubarContainer.style.left="0px";this.menubarContainer.style.right="0px";this.toolbarContainer.style.left="0px";this.toolbarContainer.style.right="0px";this.sidebarContainer.style.left="0px";this.formatContainer.style.right="0px";this.formatContainer.style.zIndex="1";this.diagramContainer.style.right=(null!=this.format?this.formatWidth:0)+"px";this.footerContainer.style.left="0px";this.footerContainer.style.right="0px";this.footerContainer.style.bottom=
"0px";this.footerContainer.style.zIndex=mxPopupMenu.prototype.zIndex-3;this.hsplit.style.width=this.splitSize+"px";if(this.sidebarFooterContainer=this.createSidebarFooterContainer())this.sidebarFooterContainer.style.left="0px";this.editor.chromeless?this.diagramContainer.style.border="none":this.tabContainer=this.createTabContainer()};EditorUi.prototype.createSidebarFooterContainer=function(){return null};
@@ -2568,19 +2571,19 @@ this.container.appendChild(this.sidebarFooterContainer);this.container.appendChi
!0,0,mxUtils.bind(this,function(b){this.hsplitPosition=b;this.refresh()})))};EditorUi.prototype.createStatusContainer=function(){var a=document.createElement("a");a.className="geItem geStatus";return a};EditorUi.prototype.setStatusText=function(a){this.statusContainer.innerHTML=a;0==this.statusContainer.getElementsByTagName("div").length&&(this.statusContainer.innerText="",a=this.createStatusDiv(a),this.statusContainer.appendChild(a))};
EditorUi.prototype.createStatusDiv=function(a){var b=document.createElement("div");b.setAttribute("title",a);b.innerHTML=a;return b};EditorUi.prototype.createToolbar=function(a){return new Toolbar(this,a)};EditorUi.prototype.createSidebar=function(a){return new Sidebar(this,a)};EditorUi.prototype.createFormat=function(a){return new Format(this,a)};EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};
EditorUi.prototype.createDiv=function(a){var b=document.createElement("div");b.className=a;return b};
-EditorUi.prototype.addSplitHandler=function(a,b,f,d){function g(x){if(null!=k){var B=new mxPoint(mxEvent.getClientX(x),mxEvent.getClientY(x));d(Math.max(0,n+(b?B.x-k.x:k.y-B.y)-f));mxEvent.consume(x);n!=r()&&(u=!0,m=null)}}function e(x){g(x);k=n=null}var k=null,n=null,u=!0,m=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var r=mxUtils.bind(this,function(){var x=parseInt(b?a.style.left:a.style.bottom);b||(x=x+f-this.footerHeight);return x});mxEvent.addGestureListeners(a,function(x){k=new mxPoint(mxEvent.getClientX(x),
-mxEvent.getClientY(x));n=r();u=!1;mxEvent.consume(x)});mxEvent.addListener(a,"click",mxUtils.bind(this,function(x){if(!u&&this.hsplitClickEnabled){var B=null!=m?m-f:0;m=r();d(B);mxEvent.consume(x)}}));mxEvent.addGestureListeners(document,null,g,e);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,g,e)})};
-EditorUi.prototype.prompt=function(a,b,f){a=new FilenameDialog(this,b,mxResources.get("apply"),function(d){f(parseFloat(d))},a);this.showDialog(a.container,300,80,!0,!0);a.init()};
-EditorUi.prototype.handleError=function(a,b,f,d,g){a=null!=a&&null!=a.error?a.error:a;if(null!=a||null!=b){g=mxUtils.htmlEntities(mxResources.get("unknownError"));var e=mxResources.get("ok");b=null!=b?b:mxResources.get("error");null!=a&&null!=a.message&&(g=mxUtils.htmlEntities(a.message));this.showError(b,g,e,f,null,null,null,null,null,null,null,null,d?f:null)}else null!=f&&f()};
-EditorUi.prototype.showError=function(a,b,f,d,g,e,k,n,u,m,r,x,B){a=new ErrorDialog(this,a,b,f||mxResources.get("ok"),d,g,e,k,x,n,u);b=Math.ceil(null!=b?b.length/50:1);this.showDialog(a.container,m||340,r||100+20*b,!0,!1,B);a.init()};EditorUi.prototype.showDialog=function(a,b,f,d,g,e,k,n,u,m){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,f,d,g,e,k,n,u,m);this.dialogs.push(this.dialog)};
+EditorUi.prototype.addSplitHandler=function(a,b,f,e){function g(x){if(null!=k){var B=new mxPoint(mxEvent.getClientX(x),mxEvent.getClientY(x));e(Math.max(0,n+(b?B.x-k.x:k.y-B.y)-f));mxEvent.consume(x);n!=r()&&(u=!0,m=null)}}function d(x){g(x);k=n=null}var k=null,n=null,u=!0,m=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var r=mxUtils.bind(this,function(){var x=parseInt(b?a.style.left:a.style.bottom);b||(x=x+f-this.footerHeight);return x});mxEvent.addGestureListeners(a,function(x){k=new mxPoint(mxEvent.getClientX(x),
+mxEvent.getClientY(x));n=r();u=!1;mxEvent.consume(x)});mxEvent.addListener(a,"click",mxUtils.bind(this,function(x){if(!u&&this.hsplitClickEnabled){var B=null!=m?m-f:0;m=r();e(B);mxEvent.consume(x)}}));mxEvent.addGestureListeners(document,null,g,d);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,g,d)})};
+EditorUi.prototype.prompt=function(a,b,f){a=new FilenameDialog(this,b,mxResources.get("apply"),function(e){f(parseFloat(e))},a);this.showDialog(a.container,300,80,!0,!0);a.init()};
+EditorUi.prototype.handleError=function(a,b,f,e,g){a=null!=a&&null!=a.error?a.error:a;if(null!=a||null!=b){g=mxUtils.htmlEntities(mxResources.get("unknownError"));var d=mxResources.get("ok");b=null!=b?b:mxResources.get("error");null!=a&&null!=a.message&&(g=mxUtils.htmlEntities(a.message));this.showError(b,g,d,f,null,null,null,null,null,null,null,null,e?f:null)}else null!=f&&f()};
+EditorUi.prototype.showError=function(a,b,f,e,g,d,k,n,u,m,r,x,B){a=new ErrorDialog(this,a,b,f||mxResources.get("ok"),e,g,d,k,x,n,u);b=Math.ceil(null!=b?b.length/50:1);this.showDialog(a.container,m||340,r||100+20*b,!0,!1,B);a.init()};EditorUi.prototype.showDialog=function(a,b,f,e,g,d,k,n,u,m){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,f,e,g,d,k,n,u,m);this.dialogs.push(this.dialog)};
EditorUi.prototype.hideDialog=function(a,b,f){null!=this.dialogs&&0<this.dialogs.length&&(null==f||f==this.dialog.container.firstChild)&&(f=this.dialogs.pop(),0==f.close(a,b)?this.dialogs.push(f):(this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog")),null==this.dialog&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){this.editor.graph.isEditing()&&null!=this.editor.graph.cellEditor.textarea?
-this.editor.graph.cellEditor.textarea.focus():(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0)))};EditorUi.prototype.ctrlEnter=function(){var a=this.editor.graph;if(a.isEnabled())try{for(var b=a.getSelectionCells(),f=new mxDictionary,d=[],g=0;g<b.length;g++){var e=a.isTableCell(b[g])?a.model.getParent(b[g]):b[g];null==e||f.get(e)||(f.put(e,!0),d.push(e))}a.setSelectionCells(a.duplicateCells(d,!1))}catch(k){this.handleError(k)}};
-EditorUi.prototype.pickColor=function(a,b){var f=this.editor.graph,d=f.cellEditor.saveSelection(),g=230+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));a=new ColorDialog(this,mxUtils.rgba2hex(a)||"none",function(e){f.cellEditor.restoreSelection(d);b(e)},function(){f.cellEditor.restoreSelection(d)});this.showDialog(a.container,230,g,!0,!1);a.init()};
+this.editor.graph.cellEditor.textarea.focus():(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0)))};EditorUi.prototype.ctrlEnter=function(){var a=this.editor.graph;if(a.isEnabled())try{for(var b=a.getSelectionCells(),f=new mxDictionary,e=[],g=0;g<b.length;g++){var d=a.isTableCell(b[g])?a.model.getParent(b[g]):b[g];null==d||f.get(d)||(f.put(d,!0),e.push(d))}a.setSelectionCells(a.duplicateCells(e,!1))}catch(k){this.handleError(k)}};
+EditorUi.prototype.pickColor=function(a,b){var f=this.editor.graph,e=f.cellEditor.saveSelection(),g=230+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));a=new ColorDialog(this,mxUtils.rgba2hex(a)||"none",function(d){f.cellEditor.restoreSelection(e);b(d)},function(){f.cellEditor.restoreSelection(e)});this.showDialog(a.container,230,g,!0,!1);a.init()};
EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:320,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null})};
-EditorUi.prototype.extractGraphModelFromHtml=function(a){var b=null;try{var f=a.indexOf("&lt;mxGraphModel ");if(0<=f){var d=a.lastIndexOf("&lt;/mxGraphModel&gt;");d>f&&(b=a.substring(f,d+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(g){}return b};
-EditorUi.prototype.readGraphModelFromClipboard=function(a){this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(b){null!=b?a(b):this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(f){if(null!=f){var d=decodeURIComponent(f);this.isCompatibleString(d)&&(f=d)}a(f)}),"text")}),"html")};
-EditorUi.prototype.readGraphModelFromClipboardWithType=function(a,b){navigator.clipboard.read().then(mxUtils.bind(this,function(f){if(null!=f&&0<f.length&&"html"==b&&0<=mxUtils.indexOf(f[0].types,"text/html"))f[0].getType("text/html").then(mxUtils.bind(this,function(d){d.text().then(mxUtils.bind(this,function(g){try{var e=this.parseHtmlData(g),k="text/plain"!=e.getAttribute("data-type")?e.innerHTML:mxUtils.trim(null==e.innerText?mxUtils.getTextContent(e):e.innerText);try{var n=k.lastIndexOf("%3E");
-0<=n&&n<k.length-3&&(k=k.substring(0,n+3))}catch(r){}try{var u=e.getElementsByTagName("span"),m=null!=u&&0<u.length?mxUtils.trim(decodeURIComponent(u[0].textContent)):decodeURIComponent(k);this.isCompatibleString(m)&&(k=m)}catch(r){}}catch(r){}a(this.isCompatibleString(k)?k:null)}))["catch"](function(g){a(null)})}))["catch"](function(d){a(null)});else if(null!=f&&0<f.length&&"text"==b&&0<=mxUtils.indexOf(f[0].types,"text/plain"))f[0].getType("text/plain").then(function(d){d.text().then(function(g){a(g)})["catch"](function(){a(null)})})["catch"](function(){a(null)});
+EditorUi.prototype.extractGraphModelFromHtml=function(a){var b=null;try{var f=a.indexOf("&lt;mxGraphModel ");if(0<=f){var e=a.lastIndexOf("&lt;/mxGraphModel&gt;");e>f&&(b=a.substring(f,e+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(g){}return b};
+EditorUi.prototype.readGraphModelFromClipboard=function(a){this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(b){null!=b?a(b):this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(f){if(null!=f){var e=decodeURIComponent(f);this.isCompatibleString(e)&&(f=e)}a(f)}),"text")}),"html")};
+EditorUi.prototype.readGraphModelFromClipboardWithType=function(a,b){navigator.clipboard.read().then(mxUtils.bind(this,function(f){if(null!=f&&0<f.length&&"html"==b&&0<=mxUtils.indexOf(f[0].types,"text/html"))f[0].getType("text/html").then(mxUtils.bind(this,function(e){e.text().then(mxUtils.bind(this,function(g){try{var d=this.parseHtmlData(g),k="text/plain"!=d.getAttribute("data-type")?d.innerHTML:mxUtils.trim(null==d.innerText?mxUtils.getTextContent(d):d.innerText);try{var n=k.lastIndexOf("%3E");
+0<=n&&n<k.length-3&&(k=k.substring(0,n+3))}catch(r){}try{var u=d.getElementsByTagName("span"),m=null!=u&&0<u.length?mxUtils.trim(decodeURIComponent(u[0].textContent)):decodeURIComponent(k);this.isCompatibleString(m)&&(k=m)}catch(r){}}catch(r){}a(this.isCompatibleString(k)?k:null)}))["catch"](function(g){a(null)})}))["catch"](function(e){a(null)});else if(null!=f&&0<f.length&&"text"==b&&0<=mxUtils.indexOf(f[0].types,"text/plain"))f[0].getType("text/plain").then(function(e){e.text().then(function(g){a(g)})["catch"](function(){a(null)})})["catch"](function(){a(null)});
else a(null)}))["catch"](function(f){a(null)})};
EditorUi.prototype.parseHtmlData=function(a){var b=null;if(null!=a&&0<a.length){var f="<meta "==a.substring(0,6);b=document.createElement("div");b.innerHTML=(f?'<meta charset="utf-8">':"")+this.editor.graph.sanitizeHtml(a);asHtml=!0;a=b.getElementsByTagName("style");if(null!=a)for(;0<a.length;)a[0].parentNode.removeChild(a[0]);null!=b.firstChild&&b.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=b.firstChild.nextSibling&&b.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==
b.firstChild.nodeName&&"A"==b.firstChild.nextSibling.nodeName&&null==b.firstChild.nextSibling.nextSibling&&(a=null==b.firstChild.nextSibling.innerText?mxUtils.getTextContent(b.firstChild.nextSibling):b.firstChild.nextSibling.innerText,a==b.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(b,a),asHtml=!1));f=f&&null!=b.firstChild?b.firstChild.nextSibling:b.firstChild;null!=f&&null==f.nextSibling&&f.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==f.nodeName?(a=f.getAttribute("src"),
@@ -2589,24 +2592,24 @@ EditorUi.prototype.extractGraphModelFromEvent=function(a){var b=null,f=null;null
(b=f);return b};EditorUi.prototype.isCompatibleString=function(a){return!1};EditorUi.prototype.saveFile=function(a){a||null==this.editor.filename?(a=new FilenameDialog(this,this.editor.getOrCreateFilename(),mxResources.get("save"),mxUtils.bind(this,function(b){this.save(b)}),null,mxUtils.bind(this,function(b){if(null!=b&&0<b.length)return!0;mxUtils.confirm(mxResources.get("invalidName"));return!1})),this.showDialog(a.container,300,100,!0,!0),a.init()):this.save(this.editor.getOrCreateFilename())};
EditorUi.prototype.save=function(a){if(null!=a){this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var b=mxUtils.getXml(this.editor.getGraphXml());try{if(Editor.useLocalStorage){if(null!=localStorage.getItem(a)&&!mxUtils.confirm(mxResources.get("replaceIt",[a])))return;localStorage.setItem(a,b);this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saved"))+" "+new Date)}else if(b.length<MAX_REQUEST_SIZE)(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(a)+"&xml="+encodeURIComponent(b))).simulate(document,
"_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(b);return}this.editor.setModified(!1);this.editor.setFilename(a);this.updateDocumentTitle()}catch(f){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}}};
-EditorUi.prototype.executeLayouts=function(a,b){this.executeLayout(mxUtils.bind(this,function(){var f=new mxCompositeLayout(this.editor.graph,a),d=this.editor.graph.getSelectionCells();f.execute(this.editor.graph.getDefaultParent(),0==d.length?null:d)}),!0,b)};
-EditorUi.prototype.executeLayout=function(a,b,f){var d=this.editor.graph;if(d.isEnabled()){d.getModel().beginUpdate();try{a()}catch(g){throw g;}finally{this.allowAnimation&&b&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("Camino"))?(a=new mxMorphing(d),a.addListener(mxEvent.DONE,mxUtils.bind(this,function(){d.getModel().endUpdate();null!=f&&f()})),a.startAnimation()):(d.getModel().endUpdate(),null!=f&&f())}}};
-EditorUi.prototype.showImageDialog=function(a,b,f,d){d=this.editor.graph.cellEditor;var g=d.saveSelection(),e=mxUtils.prompt(a,b);d.restoreSelection(g);if(null!=e&&0<e.length){var k=new Image;k.onload=function(){f(e,k.width,k.height)};k.onerror=function(){f(null);mxUtils.alert(mxResources.get("fileNotFound"))};k.src=e}else f(null)};EditorUi.prototype.showLinkDialog=function(a,b,f){a=new LinkDialog(this,a,b,f);this.showDialog(a.container,420,90,!0,!0);a.init()};
+EditorUi.prototype.executeLayouts=function(a,b){this.executeLayout(mxUtils.bind(this,function(){var f=new mxCompositeLayout(this.editor.graph,a),e=this.editor.graph.getSelectionCells();f.execute(this.editor.graph.getDefaultParent(),0==e.length?null:e)}),!0,b)};
+EditorUi.prototype.executeLayout=function(a,b,f){var e=this.editor.graph;if(e.isEnabled()){e.getModel().beginUpdate();try{a()}catch(g){throw g;}finally{this.allowAnimation&&b&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("Camino"))?(a=new mxMorphing(e),a.addListener(mxEvent.DONE,mxUtils.bind(this,function(){e.getModel().endUpdate();null!=f&&f()})),a.startAnimation()):(e.getModel().endUpdate(),null!=f&&f())}}};
+EditorUi.prototype.showImageDialog=function(a,b,f,e){e=this.editor.graph.cellEditor;var g=e.saveSelection(),d=mxUtils.prompt(a,b);e.restoreSelection(g);if(null!=d&&0<d.length){var k=new Image;k.onload=function(){f(d,k.width,k.height)};k.onerror=function(){f(null);mxUtils.alert(mxResources.get("fileNotFound"))};k.src=d}else f(null)};EditorUi.prototype.showLinkDialog=function(a,b,f){a=new LinkDialog(this,a,b,f);this.showDialog(a.container,420,90,!0,!0);a.init()};
EditorUi.prototype.showDataDialog=function(a){null!=a&&(a=new EditDataDialog(this,a),this.showDialog(a.container,480,420,!0,!1,null,!1),a.init())};
-EditorUi.prototype.showBackgroundImageDialog=function(a,b){a=null!=a?a:mxUtils.bind(this,function(d){d=new ChangePageSetup(this,null,d);d.ignoreColor=!0;this.editor.graph.model.execute(d)});var f=mxUtils.prompt(mxResources.get("backgroundImage"),null!=b?b.src:"");null!=f&&0<f.length?(b=new Image,b.onload=function(){a(new mxImage(f,b.width,b.height),!1)},b.onerror=function(){a(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},b.src=f):a(null)};
+EditorUi.prototype.showBackgroundImageDialog=function(a,b){a=null!=a?a:mxUtils.bind(this,function(e){e=new ChangePageSetup(this,null,e);e.ignoreColor=!0;this.editor.graph.model.execute(e)});var f=mxUtils.prompt(mxResources.get("backgroundImage"),null!=b?b.src:"");null!=f&&0<f.length?(b=new Image,b.onload=function(){a(new mxImage(f,b.width,b.height),!1)},b.onerror=function(){a(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},b.src=f):a(null)};
EditorUi.prototype.setBackgroundImage=function(a){this.editor.graph.setBackgroundImage(a);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(a,b,f){mxUtils.confirm(a)?null!=b&&b():null!=f&&f()};EditorUi.prototype.createOutline=function(a){var b=new mxOutline(this.editor.graph);mxEvent.addListener(window,"resize",function(){b.update(!1)});return b};
EditorUi.prototype.altShiftActions={67:"clearWaypoints",65:"connectionArrows",76:"editLink",80:"connectionPoints",84:"editTooltip",86:"pasteSize",88:"copySize",66:"copyData",69:"pasteData"};
-EditorUi.prototype.createKeyHandler=function(a){function b(x,B,C){if(!d.isSelectionEmpty()&&d.isEnabled()){B=null!=B?B:1;var G=d.getCompositeParents(d.getSelectionCells()),J=0<G.length?G[0]:null;if(null!=J)if(C){d.getModel().beginUpdate();try{for(J=0;J<G.length;J++)if(d.getModel().isVertex(G[J])&&d.isCellResizable(G[J])){var D=d.getCellGeometry(G[J]);null!=D&&(D=D.clone(),37==x?D.width=Math.max(0,D.width-B):38==x?D.height=Math.max(0,D.height-B):39==x?D.width+=B:40==x&&(D.height+=B),d.getModel().setGeometry(G[J],
-D))}}finally{d.getModel().endUpdate()}}else{D=d.model.getParent(J);var N=d.getView().scale;C=null;1==d.getSelectionCount()&&d.model.isVertex(J)&&null!=d.layoutManager&&!d.isCellLocked(J)&&(C=d.layoutManager.getLayout(D));if(null!=C&&C.constructor==mxStackLayout)B=D.getIndex(J),37==x||38==x?d.model.add(D,J,Math.max(0,B-1)):(39==x||40==x)&&d.model.add(D,J,Math.min(d.model.getChildCount(D),B+1));else{var Q=d.graphHandler;null!=Q&&(null==Q.first&&Q.start(J,0,0,G),null!=Q.first&&(J=G=0,37==x?G=-B:38==
-x?J=-B:39==x?G=B:40==x&&(J=B),Q.currentDx+=G*N,Q.currentDy+=J*N,Q.checkPreview(),Q.updatePreview()),null!=k&&window.clearTimeout(k),k=window.setTimeout(function(){if(null!=Q.first){var R=Q.roundLength(Q.currentDx/N),P=Q.roundLength(Q.currentDy/N);Q.moveCells(Q.cells,R,P);Q.reset()}},400))}}}}var f=this,d=this.editor.graph,g=new mxKeyHandler(d),e=g.isEventIgnored;g.isEventIgnored=function(x){return!(mxEvent.isShiftDown(x)&&9==x.keyCode)&&(!this.isControlDown(x)||mxEvent.isShiftDown(x)||90!=x.keyCode&&
-89!=x.keyCode&&188!=x.keyCode&&190!=x.keyCode&&85!=x.keyCode)&&(66!=x.keyCode&&73!=x.keyCode||!this.isControlDown(x)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&e.apply(this,arguments)};g.isEnabledForEvent=function(x){return!mxEvent.isConsumed(x)&&this.isGraphEvent(x)&&this.isEnabled()&&(null==f.dialogs||0==f.dialogs.length)};g.isControlDown=function(x){return mxEvent.isControlDown(x)||mxClient.IS_MAC&&x.metaKey};var k=null,n={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,
-39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},u=g.getFunction;mxKeyHandler.prototype.getFunction=function(x){if(d.isEnabled()){if(mxEvent.isShiftDown(x)&&mxEvent.isAltDown(x)){var B=f.actions.get(f.altShiftActions[x.keyCode]);if(null!=B)return B.funct}if(null!=n[x.keyCode]&&!d.isSelectionEmpty())if(!this.isControlDown(x)&&mxEvent.isShiftDown(x)&&mxEvent.isAltDown(x)){if(d.model.isVertex(d.getSelectionCell()))return function(){var C=d.connectVertex(d.getSelectionCell(),n[x.keyCode],
-d.defaultEdgeLength,x,!0);null!=C&&0<C.length&&(1==C.length&&d.model.isEdge(C[0])?d.setSelectionCell(d.model.getTerminal(C[0],!1)):d.setSelectionCell(C[C.length-1]),d.scrollCellToVisible(d.getSelectionCell()),null!=f.hoverIcons&&f.hoverIcons.update(d.view.getState(d.getSelectionCell())))}}else return this.isControlDown(x)?function(){b(x.keyCode,mxEvent.isShiftDown(x)?d.gridSize:null,!0)}:function(){b(x.keyCode,mxEvent.isShiftDown(x)?d.gridSize:null)}}return u.apply(this,arguments)};g.bindAction=mxUtils.bind(this,
-function(x,B,C,G){var J=this.actions.get(C);null!=J&&(C=function(){J.isEnabled()&&J.funct()},B?G?g.bindControlShiftKey(x,C):g.bindControlKey(x,C):G?g.bindShiftKey(x,C):g.bindKey(x,C))});var m=this,r=g.escape;g.escape=function(x){r.apply(this,arguments)};g.enter=function(){};g.bindControlShiftKey(36,function(){d.exitGroup()});g.bindControlShiftKey(35,function(){d.enterGroup()});g.bindShiftKey(36,function(){d.home()});g.bindKey(35,function(){d.refresh()});g.bindAction(107,!0,"zoomIn");g.bindAction(109,
-!0,"zoomOut");g.bindAction(80,!0,"print");g.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)g.bindControlKey(36,function(){d.isEnabled()&&d.foldCells(!0)}),g.bindControlKey(35,function(){d.isEnabled()&&d.foldCells(!1)}),g.bindControlKey(13,function(){m.ctrlEnter()}),g.bindAction(8,!1,"delete"),g.bindAction(8,!0,"deleteAll"),g.bindAction(8,!1,"deleteLabels",!0),g.bindAction(46,!1,"delete"),g.bindAction(46,!0,"deleteAll"),g.bindAction(46,!1,"deleteLabels",!0),g.bindAction(36,
+EditorUi.prototype.createKeyHandler=function(a){function b(x,B,C){if(!e.isSelectionEmpty()&&e.isEnabled()){B=null!=B?B:1;var F=e.getCompositeParents(e.getSelectionCells()),J=0<F.length?F[0]:null;if(null!=J)if(C){e.getModel().beginUpdate();try{for(J=0;J<F.length;J++)if(e.getModel().isVertex(F[J])&&e.isCellResizable(F[J])){var D=e.getCellGeometry(F[J]);null!=D&&(D=D.clone(),37==x?D.width=Math.max(0,D.width-B):38==x?D.height=Math.max(0,D.height-B):39==x?D.width+=B:40==x&&(D.height+=B),e.getModel().setGeometry(F[J],
+D))}}finally{e.getModel().endUpdate()}}else{D=e.model.getParent(J);var N=e.getView().scale;C=null;1==e.getSelectionCount()&&e.model.isVertex(J)&&null!=e.layoutManager&&!e.isCellLocked(J)&&(C=e.layoutManager.getLayout(D));if(null!=C&&C.constructor==mxStackLayout)B=D.getIndex(J),37==x||38==x?e.model.add(D,J,Math.max(0,B-1)):(39==x||40==x)&&e.model.add(D,J,Math.min(e.model.getChildCount(D),B+1));else{var S=e.graphHandler;null!=S&&(null==S.first&&S.start(J,0,0,F),null!=S.first&&(J=F=0,37==x?F=-B:38==
+x?J=-B:39==x?F=B:40==x&&(J=B),S.currentDx+=F*N,S.currentDy+=J*N,S.checkPreview(),S.updatePreview()),null!=k&&window.clearTimeout(k),k=window.setTimeout(function(){if(null!=S.first){var T=S.roundLength(S.currentDx/N),P=S.roundLength(S.currentDy/N);S.moveCells(S.cells,T,P);S.reset()}},400))}}}}var f=this,e=this.editor.graph,g=new mxKeyHandler(e),d=g.isEventIgnored;g.isEventIgnored=function(x){return!(mxEvent.isShiftDown(x)&&9==x.keyCode)&&(!this.isControlDown(x)||mxEvent.isShiftDown(x)||90!=x.keyCode&&
+89!=x.keyCode&&188!=x.keyCode&&190!=x.keyCode&&85!=x.keyCode)&&(66!=x.keyCode&&73!=x.keyCode||!this.isControlDown(x)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&d.apply(this,arguments)};g.isEnabledForEvent=function(x){return!mxEvent.isConsumed(x)&&this.isGraphEvent(x)&&this.isEnabled()&&(null==f.dialogs||0==f.dialogs.length)};g.isControlDown=function(x){return mxEvent.isControlDown(x)||mxClient.IS_MAC&&x.metaKey};var k=null,n={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,
+39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},u=g.getFunction;mxKeyHandler.prototype.getFunction=function(x){if(e.isEnabled()){if(mxEvent.isShiftDown(x)&&mxEvent.isAltDown(x)){var B=f.actions.get(f.altShiftActions[x.keyCode]);if(null!=B)return B.funct}if(null!=n[x.keyCode]&&!e.isSelectionEmpty())if(!this.isControlDown(x)&&mxEvent.isShiftDown(x)&&mxEvent.isAltDown(x)){if(e.model.isVertex(e.getSelectionCell()))return function(){var C=e.connectVertex(e.getSelectionCell(),n[x.keyCode],
+e.defaultEdgeLength,x,!0);null!=C&&0<C.length&&(1==C.length&&e.model.isEdge(C[0])?e.setSelectionCell(e.model.getTerminal(C[0],!1)):e.setSelectionCell(C[C.length-1]),e.scrollCellToVisible(e.getSelectionCell()),null!=f.hoverIcons&&f.hoverIcons.update(e.view.getState(e.getSelectionCell())))}}else return this.isControlDown(x)?function(){b(x.keyCode,mxEvent.isShiftDown(x)?e.gridSize:null,!0)}:function(){b(x.keyCode,mxEvent.isShiftDown(x)?e.gridSize:null)}}return u.apply(this,arguments)};g.bindAction=mxUtils.bind(this,
+function(x,B,C,F){var J=this.actions.get(C);null!=J&&(C=function(){J.isEnabled()&&J.funct()},B?F?g.bindControlShiftKey(x,C):g.bindControlKey(x,C):F?g.bindShiftKey(x,C):g.bindKey(x,C))});var m=this,r=g.escape;g.escape=function(x){r.apply(this,arguments)};g.enter=function(){};g.bindControlShiftKey(36,function(){e.exitGroup()});g.bindControlShiftKey(35,function(){e.enterGroup()});g.bindShiftKey(36,function(){e.home()});g.bindKey(35,function(){e.refresh()});g.bindAction(107,!0,"zoomIn");g.bindAction(109,
+!0,"zoomOut");g.bindAction(80,!0,"print");g.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)g.bindControlKey(36,function(){e.isEnabled()&&e.foldCells(!0)}),g.bindControlKey(35,function(){e.isEnabled()&&e.foldCells(!1)}),g.bindControlKey(13,function(){m.ctrlEnter()}),g.bindAction(8,!1,"delete"),g.bindAction(8,!0,"deleteAll"),g.bindAction(8,!1,"deleteLabels",!0),g.bindAction(46,!1,"delete"),g.bindAction(46,!0,"deleteAll"),g.bindAction(46,!1,"deleteLabels",!0),g.bindAction(36,
!1,"resetView"),g.bindAction(72,!0,"fitWindow",!0),g.bindAction(74,!0,"fitPage"),g.bindAction(74,!0,"fitTwoPages",!0),g.bindAction(48,!0,"customZoom"),g.bindAction(82,!0,"turn"),g.bindAction(82,!0,"clearDefaultStyle",!0),g.bindAction(83,!0,"save"),g.bindAction(83,!0,"saveAs",!0),g.bindAction(65,!0,"selectAll"),g.bindAction(65,!0,"selectNone",!0),g.bindAction(73,!0,"selectVertices",!0),g.bindAction(69,!0,"selectEdges",!0),g.bindAction(69,!0,"editStyle"),g.bindAction(66,!0,"bold"),g.bindAction(66,!0,
"toBack",!0),g.bindAction(70,!0,"toFront",!0),g.bindAction(68,!0,"duplicate"),g.bindAction(68,!0,"setAsDefaultStyle",!0),g.bindAction(90,!0,"undo"),g.bindAction(89,!0,"autosize",!0),g.bindAction(88,!0,"cut"),g.bindAction(67,!0,"copy"),g.bindAction(86,!0,"paste"),g.bindAction(71,!0,"group"),g.bindAction(77,!0,"editData"),g.bindAction(71,!0,"grid",!0),g.bindAction(73,!0,"italic"),g.bindAction(76,!0,"lockUnlock"),g.bindAction(76,!0,"layers",!0),g.bindAction(80,!0,"formatPanel",!0),g.bindAction(85,!0,
-"underline"),g.bindAction(85,!0,"ungroup",!0),g.bindAction(190,!0,"superscript"),g.bindAction(188,!0,"subscript"),g.bindAction(13,!1,"keyPressEnter"),g.bindKey(113,function(){d.isEnabled()&&d.startEditingAtCell()});mxClient.IS_WIN?g.bindAction(89,!0,"redo"):g.bindAction(90,!0,"redo",!0);return g};
+"underline"),g.bindAction(85,!0,"ungroup",!0),g.bindAction(190,!0,"superscript"),g.bindAction(188,!0,"subscript"),g.bindAction(13,!1,"keyPressEnter"),g.bindKey(113,function(){e.isEnabled()&&e.startEditingAtCell()});mxClient.IS_WIN?g.bindAction(89,!0,"redo"):g.bindAction(90,!0,"redo",!0);return g};
EditorUi.prototype.destroy=function(){var a=this.editor.graph;null!=a&&null!=this.selectionStateListener&&(a.getSelectionModel().removeListener(mxEvent.CHANGE,this.selectionStateListener),a.getModel().removeListener(mxEvent.CHANGE,this.selectionStateListener),a.removeListener(mxEvent.EDITING_STARTED,this.selectionStateListener),a.removeListener(mxEvent.EDITING_STOPPED,this.selectionStateListener),a.getView().removeListener("unitChanged",this.selectionStateListener),this.selectionStateListener=null);
null!=this.editor&&(this.editor.destroy(),this.editor=null);null!=this.menubar&&(this.menubar.destroy(),this.menubar=null);null!=this.toolbar&&(this.toolbar.destroy(),this.toolbar=null);null!=this.sidebar&&(this.sidebar.destroy(),this.sidebar=null);null!=this.keyHandler&&(this.keyHandler.destroy(),this.keyHandler=null);null!=this.keydownHandler&&(mxEvent.removeListener(document,"keydown",this.keydownHandler),this.keydownHandler=null);null!=this.keyupHandler&&(mxEvent.removeListener(document,"keyup",
this.keyupHandler),this.keyupHandler=null);null!=this.resizeHandler&&(mxEvent.removeListener(window,"resize",this.resizeHandler),this.resizeHandler=null);null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null);null!=this.orientationChangeHandler&&(mxEvent.removeListener(window,"orientationchange",this.orientationChangeHandler),this.orientationChangeHandler=null);null!=this.scrollHandler&&(mxEvent.removeListener(window,"scroll",this.scrollHandler),
@@ -2626,34 +2629,34 @@ Sidebar.prototype.searchImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgo
"large"!=urlParams["sidebar-entries"]&&(Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1,Sidebar.prototype.thumbBorder=1,Sidebar.prototype.thumbWidth=32,Sidebar.prototype.thumbHeight=30,Sidebar.prototype.minThumbStrokeWidth=1.3,Sidebar.prototype.thumbAntiAlias=!0);Sidebar.prototype.sidebarTitleSize=8;Sidebar.prototype.sidebarTitles=!1;Sidebar.prototype.tooltipTitles=!0;Sidebar.prototype.maxTooltipWidth=400;Sidebar.prototype.maxTooltipHeight=400;Sidebar.prototype.addStencilsToIndex=!0;
Sidebar.prototype.defaultImageWidth=80;Sidebar.prototype.defaultImageHeight=80;Sidebar.prototype.tooltipMouseDown=null;Sidebar.prototype.refresh=function(){this.graph.stylesheet.styles=mxUtils.clone(this.editorUi.editor.graph.stylesheet.styles);this.container.innerText="";this.palettes={};this.init()};
Sidebar.prototype.getTooltipOffset=function(a,b){b=b.height+2*this.tooltipBorder;return new mxPoint(this.container.offsetWidth+this.editorUi.splitSize+10+this.editorUi.container.offsetLeft,Math.min(Math.max(document.body.clientHeight||0,document.documentElement.clientHeight)-b-20,Math.max(0,this.editorUi.container.offsetTop+this.container.offsetTop+a.offsetTop-this.container.scrollTop-b/2+16)))};
-Sidebar.prototype.createTooltip=function(a,b,f,d,g,e,k,n,u,m,r){r=null!=r?r:!0;this.tooltipMouseDown=u;null==this.tooltip&&(this.tooltip=document.createElement("div"),this.tooltip.className="geSidebarTooltip",this.tooltip.style.userSelect="none",this.tooltip.style.zIndex=mxPopupMenu.prototype.zIndex-1,document.body.appendChild(this.tooltip),mxEvent.addMouseWheelListener(mxUtils.bind(this,function(x){this.hideTooltip()}),this.tooltip),this.graph2=new Graph(this.tooltip,null,null,this.editorUi.editor.graph.getStylesheet()),
+Sidebar.prototype.createTooltip=function(a,b,f,e,g,d,k,n,u,m,r){r=null!=r?r:!0;this.tooltipMouseDown=u;null==this.tooltip&&(this.tooltip=document.createElement("div"),this.tooltip.className="geSidebarTooltip",this.tooltip.style.userSelect="none",this.tooltip.style.zIndex=mxPopupMenu.prototype.zIndex-1,document.body.appendChild(this.tooltip),mxEvent.addMouseWheelListener(mxUtils.bind(this,function(x){this.hideTooltip()}),this.tooltip),this.graph2=new Graph(this.tooltip,null,null,this.editorUi.editor.graph.getStylesheet()),
this.graph2.resetViewOnRootChange=!1,this.graph2.foldingEnabled=!1,this.graph2.gridEnabled=!1,this.graph2.autoScroll=!1,this.graph2.setTooltips(!1),this.graph2.setConnectable(!1),this.graph2.setPanning(!1),this.graph2.setEnabled(!1),this.graph2.openLink=mxUtils.bind(this,function(){this.hideTooltip()}),mxEvent.addGestureListeners(this.tooltip,mxUtils.bind(this,function(x){null!=this.tooltipMouseDown&&this.tooltipMouseDown(x);window.setTimeout(mxUtils.bind(this,function(){null!=this.tooltipCloseImage&&
"none"!=this.tooltipCloseImage.style.display||this.hideTooltip()}),0)}),null,mxUtils.bind(this,function(x){this.hideTooltip()})),mxClient.IS_SVG||(this.graph2.view.canvas.style.position="relative"),u=document.createElement("img"),u.setAttribute("src",Dialog.prototype.closeImage),u.setAttribute("title",mxResources.get("close")),u.style.position="absolute",u.style.cursor="default",u.style.padding="8px",u.style.right="2px",u.style.top="2px",this.tooltip.appendChild(u),this.tooltipCloseImage=u,mxEvent.addListener(u,
-"click",mxUtils.bind(this,function(x){this.hideTooltip();mxEvent.consume(x)})));this.tooltipCloseImage.style.display=m?"":"none";this.graph2.model.clear();this.graph2.view.setTranslate(this.tooltipBorder,this.tooltipBorder);this.graph2.view.scale=!n&&(f>this.maxTooltipWidth||d>this.maxTooltipHeight)?Math.round(100*Math.min(this.maxTooltipWidth/f,this.maxTooltipHeight/d))/100:1;this.tooltip.style.display="block";this.graph2.labelsVisible=null==e||e;e=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;
-b=this.graph2.cloneCells(b);this.editorUi.insertHandler(b,null,this.graph2.model,r?null:this.editorUi.editor.graph.defaultVertexStyle,r?null:this.editorUi.editor.graph.defaultEdgeStyle,r,!0);this.graph2.addCells(b);mxClient.NO_FO=e;r=this.graph2.getGraphBounds();n&&0<f&&0<d&&(r.width>f||r.height>d)?(f=Math.round(100*Math.min(f/r.width,d/r.height))/100,mxClient.NO_FO?(this.graph2.view.setScale(Math.round(100*Math.min(this.maxTooltipWidth/r.width,this.maxTooltipHeight/r.height))/100),r=this.graph2.getGraphBounds()):
-(this.graph2.view.getDrawPane().ownerSVGElement.style.transform="scale("+f+")",this.graph2.view.getDrawPane().ownerSVGElement.style.transformOrigin="0 0",r.width*=f,r.height*=f)):mxClient.NO_FO||(this.graph2.view.getDrawPane().ownerSVGElement.style.transform="");f=r.width+2*this.tooltipBorder+4;d=r.height+2*this.tooltipBorder;this.tooltip.style.overflow="visible";this.tooltip.style.width=f+"px";n=f;this.tooltipTitles&&null!=g&&0<g.length?(null==this.tooltipTitle?(this.tooltipTitle=document.createElement("div"),
+"click",mxUtils.bind(this,function(x){this.hideTooltip();mxEvent.consume(x)})));this.tooltipCloseImage.style.display=m?"":"none";this.graph2.model.clear();this.graph2.view.setTranslate(this.tooltipBorder,this.tooltipBorder);this.graph2.view.scale=!n&&(f>this.maxTooltipWidth||e>this.maxTooltipHeight)?Math.round(100*Math.min(this.maxTooltipWidth/f,this.maxTooltipHeight/e))/100:1;this.tooltip.style.display="block";this.graph2.labelsVisible=null==d||d;d=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;
+b=this.graph2.cloneCells(b);this.editorUi.insertHandler(b,null,this.graph2.model,r?null:this.editorUi.editor.graph.defaultVertexStyle,r?null:this.editorUi.editor.graph.defaultEdgeStyle,r,!0);this.graph2.addCells(b);mxClient.NO_FO=d;r=this.graph2.getGraphBounds();n&&0<f&&0<e&&(r.width>f||r.height>e)?(f=Math.round(100*Math.min(f/r.width,e/r.height))/100,mxClient.NO_FO?(this.graph2.view.setScale(Math.round(100*Math.min(this.maxTooltipWidth/r.width,this.maxTooltipHeight/r.height))/100),r=this.graph2.getGraphBounds()):
+(this.graph2.view.getDrawPane().ownerSVGElement.style.transform="scale("+f+")",this.graph2.view.getDrawPane().ownerSVGElement.style.transformOrigin="0 0",r.width*=f,r.height*=f)):mxClient.NO_FO||(this.graph2.view.getDrawPane().ownerSVGElement.style.transform="");f=r.width+2*this.tooltipBorder+4;e=r.height+2*this.tooltipBorder;this.tooltip.style.overflow="visible";this.tooltip.style.width=f+"px";n=f;this.tooltipTitles&&null!=g&&0<g.length?(null==this.tooltipTitle?(this.tooltipTitle=document.createElement("div"),
this.tooltipTitle.style.borderTop="1px solid gray",this.tooltipTitle.style.textAlign="center",this.tooltipTitle.style.width="100%",this.tooltipTitle.style.overflow="hidden",this.tooltipTitle.style.position="absolute",this.tooltipTitle.style.paddingTop="6px",this.tooltipTitle.style.bottom="6px",this.tooltip.appendChild(this.tooltipTitle)):this.tooltipTitle.innerText="",this.tooltipTitle.style.display="",mxUtils.write(this.tooltipTitle,g),n=Math.min(this.maxTooltipWidth,Math.max(f,this.tooltipTitle.scrollWidth+
-4)),g=this.tooltipTitle.offsetHeight+10,d+=g,mxClient.IS_SVG?this.tooltipTitle.style.marginTop=2-g+"px":(d-=6,this.tooltipTitle.style.top=d-g+"px")):null!=this.tooltipTitle&&null!=this.tooltipTitle.parentNode&&(this.tooltipTitle.style.display="none");n>f&&(this.tooltip.style.width=n+"px");this.tooltip.style.height=d+"px";g=-Math.round(r.x-this.tooltipBorder)+(n>f?(n-f)/2:0);f=-Math.round(r.y-this.tooltipBorder);k=null!=k?k:this.getTooltipOffset(a,r);a=k.x;k=k.y;mxClient.IS_SVG?0!=g||0!=f?this.graph2.view.canvas.setAttribute("transform",
+4)),g=this.tooltipTitle.offsetHeight+10,e+=g,mxClient.IS_SVG?this.tooltipTitle.style.marginTop=2-g+"px":(e-=6,this.tooltipTitle.style.top=e-g+"px")):null!=this.tooltipTitle&&null!=this.tooltipTitle.parentNode&&(this.tooltipTitle.style.display="none");n>f&&(this.tooltip.style.width=n+"px");this.tooltip.style.height=e+"px";g=-Math.round(r.x-this.tooltipBorder)+(n>f?(n-f)/2:0);f=-Math.round(r.y-this.tooltipBorder);k=null!=k?k:this.getTooltipOffset(a,r);a=k.x;k=k.y;mxClient.IS_SVG?0!=g||0!=f?this.graph2.view.canvas.setAttribute("transform",
"translate("+g+","+f+")"):this.graph2.view.canvas.removeAttribute("transform"):(this.graph2.view.drawPane.style.left=g+"px",this.graph2.view.drawPane.style.top=f+"px");this.tooltip.style.position="absolute";this.tooltip.style.left=a+"px";this.tooltip.style.top=k+"px";mxUtils.fit(this.tooltip);this.lastCreated=Date.now()};
-Sidebar.prototype.showTooltip=function(a,b,f,d,g,e){if(this.enableTooltips&&this.showTooltips&&this.currentElt!=a){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null);var k=mxUtils.bind(this,function(){this.createTooltip(a,b,f,d,g,e)});null!=this.tooltip&&"none"!=this.tooltip.style.display?k():this.thread=window.setTimeout(k,this.tooltipDelay);this.currentElt=a}};
-Sidebar.prototype.hideTooltip=function(){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null);null!=this.tooltip&&(this.tooltip.style.display="none",this.currentElt=null);this.tooltipMouseDown=null};Sidebar.prototype.addDataEntry=function(a,b,f,d,g){return this.addEntry(a,mxUtils.bind(this,function(){return this.createVertexTemplateFromData(g,b,f,d)}))};
-Sidebar.prototype.addEntries=function(a){for(var b=0;b<a.length;b++)mxUtils.bind(this,function(f){var d=f.data,g=null!=f.title?f.title:"";null!=f.tags&&(g+=" "+f.tags);null!=d&&0<g.length?this.addEntry(g,mxUtils.bind(this,function(){d=this.editorUi.convertDataUri(d);var e="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==f.aspect&&(e+="aspect=fixed;");return this.createVertexTemplate(e+"image="+d,f.w,f.h,"",f.title||"",!1,!1,!0)})):null!=f.xml&&0<g.length&&this.addEntry(g,
-mxUtils.bind(this,function(){var e=this.editorUi.stringToCells(Graph.decompress(f.xml));return this.createVertexTemplateFromCells(e,f.w,f.h,f.title||"",!0,!1,!0)}))})(a[b])};Sidebar.prototype.setCurrentSearchEntryLibrary=function(a,b){this.currentSearchEntryLibrary=null!=a?{id:a,lib:b}:null};
-Sidebar.prototype.addEntry=function(a,b){if(null!=this.taglist&&null!=a&&0<a.length){null!=this.currentSearchEntryLibrary&&(b.parentLibraries=[this.currentSearchEntryLibrary]);a=a.toLowerCase().replace(/[\/,\(\)]/g," ").split(" ");for(var f=[],d={},g=0;g<a.length;g++){null==d[a[g]]&&(d[a[g]]=!0,f.push(a[g]));var e=a[g].replace(/\.*\d*$/,"");e!=a[g]&&null==d[e]&&(d[e]=!0,f.push(e))}for(g=0;g<f.length;g++)this.addEntryForTag(f[g],b)}return b};
+Sidebar.prototype.showTooltip=function(a,b,f,e,g,d){if(this.enableTooltips&&this.showTooltips&&this.currentElt!=a){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null);var k=mxUtils.bind(this,function(){this.createTooltip(a,b,f,e,g,d)});null!=this.tooltip&&"none"!=this.tooltip.style.display?k():this.thread=window.setTimeout(k,this.tooltipDelay);this.currentElt=a}};
+Sidebar.prototype.hideTooltip=function(){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null);null!=this.tooltip&&(this.tooltip.style.display="none",this.currentElt=null);this.tooltipMouseDown=null};Sidebar.prototype.addDataEntry=function(a,b,f,e,g){return this.addEntry(a,mxUtils.bind(this,function(){return this.createVertexTemplateFromData(g,b,f,e)}))};
+Sidebar.prototype.addEntries=function(a){for(var b=0;b<a.length;b++)mxUtils.bind(this,function(f){var e=f.data,g=null!=f.title?f.title:"";null!=f.tags&&(g+=" "+f.tags);null!=e&&0<g.length?this.addEntry(g,mxUtils.bind(this,function(){e=this.editorUi.convertDataUri(e);var d="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==f.aspect&&(d+="aspect=fixed;");return this.createVertexTemplate(d+"image="+e,f.w,f.h,"",f.title||"",!1,!1,!0)})):null!=f.xml&&0<g.length&&this.addEntry(g,
+mxUtils.bind(this,function(){var d=this.editorUi.stringToCells(Graph.decompress(f.xml));return this.createVertexTemplateFromCells(d,f.w,f.h,f.title||"",!0,!1,!0)}))})(a[b])};Sidebar.prototype.setCurrentSearchEntryLibrary=function(a,b){this.currentSearchEntryLibrary=null!=a?{id:a,lib:b}:null};
+Sidebar.prototype.addEntry=function(a,b){if(null!=this.taglist&&null!=a&&0<a.length){null!=this.currentSearchEntryLibrary&&(b.parentLibraries=[this.currentSearchEntryLibrary]);a=a.toLowerCase().replace(/[\/,\(\)]/g," ").split(" ");for(var f=[],e={},g=0;g<a.length;g++){null==e[a[g]]&&(e[a[g]]=!0,f.push(a[g]));var d=a[g].replace(/\.*\d*$/,"");d!=a[g]&&null==e[d]&&(e[d]=!0,f.push(d))}for(g=0;g<f.length;g++)this.addEntryForTag(f[g],b)}return b};
Sidebar.prototype.addEntryForTag=function(a,b){if(null!=a&&1<a.length){var f=this.taglist[a];"object"!==typeof f&&(f={entries:[]},this.taglist[a]=f);f.entries.push(b)}};
-Sidebar.prototype.searchEntries=function(a,b,f,d,g){if(null!=this.taglist&&null!=a){var e=a.toLowerCase().split(" ");g=new mxDictionary;var k=(f+1)*b;a=[];for(var n=0,u=0;u<e.length;u++)if(0<e[u].length){var m=this.taglist[e[u]],r=new mxDictionary;if(null!=m){var x=m.entries;a=[];for(var B=0;B<x.length;B++)if(m=x[B],0==n==(null==g.get(m))&&(r.put(m,m),a.push(m),u==e.length-1&&a.length==k)){d(a.slice(f*b,k),k,!0,e);return}}else a=[];g=r;n++}g=a.length;d(a.slice(f*b,(f+1)*b),g,!1,e)}else d([],null,
-null,e)};Sidebar.prototype.filterTags=function(a){if(null!=a){a=a.split(" ");for(var b=[],f={},d=0;d<a.length;d++)null==f[a[d]]&&(f[a[d]]="1",b.push(a[d]));return b.join(" ")}return null};Sidebar.prototype.cloneCell=function(a,b){a=a.clone();null!=b&&(a.value=b);return a};Sidebar.prototype.showPopupMenuForEntry=function(a,b,f){};
-Sidebar.prototype.addSearchPalette=function(a){var b=document.createElement("div");b.style.visibility="hidden";this.container.appendChild(b);var f=document.createElement("div");f.className="geSidebar";f.style.boxSizing="border-box";f.style.overflow="hidden";f.style.width="100%";f.style.padding="8px";f.style.paddingTop="14px";f.style.paddingBottom="0px";a||(f.style.display="none");var d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.textOverflow="clip";d.style.paddingBottom="8px";
-d.style.cursor="default";var g=document.createElement("input");g.setAttribute("placeholder",mxResources.get("searchShapes"));g.setAttribute("type","text");g.style.fontSize="12px";g.style.overflow="hidden";g.style.boxSizing="border-box";g.style.border="solid 1px #d5d5d5";g.style.borderRadius="4px";g.style.width="100%";g.style.outline="none";g.style.padding="6px";g.style.paddingRight="20px";d.appendChild(g);var e=document.createElement("img");e.setAttribute("src",Sidebar.prototype.searchImage);e.setAttribute("title",
-mxResources.get("search"));e.style.position="relative";e.style.left="-18px";e.style.top="1px";e.style.background="url('"+this.editorUi.editor.transparentImage+"')";d.appendChild(e);f.appendChild(d);var k=document.createElement("center"),n=mxUtils.button(mxResources.get("moreResults"),function(){J()});n.style.display="none";n.style.lineHeight="normal";n.style.fontSize="12px";n.style.padding="6px 12px 6px 12px";n.style.marginTop="4px";n.style.marginBottom="8px";k.style.paddingTop="4px";k.style.paddingBottom=
-"4px";k.appendChild(n);f.appendChild(k);var u="",m=!1,r=!1,x=0,B={},C=12,G=mxUtils.bind(this,function(){m=!1;this.currentSearch=null;for(var D=f.firstChild;null!=D;){var N=D.nextSibling;D!=d&&D!=k&&D.parentNode.removeChild(D);D=N}});mxEvent.addListener(e,"click",function(){e.getAttribute("src")==Dialog.prototype.closeImage&&(e.setAttribute("src",Sidebar.prototype.searchImage),e.setAttribute("title",mxResources.get("search")),n.style.display="none",u=g.value="",G());g.focus()});var J=mxUtils.bind(this,
-function(){C=4*Math.max(1,Math.floor(this.container.clientWidth/(this.thumbWidth+10)));this.hideTooltip();if(""!=g.value){if(null!=k.parentNode&&(u!=g.value&&(G(),u=g.value,B={},r=!1,x=0),!m&&!r)){n.setAttribute("disabled","true");n.style.display="";n.style.cursor="wait";n.innerHTML=mxResources.get("loading")+"...";m=!0;var D={};this.currentSearch=D;this.searchEntries(u,C,x,mxUtils.bind(this,function(N,Q,R,P){if(this.currentSearch==D){N=null!=N?N:[];m=!1;x++;this.insertSearchHint(f,u,C,x,N,Q,R,P);
-0==N.length&&1==x&&(u="");null!=k.parentNode&&k.parentNode.removeChild(k);for(Q=0;Q<N.length;Q++)mxUtils.bind(this,function(Z){try{var U=Z();null==B[U.innerHTML]?(B[U.innerHTML]=null!=Z.parentLibraries?Z.parentLibraries.slice():[],f.appendChild(U)):null!=Z.parentLibraries&&(B[U.innerHTML]=B[U.innerHTML].concat(Z.parentLibraries));mxEvent.addGestureListeners(U,null,null,mxUtils.bind(this,function(V){var ia=B[U.innerHTML];mxEvent.isPopupTrigger(V)&&this.showPopupMenuForEntry(U,ia,V)}));mxEvent.disableContextMenu(U)}catch(V){}})(N[Q]);
-R?(n.removeAttribute("disabled"),n.innerHTML=mxResources.get("moreResults")):(n.innerHTML=mxResources.get("reset"),n.style.display="none",r=!0);n.style.cursor="";f.appendChild(k)}}),mxUtils.bind(this,function(){n.style.cursor=""}))}}else G(),u=g.value="",B={},n.style.display="none",r=!1,g.focus()});this.searchShapes=function(D){g.value=D;J()};mxEvent.addListener(g,"keydown",mxUtils.bind(this,function(D){13==D.keyCode&&(J(),mxEvent.consume(D))}));mxEvent.addListener(g,"keyup",mxUtils.bind(this,function(D){""==
-g.value?(e.setAttribute("src",Sidebar.prototype.searchImage),e.setAttribute("title",mxResources.get("search"))):(e.setAttribute("src",Dialog.prototype.closeImage),e.setAttribute("title",mxResources.get("reset")));""==g.value?(r=!0,n.style.display="none"):g.value!=u?(n.style.display="none",r=!1):m||(n.style.display=r?"none":"")}));mxEvent.addListener(g,"mousedown",function(D){D.stopPropagation&&D.stopPropagation();D.cancelBubble=!0});mxEvent.addListener(g,"selectstart",function(D){D.stopPropagation&&
+Sidebar.prototype.searchEntries=function(a,b,f,e,g){if(null!=this.taglist&&null!=a){var d=a.toLowerCase().split(" ");g=new mxDictionary;var k=(f+1)*b;a=[];for(var n=0,u=0;u<d.length;u++)if(0<d[u].length){var m=this.taglist[d[u]],r=new mxDictionary;if(null!=m){var x=m.entries;a=[];for(var B=0;B<x.length;B++)if(m=x[B],0==n==(null==g.get(m))&&(r.put(m,m),a.push(m),u==d.length-1&&a.length==k)){e(a.slice(f*b,k),k,!0,d);return}}else a=[];g=r;n++}g=a.length;e(a.slice(f*b,(f+1)*b),g,!1,d)}else e([],null,
+null,d)};Sidebar.prototype.filterTags=function(a){if(null!=a){a=a.split(" ");for(var b=[],f={},e=0;e<a.length;e++)null==f[a[e]]&&(f[a[e]]="1",b.push(a[e]));return b.join(" ")}return null};Sidebar.prototype.cloneCell=function(a,b){a=a.clone();null!=b&&(a.value=b);return a};Sidebar.prototype.showPopupMenuForEntry=function(a,b,f){};
+Sidebar.prototype.addSearchPalette=function(a){var b=document.createElement("div");b.style.visibility="hidden";this.container.appendChild(b);var f=document.createElement("div");f.className="geSidebar";f.style.boxSizing="border-box";f.style.overflow="hidden";f.style.width="100%";f.style.padding="8px";f.style.paddingTop="14px";f.style.paddingBottom="0px";a||(f.style.display="none");var e=document.createElement("div");e.style.whiteSpace="nowrap";e.style.textOverflow="clip";e.style.paddingBottom="8px";
+e.style.cursor="default";var g=document.createElement("input");g.setAttribute("placeholder",mxResources.get("searchShapes"));g.setAttribute("type","text");g.style.fontSize="12px";g.style.overflow="hidden";g.style.boxSizing="border-box";g.style.border="solid 1px #d5d5d5";g.style.borderRadius="4px";g.style.width="100%";g.style.outline="none";g.style.padding="6px";g.style.paddingRight="20px";e.appendChild(g);var d=document.createElement("img");d.setAttribute("src",Sidebar.prototype.searchImage);d.setAttribute("title",
+mxResources.get("search"));d.style.position="relative";d.style.left="-18px";d.style.top="1px";d.style.background="url('"+this.editorUi.editor.transparentImage+"')";e.appendChild(d);f.appendChild(e);var k=document.createElement("center"),n=mxUtils.button(mxResources.get("moreResults"),function(){J()});n.style.display="none";n.style.lineHeight="normal";n.style.fontSize="12px";n.style.padding="6px 12px 6px 12px";n.style.marginTop="4px";n.style.marginBottom="8px";k.style.paddingTop="4px";k.style.paddingBottom=
+"4px";k.appendChild(n);f.appendChild(k);var u="",m=!1,r=!1,x=0,B={},C=12,F=mxUtils.bind(this,function(){m=!1;this.currentSearch=null;for(var D=f.firstChild;null!=D;){var N=D.nextSibling;D!=e&&D!=k&&D.parentNode.removeChild(D);D=N}});mxEvent.addListener(d,"click",function(){d.getAttribute("src")==Dialog.prototype.closeImage&&(d.setAttribute("src",Sidebar.prototype.searchImage),d.setAttribute("title",mxResources.get("search")),n.style.display="none",u=g.value="",F());g.focus()});var J=mxUtils.bind(this,
+function(){C=4*Math.max(1,Math.floor(this.container.clientWidth/(this.thumbWidth+10)));this.hideTooltip();if(""!=g.value){if(null!=k.parentNode&&(u!=g.value&&(F(),u=g.value,B={},r=!1,x=0),!m&&!r)){n.setAttribute("disabled","true");n.style.display="";n.style.cursor="wait";n.innerHTML=mxResources.get("loading")+"...";m=!0;var D={};this.currentSearch=D;this.searchEntries(u,C,x,mxUtils.bind(this,function(N,S,T,P){if(this.currentSearch==D){N=null!=N?N:[];m=!1;x++;this.insertSearchHint(f,u,C,x,N,S,T,P);
+0==N.length&&1==x&&(u="");null!=k.parentNode&&k.parentNode.removeChild(k);for(S=0;S<N.length;S++)mxUtils.bind(this,function(Z){try{var U=Z();null==B[U.innerHTML]?(B[U.innerHTML]=null!=Z.parentLibraries?Z.parentLibraries.slice():[],f.appendChild(U)):null!=Z.parentLibraries&&(B[U.innerHTML]=B[U.innerHTML].concat(Z.parentLibraries));mxEvent.addGestureListeners(U,null,null,mxUtils.bind(this,function(V){var aa=B[U.innerHTML];mxEvent.isPopupTrigger(V)&&this.showPopupMenuForEntry(U,aa,V)}));mxEvent.disableContextMenu(U)}catch(V){}})(N[S]);
+T?(n.removeAttribute("disabled"),n.innerHTML=mxResources.get("moreResults")):(n.innerHTML=mxResources.get("reset"),n.style.display="none",r=!0);n.style.cursor="";f.appendChild(k)}}),mxUtils.bind(this,function(){n.style.cursor=""}))}}else F(),u=g.value="",B={},n.style.display="none",r=!1,g.focus()});this.searchShapes=function(D){g.value=D;J()};mxEvent.addListener(g,"keydown",mxUtils.bind(this,function(D){13==D.keyCode&&(J(),mxEvent.consume(D))}));mxEvent.addListener(g,"keyup",mxUtils.bind(this,function(D){""==
+g.value?(d.setAttribute("src",Sidebar.prototype.searchImage),d.setAttribute("title",mxResources.get("search"))):(d.setAttribute("src",Dialog.prototype.closeImage),d.setAttribute("title",mxResources.get("reset")));""==g.value?(r=!0,n.style.display="none"):g.value!=u?(n.style.display="none",r=!1):m||(n.style.display=r?"none":"")}));mxEvent.addListener(g,"mousedown",function(D){D.stopPropagation&&D.stopPropagation();D.cancelBubble=!0});mxEvent.addListener(g,"selectstart",function(D){D.stopPropagation&&
D.stopPropagation();D.cancelBubble=!0});a=document.createElement("div");a.appendChild(f);this.container.appendChild(a);this.palettes.search=[b,a]};
-Sidebar.prototype.insertSearchHint=function(a,b,f,d,g,e,k,n){0==g.length&&1==d&&(f=document.createElement("div"),f.className="geTitle",f.style.cssText="background-color:transparent;border-color:transparent;color:gray;padding:6px 0px 0px 0px !important;margin:4px 8px 4px 8px;text-align:center;cursor:default !important",mxUtils.write(f,mxResources.get("noResultsFor",[b])),a.appendChild(f))};
-Sidebar.prototype.addGeneralPalette=function(a){this.setCurrentSearchEntryLibrary("general","general");var b=this,f=parseInt(this.editorUi.editor.graph.defaultVertexStyle.fontSize);f=isNaN(f)?"":"fontSize="+Math.min(16,f)+";";var d=new mxCell("List Item",new mxGeometry(0,0,80,30),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;"+f);d.vertex=!0;f=[this.createVertexTemplateEntry("rounded=0;whiteSpace=wrap;html=1;",
+Sidebar.prototype.insertSearchHint=function(a,b,f,e,g,d,k,n){0==g.length&&1==e&&(f=document.createElement("div"),f.className="geTitle",f.style.cssText="background-color:transparent;border-color:transparent;color:gray;padding:6px 0px 0px 0px !important;margin:4px 8px 4px 8px;text-align:center;cursor:default !important",mxUtils.write(f,mxResources.get("noResultsFor",[b])),a.appendChild(f))};
+Sidebar.prototype.addGeneralPalette=function(a){this.setCurrentSearchEntryLibrary("general","general");var b=this,f=parseInt(this.editorUi.editor.graph.defaultVertexStyle.fontSize);f=isNaN(f)?"":"fontSize="+Math.min(16,f)+";";var e=new mxCell("List Item",new mxGeometry(0,0,80,30),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;"+f);e.vertex=!0;f=[this.createVertexTemplateEntry("rounded=0;whiteSpace=wrap;html=1;",
120,60,"","Rectangle",null,null,"rect rectangle box"),this.createVertexTemplateEntry("rounded=1;whiteSpace=wrap;html=1;",120,60,"","Rounded Rectangle",null,null,"rounded rect rectangle box"),this.createVertexTemplateEntry("text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text","Text",null,null,"text textbox textarea label"),this.createVertexTemplateEntry("text;html=1;strokeColor=none;fillColor=none;spacing=5;spacingTop=-20;whiteSpace=wrap;overflow=hidden;rounded=0;",
190,120,"<h1>Heading</h1><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>","Textbox",null,null,"text textbox textarea"),this.createVertexTemplateEntry("ellipse;whiteSpace=wrap;html=1;",120,80,"","Ellipse",null,null,"oval ellipse state"),this.createVertexTemplateEntry("whiteSpace=wrap;html=1;aspect=fixed;",80,80,"","Square",null,null,"square"),this.createVertexTemplateEntry("ellipse;whiteSpace=wrap;html=1;aspect=fixed;",
80,80,"","Circle",null,null,"circle"),this.createVertexTemplateEntry("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;",120,60,"","Process",null,null,"process task"),this.createVertexTemplateEntry("rhombus;whiteSpace=wrap;html=1;",80,80,"","Diamond",null,null,"diamond rhombus if condition decision conditional question test"),this.createVertexTemplateEntry("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,60,"","Parallelogram"),this.createVertexTemplateEntry("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",
@@ -2662,16 +2665,16 @@ Sidebar.prototype.addGeneralPalette=function(a){this.setCurrentSearchEntryLibrar
120,60,"","Trapezoid"),this.createVertexTemplateEntry("shape=tape;whiteSpace=wrap;html=1;",120,100,"","Tape"),this.createVertexTemplateEntry("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;darkOpacity=0.05;",80,100,"","Note"),this.createVertexTemplateEntry("shape=card;whiteSpace=wrap;html=1;",80,100,"","Card"),this.createVertexTemplateEntry("shape=callout;whiteSpace=wrap;html=1;perimeter=calloutPerimeter;",120,80,"","Callout",null,null,"bubble chat thought speech message"),this.createVertexTemplateEntry("shape=umlActor;verticalLabelPosition=bottom;verticalAlign=top;html=1;outlineConnect=0;",
30,60,"Actor","Actor",!1,null,"user person human stickman"),this.createVertexTemplateEntry("shape=xor;whiteSpace=wrap;html=1;",60,80,"","Or",null,null,"logic or"),this.createVertexTemplateEntry("shape=or;whiteSpace=wrap;html=1;",60,80,"","And",null,null,"logic and"),this.createVertexTemplateEntry("shape=dataStorage;whiteSpace=wrap;html=1;fixedSize=1;",100,80,"","Data Storage"),this.createVertexTemplateEntry("swimlane;startSize=0;",200,200,"","Container",null,null,"container swimlane lane pool group"),
this.createVertexTemplateEntry("swimlane;",200,200,"Vertical Container","Container",null,null,"container swimlane lane pool group"),this.createVertexTemplateEntry("swimlane;horizontal=0;",200,200,"Horizontal Container","Horizontal Container",null,null,"container swimlane lane pool group"),this.addEntry("list group erd table",function(){var g=new mxCell("List",new mxGeometry(0,0,140,120),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=30;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;");
-g.vertex=!0;g.insert(b.cloneCell(d,"Item 1"));g.insert(b.cloneCell(d,"Item 2"));g.insert(b.cloneCell(d,"Item 3"));return b.createVertexTemplateFromCells([g],g.geometry.width,g.geometry.height,"List")}),this.addEntry("list item entry value group erd table",function(){return b.createVertexTemplateFromCells([b.cloneCell(d,"List Item")],d.geometry.width,d.geometry.height,"List Item")}),this.addEntry("curve",mxUtils.bind(this,function(){var g=new mxCell("",new mxGeometry(0,0,50,50),"curved=1;endArrow=classic;html=1;");
+g.vertex=!0;g.insert(b.cloneCell(e,"Item 1"));g.insert(b.cloneCell(e,"Item 2"));g.insert(b.cloneCell(e,"Item 3"));return b.createVertexTemplateFromCells([g],g.geometry.width,g.geometry.height,"List")}),this.addEntry("list item entry value group erd table",function(){return b.createVertexTemplateFromCells([b.cloneCell(e,"List Item")],e.geometry.width,e.geometry.height,"List Item")}),this.addEntry("curve",mxUtils.bind(this,function(){var g=new mxCell("",new mxGeometry(0,0,50,50),"curved=1;endArrow=classic;html=1;");
g.geometry.setTerminalPoint(new mxPoint(0,50),!0);g.geometry.setTerminalPoint(new mxPoint(50,0),!1);g.geometry.points=[new mxPoint(50,50),new mxPoint(0,0)];g.geometry.relative=!0;g.edge=!0;return this.createEdgeTemplateFromCells([g],g.geometry.width,g.geometry.height,"Curve")})),this.createEdgeTemplateEntry("shape=flexArrow;endArrow=classic;startArrow=classic;html=1;",100,100,"","Bidirectional Arrow",null,"line lines connector connectors connection connections arrow arrows bidirectional"),this.createEdgeTemplateEntry("shape=flexArrow;endArrow=classic;html=1;",
50,50,"","Arrow",null,"line lines connector connectors connection connections arrow arrows directional directed"),this.createEdgeTemplateEntry("endArrow=none;dashed=1;html=1;",50,50,"","Dashed Line",null,"line lines connector connectors connection connections arrow arrows dashed undirected no"),this.createEdgeTemplateEntry("endArrow=none;dashed=1;html=1;dashPattern=1 3;strokeWidth=2;",50,50,"","Dotted Line",null,"line lines connector connectors connection connections arrow arrows dotted undirected no"),
this.createEdgeTemplateEntry("endArrow=none;html=1;",50,50,"","Line",null,"line lines connector connectors connection connections arrow arrows simple undirected plain blank no"),this.createEdgeTemplateEntry("endArrow=classic;startArrow=classic;html=1;",50,50,"","Bidirectional Connector",null,"line lines connector connectors connection connections arrow arrows bidirectional"),this.createEdgeTemplateEntry("endArrow=classic;html=1;",50,50,"","Directional Connector",null,"line lines connector connectors connection connections arrow arrows directional directed"),
-this.createEdgeTemplateEntry("shape=link;html=1;",100,0,"","Link",null,"line lines connector connectors connection connections arrow arrows link"),this.addEntry("line lines connector connectors connection connections arrow arrows edge title",mxUtils.bind(this,function(){var g=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=classic;html=1;");g.geometry.setTerminalPoint(new mxPoint(0,0),!0);g.geometry.setTerminalPoint(new mxPoint(100,0),!1);g.geometry.relative=!0;g.edge=!0;var e=new mxCell("Label",
-new mxGeometry(0,0,0,0),"edgeLabel;resizable=0;html=1;align=center;verticalAlign=middle;");e.geometry.relative=!0;e.setConnectable(!1);e.vertex=!0;g.insert(e);return this.createEdgeTemplateFromCells([g],100,0,"Connector with Label")})),this.addEntry("line lines connector connectors connection connections arrow arrows edge title multiplicity",mxUtils.bind(this,function(){var g=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=classic;html=1;");g.geometry.setTerminalPoint(new mxPoint(0,0),!0);g.geometry.setTerminalPoint(new mxPoint(160,
-0),!1);g.geometry.relative=!0;g.edge=!0;var e=new mxCell("Label",new mxGeometry(0,0,0,0),"edgeLabel;resizable=0;html=1;align=center;verticalAlign=middle;");e.geometry.relative=!0;e.setConnectable(!1);e.vertex=!0;g.insert(e);e=new mxCell("Source",new mxGeometry(-1,0,0,0),"edgeLabel;resizable=0;html=1;align=left;verticalAlign=bottom;");e.geometry.relative=!0;e.setConnectable(!1);e.vertex=!0;g.insert(e);return this.createEdgeTemplateFromCells([g],160,0,"Connector with 2 Labels")})),this.addEntry("line lines connector connectors connection connections arrow arrows edge title multiplicity",
-mxUtils.bind(this,function(){var g=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=classic;html=1;");g.geometry.setTerminalPoint(new mxPoint(0,0),!0);g.geometry.setTerminalPoint(new mxPoint(160,0),!1);g.geometry.relative=!0;g.edge=!0;var e=new mxCell("Label",new mxGeometry(0,0,0,0),"edgeLabel;resizable=0;html=1;align=center;verticalAlign=middle;");e.geometry.relative=!0;e.setConnectable(!1);e.vertex=!0;g.insert(e);e=new mxCell("Source",new mxGeometry(-1,0,0,0),"edgeLabel;resizable=0;html=1;align=left;verticalAlign=bottom;");
-e.geometry.relative=!0;e.setConnectable(!1);e.vertex=!0;g.insert(e);e=new mxCell("Target",new mxGeometry(1,0,0,0),"edgeLabel;resizable=0;html=1;align=right;verticalAlign=bottom;");e.geometry.relative=!0;e.setConnectable(!1);e.vertex=!0;g.insert(e);return this.createEdgeTemplateFromCells([g],160,0,"Connector with 3 Labels")})),this.addEntry("line lines connector connectors connection connections arrow arrows edge shape symbol message mail email",mxUtils.bind(this,function(){var g=new mxCell("",new mxGeometry(0,
-0,0,0),"endArrow=classic;html=1;");g.geometry.setTerminalPoint(new mxPoint(0,0),!0);g.geometry.setTerminalPoint(new mxPoint(100,0),!1);g.geometry.relative=!0;g.edge=!0;var e=new mxCell("",new mxGeometry(0,0,20,14),"shape=message;html=1;outlineConnect=0;");e.geometry.relative=!0;e.vertex=!0;e.geometry.offset=new mxPoint(-10,-7);g.insert(e);return this.createEdgeTemplateFromCells([g],100,0,"Connector with Symbol")}))];this.addPaletteFunctions("general",mxResources.get("general"),null!=a?a:!0,f);this.setCurrentSearchEntryLibrary()};
+this.createEdgeTemplateEntry("shape=link;html=1;",100,0,"","Link",null,"line lines connector connectors connection connections arrow arrows link"),this.addEntry("line lines connector connectors connection connections arrow arrows edge title",mxUtils.bind(this,function(){var g=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=classic;html=1;");g.geometry.setTerminalPoint(new mxPoint(0,0),!0);g.geometry.setTerminalPoint(new mxPoint(100,0),!1);g.geometry.relative=!0;g.edge=!0;var d=new mxCell("Label",
+new mxGeometry(0,0,0,0),"edgeLabel;resizable=0;html=1;align=center;verticalAlign=middle;");d.geometry.relative=!0;d.setConnectable(!1);d.vertex=!0;g.insert(d);return this.createEdgeTemplateFromCells([g],100,0,"Connector with Label")})),this.addEntry("line lines connector connectors connection connections arrow arrows edge title multiplicity",mxUtils.bind(this,function(){var g=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=classic;html=1;");g.geometry.setTerminalPoint(new mxPoint(0,0),!0);g.geometry.setTerminalPoint(new mxPoint(160,
+0),!1);g.geometry.relative=!0;g.edge=!0;var d=new mxCell("Label",new mxGeometry(0,0,0,0),"edgeLabel;resizable=0;html=1;align=center;verticalAlign=middle;");d.geometry.relative=!0;d.setConnectable(!1);d.vertex=!0;g.insert(d);d=new mxCell("Source",new mxGeometry(-1,0,0,0),"edgeLabel;resizable=0;html=1;align=left;verticalAlign=bottom;");d.geometry.relative=!0;d.setConnectable(!1);d.vertex=!0;g.insert(d);return this.createEdgeTemplateFromCells([g],160,0,"Connector with 2 Labels")})),this.addEntry("line lines connector connectors connection connections arrow arrows edge title multiplicity",
+mxUtils.bind(this,function(){var g=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=classic;html=1;");g.geometry.setTerminalPoint(new mxPoint(0,0),!0);g.geometry.setTerminalPoint(new mxPoint(160,0),!1);g.geometry.relative=!0;g.edge=!0;var d=new mxCell("Label",new mxGeometry(0,0,0,0),"edgeLabel;resizable=0;html=1;align=center;verticalAlign=middle;");d.geometry.relative=!0;d.setConnectable(!1);d.vertex=!0;g.insert(d);d=new mxCell("Source",new mxGeometry(-1,0,0,0),"edgeLabel;resizable=0;html=1;align=left;verticalAlign=bottom;");
+d.geometry.relative=!0;d.setConnectable(!1);d.vertex=!0;g.insert(d);d=new mxCell("Target",new mxGeometry(1,0,0,0),"edgeLabel;resizable=0;html=1;align=right;verticalAlign=bottom;");d.geometry.relative=!0;d.setConnectable(!1);d.vertex=!0;g.insert(d);return this.createEdgeTemplateFromCells([g],160,0,"Connector with 3 Labels")})),this.addEntry("line lines connector connectors connection connections arrow arrows edge shape symbol message mail email",mxUtils.bind(this,function(){var g=new mxCell("",new mxGeometry(0,
+0,0,0),"endArrow=classic;html=1;");g.geometry.setTerminalPoint(new mxPoint(0,0),!0);g.geometry.setTerminalPoint(new mxPoint(100,0),!1);g.geometry.relative=!0;g.edge=!0;var d=new mxCell("",new mxGeometry(0,0,20,14),"shape=message;html=1;outlineConnect=0;");d.geometry.relative=!0;d.vertex=!0;d.geometry.offset=new mxPoint(-10,-7);g.insert(d);return this.createEdgeTemplateFromCells([g],100,0,"Connector with Symbol")}))];this.addPaletteFunctions("general",mxResources.get("general"),null!=a?a:!0,f);this.setCurrentSearchEntryLibrary()};
Sidebar.prototype.addMiscPalette=function(a){var b=this;this.setCurrentSearchEntryLibrary("general","misc");var f=[this.createVertexTemplateEntry("text;strokeColor=none;fillColor=none;html=1;fontSize=24;fontStyle=1;verticalAlign=middle;align=center;",100,40,"Title","Title",null,null,"text heading title"),this.createVertexTemplateEntry("text;strokeColor=none;fillColor=none;html=1;whiteSpace=wrap;verticalAlign=middle;overflow=hidden;",100,80,"<ul><li>Value 1</li><li>Value 2</li><li>Value 3</li></ul>",
"Unordered List"),this.createVertexTemplateEntry("text;strokeColor=none;fillColor=none;html=1;whiteSpace=wrap;verticalAlign=middle;overflow=hidden;",100,80,"<ol><li>Value 1</li><li>Value 2</li><li>Value 3</li></ol>","Ordered List"),this.addDataEntry("table",180,120,"Table 1","7ZjBTuMwEIafJteVnVDoXpuycGAvsC9g6mltyfFE9kAann7txN2qqIgU0aCllRJpZjxO7G9i/3KyoqzWN07U6jdKMFlxnRWlQ6TeqtYlGJPlTMusmGd5zsKd5b/eaOVdK6uFA0tDOuR9h2dhnqCP9AFPrUkBr0QdTRKPMTRTVIVhznkwG6UJHmqxiO1NmESIeRKOHvRLDLHgL9CS0BZc6rNAY0TtdfewPkNpI+9Ei0+0ec3Gm6XhgSNYvznFLpTmdwNYAbk2pDRakkoZ0x4DU6BXatMtsWHC94HVv75bYsFI0PYDLA4EeI9NZIhOv0QwJjF4Tc03ujLCwi0I+So0Q9mmEGGdLANLSuYjEmGVHJemy/aSlw7rP8KtYJOy1MaUaDAWy6KN5a5RW+oATWbhCshK9mOSTcLMyuDzrR+umO6oROvJhaLHx4Lw1IAfXMz8Y8W8+IRaXgyvZRgxaWHuYUHCroasi7AObMze0t8D+7CCYkC5NPGDmistJdihjIt3GV8eCfHkxBGvd/GOQPzyTHxnsx8B+dVZE0bRhHa3ZGNIxPRUVtPVl0nEzxNHPL5EcHZGPrZGcH4WiTFFYjqiSPADTtX/93ri7x+9j7aADjh5f0/IXyAU3+GE3O1L4K6fod+e+CfV4YjqEdztL8GubeeP4V8="),
this.addDataEntry("table",180,120,"Table 2","7ZhRb5swEMc/Da+TDSFJX0O27qF7aae9u8EJlowP2ZcR+ulng1maJlbTaaEPIBHpfL5z8O/v0wlHSVYe7jWrih+QcxklX6Mk0wDYWeUh41JGMRF5lKyjOCb2F8XfArO0nSUV01zhNQlxl/CbyT3vPJ3DYCO9wxSsciayZ+daFVja11xTa9aFQP5UsY2br+0mrM8g0/gkXpyL2PEGFDKhuPY5G5CSVUa0i3URhZD5A2tgj/3f9CMXvS/Vg803PlpD/Xro359r5Icgg9blAdxzKDnqxobUIsfCRyw7TqTgYlf0aR4eYaZz7P7mHpFaw1O9TDj5IOFHqB1k0OLFkZN+n2+xmlqUkin+nbP8jWsFeeNdCJW3JN+iN58BEcoep98uuShNrqH6yfSO9yFbIWUGEpyaCpQ7DxUIhS2gdGUfiywjX9IotTvL7Jgex/Zx4RozUAa1PRVuWc4M1tzgtWLG/ybm7D9oOTvT8ldrxoQGRbWvjoLJR75BpnbXVJCtGOWijzJcoP4xZcEy3Up3staFyHOu3KL2ePkDReNr4Sfvwp/fiH0aZB8uqFGwP5xyH0CKeVCKZJLidd8YQIvF1F4GaS/NqWRDdJtlsMxmIymzxad1m7sg+3Tc7IfvNpQEtZhPWgzcbiid+s2Q/WY5YL+h55cBfaEtRlJo9P2bgptV1vlFQU9/OXL6n9Bzwl/6d5MYN246dni8AG3nTu5H/wA="),
@@ -2681,10 +2684,10 @@ this.addDataEntry("crossfunctional cross-functional cross functional flowchart s
this.createVertexTemplateEntry("text;html=1;strokeColor=#c0c0c0;fillColor=#ffffff;overflow=fill;rounded=0;",280,160,'<table border="1" width="100%" height="100%" cellpadding="4" style="width:100%;height:100%;border-collapse:collapse;"><tr style="background-color:#A7C942;color:#ffffff;border:1px solid #98bf21;"><th align="left">Title 1</th><th align="left">Title 2</th><th align="left">Title 3</th></tr><tr style="border:1px solid #98bf21;"><td>Value 1</td><td>Value 2</td><td>Value 3</td></tr><tr style="background-color:#EAF2D3;border:1px solid #98bf21;"><td>Value 4</td><td>Value 5</td><td>Value 6</td></tr><tr style="border:1px solid #98bf21;"><td>Value 7</td><td>Value 8</td><td>Value 9</td></tr><tr style="background-color:#EAF2D3;border:1px solid #98bf21;"><td>Value 10</td><td>Value 11</td><td>Value 12</td></tr></table>',
"HTML Table 1"),this.createVertexTemplateEntry("text;html=1;strokeColor=#c0c0c0;fillColor=none;overflow=fill;",180,140,'<table border="0" width="100%" height="100%" style="width:100%;height:100%;border-collapse:collapse;"><tr><td align="center">Value 1</td><td align="center">Value 2</td><td align="center">Value 3</td></tr><tr><td align="center">Value 4</td><td align="center">Value 5</td><td align="center">Value 6</td></tr><tr><td align="center">Value 7</td><td align="center">Value 8</td><td align="center">Value 9</td></tr></table>',
"HTML Table 2"),this.createVertexTemplateEntry("text;html=1;strokeColor=none;fillColor=none;overflow=fill;",180,140,'<table border="1" width="100%" height="100%" style="width:100%;height:100%;border-collapse:collapse;"><tr><td align="center">Value 1</td><td align="center">Value 2</td><td align="center">Value 3</td></tr><tr><td align="center">Value 4</td><td align="center">Value 5</td><td align="center">Value 6</td></tr><tr><td align="center">Value 7</td><td align="center">Value 8</td><td align="center">Value 9</td></tr></table>',
-"HTML Table 3"),this.createVertexTemplateEntry("text;html=1;strokeColor=none;fillColor=none;overflow=fill;",160,140,'<table border="1" width="100%" height="100%" cellpadding="4" style="width:100%;height:100%;border-collapse:collapse;"><tr><th align="center"><b>Title</b></th></tr><tr><td align="center">Section 1.1\nSection 1.2\nSection 1.3</td></tr><tr><td align="center">Section 2.1\nSection 2.2\nSection 2.3</td></tr></table>',"HTML Table 4"),this.addEntry("link hyperlink",mxUtils.bind(this,function(){var d=
-new mxCell("Link",new mxGeometry(0,0,60,40),"text;html=1;strokeColor=none;fillColor=none;whiteSpace=wrap;align=center;verticalAlign=middle;fontColor=#0000EE;fontStyle=4;");d.vertex=!0;this.graph.setLinkForCell(d,"https://www.draw.io");return this.createVertexTemplateFromCells([d],d.geometry.width,d.geometry.height,"Link")})),this.addEntry("timestamp date time text label",mxUtils.bind(this,function(){var d=new mxCell("%date{ddd mmm dd yyyy HH:MM:ss}%",new mxGeometry(0,0,160,20),"text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;overflow=hidden;");
-d.vertex=!0;this.graph.setAttributeForCell(d,"placeholders","1");return this.createVertexTemplateFromCells([d],d.geometry.width,d.geometry.height,"Timestamp")})),this.addEntry("variable placeholder metadata hello world text label",mxUtils.bind(this,function(){var d=new mxCell("%name% Text",new mxGeometry(0,0,80,20),"text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;overflow=hidden;");d.vertex=!0;this.graph.setAttributeForCell(d,"placeholders","1");this.graph.setAttributeForCell(d,
-"name","Variable");return this.createVertexTemplateFromCells([d],d.geometry.width,d.geometry.height,"Variable")})),this.createVertexTemplateEntry("shape=ext;double=1;rounded=0;whiteSpace=wrap;html=1;",120,80,"","Double Rectangle",null,null,"rect rectangle box double"),this.createVertexTemplateEntry("shape=ext;double=1;rounded=1;whiteSpace=wrap;html=1;",120,80,"","Double Rounded Rectangle",null,null,"rounded rect rectangle box double"),this.createVertexTemplateEntry("ellipse;shape=doubleEllipse;whiteSpace=wrap;html=1;",
+"HTML Table 3"),this.createVertexTemplateEntry("text;html=1;strokeColor=none;fillColor=none;overflow=fill;",160,140,'<table border="1" width="100%" height="100%" cellpadding="4" style="width:100%;height:100%;border-collapse:collapse;"><tr><th align="center"><b>Title</b></th></tr><tr><td align="center">Section 1.1\nSection 1.2\nSection 1.3</td></tr><tr><td align="center">Section 2.1\nSection 2.2\nSection 2.3</td></tr></table>',"HTML Table 4"),this.addEntry("link hyperlink",mxUtils.bind(this,function(){var e=
+new mxCell("Link",new mxGeometry(0,0,60,40),"text;html=1;strokeColor=none;fillColor=none;whiteSpace=wrap;align=center;verticalAlign=middle;fontColor=#0000EE;fontStyle=4;");e.vertex=!0;this.graph.setLinkForCell(e,"https://www.draw.io");return this.createVertexTemplateFromCells([e],e.geometry.width,e.geometry.height,"Link")})),this.addEntry("timestamp date time text label",mxUtils.bind(this,function(){var e=new mxCell("%date{ddd mmm dd yyyy HH:MM:ss}%",new mxGeometry(0,0,160,20),"text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;overflow=hidden;");
+e.vertex=!0;this.graph.setAttributeForCell(e,"placeholders","1");return this.createVertexTemplateFromCells([e],e.geometry.width,e.geometry.height,"Timestamp")})),this.addEntry("variable placeholder metadata hello world text label",mxUtils.bind(this,function(){var e=new mxCell("%name% Text",new mxGeometry(0,0,80,20),"text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;overflow=hidden;");e.vertex=!0;this.graph.setAttributeForCell(e,"placeholders","1");this.graph.setAttributeForCell(e,
+"name","Variable");return this.createVertexTemplateFromCells([e],e.geometry.width,e.geometry.height,"Variable")})),this.createVertexTemplateEntry("shape=ext;double=1;rounded=0;whiteSpace=wrap;html=1;",120,80,"","Double Rectangle",null,null,"rect rectangle box double"),this.createVertexTemplateEntry("shape=ext;double=1;rounded=1;whiteSpace=wrap;html=1;",120,80,"","Double Rounded Rectangle",null,null,"rounded rect rectangle box double"),this.createVertexTemplateEntry("ellipse;shape=doubleEllipse;whiteSpace=wrap;html=1;",
100,60,"","Double Ellipse",null,null,"oval ellipse start end state double"),this.createVertexTemplateEntry("shape=ext;double=1;whiteSpace=wrap;html=1;aspect=fixed;",80,80,"","Double Square",null,null,"double square"),this.createVertexTemplateEntry("ellipse;shape=doubleEllipse;whiteSpace=wrap;html=1;aspect=fixed;",80,80,"","Double Circle",null,null,"double circle"),this.createVertexTemplateEntry("rounded=1;whiteSpace=wrap;html=1;strokeWidth=2;fillWeight=4;hachureGap=8;hachureAngle=45;fillColor=#1ba1e2;sketch=1;",
120,60,"","Rectangle Sketch",!0,null,"rectangle rect box text sketch comic retro"),this.createVertexTemplateEntry("ellipse;whiteSpace=wrap;html=1;strokeWidth=2;fillWeight=2;hachureGap=8;fillColor=#990000;fillStyle=dots;sketch=1;",120,60,"","Ellipse Sketch",!0,null,"ellipse oval sketch comic retro"),this.createVertexTemplateEntry("rhombus;whiteSpace=wrap;html=1;strokeWidth=2;fillWeight=-1;hachureGap=8;fillStyle=cross-hatch;fillColor=#006600;sketch=1;",120,60,"","Diamond Sketch",!0,null,"diamond sketch comic retro"),
this.createVertexTemplateEntry("html=1;whiteSpace=wrap;shape=isoCube2;backgroundOutline=1;isoAngle=15;",90,100,"","Isometric Cube",!0,null,"cube box iso isometric"),this.createVertexTemplateEntry("html=1;whiteSpace=wrap;aspect=fixed;shape=isoRectangle;",150,90,"","Isometric Square",!0,null,"rectangle rect box iso isometric"),this.createEdgeTemplateEntry("edgeStyle=isometricEdgeStyle;endArrow=none;html=1;",50,100,"","Isometric Edge 1"),this.createEdgeTemplateEntry("edgeStyle=isometricEdgeStyle;endArrow=none;html=1;elbow=vertical;",
@@ -2692,7 +2695,7 @@ this.createVertexTemplateEntry("html=1;whiteSpace=wrap;shape=isoCube2;background
160,10,"","Horizontal Backbone",!1,null,"backbone bus network"),this.createVertexTemplateEntry("line;strokeWidth=4;direction=south;html=1;perimeter=backbonePerimeter;points=[];outlineConnect=0;",10,160,"","Vertical Backbone",!1,null,"backbone bus network"),this.createVertexTemplateEntry("shape=crossbar;whiteSpace=wrap;html=1;rounded=1;",120,20,"","Horizontal Crossbar",!1,null,"crossbar distance measure dimension unit"),this.createVertexTemplateEntry("shape=crossbar;whiteSpace=wrap;html=1;rounded=1;direction=south;",
20,120,"","Vertical Crossbar",!1,null,"crossbar distance measure dimension unit"),this.createVertexTemplateEntry("shape=image;html=1;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=1;aspect=fixed;image="+this.gearImage,52,61,"","Image (Fixed Aspect)",!1,null,"fixed image icon symbol"),this.createVertexTemplateEntry("shape=image;html=1;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;image="+this.gearImage,50,60,"","Image (Variable Aspect)",!1,null,"strechted image icon symbol"),
this.createVertexTemplateEntry("icon;html=1;image="+this.gearImage,60,60,"Icon","Icon",!1,null,"icon image symbol"),this.createVertexTemplateEntry("label;whiteSpace=wrap;html=1;image="+this.gearImage,140,60,"Label","Label 1",null,null,"label image icon symbol"),this.createVertexTemplateEntry("label;whiteSpace=wrap;html=1;align=center;verticalAlign=bottom;spacingLeft=0;spacingBottom=4;imageAlign=center;imageVerticalAlign=top;image="+this.gearImage,120,80,"Label","Label 2",null,null,"label image icon symbol"),
-this.addEntry("shape group container",function(){var d=new mxCell("Label",new mxGeometry(0,0,160,70),"html=1;whiteSpace=wrap;container=1;recursiveResize=0;collapsible=0;");d.vertex=!0;var g=new mxCell("",new mxGeometry(20,20,20,30),"triangle;html=1;whiteSpace=wrap;");g.vertex=!0;d.insert(g);return b.createVertexTemplateFromCells([d],d.geometry.width,d.geometry.height,"Shape Group")}),this.createVertexTemplateEntry("shape=partialRectangle;whiteSpace=wrap;html=1;left=0;right=0;fillColor=none;",120,
+this.addEntry("shape group container",function(){var e=new mxCell("Label",new mxGeometry(0,0,160,70),"html=1;whiteSpace=wrap;container=1;recursiveResize=0;collapsible=0;");e.vertex=!0;var g=new mxCell("",new mxGeometry(20,20,20,30),"triangle;html=1;whiteSpace=wrap;");g.vertex=!0;e.insert(g);return b.createVertexTemplateFromCells([e],e.geometry.width,e.geometry.height,"Shape Group")}),this.createVertexTemplateEntry("shape=partialRectangle;whiteSpace=wrap;html=1;left=0;right=0;fillColor=none;",120,
60,"","Partial Rectangle"),this.createVertexTemplateEntry("shape=partialRectangle;whiteSpace=wrap;html=1;bottom=0;top=0;fillColor=none;",120,60,"","Partial Rectangle"),this.createVertexTemplateEntry("shape=partialRectangle;whiteSpace=wrap;html=1;bottom=0;right=0;fillColor=none;",120,60,"","Partial Rectangle"),this.createVertexTemplateEntry("shape=partialRectangle;whiteSpace=wrap;html=1;bottom=1;right=1;left=1;top=0;fillColor=none;routingCenterX=-0.5;",120,60,"","Partial Rectangle"),this.createVertexTemplateEntry("shape=waypoint;sketch=0;fillStyle=solid;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;",
40,40,"","Waypoint"),this.createEdgeTemplateEntry("edgeStyle=segmentEdgeStyle;endArrow=classic;html=1;",50,50,"","Manual Line",null,"line lines connector connectors connection connections arrow arrows manual"),this.createEdgeTemplateEntry("shape=filledEdge;rounded=0;fixDash=1;endArrow=none;strokeWidth=10;fillColor=#ffffff;edgeStyle=orthogonalEdgeStyle;",60,40,"","Filled Edge"),this.createEdgeTemplateEntry("edgeStyle=elbowEdgeStyle;elbow=horizontal;endArrow=classic;html=1;",50,50,"","Horizontal Elbow",
null,"line lines connector connectors connection connections arrow arrows elbow horizontal"),this.createEdgeTemplateEntry("edgeStyle=elbowEdgeStyle;elbow=vertical;endArrow=classic;html=1;",50,50,"","Vertical Elbow",null,"line lines connector connectors connection connections arrow arrows elbow vertical")];this.addPaletteFunctions("misc",mxResources.get("misc"),null!=a?a:!0,f);this.setCurrentSearchEntryLibrary()};
@@ -2719,178 +2722,178 @@ null,null,"collate"),this.createVertexTemplateEntry("shape=switch;whiteSpace=wra
f.insert(a.cloneCell(b,"Item 3"));return a.createVertexTemplateFromCells([f],f.geometry.width,f.geometry.height,"List")}),this.addEntry("list item entry value group erd table",function(){return a.createVertexTemplateFromCells([a.cloneCell(b,"List Item")],b.geometry.width,b.geometry.height,"List Item")})]};
Sidebar.prototype.addBasicPalette=function(a){this.setCurrentSearchEntryLibrary("basic");this.addStencilPalette("basic",mxResources.get("basic"),a+"/basic.xml",";whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#000000;strokeWidth=2",null,null,null,null,[this.createVertexTemplateEntry("shape=partialRectangle;whiteSpace=wrap;html=1;top=0;bottom=0;fillColor=none;",120,60,"","Partial Rectangle"),this.createVertexTemplateEntry("shape=partialRectangle;whiteSpace=wrap;html=1;right=0;top=0;bottom=0;fillColor=none;routingCenterX=-0.5;",
120,60,"","Partial Rectangle"),this.createVertexTemplateEntry("shape=partialRectangle;whiteSpace=wrap;html=1;bottom=0;right=0;fillColor=none;",120,60,"","Partial Rectangle"),this.createVertexTemplateEntry("shape=partialRectangle;whiteSpace=wrap;html=1;top=0;left=0;fillColor=none;",120,60,"","Partial Rectangle")]);this.setCurrentSearchEntryLibrary()};
-Sidebar.prototype.addUmlPalette=function(a){var b=this,f=new mxCell("+ field: type",new mxGeometry(0,0,100,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;");f.vertex=!0;var d=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;");
-d.vertex=!0;this.setCurrentSearchEntryLibrary("uml");var g=[this.createVertexTemplateEntry("html=1;",110,50,"Object","Object",null,null,"uml static class object instance"),this.createVertexTemplateEntry("html=1;",110,50,"&laquo;interface&raquo;<br><b>Name</b>","Interface",null,null,"uml static class interface object instance annotated annotation"),this.addEntry("uml static class object instance",function(){var e=new mxCell("Classname",new mxGeometry(0,0,160,90),"swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;");
-e.vertex=!0;e.insert(f.clone());e.insert(d.clone());e.insert(b.cloneCell(f,"+ method(type): type"));return b.createVertexTemplateFromCells([e],e.geometry.width,e.geometry.height,"Class")}),this.addEntry("uml static class section subsection",function(){var e=new mxCell("Classname",new mxGeometry(0,0,140,110),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=none;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;");e.vertex=
-!0;e.insert(f.clone());e.insert(f.clone());e.insert(f.clone());return b.createVertexTemplateFromCells([e],e.geometry.width,e.geometry.height,"Class 2")}),this.addEntry("uml static class item member method function variable field attribute label",function(){return b.createVertexTemplateFromCells([b.cloneCell(f,"+ item: attribute")],f.geometry.width,f.geometry.height,"Item 1")}),this.addEntry("uml static class item member method function variable field attribute label",function(){var e=new mxCell("item: attribute",
-new mxGeometry(0,0,120,f.geometry.height),"label;fontStyle=0;strokeColor=none;fillColor=none;align=left;verticalAlign=top;overflow=hidden;spacingLeft=28;spacingRight=4;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;imageWidth=16;imageHeight=16;image="+b.gearImage);e.vertex=!0;return b.createVertexTemplateFromCells([e],e.geometry.width,e.geometry.height,"Item 2")}),this.addEntry("uml static class divider hline line separator",function(){return b.createVertexTemplateFromCells([d.clone()],
-d.geometry.width,d.geometry.height,"Divider")}),this.addEntry("uml static class spacer space gap separator",function(){var e=new mxCell("",new mxGeometry(0,0,20,14),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=4;spacingRight=4;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;");e.vertex=!0;return b.createVertexTemplateFromCells([e.clone()],e.geometry.width,e.geometry.height,"Spacer")}),this.createVertexTemplateEntry("text;align=center;fontStyle=1;verticalAlign=middle;spacingLeft=3;spacingRight=3;strokeColor=none;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;",
-80,26,"Title","Title",null,null,"uml static class title label"),this.addEntry("uml static class component",function(){var e=new mxCell("&laquo;Annotation&raquo;<br/><b>Component</b>",new mxGeometry(0,0,180,90),"html=1;dropTarget=0;");e.vertex=!0;var k=new mxCell("",new mxGeometry(1,0,20,20),"shape=module;jettyWidth=8;jettyHeight=4;");k.vertex=!0;k.geometry.relative=!0;k.geometry.offset=new mxPoint(-27,7);e.insert(k);return b.createVertexTemplateFromCells([e],e.geometry.width,e.geometry.height,"Component")}),
-this.addEntry("uml static class component",function(){var e=new mxCell('<p style="margin:0px;margin-top:6px;text-align:center;"><b>Component</b></p><hr/><p style="margin:0px;margin-left:8px;">+ Attribute1: Type<br/>+ Attribute2: Type</p>',new mxGeometry(0,0,180,90),"align=left;overflow=fill;html=1;dropTarget=0;");e.vertex=!0;var k=new mxCell("",new mxGeometry(1,0,20,20),"shape=component;jettyWidth=8;jettyHeight=4;");k.vertex=!0;k.geometry.relative=!0;k.geometry.offset=new mxPoint(-24,4);e.insert(k);
-return b.createVertexTemplateFromCells([e],e.geometry.width,e.geometry.height,"Component with Attributes")}),this.createVertexTemplateEntry("verticalAlign=top;align=left;spacingTop=8;spacingLeft=2;spacingRight=12;shape=cube;size=10;direction=south;fontStyle=4;html=1;",180,120,"Block","Block",null,null,"uml static class block"),this.createVertexTemplateEntry("shape=module;align=left;spacingLeft=20;align=center;verticalAlign=top;",100,50,"Module","Module",null,null,"uml static class module component"),
+Sidebar.prototype.addUmlPalette=function(a){var b=this,f=new mxCell("+ field: type",new mxGeometry(0,0,100,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;");f.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;");
+e.vertex=!0;this.setCurrentSearchEntryLibrary("uml");var g=[this.createVertexTemplateEntry("html=1;",110,50,"Object","Object",null,null,"uml static class object instance"),this.createVertexTemplateEntry("html=1;",110,50,"&laquo;interface&raquo;<br><b>Name</b>","Interface",null,null,"uml static class interface object instance annotated annotation"),this.addEntry("uml static class object instance",function(){var d=new mxCell("Classname",new mxGeometry(0,0,160,90),"swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;");
+d.vertex=!0;d.insert(f.clone());d.insert(e.clone());d.insert(b.cloneCell(f,"+ method(type): type"));return b.createVertexTemplateFromCells([d],d.geometry.width,d.geometry.height,"Class")}),this.addEntry("uml static class section subsection",function(){var d=new mxCell("Classname",new mxGeometry(0,0,140,110),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=none;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;");d.vertex=
+!0;d.insert(f.clone());d.insert(f.clone());d.insert(f.clone());return b.createVertexTemplateFromCells([d],d.geometry.width,d.geometry.height,"Class 2")}),this.addEntry("uml static class item member method function variable field attribute label",function(){return b.createVertexTemplateFromCells([b.cloneCell(f,"+ item: attribute")],f.geometry.width,f.geometry.height,"Item 1")}),this.addEntry("uml static class item member method function variable field attribute label",function(){var d=new mxCell("item: attribute",
+new mxGeometry(0,0,120,f.geometry.height),"label;fontStyle=0;strokeColor=none;fillColor=none;align=left;verticalAlign=top;overflow=hidden;spacingLeft=28;spacingRight=4;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;imageWidth=16;imageHeight=16;image="+b.gearImage);d.vertex=!0;return b.createVertexTemplateFromCells([d],d.geometry.width,d.geometry.height,"Item 2")}),this.addEntry("uml static class divider hline line separator",function(){return b.createVertexTemplateFromCells([e.clone()],
+e.geometry.width,e.geometry.height,"Divider")}),this.addEntry("uml static class spacer space gap separator",function(){var d=new mxCell("",new mxGeometry(0,0,20,14),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=4;spacingRight=4;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;");d.vertex=!0;return b.createVertexTemplateFromCells([d.clone()],d.geometry.width,d.geometry.height,"Spacer")}),this.createVertexTemplateEntry("text;align=center;fontStyle=1;verticalAlign=middle;spacingLeft=3;spacingRight=3;strokeColor=none;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;",
+80,26,"Title","Title",null,null,"uml static class title label"),this.addEntry("uml static class component",function(){var d=new mxCell("&laquo;Annotation&raquo;<br/><b>Component</b>",new mxGeometry(0,0,180,90),"html=1;dropTarget=0;");d.vertex=!0;var k=new mxCell("",new mxGeometry(1,0,20,20),"shape=module;jettyWidth=8;jettyHeight=4;");k.vertex=!0;k.geometry.relative=!0;k.geometry.offset=new mxPoint(-27,7);d.insert(k);return b.createVertexTemplateFromCells([d],d.geometry.width,d.geometry.height,"Component")}),
+this.addEntry("uml static class component",function(){var d=new mxCell('<p style="margin:0px;margin-top:6px;text-align:center;"><b>Component</b></p><hr/><p style="margin:0px;margin-left:8px;">+ Attribute1: Type<br/>+ Attribute2: Type</p>',new mxGeometry(0,0,180,90),"align=left;overflow=fill;html=1;dropTarget=0;");d.vertex=!0;var k=new mxCell("",new mxGeometry(1,0,20,20),"shape=component;jettyWidth=8;jettyHeight=4;");k.vertex=!0;k.geometry.relative=!0;k.geometry.offset=new mxPoint(-24,4);d.insert(k);
+return b.createVertexTemplateFromCells([d],d.geometry.width,d.geometry.height,"Component with Attributes")}),this.createVertexTemplateEntry("verticalAlign=top;align=left;spacingTop=8;spacingLeft=2;spacingRight=12;shape=cube;size=10;direction=south;fontStyle=4;html=1;",180,120,"Block","Block",null,null,"uml static class block"),this.createVertexTemplateEntry("shape=module;align=left;spacingLeft=20;align=center;verticalAlign=top;",100,50,"Module","Module",null,null,"uml static class module component"),
this.createVertexTemplateEntry("shape=folder;fontStyle=1;spacingTop=10;tabWidth=40;tabHeight=14;tabPosition=left;html=1;",70,50,"package","Package",null,null,"uml static class package"),this.createVertexTemplateEntry("verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;",160,90,'<p style="margin:0px;margin-top:4px;text-align:center;text-decoration:underline;"><b>Object:Type</b></p><hr/><p style="margin:0px;margin-left:8px;">field1 = value1<br/>field2 = value2<br>field3 = value3</p>',
"Object",null,null,"uml static class object instance"),this.createVertexTemplateEntry("verticalAlign=top;align=left;overflow=fill;html=1;",180,90,'<div style="box-sizing:border-box;width:100%;background:#e4e4e4;padding:2px;">Tablename</div><table style="width:100%;font-size:1em;" cellpadding="2" cellspacing="0"><tr><td>PK</td><td>uniqueId</td></tr><tr><td>FK1</td><td>foreignKey</td></tr><tr><td></td><td>fieldname</td></tr></table>',"Entity",null,null,"er entity table"),this.addEntry("uml static class object instance",
-function(){var e=new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;"><b>Class</b></p><hr size="1"/><div style="height:2px;"></div>',new mxGeometry(0,0,140,60),"verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;");e.vertex=!0;return b.createVertexTemplateFromCells([e.clone()],e.geometry.width,e.geometry.height,"Class 3")}),this.addEntry("uml static class object instance",function(){var e=new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;"><b>Class</b></p><hr size="1"/><div style="height:2px;"></div><hr size="1"/><div style="height:2px;"></div>',
-new mxGeometry(0,0,140,60),"verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;");e.vertex=!0;return b.createVertexTemplateFromCells([e.clone()],e.geometry.width,e.geometry.height,"Class 4")}),this.addEntry("uml static class object instance",function(){var e=new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;"><b>Class</b></p><hr size="1"/><p style="margin:0px;margin-left:4px;">+ field: Type</p><hr size="1"/><p style="margin:0px;margin-left:4px;">+ method(): Type</p>',
-new mxGeometry(0,0,160,90),"verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;");e.vertex=!0;return b.createVertexTemplateFromCells([e.clone()],e.geometry.width,e.geometry.height,"Class 5")}),this.addEntry("uml static class object instance",function(){var e=new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;"><i>&lt;&lt;Interface&gt;&gt;</i><br/><b>Interface</b></p><hr size="1"/><p style="margin:0px;margin-left:4px;">+ field1: Type<br/>+ field2: Type</p><hr size="1"/><p style="margin:0px;margin-left:4px;">+ method1(Type): Type<br/>+ method2(Type, Type): Type</p>',
-new mxGeometry(0,0,190,140),"verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;");e.vertex=!0;return b.createVertexTemplateFromCells([e.clone()],e.geometry.width,e.geometry.height,"Interface 2")}),this.createVertexTemplateEntry("shape=providedRequiredInterface;html=1;verticalLabelPosition=bottom;sketch=0;",20,20,"","Provided/Required Interface",null,null,"uml provided required interface lollipop notation"),this.createVertexTemplateEntry("shape=requiredInterface;html=1;verticalLabelPosition=bottom;sketch=0;",
+function(){var d=new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;"><b>Class</b></p><hr size="1"/><div style="height:2px;"></div>',new mxGeometry(0,0,140,60),"verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;");d.vertex=!0;return b.createVertexTemplateFromCells([d.clone()],d.geometry.width,d.geometry.height,"Class 3")}),this.addEntry("uml static class object instance",function(){var d=new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;"><b>Class</b></p><hr size="1"/><div style="height:2px;"></div><hr size="1"/><div style="height:2px;"></div>',
+new mxGeometry(0,0,140,60),"verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;");d.vertex=!0;return b.createVertexTemplateFromCells([d.clone()],d.geometry.width,d.geometry.height,"Class 4")}),this.addEntry("uml static class object instance",function(){var d=new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;"><b>Class</b></p><hr size="1"/><p style="margin:0px;margin-left:4px;">+ field: Type</p><hr size="1"/><p style="margin:0px;margin-left:4px;">+ method(): Type</p>',
+new mxGeometry(0,0,160,90),"verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;");d.vertex=!0;return b.createVertexTemplateFromCells([d.clone()],d.geometry.width,d.geometry.height,"Class 5")}),this.addEntry("uml static class object instance",function(){var d=new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;"><i>&lt;&lt;Interface&gt;&gt;</i><br/><b>Interface</b></p><hr size="1"/><p style="margin:0px;margin-left:4px;">+ field1: Type<br/>+ field2: Type</p><hr size="1"/><p style="margin:0px;margin-left:4px;">+ method1(Type): Type<br/>+ method2(Type, Type): Type</p>',
+new mxGeometry(0,0,190,140),"verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;");d.vertex=!0;return b.createVertexTemplateFromCells([d.clone()],d.geometry.width,d.geometry.height,"Interface 2")}),this.createVertexTemplateEntry("shape=providedRequiredInterface;html=1;verticalLabelPosition=bottom;sketch=0;",20,20,"","Provided/Required Interface",null,null,"uml provided required interface lollipop notation"),this.createVertexTemplateEntry("shape=requiredInterface;html=1;verticalLabelPosition=bottom;sketch=0;",
10,20,"","Required Interface",null,null,"uml required interface lollipop notation"),this.addEntry("uml lollipop notation provided required interface",function(){return b.createVertexTemplateFromData("zVRNT8MwDP01uaLSMu6sfFxAmrQDcAytaQJZXLnu2u7XkzQZXTUmuIA4VIqf/ZzkvdQiyzf9HclaPWAJRmQ3IssJkcNq0+dgjEgTXYrsWqRp4j6R3p7Ino/ZpJYEln9CSANhK00LAQlAw4OJAGFrS/D1iciWSKywQivNPWLtwHMHvgHzsNY7z5Ato4MUb0zMgi2viLBzoUULAbnVxsSWzTtwofYBtlTACkhvgIHWtSy0rWKSJVXAJ5Lh4FBWMNMicAJ0cSzPWBW1uQN0fWlwJQRGst7OW8kmhNVn3Sd1hdp1TJMhVCzmhHipUDO54RYHm07Q6NHXfmV/65eS5jXXVJhj15yCNDz54GyxD58PwjL2v/SmMuE7POqSVdxj5vm/cK6PG4X/5deNvPjeSEfQdeOV75Rm8K/dZzo3LOaGSaMr69aF0wbIA00NhZfpVff+JSwJGr2TL2Nnr3jtbzDeabEUi2v/Tlo22kKO1gbq0Z8ZDwzE0J+cNidM2ROinF18CR6KeivQleI59pVrM8knfV04Dc1gx+FM/QA=",
40,10,"Lollipop Notation")}),this.createVertexTemplateEntry("shape=umlBoundary;whiteSpace=wrap;html=1;",100,80,"Boundary Object","Boundary Object",null,null,"uml boundary object"),this.createVertexTemplateEntry("ellipse;shape=umlEntity;whiteSpace=wrap;html=1;",80,80,"Entity Object","Entity Object",null,null,"uml entity object"),this.createVertexTemplateEntry("ellipse;shape=umlControl;whiteSpace=wrap;html=1;",70,80,"Control Object","Control Object",null,null,"uml control object"),this.createVertexTemplateEntry("shape=umlActor;verticalLabelPosition=bottom;verticalAlign=top;html=1;",
-30,60,"Actor","Actor",!1,null,"uml actor"),this.createVertexTemplateEntry("ellipse;whiteSpace=wrap;html=1;",140,70,"Use Case","Use Case",null,null,"uml use case usecase"),this.addEntry("uml activity state start",function(){var e=new mxCell("",new mxGeometry(0,0,30,30),"ellipse;html=1;shape=startState;fillColor=#000000;strokeColor=#ff0000;");e.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");
-k.geometry.setTerminalPoint(new mxPoint(15,90),!1);k.geometry.relative=!0;k.edge=!0;e.insertEdge(k,!0);return b.createVertexTemplateFromCells([e,k],30,90,"Start")}),this.addEntry("uml activity state",function(){var e=new mxCell("Activity",new mxGeometry(0,0,120,40),"rounded=1;whiteSpace=wrap;html=1;arcSize=40;fontColor=#000000;fillColor=#ffffc0;strokeColor=#ff0000;");e.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");
-k.geometry.setTerminalPoint(new mxPoint(60,100),!1);k.geometry.relative=!0;k.edge=!0;e.insertEdge(k,!0);return b.createVertexTemplateFromCells([e,k],120,100,"Activity")}),this.addEntry("uml activity composite state",function(){var e=new mxCell("Composite State",new mxGeometry(0,0,160,60),"swimlane;fontStyle=1;align=center;verticalAlign=middle;childLayout=stackLayout;horizontal=1;startSize=30;horizontalStack=0;resizeParent=0;resizeLast=1;container=0;fontColor=#000000;collapsible=0;rounded=1;arcSize=30;strokeColor=#ff0000;fillColor=#ffffc0;swimlaneFillColor=#ffffc0;dropTarget=0;");
-e.vertex=!0;var k=new mxCell("Subtitle",new mxGeometry(0,0,200,26),"text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;spacingLeft=4;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;fontColor=#000000;");k.vertex=!0;e.insert(k);k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");k.geometry.setTerminalPoint(new mxPoint(80,120),!1);k.geometry.relative=!0;k.edge=!0;e.insertEdge(k,
-!0);return b.createVertexTemplateFromCells([e,k],160,120,"Composite State")}),this.addEntry("uml activity condition",function(){var e=new mxCell("Condition",new mxGeometry(0,0,80,40),"rhombus;whiteSpace=wrap;html=1;fillColor=#ffffc0;strokeColor=#ff0000;");e.vertex=!0;var k=new mxCell("no",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;align=left;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");k.geometry.setTerminalPoint(new mxPoint(180,20),!1);k.geometry.relative=
-!0;k.geometry.x=-1;k.edge=!0;e.insertEdge(k,!0);var n=new mxCell("yes",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;align=left;verticalAlign=top;endArrow=open;endSize=8;strokeColor=#ff0000;");n.geometry.setTerminalPoint(new mxPoint(40,100),!1);n.geometry.relative=!0;n.geometry.x=-1;n.edge=!0;e.insertEdge(n,!0);return b.createVertexTemplateFromCells([e,k,n],180,100,"Condition")}),this.addEntry("uml activity fork join",function(){var e=new mxCell("",new mxGeometry(0,0,200,10),"shape=line;html=1;strokeWidth=6;strokeColor=#ff0000;");
-e.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");k.geometry.setTerminalPoint(new mxPoint(100,80),!1);k.geometry.relative=!0;k.edge=!0;e.insertEdge(k,!0);return b.createVertexTemplateFromCells([e,k],200,80,"Fork/Join")}),this.createVertexTemplateEntry("ellipse;html=1;shape=endState;fillColor=#000000;strokeColor=#ff0000;",30,30,"","End",null,null,"uml activity state end"),this.createVertexTemplateEntry("shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=1;collapsible=0;recursiveResize=0;outlineConnect=0;",
+30,60,"Actor","Actor",!1,null,"uml actor"),this.createVertexTemplateEntry("ellipse;whiteSpace=wrap;html=1;",140,70,"Use Case","Use Case",null,null,"uml use case usecase"),this.addEntry("uml activity state start",function(){var d=new mxCell("",new mxGeometry(0,0,30,30),"ellipse;html=1;shape=startState;fillColor=#000000;strokeColor=#ff0000;");d.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");
+k.geometry.setTerminalPoint(new mxPoint(15,90),!1);k.geometry.relative=!0;k.edge=!0;d.insertEdge(k,!0);return b.createVertexTemplateFromCells([d,k],30,90,"Start")}),this.addEntry("uml activity state",function(){var d=new mxCell("Activity",new mxGeometry(0,0,120,40),"rounded=1;whiteSpace=wrap;html=1;arcSize=40;fontColor=#000000;fillColor=#ffffc0;strokeColor=#ff0000;");d.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");
+k.geometry.setTerminalPoint(new mxPoint(60,100),!1);k.geometry.relative=!0;k.edge=!0;d.insertEdge(k,!0);return b.createVertexTemplateFromCells([d,k],120,100,"Activity")}),this.addEntry("uml activity composite state",function(){var d=new mxCell("Composite State",new mxGeometry(0,0,160,60),"swimlane;fontStyle=1;align=center;verticalAlign=middle;childLayout=stackLayout;horizontal=1;startSize=30;horizontalStack=0;resizeParent=0;resizeLast=1;container=0;fontColor=#000000;collapsible=0;rounded=1;arcSize=30;strokeColor=#ff0000;fillColor=#ffffc0;swimlaneFillColor=#ffffc0;dropTarget=0;");
+d.vertex=!0;var k=new mxCell("Subtitle",new mxGeometry(0,0,200,26),"text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;spacingLeft=4;spacingRight=4;whiteSpace=wrap;overflow=hidden;rotatable=0;fontColor=#000000;");k.vertex=!0;d.insert(k);k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");k.geometry.setTerminalPoint(new mxPoint(80,120),!1);k.geometry.relative=!0;k.edge=!0;d.insertEdge(k,
+!0);return b.createVertexTemplateFromCells([d,k],160,120,"Composite State")}),this.addEntry("uml activity condition",function(){var d=new mxCell("Condition",new mxGeometry(0,0,80,40),"rhombus;whiteSpace=wrap;html=1;fillColor=#ffffc0;strokeColor=#ff0000;");d.vertex=!0;var k=new mxCell("no",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;align=left;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");k.geometry.setTerminalPoint(new mxPoint(180,20),!1);k.geometry.relative=
+!0;k.geometry.x=-1;k.edge=!0;d.insertEdge(k,!0);var n=new mxCell("yes",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;align=left;verticalAlign=top;endArrow=open;endSize=8;strokeColor=#ff0000;");n.geometry.setTerminalPoint(new mxPoint(40,100),!1);n.geometry.relative=!0;n.geometry.x=-1;n.edge=!0;d.insertEdge(n,!0);return b.createVertexTemplateFromCells([d,k,n],180,100,"Condition")}),this.addEntry("uml activity fork join",function(){var d=new mxCell("",new mxGeometry(0,0,200,10),"shape=line;html=1;strokeWidth=6;strokeColor=#ff0000;");
+d.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;");k.geometry.setTerminalPoint(new mxPoint(100,80),!1);k.geometry.relative=!0;k.edge=!0;d.insertEdge(k,!0);return b.createVertexTemplateFromCells([d,k],200,80,"Fork/Join")}),this.createVertexTemplateEntry("ellipse;html=1;shape=endState;fillColor=#000000;strokeColor=#ff0000;",30,30,"","End",null,null,"uml activity state end"),this.createVertexTemplateEntry("shape=umlLifeline;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=1;collapsible=0;recursiveResize=0;outlineConnect=0;",
100,300,":Object","Lifeline",null,null,"uml sequence participant lifeline"),this.createVertexTemplateEntry("shape=umlLifeline;participant=umlActor;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=1;collapsible=0;recursiveResize=0;verticalAlign=top;spacingTop=36;outlineConnect=0;",20,300,"","Actor Lifeline",null,null,"uml sequence participant lifeline actor"),this.createVertexTemplateEntry("shape=umlLifeline;participant=umlBoundary;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=1;collapsible=0;recursiveResize=0;verticalAlign=top;spacingTop=36;outlineConnect=0;",
50,300,"","Boundary Lifeline",null,null,"uml sequence participant lifeline boundary"),this.createVertexTemplateEntry("shape=umlLifeline;participant=umlEntity;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=1;collapsible=0;recursiveResize=0;verticalAlign=top;spacingTop=36;outlineConnect=0;",40,300,"","Entity Lifeline",null,null,"uml sequence participant lifeline entity"),this.createVertexTemplateEntry("shape=umlLifeline;participant=umlControl;perimeter=lifelinePerimeter;whiteSpace=wrap;html=1;container=1;collapsible=0;recursiveResize=0;verticalAlign=top;spacingTop=36;outlineConnect=0;",
-40,300,"","Control Lifeline",null,null,"uml sequence participant lifeline control"),this.createVertexTemplateEntry("shape=umlFrame;whiteSpace=wrap;html=1;",300,200,"frame","Frame",null,null,"uml sequence frame"),this.createVertexTemplateEntry("shape=umlDestroy;whiteSpace=wrap;html=1;strokeWidth=3;",30,30,"","Destruction",null,null,"uml sequence destruction destroy"),this.addEntry("uml sequence invoke invocation call activation",function(){var e=new mxCell("",new mxGeometry(0,0,10,80),"html=1;points=[];perimeter=orthogonalPerimeter;");
-e.vertex=!0;var k=new mxCell("dispatch",new mxGeometry(0,0,0,0),"html=1;verticalAlign=bottom;startArrow=oval;endArrow=block;startSize=8;");k.geometry.setTerminalPoint(new mxPoint(-60,0),!0);k.geometry.relative=!0;k.edge=!0;e.insertEdge(k,!1);return b.createVertexTemplateFromCells([e,k],10,80,"Found Message")}),this.addEntry("uml sequence invoke call delegation synchronous invocation activation",function(){var e=new mxCell("",new mxGeometry(0,0,10,80),"html=1;points=[];perimeter=orthogonalPerimeter;");
-e.vertex=!0;var k=new mxCell("dispatch",new mxGeometry(0,0,0,0),"html=1;verticalAlign=bottom;endArrow=block;entryX=0;entryY=0;");k.geometry.setTerminalPoint(new mxPoint(-70,0),!0);k.geometry.relative=!0;k.edge=!0;e.insertEdge(k,!1);var n=new mxCell("return",new mxGeometry(0,0,0,0),"html=1;verticalAlign=bottom;endArrow=open;dashed=1;endSize=8;exitX=0;exitY=0.95;");n.geometry.setTerminalPoint(new mxPoint(-70,76),!1);n.geometry.relative=!0;n.edge=!0;e.insertEdge(n,!0);return b.createVertexTemplateFromCells([e,
-k,n],10,80,"Synchronous Invocation")}),this.addEntry("uml sequence self call recursion delegation activation",function(){var e=new mxCell("",new mxGeometry(-5,20,10,40),"html=1;points=[];perimeter=orthogonalPerimeter;");e.vertex=!0;var k=new mxCell("self call",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;align=left;spacingLeft=2;endArrow=block;rounded=0;entryX=1;entryY=0;");k.geometry.setTerminalPoint(new mxPoint(0,0),!0);k.geometry.points=[new mxPoint(30,0)];k.geometry.relative=
-!0;k.edge=!0;e.insertEdge(k,!1);return b.createVertexTemplateFromCells([e,k],10,60,"Self Call")}),this.addEntry("uml sequence invoke call delegation callback activation",function(){return b.createVertexTemplateFromData("xZRNT8MwDIZ/Ta6oaymD47rBTkiTuMAxW6wmIm0q19s6fj1OE3V0Y2iCA4dK8euP2I+riGxedUuUjX52CqzIHkU2R+conKpuDtaKNDFKZAuRpgl/In264J303qSRCDVdk5CGhJ20WwhKEFo62ChoqritxURkReNMTa2X80LkC68AmgoIkEWHpF3pamlXR7WIFwASdBeb7KXY4RIc5+KBQ/ZGkY4RYY5Egyl1zLqLmmyDXQ6Zx4n5EIf+HkB2BmAjrV3LzftPIPw4hgNn1pQ1a2tH5Cp2QK1miG7vNeu4iJe4pdeY2BtvbCQDGlAljMCQxBJotJ8rWCFYSWY3LvUdmZi68rvkkLiU6QnL1m1xAzHoBOdw61WEb88II9AW67/ydQ2wq1Cy1aAGvOrFfPh6997qDA3g+dxzv3nIL6MPU/8T+kMw8+m4QPgdfrEJNo8PSQj/+s58Ag==",
+40,300,"","Control Lifeline",null,null,"uml sequence participant lifeline control"),this.createVertexTemplateEntry("shape=umlFrame;whiteSpace=wrap;html=1;",300,200,"frame","Frame",null,null,"uml sequence frame"),this.createVertexTemplateEntry("shape=umlDestroy;whiteSpace=wrap;html=1;strokeWidth=3;",30,30,"","Destruction",null,null,"uml sequence destruction destroy"),this.addEntry("uml sequence invoke invocation call activation",function(){var d=new mxCell("",new mxGeometry(0,0,10,80),"html=1;points=[];perimeter=orthogonalPerimeter;");
+d.vertex=!0;var k=new mxCell("dispatch",new mxGeometry(0,0,0,0),"html=1;verticalAlign=bottom;startArrow=oval;endArrow=block;startSize=8;");k.geometry.setTerminalPoint(new mxPoint(-60,0),!0);k.geometry.relative=!0;k.edge=!0;d.insertEdge(k,!1);return b.createVertexTemplateFromCells([d,k],10,80,"Found Message")}),this.addEntry("uml sequence invoke call delegation synchronous invocation activation",function(){var d=new mxCell("",new mxGeometry(0,0,10,80),"html=1;points=[];perimeter=orthogonalPerimeter;");
+d.vertex=!0;var k=new mxCell("dispatch",new mxGeometry(0,0,0,0),"html=1;verticalAlign=bottom;endArrow=block;entryX=0;entryY=0;");k.geometry.setTerminalPoint(new mxPoint(-70,0),!0);k.geometry.relative=!0;k.edge=!0;d.insertEdge(k,!1);var n=new mxCell("return",new mxGeometry(0,0,0,0),"html=1;verticalAlign=bottom;endArrow=open;dashed=1;endSize=8;exitX=0;exitY=0.95;");n.geometry.setTerminalPoint(new mxPoint(-70,76),!1);n.geometry.relative=!0;n.edge=!0;d.insertEdge(n,!0);return b.createVertexTemplateFromCells([d,
+k,n],10,80,"Synchronous Invocation")}),this.addEntry("uml sequence self call recursion delegation activation",function(){var d=new mxCell("",new mxGeometry(-5,20,10,40),"html=1;points=[];perimeter=orthogonalPerimeter;");d.vertex=!0;var k=new mxCell("self call",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;html=1;align=left;spacingLeft=2;endArrow=block;rounded=0;entryX=1;entryY=0;");k.geometry.setTerminalPoint(new mxPoint(0,0),!0);k.geometry.points=[new mxPoint(30,0)];k.geometry.relative=
+!0;k.edge=!0;d.insertEdge(k,!1);return b.createVertexTemplateFromCells([d,k],10,60,"Self Call")}),this.addEntry("uml sequence invoke call delegation callback activation",function(){return b.createVertexTemplateFromData("xZRNT8MwDIZ/Ta6oaymD47rBTkiTuMAxW6wmIm0q19s6fj1OE3V0Y2iCA4dK8euP2I+riGxedUuUjX52CqzIHkU2R+conKpuDtaKNDFKZAuRpgl/In264J303qSRCDVdk5CGhJ20WwhKEFo62ChoqritxURkReNMTa2X80LkC68AmgoIkEWHpF3pamlXR7WIFwASdBeb7KXY4RIc5+KBQ/ZGkY4RYY5Egyl1zLqLmmyDXQ6Zx4n5EIf+HkB2BmAjrV3LzftPIPw4hgNn1pQ1a2tH5Cp2QK1miG7vNeu4iJe4pdeY2BtvbCQDGlAljMCQxBJotJ8rWCFYSWY3LvUdmZi68rvkkLiU6QnL1m1xAzHoBOdw61WEb88II9AW67/ydQ2wq1Cy1aAGvOrFfPh6997qDA3g+dxzv3nIL6MPU/8T+kMw8+m4QPgdfrEJNo8PSQj/+s58Ag==",
10,60,"Callback")}),this.createVertexTemplateEntry("html=1;points=[];perimeter=orthogonalPerimeter;",10,80,"","Activation",null,null,"uml sequence activation"),this.createEdgeTemplateEntry("html=1;verticalAlign=bottom;startArrow=oval;startFill=1;endArrow=block;startSize=8;",60,0,"dispatch","Found Message 1",null,"uml sequence message call invoke dispatch"),this.createEdgeTemplateEntry("html=1;verticalAlign=bottom;startArrow=circle;startFill=1;endArrow=open;startSize=6;endSize=8;",80,0,"dispatch",
-"Found Message 2",null,"uml sequence message call invoke dispatch"),this.createEdgeTemplateEntry("html=1;verticalAlign=bottom;endArrow=block;",80,0,"dispatch","Message",null,"uml sequence message call invoke dispatch"),this.addEntry("uml sequence return message",function(){var e=new mxCell("return",new mxGeometry(0,0,0,0),"html=1;verticalAlign=bottom;endArrow=open;dashed=1;endSize=8;");e.geometry.setTerminalPoint(new mxPoint(80,0),!0);e.geometry.setTerminalPoint(new mxPoint(0,0),!1);e.geometry.relative=
-!0;e.edge=!0;return b.createEdgeTemplateFromCells([e],80,0,"Return")}),this.addEntry("uml relation",function(){var e=new mxCell("name",new mxGeometry(0,0,0,0),"endArrow=block;endFill=1;html=1;edgeStyle=orthogonalEdgeStyle;align=left;verticalAlign=top;");e.geometry.setTerminalPoint(new mxPoint(0,0),!0);e.geometry.setTerminalPoint(new mxPoint(160,0),!1);e.geometry.relative=!0;e.geometry.x=-1;e.edge=!0;var k=new mxCell("1",new mxGeometry(-1,0,0,0),"edgeLabel;resizable=0;html=1;align=left;verticalAlign=bottom;");
-k.geometry.relative=!0;k.setConnectable(!1);k.vertex=!0;e.insert(k);return b.createEdgeTemplateFromCells([e],160,0,"Relation 1")}),this.addEntry("uml association",function(){var e=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;html=1;edgeStyle=orthogonalEdgeStyle;");e.geometry.setTerminalPoint(new mxPoint(0,0),!0);e.geometry.setTerminalPoint(new mxPoint(160,0),!1);e.geometry.relative=!0;e.edge=!0;var k=new mxCell("parent",new mxGeometry(-1,0,0,0),"edgeLabel;resizable=0;html=1;align=left;verticalAlign=bottom;");
-k.geometry.relative=!0;k.setConnectable(!1);k.vertex=!0;e.insert(k);k=new mxCell("child",new mxGeometry(1,0,0,0),"edgeLabel;resizable=0;html=1;align=right;verticalAlign=bottom;");k.geometry.relative=!0;k.setConnectable(!1);k.vertex=!0;e.insert(k);return b.createEdgeTemplateFromCells([e],160,0,"Association 1")}),this.addEntry("uml aggregation",function(){var e=new mxCell("1",new mxGeometry(0,0,0,0),"endArrow=open;html=1;endSize=12;startArrow=diamondThin;startSize=14;startFill=0;edgeStyle=orthogonalEdgeStyle;align=left;verticalAlign=bottom;");
-e.geometry.setTerminalPoint(new mxPoint(0,0),!0);e.geometry.setTerminalPoint(new mxPoint(160,0),!1);e.geometry.relative=!0;e.geometry.x=-1;e.geometry.y=3;e.edge=!0;return b.createEdgeTemplateFromCells([e],160,0,"Aggregation 1")}),this.addEntry("uml composition",function(){var e=new mxCell("1",new mxGeometry(0,0,0,0),"endArrow=open;html=1;endSize=12;startArrow=diamondThin;startSize=14;startFill=1;edgeStyle=orthogonalEdgeStyle;align=left;verticalAlign=bottom;");e.geometry.setTerminalPoint(new mxPoint(0,
-0),!0);e.geometry.setTerminalPoint(new mxPoint(160,0),!1);e.geometry.relative=!0;e.geometry.x=-1;e.geometry.y=3;e.edge=!0;return b.createEdgeTemplateFromCells([e],160,0,"Composition 1")}),this.addEntry("uml relation",function(){var e=new mxCell("Relation",new mxGeometry(0,0,0,0),"endArrow=open;html=1;endSize=12;startArrow=diamondThin;startSize=14;startFill=0;edgeStyle=orthogonalEdgeStyle;");e.geometry.setTerminalPoint(new mxPoint(0,0),!0);e.geometry.setTerminalPoint(new mxPoint(160,0),!1);e.geometry.relative=
-!0;e.edge=!0;var k=new mxCell("0..n",new mxGeometry(-1,0,0,0),"edgeLabel;resizable=0;html=1;align=left;verticalAlign=top;");k.geometry.relative=!0;k.setConnectable(!1);k.vertex=!0;e.insert(k);k=new mxCell("1",new mxGeometry(1,0,0,0),"edgeLabel;resizable=0;html=1;align=right;verticalAlign=top;");k.geometry.relative=!0;k.setConnectable(!1);k.vertex=!0;e.insert(k);return b.createEdgeTemplateFromCells([e],160,0,"Relation 2")}),this.createEdgeTemplateEntry("endArrow=open;endSize=12;dashed=1;html=1;",160,
+"Found Message 2",null,"uml sequence message call invoke dispatch"),this.createEdgeTemplateEntry("html=1;verticalAlign=bottom;endArrow=block;",80,0,"dispatch","Message",null,"uml sequence message call invoke dispatch"),this.addEntry("uml sequence return message",function(){var d=new mxCell("return",new mxGeometry(0,0,0,0),"html=1;verticalAlign=bottom;endArrow=open;dashed=1;endSize=8;");d.geometry.setTerminalPoint(new mxPoint(80,0),!0);d.geometry.setTerminalPoint(new mxPoint(0,0),!1);d.geometry.relative=
+!0;d.edge=!0;return b.createEdgeTemplateFromCells([d],80,0,"Return")}),this.addEntry("uml relation",function(){var d=new mxCell("name",new mxGeometry(0,0,0,0),"endArrow=block;endFill=1;html=1;edgeStyle=orthogonalEdgeStyle;align=left;verticalAlign=top;");d.geometry.setTerminalPoint(new mxPoint(0,0),!0);d.geometry.setTerminalPoint(new mxPoint(160,0),!1);d.geometry.relative=!0;d.geometry.x=-1;d.edge=!0;var k=new mxCell("1",new mxGeometry(-1,0,0,0),"edgeLabel;resizable=0;html=1;align=left;verticalAlign=bottom;");
+k.geometry.relative=!0;k.setConnectable(!1);k.vertex=!0;d.insert(k);return b.createEdgeTemplateFromCells([d],160,0,"Relation 1")}),this.addEntry("uml association",function(){var d=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;html=1;edgeStyle=orthogonalEdgeStyle;");d.geometry.setTerminalPoint(new mxPoint(0,0),!0);d.geometry.setTerminalPoint(new mxPoint(160,0),!1);d.geometry.relative=!0;d.edge=!0;var k=new mxCell("parent",new mxGeometry(-1,0,0,0),"edgeLabel;resizable=0;html=1;align=left;verticalAlign=bottom;");
+k.geometry.relative=!0;k.setConnectable(!1);k.vertex=!0;d.insert(k);k=new mxCell("child",new mxGeometry(1,0,0,0),"edgeLabel;resizable=0;html=1;align=right;verticalAlign=bottom;");k.geometry.relative=!0;k.setConnectable(!1);k.vertex=!0;d.insert(k);return b.createEdgeTemplateFromCells([d],160,0,"Association 1")}),this.addEntry("uml aggregation",function(){var d=new mxCell("1",new mxGeometry(0,0,0,0),"endArrow=open;html=1;endSize=12;startArrow=diamondThin;startSize=14;startFill=0;edgeStyle=orthogonalEdgeStyle;align=left;verticalAlign=bottom;");
+d.geometry.setTerminalPoint(new mxPoint(0,0),!0);d.geometry.setTerminalPoint(new mxPoint(160,0),!1);d.geometry.relative=!0;d.geometry.x=-1;d.geometry.y=3;d.edge=!0;return b.createEdgeTemplateFromCells([d],160,0,"Aggregation 1")}),this.addEntry("uml composition",function(){var d=new mxCell("1",new mxGeometry(0,0,0,0),"endArrow=open;html=1;endSize=12;startArrow=diamondThin;startSize=14;startFill=1;edgeStyle=orthogonalEdgeStyle;align=left;verticalAlign=bottom;");d.geometry.setTerminalPoint(new mxPoint(0,
+0),!0);d.geometry.setTerminalPoint(new mxPoint(160,0),!1);d.geometry.relative=!0;d.geometry.x=-1;d.geometry.y=3;d.edge=!0;return b.createEdgeTemplateFromCells([d],160,0,"Composition 1")}),this.addEntry("uml relation",function(){var d=new mxCell("Relation",new mxGeometry(0,0,0,0),"endArrow=open;html=1;endSize=12;startArrow=diamondThin;startSize=14;startFill=0;edgeStyle=orthogonalEdgeStyle;");d.geometry.setTerminalPoint(new mxPoint(0,0),!0);d.geometry.setTerminalPoint(new mxPoint(160,0),!1);d.geometry.relative=
+!0;d.edge=!0;var k=new mxCell("0..n",new mxGeometry(-1,0,0,0),"edgeLabel;resizable=0;html=1;align=left;verticalAlign=top;");k.geometry.relative=!0;k.setConnectable(!1);k.vertex=!0;d.insert(k);k=new mxCell("1",new mxGeometry(1,0,0,0),"edgeLabel;resizable=0;html=1;align=right;verticalAlign=top;");k.geometry.relative=!0;k.setConnectable(!1);k.vertex=!0;d.insert(k);return b.createEdgeTemplateFromCells([d],160,0,"Relation 2")}),this.createEdgeTemplateEntry("endArrow=open;endSize=12;dashed=1;html=1;",160,
0,"Use","Dependency",null,"uml dependency use"),this.createEdgeTemplateEntry("endArrow=block;endSize=16;endFill=0;html=1;",160,0,"Extends","Generalization",null,"uml generalization extend"),this.createEdgeTemplateEntry("endArrow=block;startArrow=block;endFill=1;startFill=1;html=1;",160,0,"","Association 2",null,"uml association"),this.createEdgeTemplateEntry("endArrow=open;startArrow=circlePlus;endFill=0;startFill=0;endSize=8;html=1;",160,0,"","Inner Class",null,"uml inner class"),this.createEdgeTemplateEntry("endArrow=open;startArrow=cross;endFill=0;startFill=0;endSize=8;startSize=10;html=1;",
160,0,"","Terminate",null,"uml terminate"),this.createEdgeTemplateEntry("endArrow=block;dashed=1;endFill=0;endSize=12;html=1;",160,0,"","Implementation",null,"uml realization implementation"),this.createEdgeTemplateEntry("endArrow=diamondThin;endFill=0;endSize=24;html=1;",160,0,"","Aggregation 2",null,"uml aggregation"),this.createEdgeTemplateEntry("endArrow=diamondThin;endFill=1;endSize=24;html=1;",160,0,"","Composition 2",null,"uml composition"),this.createEdgeTemplateEntry("endArrow=open;endFill=1;endSize=12;html=1;",
160,0,"","Association 3",null,"uml association")];this.addPaletteFunctions("uml",mxResources.get("uml"),a||!1,g);this.setCurrentSearchEntryLibrary()};Sidebar.prototype.createTitle=function(a){var b=document.createElement("a");b.setAttribute("title",mxResources.get("sidebarTooltip"));b.className="geTitle";mxUtils.write(b,a);return b};
-Sidebar.prototype.createThumb=function(a,b,f,d,g,e,k){this.graph.labelsVisible=null==e||e;e=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;this.graph.view.scaleAndTranslate(1,0,0);this.graph.addCells(a);a=this.graph.getGraphBounds();var n=Math.floor(100*Math.min((b-2*this.thumbBorder)/a.width,(f-2*this.thumbBorder)/a.height))/100;this.graph.view.scaleAndTranslate(n,Math.floor((b-a.width*n)/2/n-a.x),Math.floor((f-a.height*n)/2/n-a.y));this.graph.dialect!=mxConstants.DIALECT_SVG||
-mxClient.NO_FO||null==this.graph.view.getCanvas().ownerSVGElement?(n=this.graph.container.cloneNode(!1),n.innerHTML=this.graph.container.innerHTML):n=this.graph.view.getCanvas().ownerSVGElement.cloneNode(!0);this.graph.getModel().clear();mxClient.NO_FO=e;n.style.position="relative";n.style.overflow="hidden";n.style.left=this.thumbBorder+"px";n.style.top=this.thumbBorder+"px";n.style.width=b+"px";n.style.height=f+"px";n.style.visibility="";n.style.minWidth="";n.style.minHeight="";d.appendChild(n);
-this.sidebarTitles&&null!=g&&0!=k&&(d.style.height=this.thumbHeight+0+this.sidebarTitleSize+8+"px",b=document.createElement("div"),b.style.color=Editor.isDarkMode()?"#A0A0A0":"#303030",b.style.fontSize=this.sidebarTitleSize+"px",b.style.textAlign="center",b.style.whiteSpace="nowrap",b.style.overflow="hidden",b.style.textOverflow="ellipsis",mxClient.IS_IE&&(b.style.height=this.sidebarTitleSize+12+"px"),b.style.paddingTop="4px",mxUtils.write(b,g),d.appendChild(b));return a};
+Sidebar.prototype.createThumb=function(a,b,f,e,g,d,k){this.graph.labelsVisible=null==d||d;d=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;this.graph.view.scaleAndTranslate(1,0,0);this.graph.addCells(a);a=this.graph.getGraphBounds();var n=Math.floor(100*Math.min((b-2*this.thumbBorder)/a.width,(f-2*this.thumbBorder)/a.height))/100;this.graph.view.scaleAndTranslate(n,Math.floor((b-a.width*n)/2/n-a.x),Math.floor((f-a.height*n)/2/n-a.y));this.graph.dialect!=mxConstants.DIALECT_SVG||
+mxClient.NO_FO||null==this.graph.view.getCanvas().ownerSVGElement?(n=this.graph.container.cloneNode(!1),n.innerHTML=this.graph.container.innerHTML):n=this.graph.view.getCanvas().ownerSVGElement.cloneNode(!0);this.graph.getModel().clear();mxClient.NO_FO=d;n.style.position="relative";n.style.overflow="hidden";n.style.left=this.thumbBorder+"px";n.style.top=this.thumbBorder+"px";n.style.width=b+"px";n.style.height=f+"px";n.style.visibility="";n.style.minWidth="";n.style.minHeight="";e.appendChild(n);
+this.sidebarTitles&&null!=g&&0!=k&&(e.style.height=this.thumbHeight+0+this.sidebarTitleSize+8+"px",b=document.createElement("div"),b.style.color=Editor.isDarkMode()?"#A0A0A0":"#303030",b.style.fontSize=this.sidebarTitleSize+"px",b.style.textAlign="center",b.style.whiteSpace="nowrap",b.style.overflow="hidden",b.style.textOverflow="ellipsis",mxClient.IS_IE&&(b.style.height=this.sidebarTitleSize+12+"px"),b.style.paddingTop="4px",mxUtils.write(b,g),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,f,d,g,e,k,n){n=null!=n?n:!0;var u=document.createElement("a");u.className="geItem";u.style.overflow="hidden";var m=2*this.thumbBorder;u.style.width=this.thumbWidth+m+"px";u.style.height=this.thumbHeight+m+"px";u.style.padding=this.thumbPadding+"px";mxEvent.addListener(u,"click",function(x){mxEvent.consume(x)});m=a;a=this.graph.cloneCells(a);this.editorUi.insertHandler(m,null,this.graph.model,this.editorUi.editor.graph.defaultVertexStyle,this.editorUi.editor.graph.defaultEdgeStyle,
-!0,!0);this.createThumb(m,this.thumbWidth,this.thumbHeight,u,b,f,d,g,e);var r=new mxRectangle(0,0,g,e);1<a.length||a[0].vertex?(d=this.createDragSource(u,this.createDropHandler(a,!0,k,r),this.createDragPreview(g,e),a,r),this.addClickHandler(u,d,a),d.isGuidesEnabled=mxUtils.bind(this,function(){return this.editorUi.editor.graph.graphHandler.guidesEnabled})):null!=a[0]&&a[0].edge&&(d=this.createDragSource(u,this.createDropHandler(a,!1,k,r),this.createDragPreview(g,e),a,r),this.addClickHandler(u,d,a));
+Sidebar.prototype.createItem=function(a,b,f,e,g,d,k,n){n=null!=n?n:!0;var u=document.createElement("a");u.className="geItem";u.style.overflow="hidden";var m=2*this.thumbBorder;u.style.width=this.thumbWidth+m+"px";u.style.height=this.thumbHeight+m+"px";u.style.padding=this.thumbPadding+"px";mxEvent.addListener(u,"click",function(x){mxEvent.consume(x)});m=a;a=this.graph.cloneCells(a);this.editorUi.insertHandler(m,null,this.graph.model,this.editorUi.editor.graph.defaultVertexStyle,this.editorUi.editor.graph.defaultEdgeStyle,
+!0,!0);this.createThumb(m,this.thumbWidth,this.thumbHeight,u,b,f,e,g,d);var r=new mxRectangle(0,0,g,d);1<a.length||a[0].vertex?(e=this.createDragSource(u,this.createDropHandler(a,!0,k,r),this.createDragPreview(g,d),a,r),this.addClickHandler(u,e,a),e.isGuidesEnabled=mxUtils.bind(this,function(){return this.editorUi.editor.graph.graphHandler.guidesEnabled})):null!=a[0]&&a[0].edge&&(e=this.createDragSource(u,this.createDropHandler(a,!1,k,r),this.createDragPreview(g,d),a,r),this.addClickHandler(u,e,a));
!mxClient.IS_IOS&&n&&mxEvent.addGestureListeners(u,null,mxUtils.bind(this,function(x){mxEvent.isMouseEvent(x)&&this.showTooltip(u,a,r.width,r.height,b,f)}));return u};
-Sidebar.prototype.updateShapes=function(a,b){var f=this.editorUi.editor.graph,d=f.getCellStyle(a),g=[];f.model.beginUpdate();try{for(var e=f.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(" "),n=
-0;n<b.length;n++){var u=b[n];if(f.getModel().isVertex(u)==f.getModel().isVertex(a)||f.getModel().isEdge(u)==f.getModel().isEdge(a)){var m=f.getCellStyle(b[n],!1);f.getModel().setStyle(u,e);if("1"==mxUtils.getValue(m,"composite","0"))for(var r=f.model.getChildCount(u);0<=r;r--)f.model.remove(f.model.getChildAt(u,r));"umlLifeline"==m[mxConstants.STYLE_SHAPE]&&"umlLifeline"!=d[mxConstants.STYLE_SHAPE]&&(f.setCellStyles(mxConstants.STYLE_SHAPE,"umlLifeline",[u]),f.setCellStyles("participant",d[mxConstants.STYLE_SHAPE],
+Sidebar.prototype.updateShapes=function(a,b){var f=this.editorUi.editor.graph,e=f.getCellStyle(a),g=[];f.model.beginUpdate();try{for(var d=f.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(" "),n=
+0;n<b.length;n++){var u=b[n];if(f.getModel().isVertex(u)==f.getModel().isVertex(a)||f.getModel().isEdge(u)==f.getModel().isEdge(a)){var m=f.getCellStyle(b[n],!1);f.getModel().setStyle(u,d);if("1"==mxUtils.getValue(m,"composite","0"))for(var r=f.model.getChildCount(u);0<=r;r--)f.model.remove(f.model.getChildAt(u,r));"umlLifeline"==m[mxConstants.STYLE_SHAPE]&&"umlLifeline"!=e[mxConstants.STYLE_SHAPE]&&(f.setCellStyles(mxConstants.STYLE_SHAPE,"umlLifeline",[u]),f.setCellStyles("participant",e[mxConstants.STYLE_SHAPE],
[u]));for(r=0;r<k.length;r++){var x=m[k[r]];null!=x&&f.setCellStyles(k[r],x,[u])}g.push(u)}}}finally{f.model.endUpdate()}return g};
-Sidebar.prototype.createDropHandler=function(a,b,f,d){f=null!=f?f:!0;return mxUtils.bind(this,function(g,e,k,n,u,m){for(m=m?null:mxEvent.isTouchEvent(e)||mxEvent.isPenEvent(e)?document.elementFromPoint(mxEvent.getClientX(e),mxEvent.getClientY(e)):mxEvent.getSource(e);null!=m&&m!=this.container;)m=m.parentNode;if(null==m&&g.isEnabled()){a=g.getImportableCells(a);if(0<a.length){g.stopEditing();m=null==k||mxEvent.isAltDown(e)?!1:g.isValidDropTarget(k,a,e);var r=null;null==k||m||(k=null);if(!g.isCellLocked(k||
-g.getDefaultParent())){g.model.beginUpdate();try{n=Math.round(n);u=Math.round(u);if(b&&g.isSplitTarget(k,a,e)){var x=g.view.scale,B=g.view.translate,C=(n+B.x)*x,G=(u+B.y)*x,J=g.cloneCells(a);g.splitEdge(k,J,null,n-d.width/2,u-d.height/2,C,G);r=J}else 0<a.length&&(r=g.importCells(a,n,u,k));if(null!=g.layoutManager){var D=g.layoutManager.getLayout(k);if(null!=D)for(x=g.view.scale,B=g.view.translate,C=(n+B.x)*x,G=(u+B.y)*x,k=0;k<r.length;k++)D.moveCell(r[k],C,G)}!f||null!=e&&mxEvent.isShiftDown(e)||
-g.fireEvent(new mxEventObject("cellsInserted","cells",r))}catch(N){this.editorUi.handleError(N)}finally{g.model.endUpdate()}null!=r&&0<r.length&&(g.scrollCellToVisible(r[0]),g.setSelectionCells(r));g.editAfterInsert&&null!=e&&mxEvent.isMouseEvent(e)&&null!=r&&1==r.length&&window.setTimeout(function(){g.startEditing(r[0])},0)}}mxEvent.consume(e)}})};
+Sidebar.prototype.createDropHandler=function(a,b,f,e){f=null!=f?f:!0;return mxUtils.bind(this,function(g,d,k,n,u,m){for(m=m?null:mxEvent.isTouchEvent(d)||mxEvent.isPenEvent(d)?document.elementFromPoint(mxEvent.getClientX(d),mxEvent.getClientY(d)):mxEvent.getSource(d);null!=m&&m!=this.container;)m=m.parentNode;if(null==m&&g.isEnabled()){a=g.getImportableCells(a);if(0<a.length){g.stopEditing();m=null==k||mxEvent.isAltDown(d)?!1:g.isValidDropTarget(k,a,d);var r=null;null==k||m||(k=null);if(!g.isCellLocked(k||
+g.getDefaultParent())){g.model.beginUpdate();try{n=Math.round(n);u=Math.round(u);if(b&&g.isSplitTarget(k,a,d)){var x=g.view.scale,B=g.view.translate,C=(n+B.x)*x,F=(u+B.y)*x,J=g.cloneCells(a);g.splitEdge(k,J,null,n-e.width/2,u-e.height/2,C,F);r=J}else 0<a.length&&(r=g.importCells(a,n,u,k));if(null!=g.layoutManager){var D=g.layoutManager.getLayout(k);if(null!=D)for(x=g.view.scale,B=g.view.translate,C=(n+B.x)*x,F=(u+B.y)*x,k=0;k<r.length;k++)D.moveCell(r[k],C,F)}!f||null!=d&&mxEvent.isShiftDown(d)||
+g.fireEvent(new mxEventObject("cellsInserted","cells",r))}catch(N){this.editorUi.handleError(N)}finally{g.model.endUpdate()}null!=r&&0<r.length&&(g.scrollCellToVisible(r[0]),g.setSelectionCells(r));g.editAfterInsert&&null!=d&&mxEvent.isMouseEvent(d)&&null!=r&&1==r.length&&window.setTimeout(function(){g.startEditing(r[0])},0)}}mxEvent.consume(d)}})};
Sidebar.prototype.createDragPreview=function(a,b){var f=document.createElement("div");f.className="geDragPreview";f.style.width=a+"px";f.style.height=b+"px";return f};
-Sidebar.prototype.dropAndConnect=function(a,b,f,d,g){var e=this.getDropAndConnectGeometry(a,b[d],f,b),k=[];if(null!=e){var n=this.editorUi.editor.graph,u=null;n.model.beginUpdate();try{var m=n.getCellGeometry(a),r=n.getCellGeometry(b[d]),x=n.model.getParent(a),B=!0;if(null!=n.layoutManager){var C=n.layoutManager.getLayout(x);null!=C&&C.constructor==mxStackLayout&&(B=!1)}k=n.model.isEdge(a)?null:n.view.getState(x);var G=C=0;if(null!=k){var J=k.origin;C=J.x;G=J.y;var D=e.getTerminalPoint(!1);null!=
-D&&(D.x+=J.x,D.y+=J.y)}var N=!n.isTableRow(a)&&!n.isTableCell(a)&&(n.model.isEdge(a)||null!=m&&!m.relative&&B),Q=n.getCellAt((e.x+C+n.view.translate.x)*n.view.scale,(e.y+G+n.view.translate.y)*n.view.scale,null,null,null,function(Z,U,V){return!n.isContainer(Z.cell)});if(null!=Q&&Q!=x)k=n.view.getState(Q),null!=k&&(J=k.origin,x=Q,N=!0,n.model.isEdge(a)||(e.x-=J.x-C,e.y-=J.y-G));else if(!B||n.isTableRow(a)||n.isTableCell(a))e.x+=C,e.y+=G;C=r.x;G=r.y;n.model.isEdge(b[d])&&(G=C=0);k=b=n.importCells(b,
-e.x-(N?C:0),e.y-(N?G:0),N?x:null);if(n.model.isEdge(a))n.model.setTerminal(a,b[d],f==mxConstants.DIRECTION_NORTH);else if(n.model.isEdge(b[d])){n.model.setTerminal(b[d],a,!0);var R=n.getCellGeometry(b[d]);R.points=null;if(null!=R.getTerminalPoint(!1))R.setTerminalPoint(e.getTerminalPoint(!1),!1);else if(N&&n.model.isVertex(x)){var P=n.view.getState(x);J=P.cell!=n.view.currentRoot?P.origin:new mxPoint(0,0);n.cellsMoved(b,J.x,J.y,null,null,!0)}}else r=n.getCellGeometry(b[d]),C=e.x-Math.round(r.x),G=
-e.y-Math.round(r.y),e.x=Math.round(r.x),e.y=Math.round(r.y),n.model.setGeometry(b[d],e),n.cellsMoved(b,C,G,null,null,!0),k=b.slice(),u=1==k.length?k[0]:null,b.push(n.insertEdge(null,null,"",a,b[d],n.createCurrentEdgeStyle()));null!=g&&mxEvent.isShiftDown(g)||n.fireEvent(new mxEventObject("cellsInserted","cells",b))}catch(Z){this.editorUi.handleError(Z)}finally{n.model.endUpdate()}n.editAfterInsert&&null!=g&&mxEvent.isMouseEvent(g)&&null!=u&&window.setTimeout(function(){n.startEditing(u)},0)}return k};
-Sidebar.prototype.getDropAndConnectGeometry=function(a,b,f,d){var g=this.editorUi.editor.graph,e=g.view,k=1<d.length,n=g.getCellGeometry(a);d=g.getCellGeometry(b);null!=n&&null!=d&&(d=d.clone(),g.model.isEdge(a)?(a=g.view.getState(a),n=a.absolutePoints,b=n[0],g=n[n.length-1],f==mxConstants.DIRECTION_NORTH?(d.x=b.x/e.scale-e.translate.x-d.width/2,d.y=b.y/e.scale-e.translate.y-d.height/2):(d.x=g.x/e.scale-e.translate.x-d.width/2,d.y=g.y/e.scale-e.translate.y-d.height/2)):(n.relative&&(a=g.view.getState(a),
-n=n.clone(),n.x=(a.x-e.translate.x)/e.scale,n.y=(a.y-e.translate.y)/e.scale),e=g.defaultEdgeLength,g.model.isEdge(b)&&null!=d.getTerminalPoint(!0)&&null!=d.getTerminalPoint(!1)?(b=d.getTerminalPoint(!0),g=d.getTerminalPoint(!1),e=g.x-b.x,b=g.y-b.y,e=Math.sqrt(e*e+b*b),d.x=n.getCenterX(),d.y=n.getCenterY(),d.width=1,d.height=1,f==mxConstants.DIRECTION_NORTH?(d.height=e,d.y=n.y-e,d.setTerminalPoint(new mxPoint(d.x,d.y),!1)):f==mxConstants.DIRECTION_EAST?(d.width=e,d.x=n.x+n.width,d.setTerminalPoint(new mxPoint(d.x+
-d.width,d.y),!1)):f==mxConstants.DIRECTION_SOUTH?(d.height=e,d.y=n.y+n.height,d.setTerminalPoint(new mxPoint(d.x,d.y+d.height),!1)):f==mxConstants.DIRECTION_WEST&&(d.width=e,d.x=n.x-e,d.setTerminalPoint(new mxPoint(d.x,d.y),!1))):(!k&&45<d.width&&45<d.height&&45<n.width&&45<n.height&&(d.width*=n.height/d.height,d.height=n.height),d.x=n.x+n.width/2-d.width/2,d.y=n.y+n.height/2-d.height/2,f==mxConstants.DIRECTION_NORTH?d.y=d.y-n.height/2-d.height/2-e:f==mxConstants.DIRECTION_EAST?d.x=d.x+n.width/2+
-d.width/2+e:f==mxConstants.DIRECTION_SOUTH?d.y=d.y+n.height/2+d.height/2+e:f==mxConstants.DIRECTION_WEST&&(d.x=d.x-n.width/2-d.width/2-e),g.model.isEdge(b)&&null!=d.getTerminalPoint(!0)&&null!=b.getTerminal(!1)&&(n=g.getCellGeometry(b.getTerminal(!1)),null!=n&&(f==mxConstants.DIRECTION_NORTH?(d.x-=n.getCenterX(),d.y-=n.getCenterY()+n.height/2):f==mxConstants.DIRECTION_EAST?(d.x-=n.getCenterX()-n.width/2,d.y-=n.getCenterY()):f==mxConstants.DIRECTION_SOUTH?(d.x-=n.getCenterX(),d.y-=n.getCenterY()-n.height/
-2):f==mxConstants.DIRECTION_WEST&&(d.x-=n.getCenterX()+n.width/2,d.y-=n.getCenterY()))))));return d};Sidebar.prototype.isDropStyleEnabled=function(a,b){var f=!0;null!=b&&1==a.length&&(a=this.graph.getCellStyle(a[b]),null!=a&&(f=mxUtils.getValue(a,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(a,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE));return f};
+Sidebar.prototype.dropAndConnect=function(a,b,f,e,g){var d=this.getDropAndConnectGeometry(a,b[e],f,b),k=[];if(null!=d){var n=this.editorUi.editor.graph,u=null;n.model.beginUpdate();try{var m=n.getCellGeometry(a),r=n.getCellGeometry(b[e]),x=n.model.getParent(a),B=!0;if(null!=n.layoutManager){var C=n.layoutManager.getLayout(x);null!=C&&C.constructor==mxStackLayout&&(B=!1)}k=n.model.isEdge(a)?null:n.view.getState(x);var F=C=0;if(null!=k){var J=k.origin;C=J.x;F=J.y;var D=d.getTerminalPoint(!1);null!=
+D&&(D.x+=J.x,D.y+=J.y)}var N=!n.isTableRow(a)&&!n.isTableCell(a)&&(n.model.isEdge(a)||null!=m&&!m.relative&&B),S=n.getCellAt((d.x+C+n.view.translate.x)*n.view.scale,(d.y+F+n.view.translate.y)*n.view.scale,null,null,null,function(Z,U,V){return!n.isContainer(Z.cell)});if(null!=S&&S!=x)k=n.view.getState(S),null!=k&&(J=k.origin,x=S,N=!0,n.model.isEdge(a)||(d.x-=J.x-C,d.y-=J.y-F));else if(!B||n.isTableRow(a)||n.isTableCell(a))d.x+=C,d.y+=F;C=r.x;F=r.y;n.model.isEdge(b[e])&&(F=C=0);k=b=n.importCells(b,
+d.x-(N?C:0),d.y-(N?F:0),N?x:null);if(n.model.isEdge(a))n.model.setTerminal(a,b[e],f==mxConstants.DIRECTION_NORTH);else if(n.model.isEdge(b[e])){n.model.setTerminal(b[e],a,!0);var T=n.getCellGeometry(b[e]);T.points=null;if(null!=T.getTerminalPoint(!1))T.setTerminalPoint(d.getTerminalPoint(!1),!1);else if(N&&n.model.isVertex(x)){var P=n.view.getState(x);J=P.cell!=n.view.currentRoot?P.origin:new mxPoint(0,0);n.cellsMoved(b,J.x,J.y,null,null,!0)}}else r=n.getCellGeometry(b[e]),C=d.x-Math.round(r.x),F=
+d.y-Math.round(r.y),d.x=Math.round(r.x),d.y=Math.round(r.y),n.model.setGeometry(b[e],d),n.cellsMoved(b,C,F,null,null,!0),k=b.slice(),u=1==k.length?k[0]:null,b.push(n.insertEdge(null,null,"",a,b[e],n.createCurrentEdgeStyle()));null!=g&&mxEvent.isShiftDown(g)||n.fireEvent(new mxEventObject("cellsInserted","cells",b))}catch(Z){this.editorUi.handleError(Z)}finally{n.model.endUpdate()}n.editAfterInsert&&null!=g&&mxEvent.isMouseEvent(g)&&null!=u&&window.setTimeout(function(){n.startEditing(u)},0)}return k};
+Sidebar.prototype.getDropAndConnectGeometry=function(a,b,f,e){var g=this.editorUi.editor.graph,d=g.view,k=1<e.length,n=g.getCellGeometry(a);e=g.getCellGeometry(b);null!=n&&null!=e&&(e=e.clone(),g.model.isEdge(a)?(a=g.view.getState(a),n=a.absolutePoints,b=n[0],g=n[n.length-1],f==mxConstants.DIRECTION_NORTH?(e.x=b.x/d.scale-d.translate.x-e.width/2,e.y=b.y/d.scale-d.translate.y-e.height/2):(e.x=g.x/d.scale-d.translate.x-e.width/2,e.y=g.y/d.scale-d.translate.y-e.height/2)):(n.relative&&(a=g.view.getState(a),
+n=n.clone(),n.x=(a.x-d.translate.x)/d.scale,n.y=(a.y-d.translate.y)/d.scale),d=g.defaultEdgeLength,g.model.isEdge(b)&&null!=e.getTerminalPoint(!0)&&null!=e.getTerminalPoint(!1)?(b=e.getTerminalPoint(!0),g=e.getTerminalPoint(!1),d=g.x-b.x,b=g.y-b.y,d=Math.sqrt(d*d+b*b),e.x=n.getCenterX(),e.y=n.getCenterY(),e.width=1,e.height=1,f==mxConstants.DIRECTION_NORTH?(e.height=d,e.y=n.y-d,e.setTerminalPoint(new mxPoint(e.x,e.y),!1)):f==mxConstants.DIRECTION_EAST?(e.width=d,e.x=n.x+n.width,e.setTerminalPoint(new mxPoint(e.x+
+e.width,e.y),!1)):f==mxConstants.DIRECTION_SOUTH?(e.height=d,e.y=n.y+n.height,e.setTerminalPoint(new mxPoint(e.x,e.y+e.height),!1)):f==mxConstants.DIRECTION_WEST&&(e.width=d,e.x=n.x-d,e.setTerminalPoint(new mxPoint(e.x,e.y),!1))):(!k&&45<e.width&&45<e.height&&45<n.width&&45<n.height&&(e.width*=n.height/e.height,e.height=n.height),e.x=n.x+n.width/2-e.width/2,e.y=n.y+n.height/2-e.height/2,f==mxConstants.DIRECTION_NORTH?e.y=e.y-n.height/2-e.height/2-d:f==mxConstants.DIRECTION_EAST?e.x=e.x+n.width/2+
+e.width/2+d:f==mxConstants.DIRECTION_SOUTH?e.y=e.y+n.height/2+e.height/2+d:f==mxConstants.DIRECTION_WEST&&(e.x=e.x-n.width/2-e.width/2-d),g.model.isEdge(b)&&null!=e.getTerminalPoint(!0)&&null!=b.getTerminal(!1)&&(n=g.getCellGeometry(b.getTerminal(!1)),null!=n&&(f==mxConstants.DIRECTION_NORTH?(e.x-=n.getCenterX(),e.y-=n.getCenterY()+n.height/2):f==mxConstants.DIRECTION_EAST?(e.x-=n.getCenterX()-n.width/2,e.y-=n.getCenterY()):f==mxConstants.DIRECTION_SOUTH?(e.x-=n.getCenterX(),e.y-=n.getCenterY()-n.height/
+2):f==mxConstants.DIRECTION_WEST&&(e.x-=n.getCenterX()+n.width/2,e.y-=n.getCenterY()))))));return e};Sidebar.prototype.isDropStyleEnabled=function(a,b){var f=!0;null!=b&&1==a.length&&(a=this.graph.getCellStyle(a[b]),null!=a&&(f=mxUtils.getValue(a,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(a,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE));return f};
Sidebar.prototype.isDropStyleTargetIgnored=function(a){return this.graph.isSwimlane(a.cell)||this.graph.isTableCell(a.cell)||this.graph.isTableRow(a.cell)||this.graph.isTable(a.cell)};
-Sidebar.prototype.createDragSource=function(a,b,f,d,g){function e(aa,oa){var sa=mxUtils.createImage(aa.src);sa.style.width=aa.width+"px";sa.style.height=aa.height+"px";null!=oa&&sa.setAttribute("title",oa);mxUtils.setOpacity(sa,aa==this.refreshTarget?30:20);sa.style.position="absolute";sa.style.cursor="crosshair";return sa}function k(aa,oa,sa,Ka){null!=Ka.parentNode&&(mxUtils.contains(sa,aa,oa)?(mxUtils.setOpacity(Ka,100),S=Ka):mxUtils.setOpacity(Ka,Ka==ia?30:20));return sa}for(var n=this.editorUi,
-u=n.editor.graph,m=null,r=null,x=this,B=0;B<d.length&&(null==r&&u.model.isVertex(d[B])?r=B:null==m&&u.model.isEdge(d[B])&&null==u.model.getTerminal(d[B],!0)&&(m=B),null==r||null==m);B++);var C=this.isDropStyleEnabled(d,r),G=mxUtils.makeDraggable(a,u,mxUtils.bind(this,function(aa,oa,sa,Ka,Ha){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=d&&null!=Q&&S==ia){var ua=aa.isCellSelected(Q.cell)?aa.getSelectionCells():[Q.cell];ua=this.updateShapes(aa.model.isEdge(Q.cell)?d[0]:d[r],
-ua);aa.setSelectionCells(ua)}else null!=d&&null!=S&&null!=D&&S!=ia?(ua=aa.model.isEdge(D.cell)||null==m?r:m,aa.setSelectionCells(this.dropAndConnect(D.cell,d,O,ua,oa))):b.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(aa.view.getState(aa.getSelectionCell()))}),f,0,0,u.autoscroll,!0,!0);u.addListener(mxEvent.ESCAPE,function(aa,oa){G.isActive()&&G.reset()});var J=G.mouseDown;G.mouseDown=function(aa){mxEvent.isPopupTrigger(aa)||mxEvent.isMultiTouchEvent(aa)||u.isCellLocked(u.getDefaultParent())||
-(u.stopEditing(),J.apply(this,arguments))};var D=null,N=null,Q=null,R=!1,P=e(this.triangleUp,mxResources.get("connect")),Z=e(this.triangleRight,mxResources.get("connect")),U=e(this.triangleDown,mxResources.get("connect")),V=e(this.triangleLeft,mxResources.get("connect")),ia=e(this.refreshTarget,mxResources.get("replace")),ha=null,ba=e(this.roundDrop),qa=e(this.roundDrop),O=mxConstants.DIRECTION_NORTH,S=null,F=G.createPreviewElement;G.createPreviewElement=function(aa){var oa=F.apply(this,arguments);
-mxClient.IS_SVG&&(oa.style.pointerEvents="none");this.previewElementWidth=oa.style.width;this.previewElementHeight=oa.style.height;return oa};var L=G.dragEnter;G.dragEnter=function(aa,oa){null!=n.hoverIcons&&n.hoverIcons.setDisplay("none");L.apply(this,arguments)};var T=G.dragExit;G.dragExit=function(aa,oa){null!=n.hoverIcons&&n.hoverIcons.setDisplay("");T.apply(this,arguments)};G.dragOver=function(aa,oa){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=S&&this.currentGuide.hide();
-if(null!=this.previewElement){var sa=aa.view;if(null!=Q&&S==ia)this.previewElement.style.display=aa.model.isEdge(Q.cell)?"none":"",this.previewElement.style.left=Q.x+"px",this.previewElement.style.top=Q.y+"px",this.previewElement.style.width=Q.width+"px",this.previewElement.style.height=Q.height+"px";else if(null!=D&&null!=S){null!=G.currentHighlight&&null!=G.currentHighlight.state&&G.currentHighlight.hide();var Ka=aa.model.isEdge(D.cell)||null==m?r:m,Ha=x.getDropAndConnectGeometry(D.cell,d[Ka],O,
-d),ua=aa.model.isEdge(D.cell)?null:aa.getCellGeometry(D.cell),Ca=aa.getCellGeometry(d[Ka]),ra=aa.model.getParent(D.cell),Da=sa.translate.x*sa.scale,Ua=sa.translate.y*sa.scale;null!=ua&&!ua.relative&&aa.model.isVertex(ra)&&ra!=sa.currentRoot&&(Ua=sa.getState(ra),Da=Ua.x,Ua=Ua.y);ua=Ca.x;Ca=Ca.y;aa.model.isEdge(d[Ka])&&(Ca=ua=0);this.previewElement.style.left=(Ha.x-ua)*sa.scale+Da+"px";this.previewElement.style.top=(Ha.y-Ca)*sa.scale+Ua+"px";1==d.length&&(this.previewElement.style.width=Ha.width*sa.scale+
-"px",this.previewElement.style.height=Ha.height*sa.scale+"px");this.previewElement.style.display=""}else null!=G.currentHighlight.state&&aa.model.isEdge(G.currentHighlight.state.cell)?(this.previewElement.style.left=Math.round(parseInt(this.previewElement.style.left)-g.width*sa.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-g.height*sa.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,
-this.previewElement.style.display="")}};var ca=(new Date).getTime(),fa=0,wa=null,W=this.editorUi.editor.graph.getCellStyle(d[0]);G.getDropTarget=mxUtils.bind(this,function(aa,oa,sa,Ka){var Ha=mxEvent.isAltDown(Ka)||null==d?null:aa.getCellAt(oa,sa,null,null,null,function(Ua,db,Ta){return aa.isContainer(Ua.cell)});if(null!=Ha&&!this.graph.isCellConnectable(Ha)&&!this.graph.model.isEdge(Ha)){var ua=this.graph.getModel().getParent(Ha);this.graph.getModel().isVertex(ua)&&this.graph.isCellConnectable(ua)&&
-(Ha=ua)}aa.isCellLocked(Ha)&&(Ha=null);var Ca=aa.view.getState(Ha);ua=S=null;wa!=Ca?(ca=(new Date).getTime(),fa=0,wa=Ca,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=Ca&&(this.updateThread=window.setTimeout(function(){null==S&&(wa=Ca,G.getDropTarget(aa,oa,sa,Ka))},this.dropTargetDelay+10))):fa=(new Date).getTime()-ca;if(C&&2500>fa&&null!=Ca&&!mxEvent.isShiftDown(Ka)&&(mxUtils.getValue(Ca.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(W,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(Ca.style,
-mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ca.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ca.style,mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(W,mxConstants.STYLE_SHAPE)||1500<fa||aa.model.isEdge(Ca.cell))&&fa>this.dropTargetDelay&&!this.isDropStyleTargetIgnored(Ca)&&(aa.model.isVertex(Ca.cell)&&null!=r||aa.model.isEdge(Ca.cell)&&aa.model.isEdge(d[0]))){if(aa.isCellEditable(Ca.cell)){Q=
-Ca;var ra=aa.model.isEdge(Ca.cell)?aa.view.getPoint(Ca):new mxPoint(Ca.getCenterX(),Ca.getCenterY());ra=new mxRectangle(ra.x-this.refreshTarget.width/2,ra.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);ia.style.left=Math.floor(ra.x)+"px";ia.style.top=Math.floor(ra.y)+"px";null==ha&&(aa.container.appendChild(ia),ha=ia.parentNode);k(oa,sa,ra,ia)}}else null==Q||!mxUtils.contains(Q,oa,sa)||1500<fa&&!mxEvent.isShiftDown(Ka)?(Q=null,null!=ha&&(ia.parentNode.removeChild(ia),
-ha=null)):null!=Q&&null!=ha&&(ra=aa.model.isEdge(Q.cell)?aa.view.getPoint(Q):new mxPoint(Q.getCenterX(),Q.getCenterY()),ra=new mxRectangle(ra.x-this.refreshTarget.width/2,ra.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height),k(oa,sa,ra,ia));if(R&&null!=D&&!mxEvent.isAltDown(Ka)&&null==S){ua=mxRectangle.fromRectangle(D);if(aa.model.isEdge(D.cell)){var Da=D.absolutePoints;null!=ba.parentNode&&(ra=Da[0],ua.add(k(oa,sa,new mxRectangle(ra.x-this.roundDrop.width/2,ra.y-this.roundDrop.height/
-2,this.roundDrop.width,this.roundDrop.height),ba)));null!=qa.parentNode&&(Da=Da[Da.length-1],ua.add(k(oa,sa,new mxRectangle(Da.x-this.roundDrop.width/2,Da.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),qa)))}else ra=mxRectangle.fromRectangle(D),null!=D.shape&&null!=D.shape.boundingBox&&(ra=mxRectangle.fromRectangle(D.shape.boundingBox)),ra.grow(this.graph.tolerance),ra.grow(HoverIcons.prototype.arrowSpacing),Da=this.graph.selectionCellsHandler.getHandler(D.cell),null!=Da&&(ra.x-=
-Da.horizontalOffset/2,ra.y-=Da.verticalOffset/2,ra.width+=Da.horizontalOffset,ra.height+=Da.verticalOffset,null!=Da.rotationShape&&null!=Da.rotationShape.node&&"hidden"!=Da.rotationShape.node.style.visibility&&"none"!=Da.rotationShape.node.style.display&&null!=Da.rotationShape.boundingBox&&ra.add(Da.rotationShape.boundingBox)),ua.add(k(oa,sa,new mxRectangle(D.getCenterX()-this.triangleUp.width/2,ra.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),P)),ua.add(k(oa,sa,new mxRectangle(ra.x+
-ra.width,D.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),Z)),ua.add(k(oa,sa,new mxRectangle(D.getCenterX()-this.triangleDown.width/2,ra.y+ra.height,this.triangleDown.width,this.triangleDown.height),U)),ua.add(k(oa,sa,new mxRectangle(ra.x-this.triangleLeft.width,D.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),V));null!=ua&&ua.grow(10)}O=mxConstants.DIRECTION_NORTH;S==Z?O=mxConstants.DIRECTION_EAST:S==U||S==qa?
-O=mxConstants.DIRECTION_SOUTH:S==V&&(O=mxConstants.DIRECTION_WEST);null!=Q&&S==ia&&(Ca=Q);ra=(null==r||aa.isCellConnectable(d[r]))&&(aa.model.isEdge(Ha)&&null!=r||aa.model.isVertex(Ha)&&aa.isCellConnectable(Ha));if(null!=D&&5E3<=fa||D!=Ca&&(null==ua||!mxUtils.contains(ua,oa,sa)||500<fa&&null==S&&ra))if(R=!1,D=5E3>fa&&fa>this.dropTargetDelay||aa.model.isEdge(Ha)?Ca:null,null!=D&&ra){ua=[ba,qa,P,Z,U,V];for(ra=0;ra<ua.length;ra++)null!=ua[ra].parentNode&&ua[ra].parentNode.removeChild(ua[ra]);aa.model.isEdge(Ha)?
-(Da=Ca.absolutePoints,null!=Da&&(ra=Da[0],Da=Da[Da.length-1],ua=aa.tolerance,new mxRectangle(oa-ua,sa-ua,2*ua,2*ua),ba.style.left=Math.floor(ra.x-this.roundDrop.width/2)+"px",ba.style.top=Math.floor(ra.y-this.roundDrop.height/2)+"px",qa.style.left=Math.floor(Da.x-this.roundDrop.width/2)+"px",qa.style.top=Math.floor(Da.y-this.roundDrop.height/2)+"px",null==aa.model.getTerminal(Ha,!0)&&aa.container.appendChild(ba),null==aa.model.getTerminal(Ha,!1)&&aa.container.appendChild(qa))):(ra=mxRectangle.fromRectangle(Ca),
-null!=Ca.shape&&null!=Ca.shape.boundingBox&&(ra=mxRectangle.fromRectangle(Ca.shape.boundingBox)),ra.grow(this.graph.tolerance),ra.grow(HoverIcons.prototype.arrowSpacing),Da=this.graph.selectionCellsHandler.getHandler(Ca.cell),null!=Da&&(ra.x-=Da.horizontalOffset/2,ra.y-=Da.verticalOffset/2,ra.width+=Da.horizontalOffset,ra.height+=Da.verticalOffset,null!=Da.rotationShape&&null!=Da.rotationShape.node&&"hidden"!=Da.rotationShape.node.style.visibility&&"none"!=Da.rotationShape.node.style.display&&null!=
-Da.rotationShape.boundingBox&&ra.add(Da.rotationShape.boundingBox)),P.style.left=Math.floor(Ca.getCenterX()-this.triangleUp.width/2)+"px",P.style.top=Math.floor(ra.y-this.triangleUp.height)+"px",Z.style.left=Math.floor(ra.x+ra.width)+"px",Z.style.top=Math.floor(Ca.getCenterY()-this.triangleRight.height/2)+"px",U.style.left=P.style.left,U.style.top=Math.floor(ra.y+ra.height)+"px",V.style.left=Math.floor(ra.x-this.triangleLeft.width)+"px",V.style.top=Z.style.top,"eastwest"!=Ca.style.portConstraint&&
-(aa.container.appendChild(P),aa.container.appendChild(U)),aa.container.appendChild(Z),aa.container.appendChild(V));null!=Ca&&(N=aa.selectionCellsHandler.getHandler(Ca.cell),null!=N&&null!=N.setHandlesVisible&&N.setHandlesVisible(!1));R=!0}else for(ua=[ba,qa,P,Z,U,V],ra=0;ra<ua.length;ra++)null!=ua[ra].parentNode&&ua[ra].parentNode.removeChild(ua[ra]);R||null==N||N.setHandlesVisible(!0);Ha=mxEvent.isAltDown(Ka)&&!mxEvent.isShiftDown(Ka)||null!=Q&&S==ia?null:mxDragSource.prototype.getDropTarget.apply(this,
-arguments);ua=aa.getModel();if(null!=Ha&&(null!=S||!aa.isSplitTarget(Ha,d,Ka))){for(;null!=Ha&&!aa.isValidDropTarget(Ha,d,Ka)&&ua.isVertex(ua.getParent(Ha));)Ha=ua.getParent(Ha);null!=Ha&&(aa.view.currentRoot==Ha||!aa.isValidRoot(Ha)&&0==aa.getModel().getChildCount(Ha)||aa.isCellLocked(Ha)||ua.isEdge(Ha)||!aa.isValidDropTarget(Ha,d,Ka))&&(Ha=null)}aa.isCellLocked(Ha)&&(Ha=null);return Ha});G.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,arguments);for(var aa=[ba,qa,ia,P,Z,U,V],oa=
-0;oa<aa.length;oa++)null!=aa[oa].parentNode&&aa[oa].parentNode.removeChild(aa[oa]);null!=D&&null!=N&&N.reset();S=ha=Q=D=N=null};return G};
-Sidebar.prototype.itemClicked=function(a,b,f,d){d=this.editorUi.editor.graph;d.container.focus();if(mxEvent.isAltDown(f)&&1==d.getSelectionCount()&&d.model.isVertex(d.getSelectionCell())){b=null;for(var g=0;g<a.length&&null==b;g++)d.model.isVertex(a[g])&&(b=g);null!=b&&(d.setSelectionCells(this.dropAndConnect(d.getSelectionCell(),a,mxEvent.isMetaDown(f)||mxEvent.isControlDown(f)?mxEvent.isShiftDown(f)?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH:mxEvent.isShiftDown(f)?mxConstants.DIRECTION_EAST:
-mxConstants.DIRECTION_SOUTH,b,f)),d.scrollCellToVisible(d.getSelectionCell()))}else mxEvent.isShiftDown(f)&&!d.isSelectionEmpty()?(f=d.getEditableCells(d.getSelectionCells()),this.updateShapes(a[0],f),d.scrollCellToVisible(f)):(a=mxEvent.isAltDown(f)?d.getFreeInsertPoint():d.getCenterInsertPoint(d.getBoundingBoxFromGeometry(a,!0)),b.drop(d,f,null,a.x,a.y,!0))};
-Sidebar.prototype.addClickHandler=function(a,b,f){var d=b.mouseDown,g=b.mouseMove,e=b.mouseUp,k=this.editorUi.editor.graph.tolerance,n=null,u=this;b.mouseDown=function(m){d.apply(this,arguments);n=new mxPoint(mxEvent.getClientX(m),mxEvent.getClientY(m));null!=this.dragElement&&(this.dragElement.style.display="none",mxUtils.setOpacity(a,50))};b.mouseMove=function(m){null!=this.dragElement&&"none"==this.dragElement.style.display&&null!=n&&(Math.abs(n.x-mxEvent.getClientX(m))>k||Math.abs(n.y-mxEvent.getClientY(m))>
-k)&&(this.dragElement.style.display="",mxUtils.setOpacity(a,100));g.apply(this,arguments)};b.mouseUp=function(m){try{mxEvent.isPopupTrigger(m)||null!=this.currentGraph||null==this.dragElement||"none"!=this.dragElement.style.display||u.itemClicked(f,b,m,a),e.apply(b,arguments),mxUtils.setOpacity(a,100),n=null,u.currentElt=a}catch(r){b.reset(),u.editorUi.handleError(r)}}};
-Sidebar.prototype.createVertexTemplateEntry=function(a,b,f,d,g,e,k,n){null!=n&&null!=g&&(n+=" "+g);n=null!=n&&0<n.length?n:null!=g?g.toLowerCase():"";return this.addEntry(n,mxUtils.bind(this,function(){return this.createVertexTemplate(a,b,f,d,g,e,k)}))};Sidebar.prototype.createVertexTemplate=function(a,b,f,d,g,e,k,n,u){a=[new mxCell(null!=d?d:"",new mxGeometry(0,0,b,f),a)];a[0].vertex=!0;return this.createVertexTemplateFromCells(a,b,f,g,e,k,n,u)};
-Sidebar.prototype.createVertexTemplateFromData=function(a,b,f,d,g,e,k,n){a=mxUtils.parseXml(Graph.decompress(a));var u=new mxCodec(a),m=new mxGraphModel;u.decode(a.documentElement,m);a=this.graph.cloneCells(m.root.getChildAt(0).children);return this.createVertexTemplateFromCells(a,b,f,d,g,e,k,n)};Sidebar.prototype.createVertexTemplateFromCells=function(a,b,f,d,g,e,k,n){return this.createItem(a,d,g,e,b,f,k,n)};
-Sidebar.prototype.createEdgeTemplateEntry=function(a,b,f,d,g,e,k,n,u){k=null!=k&&0<k.length?k:g.toLowerCase();return this.addEntry(k,mxUtils.bind(this,function(){return this.createEdgeTemplate(a,b,f,d,g,e,n,u)}))};
-Sidebar.prototype.createEdgeTemplate=function(a,b,f,d,g,e,k,n){a=new mxCell(null!=d?d:"",new mxGeometry(0,0,b,f),a);a.geometry.setTerminalPoint(new mxPoint(0,f),!0);a.geometry.setTerminalPoint(new mxPoint(b,0),!1);a.geometry.relative=!0;a.edge=!0;return this.createEdgeTemplateFromCells([a],b,f,g,e,k,n)};Sidebar.prototype.createEdgeTemplateFromCells=function(a,b,f,d,g,e,k,n){return this.createItem(a,d,g,null!=n?n:!0,b,f,e,k)};
-Sidebar.prototype.addPaletteFunctions=function(a,b,f,d){this.addPalette(a,b,f,mxUtils.bind(this,function(g){for(var e=0;e<d.length;e++)g.appendChild(d[e](g))}))};
-Sidebar.prototype.addPalette=function(a,b,f,d){b=this.createTitle(b);this.container.appendChild(b);var g=document.createElement("div");g.className="geSidebar";mxClient.IS_POINTER&&(g.style.touchAction="none");f?(d(g),d=null):g.style.display="none";this.addFoldingHandler(b,g,d);f=document.createElement("div");f.appendChild(g);this.container.appendChild(f);null!=a&&(this.palettes[a]=[b,f]);return g};
-Sidebar.prototype.addFoldingHandler=function(a,b,f){var d=!1;if(!mxClient.IS_IE||8<=document.documentMode)a.style.backgroundImage="none"==b.style.display?"url('"+this.collapsedImage+"')":"url('"+this.expandedImage+"')";a.style.backgroundRepeat="no-repeat";a.style.backgroundPosition="0% 50%";mxEvent.addListener(a,"click",mxUtils.bind(this,function(g){if("none"==b.style.display){if(d)b.style.display="block";else if(d=!0,null!=f){a.style.cursor="wait";var e=a.innerHTML;a.innerHTML=mxResources.get("loading")+
-"...";window.setTimeout(function(){b.style.display="block";a.style.cursor="";a.innerHTML=e;var k=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;f(b,a);mxClient.NO_FO=k},mxClient.IS_FF?20:0)}else b.style.display="block";a.style.backgroundImage="url('"+this.expandedImage+"')"}else a.style.backgroundImage="url('"+this.collapsedImage+"')",b.style.display="none";mxEvent.consume(g)}));mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(g){g.preventDefault()}))};
+Sidebar.prototype.createDragSource=function(a,b,f,e,g){function d(ca,oa){var ta=mxUtils.createImage(ca.src);ta.style.width=ca.width+"px";ta.style.height=ca.height+"px";null!=oa&&ta.setAttribute("title",oa);mxUtils.setOpacity(ta,ca==this.refreshTarget?30:20);ta.style.position="absolute";ta.style.cursor="crosshair";return ta}function k(ca,oa,ta,Ka){null!=Ka.parentNode&&(mxUtils.contains(ta,ca,oa)?(mxUtils.setOpacity(Ka,100),R=Ka):mxUtils.setOpacity(Ka,Ka==aa?30:20));return ta}for(var n=this.editorUi,
+u=n.editor.graph,m=null,r=null,x=this,B=0;B<e.length&&(null==r&&u.model.isVertex(e[B])?r=B:null==m&&u.model.isEdge(e[B])&&null==u.model.getTerminal(e[B],!0)&&(m=B),null==r||null==m);B++);var C=this.isDropStyleEnabled(e,r),F=mxUtils.makeDraggable(a,u,mxUtils.bind(this,function(ca,oa,ta,Ka,Ha){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=e&&null!=S&&R==aa){var va=ca.isCellSelected(S.cell)?ca.getSelectionCells():[S.cell];va=this.updateShapes(ca.model.isEdge(S.cell)?e[0]:e[r],
+va);ca.setSelectionCells(va)}else null!=e&&null!=R&&null!=D&&R!=aa?(va=ca.model.isEdge(D.cell)||null==m?r:m,ca.setSelectionCells(this.dropAndConnect(D.cell,e,O,va,oa))):b.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(ca.view.getState(ca.getSelectionCell()))}),f,0,0,u.autoscroll,!0,!0);u.addListener(mxEvent.ESCAPE,function(ca,oa){F.isActive()&&F.reset()});var J=F.mouseDown;F.mouseDown=function(ca){mxEvent.isPopupTrigger(ca)||mxEvent.isMultiTouchEvent(ca)||u.isCellLocked(u.getDefaultParent())||
+(u.stopEditing(),J.apply(this,arguments))};var D=null,N=null,S=null,T=!1,P=d(this.triangleUp,mxResources.get("connect")),Z=d(this.triangleRight,mxResources.get("connect")),U=d(this.triangleDown,mxResources.get("connect")),V=d(this.triangleLeft,mxResources.get("connect")),aa=d(this.refreshTarget,mxResources.get("replace")),ia=null,ea=d(this.roundDrop),qa=d(this.roundDrop),O=mxConstants.DIRECTION_NORTH,R=null,G=F.createPreviewElement;F.createPreviewElement=function(ca){var oa=G.apply(this,arguments);
+mxClient.IS_SVG&&(oa.style.pointerEvents="none");this.previewElementWidth=oa.style.width;this.previewElementHeight=oa.style.height;return oa};var K=F.dragEnter;F.dragEnter=function(ca,oa){null!=n.hoverIcons&&n.hoverIcons.setDisplay("none");K.apply(this,arguments)};var Q=F.dragExit;F.dragExit=function(ca,oa){null!=n.hoverIcons&&n.hoverIcons.setDisplay("");Q.apply(this,arguments)};F.dragOver=function(ca,oa){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=R&&this.currentGuide.hide();
+if(null!=this.previewElement){var ta=ca.view;if(null!=S&&R==aa)this.previewElement.style.display=ca.model.isEdge(S.cell)?"none":"",this.previewElement.style.left=S.x+"px",this.previewElement.style.top=S.y+"px",this.previewElement.style.width=S.width+"px",this.previewElement.style.height=S.height+"px";else if(null!=D&&null!=R){null!=F.currentHighlight&&null!=F.currentHighlight.state&&F.currentHighlight.hide();var Ka=ca.model.isEdge(D.cell)||null==m?r:m,Ha=x.getDropAndConnectGeometry(D.cell,e[Ka],O,
+e),va=ca.model.isEdge(D.cell)?null:ca.getCellGeometry(D.cell),Ca=ca.getCellGeometry(e[Ka]),sa=ca.model.getParent(D.cell),Da=ta.translate.x*ta.scale,Ua=ta.translate.y*ta.scale;null!=va&&!va.relative&&ca.model.isVertex(sa)&&sa!=ta.currentRoot&&(Ua=ta.getState(sa),Da=Ua.x,Ua=Ua.y);va=Ca.x;Ca=Ca.y;ca.model.isEdge(e[Ka])&&(Ca=va=0);this.previewElement.style.left=(Ha.x-va)*ta.scale+Da+"px";this.previewElement.style.top=(Ha.y-Ca)*ta.scale+Ua+"px";1==e.length&&(this.previewElement.style.width=Ha.width*ta.scale+
+"px",this.previewElement.style.height=Ha.height*ta.scale+"px");this.previewElement.style.display=""}else null!=F.currentHighlight.state&&ca.model.isEdge(F.currentHighlight.state.cell)?(this.previewElement.style.left=Math.round(parseInt(this.previewElement.style.left)-g.width*ta.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-g.height*ta.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,
+this.previewElement.style.display="")}};var ba=(new Date).getTime(),la=0,ra=null,X=this.editorUi.editor.graph.getCellStyle(e[0]);F.getDropTarget=mxUtils.bind(this,function(ca,oa,ta,Ka){var Ha=mxEvent.isAltDown(Ka)||null==e?null:ca.getCellAt(oa,ta,null,null,null,function(Ua,db,Ta){return ca.isContainer(Ua.cell)});if(null!=Ha&&!this.graph.isCellConnectable(Ha)&&!this.graph.model.isEdge(Ha)){var va=this.graph.getModel().getParent(Ha);this.graph.getModel().isVertex(va)&&this.graph.isCellConnectable(va)&&
+(Ha=va)}ca.isCellLocked(Ha)&&(Ha=null);var Ca=ca.view.getState(Ha);va=R=null;ra!=Ca?(ba=(new Date).getTime(),la=0,ra=Ca,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=Ca&&(this.updateThread=window.setTimeout(function(){null==R&&(ra=Ca,F.getDropTarget(ca,oa,ta,Ka))},this.dropTargetDelay+10))):la=(new Date).getTime()-ba;if(C&&2500>la&&null!=Ca&&!mxEvent.isShiftDown(Ka)&&(mxUtils.getValue(Ca.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(X,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(Ca.style,
+mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ca.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ca.style,mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(X,mxConstants.STYLE_SHAPE)||1500<la||ca.model.isEdge(Ca.cell))&&la>this.dropTargetDelay&&!this.isDropStyleTargetIgnored(Ca)&&(ca.model.isVertex(Ca.cell)&&null!=r||ca.model.isEdge(Ca.cell)&&ca.model.isEdge(e[0]))){if(ca.isCellEditable(Ca.cell)){S=
+Ca;var sa=ca.model.isEdge(Ca.cell)?ca.view.getPoint(Ca):new mxPoint(Ca.getCenterX(),Ca.getCenterY());sa=new mxRectangle(sa.x-this.refreshTarget.width/2,sa.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);aa.style.left=Math.floor(sa.x)+"px";aa.style.top=Math.floor(sa.y)+"px";null==ia&&(ca.container.appendChild(aa),ia=aa.parentNode);k(oa,ta,sa,aa)}}else null==S||!mxUtils.contains(S,oa,ta)||1500<la&&!mxEvent.isShiftDown(Ka)?(S=null,null!=ia&&(aa.parentNode.removeChild(aa),
+ia=null)):null!=S&&null!=ia&&(sa=ca.model.isEdge(S.cell)?ca.view.getPoint(S):new mxPoint(S.getCenterX(),S.getCenterY()),sa=new mxRectangle(sa.x-this.refreshTarget.width/2,sa.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height),k(oa,ta,sa,aa));if(T&&null!=D&&!mxEvent.isAltDown(Ka)&&null==R){va=mxRectangle.fromRectangle(D);if(ca.model.isEdge(D.cell)){var Da=D.absolutePoints;null!=ea.parentNode&&(sa=Da[0],va.add(k(oa,ta,new mxRectangle(sa.x-this.roundDrop.width/2,sa.y-this.roundDrop.height/
+2,this.roundDrop.width,this.roundDrop.height),ea)));null!=qa.parentNode&&(Da=Da[Da.length-1],va.add(k(oa,ta,new mxRectangle(Da.x-this.roundDrop.width/2,Da.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),qa)))}else sa=mxRectangle.fromRectangle(D),null!=D.shape&&null!=D.shape.boundingBox&&(sa=mxRectangle.fromRectangle(D.shape.boundingBox)),sa.grow(this.graph.tolerance),sa.grow(HoverIcons.prototype.arrowSpacing),Da=this.graph.selectionCellsHandler.getHandler(D.cell),null!=Da&&(sa.x-=
+Da.horizontalOffset/2,sa.y-=Da.verticalOffset/2,sa.width+=Da.horizontalOffset,sa.height+=Da.verticalOffset,null!=Da.rotationShape&&null!=Da.rotationShape.node&&"hidden"!=Da.rotationShape.node.style.visibility&&"none"!=Da.rotationShape.node.style.display&&null!=Da.rotationShape.boundingBox&&sa.add(Da.rotationShape.boundingBox)),va.add(k(oa,ta,new mxRectangle(D.getCenterX()-this.triangleUp.width/2,sa.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),P)),va.add(k(oa,ta,new mxRectangle(sa.x+
+sa.width,D.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),Z)),va.add(k(oa,ta,new mxRectangle(D.getCenterX()-this.triangleDown.width/2,sa.y+sa.height,this.triangleDown.width,this.triangleDown.height),U)),va.add(k(oa,ta,new mxRectangle(sa.x-this.triangleLeft.width,D.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),V));null!=va&&va.grow(10)}O=mxConstants.DIRECTION_NORTH;R==Z?O=mxConstants.DIRECTION_EAST:R==U||R==qa?
+O=mxConstants.DIRECTION_SOUTH:R==V&&(O=mxConstants.DIRECTION_WEST);null!=S&&R==aa&&(Ca=S);sa=(null==r||ca.isCellConnectable(e[r]))&&(ca.model.isEdge(Ha)&&null!=r||ca.model.isVertex(Ha)&&ca.isCellConnectable(Ha));if(null!=D&&5E3<=la||D!=Ca&&(null==va||!mxUtils.contains(va,oa,ta)||500<la&&null==R&&sa))if(T=!1,D=5E3>la&&la>this.dropTargetDelay||ca.model.isEdge(Ha)?Ca:null,null!=D&&sa){va=[ea,qa,P,Z,U,V];for(sa=0;sa<va.length;sa++)null!=va[sa].parentNode&&va[sa].parentNode.removeChild(va[sa]);ca.model.isEdge(Ha)?
+(Da=Ca.absolutePoints,null!=Da&&(sa=Da[0],Da=Da[Da.length-1],va=ca.tolerance,new mxRectangle(oa-va,ta-va,2*va,2*va),ea.style.left=Math.floor(sa.x-this.roundDrop.width/2)+"px",ea.style.top=Math.floor(sa.y-this.roundDrop.height/2)+"px",qa.style.left=Math.floor(Da.x-this.roundDrop.width/2)+"px",qa.style.top=Math.floor(Da.y-this.roundDrop.height/2)+"px",null==ca.model.getTerminal(Ha,!0)&&ca.container.appendChild(ea),null==ca.model.getTerminal(Ha,!1)&&ca.container.appendChild(qa))):(sa=mxRectangle.fromRectangle(Ca),
+null!=Ca.shape&&null!=Ca.shape.boundingBox&&(sa=mxRectangle.fromRectangle(Ca.shape.boundingBox)),sa.grow(this.graph.tolerance),sa.grow(HoverIcons.prototype.arrowSpacing),Da=this.graph.selectionCellsHandler.getHandler(Ca.cell),null!=Da&&(sa.x-=Da.horizontalOffset/2,sa.y-=Da.verticalOffset/2,sa.width+=Da.horizontalOffset,sa.height+=Da.verticalOffset,null!=Da.rotationShape&&null!=Da.rotationShape.node&&"hidden"!=Da.rotationShape.node.style.visibility&&"none"!=Da.rotationShape.node.style.display&&null!=
+Da.rotationShape.boundingBox&&sa.add(Da.rotationShape.boundingBox)),P.style.left=Math.floor(Ca.getCenterX()-this.triangleUp.width/2)+"px",P.style.top=Math.floor(sa.y-this.triangleUp.height)+"px",Z.style.left=Math.floor(sa.x+sa.width)+"px",Z.style.top=Math.floor(Ca.getCenterY()-this.triangleRight.height/2)+"px",U.style.left=P.style.left,U.style.top=Math.floor(sa.y+sa.height)+"px",V.style.left=Math.floor(sa.x-this.triangleLeft.width)+"px",V.style.top=Z.style.top,"eastwest"!=Ca.style.portConstraint&&
+(ca.container.appendChild(P),ca.container.appendChild(U)),ca.container.appendChild(Z),ca.container.appendChild(V));null!=Ca&&(N=ca.selectionCellsHandler.getHandler(Ca.cell),null!=N&&null!=N.setHandlesVisible&&N.setHandlesVisible(!1));T=!0}else for(va=[ea,qa,P,Z,U,V],sa=0;sa<va.length;sa++)null!=va[sa].parentNode&&va[sa].parentNode.removeChild(va[sa]);T||null==N||N.setHandlesVisible(!0);Ha=mxEvent.isAltDown(Ka)&&!mxEvent.isShiftDown(Ka)||null!=S&&R==aa?null:mxDragSource.prototype.getDropTarget.apply(this,
+arguments);va=ca.getModel();if(null!=Ha&&(null!=R||!ca.isSplitTarget(Ha,e,Ka))){for(;null!=Ha&&!ca.isValidDropTarget(Ha,e,Ka)&&va.isVertex(va.getParent(Ha));)Ha=va.getParent(Ha);null!=Ha&&(ca.view.currentRoot==Ha||!ca.isValidRoot(Ha)&&0==ca.getModel().getChildCount(Ha)||ca.isCellLocked(Ha)||va.isEdge(Ha)||!ca.isValidDropTarget(Ha,e,Ka))&&(Ha=null)}ca.isCellLocked(Ha)&&(Ha=null);return Ha});F.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,arguments);for(var ca=[ea,qa,aa,P,Z,U,V],oa=
+0;oa<ca.length;oa++)null!=ca[oa].parentNode&&ca[oa].parentNode.removeChild(ca[oa]);null!=D&&null!=N&&N.reset();R=ia=S=D=N=null};return F};
+Sidebar.prototype.itemClicked=function(a,b,f,e){e=this.editorUi.editor.graph;e.container.focus();if(mxEvent.isAltDown(f)&&1==e.getSelectionCount()&&e.model.isVertex(e.getSelectionCell())){b=null;for(var g=0;g<a.length&&null==b;g++)e.model.isVertex(a[g])&&(b=g);null!=b&&(e.setSelectionCells(this.dropAndConnect(e.getSelectionCell(),a,mxEvent.isMetaDown(f)||mxEvent.isControlDown(f)?mxEvent.isShiftDown(f)?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH:mxEvent.isShiftDown(f)?mxConstants.DIRECTION_EAST:
+mxConstants.DIRECTION_SOUTH,b,f)),e.scrollCellToVisible(e.getSelectionCell()))}else mxEvent.isShiftDown(f)&&!e.isSelectionEmpty()?(f=e.getEditableCells(e.getSelectionCells()),this.updateShapes(a[0],f),e.scrollCellToVisible(f)):(a=mxEvent.isAltDown(f)?e.getFreeInsertPoint():e.getCenterInsertPoint(e.getBoundingBoxFromGeometry(a,!0)),b.drop(e,f,null,a.x,a.y,!0))};
+Sidebar.prototype.addClickHandler=function(a,b,f){var e=b.mouseDown,g=b.mouseMove,d=b.mouseUp,k=this.editorUi.editor.graph.tolerance,n=null,u=this;b.mouseDown=function(m){e.apply(this,arguments);n=new mxPoint(mxEvent.getClientX(m),mxEvent.getClientY(m));null!=this.dragElement&&(this.dragElement.style.display="none",mxUtils.setOpacity(a,50))};b.mouseMove=function(m){null!=this.dragElement&&"none"==this.dragElement.style.display&&null!=n&&(Math.abs(n.x-mxEvent.getClientX(m))>k||Math.abs(n.y-mxEvent.getClientY(m))>
+k)&&(this.dragElement.style.display="",mxUtils.setOpacity(a,100));g.apply(this,arguments)};b.mouseUp=function(m){try{mxEvent.isPopupTrigger(m)||null!=this.currentGraph||null==this.dragElement||"none"!=this.dragElement.style.display||u.itemClicked(f,b,m,a),d.apply(b,arguments),mxUtils.setOpacity(a,100),n=null,u.currentElt=a}catch(r){b.reset(),u.editorUi.handleError(r)}}};
+Sidebar.prototype.createVertexTemplateEntry=function(a,b,f,e,g,d,k,n){null!=n&&null!=g&&(n+=" "+g);n=null!=n&&0<n.length?n:null!=g?g.toLowerCase():"";return this.addEntry(n,mxUtils.bind(this,function(){return this.createVertexTemplate(a,b,f,e,g,d,k)}))};Sidebar.prototype.createVertexTemplate=function(a,b,f,e,g,d,k,n,u){a=[new mxCell(null!=e?e:"",new mxGeometry(0,0,b,f),a)];a[0].vertex=!0;return this.createVertexTemplateFromCells(a,b,f,g,d,k,n,u)};
+Sidebar.prototype.createVertexTemplateFromData=function(a,b,f,e,g,d,k,n){a=mxUtils.parseXml(Graph.decompress(a));var u=new mxCodec(a),m=new mxGraphModel;u.decode(a.documentElement,m);a=this.graph.cloneCells(m.root.getChildAt(0).children);return this.createVertexTemplateFromCells(a,b,f,e,g,d,k,n)};Sidebar.prototype.createVertexTemplateFromCells=function(a,b,f,e,g,d,k,n){return this.createItem(a,e,g,d,b,f,k,n)};
+Sidebar.prototype.createEdgeTemplateEntry=function(a,b,f,e,g,d,k,n,u){k=null!=k&&0<k.length?k:g.toLowerCase();return this.addEntry(k,mxUtils.bind(this,function(){return this.createEdgeTemplate(a,b,f,e,g,d,n,u)}))};
+Sidebar.prototype.createEdgeTemplate=function(a,b,f,e,g,d,k,n){a=new mxCell(null!=e?e:"",new mxGeometry(0,0,b,f),a);a.geometry.setTerminalPoint(new mxPoint(0,f),!0);a.geometry.setTerminalPoint(new mxPoint(b,0),!1);a.geometry.relative=!0;a.edge=!0;return this.createEdgeTemplateFromCells([a],b,f,g,d,k,n)};Sidebar.prototype.createEdgeTemplateFromCells=function(a,b,f,e,g,d,k,n){return this.createItem(a,e,g,null!=n?n:!0,b,f,d,k)};
+Sidebar.prototype.addPaletteFunctions=function(a,b,f,e){this.addPalette(a,b,f,mxUtils.bind(this,function(g){for(var d=0;d<e.length;d++)g.appendChild(e[d](g))}))};
+Sidebar.prototype.addPalette=function(a,b,f,e){b=this.createTitle(b);this.container.appendChild(b);var g=document.createElement("div");g.className="geSidebar";mxClient.IS_POINTER&&(g.style.touchAction="none");f?(e(g),e=null):g.style.display="none";this.addFoldingHandler(b,g,e);f=document.createElement("div");f.appendChild(g);this.container.appendChild(f);null!=a&&(this.palettes[a]=[b,f]);return g};
+Sidebar.prototype.addFoldingHandler=function(a,b,f){var e=!1;if(!mxClient.IS_IE||8<=document.documentMode)a.style.backgroundImage="none"==b.style.display?"url('"+this.collapsedImage+"')":"url('"+this.expandedImage+"')";a.style.backgroundRepeat="no-repeat";a.style.backgroundPosition="0% 50%";mxEvent.addListener(a,"click",mxUtils.bind(this,function(g){if("none"==b.style.display){if(e)b.style.display="block";else if(e=!0,null!=f){a.style.cursor="wait";var d=a.innerHTML;a.innerHTML=mxResources.get("loading")+
+"...";window.setTimeout(function(){b.style.display="block";a.style.cursor="";a.innerHTML=d;var k=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;f(b,a);mxClient.NO_FO=k},mxClient.IS_FF?20:0)}else b.style.display="block";a.style.backgroundImage="url('"+this.expandedImage+"')"}else a.style.backgroundImage="url('"+this.collapsedImage+"')",b.style.display="none";mxEvent.consume(g)}));mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(g){g.preventDefault()}))};
Sidebar.prototype.removePalette=function(a){var b=this.palettes[a];if(null!=b){this.palettes[a]=null;for(a=0;a<b.length;a++)this.container.removeChild(b[a]);return!0}return!1};
-Sidebar.prototype.addImagePalette=function(a,b,f,d,g,e,k){for(var n=[],u=0;u<g.length;u++)mxUtils.bind(this,function(m,r,x){if(null==x){x=m.lastIndexOf("/");var B=m.lastIndexOf(".");x=m.substring(0<=x?x+1:0,0<=B?B:m.length).replace(/[-_]/g," ")}n.push(this.createVertexTemplateEntry("image;html=1;image="+f+m+d,this.defaultImageWidth,this.defaultImageHeight,"",r,null!=r,null,this.filterTags(x)))})(g[u],null!=e?e[u]:null,null!=k?k[g[u]]:null);this.addPaletteFunctions(a,b,!1,n)};
-Sidebar.prototype.getTagsForStencil=function(a,b,f){a=a.split(".");for(var d=1;d<a.length;d++)a[d]=a[d].replace(/_/g," ");a.push(b.replace(/_/g," "));null!=f&&a.push(f);return a.slice(1,a.length)};
-Sidebar.prototype.addStencilPalette=function(a,b,f,d,g,e,k,n,u,m){k=null!=k?k:1;if(this.addStencilsToIndex){var r=[];if(null!=u)for(m=0;m<u.length;m++)r.push(u[m]);mxStencilRegistry.loadStencilSet(f,mxUtils.bind(this,function(x,B,C,G,J){if(null==g||0>mxUtils.indexOf(g,B)){C=this.getTagsForStencil(x,B);var D=null!=n?n[B]:null;null!=D&&C.push(D);r.push(this.createVertexTemplateEntry("shape="+x+B.toLowerCase()+d,Math.round(G*k),Math.round(J*k),"",B.replace(/_/g," "),null,null,this.filterTags(C.join(" "))))}}),
-!0,!0);this.addPaletteFunctions(a,b,!1,r)}else this.addPalette(a,b,!1,mxUtils.bind(this,function(x){null==d&&(d="");null!=e&&e.call(this,x);if(null!=u)for(var B=0;B<u.length;B++)u[B](x);mxStencilRegistry.loadStencilSet(f,mxUtils.bind(this,function(C,G,J,D,N){(null==g||0>mxUtils.indexOf(g,G))&&x.appendChild(this.createVertexTemplate("shape="+C+G.toLowerCase()+d,Math.round(D*k),Math.round(N*k),"",G.replace(/_/g," "),!0))}),!0)}))};
+Sidebar.prototype.addImagePalette=function(a,b,f,e,g,d,k){for(var n=[],u=0;u<g.length;u++)mxUtils.bind(this,function(m,r,x){if(null==x){x=m.lastIndexOf("/");var B=m.lastIndexOf(".");x=m.substring(0<=x?x+1:0,0<=B?B:m.length).replace(/[-_]/g," ")}n.push(this.createVertexTemplateEntry("image;html=1;image="+f+m+e,this.defaultImageWidth,this.defaultImageHeight,"",r,null!=r,null,this.filterTags(x)))})(g[u],null!=d?d[u]:null,null!=k?k[g[u]]:null);this.addPaletteFunctions(a,b,!1,n)};
+Sidebar.prototype.getTagsForStencil=function(a,b,f){a=a.split(".");for(var e=1;e<a.length;e++)a[e]=a[e].replace(/_/g," ");a.push(b.replace(/_/g," "));null!=f&&a.push(f);return a.slice(1,a.length)};
+Sidebar.prototype.addStencilPalette=function(a,b,f,e,g,d,k,n,u,m){k=null!=k?k:1;if(this.addStencilsToIndex){var r=[];if(null!=u)for(m=0;m<u.length;m++)r.push(u[m]);mxStencilRegistry.loadStencilSet(f,mxUtils.bind(this,function(x,B,C,F,J){if(null==g||0>mxUtils.indexOf(g,B)){C=this.getTagsForStencil(x,B);var D=null!=n?n[B]:null;null!=D&&C.push(D);r.push(this.createVertexTemplateEntry("shape="+x+B.toLowerCase()+e,Math.round(F*k),Math.round(J*k),"",B.replace(/_/g," "),null,null,this.filterTags(C.join(" "))))}}),
+!0,!0);this.addPaletteFunctions(a,b,!1,r)}else this.addPalette(a,b,!1,mxUtils.bind(this,function(x){null==e&&(e="");null!=d&&d.call(this,x);if(null!=u)for(var B=0;B<u.length;B++)u[B](x);mxStencilRegistry.loadStencilSet(f,mxUtils.bind(this,function(C,F,J,D,N){(null==g||0>mxUtils.indexOf(g,F))&&x.appendChild(this.createVertexTemplate("shape="+C+F.toLowerCase()+e,Math.round(D*k),Math.round(N*k),"",F.replace(/_/g," "),!0))}),!0)}))};
Sidebar.prototype.destroy=function(){null!=this.graph&&(null!=this.graph.container&&null!=this.graph.container.parentNode&&this.graph.container.parentNode.removeChild(this.graph.container),this.graph.destroy(),this.graph=null);null!=this.pointerUpHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerup":"mouseup",this.pointerUpHandler),this.pointerUpHandler=null);null!=this.pointerDownHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerdown":"mousedown",this.pointerDownHandler),
-this.pointerDownHandler=null);null!=this.pointerMoveHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.pointerMoveHandler),this.pointerMoveHandler=null);null!=this.pointerOutHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerout":"mouseout",this.pointerOutHandler),this.pointerOutHandler=null)};(function(){var a=[["nbsp","160"],["shy","173"]],b=mxUtils.parseXml;mxUtils.parseXml=function(f){for(var d=0;d<a.length;d++)f=f.replace(new RegExp("&"+a[d][0]+";","g"),"&#"+a[d][1]+";");return b(f)}})();
+this.pointerDownHandler=null);null!=this.pointerMoveHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.pointerMoveHandler),this.pointerMoveHandler=null);null!=this.pointerOutHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerout":"mouseout",this.pointerOutHandler),this.pointerOutHandler=null)};(function(){var a=[["nbsp","160"],["shy","173"]],b=mxUtils.parseXml;mxUtils.parseXml=function(f){for(var e=0;e<a.length;e++)f=f.replace(new RegExp("&"+a[e][0]+";","g"),"&#"+a[e][1]+";");return b(f)}})();
Date.prototype.toISOString||function(){function a(b){b=String(b);1===b.length&&(b="0"+b);return b}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+a(this.getUTCMonth()+1)+"-"+a(this.getUTCDate())+"T"+a(this.getUTCHours())+":"+a(this.getUTCMinutes())+":"+a(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"}}();Date.now||(Date.now=function(){return(new Date).getTime()});
-Uint8Array.from||(Uint8Array.from=function(){var a=Object.prototype.toString,b=function(d){return"function"===typeof d||"[object Function]"===a.call(d)},f=Math.pow(2,53)-1;return function(d){var g=Object(d);if(null==d)throw new TypeError("Array.from requires an array-like object - not null or undefined");var e=1<arguments.length?arguments[1]:void 0,k;if("undefined"!==typeof e){if(!b(e))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(k=
-arguments[2])}var n=Number(g.length);n=isNaN(n)?0:0!==n&&isFinite(n)?(0<n?1:-1)*Math.floor(Math.abs(n)):n;n=Math.min(Math.max(n,0),f);for(var u=b(this)?Object(new this(n)):Array(n),m=0,r;m<n;)r=g[m],u[m]=e?"undefined"===typeof k?e(r,m):e.call(k,r,m):r,m+=1;u.length=n;return u}}());mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.METERS=4;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";
+Uint8Array.from||(Uint8Array.from=function(){var a=Object.prototype.toString,b=function(e){return"function"===typeof e||"[object Function]"===a.call(e)},f=Math.pow(2,53)-1;return function(e){var g=Object(e);if(null==e)throw new TypeError("Array.from requires an array-like object - not null or undefined");var d=1<arguments.length?arguments[1]:void 0,k;if("undefined"!==typeof d){if(!b(d))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(k=
+arguments[2])}var n=Number(g.length);n=isNaN(n)?0:0!==n&&isFinite(n)?(0<n?1:-1)*Math.floor(Math.abs(n)):n;n=Math.min(Math.max(n,0),f);for(var u=b(this)?Object(new this(n)):Array(n),m=0,r;m<n;)r=g[m],u[m]=d?"undefined"===typeof k?d(r,m):d.call(k,r,m):r,m+=1;u.length=n;return u}}());mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.METERS=4;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";
mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxCodec.allowlist="mxStylesheet Array mxGraphModel mxCell mxGeometry mxRectangle mxPoint mxChildChange mxRootChange mxTerminalChange mxValueChange mxStyleChange mxGeometryChange mxCollapseChange mxVisibleChange mxCellAttributeChange".split(" ");mxGraph.prototype.pageBreakColor="#c0c0c0";mxGraph.prototype.pageScale=1;
(function(){try{if(null!=navigator&&null!=navigator.language){var a=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===a||"en-ca"===a||"es-mx"===a?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(b){}})();mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;
mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=":IMAGE_PATH+"/grid.gif";mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.defaultGridColor="#d0d0d0";mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultGridColor;mxGraphView.prototype.unit=mxConstants.POINTS;
mxGraphView.prototype.setUnit=function(a){this.unit!=a&&(this.unit=a,this.fireEvent(new mxEventObject("unitChanged","unit",a)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(a,b,f){return null};
mxImageShape.prototype.getImageDataUri=function(){var a=this.image;if("data:image/svg+xml;base64,"==a.substring(0,26)&&null!=this.style&&"1"==mxUtils.getValue(this.style,"clipSvg","0")){if(null==this.clippedSvg||this.clippedImage!=a)this.clippedSvg=Graph.clipSvgDataUri(a,!0),this.clippedImage=a;a=this.clippedSvg}return a};
-Graph=function(a,b,f,d,g,e){mxGraph.call(this,a,b,f,d);this.themes=g||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=e?e:!1;a=this.baseUrl;b=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<b&&(b=a.indexOf("/",b+2),0<b&&(this.domainUrl=a.substring(0,b)),b=a.lastIndexOf("/"),0<b&&(this.domainPathUrl=a.substring(0,b+1)));this.isHtmlLabel=function(O){O=this.getCurrentCellStyle(O);
-return null!=O?"1"==O.html||"wrap"==O[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var k=null,n=null,u=null,m=null,r=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(O,S){if("mouseDown"==S.getProperty("eventName")&&this.isEnabled()){O=S.getProperty("event");var F=O.getState();S=this.view.scale;if(!mxEvent.isAltDown(O.getEvent())&&null!=F)if(this.model.isEdge(F.cell))if(k=new mxPoint(O.getGraphX(),O.getGraphY()),r=this.isCellSelected(F.cell),u=F,n=O,null!=F.text&&null!=
-F.text.boundingBox&&mxUtils.contains(F.text.boundingBox,O.getGraphX(),O.getGraphY()))m=mxEvent.LABEL_HANDLE;else{var L=this.selectionCellsHandler.getHandler(F.cell);null!=L&&null!=L.bends&&0<L.bends.length&&(m=L.getHandleForEvent(O))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(O.getEvent())&&(L=this.selectionCellsHandler.getHandler(F.cell),null==L||null==L.getHandleForEvent(O))){var T=new mxRectangle(O.getGraphX()-1,O.getGraphY()-1),ca=mxEvent.isTouchEvent(O.getEvent())?mxShape.prototype.svgStrokeTolerance-
-1:(mxShape.prototype.svgStrokeTolerance+2)/2;L=ca+2;T.grow(ca);if(this.isTableCell(F.cell)&&!this.isCellSelected(F.cell)&&!(mxUtils.contains(F,O.getGraphX()-L,O.getGraphY()-L)&&mxUtils.contains(F,O.getGraphX()-L,O.getGraphY()+L)&&mxUtils.contains(F,O.getGraphX()+L,O.getGraphY()+L)&&mxUtils.contains(F,O.getGraphX()+L,O.getGraphY()-L))){var fa=this.model.getParent(F.cell);L=this.model.getParent(fa);if(!this.isCellSelected(L)){ca*=S;var wa=2*ca;if(this.model.getChildAt(L,0)!=fa&&mxUtils.intersects(T,
-new mxRectangle(F.x,F.y-ca,F.width,wa))||this.model.getChildAt(fa,0)!=F.cell&&mxUtils.intersects(T,new mxRectangle(F.x-ca,F.y,wa,F.height))||mxUtils.intersects(T,new mxRectangle(F.x,F.y+F.height-ca,F.width,wa))||mxUtils.intersects(T,new mxRectangle(F.x+F.width-ca,F.y,wa,F.height)))fa=this.selectionCellsHandler.isHandled(L),this.selectCellForEvent(L,O.getEvent()),L=this.selectionCellsHandler.getHandler(L),null!=L&&(ca=L.getHandleForEvent(O),null!=ca&&(L.start(O.getGraphX(),O.getGraphY(),ca),L.blockDelayedSelection=
-!fa,O.consume()))}}for(;!O.isConsumed()&&null!=F&&(this.isTableCell(F.cell)||this.isTableRow(F.cell)||this.isTable(F.cell));)this.isSwimlane(F.cell)&&(L=this.getActualStartSize(F.cell),(0<L.x||0<L.width)&&mxUtils.intersects(T,new mxRectangle(F.x+(L.x-L.width-1)*S+(0==L.x?F.width:0),F.y,1,F.height))||(0<L.y||0<L.height)&&mxUtils.intersects(T,new mxRectangle(F.x,F.y+(L.y-L.height-1)*S+(0==L.y?F.height:0),F.width,1)))&&(this.selectCellForEvent(F.cell,O.getEvent()),L=this.selectionCellsHandler.getHandler(F.cell),
-null!=L&&(ca=mxEvent.CUSTOM_HANDLE-L.customHandles.length+1,L.start(O.getGraphX(),O.getGraphY(),ca),O.consume())),F=this.view.getState(this.model.getParent(F.cell))}}}));this.addMouseListener({mouseDown:function(O,S){},mouseMove:mxUtils.bind(this,function(O,S){O=this.selectionCellsHandler.handlers.map;for(var F in O)if(null!=O[F].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(S.getEvent())){var L=this.tolerance;if(null!=k&&null!=u&&null!=n){if(F=u,Math.abs(k.x-
-S.getGraphX())>L||Math.abs(k.y-S.getGraphY())>L){var T=this.selectionCellsHandler.getHandler(F.cell);null==T&&this.model.isEdge(F.cell)&&(T=this.createHandler(F));if(null!=T&&null!=T.bends&&0<T.bends.length){O=T.getHandleForEvent(n);var ca=this.view.getEdgeStyle(F);L=ca==mxEdgeStyle.EntityRelation;r||m!=mxEvent.LABEL_HANDLE||(O=m);if(L&&0!=O&&O!=T.bends.length-1&&O!=mxEvent.LABEL_HANDLE)!L||null==F.visibleSourceState&&null==F.visibleTargetState||(this.graphHandler.reset(),S.consume());else if(O==
-mxEvent.LABEL_HANDLE||0==O||null!=F.visibleSourceState||O==T.bends.length-1||null!=F.visibleTargetState)L||O==mxEvent.LABEL_HANDLE||(L=F.absolutePoints,null!=L&&(null==ca&&null==O||ca==mxEdgeStyle.OrthConnector)&&(O=m,null==O&&(O=new mxRectangle(k.x,k.y),O.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(O,L[0].x,L[0].y)?O=0:mxUtils.contains(O,L[L.length-1].x,L[L.length-1].y)?O=T.bends.length-1:null!=ca&&(2==L.length||3==L.length&&(0==Math.round(L[0].x-L[1].x)&&0==Math.round(L[1].x-
-L[2].x)||0==Math.round(L[0].y-L[1].y)&&0==Math.round(L[1].y-L[2].y)))?O=2:(O=mxUtils.findNearestSegment(F,k.x,k.y),O=null==ca?mxEvent.VIRTUAL_HANDLE-O:O+1))),null==O&&(O=mxEvent.VIRTUAL_HANDLE)),T.start(S.getGraphX(),S.getGraphX(),O),S.consume(),this.graphHandler.reset()}null!=T&&(this.selectionCellsHandler.isHandlerActive(T)?this.isCellSelected(F.cell)||(this.selectionCellsHandler.handlers.put(F.cell,T),this.selectCellForEvent(F.cell,S.getEvent())):this.isCellSelected(F.cell)||T.destroy());r=!1;
-k=n=u=m=null}}else if(F=S.getState(),null!=F&&this.isCellEditable(F.cell)){T=null;if(this.model.isEdge(F.cell)){if(O=new mxRectangle(S.getGraphX(),S.getGraphY()),O.grow(mxEdgeHandler.prototype.handleImage.width/2),L=F.absolutePoints,null!=L)if(null!=F.text&&null!=F.text.boundingBox&&mxUtils.contains(F.text.boundingBox,S.getGraphX(),S.getGraphY()))T="move";else if(mxUtils.contains(O,L[0].x,L[0].y)||mxUtils.contains(O,L[L.length-1].x,L[L.length-1].y))T="pointer";else if(null!=F.visibleSourceState||
-null!=F.visibleTargetState)O=this.view.getEdgeStyle(F),T="crosshair",O!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(F)&&(S=mxUtils.findNearestSegment(F,S.getGraphX(),S.getGraphY()),S<L.length-1&&0<=S&&(T=0==Math.round(L[S].x-L[S+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(S.getEvent())){L=mxShape.prototype.svgStrokeTolerance/2;O=new mxRectangle(S.getGraphX(),S.getGraphY());O.grow(L);if(this.isTableCell(F.cell)&&(S=this.model.getParent(F.cell),L=this.model.getParent(S),!this.isCellSelected(L)))if(mxUtils.intersects(O,
-new mxRectangle(F.x,F.y-2,F.width,4))&&this.model.getChildAt(L,0)!=S||mxUtils.intersects(O,new mxRectangle(F.x,F.y+F.height-2,F.width,4)))T="row-resize";else if(mxUtils.intersects(O,new mxRectangle(F.x-2,F.y,4,F.height))&&this.model.getChildAt(S,0)!=F.cell||mxUtils.intersects(O,new mxRectangle(F.x+F.width-2,F.y,4,F.height)))T="col-resize";for(S=F;null==T&&null!=S&&(this.isTableCell(S.cell)||this.isTableRow(S.cell)||this.isTable(S.cell));)this.isSwimlane(S.cell)&&(L=this.getActualStartSize(S.cell),
-ca=this.view.scale,(0<L.x||0<L.width)&&mxUtils.intersects(O,new mxRectangle(S.x+(L.x-L.width-1)*ca+(0==L.x?S.width*ca:0),S.y,1,S.height))?T="col-resize":(0<L.y||0<L.height)&&mxUtils.intersects(O,new mxRectangle(S.x,S.y+(L.y-L.height-1)*ca+(0==L.y?S.height:0),S.width,1))&&(T="row-resize")),S=this.view.getState(this.model.getParent(S.cell))}null!=T&&F.setCursor(T)}}}),mouseUp:mxUtils.bind(this,function(O,S){m=k=n=u=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(O){var S=
-mxCellRenderer.prototype.getLabelValue.apply(this,arguments);O.view.graph.isHtmlLabel(O.cell)&&(S=1!=O.style.html?mxUtils.htmlEntities(S,!1):O.view.graph.sanitizeHtml(S));return S};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(O,S){return!1};this.alternateEdgeStyle="vertical";null==d&&this.loadStylesheet();var x=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var O=x.apply(this,arguments);if(this.graph.pageVisible){var S=[],F=this.graph.pageFormat,L=this.graph.pageScale,T=F.width*L;F=F.height*L;L=this.graph.view.translate;for(var ca=this.graph.view.scale,fa=
-this.graph.getPageLayout(),wa=0;wa<fa.width;wa++)S.push(new mxRectangle(((fa.x+wa)*T+L.x)*ca,(fa.y*F+L.y)*ca,T*ca,F*ca));for(wa=1;wa<fa.height;wa++)S.push(new mxRectangle((fa.x*T+L.x)*ca,((fa.y+wa)*F+L.y)*ca,T*ca,F*ca));O=S.concat(O)}return O};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(O,S){return null==O.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(O){this.previewColor="#000000"==this.graph.background?
-"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var B=this.graphHandler.getCells;this.graphHandler.getCells=function(O){for(var S=B.apply(this,arguments),F=new mxDictionary,L=[],T=0;T<S.length;T++){var ca=this.graph.isTableCell(O)&&this.graph.isTableCell(S[T])&&this.graph.isCellSelected(S[T])?this.graph.model.getParent(S[T]):this.graph.isTableRow(O)&&this.graph.isTableRow(S[T])&&this.graph.isCellSelected(S[T])?S[T]:this.graph.getCompositeParent(S[T]);
-null==ca||F.get(ca)||(F.put(ca,!0),L.push(ca))}return L};var C=this.graphHandler.start;this.graphHandler.start=function(O,S,F,L){var T=!1;this.graph.isTableCell(O)&&(this.graph.isCellSelected(O)?T=!0:O=this.graph.model.getParent(O));T||this.graph.isTableRow(O)&&this.graph.isCellSelected(O)||(O=this.graph.getCompositeParent(O));C.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(O,S){S=this.graph.getCompositeParent(S);return mxConnectionHandler.prototype.createTargetVertex.apply(this,
-arguments)};var G=new mxRubberband(this);this.getRubberband=function(){return G};var J=(new Date).getTime(),D=0,N=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var O=this.currentState;N.apply(this,arguments);O!=this.currentState?(J=(new Date).getTime(),D=0):D=(new Date).getTime()-J};var Q=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(O){return mxEvent.isShiftDown(O.getEvent())&&mxEvent.isAltDown(O.getEvent())?!1:null!=
-this.currentState&&O.getState()==this.currentState&&2E3<D||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&Q.apply(this,arguments)};var R=this.isToggleEvent;this.isToggleEvent=function(O){return R.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(O)};var P=G.isForceRubberbandEvent;G.isForceRubberbandEvent=function(O){return P.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(O.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&
+Graph=function(a,b,f,e,g,d){mxGraph.call(this,a,b,f,e);this.themes=g||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=d?d:!1;a=this.baseUrl;b=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<b&&(b=a.indexOf("/",b+2),0<b&&(this.domainUrl=a.substring(0,b)),b=a.lastIndexOf("/"),0<b&&(this.domainPathUrl=a.substring(0,b+1)));this.isHtmlLabel=function(O){O=this.getCurrentCellStyle(O);
+return null!=O?"1"==O.html||"wrap"==O[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var k=null,n=null,u=null,m=null,r=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(O,R){if("mouseDown"==R.getProperty("eventName")&&this.isEnabled()){O=R.getProperty("event");var G=O.getState();R=this.view.scale;if(!mxEvent.isAltDown(O.getEvent())&&null!=G)if(this.model.isEdge(G.cell))if(k=new mxPoint(O.getGraphX(),O.getGraphY()),r=this.isCellSelected(G.cell),u=G,n=O,null!=G.text&&null!=
+G.text.boundingBox&&mxUtils.contains(G.text.boundingBox,O.getGraphX(),O.getGraphY()))m=mxEvent.LABEL_HANDLE;else{var K=this.selectionCellsHandler.getHandler(G.cell);null!=K&&null!=K.bends&&0<K.bends.length&&(m=K.getHandleForEvent(O))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(O.getEvent())&&(K=this.selectionCellsHandler.getHandler(G.cell),null==K||null==K.getHandleForEvent(O))){var Q=new mxRectangle(O.getGraphX()-1,O.getGraphY()-1),ba=mxEvent.isTouchEvent(O.getEvent())?mxShape.prototype.svgStrokeTolerance-
+1:(mxShape.prototype.svgStrokeTolerance+2)/2;K=ba+2;Q.grow(ba);if(this.isTableCell(G.cell)&&!this.isCellSelected(G.cell)&&!(mxUtils.contains(G,O.getGraphX()-K,O.getGraphY()-K)&&mxUtils.contains(G,O.getGraphX()-K,O.getGraphY()+K)&&mxUtils.contains(G,O.getGraphX()+K,O.getGraphY()+K)&&mxUtils.contains(G,O.getGraphX()+K,O.getGraphY()-K))){var la=this.model.getParent(G.cell);K=this.model.getParent(la);if(!this.isCellSelected(K)){ba*=R;var ra=2*ba;if(this.model.getChildAt(K,0)!=la&&mxUtils.intersects(Q,
+new mxRectangle(G.x,G.y-ba,G.width,ra))||this.model.getChildAt(la,0)!=G.cell&&mxUtils.intersects(Q,new mxRectangle(G.x-ba,G.y,ra,G.height))||mxUtils.intersects(Q,new mxRectangle(G.x,G.y+G.height-ba,G.width,ra))||mxUtils.intersects(Q,new mxRectangle(G.x+G.width-ba,G.y,ra,G.height)))la=this.selectionCellsHandler.isHandled(K),this.selectCellForEvent(K,O.getEvent()),K=this.selectionCellsHandler.getHandler(K),null!=K&&(ba=K.getHandleForEvent(O),null!=ba&&(K.start(O.getGraphX(),O.getGraphY(),ba),K.blockDelayedSelection=
+!la,O.consume()))}}for(;!O.isConsumed()&&null!=G&&(this.isTableCell(G.cell)||this.isTableRow(G.cell)||this.isTable(G.cell));)this.isSwimlane(G.cell)&&(K=this.getActualStartSize(G.cell),(0<K.x||0<K.width)&&mxUtils.intersects(Q,new mxRectangle(G.x+(K.x-K.width-1)*R+(0==K.x?G.width:0),G.y,1,G.height))||(0<K.y||0<K.height)&&mxUtils.intersects(Q,new mxRectangle(G.x,G.y+(K.y-K.height-1)*R+(0==K.y?G.height:0),G.width,1)))&&(this.selectCellForEvent(G.cell,O.getEvent()),K=this.selectionCellsHandler.getHandler(G.cell),
+null!=K&&(ba=mxEvent.CUSTOM_HANDLE-K.customHandles.length+1,K.start(O.getGraphX(),O.getGraphY(),ba),O.consume())),G=this.view.getState(this.model.getParent(G.cell))}}}));this.addMouseListener({mouseDown:function(O,R){},mouseMove:mxUtils.bind(this,function(O,R){O=this.selectionCellsHandler.handlers.map;for(var G in O)if(null!=O[G].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(R.getEvent())){var K=this.tolerance;if(null!=k&&null!=u&&null!=n){if(G=u,Math.abs(k.x-
+R.getGraphX())>K||Math.abs(k.y-R.getGraphY())>K){var Q=this.selectionCellsHandler.getHandler(G.cell);null==Q&&this.model.isEdge(G.cell)&&(Q=this.createHandler(G));if(null!=Q&&null!=Q.bends&&0<Q.bends.length){O=Q.getHandleForEvent(n);var ba=this.view.getEdgeStyle(G);K=ba==mxEdgeStyle.EntityRelation;r||m!=mxEvent.LABEL_HANDLE||(O=m);if(K&&0!=O&&O!=Q.bends.length-1&&O!=mxEvent.LABEL_HANDLE)!K||null==G.visibleSourceState&&null==G.visibleTargetState||(this.graphHandler.reset(),R.consume());else if(O==
+mxEvent.LABEL_HANDLE||0==O||null!=G.visibleSourceState||O==Q.bends.length-1||null!=G.visibleTargetState)K||O==mxEvent.LABEL_HANDLE||(K=G.absolutePoints,null!=K&&(null==ba&&null==O||ba==mxEdgeStyle.OrthConnector)&&(O=m,null==O&&(O=new mxRectangle(k.x,k.y),O.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(O,K[0].x,K[0].y)?O=0:mxUtils.contains(O,K[K.length-1].x,K[K.length-1].y)?O=Q.bends.length-1:null!=ba&&(2==K.length||3==K.length&&(0==Math.round(K[0].x-K[1].x)&&0==Math.round(K[1].x-
+K[2].x)||0==Math.round(K[0].y-K[1].y)&&0==Math.round(K[1].y-K[2].y)))?O=2:(O=mxUtils.findNearestSegment(G,k.x,k.y),O=null==ba?mxEvent.VIRTUAL_HANDLE-O:O+1))),null==O&&(O=mxEvent.VIRTUAL_HANDLE)),Q.start(R.getGraphX(),R.getGraphX(),O),R.consume(),this.graphHandler.reset()}null!=Q&&(this.selectionCellsHandler.isHandlerActive(Q)?this.isCellSelected(G.cell)||(this.selectionCellsHandler.handlers.put(G.cell,Q),this.selectCellForEvent(G.cell,R.getEvent())):this.isCellSelected(G.cell)||Q.destroy());r=!1;
+k=n=u=m=null}}else if(G=R.getState(),null!=G&&this.isCellEditable(G.cell)){Q=null;if(this.model.isEdge(G.cell)){if(O=new mxRectangle(R.getGraphX(),R.getGraphY()),O.grow(mxEdgeHandler.prototype.handleImage.width/2),K=G.absolutePoints,null!=K)if(null!=G.text&&null!=G.text.boundingBox&&mxUtils.contains(G.text.boundingBox,R.getGraphX(),R.getGraphY()))Q="move";else if(mxUtils.contains(O,K[0].x,K[0].y)||mxUtils.contains(O,K[K.length-1].x,K[K.length-1].y))Q="pointer";else if(null!=G.visibleSourceState||
+null!=G.visibleTargetState)O=this.view.getEdgeStyle(G),Q="crosshair",O!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(G)&&(R=mxUtils.findNearestSegment(G,R.getGraphX(),R.getGraphY()),R<K.length-1&&0<=R&&(Q=0==Math.round(K[R].x-K[R+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(R.getEvent())){K=mxShape.prototype.svgStrokeTolerance/2;O=new mxRectangle(R.getGraphX(),R.getGraphY());O.grow(K);if(this.isTableCell(G.cell)&&(R=this.model.getParent(G.cell),K=this.model.getParent(R),!this.isCellSelected(K)))if(mxUtils.intersects(O,
+new mxRectangle(G.x,G.y-2,G.width,4))&&this.model.getChildAt(K,0)!=R||mxUtils.intersects(O,new mxRectangle(G.x,G.y+G.height-2,G.width,4)))Q="row-resize";else if(mxUtils.intersects(O,new mxRectangle(G.x-2,G.y,4,G.height))&&this.model.getChildAt(R,0)!=G.cell||mxUtils.intersects(O,new mxRectangle(G.x+G.width-2,G.y,4,G.height)))Q="col-resize";for(R=G;null==Q&&null!=R&&(this.isTableCell(R.cell)||this.isTableRow(R.cell)||this.isTable(R.cell));)this.isSwimlane(R.cell)&&(K=this.getActualStartSize(R.cell),
+ba=this.view.scale,(0<K.x||0<K.width)&&mxUtils.intersects(O,new mxRectangle(R.x+(K.x-K.width-1)*ba+(0==K.x?R.width*ba:0),R.y,1,R.height))?Q="col-resize":(0<K.y||0<K.height)&&mxUtils.intersects(O,new mxRectangle(R.x,R.y+(K.y-K.height-1)*ba+(0==K.y?R.height:0),R.width,1))&&(Q="row-resize")),R=this.view.getState(this.model.getParent(R.cell))}null!=Q&&G.setCursor(Q)}}}),mouseUp:mxUtils.bind(this,function(O,R){m=k=n=u=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(O){var R=
+mxCellRenderer.prototype.getLabelValue.apply(this,arguments);O.view.graph.isHtmlLabel(O.cell)&&(R=1!=O.style.html?mxUtils.htmlEntities(R,!1):O.view.graph.sanitizeHtml(R));return R};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(O,R){return!1};this.alternateEdgeStyle="vertical";null==e&&this.loadStylesheet();var x=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var O=x.apply(this,arguments);if(this.graph.pageVisible){var R=[],G=this.graph.pageFormat,K=this.graph.pageScale,Q=G.width*K;G=G.height*K;K=this.graph.view.translate;for(var ba=this.graph.view.scale,la=
+this.graph.getPageLayout(),ra=0;ra<la.width;ra++)R.push(new mxRectangle(((la.x+ra)*Q+K.x)*ba,(la.y*G+K.y)*ba,Q*ba,G*ba));for(ra=1;ra<la.height;ra++)R.push(new mxRectangle((la.x*Q+K.x)*ba,((la.y+ra)*G+K.y)*ba,Q*ba,G*ba));O=R.concat(O)}return O};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(O,R){return null==O.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(O){this.previewColor="#000000"==this.graph.background?
+"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var B=this.graphHandler.getCells;this.graphHandler.getCells=function(O){for(var R=B.apply(this,arguments),G=new mxDictionary,K=[],Q=0;Q<R.length;Q++){var ba=this.graph.isTableCell(O)&&this.graph.isTableCell(R[Q])&&this.graph.isCellSelected(R[Q])?this.graph.model.getParent(R[Q]):this.graph.isTableRow(O)&&this.graph.isTableRow(R[Q])&&this.graph.isCellSelected(R[Q])?R[Q]:this.graph.getCompositeParent(R[Q]);
+null==ba||G.get(ba)||(G.put(ba,!0),K.push(ba))}return K};var C=this.graphHandler.start;this.graphHandler.start=function(O,R,G,K){var Q=!1;this.graph.isTableCell(O)&&(this.graph.isCellSelected(O)?Q=!0:O=this.graph.model.getParent(O));Q||this.graph.isTableRow(O)&&this.graph.isCellSelected(O)||(O=this.graph.getCompositeParent(O));C.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(O,R){R=this.graph.getCompositeParent(R);return mxConnectionHandler.prototype.createTargetVertex.apply(this,
+arguments)};var F=new mxRubberband(this);this.getRubberband=function(){return F};var J=(new Date).getTime(),D=0,N=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var O=this.currentState;N.apply(this,arguments);O!=this.currentState?(J=(new Date).getTime(),D=0):D=(new Date).getTime()-J};var S=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(O){return mxEvent.isShiftDown(O.getEvent())&&mxEvent.isAltDown(O.getEvent())?!1:null!=
+this.currentState&&O.getState()==this.currentState&&2E3<D||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&S.apply(this,arguments)};var T=this.isToggleEvent;this.isToggleEvent=function(O){return T.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(O)};var P=F.isForceRubberbandEvent;F.isForceRubberbandEvent=function(O){return P.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(O.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&
mxClient.IS_FF&&mxClient.IS_WIN&&null==O.getState()&&mxEvent.isTouchEvent(O.getEvent())};var Z=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(Z=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=Z)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(O){return mxEvent.isMouseEvent(O.getEvent())};
-var U=this.click;this.click=function(O){var S=null==O.state&&null!=O.sourceState&&this.isCellLocked(O.sourceState.cell);if(this.isEnabled()&&!S||O.isConsumed())return U.apply(this,arguments);var F=S?O.sourceState.cell:O.getCell();null!=F&&(F=this.getClickableLinkForCell(F),null!=F&&(this.isCustomLink(F)?this.customLinkClicked(F):this.openLink(F)));this.isEnabled()&&S&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(O){return O.sourceState};var V=this.tooltipHandler.show;this.tooltipHandler.show=
-function(){V.apply(this,arguments);if(null!=this.div)for(var O=this.div.getElementsByTagName("a"),S=0;S<O.length;S++)null!=O[S].getAttribute("href")&&null==O[S].getAttribute("target")&&O[S].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(O){return O.sourceState};this.getCursorForMouseEvent=function(O){var S=null==O.state&&null!=O.sourceState&&this.isCellLocked(O.sourceState.cell);return this.getCursorForCell(S?O.sourceState.cell:O.getCell())};var ia=this.getCursorForCell;
-this.getCursorForCell=function(O){if(!this.isEnabled()||this.isCellLocked(O)){if(null!=this.getClickableLinkForCell(O))return"pointer";if(this.isCellLocked(O))return"default"}return ia.apply(this,arguments)};this.selectRegion=function(O,S){var F=mxEvent.isAltDown(S)?O:null;O=this.getCells(O.x,O.y,O.width,O.height,null,null,F,function(L){return"1"==mxUtils.getValue(L.style,"locked","0")},!0);if(this.isToggleEvent(S))for(F=0;F<O.length;F++)this.selectCellForEvent(O[F],S);else this.selectCellsForEvent(O,
-S);return O};var ha=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(O,S,F){return this.graph.isCellSelected(O)?!1:ha.apply(this,arguments)};this.isCellLocked=function(O){for(;null!=O;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(O),"locked","0"))return!0;O=this.model.getParent(O)}return!1};var ba=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(O,S){"mouseDown"==S.getProperty("eventName")&&(O=S.getProperty("event").getState(),
-ba=null==O||this.isSelectionEmpty()||this.isCellSelected(O.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(O,S){if(!mxEvent.isMultiTouchEvent(S)){O=S.getProperty("event");var F=S.getProperty("cell");null==F?(O=mxUtils.convertPoint(this.container,mxEvent.getClientX(O),mxEvent.getClientY(O)),G.start(O.x,O.y)):null!=ba?this.addSelectionCells(ba):1<this.getSelectionCount()&&this.isCellSelected(F)&&this.removeSelectionCell(F);ba=null;S.consume()}}));
-this.connectionHandler.selectCells=function(O,S){this.graph.setSelectionCell(S||O)};this.connectionHandler.constraintHandler.isStateIgnored=function(O,S){var F=O.view.graph;return S&&(F.isCellSelected(O.cell)||F.isTableRow(O.cell)&&F.selectionCellsHandler.isHandled(F.model.getParent(O.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var O=this.connectionHandler.constraintHandler;null!=O.currentFocus&&O.isStateIgnored(O.currentFocus,!0)&&(O.currentFocus=null,O.constraints=
+var U=this.click;this.click=function(O){var R=null==O.state&&null!=O.sourceState&&this.isCellLocked(O.sourceState.cell);if(this.isEnabled()&&!R||O.isConsumed())return U.apply(this,arguments);var G=R?O.sourceState.cell:O.getCell();null!=G&&(G=this.getClickableLinkForCell(G),null!=G&&(this.isCustomLink(G)?this.customLinkClicked(G):this.openLink(G)));this.isEnabled()&&R&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(O){return O.sourceState};var V=this.tooltipHandler.show;this.tooltipHandler.show=
+function(){V.apply(this,arguments);if(null!=this.div)for(var O=this.div.getElementsByTagName("a"),R=0;R<O.length;R++)null!=O[R].getAttribute("href")&&null==O[R].getAttribute("target")&&O[R].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(O){return O.sourceState};this.getCursorForMouseEvent=function(O){var R=null==O.state&&null!=O.sourceState&&this.isCellLocked(O.sourceState.cell);return this.getCursorForCell(R?O.sourceState.cell:O.getCell())};var aa=this.getCursorForCell;
+this.getCursorForCell=function(O){if(!this.isEnabled()||this.isCellLocked(O)){if(null!=this.getClickableLinkForCell(O))return"pointer";if(this.isCellLocked(O))return"default"}return aa.apply(this,arguments)};this.selectRegion=function(O,R){var G=mxEvent.isAltDown(R)?O:null;O=this.getCells(O.x,O.y,O.width,O.height,null,null,G,function(K){return"1"==mxUtils.getValue(K.style,"locked","0")},!0);if(this.isToggleEvent(R))for(G=0;G<O.length;G++)this.selectCellForEvent(O[G],R);else this.selectCellsForEvent(O,
+R);return O};var ia=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(O,R,G){return this.graph.isCellSelected(O)?!1:ia.apply(this,arguments)};this.isCellLocked=function(O){for(;null!=O;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(O),"locked","0"))return!0;O=this.model.getParent(O)}return!1};var ea=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(O,R){"mouseDown"==R.getProperty("eventName")&&(O=R.getProperty("event").getState(),
+ea=null==O||this.isSelectionEmpty()||this.isCellSelected(O.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(O,R){if(!mxEvent.isMultiTouchEvent(R)){O=R.getProperty("event");var G=R.getProperty("cell");null==G?(O=mxUtils.convertPoint(this.container,mxEvent.getClientX(O),mxEvent.getClientY(O)),F.start(O.x,O.y)):null!=ea?this.addSelectionCells(ea):1<this.getSelectionCount()&&this.isCellSelected(G)&&this.removeSelectionCell(G);ea=null;R.consume()}}));
+this.connectionHandler.selectCells=function(O,R){this.graph.setSelectionCell(R||O)};this.connectionHandler.constraintHandler.isStateIgnored=function(O,R){var G=O.view.graph;return R&&(G.isCellSelected(O.cell)||G.isTableRow(O.cell)&&G.selectionCellsHandler.isHandled(G.model.getParent(O.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var O=this.connectionHandler.constraintHandler;null!=O.currentFocus&&O.isStateIgnored(O.currentFocus,!0)&&(O.currentFocus=null,O.constraints=
null,O.destroyIcons());O.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var qa=this.updateMouseEvent;this.updateMouseEvent=function(O){O=qa.apply(this,arguments);null!=O.state&&this.isCellLocked(O.getCell())&&(O.state=null);return O}}this.currentTranslate=new mxPoint(0,0)};Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;
Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.translateDiagram="1"==urlParams["translate-diagram"];Graph.diagramLanguage=null!=urlParams["diagram-language"]?urlParams["diagram-language"]:mxClient.language;Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;Graph.zoomWheel=!1;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Text is not SVG - cannot display";
Graph.foreignObjectWarningLink="https://www.diagrams.net/doc/faq/svg-export-text-problems";Graph.xmlDeclaration='<?xml version="1.0" encoding="UTF-8"?>';Graph.svgDoctype='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">';Graph.svgFileComment="\x3c!-- Do not edit this file with editors other than diagrams.net --\x3e";Graph.pasteStyles="rounded shadow dashed dashPattern fontFamily fontSource fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize targetPerimeterSpacing startFill startArrow startSize sourcePerimeterSpacing arcSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle".split(" ");
Graph.layoutNames="mxHierarchicalLayout mxCircleLayout mxCompactTreeLayout mxEdgeLabelLayout mxFastOrganicLayout mxParallelEdgeLayout mxPartitionLayout mxRadialTreeLayout mxStackLayout".split(" ");
Graph.createOffscreenGraph=function(a){var b=new Graph(document.createElement("div"));b.stylesheet.styles=mxUtils.clone(a.styles);b.resetViewOnRootChange=!1;b.setConnectable(!1);b.gridEnabled=!1;b.autoScroll=!1;b.setTooltips(!1);b.setEnabled(!1);b.container.style.visibility="hidden";b.container.style.position="absolute";b.container.style.overflow="hidden";b.container.style.height="1px";b.container.style.width="1px";return b};
-Graph.createSvgImage=function(a,b,f,d,g){f=unescape(encodeURIComponent(Graph.svgDoctype+'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+a+'px" height="'+b+'px" '+(null!=d&&null!=g?'viewBox="0 0 '+d+" "+g+'" ':"")+'version="1.1">'+f+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(f):Base64.encode(f,!0)),a,b)};
-Graph.createSvgNode=function(a,b,f,d,g){var e=mxUtils.createXmlDocument(),k=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"svg"):e.createElement("svg");null!=g&&(null!=k.style?k.style.backgroundColor=g:k.setAttribute("style","background-color:"+g));null==e.createElementNS?(k.setAttribute("xmlns",mxConstants.NS_SVG),k.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):k.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);k.setAttribute("version","1.1");
-k.setAttribute("width",f+"px");k.setAttribute("height",d+"px");k.setAttribute("viewBox",a+" "+b+" "+f+" "+d);e.appendChild(k);return k};Graph.htmlToPng=function(a,b,f,d){var g=document.createElement("canvas");g.width=b;g.height=f;var e=document.createElement("img");e.onload=mxUtils.bind(this,function(){g.getContext("2d").drawImage(e,0,0);d(g.toDataURL())});e.src="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml"><style>em{color:red;}</style><em>I</em> lick <span>cheese</span></div></foreignObject></svg>')};
-Graph.zapGremlins=function(a){for(var b=0,f=[],d=0;d<a.length;d++){var g=a.charCodeAt(d);(32<=g||9==g||10==g||13==g)&&65535!=g&&65534!=g||(f.push(a.substring(b,d)),b=d+1)}0<b&&b<a.length&&f.push(a.substring(b));return 0==f.length?a:f.join("")};Graph.stringToBytes=function(a){for(var b=Array(a.length),f=0;f<a.length;f++)b[f]=a.charCodeAt(f);return b};Graph.bytesToString=function(a){for(var b=Array(a.length),f=0;f<a.length;f++)b[f]=String.fromCharCode(a[f]);return b.join("")};
+Graph.createSvgImage=function(a,b,f,e,g){f=unescape(encodeURIComponent(Graph.svgDoctype+'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+a+'px" height="'+b+'px" '+(null!=e&&null!=g?'viewBox="0 0 '+e+" "+g+'" ':"")+'version="1.1">'+f+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(f):Base64.encode(f,!0)),a,b)};
+Graph.createSvgNode=function(a,b,f,e,g){var d=mxUtils.createXmlDocument(),k=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"svg"):d.createElement("svg");null!=g&&(null!=k.style?k.style.backgroundColor=g:k.setAttribute("style","background-color:"+g));null==d.createElementNS?(k.setAttribute("xmlns",mxConstants.NS_SVG),k.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):k.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);k.setAttribute("version","1.1");
+k.setAttribute("width",f+"px");k.setAttribute("height",e+"px");k.setAttribute("viewBox",a+" "+b+" "+f+" "+e);d.appendChild(k);return k};Graph.htmlToPng=function(a,b,f,e){var g=document.createElement("canvas");g.width=b;g.height=f;var d=document.createElement("img");d.onload=mxUtils.bind(this,function(){g.getContext("2d").drawImage(d,0,0);e(g.toDataURL())});d.src="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml"><style>em{color:red;}</style><em>I</em> lick <span>cheese</span></div></foreignObject></svg>')};
+Graph.zapGremlins=function(a){for(var b=0,f=[],e=0;e<a.length;e++){var g=a.charCodeAt(e);(32<=g||9==g||10==g||13==g)&&65535!=g&&65534!=g||(f.push(a.substring(b,e)),b=e+1)}0<b&&b<a.length&&f.push(a.substring(b));return 0==f.length?a:f.join("")};Graph.stringToBytes=function(a){for(var b=Array(a.length),f=0;f<a.length;f++)b[f]=a.charCodeAt(f);return b};Graph.bytesToString=function(a){for(var b=Array(a.length),f=0;f<a.length;f++)b[f]=String.fromCharCode(a[f]);return b.join("")};
Graph.base64EncodeUnicode=function(a){return btoa(encodeURIComponent(a).replace(/%([0-9A-F]{2})/g,function(b,f){return String.fromCharCode(parseInt(f,16))}))};Graph.base64DecodeUnicode=function(a){return decodeURIComponent(Array.prototype.map.call(atob(a),function(b){return"%"+("00"+b.charCodeAt(0).toString(16)).slice(-2)}).join(""))};Graph.compressNode=function(a,b){a=mxUtils.getXml(a);return Graph.compress(b?a:Graph.zapGremlins(a))};
-Graph.arrayBufferToString=function(a){var b="";a=new Uint8Array(a);for(var f=a.byteLength,d=0;d<f;d++)b+=String.fromCharCode(a[d]);return b};Graph.stringToArrayBuffer=function(a){return Uint8Array.from(a,function(b){return b.charCodeAt(0)})};
-Graph.arrayBufferIndexOfString=function(a,b,f){var d=b.charCodeAt(0),g=1,e=-1;for(f=f||0;f<a.byteLength;f++)if(a[f]==d){e=f;break}for(f=e+1;-1<e&&f<a.byteLength&&f<e+b.length-1;f++){if(a[f]!=b.charCodeAt(g))return Graph.arrayBufferIndexOfString(a,b,e+1);g++}return g==b.length-1?e:-1};Graph.compress=function(a,b){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=b?pako.deflate(encodeURIComponent(a)):pako.deflateRaw(encodeURIComponent(a));return btoa(Graph.arrayBufferToString(new Uint8Array(a)))};
+Graph.arrayBufferToString=function(a){var b="";a=new Uint8Array(a);for(var f=a.byteLength,e=0;e<f;e++)b+=String.fromCharCode(a[e]);return b};Graph.stringToArrayBuffer=function(a){return Uint8Array.from(a,function(b){return b.charCodeAt(0)})};
+Graph.arrayBufferIndexOfString=function(a,b,f){var e=b.charCodeAt(0),g=1,d=-1;for(f=f||0;f<a.byteLength;f++)if(a[f]==e){d=f;break}for(f=d+1;-1<d&&f<a.byteLength&&f<d+b.length-1;f++){if(a[f]!=b.charCodeAt(g))return Graph.arrayBufferIndexOfString(a,b,d+1);g++}return g==b.length-1?d:-1};Graph.compress=function(a,b){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=b?pako.deflate(encodeURIComponent(a)):pako.deflateRaw(encodeURIComponent(a));return btoa(Graph.arrayBufferToString(new Uint8Array(a)))};
Graph.decompress=function(a,b,f){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=Graph.stringToArrayBuffer(atob(a));b=decodeURIComponent(b?pako.inflate(a,{to:"string"}):pako.inflateRaw(a,{to:"string"}));return f?b:Graph.zapGremlins(b)};
-Graph.fadeNodes=function(a,b,f,d,g){g=null!=g?g:1E3;Graph.setTransitionForNodes(a,null);Graph.setOpacityForNodes(a,b);window.setTimeout(function(){Graph.setTransitionForNodes(a,"all "+g+"ms ease-in-out");Graph.setOpacityForNodes(a,f);window.setTimeout(function(){Graph.setTransitionForNodes(a,null);null!=d&&d()},g)},0)};Graph.removeKeys=function(a,b){for(var f in a)b(f)&&delete a[f]};
+Graph.fadeNodes=function(a,b,f,e,g){g=null!=g?g:1E3;Graph.setTransitionForNodes(a,null);Graph.setOpacityForNodes(a,b);window.setTimeout(function(){Graph.setTransitionForNodes(a,"all "+g+"ms ease-in-out");Graph.setOpacityForNodes(a,f);window.setTimeout(function(){Graph.setTransitionForNodes(a,null);null!=e&&e()},g)},0)};Graph.removeKeys=function(a,b){for(var f in a)b(f)&&delete a[f]};
Graph.setTransitionForNodes=function(a,b){for(var f=0;f<a.length;f++)mxUtils.setPrefixedStyle(a[f].style,"transition",b)};Graph.setOpacityForNodes=function(a,b){for(var f=0;f<a.length;f++)a[f].style.opacity=b};Graph.removePasteFormatting=function(a){for(;null!=a;)null!=a.firstChild&&Graph.removePasteFormatting(a.firstChild),a.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=a.style&&(a.style.whiteSpace="","#000000"==a.style.color&&(a.style.color="")),a=a.nextSibling};
Graph.sanitizeHtml=function(a,b){return Graph.domPurify(a,!1)};Graph.sanitizeLink=function(a){var b=document.createElement("a");b.setAttribute("href",a);Graph.sanitizeNode(b);return b.getAttribute("href")};Graph.sanitizeNode=function(a){return Graph.domPurify(a,!0)};DOMPurify.addHook("afterSanitizeAttributes",function(a){"use"==a.nodeName&&a.hasAttribute("xlink:href")&&!a.getAttribute("xlink:href").match(/^#/)&&a.remove()});
Graph.domPurify=function(a,b){window.DOM_PURIFY_CONFIG.IN_PLACE=b;return DOMPurify.sanitize(a,window.DOM_PURIFY_CONFIG)};
-Graph.clipSvgDataUri=function(a,b){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=a&&"data:image/svg+xml;base64,"==a.substring(0,26))try{var f=document.createElement("div");f.style.position="absolute";f.style.visibility="hidden";var d=decodeURIComponent(escape(atob(a.substring(26)))),g=d.indexOf("<svg");if(0<=g){f.innerHTML=Graph.sanitizeHtml(d.substring(g));var e=f.getElementsByTagName("svg");if(0<e.length){if(b||null!=e[0].getAttribute("preserveAspectRatio")){document.body.appendChild(f);try{d=b=
-1;var k=e[0].getAttribute("width"),n=e[0].getAttribute("height");k=null!=k&&"%"!=k.charAt(k.length-1)?parseFloat(k):NaN;n=null!=n&&"%"!=n.charAt(n.length-1)?parseFloat(n):NaN;var u=e[0].getAttribute("viewBox");if(null!=u&&!isNaN(k)&&!isNaN(n)){var m=u.split(" ");4<=u.length&&(b=parseFloat(m[2])/k,d=parseFloat(m[3])/n)}var r=e[0].getBBox();0<r.width&&0<r.height&&(f.getElementsByTagName("svg")[0].setAttribute("viewBox",r.x+" "+r.y+" "+r.width+" "+r.height),f.getElementsByTagName("svg")[0].setAttribute("width",
-r.width/b),f.getElementsByTagName("svg")[0].setAttribute("height",r.height/d))}catch(x){}finally{document.body.removeChild(f)}}a=Editor.createSvgDataUri(mxUtils.getXml(e[0]))}}}catch(x){}return a};Graph.stripQuotes=function(a){null!=a&&("'"==a.charAt(0)&&(a=a.substring(1)),"'"==a.charAt(a.length-1)&&(a=a.substring(0,a.length-1)),'"'==a.charAt(0)&&(a=a.substring(1)),'"'==a.charAt(a.length-1)&&(a=a.substring(0,a.length-1)));return a};
+Graph.clipSvgDataUri=function(a,b){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=a&&"data:image/svg+xml;base64,"==a.substring(0,26))try{var f=document.createElement("div");f.style.position="absolute";f.style.visibility="hidden";var e=decodeURIComponent(escape(atob(a.substring(26)))),g=e.indexOf("<svg");if(0<=g){f.innerHTML=Graph.sanitizeHtml(e.substring(g));var d=f.getElementsByTagName("svg");if(0<d.length){if(b||null!=d[0].getAttribute("preserveAspectRatio")){document.body.appendChild(f);try{e=b=
+1;var k=d[0].getAttribute("width"),n=d[0].getAttribute("height");k=null!=k&&"%"!=k.charAt(k.length-1)?parseFloat(k):NaN;n=null!=n&&"%"!=n.charAt(n.length-1)?parseFloat(n):NaN;var u=d[0].getAttribute("viewBox");if(null!=u&&!isNaN(k)&&!isNaN(n)){var m=u.split(" ");4<=u.length&&(b=parseFloat(m[2])/k,e=parseFloat(m[3])/n)}var r=d[0].getBBox();0<r.width&&0<r.height&&(f.getElementsByTagName("svg")[0].setAttribute("viewBox",r.x+" "+r.y+" "+r.width+" "+r.height),f.getElementsByTagName("svg")[0].setAttribute("width",
+r.width/b),f.getElementsByTagName("svg")[0].setAttribute("height",r.height/e))}catch(x){}finally{document.body.removeChild(f)}}a=Editor.createSvgDataUri(mxUtils.getXml(d[0]))}}}catch(x){}return a};Graph.stripQuotes=function(a){null!=a&&("'"==a.charAt(0)&&(a=a.substring(1)),"'"==a.charAt(a.length-1)&&(a=a.substring(0,a.length-1)),'"'==a.charAt(0)&&(a=a.substring(1)),'"'==a.charAt(a.length-1)&&(a=a.substring(0,a.length-1)));return a};
Graph.createRemoveIcon=function(a,b){var f=document.createElement("img");f.setAttribute("src",Dialog.prototype.clearImage);f.setAttribute("title",a);f.setAttribute("width","13");f.setAttribute("height","10");f.style.marginLeft="4px";f.style.marginBottom="-1px";f.style.cursor="pointer";mxEvent.addListener(f,"click",b);return f};Graph.isPageLink=function(a){return null!=a&&"data:page/id,"==a.substring(0,13)};Graph.isLink=function(a){return null!=a&&Graph.linkPattern.test(a)};
Graph.linkPattern=RegExp("^(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=!0;Graph.prototype.defaultPageVisible=!0;Graph.prototype.defaultGridEnabled="0"!=urlParams.grid;Graph.prototype.lightbox=!1;Graph.prototype.defaultPageBackgroundColor="#ffffff";Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.shapeForegroundColor="#000000";Graph.prototype.shapeBackgroundColor="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.selectParentAfterDelete=!1;
Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}^ ^\"^ '^=^;]+)%","g");Graph.prototype.absoluteUrlPattern=RegExp("^(?:[a-z]+:)?//","i");Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=null!=urlParams.base?decodeURIComponent(urlParams.base):(window!=window.top?document.referrer:document.location.toString()).split("#")[0];
Graph.prototype.editAfterInsert=!1;Graph.prototype.builtInProperties=["label","tooltip","placeholders","placeholder"];Graph.prototype.standalone=!1;Graph.prototype.enableFlowAnimation=!1;Graph.prototype.roundableShapes="label rectangle internalStorage corner parallelogram swimlane triangle trapezoid ext step tee process link rhombus offPageConnector loopLimit hexagon manualInput card curlyBracket singleArrow callout doubleArrow flexArrow umlLifeline".split(" ");
-Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(f,d){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var g=f.view.graph.tolerance,e=!0,k=null,n=mxUtils.bind(this,function(r){e=!0;k=new mxPoint(mxEvent.getClientX(r),mxEvent.getClientY(r))}),u=mxUtils.bind(this,function(r){e=e&&null!=k&&Math.abs(k.x-mxEvent.getClientX(r))<g&&Math.abs(k.y-mxEvent.getClientY(r))<g}),m=mxUtils.bind(this,function(r){if(e)for(var x=mxEvent.getSource(r);null!=
-x&&x!=d.node;){if("a"==x.nodeName.toLowerCase()){f.view.graph.labelLinkClicked(f,x,r);break}x=x.parentNode}});mxEvent.addGestureListeners(d.node,n,u,m);mxEvent.addListener(d.node,"click",function(r){mxEvent.consume(r)})};if(null!=this.tooltipHandler){var b=this.tooltipHandler.init;this.tooltipHandler.init=function(){b.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(f){var d=mxEvent.getSource(f);"A"==d.nodeName&&(d=d.getAttribute("href"),null!=
-d&&this.graph.isCustomLink(d)&&(mxEvent.isTouchEvent(f)||!mxEvent.isPopupTrigger(f))&&this.graph.customLinkClicked(d)&&mxEvent.consume(f))}))}}this.addListener(mxEvent.SIZE,mxUtils.bind(this,function(f,d){null!=this.container&&this.flowAnimationStyle&&(f=this.flowAnimationStyle.getAttribute("id"),this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(f))}));this.initLayoutManager()};
+Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(f,e){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var g=f.view.graph.tolerance,d=!0,k=null,n=mxUtils.bind(this,function(r){d=!0;k=new mxPoint(mxEvent.getClientX(r),mxEvent.getClientY(r))}),u=mxUtils.bind(this,function(r){d=d&&null!=k&&Math.abs(k.x-mxEvent.getClientX(r))<g&&Math.abs(k.y-mxEvent.getClientY(r))<g}),m=mxUtils.bind(this,function(r){if(d)for(var x=mxEvent.getSource(r);null!=
+x&&x!=e.node;){if("a"==x.nodeName.toLowerCase()){f.view.graph.labelLinkClicked(f,x,r);break}x=x.parentNode}});mxEvent.addGestureListeners(e.node,n,u,m);mxEvent.addListener(e.node,"click",function(r){mxEvent.consume(r)})};if(null!=this.tooltipHandler){var b=this.tooltipHandler.init;this.tooltipHandler.init=function(){b.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(f){var e=mxEvent.getSource(f);"A"==e.nodeName&&(e=e.getAttribute("href"),null!=
+e&&this.graph.isCustomLink(e)&&(mxEvent.isTouchEvent(f)||!mxEvent.isPopupTrigger(f))&&this.graph.customLinkClicked(e)&&mxEvent.consume(f))}))}}this.addListener(mxEvent.SIZE,mxUtils.bind(this,function(f,e){null!=this.container&&this.flowAnimationStyle&&(f=this.flowAnimationStyle.getAttribute("id"),this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(f))}));this.initLayoutManager()};
(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.isFillState=function(k){return!this.isSpecialColor(k.style[mxConstants.STYLE_FILLCOLOR])&&"1"!=mxUtils.getValue(k.style,"lineShape",null)&&(this.model.isVertex(k.cell)||"arrow"==mxUtils.getValue(k.style,mxConstants.STYLE_SHAPE,null)||"filledEdge"==mxUtils.getValue(k.style,mxConstants.STYLE_SHAPE,null)||"flexArrow"==mxUtils.getValue(k.style,mxConstants.STYLE_SHAPE,
null))};Graph.prototype.isStrokeState=function(k){return!this.isSpecialColor(k.style[mxConstants.STYLE_STROKECOLOR])};Graph.prototype.isSpecialColor=function(k){return 0<=mxUtils.indexOf([mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_FILLCOLOR,"inherit","swimlane","indicated"],k)};Graph.prototype.isGlassState=function(k){k=mxUtils.getValue(k.style,mxConstants.STYLE_SHAPE,null);return"label"==k||"rectangle"==k||"internalStorage"==k||"ext"==k||"umlLifeline"==k||"swimlane"==k||"process"==k};Graph.prototype.isRoundedState=
function(k){return null!=k.shape?k.shape.isRoundable():0<=mxUtils.indexOf(this.roundableShapes,mxUtils.getValue(k.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isLineJumpState=function(k){var n=mxUtils.getValue(k.style,mxConstants.STYLE_SHAPE,null);return!mxUtils.getValue(k.style,mxConstants.STYLE_CURVED,!1)&&("connector"==n||"filledEdge"==n)};Graph.prototype.isAutoSizeState=function(k){return"1"==mxUtils.getValue(k.style,mxConstants.STYLE_AUTOSIZE,null)};Graph.prototype.isImageState=function(k){k=
@@ -2899,83 +2902,83 @@ n,0==u)}return n};Graph.prototype.mergeStyle=function(k,n,u){if(null!=k){var m={
mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(k)&&(!this.isSwimlane(k)||0==n)&&""==this.getLabel(k)&&0<this.model.getChildCount(k))for(n=0;n<this.model.getChildCount(k);n++){var u=this.model.getChildAt(k,n);if(this.isCellEditable(u)){k=u;break}}return k};Graph.prototype.copyStyle=function(k){return this.getCellStyle(k,!1)};Graph.prototype.pasteStyle=function(k,n,u){u=null!=u?u:Graph.pasteStyles;Graph.removeKeys(k,function(m){return 0>mxUtils.indexOf(u,m)});this.updateCellStyles(k,n)};Graph.prototype.updateCellStyles=
function(k,n){this.model.beginUpdate();try{for(var u=0;u<n.length;u++)if(this.model.isVertex(n[u])||this.model.isEdge(n[u])){var m=this.getCellStyle(n[u],!1),r;for(r in k){var x=k[r];m[r]!=x&&this.setCellStyles(r,x,[n[u]])}}}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(k,n,u,m,r,x){this.useCssTransforms&&(k=k/this.currentScale-this.currentTranslate.x,n=n/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(k,n,u,m,r,x){m=null!=m?m:!0;r=null!=r?r:!0;null==u&&(u=this.getCurrentRoot(),null==u&&(u=this.getModel().getRoot()));if(null!=u)for(var B=this.model.getChildCount(u)-1;0<=
-B;B--){var C=this.model.getChildAt(u,B),G=this.getScaledCellAt(k,n,C,m,r,x);if(null!=G)return G;if(this.isCellVisible(C)&&(r&&this.model.isEdge(C)||m&&this.model.isVertex(C))&&(G=this.view.getState(C),null!=G&&(null==x||!x(G,k,n))&&this.intersects(G,k,n)))return C}return null};Graph.prototype.isRecursiveVertexResize=function(k){return!this.isSwimlane(k.cell)&&0<this.model.getChildCount(k.cell)&&!this.isCellCollapsed(k.cell)&&"1"==mxUtils.getValue(k.style,"recursiveResize","1")&&null==mxUtils.getValue(k.style,
+B;B--){var C=this.model.getChildAt(u,B),F=this.getScaledCellAt(k,n,C,m,r,x);if(null!=F)return F;if(this.isCellVisible(C)&&(r&&this.model.isEdge(C)||m&&this.model.isVertex(C))&&(F=this.view.getState(C),null!=F&&(null==x||!x(F,k,n))&&this.intersects(F,k,n)))return C}return null};Graph.prototype.isRecursiveVertexResize=function(k){return!this.isSwimlane(k.cell)&&0<this.model.getChildCount(k.cell)&&!this.isCellCollapsed(k.cell)&&"1"==mxUtils.getValue(k.style,"recursiveResize","1")&&null==mxUtils.getValue(k.style,
"childLayout",null)};Graph.prototype.getAbsoluteParent=function(k){for(var n=this.getCellGeometry(k);null!=n&&n.relative;)k=this.getModel().getParent(k),n=this.getCellGeometry(k);return k};Graph.prototype.isPart=function(k){return"1"==mxUtils.getValue(this.getCurrentCellStyle(k),"part","0")||this.isTableCell(k)||this.isTableRow(k)};Graph.prototype.getCompositeParents=function(k){for(var n=new mxDictionary,u=[],m=0;m<k.length;m++){var r=this.getCompositeParent(k[m]);this.isTableCell(r)&&(r=this.graph.model.getParent(r));
this.isTableRow(r)&&(r=this.graph.model.getParent(r));null==r||n.get(r)||(n.put(r,!0),u.push(r))}return u};Graph.prototype.getCompositeParent=function(k){for(;this.isPart(k);){var n=this.model.getParent(k);if(!this.model.isVertex(n))break;k=n}return k};Graph.prototype.filterSelectionCells=function(k){var n=this.getSelectionCells();if(null!=k){for(var u=[],m=0;m<n.length;m++)k(n[m])||u.push(n[m]);n=u}return n};var a=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(k){if(this.useCssTransforms){var n=
this.currentScale,u=this.currentTranslate;k=new mxRectangle((k.x+2*u.x)*n-u.x,(k.y+2*u.y)*n-u.y,k.width*n,k.height*n)}a.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=function(k){k=this.strokeWidth;this.graph.useCssTransforms&&(k/=this.graph.currentScale);return k};mxGraphView.prototype.getGraphBounds=function(){var k=this.graphBounds;if(this.graph.useCssTransforms){var n=this.graph.currentTranslate,u=this.graph.currentScale;k=new mxRectangle((k.x+n.x)*u,(k.y+n.y)*u,k.width*u,k.height*
u)}return k};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var b=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(k){this.graph.useCssTransforms&&(this.graph.currentScale=this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=0);b.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),
-this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};var f=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(k){k=f.apply(this,arguments);for(var n=[],u=0;u<k.length;u++)this.isTableRow(k[u])||this.isTableCell(k[u])||n.push(k[u]);return n};var d=mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(k){k=d.apply(this,arguments);for(var n=[],u=0;u<k.length;u++)this.isTable(k[u])||
+this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};var f=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(k){k=f.apply(this,arguments);for(var n=[],u=0;u<k.length;u++)this.isTableRow(k[u])||this.isTableCell(k[u])||n.push(k[u]);return n};var e=mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(k){k=e.apply(this,arguments);for(var n=[],u=0;u<k.length;u++)this.isTable(k[u])||
this.isTableRow(k[u])||this.isTableCell(k[u])||n.push(k[u]);return n};Graph.prototype.updateCssTransform=function(){var k=this.view.getDrawPane();if(null!=k)if(k=k.parentNode,this.useCssTransforms){var n=k.getAttribute("transform");k.setAttribute("transformOrigin","0 0");var u=Math.round(100*this.currentScale)/100;k.setAttribute("transform","scale("+u+","+u+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");n!=k.getAttribute("transform")&&
-this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",k.getAttribute("transform"))}else k.removeAttribute("transformOrigin"),k.removeAttribute("transform")};var g=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var k=this.graph.useCssTransforms,n=this.scale,u=this.translate;k&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);g.apply(this,arguments);k&&(this.scale=n,this.translate=u)};var e=mxGraph.prototype.updatePageBreaks;
-mxGraph.prototype.updatePageBreaks=function(k,n,u){var m=this.useCssTransforms,r=this.view.scale,x=this.view.translate;m&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);e.apply(this,arguments);m&&(this.view.scale=r,this.view.translate=x,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};
+this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",k.getAttribute("transform"))}else k.removeAttribute("transformOrigin"),k.removeAttribute("transform")};var g=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var k=this.graph.useCssTransforms,n=this.scale,u=this.translate;k&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);g.apply(this,arguments);k&&(this.scale=n,this.translate=u)};var d=mxGraph.prototype.updatePageBreaks;
+mxGraph.prototype.updatePageBreaks=function(k,n,u){var m=this.useCssTransforms,r=this.view.scale,x=this.view.translate;m&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);d.apply(this,arguments);m&&(this.view.scale=r,this.view.translate=x,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};
Graph.prototype.labelLinkClicked=function(a,b,f){b=b.getAttribute("href");if(null!=b&&!this.isCustomLink(b)&&(mxEvent.isLeftMouseButton(f)&&!mxEvent.isPopupTrigger(f)||mxEvent.isTouchEvent(f))){if(!this.isEnabled()||this.isCellLocked(a.cell))a=this.isBlankLink(b)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(b),a);mxEvent.consume(f)}};
-Graph.prototype.openLink=function(a,b,f){var d=window;try{if(a=Graph.sanitizeLink(a),null!=a)if("_self"==b&&window!=window.top)window.location.href=a;else if(a.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==a.charAt(this.baseUrl.length)&&"_top"==b&&window==window.top){var g=a.split("#")[1];window.location.hash=="#"+g&&(window.location.hash="");window.location.hash=g}else d=window.open(a,null!=b?b:"_blank"),null==d||f||(d.opener=null)}catch(e){}return d};
+Graph.prototype.openLink=function(a,b,f){var e=window;try{if(a=Graph.sanitizeLink(a),null!=a)if("_self"==b&&window!=window.top)window.location.href=a;else if(a.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==a.charAt(this.baseUrl.length)&&"_top"==b&&window==window.top){var g=a.split("#")[1];window.location.hash=="#"+g&&(window.location.hash="");window.location.hash=g}else e=window.open(a,null!=b?b:"_blank"),null==e||f||(e.opener=null)}catch(d){}return e};
Graph.prototype.getLinkTitle=function(a){return a.substring(a.lastIndexOf("/")+1)};Graph.prototype.isCustomLink=function(a){return"data:"==a.substring(0,5)};Graph.prototype.customLinkClicked=function(a){return!1};Graph.prototype.isExternalProtocol=function(a){return"mailto:"===a.substring(0,7)};Graph.prototype.isBlankLink=function(a){return!this.isExternalProtocol(a)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(a)&&a.substring(0,this.domainUrl.length)!==this.domainUrl)};
Graph.prototype.isRelativeUrl=function(a){return null!=a&&!this.absoluteUrlPattern.test(a)&&"data:"!==a.substring(0,5)&&!this.isExternalProtocol(a)};Graph.prototype.getAbsoluteUrl=function(a){null!=a&&this.isRelativeUrl(a)&&(a="#"==a.charAt(0)?this.baseUrl+a:"/"==a.charAt(0)?this.domainUrl+a:this.domainPathUrl+a);return a};
Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutManager(this);this.layoutManager.hasLayout=function(a){return null!=this.graph.getCellStyle(a).childLayout};this.layoutManager.getLayout=function(a,b){var f=this.graph.model.getParent(a);if(!this.graph.isCellCollapsed(a)&&(b!=mxEvent.BEGIN_UPDATE||this.hasLayout(f,b))){a=this.graph.getCellStyle(a);if("stackLayout"==a.childLayout)return b=new mxStackLayout(this.graph,!0),b.resizeParentMax="1"==mxUtils.getValue(a,"resizeParentMax",
"1"),b.horizontal="1"==mxUtils.getValue(a,"horizontalStack","1"),b.resizeParent="1"==mxUtils.getValue(a,"resizeParent","1"),b.resizeLast="1"==mxUtils.getValue(a,"resizeLast","0"),b.spacing=a.stackSpacing||b.spacing,b.border=a.stackBorder||b.border,b.marginLeft=a.marginLeft||0,b.marginRight=a.marginRight||0,b.marginTop=a.marginTop||0,b.marginBottom=a.marginBottom||0,b.allowGaps=a.allowGaps||0,b.fill=!0,b.allowGaps&&(b.gridSize=parseFloat(mxUtils.getValue(a,"stackUnitSize",20))),b;if("treeLayout"==
a.childLayout)return b=new mxCompactTreeLayout(this.graph),b.horizontal="1"==mxUtils.getValue(a,"horizontalTree","1"),b.resizeParent="1"==mxUtils.getValue(a,"resizeParent","1"),b.groupPadding=mxUtils.getValue(a,"parentPadding",20),b.levelDistance=mxUtils.getValue(a,"treeLevelDistance",30),b.maintainParentLocation=!0,b.edgeRouting=!1,b.resetEdges=!1,b;if("flowLayout"==a.childLayout)return b=new mxHierarchicalLayout(this.graph,mxUtils.getValue(a,"flowOrientation",mxConstants.DIRECTION_EAST)),b.resizeParent=
"1"==mxUtils.getValue(a,"resizeParent","1"),b.parentBorder=mxUtils.getValue(a,"parentPadding",20),b.maintainParentLocation=!0,b.intraCellSpacing=mxUtils.getValue(a,"intraCellSpacing",mxHierarchicalLayout.prototype.intraCellSpacing),b.interRankCellSpacing=mxUtils.getValue(a,"interRankCellSpacing",mxHierarchicalLayout.prototype.interRankCellSpacing),b.interHierarchySpacing=mxUtils.getValue(a,"interHierarchySpacing",mxHierarchicalLayout.prototype.interHierarchySpacing),b.parallelEdgeSpacing=mxUtils.getValue(a,
-"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),b;if("circleLayout"==a.childLayout)return new mxCircleLayout(this.graph);if("organicLayout"==a.childLayout)return new mxFastOrganicLayout(this.graph);if("tableLayout"==a.childLayout)return new TableLayout(this.graph);if(null!=a.childLayout&&"["==a.childLayout.charAt(0))try{return new mxCompositeLayout(this.graph,this.graph.createLayouts(JSON.parse(a.childLayout)))}catch(d){null!=window.console&&console.error(d)}}return null}};
-Graph.prototype.createLayouts=function(a){for(var b=[],f=0;f<a.length;f++)if(0<=mxUtils.indexOf(Graph.layoutNames,a[f].layout)){var d=new window[a[f].layout](this);if(null!=a[f].config)for(var g in a[f].config)d[g]=a[f].config[g];b.push(d)}else throw Error(mxResources.get("invalidCallFnNotFound",[a[f].layout]));return b};
-Graph.prototype.getDataForCells=function(a){for(var b=[],f=0;f<a.length;f++){var d=null!=a[f].value?a[f].value.attributes:null,g={};g.id=a[f].id;if(null!=d)for(var e=0;e<d.length;e++)g[d[e].nodeName]=d[e].nodeValue;else g.label=this.convertValueToString(a[f]);b.push(g)}return b};
-Graph.prototype.getNodesForCells=function(a){for(var b=[],f=0;f<a.length;f++){var d=this.view.getState(a[f]);if(null!=d){for(var g=this.cellRenderer.getShapesForState(d),e=0;e<g.length;e++)null!=g[e]&&null!=g[e].node&&b.push(g[e].node);null!=d.control&&null!=d.control.node&&b.push(d.control.node)}}return b};
-Graph.prototype.createWipeAnimations=function(a,b){for(var f=[],d=0;d<a.length;d++){var g=this.view.getState(a[d]);null!=g&&null!=g.shape&&(this.model.isEdge(g.cell)&&null!=g.absolutePoints&&1<g.absolutePoints.length?f.push(this.createEdgeWipeAnimation(g,b)):this.model.isVertex(g.cell)&&null!=g.shape.bounds&&f.push(this.createVertexWipeAnimation(g,b)))}return f};
-Graph.prototype.createEdgeWipeAnimation=function(a,b){var f=a.absolutePoints.slice(),d=a.segments,g=a.length,e=f.length;return{execute:mxUtils.bind(this,function(k,n){if(null!=a.shape){var u=[f[0]];n=k/n;b||(n=1-n);for(var m=g*n,r=1;r<e;r++)if(m<=d[r-1]){u.push(new mxPoint(f[r-1].x+(f[r].x-f[r-1].x)*m/d[r-1],f[r-1].y+(f[r].y-f[r-1].y)*m/d[r-1]));break}else m-=d[r-1],u.push(f[r]);a.shape.points=u;a.shape.redraw();0==k&&Graph.setOpacityForNodes(this.getNodesForCells([a.cell]),1);null!=a.text&&null!=
+"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),b;if("circleLayout"==a.childLayout)return new mxCircleLayout(this.graph);if("organicLayout"==a.childLayout)return new mxFastOrganicLayout(this.graph);if("tableLayout"==a.childLayout)return new TableLayout(this.graph);if(null!=a.childLayout&&"["==a.childLayout.charAt(0))try{return new mxCompositeLayout(this.graph,this.graph.createLayouts(JSON.parse(a.childLayout)))}catch(e){null!=window.console&&console.error(e)}}return null}};
+Graph.prototype.createLayouts=function(a){for(var b=[],f=0;f<a.length;f++)if(0<=mxUtils.indexOf(Graph.layoutNames,a[f].layout)){var e=new window[a[f].layout](this);if(null!=a[f].config)for(var g in a[f].config)e[g]=a[f].config[g];b.push(e)}else throw Error(mxResources.get("invalidCallFnNotFound",[a[f].layout]));return b};
+Graph.prototype.getDataForCells=function(a){for(var b=[],f=0;f<a.length;f++){var e=null!=a[f].value?a[f].value.attributes:null,g={};g.id=a[f].id;if(null!=e)for(var d=0;d<e.length;d++)g[e[d].nodeName]=e[d].nodeValue;else g.label=this.convertValueToString(a[f]);b.push(g)}return b};
+Graph.prototype.getNodesForCells=function(a){for(var b=[],f=0;f<a.length;f++){var e=this.view.getState(a[f]);if(null!=e){for(var g=this.cellRenderer.getShapesForState(e),d=0;d<g.length;d++)null!=g[d]&&null!=g[d].node&&b.push(g[d].node);null!=e.control&&null!=e.control.node&&b.push(e.control.node)}}return b};
+Graph.prototype.createWipeAnimations=function(a,b){for(var f=[],e=0;e<a.length;e++){var g=this.view.getState(a[e]);null!=g&&null!=g.shape&&(this.model.isEdge(g.cell)&&null!=g.absolutePoints&&1<g.absolutePoints.length?f.push(this.createEdgeWipeAnimation(g,b)):this.model.isVertex(g.cell)&&null!=g.shape.bounds&&f.push(this.createVertexWipeAnimation(g,b)))}return f};
+Graph.prototype.createEdgeWipeAnimation=function(a,b){var f=a.absolutePoints.slice(),e=a.segments,g=a.length,d=f.length;return{execute:mxUtils.bind(this,function(k,n){if(null!=a.shape){var u=[f[0]];n=k/n;b||(n=1-n);for(var m=g*n,r=1;r<d;r++)if(m<=e[r-1]){u.push(new mxPoint(f[r-1].x+(f[r].x-f[r-1].x)*m/e[r-1],f[r-1].y+(f[r].y-f[r-1].y)*m/e[r-1]));break}else m-=e[r-1],u.push(f[r]);a.shape.points=u;a.shape.redraw();0==k&&Graph.setOpacityForNodes(this.getNodesForCells([a.cell]),1);null!=a.text&&null!=
a.text.node&&(a.text.node.style.opacity=n)}}),stop:mxUtils.bind(this,function(){null!=a.shape&&(a.shape.points=f,a.shape.redraw(),null!=a.text&&null!=a.text.node&&(a.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([a.cell]),b?1:0))})}};
-Graph.prototype.createVertexWipeAnimation=function(a,b){var f=new mxRectangle.fromRectangle(a.shape.bounds);return{execute:mxUtils.bind(this,function(d,g){null!=a.shape&&(g=d/g,b||(g=1-g),a.shape.bounds=new mxRectangle(f.x,f.y,f.width*g,f.height),a.shape.redraw(),0==d&&Graph.setOpacityForNodes(this.getNodesForCells([a.cell]),1),null!=a.text&&null!=a.text.node&&(a.text.node.style.opacity=g))}),stop:mxUtils.bind(this,function(){null!=a.shape&&(a.shape.bounds=f,a.shape.redraw(),null!=a.text&&null!=a.text.node&&
-(a.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([a.cell]),b?1:0))})}};Graph.prototype.executeAnimations=function(a,b,f,d){f=null!=f?f:30;d=null!=d?d:30;var g=null,e=0,k=mxUtils.bind(this,function(){if(e==f||this.stoppingCustomActions){window.clearInterval(g);for(var n=0;n<a.length;n++)a[n].stop();null!=b&&b()}else for(n=0;n<a.length;n++)a[n].execute(e,f);e++});g=window.setInterval(k,d);k()};
+Graph.prototype.createVertexWipeAnimation=function(a,b){var f=new mxRectangle.fromRectangle(a.shape.bounds);return{execute:mxUtils.bind(this,function(e,g){null!=a.shape&&(g=e/g,b||(g=1-g),a.shape.bounds=new mxRectangle(f.x,f.y,f.width*g,f.height),a.shape.redraw(),0==e&&Graph.setOpacityForNodes(this.getNodesForCells([a.cell]),1),null!=a.text&&null!=a.text.node&&(a.text.node.style.opacity=g))}),stop:mxUtils.bind(this,function(){null!=a.shape&&(a.shape.bounds=f,a.shape.redraw(),null!=a.text&&null!=a.text.node&&
+(a.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([a.cell]),b?1:0))})}};Graph.prototype.executeAnimations=function(a,b,f,e){f=null!=f?f:30;e=null!=e?e:30;var g=null,d=0,k=mxUtils.bind(this,function(){if(d==f||this.stoppingCustomActions){window.clearInterval(g);for(var n=0;n<a.length;n++)a[n].stop();null!=b&&b()}else for(n=0;n<a.length;n++)a[n].execute(d,f);d++});g=window.setInterval(k,e);k()};
Graph.prototype.getPageSize=function(){return this.pageVisible?new mxRectangle(0,0,this.pageFormat.width*this.pageScale,this.pageFormat.height*this.pageScale):this.scrollTileSize};
-Graph.prototype.getPageLayout=function(){var a=this.getPageSize(),b=this.getGraphBounds();if(0==b.width||0==b.height)return new mxRectangle(0,0,1,1);var f=Math.floor(Math.ceil(b.x/this.view.scale-this.view.translate.x)/a.width),d=Math.floor(Math.ceil(b.y/this.view.scale-this.view.translate.y)/a.height);return new mxRectangle(f,d,Math.ceil((Math.floor((b.x+b.width)/this.view.scale)-this.view.translate.x)/a.width)-f,Math.ceil((Math.floor((b.y+b.height)/this.view.scale)-this.view.translate.y)/a.height)-
-d)};Graph.prototype.sanitizeHtml=function(a,b){return Graph.sanitizeHtml(a,b)};Graph.prototype.updatePlaceholders=function(){var a=!1,b;for(b in this.model.cells){var f=this.model.cells[b];this.isReplacePlaceholders(f)&&(this.view.invalidate(f,!1,!1),a=!0)}a&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(a){return null!=a.value&&"object"==typeof a.value&&"1"==a.value.getAttribute("placeholders")};
+Graph.prototype.getPageLayout=function(){var a=this.getPageSize(),b=this.getGraphBounds();if(0==b.width||0==b.height)return new mxRectangle(0,0,1,1);var f=Math.floor(Math.ceil(b.x/this.view.scale-this.view.translate.x)/a.width),e=Math.floor(Math.ceil(b.y/this.view.scale-this.view.translate.y)/a.height);return new mxRectangle(f,e,Math.ceil((Math.floor((b.x+b.width)/this.view.scale)-this.view.translate.x)/a.width)-f,Math.ceil((Math.floor((b.y+b.height)/this.view.scale)-this.view.translate.y)/a.height)-
+e)};Graph.prototype.sanitizeHtml=function(a,b){return Graph.sanitizeHtml(a,b)};Graph.prototype.updatePlaceholders=function(){var a=!1,b;for(b in this.model.cells){var f=this.model.cells[b];this.isReplacePlaceholders(f)&&(this.view.invalidate(f,!1,!1),a=!0)}a&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(a){return null!=a.value&&"object"==typeof a.value&&"1"==a.value.getAttribute("placeholders")};
Graph.prototype.isZoomWheelEvent=function(a){return Graph.zoomWheel&&!mxEvent.isShiftDown(a)&&!mxEvent.isMetaDown(a)&&!mxEvent.isAltDown(a)&&(!mxEvent.isControlDown(a)||mxClient.IS_MAC)||!Graph.zoomWheel&&(mxEvent.isAltDown(a)||mxEvent.isControlDown(a))};Graph.prototype.isScrollWheelEvent=function(a){return!this.isZoomWheelEvent(a)};Graph.prototype.isTransparentClickEvent=function(a){return mxEvent.isAltDown(a)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};
Graph.prototype.isIgnoreTerminalEvent=function(a){return mxEvent.isAltDown(a)&&!mxEvent.isShiftDown(a)&&!mxEvent.isControlDown(a)&&!mxEvent.isMetaDown(a)};Graph.prototype.isEdgeIgnored=function(a){var b=!1;null!=a&&(a=this.getCurrentCellStyle(a),b="1"==mxUtils.getValue(a,"ignoreEdge","0"));return b};Graph.prototype.isSplitTarget=function(a,b,f){return!this.model.isEdge(b[0])&&!mxEvent.isAltDown(f)&&!mxEvent.isShiftDown(f)&&mxGraph.prototype.isSplitTarget.apply(this,arguments)};
Graph.prototype.getLabel=function(a){var b=mxGraph.prototype.getLabel.apply(this,arguments);null!=b&&this.isReplacePlaceholders(a)&&null==a.getAttribute("placeholder")&&(b=this.replacePlaceholders(a,b));return b};Graph.prototype.isLabelMovable=function(a){var b=this.getCurrentCellStyle(a);return!this.isCellLocked(a)&&(this.model.isEdge(a)&&this.edgeLabelsMovable||this.model.isVertex(a)&&(this.vertexLabelsMovable||"1"==mxUtils.getValue(b,"labelMovable","0")))};
Graph.prototype.setGridSize=function(a){this.gridSize=a;this.fireEvent(new mxEventObject("gridSizeChanged"))};Graph.prototype.setDefaultParent=function(a){this.defaultParent=a;this.fireEvent(new mxEventObject("defaultParentChanged"))};Graph.prototype.getClickableLinkForCell=function(a){do{var b=this.getLinkForCell(a);if(null!=b)return b;a=this.model.getParent(a)}while(null!=a);return null};
Graph.prototype.getGlobalVariable=function(a){var b=null;"date"==a?b=(new Date).toLocaleDateString():"time"==a?b=(new Date).toLocaleTimeString():"timestamp"==a?b=(new Date).toLocaleString():"date{"==a.substring(0,5)&&(a=a.substring(5,a.length-1),b=this.formatDate(new Date,a));return b};
Graph.prototype.formatDate=function(a,b,f){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
-shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var d=this.dateFormatCache,g=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,e=/[^-+\dA-Z]/g,k=function(N,Q){N=String(N);for(Q=Q||2;N.length<Q;)N="0"+N;return N};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||
-/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(d.masks[b]||b||d.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),f=!0);var n=f?"getUTC":"get",u=a[n+"Date"](),m=a[n+"Day"](),r=a[n+"Month"](),x=a[n+"FullYear"](),B=a[n+"Hours"](),C=a[n+"Minutes"](),G=a[n+"Seconds"]();n=a[n+"Milliseconds"]();var J=f?0:a.getTimezoneOffset(),D={d:u,dd:k(u),ddd:d.i18n.dayNames[m],dddd:d.i18n.dayNames[m+7],m:r+1,mm:k(r+1),mmm:d.i18n.monthNames[r],mmmm:d.i18n.monthNames[r+
-12],yy:String(x).slice(2),yyyy:x,h:B%12||12,hh:k(B%12||12),H:B,HH:k(B),M:C,MM:k(C),s:G,ss:k(G),l:k(n,3),L:k(99<n?Math.round(n/10):n),t:12>B?"a":"p",tt:12>B?"am":"pm",T:12>B?"A":"P",TT:12>B?"AM":"PM",Z:f?"UTC":(String(a).match(g)||[""]).pop().replace(e,""),o:(0<J?"-":"+")+k(100*Math.floor(Math.abs(J)/60)+Math.abs(J)%60,4),S:["th","st","nd","rd"][3<u%10?0:(10!=u%100-u%10)*u%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(N){return N in D?D[N]:N.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 e=this.dateFormatCache,g=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,d=/[^-+\dA-Z]/g,k=function(N,S){N=String(N);for(S=S||2;N.length<S;)N="0"+N;return N};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||
+/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(e.masks[b]||b||e.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),f=!0);var n=f?"getUTC":"get",u=a[n+"Date"](),m=a[n+"Day"](),r=a[n+"Month"](),x=a[n+"FullYear"](),B=a[n+"Hours"](),C=a[n+"Minutes"](),F=a[n+"Seconds"]();n=a[n+"Milliseconds"]();var J=f?0:a.getTimezoneOffset(),D={d:u,dd:k(u),ddd:e.i18n.dayNames[m],dddd:e.i18n.dayNames[m+7],m:r+1,mm:k(r+1),mmm:e.i18n.monthNames[r],mmmm:e.i18n.monthNames[r+
+12],yy:String(x).slice(2),yyyy:x,h:B%12||12,hh:k(B%12||12),H:B,HH:k(B),M:C,MM:k(C),s:F,ss:k(F),l:k(n,3),L:k(99<n?Math.round(n/10):n),t:12>B?"a":"p",tt:12>B?"am":"pm",T:12>B?"A":"P",TT:12>B?"AM":"PM",Z:f?"UTC":(String(a).match(g)||[""]).pop().replace(d,""),o:(0<J?"-":"+")+k(100*Math.floor(Math.abs(J)/60)+Math.abs(J)%60,4),S:["th","st","nd","rd"][3<u%10?0:(10!=u%100-u%10)*u%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(N){return N in D?D[N]:N.slice(1,
N.length-1)})};Graph.prototype.getLayerForCells=function(a){var b=null;if(0<a.length){for(b=a[0];!this.model.isLayer(b);)b=this.model.getParent(b);for(var f=1;f<a.length;f++)if(!this.model.isAncestor(b,a[f])){b=null;break}}return b};
-Graph.prototype.createLayersDialog=function(a,b){var f=document.createElement("div");f.style.position="absolute";for(var d=this.getModel(),g=d.getChildCount(d.root),e=0;e<g;e++)mxUtils.bind(this,function(k){function n(){d.isVisible(k)?(r.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(m,75)):(r.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(m,25))}var u=this.convertValueToString(k)||mxResources.get("background")||"Background",m=document.createElement("div");m.style.overflow=
-"hidden";m.style.textOverflow="ellipsis";m.style.padding="2px";m.style.whiteSpace="nowrap";m.style.cursor="pointer";m.setAttribute("title",mxResources.get(d.isVisible(k)?"hideIt":"show",[u]));var r=document.createElement("img");r.setAttribute("draggable","false");r.setAttribute("align","absmiddle");r.setAttribute("border","0");r.style.position="relative";r.style.width="16px";r.style.padding="0px 6px 0 4px";b&&(r.style.filter="invert(100%)",r.style.top="-2px");m.appendChild(r);mxUtils.write(m,u);f.appendChild(m);
-mxEvent.addListener(m,"click",function(){d.setVisible(k,!d.isVisible(k));n();null!=a&&a(k)});n()})(d.getChildAt(d.root,e));return f};
-Graph.prototype.replacePlaceholders=function(a,b,f,d){d=[];if(null!=b){for(var g=0;match=this.placeholderPattern.exec(b);){var e=match[0];if(2<e.length&&"%label%"!=e&&"%tooltip%"!=e){var k=null;if(match.index>g&&"%"==b.charAt(match.index-1))k=e.substring(1);else{var n=e.substring(1,e.length-1);if("id"==n)k=a.id;else if(0>n.indexOf("{"))for(var u=a;null==k&&null!=u;)null!=u.value&&"object"==typeof u.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(k=u.getAttribute(n+"_"+Graph.diagramLanguage)),
-null==k&&(k=u.hasAttribute(n)?null!=u.getAttribute(n)?u.getAttribute(n):"":null)),u=this.model.getParent(u);null==k&&(k=this.getGlobalVariable(n));null==k&&null!=f&&(k=f[n])}d.push(b.substring(g,match.index)+(null!=k?k:e));g=match.index+e.length}}d.push(b.substring(g))}return d.join("")};Graph.prototype.restoreSelection=function(a){if(null!=a&&0<a.length){for(var b=[],f=0;f<a.length;f++){var d=this.model.getCell(a[f].id);null!=d&&b.push(d)}this.setSelectionCells(b)}else this.clearSelection()};
+Graph.prototype.createLayersDialog=function(a,b){var f=document.createElement("div");f.style.position="absolute";for(var e=this.getModel(),g=e.getChildCount(e.root),d=0;d<g;d++)mxUtils.bind(this,function(k){function n(){e.isVisible(k)?(r.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(m,75)):(r.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(m,25))}var u=this.convertValueToString(k)||mxResources.get("background")||"Background",m=document.createElement("div");m.style.overflow=
+"hidden";m.style.textOverflow="ellipsis";m.style.padding="2px";m.style.whiteSpace="nowrap";m.style.cursor="pointer";m.setAttribute("title",mxResources.get(e.isVisible(k)?"hideIt":"show",[u]));var r=document.createElement("img");r.setAttribute("draggable","false");r.setAttribute("align","absmiddle");r.setAttribute("border","0");r.style.position="relative";r.style.width="16px";r.style.padding="0px 6px 0 4px";b&&(r.style.filter="invert(100%)",r.style.top="-2px");m.appendChild(r);mxUtils.write(m,u);f.appendChild(m);
+mxEvent.addListener(m,"click",function(){e.setVisible(k,!e.isVisible(k));n();null!=a&&a(k)});n()})(e.getChildAt(e.root,d));return f};
+Graph.prototype.replacePlaceholders=function(a,b,f,e){e=[];if(null!=b){for(var g=0;match=this.placeholderPattern.exec(b);){var d=match[0];if(2<d.length&&"%label%"!=d&&"%tooltip%"!=d){var k=null;if(match.index>g&&"%"==b.charAt(match.index-1))k=d.substring(1);else{var n=d.substring(1,d.length-1);if("id"==n)k=a.id;else if(0>n.indexOf("{"))for(var u=a;null==k&&null!=u;)null!=u.value&&"object"==typeof u.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(k=u.getAttribute(n+"_"+Graph.diagramLanguage)),
+null==k&&(k=u.hasAttribute(n)?null!=u.getAttribute(n)?u.getAttribute(n):"":null)),u=this.model.getParent(u);null==k&&(k=this.getGlobalVariable(n));null==k&&null!=f&&(k=f[n])}e.push(b.substring(g,match.index)+(null!=k?k:d));g=match.index+d.length}}e.push(b.substring(g))}return e.join("")};Graph.prototype.restoreSelection=function(a){if(null!=a&&0<a.length){for(var b=[],f=0;f<a.length;f++){var e=this.model.getCell(a[f].id);null!=e&&b.push(e)}this.setSelectionCells(b)}else this.clearSelection()};
Graph.prototype.selectCellForEvent=function(a,b){mxEvent.isShiftDown(b)&&!this.isSelectionEmpty()&&this.selectTableRange(this.getSelectionCell(),a)||mxGraph.prototype.selectCellForEvent.apply(this,arguments)};
-Graph.prototype.selectTableRange=function(a,b){var f=!1;if(this.isTableCell(a)&&this.isTableCell(b)){var d=this.model.getParent(a),g=this.model.getParent(d),e=this.model.getParent(b);if(g==this.model.getParent(e)){a=d.getIndex(a);d=g.getIndex(d);var k=e.getIndex(b),n=g.getIndex(e);e=Math.max(d,n);b=Math.min(a,k);a=Math.max(a,k);k=[];for(d=Math.min(d,n);d<=e;d++){n=this.model.getChildAt(g,d);for(var u=b;u<=a;u++)k.push(this.model.getChildAt(n,u))}0<k.length&&(1<k.length||1<this.getSelectionCount()||
+Graph.prototype.selectTableRange=function(a,b){var f=!1;if(this.isTableCell(a)&&this.isTableCell(b)){var e=this.model.getParent(a),g=this.model.getParent(e),d=this.model.getParent(b);if(g==this.model.getParent(d)){a=e.getIndex(a);e=g.getIndex(e);var k=d.getIndex(b),n=g.getIndex(d);d=Math.max(e,n);b=Math.min(a,k);a=Math.max(a,k);k=[];for(e=Math.min(e,n);e<=d;e++){n=this.model.getChildAt(g,e);for(var u=b;u<=a;u++)k.push(this.model.getChildAt(n,u))}0<k.length&&(1<k.length||1<this.getSelectionCount()||
!this.isCellSelected(k[0]))&&(this.setSelectionCells(k),f=!0)}}return f};
-Graph.prototype.snapCellsToGrid=function(a,b){this.getModel().beginUpdate();try{for(var f=0;f<a.length;f++){var d=a[f],g=this.getCellGeometry(d);if(null!=g){g=g.clone();if(this.getModel().isVertex(d))g.x=Math.round(g.x/b)*b,g.y=Math.round(g.y/b)*b,g.width=Math.round(g.width/b)*b,g.height=Math.round(g.height/b)*b;else if(this.getModel().isEdge(d)&&null!=g.points)for(var e=0;e<g.points.length;e++)g.points[e].x=Math.round(g.points[e].x/b)*b,g.points[e].y=Math.round(g.points[e].y/b)*b;this.getModel().setGeometry(d,
+Graph.prototype.snapCellsToGrid=function(a,b){this.getModel().beginUpdate();try{for(var f=0;f<a.length;f++){var e=a[f],g=this.getCellGeometry(e);if(null!=g){g=g.clone();if(this.getModel().isVertex(e))g.x=Math.round(g.x/b)*b,g.y=Math.round(g.y/b)*b,g.width=Math.round(g.width/b)*b,g.height=Math.round(g.height/b)*b;else if(this.getModel().isEdge(e)&&null!=g.points)for(var d=0;d<g.points.length;d++)g.points[d].x=Math.round(g.points[d].x/b)*b,g.points[d].y=Math.round(g.points[d].y/b)*b;this.getModel().setGeometry(e,
g)}}}finally{this.getModel().endUpdate()}};Graph.prototype.selectCellsForConnectVertex=function(a,b,f){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),this.scrollCellToVisible(a[1]),null!=f&&(mxEvent.isTouchEvent(b)?f.update(f.getState(this.view.getState(a[1]))):f.reset())):this.setSelectionCells(a)};
Graph.prototype.isCloneConnectSource=function(a){var b=null;null!=this.layoutManager&&(b=this.layoutManager.getLayout(this.model.getParent(a)));return this.isTableRow(a)||this.isTableCell(a)||null!=b&&b.constructor==mxStackLayout};
-Graph.prototype.connectVertex=function(a,b,f,d,g,e,k,n){e=e?e:!1;if(a.geometry.relative&&this.model.isEdge(a.parent))return[];for(;a.geometry.relative&&this.model.isVertex(a.parent);)a=a.parent;var u=this.isCloneConnectSource(a),m=u?a:this.getCompositeParent(a),r=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(m.geometry.x,m.geometry.y);b==mxConstants.DIRECTION_NORTH?(r.x+=m.geometry.width/2,r.y-=f):b==
-mxConstants.DIRECTION_SOUTH?(r.x+=m.geometry.width/2,r.y+=m.geometry.height+f):(r.x=b==mxConstants.DIRECTION_WEST?r.x-f:r.x+(m.geometry.width+f),r.y+=m.geometry.height/2);var x=this.view.getState(this.model.getParent(a));f=this.view.scale;var B=this.view.translate;m=B.x*f;B=B.y*f;null!=x&&this.model.isVertex(x.cell)&&(m=x.x,B=x.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(r.x+=a.parent.geometry.x,r.y+=a.parent.geometry.y);e=e?null:(new mxRectangle(m+r.x*f,B+r.y*f)).grow(40*f);e=null!=e?
-this.getCells(0,0,0,0,null,null,e,null,!0):null;x=this.view.getState(a);var C=null,G=null;if(null!=e){e=e.reverse();for(var J=0;J<e.length;J++)if(!this.isCellLocked(e[J])&&!this.model.isEdge(e[J])&&e[J]!=a)if(!this.model.isAncestor(a,e[J])&&this.isContainer(e[J])&&(null==C||e[J]==this.model.getParent(a)))C=e[J];else if(null==G&&this.isCellConnectable(e[J])&&!this.model.isAncestor(e[J],a)&&!this.isSwimlane(e[J])){var D=this.view.getState(e[J]);null==x||null==D||mxUtils.intersects(x,D)||(G=e[J])}}var N=
-!mxEvent.isShiftDown(d)||mxEvent.isControlDown(d)||g;N&&("1"!=urlParams.sketch||g)&&(b==mxConstants.DIRECTION_NORTH?r.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?r.y+=a.geometry.height/2:r.x=b==mxConstants.DIRECTION_WEST?r.x-a.geometry.width/2:r.x+a.geometry.width/2);var Q=[],R=G;G=C;g=mxUtils.bind(this,function(P){if(null==k||null!=P||null==G&&u){this.model.beginUpdate();try{if(null==R&&N){var Z=this.getAbsoluteParent(null!=P?P:a);Z=u?a:this.getCompositeParent(Z);R=null!=P?P:this.duplicateCells([Z],
-!1)[0];null!=P&&this.addCells([R],this.model.getParent(a),null,null,null,!0);var U=this.getCellGeometry(R);null!=U&&(null!=P&&"1"==urlParams.sketch&&(b==mxConstants.DIRECTION_NORTH?r.y-=U.height/2:b==mxConstants.DIRECTION_SOUTH?r.y+=U.height/2:r.x=b==mxConstants.DIRECTION_WEST?r.x-U.width/2:r.x+U.width/2),U.x=r.x-U.width/2,U.y=r.y-U.height/2);null!=C?(this.addCells([R],C,null,null,null,!0),G=null):N&&!u&&this.addCells([R],this.getDefaultParent(),null,null,null,!0)}var V=mxEvent.isControlDown(d)&&
-mxEvent.isShiftDown(d)&&N||null==G&&u?null:this.insertEdge(this.model.getParent(a),null,"",a,R,this.createCurrentEdgeStyle());if(null!=V&&this.connectionHandler.insertBeforeSource){var ia=null;for(P=a;null!=P.parent&&null!=P.geometry&&P.geometry.relative&&P.parent!=V.parent;)P=this.model.getParent(P);null!=P&&null!=P.parent&&P.parent==V.parent&&(ia=P.parent.getIndex(P),this.model.add(P.parent,V,ia))}null==G&&null!=R&&null!=a.parent&&u&&b==mxConstants.DIRECTION_WEST&&(ia=a.parent.getIndex(a),this.model.add(a.parent,
-R,ia));null!=V&&Q.push(V);null==G&&null!=R&&Q.push(R);null==R&&null!=V&&V.geometry.setTerminalPoint(r,!1);null!=V&&this.fireEvent(new mxEventObject("cellsInserted","cells",[V]))}finally{this.model.endUpdate()}}if(null!=n)n(Q);else return Q});if(null==k||null!=R||!N||null==G&&u)return g(R);k(m+r.x*f,B+r.y*f,g)};
-Graph.prototype.getIndexableText=function(a){a=null!=a?a:this.model.getDescendants(this.model.root);for(var b=document.createElement("div"),f=[],d,g=0;g<a.length;g++)if(d=a[g],this.model.isVertex(d)||this.model.isEdge(d))this.isHtmlLabel(d)?(b.innerHTML=this.sanitizeHtml(this.getLabel(d)),d=mxUtils.extractTextWithWhitespace([b])):d=this.getLabel(d),d=mxUtils.trim(d.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<d.length&&f.push(d);return f.join(" ")};
-Graph.prototype.convertValueToString=function(a){var b=this.model.getValue(a);if(null!=b&&"object"==typeof b){var f=null;if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){b=a.getAttribute("placeholder");for(var d=a;null==f&&null!=d;)null!=d.value&&"object"==typeof d.value&&(f=d.hasAttribute(b)?null!=d.getAttribute(b)?d.getAttribute(b):"":null),d=this.model.getParent(d)}else f=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(f=b.getAttribute("label_"+Graph.diagramLanguage)),
+Graph.prototype.connectVertex=function(a,b,f,e,g,d,k,n){d=d?d:!1;if(a.geometry.relative&&this.model.isEdge(a.parent))return[];for(;a.geometry.relative&&this.model.isVertex(a.parent);)a=a.parent;var u=this.isCloneConnectSource(a),m=u?a:this.getCompositeParent(a),r=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(m.geometry.x,m.geometry.y);b==mxConstants.DIRECTION_NORTH?(r.x+=m.geometry.width/2,r.y-=f):b==
+mxConstants.DIRECTION_SOUTH?(r.x+=m.geometry.width/2,r.y+=m.geometry.height+f):(r.x=b==mxConstants.DIRECTION_WEST?r.x-f:r.x+(m.geometry.width+f),r.y+=m.geometry.height/2);var x=this.view.getState(this.model.getParent(a));f=this.view.scale;var B=this.view.translate;m=B.x*f;B=B.y*f;null!=x&&this.model.isVertex(x.cell)&&(m=x.x,B=x.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(r.x+=a.parent.geometry.x,r.y+=a.parent.geometry.y);d=d?null:(new mxRectangle(m+r.x*f,B+r.y*f)).grow(40*f);d=null!=d?
+this.getCells(0,0,0,0,null,null,d,null,!0):null;x=this.view.getState(a);var C=null,F=null;if(null!=d){d=d.reverse();for(var J=0;J<d.length;J++)if(!this.isCellLocked(d[J])&&!this.model.isEdge(d[J])&&d[J]!=a)if(!this.model.isAncestor(a,d[J])&&this.isContainer(d[J])&&(null==C||d[J]==this.model.getParent(a)))C=d[J];else if(null==F&&this.isCellConnectable(d[J])&&!this.model.isAncestor(d[J],a)&&!this.isSwimlane(d[J])){var D=this.view.getState(d[J]);null==x||null==D||mxUtils.intersects(x,D)||(F=d[J])}}var N=
+!mxEvent.isShiftDown(e)||mxEvent.isControlDown(e)||g;N&&("1"!=urlParams.sketch||g)&&(b==mxConstants.DIRECTION_NORTH?r.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?r.y+=a.geometry.height/2:r.x=b==mxConstants.DIRECTION_WEST?r.x-a.geometry.width/2:r.x+a.geometry.width/2);var S=[],T=F;F=C;g=mxUtils.bind(this,function(P){if(null==k||null!=P||null==F&&u){this.model.beginUpdate();try{if(null==T&&N){var Z=this.getAbsoluteParent(null!=P?P:a);Z=u?a:this.getCompositeParent(Z);T=null!=P?P:this.duplicateCells([Z],
+!1)[0];null!=P&&this.addCells([T],this.model.getParent(a),null,null,null,!0);var U=this.getCellGeometry(T);null!=U&&(null!=P&&"1"==urlParams.sketch&&(b==mxConstants.DIRECTION_NORTH?r.y-=U.height/2:b==mxConstants.DIRECTION_SOUTH?r.y+=U.height/2:r.x=b==mxConstants.DIRECTION_WEST?r.x-U.width/2:r.x+U.width/2),U.x=r.x-U.width/2,U.y=r.y-U.height/2);null!=C?(this.addCells([T],C,null,null,null,!0),F=null):N&&!u&&this.addCells([T],this.getDefaultParent(),null,null,null,!0)}var V=mxEvent.isControlDown(e)&&
+mxEvent.isShiftDown(e)&&N||null==F&&u?null:this.insertEdge(this.model.getParent(a),null,"",a,T,this.createCurrentEdgeStyle());if(null!=V&&this.connectionHandler.insertBeforeSource){var aa=null;for(P=a;null!=P.parent&&null!=P.geometry&&P.geometry.relative&&P.parent!=V.parent;)P=this.model.getParent(P);null!=P&&null!=P.parent&&P.parent==V.parent&&(aa=P.parent.getIndex(P),this.model.add(P.parent,V,aa))}null==F&&null!=T&&null!=a.parent&&u&&b==mxConstants.DIRECTION_WEST&&(aa=a.parent.getIndex(a),this.model.add(a.parent,
+T,aa));null!=V&&S.push(V);null==F&&null!=T&&S.push(T);null==T&&null!=V&&V.geometry.setTerminalPoint(r,!1);null!=V&&this.fireEvent(new mxEventObject("cellsInserted","cells",[V]))}finally{this.model.endUpdate()}}if(null!=n)n(S);else return S});if(null==k||null!=T||!N||null==F&&u)return g(T);k(m+r.x*f,B+r.y*f,g)};
+Graph.prototype.getIndexableText=function(a){a=null!=a?a:this.model.getDescendants(this.model.root);for(var b=document.createElement("div"),f=[],e,g=0;g<a.length;g++)if(e=a[g],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&&f.push(e);return f.join(" ")};
+Graph.prototype.convertValueToString=function(a){var b=this.model.getValue(a);if(null!=b&&"object"==typeof b){var f=null;if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){b=a.getAttribute("placeholder");for(var e=a;null==f&&null!=e;)null!=e.value&&"object"==typeof e.value&&(f=e.hasAttribute(b)?null!=e.getAttribute(b)?e.getAttribute(b):"":null),e=this.model.getParent(e)}else f=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(f=b.getAttribute("label_"+Graph.diagramLanguage)),
null==f&&(f=b.getAttribute("label")||"");return f||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(a){return null!=a&&null!=a.text&&null!=a.text.node?a.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(a){return null!=a.value&&"object"==typeof a.value?(a=a.value.getAttribute("link"),null!=a&&"javascript:"===a.toLowerCase().substring(0,11)&&(a=a.substring(11)),a):null};
Graph.prototype.getLinkTargetForCell=function(a){return null!=a.value&&"object"==typeof a.value?a.value.getAttribute("linkTarget"):null};Graph.prototype.postProcessCellStyle=function(a,b){return this.updateHorizontalStyle(a,this.replaceDefaultColors(a,mxGraph.prototype.postProcessCellStyle.apply(this,arguments)))};
Graph.prototype.updateHorizontalStyle=function(a,b){if(null!=a&&null!=b&&null!=this.layoutManager){var f=this.model.getParent(a);this.model.isVertex(f)&&this.isCellCollapsed(a)&&(a=this.layoutManager.getLayout(f),null!=a&&a.constructor==mxStackLayout&&(b[mxConstants.STYLE_HORIZONTAL]=!a.horizontal))}return b};
Graph.prototype.replaceDefaultColors=function(a,b){if(null!=b){a=mxUtils.hex2rgb(this.shapeBackgroundColor);var f=mxUtils.hex2rgb(this.shapeForegroundColor);this.replaceDefaultColor(b,mxConstants.STYLE_FONTCOLOR,f);this.replaceDefaultColor(b,mxConstants.STYLE_FILLCOLOR,a);this.replaceDefaultColor(b,mxConstants.STYLE_STROKECOLOR,f);this.replaceDefaultColor(b,mxConstants.STYLE_IMAGE_BORDER,f);this.replaceDefaultColor(b,mxConstants.STYLE_IMAGE_BACKGROUND,a);this.replaceDefaultColor(b,mxConstants.STYLE_LABEL_BORDERCOLOR,
f);this.replaceDefaultColor(b,mxConstants.STYLE_SWIMLANE_FILLCOLOR,a);this.replaceDefaultColor(b,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,a)}return b};Graph.prototype.replaceDefaultColor=function(a,b,f){null!=a&&"default"==a[b]&&null!=f&&(a[b]=f)};
-Graph.prototype.updateAlternateBounds=function(a,b,f){if(null!=a&&null!=b&&null!=this.layoutManager&&null!=b.alternateBounds){var d=this.layoutManager.getLayout(this.model.getParent(a));null!=d&&d.constructor==mxStackLayout&&(d.horizontal?b.alternateBounds.height=0:b.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(a,b){return mxEvent.isShiftDown(a)||"1"==mxUtils.getValue(b.style,"moveCells","0")};
-Graph.prototype.foldCells=function(a,b,f,d,g){b=null!=b?b:!1;null==f&&(f=this.getFoldableCells(this.getSelectionCells(),a));if(null!=f){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var e=0;e<f.length;e++){var k=this.view.getState(f[e]),n=this.getCellGeometry(f[e]);if(null!=k&&null!=n){var u=Math.round(n.width-k.width/this.view.scale),m=Math.round(n.height-k.height/this.view.scale);if(0!=m||0!=u){var r=this.model.getParent(f[e]),x=this.layoutManager.getLayout(r);
+Graph.prototype.updateAlternateBounds=function(a,b,f){if(null!=a&&null!=b&&null!=this.layoutManager&&null!=b.alternateBounds){var e=this.layoutManager.getLayout(this.model.getParent(a));null!=e&&e.constructor==mxStackLayout&&(e.horizontal?b.alternateBounds.height=0:b.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(a,b){return mxEvent.isShiftDown(a)||"1"==mxUtils.getValue(b.style,"moveCells","0")};
+Graph.prototype.foldCells=function(a,b,f,e,g){b=null!=b?b:!1;null==f&&(f=this.getFoldableCells(this.getSelectionCells(),a));if(null!=f){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var d=0;d<f.length;d++){var k=this.view.getState(f[d]),n=this.getCellGeometry(f[d]);if(null!=k&&null!=n){var u=Math.round(n.width-k.width/this.view.scale),m=Math.round(n.height-k.height/this.view.scale);if(0!=m||0!=u){var r=this.model.getParent(f[d]),x=this.layoutManager.getLayout(r);
null==x?null!=g&&this.isMoveCellsEvent(g,k)&&this.moveSiblings(k,r,u,m):null!=g&&mxEvent.isAltDown(g)||x.constructor!=mxStackLayout||x.resizeLast||this.resizeParentStacks(r,x,u,m)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(f)}};
-Graph.prototype.moveSiblings=function(a,b,f,d){this.model.beginUpdate();try{var g=this.getCellsBeyond(a.x,a.y,b,!0,!0);for(b=0;b<g.length;b++)if(g[b]!=a.cell){var e=this.view.getState(g[b]),k=this.getCellGeometry(g[b]);null!=e&&null!=k&&(k=k.clone(),k.translate(Math.round(f*Math.max(0,Math.min(1,(e.x-a.x)/a.width))),Math.round(d*Math.max(0,Math.min(1,(e.y-a.y)/a.height)))),this.model.setGeometry(g[b],k))}}finally{this.model.endUpdate()}};
-Graph.prototype.resizeParentStacks=function(a,b,f,d){if(null!=this.layoutManager&&null!=b&&b.constructor==mxStackLayout&&!b.resizeLast){this.model.beginUpdate();try{for(var g=b.horizontal;null!=a&&null!=b&&b.constructor==mxStackLayout&&b.horizontal==g&&!b.resizeLast;){var e=this.getCellGeometry(a),k=this.view.getState(a);null!=k&&null!=e&&(e=e.clone(),b.horizontal?e.width+=f+Math.min(0,k.width/this.view.scale-e.width):e.height+=d+Math.min(0,k.height/this.view.scale-e.height),this.model.setGeometry(a,
-e));a=this.model.getParent(a);b=this.layoutManager.getLayout(a)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(a){var b=this.getCurrentCellStyle(a);return this.isSwimlane(a)?"0"!=b.container:"1"==b.container};Graph.prototype.isCellConnectable=function(a){var b=this.getCurrentCellStyle(a);return null!=b.connectable?"0"!=b.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};
+Graph.prototype.moveSiblings=function(a,b,f,e){this.model.beginUpdate();try{var g=this.getCellsBeyond(a.x,a.y,b,!0,!0);for(b=0;b<g.length;b++)if(g[b]!=a.cell){var d=this.view.getState(g[b]),k=this.getCellGeometry(g[b]);null!=d&&null!=k&&(k=k.clone(),k.translate(Math.round(f*Math.max(0,Math.min(1,(d.x-a.x)/a.width))),Math.round(e*Math.max(0,Math.min(1,(d.y-a.y)/a.height)))),this.model.setGeometry(g[b],k))}}finally{this.model.endUpdate()}};
+Graph.prototype.resizeParentStacks=function(a,b,f,e){if(null!=this.layoutManager&&null!=b&&b.constructor==mxStackLayout&&!b.resizeLast){this.model.beginUpdate();try{for(var g=b.horizontal;null!=a&&null!=b&&b.constructor==mxStackLayout&&b.horizontal==g&&!b.resizeLast;){var d=this.getCellGeometry(a),k=this.view.getState(a);null!=k&&null!=d&&(d=d.clone(),b.horizontal?d.width+=f+Math.min(0,k.width/this.view.scale-d.width):d.height+=e+Math.min(0,k.height/this.view.scale-d.height),this.model.setGeometry(a,
+d));a=this.model.getParent(a);b=this.layoutManager.getLayout(a)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(a){var b=this.getCurrentCellStyle(a);return this.isSwimlane(a)?"0"!=b.container:"1"==b.container};Graph.prototype.isCellConnectable=function(a){var b=this.getCurrentCellStyle(a);return null!=b.connectable?"0"!=b.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};
Graph.prototype.isLabelMovable=function(a){var b=this.getCurrentCellStyle(a);return null!=b.movableLabel?"0"!=b.movableLabel:mxGraph.prototype.isLabelMovable.apply(this,arguments)};Graph.prototype.selectAll=function(a){a=a||this.getDefaultParent();this.isCellLocked(a)||mxGraph.prototype.selectAll.apply(this,arguments)};Graph.prototype.selectCells=function(a,b,f){f=f||this.getDefaultParent();this.isCellLocked(f)||mxGraph.prototype.selectCells.apply(this,arguments)};
-Graph.prototype.getSwimlaneAt=function(a,b,f){var d=mxGraph.prototype.getSwimlaneAt.apply(this,arguments);this.isCellLocked(d)&&(d=null);return d};Graph.prototype.isCellFoldable=function(a){var b=this.getCurrentCellStyle(a);return this.foldingEnabled&&"0"!=mxUtils.getValue(b,mxConstants.STYLE_RESIZABLE,"1")&&("1"==b.treeFolding||!this.isCellLocked(a)&&(this.isContainer(a)&&"0"!=b.collapsible||!this.isContainer(a)&&"1"==b.collapsible))};
+Graph.prototype.getSwimlaneAt=function(a,b,f){var e=mxGraph.prototype.getSwimlaneAt.apply(this,arguments);this.isCellLocked(e)&&(e=null);return e};Graph.prototype.isCellFoldable=function(a){var b=this.getCurrentCellStyle(a);return this.foldingEnabled&&"0"!=mxUtils.getValue(b,mxConstants.STYLE_RESIZABLE,"1")&&("1"==b.treeFolding||!this.isCellLocked(a)&&(this.isContainer(a)&&"0"!=b.collapsible||!this.isContainer(a)&&"1"==b.collapsible))};
Graph.prototype.reset=function(){this.isEditing()&&this.stopEditing(!0);this.escape();this.isSelectionEmpty()||this.clearSelection()};Graph.prototype.zoom=function(a,b){a=Math.max(.01,Math.min(this.view.scale*a,160))/this.view.scale;mxGraph.prototype.zoom.apply(this,arguments)};Graph.prototype.zoomIn=function(){.15>this.view.scale?this.zoom((this.view.scale+.01)/this.view.scale):this.zoom(Math.round(this.view.scale*this.zoomFactor*20)/20/this.view.scale)};
Graph.prototype.zoomOut=function(){.15>=this.view.scale?this.zoom((this.view.scale-.01)/this.view.scale):this.zoom(Math.round(1/this.zoomFactor*this.view.scale*20)/20/this.view.scale)};
-Graph.prototype.fitWindow=function(a,b){b=null!=b?b:10;var f=this.container.clientWidth-b,d=this.container.clientHeight-b,g=Math.floor(20*Math.min(f/a.width,d/a.height))/20;this.zoomTo(g);if(mxUtils.hasScrollbars(this.container)){var e=this.view.translate;this.container.scrollTop=(a.y+e.y)*g-Math.max((d-a.height*g)/2+b/2,0);this.container.scrollLeft=(a.x+e.x)*g-Math.max((f-a.width*g)/2+b/2,0)}};
-Graph.prototype.getTooltipForCell=function(a){var b="";if(mxUtils.isNode(a.value)){var f=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&(f=a.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==f&&(f=a.value.getAttribute("tooltip"));if(null!=f)null!=f&&this.isReplacePlaceholders(a)&&(f=this.replacePlaceholders(a,f)),b=this.sanitizeHtml(f);else{f=this.builtInProperties;a=a.value.attributes;var d=[];this.isEnabled()&&(f.push("linkTarget"),f.push("link"));for(var g=0;g<a.length;g++)0>
-mxUtils.indexOf(f,a[g].nodeName)&&0<a[g].nodeValue.length&&d.push({name:a[g].nodeName,value:a[g].nodeValue});d.sort(function(e,k){return e.name<k.name?-1:e.name>k.name?1:0});for(g=0;g<d.length;g++)"link"==d[g].name&&this.isCustomLink(d[g].value)||(b+=("link"!=d[g].name?"<b>"+mxUtils.htmlEntities(d[g].name)+":</b> ":"")+mxUtils.htmlEntities(d[g].value)+"\n");0<b.length&&(b=b.substring(0,b.length-1),mxClient.IS_SVG&&(b='<div style="max-width:360px;text-overflow:ellipsis;overflow:hidden;">'+b+"</div>"))}}return b};
+Graph.prototype.fitWindow=function(a,b){b=null!=b?b:10;var f=this.container.clientWidth-b,e=this.container.clientHeight-b,g=Math.floor(20*Math.min(f/a.width,e/a.height))/20;this.zoomTo(g);if(mxUtils.hasScrollbars(this.container)){var d=this.view.translate;this.container.scrollTop=(a.y+d.y)*g-Math.max((e-a.height*g)/2+b/2,0);this.container.scrollLeft=(a.x+d.x)*g-Math.max((f-a.width*g)/2+b/2,0)}};
+Graph.prototype.getTooltipForCell=function(a){var b="";if(mxUtils.isNode(a.value)){var f=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&(f=a.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==f&&(f=a.value.getAttribute("tooltip"));if(null!=f)null!=f&&this.isReplacePlaceholders(a)&&(f=this.replacePlaceholders(a,f)),b=this.sanitizeHtml(f);else{f=this.builtInProperties;a=a.value.attributes;var e=[];this.isEnabled()&&(f.push("linkTarget"),f.push("link"));for(var g=0;g<a.length;g++)0>
+mxUtils.indexOf(f,a[g].nodeName)&&0<a[g].nodeValue.length&&e.push({name:a[g].nodeName,value:a[g].nodeValue});e.sort(function(d,k){return d.name<k.name?-1:d.name>k.name?1:0});for(g=0;g<e.length;g++)"link"==e[g].name&&this.isCustomLink(e[g].value)||(b+=("link"!=e[g].name?"<b>"+mxUtils.htmlEntities(e[g].name)+":</b> ":"")+mxUtils.htmlEntities(e[g].value)+"\n");0<b.length&&(b=b.substring(0,b.length-1),mxClient.IS_SVG&&(b='<div style="max-width:360px;text-overflow:ellipsis;overflow:hidden;">'+b+"</div>"))}}return b};
Graph.prototype.getFlowAnimationStyle=function(){var a=document.getElementsByTagName("head")[0];if(null!=a&&null==this.flowAnimationStyle){this.flowAnimationStyle=document.createElement("style");this.flowAnimationStyle.setAttribute("id","geEditorFlowAnimation-"+Editor.guid());this.flowAnimationStyle.type="text/css";var b=this.flowAnimationStyle.getAttribute("id");this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(b);a.appendChild(this.flowAnimationStyle)}return this.flowAnimationStyle};
Graph.prototype.getFlowAnimationStyleCss=function(a){return"."+a+" {\nanimation: "+a+" 0.5s linear;\nanimation-iteration-count: infinite;\n}\n@keyframes "+a+" {\nto {\nstroke-dashoffset: "+-16*this.view.scale+";\n}\n}"};Graph.prototype.stringToBytes=function(a){return Graph.stringToBytes(a)};Graph.prototype.bytesToString=function(a){return Graph.bytesToString(a)};Graph.prototype.compressNode=function(a){return Graph.compressNode(a)};Graph.prototype.compress=function(a,b){return Graph.compress(a,b)};
Graph.prototype.decompress=function(a,b){return Graph.decompress(a,b)};Graph.prototype.zapGremlins=function(a){return Graph.zapGremlins(a)};HoverIcons=function(a){mxEventSource.call(this);this.graph=a;this.init()};mxUtils.extend(HoverIcons,mxEventSource);HoverIcons.prototype.arrowSpacing=2;HoverIcons.prototype.updateDelay=500;HoverIcons.prototype.activationDelay=140;HoverIcons.prototype.currentState=null;HoverIcons.prototype.activeArrow=null;HoverIcons.prototype.inactiveOpacity=15;
@@ -2988,212 +2991,212 @@ 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(f){null!=f.relatedTarget&&
mxEvent.getSource(f)==this.graph.container&&this.setDisplay("none")}));this.graph.addListener(mxEvent.START_EDITING,mxUtils.bind(this,function(f){this.reset()}));var a=this.graph.click;this.graph.click=mxUtils.bind(this,function(f){a.apply(this.graph,arguments);null==this.currentState||this.graph.isCellSelected(this.currentState.cell)||!mxEvent.isTouchEvent(f.getEvent())||this.graph.model.isVertex(f.getCell())||this.reset()});var b=!1;this.graph.addMouseListener({mouseDown:mxUtils.bind(this,function(f,
-d){b=!1;f=d.getEvent();this.isResetEvent(f)?this.reset():this.isActive()||(d=this.getState(d.getState()),null==d&&mxEvent.isTouchEvent(f)||this.update(d));this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(f,d){f=d.getEvent();this.isResetEvent(f)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(f)||this.update(this.getState(d.getState()),d.getGraphX(),d.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(b=!0)}),mouseUp:mxUtils.bind(this,
-function(f,d){f=d.getEvent();mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(f),mxEvent.getClientY(f));this.isResetEvent(f)?this.reset():this.isActive()&&!b&&null!=this.mouseDownPoint?this.click(this.currentState,this.getDirection(),d):this.isActive()?1==this.graph.getSelectionCount()&&this.graph.model.isEdge(this.graph.getSelectionCell())?this.reset():this.update(this.getState(this.graph.view.getState(this.graph.getCellAt(d.getGraphX(),d.getGraphY())))):mxEvent.isTouchEvent(f)||null!=
-this.bbox&&mxUtils.contains(this.bbox,d.getGraphX(),d.getGraphY())?(this.setDisplay(""),this.repaint()):mxEvent.isTouchEvent(f)||this.reset();b=!1;this.resetActiveArrow()})})};HoverIcons.prototype.isResetEvent=function(a,b){return mxEvent.isAltDown(a)||null==this.activeArrow&&mxEvent.isShiftDown(a)||mxEvent.isPopupTrigger(a)&&!this.graph.isCloneEvent(a)};
-HoverIcons.prototype.createArrow=function(a,b,f){var d=null;d=mxUtils.createImage(a.src);d.style.width=a.width+"px";d.style.height=a.height+"px";d.style.padding=this.tolerance+"px";null!=b&&d.setAttribute("title",b);d.style.position="absolute";d.style.cursor=this.cssCursor;mxEvent.addGestureListeners(d,mxUtils.bind(this,function(g){null==this.currentState||this.isResetEvent(g)||(this.mouseDownPoint=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(g),mxEvent.getClientY(g)),this.drag(g,
-this.mouseDownPoint.x,this.mouseDownPoint.y),this.activeArrow=d,this.setDisplay("none"),mxEvent.consume(g))}));mxEvent.redirectMouseEvents(d,this.graph,this.currentState);mxEvent.addListener(d,"mouseenter",mxUtils.bind(this,function(g){mxEvent.isMouseEvent(g)&&(null!=this.activeArrow&&this.activeArrow!=d&&mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.graph.connectionHandler.constraintHandler.reset(),mxUtils.setOpacity(d,100),this.activeArrow=d,this.fireEvent(new mxEventObject("focus",
-"arrow",d,"direction",f,"event",g)))}));mxEvent.addListener(d,"mouseleave",mxUtils.bind(this,function(g){mxEvent.isMouseEvent(g)&&this.fireEvent(new mxEventObject("blur","arrow",d,"direction",f,"event",g));this.graph.isMouseDown||this.resetActiveArrow()}));return d};HoverIcons.prototype.resetActiveArrow=function(){null!=this.activeArrow&&(mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.activeArrow=null)};
+e){b=!1;f=e.getEvent();this.isResetEvent(f)?this.reset():this.isActive()||(e=this.getState(e.getState()),null==e&&mxEvent.isTouchEvent(f)||this.update(e));this.setDisplay("none")}),mouseMove:mxUtils.bind(this,function(f,e){f=e.getEvent();this.isResetEvent(f)?this.reset():this.graph.isMouseDown||mxEvent.isTouchEvent(f)||this.update(this.getState(e.getState()),e.getGraphX(),e.getGraphY());null!=this.graph.connectionHandler&&null!=this.graph.connectionHandler.shape&&(b=!0)}),mouseUp:mxUtils.bind(this,
+function(f,e){f=e.getEvent();mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(f),mxEvent.getClientY(f));this.isResetEvent(f)?this.reset():this.isActive()&&!b&&null!=this.mouseDownPoint?this.click(this.currentState,this.getDirection(),e):this.isActive()?1==this.graph.getSelectionCount()&&this.graph.model.isEdge(this.graph.getSelectionCell())?this.reset():this.update(this.getState(this.graph.view.getState(this.graph.getCellAt(e.getGraphX(),e.getGraphY())))):mxEvent.isTouchEvent(f)||null!=
+this.bbox&&mxUtils.contains(this.bbox,e.getGraphX(),e.getGraphY())?(this.setDisplay(""),this.repaint()):mxEvent.isTouchEvent(f)||this.reset();b=!1;this.resetActiveArrow()})})};HoverIcons.prototype.isResetEvent=function(a,b){return mxEvent.isAltDown(a)||null==this.activeArrow&&mxEvent.isShiftDown(a)||mxEvent.isPopupTrigger(a)&&!this.graph.isCloneEvent(a)};
+HoverIcons.prototype.createArrow=function(a,b,f){var e=null;e=mxUtils.createImage(a.src);e.style.width=a.width+"px";e.style.height=a.height+"px";e.style.padding=this.tolerance+"px";null!=b&&e.setAttribute("title",b);e.style.position="absolute";e.style.cursor=this.cssCursor;mxEvent.addGestureListeners(e,mxUtils.bind(this,function(g){null==this.currentState||this.isResetEvent(g)||(this.mouseDownPoint=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(g),mxEvent.getClientY(g)),this.drag(g,
+this.mouseDownPoint.x,this.mouseDownPoint.y),this.activeArrow=e,this.setDisplay("none"),mxEvent.consume(g))}));mxEvent.redirectMouseEvents(e,this.graph,this.currentState);mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(g){mxEvent.isMouseEvent(g)&&(null!=this.activeArrow&&this.activeArrow!=e&&mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.graph.connectionHandler.constraintHandler.reset(),mxUtils.setOpacity(e,100),this.activeArrow=e,this.fireEvent(new mxEventObject("focus",
+"arrow",e,"direction",f,"event",g)))}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(g){mxEvent.isMouseEvent(g)&&this.fireEvent(new mxEventObject("blur","arrow",e,"direction",f,"event",g));this.graph.isMouseDown||this.resetActiveArrow()}));return e};HoverIcons.prototype.resetActiveArrow=function(){null!=this.activeArrow&&(mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.activeArrow=null)};
HoverIcons.prototype.getDirection=function(){var a=mxConstants.DIRECTION_EAST;this.activeArrow==this.arrowUp?a=mxConstants.DIRECTION_NORTH:this.activeArrow==this.arrowDown?a=mxConstants.DIRECTION_SOUTH:this.activeArrow==this.arrowLeft&&(a=mxConstants.DIRECTION_WEST);return a};HoverIcons.prototype.visitNodes=function(a){for(var b=0;b<this.elts.length;b++)null!=this.elts[b]&&a(this.elts[b])};HoverIcons.prototype.removeNodes=function(){this.visitNodes(function(a){null!=a.parentNode&&a.parentNode.removeChild(a)})};
HoverIcons.prototype.setDisplay=function(a){this.visitNodes(function(b){b.style.display=a})};HoverIcons.prototype.isActive=function(){return null!=this.activeArrow&&null!=this.currentState};
HoverIcons.prototype.drag=function(a,b,f){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);null!=this.currentState&&(this.graph.connectionHandler.start(this.currentState,b,f),this.graph.isMouseTrigger=mxEvent.isMouseEvent(a),this.graph.isMouseDown=!0,b=this.graph.selectionCellsHandler.getHandler(this.currentState.cell),null!=b&&b.setHandlesVisible(!1),b=this.graph.connectionHandler.edgeState,null!=a&&mxEvent.isShiftDown(a)&&mxEvent.isControlDown(a)&&null!=b&&"orthogonalEdgeStyle"===
mxUtils.getValue(b.style,mxConstants.STYLE_EDGE,null)&&(a=this.getDirection(),b.cell.style=mxUtils.setStyle(b.cell.style,"sourcePortConstraint",a),b.style.sourcePortConstraint=a))};HoverIcons.prototype.getStateAt=function(a,b,f){return this.graph.view.getState(this.graph.getCellAt(b,f))};
-HoverIcons.prototype.click=function(a,b,f){var d=f.getEvent(),g=f.getGraphX(),e=f.getGraphY();g=this.getStateAt(a,g,e);null==g||!this.graph.model.isEdge(g.cell)||this.graph.isCloneEvent(d)||g.getVisibleTerminalState(!0)!=a&&g.getVisibleTerminalState(!1)!=a?null!=a&&this.execute(a,b,f):(this.graph.setSelectionCell(g.cell),this.reset());f.consume()};
+HoverIcons.prototype.click=function(a,b,f){var e=f.getEvent(),g=f.getGraphX(),d=f.getGraphY();g=this.getStateAt(a,g,d);null==g||!this.graph.model.isEdge(g.cell)||this.graph.isCloneEvent(e)||g.getVisibleTerminalState(!0)!=a&&g.getVisibleTerminalState(!1)!=a?null!=a&&this.execute(a,b,f):(this.graph.setSelectionCell(g.cell),this.reset());f.consume()};
HoverIcons.prototype.execute=function(a,b,f){f=f.getEvent();this.graph.selectCellsForConnectVertex(this.graph.connectVertex(a.cell,b,this.graph.defaultEdgeLength,f,this.graph.isCloneEvent(f),this.graph.isCloneEvent(f)),f,this)};HoverIcons.prototype.reset=function(a){null!=a&&!a||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null;this.fireEvent(new mxEventObject("reset"))};
HoverIcons.prototype.repaint=function(){this.bbox=null;if(null!=this.currentState){this.currentState=this.getState(this.currentState);if(null!=this.currentState&&this.graph.model.isVertex(this.currentState.cell)&&this.graph.isCellConnectable(this.currentState.cell)){var a=mxRectangle.fromRectangle(this.currentState);null!=this.currentState.shape&&null!=this.currentState.shape.boundingBox&&(a=mxRectangle.fromRectangle(this.currentState.shape.boundingBox));a.grow(this.graph.tolerance);a.grow(this.arrowSpacing);
var b=this.graph.selectionCellsHandler.getHandler(this.currentState.cell);this.graph.isTableRow(this.currentState.cell)&&(b=this.graph.selectionCellsHandler.getHandler(this.graph.model.getParent(this.currentState.cell)));var f=null;null!=b&&(a.x-=b.horizontalOffset/2,a.y-=b.verticalOffset/2,a.width+=b.horizontalOffset,a.height+=b.verticalOffset,null!=b.rotationShape&&null!=b.rotationShape.node&&"hidden"!=b.rotationShape.node.style.visibility&&"none"!=b.rotationShape.node.style.display&&null!=b.rotationShape.boundingBox&&
(f=b.rotationShape.boundingBox));b=mxUtils.bind(this,function(n,u,m){if(null!=f){var r=new mxRectangle(u,m,n.clientWidth,n.clientHeight);mxUtils.intersects(r,f)&&(n==this.arrowUp?m-=r.y+r.height-f.y:n==this.arrowRight?u+=f.x+f.width-r.x:n==this.arrowDown?m+=f.y+f.height-r.y:n==this.arrowLeft&&(u-=r.x+r.width-f.x))}n.style.left=u+"px";n.style.top=m+"px";mxUtils.setOpacity(n,this.inactiveOpacity)});b(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(a.y-
this.triangleUp.height-this.tolerance));b(this.arrowRight,Math.round(a.x+a.width-this.tolerance),Math.round(this.currentState.getCenterY()-this.triangleRight.height/2-this.tolerance));b(this.arrowDown,parseInt(this.arrowUp.style.left),Math.round(a.y+a.height-this.tolerance));b(this.arrowLeft,Math.round(a.x-this.triangleLeft.width-this.tolerance),parseInt(this.arrowRight.style.top));if(this.checkCollisions){b=this.graph.getCellAt(a.x+a.width+this.triangleRight.width/2,this.currentState.getCenterY());
-var d=this.graph.getCellAt(a.x-this.triangleLeft.width/2,this.currentState.getCenterY()),g=this.graph.getCellAt(this.currentState.getCenterX(),a.y-this.triangleUp.height/2);a=this.graph.getCellAt(this.currentState.getCenterX(),a.y+a.height+this.triangleDown.height/2);null!=b&&b==d&&d==g&&g==a&&(a=g=d=b=null);var e=this.graph.getCellGeometry(this.currentState.cell),k=mxUtils.bind(this,function(n,u){var m=this.graph.model.isVertex(n)&&this.graph.getCellGeometry(n);null==n||this.graph.model.isAncestor(n,
-this.currentState.cell)||this.graph.isSwimlane(n)||!(null==m||null==e||m.height<3*e.height&&m.width<3*e.width)?u.style.visibility="visible":u.style.visibility="hidden"});k(b,this.arrowRight);k(d,this.arrowLeft);k(g,this.arrowUp);k(a,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),
+var e=this.graph.getCellAt(a.x-this.triangleLeft.width/2,this.currentState.getCenterY()),g=this.graph.getCellAt(this.currentState.getCenterX(),a.y-this.triangleUp.height/2);a=this.graph.getCellAt(this.currentState.getCenterX(),a.y+a.height+this.triangleDown.height/2);null!=b&&b==e&&e==g&&g==a&&(a=g=e=b=null);var d=this.graph.getCellGeometry(this.currentState.cell),k=mxUtils.bind(this,function(n,u){var m=this.graph.model.isVertex(n)&&this.graph.getCellGeometry(n);null==n||this.graph.model.isAncestor(n,
+this.currentState.cell)||this.graph.isSwimlane(n)||!(null==m||null==d||m.height<3*d.height&&m.width<3*d.width)?u.style.visibility="visible":u.style.visibility="hidden"});k(b,this.arrowRight);k(e,this.arrowLeft);k(g,this.arrowUp);k(a,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),
this.arrowRight.setAttribute("title",mxResources.get("plusTooltip")),this.arrowUp.setAttribute("title",mxResources.get("plusTooltip")),this.arrowDown.setAttribute("title",mxResources.get("plusTooltip"))):(this.arrowLeft.removeAttribute("title"),this.arrowRight.removeAttribute("title"),this.arrowUp.removeAttribute("title"),this.arrowDown.removeAttribute("title"))}else this.reset();null!=this.currentState&&(this.bbox=this.computeBoundingBox(),null!=this.bbox&&this.bbox.grow(10))}};
HoverIcons.prototype.computeBoundingBox=function(){var a=this.graph.model.isEdge(this.currentState.cell)?null:mxRectangle.fromRectangle(this.currentState);this.visitNodes(function(b){null!=b.parentNode&&(b=new mxRectangle(b.offsetLeft,b.offsetTop,b.offsetWidth,b.offsetHeight),null==a?a=b:a.add(b))});return a};
HoverIcons.prototype.getState=function(a){if(null!=a)if(a=a.cell,this.graph.getModel().contains(a)){if(this.graph.getModel().isVertex(a)&&!this.graph.isCellConnectable(a)){var b=this.graph.getModel().getParent(a);this.graph.getModel().isVertex(b)&&this.graph.isCellConnectable(b)&&(a=b)}if(this.graph.isCellLocked(a)||this.graph.model.isEdge(a))a=null;a=this.graph.view.getState(a);null!=a&&null==a.style&&(a=null)}else a=null;return a};
-HoverIcons.prototype.update=function(a,b,f){if(!this.graph.connectionArrowsEnabled||null!=a&&"0"==mxUtils.getValue(a.style,"allowArrows","1"))this.reset();else{null!=a&&null!=a.cell.geometry&&a.cell.geometry.relative&&this.graph.model.isEdge(a.cell.parent)&&(a=null);var d=null;this.prev!=a||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=a,d=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=a&&(this.updateThread=window.setTimeout(mxUtils.bind(this,function(){this.isActive()||
-this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=a,this.update(a,b,f))}),this.updateDelay+10))):null!=this.startTime&&(d=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=a&&d<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,b,f)?this.reset(!1):(null!=this.currentState||d>this.activationDelay)&&this.currentState!=a&&(d>this.updateDelay&&null!=a||null==this.bbox||null==b||null==f||!mxUtils.contains(this.bbox,
+HoverIcons.prototype.update=function(a,b,f){if(!this.graph.connectionArrowsEnabled||null!=a&&"0"==mxUtils.getValue(a.style,"allowArrows","1"))this.reset();else{null!=a&&null!=a.cell.geometry&&a.cell.geometry.relative&&this.graph.model.isEdge(a.cell.parent)&&(a=null);var e=null;this.prev!=a||this.isActive()?(this.startTime=(new Date).getTime(),this.prev=a,e=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=a&&(this.updateThread=window.setTimeout(mxUtils.bind(this,function(){this.isActive()||
+this.graph.isMouseDown||this.graph.panningHandler.isActive()||(this.prev=a,this.update(a,b,f))}),this.updateDelay+10))):null!=this.startTime&&(e=(new Date).getTime()-this.startTime);this.setDisplay("");null!=this.currentState&&this.currentState!=a&&e<this.activationDelay&&null!=this.bbox&&!mxUtils.contains(this.bbox,b,f)?this.reset(!1):(null!=this.currentState||e>this.activationDelay)&&this.currentState!=a&&(e>this.updateDelay&&null!=a||null==this.bbox||null==b||null==f||!mxUtils.contains(this.bbox,
b,f))&&(null!=a&&this.graph.isEnabled()?(this.removeNodes(),this.setCurrentState(a),this.repaint(),this.graph.connectionHandler.constraintHandler.currentFocus!=a&&this.graph.connectionHandler.constraintHandler.reset()):this.reset())}};
-HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=a};Graph.prototype.createParent=function(a,b,f,d,g){a=this.cloneCell(a);for(var e=0;e<f;e++){var k=this.cloneCell(b),n=this.getCellGeometry(k);null!=n&&(n.x+=e*d,n.y+=e*g);a.insert(k)}return a};
-Graph.prototype.createTable=function(a,b,f,d,g,e,k,n,u){f=null!=f?f:60;d=null!=d?d:40;e=null!=e?e:30;n=null!=n?n:"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";u=null!=u?u:"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,b*f,a*d+(null!=g?e:0),null!=k?k:"shape=table;startSize="+(null!=g?e:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,b*f,d,n),this.createVertex(null,null,"",0,0,f,d,u),b,f,0),a,0,d)};
-Graph.prototype.setTableValues=function(a,b,f){for(var d=this.model.getChildCells(a,!0),g=0;g<d.length;g++)if(null!=f&&(d[g].value=f[g]),null!=b)for(var e=this.model.getChildCells(d[g],!0),k=0;k<e.length;k++)null!=b[g][k]&&(e[k].value=b[g][k]);return a};
-Graph.prototype.createCrossFunctionalSwimlane=function(a,b,f,d,g,e,k,n,u){f=null!=f?f:120;d=null!=d?d:120;k=null!=k?k:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;collapsible=0;recursiveResize=0;expand=0;";n=null!=n?n:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;";
-u=null!=u?u:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;";g=this.createVertex(null,null,null!=g?g:"",0,0,b*f,a*d,null!=e?e:"shape=table;childLayout=tableLayout;"+(null==g?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");e=mxUtils.getValue(this.getCellStyle(g),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);g.geometry.width+=e;g.geometry.height+=e;k=this.createVertex(null,
-null,"",0,e,b*f+e,d,k);g.insert(this.createParent(k,this.createVertex(null,null,"",e,0,f,d,n),b,f,0));return 1<a?(k.geometry.y=d+e,this.createParent(g,this.createParent(k,this.createVertex(null,null,"",e,0,f,d,u),b,f,0),a-1,0,d)):g};
-Graph.prototype.visitTableCells=function(a,b){var f=null,d=this.model.getChildCells(a,!0);a=this.getActualStartSize(a,!0);for(var g=0;g<d.length;g++){for(var e=this.getActualStartSize(d[g],!0),k=this.model.getChildCells(d[g],!0),n=this.getCellStyle(d[g],!0),u=null,m=[],r=0;r<k.length;r++){var x=this.getCellGeometry(k[r]),B={cell:k[r],rospan:1,colspan:1,row:g,col:r,geo:x};x=null!=x.alternateBounds?x.alternateBounds:x;B.point=new mxPoint(x.width+(null!=u?u.point.x:a.x+e.x),x.height+(null!=f&&null!=
-f[0]?f[0].point.y:a.y+e.y));B.actual=B;null!=f&&null!=f[r]&&1<f[r].rowspan?(B.rowspan=f[r].rowspan-1,B.colspan=f[r].colspan,B.actual=f[r].actual):null!=u&&1<u.colspan?(B.rowspan=u.rowspan,B.colspan=u.colspan-1,B.actual=u.actual):(u=this.getCurrentCellStyle(k[r],!0),null!=u&&(B.rowspan=parseInt(u.rowspan||1),B.colspan=parseInt(u.colspan||1)));u=1==mxUtils.getValue(n,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(n,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;b(B,k.length,
-d.length,a.x+(u?e.x:0),a.y+(u?e.y:0));m.push(B);u=B}f=m}};Graph.prototype.getTableLines=function(a,b,f){var d=[],g=[];(b||f)&&this.visitTableCells(a,mxUtils.bind(this,function(e,k,n,u,m){b&&e.row<n-1&&(null==d[e.row]&&(d[e.row]=[new mxPoint(u,e.point.y)]),1<e.rowspan&&d[e.row].push(null),d[e.row].push(e.point));f&&e.col<k-1&&(null==g[e.col]&&(g[e.col]=[new mxPoint(e.point.x,m)]),1<e.colspan&&g[e.col].push(null),g[e.col].push(e.point))}));return d.concat(g)};
+HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=a};Graph.prototype.createParent=function(a,b,f,e,g){a=this.cloneCell(a);for(var d=0;d<f;d++){var k=this.cloneCell(b),n=this.getCellGeometry(k);null!=n&&(n.x+=d*e,n.y+=d*g);a.insert(k)}return a};
+Graph.prototype.createTable=function(a,b,f,e,g,d,k,n,u){f=null!=f?f:60;e=null!=e?e:40;d=null!=d?d:30;n=null!=n?n:"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;";u=null!=u?u:"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,b*f,a*e+(null!=g?d:0),null!=k?k:"shape=table;startSize="+(null!=g?d:"0")+";container=1;collapsible=0;childLayout=tableLayout;"),this.createParent(this.createVertex(null,null,"",0,0,b*f,e,n),this.createVertex(null,null,"",0,0,f,e,u),b,f,0),a,0,e)};
+Graph.prototype.setTableValues=function(a,b,f){for(var e=this.model.getChildCells(a,!0),g=0;g<e.length;g++)if(null!=f&&(e[g].value=f[g]),null!=b)for(var d=this.model.getChildCells(e[g],!0),k=0;k<d.length;k++)null!=b[g][k]&&(d[k].value=b[g][k]);return a};
+Graph.prototype.createCrossFunctionalSwimlane=function(a,b,f,e,g,d,k,n,u){f=null!=f?f:120;e=null!=e?e:120;k=null!=k?k:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;collapsible=0;recursiveResize=0;expand=0;";n=null!=n?n:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;";
+u=null!=u?u:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;";g=this.createVertex(null,null,null!=g?g:"",0,0,b*f,a*e,null!=d?d:"shape=table;childLayout=tableLayout;"+(null==g?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");d=mxUtils.getValue(this.getCellStyle(g),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);g.geometry.width+=d;g.geometry.height+=d;k=this.createVertex(null,
+null,"",0,d,b*f+d,e,k);g.insert(this.createParent(k,this.createVertex(null,null,"",d,0,f,e,n),b,f,0));return 1<a?(k.geometry.y=e+d,this.createParent(g,this.createParent(k,this.createVertex(null,null,"",d,0,f,e,u),b,f,0),a-1,0,e)):g};
+Graph.prototype.visitTableCells=function(a,b){var f=null,e=this.model.getChildCells(a,!0);a=this.getActualStartSize(a,!0);for(var g=0;g<e.length;g++){for(var d=this.getActualStartSize(e[g],!0),k=this.model.getChildCells(e[g],!0),n=this.getCellStyle(e[g],!0),u=null,m=[],r=0;r<k.length;r++){var x=this.getCellGeometry(k[r]),B={cell:k[r],rospan:1,colspan:1,row:g,col:r,geo:x};x=null!=x.alternateBounds?x.alternateBounds:x;B.point=new mxPoint(x.width+(null!=u?u.point.x:a.x+d.x),x.height+(null!=f&&null!=
+f[0]?f[0].point.y:a.y+d.y));B.actual=B;null!=f&&null!=f[r]&&1<f[r].rowspan?(B.rowspan=f[r].rowspan-1,B.colspan=f[r].colspan,B.actual=f[r].actual):null!=u&&1<u.colspan?(B.rowspan=u.rowspan,B.colspan=u.colspan-1,B.actual=u.actual):(u=this.getCurrentCellStyle(k[r],!0),null!=u&&(B.rowspan=parseInt(u.rowspan||1),B.colspan=parseInt(u.colspan||1)));u=1==mxUtils.getValue(n,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(n,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;b(B,k.length,
+e.length,a.x+(u?d.x:0),a.y+(u?d.y:0));m.push(B);u=B}f=m}};Graph.prototype.getTableLines=function(a,b,f){var e=[],g=[];(b||f)&&this.visitTableCells(a,mxUtils.bind(this,function(d,k,n,u,m){b&&d.row<n-1&&(null==e[d.row]&&(e[d.row]=[new mxPoint(u,d.point.y)]),1<d.rowspan&&e[d.row].push(null),e[d.row].push(d.point));f&&d.col<k-1&&(null==g[d.col]&&(g[d.col]=[new mxPoint(d.point.x,m)]),1<d.colspan&&g[d.col].push(null),g[d.col].push(d.point))}));return e.concat(g)};
Graph.prototype.isTableCell=function(a){return this.model.isVertex(a)&&this.isTableRow(this.model.getParent(a))};Graph.prototype.isTableRow=function(a){return this.model.isVertex(a)&&this.isTable(this.model.getParent(a))};Graph.prototype.isTable=function(a){a=this.getCellStyle(a);return null!=a&&"tableLayout"==a.childLayout};Graph.prototype.isStack=function(a){a=this.getCellStyle(a);return null!=a&&"stackLayout"==a.childLayout};
Graph.prototype.isStackChild=function(a){return this.model.isVertex(a)&&this.isStack(this.model.getParent(a))};
-Graph.prototype.setTableRowHeight=function(a,b,f){f=null!=f?f:!0;var d=this.getModel();d.beginUpdate();try{var g=this.getCellGeometry(a);if(null!=g){g=g.clone();g.height+=b;d.setGeometry(a,g);var e=d.getParent(a),k=d.getChildCells(e,!0);if(!f){var n=mxUtils.indexOf(k,a);if(n<k.length-1){var u=k[n+1],m=this.getCellGeometry(u);null!=m&&(m=m.clone(),m.y+=b,m.height-=b,d.setGeometry(u,m))}}var r=this.getCellGeometry(e);null!=r&&(f||(f=a==k[k.length-1]),f&&(r=r.clone(),r.height+=b,d.setGeometry(e,r)))}}finally{d.endUpdate()}};
-Graph.prototype.setTableColumnWidth=function(a,b,f){f=null!=f?f:!1;var d=this.getModel(),g=d.getParent(a),e=d.getParent(g),k=d.getChildCells(g,!0);a=mxUtils.indexOf(k,a);var n=a==k.length-1;d.beginUpdate();try{for(var u=d.getChildCells(e,!0),m=0;m<u.length;m++){g=u[m];k=d.getChildCells(g,!0);var r=k[a],x=this.getCellGeometry(r);null!=x&&(x=x.clone(),x.width+=b,null!=x.alternateBounds&&(x.alternateBounds.width+=b),d.setGeometry(r,x));a<k.length-1&&(r=k[a+1],x=this.getCellGeometry(r),null!=x&&(x=x.clone(),
-x.x+=b,f||(x.width-=b,null!=x.alternateBounds&&(x.alternateBounds.width-=b)),d.setGeometry(r,x)))}if(n||f){var B=this.getCellGeometry(e);null!=B&&(B=B.clone(),B.width+=b,d.setGeometry(e,B))}null!=this.layoutManager&&this.layoutManager.executeLayout(e)}finally{d.endUpdate()}};function TableLayout(a){mxGraphLayout.call(this,a)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
-TableLayout.prototype.isVertexIgnored=function(a){return!this.graph.getModel().isVertex(a)||!this.graph.isCellVisible(a)};TableLayout.prototype.getSize=function(a,b){for(var f=0,d=0;d<a.length;d++)if(!this.isVertexIgnored(a[d])){var g=this.graph.getCellGeometry(a[d]);null!=g&&(f+=b?g.width:g.height)}return f};
-TableLayout.prototype.getRowLayout=function(a,b){var f=this.graph.model.getChildCells(a,!0),d=this.graph.getActualStartSize(a,!0);a=this.getSize(f,!0);b=b-d.x-d.width;var g=[];d=d.x;for(var e=0;e<f.length;e++){var k=this.graph.getCellGeometry(f[e]);null!=k&&(d+=(null!=k.alternateBounds?k.alternateBounds.width:k.width)*b/a,g.push(Math.round(d)))}return g};
-TableLayout.prototype.layoutRow=function(a,b,f,d){var g=this.graph.getModel(),e=g.getChildCells(a,!0);a=this.graph.getActualStartSize(a,!0);var k=a.x,n=0;null!=b&&(b=b.slice(),b.splice(0,0,a.x));for(var u=0;u<e.length;u++){var m=this.graph.getCellGeometry(e[u]);null!=m&&(m=m.clone(),m.y=a.y,m.height=f-a.y-a.height,null!=b?(m.x=b[u],m.width=b[u+1]-m.x,u==e.length-1&&u<b.length-2&&(m.width=d-m.x-a.x-a.width)):(m.x=k,k+=m.width,u==e.length-1?m.width=d-a.x-a.width-n:n+=m.width),m.alternateBounds=new mxRectangle(0,
-0,m.width,m.height),g.setGeometry(e[u],m))}return n};
-TableLayout.prototype.execute=function(a){if(null!=a){var b=this.graph.getActualStartSize(a,!0),f=this.graph.getCellGeometry(a),d=this.graph.getCellStyle(a),g="1"==mxUtils.getValue(d,"resizeLastRow","0"),e="1"==mxUtils.getValue(d,"resizeLast","0");d="1"==mxUtils.getValue(d,"fixedRows","0");var k=this.graph.getModel(),n=0;k.beginUpdate();try{for(var u=f.height-b.y-b.height,m=f.width-b.x-b.width,r=k.getChildCells(a,!0),x=0;x<r.length;x++)k.setVisible(r[x],!0);var B=this.getSize(r,!1);if(0<u&&0<m&&0<
-r.length&&0<B){if(g){var C=this.graph.getCellGeometry(r[r.length-1]);null!=C&&(C=C.clone(),C.height=u-B+C.height,k.setGeometry(r[r.length-1],C))}var G=e?null:this.getRowLayout(r[0],m),J=[],D=b.y;for(x=0;x<r.length;x++)C=this.graph.getCellGeometry(r[x]),null!=C&&(C=C.clone(),C.x=b.x,C.width=m,C.y=Math.round(D),D=g||d?D+C.height:D+C.height/B*u,C.height=Math.round(D)-C.y,k.setGeometry(r[x],C)),n=Math.max(n,this.layoutRow(r[x],G,C.height,m,J));d&&u<B&&(f=f.clone(),f.height=D+b.height,k.setGeometry(a,
-f));e&&m<n+Graph.minTableColumnWidth&&(f=f.clone(),f.width=n+b.width+b.x+Graph.minTableColumnWidth,k.setGeometry(a,f));this.graph.visitTableCells(a,mxUtils.bind(this,function(N){k.setVisible(N.cell,N.actual.cell==N.cell);if(N.actual.cell!=N.cell){if(N.actual.row==N.row){var Q=null!=N.geo.alternateBounds?N.geo.alternateBounds:N.geo;N.actual.geo.width+=Q.width}N.actual.col==N.col&&(Q=null!=N.geo.alternateBounds?N.geo.alternateBounds:N.geo,N.actual.geo.height+=Q.height)}}))}else for(x=0;x<r.length;x++)k.setVisible(r[x],
+Graph.prototype.setTableRowHeight=function(a,b,f){f=null!=f?f:!0;var e=this.getModel();e.beginUpdate();try{var g=this.getCellGeometry(a);if(null!=g){g=g.clone();g.height+=b;e.setGeometry(a,g);var d=e.getParent(a),k=e.getChildCells(d,!0);if(!f){var n=mxUtils.indexOf(k,a);if(n<k.length-1){var u=k[n+1],m=this.getCellGeometry(u);null!=m&&(m=m.clone(),m.y+=b,m.height-=b,e.setGeometry(u,m))}}var r=this.getCellGeometry(d);null!=r&&(f||(f=a==k[k.length-1]),f&&(r=r.clone(),r.height+=b,e.setGeometry(d,r)))}}finally{e.endUpdate()}};
+Graph.prototype.setTableColumnWidth=function(a,b,f){f=null!=f?f:!1;var e=this.getModel(),g=e.getParent(a),d=e.getParent(g),k=e.getChildCells(g,!0);a=mxUtils.indexOf(k,a);var n=a==k.length-1;e.beginUpdate();try{for(var u=e.getChildCells(d,!0),m=0;m<u.length;m++){g=u[m];k=e.getChildCells(g,!0);var r=k[a],x=this.getCellGeometry(r);null!=x&&(x=x.clone(),x.width+=b,null!=x.alternateBounds&&(x.alternateBounds.width+=b),e.setGeometry(r,x));a<k.length-1&&(r=k[a+1],x=this.getCellGeometry(r),null!=x&&(x=x.clone(),
+x.x+=b,f||(x.width-=b,null!=x.alternateBounds&&(x.alternateBounds.width-=b)),e.setGeometry(r,x)))}if(n||f){var B=this.getCellGeometry(d);null!=B&&(B=B.clone(),B.width+=b,e.setGeometry(d,B))}null!=this.layoutManager&&this.layoutManager.executeLayout(d)}finally{e.endUpdate()}};function TableLayout(a){mxGraphLayout.call(this,a)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
+TableLayout.prototype.isVertexIgnored=function(a){return!this.graph.getModel().isVertex(a)||!this.graph.isCellVisible(a)};TableLayout.prototype.getSize=function(a,b){for(var f=0,e=0;e<a.length;e++)if(!this.isVertexIgnored(a[e])){var g=this.graph.getCellGeometry(a[e]);null!=g&&(f+=b?g.width:g.height)}return f};
+TableLayout.prototype.getRowLayout=function(a,b){var f=this.graph.model.getChildCells(a,!0),e=this.graph.getActualStartSize(a,!0);a=this.getSize(f,!0);b=b-e.x-e.width;var g=[];e=e.x;for(var d=0;d<f.length;d++){var k=this.graph.getCellGeometry(f[d]);null!=k&&(e+=(null!=k.alternateBounds?k.alternateBounds.width:k.width)*b/a,g.push(Math.round(e)))}return g};
+TableLayout.prototype.layoutRow=function(a,b,f,e){var g=this.graph.getModel(),d=g.getChildCells(a,!0);a=this.graph.getActualStartSize(a,!0);var k=a.x,n=0;null!=b&&(b=b.slice(),b.splice(0,0,a.x));for(var u=0;u<d.length;u++){var m=this.graph.getCellGeometry(d[u]);null!=m&&(m=m.clone(),m.y=a.y,m.height=f-a.y-a.height,null!=b?(m.x=b[u],m.width=b[u+1]-m.x,u==d.length-1&&u<b.length-2&&(m.width=e-m.x-a.x-a.width)):(m.x=k,k+=m.width,u==d.length-1?m.width=e-a.x-a.width-n:n+=m.width),m.alternateBounds=new mxRectangle(0,
+0,m.width,m.height),g.setGeometry(d[u],m))}return n};
+TableLayout.prototype.execute=function(a){if(null!=a){var b=this.graph.getActualStartSize(a,!0),f=this.graph.getCellGeometry(a),e=this.graph.getCellStyle(a),g="1"==mxUtils.getValue(e,"resizeLastRow","0"),d="1"==mxUtils.getValue(e,"resizeLast","0");e="1"==mxUtils.getValue(e,"fixedRows","0");var k=this.graph.getModel(),n=0;k.beginUpdate();try{for(var u=f.height-b.y-b.height,m=f.width-b.x-b.width,r=k.getChildCells(a,!0),x=0;x<r.length;x++)k.setVisible(r[x],!0);var B=this.getSize(r,!1);if(0<u&&0<m&&0<
+r.length&&0<B){if(g){var C=this.graph.getCellGeometry(r[r.length-1]);null!=C&&(C=C.clone(),C.height=u-B+C.height,k.setGeometry(r[r.length-1],C))}var F=d?null:this.getRowLayout(r[0],m),J=[],D=b.y;for(x=0;x<r.length;x++)C=this.graph.getCellGeometry(r[x]),null!=C&&(C=C.clone(),C.x=b.x,C.width=m,C.y=Math.round(D),D=g||e?D+C.height:D+C.height/B*u,C.height=Math.round(D)-C.y,k.setGeometry(r[x],C)),n=Math.max(n,this.layoutRow(r[x],F,C.height,m,J));e&&u<B&&(f=f.clone(),f.height=D+b.height,k.setGeometry(a,
+f));d&&m<n+Graph.minTableColumnWidth&&(f=f.clone(),f.width=n+b.width+b.x+Graph.minTableColumnWidth,k.setGeometry(a,f));this.graph.visitTableCells(a,mxUtils.bind(this,function(N){k.setVisible(N.cell,N.actual.cell==N.cell);if(N.actual.cell!=N.cell){if(N.actual.row==N.row){var S=null!=N.geo.alternateBounds?N.geo.alternateBounds:N.geo;N.actual.geo.width+=S.width}N.actual.col==N.col&&(S=null!=N.geo.alternateBounds?N.geo.alternateBounds:N.geo,N.actual.geo.height+=S.height)}}))}else for(x=0;x<r.length;x++)k.setVisible(r[x],
!1)}finally{k.endUpdate()}}};
(function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var b=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(r,x){x=null!=x?x:!0;var B=this.getState(r);null!=B&&x&&this.graph.model.isEdge(B.cell)&&null!=B.style&&1!=B.style[mxConstants.STYLE_CURVED]&&!B.invalid&&this.updateLineJumps(B)&&this.graph.cellRenderer.redraw(B,!1,this.isRendering());B=b.apply(this,
arguments);null!=B&&x&&this.graph.model.isEdge(B.cell)&&null!=B.style&&1!=B.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(B);return B};var f=mxShape.prototype.paint;mxShape.prototype.paint=function(){f.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 r=this.node.getElementsByTagName("path");if(1<r.length){"1"!=mxUtils.getValue(this.state.style,
-mxConstants.STYLE_DASHED,"0")&&r[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var x=this.state.view.graph.getFlowAnimationStyle();null!=x&&r[1].setAttribute("class",x.getAttribute("id"))}}};var d=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(r,x){return d.apply(this,arguments)||null!=r.routedPoints&&null!=x.routedPoints&&!mxUtils.equalPoints(x.routedPoints,r.routedPoints)};var g=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
-function(r){g.apply(this,arguments);this.graph.model.isEdge(r.cell)&&1!=r.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(r)};mxGraphView.prototype.updateLineJumps=function(r){var x=r.absolutePoints;if(Graph.lineJumpsEnabled){var B=null!=r.routedPoints,C=null;if(null!=x&&null!=this.validEdges&&"none"!==mxUtils.getValue(r.style,"jumpStyle","none")){var G=function(ba,qa,O){var S=new mxPoint(qa,O);S.type=ba;C.push(S);S=null!=r.routedPoints?r.routedPoints[C.length-1]:null;return null==S||S.type!=
-ba||S.x!=qa||S.y!=O},J=.5*this.scale;B=!1;C=[];for(var D=0;D<x.length-1;D++){for(var N=x[D+1],Q=x[D],R=[],P=x[D+2];D<x.length-2&&mxUtils.ptSegDistSq(Q.x,Q.y,P.x,P.y,N.x,N.y)<1*this.scale*this.scale;)N=P,D++,P=x[D+2];B=G(0,Q.x,Q.y)||B;for(var Z=0;Z<this.validEdges.length;Z++){var U=this.validEdges[Z],V=U.absolutePoints;if(null!=V&&mxUtils.intersects(r,U)&&"1"!=U.style.noJump)for(U=0;U<V.length-1;U++){var ia=V[U+1],ha=V[U];for(P=V[U+2];U<V.length-2&&mxUtils.ptSegDistSq(ha.x,ha.y,P.x,P.y,ia.x,ia.y)<
-1*this.scale*this.scale;)ia=P,U++,P=V[U+2];P=mxUtils.intersection(Q.x,Q.y,N.x,N.y,ha.x,ha.y,ia.x,ia.y);if(null!=P&&(Math.abs(P.x-Q.x)>J||Math.abs(P.y-Q.y)>J)&&(Math.abs(P.x-N.x)>J||Math.abs(P.y-N.y)>J)&&(Math.abs(P.x-ha.x)>J||Math.abs(P.y-ha.y)>J)&&(Math.abs(P.x-ia.x)>J||Math.abs(P.y-ia.y)>J)){ia=P.x-Q.x;ha=P.y-Q.y;P={distSq:ia*ia+ha*ha,x:P.x,y:P.y};for(ia=0;ia<R.length;ia++)if(R[ia].distSq>P.distSq){R.splice(ia,0,P);P=null;break}null==P||0!=R.length&&R[R.length-1].x===P.x&&R[R.length-1].y===P.y||
-R.push(P)}}}for(U=0;U<R.length;U++)B=G(1,R[U].x,R[U].y)||B}P=x[x.length-1];B=G(0,P.x,P.y)||B}r.routedPoints=C;return B}return!1};var e=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(r,x,B){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)e.apply(this,arguments);else{var C=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
-2,G=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,J=mxUtils.getValue(this.style,"jumpStyle","none"),D=!0,N=null,Q=null,R=[],P=null;r.begin();for(var Z=0;Z<this.state.routedPoints.length;Z++){var U=this.state.routedPoints[Z],V=new mxPoint(U.x/this.scale,U.y/this.scale);0==Z?V=x[0]:Z==this.state.routedPoints.length-1&&(V=x[x.length-1]);var ia=!1;if(null!=N&&1==U.type){var ha=this.state.routedPoints[Z+1];U=ha.x/this.scale-V.x;ha=ha.y/this.scale-V.y;U=
-U*U+ha*ha;null==P&&(P=new mxPoint(V.x-N.x,V.y-N.y),Q=Math.sqrt(P.x*P.x+P.y*P.y),0<Q?(P.x=P.x*G/Q,P.y=P.y*G/Q):P=null);U>G*G&&0<Q&&(U=N.x-V.x,ha=N.y-V.y,U=U*U+ha*ha,U>G*G&&(ia=new mxPoint(V.x-P.x,V.y-P.y),U=new mxPoint(V.x+P.x,V.y+P.y),R.push(ia),this.addPoints(r,R,B,C,!1,null,D),R=0>Math.round(P.x)||0==Math.round(P.x)&&0>=Math.round(P.y)?1:-1,D=!1,"sharp"==J?(r.lineTo(ia.x-P.y*R,ia.y+P.x*R),r.lineTo(U.x-P.y*R,U.y+P.x*R),r.lineTo(U.x,U.y)):"line"==J?(r.moveTo(ia.x+P.y*R,ia.y-P.x*R),r.lineTo(ia.x-P.y*
-R,ia.y+P.x*R),r.moveTo(U.x-P.y*R,U.y+P.x*R),r.lineTo(U.x+P.y*R,U.y-P.x*R),r.moveTo(U.x,U.y)):"arc"==J?(R*=1.3,r.curveTo(ia.x-P.y*R,ia.y+P.x*R,U.x-P.y*R,U.y+P.x*R,U.x,U.y)):(r.moveTo(U.x,U.y),D=!0),R=[U],ia=!0))}else P=null;ia||(R.push(V),N=V)}this.addPoints(r,R,B,C,!1,null,D);r.stroke()}};var k=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(r,x,B,C){return null!=x&&"centerPerimeter"==x.style[mxConstants.STYLE_PERIMETER]?new mxPoint(x.getCenterX(),
-x.getCenterY()):k.apply(this,arguments)};var n=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(r,x,B,C){if(null==x||null==r||"1"!=x.style.snapToPoint&&"1"!=r.style.snapToPoint)n.apply(this,arguments);else{x=this.getTerminalPort(r,x,C);var G=this.getNextPoint(r,B,C),J=this.graph.isOrthogonal(r),D=mxUtils.toRadians(Number(x.style[mxConstants.STYLE_ROTATION]||"0")),N=new mxPoint(x.getCenterX(),x.getCenterY());if(0!=D){var Q=Math.cos(-D),R=
-Math.sin(-D);G=mxUtils.getRotatedPoint(G,Q,R,N)}Q=parseFloat(r.style[mxConstants.STYLE_PERIMETER_SPACING]||0);Q+=parseFloat(r.style[C?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);G=this.getPerimeterPoint(x,G,0==D&&J,Q);0!=D&&(Q=Math.cos(D),R=Math.sin(D),G=mxUtils.getRotatedPoint(G,Q,R,N));r.setAbsoluteTerminalPoint(this.snapToAnchorPoint(r,x,B,C,G),C)}};mxGraphView.prototype.snapToAnchorPoint=function(r,x,B,C,G){if(null!=x&&null!=r){r=this.graph.getAllConnectionConstraints(x);
-C=B=null;if(null!=r)for(var J=0;J<r.length;J++){var D=this.graph.getConnectionPoint(x,r[J]);if(null!=D){var N=(D.x-G.x)*(D.x-G.x)+(D.y-G.y)*(D.y-G.y);if(null==C||N<C)B=D,C=N}}null!=B&&(G=B)}return G};var u=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(r,x,B){var C=u.apply(this,arguments);"1"==r.getAttribute("placeholders")&&null!=B.state&&(C=B.state.view.graph.replacePlaceholders(B.state.cell,C));return C};var m=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=
-function(r){if(null!=r.style&&"undefined"!==typeof pako){var x=mxUtils.getValue(r.style,mxConstants.STYLE_SHAPE,null);if(null!=x&&"string"===typeof x&&"stencil("==x.substring(0,8))try{var B=x.substring(8,x.length-1),C=mxUtils.parseXml(Graph.decompress(B));return new mxShape(new mxStencil(C.documentElement))}catch(G){null!=window.console&&console.log("Error in shape: "+G)}}return m.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;
+mxConstants.STYLE_DASHED,"0")&&r[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var x=this.state.view.graph.getFlowAnimationStyle();null!=x&&r[1].setAttribute("class",x.getAttribute("id"))}}};var e=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(r,x){return e.apply(this,arguments)||null!=r.routedPoints&&null!=x.routedPoints&&!mxUtils.equalPoints(x.routedPoints,r.routedPoints)};var g=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
+function(r){g.apply(this,arguments);this.graph.model.isEdge(r.cell)&&1!=r.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(r)};mxGraphView.prototype.updateLineJumps=function(r){var x=r.absolutePoints;if(Graph.lineJumpsEnabled){var B=null!=r.routedPoints,C=null;if(null!=x&&null!=this.validEdges&&"none"!==mxUtils.getValue(r.style,"jumpStyle","none")){var F=function(ea,qa,O){var R=new mxPoint(qa,O);R.type=ea;C.push(R);R=null!=r.routedPoints?r.routedPoints[C.length-1]:null;return null==R||R.type!=
+ea||R.x!=qa||R.y!=O},J=.5*this.scale;B=!1;C=[];for(var D=0;D<x.length-1;D++){for(var N=x[D+1],S=x[D],T=[],P=x[D+2];D<x.length-2&&mxUtils.ptSegDistSq(S.x,S.y,P.x,P.y,N.x,N.y)<1*this.scale*this.scale;)N=P,D++,P=x[D+2];B=F(0,S.x,S.y)||B;for(var Z=0;Z<this.validEdges.length;Z++){var U=this.validEdges[Z],V=U.absolutePoints;if(null!=V&&mxUtils.intersects(r,U)&&"1"!=U.style.noJump)for(U=0;U<V.length-1;U++){var aa=V[U+1],ia=V[U];for(P=V[U+2];U<V.length-2&&mxUtils.ptSegDistSq(ia.x,ia.y,P.x,P.y,aa.x,aa.y)<
+1*this.scale*this.scale;)aa=P,U++,P=V[U+2];P=mxUtils.intersection(S.x,S.y,N.x,N.y,ia.x,ia.y,aa.x,aa.y);if(null!=P&&(Math.abs(P.x-S.x)>J||Math.abs(P.y-S.y)>J)&&(Math.abs(P.x-N.x)>J||Math.abs(P.y-N.y)>J)&&(Math.abs(P.x-ia.x)>J||Math.abs(P.y-ia.y)>J)&&(Math.abs(P.x-aa.x)>J||Math.abs(P.y-aa.y)>J)){aa=P.x-S.x;ia=P.y-S.y;P={distSq:aa*aa+ia*ia,x:P.x,y:P.y};for(aa=0;aa<T.length;aa++)if(T[aa].distSq>P.distSq){T.splice(aa,0,P);P=null;break}null==P||0!=T.length&&T[T.length-1].x===P.x&&T[T.length-1].y===P.y||
+T.push(P)}}}for(U=0;U<T.length;U++)B=F(1,T[U].x,T[U].y)||B}P=x[x.length-1];B=F(0,P.x,P.y)||B}r.routedPoints=C;return B}return!1};var d=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(r,x,B){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)d.apply(this,arguments);else{var C=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
+2,F=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,J=mxUtils.getValue(this.style,"jumpStyle","none"),D=!0,N=null,S=null,T=[],P=null;r.begin();for(var Z=0;Z<this.state.routedPoints.length;Z++){var U=this.state.routedPoints[Z],V=new mxPoint(U.x/this.scale,U.y/this.scale);0==Z?V=x[0]:Z==this.state.routedPoints.length-1&&(V=x[x.length-1]);var aa=!1;if(null!=N&&1==U.type){var ia=this.state.routedPoints[Z+1];U=ia.x/this.scale-V.x;ia=ia.y/this.scale-V.y;U=
+U*U+ia*ia;null==P&&(P=new mxPoint(V.x-N.x,V.y-N.y),S=Math.sqrt(P.x*P.x+P.y*P.y),0<S?(P.x=P.x*F/S,P.y=P.y*F/S):P=null);U>F*F&&0<S&&(U=N.x-V.x,ia=N.y-V.y,U=U*U+ia*ia,U>F*F&&(aa=new mxPoint(V.x-P.x,V.y-P.y),U=new mxPoint(V.x+P.x,V.y+P.y),T.push(aa),this.addPoints(r,T,B,C,!1,null,D),T=0>Math.round(P.x)||0==Math.round(P.x)&&0>=Math.round(P.y)?1:-1,D=!1,"sharp"==J?(r.lineTo(aa.x-P.y*T,aa.y+P.x*T),r.lineTo(U.x-P.y*T,U.y+P.x*T),r.lineTo(U.x,U.y)):"line"==J?(r.moveTo(aa.x+P.y*T,aa.y-P.x*T),r.lineTo(aa.x-P.y*
+T,aa.y+P.x*T),r.moveTo(U.x-P.y*T,U.y+P.x*T),r.lineTo(U.x+P.y*T,U.y-P.x*T),r.moveTo(U.x,U.y)):"arc"==J?(T*=1.3,r.curveTo(aa.x-P.y*T,aa.y+P.x*T,U.x-P.y*T,U.y+P.x*T,U.x,U.y)):(r.moveTo(U.x,U.y),D=!0),T=[U],aa=!0))}else P=null;aa||(T.push(V),N=V)}this.addPoints(r,T,B,C,!1,null,D);r.stroke()}};var k=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(r,x,B,C){return null!=x&&"centerPerimeter"==x.style[mxConstants.STYLE_PERIMETER]?new mxPoint(x.getCenterX(),
+x.getCenterY()):k.apply(this,arguments)};var n=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(r,x,B,C){if(null==x||null==r||"1"!=x.style.snapToPoint&&"1"!=r.style.snapToPoint)n.apply(this,arguments);else{x=this.getTerminalPort(r,x,C);var F=this.getNextPoint(r,B,C),J=this.graph.isOrthogonal(r),D=mxUtils.toRadians(Number(x.style[mxConstants.STYLE_ROTATION]||"0")),N=new mxPoint(x.getCenterX(),x.getCenterY());if(0!=D){var S=Math.cos(-D),T=
+Math.sin(-D);F=mxUtils.getRotatedPoint(F,S,T,N)}S=parseFloat(r.style[mxConstants.STYLE_PERIMETER_SPACING]||0);S+=parseFloat(r.style[C?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);F=this.getPerimeterPoint(x,F,0==D&&J,S);0!=D&&(S=Math.cos(D),T=Math.sin(D),F=mxUtils.getRotatedPoint(F,S,T,N));r.setAbsoluteTerminalPoint(this.snapToAnchorPoint(r,x,B,C,F),C)}};mxGraphView.prototype.snapToAnchorPoint=function(r,x,B,C,F){if(null!=x&&null!=r){r=this.graph.getAllConnectionConstraints(x);
+C=B=null;if(null!=r)for(var J=0;J<r.length;J++){var D=this.graph.getConnectionPoint(x,r[J]);if(null!=D){var N=(D.x-F.x)*(D.x-F.x)+(D.y-F.y)*(D.y-F.y);if(null==C||N<C)B=D,C=N}}null!=B&&(F=B)}return F};var u=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(r,x,B){var C=u.apply(this,arguments);"1"==r.getAttribute("placeholders")&&null!=B.state&&(C=B.state.view.graph.replacePlaceholders(B.state.cell,C));return C};var m=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=
+function(r){if(null!=r.style&&"undefined"!==typeof pako){var x=mxUtils.getValue(r.style,mxConstants.STYLE_SHAPE,null);if(null!=x&&"string"===typeof x&&"stencil("==x.substring(0,8))try{var B=x.substring(8,x.length-1),C=mxUtils.parseXml(Graph.decompress(B));return new mxShape(new mxStencil(C.documentElement))}catch(F){null!=window.console&&console.log("Error in shape: "+F)}}return m.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;
mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];mxStencilRegistry.filesLoaded={};
-mxStencilRegistry.getStencil=function(a){var b=mxStencilRegistry.stencils[a];if(null==b&&null==mxCellRenderer.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var f=mxStencilRegistry.getBasenameForStencil(a);if(null!=f){b=mxStencilRegistry.libraries[f];if(null!=b){if(null==mxStencilRegistry.packages[f]){for(var d=0;d<b.length;d++){var g=b[d];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 e=mxUtils.load(g);null!=e&&200<=e.getStatus()&&299>=e.getStatus()&&eval.call(window,e.getText())}}catch(k){null!=window.console&&console.log("error in getStencil:",a,f,b,g,k)}}mxStencilRegistry.packages[f]=1}}else f=f.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+f+".xml",null);b=mxStencilRegistry.stencils[a]}}return b};
+mxStencilRegistry.getStencil=function(a){var b=mxStencilRegistry.stencils[a];if(null==b&&null==mxCellRenderer.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var f=mxStencilRegistry.getBasenameForStencil(a);if(null!=f){b=mxStencilRegistry.libraries[f];if(null!=b){if(null==mxStencilRegistry.packages[f]){for(var e=0;e<b.length;e++){var g=b[e];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 d=mxUtils.load(g);null!=d&&200<=d.getStatus()&&299>=d.getStatus()&&eval.call(window,d.getText())}}catch(k){null!=window.console&&console.log("error in getStencil:",a,f,b,g,k)}}mxStencilRegistry.packages[f]=1}}else f=f.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+f+".xml",null);b=mxStencilRegistry.stencils[a]}}return b};
mxStencilRegistry.getBasenameForStencil=function(a){var b=null;if(null!=a&&"string"===typeof a&&(a=a.split("."),0<a.length&&"mxgraph"==a[0])){b=a[1];for(var f=2;f<a.length-1;f++)b+="/"+a[f]}return b};
-mxStencilRegistry.loadStencilSet=function(a,b,f,d){var g=mxStencilRegistry.packages[a];if(null!=f&&f||null==g){var e=!1;if(null==g)try{if(d){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(k){null!=k&&null!=k.documentElement&&(mxStencilRegistry.packages[a]=k,e=!0,mxStencilRegistry.parseStencilSet(k.documentElement,b,e))}));return}g=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=g;e=!0}catch(k){null!=window.console&&console.log("error in loadStencilSet:",a,k)}null!=g&&null!=
-g.documentElement&&mxStencilRegistry.parseStencilSet(g.documentElement,b,e)}};mxStencilRegistry.loadStencil=function(a,b){if(null!=b)mxUtils.get(a,mxUtils.bind(this,function(f){b(200<=f.getStatus()&&299>=f.getStatus()?f.getXml():null)}));else return mxUtils.load(a).getXml()};mxStencilRegistry.parseStencilSets=function(a){for(var b=0;b<a.length;b++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(a[b]).documentElement)};
-mxStencilRegistry.parseStencilSet=function(a,b,f){if("stencils"==a.nodeName)for(var d=a.firstChild;null!=d;)"shapes"==d.nodeName&&mxStencilRegistry.parseStencilSet(d,b,f),d=d.nextSibling;else{f=null!=f?f:!0;d=a.firstChild;var g="";a=a.getAttribute("name");for(null!=a&&(g=a+".");null!=d;){if(d.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=d.getAttribute("name"),null!=a)){g=g.toLowerCase();var e=a.replace(/ /g,"_");f&&mxStencilRegistry.addStencil(g+e.toLowerCase(),new mxStencil(d));if(null!=b){var k=d.getAttribute("w"),
-n=d.getAttribute("h");k=null==k?80:parseInt(k,10);n=null==n?80:parseInt(n,10);b(g,e,a,k,n)}}d=d.nextSibling}}};
+mxStencilRegistry.loadStencilSet=function(a,b,f,e){var g=mxStencilRegistry.packages[a];if(null!=f&&f||null==g){var d=!1;if(null==g)try{if(e){mxStencilRegistry.loadStencil(a,mxUtils.bind(this,function(k){null!=k&&null!=k.documentElement&&(mxStencilRegistry.packages[a]=k,d=!0,mxStencilRegistry.parseStencilSet(k.documentElement,b,d))}));return}g=mxStencilRegistry.loadStencil(a);mxStencilRegistry.packages[a]=g;d=!0}catch(k){null!=window.console&&console.log("error in loadStencilSet:",a,k)}null!=g&&null!=
+g.documentElement&&mxStencilRegistry.parseStencilSet(g.documentElement,b,d)}};mxStencilRegistry.loadStencil=function(a,b){if(null!=b)mxUtils.get(a,mxUtils.bind(this,function(f){b(200<=f.getStatus()&&299>=f.getStatus()?f.getXml():null)}));else return mxUtils.load(a).getXml()};mxStencilRegistry.parseStencilSets=function(a){for(var b=0;b<a.length;b++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(a[b]).documentElement)};
+mxStencilRegistry.parseStencilSet=function(a,b,f){if("stencils"==a.nodeName)for(var e=a.firstChild;null!=e;)"shapes"==e.nodeName&&mxStencilRegistry.parseStencilSet(e,b,f),e=e.nextSibling;else{f=null!=f?f:!0;e=a.firstChild;var g="";a=a.getAttribute("name");for(null!=a&&(g=a+".");null!=e;){if(e.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=e.getAttribute("name"),null!=a)){g=g.toLowerCase();var d=a.replace(/ /g,"_");f&&mxStencilRegistry.addStencil(g+d.toLowerCase(),new mxStencil(e));if(null!=b){var k=e.getAttribute("w"),
+n=e.getAttribute("h");k=null==k?80:parseInt(k,10);n=null==n?80:parseInt(n,10);b(g,d,a,k,n)}}e=e.nextSibling}}};
"undefined"!==typeof mxVertexHandler&&function(){function a(){var t=document.createElement("div");t.className="geHint";t.style.whiteSpace="nowrap";t.style.position="absolute";return t}function b(t,z){switch(z){case mxConstants.POINTS:return t;case mxConstants.MILLIMETERS:return(t/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(t/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(t/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(t){return!mxEvent.isAltDown(t)};var f=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(t){return f.apply(this,arguments)||this.graph.isTableRow(t)||this.graph.isTableCell(t)};var d=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=function(t){return d.apply(this,arguments)||
+!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents=!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(t){return!mxEvent.isAltDown(t)};var f=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(t){return f.apply(this,arguments)||this.graph.isTableRow(t)||this.graph.isTableCell(t)};var e=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=function(t){return e.apply(this,arguments)||
this.graph.isEdgeIgnored(t)};var g=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(t){return this.graph.isCloneEvent(t)!=g.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var t=new mxEllipse(null,this.highlightColor,this.highlightColor,0);t.opacity=mxConstants.HIGHLIGHT_OPACITY;return t};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor="crosshair";mxConnectionHandler.prototype.createEdgeState=
-function(t){t=this.graph.createCurrentEdgeStyle();t=this.graph.createEdge(null,null,null,null,null,t);t=new mxCellState(this.graph.view,t,this.graph.getCellStyle(t));for(var z in this.graph.currentEdgeStyle)t.style[z]=this.graph.currentEdgeStyle[z];t.style=this.graph.postProcessCellStyle(t.cell,t.style);return t};var e=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var t=e.apply(this,arguments);t.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];
+function(t){t=this.graph.createCurrentEdgeStyle();t=this.graph.createEdge(null,null,null,null,null,t);t=new mxCellState(this.graph.view,t,this.graph.getCellStyle(t));for(var z in this.graph.currentEdgeStyle)t.style[z]=this.graph.currentEdgeStyle[z];t.style=this.graph.postProcessCellStyle(t.cell,t.style);return t};var d=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var t=d.apply(this,arguments);t.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];
return t};mxConnectionHandler.prototype.updatePreview=function(t){};var k=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var t=k.apply(this,arguments),z=t.getCell;t.getCell=mxUtils.bind(this,function(A){var E=z.apply(this,arguments);this.error=null;return E});return t};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=
function(){for(var t="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",z="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),A=0;A<z.length;A++)null!=this.currentEdgeStyle[z[A]]&&(t+=z[A]+"="+this.currentEdgeStyle[z[A]]+";");null!=this.currentEdgeStyle.orthogonalLoop?t+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&
(t+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?t+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(t+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(t+="elbow="+this.currentEdgeStyle.elbow+";");return t=null!=this.currentEdgeStyle.html?t+("html="+this.currentEdgeStyle.html+";"):t+"html=1;"};
Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var t=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=t&&(new mxCodec(t.ownerDocument)).decode(t,this.getStylesheet())};Graph.prototype.createCellLookup=function(t,z){z=null!=z?z:{};for(var A=0;A<t.length;A++){var E=t[A];z[mxObjectIdentity.get(E)]=E.getId();for(var H=this.model.getChildCount(E),
-K=0;K<H;K++)this.createCellLookup([this.model.getChildAt(E,K)],z)}return z};Graph.prototype.createCellMapping=function(t,z,A){A=null!=A?A:{};for(var E in t){var H=z[E];null==A[H]&&(A[H]=t[E].getId()||"")}return A};Graph.prototype.importGraphModel=function(t,z,A,E){z=null!=z?z:0;A=null!=A?A:0;var H=new mxCodec(t.ownerDocument),K=new mxGraphModel;H.decode(t,K);t=[];H={};var X={},ja=K.getChildren(this.cloneCell(K.root,this.isCloneInvalidEdges(),H));if(null!=ja){var ea=this.createCellLookup([K.root]);
-ja=ja.slice();this.model.beginUpdate();try{if(1!=ja.length||this.isCellLocked(this.getDefaultParent()))for(K=0;K<ja.length;K++)ka=this.model.getChildren(this.moveCells([ja[K]],z,A,!1,this.model.getRoot())[0]),null!=ka&&(t=t.concat(ka));else{var ka=K.getChildren(ja[0]);null!=ka&&(t=this.moveCells(ka,z,A,!1,this.getDefaultParent()),X[K.getChildAt(K.root,0).getId()]=this.getDefaultParent().getId())}if(null!=t&&(this.createCellMapping(H,ea,X),this.updateCustomLinks(X,t),E)){this.isGridEnabled()&&(z=this.snap(z),
-A=this.snap(A));var ta=this.getBoundingBoxFromGeometry(t,!0);null!=ta&&this.moveCells(t,z-ta.x,A-ta.y)}}finally{this.model.endUpdate()}}return t};Graph.prototype.encodeCells=function(t){for(var z={},A=this.cloneCells(t,null,z),E=new mxDictionary,H=0;H<t.length;H++)E.put(t[H],!0);var K=new mxCodec,X=new mxGraphModel,ja=X.getChildAt(X.getRoot(),0);for(H=0;H<A.length;H++){X.add(ja,A[H]);var ea=this.view.getState(t[H]);if(null!=ea){var ka=this.getCellGeometry(A[H]);null!=ka&&ka.relative&&!this.model.isEdge(t[H])&&
-null==E.get(this.model.getParent(t[H]))&&(ka.offset=null,ka.relative=!1,ka.x=ea.x/ea.view.scale-ea.view.translate.x,ka.y=ea.y/ea.view.scale-ea.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(z,this.createCellLookup(t)),A);return K.encode(X)};Graph.prototype.isSwimlane=function(t,z){var A=null;null==t||this.model.isEdge(t)||this.model.getParent(t)==this.model.getRoot()||(A=this.getCurrentCellStyle(t,z)[mxConstants.STYLE_SHAPE]);return A==mxConstants.SHAPE_SWIMLANE||"table"==A||"tableRow"==
-A};var n=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(t){var z=this.model.getParent(t);if(null!=z){var A=this.getCurrentCellStyle(z);if(null!=A.expand)return"0"!=A.expand}return n.apply(this,arguments)&&(null==z||!this.isTable(z))};var u=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(t,z,A,E,H,K,X,ja){null==ja&&(ja=this.model.getParent(t),this.isTable(ja)||this.isTableRow(ja))&&(ja=this.getCellAt(K,X,null,!0,!1));A=null;this.model.beginUpdate();try{A=u.apply(this,
-[t,z,A,E,H,K,X,ja]);this.model.setValue(A,"");var ea=this.getChildCells(A,!0);for(z=0;z<ea.length;z++){var ka=this.getCellGeometry(ea[z]);null!=ka&&ka.relative&&0<ka.x&&this.model.remove(ea[z])}var ta=this.getChildCells(t,!0);for(z=0;z<ta.length;z++)ka=this.getCellGeometry(ta[z]),null!=ka&&ka.relative&&0>=ka.x&&this.model.remove(ta[z]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[A]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[A]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
+L=0;L<H;L++)this.createCellLookup([this.model.getChildAt(E,L)],z)}return z};Graph.prototype.createCellMapping=function(t,z,A){A=null!=A?A:{};for(var E in t){var H=z[E];null==A[H]&&(A[H]=t[E].getId()||"")}return A};Graph.prototype.importGraphModel=function(t,z,A,E){z=null!=z?z:0;A=null!=A?A:0;var H=new mxCodec(t.ownerDocument),L=new mxGraphModel;H.decode(t,L);t=[];H={};var W={},ha=L.getChildren(this.cloneCell(L.root,this.isCloneInvalidEdges(),H));if(null!=ha){var fa=this.createCellLookup([L.root]);
+ha=ha.slice();this.model.beginUpdate();try{if(1!=ha.length||this.isCellLocked(this.getDefaultParent()))for(L=0;L<ha.length;L++)ja=this.model.getChildren(this.moveCells([ha[L]],z,A,!1,this.model.getRoot())[0]),null!=ja&&(t=t.concat(ja));else{var ja=L.getChildren(ha[0]);null!=ja&&(t=this.moveCells(ja,z,A,!1,this.getDefaultParent()),W[L.getChildAt(L.root,0).getId()]=this.getDefaultParent().getId())}if(null!=t&&(this.createCellMapping(H,fa,W),this.updateCustomLinks(W,t),E)){this.isGridEnabled()&&(z=this.snap(z),
+A=this.snap(A));var ua=this.getBoundingBoxFromGeometry(t,!0);null!=ua&&this.moveCells(t,z-ua.x,A-ua.y)}}finally{this.model.endUpdate()}}return t};Graph.prototype.encodeCells=function(t){for(var z={},A=this.cloneCells(t,null,z),E=new mxDictionary,H=0;H<t.length;H++)E.put(t[H],!0);var L=new mxCodec,W=new mxGraphModel,ha=W.getChildAt(W.getRoot(),0);for(H=0;H<A.length;H++){W.add(ha,A[H]);var fa=this.view.getState(t[H]);if(null!=fa){var ja=this.getCellGeometry(A[H]);null!=ja&&ja.relative&&!this.model.isEdge(t[H])&&
+null==E.get(this.model.getParent(t[H]))&&(ja.offset=null,ja.relative=!1,ja.x=fa.x/fa.view.scale-fa.view.translate.x,ja.y=fa.y/fa.view.scale-fa.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(z,this.createCellLookup(t)),A);return L.encode(W)};Graph.prototype.isSwimlane=function(t,z){var A=null;null==t||this.model.isEdge(t)||this.model.getParent(t)==this.model.getRoot()||(A=this.getCurrentCellStyle(t,z)[mxConstants.STYLE_SHAPE]);return A==mxConstants.SHAPE_SWIMLANE||"table"==A||"tableRow"==
+A};var n=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(t){var z=this.model.getParent(t);if(null!=z){var A=this.getCurrentCellStyle(z);if(null!=A.expand)return"0"!=A.expand}return n.apply(this,arguments)&&(null==z||!this.isTable(z))};var u=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(t,z,A,E,H,L,W,ha){null==ha&&(ha=this.model.getParent(t),this.isTable(ha)||this.isTableRow(ha))&&(ha=this.getCellAt(L,W,null,!0,!1));A=null;this.model.beginUpdate();try{A=u.apply(this,
+[t,z,A,E,H,L,W,ha]);this.model.setValue(A,"");var fa=this.getChildCells(A,!0);for(z=0;z<fa.length;z++){var ja=this.getCellGeometry(fa[z]);null!=ja&&ja.relative&&0<ja.x&&this.model.remove(fa[z])}var ua=this.getChildCells(t,!0);for(z=0;z<ua.length;z++)ja=this.getCellGeometry(ua[z]),null!=ja&&ja.relative&&0>=ja.x&&this.model.remove(ua[z]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[A]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[A]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
null,[t]);this.setCellStyles(mxConstants.STYLE_STARTARROW,mxConstants.NONE,[t]);var Aa=this.model.getTerminal(A,!1);if(null!=Aa){var Ea=this.getCurrentCellStyle(Aa);null!=Ea&&"1"==Ea.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[t]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[t]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[A]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[A]))}}finally{this.model.endUpdate()}return A};var m=Graph.prototype.selectCell;Graph.prototype.selectCell=
-function(t,z,A){if(z||A)m.apply(this,arguments);else{var E=this.getSelectionCell(),H=null,K=[],X=mxUtils.bind(this,function(ja){if(null!=this.view.getState(ja)&&(this.model.isVertex(ja)||this.model.isEdge(ja)))if(K.push(ja),ja==E)H=K.length-1;else if(t&&null==E&&0<K.length||null!=H&&t&&K.length>H||!t&&0<H)return;for(var ea=0;ea<this.model.getChildCount(ja);ea++)X(this.model.getChildAt(ja,ea))});X(this.model.root);0<K.length&&(H=null!=H?mxUtils.mod(H+(t?1:-1),K.length):0,this.setSelectionCell(K[H]))}};
-Graph.prototype.swapShapes=function(t,z,A,E,H,K,X){z=!1;if(!E&&null!=H&&1==t.length&&(E=this.view.getState(H),A=this.view.getState(t[0]),null!=E&&null!=A&&(null!=K&&mxEvent.isShiftDown(K)||"umlLifeline"==E.style.shape&&"umlLifeline"==A.style.shape)&&(E=this.getCellGeometry(H),K=this.getCellGeometry(t[0]),null!=E&&null!=K))){z=E.clone();E=K.clone();E.x=z.x;E.y=z.y;z.x=K.x;z.y=K.y;this.model.beginUpdate();try{this.model.setGeometry(H,z),this.model.setGeometry(t[0],E)}finally{this.model.endUpdate()}z=
-!0}return z};var r=Graph.prototype.moveCells;Graph.prototype.moveCells=function(t,z,A,E,H,K,X){if(this.swapShapes(t,z,A,E,H,K,X))return t;X=null!=X?X:{};if(this.isTable(H)){for(var ja=[],ea=0;ea<t.length;ea++)this.isTable(t[ea])?ja=ja.concat(this.model.getChildCells(t[ea],!0).reverse()):ja.push(t[ea]);t=ja}this.model.beginUpdate();try{ja=[];for(ea=0;ea<t.length;ea++)if(null!=H&&this.isTableRow(t[ea])){var ka=this.model.getParent(t[ea]),ta=this.getCellGeometry(t[ea]);this.isTable(ka)&&ja.push(ka);
-if(null!=ka&&null!=ta&&this.isTable(ka)&&this.isTable(H)&&(E||ka!=H)){if(!E){var Aa=this.getCellGeometry(ka);null!=Aa&&(Aa=Aa.clone(),Aa.height-=ta.height,this.model.setGeometry(ka,Aa))}Aa=this.getCellGeometry(H);null!=Aa&&(Aa=Aa.clone(),Aa.height+=ta.height,this.model.setGeometry(H,Aa));var Ea=this.model.getChildCells(H,!0);if(0<Ea.length){t[ea]=E?this.cloneCell(t[ea]):t[ea];var Ma=this.model.getChildCells(t[ea],!0),La=this.model.getChildCells(Ea[0],!0),Ia=La.length-Ma.length;if(0<Ia)for(var Fa=
-0;Fa<Ia;Fa++){var Ga=this.cloneCell(Ma[Ma.length-1]);null!=Ga&&(Ga.value="",this.model.add(t[ea],Ga))}else if(0>Ia)for(Fa=0;Fa>Ia;Fa--)this.model.remove(Ma[Ma.length+Fa-1]);Ma=this.model.getChildCells(t[ea],!0);for(Fa=0;Fa<La.length;Fa++){var Oa=this.getCellGeometry(La[Fa]),Pa=this.getCellGeometry(Ma[Fa]);null!=Oa&&null!=Pa&&(Pa=Pa.clone(),Pa.width=Oa.width,this.model.setGeometry(Ma[Fa],Pa))}}}}var Na=r.apply(this,arguments);for(ea=0;ea<ja.length;ea++)!E&&this.model.contains(ja[ea])&&0==this.model.getChildCount(ja[ea])&&
-this.model.remove(ja[ea]);E&&this.updateCustomLinks(this.createCellMapping(X,this.createCellLookup(t)),Na)}finally{this.model.endUpdate()}return Na};var x=Graph.prototype.removeCells;Graph.prototype.removeCells=function(t,z){var A=[];this.model.beginUpdate();try{for(var E=0;E<t.length;E++)if(this.isTableCell(t[E])){var H=this.model.getParent(t[E]),K=this.model.getParent(H);1==this.model.getChildCount(H)&&1==this.model.getChildCount(K)?0>mxUtils.indexOf(t,K)&&0>mxUtils.indexOf(A,K)&&A.push(K):this.labelChanged(t[E],
-"")}else{if(this.isTableRow(t[E])&&(K=this.model.getParent(t[E]),0>mxUtils.indexOf(t,K)&&0>mxUtils.indexOf(A,K))){for(var X=this.model.getChildCells(K,!0),ja=0,ea=0;ea<X.length;ea++)0<=mxUtils.indexOf(t,X[ea])&&ja++;ja==X.length&&A.push(K)}A.push(t[E])}A=x.apply(this,[A,z])}finally{this.model.endUpdate()}return A};Graph.prototype.updateCustomLinks=function(t,z,A){A=null!=A?A:new Graph;for(var E=0;E<z.length;E++)null!=z[E]&&A.updateCustomLinksForCell(t,z[E],A)};Graph.prototype.updateCustomLinksForCell=
+function(t,z,A){if(z||A)m.apply(this,arguments);else{var E=this.getSelectionCell(),H=null,L=[],W=mxUtils.bind(this,function(ha){if(null!=this.view.getState(ha)&&(this.model.isVertex(ha)||this.model.isEdge(ha)))if(L.push(ha),ha==E)H=L.length-1;else if(t&&null==E&&0<L.length||null!=H&&t&&L.length>H||!t&&0<H)return;for(var fa=0;fa<this.model.getChildCount(ha);fa++)W(this.model.getChildAt(ha,fa))});W(this.model.root);0<L.length&&(H=null!=H?mxUtils.mod(H+(t?1:-1),L.length):0,this.setSelectionCell(L[H]))}};
+Graph.prototype.swapShapes=function(t,z,A,E,H,L,W){z=!1;if(!E&&null!=H&&1==t.length&&(E=this.view.getState(H),A=this.view.getState(t[0]),null!=E&&null!=A&&(null!=L&&mxEvent.isShiftDown(L)||"umlLifeline"==E.style.shape&&"umlLifeline"==A.style.shape)&&(E=this.getCellGeometry(H),L=this.getCellGeometry(t[0]),null!=E&&null!=L))){z=E.clone();E=L.clone();E.x=z.x;E.y=z.y;z.x=L.x;z.y=L.y;this.model.beginUpdate();try{this.model.setGeometry(H,z),this.model.setGeometry(t[0],E)}finally{this.model.endUpdate()}z=
+!0}return z};var r=Graph.prototype.moveCells;Graph.prototype.moveCells=function(t,z,A,E,H,L,W){if(this.swapShapes(t,z,A,E,H,L,W))return t;W=null!=W?W:{};if(this.isTable(H)){for(var ha=[],fa=0;fa<t.length;fa++)this.isTable(t[fa])?ha=ha.concat(this.model.getChildCells(t[fa],!0).reverse()):ha.push(t[fa]);t=ha}this.model.beginUpdate();try{ha=[];for(fa=0;fa<t.length;fa++)if(null!=H&&this.isTableRow(t[fa])){var ja=this.model.getParent(t[fa]),ua=this.getCellGeometry(t[fa]);this.isTable(ja)&&ha.push(ja);
+if(null!=ja&&null!=ua&&this.isTable(ja)&&this.isTable(H)&&(E||ja!=H)){if(!E){var Aa=this.getCellGeometry(ja);null!=Aa&&(Aa=Aa.clone(),Aa.height-=ua.height,this.model.setGeometry(ja,Aa))}Aa=this.getCellGeometry(H);null!=Aa&&(Aa=Aa.clone(),Aa.height+=ua.height,this.model.setGeometry(H,Aa));var Ea=this.model.getChildCells(H,!0);if(0<Ea.length){t[fa]=E?this.cloneCell(t[fa]):t[fa];var Ma=this.model.getChildCells(t[fa],!0),La=this.model.getChildCells(Ea[0],!0),Ia=La.length-Ma.length;if(0<Ia)for(var Fa=
+0;Fa<Ia;Fa++){var Ga=this.cloneCell(Ma[Ma.length-1]);null!=Ga&&(Ga.value="",this.model.add(t[fa],Ga))}else if(0>Ia)for(Fa=0;Fa>Ia;Fa--)this.model.remove(Ma[Ma.length+Fa-1]);Ma=this.model.getChildCells(t[fa],!0);for(Fa=0;Fa<La.length;Fa++){var Oa=this.getCellGeometry(La[Fa]),Pa=this.getCellGeometry(Ma[Fa]);null!=Oa&&null!=Pa&&(Pa=Pa.clone(),Pa.width=Oa.width,this.model.setGeometry(Ma[Fa],Pa))}}}}var Na=r.apply(this,arguments);for(fa=0;fa<ha.length;fa++)!E&&this.model.contains(ha[fa])&&0==this.model.getChildCount(ha[fa])&&
+this.model.remove(ha[fa]);E&&this.updateCustomLinks(this.createCellMapping(W,this.createCellLookup(t)),Na)}finally{this.model.endUpdate()}return Na};var x=Graph.prototype.removeCells;Graph.prototype.removeCells=function(t,z){var A=[];this.model.beginUpdate();try{for(var E=0;E<t.length;E++)if(this.isTableCell(t[E])){var H=this.model.getParent(t[E]),L=this.model.getParent(H);1==this.model.getChildCount(H)&&1==this.model.getChildCount(L)?0>mxUtils.indexOf(t,L)&&0>mxUtils.indexOf(A,L)&&A.push(L):this.labelChanged(t[E],
+"")}else{if(this.isTableRow(t[E])&&(L=this.model.getParent(t[E]),0>mxUtils.indexOf(t,L)&&0>mxUtils.indexOf(A,L))){for(var W=this.model.getChildCells(L,!0),ha=0,fa=0;fa<W.length;fa++)0<=mxUtils.indexOf(t,W[fa])&&ha++;ha==W.length&&A.push(L)}A.push(t[E])}A=x.apply(this,[A,z])}finally{this.model.endUpdate()}return A};Graph.prototype.updateCustomLinks=function(t,z,A){A=null!=A?A:new Graph;for(var E=0;E<z.length;E++)null!=z[E]&&A.updateCustomLinksForCell(t,z[E],A)};Graph.prototype.updateCustomLinksForCell=
function(t,z){this.doUpdateCustomLinksForCell(t,z);for(var A=this.model.getChildCount(z),E=0;E<A;E++)this.updateCustomLinksForCell(t,this.model.getChildAt(z,E))};Graph.prototype.doUpdateCustomLinksForCell=function(t,z){};Graph.prototype.getAllConnectionConstraints=function(t,z){if(null!=t){z=mxUtils.getValue(t.style,"points",null);if(null!=z){t=[];try{var A=JSON.parse(z);for(z=0;z<A.length;z++){var E=A[z];t.push(new mxConnectionConstraint(new mxPoint(E[0],E[1]),2<E.length?"0"!=E[2]:!0,null,3<E.length?
-E[3]:0,4<E.length?E[4]:0))}}catch(K){}return t}if(null!=t.shape&&null!=t.shape.bounds){E=t.shape.direction;z=t.shape.bounds;var H=t.shape.scale;A=z.width/H;z=z.height/H;if(E==mxConstants.DIRECTION_NORTH||E==mxConstants.DIRECTION_SOUTH)E=A,A=z,z=E;z=t.shape.getConstraints(t.style,A,z);if(null!=z)return z;if(null!=t.shape.stencil&&null!=t.shape.stencil.constraints)return t.shape.stencil.constraints;if(null!=t.shape.constraints)return t.shape.constraints}}return null};Graph.prototype.flipEdge=function(t){if(null!=
+E[3]:0,4<E.length?E[4]:0))}}catch(L){}return t}if(null!=t.shape&&null!=t.shape.bounds){E=t.shape.direction;z=t.shape.bounds;var H=t.shape.scale;A=z.width/H;z=z.height/H;if(E==mxConstants.DIRECTION_NORTH||E==mxConstants.DIRECTION_SOUTH)E=A,A=z,z=E;z=t.shape.getConstraints(t.style,A,z);if(null!=z)return z;if(null!=t.shape.stencil&&null!=t.shape.stencil.constraints)return t.shape.stencil.constraints;if(null!=t.shape.constraints)return t.shape.constraints}}return null};Graph.prototype.flipEdge=function(t){if(null!=
t){var z=this.getCurrentCellStyle(t);z=mxUtils.getValue(z,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,z,[t])}};Graph.prototype.isValidRoot=function(t){for(var z=this.model.getChildCount(t),A=0,E=0;E<z;E++){var H=this.model.getChildAt(t,E);this.model.isVertex(H)&&(H=this.getCellGeometry(H),null==H||H.relative||A++)}return 0<A||this.isContainer(t)};Graph.prototype.isValidDropTarget=
-function(t,z,A){for(var E=this.getCurrentCellStyle(t),H=!0,K=!0,X=0;X<z.length&&K;X++)H=H&&this.isTable(z[X]),K=K&&this.isTableRow(z[X]);return(1==z.length&&null!=A&&mxEvent.isShiftDown(A)&&!mxEvent.isControlDown(A)&&!mxEvent.isAltDown(A)||("1"!=mxUtils.getValue(E,"part","0")||this.isContainer(t))&&"0"!=mxUtils.getValue(E,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(t))&&!this.isTableRow(t)&&(!this.isTable(t)||K||H))&&!this.isCellLocked(t)};Graph.prototype.createGroupCell=
+function(t,z,A){for(var E=this.getCurrentCellStyle(t),H=!0,L=!0,W=0;W<z.length&&L;W++)H=H&&this.isTable(z[W]),L=L&&this.isTableRow(z[W]);return(1==z.length&&null!=A&&mxEvent.isShiftDown(A)&&!mxEvent.isControlDown(A)&&!mxEvent.isAltDown(A)||("1"!=mxUtils.getValue(E,"part","0")||this.isContainer(t))&&"0"!=mxUtils.getValue(E,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(t))&&!this.isTableRow(t)&&(!this.isTable(t)||L||H))&&!this.isCellLocked(t)};Graph.prototype.createGroupCell=
function(){var t=mxGraph.prototype.createGroupCell.apply(this,arguments);t.setStyle("group");return t};Graph.prototype.isExtendParentsOnAdd=function(t){var z=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(z&&null!=t&&null!=this.layoutManager){var A=this.model.getParent(t);null!=A&&(A=this.layoutManager.getLayout(A),null!=A&&A.constructor==mxStackLayout&&(z=!1))}return z};Graph.prototype.getPreferredSizeForCell=function(t){var z=mxGraph.prototype.getPreferredSizeForCell.apply(this,
-arguments);null!=z&&(z.width+=10,z.height+=4,this.gridEnabled&&(z.width=this.snap(z.width),z.height=this.snap(z.height)));return z};Graph.prototype.turnShapes=function(t,z){var A=this.getModel(),E=[];A.beginUpdate();try{for(var H=0;H<t.length;H++){var K=t[H];if(A.isEdge(K)){var X=A.getTerminal(K,!0),ja=A.getTerminal(K,!1);A.setTerminal(K,ja,!0);A.setTerminal(K,X,!1);var ea=A.getGeometry(K);if(null!=ea){ea=ea.clone();null!=ea.points&&ea.points.reverse();var ka=ea.getTerminalPoint(!0),ta=ea.getTerminalPoint(!1);
-ea.setTerminalPoint(ka,!1);ea.setTerminalPoint(ta,!0);A.setGeometry(K,ea);var Aa=this.view.getState(K),Ea=this.view.getState(X),Ma=this.view.getState(ja);if(null!=Aa){var La=null!=Ea?this.getConnectionConstraint(Aa,Ea,!0):null,Ia=null!=Ma?this.getConnectionConstraint(Aa,Ma,!1):null;this.setConnectionConstraint(K,X,!0,Ia);this.setConnectionConstraint(K,ja,!1,La);var Fa=mxUtils.getValue(Aa.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
-mxUtils.getValue(Aa.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[K]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,Fa,[K])}E.push(K)}}else if(A.isVertex(K)&&(ea=this.getCellGeometry(K),null!=ea)){if(!(this.isTable(K)||this.isTableRow(K)||this.isTableCell(K)||this.isSwimlane(K))){ea=ea.clone();ea.x+=ea.width/2-ea.height/2;ea.y+=ea.height/2-ea.width/2;var Ga=ea.width;ea.width=ea.height;ea.height=Ga;A.setGeometry(K,ea)}var Oa=this.view.getState(K);if(null!=Oa){var Pa=[mxConstants.DIRECTION_EAST,
-mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],Na=mxUtils.getValue(Oa.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,Pa[mxUtils.mod(mxUtils.indexOf(Pa,Na)+(z?-1:1),Pa.length)],[K])}E.push(K)}}}finally{A.endUpdate()}return E};Graph.prototype.stencilHasPlaceholders=function(t){if(null!=t&&null!=t.fgNode)for(t=t.fgNode.firstChild;null!=t;){if("text"==t.nodeName&&"1"==t.getAttribute("placeholders"))return!0;
+arguments);null!=z&&(z.width+=10,z.height+=4,this.gridEnabled&&(z.width=this.snap(z.width),z.height=this.snap(z.height)));return z};Graph.prototype.turnShapes=function(t,z){var A=this.getModel(),E=[];A.beginUpdate();try{for(var H=0;H<t.length;H++){var L=t[H];if(A.isEdge(L)){var W=A.getTerminal(L,!0),ha=A.getTerminal(L,!1);A.setTerminal(L,ha,!0);A.setTerminal(L,W,!1);var fa=A.getGeometry(L);if(null!=fa){fa=fa.clone();null!=fa.points&&fa.points.reverse();var ja=fa.getTerminalPoint(!0),ua=fa.getTerminalPoint(!1);
+fa.setTerminalPoint(ja,!1);fa.setTerminalPoint(ua,!0);A.setGeometry(L,fa);var Aa=this.view.getState(L),Ea=this.view.getState(W),Ma=this.view.getState(ha);if(null!=Aa){var La=null!=Ea?this.getConnectionConstraint(Aa,Ea,!0):null,Ia=null!=Ma?this.getConnectionConstraint(Aa,Ma,!1):null;this.setConnectionConstraint(L,W,!0,Ia);this.setConnectionConstraint(L,ha,!1,La);var Fa=mxUtils.getValue(Aa.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
+mxUtils.getValue(Aa.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[L]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,Fa,[L])}E.push(L)}}else if(A.isVertex(L)&&(fa=this.getCellGeometry(L),null!=fa)){if(!(this.isTable(L)||this.isTableRow(L)||this.isTableCell(L)||this.isSwimlane(L))){fa=fa.clone();fa.x+=fa.width/2-fa.height/2;fa.y+=fa.height/2-fa.width/2;var Ga=fa.width;fa.width=fa.height;fa.height=Ga;A.setGeometry(L,fa)}var Oa=this.view.getState(L);if(null!=Oa){var Pa=[mxConstants.DIRECTION_EAST,
+mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],Na=mxUtils.getValue(Oa.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,Pa[mxUtils.mod(mxUtils.indexOf(Pa,Na)+(z?-1:1),Pa.length)],[L])}E.push(L)}}}finally{A.endUpdate()}return E};Graph.prototype.stencilHasPlaceholders=function(t){if(null!=t&&null!=t.fgNode)for(t=t.fgNode.firstChild;null!=t;){if("text"==t.nodeName&&"1"==t.getAttribute("placeholders"))return!0;
t=t.nextSibling}return!1};var B=Graph.prototype.processChange;Graph.prototype.processChange=function(t){if(t instanceof mxGeometryChange&&(this.isTableCell(t.cell)||this.isTableRow(t.cell))&&(null==t.previous&&null!=t.geometry||null!=t.previous&&!t.previous.equals(t.geometry))){var z=t.cell;this.isTableCell(z)&&(z=this.model.getParent(z));this.isTableRow(z)&&(z=this.model.getParent(z));var A=this.view.getState(z);null!=A&&null!=A.shape&&(this.view.invalidate(z),A.shape.bounds=null)}B.apply(this,arguments);
t instanceof mxValueChange&&null!=t.cell&&null!=t.cell.value&&"object"==typeof t.cell.value&&this.invalidateDescendantsWithPlaceholders(t.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(t){t=this.model.getDescendants(t);if(0<t.length)for(var z=0;z<t.length;z++){var A=this.view.getState(t[z]);null!=A&&null!=A.shape&&null!=A.shape.stencil&&this.stencilHasPlaceholders(A.shape.stencil)?this.removeStateForCell(t[z]):this.isReplacePlaceholders(t[z])&&this.view.invalidate(t[z],!1,!1)}};
Graph.prototype.replaceElement=function(t,z){z=t.ownerDocument.createElement(null!=z?z:"span");for(var A=Array.prototype.slice.call(t.attributes);attr=A.pop();)z.setAttribute(attr.nodeName,attr.nodeValue);z.innerHTML=t.innerHTML;t.parentNode.replaceChild(z,t)};Graph.prototype.processElements=function(t,z){if(null!=t){t=t.getElementsByTagName("*");for(var A=0;A<t.length;A++)z(t[A])}};Graph.prototype.updateLabelElements=function(t,z,A){t=null!=t?t:this.getSelectionCells();for(var E=document.createElement("div"),
-H=0;H<t.length;H++)if(this.isHtmlLabel(t[H])){var K=this.convertValueToString(t[H]);if(null!=K&&0<K.length){E.innerHTML=K;for(var X=E.getElementsByTagName(null!=A?A:"*"),ja=0;ja<X.length;ja++)z(X[ja]);E.innerHTML!=K&&this.cellLabelChanged(t[H],E.innerHTML)}}};Graph.prototype.cellLabelChanged=function(t,z,A){z=Graph.zapGremlins(z);this.model.beginUpdate();try{if(null!=t.value&&"object"==typeof t.value){if(this.isReplacePlaceholders(t)&&null!=t.getAttribute("placeholder"))for(var E=t.getAttribute("placeholder"),
-H=t;null!=H;){if(H==this.model.getRoot()||null!=H.value&&"object"==typeof H.value&&H.hasAttribute(E)){this.setAttributeForCell(H,E,z);break}H=this.model.getParent(H)}var K=t.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&K.hasAttribute("label_"+Graph.diagramLanguage)?K.setAttribute("label_"+Graph.diagramLanguage,z):K.setAttribute("label",z);z=K}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(t){if(null!=
-t){for(var z=new mxDictionary,A=0;A<t.length;A++)z.put(t[A],!0);var E=[];for(A=0;A<t.length;A++){var H=this.model.getParent(t[A]);null==H||z.get(H)||(z.put(H,!0),E.push(H))}for(A=0;A<E.length;A++)if(H=this.view.getState(E[A]),null!=H&&(this.model.isEdge(H.cell)||this.model.isVertex(H.cell))&&this.isCellDeletable(H.cell)&&this.isTransparentState(H)){for(var K=!0,X=0;X<this.model.getChildCount(H.cell)&&K;X++)z.get(this.model.getChildAt(H.cell,X))||(K=!1);K&&t.push(H.cell)}}mxGraph.prototype.cellsRemoved.apply(this,
+H=0;H<t.length;H++)if(this.isHtmlLabel(t[H])){var L=this.convertValueToString(t[H]);if(null!=L&&0<L.length){E.innerHTML=L;for(var W=E.getElementsByTagName(null!=A?A:"*"),ha=0;ha<W.length;ha++)z(W[ha]);E.innerHTML!=L&&this.cellLabelChanged(t[H],E.innerHTML)}}};Graph.prototype.cellLabelChanged=function(t,z,A){z=Graph.zapGremlins(z);this.model.beginUpdate();try{if(null!=t.value&&"object"==typeof t.value){if(this.isReplacePlaceholders(t)&&null!=t.getAttribute("placeholder"))for(var E=t.getAttribute("placeholder"),
+H=t;null!=H;){if(H==this.model.getRoot()||null!=H.value&&"object"==typeof H.value&&H.hasAttribute(E)){this.setAttributeForCell(H,E,z);break}H=this.model.getParent(H)}var L=t.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&L.hasAttribute("label_"+Graph.diagramLanguage)?L.setAttribute("label_"+Graph.diagramLanguage,z):L.setAttribute("label",z);z=L}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(t){if(null!=
+t){for(var z=new mxDictionary,A=0;A<t.length;A++)z.put(t[A],!0);var E=[];for(A=0;A<t.length;A++){var H=this.model.getParent(t[A]);null==H||z.get(H)||(z.put(H,!0),E.push(H))}for(A=0;A<E.length;A++)if(H=this.view.getState(E[A]),null!=H&&(this.model.isEdge(H.cell)||this.model.isVertex(H.cell))&&this.isCellDeletable(H.cell)&&this.isTransparentState(H)){for(var L=!0,W=0;W<this.model.getChildCount(H.cell)&&L;W++)z.get(this.model.getChildAt(H.cell,W))||(L=!1);L&&t.push(H.cell)}}mxGraph.prototype.cellsRemoved.apply(this,
arguments)};Graph.prototype.removeCellsAfterUngroup=function(t){for(var z=[],A=0;A<t.length;A++)this.isCellDeletable(t[A])&&this.isTransparentState(this.view.getState(t[A]))&&z.push(t[A]);t=z;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(t,z){this.setAttributeForCell(t,"link",z)};Graph.prototype.setTooltipForCell=function(t,z){var A="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(t.value)&&t.value.hasAttribute("tooltip_"+
Graph.diagramLanguage)&&(A="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(t,A,z)};Graph.prototype.getAttributeForCell=function(t,z,A){t=null!=t.value&&"object"===typeof t.value?t.value.getAttribute(z):null;return null!=t?t:A};Graph.prototype.setAttributeForCell=function(t,z,A){if(null!=t.value&&"object"==typeof t.value)var E=t.value.cloneNode(!0);else E=mxUtils.createXmlDocument().createElement("UserObject"),E.setAttribute("label",t.value||"");null!=A?E.setAttribute(z,A):E.removeAttribute(z);
-this.model.setValue(t,E)};var C=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(t,z,A,E){this.getModel();if(mxEvent.isAltDown(z))return null;for(var H=0;H<t.length;H++){var K=this.model.getParent(t[H]);if(this.model.isEdge(K)&&0>mxUtils.indexOf(t,K))return null}K=C.apply(this,arguments);var X=!0;for(H=0;H<t.length&&X;H++)X=X&&this.isTableRow(t[H]);X&&(this.isTableCell(K)&&(K=this.model.getParent(K)),this.isTableRow(K)&&(K=this.model.getParent(K)),this.isTable(K)||(K=null));return K};
+this.model.setValue(t,E)};var C=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(t,z,A,E){this.getModel();if(mxEvent.isAltDown(z))return null;for(var H=0;H<t.length;H++){var L=this.model.getParent(t[H]);if(this.model.isEdge(L)&&0>mxUtils.indexOf(t,L))return null}L=C.apply(this,arguments);var W=!0;for(H=0;H<t.length&&W;H++)W=W&&this.isTableRow(t[H]);W&&(this.isTableCell(L)&&(L=this.model.getParent(L)),this.isTableRow(L)&&(L=this.model.getParent(L)),this.isTable(L)||(L=null));return L};
Graph.prototype.click=function(t){mxGraph.prototype.click.call(this,t);this.firstClickState=t.getState();this.firstClickSource=t.getSource()};Graph.prototype.dblClick=function(t,z){this.isEnabled()&&(z=this.insertTextForEvent(t,z),mxGraph.prototype.dblClick.call(this,t,z))};Graph.prototype.insertTextForEvent=function(t,z){var A=mxUtils.convertPoint(this.container,mxEvent.getClientX(t),mxEvent.getClientY(t));if(null!=t&&!this.model.isVertex(z)){var E=this.model.isEdge(z)?this.view.getState(z):null,
H=mxEvent.getSource(t);this.firstClickState!=E||this.firstClickSource!=H||null!=E&&null!=E.text&&null!=E.text.node&&null!=E.text.boundingBox&&(mxUtils.contains(E.text.boundingBox,A.x,A.y)||mxUtils.isAncestorNode(E.text.node,mxEvent.getSource(t)))||(null!=E||this.isCellLocked(this.getDefaultParent()))&&(null==E||this.isCellLocked(E.cell))||!(null!=E||mxClient.IS_SVG&&H==this.view.getCanvas().ownerSVGElement)||(null==E&&(E=this.view.getState(this.getCellAt(A.x,A.y))),z=this.addText(A.x,A.y,E))}return z};
Graph.prototype.getInsertPoint=function(){var t=this.getGridSize(),z=this.container.scrollLeft/this.view.scale-this.view.translate.x,A=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var E=this.getPageLayout(),H=this.getPageSize();z=Math.max(z,E.x*H.width);A=Math.max(A,E.y*H.height)}return new mxPoint(this.snap(z+t),this.snap(A+t))};Graph.prototype.getFreeInsertPoint=function(){var t=this.view,z=this.getGraphBounds(),A=this.getInsertPoint(),E=this.snap(Math.round(Math.max(A.x,
z.x/t.scale-t.translate.x+(0==z.width?2*this.gridSize:0))));t=this.snap(Math.round(Math.max(A.y,(z.y+z.height)/t.scale-t.translate.y+2*this.gridSize)));return new mxPoint(E,t)};Graph.prototype.getCenterInsertPoint=function(t){t=null!=t?t:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap(Math.round((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-t.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/
2)/this.view.scale-this.view.translate.y-t.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-t.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-t.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(t,z,A){var E=new mxCell;E.value="Text";E.geometry=new mxGeometry(0,0,0,0);E.vertex=!0;if(null!=A&&this.model.isEdge(A.cell)){E.style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];";
-E.geometry.relative=!0;E.connectable=!1;var H=this.view.getRelativePoint(A,t,z);E.geometry.x=Math.round(1E4*H.x)/1E4;E.geometry.y=Math.round(H.y);E.geometry.offset=new mxPoint(0,0);H=this.view.getPoint(A,E.geometry);var K=this.view.scale;E.geometry.offset=new mxPoint(Math.round((t-H.x)/K),Math.round((z-H.y)/K))}else H=this.view.translate,E.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",E.geometry.width=40,E.geometry.height=20,E.geometry.x=Math.round(t/this.view.scale)-
-H.x-(null!=A?A.origin.x:0),E.geometry.y=Math.round(z/this.view.scale)-H.y-(null!=A?A.origin.y:0),E.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([E],null!=A?A.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[E])),this.autoSizeCell(E)}finally{this.getModel().endUpdate()}return E};Graph.prototype.addClickHandler=function(t,z,A){var E=mxUtils.bind(this,function(){var ea=this.container.getElementsByTagName("a");if(null!=ea)for(var ka=0;ka<ea.length;ka++){var ta=
-this.getAbsoluteUrl(ea[ka].getAttribute("href"));null!=ta&&(ea[ka].setAttribute("rel",this.linkRelation),ea[ka].setAttribute("href",ta),null!=z&&mxEvent.addGestureListeners(ea[ka],null,null,z))}});this.model.addListener(mxEvent.CHANGE,E);E();var H=this.container.style.cursor,K=this.getTolerance(),X=this,ja={currentState:null,currentLink:null,currentTarget:null,highlight:null!=t&&""!=t&&t!=mxConstants.NONE?new mxCellHighlight(X,t,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(ea){var ka=
-ea.sourceState;if(null==ka||null==X.getLinkForCell(ka.cell))ea=X.getCellAt(ea.getGraphX(),ea.getGraphY(),null,null,null,function(ta,Aa,Ea){return null==X.getLinkForCell(ta.cell)}),ka=null==ka||X.model.isAncestor(ea,ka.cell)?X.view.getState(ea):null;ka!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=ka,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(ea,ka){this.startX=ka.getGraphX();this.startY=ka.getGraphY();this.scrollLeft=X.container.scrollLeft;
-this.scrollTop=X.container.scrollTop;null==this.currentLink&&"auto"==X.container.style.overflow&&(X.container.style.cursor="move");this.updateCurrentState(ka)},mouseMove:function(ea,ka){if(X.isMouseDown)null!=this.currentLink&&(ea=Math.abs(this.startX-ka.getGraphX()),ka=Math.abs(this.startY-ka.getGraphY()),(ea>K||ka>K)&&this.clear());else{for(ea=ka.getSource();null!=ea&&"a"!=ea.nodeName.toLowerCase();)ea=ea.parentNode;null!=ea?this.clear():(null!=X.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&
-X.tooltipHandler.reset(ka,!0,this.currentState),(null==this.currentState||ka.getState()!=this.currentState&&null!=ka.sourceState||!X.intersects(this.currentState,ka.getGraphX(),ka.getGraphY()))&&this.updateCurrentState(ka))}},mouseUp:function(ea,ka){var ta=ka.getSource();for(ea=ka.getEvent();null!=ta&&"a"!=ta.nodeName.toLowerCase();)ta=ta.parentNode;null==ta&&Math.abs(this.scrollLeft-X.container.scrollLeft)<K&&Math.abs(this.scrollTop-X.container.scrollTop)<K&&(null==ka.sourceState||!ka.isSource(ka.sourceState.control))&&
-((mxEvent.isLeftMouseButton(ea)||mxEvent.isMiddleMouseButton(ea))&&!mxEvent.isPopupTrigger(ea)||mxEvent.isTouchEvent(ea))&&(null!=this.currentLink?(ta=X.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&ta||null==z||z(ea,this.currentLink),mxEvent.isConsumed(ea)||(ea=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(ea)?"_blank":ta?X.linkTarget:"_top",X.openLink(this.currentLink,ea),ka.consume())):null!=A&&!ka.isConsumed()&&Math.abs(this.scrollLeft-X.container.scrollLeft)<
-K&&Math.abs(this.scrollTop-X.container.scrollTop)<K&&Math.abs(this.startX-ka.getGraphX())<K&&Math.abs(this.startY-ka.getGraphY())<K&&A(ka.getEvent()));this.clear()},activate:function(ea){this.currentLink=X.getAbsoluteUrl(X.getLinkForCell(ea.cell));null!=this.currentLink&&(this.currentTarget=X.getLinkTargetForCell(ea.cell),X.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(ea))},clear:function(){null!=X.container&&(X.container.style.cursor=H);this.currentLink=this.currentState=
-this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=X.tooltipHandler&&X.tooltipHandler.hide()}};X.click=function(ea){};X.addMouseListener(ja);mxEvent.addListener(document,"mouseleave",function(ea){ja.clear()})};Graph.prototype.duplicateCells=function(t,z){t=null!=t?t:this.getSelectionCells();z=null!=z?z:!0;for(var A=0;A<t.length;A++)this.isTableCell(t[A])&&(t[A]=this.model.getParent(t[A]));t=this.model.getTopmostCells(t);var E=this.getModel(),H=this.gridSize,K=[];E.beginUpdate();
-try{var X={},ja=this.createCellLookup(t),ea=this.cloneCells(t,!1,X,!0);for(A=0;A<t.length;A++){var ka=E.getParent(t[A]);if(null!=ka){var ta=this.moveCells([ea[A]],H,H,!1)[0];K.push(ta);if(z)E.add(ka,ea[A]);else{var Aa=ka.getIndex(t[A]);E.add(ka,ea[A],Aa+1)}if(this.isTable(ka)){var Ea=this.getCellGeometry(ea[A]),Ma=this.getCellGeometry(ka);null!=Ea&&null!=Ma&&(Ma=Ma.clone(),Ma.height+=Ea.height,E.setGeometry(ka,Ma))}}else K.push(ea[A])}this.updateCustomLinks(this.createCellMapping(X,ja),ea,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,
-"cells",ea))}finally{E.endUpdate()}return K};Graph.prototype.insertImage=function(t,z,A){if(null!=t&&null!=this.cellEditor.textarea){for(var E=this.cellEditor.textarea.getElementsByTagName("img"),H=[],K=0;K<E.length;K++)H.push(E[K]);document.execCommand("insertimage",!1,t);t=this.cellEditor.textarea.getElementsByTagName("img");if(t.length==H.length+1)for(K=t.length-1;0<=K;K--)if(0==K||t[K]!=H[K-1]){t[K].setAttribute("width",z);t[K].setAttribute("height",A);break}}};Graph.prototype.insertLink=function(t){if(null!=
+E.geometry.relative=!0;E.connectable=!1;var H=this.view.getRelativePoint(A,t,z);E.geometry.x=Math.round(1E4*H.x)/1E4;E.geometry.y=Math.round(H.y);E.geometry.offset=new mxPoint(0,0);H=this.view.getPoint(A,E.geometry);var L=this.view.scale;E.geometry.offset=new mxPoint(Math.round((t-H.x)/L),Math.round((z-H.y)/L))}else H=this.view.translate,E.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",E.geometry.width=40,E.geometry.height=20,E.geometry.x=Math.round(t/this.view.scale)-
+H.x-(null!=A?A.origin.x:0),E.geometry.y=Math.round(z/this.view.scale)-H.y-(null!=A?A.origin.y:0),E.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([E],null!=A?A.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[E])),this.autoSizeCell(E)}finally{this.getModel().endUpdate()}return E};Graph.prototype.addClickHandler=function(t,z,A){var E=mxUtils.bind(this,function(){var fa=this.container.getElementsByTagName("a");if(null!=fa)for(var ja=0;ja<fa.length;ja++){var ua=
+this.getAbsoluteUrl(fa[ja].getAttribute("href"));null!=ua&&(fa[ja].setAttribute("rel",this.linkRelation),fa[ja].setAttribute("href",ua),null!=z&&mxEvent.addGestureListeners(fa[ja],null,null,z))}});this.model.addListener(mxEvent.CHANGE,E);E();var H=this.container.style.cursor,L=this.getTolerance(),W=this,ha={currentState:null,currentLink:null,currentTarget:null,highlight:null!=t&&""!=t&&t!=mxConstants.NONE?new mxCellHighlight(W,t,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(fa){var ja=
+fa.sourceState;if(null==ja||null==W.getLinkForCell(ja.cell))fa=W.getCellAt(fa.getGraphX(),fa.getGraphY(),null,null,null,function(ua,Aa,Ea){return null==W.getLinkForCell(ua.cell)}),ja=null==ja||W.model.isAncestor(fa,ja.cell)?W.view.getState(fa):null;ja!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=ja,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(fa,ja){this.startX=ja.getGraphX();this.startY=ja.getGraphY();this.scrollLeft=W.container.scrollLeft;
+this.scrollTop=W.container.scrollTop;null==this.currentLink&&"auto"==W.container.style.overflow&&(W.container.style.cursor="move");this.updateCurrentState(ja)},mouseMove:function(fa,ja){if(W.isMouseDown)null!=this.currentLink&&(fa=Math.abs(this.startX-ja.getGraphX()),ja=Math.abs(this.startY-ja.getGraphY()),(fa>L||ja>L)&&this.clear());else{for(fa=ja.getSource();null!=fa&&"a"!=fa.nodeName.toLowerCase();)fa=fa.parentNode;null!=fa?this.clear():(null!=W.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&
+W.tooltipHandler.reset(ja,!0,this.currentState),(null==this.currentState||ja.getState()!=this.currentState&&null!=ja.sourceState||!W.intersects(this.currentState,ja.getGraphX(),ja.getGraphY()))&&this.updateCurrentState(ja))}},mouseUp:function(fa,ja){var ua=ja.getSource();for(fa=ja.getEvent();null!=ua&&"a"!=ua.nodeName.toLowerCase();)ua=ua.parentNode;null==ua&&Math.abs(this.scrollLeft-W.container.scrollLeft)<L&&Math.abs(this.scrollTop-W.container.scrollTop)<L&&(null==ja.sourceState||!ja.isSource(ja.sourceState.control))&&
+((mxEvent.isLeftMouseButton(fa)||mxEvent.isMiddleMouseButton(fa))&&!mxEvent.isPopupTrigger(fa)||mxEvent.isTouchEvent(fa))&&(null!=this.currentLink?(ua=W.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&ua||null==z||z(fa,this.currentLink),mxEvent.isConsumed(fa)||(fa=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(fa)?"_blank":ua?W.linkTarget:"_top",W.openLink(this.currentLink,fa),ja.consume())):null!=A&&!ja.isConsumed()&&Math.abs(this.scrollLeft-W.container.scrollLeft)<
+L&&Math.abs(this.scrollTop-W.container.scrollTop)<L&&Math.abs(this.startX-ja.getGraphX())<L&&Math.abs(this.startY-ja.getGraphY())<L&&A(ja.getEvent()));this.clear()},activate:function(fa){this.currentLink=W.getAbsoluteUrl(W.getLinkForCell(fa.cell));null!=this.currentLink&&(this.currentTarget=W.getLinkTargetForCell(fa.cell),W.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(fa))},clear:function(){null!=W.container&&(W.container.style.cursor=H);this.currentLink=this.currentState=
+this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=W.tooltipHandler&&W.tooltipHandler.hide()}};W.click=function(fa){};W.addMouseListener(ha);mxEvent.addListener(document,"mouseleave",function(fa){ha.clear()})};Graph.prototype.duplicateCells=function(t,z){t=null!=t?t:this.getSelectionCells();z=null!=z?z:!0;for(var A=0;A<t.length;A++)this.isTableCell(t[A])&&(t[A]=this.model.getParent(t[A]));t=this.model.getTopmostCells(t);var E=this.getModel(),H=this.gridSize,L=[];E.beginUpdate();
+try{var W={},ha=this.createCellLookup(t),fa=this.cloneCells(t,!1,W,!0);for(A=0;A<t.length;A++){var ja=E.getParent(t[A]);if(null!=ja){var ua=this.moveCells([fa[A]],H,H,!1)[0];L.push(ua);if(z)E.add(ja,fa[A]);else{var Aa=ja.getIndex(t[A]);E.add(ja,fa[A],Aa+1)}if(this.isTable(ja)){var Ea=this.getCellGeometry(fa[A]),Ma=this.getCellGeometry(ja);null!=Ea&&null!=Ma&&(Ma=Ma.clone(),Ma.height+=Ea.height,E.setGeometry(ja,Ma))}}else L.push(fa[A])}this.updateCustomLinks(this.createCellMapping(W,ha),fa,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,
+"cells",fa))}finally{E.endUpdate()}return L};Graph.prototype.insertImage=function(t,z,A){if(null!=t&&null!=this.cellEditor.textarea){for(var E=this.cellEditor.textarea.getElementsByTagName("img"),H=[],L=0;L<E.length;L++)H.push(E[L]);document.execCommand("insertimage",!1,t);t=this.cellEditor.textarea.getElementsByTagName("img");if(t.length==H.length+1)for(L=t.length-1;0<=L;L--)if(0==L||t[L]!=H[L-1]){t[L].setAttribute("width",z);t[L].setAttribute("height",A);break}}};Graph.prototype.insertLink=function(t){if(null!=
this.cellEditor.textarea)if(0==t.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var z=this.cellEditor.textarea.getElementsByTagName("a"),A=[],E=0;E<z.length;E++)A.push(z[E]);document.execCommand("createlink",!1,mxUtils.trim(t));z=this.cellEditor.textarea.getElementsByTagName("a");if(z.length==A.length+1)for(E=z.length-1;0<=E;E--)if(z[E]!=A[E-1]){for(z=z[E].getElementsByTagName("a");0<z.length;){for(A=z[0].parentNode;null!=z[0].firstChild;)A.insertBefore(z[0].firstChild,z[0]);
A.removeChild(z[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(t))};Graph.prototype.isCellResizable=function(t){var z=mxGraph.prototype.isCellResizable.apply(this,arguments),A=this.getCurrentCellStyle(t);return!this.isTableCell(t)&&!this.isTableRow(t)&&(z||"0"!=mxUtils.getValue(A,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==A[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(t,z){null==z&&(z=this.getSelectionCells());if(null!=z&&1<z.length){for(var A=[],E=null,
-H=null,K=0;K<z.length;K++)if(this.getModel().isVertex(z[K])){var X=this.view.getState(z[K]);if(null!=X){var ja=t?X.getCenterX():X.getCenterY();E=null!=E?Math.max(E,ja):ja;H=null!=H?Math.min(H,ja):ja;A.push(X)}}if(2<A.length){A.sort(function(Aa,Ea){return t?Aa.x-Ea.x:Aa.y-Ea.y});X=this.view.translate;ja=this.view.scale;H=H/ja-(t?X.x:X.y);E=E/ja-(t?X.x:X.y);this.getModel().beginUpdate();try{var ea=(E-H)/(A.length-1);E=H;for(K=1;K<A.length-1;K++){var ka=this.view.getState(this.model.getParent(A[K].cell)),
-ta=this.getCellGeometry(A[K].cell);E+=ea;null!=ta&&null!=ka&&(ta=ta.clone(),t?ta.x=Math.round(E-ta.width/2)-ka.origin.x:ta.y=Math.round(E-ta.height/2)-ka.origin.y,this.getModel().setGeometry(A[K].cell,ta))}}finally{this.getModel().endUpdate()}}}return z};Graph.prototype.isCloneEvent=function(t){return mxClient.IS_MAC&&mxEvent.isMetaDown(t)||mxEvent.isControlDown(t)};Graph.prototype.createSvgImageExport=function(){var t=new mxImageExport;t.getLinkForCellState=mxUtils.bind(this,function(z,A){return this.getLinkForCell(z.cell)});
-return t};Graph.prototype.parseBackgroundImage=function(t){var z=null;null!=t&&0<t.length&&(t=JSON.parse(t),z=new mxImage(t.src,t.width,t.height));return z};Graph.prototype.getBackgroundImageObject=function(t){return t};Graph.prototype.getSvg=function(t,z,A,E,H,K,X,ja,ea,ka,ta,Aa,Ea,Ma){var La=null;if(null!=Ma)for(La=new mxDictionary,ta=0;ta<Ma.length;ta++)La.put(Ma[ta],!0);if(Ma=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{z=null!=z?z:1;A=null!=A?
-A:0;H=null!=H?H:!0;K=null!=K?K:!0;X=null!=X?X:!0;ka=null!=ka?ka:!1;var Ia="page"==Ea?this.view.getBackgroundPageBounds():K&&null==La||E||"diagram"==Ea?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),Fa=this.view.scale;"diagram"==Ea&&null!=this.backgroundImage&&(Ia=mxRectangle.fromRectangle(Ia),Ia.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*Fa,(this.view.translate.y+this.backgroundImage.y)*Fa,this.backgroundImage.width*Fa,this.backgroundImage.height*Fa)));
-if(null==Ia)throw Error(mxResources.get("drawingEmpty"));E=z/Fa;Ea=H?-.5:0;var Ga=Graph.createSvgNode(Ea,Ea,Math.max(1,Math.ceil(Ia.width*E)+2*A)+(ka&&0==A?5:0),Math.max(1,Math.ceil(Ia.height*E)+2*A)+(ka&&0==A?5:0),t),Oa=Ga.ownerDocument,Pa=null!=Oa.createElementNS?Oa.createElementNS(mxConstants.NS_SVG,"g"):Oa.createElement("g");Ga.appendChild(Pa);var Na=this.createSvgCanvas(Pa);Na.foOffset=H?-.5:0;Na.textOffset=H?-.5:0;Na.imageOffset=H?-.5:0;Na.translate(Math.floor(A/z-Ia.x/Fa),Math.floor(A/z-Ia.y/
+H=null,L=0;L<z.length;L++)if(this.getModel().isVertex(z[L])){var W=this.view.getState(z[L]);if(null!=W){var ha=t?W.getCenterX():W.getCenterY();E=null!=E?Math.max(E,ha):ha;H=null!=H?Math.min(H,ha):ha;A.push(W)}}if(2<A.length){A.sort(function(Aa,Ea){return t?Aa.x-Ea.x:Aa.y-Ea.y});W=this.view.translate;ha=this.view.scale;H=H/ha-(t?W.x:W.y);E=E/ha-(t?W.x:W.y);this.getModel().beginUpdate();try{var fa=(E-H)/(A.length-1);E=H;for(L=1;L<A.length-1;L++){var ja=this.view.getState(this.model.getParent(A[L].cell)),
+ua=this.getCellGeometry(A[L].cell);E+=fa;null!=ua&&null!=ja&&(ua=ua.clone(),t?ua.x=Math.round(E-ua.width/2)-ja.origin.x:ua.y=Math.round(E-ua.height/2)-ja.origin.y,this.getModel().setGeometry(A[L].cell,ua))}}finally{this.getModel().endUpdate()}}}return z};Graph.prototype.isCloneEvent=function(t){return mxClient.IS_MAC&&mxEvent.isMetaDown(t)||mxEvent.isControlDown(t)};Graph.prototype.createSvgImageExport=function(){var t=new mxImageExport;t.getLinkForCellState=mxUtils.bind(this,function(z,A){return this.getLinkForCell(z.cell)});
+return t};Graph.prototype.parseBackgroundImage=function(t){var z=null;null!=t&&0<t.length&&(t=JSON.parse(t),z=new mxImage(t.src,t.width,t.height));return z};Graph.prototype.getBackgroundImageObject=function(t){return t};Graph.prototype.getSvg=function(t,z,A,E,H,L,W,ha,fa,ja,ua,Aa,Ea,Ma){var La=null;if(null!=Ma)for(La=new mxDictionary,ua=0;ua<Ma.length;ua++)La.put(Ma[ua],!0);if(Ma=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{z=null!=z?z:1;A=null!=A?
+A:0;H=null!=H?H:!0;L=null!=L?L:!0;W=null!=W?W:!0;ja=null!=ja?ja:!1;var Ia="page"==Ea?this.view.getBackgroundPageBounds():L&&null==La||E||"diagram"==Ea?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),Fa=this.view.scale;"diagram"==Ea&&null!=this.backgroundImage&&(Ia=mxRectangle.fromRectangle(Ia),Ia.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*Fa,(this.view.translate.y+this.backgroundImage.y)*Fa,this.backgroundImage.width*Fa,this.backgroundImage.height*Fa)));
+if(null==Ia)throw Error(mxResources.get("drawingEmpty"));E=z/Fa;Ea=H?-.5:0;var Ga=Graph.createSvgNode(Ea,Ea,Math.max(1,Math.ceil(Ia.width*E)+2*A)+(ja&&0==A?5:0),Math.max(1,Math.ceil(Ia.height*E)+2*A)+(ja&&0==A?5:0),t),Oa=Ga.ownerDocument,Pa=null!=Oa.createElementNS?Oa.createElementNS(mxConstants.NS_SVG,"g"):Oa.createElement("g");Ga.appendChild(Pa);var Na=this.createSvgCanvas(Pa);Na.foOffset=H?-.5:0;Na.textOffset=H?-.5:0;Na.imageOffset=H?-.5:0;Na.translate(Math.floor(A/z-Ia.x/Fa),Math.floor(A/z-Ia.y/
Fa));var Sa=document.createElement("div"),eb=Na.getAlternateText;Na.getAlternateText=function(cb,mb,Za,ib,gb,Wa,qb,tb,nb,fb,Ra,rb,xb){if(null!=Wa&&0<this.state.fontSize)try{mxUtils.isNode(Wa)?Wa=Wa.innerText:(Sa.innerHTML=Wa,Wa=mxUtils.extractTextWithWhitespace(Sa.childNodes));for(var kb=Math.ceil(2*ib/this.state.fontSize),hb=[],ob=0,lb=0;(0==kb||ob<kb)&&lb<Wa.length;){var sb=Wa.charCodeAt(lb);if(10==sb||13==sb){if(0<ob)break}else hb.push(Wa.charAt(lb)),255>sb&&ob++;lb++}hb.length<Wa.length&&1<Wa.length-
-hb.length&&(Wa=mxUtils.trim(hb.join(""))+"...");return Wa}catch(c){return eb.apply(this,arguments)}else return eb.apply(this,arguments)};var ab=this.backgroundImage;if(null!=ab){t=Fa/z;var pb=this.view.translate;Ea=new mxRectangle((ab.x+pb.x)*t,(ab.y+pb.y)*t,ab.width*t,ab.height*t);mxUtils.intersects(Ia,Ea)&&Na.image(ab.x+pb.x,ab.y+pb.y,ab.width,ab.height,ab.src,!0)}Na.scale(E);Na.textEnabled=X;ja=null!=ja?ja:this.createSvgImageExport();var ub=ja.drawCellState,vb=ja.getLinkForCellState;ja.getLinkForCellState=
-function(cb,mb){var Za=vb.apply(this,arguments);return null==Za||cb.view.graph.isCustomLink(Za)?null:Za};ja.getLinkTargetForCellState=function(cb,mb){return cb.view.graph.getLinkTargetForCell(cb.cell)};ja.drawCellState=function(cb,mb){for(var Za=cb.view.graph,ib=null!=La?La.get(cb.cell):Za.isCellSelected(cb.cell),gb=Za.model.getParent(cb.cell);!(K&&null==La||ib)&&null!=gb;)ib=null!=La?La.get(gb):Za.isCellSelected(gb),gb=Za.model.getParent(gb);(K&&null==La||ib)&&ub.apply(this,arguments)};ja.drawState(this.getView().getState(this.model.root),
-Na);this.updateSvgLinks(Ga,ea,!0);this.addForeignObjectWarning(Na,Ga);return Ga}finally{Ma&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(t,z){if("0"!=urlParams["svg-warning"]&&0<z.getElementsByTagName("foreignObject").length){var A=t.createElement("switch"),E=t.createElement("g");E.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var H=t.createElement("a");H.setAttribute("transform","translate(0,-5)");
+hb.length&&(Wa=mxUtils.trim(hb.join(""))+"...");return Wa}catch(c){return eb.apply(this,arguments)}else return eb.apply(this,arguments)};var ab=this.backgroundImage;if(null!=ab){t=Fa/z;var pb=this.view.translate;Ea=new mxRectangle((ab.x+pb.x)*t,(ab.y+pb.y)*t,ab.width*t,ab.height*t);mxUtils.intersects(Ia,Ea)&&Na.image(ab.x+pb.x,ab.y+pb.y,ab.width,ab.height,ab.src,!0)}Na.scale(E);Na.textEnabled=W;ha=null!=ha?ha:this.createSvgImageExport();var ub=ha.drawCellState,vb=ha.getLinkForCellState;ha.getLinkForCellState=
+function(cb,mb){var Za=vb.apply(this,arguments);return null==Za||cb.view.graph.isCustomLink(Za)?null:Za};ha.getLinkTargetForCellState=function(cb,mb){return cb.view.graph.getLinkTargetForCell(cb.cell)};ha.drawCellState=function(cb,mb){for(var Za=cb.view.graph,ib=null!=La?La.get(cb.cell):Za.isCellSelected(cb.cell),gb=Za.model.getParent(cb.cell);!(L&&null==La||ib)&&null!=gb;)ib=null!=La?La.get(gb):Za.isCellSelected(gb),gb=Za.model.getParent(gb);(L&&null==La||ib)&&ub.apply(this,arguments)};ha.drawState(this.getView().getState(this.model.root),
+Na);this.updateSvgLinks(Ga,fa,!0);this.addForeignObjectWarning(Na,Ga);return Ga}finally{Ma&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(t,z){if("0"!=urlParams["svg-warning"]&&0<z.getElementsByTagName("foreignObject").length){var A=t.createElement("switch"),E=t.createElement("g");E.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var H=t.createElement("a");H.setAttribute("transform","translate(0,-5)");
null==H.setAttributeNS||z.ownerDocument!=document&&null==document.documentMode?(H.setAttribute("xlink:href",Graph.foreignObjectWarningLink),H.setAttribute("target","_blank")):(H.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),H.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));t=t.createElement("text");t.setAttribute("text-anchor","middle");t.setAttribute("font-size","10px");t.setAttribute("x","50%");t.setAttribute("y","100%");mxUtils.write(t,Graph.foreignObjectWarningText);
A.appendChild(E);H.appendChild(t);A.appendChild(H);z.appendChild(A)}};Graph.prototype.updateSvgLinks=function(t,z,A){t=t.getElementsByTagName("a");for(var E=0;E<t.length;E++)if(null==t[E].getAttribute("target")){var H=t[E].getAttribute("href");null==H&&(H=t[E].getAttribute("xlink:href"));null!=H&&(null!=z&&/^https?:\/\//.test(H)?t[E].setAttribute("target",z):A&&this.isCustomLink(H)&&t[E].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(t){t=new mxSvgCanvas2D(t);
t.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;t.pointerEvents=!0;return t};Graph.prototype.getSelectedElement=function(){var t=null;if(window.getSelection){var z=window.getSelection();z.getRangeAt&&z.rangeCount&&(t=z.getRangeAt(0).commonAncestorContainer)}else document.selection&&(t=document.selection.createRange().parentElement());return t};Graph.prototype.getSelectedEditingElement=function(){for(var t=this.getSelectedElement();null!=t&&t.nodeType!=mxConstants.NODETYPE_ELEMENT;)t=t.parentNode;
null!=t&&t==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(t=this.cellEditor.textarea.firstChild);return t};Graph.prototype.getParentByName=function(t,z,A){for(;null!=t&&t.nodeName!=z;){if(t==A)return null;t=t.parentNode}return t};Graph.prototype.getParentByNames=function(t,z,A){for(;null!=t&&!(0<=mxUtils.indexOf(z,t.nodeName));){if(t==A)return null;t=t.parentNode}return t};Graph.prototype.selectNode=
function(t){var z=null;if(window.getSelection){if(z=window.getSelection(),z.getRangeAt&&z.rangeCount){var A=document.createRange();A.selectNode(t);z.removeAllRanges();z.addRange(A)}}else(z=document.selection)&&"Control"!=z.type&&(t=z.createRange(),t.collapse(!0),A=z.createRange(),A.setEndPoint("StartToStart",t),A.select())};Graph.prototype.flipEdgePoints=function(t,z,A){var E=this.getCellGeometry(t);if(null!=E){E=E.clone();if(null!=E.points)for(var H=0;H<E.points.length;H++)z?E.points[H].x=A+(A-E.points[H].x):
-E.points[H].y=A+(A-E.points[H].y);H=function(K){null!=K&&(z?K.x=A+(A-K.x):K.y=A+(A-K.y))};H(E.getTerminalPoint(!0));H(E.getTerminalPoint(!1));this.model.setGeometry(t,E)}};Graph.prototype.flipChildren=function(t,z,A){this.model.beginUpdate();try{for(var E=this.model.getChildCount(t),H=0;H<E;H++){var K=this.model.getChildAt(t,H);if(this.model.isEdge(K))this.flipEdgePoints(K,z,A);else{var X=this.getCellGeometry(K);null!=X&&(X=X.clone(),z?X.x=A+(A-X.x-X.width):X.y=A+(A-X.y-X.height),this.model.setGeometry(K,
-X))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(t,z){this.model.beginUpdate();try{t=this.model.getTopmostCells(t);for(var A=[],E=0;E<t.length;E++)if(this.model.isEdge(t[E])){var H=this.view.getState(t[E]);null!=H&&this.flipEdgePoints(t[E],z,(z?H.getCenterX():H.getCenterY())/this.view.scale-(z?H.origin.x:H.origin.y)-(z?this.view.translate.x:this.view.translate.y))}else{var K=this.getCellGeometry(t[E]);null!=K&&this.flipChildren(t[E],z,z?K.getCenterX()-K.x:K.getCenterY()-K.y);
-A.push(t[E])}this.toggleCellStyles(z?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,A)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(t,z){var A=null;if(null!=t&&0<t.length){this.model.beginUpdate();try{for(var E=0;E<t.length;E++){var H=this.model.getParent(t[E]);if(this.isTable(H)){var K=this.getCellGeometry(t[E]),X=this.getCellGeometry(H);null!=K&&null!=X&&(X=X.clone(),X.height-=K.height,this.model.setGeometry(H,X))}}var ja=this.selectParentAfterDelete?this.model.getParents(t):
-null;this.removeCells(t,z)}finally{this.model.endUpdate()}if(null!=ja)for(A=[],E=0;E<ja.length;E++)this.model.contains(ja[E])&&(this.model.isVertex(ja[E])||this.model.isEdge(ja[E]))&&A.push(ja[E])}return A};Graph.prototype.insertTableColumn=function(t,z){var A=this.getModel();A.beginUpdate();try{var E=t,H=0;if(this.isTableCell(t)){var K=A.getParent(t);E=A.getParent(K);H=mxUtils.indexOf(A.getChildCells(K,!0),t)}else this.isTableRow(t)?E=A.getParent(t):t=A.getChildCells(E,!0)[0],z||(H=A.getChildCells(t,
-!0).length-1);var X=A.getChildCells(E,!0),ja=Graph.minTableColumnWidth;for(t=0;t<X.length;t++){var ea=A.getChildCells(X[t],!0)[H],ka=A.cloneCell(ea,!1),ta=this.getCellGeometry(ka);ka.value=null;ka.style=mxUtils.setStyle(mxUtils.setStyle(ka.style,"rowspan",null),"colspan",null);if(null!=ta){null!=ta.alternateBounds&&(ta.width=ta.alternateBounds.width,ta.height=ta.alternateBounds.height,ta.alternateBounds=null);ja=ta.width;var Aa=this.getCellGeometry(X[t]);null!=Aa&&(ta.height=Aa.height)}A.add(X[t],
-ka,H+(z?0:1))}var Ea=this.getCellGeometry(E);null!=Ea&&(Ea=Ea.clone(),Ea.width+=ja,A.setGeometry(E,Ea))}finally{A.endUpdate()}};Graph.prototype.deleteLane=function(t){var z=this.getModel();z.beginUpdate();try{var A=null;A="stackLayout"==this.getCurrentCellStyle(t).childLayout?t:z.getParent(t);var E=z.getChildCells(A,!0);0==E.length?z.remove(A):(A==t&&(t=E[E.length-1]),z.remove(t))}finally{z.endUpdate()}};Graph.prototype.insertLane=function(t,z){var A=this.getModel();A.beginUpdate();try{var E=null;
-if("stackLayout"==this.getCurrentCellStyle(t).childLayout){E=t;var H=A.getChildCells(E,!0);t=H[z?0:H.length-1]}else E=A.getParent(t);var K=E.getIndex(t);t=A.cloneCell(t,!1);t.value=null;A.add(E,t,K+(z?0:1))}finally{A.endUpdate()}};Graph.prototype.insertTableRow=function(t,z){var A=this.getModel();A.beginUpdate();try{var E=t,H=t;if(this.isTableCell(t))H=A.getParent(t),E=A.getParent(H);else if(this.isTableRow(t))E=A.getParent(t);else{var K=A.getChildCells(E,!0);H=K[z?0:K.length-1]}var X=A.getChildCells(H,
-!0),ja=E.getIndex(H);H=A.cloneCell(H,!1);H.value=null;var ea=this.getCellGeometry(H);if(null!=ea){for(K=0;K<X.length;K++){t=A.cloneCell(X[K],!1);t.value=null;t.style=mxUtils.setStyle(mxUtils.setStyle(t.style,"rowspan",null),"colspan",null);var ka=this.getCellGeometry(t);null!=ka&&(null!=ka.alternateBounds&&(ka.width=ka.alternateBounds.width,ka.height=ka.alternateBounds.height,ka.alternateBounds=null),ka.height=ea.height);H.insert(t)}A.add(E,H,ja+(z?0:1));var ta=this.getCellGeometry(E);null!=ta&&(ta=
-ta.clone(),ta.height+=ea.height,A.setGeometry(E,ta))}}finally{A.endUpdate()}};Graph.prototype.deleteTableColumn=function(t){var z=this.getModel();z.beginUpdate();try{var A=t,E=t;this.isTableCell(t)&&(E=z.getParent(t));this.isTableRow(E)&&(A=z.getParent(E));var H=z.getChildCells(A,!0);if(0==H.length)z.remove(A);else{this.isTableRow(E)||(E=H[0]);var K=z.getChildCells(E,!0);if(1>=K.length)z.remove(A);else{var X=K.length-1;this.isTableCell(t)&&(X=mxUtils.indexOf(K,t));for(E=t=0;E<H.length;E++){var ja=
-z.getChildCells(H[E],!0)[X];z.remove(ja);var ea=this.getCellGeometry(ja);null!=ea&&(t=Math.max(t,ea.width))}var ka=this.getCellGeometry(A);null!=ka&&(ka=ka.clone(),ka.width-=t,z.setGeometry(A,ka))}}}finally{z.endUpdate()}};Graph.prototype.deleteTableRow=function(t){var z=this.getModel();z.beginUpdate();try{var A=t,E=t;this.isTableCell(t)&&(t=E=z.getParent(t));this.isTableRow(t)&&(A=z.getParent(E));var H=z.getChildCells(A,!0);if(1>=H.length)z.remove(A);else{this.isTableRow(E)||(E=H[H.length-1]);z.remove(E);
-t=0;var K=this.getCellGeometry(E);null!=K&&(t=K.height);var X=this.getCellGeometry(A);null!=X&&(X=X.clone(),X.height-=t,z.setGeometry(A,X))}}finally{z.endUpdate()}};Graph.prototype.insertRow=function(t,z){for(var A=t.tBodies[0],E=A.rows[0].cells,H=t=0;H<E.length;H++){var K=E[H].getAttribute("colspan");t+=null!=K?parseInt(K):1}z=A.insertRow(z);for(H=0;H<t;H++)mxUtils.br(z.insertCell(-1));return z.cells[0]};Graph.prototype.deleteRow=function(t,z){t.tBodies[0].deleteRow(z)};Graph.prototype.insertColumn=
+E.points[H].y=A+(A-E.points[H].y);H=function(L){null!=L&&(z?L.x=A+(A-L.x):L.y=A+(A-L.y))};H(E.getTerminalPoint(!0));H(E.getTerminalPoint(!1));this.model.setGeometry(t,E)}};Graph.prototype.flipChildren=function(t,z,A){this.model.beginUpdate();try{for(var E=this.model.getChildCount(t),H=0;H<E;H++){var L=this.model.getChildAt(t,H);if(this.model.isEdge(L))this.flipEdgePoints(L,z,A);else{var W=this.getCellGeometry(L);null!=W&&(W=W.clone(),z?W.x=A+(A-W.x-W.width):W.y=A+(A-W.y-W.height),this.model.setGeometry(L,
+W))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(t,z){this.model.beginUpdate();try{t=this.model.getTopmostCells(t);for(var A=[],E=0;E<t.length;E++)if(this.model.isEdge(t[E])){var H=this.view.getState(t[E]);null!=H&&this.flipEdgePoints(t[E],z,(z?H.getCenterX():H.getCenterY())/this.view.scale-(z?H.origin.x:H.origin.y)-(z?this.view.translate.x:this.view.translate.y))}else{var L=this.getCellGeometry(t[E]);null!=L&&this.flipChildren(t[E],z,z?L.getCenterX()-L.x:L.getCenterY()-L.y);
+A.push(t[E])}this.toggleCellStyles(z?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,A)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(t,z){var A=null;if(null!=t&&0<t.length){this.model.beginUpdate();try{for(var E=0;E<t.length;E++){var H=this.model.getParent(t[E]);if(this.isTable(H)){var L=this.getCellGeometry(t[E]),W=this.getCellGeometry(H);null!=L&&null!=W&&(W=W.clone(),W.height-=L.height,this.model.setGeometry(H,W))}}var ha=this.selectParentAfterDelete?this.model.getParents(t):
+null;this.removeCells(t,z)}finally{this.model.endUpdate()}if(null!=ha)for(A=[],E=0;E<ha.length;E++)this.model.contains(ha[E])&&(this.model.isVertex(ha[E])||this.model.isEdge(ha[E]))&&A.push(ha[E])}return A};Graph.prototype.insertTableColumn=function(t,z){var A=this.getModel();A.beginUpdate();try{var E=t,H=0;if(this.isTableCell(t)){var L=A.getParent(t);E=A.getParent(L);H=mxUtils.indexOf(A.getChildCells(L,!0),t)}else this.isTableRow(t)?E=A.getParent(t):t=A.getChildCells(E,!0)[0],z||(H=A.getChildCells(t,
+!0).length-1);var W=A.getChildCells(E,!0),ha=Graph.minTableColumnWidth;for(t=0;t<W.length;t++){var fa=A.getChildCells(W[t],!0)[H],ja=A.cloneCell(fa,!1),ua=this.getCellGeometry(ja);ja.value=null;ja.style=mxUtils.setStyle(mxUtils.setStyle(ja.style,"rowspan",null),"colspan",null);if(null!=ua){null!=ua.alternateBounds&&(ua.width=ua.alternateBounds.width,ua.height=ua.alternateBounds.height,ua.alternateBounds=null);ha=ua.width;var Aa=this.getCellGeometry(W[t]);null!=Aa&&(ua.height=Aa.height)}A.add(W[t],
+ja,H+(z?0:1))}var Ea=this.getCellGeometry(E);null!=Ea&&(Ea=Ea.clone(),Ea.width+=ha,A.setGeometry(E,Ea))}finally{A.endUpdate()}};Graph.prototype.deleteLane=function(t){var z=this.getModel();z.beginUpdate();try{var A=null;A="stackLayout"==this.getCurrentCellStyle(t).childLayout?t:z.getParent(t);var E=z.getChildCells(A,!0);0==E.length?z.remove(A):(A==t&&(t=E[E.length-1]),z.remove(t))}finally{z.endUpdate()}};Graph.prototype.insertLane=function(t,z){var A=this.getModel();A.beginUpdate();try{var E=null;
+if("stackLayout"==this.getCurrentCellStyle(t).childLayout){E=t;var H=A.getChildCells(E,!0);t=H[z?0:H.length-1]}else E=A.getParent(t);var L=E.getIndex(t);t=A.cloneCell(t,!1);t.value=null;A.add(E,t,L+(z?0:1))}finally{A.endUpdate()}};Graph.prototype.insertTableRow=function(t,z){var A=this.getModel();A.beginUpdate();try{var E=t,H=t;if(this.isTableCell(t))H=A.getParent(t),E=A.getParent(H);else if(this.isTableRow(t))E=A.getParent(t);else{var L=A.getChildCells(E,!0);H=L[z?0:L.length-1]}var W=A.getChildCells(H,
+!0),ha=E.getIndex(H);H=A.cloneCell(H,!1);H.value=null;var fa=this.getCellGeometry(H);if(null!=fa){for(L=0;L<W.length;L++){t=A.cloneCell(W[L],!1);t.value=null;t.style=mxUtils.setStyle(mxUtils.setStyle(t.style,"rowspan",null),"colspan",null);var ja=this.getCellGeometry(t);null!=ja&&(null!=ja.alternateBounds&&(ja.width=ja.alternateBounds.width,ja.height=ja.alternateBounds.height,ja.alternateBounds=null),ja.height=fa.height);H.insert(t)}A.add(E,H,ha+(z?0:1));var ua=this.getCellGeometry(E);null!=ua&&(ua=
+ua.clone(),ua.height+=fa.height,A.setGeometry(E,ua))}}finally{A.endUpdate()}};Graph.prototype.deleteTableColumn=function(t){var z=this.getModel();z.beginUpdate();try{var A=t,E=t;this.isTableCell(t)&&(E=z.getParent(t));this.isTableRow(E)&&(A=z.getParent(E));var H=z.getChildCells(A,!0);if(0==H.length)z.remove(A);else{this.isTableRow(E)||(E=H[0]);var L=z.getChildCells(E,!0);if(1>=L.length)z.remove(A);else{var W=L.length-1;this.isTableCell(t)&&(W=mxUtils.indexOf(L,t));for(E=t=0;E<H.length;E++){var ha=
+z.getChildCells(H[E],!0)[W];z.remove(ha);var fa=this.getCellGeometry(ha);null!=fa&&(t=Math.max(t,fa.width))}var ja=this.getCellGeometry(A);null!=ja&&(ja=ja.clone(),ja.width-=t,z.setGeometry(A,ja))}}}finally{z.endUpdate()}};Graph.prototype.deleteTableRow=function(t){var z=this.getModel();z.beginUpdate();try{var A=t,E=t;this.isTableCell(t)&&(t=E=z.getParent(t));this.isTableRow(t)&&(A=z.getParent(E));var H=z.getChildCells(A,!0);if(1>=H.length)z.remove(A);else{this.isTableRow(E)||(E=H[H.length-1]);z.remove(E);
+t=0;var L=this.getCellGeometry(E);null!=L&&(t=L.height);var W=this.getCellGeometry(A);null!=W&&(W=W.clone(),W.height-=t,z.setGeometry(A,W))}}finally{z.endUpdate()}};Graph.prototype.insertRow=function(t,z){for(var A=t.tBodies[0],E=A.rows[0].cells,H=t=0;H<E.length;H++){var L=E[H].getAttribute("colspan");t+=null!=L?parseInt(L):1}z=A.insertRow(z);for(H=0;H<t;H++)mxUtils.br(z.insertCell(-1));return z.cells[0]};Graph.prototype.deleteRow=function(t,z){t.tBodies[0].deleteRow(z)};Graph.prototype.insertColumn=
function(t,z){var A=t.tHead;if(null!=A)for(var E=0;E<A.rows.length;E++){var H=document.createElement("th");A.rows[E].appendChild(H);mxUtils.br(H)}t=t.tBodies[0];for(A=0;A<t.rows.length;A++)E=t.rows[A].insertCell(z),mxUtils.br(E);return t.rows[0].cells[0<=z?z:t.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(t,z){if(0<=z){t=t.tBodies[0].rows;for(var A=0;A<t.length;A++)t[A].cells.length>z&&t[A].deleteCell(z)}};Graph.prototype.pasteHtmlAtCaret=function(t){if(window.getSelection){var z=
-window.getSelection();if(z.getRangeAt&&z.rangeCount){z=z.getRangeAt(0);z.deleteContents();var A=document.createElement("div");A.innerHTML=t;t=document.createDocumentFragment();for(var E;E=A.firstChild;)lastNode=t.appendChild(E);z.insertNode(t)}}else(z=document.selection)&&"Control"!=z.type&&z.createRange().pasteHTML(t)};Graph.prototype.createLinkForHint=function(t,z){function A(H,K){H.length>K&&(H=H.substring(0,Math.round(K/2))+"..."+H.substring(H.length-Math.round(K/4)));return H}t=null!=t?t:"javascript:void(0);";
+window.getSelection();if(z.getRangeAt&&z.rangeCount){z=z.getRangeAt(0);z.deleteContents();var A=document.createElement("div");A.innerHTML=t;t=document.createDocumentFragment();for(var E;E=A.firstChild;)lastNode=t.appendChild(E);z.insertNode(t)}}else(z=document.selection)&&"Control"!=z.type&&z.createRange().pasteHTML(t)};Graph.prototype.createLinkForHint=function(t,z){function A(H,L){H.length>L&&(H=H.substring(0,Math.round(L/2))+"..."+H.substring(H.length-Math.round(L/4)));return H}t=null!=t?t:"javascript:void(0);";
if(null==z||0==z.length)z=this.isCustomLink(t)?this.getLinkTitle(t):t;var E=document.createElement("a");E.setAttribute("rel",this.linkRelation);E.setAttribute("href",this.getAbsoluteUrl(t));E.setAttribute("title",A(this.isCustomLink(t)?this.getLinkTitle(t):t,80));null!=this.linkTarget&&E.setAttribute("target",this.linkTarget);mxUtils.write(E,A(z,40));this.isCustomLink(t)&&mxEvent.addListener(E,"click",mxUtils.bind(this,function(H){this.customLinkClicked(t);mxEvent.consume(H)}));return E};Graph.prototype.initTouch=
-function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(K,X){this.popupMenuHandler.hideMenu()});var t=this.updateMouseEvent;this.updateMouseEvent=function(K){K=t.apply(this,arguments);if(mxEvent.isTouchEvent(K.getEvent())&&null==K.getState()){var X=this.getCellAt(K.graphX,K.graphY);null!=X&&this.isSwimlane(X)&&this.hitsSwimlaneContent(X,K.graphX,K.graphY)||(K.state=this.view.getState(X),null!=K.state&&
-null!=K.state.shape&&(this.container.style.cursor=K.state.shape.node.style.cursor))}null==K.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return K};var z=!1,A=!1,E=!1,H=this.fireMouseEvent;this.fireMouseEvent=function(K,X,ja){K==mxEvent.MOUSE_DOWN&&(X=this.updateMouseEvent(X),z=this.isCellSelected(X.getCell()),A=this.isSelectionEmpty(),E=this.popupMenuHandler.isMenuShowing());H.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(K,X){var ja=mxEvent.isMouseEvent(X.getEvent());
-this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==X.getState()||!X.isSource(X.getState().control))&&(this.popupMenuHandler.popupTrigger||!E&&!ja&&(A&&null==X.getCell()&&this.isSelectionEmpty()||z&&this.isCellSelected(X.getCell())));ja=!z||ja?null:mxUtils.bind(this,function(ea){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var ka=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(X.getX()+ka.x+1,X.getY()+ka.y+1,ea,X.getEvent())}}),500)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,
-[K,X,ja])})};mxCellEditor.prototype.isContentEditing=function(){var t=this.graph.view.getState(this.editingCell);return null!=t&&1==t.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var t="";window.getSelection?t=window.getSelection():document.getSelection?t=document.getSelection():document.selection&&(t=document.selection.createRange().text);
+function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(L,W){this.popupMenuHandler.hideMenu()});var t=this.updateMouseEvent;this.updateMouseEvent=function(L){L=t.apply(this,arguments);if(mxEvent.isTouchEvent(L.getEvent())&&null==L.getState()){var W=this.getCellAt(L.graphX,L.graphY);null!=W&&this.isSwimlane(W)&&this.hitsSwimlaneContent(W,L.graphX,L.graphY)||(L.state=this.view.getState(W),null!=L.state&&
+null!=L.state.shape&&(this.container.style.cursor=L.state.shape.node.style.cursor))}null==L.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return L};var z=!1,A=!1,E=!1,H=this.fireMouseEvent;this.fireMouseEvent=function(L,W,ha){L==mxEvent.MOUSE_DOWN&&(W=this.updateMouseEvent(W),z=this.isCellSelected(W.getCell()),A=this.isSelectionEmpty(),E=this.popupMenuHandler.isMenuShowing());H.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(L,W){var ha=mxEvent.isMouseEvent(W.getEvent());
+this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==W.getState()||!W.isSource(W.getState().control))&&(this.popupMenuHandler.popupTrigger||!E&&!ha&&(A&&null==W.getCell()&&this.isSelectionEmpty()||z&&this.isCellSelected(W.getCell())));ha=!z||ha?null:mxUtils.bind(this,function(fa){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var ja=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(W.getX()+ja.x+1,W.getY()+ja.y+1,fa,W.getEvent())}}),500)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,
+[L,W,ha])})};mxCellEditor.prototype.isContentEditing=function(){var t=this.graph.view.getState(this.editingCell);return null!=t&&1==t.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var t="";window.getSelection?t=window.getSelection():document.getSelection?t=document.getSelection():document.selection&&(t=document.selection.createRange().text);
return""!=t};mxCellEditor.prototype.insertTab=function(t){var z=this.textarea.ownerDocument.defaultView.getSelection(),A=z.getRangeAt(0),E="\t";if(null!=t)for(E="";0<t;)E+=" ",t--;t=document.createElement("span");t.style.whiteSpace="pre";t.appendChild(document.createTextNode(E));A.insertNode(t);A.setStartAfter(t);A.setEndAfter(t);z.removeAllRanges();z.addRange(A)};mxCellEditor.prototype.alignText=function(t,z){var A=null!=z&&mxEvent.isShiftDown(z);if(A||null!=window.getSelection&&null!=window.getSelection().containsNode){var E=
!0;this.graph.processElements(this.textarea,function(H){A||window.getSelection().containsNode(H,!0)?(H.removeAttribute("align"),H.style.textAlign=null):E=!1});E&&this.graph.cellEditor.setAlign(t)}document.execCommand("justify"+t.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var t=window.getSelection();if(t.getRangeAt&&t.rangeCount){for(var z=[],A=0,E=t.rangeCount;A<E;++A)z.push(t.getRangeAt(A));return z}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();
-return null};mxCellEditor.prototype.restoreSelection=function(t){try{if(t)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var z=0,A=t.length;z<A;++z)sel.addRange(t[z])}else document.selection&&t.select&&t.select()}catch(E){}};var G=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(t){null!=t.text&&(t.text.replaceLinefeeds="0"!=mxUtils.getValue(t.style,"nl2Br","1"));G.apply(this,arguments)};var J=mxConstraintHandler.prototype.update;
+return null};mxCellEditor.prototype.restoreSelection=function(t){try{if(t)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var z=0,A=t.length;z<A;++z)sel.addRange(t[z])}else document.selection&&t.select&&t.select()}catch(E){}};var F=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(t){null!=t.text&&(t.text.replaceLinefeeds="0"!=mxUtils.getValue(t.style,"nl2Br","1"));F.apply(this,arguments)};var J=mxConstraintHandler.prototype.update;
mxConstraintHandler.prototype.update=function(t,z){this.isKeepFocusEvent(t)||!mxEvent.isAltDown(t.getEvent())?J.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(t){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var D=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(t,z){t=this.graph.getStartEditingCell(t,z);D.apply(this,arguments);var A=this.graph.view.getState(t);
this.textarea.className=null!=A&&1==A.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(t);A=this.graph.getModel().getParent(t);var E=this.graph.getCellGeometry(t);if(this.graph.getModel().isEdge(A)&&null!=E&&E.relative||this.graph.getModel().isEdge(t))this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var N=mxCellEditor.prototype.installListeners;
-mxCellEditor.prototype.installListeners=function(t){function z(H,K){K.originalNode=H;H=H.firstChild;for(var X=K.firstChild;null!=H&&null!=X;)z(H,X),H=H.nextSibling,X=X.nextSibling;return K}function A(H,K){if(null!=H)if(K.originalNode!=H)E(H);else for(H=H.firstChild,K=K.firstChild;null!=H;){var X=H.nextSibling;null==K?E(H):(A(H,K),K=K.nextSibling);H=X}}function E(H){for(var K=H.firstChild;null!=K;){var X=K.nextSibling;E(K);K=X}1==H.nodeType&&("BR"===H.nodeName||null!=H.firstChild)||3==H.nodeType&&
-0!=mxUtils.trim(mxUtils.getTextContent(H)).length?(3==H.nodeType&&mxUtils.setTextContent(H,mxUtils.getTextContent(H).replace(/\n|\r/g,"")),1==H.nodeType&&(H.removeAttribute("style"),H.removeAttribute("class"),H.removeAttribute("width"),H.removeAttribute("cellpadding"),H.removeAttribute("cellspacing"),H.removeAttribute("border"))):H.parentNode.removeChild(H)}N.apply(this,arguments);7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(H){var K=
-z(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?A(this.textarea,K):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var t=this.graph.view.getState(this.editingCell);if(null!=t){var z=null!=t&&"0"!=mxUtils.getValue(t.style,"nl2Br","1"),A=this.saveSelection();if(this.codeViewMode){ja=
-mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<ja.length&&"\n"==ja.charAt(ja.length-1)&&(ja=ja.substring(0,ja.length-1));ja=this.graph.sanitizeHtml(z?ja.replace(/\n/g,"<br/>"):ja,!0);this.textarea.className="mxCellEditor geContentEditable";ea=mxUtils.getValue(t.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);z=mxUtils.getValue(t.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var E=mxUtils.getValue(t.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),
-H=(mxUtils.getValue(t.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,K=(mxUtils.getValue(t.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,X=[];(mxUtils.getValue(t.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&X.push("underline");(mxUtils.getValue(t.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&X.push("line-through");this.textarea.style.lineHeight=
-mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ea*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ea)+"px";this.textarea.style.textDecoration=X.join(" ");this.textarea.style.fontWeight=H?"bold":"normal";this.textarea.style.fontStyle=K?"italic":"";this.textarea.style.fontFamily=z;this.textarea.style.textAlign=E;this.textarea.style.padding="0px";this.textarea.innerHTML!=ja&&(this.textarea.innerHTML=ja,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=
-this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerText="");var ja=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(ja=mxUtils.replaceTrailingNewlines(ja,"<div><br></div>"));ja=this.graph.sanitizeHtml(z?ja.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):ja,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";
-var ea=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ea*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ea)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=
-ja&&(this.textarea.innerHTML=ja);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=A;this.resize()}};var Q=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(t,z){if(null!=this.textarea)if(t=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=t){var A=t.view.scale;this.bounds=mxRectangle.fromRectangle(t);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=
+mxCellEditor.prototype.installListeners=function(t){function z(H,L){L.originalNode=H;H=H.firstChild;for(var W=L.firstChild;null!=H&&null!=W;)z(H,W),H=H.nextSibling,W=W.nextSibling;return L}function A(H,L){if(null!=H)if(L.originalNode!=H)E(H);else for(H=H.firstChild,L=L.firstChild;null!=H;){var W=H.nextSibling;null==L?E(H):(A(H,L),L=L.nextSibling);H=W}}function E(H){for(var L=H.firstChild;null!=L;){var W=L.nextSibling;E(L);L=W}1==H.nodeType&&("BR"===H.nodeName||null!=H.firstChild)||3==H.nodeType&&
+0!=mxUtils.trim(mxUtils.getTextContent(H)).length?(3==H.nodeType&&mxUtils.setTextContent(H,mxUtils.getTextContent(H).replace(/\n|\r/g,"")),1==H.nodeType&&(H.removeAttribute("style"),H.removeAttribute("class"),H.removeAttribute("width"),H.removeAttribute("cellpadding"),H.removeAttribute("cellspacing"),H.removeAttribute("border"))):H.parentNode.removeChild(H)}N.apply(this,arguments);7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(H){var L=
+z(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?A(this.textarea,L):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var t=this.graph.view.getState(this.editingCell);if(null!=t){var z=null!=t&&"0"!=mxUtils.getValue(t.style,"nl2Br","1"),A=this.saveSelection();if(this.codeViewMode){ha=
+mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<ha.length&&"\n"==ha.charAt(ha.length-1)&&(ha=ha.substring(0,ha.length-1));ha=this.graph.sanitizeHtml(z?ha.replace(/\n/g,"<br/>"):ha,!0);this.textarea.className="mxCellEditor geContentEditable";fa=mxUtils.getValue(t.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);z=mxUtils.getValue(t.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var E=mxUtils.getValue(t.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),
+H=(mxUtils.getValue(t.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,L=(mxUtils.getValue(t.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,W=[];(mxUtils.getValue(t.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&W.push("underline");(mxUtils.getValue(t.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&W.push("line-through");this.textarea.style.lineHeight=
+mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(fa*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(fa)+"px";this.textarea.style.textDecoration=W.join(" ");this.textarea.style.fontWeight=H?"bold":"normal";this.textarea.style.fontStyle=L?"italic":"";this.textarea.style.fontFamily=z;this.textarea.style.textAlign=E;this.textarea.style.padding="0px";this.textarea.innerHTML!=ha&&(this.textarea.innerHTML=ha,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=
+this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerText="");var ha=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(ha=mxUtils.replaceTrailingNewlines(ha,"<div><br></div>"));ha=this.graph.sanitizeHtml(z?ha.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):ha,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";
+var fa=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(fa*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(fa)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=
+ha&&(this.textarea.innerHTML=ha);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=A;this.resize()}};var S=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(t,z){if(null!=this.textarea)if(t=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=t){var A=t.view.scale;this.bounds=mxRectangle.fromRectangle(t);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=
160*A;this.bounds.height=60*A;var E=null!=t.text?t.text.margin:null;null==E&&(E=mxUtils.getAlignmentAsPoint(mxUtils.getValue(t.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(t.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=E.x*this.bounds.width;this.bounds.y+=E.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/A)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/A)+"px";this.textarea.style.overflow=
"auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/A)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*A);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/A)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*A);this.textarea.style.left=Math.round(this.bounds.x)+
-"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+A+","+A+")")}else this.textarea.style.height="",this.textarea.style.overflow="",Q.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(t,z){if("0"==mxUtils.getValue(t.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var A=this.graph.getEditingValue(t.cell,z);"1"==
+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+A+","+A+")")}else this.textarea.style.height="",this.textarea.style.overflow="",S.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(t,z){if("0"==mxUtils.getValue(t.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var A=this.graph.getEditingValue(t.cell,z);"1"==
mxUtils.getValue(t.style,"nl2Br","1")&&(A=A.replace(/\n/g,"<br/>"));return A=this.graph.sanitizeHtml(A,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(t){if("0"==mxUtils.getValue(t.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var z=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return z="1"==mxUtils.getValue(t.style,"nl2Br","1")?z.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):z.replace(/\r\n/g,
-"").replace(/\n/g,"")};var R=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(t){this.codeViewMode&&this.toggleViewMode();R.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(t){}};var P=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(t,z){this.graph.getModel().beginUpdate();try{P.apply(this,arguments),""==z&&this.graph.isCellDeletable(t.cell)&&0==this.graph.model.getChildCount(t.cell)&&
+"").replace(/\n/g,"")};var T=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(t){this.codeViewMode&&this.toggleViewMode();T.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(t){}};var P=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(t,z){this.graph.getModel().beginUpdate();try{P.apply(this,arguments),""==z&&this.graph.isCellDeletable(t.cell)&&0==this.graph.model.getChildCount(t.cell)&&
this.graph.isTransparentState(t)&&this.graph.removeCells([t.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(t){var z=mxUtils.getValue(t.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=z&&z!=mxConstants.NONE||!(null!=t.cell.geometry&&0<t.cell.geometry.width)||0==mxUtils.getValue(t.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(t.style,mxConstants.STYLE_HORIZONTAL,1)||(z=mxUtils.getValue(t.style,mxConstants.STYLE_FILLCOLOR,
null));z==mxConstants.NONE&&(z=null);return z};mxCellEditor.prototype.getBorderColor=function(t){var z=mxUtils.getValue(t.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);null!=z&&z!=mxConstants.NONE||!(null!=t.cell.geometry&&0<t.cell.geometry.width)||0==mxUtils.getValue(t.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(t.style,mxConstants.STYLE_HORIZONTAL,1)||(z=mxUtils.getValue(t.style,mxConstants.STYLE_STROKECOLOR,null));z==mxConstants.NONE&&(z=null);return z};mxCellEditor.prototype.getMinimumSize=
function(t){var z=this.graph.getView().scale;return new mxRectangle(0,0,null==t.text?30:t.text.size*z+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(t,z){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(z.getEvent)};mxGraphView.prototype.formatUnitText=function(t){return t?b(t,this.unit):t};mxGraphHandler.prototype.updateHint=function(t){if(null!=this.pBounds&&(null!=this.shape||
this.livePreviewActive)){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var z=this.graph.view.translate,A=this.graph.view.scale;t=this.roundLength((this.bounds.x+this.currentDx)/A-z.x);z=this.roundLength((this.bounds.y+this.currentDy)/A-z.y);A=this.graph.view.unit;this.hint.innerHTML=b(t,A)+", "+b(z,A);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+
-Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var Z=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(t,z){Z.apply(this,arguments);var A=this.graph.getCellStyle(t);if(null==A.childLayout){var E=this.graph.model.getParent(t),H=null!=E?this.graph.getCellGeometry(E):null;if(null!=H&&(A=this.graph.getCellStyle(E),"stackLayout"==A.childLayout)){var K=parseFloat(mxUtils.getValue(A,
-"stackBorder",mxStackLayout.prototype.border));A="1"==mxUtils.getValue(A,"horizontalStack","1");var X=this.graph.getActualStartSize(E);H=H.clone();A?H.height=z.height+X.y+X.height+2*K:H.width=z.width+X.x+X.width+2*K;this.graph.model.setGeometry(E,H)}}};var U=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function t(ja){A.get(ja)||(A.put(ja,!0),H.push(ja))}for(var z=U.apply(this,arguments),A=new mxDictionary,E=this.graph.model,
-H=[],K=0;K<z.length;K++){var X=z[K];this.graph.isTableCell(X)?t(E.getParent(E.getParent(X))):this.graph.isTableRow(X)&&t(E.getParent(X));t(X)}return H};var V=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(t){var z=V.apply(this,arguments);z.stroke="#C0C0C0";z.strokewidth=1;return z};var ia=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(t){var z=ia.apply(this,arguments);
+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var Z=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(t,z){Z.apply(this,arguments);var A=this.graph.getCellStyle(t);if(null==A.childLayout){var E=this.graph.model.getParent(t),H=null!=E?this.graph.getCellGeometry(E):null;if(null!=H&&(A=this.graph.getCellStyle(E),"stackLayout"==A.childLayout)){var L=parseFloat(mxUtils.getValue(A,
+"stackBorder",mxStackLayout.prototype.border));A="1"==mxUtils.getValue(A,"horizontalStack","1");var W=this.graph.getActualStartSize(E);H=H.clone();A?H.height=z.height+W.y+W.height+2*L:H.width=z.width+W.x+W.width+2*L;this.graph.model.setGeometry(E,H)}}};var U=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function t(ha){A.get(ha)||(A.put(ha,!0),H.push(ha))}for(var z=U.apply(this,arguments),A=new mxDictionary,E=this.graph.model,
+H=[],L=0;L<z.length;L++){var W=z[L];this.graph.isTableCell(W)?t(E.getParent(E.getParent(W))):this.graph.isTableRow(W)&&t(E.getParent(W));t(W)}return H};var V=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(t){var z=V.apply(this,arguments);z.stroke="#C0C0C0";z.strokewidth=1;return z};var aa=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(t){var z=aa.apply(this,arguments);
z.stroke="#C0C0C0";z.strokewidth=1;return z};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var t=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+t.x/2,this.bounds.y+this.rotationHandleVSpacing-t.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(t,z){return this.graph.isRecursiveVertexResize(t)&&!mxEvent.isAltDown(z.getEvent())};mxVertexHandler.prototype.isCenteredEvent=
-function(t,z){return mxEvent.isControlDown(z.getEvent())||mxEvent.isMetaDown(z.getEvent())};var ha=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return ha.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 ba=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return ba.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var qa=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(t){return t.tableHandle||qa.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=
-function(){var t=0;this.graph.isTableRow(this.state.cell)?t=1:this.graph.isTableCell(this.state.cell)&&(t=2);return t};var O=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return O.apply(this,arguments).grow(-this.getSelectionBorderInset())};var S=null,F=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==S&&(S=mxCellRenderer.defaultShapes.tableLine);var t=F.apply(this,arguments);
-if(this.graph.isTable(this.state.cell)){var z=function(La,Ia,Fa){for(var Ga=[],Oa=0;Oa<La.length;Oa++){var Pa=La[Oa];Ga.push(null==Pa?null:new mxPoint((ea+Pa.x+Ia)*K,(ka+Pa.y+Fa)*K))}return Ga},A=this,E=this.graph,H=E.model,K=E.view.scale,X=this.state,ja=this.selectionBorder,ea=this.state.origin.x+E.view.translate.x,ka=this.state.origin.y+E.view.translate.y;null==t&&(t=[]);var ta=E.view.getCellStates(H.getChildCells(this.state.cell,!0));if(0<ta.length){var Aa=H.getChildCells(ta[0].cell,!0),Ea=E.getTableLines(this.state.cell,
-!1,!0),Ma=E.getTableLines(this.state.cell,!0,!1);for(H=0;H<ta.length;H++)mxUtils.bind(this,function(La){var Ia=ta[La],Fa=La<ta.length-1?ta[La+1]:null;Fa=null!=Fa?E.getCellGeometry(Fa.cell):null;var Ga=null!=Fa&&null!=Fa.alternateBounds?Fa.alternateBounds:Fa;Fa=null!=Ma[La]?new S(Ma[La],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);Fa.isDashed=ja.isDashed;Fa.svgStrokeTolerance++;Ia=new mxHandle(Ia,"row-resize",null,Fa);Ia.tableHandle=!0;var Oa=0;Ia.shape.node.parentNode.insertBefore(Ia.shape.node,
-Ia.shape.node.parentNode.firstChild);Ia.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Oa?mxConstants.NONE:ja.stroke;if(this.shape.constructor==S)this.shape.line=z(Ma[La],0,Oa),this.shape.updateBoundsFromLine();else{var Na=E.getActualStartSize(X.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+Oa*K;this.shape.bounds.x=X.x+(La==ta.length-1?0:Na.x*K);this.shape.bounds.width=X.width-(La==ta.length-1?0:Na.width+Na.x+K)}this.shape.redraw()}};var Pa=!1;
-Ia.setPosition=function(Na,Sa,eb){Oa=Math.max(Graph.minTableRowHeight-Na.height,Sa.y-Na.y-Na.height);Pa=mxEvent.isShiftDown(eb.getEvent());null!=Ga&&Pa&&(Oa=Math.min(Oa,Ga.height-Graph.minTableRowHeight))};Ia.execute=function(Na){if(0!=Oa)E.setTableRowHeight(this.state.cell,Oa,!Pa);else if(!A.blockDelayedSelection){var Sa=E.getCellAt(Na.getGraphX(),Na.getGraphY())||X.cell;E.graphHandler.selectCellForEvent(Sa,Na)}Oa=0};Ia.reset=function(){Oa=0};t.push(Ia)})(H);for(H=0;H<Aa.length;H++)mxUtils.bind(this,
-function(La){var Ia=E.view.getState(Aa[La]),Fa=E.getCellGeometry(Aa[La]),Ga=null!=Fa.alternateBounds?Fa.alternateBounds:Fa;null==Ia&&(Ia=new mxCellState(E.view,Aa[La],E.getCellStyle(Aa[La])),Ia.x=X.x+Fa.x*K,Ia.y=X.y+Fa.y*K,Ia.width=Ga.width*K,Ia.height=Ga.height*K,Ia.updateCachedBounds());Fa=La<Aa.length-1?Aa[La+1]:null;Fa=null!=Fa?E.getCellGeometry(Fa):null;var Oa=null!=Fa&&null!=Fa.alternateBounds?Fa.alternateBounds:Fa;Fa=null!=Ea[La]?new S(Ea[La],mxConstants.NONE,1):new mxLine(new mxRectangle,
-mxConstants.NONE,1,!0);Fa.isDashed=ja.isDashed;Fa.svgStrokeTolerance++;Ia=new mxHandle(Ia,"col-resize",null,Fa);Ia.tableHandle=!0;var Pa=0;Ia.shape.node.parentNode.insertBefore(Ia.shape.node,Ia.shape.node.parentNode.firstChild);Ia.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Pa?mxConstants.NONE:ja.stroke;if(this.shape.constructor==S)this.shape.line=z(Ea[La],Pa,0),this.shape.updateBoundsFromLine();else{var Sa=E.getActualStartSize(X.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=
-this.state.x+(Ga.width+Pa)*K;this.shape.bounds.y=X.y+(La==Aa.length-1?0:Sa.y*K);this.shape.bounds.height=X.height-(La==Aa.length-1?0:(Sa.height+Sa.y)*K)}this.shape.redraw()}};var Na=!1;Ia.setPosition=function(Sa,eb,ab){Pa=Math.max(Graph.minTableColumnWidth-Ga.width,eb.x-Sa.x-Ga.width);Na=mxEvent.isShiftDown(ab.getEvent());null==Oa||Na||(Pa=Math.min(Pa,Oa.width-Graph.minTableColumnWidth))};Ia.execute=function(Sa){if(0!=Pa)E.setTableColumnWidth(this.state.cell,Pa,Na);else if(!A.blockDelayedSelection){var eb=
-E.getCellAt(Sa.getGraphX(),Sa.getGraphY())||X.cell;E.graphHandler.selectCellForEvent(eb,Sa)}Pa=0};Ia.positionChanged=function(){};Ia.reset=function(){Pa=0};t.push(Ia)})(H)}}return null!=t?t.reverse():null};var L=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(t){L.apply(this,arguments);if(null!=this.moveHandles)for(var z=0;z<this.moveHandles.length;z++)this.moveHandles[z].style.visibility=t?"":"hidden";if(null!=this.cornerHandles)for(z=0;z<this.cornerHandles.length;z++)this.cornerHandles[z].node.style.visibility=
+function(t,z){return mxEvent.isControlDown(z.getEvent())||mxEvent.isMetaDown(z.getEvent())};var ia=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return ia.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 ea=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return ea.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var qa=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(t){return t.tableHandle||qa.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=
+function(){var t=0;this.graph.isTableRow(this.state.cell)?t=1:this.graph.isTableCell(this.state.cell)&&(t=2);return t};var O=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return O.apply(this,arguments).grow(-this.getSelectionBorderInset())};var R=null,G=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==R&&(R=mxCellRenderer.defaultShapes.tableLine);var t=G.apply(this,arguments);
+if(this.graph.isTable(this.state.cell)){var z=function(La,Ia,Fa){for(var Ga=[],Oa=0;Oa<La.length;Oa++){var Pa=La[Oa];Ga.push(null==Pa?null:new mxPoint((fa+Pa.x+Ia)*L,(ja+Pa.y+Fa)*L))}return Ga},A=this,E=this.graph,H=E.model,L=E.view.scale,W=this.state,ha=this.selectionBorder,fa=this.state.origin.x+E.view.translate.x,ja=this.state.origin.y+E.view.translate.y;null==t&&(t=[]);var ua=E.view.getCellStates(H.getChildCells(this.state.cell,!0));if(0<ua.length){var Aa=H.getChildCells(ua[0].cell,!0),Ea=E.getTableLines(this.state.cell,
+!1,!0),Ma=E.getTableLines(this.state.cell,!0,!1);for(H=0;H<ua.length;H++)mxUtils.bind(this,function(La){var Ia=ua[La],Fa=La<ua.length-1?ua[La+1]:null;Fa=null!=Fa?E.getCellGeometry(Fa.cell):null;var Ga=null!=Fa&&null!=Fa.alternateBounds?Fa.alternateBounds:Fa;Fa=null!=Ma[La]?new R(Ma[La],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);Fa.isDashed=ha.isDashed;Fa.svgStrokeTolerance++;Ia=new mxHandle(Ia,"row-resize",null,Fa);Ia.tableHandle=!0;var Oa=0;Ia.shape.node.parentNode.insertBefore(Ia.shape.node,
+Ia.shape.node.parentNode.firstChild);Ia.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Oa?mxConstants.NONE:ha.stroke;if(this.shape.constructor==R)this.shape.line=z(Ma[La],0,Oa),this.shape.updateBoundsFromLine();else{var Na=E.getActualStartSize(W.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+Oa*L;this.shape.bounds.x=W.x+(La==ua.length-1?0:Na.x*L);this.shape.bounds.width=W.width-(La==ua.length-1?0:Na.width+Na.x+L)}this.shape.redraw()}};var Pa=!1;
+Ia.setPosition=function(Na,Sa,eb){Oa=Math.max(Graph.minTableRowHeight-Na.height,Sa.y-Na.y-Na.height);Pa=mxEvent.isShiftDown(eb.getEvent());null!=Ga&&Pa&&(Oa=Math.min(Oa,Ga.height-Graph.minTableRowHeight))};Ia.execute=function(Na){if(0!=Oa)E.setTableRowHeight(this.state.cell,Oa,!Pa);else if(!A.blockDelayedSelection){var Sa=E.getCellAt(Na.getGraphX(),Na.getGraphY())||W.cell;E.graphHandler.selectCellForEvent(Sa,Na)}Oa=0};Ia.reset=function(){Oa=0};t.push(Ia)})(H);for(H=0;H<Aa.length;H++)mxUtils.bind(this,
+function(La){var Ia=E.view.getState(Aa[La]),Fa=E.getCellGeometry(Aa[La]),Ga=null!=Fa.alternateBounds?Fa.alternateBounds:Fa;null==Ia&&(Ia=new mxCellState(E.view,Aa[La],E.getCellStyle(Aa[La])),Ia.x=W.x+Fa.x*L,Ia.y=W.y+Fa.y*L,Ia.width=Ga.width*L,Ia.height=Ga.height*L,Ia.updateCachedBounds());Fa=La<Aa.length-1?Aa[La+1]:null;Fa=null!=Fa?E.getCellGeometry(Fa):null;var Oa=null!=Fa&&null!=Fa.alternateBounds?Fa.alternateBounds:Fa;Fa=null!=Ea[La]?new R(Ea[La],mxConstants.NONE,1):new mxLine(new mxRectangle,
+mxConstants.NONE,1,!0);Fa.isDashed=ha.isDashed;Fa.svgStrokeTolerance++;Ia=new mxHandle(Ia,"col-resize",null,Fa);Ia.tableHandle=!0;var Pa=0;Ia.shape.node.parentNode.insertBefore(Ia.shape.node,Ia.shape.node.parentNode.firstChild);Ia.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Pa?mxConstants.NONE:ha.stroke;if(this.shape.constructor==R)this.shape.line=z(Ea[La],Pa,0),this.shape.updateBoundsFromLine();else{var Sa=E.getActualStartSize(W.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=
+this.state.x+(Ga.width+Pa)*L;this.shape.bounds.y=W.y+(La==Aa.length-1?0:Sa.y*L);this.shape.bounds.height=W.height-(La==Aa.length-1?0:(Sa.height+Sa.y)*L)}this.shape.redraw()}};var Na=!1;Ia.setPosition=function(Sa,eb,ab){Pa=Math.max(Graph.minTableColumnWidth-Ga.width,eb.x-Sa.x-Ga.width);Na=mxEvent.isShiftDown(ab.getEvent());null==Oa||Na||(Pa=Math.min(Pa,Oa.width-Graph.minTableColumnWidth))};Ia.execute=function(Sa){if(0!=Pa)E.setTableColumnWidth(this.state.cell,Pa,Na);else if(!A.blockDelayedSelection){var eb=
+E.getCellAt(Sa.getGraphX(),Sa.getGraphY())||W.cell;E.graphHandler.selectCellForEvent(eb,Sa)}Pa=0};Ia.positionChanged=function(){};Ia.reset=function(){Pa=0};t.push(Ia)})(H)}}return null!=t?t.reverse():null};var K=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(t){K.apply(this,arguments);if(null!=this.moveHandles)for(var z=0;z<this.moveHandles.length;z++)this.moveHandles[z].style.visibility=t?"":"hidden";if(null!=this.cornerHandles)for(z=0;z<this.cornerHandles.length;z++)this.cornerHandles[z].node.style.visibility=
t?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=function(){var t=this.graph.model;if(null!=this.moveHandles){for(var z=0;z<this.moveHandles.length;z++)this.moveHandles[z].parentNode.removeChild(this.moveHandles[z]);this.moveHandles=null}this.moveHandles=[];for(z=0;z<t.getChildCount(this.state.cell);z++)mxUtils.bind(this,function(A){if(null!=A&&t.isVertex(A.cell)){var E=mxUtils.createImage(Editor.rowMoveImage);E.style.position="absolute";E.style.cursor="pointer";E.style.width="7px";E.style.height=
"4px";E.style.padding="4px 2px 4px 2px";E.rowState=A;mxEvent.addGestureListeners(E,mxUtils.bind(this,function(H){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(H)&&this.graph.isCellSelected(A.cell)||this.graph.selectCellForEvent(A.cell,H);mxEvent.isPopupTrigger(H)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(H),mxEvent.getClientY(H),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=
mxEvent.isMouseEvent(H),this.graph.isMouseDown=!0);mxEvent.consume(H)}),null,mxUtils.bind(this,function(H){mxEvent.isPopupTrigger(H)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(H),mxEvent.getClientY(H),A.cell,H),mxEvent.consume(H))}));this.moveHandles.push(E);this.graph.container.appendChild(E)}})(this.graph.view.getState(t.getChildAt(this.state.cell,z)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var t=0;t<this.customHandles.length;t++)this.customHandles[t].destroy();
-this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var T=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var t=new mxPoint(0,0),z=this.tolerance,A=this.state.style.shape;null==mxCellRenderer.defaultShapes[A]&&mxStencilRegistry.getStencil(A);A=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!A&&null!=this.customHandles)for(var E=0;E<this.customHandles.length;E++)if(null!=
-this.customHandles[E].shape&&null!=this.customHandles[E].shape.bounds){var H=this.customHandles[E].shape.bounds,K=H.getCenterX(),X=H.getCenterY();if(Math.abs(this.state.x-K)<H.width/2||Math.abs(this.state.y-X)<H.height/2||Math.abs(this.state.x+this.state.width-K)<H.width/2||Math.abs(this.state.y+this.state.height-X)<H.height/2){A=!0;break}}A&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(z/=2,this.graph.isTable(this.state.cell)&&(z+=7),t.x=this.sizers[0].bounds.width+z,t.y=this.sizers[0].bounds.height+
-z):t=T.apply(this,arguments);return t};mxVertexHandler.prototype.updateHint=function(t){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{t=this.state.view.scale;var z=this.state.view.unit;this.hint.innerHTML=b(this.roundLength(this.bounds.width/t),z)+" x "+b(this.roundLength(this.bounds.height/t),z)}t=mxUtils.getBoundingBox(this.bounds,
-null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==t&&(t=this.bounds);this.hint.style.left=t.x+Math.round((t.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=t.y+t.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var ca=mxEdgeHandler.prototype.mouseMove;
-mxEdgeHandler.prototype.mouseMove=function(t,z){ca.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};var fa=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(t,z){fa.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(t,z){null==this.hint&&
+this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var Q=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var t=new mxPoint(0,0),z=this.tolerance,A=this.state.style.shape;null==mxCellRenderer.defaultShapes[A]&&mxStencilRegistry.getStencil(A);A=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!A&&null!=this.customHandles)for(var E=0;E<this.customHandles.length;E++)if(null!=
+this.customHandles[E].shape&&null!=this.customHandles[E].shape.bounds){var H=this.customHandles[E].shape.bounds,L=H.getCenterX(),W=H.getCenterY();if(Math.abs(this.state.x-L)<H.width/2||Math.abs(this.state.y-W)<H.height/2||Math.abs(this.state.x+this.state.width-L)<H.width/2||Math.abs(this.state.y+this.state.height-W)<H.height/2){A=!0;break}}A&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(z/=2,this.graph.isTable(this.state.cell)&&(z+=7),t.x=this.sizers[0].bounds.width+z,t.y=this.sizers[0].bounds.height+
+z):t=Q.apply(this,arguments);return t};mxVertexHandler.prototype.updateHint=function(t){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{t=this.state.view.scale;var z=this.state.view.unit;this.hint.innerHTML=b(this.roundLength(this.bounds.width/t),z)+" x "+b(this.roundLength(this.bounds.height/t),z)}t=mxUtils.getBoundingBox(this.bounds,
+null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==t&&(t=this.bounds);this.hint.style.left=t.x+Math.round((t.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=t.y+t.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var ba=mxEdgeHandler.prototype.mouseMove;
+mxEdgeHandler.prototype.mouseMove=function(t,z){ba.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};var la=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(t,z){la.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(t,z){null==this.hint&&
(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var A=this.graph.view.translate,E=this.graph.view.scale,H=this.roundLength(z.x/E-A.x);A=this.roundLength(z.y/E-A.y);E=this.graph.view.unit;this.hint.innerHTML=b(H,E)+", "+b(A,E);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(H=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*H.x)+
"%, "+Math.round(100*H.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(t.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(t.getGraphY(),z.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};Graph.prototype.expandedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="50%" y1="0%" x2="50%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 2 4.5 L 7 4.5 z" stroke="#000"/>');
Graph.prototype.collapsedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 4.5 2 L 4.5 7 M 2 4.5 L 7 4.5 z" stroke="#000"/>');mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=
@@ -3205,30 +3208,30 @@ mxEdgeHandler.prototype.endHandleImage=HoverIcons.prototype.endMainHandle;mxEdge
HoverIcons.prototype.mainHandle;null!=window.Sidebar&&(Sidebar.prototype.triangleUp=HoverIcons.prototype.triangleUp,Sidebar.prototype.triangleRight=HoverIcons.prototype.triangleRight,Sidebar.prototype.triangleDown=HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.prototype.triangleLeft,Sidebar.prototype.refreshTarget=HoverIcons.prototype.refreshTarget,Sidebar.prototype.roundDrop=HoverIcons.prototype.roundDrop);mxVertexHandler.prototype.rotationEnabled=!0;mxVertexHandler.prototype.manageSizers=
!0;mxVertexHandler.prototype.livePreview=!0;mxGraphHandler.prototype.maxLivePreview=16;mxRubberband.prototype.defaultOpacity=30;mxConnectionHandler.prototype.outlineConnect=!0;mxCellHighlight.prototype.keepOnTop=!0;mxVertexHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.parentHighlightEnabled=!0;mxEdgeHandler.prototype.dblClickRemoveEnabled=!0;mxEdgeHandler.prototype.straightRemoveEnabled=!0;mxEdgeHandler.prototype.virtualBendsEnabled=!0;mxEdgeHandler.prototype.mergeRemoveEnabled=
!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(t){return!mxEvent.isShiftDown(t.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(t){return!mxEvent.isShiftDown(t.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=
-12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(t){return mxEvent.isMouseEvent(t.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(t){var z=t.getEvent();return null==t.getState()&&!mxEvent.isMouseEvent(z)||mxEvent.isPopupTrigger(z)&&(null==t.getState()||mxEvent.isControlDown(z)||mxEvent.isShiftDown(z))};var wa=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=
-function(t,z){wa.apply(this,arguments);mxEvent.isTouchEvent(z.getEvent())&&this.graph.isCellSelected(z.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(t){var z=t.getEvent();return mxEvent.isLeftMouseButton(z)&&(this.useLeftButtonForPanning&&null==t.getState()||mxEvent.isControlDown(z)&&!mxEvent.isShiftDown(z))||this.usePopupTrigger&&mxEvent.isPopupTrigger(z)};mxRubberband.prototype.isSpaceEvent=function(t){return this.graph.isEnabled()&&
-!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(t.getEvent())||mxEvent.isMetaDown(t.getEvent()))&&mxEvent.isShiftDown(t.getEvent())&&mxEvent.isAltDown(t.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(t,z){if(this.cancelled)this.cancelled=!1,z.consume();else{var A=null!=this.div&&"none"!=this.div.style.display,E=null,H=null,K=t=null;null!=
-this.first&&null!=this.currentX&&null!=this.currentY&&(E=this.first.x,H=this.first.y,t=(this.currentX-E)/this.graph.view.scale,K=(this.currentY-H)/this.graph.view.scale,mxEvent.isAltDown(z.getEvent())||(t=this.graph.snap(t),K=this.graph.snap(K),this.graph.isGridEnabled()||(Math.abs(t)<this.graph.tolerance&&(t=0),Math.abs(K)<this.graph.tolerance&&(K=0))));this.reset();if(A){if(this.isSpaceEvent(z)){this.graph.model.beginUpdate();try{var X=this.graph.getCellsBeyond(E,H,this.graph.getDefaultParent(),
-!0,!0);for(A=0;A<X.length;A++)if(this.graph.isCellMovable(X[A])){var ja=this.graph.view.getState(X[A]),ea=this.graph.getCellGeometry(X[A]);null!=ja&&null!=ea&&(ea=ea.clone(),ea.translate(t,K),this.graph.model.setGeometry(X[A],ea))}}finally{this.graph.model.endUpdate()}}else X=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(X,z.getEvent());z.consume()}}};mxRubberband.prototype.mouseMove=function(t,z){if(!z.isConsumed()&&null!=this.first){var A=mxUtils.getScrollOrigin(this.graph.container);
-t=mxUtils.getOffset(this.graph.container);A.x-=t.x;A.y-=t.y;t=z.getX()+A.x;A=z.getY()+A.y;var E=this.first.x-t,H=this.first.y-A,K=this.graph.tolerance;if(null!=this.div||Math.abs(E)>K||Math.abs(H)>K)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(t,A),this.isSpaceEvent(z)?(t=this.x+this.width,A=this.y+this.height,E=this.graph.view.scale,mxEvent.isAltDown(z.getEvent())||(this.width=this.graph.snap(this.width/E)*E,this.height=this.graph.snap(this.height/E)*E,this.graph.isGridEnabled()||
+12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(t){return mxEvent.isMouseEvent(t.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(t){var z=t.getEvent();return null==t.getState()&&!mxEvent.isMouseEvent(z)||mxEvent.isPopupTrigger(z)&&(null==t.getState()||mxEvent.isControlDown(z)||mxEvent.isShiftDown(z))};var ra=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=
+function(t,z){ra.apply(this,arguments);mxEvent.isTouchEvent(z.getEvent())&&this.graph.isCellSelected(z.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(t){var z=t.getEvent();return mxEvent.isLeftMouseButton(z)&&(this.useLeftButtonForPanning&&null==t.getState()||mxEvent.isControlDown(z)&&!mxEvent.isShiftDown(z))||this.usePopupTrigger&&mxEvent.isPopupTrigger(z)};mxRubberband.prototype.isSpaceEvent=function(t){return this.graph.isEnabled()&&
+!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(t.getEvent())||mxEvent.isMetaDown(t.getEvent()))&&mxEvent.isShiftDown(t.getEvent())&&mxEvent.isAltDown(t.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(t,z){if(this.cancelled)this.cancelled=!1,z.consume();else{var A=null!=this.div&&"none"!=this.div.style.display,E=null,H=null,L=t=null;null!=
+this.first&&null!=this.currentX&&null!=this.currentY&&(E=this.first.x,H=this.first.y,t=(this.currentX-E)/this.graph.view.scale,L=(this.currentY-H)/this.graph.view.scale,mxEvent.isAltDown(z.getEvent())||(t=this.graph.snap(t),L=this.graph.snap(L),this.graph.isGridEnabled()||(Math.abs(t)<this.graph.tolerance&&(t=0),Math.abs(L)<this.graph.tolerance&&(L=0))));this.reset();if(A){if(this.isSpaceEvent(z)){this.graph.model.beginUpdate();try{var W=this.graph.getCellsBeyond(E,H,this.graph.getDefaultParent(),
+!0,!0);for(A=0;A<W.length;A++)if(this.graph.isCellMovable(W[A])){var ha=this.graph.view.getState(W[A]),fa=this.graph.getCellGeometry(W[A]);null!=ha&&null!=fa&&(fa=fa.clone(),fa.translate(t,L),this.graph.model.setGeometry(W[A],fa))}}finally{this.graph.model.endUpdate()}}else W=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(W,z.getEvent());z.consume()}}};mxRubberband.prototype.mouseMove=function(t,z){if(!z.isConsumed()&&null!=this.first){var A=mxUtils.getScrollOrigin(this.graph.container);
+t=mxUtils.getOffset(this.graph.container);A.x-=t.x;A.y-=t.y;t=z.getX()+A.x;A=z.getY()+A.y;var E=this.first.x-t,H=this.first.y-A,L=this.graph.tolerance;if(null!=this.div||Math.abs(E)>L||Math.abs(H)>L)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(t,A),this.isSpaceEvent(z)?(t=this.x+this.width,A=this.y+this.height,E=this.graph.view.scale,mxEvent.isAltDown(z.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=t-this.width),this.y<this.first.y&&(this.y=A-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",
null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&
-(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),z.consume()}};var W=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);W.apply(this,arguments)};var aa=(new Date).getTime(),oa=0,sa=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(t,z,A,E){sa.apply(this,arguments);A!=this.currentTerminalState?(aa=(new Date).getTime(),
-oa=0):oa=(new Date).getTime()-aa;this.currentTerminalState=A};var Ka=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(t){return mxEvent.isShiftDown(t.getEvent())&&mxEvent.isAltDown(t.getEvent())?!1:null!=this.currentTerminalState&&t.getState()==this.currentTerminalState&&2E3<oa||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&Ka.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=
+(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),z.consume()}};var X=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);X.apply(this,arguments)};var ca=(new Date).getTime(),oa=0,ta=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(t,z,A,E){ta.apply(this,arguments);A!=this.currentTerminalState?(ca=(new Date).getTime(),
+oa=0):oa=(new Date).getTime()-ca;this.currentTerminalState=A};var Ka=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(t){return mxEvent.isShiftDown(t.getEvent())&&mxEvent.isAltDown(t.getEvent())?!1:null!=this.currentTerminalState&&t.getState()==this.currentTerminalState&&2E3<oa||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&Ka.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=
function(t,z,A){z=null!=t&&0==t;var E=this.state.getVisibleTerminalState(z);t=null!=t&&(0==t||t>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==t)?this.graph.getConnectionConstraint(this.state,E,z):null;A=null!=(null!=t?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(z),t):null)?A?this.endFixedHandleImage:this.fixedHandleImage:null!=t&&null!=E?A?this.endTerminalHandleImage:this.terminalHandleImage:A?this.endHandleImage:this.handleImage;if(null!=A)return A=
new mxImageShape(new mxRectangle(0,0,A.width,A.height),A.src),A.preserveImageAspect=!1,A;A=mxConstants.HANDLE_SIZE;this.preferHtml&&--A;return new mxRectangleShape(new mxRectangle(0,0,A,A),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var Ha=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(t,z,A){this.handleImage=z==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:z==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;
-return Ha.apply(this,arguments)};var ua=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(t){if(null!=t&&1==t.length){var z=this.graph.getModel(),A=z.getParent(t[0]),E=this.graph.getCellGeometry(t[0]);if(z.isEdge(A)&&null!=E&&E.relative&&(z=this.graph.view.getState(t[0]),null!=z&&2>z.width&&2>z.height&&null!=z.text&&null!=z.text.boundingBox))return mxRectangle.fromRectangle(z.text.boundingBox)}return ua.apply(this,arguments)};var Ca=mxGraphHandler.prototype.getGuideStates;
-mxGraphHandler.prototype.getGuideStates=function(){for(var t=Ca.apply(this,arguments),z=[],A=0;A<t.length;A++)"1"!=mxUtils.getValue(t[A].style,"part","0")&&z.push(t[A]);return z};var ra=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(t){var z=this.graph.getModel(),A=z.getParent(t.cell),E=this.graph.getCellGeometry(t.cell);return z.isEdge(A)&&null!=E&&E.relative&&2>t.width&&2>t.height&&null!=t.text&&null!=t.text.boundingBox?(z=t.text.unrotatedBoundingBox||
-t.text.boundingBox,new mxRectangle(Math.round(z.x),Math.round(z.y),Math.round(z.width),Math.round(z.height))):ra.apply(this,arguments)};var Da=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(t,z){var A=this.graph.getModel(),E=A.getParent(this.state.cell),H=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(z)==mxEvent.ROTATION_HANDLE||!A.isEdge(E)||null==H||!H.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&Da.apply(this,arguments)};
+return Ha.apply(this,arguments)};var va=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(t){if(null!=t&&1==t.length){var z=this.graph.getModel(),A=z.getParent(t[0]),E=this.graph.getCellGeometry(t[0]);if(z.isEdge(A)&&null!=E&&E.relative&&(z=this.graph.view.getState(t[0]),null!=z&&2>z.width&&2>z.height&&null!=z.text&&null!=z.text.boundingBox))return mxRectangle.fromRectangle(z.text.boundingBox)}return va.apply(this,arguments)};var Ca=mxGraphHandler.prototype.getGuideStates;
+mxGraphHandler.prototype.getGuideStates=function(){for(var t=Ca.apply(this,arguments),z=[],A=0;A<t.length;A++)"1"!=mxUtils.getValue(t[A].style,"part","0")&&z.push(t[A]);return z};var sa=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(t){var z=this.graph.getModel(),A=z.getParent(t.cell),E=this.graph.getCellGeometry(t.cell);return z.isEdge(A)&&null!=E&&E.relative&&2>t.width&&2>t.height&&null!=t.text&&null!=t.text.boundingBox?(z=t.text.unrotatedBoundingBox||
+t.text.boundingBox,new mxRectangle(Math.round(z.x),Math.round(z.y),Math.round(z.width),Math.round(z.height))):sa.apply(this,arguments)};var Da=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(t,z){var A=this.graph.getModel(),E=A.getParent(this.state.cell),H=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(z)==mxEvent.ROTATION_HANDLE||!A.isEdge(E)||null==H||!H.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&Da.apply(this,arguments)};
mxVertexHandler.prototype.rotateClick=function(){var t=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),z=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&t==mxConstants.NONE&&z==mxConstants.NONE?(t=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,t,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};
var Ua=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(t,z){Ua.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var db=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(t,z){db.apply(this,arguments);null!=this.rotationShape&&null!=
this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="");this.blockDelayedSelection=null};var Ta=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){Ta.apply(this,arguments);var t=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));if(this.graph.isTable(this.state.cell))this.refreshMoveHandles();
else if(1==this.graph.getSelectionCount()&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var z=0;4>z;z++){var A=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);A.dialect=mxConstants.DIALECT_SVG;A.init(this.graph.view.getOverlayPane());this.cornerHandles.push(A)}}var E=mxUtils.bind(this,function(){null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<
-this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.changeHandler=mxUtils.bind(this,function(H,K){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));E()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(H,K){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);
+this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.changeHandler=mxUtils.bind(this,function(H,L){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));E()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(H,L){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);
z=this.graph.getLinkForCell(this.state.cell);A=this.graph.getLinksForState(this.state);this.updateLinkHint(z,A);if(null!=z||null!=A&&0<A.length)t=!0;t&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(t,z){try{if(null==t&&(null==z||0==z.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=t||null!=z&&0<z.length){null==this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding=
"6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerText="";if(null!=t&&(this.linkHint.appendChild(this.graph.createLinkForHint(t)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var A=document.createElement("img");A.setAttribute("src",Editor.editImage);A.setAttribute("title",
-mxResources.get("editLink"));A.setAttribute("width","11");A.setAttribute("height","11");A.style.marginLeft="10px";A.style.marginBottom="-1px";A.style.cursor="pointer";Editor.isDarkMode()&&(A.style.filter="invert(100%)");this.linkHint.appendChild(A);mxEvent.addListener(A,"click",mxUtils.bind(this,function(K){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(K)}));var E=A.cloneNode(!0);E.setAttribute("src",Editor.trashImage);E.setAttribute("title",mxResources.get("removeIt",
-[mxResources.get("link")]));E.style.marginLeft="4px";this.linkHint.appendChild(E);mxEvent.addListener(E,"click",mxUtils.bind(this,function(K){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(K)}))}if(null!=z)for(A=0;A<z.length;A++){var H=document.createElement("div");H.style.marginTop=null!=t||0<A?"6px":"0px";H.appendChild(this.graph.createLinkForHint(z[A].getAttribute("href"),mxUtils.getTextContent(z[A])));this.linkHint.appendChild(H)}}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(K){}};
+mxResources.get("editLink"));A.setAttribute("width","11");A.setAttribute("height","11");A.style.marginLeft="10px";A.style.marginBottom="-1px";A.style.cursor="pointer";Editor.isDarkMode()&&(A.style.filter="invert(100%)");this.linkHint.appendChild(A);mxEvent.addListener(A,"click",mxUtils.bind(this,function(L){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(L)}));var E=A.cloneNode(!0);E.setAttribute("src",Editor.trashImage);E.setAttribute("title",mxResources.get("removeIt",
+[mxResources.get("link")]));E.style.marginLeft="4px";this.linkHint.appendChild(E);mxEvent.addListener(E,"click",mxUtils.bind(this,function(L){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(L)}))}if(null!=z)for(A=0;A<z.length;A++){var H=document.createElement("div");H.style.marginTop=null!=t||0<A?"6px":"0px";H.appendChild(this.graph.createLinkForHint(z[A].getAttribute("href"),mxUtils.getTextContent(z[A])));this.linkHint.appendChild(H)}}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(L){}};
mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var $a=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){$a.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var t=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&
this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.changeHandler=mxUtils.bind(this,function(E,H){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));t();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var z=this.graph.getLinkForCell(this.state.cell),A=this.graph.getLinksForState(this.state);if(null!=
z||null!=A&&0<A.length)this.updateLinkHint(z,A),this.redrawHandles()};var Xa=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Xa.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Va=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var t=0;t<this.moveHandles.length;t++)this.moveHandles[t].style.left=this.moveHandles[t].rowState.x+
@@ -3258,282 +3261,282 @@ Format.ERzeroToManyMarkerImage=Graph.createSvgImage(20,22,'<path transform="tran
Format.baseDashMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 0 2 L 0 14 M 0 8 L 24 8" stroke="#404040" fill="transparent"/>',32,20);Format.doubleBlockMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 0 8 L 8 2 L 8 14 Z M 8 8 L 16 2 L 16 14 Z M 16 8 L 24 8" stroke="#404040" fill="transparent"/>',32,20);
Format.doubleBlockFilledMarkerImage=Graph.createSvgImage(20,22,'<path transform="translate(4,2)" stroke-width="2" d="M 0 8 L 8 2 L 8 14 Z M 8 8 L 16 2 L 16 14 Z M 16 8 L 24 8" stroke="#404040" fill="#404040"/>',32,20);Format.processMenuIcon=function(a,b){var f=a.getElementsByTagName("img");0<f.length&&(Editor.isDarkMode()&&(f[0].style.filter="invert(100%)"),f[0].className="geIcon",f[0].style.padding="0px",f[0].style.margin="0 0 0 2px",null!=b&&mxUtils.setPrefixedStyle(f[0].style,"transform",b));return a};
Format.prototype.labelIndex=0;Format.prototype.diagramIndex=0;Format.prototype.currentIndex=0;Format.prototype.showCloseButton=!0;
-Format.prototype.init=function(){var a=this.editorUi,b=a.editor,f=b.graph;this.update=mxUtils.bind(this,function(d,g){this.refresh()});f.getSelectionModel().addListener(mxEvent.CHANGE,this.update);f.getModel().addListener(mxEvent.CHANGE,this.update);f.addListener(mxEvent.EDITING_STARTED,this.update);f.addListener(mxEvent.EDITING_STOPPED,this.update);f.getView().addListener("unitChanged",this.update);b.addListener("autosaveChanged",this.update);f.addListener(mxEvent.ROOT,this.update);a.addListener("styleChanged",
+Format.prototype.init=function(){var a=this.editorUi,b=a.editor,f=b.graph;this.update=mxUtils.bind(this,function(e,g){this.refresh()});f.getSelectionModel().addListener(mxEvent.CHANGE,this.update);f.getModel().addListener(mxEvent.CHANGE,this.update);f.addListener(mxEvent.EDITING_STARTED,this.update);f.addListener(mxEvent.EDITING_STOPPED,this.update);f.getView().addListener("unitChanged",this.update);b.addListener("autosaveChanged",this.update);f.addListener(mxEvent.ROOT,this.update);a.addListener("styleChanged",
this.update);this.refresh()};Format.prototype.clear=function(){this.container.innerText="";if(null!=this.panels)for(var a=0;a<this.panels.length;a++)this.panels[a].destroy();this.panels=[]};Format.prototype.refresh=function(){null!=this.pendingRefresh&&(window.clearTimeout(this.pendingRefresh),this.pendingRefresh=null);this.pendingRefresh=window.setTimeout(mxUtils.bind(this,function(){this.immediateRefresh()}))};
-Format.prototype.immediateRefresh=function(){if("0px"!=this.container.style.width){this.clear();var a=this.editorUi,b=a.editor.graph,f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.color="rgb(112, 112, 112)";f.style.textAlign="left";f.style.cursor="default";var d=document.createElement("div");d.className="geFormatSection";d.style.textAlign="center";d.style.fontWeight="bold";d.style.paddingTop="8px";d.style.fontSize="13px";d.style.borderWidth="0px 0px 1px 1px";d.style.borderStyle=
-"solid";d.style.display="inline-block";d.style.height="25px";d.style.overflow="hidden";d.style.width="100%";this.container.appendChild(f);mxEvent.addListener(d,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(C){C.preventDefault()}));var g=a.getSelectionState(),e=g.containsLabel,k=null,n=null,u=mxUtils.bind(this,function(C,G,J,D){var N=mxUtils.bind(this,function(Q){k!=C&&(e?this.labelIndex=J:b.isSelectionEmpty()?this.diagramIndex=J:this.currentIndex=J,null!=k&&(k.style.backgroundColor=
-Format.inactiveTabBackgroundColor,k.style.borderBottomWidth="1px"),k=C,k.style.backgroundColor="",k.style.borderBottomWidth="0px",n!=G&&(null!=n&&(n.style.display="none"),n=G,n.style.display=""))});mxEvent.addListener(C,"click",N);mxEvent.addListener(C,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(Q){Q.preventDefault()}));(D&&null==k||J==(e?this.labelIndex:b.isSelectionEmpty()?this.diagramIndex:this.currentIndex))&&N()}),m=0;if(b.isSelectionEmpty()){mxUtils.write(d,mxResources.get("diagram"));
-d.style.borderLeftWidth="0px";f.appendChild(d);g=f.cloneNode(!1);this.panels.push(new DiagramFormatPanel(this,a,g));this.container.appendChild(g);if(null!=Editor.styles){g.style.display="none";d.style.width=this.showCloseButton?"106px":"50%";d.style.cursor="pointer";d.style.backgroundColor=Format.inactiveTabBackgroundColor;var r=d.cloneNode(!1);r.style.borderLeftWidth="1px";r.style.borderRightWidth="1px";r.style.backgroundColor=Format.inactiveTabBackgroundColor;u(d,g,m++);var x=f.cloneNode(!1);x.style.display=
-"none";mxUtils.write(r,mxResources.get("style"));f.appendChild(r);this.panels.push(new DiagramStylePanel(this,a,x));this.container.appendChild(x);u(r,x,m++)}this.showCloseButton&&(r=d.cloneNode(!1),r.style.borderLeftWidth="1px",r.style.borderRightWidth="1px",r.style.borderBottomWidth="1px",r.style.backgroundColor=Format.inactiveTabBackgroundColor,r.style.position="absolute",r.style.right="0px",r.style.top="0px",r.style.width="25px",u=document.createElement("img"),u.setAttribute("border","0"),u.setAttribute("src",
-Dialog.prototype.closeImage),u.setAttribute("title",mxResources.get("hide")),u.style.position="absolute",u.style.display="block",u.style.right="0px",u.style.top="8px",u.style.cursor="pointer",u.style.marginTop="1px",u.style.marginRight="6px",u.style.border="1px solid transparent",u.style.padding="1px",u.style.opacity=.5,r.appendChild(u),mxEvent.addListener(u,"click",function(){a.actions.get("formatPanel").funct()}),f.appendChild(r))}else if(b.isEditing())mxUtils.write(d,mxResources.get("text")),f.appendChild(d),
-this.panels.push(new TextFormatPanel(this,a,f));else{d.style.backgroundColor=Format.inactiveTabBackgroundColor;d.style.borderLeftWidth="1px";d.style.cursor="pointer";d.style.width=e||0==g.cells.length?"50%":"33.3%";r=d.cloneNode(!1);var B=r.cloneNode(!1);r.style.backgroundColor=Format.inactiveTabBackgroundColor;B.style.backgroundColor=Format.inactiveTabBackgroundColor;e?r.style.borderLeftWidth="0px":(d.style.borderLeftWidth="0px",mxUtils.write(d,mxResources.get("style")),f.appendChild(d),x=f.cloneNode(!1),
-x.style.display="none",this.panels.push(new StyleFormatPanel(this,a,x)),this.container.appendChild(x),u(d,x,m++));mxUtils.write(r,mxResources.get("text"));f.appendChild(r);d=f.cloneNode(!1);d.style.display="none";this.panels.push(new TextFormatPanel(this,a,d));this.container.appendChild(d);mxUtils.write(B,mxResources.get("arrange"));f.appendChild(B);f=f.cloneNode(!1);f.style.display="none";this.panels.push(new ArrangePanel(this,a,f));this.container.appendChild(f);0<g.cells.length?u(r,d,m++):r.style.display=
+Format.prototype.immediateRefresh=function(){if("0px"!=this.container.style.width){this.clear();var a=this.editorUi,b=a.editor.graph,f=document.createElement("div");f.style.whiteSpace="nowrap";f.style.color="rgb(112, 112, 112)";f.style.textAlign="left";f.style.cursor="default";var e=document.createElement("div");e.className="geFormatSection";e.style.textAlign="center";e.style.fontWeight="bold";e.style.paddingTop="8px";e.style.fontSize="13px";e.style.borderWidth="0px 0px 1px 1px";e.style.borderStyle=
+"solid";e.style.display="inline-block";e.style.height="25px";e.style.overflow="hidden";e.style.width="100%";this.container.appendChild(f);mxEvent.addListener(e,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(C){C.preventDefault()}));var g=a.getSelectionState(),d=g.containsLabel,k=null,n=null,u=mxUtils.bind(this,function(C,F,J,D){var N=mxUtils.bind(this,function(S){k!=C&&(d?this.labelIndex=J:b.isSelectionEmpty()?this.diagramIndex=J:this.currentIndex=J,null!=k&&(k.style.backgroundColor=
+Format.inactiveTabBackgroundColor,k.style.borderBottomWidth="1px"),k=C,k.style.backgroundColor="",k.style.borderBottomWidth="0px",n!=F&&(null!=n&&(n.style.display="none"),n=F,n.style.display=""))});mxEvent.addListener(C,"click",N);mxEvent.addListener(C,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(S){S.preventDefault()}));(D&&null==k||J==(d?this.labelIndex:b.isSelectionEmpty()?this.diagramIndex:this.currentIndex))&&N()}),m=0;if(b.isSelectionEmpty()){mxUtils.write(e,mxResources.get("diagram"));
+e.style.borderLeftWidth="0px";f.appendChild(e);g=f.cloneNode(!1);this.panels.push(new DiagramFormatPanel(this,a,g));this.container.appendChild(g);if(null!=Editor.styles){g.style.display="none";e.style.width=this.showCloseButton?"106px":"50%";e.style.cursor="pointer";e.style.backgroundColor=Format.inactiveTabBackgroundColor;var r=e.cloneNode(!1);r.style.borderLeftWidth="1px";r.style.borderRightWidth="1px";r.style.backgroundColor=Format.inactiveTabBackgroundColor;u(e,g,m++);var x=f.cloneNode(!1);x.style.display=
+"none";mxUtils.write(r,mxResources.get("style"));f.appendChild(r);this.panels.push(new DiagramStylePanel(this,a,x));this.container.appendChild(x);u(r,x,m++)}this.showCloseButton&&(r=e.cloneNode(!1),r.style.borderLeftWidth="1px",r.style.borderRightWidth="1px",r.style.borderBottomWidth="1px",r.style.backgroundColor=Format.inactiveTabBackgroundColor,r.style.position="absolute",r.style.right="0px",r.style.top="0px",r.style.width="25px",u=document.createElement("img"),u.setAttribute("border","0"),u.setAttribute("src",
+Dialog.prototype.closeImage),u.setAttribute("title",mxResources.get("hide")),u.style.position="absolute",u.style.display="block",u.style.right="0px",u.style.top="8px",u.style.cursor="pointer",u.style.marginTop="1px",u.style.marginRight="6px",u.style.border="1px solid transparent",u.style.padding="1px",u.style.opacity=.5,r.appendChild(u),mxEvent.addListener(u,"click",function(){a.actions.get("formatPanel").funct()}),f.appendChild(r))}else if(b.isEditing())mxUtils.write(e,mxResources.get("text")),f.appendChild(e),
+this.panels.push(new TextFormatPanel(this,a,f));else{e.style.backgroundColor=Format.inactiveTabBackgroundColor;e.style.borderLeftWidth="1px";e.style.cursor="pointer";e.style.width=d||0==g.cells.length?"50%":"33.3%";r=e.cloneNode(!1);var B=r.cloneNode(!1);r.style.backgroundColor=Format.inactiveTabBackgroundColor;B.style.backgroundColor=Format.inactiveTabBackgroundColor;d?r.style.borderLeftWidth="0px":(e.style.borderLeftWidth="0px",mxUtils.write(e,mxResources.get("style")),f.appendChild(e),x=f.cloneNode(!1),
+x.style.display="none",this.panels.push(new StyleFormatPanel(this,a,x)),this.container.appendChild(x),u(e,x,m++));mxUtils.write(r,mxResources.get("text"));f.appendChild(r);e=f.cloneNode(!1);e.style.display="none";this.panels.push(new TextFormatPanel(this,a,e));this.container.appendChild(e);mxUtils.write(B,mxResources.get("arrange"));f.appendChild(B);f=f.cloneNode(!1);f.style.display="none";this.panels.push(new ArrangePanel(this,a,f));this.container.appendChild(f);0<g.cells.length?u(r,e,m++):r.style.display=
"none";u(B,f,m++,!0)}}};BaseFormatPanel=function(a,b,f){this.format=a;this.editorUi=b;this.container=f;this.listeners=[]};BaseFormatPanel.prototype.buttonBackgroundColor="white";
-BaseFormatPanel.prototype.installInputHandler=function(a,b,f,d,g,e,k,n){e=null!=e?e:"";n=null!=n?n:!1;var u=this.editorUi,m=u.editor.graph;d=null!=d?d:1;g=null!=g?g:999;var r=null,x=!1,B=mxUtils.bind(this,function(C){var G=n?parseFloat(a.value):parseInt(a.value);isNaN(G)||b!=mxConstants.STYLE_ROTATION||(G=mxUtils.mod(Math.round(100*G),36E3)/100);G=Math.min(g,Math.max(d,isNaN(G)?f:G));if(m.cellEditor.isContentEditing()&&k)x||(x=!0,null!=r&&(m.cellEditor.restoreSelection(r),r=null),k(G),a.value=G+e,
-x=!1);else if(G!=mxUtils.getValue(u.getSelectionState().style,b,f)){m.isEditing()&&m.stopEditing(!0);m.getModel().beginUpdate();try{var J=u.getSelectionState().cells;m.setCellStyles(b,G,J);b==mxConstants.STYLE_FONTSIZE&&m.updateLabelElements(J,function(N){N.style.fontSize=G+"px";N.removeAttribute("size")});for(var D=0;D<J.length;D++)0==m.model.getChildCount(J[D])&&m.autoSizeCell(J[D],!1);u.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[G],"cells",J))}finally{m.getModel().endUpdate()}}a.value=
-G+e;mxEvent.consume(C)});k&&m.cellEditor.isContentEditing()&&(mxEvent.addListener(a,"mousedown",function(){document.activeElement==m.cellEditor.textarea&&(r=m.cellEditor.saveSelection())}),mxEvent.addListener(a,"touchstart",function(){document.activeElement==m.cellEditor.textarea&&(r=m.cellEditor.saveSelection())}));mxEvent.addListener(a,"change",B);mxEvent.addListener(a,"blur",B);return B};
+BaseFormatPanel.prototype.installInputHandler=function(a,b,f,e,g,d,k,n){d=null!=d?d:"";n=null!=n?n:!1;var u=this.editorUi,m=u.editor.graph;e=null!=e?e:1;g=null!=g?g:999;var r=null,x=!1,B=mxUtils.bind(this,function(C){var F=n?parseFloat(a.value):parseInt(a.value);isNaN(F)||b!=mxConstants.STYLE_ROTATION||(F=mxUtils.mod(Math.round(100*F),36E3)/100);F=Math.min(g,Math.max(e,isNaN(F)?f:F));if(m.cellEditor.isContentEditing()&&k)x||(x=!0,null!=r&&(m.cellEditor.restoreSelection(r),r=null),k(F),a.value=F+d,
+x=!1);else if(F!=mxUtils.getValue(u.getSelectionState().style,b,f)){m.isEditing()&&m.stopEditing(!0);m.getModel().beginUpdate();try{var J=u.getSelectionState().cells;m.setCellStyles(b,F,J);b==mxConstants.STYLE_FONTSIZE&&m.updateLabelElements(J,function(N){N.style.fontSize=F+"px";N.removeAttribute("size")});for(var D=0;D<J.length;D++)0==m.model.getChildCount(J[D])&&m.autoSizeCell(J[D],!1);u.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[F],"cells",J))}finally{m.getModel().endUpdate()}}a.value=
+F+d;mxEvent.consume(C)});k&&m.cellEditor.isContentEditing()&&(mxEvent.addListener(a,"mousedown",function(){document.activeElement==m.cellEditor.textarea&&(r=m.cellEditor.saveSelection())}),mxEvent.addListener(a,"touchstart",function(){document.activeElement==m.cellEditor.textarea&&(r=m.cellEditor.saveSelection())}));mxEvent.addListener(a,"change",B);mxEvent.addListener(a,"blur",B);return B};
BaseFormatPanel.prototype.createPanel=function(){var a=document.createElement("div");a.className="geFormatSection";a.style.padding="12px 0px 12px 14px";return a};BaseFormatPanel.prototype.createTitle=function(a){var b=document.createElement("div");b.style.padding="0px 0px 6px 0px";b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.width="200px";b.style.fontWeight="bold";mxUtils.write(b,a);return b};
-BaseFormatPanel.prototype.addAction=function(a,b){var f=this.editorUi.actions.get(b);b=null;null!=f&&f.isEnabled()&&(b=mxUtils.button(f.label,function(d){f.funct(d,d)}),b.setAttribute("title",f.label+(null!=f.shortcut?" ("+f.shortcut+")":"")),b.style.marginBottom="2px",b.style.width="210px",a.appendChild(b),result=!0);return b};
-BaseFormatPanel.prototype.addActions=function(a,b){for(var f=null,d=null,g=0,e=0;e<b.length;e++){var k=this.addAction(a,b[e]);null!=k&&(g++,0==mxUtils.mod(g,2)&&(d.style.marginRight="2px",d.style.width="104px",k.style.width="104px",f.parentNode.removeChild(f)),f=mxUtils.br(a),d=k)}return g};
-BaseFormatPanel.prototype.createStepper=function(a,b,f,d,g,e,k){f=null!=f?f:1;d=null!=d?d:9;var n=10*f,u=document.createElement("div");mxUtils.setPrefixedStyle(u.style,"borderRadius","3px");u.style.border="1px solid rgb(192, 192, 192)";u.style.position="absolute";var m=document.createElement("div");m.style.borderBottom="1px solid rgb(192, 192, 192)";m.style.position="relative";m.style.height=d+"px";m.style.width="10px";m.className="geBtnUp";u.appendChild(m);var r=m.cloneNode(!1);r.style.border="none";
-r.style.height=d+"px";r.className="geBtnDown";u.appendChild(r);mxEvent.addGestureListeners(r,function(B){mxEvent.consume(B)},null,function(B){""==a.value&&(a.value=e||"2");var C=k?parseFloat(a.value):parseInt(a.value);isNaN(C)||(a.value=C-(mxEvent.isShiftDown(B)?n:f),null!=b&&b(B));mxEvent.consume(B)});mxEvent.addGestureListeners(m,function(B){mxEvent.consume(B)},null,function(B){""==a.value&&(a.value=e||"0");var C=k?parseFloat(a.value):parseInt(a.value);isNaN(C)||(a.value=C+(mxEvent.isShiftDown(B)?
+BaseFormatPanel.prototype.addAction=function(a,b){var f=this.editorUi.actions.get(b);b=null;null!=f&&f.isEnabled()&&(b=mxUtils.button(f.label,function(e){f.funct(e,e)}),b.setAttribute("title",f.label+(null!=f.shortcut?" ("+f.shortcut+")":"")),b.style.marginBottom="2px",b.style.width="210px",a.appendChild(b),result=!0);return b};
+BaseFormatPanel.prototype.addActions=function(a,b){for(var f=null,e=null,g=0,d=0;d<b.length;d++){var k=this.addAction(a,b[d]);null!=k&&(g++,0==mxUtils.mod(g,2)&&(e.style.marginRight="2px",e.style.width="104px",k.style.width="104px",f.parentNode.removeChild(f)),f=mxUtils.br(a),e=k)}return g};
+BaseFormatPanel.prototype.createStepper=function(a,b,f,e,g,d,k){f=null!=f?f:1;e=null!=e?e:9;var n=10*f,u=document.createElement("div");mxUtils.setPrefixedStyle(u.style,"borderRadius","3px");u.style.border="1px solid rgb(192, 192, 192)";u.style.position="absolute";var m=document.createElement("div");m.style.borderBottom="1px solid rgb(192, 192, 192)";m.style.position="relative";m.style.height=e+"px";m.style.width="10px";m.className="geBtnUp";u.appendChild(m);var r=m.cloneNode(!1);r.style.border="none";
+r.style.height=e+"px";r.className="geBtnDown";u.appendChild(r);mxEvent.addGestureListeners(r,function(B){mxEvent.consume(B)},null,function(B){""==a.value&&(a.value=d||"2");var C=k?parseFloat(a.value):parseInt(a.value);isNaN(C)||(a.value=C-(mxEvent.isShiftDown(B)?n:f),null!=b&&b(B));mxEvent.consume(B)});mxEvent.addGestureListeners(m,function(B){mxEvent.consume(B)},null,function(B){""==a.value&&(a.value=d||"0");var C=k?parseFloat(a.value):parseInt(a.value);isNaN(C)||(a.value=C+(mxEvent.isShiftDown(B)?
n:f),null!=b&&b(B));mxEvent.consume(B)});if(g){var x=null;mxEvent.addGestureListeners(u,function(B){mxEvent.consume(B)},null,function(B){if(null!=x){try{x.select()}catch(C){}x=null;mxEvent.consume(B)}})}else mxEvent.addListener(u,"click",function(B){mxEvent.consume(B)});return u};
-BaseFormatPanel.prototype.createOption=function(a,b,f,d,g){var e=document.createElement("div");e.style.padding="3px 0px 3px 0px";e.style.whiteSpace="nowrap";e.style.textOverflow="ellipsis";e.style.overflow="hidden";e.style.width="200px";e.style.height="18px";var k=document.createElement("input");k.setAttribute("type","checkbox");k.style.margin="1px 6px 0px 0px";k.style.verticalAlign="top";e.appendChild(k);var n=document.createElement("span");n.style.verticalAlign="top";n.style.userSelect="none";mxUtils.write(n,
-a);e.appendChild(n);var u=!1,m=b(),r=function(x,B){u||(u=!0,x?(k.setAttribute("checked","checked"),k.defaultChecked=!0,k.checked=!0):(k.removeAttribute("checked"),k.defaultChecked=!1,k.checked=!1),m!=x&&(m=x,b()!=m&&f(m,B)),u=!1)};mxEvent.addListener(e,"click",function(x){if("disabled"!=k.getAttribute("disabled")){var B=mxEvent.getSource(x);if(B==e||B==n)k.checked=!k.checked;r(k.checked,x)}});r(m);null!=d&&(d.install(r),this.listeners.push(d));null!=g&&g(e);return e};
-BaseFormatPanel.prototype.createCellOption=function(a,b,f,d,g,e,k,n,u){var m=this.editorUi,r=m.editor.graph;d=null!=d?"null"==d?null:d:1;g=null!=g?"null"==g?null:g:0;var x=null!=u?r.getCommonStyle(u):m.getSelectionState().style;return this.createOption(a,function(){return mxUtils.getValue(x,b,f)!=g},function(B){n&&r.stopEditing();if(null!=k)k.funct();else{r.getModel().beginUpdate();try{var C=null!=u?u:m.getSelectionState().cells;B=B?d:g;r.setCellStyles(b,B,C);null!=e&&e(C,B);m.fireEvent(new mxEventObject("styleChanged",
+BaseFormatPanel.prototype.createOption=function(a,b,f,e,g){var d=document.createElement("div");d.style.padding="3px 0px 3px 0px";d.style.whiteSpace="nowrap";d.style.textOverflow="ellipsis";d.style.overflow="hidden";d.style.width="200px";d.style.height="18px";var k=document.createElement("input");k.setAttribute("type","checkbox");k.style.margin="1px 6px 0px 0px";k.style.verticalAlign="top";d.appendChild(k);var n=document.createElement("span");n.style.verticalAlign="top";n.style.userSelect="none";mxUtils.write(n,
+a);d.appendChild(n);var u=!1,m=b(),r=function(x,B){u||(u=!0,x?(k.setAttribute("checked","checked"),k.defaultChecked=!0,k.checked=!0):(k.removeAttribute("checked"),k.defaultChecked=!1,k.checked=!1),m!=x&&(m=x,b()!=m&&f(m,B)),u=!1)};mxEvent.addListener(d,"click",function(x){if("disabled"!=k.getAttribute("disabled")){var B=mxEvent.getSource(x);if(B==d||B==n)k.checked=!k.checked;r(k.checked,x)}});r(m);null!=e&&(e.install(r),this.listeners.push(e));null!=g&&g(d);return d};
+BaseFormatPanel.prototype.createCellOption=function(a,b,f,e,g,d,k,n,u){var m=this.editorUi,r=m.editor.graph;e=null!=e?"null"==e?null:e:1;g=null!=g?"null"==g?null:g:0;var x=null!=u?r.getCommonStyle(u):m.getSelectionState().style;return this.createOption(a,function(){return mxUtils.getValue(x,b,f)!=g},function(B){n&&r.stopEditing();if(null!=k)k.funct();else{r.getModel().beginUpdate();try{var C=null!=u?u:m.getSelectionState().cells;B=B?e:g;r.setCellStyles(b,B,C);null!=d&&d(C,B);m.fireEvent(new mxEventObject("styleChanged",
"keys",[b],"values",[B],"cells",C))}finally{r.getModel().endUpdate()}}},{install:function(B){this.listener=function(){B(mxUtils.getValue(x,b,f)!=g)};r.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){r.getModel().removeListener(this.listener)}})};
-BaseFormatPanel.prototype.createColorOption=function(a,b,f,d,g,e,k,n){var u=document.createElement("div");u.style.padding="3px 0px 3px 0px";u.style.whiteSpace="nowrap";u.style.overflow="hidden";u.style.width="200px";u.style.height="18px";var m=document.createElement("input");m.setAttribute("type","checkbox");m.style.margin="1px 6px 0px 0px";m.style.verticalAlign="top";k||u.appendChild(m);var r=document.createElement("span");r.style.verticalAlign="top";mxUtils.write(r,a);u.appendChild(r);var x=b(),
-B=!1,C=null,G=function(D,N,Q){if(!B){var R="null"==d?null:d;B=!0;D=/(^#?[a-zA-Z0-9]*$)/.test(D)?D:R;R=null!=D&&D!=mxConstants.NONE?D:R;var P=document.createElement("div");P.style.width="36px";P.style.height="12px";P.style.margin="3px";P.style.border="1px solid black";P.style.backgroundColor="default"==R?n:R;C.innerText="";C.appendChild(P);null!=D&&D!=mxConstants.NONE&&1<D.length&&"string"===typeof D&&(R="#"==D.charAt(0)?D.substring(1).toUpperCase():D,R=ColorDialog.prototype.colorNames[R],C.setAttribute("title",
-null!=R?R+" (Shift+Click for Color Dropper)":"Shift+Click for Color Dropper"));null!=D&&D!=mxConstants.NONE?(m.setAttribute("checked","checked"),m.defaultChecked=!0,m.checked=!0):(m.removeAttribute("checked"),m.defaultChecked=!1,m.checked=!1);C.style.display=m.checked||k?"":"none";null!=e&&e("null"==D?null:D);x=D;N||(Q||k||b()!=x)&&f("null"==x?null:x,x);B=!1}},J=document.createElement("input");J.setAttribute("type","color");J.style.visibility="hidden";J.style.width="0px";J.style.height="0px";J.style.border=
-"none";u.appendChild(J);C=mxUtils.button("",mxUtils.bind(this,function(D){var N=x;"default"==N&&(N=n);!mxEvent.isShiftDown(D)||mxClient.IS_IE||mxClient.IS_IE11?this.editorUi.pickColor(N,function(Q){G(Q,null,!0)},n):(J.value=N,J.click(),mxEvent.addListener(J,"input",function(){G(J.value,null,!0)}));mxEvent.consume(D)}));C.style.position="absolute";C.style.marginTop="-3px";C.style.left="178px";C.style.height="22px";C.className="geColorBtn";C.style.display=m.checked||k?"":"none";u.appendChild(C);a=null!=
-x&&"string"===typeof x&&"#"==x.charAt(0)?x.substring(1).toUpperCase():x;a=ColorDialog.prototype.colorNames[a];C.setAttribute("title",null!=a?a+" (Shift+Click for Color Dropper)":"Shift+Click for Color Dropper");mxEvent.addListener(u,"click",function(D){D=mxEvent.getSource(D);if(D==m||"INPUT"!=D.nodeName)D!=m&&(m.checked=!m.checked),m.checked||null==x||x==mxConstants.NONE||d==mxConstants.NONE||(d=x),G(m.checked?d:mxConstants.NONE)});G(x,!0);null!=g&&(g.install(G),this.listeners.push(g));return u};
-BaseFormatPanel.prototype.createCellColorOption=function(a,b,f,d,g,e){var k=this.editorUi,n=k.editor.graph;return this.createColorOption(a,function(){var u=n.view.getState(k.getSelectionState().cells[0]);return null!=u?mxUtils.getValue(u.style,b,null):null},function(u,m){n.getModel().beginUpdate();try{var r=k.getSelectionState().cells;n.setCellStyles(b,u,r);null!=g&&g(u);k.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[u],"cells",r))}finally{n.getModel().endUpdate()}},f||mxConstants.NONE,
-{install:function(u){this.listener=function(){var m=n.view.getState(k.getSelectionState().cells[0]);null!=m&&u(mxUtils.getValue(m.style,b,null),!0)};n.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){n.getModel().removeListener(this.listener)}},d,null,e)};
-BaseFormatPanel.prototype.addArrow=function(a,b,f){b=null!=b?b:10;var d=document.createElement("div");d.style.borderLeft="1px solid #a0a0a0";d.style.display="inline-block";d.style.height=b+"px";d.style.paddingRight="4px";d.style.padding="6px";f?(d.style.verticalAlign="top",d.style.marginLeft="1px"):(b=10-b,2==b?d.style.paddingTop="6px":0<b?d.style.paddingTop=6-b+"px":d.style.marginTop="-2px");b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("valign","middle");b.setAttribute("src",
-Toolbar.prototype.dropDownImage);d.appendChild(b);b=d.getElementsByTagName("img")[0];b.style.position="relative";b.style.left="1px";b.style.top=mxClient.IS_FF?"0px":"-4px";mxUtils.setOpacity(d,70);b=a.getElementsByTagName("div")[0];null!=b&&(b.style.paddingRight="6px",b.style.marginLeft="4px",b.style.marginTop="-1px",b.style.display="inline-block",mxUtils.setOpacity(b,60));mxUtils.setOpacity(a,100);a.style.border="1px solid #a0a0a0";a.style.backgroundColor=this.buttonBackgroundColor;a.style.backgroundImage=
-"none";a.style.width="auto";a.className+=" geColorBtn";mxUtils.setPrefixedStyle(a.style,"borderRadius","3px");a.appendChild(d);return b};
-BaseFormatPanel.prototype.addUnitInput=function(a,b,f,d,g,e,k,n,u){k=null!=k?k:0;b=document.createElement("input");b.style.position="absolute";b.style.textAlign="right";b.style.marginTop="-2px";b.style.left=228-f-d+"px";b.style.width=d+"px";b.style.height="21px";b.style.border="1px solid rgb(160, 160, 160)";b.style.borderRadius="4px";b.style.boxSizing="border-box";a.appendChild(b);d=this.createStepper(b,g,e,null,n,null,u);d.style.marginTop=k-2+"px";d.style.left=228-f+"px";a.appendChild(d);return b};
-BaseFormatPanel.prototype.createRelativeOption=function(a,b,f,d,g){f=null!=f?f:52;var e=this.editorUi,k=e.editor.graph,n=this.createPanel();n.style.paddingTop="10px";n.style.paddingBottom="10px";mxUtils.write(n,a);n.style.fontWeight="bold";a=mxUtils.bind(this,function(r){if(null!=d)d(u);else{var x=parseInt(u.value);x=Math.min(100,Math.max(0,isNaN(x)?100:x));var B=k.view.getState(e.getSelectionState().cells[0]);null!=B&&x!=mxUtils.getValue(B.style,b,100)&&(100==x&&(x=null),B=e.getSelectionState().cells,
-k.setCellStyles(b,x,B),this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[x],"cells",B)));u.value=(null!=x?x:"100")+" %"}mxEvent.consume(r)});var u=this.addUnitInput(n,"%",16,f,a,10,-15,null!=d);if(null!=b){var m=mxUtils.bind(this,function(r,x,B){if(B||u!=document.activeElement)r=e.getSelectionState(),r=parseInt(mxUtils.getValue(r.style,b,100)),u.value=isNaN(r)?"":r+" %"});mxEvent.addListener(u,"keydown",function(r){13==r.keyCode?(k.container.focus(),mxEvent.consume(r)):
+BaseFormatPanel.prototype.createColorOption=function(a,b,f,e,g,d,k,n){var u=document.createElement("div");u.style.padding="3px 0px 3px 0px";u.style.whiteSpace="nowrap";u.style.overflow="hidden";u.style.width="200px";u.style.height="18px";var m=document.createElement("input");m.setAttribute("type","checkbox");m.style.margin="1px 6px 0px 0px";m.style.verticalAlign="top";k||u.appendChild(m);var r=document.createElement("span");r.style.verticalAlign="top";mxUtils.write(r,a);u.appendChild(r);var x=b(),
+B=!1,C=null,F=function(D,N,S){if(!B){var T="null"==e?null:e;B=!0;D=/(^#?[a-zA-Z0-9]*$)/.test(D)?D:T;T=null!=D&&D!=mxConstants.NONE?D:T;var P=document.createElement("div");P.style.width="36px";P.style.height="12px";P.style.margin="3px";P.style.border="1px solid black";P.style.backgroundColor="default"==T?n:T;C.innerText="";C.appendChild(P);null!=D&&D!=mxConstants.NONE&&1<D.length&&"string"===typeof D&&(T="#"==D.charAt(0)?D.substring(1).toUpperCase():D,T=ColorDialog.prototype.colorNames[T],C.setAttribute("title",
+null!=T?T+" (Shift+Click for Color Dropper)":"Shift+Click for Color Dropper"));null!=D&&D!=mxConstants.NONE?(m.setAttribute("checked","checked"),m.defaultChecked=!0,m.checked=!0):(m.removeAttribute("checked"),m.defaultChecked=!1,m.checked=!1);C.style.display=m.checked||k?"":"none";null!=d&&d("null"==D?null:D);x=D;N||(S||k||b()!=x)&&f("null"==x?null:x,x);B=!1}},J=document.createElement("input");J.setAttribute("type","color");J.style.visibility="hidden";J.style.width="0px";J.style.height="0px";J.style.border=
+"none";u.appendChild(J);C=mxUtils.button("",mxUtils.bind(this,function(D){var N=x;"default"==N&&(N=n);!mxEvent.isShiftDown(D)||mxClient.IS_IE||mxClient.IS_IE11?this.editorUi.pickColor(N,function(S){F(S,null,!0)},n):(J.value=N,J.click(),mxEvent.addListener(J,"input",function(){F(J.value,null,!0)}));mxEvent.consume(D)}));C.style.position="absolute";C.style.marginTop="-3px";C.style.left="178px";C.style.height="22px";C.className="geColorBtn";C.style.display=m.checked||k?"":"none";u.appendChild(C);a=null!=
+x&&"string"===typeof x&&"#"==x.charAt(0)?x.substring(1).toUpperCase():x;a=ColorDialog.prototype.colorNames[a];C.setAttribute("title",null!=a?a+" (Shift+Click for Color Dropper)":"Shift+Click for Color Dropper");mxEvent.addListener(u,"click",function(D){D=mxEvent.getSource(D);if(D==m||"INPUT"!=D.nodeName)D!=m&&(m.checked=!m.checked),m.checked||null==x||x==mxConstants.NONE||e==mxConstants.NONE||(e=x),F(m.checked?e:mxConstants.NONE)});F(x,!0);null!=g&&(g.install(F),this.listeners.push(g));return u};
+BaseFormatPanel.prototype.createCellColorOption=function(a,b,f,e,g,d){var k=this.editorUi,n=k.editor.graph;return this.createColorOption(a,function(){var u=n.view.getState(k.getSelectionState().cells[0]);return null!=u?mxUtils.getValue(u.style,b,null):null},function(u,m){n.getModel().beginUpdate();try{var r=k.getSelectionState().cells;n.setCellStyles(b,u,r);null!=g&&g(u);k.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[u],"cells",r))}finally{n.getModel().endUpdate()}},f||mxConstants.NONE,
+{install:function(u){this.listener=function(){var m=n.view.getState(k.getSelectionState().cells[0]);null!=m&&u(mxUtils.getValue(m.style,b,null),!0)};n.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){n.getModel().removeListener(this.listener)}},e,null,d)};
+BaseFormatPanel.prototype.addArrow=function(a,b,f){b=null!=b?b:10;var e=document.createElement("div");e.style.borderLeft="1px solid #a0a0a0";e.style.display="inline-block";e.style.height=b+"px";e.style.paddingRight="4px";e.style.padding="6px";f?(e.style.verticalAlign="top",e.style.marginLeft="1px"):(b=10-b,2==b?e.style.paddingTop="6px":0<b?e.style.paddingTop=6-b+"px":e.style.marginTop="-2px");b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("valign","middle");b.setAttribute("src",
+Toolbar.prototype.dropDownImage);e.appendChild(b);b=e.getElementsByTagName("img")[0];b.style.position="relative";b.style.left="1px";b.style.top=mxClient.IS_FF?"0px":"-4px";mxUtils.setOpacity(e,70);b=a.getElementsByTagName("div")[0];null!=b&&(b.style.paddingRight="6px",b.style.marginLeft="4px",b.style.marginTop="-1px",b.style.display="inline-block",mxUtils.setOpacity(b,60));mxUtils.setOpacity(a,100);a.style.border="1px solid #a0a0a0";a.style.backgroundColor=this.buttonBackgroundColor;a.style.backgroundImage=
+"none";a.style.width="auto";a.className+=" geColorBtn";mxUtils.setPrefixedStyle(a.style,"borderRadius","3px");a.appendChild(e);return b};
+BaseFormatPanel.prototype.addUnitInput=function(a,b,f,e,g,d,k,n,u){k=null!=k?k:0;b=document.createElement("input");b.style.position="absolute";b.style.textAlign="right";b.style.marginTop="-2px";b.style.left=228-f-e+"px";b.style.width=e+"px";b.style.height="21px";b.style.border="1px solid rgb(160, 160, 160)";b.style.borderRadius="4px";b.style.boxSizing="border-box";a.appendChild(b);e=this.createStepper(b,g,d,null,n,null,u);e.style.marginTop=k-2+"px";e.style.left=228-f+"px";a.appendChild(e);return b};
+BaseFormatPanel.prototype.createRelativeOption=function(a,b,f,e,g){f=null!=f?f:52;var d=this.editorUi,k=d.editor.graph,n=this.createPanel();n.style.paddingTop="10px";n.style.paddingBottom="10px";mxUtils.write(n,a);n.style.fontWeight="bold";a=mxUtils.bind(this,function(r){if(null!=e)e(u);else{var x=parseInt(u.value);x=Math.min(100,Math.max(0,isNaN(x)?100:x));var B=k.view.getState(d.getSelectionState().cells[0]);null!=B&&x!=mxUtils.getValue(B.style,b,100)&&(100==x&&(x=null),B=d.getSelectionState().cells,
+k.setCellStyles(b,x,B),this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[x],"cells",B)));u.value=(null!=x?x:"100")+" %"}mxEvent.consume(r)});var u=this.addUnitInput(n,"%",16,f,a,10,-15,null!=e);if(null!=b){var m=mxUtils.bind(this,function(r,x,B){if(B||u!=document.activeElement)r=d.getSelectionState(),r=parseInt(mxUtils.getValue(r.style,b,100)),u.value=isNaN(r)?"":r+" %"});mxEvent.addListener(u,"keydown",function(r){13==r.keyCode?(k.container.focus(),mxEvent.consume(r)):
27==r.keyCode&&(m(null,null,!0),k.container.focus(),mxEvent.consume(r))});k.getModel().addListener(mxEvent.CHANGE,m);this.listeners.push({destroy:function(){k.getModel().removeListener(m)}});m()}mxEvent.addListener(u,"blur",a);mxEvent.addListener(u,"change",a);null!=g&&g(u);return n};
-BaseFormatPanel.prototype.addLabel=function(a,b,f,d){d=null!=d?d:61;var g=document.createElement("div");mxUtils.write(g,b);g.style.position="absolute";g.style.left=240-f-d+"px";g.style.width=d+"px";g.style.marginTop="6px";g.style.textAlign="center";a.appendChild(g)};
+BaseFormatPanel.prototype.addLabel=function(a,b,f,e){e=null!=e?e:61;var g=document.createElement("div");mxUtils.write(g,b);g.style.position="absolute";g.style.left=240-f-e+"px";g.style.width=e+"px";g.style.marginTop="6px";g.style.textAlign="center";a.appendChild(g)};
BaseFormatPanel.prototype.addKeyHandler=function(a,b){mxEvent.addListener(a,"keydown",mxUtils.bind(this,function(f){13==f.keyCode?(this.editorUi.editor.graph.container.focus(),mxEvent.consume(f)):27==f.keyCode&&(null!=b&&b(null,null,!0),this.editorUi.editor.graph.container.focus(),mxEvent.consume(f))}))};
BaseFormatPanel.prototype.styleButtons=function(a){for(var b=0;b<a.length;b++)mxUtils.setPrefixedStyle(a[b].style,"borderRadius","3px"),mxUtils.setOpacity(a[b],100),a[b].style.border="1px solid #a0a0a0",a[b].style.padding="4px",a[b].style.paddingTop="3px",a[b].style.paddingRight="1px",a[b].style.margin="1px",a[b].style.marginRight="2px",a[b].style.width="24px",a[b].style.height="20px",a[b].className+=" geColorBtn"};
BaseFormatPanel.prototype.destroy=function(){if(null!=this.listeners){for(var a=0;a<this.listeners.length;a++)this.listeners[a].destroy();this.listeners=null}};ArrangePanel=function(a,b,f){BaseFormatPanel.call(this,a,b,f);this.init()};mxUtils.extend(ArrangePanel,BaseFormatPanel);
ArrangePanel.prototype.init=function(){var a=this.editorUi.getSelectionState();0<a.cells.length&&(this.container.appendChild(this.addLayerOps(this.createPanel())),this.addGeometry(this.container),this.addEdgeGeometry(this.container),a.containsLabel&&0!=a.edges.length||this.container.appendChild(this.addAngle(this.createPanel())),a.containsLabel||this.container.appendChild(this.addFlip(this.createPanel())),this.container.appendChild(this.addAlign(this.createPanel())),1<a.vertices.length&&!a.cell&&
!a.row&&this.container.appendChild(this.addDistribute(this.createPanel())),this.container.appendChild(this.addTable(this.createPanel())),this.container.appendChild(this.addGroupOps(this.createPanel())));a.containsLabel&&(a=document.createElement("div"),a.style.width="100%",a.style.marginTop="0px",a.style.fontWeight="bold",a.style.padding="10px 0 0 14px",mxUtils.write(a,mxResources.get("style")),this.container.appendChild(a),new StyleFormatPanel(this.format,this.editorUi,this.container))};
-ArrangePanel.prototype.addTable=function(a){var b=this.editorUi,f=b.editor.graph,d=b.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="10px";var g=document.createElement("div");g.style.marginTop="0px";g.style.marginBottom="6px";g.style.fontWeight="bold";mxUtils.write(g,mxResources.get("table"));a.appendChild(g);g=document.createElement("div");g.style.position="relative";g.style.paddingLeft="0px";g.style.borderWidth="0px";g.style.width="220px";g.className="geToolbarContainer";var e=
-d.vertices[0];1<f.getSelectionCount()&&(f.isTableCell(e)&&(e=f.model.getParent(e)),f.isTableRow(e)&&(e=f.model.getParent(e)));var k=d.table||d.row||d.cell,n=f.isStack(e)||f.isStackChild(e),u=k;n&&(k="0"==(f.isStack(e)?d.style:f.getCellStyle(f.model.getParent(e))).horizontalStack,u=!k);var m=[];u&&(m=m.concat([b.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),mxUtils.bind(this,function(){try{n?f.insertLane(e,!0):f.insertTableColumn(e,!0)}catch(r){b.handleError(r)}}),
-g),b.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{n?f.insertLane(e,!1):f.insertTableColumn(e,!1)}catch(r){b.handleError(r)}}),g),b.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{n?f.deleteLane(e):f.deleteTableColumn(e)}catch(r){b.handleError(r)}}),g)]));k&&(m=m.concat([b.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),mxUtils.bind(this,
-function(){try{n?f.insertLane(e,!0):f.insertTableRow(e,!0)}catch(r){b.handleError(r)}}),g),b.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{n?f.insertLane(e,!1):f.insertTableRow(e,!1)}catch(r){b.handleError(r)}}),g),b.toolbar.addButton("geSprite-deleterow",mxResources.get("deleteRow"),mxUtils.bind(this,function(){try{n?f.deleteLane(e):f.deleteTableRow(e)}catch(r){b.handleError(r)}}),g)]));if(0<m.length){this.styleButtons(m);a.appendChild(g);
-3<m.length&&(m[2].style.marginRight="10px");u=0;if(null!=d.mergeCell)u+=this.addActions(a,["mergeCells"]);else if(1<d.style.colspan||1<d.style.rowspan)u+=this.addActions(a,["unmergeCells"]);0<u&&(g.style.paddingBottom="2px")}else a.style.display="none";return a};ArrangePanel.prototype.addLayerOps=function(a){this.addActions(a,["toFront","toBack"]);this.addActions(a,["bringForward","sendBackward"]);return a};
-ArrangePanel.prototype.addGroupOps=function(a){var b=this.editorUi,f=b.editor.graph,d=b.getSelectionState();a.style.paddingTop="8px";a.style.paddingBottom="6px";var g=0;d.cell||d.row||(g+=this.addActions(a,["group","ungroup","copySize","pasteSize"])+this.addActions(a,["removeFromGroup"]));var e=null;1!=d.cells.length||null==d.cells[0].value||isNaN(d.cells[0].value.nodeType)||(e=mxUtils.button(mxResources.get("copyData"),function(n){if(mxEvent.isShiftDown(n)){var u=f.getDataForCells(f.getSelectionCells());
-n=new EmbedDialog(b,JSON.stringify(u,null,2),null,null,function(){console.log(u);b.alert("Written to Console (Dev Tools)")},mxResources.get("copyData"),null,"Console","data.json");b.showDialog(n.container,450,240,!0,!0);n.init()}else b.actions.get("copyData").funct(n)}),e.setAttribute("title",mxResources.get("copyData")+" ("+this.editorUi.actions.get("copyData").shortcut+") Shift+Click to Extract Data"),e.style.marginBottom="2px",e.style.width="210px",a.appendChild(e),g++);var k=null;null!=b.copiedValue&&
-0<d.cells.length&&(k=mxUtils.button(mxResources.get("pasteData"),function(n){b.actions.get("pasteData").funct(n)}),k.setAttribute("title",mxResources.get("pasteData")+" ("+this.editorUi.actions.get("pasteData").shortcut+")"),k.style.marginBottom="2px",k.style.width="210px",a.appendChild(k),g++,null!=e&&(e.style.width="104px",k.style.width="104px",k.style.marginBottom="2px",e.style.marginBottom="2px",e.style.marginRight="2px"));null==e&&null==k||mxUtils.br(a);d=this.addAction(a,"clearWaypoints");null!=
-d&&(mxUtils.br(a),d.setAttribute("title",mxResources.get("clearWaypoints")+" ("+this.editorUi.actions.get("clearWaypoints").shortcut+") Shift+Click to Clear Anchor Points"),g++);1==f.getSelectionCount()&&(g+=this.addActions(a,["editData","editLink"]));0==g&&(a.style.display="none");return a};
-ArrangePanel.prototype.addAlign=function(a){var b=this.editorUi.getSelectionState(),f=this.editorUi.editor.graph;a.style.paddingTop="6px";a.style.paddingBottom="8px";a.appendChild(this.createTitle(mxResources.get("align")));var d=document.createElement("div");d.style.position="relative";d.style.whiteSpace="nowrap";d.style.paddingLeft="0px";d.style.paddingBottom="2px";d.style.borderWidth="0px";d.style.width="220px";d.className="geToolbarContainer";if(1<b.vertices.length){b=this.editorUi.toolbar.addButton("geSprite-alignleft",
-mxResources.get("left"),function(){f.alignCells(mxConstants.ALIGN_LEFT)},d);var g=this.editorUi.toolbar.addButton("geSprite-aligncenter",mxResources.get("center"),function(){f.alignCells(mxConstants.ALIGN_CENTER)},d),e=this.editorUi.toolbar.addButton("geSprite-alignright",mxResources.get("right"),function(){f.alignCells(mxConstants.ALIGN_RIGHT)},d),k=this.editorUi.toolbar.addButton("geSprite-aligntop",mxResources.get("top"),function(){f.alignCells(mxConstants.ALIGN_TOP)},d),n=this.editorUi.toolbar.addButton("geSprite-alignmiddle",
-mxResources.get("middle"),function(){f.alignCells(mxConstants.ALIGN_MIDDLE)},d),u=this.editorUi.toolbar.addButton("geSprite-alignbottom",mxResources.get("bottom"),function(){f.alignCells(mxConstants.ALIGN_BOTTOM)},d);this.styleButtons([b,g,e,k,n,u]);e.style.marginRight="10px"}a.appendChild(d);this.addActions(a,["snapToGrid"]);return a};
-ArrangePanel.prototype.addFlip=function(a){var b=this.editorUi.editor.graph;a.style.paddingTop="6px";a.style.paddingBottom="10px";var f=this.editorUi.getSelectionState(),d=document.createElement("div");d.style.marginTop="2px";d.style.marginBottom="8px";d.style.fontWeight="bold";mxUtils.write(d,mxResources.get("flip"));a.appendChild(d);d=mxUtils.button(mxResources.get("horizontal"),function(g){b.flipCells(f.cells,!0)});d.setAttribute("title",mxResources.get("horizontal"));d.style.width="104px";d.style.marginRight=
-"2px";a.appendChild(d);d=mxUtils.button(mxResources.get("vertical"),function(g){b.flipCells(f.cells,!1)});d.setAttribute("title",mxResources.get("vertical"));d.style.width="104px";a.appendChild(d);return a};
-ArrangePanel.prototype.addDistribute=function(a){var b=this.editorUi.editor.graph;a.style.paddingTop="6px";a.style.paddingBottom="12px";a.appendChild(this.createTitle(mxResources.get("distribute")));var f=mxUtils.button(mxResources.get("horizontal"),function(d){b.distributeCells(!0)});f.setAttribute("title",mxResources.get("horizontal"));f.style.width="104px";f.style.marginRight="2px";a.appendChild(f);f=mxUtils.button(mxResources.get("vertical"),function(d){b.distributeCells(!1)});f.setAttribute("title",
+ArrangePanel.prototype.addTable=function(a){var b=this.editorUi,f=b.editor.graph,e=b.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="10px";var g=document.createElement("div");g.style.marginTop="0px";g.style.marginBottom="6px";g.style.fontWeight="bold";mxUtils.write(g,mxResources.get("table"));a.appendChild(g);g=document.createElement("div");g.style.position="relative";g.style.paddingLeft="0px";g.style.borderWidth="0px";g.style.width="220px";g.className="geToolbarContainer";var d=
+e.vertices[0];1<f.getSelectionCount()&&(f.isTableCell(d)&&(d=f.model.getParent(d)),f.isTableRow(d)&&(d=f.model.getParent(d)));var k=e.table||e.row||e.cell,n=f.isStack(d)||f.isStackChild(d),u=k;n&&(k="0"==(f.isStack(d)?e.style:f.getCellStyle(f.model.getParent(d))).horizontalStack,u=!k);var m=[];u&&(m=m.concat([b.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),mxUtils.bind(this,function(){try{n?f.insertLane(d,!0):f.insertTableColumn(d,!0)}catch(r){b.handleError(r)}}),
+g),b.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{n?f.insertLane(d,!1):f.insertTableColumn(d,!1)}catch(r){b.handleError(r)}}),g),b.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{n?f.deleteLane(d):f.deleteTableColumn(d)}catch(r){b.handleError(r)}}),g)]));k&&(m=m.concat([b.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),mxUtils.bind(this,
+function(){try{n?f.insertLane(d,!0):f.insertTableRow(d,!0)}catch(r){b.handleError(r)}}),g),b.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{n?f.insertLane(d,!1):f.insertTableRow(d,!1)}catch(r){b.handleError(r)}}),g),b.toolbar.addButton("geSprite-deleterow",mxResources.get("deleteRow"),mxUtils.bind(this,function(){try{n?f.deleteLane(d):f.deleteTableRow(d)}catch(r){b.handleError(r)}}),g)]));if(0<m.length){this.styleButtons(m);a.appendChild(g);
+3<m.length&&(m[2].style.marginRight="10px");u=0;if(null!=e.mergeCell)u+=this.addActions(a,["mergeCells"]);else if(1<e.style.colspan||1<e.style.rowspan)u+=this.addActions(a,["unmergeCells"]);0<u&&(g.style.paddingBottom="2px")}else a.style.display="none";return a};ArrangePanel.prototype.addLayerOps=function(a){this.addActions(a,["toFront","toBack"]);this.addActions(a,["bringForward","sendBackward"]);return a};
+ArrangePanel.prototype.addGroupOps=function(a){var b=this.editorUi,f=b.editor.graph,e=b.getSelectionState();a.style.paddingTop="8px";a.style.paddingBottom="6px";var g=0;e.cell||e.row||(g+=this.addActions(a,["group","ungroup","copySize","pasteSize"])+this.addActions(a,["removeFromGroup"]));var d=null;1!=e.cells.length||null==e.cells[0].value||isNaN(e.cells[0].value.nodeType)||(d=mxUtils.button(mxResources.get("copyData"),function(n){if(mxEvent.isShiftDown(n)){var u=f.getDataForCells(f.getSelectionCells());
+n=new EmbedDialog(b,JSON.stringify(u,null,2),null,null,function(){console.log(u);b.alert("Written to Console (Dev Tools)")},mxResources.get("copyData"),null,"Console","data.json");b.showDialog(n.container,450,240,!0,!0);n.init()}else b.actions.get("copyData").funct(n)}),d.setAttribute("title",mxResources.get("copyData")+" ("+this.editorUi.actions.get("copyData").shortcut+") Shift+Click to Extract Data"),d.style.marginBottom="2px",d.style.width="210px",a.appendChild(d),g++);var k=null;null!=b.copiedValue&&
+0<e.cells.length&&(k=mxUtils.button(mxResources.get("pasteData"),function(n){b.actions.get("pasteData").funct(n)}),k.setAttribute("title",mxResources.get("pasteData")+" ("+this.editorUi.actions.get("pasteData").shortcut+")"),k.style.marginBottom="2px",k.style.width="210px",a.appendChild(k),g++,null!=d&&(d.style.width="104px",k.style.width="104px",k.style.marginBottom="2px",d.style.marginBottom="2px",d.style.marginRight="2px"));null==d&&null==k||mxUtils.br(a);e=this.addAction(a,"clearWaypoints");null!=
+e&&(mxUtils.br(a),e.setAttribute("title",mxResources.get("clearWaypoints")+" ("+this.editorUi.actions.get("clearWaypoints").shortcut+") Shift+Click to Clear Anchor Points"),g++);1==f.getSelectionCount()&&(g+=this.addActions(a,["editData","editLink"]));0==g&&(a.style.display="none");return a};
+ArrangePanel.prototype.addAlign=function(a){var b=this.editorUi.getSelectionState(),f=this.editorUi.editor.graph;a.style.paddingTop="6px";a.style.paddingBottom="8px";a.appendChild(this.createTitle(mxResources.get("align")));var e=document.createElement("div");e.style.position="relative";e.style.whiteSpace="nowrap";e.style.paddingLeft="0px";e.style.paddingBottom="2px";e.style.borderWidth="0px";e.style.width="220px";e.className="geToolbarContainer";if(1<b.vertices.length){b=this.editorUi.toolbar.addButton("geSprite-alignleft",
+mxResources.get("left"),function(){f.alignCells(mxConstants.ALIGN_LEFT)},e);var g=this.editorUi.toolbar.addButton("geSprite-aligncenter",mxResources.get("center"),function(){f.alignCells(mxConstants.ALIGN_CENTER)},e),d=this.editorUi.toolbar.addButton("geSprite-alignright",mxResources.get("right"),function(){f.alignCells(mxConstants.ALIGN_RIGHT)},e),k=this.editorUi.toolbar.addButton("geSprite-aligntop",mxResources.get("top"),function(){f.alignCells(mxConstants.ALIGN_TOP)},e),n=this.editorUi.toolbar.addButton("geSprite-alignmiddle",
+mxResources.get("middle"),function(){f.alignCells(mxConstants.ALIGN_MIDDLE)},e),u=this.editorUi.toolbar.addButton("geSprite-alignbottom",mxResources.get("bottom"),function(){f.alignCells(mxConstants.ALIGN_BOTTOM)},e);this.styleButtons([b,g,d,k,n,u]);d.style.marginRight="10px"}a.appendChild(e);this.addActions(a,["snapToGrid"]);return a};
+ArrangePanel.prototype.addFlip=function(a){var b=this.editorUi.editor.graph;a.style.paddingTop="6px";a.style.paddingBottom="10px";var f=this.editorUi.getSelectionState(),e=document.createElement("div");e.style.marginTop="2px";e.style.marginBottom="8px";e.style.fontWeight="bold";mxUtils.write(e,mxResources.get("flip"));a.appendChild(e);e=mxUtils.button(mxResources.get("horizontal"),function(g){b.flipCells(f.cells,!0)});e.setAttribute("title",mxResources.get("horizontal"));e.style.width="104px";e.style.marginRight=
+"2px";a.appendChild(e);e=mxUtils.button(mxResources.get("vertical"),function(g){b.flipCells(f.cells,!1)});e.setAttribute("title",mxResources.get("vertical"));e.style.width="104px";a.appendChild(e);return a};
+ArrangePanel.prototype.addDistribute=function(a){var b=this.editorUi.editor.graph;a.style.paddingTop="6px";a.style.paddingBottom="12px";a.appendChild(this.createTitle(mxResources.get("distribute")));var f=mxUtils.button(mxResources.get("horizontal"),function(e){b.distributeCells(!0)});f.setAttribute("title",mxResources.get("horizontal"));f.style.width="104px";f.style.marginRight="2px";a.appendChild(f);f=mxUtils.button(mxResources.get("vertical"),function(e){b.distributeCells(!1)});f.setAttribute("title",
mxResources.get("vertical"));f.style.width="104px";a.appendChild(f);return a};
-ArrangePanel.prototype.addAngle=function(a){var b=this.editorUi,f=b.editor.graph,d=b.getSelectionState();a.style.paddingBottom="8px";var g=document.createElement("div");g.style.position="absolute";g.style.width="70px";g.style.marginTop="0px";g.style.fontWeight="bold";var e=null,k=null,n=null;!d.rotatable||d.table||d.row||d.cell?a.style.paddingTop="8px":(mxUtils.write(g,mxResources.get("angle")),a.appendChild(g),e=this.addUnitInput(a,"°",16,52,function(){k.apply(this,arguments)}),mxUtils.br(a),a.style.paddingTop=
-"10px");d.containsLabel||(g=mxResources.get("reverse"),0<d.vertices.length&&0<d.edges.length?g=mxResources.get("turn")+" / "+g:0<d.vertices.length&&(g=mxResources.get("turn")),n=mxUtils.button(g,function(m){b.actions.get("turn").funct(m)}),n.setAttribute("title",g+" ("+this.editorUi.actions.get("turn").shortcut+")"),n.style.width="210px",a.appendChild(n),null!=e&&(n.style.marginTop="8px"));if(null!=e){var u=mxUtils.bind(this,function(m,r,x){if(x||document.activeElement!=e)d=b.getSelectionState(),
-m=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_ROTATION,0)),e.value=isNaN(m)?"":m+"°"});k=this.installInputHandler(e,mxConstants.STYLE_ROTATION,0,0,360,"°",null,!0);this.addKeyHandler(e,u);f.getModel().addListener(mxEvent.CHANGE,u);this.listeners.push({destroy:function(){f.getModel().removeListener(u)}});u()}return a};
+ArrangePanel.prototype.addAngle=function(a){var b=this.editorUi,f=b.editor.graph,e=b.getSelectionState();a.style.paddingBottom="8px";var g=document.createElement("div");g.style.position="absolute";g.style.width="70px";g.style.marginTop="0px";g.style.fontWeight="bold";var d=null,k=null,n=null;!e.rotatable||e.table||e.row||e.cell?a.style.paddingTop="8px":(mxUtils.write(g,mxResources.get("angle")),a.appendChild(g),d=this.addUnitInput(a,"°",16,52,function(){k.apply(this,arguments)}),mxUtils.br(a),a.style.paddingTop=
+"10px");e.containsLabel||(g=mxResources.get("reverse"),0<e.vertices.length&&0<e.edges.length?g=mxResources.get("turn")+" / "+g:0<e.vertices.length&&(g=mxResources.get("turn")),n=mxUtils.button(g,function(m){b.actions.get("turn").funct(m)}),n.setAttribute("title",g+" ("+this.editorUi.actions.get("turn").shortcut+")"),n.style.width="210px",a.appendChild(n),null!=d&&(n.style.marginTop="8px"));if(null!=d){var u=mxUtils.bind(this,function(m,r,x){if(x||document.activeElement!=d)e=b.getSelectionState(),
+m=parseFloat(mxUtils.getValue(e.style,mxConstants.STYLE_ROTATION,0)),d.value=isNaN(m)?"":m+"°"});k=this.installInputHandler(d,mxConstants.STYLE_ROTATION,0,0,360,"°",null,!0);this.addKeyHandler(d,u);f.getModel().addListener(mxEvent.CHANGE,u);this.listeners.push({destroy:function(){f.getModel().removeListener(u)}});u()}return a};
BaseFormatPanel.prototype.getUnit=function(){switch(this.editorUi.editor.graph.view.unit){case mxConstants.POINTS:return"pt";case mxConstants.INCHES:return'"';case mxConstants.MILLIMETERS:return"mm";case mxConstants.METERS:return"m"}};BaseFormatPanel.prototype.inUnit=function(a){return this.editorUi.editor.graph.view.formatUnitText(a)};
BaseFormatPanel.prototype.fromUnit=function(a){switch(this.editorUi.editor.graph.view.unit){case mxConstants.POINTS:return a;case mxConstants.INCHES:return a*mxConstants.PIXELS_PER_INCH;case mxConstants.MILLIMETERS:return a*mxConstants.PIXELS_PER_MM;case mxConstants.METERS:return a*mxConstants.PIXELS_PER_MM*1E3}};BaseFormatPanel.prototype.isFloatUnit=function(){return this.editorUi.editor.graph.view.unit!=mxConstants.POINTS};
BaseFormatPanel.prototype.getUnitStep=function(){switch(this.editorUi.editor.graph.view.unit){case mxConstants.POINTS:return 1;case mxConstants.INCHES:return.1;case mxConstants.MILLIMETERS:return.5;case mxConstants.METERS:return.001}};
-ArrangePanel.prototype.addGeometry=function(a){var b=this,f=this.editorUi,d=f.editor.graph,g=d.getModel(),e=f.getSelectionState(),k=this.createPanel();k.style.paddingBottom="8px";var n=document.createElement("div");n.style.position="absolute";n.style.width="50px";n.style.marginTop="0px";n.style.fontWeight="bold";mxUtils.write(n,mxResources.get("size"));k.appendChild(n);var u=this.addUnitInput(k,this.getUnit(),87,52,function(){C.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),
-m=this.addUnitInput(k,this.getUnit(),16,52,function(){G.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),r=document.createElement("div");r.className="geSprite geSprite-fit";r.setAttribute("title",mxResources.get("autosize")+" ("+this.editorUi.actions.get("autosize").shortcut+")");r.style.position="relative";r.style.cursor="pointer";r.style.marginTop="-3px";r.style.border="0px";r.style.left="42px";mxUtils.setOpacity(r,50);mxEvent.addListener(r,"mouseenter",function(){mxUtils.setOpacity(r,
-100)});mxEvent.addListener(r,"mouseleave",function(){mxUtils.setOpacity(r,50)});mxEvent.addListener(r,"click",function(){f.actions.get("autosize").funct()});k.appendChild(r);e.row?(u.style.visibility="hidden",u.nextSibling.style.visibility="hidden"):this.addLabel(k,mxResources.get("width"),87);this.addLabel(k,mxResources.get("height"),16);mxUtils.br(k);n=document.createElement("div");n.style.paddingTop="8px";n.style.paddingRight="20px";n.style.whiteSpace="nowrap";n.style.textAlign="right";var x=this.createCellOption(mxResources.get("constrainProportions"),
-mxConstants.STYLE_ASPECT,null,"fixed","null");x.style.width="210px";n.appendChild(x);e.cell||e.row?r.style.visibility="hidden":k.appendChild(n);var B=x.getElementsByTagName("input")[0];this.addKeyHandler(u,Q);this.addKeyHandler(m,Q);var C=this.addGeometryHandler(u,function(U,V,ia){if(d.isTableCell(ia))return d.setTableColumnWidth(ia,V-U.width,!0),!0;0<U.width&&(V=Math.max(1,b.fromUnit(V)),B.checked&&(U.height=Math.round(U.height*V*100/U.width)/100),U.width=V)});var G=this.addGeometryHandler(m,function(U,
-V,ia){d.isTableCell(ia)&&(ia=d.model.getParent(ia));if(d.isTableRow(ia))return d.setTableRowHeight(ia,V-U.height),!0;0<U.height&&(V=Math.max(1,b.fromUnit(V)),B.checked&&(U.width=Math.round(U.width*V*100/U.height)/100),U.height=V)});(e.resizable||e.row||e.cell)&&a.appendChild(k);var J=this.createPanel();J.style.paddingBottom="30px";n=document.createElement("div");n.style.position="absolute";n.style.width="70px";n.style.marginTop="0px";n.style.fontWeight="bold";mxUtils.write(n,mxResources.get("position"));
-J.appendChild(n);var D=this.addUnitInput(J,this.getUnit(),87,52,function(){R.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),N=this.addUnitInput(J,this.getUnit(),16,52,function(){P.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(J);this.addLabel(J,mxResources.get("left"),87);this.addLabel(J,mxResources.get("top"),16);var Q=mxUtils.bind(this,function(U,V,ia){e=f.getSelectionState();if(e.containsLabel||e.vertices.length!=d.getSelectionCount()||
-null==e.width||null==e.height)k.style.display="none";else{k.style.display="";if(ia||document.activeElement!=u)u.value=this.inUnit(e.width)+(""==e.width?"":" "+this.getUnit());if(ia||document.activeElement!=m)m.value=this.inUnit(e.height)+(""==e.height?"":" "+this.getUnit())}if(e.vertices.length==d.getSelectionCount()&&null!=e.x&&null!=e.y){J.style.display="";if(ia||document.activeElement!=D)D.value=this.inUnit(e.x)+(""==e.x?"":" "+this.getUnit());if(ia||document.activeElement!=N)N.value=this.inUnit(e.y)+
-(""==e.y?"":" "+this.getUnit())}else J.style.display="none"});this.addKeyHandler(D,Q);this.addKeyHandler(N,Q);g.addListener(mxEvent.CHANGE,Q);this.listeners.push({destroy:function(){g.removeListener(Q)}});Q();var R=this.addGeometryHandler(D,function(U,V){V=b.fromUnit(V);U.relative?U.offset.x=V:U.x=V});var P=this.addGeometryHandler(N,function(U,V){V=b.fromUnit(V);U.relative?U.offset.y=V:U.y=V});if(e.movable){if(0==e.edges.length&&1==e.vertices.length&&g.isEdge(g.getParent(e.vertices[0]))){var Z=d.getCellGeometry(e.vertices[0]);
-null!=Z&&Z.relative&&(n=mxUtils.button(mxResources.get("center"),mxUtils.bind(this,function(U){g.beginUpdate();try{Z=Z.clone(),Z.x=0,Z.y=0,Z.offset=new mxPoint,g.setGeometry(e.vertices[0],Z)}finally{g.endUpdate()}})),n.setAttribute("title",mxResources.get("center")),n.style.width="210px",n.style.position="absolute",mxUtils.br(J),mxUtils.br(J),J.appendChild(n))}a.appendChild(J)}};
-ArrangePanel.prototype.addGeometryHandler=function(a,b){function f(n){if(""!=a.value){var u=parseFloat(a.value);if(isNaN(u))a.value=e+" "+k.getUnit();else if(u!=e){g.getModel().beginUpdate();try{for(var m=d.getSelectionState().cells,r=0;r<m.length;r++)if(g.getModel().isVertex(m[r])){var x=g.getCellGeometry(m[r]);if(null!=x&&(x=x.clone(),!b(x,u,m[r]))){var B=g.view.getState(m[r]);null!=B&&g.isRecursiveVertexResize(B)&&g.resizeChildCells(m[r],x);g.getModel().setGeometry(m[r],x);g.constrainChildCells(m[r])}}}finally{g.getModel().endUpdate()}e=
-u;a.value=u+" "+k.getUnit()}}mxEvent.consume(n)}var d=this.editorUi,g=d.editor.graph,e=null,k=this;mxEvent.addListener(a,"blur",f);mxEvent.addListener(a,"change",f);mxEvent.addListener(a,"focus",function(){e=a.value});return f};
-ArrangePanel.prototype.addEdgeGeometryHandler=function(a,b){function f(k){if(""!=a.value){var n=parseFloat(a.value);if(isNaN(n))a.value=e+" pt";else if(n!=e){g.getModel().beginUpdate();try{for(var u=d.getSelectionState().cells,m=0;m<u.length;m++)if(g.getModel().isEdge(u[m])){var r=g.getCellGeometry(u[m]);null!=r&&(r=r.clone(),b(r,n),g.getModel().setGeometry(u[m],r))}}finally{g.getModel().endUpdate()}e=n;a.value=n+" pt"}}mxEvent.consume(k)}var d=this.editorUi,g=d.editor.graph,e=null;mxEvent.addListener(a,
-"blur",f);mxEvent.addListener(a,"change",f);mxEvent.addListener(a,"focus",function(){e=a.value});return f};
-ArrangePanel.prototype.addEdgeGeometry=function(a){var b=this.editorUi,f=b.editor.graph,d=b.getSelectionState(),g=this.createPanel(),e=document.createElement("div");e.style.position="absolute";e.style.width="70px";e.style.marginTop="0px";e.style.fontWeight="bold";mxUtils.write(e,mxResources.get("width"));g.appendChild(e);var k=this.addUnitInput(g,"pt",12,44,function(){n.apply(this,arguments)});mxUtils.br(g);this.addKeyHandler(k,G);var n=mxUtils.bind(this,function(R){var P=parseInt(k.value);P=Math.min(999,
-Math.max(1,isNaN(P)?1:P));if(P!=mxUtils.getValue(d.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth)){var Z=b.getSelectionState().cells;f.setCellStyles("width",P,Z);b.fireEvent(new mxEventObject("styleChanged","keys",["width"],"values",[P],"cells",Z))}k.value=P+" pt";mxEvent.consume(R)});mxEvent.addListener(k,"blur",n);mxEvent.addListener(k,"change",n);a.appendChild(g);var u=this.createPanel();u.style.paddingBottom="30px";e=document.createElement("div");e.style.position=
-"absolute";e.style.width="70px";e.style.marginTop="0px";mxUtils.write(e,mxResources.get("linestart"));u.appendChild(e);var m=this.addUnitInput(u,"pt",87,52,function(){J.apply(this,arguments)}),r=this.addUnitInput(u,"pt",16,52,function(){D.apply(this,arguments)});mxUtils.br(u);this.addLabel(u,mxResources.get("left"),87);this.addLabel(u,mxResources.get("top"),16);a.appendChild(u);this.addKeyHandler(m,G);this.addKeyHandler(r,G);var x=this.createPanel();x.style.paddingBottom="30px";e=document.createElement("div");
-e.style.position="absolute";e.style.width="70px";e.style.marginTop="0px";mxUtils.write(e,mxResources.get("lineend"));x.appendChild(e);var B=this.addUnitInput(x,"pt",87,52,function(){N.apply(this,arguments)}),C=this.addUnitInput(x,"pt",16,52,function(){Q.apply(this,arguments)});mxUtils.br(x);this.addLabel(x,mxResources.get("left"),87);this.addLabel(x,mxResources.get("top"),16);a.appendChild(x);this.addKeyHandler(B,G);this.addKeyHandler(C,G);var G=mxUtils.bind(this,function(R,P,Z){d=b.getSelectionState();
-R=d.cells[0];if("link"==d.style.shape||"flexArrow"==d.style.shape){if(g.style.display="",Z||document.activeElement!=k)Z=mxUtils.getValue(d.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth),k.value=Z+" pt"}else g.style.display="none";1==d.cells.length&&f.model.isEdge(R)?(Z=f.model.getGeometry(R),null!=Z.sourcePoint&&null==f.model.getTerminal(R,!0)?(m.value=Z.sourcePoint.x,r.value=Z.sourcePoint.y):u.style.display="none",null!=Z.targetPoint&&null==f.model.getTerminal(R,!1)?
-(B.value=Z.targetPoint.x,C.value=Z.targetPoint.y):x.style.display="none"):(u.style.display="none",x.style.display="none")});var J=this.addEdgeGeometryHandler(m,function(R,P){R.sourcePoint.x=P});var D=this.addEdgeGeometryHandler(r,function(R,P){R.sourcePoint.y=P});var N=this.addEdgeGeometryHandler(B,function(R,P){R.targetPoint.x=P});var Q=this.addEdgeGeometryHandler(C,function(R,P){R.targetPoint.y=P});f.getModel().addListener(mxEvent.CHANGE,G);this.listeners.push({destroy:function(){f.getModel().removeListener(G)}});
-G()};TextFormatPanel=function(a,b,f){BaseFormatPanel.call(this,a,b,f);this.init()};mxUtils.extend(TextFormatPanel,BaseFormatPanel);TextFormatPanel.prototype.init=function(){this.container.style.borderBottom="none";this.addFont(this.container)};
-TextFormatPanel.prototype.addFont=function(a){function b(da,t){da.style.backgroundImage=t?Editor.isDarkMode()?"linear-gradient(rgb(0 161 241) 0px, rgb(0, 97, 146) 100%)":"linear-gradient(#c5ecff 0px,#87d4fb 100%)":""}var f=this.editorUi,d=f.editor.graph,g=f.getSelectionState(),e=this.createTitle(mxResources.get("font"));e.style.paddingLeft="14px";e.style.paddingTop="10px";e.style.paddingBottom="6px";a.appendChild(e);e=this.createPanel();e.style.paddingTop="2px";e.style.paddingBottom="2px";e.style.position=
-"relative";e.style.marginLeft="-2px";e.style.borderWidth="0px";e.className="geToolbarContainer";if(d.cellEditor.isContentEditing()){var k=e.cloneNode(),n=this.editorUi.toolbar.addMenu(mxResources.get("style"),mxResources.get("style"),!0,"formatBlock",k,null,!0);n.style.color="rgb(112, 112, 112)";n.style.whiteSpace="nowrap";n.style.overflow="hidden";n.style.margin="0px";this.addArrow(n);n.style.width="200px";n.style.height="15px";n=n.getElementsByTagName("div")[0];n.style.cssFloat="right";a.appendChild(k)}a.appendChild(e);
-k=this.createPanel();k.style.marginTop="8px";k.style.borderTop="1px solid #c0c0c0";k.style.paddingTop="6px";k.style.paddingBottom="6px";var u=this.editorUi.toolbar.addMenu("Helvetica",mxResources.get("fontFamily"),!0,"fontFamily",e,null,!0);u.style.color="rgb(112, 112, 112)";u.style.whiteSpace="nowrap";u.style.overflow="hidden";u.style.margin="0px";this.addArrow(u);u.style.width="200px";u.style.height="15px";n=e.cloneNode(!1);n.style.marginLeft="-3px";var m=this.editorUi.toolbar.addItems(["bold",
-"italic","underline"],n,!0);m[0].setAttribute("title",mxResources.get("bold")+" ("+this.editorUi.actions.get("bold").shortcut+")");m[1].setAttribute("title",mxResources.get("italic")+" ("+this.editorUi.actions.get("italic").shortcut+")");m[2].setAttribute("title",mxResources.get("underline")+" ("+this.editorUi.actions.get("underline").shortcut+")");var r=this.editorUi.toolbar.addItems(["vertical"],n,!0)[0];a.appendChild(n);this.styleButtons(m);this.styleButtons([r]);var x=e.cloneNode(!1);x.style.marginLeft=
-"-3px";x.style.paddingBottom="0px";var B=function(da){return function(){return da()}},C=this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),d.cellEditor.isContentEditing()?function(da){d.cellEditor.alignText(mxConstants.ALIGN_LEFT,da);f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_LEFT],"cells",g.cells))}:B(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_LEFT])),x),G=this.editorUi.toolbar.addButton("geSprite-center",
-mxResources.get("center"),d.cellEditor.isContentEditing()?function(da){d.cellEditor.alignText(mxConstants.ALIGN_CENTER,da);f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_CENTER],"cells",g.cells))}:B(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_CENTER])),x),J=this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),d.cellEditor.isContentEditing()?function(da){d.cellEditor.alignText(mxConstants.ALIGN_RIGHT,
-da);f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_RIGHT],"cells",g.cells))}:B(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_RIGHT])),x);this.styleButtons([C,G,J]);if(d.cellEditor.isContentEditing()){var D=this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("strikethrough"),function(){document.execCommand("strikeThrough",!1,null)},n);this.styleButtons([D]);D.firstChild.style.background=
+ArrangePanel.prototype.addGeometry=function(a){var b=this,f=this.editorUi,e=f.editor.graph,g=e.getModel(),d=f.getSelectionState(),k=this.createPanel();k.style.paddingBottom="8px";var n=document.createElement("div");n.style.position="absolute";n.style.width="50px";n.style.marginTop="0px";n.style.fontWeight="bold";mxUtils.write(n,mxResources.get("size"));k.appendChild(n);var u=this.addUnitInput(k,this.getUnit(),87,52,function(){C.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),
+m=this.addUnitInput(k,this.getUnit(),16,52,function(){F.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),r=document.createElement("div");r.className="geSprite geSprite-fit";r.setAttribute("title",mxResources.get("autosize")+" ("+this.editorUi.actions.get("autosize").shortcut+")");r.style.position="relative";r.style.cursor="pointer";r.style.marginTop="-3px";r.style.border="0px";r.style.left="42px";mxUtils.setOpacity(r,50);mxEvent.addListener(r,"mouseenter",function(){mxUtils.setOpacity(r,
+100)});mxEvent.addListener(r,"mouseleave",function(){mxUtils.setOpacity(r,50)});mxEvent.addListener(r,"click",function(){f.actions.get("autosize").funct()});k.appendChild(r);d.row?(u.style.visibility="hidden",u.nextSibling.style.visibility="hidden"):this.addLabel(k,mxResources.get("width"),87);this.addLabel(k,mxResources.get("height"),16);mxUtils.br(k);n=document.createElement("div");n.style.paddingTop="8px";n.style.paddingRight="20px";n.style.whiteSpace="nowrap";n.style.textAlign="right";var x=this.createCellOption(mxResources.get("constrainProportions"),
+mxConstants.STYLE_ASPECT,null,"fixed","null");x.style.width="210px";n.appendChild(x);d.cell||d.row?r.style.visibility="hidden":k.appendChild(n);var B=x.getElementsByTagName("input")[0];this.addKeyHandler(u,S);this.addKeyHandler(m,S);var C=this.addGeometryHandler(u,function(U,V,aa){if(e.isTableCell(aa))return e.setTableColumnWidth(aa,V-U.width,!0),!0;0<U.width&&(V=Math.max(1,b.fromUnit(V)),B.checked&&(U.height=Math.round(U.height*V*100/U.width)/100),U.width=V)});var F=this.addGeometryHandler(m,function(U,
+V,aa){e.isTableCell(aa)&&(aa=e.model.getParent(aa));if(e.isTableRow(aa))return e.setTableRowHeight(aa,V-U.height),!0;0<U.height&&(V=Math.max(1,b.fromUnit(V)),B.checked&&(U.width=Math.round(U.width*V*100/U.height)/100),U.height=V)});(d.resizable||d.row||d.cell)&&a.appendChild(k);var J=this.createPanel();J.style.paddingBottom="30px";n=document.createElement("div");n.style.position="absolute";n.style.width="70px";n.style.marginTop="0px";n.style.fontWeight="bold";mxUtils.write(n,mxResources.get("position"));
+J.appendChild(n);var D=this.addUnitInput(J,this.getUnit(),87,52,function(){T.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),N=this.addUnitInput(J,this.getUnit(),16,52,function(){P.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(J);this.addLabel(J,mxResources.get("left"),87);this.addLabel(J,mxResources.get("top"),16);var S=mxUtils.bind(this,function(U,V,aa){d=f.getSelectionState();if(d.containsLabel||d.vertices.length!=e.getSelectionCount()||
+null==d.width||null==d.height)k.style.display="none";else{k.style.display="";if(aa||document.activeElement!=u)u.value=this.inUnit(d.width)+(""==d.width?"":" "+this.getUnit());if(aa||document.activeElement!=m)m.value=this.inUnit(d.height)+(""==d.height?"":" "+this.getUnit())}if(d.vertices.length==e.getSelectionCount()&&null!=d.x&&null!=d.y){J.style.display="";if(aa||document.activeElement!=D)D.value=this.inUnit(d.x)+(""==d.x?"":" "+this.getUnit());if(aa||document.activeElement!=N)N.value=this.inUnit(d.y)+
+(""==d.y?"":" "+this.getUnit())}else J.style.display="none"});this.addKeyHandler(D,S);this.addKeyHandler(N,S);g.addListener(mxEvent.CHANGE,S);this.listeners.push({destroy:function(){g.removeListener(S)}});S();var T=this.addGeometryHandler(D,function(U,V){V=b.fromUnit(V);U.relative?U.offset.x=V:U.x=V});var P=this.addGeometryHandler(N,function(U,V){V=b.fromUnit(V);U.relative?U.offset.y=V:U.y=V});if(d.movable){if(0==d.edges.length&&1==d.vertices.length&&g.isEdge(g.getParent(d.vertices[0]))){var Z=e.getCellGeometry(d.vertices[0]);
+null!=Z&&Z.relative&&(n=mxUtils.button(mxResources.get("center"),mxUtils.bind(this,function(U){g.beginUpdate();try{Z=Z.clone(),Z.x=0,Z.y=0,Z.offset=new mxPoint,g.setGeometry(d.vertices[0],Z)}finally{g.endUpdate()}})),n.setAttribute("title",mxResources.get("center")),n.style.width="210px",n.style.position="absolute",mxUtils.br(J),mxUtils.br(J),J.appendChild(n))}a.appendChild(J)}};
+ArrangePanel.prototype.addGeometryHandler=function(a,b){function f(n){if(""!=a.value){var u=parseFloat(a.value);if(isNaN(u))a.value=d+" "+k.getUnit();else if(u!=d){g.getModel().beginUpdate();try{for(var m=e.getSelectionState().cells,r=0;r<m.length;r++)if(g.getModel().isVertex(m[r])){var x=g.getCellGeometry(m[r]);if(null!=x&&(x=x.clone(),!b(x,u,m[r]))){var B=g.view.getState(m[r]);null!=B&&g.isRecursiveVertexResize(B)&&g.resizeChildCells(m[r],x);g.getModel().setGeometry(m[r],x);g.constrainChildCells(m[r])}}}finally{g.getModel().endUpdate()}d=
+u;a.value=u+" "+k.getUnit()}}mxEvent.consume(n)}var e=this.editorUi,g=e.editor.graph,d=null,k=this;mxEvent.addListener(a,"blur",f);mxEvent.addListener(a,"change",f);mxEvent.addListener(a,"focus",function(){d=a.value});return f};
+ArrangePanel.prototype.addEdgeGeometryHandler=function(a,b){function f(k){if(""!=a.value){var n=parseFloat(a.value);if(isNaN(n))a.value=d+" pt";else if(n!=d){g.getModel().beginUpdate();try{for(var u=e.getSelectionState().cells,m=0;m<u.length;m++)if(g.getModel().isEdge(u[m])){var r=g.getCellGeometry(u[m]);null!=r&&(r=r.clone(),b(r,n),g.getModel().setGeometry(u[m],r))}}finally{g.getModel().endUpdate()}d=n;a.value=n+" pt"}}mxEvent.consume(k)}var e=this.editorUi,g=e.editor.graph,d=null;mxEvent.addListener(a,
+"blur",f);mxEvent.addListener(a,"change",f);mxEvent.addListener(a,"focus",function(){d=a.value});return f};
+ArrangePanel.prototype.addEdgeGeometry=function(a){var b=this.editorUi,f=b.editor.graph,e=b.getSelectionState(),g=this.createPanel(),d=document.createElement("div");d.style.position="absolute";d.style.width="70px";d.style.marginTop="0px";d.style.fontWeight="bold";mxUtils.write(d,mxResources.get("width"));g.appendChild(d);var k=this.addUnitInput(g,"pt",12,44,function(){n.apply(this,arguments)});mxUtils.br(g);this.addKeyHandler(k,F);var n=mxUtils.bind(this,function(T){var P=parseInt(k.value);P=Math.min(999,
+Math.max(1,isNaN(P)?1:P));if(P!=mxUtils.getValue(e.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth)){var Z=b.getSelectionState().cells;f.setCellStyles("width",P,Z);b.fireEvent(new mxEventObject("styleChanged","keys",["width"],"values",[P],"cells",Z))}k.value=P+" pt";mxEvent.consume(T)});mxEvent.addListener(k,"blur",n);mxEvent.addListener(k,"change",n);a.appendChild(g);var u=this.createPanel();u.style.paddingBottom="30px";d=document.createElement("div");d.style.position=
+"absolute";d.style.width="70px";d.style.marginTop="0px";mxUtils.write(d,mxResources.get("linestart"));u.appendChild(d);var m=this.addUnitInput(u,"pt",87,52,function(){J.apply(this,arguments)}),r=this.addUnitInput(u,"pt",16,52,function(){D.apply(this,arguments)});mxUtils.br(u);this.addLabel(u,mxResources.get("left"),87);this.addLabel(u,mxResources.get("top"),16);a.appendChild(u);this.addKeyHandler(m,F);this.addKeyHandler(r,F);var x=this.createPanel();x.style.paddingBottom="30px";d=document.createElement("div");
+d.style.position="absolute";d.style.width="70px";d.style.marginTop="0px";mxUtils.write(d,mxResources.get("lineend"));x.appendChild(d);var B=this.addUnitInput(x,"pt",87,52,function(){N.apply(this,arguments)}),C=this.addUnitInput(x,"pt",16,52,function(){S.apply(this,arguments)});mxUtils.br(x);this.addLabel(x,mxResources.get("left"),87);this.addLabel(x,mxResources.get("top"),16);a.appendChild(x);this.addKeyHandler(B,F);this.addKeyHandler(C,F);var F=mxUtils.bind(this,function(T,P,Z){e=b.getSelectionState();
+T=e.cells[0];if("link"==e.style.shape||"flexArrow"==e.style.shape){if(g.style.display="",Z||document.activeElement!=k)Z=mxUtils.getValue(e.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth),k.value=Z+" pt"}else g.style.display="none";1==e.cells.length&&f.model.isEdge(T)?(Z=f.model.getGeometry(T),null!=Z.sourcePoint&&null==f.model.getTerminal(T,!0)?(m.value=Z.sourcePoint.x,r.value=Z.sourcePoint.y):u.style.display="none",null!=Z.targetPoint&&null==f.model.getTerminal(T,!1)?
+(B.value=Z.targetPoint.x,C.value=Z.targetPoint.y):x.style.display="none"):(u.style.display="none",x.style.display="none")});var J=this.addEdgeGeometryHandler(m,function(T,P){T.sourcePoint.x=P});var D=this.addEdgeGeometryHandler(r,function(T,P){T.sourcePoint.y=P});var N=this.addEdgeGeometryHandler(B,function(T,P){T.targetPoint.x=P});var S=this.addEdgeGeometryHandler(C,function(T,P){T.targetPoint.y=P});f.getModel().addListener(mxEvent.CHANGE,F);this.listeners.push({destroy:function(){f.getModel().removeListener(F)}});
+F()};TextFormatPanel=function(a,b,f){BaseFormatPanel.call(this,a,b,f);this.init()};mxUtils.extend(TextFormatPanel,BaseFormatPanel);TextFormatPanel.prototype.init=function(){this.container.style.borderBottom="none";this.addFont(this.container)};
+TextFormatPanel.prototype.addFont=function(a){function b(da,t){da.style.backgroundImage=t?Editor.isDarkMode()?"linear-gradient(rgb(0 161 241) 0px, rgb(0, 97, 146) 100%)":"linear-gradient(#c5ecff 0px,#87d4fb 100%)":""}var f=this.editorUi,e=f.editor.graph,g=f.getSelectionState(),d=this.createTitle(mxResources.get("font"));d.style.paddingLeft="14px";d.style.paddingTop="10px";d.style.paddingBottom="6px";a.appendChild(d);d=this.createPanel();d.style.paddingTop="2px";d.style.paddingBottom="2px";d.style.position=
+"relative";d.style.marginLeft="-2px";d.style.borderWidth="0px";d.className="geToolbarContainer";if(e.cellEditor.isContentEditing()){var k=d.cloneNode(),n=this.editorUi.toolbar.addMenu(mxResources.get("style"),mxResources.get("style"),!0,"formatBlock",k,null,!0);n.style.color="rgb(112, 112, 112)";n.style.whiteSpace="nowrap";n.style.overflow="hidden";n.style.margin="0px";this.addArrow(n);n.style.width="200px";n.style.height="15px";n=n.getElementsByTagName("div")[0];n.style.cssFloat="right";a.appendChild(k)}a.appendChild(d);
+k=this.createPanel();k.style.marginTop="8px";k.style.borderTop="1px solid #c0c0c0";k.style.paddingTop="6px";k.style.paddingBottom="6px";var u=this.editorUi.toolbar.addMenu("Helvetica",mxResources.get("fontFamily"),!0,"fontFamily",d,null,!0);u.style.color="rgb(112, 112, 112)";u.style.whiteSpace="nowrap";u.style.overflow="hidden";u.style.margin="0px";this.addArrow(u);u.style.width="200px";u.style.height="15px";n=d.cloneNode(!1);n.style.marginLeft="-3px";var m=this.editorUi.toolbar.addItems(["bold",
+"italic","underline"],n,!0);m[0].setAttribute("title",mxResources.get("bold")+" ("+this.editorUi.actions.get("bold").shortcut+")");m[1].setAttribute("title",mxResources.get("italic")+" ("+this.editorUi.actions.get("italic").shortcut+")");m[2].setAttribute("title",mxResources.get("underline")+" ("+this.editorUi.actions.get("underline").shortcut+")");var r=this.editorUi.toolbar.addItems(["vertical"],n,!0)[0];a.appendChild(n);this.styleButtons(m);this.styleButtons([r]);var x=d.cloneNode(!1);x.style.marginLeft=
+"-3px";x.style.paddingBottom="0px";var B=function(da){return function(){return da()}},C=this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),e.cellEditor.isContentEditing()?function(da){e.cellEditor.alignText(mxConstants.ALIGN_LEFT,da);f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_LEFT],"cells",g.cells))}:B(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_LEFT])),x),F=this.editorUi.toolbar.addButton("geSprite-center",
+mxResources.get("center"),e.cellEditor.isContentEditing()?function(da){e.cellEditor.alignText(mxConstants.ALIGN_CENTER,da);f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_CENTER],"cells",g.cells))}:B(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_CENTER])),x),J=this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),e.cellEditor.isContentEditing()?function(da){e.cellEditor.alignText(mxConstants.ALIGN_RIGHT,
+da);f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_RIGHT],"cells",g.cells))}:B(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_RIGHT])),x);this.styleButtons([C,F,J]);if(e.cellEditor.isContentEditing()){var D=this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("strikethrough"),function(){document.execCommand("strikeThrough",!1,null)},n);this.styleButtons([D]);D.firstChild.style.background=
"url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PGRlZnM+PHBhdGggaWQ9ImEiIGQ9Ik0wIDBoMjR2MjRIMFYweiIvPjwvZGVmcz48Y2xpcFBhdGggaWQ9ImIiPjx1c2UgeGxpbms6aHJlZj0iI2EiIG92ZXJmbG93PSJ2aXNpYmxlIi8+PC9jbGlwUGF0aD48cGF0aCBjbGlwLXBhdGg9InVybCgjYikiIGZpbGw9IiMwMTAxMDEiIGQ9Ik03LjI0IDguNzVjLS4yNi0uNDgtLjM5LTEuMDMtLjM5LTEuNjcgMC0uNjEuMTMtMS4xNi40LTEuNjcuMjYtLjUuNjMtLjkzIDEuMTEtMS4yOS40OC0uMzUgMS4wNS0uNjMgMS43LS44My42Ni0uMTkgMS4zOS0uMjkgMi4xOC0uMjkuODEgMCAxLjU0LjExIDIuMjEuMzQuNjYuMjIgMS4yMy41NCAxLjY5Ljk0LjQ3LjQuODMuODggMS4wOCAxLjQzLjI1LjU1LjM4IDEuMTUuMzggMS44MWgtMy4wMWMwLS4zMS0uMDUtLjU5LS4xNS0uODUtLjA5LS4yNy0uMjQtLjQ5LS40NC0uNjgtLjItLjE5LS40NS0uMzMtLjc1LS40NC0uMy0uMS0uNjYtLjE2LTEuMDYtLjE2LS4zOSAwLS43NC4wNC0xLjAzLjEzLS4yOS4wOS0uNTMuMjEtLjcyLjM2LS4xOS4xNi0uMzQuMzQtLjQ0LjU1LS4xLjIxLS4xNS40My0uMTUuNjYgMCAuNDguMjUuODguNzQgMS4yMS4zOC4yNS43Ny40OCAxLjQxLjdINy4zOWMtLjA1LS4wOC0uMTEtLjE3LS4xNS0uMjV6TTIxIDEydi0ySDN2Mmg5LjYyYy4xOC4wNy40LjE0LjU1LjIuMzcuMTcuNjYuMzQuODcuNTEuMjEuMTcuMzUuMzYuNDMuNTcuMDcuMi4xMS40My4xMS42OSAwIC4yMy0uMDUuNDUtLjE0LjY2LS4wOS4yLS4yMy4zOC0uNDIuNTMtLjE5LjE1LS40Mi4yNi0uNzEuMzUtLjI5LjA4LS42My4xMy0xLjAxLjEzLS40MyAwLS44My0uMDQtMS4xOC0uMTNzLS42Ni0uMjMtLjkxLS40MmMtLjI1LS4xOS0uNDUtLjQ0LS41OS0uNzUtLjE0LS4zMS0uMjUtLjc2LS4yNS0xLjIxSDYuNGMwIC41NS4wOCAxLjEzLjI0IDEuNTguMTYuNDUuMzcuODUuNjUgMS4yMS4yOC4zNS42LjY2Ljk4LjkyLjM3LjI2Ljc4LjQ4IDEuMjIuNjUuNDQuMTcuOS4zIDEuMzguMzkuNDguMDguOTYuMTMgMS40NC4xMy44IDAgMS41My0uMDkgMi4xOC0uMjhzMS4yMS0uNDUgMS42Ny0uNzljLjQ2LS4zNC44Mi0uNzcgMS4wNy0xLjI3cy4zOC0xLjA3LjM4LTEuNzFjMC0uNi0uMS0xLjE0LS4zMS0xLjYxLS4wNS0uMTEtLjExLS4yMy0uMTctLjMzSDIxeiIvPjwvc3ZnPg==)";
-D.firstChild.style.backgroundPosition="2px 2px";D.firstChild.style.backgroundSize="18px 18px";this.styleButtons([D])}var N=this.editorUi.toolbar.addButton("geSprite-top",mxResources.get("top"),B(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP])),x),Q=this.editorUi.toolbar.addButton("geSprite-middle",mxResources.get("middle"),B(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE])),x),R=this.editorUi.toolbar.addButton("geSprite-bottom",
-mxResources.get("bottom"),B(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM])),x);this.styleButtons([N,Q,R]);a.appendChild(x);var P,Z,U,V,ia;if(d.cellEditor.isContentEditing()){N.style.display="none";Q.style.display="none";R.style.display="none";r.style.display="none";var ha=this.editorUi.toolbar.addButton("geSprite-justifyfull",mxResources.get("block"),function(){1==ha.style.opacity&&document.execCommand("justifyfull",!1,null)},x);ha.style.marginRight=
-"9px";ha.style.opacity=1;this.styleButtons([ha,P=this.editorUi.toolbar.addButton("geSprite-subscript",mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)",function(){document.execCommand("subscript",!1,null)},x),Z=this.editorUi.toolbar.addButton("geSprite-superscript",mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",!1,null)},x)]);P.style.marginLeft="10px";B=x.cloneNode(!1);B.style.paddingTop="4px";x=[this.editorUi.toolbar.addButton("geSprite-orderedlist",
+D.firstChild.style.backgroundPosition="2px 2px";D.firstChild.style.backgroundSize="18px 18px";this.styleButtons([D])}var N=this.editorUi.toolbar.addButton("geSprite-top",mxResources.get("top"),B(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP])),x),S=this.editorUi.toolbar.addButton("geSprite-middle",mxResources.get("middle"),B(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE])),x),T=this.editorUi.toolbar.addButton("geSprite-bottom",
+mxResources.get("bottom"),B(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM])),x);this.styleButtons([N,S,T]);a.appendChild(x);var P,Z,U,V,aa;if(e.cellEditor.isContentEditing()){N.style.display="none";S.style.display="none";T.style.display="none";r.style.display="none";var ia=this.editorUi.toolbar.addButton("geSprite-justifyfull",mxResources.get("block"),function(){1==ia.style.opacity&&document.execCommand("justifyfull",!1,null)},x);ia.style.marginRight=
+"9px";ia.style.opacity=1;this.styleButtons([ia,P=this.editorUi.toolbar.addButton("geSprite-subscript",mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)",function(){document.execCommand("subscript",!1,null)},x),Z=this.editorUi.toolbar.addButton("geSprite-superscript",mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",!1,null)},x)]);P.style.marginLeft="10px";B=x.cloneNode(!1);B.style.paddingTop="4px";x=[this.editorUi.toolbar.addButton("geSprite-orderedlist",
mxResources.get("numberedList"),function(){document.execCommand("insertorderedlist",!1,null)},B),this.editorUi.toolbar.addButton("geSprite-unorderedlist",mxResources.get("bulletedList"),function(){document.execCommand("insertunorderedlist",!1,null)},B),this.editorUi.toolbar.addButton("geSprite-outdent",mxResources.get("decreaseIndent"),function(){document.execCommand("outdent",!1,null)},B),this.editorUi.toolbar.addButton("geSprite-indent",mxResources.get("increaseIndent"),function(){document.execCommand("indent",
-!1,null)},B),this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},B),this.editorUi.toolbar.addButton("geSprite-code",mxResources.get("html"),function(){d.cellEditor.toggleViewMode()},B)];this.styleButtons(x);x[x.length-2].style.marginLeft="10px";a.appendChild(B)}else m[2].style.marginRight="12px",J.style.marginRight="12px";x=e.cloneNode(!1);x.style.marginLeft="0px";x.style.paddingTop="8px";x.style.paddingBottom=
-"4px";x.style.fontWeight="normal";mxUtils.write(x,mxResources.get("position"));var ba=document.createElement("select");ba.style.position="absolute";ba.style.left="126px";ba.style.width="98px";ba.style.border="1px solid rgb(160, 160, 160)";ba.style.borderRadius="4px";ba.style.marginTop="-2px";D="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" ");var qa={topLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM],top:[mxConstants.ALIGN_CENTER,
+!1,null)},B),this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},B),this.editorUi.toolbar.addButton("geSprite-code",mxResources.get("html"),function(){e.cellEditor.toggleViewMode()},B)];this.styleButtons(x);x[x.length-2].style.marginLeft="10px";a.appendChild(B)}else m[2].style.marginRight="12px",J.style.marginRight="12px";x=d.cloneNode(!1);x.style.marginLeft="0px";x.style.paddingTop="8px";x.style.paddingBottom=
+"4px";x.style.fontWeight="normal";mxUtils.write(x,mxResources.get("position"));var ea=document.createElement("select");ea.style.position="absolute";ea.style.left="126px";ea.style.width="98px";ea.style.border="1px solid rgb(160, 160, 160)";ea.style.borderRadius="4px";ea.style.marginTop="-2px";D="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" ");var qa={topLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM],top:[mxConstants.ALIGN_CENTER,
mxConstants.ALIGN_TOP,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM],topRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM],left:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE],center:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE],right:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE],bottomLeft:[mxConstants.ALIGN_LEFT,
-mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP],bottom:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]};for(B=0;B<D.length;B++){var O=document.createElement("option");O.setAttribute("value",D[B]);mxUtils.write(O,mxResources.get(D[B]));ba.appendChild(O)}x.appendChild(ba);D=e.cloneNode(!1);D.style.marginLeft="0px";D.style.paddingTop=
-"4px";D.style.paddingBottom="4px";D.style.fontWeight="normal";mxUtils.write(D,mxResources.get("writingDirection"));var S=document.createElement("select");S.style.position="absolute";S.style.border="1px solid rgb(160, 160, 160)";S.style.left="126px";S.style.width="98px";S.style.borderRadius="4px";S.style.marginTop="-2px";O=["automatic","leftToRight","rightToLeft"];var F={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL};for(B=0;B<O.length;B++){var L=
-document.createElement("option");L.setAttribute("value",O[B]);mxUtils.write(L,mxResources.get(O[B]));S.appendChild(L)}D.appendChild(S);d.isEditing()||(a.appendChild(x),mxEvent.addListener(ba,"change",function(da){d.getModel().beginUpdate();try{var t=qa[ba.value];null!=t&&(d.setCellStyles(mxConstants.STYLE_LABEL_POSITION,t[0],g.cells),d.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,t[1],g.cells),d.setCellStyles(mxConstants.STYLE_ALIGN,t[2],g.cells),d.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,
-t[3],g.cells))}finally{d.getModel().endUpdate()}mxEvent.consume(da)}),a.appendChild(D),mxEvent.addListener(S,"change",function(da){d.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,F[S.value],g.cells);mxEvent.consume(da)}));var T=document.createElement("input");T.style.position="absolute";T.style.border="1px solid rgb(160, 160, 160)";T.style.textAlign="right";T.style.marginTop="4px";T.style.left="161px";T.style.width="53px";T.style.borderRadius="4px";T.style.height="23px";T.style.boxSizing="border-box";
-n.appendChild(T);var ca=null;x=this.installInputHandler(T,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,1,999," pt",function(da){if(window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11){var t=function(H,K){null!=d.cellEditor.textarea&&H!=d.cellEditor.textarea&&d.cellEditor.textarea.contains(H)&&(K||z.containsNode(H,!0))&&("FONT"==H.nodeName?(H.removeAttribute("size"),H.style.fontSize=da+"px"):mxUtils.getCurrentStyle(H).fontSize!=da+"px"&&(mxUtils.getCurrentStyle(H.parentNode).fontSize!=
-da+"px"?H.style.fontSize=da+"px":H.style.fontSize=""));f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTSIZE],"values",[da],"cells",g.cells))},z=window.getSelection(),A=0<z.rangeCount?z.getRangeAt(0).commonAncestorContainer:d.cellEditor.textarea;A!=d.cellEditor.textarea&&A.nodeType==mxConstants.NODETYPE_ELEMENT||document.execCommand("fontSize",!1,"1");A!=d.cellEditor.textarea&&(A=A.parentNode);if(null!=A&&A.nodeType==mxConstants.NODETYPE_ELEMENT){var E=A.getElementsByTagName("*");
-t(A);for(A=0;A<E.length;A++)t(E[A])}T.value=da+" pt"}else if(window.getSelection||document.selection)if(t=function(H,K){for(;null!=K;){if(K===H)return!0;K=K.parentNode}return!1},E=null,document.selection?E=document.selection.createRange().parentElement():(z=window.getSelection(),0<z.rangeCount&&(E=z.getRangeAt(0).commonAncestorContainer)),null!=E&&t(d.cellEditor.textarea,E))for(ca=da,document.execCommand("fontSize",!1,"4"),E=d.cellEditor.textarea.getElementsByTagName("font"),A=0;A<E.length;A++)if("4"==
-E[A].getAttribute("size")){E[A].removeAttribute("size");E[A].style.fontSize=ca+"px";window.setTimeout(function(){T.value=ca+" pt";ca=null},0);break}},!0);x=this.createStepper(T,x,1,10,!0,Menus.prototype.defaultFontSize);x.style.display=T.style.display;x.style.marginTop="4px";x.style.left="214px";n.appendChild(x);n=u.getElementsByTagName("div")[0];n.style.cssFloat="right";var fa=null,wa=d.shapeBackgroundColor,W=null,aa=d.shapeForegroundColor,oa=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),
-function(){return wa},function(da){document.execCommand("backcolor",!1,da!=mxConstants.NONE?da:"transparent");f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR],"values",[da],"cells",g.cells))},d.shapeBackgroundColor,{install:function(da){fa=da},destroy:function(){fa=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"),mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"default",null,function(da){d.updateLabelElements(g.cells,function(t){t.style.backgroundColor=
-null})},d.shapeBackgroundColor);oa.style.fontWeight="bold";var sa=this.createCellColorOption(mxResources.get("borderColor"),mxConstants.STYLE_LABEL_BORDERCOLOR,"default",null,null,d.shapeForegroundColor);sa.style.fontWeight="bold";n=1<=g.vertices.length?d.stylesheet.getDefaultVertexStyle():d.stylesheet.getDefaultEdgeStyle();n=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return aa},function(da){if(mxClient.IS_FF){for(var t=d.cellEditor.textarea.getElementsByTagName("font"),
-z=[],A=0;A<t.length;A++)z.push({node:t[A],color:t[A].getAttribute("color")});document.execCommand("forecolor",!1,da!=mxConstants.NONE?da:"transparent");f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTCOLOR],"values",[da],"cells",g.cells));da=d.cellEditor.textarea.getElementsByTagName("font");for(A=0;A<da.length;A++)if(A>=z.length||da[A]!=z[A].node||da[A]==z[A].node&&da[A].getAttribute("color")!=z[A].color){z=da[A].firstChild;if(null!=z&&"A"==z.nodeName&&null==z.nextSibling&&
-null!=z.firstChild){da[A].parentNode.insertBefore(z,da[A]);for(t=z.firstChild;null!=t;){var E=t.nextSibling;da[A].appendChild(t);t=E}z.appendChild(da[A])}break}}else document.execCommand("forecolor",!1,da!=mxConstants.NONE?da:"transparent"),f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTCOLOR],"values",[da],"cells",g.cells))},null!=n[mxConstants.STYLE_FONTCOLOR]?n[mxConstants.STYLE_FONTCOLOR]:d.shapeForegroundColor,{install:function(da){W=da},destroy:function(){W=null}},
-null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"default",function(da){oa.style.display=da==mxConstants.NONE?"none":"";sa.style.display=oa.style.display},function(da){da==mxConstants.NONE?d.setCellStyles(mxConstants.STYLE_NOLABEL,"1",g.cells):d.setCellStyles(mxConstants.STYLE_NOLABEL,null,g.cells);d.setCellStyles(mxConstants.STYLE_FONTCOLOR,da,g.cells);d.updateLabelElements(g.cells,function(t){t.removeAttribute("color");t.style.color=null})},d.shapeForegroundColor);
-n.style.fontWeight="bold";k.appendChild(n);k.appendChild(oa);d.cellEditor.isContentEditing()||k.appendChild(sa);a.appendChild(k);k=this.createPanel();k.style.paddingTop="2px";k.style.paddingBottom="4px";n=d.filterSelectionCells(mxUtils.bind(this,function(da){var t=d.view.getState(da);return null==t||d.isAutoSizeState(t)||d.getModel().isEdge(da)||!d.isTableRow(da)&&!d.isTableCell(da)&&!d.isCellResizable(da)}));x=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap",
+mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP],bottom:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]};for(B=0;B<D.length;B++){var O=document.createElement("option");O.setAttribute("value",D[B]);mxUtils.write(O,mxResources.get(D[B]));ea.appendChild(O)}x.appendChild(ea);D=d.cloneNode(!1);D.style.marginLeft="0px";D.style.paddingTop=
+"4px";D.style.paddingBottom="4px";D.style.fontWeight="normal";mxUtils.write(D,mxResources.get("writingDirection"));var R=document.createElement("select");R.style.position="absolute";R.style.border="1px solid rgb(160, 160, 160)";R.style.left="126px";R.style.width="98px";R.style.borderRadius="4px";R.style.marginTop="-2px";O=["automatic","leftToRight","rightToLeft"];var G={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL};for(B=0;B<O.length;B++){var K=
+document.createElement("option");K.setAttribute("value",O[B]);mxUtils.write(K,mxResources.get(O[B]));R.appendChild(K)}D.appendChild(R);e.isEditing()||(a.appendChild(x),mxEvent.addListener(ea,"change",function(da){e.getModel().beginUpdate();try{var t=qa[ea.value];null!=t&&(e.setCellStyles(mxConstants.STYLE_LABEL_POSITION,t[0],g.cells),e.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,t[1],g.cells),e.setCellStyles(mxConstants.STYLE_ALIGN,t[2],g.cells),e.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,
+t[3],g.cells))}finally{e.getModel().endUpdate()}mxEvent.consume(da)}),a.appendChild(D),mxEvent.addListener(R,"change",function(da){e.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,G[R.value],g.cells);mxEvent.consume(da)}));var Q=document.createElement("input");Q.style.position="absolute";Q.style.border="1px solid rgb(160, 160, 160)";Q.style.textAlign="right";Q.style.marginTop="4px";Q.style.left="161px";Q.style.width="53px";Q.style.borderRadius="4px";Q.style.height="23px";Q.style.boxSizing="border-box";
+n.appendChild(Q);var ba=null;x=this.installInputHandler(Q,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,1,999," pt",function(da){if(window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11){var t=function(H,L){null!=e.cellEditor.textarea&&H!=e.cellEditor.textarea&&e.cellEditor.textarea.contains(H)&&(L||z.containsNode(H,!0))&&("FONT"==H.nodeName?(H.removeAttribute("size"),H.style.fontSize=da+"px"):mxUtils.getCurrentStyle(H).fontSize!=da+"px"&&(mxUtils.getCurrentStyle(H.parentNode).fontSize!=
+da+"px"?H.style.fontSize=da+"px":H.style.fontSize=""));f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTSIZE],"values",[da],"cells",g.cells))},z=window.getSelection(),A=0<z.rangeCount?z.getRangeAt(0).commonAncestorContainer:e.cellEditor.textarea;A!=e.cellEditor.textarea&&A.nodeType==mxConstants.NODETYPE_ELEMENT||document.execCommand("fontSize",!1,"1");A!=e.cellEditor.textarea&&(A=A.parentNode);if(null!=A&&A.nodeType==mxConstants.NODETYPE_ELEMENT){var E=A.getElementsByTagName("*");
+t(A);for(A=0;A<E.length;A++)t(E[A])}Q.value=da+" pt"}else if(window.getSelection||document.selection)if(t=function(H,L){for(;null!=L;){if(L===H)return!0;L=L.parentNode}return!1},E=null,document.selection?E=document.selection.createRange().parentElement():(z=window.getSelection(),0<z.rangeCount&&(E=z.getRangeAt(0).commonAncestorContainer)),null!=E&&t(e.cellEditor.textarea,E))for(ba=da,document.execCommand("fontSize",!1,"4"),E=e.cellEditor.textarea.getElementsByTagName("font"),A=0;A<E.length;A++)if("4"==
+E[A].getAttribute("size")){E[A].removeAttribute("size");E[A].style.fontSize=ba+"px";window.setTimeout(function(){Q.value=ba+" pt";ba=null},0);break}},!0);x=this.createStepper(Q,x,1,10,!0,Menus.prototype.defaultFontSize);x.style.display=Q.style.display;x.style.marginTop="4px";x.style.left="214px";n.appendChild(x);n=u.getElementsByTagName("div")[0];n.style.cssFloat="right";var la=null,ra=e.shapeBackgroundColor,X=null,ca=e.shapeForegroundColor,oa=e.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),
+function(){return ra},function(da){document.execCommand("backcolor",!1,da!=mxConstants.NONE?da:"transparent");f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR],"values",[da],"cells",g.cells))},e.shapeBackgroundColor,{install:function(da){la=da},destroy:function(){la=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"),mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"default",null,function(da){e.updateLabelElements(g.cells,function(t){t.style.backgroundColor=
+null})},e.shapeBackgroundColor);oa.style.fontWeight="bold";var ta=this.createCellColorOption(mxResources.get("borderColor"),mxConstants.STYLE_LABEL_BORDERCOLOR,"default",null,null,e.shapeForegroundColor);ta.style.fontWeight="bold";n=1<=g.vertices.length?e.stylesheet.getDefaultVertexStyle():e.stylesheet.getDefaultEdgeStyle();n=e.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return ca},function(da){if(mxClient.IS_FF){for(var t=e.cellEditor.textarea.getElementsByTagName("font"),
+z=[],A=0;A<t.length;A++)z.push({node:t[A],color:t[A].getAttribute("color")});document.execCommand("forecolor",!1,da!=mxConstants.NONE?da:"transparent");f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTCOLOR],"values",[da],"cells",g.cells));da=e.cellEditor.textarea.getElementsByTagName("font");for(A=0;A<da.length;A++)if(A>=z.length||da[A]!=z[A].node||da[A]==z[A].node&&da[A].getAttribute("color")!=z[A].color){z=da[A].firstChild;if(null!=z&&"A"==z.nodeName&&null==z.nextSibling&&
+null!=z.firstChild){da[A].parentNode.insertBefore(z,da[A]);for(t=z.firstChild;null!=t;){var E=t.nextSibling;da[A].appendChild(t);t=E}z.appendChild(da[A])}break}}else document.execCommand("forecolor",!1,da!=mxConstants.NONE?da:"transparent"),f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTCOLOR],"values",[da],"cells",g.cells))},null!=n[mxConstants.STYLE_FONTCOLOR]?n[mxConstants.STYLE_FONTCOLOR]:e.shapeForegroundColor,{install:function(da){X=da},destroy:function(){X=null}},
+null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"default",function(da){oa.style.display=da==mxConstants.NONE?"none":"";ta.style.display=oa.style.display},function(da){da==mxConstants.NONE?e.setCellStyles(mxConstants.STYLE_NOLABEL,"1",g.cells):e.setCellStyles(mxConstants.STYLE_NOLABEL,null,g.cells);e.setCellStyles(mxConstants.STYLE_FONTCOLOR,da,g.cells);e.updateLabelElements(g.cells,function(t){t.removeAttribute("color");t.style.color=null})},e.shapeForegroundColor);
+n.style.fontWeight="bold";k.appendChild(n);k.appendChild(oa);e.cellEditor.isContentEditing()||k.appendChild(ta);a.appendChild(k);k=this.createPanel();k.style.paddingTop="2px";k.style.paddingBottom="4px";n=e.filterSelectionCells(mxUtils.bind(this,function(da){var t=e.view.getState(da);return null==t||e.isAutoSizeState(t)||e.getModel().isEdge(da)||!e.isTableRow(da)&&!e.isTableCell(da)&&!e.isCellResizable(da)}));x=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap",
"null",null,null,!0,n);x.style.fontWeight="bold";0<n.length&&k.appendChild(x);n=this.createCellOption(mxResources.get("formattedText"),"html",0,null,null,null,f.actions.get("formattedText"));n.style.fontWeight="bold";k.appendChild(n);n=this.createPanel();n.style.paddingTop="10px";n.style.paddingBottom="28px";n.style.fontWeight="normal";x=document.createElement("div");x.style.position="absolute";x.style.width="70px";x.style.marginTop="0px";x.style.fontWeight="bold";mxUtils.write(x,mxResources.get("spacing"));
-n.appendChild(x);var Ka=this.addUnitInput(n,"pt",87,52,function(){Xa.apply(this,arguments)}),Ha=this.addUnitInput(n,"pt",16,52,function(){$a.apply(this,arguments)});mxUtils.br(n);this.addLabel(n,mxResources.get("top"),87);this.addLabel(n,mxResources.get("global"),16);mxUtils.br(n);mxUtils.br(n);var ua=this.addUnitInput(n,"pt",158,52,function(){jb.apply(this,arguments)}),Ca=this.addUnitInput(n,"pt",87,52,function(){Ya.apply(this,arguments)}),ra=this.addUnitInput(n,"pt",16,52,function(){Va.apply(this,
-arguments)});mxUtils.br(n);this.addLabel(n,mxResources.get("left"),158);this.addLabel(n,mxResources.get("bottom"),87);this.addLabel(n,mxResources.get("right"),16);if(d.cellEditor.isContentEditing()){var Da=null,Ua=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),null,null,function(da){var t=""==da.value?120:parseInt(da.value);t=Math.max(0,isNaN(t)?120:t);null!=Da&&(d.cellEditor.restoreSelection(Da),Da=null);for(var z=d.getSelectedElement();null!=z&&z.nodeType!=mxConstants.NODETYPE_ELEMENT;)z=
-z.parentNode;null!=z&&z==d.cellEditor.textarea&&null!=d.cellEditor.textarea.firstChild&&("P"!=d.cellEditor.textarea.firstChild.nodeName&&(d.cellEditor.textarea.innerHTML="<p>"+d.cellEditor.textarea.innerHTML+"</p>"),z=d.cellEditor.textarea.firstChild);null!=z&&null!=d.cellEditor.textarea&&z!=d.cellEditor.textarea&&d.cellEditor.textarea.contains(z)&&(z.style.lineHeight=t/100);da.value=t+" %"},function(da){Ua=da;mxEvent.addListener(da,"mousedown",function(){document.activeElement==d.cellEditor.textarea&&
-(Da=d.cellEditor.saveSelection())});mxEvent.addListener(da,"touchstart",function(){document.activeElement==d.cellEditor.textarea&&(Da=d.cellEditor.saveSelection())});da.value="120 %"}));k=e.cloneNode(!1);k.style.paddingLeft="0px";n=this.editorUi.toolbar.addItems(["link","image"],k,!0);x=[this.editorUi.toolbar.addButton("geSprite-horizontalrule",mxResources.get("insertHorizontalRule"),function(){document.execCommand("inserthorizontalrule",!1)},k),this.editorUi.toolbar.addMenuFunctionInContainer(k,
-"geSprite-table",mxResources.get("table"),!1,mxUtils.bind(this,function(da){this.editorUi.menus.addInsertTableItem(da,null,null,!1)}))];this.styleButtons(n);this.styleButtons(x);n=this.createPanel();n.style.paddingTop="10px";n.style.paddingBottom="10px";n.appendChild(this.createTitle(mxResources.get("insert")));n.appendChild(k);a.appendChild(n);n=e.cloneNode(!1);n.style.paddingLeft="0px";x=[this.editorUi.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),mxUtils.bind(this,
-function(){try{null!=U&&d.insertColumn(U,null!=V?V.cellIndex:0)}catch(da){this.editorUi.handleError(da)}}),n),this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{null!=U&&d.insertColumn(U,null!=V?V.cellIndex+1:-1)}catch(da){this.editorUi.handleError(da)}}),n),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{null!=U&&null!=V&&d.deleteColumn(U,V.cellIndex)}catch(da){this.editorUi.handleError(da)}}),
-n),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{null!=U&&null!=ia&&d.insertRow(U,ia.sectionRowIndex)}catch(da){this.editorUi.handleError(da)}}),n),this.editorUi.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{null!=U&&null!=ia&&d.insertRow(U,ia.sectionRowIndex+1)}catch(da){this.editorUi.handleError(da)}}),n),this.editorUi.toolbar.addButton("geSprite-deleterow",
-mxResources.get("deleteRow"),mxUtils.bind(this,function(){try{null!=U&&null!=ia&&d.deleteRow(U,ia.sectionRowIndex)}catch(da){this.editorUi.handleError(da)}}),n)];this.styleButtons(x);x[2].style.marginRight="10px";k=this.createPanel();k.style.paddingTop="10px";k.style.paddingBottom="10px";k.appendChild(this.createTitle(mxResources.get("table")));k.appendChild(n);e=e.cloneNode(!1);e.style.paddingLeft="0px";x=[this.editorUi.toolbar.addButton("geSprite-strokecolor",mxResources.get("borderColor"),mxUtils.bind(this,
-function(da){if(null!=U){var t=U.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(z,A,E,H){return"#"+("0"+Number(A).toString(16)).substr(-2)+("0"+Number(E).toString(16)).substr(-2)+("0"+Number(H).toString(16)).substr(-2)});this.editorUi.pickColor(t,function(z){var A=null==V||null!=da&&mxEvent.isShiftDown(da)?U:V;d.processElements(A,function(E){E.style.border=null});null==z||z==mxConstants.NONE?(A.removeAttribute("border"),A.style.border="",A.style.borderCollapse=
-""):(A.setAttribute("border","1"),A.style.border="1px solid "+z,A.style.borderCollapse="collapse")})}}),e),this.editorUi.toolbar.addButton("geSprite-fillcolor",mxResources.get("backgroundColor"),mxUtils.bind(this,function(da){if(null!=U){var t=U.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(z,A,E,H){return"#"+("0"+Number(A).toString(16)).substr(-2)+("0"+Number(E).toString(16)).substr(-2)+("0"+Number(H).toString(16)).substr(-2)});this.editorUi.pickColor(t,
-function(z){var A=null==V||null!=da&&mxEvent.isShiftDown(da)?U:V;d.processElements(A,function(E){E.style.backgroundColor=null});A.style.backgroundColor=null==z||z==mxConstants.NONE?"":z})}}),e),this.editorUi.toolbar.addButton("geSprite-fit",mxResources.get("spacing"),function(){if(null!=U){var da=U.getAttribute("cellPadding")||0;da=new FilenameDialog(f,da,mxResources.get("apply"),mxUtils.bind(this,function(t){null!=t&&0<t.length?U.setAttribute("cellPadding",t):U.removeAttribute("cellPadding")}),mxResources.get("spacing"));
-f.showDialog(da.container,300,80,!0,!0);da.init()}},e),this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),function(){null!=U&&U.setAttribute("align","left")},e),this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),function(){null!=U&&U.setAttribute("align","center")},e),this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),function(){null!=U&&U.setAttribute("align","right")},e)];this.styleButtons(x);x[2].style.marginRight="10px";k.appendChild(e);
+n.appendChild(x);var Ka=this.addUnitInput(n,"pt",87,52,function(){Xa.apply(this,arguments)}),Ha=this.addUnitInput(n,"pt",16,52,function(){$a.apply(this,arguments)});mxUtils.br(n);this.addLabel(n,mxResources.get("top"),87);this.addLabel(n,mxResources.get("global"),16);mxUtils.br(n);mxUtils.br(n);var va=this.addUnitInput(n,"pt",158,52,function(){jb.apply(this,arguments)}),Ca=this.addUnitInput(n,"pt",87,52,function(){Ya.apply(this,arguments)}),sa=this.addUnitInput(n,"pt",16,52,function(){Va.apply(this,
+arguments)});mxUtils.br(n);this.addLabel(n,mxResources.get("left"),158);this.addLabel(n,mxResources.get("bottom"),87);this.addLabel(n,mxResources.get("right"),16);if(e.cellEditor.isContentEditing()){var Da=null,Ua=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),null,null,function(da){var t=""==da.value?120:parseInt(da.value);t=Math.max(0,isNaN(t)?120:t);null!=Da&&(e.cellEditor.restoreSelection(Da),Da=null);for(var z=e.getSelectedElement();null!=z&&z.nodeType!=mxConstants.NODETYPE_ELEMENT;)z=
+z.parentNode;null!=z&&z==e.cellEditor.textarea&&null!=e.cellEditor.textarea.firstChild&&("P"!=e.cellEditor.textarea.firstChild.nodeName&&(e.cellEditor.textarea.innerHTML="<p>"+e.cellEditor.textarea.innerHTML+"</p>"),z=e.cellEditor.textarea.firstChild);null!=z&&null!=e.cellEditor.textarea&&z!=e.cellEditor.textarea&&e.cellEditor.textarea.contains(z)&&(z.style.lineHeight=t/100);da.value=t+" %"},function(da){Ua=da;mxEvent.addListener(da,"mousedown",function(){document.activeElement==e.cellEditor.textarea&&
+(Da=e.cellEditor.saveSelection())});mxEvent.addListener(da,"touchstart",function(){document.activeElement==e.cellEditor.textarea&&(Da=e.cellEditor.saveSelection())});da.value="120 %"}));k=d.cloneNode(!1);k.style.paddingLeft="0px";n=this.editorUi.toolbar.addItems(["link","image"],k,!0);x=[this.editorUi.toolbar.addButton("geSprite-horizontalrule",mxResources.get("insertHorizontalRule"),function(){document.execCommand("inserthorizontalrule",!1)},k),this.editorUi.toolbar.addMenuFunctionInContainer(k,
+"geSprite-table",mxResources.get("table"),!1,mxUtils.bind(this,function(da){this.editorUi.menus.addInsertTableItem(da,null,null,!1)}))];this.styleButtons(n);this.styleButtons(x);n=this.createPanel();n.style.paddingTop="10px";n.style.paddingBottom="10px";n.appendChild(this.createTitle(mxResources.get("insert")));n.appendChild(k);a.appendChild(n);n=d.cloneNode(!1);n.style.paddingLeft="0px";x=[this.editorUi.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),mxUtils.bind(this,
+function(){try{null!=U&&e.insertColumn(U,null!=V?V.cellIndex:0)}catch(da){this.editorUi.handleError(da)}}),n),this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),mxUtils.bind(this,function(){try{null!=U&&e.insertColumn(U,null!=V?V.cellIndex+1:-1)}catch(da){this.editorUi.handleError(da)}}),n),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{null!=U&&null!=V&&e.deleteColumn(U,V.cellIndex)}catch(da){this.editorUi.handleError(da)}}),
+n),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{null!=U&&null!=aa&&e.insertRow(U,aa.sectionRowIndex)}catch(da){this.editorUi.handleError(da)}}),n),this.editorUi.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{null!=U&&null!=aa&&e.insertRow(U,aa.sectionRowIndex+1)}catch(da){this.editorUi.handleError(da)}}),n),this.editorUi.toolbar.addButton("geSprite-deleterow",
+mxResources.get("deleteRow"),mxUtils.bind(this,function(){try{null!=U&&null!=aa&&e.deleteRow(U,aa.sectionRowIndex)}catch(da){this.editorUi.handleError(da)}}),n)];this.styleButtons(x);x[2].style.marginRight="10px";k=this.createPanel();k.style.paddingTop="10px";k.style.paddingBottom="10px";k.appendChild(this.createTitle(mxResources.get("table")));k.appendChild(n);d=d.cloneNode(!1);d.style.paddingLeft="0px";x=[this.editorUi.toolbar.addButton("geSprite-strokecolor",mxResources.get("borderColor"),mxUtils.bind(this,
+function(da){if(null!=U){var t=U.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(z,A,E,H){return"#"+("0"+Number(A).toString(16)).substr(-2)+("0"+Number(E).toString(16)).substr(-2)+("0"+Number(H).toString(16)).substr(-2)});this.editorUi.pickColor(t,function(z){var A=null==V||null!=da&&mxEvent.isShiftDown(da)?U:V;e.processElements(A,function(E){E.style.border=null});null==z||z==mxConstants.NONE?(A.removeAttribute("border"),A.style.border="",A.style.borderCollapse=
+""):(A.setAttribute("border","1"),A.style.border="1px solid "+z,A.style.borderCollapse="collapse")})}}),d),this.editorUi.toolbar.addButton("geSprite-fillcolor",mxResources.get("backgroundColor"),mxUtils.bind(this,function(da){if(null!=U){var t=U.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(z,A,E,H){return"#"+("0"+Number(A).toString(16)).substr(-2)+("0"+Number(E).toString(16)).substr(-2)+("0"+Number(H).toString(16)).substr(-2)});this.editorUi.pickColor(t,
+function(z){var A=null==V||null!=da&&mxEvent.isShiftDown(da)?U:V;e.processElements(A,function(E){E.style.backgroundColor=null});A.style.backgroundColor=null==z||z==mxConstants.NONE?"":z})}}),d),this.editorUi.toolbar.addButton("geSprite-fit",mxResources.get("spacing"),function(){if(null!=U){var da=U.getAttribute("cellPadding")||0;da=new FilenameDialog(f,da,mxResources.get("apply"),mxUtils.bind(this,function(t){null!=t&&0<t.length?U.setAttribute("cellPadding",t):U.removeAttribute("cellPadding")}),mxResources.get("spacing"));
+f.showDialog(da.container,300,80,!0,!0);da.init()}},d),this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),function(){null!=U&&U.setAttribute("align","left")},d),this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),function(){null!=U&&U.setAttribute("align","center")},d),this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),function(){null!=U&&U.setAttribute("align","right")},d)];this.styleButtons(x);x[2].style.marginRight="10px";k.appendChild(d);
a.appendChild(k);var db=k}else a.appendChild(k),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(n);for(B=0;3>B;B++)(function(da){mxEvent.addListener(m[da],"click",function(){b(m[da],""==m[da].style.backgroundImage)})})(B);var Ta=mxUtils.bind(this,function(da,t,z){g=f.getSelectionState();da=mxUtils.getValue(g.style,mxConstants.STYLE_FONTSTYLE,0);b(m[0],(da&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);b(m[1],(da&mxConstants.FONT_ITALIC)==
-mxConstants.FONT_ITALIC);b(m[2],(da&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);u.firstChild.nodeValue=mxUtils.getValue(g.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont);b(r,"0"==mxUtils.getValue(g.style,mxConstants.STYLE_HORIZONTAL,"1"));if(z||document.activeElement!=T)da=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),T.value=isNaN(da)?"":da+" pt";da=mxUtils.getValue(g.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);
-b(C,da==mxConstants.ALIGN_LEFT);b(G,da==mxConstants.ALIGN_CENTER);b(J,da==mxConstants.ALIGN_RIGHT);da=mxUtils.getValue(g.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);b(N,da==mxConstants.ALIGN_TOP);b(Q,da==mxConstants.ALIGN_MIDDLE);b(R,da==mxConstants.ALIGN_BOTTOM);da=mxUtils.getValue(g.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);t=mxUtils.getValue(g.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);ba.value=da==mxConstants.ALIGN_LEFT&&
+mxConstants.FONT_ITALIC);b(m[2],(da&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);u.firstChild.nodeValue=mxUtils.getValue(g.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont);b(r,"0"==mxUtils.getValue(g.style,mxConstants.STYLE_HORIZONTAL,"1"));if(z||document.activeElement!=Q)da=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),Q.value=isNaN(da)?"":da+" pt";da=mxUtils.getValue(g.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);
+b(C,da==mxConstants.ALIGN_LEFT);b(F,da==mxConstants.ALIGN_CENTER);b(J,da==mxConstants.ALIGN_RIGHT);da=mxUtils.getValue(g.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);b(N,da==mxConstants.ALIGN_TOP);b(S,da==mxConstants.ALIGN_MIDDLE);b(T,da==mxConstants.ALIGN_BOTTOM);da=mxUtils.getValue(g.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);t=mxUtils.getValue(g.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);ea.value=da==mxConstants.ALIGN_LEFT&&
t==mxConstants.ALIGN_TOP?"topLeft":da==mxConstants.ALIGN_CENTER&&t==mxConstants.ALIGN_TOP?"top":da==mxConstants.ALIGN_RIGHT&&t==mxConstants.ALIGN_TOP?"topRight":da==mxConstants.ALIGN_LEFT&&t==mxConstants.ALIGN_BOTTOM?"bottomLeft":da==mxConstants.ALIGN_CENTER&&t==mxConstants.ALIGN_BOTTOM?"bottom":da==mxConstants.ALIGN_RIGHT&&t==mxConstants.ALIGN_BOTTOM?"bottomRight":da==mxConstants.ALIGN_LEFT?"left":da==mxConstants.ALIGN_RIGHT?"right":"center";da=mxUtils.getValue(g.style,mxConstants.STYLE_TEXT_DIRECTION,
-mxConstants.DEFAULT_TEXT_DIRECTION);da==mxConstants.TEXT_DIRECTION_RTL?S.value="rightToLeft":da==mxConstants.TEXT_DIRECTION_LTR?S.value="leftToRight":da==mxConstants.TEXT_DIRECTION_AUTO&&(S.value="automatic");if(z||document.activeElement!=Ha)da=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING,2)),Ha.value=isNaN(da)?"":da+" pt";if(z||document.activeElement!=Ka)da=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_TOP,0)),Ka.value=isNaN(da)?"":da+" pt";if(z||document.activeElement!=
-ra)da=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_RIGHT,0)),ra.value=isNaN(da)?"":da+" pt";if(z||document.activeElement!=Ca)da=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_BOTTOM,0)),Ca.value=isNaN(da)?"":da+" pt";if(z||document.activeElement!=ua)da=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_LEFT,0)),ua.value=isNaN(da)?"":da+" pt"});var $a=this.installInputHandler(Ha,mxConstants.STYLE_SPACING,2,-999,999," pt");var Xa=this.installInputHandler(Ka,
-mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");var Va=this.installInputHandler(ra,mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");var Ya=this.installInputHandler(Ca,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");var jb=this.installInputHandler(ua,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(T,Ta);this.addKeyHandler(Ha,Ta);this.addKeyHandler(Ka,Ta);this.addKeyHandler(ra,Ta);this.addKeyHandler(Ca,Ta);this.addKeyHandler(ua,Ta);d.getModel().addListener(mxEvent.CHANGE,Ta);
-this.listeners.push({destroy:function(){d.getModel().removeListener(Ta)}});Ta();if(d.cellEditor.isContentEditing()){var bb=!1;e=function(){bb||(bb=!0,window.setTimeout(function(){var da=d.getSelectedEditingElement();if(null!=da){var t=function(Aa,Ea){if(null!=Aa&&null!=Ea){if(Aa==Ea)return!0;if(Aa.length>Ea.length+1)return Aa.substring(Aa.length-Ea.length-1,Aa.length)=="-"+Ea}return!1},z=function(Aa){if(null!=d.getParentByName(da,Aa,d.cellEditor.textarea))return!0;for(var Ea=da;null!=Ea&&1==Ea.childNodes.length;)if(Ea=
-Ea.childNodes[0],Ea.nodeName==Aa)return!0;return!1},A=function(Aa){Aa=null!=Aa?Aa.fontSize:null;return null!=Aa&&"px"==Aa.substring(Aa.length-2)?parseFloat(Aa):mxConstants.DEFAULT_FONTSIZE},E=function(Aa,Ea,Ma){return null!=Ma.style&&null!=Ea?(Ea=Ea.lineHeight,null!=Ma.style.lineHeight&&"%"==Ma.style.lineHeight.substring(Ma.style.lineHeight.length-1)?parseInt(Ma.style.lineHeight)/100:"px"==Ea.substring(Ea.length-2)?parseFloat(Ea)/Aa:parseInt(Ea)):""},H=mxUtils.getCurrentStyle(da),K=A(H),X=E(K,H,da),
-ja=da.getElementsByTagName("*");if(0<ja.length&&window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11)for(var ea=window.getSelection(),ka=0;ka<ja.length;ka++)if(ea.containsNode(ja[ka],!0)){temp=mxUtils.getCurrentStyle(ja[ka]);K=Math.max(A(temp),K);var ta=E(K,temp,ja[ka]);if(ta!=X||isNaN(ta))X=""}null!=H&&(b(m[0],"bold"==H.fontWeight||400<H.fontWeight||z("B")||z("STRONG")),b(m[1],"italic"==H.fontStyle||z("I")||z("EM")),b(m[2],z("U")),b(Z,z("SUP")),b(P,z("SUB")),d.cellEditor.isTableSelected()?(b(ha,
-t(H.textAlign,"justify")),b(C,t(H.textAlign,"left")),b(G,t(H.textAlign,"center")),b(J,t(H.textAlign,"right"))):(z=d.cellEditor.align||mxUtils.getValue(g.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),t(H.textAlign,"justify")?(b(ha,t(H.textAlign,"justify")),b(C,!1),b(G,!1),b(J,!1)):(b(ha,!1),b(C,z==mxConstants.ALIGN_LEFT),b(G,z==mxConstants.ALIGN_CENTER),b(J,z==mxConstants.ALIGN_RIGHT))),U=d.getParentByName(da,"TABLE",d.cellEditor.textarea),ia=null==U?null:d.getParentByName(da,"TR",U),V=null==
-U?null:d.getParentByNames(da,["TD","TH"],U),db.style.display=null!=U?"":"none",document.activeElement!=T&&("FONT"==da.nodeName&&"4"==da.getAttribute("size")&&null!=ca?(da.removeAttribute("size"),da.style.fontSize=ca+" pt",ca=null):T.value=isNaN(K)?"":K+" pt",ta=parseFloat(X),isNaN(ta)?Ua.value="100 %":Ua.value=Math.round(100*ta)+" %"),null!=W&&(aa="rgba(0, 0, 0, 0)"==H.color||"transparent"==H.color?mxConstants.NONE:mxUtils.rgba2hex(H.color),W(aa,!0)),null!=fa&&(wa="rgba(0, 0, 0, 0)"==H.backgroundColor||
-"transparent"==H.backgroundColor?mxConstants.NONE:mxUtils.rgba2hex(H.backgroundColor),fa(wa,!0)),null!=u.firstChild&&(u.firstChild.nodeValue=Graph.stripQuotes(H.fontFamily)))}bb=!1},0))};(mxClient.IS_FF||mxClient.IS_EDGE||mxClient.IS_IE||mxClient.IS_IE11)&&mxEvent.addListener(d.cellEditor.textarea,"DOMSubtreeModified",e);mxEvent.addListener(d.cellEditor.textarea,"input",e);mxEvent.addListener(d.cellEditor.textarea,"touchend",e);mxEvent.addListener(d.cellEditor.textarea,"mouseup",e);mxEvent.addListener(d.cellEditor.textarea,
-"keyup",e);this.listeners.push({destroy:function(){}});e()}return a};StyleFormatPanel=function(a,b,f){BaseFormatPanel.call(this,a,b,f);this.init()};mxUtils.extend(StyleFormatPanel,BaseFormatPanel);StyleFormatPanel.prototype.defaultStrokeColor="black";
+mxConstants.DEFAULT_TEXT_DIRECTION);da==mxConstants.TEXT_DIRECTION_RTL?R.value="rightToLeft":da==mxConstants.TEXT_DIRECTION_LTR?R.value="leftToRight":da==mxConstants.TEXT_DIRECTION_AUTO&&(R.value="automatic");if(z||document.activeElement!=Ha)da=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING,2)),Ha.value=isNaN(da)?"":da+" pt";if(z||document.activeElement!=Ka)da=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_TOP,0)),Ka.value=isNaN(da)?"":da+" pt";if(z||document.activeElement!=
+sa)da=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_RIGHT,0)),sa.value=isNaN(da)?"":da+" pt";if(z||document.activeElement!=Ca)da=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_BOTTOM,0)),Ca.value=isNaN(da)?"":da+" pt";if(z||document.activeElement!=va)da=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_LEFT,0)),va.value=isNaN(da)?"":da+" pt"});var $a=this.installInputHandler(Ha,mxConstants.STYLE_SPACING,2,-999,999," pt");var Xa=this.installInputHandler(Ka,
+mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");var Va=this.installInputHandler(sa,mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");var Ya=this.installInputHandler(Ca,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");var jb=this.installInputHandler(va,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(Q,Ta);this.addKeyHandler(Ha,Ta);this.addKeyHandler(Ka,Ta);this.addKeyHandler(sa,Ta);this.addKeyHandler(Ca,Ta);this.addKeyHandler(va,Ta);e.getModel().addListener(mxEvent.CHANGE,Ta);
+this.listeners.push({destroy:function(){e.getModel().removeListener(Ta)}});Ta();if(e.cellEditor.isContentEditing()){var bb=!1;d=function(){bb||(bb=!0,window.setTimeout(function(){var da=e.getSelectedEditingElement();if(null!=da){var t=function(Aa,Ea){if(null!=Aa&&null!=Ea){if(Aa==Ea)return!0;if(Aa.length>Ea.length+1)return Aa.substring(Aa.length-Ea.length-1,Aa.length)=="-"+Ea}return!1},z=function(Aa){if(null!=e.getParentByName(da,Aa,e.cellEditor.textarea))return!0;for(var Ea=da;null!=Ea&&1==Ea.childNodes.length;)if(Ea=
+Ea.childNodes[0],Ea.nodeName==Aa)return!0;return!1},A=function(Aa){Aa=null!=Aa?Aa.fontSize:null;return null!=Aa&&"px"==Aa.substring(Aa.length-2)?parseFloat(Aa):mxConstants.DEFAULT_FONTSIZE},E=function(Aa,Ea,Ma){return null!=Ma.style&&null!=Ea?(Ea=Ea.lineHeight,null!=Ma.style.lineHeight&&"%"==Ma.style.lineHeight.substring(Ma.style.lineHeight.length-1)?parseInt(Ma.style.lineHeight)/100:"px"==Ea.substring(Ea.length-2)?parseFloat(Ea)/Aa:parseInt(Ea)):""},H=mxUtils.getCurrentStyle(da),L=A(H),W=E(L,H,da),
+ha=da.getElementsByTagName("*");if(0<ha.length&&window.getSelection&&!mxClient.IS_IE&&!mxClient.IS_IE11)for(var fa=window.getSelection(),ja=0;ja<ha.length;ja++)if(fa.containsNode(ha[ja],!0)){temp=mxUtils.getCurrentStyle(ha[ja]);L=Math.max(A(temp),L);var ua=E(L,temp,ha[ja]);if(ua!=W||isNaN(ua))W=""}null!=H&&(b(m[0],"bold"==H.fontWeight||400<H.fontWeight||z("B")||z("STRONG")),b(m[1],"italic"==H.fontStyle||z("I")||z("EM")),b(m[2],z("U")),b(Z,z("SUP")),b(P,z("SUB")),e.cellEditor.isTableSelected()?(b(ia,
+t(H.textAlign,"justify")),b(C,t(H.textAlign,"left")),b(F,t(H.textAlign,"center")),b(J,t(H.textAlign,"right"))):(z=e.cellEditor.align||mxUtils.getValue(g.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),t(H.textAlign,"justify")?(b(ia,t(H.textAlign,"justify")),b(C,!1),b(F,!1),b(J,!1)):(b(ia,!1),b(C,z==mxConstants.ALIGN_LEFT),b(F,z==mxConstants.ALIGN_CENTER),b(J,z==mxConstants.ALIGN_RIGHT))),U=e.getParentByName(da,"TABLE",e.cellEditor.textarea),aa=null==U?null:e.getParentByName(da,"TR",U),V=null==
+U?null:e.getParentByNames(da,["TD","TH"],U),db.style.display=null!=U?"":"none",document.activeElement!=Q&&("FONT"==da.nodeName&&"4"==da.getAttribute("size")&&null!=ba?(da.removeAttribute("size"),da.style.fontSize=ba+" pt",ba=null):Q.value=isNaN(L)?"":L+" pt",ua=parseFloat(W),isNaN(ua)?Ua.value="100 %":Ua.value=Math.round(100*ua)+" %"),null!=X&&(ca="rgba(0, 0, 0, 0)"==H.color||"transparent"==H.color?mxConstants.NONE:mxUtils.rgba2hex(H.color),X(ca,!0)),null!=la&&(ra="rgba(0, 0, 0, 0)"==H.backgroundColor||
+"transparent"==H.backgroundColor?mxConstants.NONE:mxUtils.rgba2hex(H.backgroundColor),la(ra,!0)),null!=u.firstChild&&(u.firstChild.nodeValue=Graph.stripQuotes(H.fontFamily)))}bb=!1},0))};(mxClient.IS_FF||mxClient.IS_EDGE||mxClient.IS_IE||mxClient.IS_IE11)&&mxEvent.addListener(e.cellEditor.textarea,"DOMSubtreeModified",d);mxEvent.addListener(e.cellEditor.textarea,"input",d);mxEvent.addListener(e.cellEditor.textarea,"touchend",d);mxEvent.addListener(e.cellEditor.textarea,"mouseup",d);mxEvent.addListener(e.cellEditor.textarea,
+"keyup",d);this.listeners.push({destroy:function(){}});d()}return a};StyleFormatPanel=function(a,b,f){BaseFormatPanel.call(this,a,b,f);this.init()};mxUtils.extend(StyleFormatPanel,BaseFormatPanel);StyleFormatPanel.prototype.defaultStrokeColor="black";
StyleFormatPanel.prototype.init=function(){var a=this.editorUi.getSelectionState();!a.containsLabel&&0<a.cells.length&&(a.containsImage&&1==a.vertices.length&&"image"==a.style.shape&&null!=a.style.image&&"data:image/svg+xml;"==a.style.image.substring(0,19)&&this.container.appendChild(this.addSvgStyles(this.createPanel())),a.fill&&this.container.appendChild(this.addFill(this.createPanel())),this.container.appendChild(this.addStroke(this.createPanel())),this.container.appendChild(this.addLineJumps(this.createPanel())),
a=this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_OPACITY),a.style.paddingTop="8px",a.style.paddingBottom="8px",this.container.appendChild(a),this.container.appendChild(this.addEffects(this.createPanel())));a=this.addEditOps(this.createPanel());null!=a.firstChild&&mxUtils.br(a);this.container.appendChild(this.addStyleOps(a))};
StyleFormatPanel.prototype.getCssRules=function(a){var b=document.implementation.createHTMLDocument(""),f=document.createElement("style");mxUtils.setTextContent(f,a);b.body.appendChild(f);return f.sheet.cssRules};
-StyleFormatPanel.prototype.addSvgStyles=function(a){var b=this.editorUi.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="6px";a.style.fontWeight="bold";a.style.display="none";try{var f=b.style.editableCssRules;if(null!=f){var d=new RegExp(f),g=b.style.image.substring(b.style.image.indexOf(",")+1),e=window.atob?atob(g):Base64.decode(g,!0),k=mxUtils.parseXml(e);if(null!=k){var n=k.getElementsByTagName("style");for(b=0;b<n.length;b++){var u=this.getCssRules(mxUtils.getTextContent(n[b]));
-for(f=0;f<u.length;f++)this.addSvgRule(a,u[f],k,n[b],u,f,d)}}}}catch(m){}return a};
-StyleFormatPanel.prototype.addSvgRule=function(a,b,f,d,g,e,k){var n=this.editorUi,u=n.editor.graph;k.test(b.selectorText)&&(k=mxUtils.bind(this,function(m,r,x){var B=mxUtils.trim(m.style[r]);""!=B&&"url("!=B.substring(0,4)&&(m=this.createColorOption(x+" "+m.selectorText,function(){var C=B;return(C=C.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===C.length?"#"+("0"+parseInt(C[1],10).toString(16)).slice(-2)+("0"+parseInt(C[2],10).toString(16)).slice(-2)+("0"+parseInt(C[3],
-10).toString(16)).slice(-2):""},mxUtils.bind(this,function(C){g[e].style[r]=C;C="";for(var G=0;G<g.length;G++)C+=g[G].cssText+" ";d.textContent=C;C=mxUtils.getXml(f.documentElement);u.setCellStyles(mxConstants.STYLE_IMAGE,"data:image/svg+xml,"+(window.btoa?btoa(C):Base64.encode(C,!0)),n.getSelectionState().cells)}),"#ffffff",{install:function(C){},destroy:function(){}}),a.appendChild(m),a.style.display="")}),k(b,"fill",mxResources.get("fill")),k(b,"stroke",mxResources.get("line")),k(b,"stop-color",
+StyleFormatPanel.prototype.addSvgStyles=function(a){var b=this.editorUi.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="6px";a.style.fontWeight="bold";a.style.display="none";try{var f=b.style.editableCssRules;if(null!=f){var e=new RegExp(f),g=b.style.image.substring(b.style.image.indexOf(",")+1),d=window.atob?atob(g):Base64.decode(g,!0),k=mxUtils.parseXml(d);if(null!=k){var n=k.getElementsByTagName("style");for(b=0;b<n.length;b++){var u=this.getCssRules(mxUtils.getTextContent(n[b]));
+for(f=0;f<u.length;f++)this.addSvgRule(a,u[f],k,n[b],u,f,e)}}}}catch(m){}return a};
+StyleFormatPanel.prototype.addSvgRule=function(a,b,f,e,g,d,k){var n=this.editorUi,u=n.editor.graph;k.test(b.selectorText)&&(k=mxUtils.bind(this,function(m,r,x){var B=mxUtils.trim(m.style[r]);""!=B&&"url("!=B.substring(0,4)&&(m=this.createColorOption(x+" "+m.selectorText,function(){var C=B;return(C=C.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===C.length?"#"+("0"+parseInt(C[1],10).toString(16)).slice(-2)+("0"+parseInt(C[2],10).toString(16)).slice(-2)+("0"+parseInt(C[3],
+10).toString(16)).slice(-2):""},mxUtils.bind(this,function(C){g[d].style[r]=C;C="";for(var F=0;F<g.length;F++)C+=g[F].cssText+" ";e.textContent=C;C=mxUtils.getXml(f.documentElement);u.setCellStyles(mxConstants.STYLE_IMAGE,"data:image/svg+xml,"+(window.btoa?btoa(C):Base64.encode(C,!0)),n.getSelectionState().cells)}),"#ffffff",{install:function(C){},destroy:function(){}}),a.appendChild(m),a.style.display="")}),k(b,"fill",mxResources.get("fill")),k(b,"stroke",mxResources.get("line")),k(b,"stop-color",
mxResources.get("gradient")))};
-StyleFormatPanel.prototype.addEditOps=function(a){var b=this.editorUi.getSelectionState(),f=null;1==b.cells.length&&(f=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(d){this.editorUi.actions.get("editStyle").funct()})),f.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),f.style.width="210px",f.style.marginBottom="2px",a.appendChild(f));b.image&&0<b.cells.length&&(b=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,
-function(d){this.editorUi.actions.get("image").funct()})),b.setAttribute("title",mxResources.get("editImage")),b.style.marginBottom="2px",null==f?b.style.width="210px":(f.style.width="104px",b.style.width="104px",b.style.marginLeft="2px"),a.appendChild(b));return a};
-StyleFormatPanel.prototype.addFill=function(a){var b=this.editorUi,f=b.editor.graph,d=b.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="6px";var g=document.createElement("select");g.style.position="absolute";g.style.left="104px";g.style.width="70px";g.style.height="22px";g.style.padding="0px";g.style.marginTop="-3px";g.style.borderRadius="4px";g.style.border="1px solid rgb(160, 160, 160)";g.style.boxSizing="border-box";var e=g.cloneNode(!1);mxEvent.addListener(g,"click",function(C){mxEvent.consume(C)});
-mxEvent.addListener(e,"click",function(C){mxEvent.consume(C)});var k=1<=d.vertices.length?f.stylesheet.getDefaultVertexStyle():f.stylesheet.getDefaultEdgeStyle(),n=this.createCellColorOption(mxResources.get("gradient"),mxConstants.STYLE_GRADIENTCOLOR,null!=k[mxConstants.STYLE_GRADIENTCOLOR]?k[mxConstants.STYLE_GRADIENTCOLOR]:"#ffffff",function(C){g.style.display=null==C||C==mxConstants.NONE?"none":""},function(C){f.updateCellStyles({gradientColor:C},f.getSelectionCells())}),u="image"==d.style.shape?
-mxConstants.STYLE_IMAGE_BACKGROUND:mxConstants.STYLE_FILLCOLOR;k=this.createCellColorOption(mxResources.get("fill"),u,"default",null,mxUtils.bind(this,function(C){f.setCellStyles(u,C,d.cells)}),f.shapeBackgroundColor);k.style.fontWeight="bold";var m=mxUtils.getValue(d.style,u,null);n.style.display=null!=m&&m!=mxConstants.NONE&&d.fill&&"image"!=d.style.shape?"":"none";var r=[mxConstants.DIRECTION_NORTH,mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_RADIAL];
-for(m=0;m<r.length;m++){var x=document.createElement("option");x.setAttribute("value",r[m]);mxUtils.write(x,mxResources.get(r[m]));g.appendChild(x)}n.appendChild(g);for(m=0;m<Editor.roughFillStyles.length;m++)r=document.createElement("option"),r.setAttribute("value",Editor.roughFillStyles[m].val),mxUtils.write(r,Editor.roughFillStyles[m].dispName),e.appendChild(r);k.appendChild(e);var B=mxUtils.bind(this,function(){d=b.getSelectionState();var C=mxUtils.getValue(d.style,mxConstants.STYLE_GRADIENT_DIRECTION,
-mxConstants.DIRECTION_SOUTH),G=mxUtils.getValue(d.style,"fillStyle","auto");""==C&&(C=mxConstants.DIRECTION_SOUTH);g.value=C;e.value=G;a.style.display=d.fill?"":"none";C=mxUtils.getValue(d.style,u,null);d.fill&&null!=C&&C!=mxConstants.NONE&&"filledEdge"!=d.style.shape?(e.style.display="1"==d.style.sketch?"":"none",n.style.display=d.containsImage||"1"==d.style.sketch&&"solid"!=G&&"auto"!=G?"none":""):(e.style.display="none",n.style.display="none")});f.getModel().addListener(mxEvent.CHANGE,B);this.listeners.push({destroy:function(){f.getModel().removeListener(B)}});
-B();mxEvent.addListener(g,"change",function(C){f.setCellStyles(mxConstants.STYLE_GRADIENT_DIRECTION,g.value,d.cells);b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_GRADIENT_DIRECTION],"values",[g.value],"cells",d.cells));mxEvent.consume(C)});mxEvent.addListener(e,"change",function(C){f.setCellStyles("fillStyle",e.value,d.cells);b.fireEvent(new mxEventObject("styleChanged","keys",["fillStyle"],"values",[e.value],"cells",d.cells));mxEvent.consume(C)});a.appendChild(k);a.appendChild(n);
+StyleFormatPanel.prototype.addEditOps=function(a){var b=this.editorUi.getSelectionState(),f=null;1==b.cells.length&&(f=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(e){this.editorUi.actions.get("editStyle").funct()})),f.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),f.style.width="210px",f.style.marginBottom="2px",a.appendChild(f));b.image&&0<b.cells.length&&(b=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,
+function(e){this.editorUi.actions.get("image").funct()})),b.setAttribute("title",mxResources.get("editImage")),b.style.marginBottom="2px",null==f?b.style.width="210px":(f.style.width="104px",b.style.width="104px",b.style.marginLeft="2px"),a.appendChild(b));return a};
+StyleFormatPanel.prototype.addFill=function(a){var b=this.editorUi,f=b.editor.graph,e=b.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="6px";var g=document.createElement("select");g.style.position="absolute";g.style.left="104px";g.style.width="70px";g.style.height="22px";g.style.padding="0px";g.style.marginTop="-3px";g.style.borderRadius="4px";g.style.border="1px solid rgb(160, 160, 160)";g.style.boxSizing="border-box";var d=g.cloneNode(!1);mxEvent.addListener(g,"click",function(C){mxEvent.consume(C)});
+mxEvent.addListener(d,"click",function(C){mxEvent.consume(C)});var k=1<=e.vertices.length?f.stylesheet.getDefaultVertexStyle():f.stylesheet.getDefaultEdgeStyle(),n=this.createCellColorOption(mxResources.get("gradient"),mxConstants.STYLE_GRADIENTCOLOR,null!=k[mxConstants.STYLE_GRADIENTCOLOR]?k[mxConstants.STYLE_GRADIENTCOLOR]:"#ffffff",function(C){g.style.display=null==C||C==mxConstants.NONE?"none":""},function(C){f.updateCellStyles({gradientColor:C},f.getSelectionCells())}),u="image"==e.style.shape?
+mxConstants.STYLE_IMAGE_BACKGROUND:mxConstants.STYLE_FILLCOLOR;k=this.createCellColorOption(mxResources.get("fill"),u,"default",null,mxUtils.bind(this,function(C){f.setCellStyles(u,C,e.cells)}),f.shapeBackgroundColor);k.style.fontWeight="bold";var m=mxUtils.getValue(e.style,u,null);n.style.display=null!=m&&m!=mxConstants.NONE&&e.fill&&"image"!=e.style.shape?"":"none";var r=[mxConstants.DIRECTION_NORTH,mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_RADIAL];
+for(m=0;m<r.length;m++){var x=document.createElement("option");x.setAttribute("value",r[m]);mxUtils.write(x,mxResources.get(r[m]));g.appendChild(x)}n.appendChild(g);for(m=0;m<Editor.roughFillStyles.length;m++)r=document.createElement("option"),r.setAttribute("value",Editor.roughFillStyles[m].val),mxUtils.write(r,Editor.roughFillStyles[m].dispName),d.appendChild(r);k.appendChild(d);var B=mxUtils.bind(this,function(){e=b.getSelectionState();var C=mxUtils.getValue(e.style,mxConstants.STYLE_GRADIENT_DIRECTION,
+mxConstants.DIRECTION_SOUTH),F=mxUtils.getValue(e.style,"fillStyle","auto");""==C&&(C=mxConstants.DIRECTION_SOUTH);g.value=C;d.value=F;a.style.display=e.fill?"":"none";C=mxUtils.getValue(e.style,u,null);e.fill&&null!=C&&C!=mxConstants.NONE&&"filledEdge"!=e.style.shape?(d.style.display="1"==e.style.sketch?"":"none",n.style.display=e.containsImage||"1"==e.style.sketch&&"solid"!=F&&"auto"!=F?"none":""):(d.style.display="none",n.style.display="none")});f.getModel().addListener(mxEvent.CHANGE,B);this.listeners.push({destroy:function(){f.getModel().removeListener(B)}});
+B();mxEvent.addListener(g,"change",function(C){f.setCellStyles(mxConstants.STYLE_GRADIENT_DIRECTION,g.value,e.cells);b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_GRADIENT_DIRECTION],"values",[g.value],"cells",e.cells));mxEvent.consume(C)});mxEvent.addListener(d,"change",function(C){f.setCellStyles("fillStyle",d.value,e.cells);b.fireEvent(new mxEventObject("styleChanged","keys",["fillStyle"],"values",[d.value],"cells",e.cells));mxEvent.consume(C)});a.appendChild(k);a.appendChild(n);
k=this.getCustomColors();for(m=0;m<k.length;m++)a.appendChild(this.createCellColorOption(k[m].title,k[m].key,k[m].defaultValue));return a};StyleFormatPanel.prototype.getCustomColors=function(){var a=[];this.editorUi.getSelectionState().swimlane&&a.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return a};
-StyleFormatPanel.prototype.addStroke=function(a){function b(W){var aa=parseFloat(D.value);aa=Math.min(999,Math.max(0,isNaN(aa)?1:aa));aa!=mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)&&(g.setCellStyles(mxConstants.STYLE_STROKEWIDTH,aa,e.cells),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[aa],"cells",e.cells)));D.value=aa+" pt";mxEvent.consume(W)}function f(W){var aa=parseFloat(N.value);aa=Math.min(999,Math.max(0,isNaN(aa)?1:aa));aa!=mxUtils.getValue(e.style,
-mxConstants.STYLE_STROKEWIDTH,1)&&(g.setCellStyles(mxConstants.STYLE_STROKEWIDTH,aa,e.cells),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[aa],"cells",e.cells)));N.value=aa+" pt";mxEvent.consume(W)}var d=this.editorUi,g=d.editor.graph,e=d.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="4px";a.style.whiteSpace="normal";var k=document.createElement("div");k.style.fontWeight="bold";e.stroke||(k.style.display="none");var n=document.createElement("select");
-n.style.position="absolute";n.style.height="22px";n.style.padding="0px";n.style.marginTop="-3px";n.style.boxSizing="border-box";n.style.left="94px";n.style.width="80px";n.style.border="1px solid rgb(160, 160, 160)";n.style.borderRadius="4px";for(var u=["sharp","rounded","curved"],m=0;m<u.length;m++){var r=document.createElement("option");r.setAttribute("value",u[m]);mxUtils.write(r,mxResources.get(u[m]));n.appendChild(r)}mxEvent.addListener(n,"change",function(W){g.getModel().beginUpdate();try{var aa=
-[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],oa=["0",null];"rounded"==n.value?oa=["1",null]:"curved"==n.value&&(oa=[null,"1"]);for(var sa=0;sa<aa.length;sa++)g.setCellStyles(aa[sa],oa[sa],e.cells);d.fireEvent(new mxEventObject("styleChanged","keys",aa,"values",oa,"cells",e.cells))}finally{g.getModel().endUpdate()}mxEvent.consume(W)});mxEvent.addListener(n,"click",function(W){mxEvent.consume(W)});var x="image"==e.style.shape?mxConstants.STYLE_IMAGE_BORDER:mxConstants.STYLE_STROKECOLOR;u="image"==
-e.style.shape?mxResources.get("border"):mxResources.get("line");u=this.createCellColorOption(u,x,"default",null,mxUtils.bind(this,function(W){g.setCellStyles(x,W,e.cells)}),g.shapeForegroundColor);u.appendChild(n);k.appendChild(u);var B=k.cloneNode(!1);B.style.fontWeight="normal";B.style.whiteSpace="nowrap";B.style.position="relative";B.style.paddingLeft="0px";B.style.marginBottom="2px";B.style.overflow="hidden";B.style.marginTop="2px";B.style.width="220px";B.className="geToolbarContainer";var C=
-mxUtils.bind(this,function(W,aa,oa,sa,Ka){W=this.editorUi.menus.styleChange(W,"",sa,Ka,"geIcon",null);sa=document.createElement("div");sa.style.width=aa+"px";sa.style.height="1px";sa.style.borderBottom="1px "+oa+" "+this.defaultStrokeColor;sa.style.paddingTop="6px";W.firstChild.firstChild.style.padding="0px 4px 0px 4px";W.firstChild.firstChild.style.width=aa+"px";W.firstChild.firstChild.appendChild(sa);return W});m=this.editorUi.toolbar.addMenuFunctionInContainer(B,"geSprite-orthogonal",mxResources.get("pattern"),
-!1,mxUtils.bind(this,function(W){C(W,75,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));C(W,75,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed"));C(W,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");C(W,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],
-["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");C(W,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")}));var G=B.cloneNode(!1),J=this.editorUi.toolbar.addMenuFunctionInContainer(G,"geSprite-connection",mxResources.get("connection"),!1,mxUtils.bind(this,function(W){this.editorUi.menus.styleChange(W,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],[null,
-null,null,null],"geIcon geSprite geSprite-connection",null,!0).setAttribute("title",mxResources.get("line"));this.editorUi.menus.styleChange(W,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["link",null,null,null],"geIcon geSprite geSprite-linkedge",null,!0).setAttribute("title",mxResources.get("link"));this.editorUi.menus.styleChange(W,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["flexArrow",null,null,null],
-"geIcon geSprite geSprite-arrow",null,!0).setAttribute("title",mxResources.get("arrow"));this.editorUi.menus.styleChange(W,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["arrow",null,null,null],"geIcon geSprite geSprite-simplearrow",null,!0).setAttribute("title",mxResources.get("simpleArrow"))}));r=this.editorUi.toolbar.addMenuFunctionInContainer(G,"geSprite-orthogonal",mxResources.get("pattern"),!1,mxUtils.bind(this,function(W){C(W,33,"solid",[mxConstants.STYLE_DASHED,
-mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));C(W,33,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed"));C(W,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");C(W,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+
-" (2)");C(W,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")}));u=B.cloneNode(!1);var D=document.createElement("input");D.style.position="absolute";D.style.textAlign="right";D.style.marginTop="2px";D.style.width="52px";D.style.height="21px";D.style.left="146px";D.style.border="1px solid rgb(160, 160, 160)";D.style.borderRadius="4px";D.style.boxSizing="border-box";D.setAttribute("title",mxResources.get("linewidth"));
-B.appendChild(D);var N=D.cloneNode(!0);G.appendChild(N);var Q=this.createStepper(D,b,1,9);Q.style.display=D.style.display;Q.style.marginTop="2px";Q.style.left="198px";B.appendChild(Q);Q=this.createStepper(N,f,1,9);Q.style.display=N.style.display;Q.style.marginTop="2px";N.style.position="absolute";Q.style.left="198px";G.appendChild(Q);mxEvent.addListener(D,"blur",b);mxEvent.addListener(D,"change",b);mxEvent.addListener(N,"blur",f);mxEvent.addListener(N,"change",f);var R=this.editorUi.toolbar.addMenuFunctionInContainer(u,
-"geSprite-orthogonal",mxResources.get("waypoints"),!1,mxUtils.bind(this,function(W){"arrow"!=e.style.shape&&(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],"geIcon geSprite geSprite-straight",null,!0).setAttribute("title",mxResources.get("straight")),this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle",null,null],"geIcon geSprite geSprite-orthogonal",
-null,!0).setAttribute("title",mxResources.get("orthogonal")),this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalelbow",null,!0).setAttribute("title",mxResources.get("simple")),this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",
-"vertical",null,null],"geIcon geSprite geSprite-verticalelbow",null,!0).setAttribute("title",mxResources.get("simple")),this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalisometric",null,!0).setAttribute("title",mxResources.get("isometric")),this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,
-mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalisometric",null,!0).setAttribute("title",mxResources.get("isometric")),"connector"==e.style.shape&&this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle","1",null],"geIcon geSprite geSprite-curved",null,!0).setAttribute("title",mxResources.get("curved")),this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_EDGE,
-mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["entityRelationEdgeStyle",null,null],"geIcon geSprite geSprite-entity",null,!0).setAttribute("title",mxResources.get("entityRelation")))})),P=this.editorUi.toolbar.addMenuFunctionInContainer(u,"geSprite-startclassic",mxResources.get("linestart"),!1,mxUtils.bind(this,function(W){if("connector"==e.style.shape||"flexArrow"==e.style.shape||"filledEdge"==e.style.shape){var aa=this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,
-"startFill"],[mxConstants.NONE,0],"geIcon",null,!1);aa.setAttribute("title",mxResources.get("none"));var oa=document.createElement("font");oa.style.fontSize="10px";mxUtils.write(oa,mxResources.get("none"));aa.firstChild.firstChild.appendChild(oa);"connector"==e.style.shape||"filledEdge"==e.style.shape?(Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC,1],null,null,!1,Format.classicFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,
-"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC_THIN,1],null,null,!1,Format.classicThinFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OPEN,0],null,null,!1,Format.openFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OPEN_THIN,0],null,null,!1,Format.openThinFilledMarkerImage.src)),
-Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],["openAsync",0],null,null,!1,Format.openAsyncFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK,1],null,null,!1,Format.blockFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK_THIN,1],null,
-null,!1,Format.blockThinFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],["async",1],null,null,!1,Format.asyncFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OVAL,1],null,null,!1,Format.ovalFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],
-[mxConstants.ARROW_DIAMOND,1],null,null,!1,Format.diamondFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_DIAMOND_THIN,1],null,null,!1,Format.diamondThinFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC,0],null,null,!1,Format.classicMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,
-"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC_THIN,0],null,null,!1,Format.classicThinMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK,0],null,null,!1,Format.blockMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK_THIN,0],null,null,!1,Format.blockThinMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,
-"",[mxConstants.STYLE_STARTARROW,"startFill"],["async",0],null,null,!1,Format.asyncMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OVAL,0],null,null,!1,Format.ovalMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_DIAMOND,0],null,null,!1,Format.diamondMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,
-"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_DIAMOND_THIN,0],null,null,!1,Format.diamondThinMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],["box",0],null,null,!1,Format.boxMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],["halfCircle",0],null,null,!1,Format.halfCircleMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,
-"",[mxConstants.STYLE_STARTARROW,"startFill"],["dash",0],null,null,!1,Format.dashMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],["cross",0],null,null,!1,Format.crossMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],["circlePlus",0],null,null,!1,Format.circlePlusMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,
-"startFill"],["circle",1],null,null,!1,Format.circleMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],["baseDash",0],null,null,!1,Format.baseDashMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERone",0],null,null,!1,Format.EROneMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],
-["ERmandOne",0],null,null,!1,Format.ERmandOneMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERmany",0],null,null,!1,Format.ERmanyMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERoneToMany",0],null,null,!1,Format.ERoneToManyMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],
-["ERzeroToOne",0],null,null,!1,Format.ERzeroToOneMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERzeroToMany",0],null,null,!1,Format.ERzeroToManyMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,"startFill"],["doubleBlock",0],null,null,!1,Format.doubleBlockMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW,
-"startFill"],["doubleBlock",1],null,null,!1,Format.doubleBlockFilledMarkerImage.src))):this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_STARTARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-startblocktrans",null,!1).setAttribute("title",mxResources.get("block"));W.div.style.width="40px";window.setTimeout(mxUtils.bind(this,function(){null!=W.div&&mxUtils.fit(W.div)}),0)}})),Z=this.editorUi.toolbar.addMenuFunctionInContainer(u,"geSprite-endclassic",mxResources.get("lineend"),!1,
-mxUtils.bind(this,function(W){if("connector"==e.style.shape||"flexArrow"==e.style.shape||"filledEdge"==e.style.shape){var aa=this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.NONE,0],"geIcon",null,!1);aa.setAttribute("title",mxResources.get("none"));var oa=document.createElement("font");oa.style.fontSize="10px";mxUtils.write(oa,mxResources.get("none"));aa.firstChild.firstChild.appendChild(oa);"connector"==e.style.shape||"filledEdge"==e.style.shape?(Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,
-"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC,1],null,null,!1,Format.classicFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC_THIN,1],null,null,!1,Format.classicThinFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OPEN,0],null,null,!1,Format.openFilledMarkerImage.src),
-"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OPEN_THIN,0],null,null,!1,Format.openThinFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["openAsync",0],null,null,!1,Format.openAsyncFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],
-[mxConstants.ARROW_BLOCK,1],null,null,!1,Format.blockFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_BLOCK_THIN,1],null,null,!1,Format.blockThinFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["async",1],null,null,!1,Format.asyncFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,
-"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OVAL,1],null,null,!1,Format.ovalFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND,1],null,null,!1,Format.diamondFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND_THIN,1],null,null,!1,Format.diamondThinFilledMarkerImage.src),
-"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC,0],null,null,!1,Format.classicMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC_THIN,0],null,null,!1,Format.classicThinMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],
-[mxConstants.ARROW_BLOCK,0],null,null,!1,Format.blockMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_BLOCK_THIN,0],null,null,!1,Format.blockThinMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["async",0],null,null,!1,Format.asyncMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,
-"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OVAL,0],null,null,!1,Format.ovalMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND,0],null,null,!1,Format.diamondMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND_THIN,0],null,null,!1,Format.diamondThinMarkerImage.src),
-"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["box",0],null,null,!1,Format.boxMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["halfCircle",0],null,null,!1,Format.halfCircleMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["dash",0],null,null,!1,Format.dashMarkerImage.src),
-"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["cross",0],null,null,!1,Format.crossMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["circlePlus",0],null,null,!1,Format.circlePlusMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["circle",0],null,null,!1,Format.circleMarkerImage.src),
-"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["baseDash",0],null,null,!1,Format.baseDashMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERone",0],null,null,!1,Format.EROneMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmandOne",0],null,null,!1,Format.ERmandOneMarkerImage.src),
-"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmany",0],null,null,!1,Format.ERmanyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERoneToMany",0],null,null,!1,Format.ERoneToManyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToOne",0],null,null,
-!1,Format.ERzeroToOneMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToMany",0],null,null,!1,Format.ERzeroToManyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,"endFill"],["doubleBlock",0],null,null,!1,Format.doubleBlockMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW,
-"endFill"],["doubleBlock",1],null,null,!1,Format.doubleBlockFilledMarkerImage.src),"scaleX(-1)")):this.editorUi.menus.edgeStyleChange(W,"",[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-endblocktrans",null,!1).setAttribute("title",mxResources.get("block"));W.div.style.width="40px";window.setTimeout(mxUtils.bind(this,function(){null!=W.div&&mxUtils.fit(W.div)}),0)}}));Q=this.addArrow(J,8);Q.nextSibling.style.position="relative";Q.nextSibling.style.top="-2px";Q=this.addArrow(R,
-10);Q.nextSibling.style.position="relative";Q.nextSibling.style.top="-3px";R.getElementsByTagName("img")[0].style.top="-1px";this.addArrow(P,null,!0);this.addArrow(Z,null,!0);Q=this.addArrow(m,9);Q.className="geIcon";Q.style.width="auto";var U=this.addArrow(r,9);U.className="geIcon";U.style.width="22px";var V=document.createElement("div");V.style.width="84px";V.style.height="1px";V.style.borderBottom="1px solid "+this.defaultStrokeColor;V.style.marginBottom="7px";Q.appendChild(V);var ia=document.createElement("div");
-ia.style.width="23px";ia.style.height="1px";ia.style.borderBottom="1px solid "+this.defaultStrokeColor;ia.style.marginBottom="7px";U.appendChild(ia);m.style.height="15px";m.style.marginLeft="16px";r.style.height="15px";r.style.marginLeft="3px";J.style.marginLeft="10px";J.style.height="15px";R.style.marginLeft="10px";R.style.height="17px";P.style.marginLeft="3px";P.style.height="17px";Z.style.marginLeft="3px";Z.style.height="17px";a.appendChild(k);a.appendChild(G);a.appendChild(B);m=B.cloneNode(!1);
-m.style.padding="5px 4px 6px 0px";m.style.fontWeight="normal";r=document.createElement("div");r.style.position="absolute";r.style.marginLeft="0px";r.style.marginBottom="12px";r.style.marginTop="2px";r.style.fontWeight="normal";r.style.width="76px";mxUtils.write(r,mxResources.get("lineend"));m.appendChild(r);var ha=this.addUnitInput(m,"pt",98,52,function(){fa.apply(this,arguments)}),ba=this.addUnitInput(m,"pt",30,52,function(){ca.apply(this,arguments)});mxUtils.br(m);Q=document.createElement("div");
-Q.style.height="8px";m.appendChild(Q);r=r.cloneNode(!1);mxUtils.write(r,mxResources.get("linestart"));m.appendChild(r);var qa=this.addUnitInput(m,"pt",98,52,function(){T.apply(this,arguments)}),O=this.addUnitInput(m,"pt",30,52,function(){L.apply(this,arguments)});mxUtils.br(m);this.addLabel(m,mxResources.get("spacing"),98,52);this.addLabel(m,mxResources.get("size"),30,52);mxUtils.br(m);k=k.cloneNode(!1);k.style.fontWeight="normal";k.style.position="relative";k.style.paddingLeft="16px";k.style.marginBottom=
-"2px";k.style.marginTop="6px";k.style.borderWidth="0px";k.style.paddingBottom="18px";r=document.createElement("div");r.style.position="absolute";r.style.marginLeft="3px";r.style.marginBottom="12px";r.style.marginTop="1px";r.style.fontWeight="normal";r.style.width="120px";mxUtils.write(r,mxResources.get("perimeter"));k.appendChild(r);var S=this.addUnitInput(k,"pt",30,52,function(){wa.apply(this,arguments)});e.edges.length==e.cells.length?(a.appendChild(u),a.appendChild(m)):e.vertices.length==e.cells.length&&
-a.appendChild(k);var F=mxUtils.bind(this,function(W,aa,oa){function sa(Ka,Ha,ua,Ca){ua=ua.getElementsByTagName("div")[0];null!=ua&&d.updateCssForMarker(ua,Ca,e.style.shape,Ka,Ha);return ua}e=d.getSelectionState();if(oa||document.activeElement!=D)W=parseFloat(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),D.value=isNaN(W)?"":W+" pt";if(oa||document.activeElement!=N)W=parseFloat(mxUtils.getValue(e.style,mxConstants.STYLE_STROKEWIDTH,1)),N.value=isNaN(W)?"":W+" pt";n.style.visibility="connector"==
-e.style.shape||"filledEdge"==e.style.shape?"":"hidden";"1"==mxUtils.getValue(e.style,mxConstants.STYLE_CURVED,null)?n.value="curved":"1"==mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,null)&&(n.value="rounded");"1"==mxUtils.getValue(e.style,mxConstants.STYLE_DASHED,null)?null==mxUtils.getValue(e.style,mxConstants.STYLE_DASH_PATTERN,null)?V.style.borderBottom="1px dashed "+this.defaultStrokeColor:V.style.borderBottom="1px dotted "+this.defaultStrokeColor:V.style.borderBottom="1px solid "+this.defaultStrokeColor;
-ia.style.borderBottom=V.style.borderBottom;W=R.getElementsByTagName("div")[0];null!=W&&(aa=mxUtils.getValue(e.style,mxConstants.STYLE_EDGE,null),"1"==mxUtils.getValue(e.style,mxConstants.STYLE_NOEDGESTYLE,null)&&(aa=null),"orthogonalEdgeStyle"==aa&&"1"==mxUtils.getValue(e.style,mxConstants.STYLE_CURVED,null)?W.className="geSprite geSprite-curved":W.className="straight"==aa||"none"==aa||null==aa?"geSprite geSprite-straight":"entityRelationEdgeStyle"==aa?"geSprite geSprite-entity":"elbowEdgeStyle"==
-aa?"geSprite "+("vertical"==mxUtils.getValue(e.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalelbow":"geSprite-horizontalelbow"):"isometricEdgeStyle"==aa?"geSprite "+("vertical"==mxUtils.getValue(e.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalisometric":"geSprite-horizontalisometric"):"geSprite geSprite-orthogonal");W=J.getElementsByTagName("div")[0];null!=W&&(W.className="link"==e.style.shape?"geSprite geSprite-linkedge":"flexArrow"==e.style.shape?"geSprite geSprite-arrow":"arrow"==
-e.style.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection");e.edges.length==e.cells.length?(G.style.display="",B.style.display="none"):(G.style.display="none",B.style.display="");Graph.lineJumpsEnabled&&0<e.edges.length&&0==e.vertices.length&&e.lineJumps&&(a.style.borderBottomStyle="none");W=sa(mxUtils.getValue(e.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(e.style,"startFill","1"),P,"start");aa=sa(mxUtils.getValue(e.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(e.style,
-"endFill","1"),Z,"end");null!=W&&null!=aa&&("arrow"==e.style.shape?(W.className="geSprite geSprite-noarrow",aa.className="geSprite geSprite-endblocktrans"):"link"==e.style.shape&&(W.className="geSprite geSprite-noarrow",aa.className="geSprite geSprite-noarrow"));mxUtils.setOpacity(R,"arrow"==e.style.shape?30:100);"connector"!=e.style.shape&&"flexArrow"!=e.style.shape&&"filledEdge"!=e.style.shape?(mxUtils.setOpacity(P,30),mxUtils.setOpacity(Z,30)):(mxUtils.setOpacity(P,100),mxUtils.setOpacity(Z,100));
-if(oa||document.activeElement!=O)W=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),O.value=isNaN(W)?"":W+" pt";if(oa||document.activeElement!=qa)W=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),qa.value=isNaN(W)?"":W+" pt";if(oa||document.activeElement!=ba)W=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),ba.value=isNaN(W)?"":W+" pt";if(oa||document.activeElement!=qa)W=parseInt(mxUtils.getValue(e.style,
-mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),ha.value=isNaN(W)?"":W+" pt";if(oa||document.activeElement!=S)W=parseInt(mxUtils.getValue(e.style,mxConstants.STYLE_PERIMETER_SPACING,0)),S.value=isNaN(W)?"":W+" pt"});var L=this.installInputHandler(O,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");var T=this.installInputHandler(qa,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");var ca=this.installInputHandler(ba,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,
-0,999," pt");var fa=this.installInputHandler(ha,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0,-999,999," pt");var wa=this.installInputHandler(S,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(D,F);this.addKeyHandler(O,F);this.addKeyHandler(qa,F);this.addKeyHandler(ba,F);this.addKeyHandler(ha,F);this.addKeyHandler(S,F);g.getModel().addListener(mxEvent.CHANGE,F);this.listeners.push({destroy:function(){g.getModel().removeListener(F)}});F();return a};
-StyleFormatPanel.prototype.addLineJumps=function(a){var b=this.editorUi,f=b.editor.graph,d=b.getSelectionState();if(Graph.lineJumpsEnabled&&0<d.edges.length&&0==d.vertices.length&&d.lineJumps){a.style.padding="2px 0px 24px 14px";var g=document.createElement("div");g.style.position="absolute";g.style.maxWidth="82px";g.style.overflow="hidden";g.style.textOverflow="ellipsis";mxUtils.write(g,mxResources.get("lineJumps"));a.appendChild(g);var e=document.createElement("select");e.style.position="absolute";
-e.style.height="21px";e.style.padding="0px";e.style.marginTop="-2px";e.style.boxSizing="border-box";e.style.right="76px";e.style.width="54px";e.style.border="1px solid rgb(160, 160, 160)";e.style.borderRadius="4px";g=["none","arc","gap","sharp","line"];for(var k=0;k<g.length;k++){var n=document.createElement("option");n.setAttribute("value",g[k]);mxUtils.write(n,mxResources.get(g[k]));e.appendChild(n)}mxEvent.addListener(e,"change",function(x){f.getModel().beginUpdate();try{f.setCellStyles("jumpStyle",
-e.value,d.cells),b.fireEvent(new mxEventObject("styleChanged","keys",["jumpStyle"],"values",[e.value],"cells",d.cells))}finally{f.getModel().endUpdate()}mxEvent.consume(x)});mxEvent.addListener(e,"click",function(x){mxEvent.consume(x)});a.appendChild(e);var u=this.addUnitInput(a,"pt",16,42,function(){m.apply(this,arguments)});var m=this.installInputHandler(u,"jumpSize",Graph.defaultJumpSize,0,999," pt");var r=mxUtils.bind(this,function(x,B,C){d=b.getSelectionState();e.value=mxUtils.getValue(d.style,
-"jumpStyle","none");if(C||document.activeElement!=u)x=parseInt(mxUtils.getValue(d.style,"jumpSize",Graph.defaultJumpSize)),u.value=isNaN(x)?"":x+" pt"});this.addKeyHandler(u,r);f.getModel().addListener(mxEvent.CHANGE,r);this.listeners.push({destroy:function(){f.getModel().removeListener(r)}});r()}else a.style.display="none";return a};
-StyleFormatPanel.prototype.addEffects=function(a){var b=this.editorUi,f=b.editor.graph,d=b.getSelectionState();a.style.paddingTop="4px";a.style.paddingBottom="0px";var g=document.createElement("table");g.style.width="210px";g.style.fontWeight="bold";g.style.tableLayout="fixed";var e=document.createElement("tbody"),k=document.createElement("tr");k.style.padding="0px";var n=document.createElement("td");n.style.padding="0px";n.style.width="50%";n.setAttribute("valign","top");var u=n.cloneNode(!0);u.style.paddingLeft=
-"8px";k.appendChild(n);k.appendChild(u);e.appendChild(k);g.appendChild(e);a.appendChild(g);var m=n,r=0,x=mxUtils.bind(this,function(C,G,J){C=this.createCellOption(C,G,J);C.style.width="100%";m.appendChild(C);m=m==n?u:n;r++}),B=mxUtils.bind(this,function(C,G,J){d=b.getSelectionState();n.innerText="";u.innerText="";m=n;d.rounded&&x(mxResources.get("rounded"),mxConstants.STYLE_ROUNDED,0);d.swimlane&&x(mxResources.get("divider"),"swimlaneLine",1);d.containsImage||x(mxResources.get("shadow"),mxConstants.STYLE_SHADOW,
-0);d.glass&&x(mxResources.get("glass"),mxConstants.STYLE_GLASS,0);x(mxResources.get("sketch"),"sketch",0)});f.getModel().addListener(mxEvent.CHANGE,B);this.listeners.push({destroy:function(){f.getModel().removeListener(B)}});B();return a};StyleFormatPanel.prototype.addStyleOps=function(a){a.style.paddingTop="10px";a.style.paddingBottom="10px";this.addActions(a,["setAsDefaultStyle"]);return a};DiagramStylePanel=function(a,b,f){BaseFormatPanel.call(this,a,b,f);this.init()};
+StyleFormatPanel.prototype.addStroke=function(a){function b(X){var ca=parseFloat(D.value);ca=Math.min(999,Math.max(0,isNaN(ca)?1:ca));ca!=mxUtils.getValue(d.style,mxConstants.STYLE_STROKEWIDTH,1)&&(g.setCellStyles(mxConstants.STYLE_STROKEWIDTH,ca,d.cells),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[ca],"cells",d.cells)));D.value=ca+" pt";mxEvent.consume(X)}function f(X){var ca=parseFloat(N.value);ca=Math.min(999,Math.max(0,isNaN(ca)?1:ca));ca!=mxUtils.getValue(d.style,
+mxConstants.STYLE_STROKEWIDTH,1)&&(g.setCellStyles(mxConstants.STYLE_STROKEWIDTH,ca,d.cells),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[ca],"cells",d.cells)));N.value=ca+" pt";mxEvent.consume(X)}var e=this.editorUi,g=e.editor.graph,d=e.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="4px";a.style.whiteSpace="normal";var k=document.createElement("div");k.style.fontWeight="bold";d.stroke||(k.style.display="none");var n=document.createElement("select");
+n.style.position="absolute";n.style.height="22px";n.style.padding="0px";n.style.marginTop="-3px";n.style.boxSizing="border-box";n.style.left="94px";n.style.width="80px";n.style.border="1px solid rgb(160, 160, 160)";n.style.borderRadius="4px";for(var u=["sharp","rounded","curved"],m=0;m<u.length;m++){var r=document.createElement("option");r.setAttribute("value",u[m]);mxUtils.write(r,mxResources.get(u[m]));n.appendChild(r)}mxEvent.addListener(n,"change",function(X){g.getModel().beginUpdate();try{var ca=
+[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],oa=["0",null];"rounded"==n.value?oa=["1",null]:"curved"==n.value&&(oa=[null,"1"]);for(var ta=0;ta<ca.length;ta++)g.setCellStyles(ca[ta],oa[ta],d.cells);e.fireEvent(new mxEventObject("styleChanged","keys",ca,"values",oa,"cells",d.cells))}finally{g.getModel().endUpdate()}mxEvent.consume(X)});mxEvent.addListener(n,"click",function(X){mxEvent.consume(X)});var x="image"==d.style.shape?mxConstants.STYLE_IMAGE_BORDER:mxConstants.STYLE_STROKECOLOR;u="image"==
+d.style.shape?mxResources.get("border"):mxResources.get("line");u=this.createCellColorOption(u,x,"default",null,mxUtils.bind(this,function(X){g.setCellStyles(x,X,d.cells)}),g.shapeForegroundColor);u.appendChild(n);k.appendChild(u);var B=k.cloneNode(!1);B.style.fontWeight="normal";B.style.whiteSpace="nowrap";B.style.position="relative";B.style.paddingLeft="0px";B.style.marginBottom="2px";B.style.overflow="hidden";B.style.marginTop="2px";B.style.width="220px";B.className="geToolbarContainer";var C=
+mxUtils.bind(this,function(X,ca,oa,ta,Ka){X=this.editorUi.menus.styleChange(X,"",ta,Ka,"geIcon",null);ta=document.createElement("div");ta.style.width=ca+"px";ta.style.height="1px";ta.style.borderBottom="1px "+oa+" "+this.defaultStrokeColor;ta.style.paddingTop="6px";X.firstChild.firstChild.style.padding="0px 4px 0px 4px";X.firstChild.firstChild.style.width=ca+"px";X.firstChild.firstChild.appendChild(ta);return X});m=this.editorUi.toolbar.addMenuFunctionInContainer(B,"geSprite-orthogonal",mxResources.get("pattern"),
+!1,mxUtils.bind(this,function(X){C(X,75,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));C(X,75,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed"));C(X,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");C(X,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],
+["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");C(X,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")}));var F=B.cloneNode(!1),J=this.editorUi.toolbar.addMenuFunctionInContainer(F,"geSprite-connection",mxResources.get("connection"),!1,mxUtils.bind(this,function(X){this.editorUi.menus.styleChange(X,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],[null,
+null,null,null],"geIcon geSprite geSprite-connection",null,!0).setAttribute("title",mxResources.get("line"));this.editorUi.menus.styleChange(X,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["link",null,null,null],"geIcon geSprite geSprite-linkedge",null,!0).setAttribute("title",mxResources.get("link"));this.editorUi.menus.styleChange(X,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["flexArrow",null,null,null],
+"geIcon geSprite geSprite-arrow",null,!0).setAttribute("title",mxResources.get("arrow"));this.editorUi.menus.styleChange(X,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["arrow",null,null,null],"geIcon geSprite geSprite-simplearrow",null,!0).setAttribute("title",mxResources.get("simpleArrow"))}));r=this.editorUi.toolbar.addMenuFunctionInContainer(F,"geSprite-orthogonal",mxResources.get("pattern"),!1,mxUtils.bind(this,function(X){C(X,33,"solid",[mxConstants.STYLE_DASHED,
+mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));C(X,33,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed"));C(X,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");C(X,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+
+" (2)");C(X,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")}));u=B.cloneNode(!1);var D=document.createElement("input");D.style.position="absolute";D.style.textAlign="right";D.style.marginTop="2px";D.style.width="52px";D.style.height="21px";D.style.left="146px";D.style.border="1px solid rgb(160, 160, 160)";D.style.borderRadius="4px";D.style.boxSizing="border-box";D.setAttribute("title",mxResources.get("linewidth"));
+B.appendChild(D);var N=D.cloneNode(!0);F.appendChild(N);var S=this.createStepper(D,b,1,9);S.style.display=D.style.display;S.style.marginTop="2px";S.style.left="198px";B.appendChild(S);S=this.createStepper(N,f,1,9);S.style.display=N.style.display;S.style.marginTop="2px";N.style.position="absolute";S.style.left="198px";F.appendChild(S);mxEvent.addListener(D,"blur",b);mxEvent.addListener(D,"change",b);mxEvent.addListener(N,"blur",f);mxEvent.addListener(N,"change",f);var T=this.editorUi.toolbar.addMenuFunctionInContainer(u,
+"geSprite-orthogonal",mxResources.get("waypoints"),!1,mxUtils.bind(this,function(X){"arrow"!=d.style.shape&&(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],"geIcon geSprite geSprite-straight",null,!0).setAttribute("title",mxResources.get("straight")),this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle",null,null],"geIcon geSprite geSprite-orthogonal",
+null,!0).setAttribute("title",mxResources.get("orthogonal")),this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalelbow",null,!0).setAttribute("title",mxResources.get("simple")),this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",
+"vertical",null,null],"geIcon geSprite geSprite-verticalelbow",null,!0).setAttribute("title",mxResources.get("simple")),this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalisometric",null,!0).setAttribute("title",mxResources.get("isometric")),this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,
+mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalisometric",null,!0).setAttribute("title",mxResources.get("isometric")),"connector"==d.style.shape&&this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle","1",null],"geIcon geSprite geSprite-curved",null,!0).setAttribute("title",mxResources.get("curved")),this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_EDGE,
+mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["entityRelationEdgeStyle",null,null],"geIcon geSprite geSprite-entity",null,!0).setAttribute("title",mxResources.get("entityRelation")))})),P=this.editorUi.toolbar.addMenuFunctionInContainer(u,"geSprite-startclassic",mxResources.get("linestart"),!1,mxUtils.bind(this,function(X){if("connector"==d.style.shape||"flexArrow"==d.style.shape||"filledEdge"==d.style.shape){var ca=this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW,
+"startFill"],[mxConstants.NONE,0],"geIcon",null,!1);ca.setAttribute("title",mxResources.get("none"));var oa=document.createElement("font");oa.style.fontSize="10px";mxUtils.write(oa,mxResources.get("none"));ca.firstChild.firstChild.appendChild(oa);"connector"==d.style.shape||"filledEdge"==d.style.shape?(Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC,1],null,null,!1,Format.classicFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,
+"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC_THIN,1],null,null,!1,Format.classicThinFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OPEN,0],null,null,!1,Format.openFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OPEN_THIN,0],null,null,!1,Format.openThinFilledMarkerImage.src)),
+Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW,"startFill"],["openAsync",0],null,null,!1,Format.openAsyncFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK,1],null,null,!1,Format.blockFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK_THIN,1],null,
+null,!1,Format.blockThinFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW,"startFill"],["async",1],null,null,!1,Format.asyncFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OVAL,1],null,null,!1,Format.ovalFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW,"startFill"],
+[mxConstants.ARROW_DIAMOND,1],null,null,!1,Format.diamondFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_DIAMOND_THIN,1],null,null,!1,Format.diamondThinFilledMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC,0],null,null,!1,Format.classicMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,
+"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC_THIN,0],null,null,!1,Format.classicThinMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK,0],null,null,!1,Format.blockMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK_THIN,0],null,null,!1,Format.blockThinMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,
+"",[mxConstants.STYLE_STARTARROW,"startFill"],["async",0],null,null,!1,Format.asyncMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OVAL,0],null,null,!1,Format.ovalMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_DIAMOND,0],null,null,!1,Format.diamondMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,
+"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_DIAMOND_THIN,0],null,null,!1,Format.diamondThinMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW,"startFill"],["box",0],null,null,!1,Format.boxMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW,"startFill"],["halfCircle",0],null,null,!1,Format.halfCircleMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,
+"",[mxConstants.STYLE_STARTARROW,"startFill"],["dash",0],null,null,!1,Format.dashMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW,"startFill"],["cross",0],null,null,!1,Format.crossMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW,"startFill"],["circlePlus",0],null,null,!1,Format.circlePlusMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW,
+"startFill"],["circle",1],null,null,!1,Format.circleMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW,"startFill"],["baseDash",0],null,null,!1,Format.baseDashMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERone",0],null,null,!1,Format.EROneMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW,"startFill"],
+["ERmandOne",0],null,null,!1,Format.ERmandOneMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERmany",0],null,null,!1,Format.ERmanyMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERoneToMany",0],null,null,!1,Format.ERoneToManyMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW,"startFill"],
+["ERzeroToOne",0],null,null,!1,Format.ERzeroToOneMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERzeroToMany",0],null,null,!1,Format.ERzeroToManyMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW,"startFill"],["doubleBlock",0],null,null,!1,Format.doubleBlockMarkerImage.src)),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW,
+"startFill"],["doubleBlock",1],null,null,!1,Format.doubleBlockFilledMarkerImage.src))):this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_STARTARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-startblocktrans",null,!1).setAttribute("title",mxResources.get("block"));X.div.style.width="40px";window.setTimeout(mxUtils.bind(this,function(){null!=X.div&&mxUtils.fit(X.div)}),0)}})),Z=this.editorUi.toolbar.addMenuFunctionInContainer(u,"geSprite-endclassic",mxResources.get("lineend"),!1,
+mxUtils.bind(this,function(X){if("connector"==d.style.shape||"flexArrow"==d.style.shape||"filledEdge"==d.style.shape){var ca=this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.NONE,0],"geIcon",null,!1);ca.setAttribute("title",mxResources.get("none"));var oa=document.createElement("font");oa.style.fontSize="10px";mxUtils.write(oa,mxResources.get("none"));ca.firstChild.firstChild.appendChild(oa);"connector"==d.style.shape||"filledEdge"==d.style.shape?(Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,
+"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC,1],null,null,!1,Format.classicFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC_THIN,1],null,null,!1,Format.classicThinFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OPEN,0],null,null,!1,Format.openFilledMarkerImage.src),
+"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OPEN_THIN,0],null,null,!1,Format.openThinFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],["openAsync",0],null,null,!1,Format.openAsyncFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],
+[mxConstants.ARROW_BLOCK,1],null,null,!1,Format.blockFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_BLOCK_THIN,1],null,null,!1,Format.blockThinFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],["async",1],null,null,!1,Format.asyncFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,
+"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OVAL,1],null,null,!1,Format.ovalFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND,1],null,null,!1,Format.diamondFilledMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND_THIN,1],null,null,!1,Format.diamondThinFilledMarkerImage.src),
+"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC,0],null,null,!1,Format.classicMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC_THIN,0],null,null,!1,Format.classicThinMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],
+[mxConstants.ARROW_BLOCK,0],null,null,!1,Format.blockMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_BLOCK_THIN,0],null,null,!1,Format.blockThinMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],["async",0],null,null,!1,Format.asyncMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,
+"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OVAL,0],null,null,!1,Format.ovalMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND,0],null,null,!1,Format.diamondMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_DIAMOND_THIN,0],null,null,!1,Format.diamondThinMarkerImage.src),
+"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],["box",0],null,null,!1,Format.boxMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],["halfCircle",0],null,null,!1,Format.halfCircleMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],["dash",0],null,null,!1,Format.dashMarkerImage.src),
+"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],["cross",0],null,null,!1,Format.crossMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],["circlePlus",0],null,null,!1,Format.circlePlusMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],["circle",0],null,null,!1,Format.circleMarkerImage.src),
+"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],["baseDash",0],null,null,!1,Format.baseDashMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERone",0],null,null,!1,Format.EROneMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmandOne",0],null,null,!1,Format.ERmandOneMarkerImage.src),
+"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmany",0],null,null,!1,Format.ERmanyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERoneToMany",0],null,null,!1,Format.ERoneToManyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToOne",0],null,null,
+!1,Format.ERzeroToOneMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToMany",0],null,null,!1,Format.ERzeroToManyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,"endFill"],["doubleBlock",0],null,null,!1,Format.doubleBlockMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW,
+"endFill"],["doubleBlock",1],null,null,!1,Format.doubleBlockFilledMarkerImage.src),"scaleX(-1)")):this.editorUi.menus.edgeStyleChange(X,"",[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-endblocktrans",null,!1).setAttribute("title",mxResources.get("block"));X.div.style.width="40px";window.setTimeout(mxUtils.bind(this,function(){null!=X.div&&mxUtils.fit(X.div)}),0)}}));S=this.addArrow(J,8);S.nextSibling.style.position="relative";S.nextSibling.style.top="-2px";S=this.addArrow(T,
+10);S.nextSibling.style.position="relative";S.nextSibling.style.top="-3px";T.getElementsByTagName("img")[0].style.top="-1px";this.addArrow(P,null,!0);this.addArrow(Z,null,!0);S=this.addArrow(m,9);S.className="geIcon";S.style.width="auto";var U=this.addArrow(r,9);U.className="geIcon";U.style.width="22px";var V=document.createElement("div");V.style.width="84px";V.style.height="1px";V.style.borderBottom="1px solid "+this.defaultStrokeColor;V.style.marginBottom="7px";S.appendChild(V);var aa=document.createElement("div");
+aa.style.width="23px";aa.style.height="1px";aa.style.borderBottom="1px solid "+this.defaultStrokeColor;aa.style.marginBottom="7px";U.appendChild(aa);m.style.height="15px";m.style.marginLeft="16px";r.style.height="15px";r.style.marginLeft="3px";J.style.marginLeft="10px";J.style.height="15px";T.style.marginLeft="10px";T.style.height="17px";P.style.marginLeft="3px";P.style.height="17px";Z.style.marginLeft="3px";Z.style.height="17px";a.appendChild(k);a.appendChild(F);a.appendChild(B);m=B.cloneNode(!1);
+m.style.padding="5px 4px 6px 0px";m.style.fontWeight="normal";r=document.createElement("div");r.style.position="absolute";r.style.marginLeft="0px";r.style.marginBottom="12px";r.style.marginTop="2px";r.style.fontWeight="normal";r.style.width="76px";mxUtils.write(r,mxResources.get("lineend"));m.appendChild(r);var ia=this.addUnitInput(m,"pt",98,52,function(){la.apply(this,arguments)}),ea=this.addUnitInput(m,"pt",30,52,function(){ba.apply(this,arguments)});mxUtils.br(m);S=document.createElement("div");
+S.style.height="8px";m.appendChild(S);r=r.cloneNode(!1);mxUtils.write(r,mxResources.get("linestart"));m.appendChild(r);var qa=this.addUnitInput(m,"pt",98,52,function(){Q.apply(this,arguments)}),O=this.addUnitInput(m,"pt",30,52,function(){K.apply(this,arguments)});mxUtils.br(m);this.addLabel(m,mxResources.get("spacing"),98,52);this.addLabel(m,mxResources.get("size"),30,52);mxUtils.br(m);k=k.cloneNode(!1);k.style.fontWeight="normal";k.style.position="relative";k.style.paddingLeft="16px";k.style.marginBottom=
+"2px";k.style.marginTop="6px";k.style.borderWidth="0px";k.style.paddingBottom="18px";r=document.createElement("div");r.style.position="absolute";r.style.marginLeft="3px";r.style.marginBottom="12px";r.style.marginTop="1px";r.style.fontWeight="normal";r.style.width="120px";mxUtils.write(r,mxResources.get("perimeter"));k.appendChild(r);var R=this.addUnitInput(k,"pt",30,52,function(){ra.apply(this,arguments)});d.edges.length==d.cells.length?(a.appendChild(u),a.appendChild(m)):d.vertices.length==d.cells.length&&
+a.appendChild(k);var G=mxUtils.bind(this,function(X,ca,oa){function ta(Ka,Ha,va,Ca){va=va.getElementsByTagName("div")[0];null!=va&&e.updateCssForMarker(va,Ca,d.style.shape,Ka,Ha);return va}d=e.getSelectionState();if(oa||document.activeElement!=D)X=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_STROKEWIDTH,1)),D.value=isNaN(X)?"":X+" pt";if(oa||document.activeElement!=N)X=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_STROKEWIDTH,1)),N.value=isNaN(X)?"":X+" pt";n.style.visibility="connector"==
+d.style.shape||"filledEdge"==d.style.shape?"":"hidden";"1"==mxUtils.getValue(d.style,mxConstants.STYLE_CURVED,null)?n.value="curved":"1"==mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,null)&&(n.value="rounded");"1"==mxUtils.getValue(d.style,mxConstants.STYLE_DASHED,null)?null==mxUtils.getValue(d.style,mxConstants.STYLE_DASH_PATTERN,null)?V.style.borderBottom="1px dashed "+this.defaultStrokeColor:V.style.borderBottom="1px dotted "+this.defaultStrokeColor:V.style.borderBottom="1px solid "+this.defaultStrokeColor;
+aa.style.borderBottom=V.style.borderBottom;X=T.getElementsByTagName("div")[0];null!=X&&(ca=mxUtils.getValue(d.style,mxConstants.STYLE_EDGE,null),"1"==mxUtils.getValue(d.style,mxConstants.STYLE_NOEDGESTYLE,null)&&(ca=null),"orthogonalEdgeStyle"==ca&&"1"==mxUtils.getValue(d.style,mxConstants.STYLE_CURVED,null)?X.className="geSprite geSprite-curved":X.className="straight"==ca||"none"==ca||null==ca?"geSprite geSprite-straight":"entityRelationEdgeStyle"==ca?"geSprite geSprite-entity":"elbowEdgeStyle"==
+ca?"geSprite "+("vertical"==mxUtils.getValue(d.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalelbow":"geSprite-horizontalelbow"):"isometricEdgeStyle"==ca?"geSprite "+("vertical"==mxUtils.getValue(d.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalisometric":"geSprite-horizontalisometric"):"geSprite geSprite-orthogonal");X=J.getElementsByTagName("div")[0];null!=X&&(X.className="link"==d.style.shape?"geSprite geSprite-linkedge":"flexArrow"==d.style.shape?"geSprite geSprite-arrow":"arrow"==
+d.style.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection");d.edges.length==d.cells.length?(F.style.display="",B.style.display="none"):(F.style.display="none",B.style.display="");Graph.lineJumpsEnabled&&0<d.edges.length&&0==d.vertices.length&&d.lineJumps&&(a.style.borderBottomStyle="none");X=ta(mxUtils.getValue(d.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(d.style,"startFill","1"),P,"start");ca=ta(mxUtils.getValue(d.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(d.style,
+"endFill","1"),Z,"end");null!=X&&null!=ca&&("arrow"==d.style.shape?(X.className="geSprite geSprite-noarrow",ca.className="geSprite geSprite-endblocktrans"):"link"==d.style.shape&&(X.className="geSprite geSprite-noarrow",ca.className="geSprite geSprite-noarrow"));mxUtils.setOpacity(T,"arrow"==d.style.shape?30:100);"connector"!=d.style.shape&&"flexArrow"!=d.style.shape&&"filledEdge"!=d.style.shape?(mxUtils.setOpacity(P,30),mxUtils.setOpacity(Z,30)):(mxUtils.setOpacity(P,100),mxUtils.setOpacity(Z,100));
+if(oa||document.activeElement!=O)X=parseInt(mxUtils.getValue(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),O.value=isNaN(X)?"":X+" pt";if(oa||document.activeElement!=qa)X=parseInt(mxUtils.getValue(d.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),qa.value=isNaN(X)?"":X+" pt";if(oa||document.activeElement!=ea)X=parseInt(mxUtils.getValue(d.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),ea.value=isNaN(X)?"":X+" pt";if(oa||document.activeElement!=qa)X=parseInt(mxUtils.getValue(d.style,
+mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),ia.value=isNaN(X)?"":X+" pt";if(oa||document.activeElement!=R)X=parseInt(mxUtils.getValue(d.style,mxConstants.STYLE_PERIMETER_SPACING,0)),R.value=isNaN(X)?"":X+" pt"});var K=this.installInputHandler(O,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");var Q=this.installInputHandler(qa,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");var ba=this.installInputHandler(ea,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,
+0,999," pt");var la=this.installInputHandler(ia,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0,-999,999," pt");var ra=this.installInputHandler(R,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(D,G);this.addKeyHandler(O,G);this.addKeyHandler(qa,G);this.addKeyHandler(ea,G);this.addKeyHandler(ia,G);this.addKeyHandler(R,G);g.getModel().addListener(mxEvent.CHANGE,G);this.listeners.push({destroy:function(){g.getModel().removeListener(G)}});G();return a};
+StyleFormatPanel.prototype.addLineJumps=function(a){var b=this.editorUi,f=b.editor.graph,e=b.getSelectionState();if(Graph.lineJumpsEnabled&&0<e.edges.length&&0==e.vertices.length&&e.lineJumps){a.style.padding="2px 0px 24px 14px";var g=document.createElement("div");g.style.position="absolute";g.style.maxWidth="82px";g.style.overflow="hidden";g.style.textOverflow="ellipsis";mxUtils.write(g,mxResources.get("lineJumps"));a.appendChild(g);var d=document.createElement("select");d.style.position="absolute";
+d.style.height="21px";d.style.padding="0px";d.style.marginTop="-2px";d.style.boxSizing="border-box";d.style.right="76px";d.style.width="54px";d.style.border="1px solid rgb(160, 160, 160)";d.style.borderRadius="4px";g=["none","arc","gap","sharp","line"];for(var k=0;k<g.length;k++){var n=document.createElement("option");n.setAttribute("value",g[k]);mxUtils.write(n,mxResources.get(g[k]));d.appendChild(n)}mxEvent.addListener(d,"change",function(x){f.getModel().beginUpdate();try{f.setCellStyles("jumpStyle",
+d.value,e.cells),b.fireEvent(new mxEventObject("styleChanged","keys",["jumpStyle"],"values",[d.value],"cells",e.cells))}finally{f.getModel().endUpdate()}mxEvent.consume(x)});mxEvent.addListener(d,"click",function(x){mxEvent.consume(x)});a.appendChild(d);var u=this.addUnitInput(a,"pt",16,42,function(){m.apply(this,arguments)});var m=this.installInputHandler(u,"jumpSize",Graph.defaultJumpSize,0,999," pt");var r=mxUtils.bind(this,function(x,B,C){e=b.getSelectionState();d.value=mxUtils.getValue(e.style,
+"jumpStyle","none");if(C||document.activeElement!=u)x=parseInt(mxUtils.getValue(e.style,"jumpSize",Graph.defaultJumpSize)),u.value=isNaN(x)?"":x+" pt"});this.addKeyHandler(u,r);f.getModel().addListener(mxEvent.CHANGE,r);this.listeners.push({destroy:function(){f.getModel().removeListener(r)}});r()}else a.style.display="none";return a};
+StyleFormatPanel.prototype.addEffects=function(a){var b=this.editorUi,f=b.editor.graph,e=b.getSelectionState();a.style.paddingTop="4px";a.style.paddingBottom="0px";var g=document.createElement("table");g.style.width="210px";g.style.fontWeight="bold";g.style.tableLayout="fixed";var d=document.createElement("tbody"),k=document.createElement("tr");k.style.padding="0px";var n=document.createElement("td");n.style.padding="0px";n.style.width="50%";n.setAttribute("valign","top");var u=n.cloneNode(!0);u.style.paddingLeft=
+"8px";k.appendChild(n);k.appendChild(u);d.appendChild(k);g.appendChild(d);a.appendChild(g);var m=n,r=0,x=mxUtils.bind(this,function(C,F,J){C=this.createCellOption(C,F,J);C.style.width="100%";m.appendChild(C);m=m==n?u:n;r++}),B=mxUtils.bind(this,function(C,F,J){e=b.getSelectionState();n.innerText="";u.innerText="";m=n;e.rounded&&x(mxResources.get("rounded"),mxConstants.STYLE_ROUNDED,0);e.swimlane&&x(mxResources.get("divider"),"swimlaneLine",1);e.containsImage||x(mxResources.get("shadow"),mxConstants.STYLE_SHADOW,
+0);e.glass&&x(mxResources.get("glass"),mxConstants.STYLE_GLASS,0);x(mxResources.get("sketch"),"sketch",0)});f.getModel().addListener(mxEvent.CHANGE,B);this.listeners.push({destroy:function(){f.getModel().removeListener(B)}});B();return a};StyleFormatPanel.prototype.addStyleOps=function(a){a.style.paddingTop="10px";a.style.paddingBottom="10px";this.addActions(a,["setAsDefaultStyle"]);return a};DiagramStylePanel=function(a,b,f){BaseFormatPanel.call(this,a,b,f);this.init()};
mxUtils.extend(DiagramStylePanel,BaseFormatPanel);DiagramStylePanel.prototype.init=function(){var a=this.editorUi;this.darkModeChangedListener=mxUtils.bind(this,function(){this.format.cachedStyleEntries=[]});a.addListener("darkModeChanged",this.darkModeChangedListener);this.container.appendChild(this.addView(this.createPanel()))};
-DiagramStylePanel.prototype.addView=function(a){var b=this.editorUi,f=b.editor.graph,d=f.getModel(),g=f.view.gridColor;a.style.whiteSpace="normal";var e="1"==f.currentVertexStyle.sketch&&"1"==f.currentEdgeStyle.sketch,k="1"==f.currentVertexStyle.rounded,n="1"==f.currentEdgeStyle.curved,u=document.createElement("div");u.style.marginRight="16px";a.style.paddingTop="8px";var m=document.createElement("table");m.style.width="210px";m.style.fontWeight="bold";var r=document.createElement("tbody"),x=document.createElement("tr");
-x.style.padding="0px";var B=document.createElement("td");B.style.padding="0px";B.style.width="50%";B.setAttribute("valign","middle");var C=B.cloneNode(!0);C.style.paddingLeft="8px";"1"!=urlParams.sketch&&(u.style.paddingBottom="12px",x.appendChild(B),B.appendChild(this.createOption(mxResources.get("sketch"),function(){return e},function(ba){(e=ba)?(f.currentEdgeStyle.sketch="1",f.currentVertexStyle.sketch="1"):(delete f.currentEdgeStyle.sketch,delete f.currentVertexStyle.sketch);f.updateCellStyles({sketch:ba?
-"1":null},f.getVerticesAndEdges())},null,function(ba){ba.style.width="auto"})));x.appendChild(C);r.appendChild(x);m.appendChild(r);C.appendChild(this.createOption(mxResources.get("rounded"),function(){return k},function(ba){(k=ba)?(f.currentEdgeStyle.rounded="1",f.currentVertexStyle.rounded="1"):(delete f.currentEdgeStyle.rounded,delete f.currentVertexStyle.rounded);f.updateCellStyles({rounded:ba?"1":"0"},f.getVerticesAndEdges())},null,function(ba){ba.style.width="auto"}));"1"!=urlParams.sketch&&
-(B=B.cloneNode(!1),C=C.cloneNode(!1),x=x.cloneNode(!1),x.appendChild(B),x.appendChild(C),r.appendChild(x),B.appendChild(this.createOption(mxResources.get("curved"),function(){return n},function(ba){(n=ba)?f.currentEdgeStyle.curved="1":delete f.currentEdgeStyle.curved;f.updateCellStyles({curved:ba?"1":null},f.getVerticesAndEdges(!1,!0))},null,function(ba){ba.style.width="auto"})));u.appendChild(m);a.appendChild(u);var G=["fillColor","strokeColor","fontColor","gradientColor"],J=mxUtils.bind(this,function(ba,
-qa){var O=f.getVerticesAndEdges();d.beginUpdate();try{for(var S=0;S<O.length;S++){var F=f.getCellStyle(O[S]);null!=F.labelBackgroundColor&&f.updateCellStyles({labelBackgroundColor:null!=qa?qa.background:null},[O[S]]);for(var L=d.isEdge(O[S]),T=d.getStyle(O[S]),ca=L?f.currentEdgeStyle:f.currentVertexStyle,fa=0;fa<ba.length;fa++)if(null!=F[ba[fa]]&&F[ba[fa]]!=mxConstants.NONE||ba[fa]!=mxConstants.STYLE_FILLCOLOR&&ba[fa]!=mxConstants.STYLE_STROKECOLOR)T=mxUtils.setStyle(T,ba[fa],ca[ba[fa]]);d.setStyle(O[S],
-T)}}finally{d.endUpdate()}}),D=mxUtils.bind(this,function(ba,qa,O){if(null!=ba)for(var S=0;S<qa.length;S++)if(null!=ba[qa[S]]&&ba[qa[S]]!=mxConstants.NONE||qa[S]!=mxConstants.STYLE_FILLCOLOR&&qa[S]!=mxConstants.STYLE_STROKECOLOR)ba[qa[S]]=O[qa[S]]}),N=mxUtils.bind(this,function(ba,qa,O,S,F){if(null!=ba){null!=O&&null!=qa.labelBackgroundColor&&(S=null!=S?S.background:null,F=null!=F?F:f,null==S&&(S=F.background),null==S&&(S=F.defaultPageBackgroundColor),qa.labelBackgroundColor=S);for(var L in ba)if(null==
-O||null!=qa[L]&&qa[L]!=mxConstants.NONE||L!=mxConstants.STYLE_FILLCOLOR&&L!=mxConstants.STYLE_STROKECOLOR)qa[L]=ba[L]}});"1"!=urlParams.sketch&&(B=mxUtils.button(mxResources.get("reset"),mxUtils.bind(this,function(ba){ba=f.getVerticesAndEdges(!0,!0);if(0<ba.length){d.beginUpdate();try{f.updateCellStyles({sketch:null,rounded:null},ba),f.updateCellStyles({curved:null},f.getVerticesAndEdges(!1,!0))}finally{d.endUpdate()}}b.clearDefaultStyle()})),B.setAttribute("title",mxResources.get("reset")),B.style.textOverflow=
-"ellipsis",B.style.maxWidth="90px",C.appendChild(B));var Q=mxUtils.bind(this,function(ba,qa,O,S,F){var L=document.createElement("div");L.style.position="absolute";L.style.display="inline-block";L.style.overflow="hidden";L.style.pointerEvents="none";L.style.width="100%";L.style.height="100%";F.appendChild(L);var T=new Graph(L,null,null,f.getStylesheet());T.resetViewOnRootChange=!1;T.foldingEnabled=!1;T.gridEnabled=!1;T.autoScroll=!1;T.setTooltips(!1);T.setConnectable(!1);T.setPanning(!1);T.setEnabled(!1);
-T.getCellStyle=function(wa,W){W=null!=W?W:!0;var aa=mxUtils.clone(f.getCellStyle.apply(this,arguments)),oa=f.stylesheet.getDefaultVertexStyle(),sa=qa;d.isEdge(wa)&&(oa=f.stylesheet.getDefaultEdgeStyle(),sa=O);D(aa,G,oa);N(ba,aa,wa,S,T);N(sa,aa,wa,S,T);W&&(aa=f.postProcessCellStyle(wa,aa));return aa};T.model.beginUpdate();try{var ca=T.insertVertex(T.getDefaultParent(),null,"Shape",14,8,70,40,"strokeWidth=2;"),fa=T.insertEdge(T.getDefaultParent(),null,"Connector",ca,ca,"edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;endSize=5;strokeWidth=2;");
-fa.geometry.points=[new mxPoint(32,70)];fa.geometry.offset=new mxPoint(0,8)}finally{T.model.endUpdate()}}),R=document.createElement("div");R.style.position="relative";a.appendChild(R);null==this.format.cachedStyleEntries&&(this.format.cachedStyleEntries=[]);var P=mxUtils.bind(this,function(ba,qa,O,S,F){var L=this.format.cachedStyleEntries[F];null==L&&(L=document.createElement("div"),L.style.display="inline-block",L.style.position="relative",L.style.width="96px",L.style.height="90px",L.style.cursor=
-"pointer",L.style.border="1px solid gray",L.style.borderRadius="8px",L.style.margin="2px",L.style.overflow="hidden",null!=S&&null!=S.background&&(L.style.backgroundColor=S.background),Q(ba,qa,O,S,L),mxEvent.addGestureListeners(L,mxUtils.bind(this,function(T){L.style.opacity=.5}),null,mxUtils.bind(this,function(T){L.style.opacity=1;f.currentVertexStyle=mxUtils.clone(f.defaultVertexStyle);f.currentEdgeStyle=mxUtils.clone(f.defaultEdgeStyle);N(ba,f.currentVertexStyle);N(ba,f.currentEdgeStyle);N(qa,f.currentVertexStyle);
-N(O,f.currentEdgeStyle);"1"==urlParams.sketch&&(e=Editor.sketchMode);e?(f.currentEdgeStyle.sketch="1",f.currentVertexStyle.sketch="1"):(f.currentEdgeStyle.sketch="0",f.currentVertexStyle.sketch="0");f.currentVertexStyle.rounded=k?"1":"0";f.currentEdgeStyle.rounded="1";f.currentEdgeStyle.curved=n?"1":"0";d.beginUpdate();try{var ca=G.slice(),fa;for(fa in ba)ca.push(fa);J(ca,S);var wa=new ChangePageSetup(b,null!=S?S.background:null);wa.ignoreImage=!0;d.execute(wa);d.execute(new ChangeGridColor(b,null!=
-S&&null!=S.gridColor?S.gridColor:g))}finally{d.endUpdate()}})),mxEvent.addListener(L,"mouseenter",mxUtils.bind(this,function(T){var ca=f.getCellStyle;T=f.background;var fa=f.view.gridColor;f.background=null!=S?S.background:null;f.view.gridColor=null!=S&&null!=S.gridColor?S.gridColor:g;f.getCellStyle=function(wa,W){W=null!=W?W:!0;var aa=mxUtils.clone(ca.apply(this,arguments)),oa=f.stylesheet.getDefaultVertexStyle(),sa=qa;d.isEdge(wa)&&(oa=f.stylesheet.getDefaultEdgeStyle(),sa=O);D(aa,G,oa);N(ba,aa,
-wa,S);N(sa,aa,wa,S);W&&(aa=this.postProcessCellStyle(wa,aa));return aa};f.refresh();f.getCellStyle=ca;f.background=T;f.view.gridColor=fa})),mxEvent.addListener(L,"mouseleave",mxUtils.bind(this,function(T){f.refresh()})),mxClient.IS_IE||mxClient.IS_IE11||(this.format.cachedStyleEntries[F]=L));R.appendChild(L)}),Z=Math.ceil(Editor.styles.length/10);this.format.currentStylePage=null!=this.format.currentStylePage?this.format.currentStylePage:0;var U=[],V=mxUtils.bind(this,function(){0<U.length&&(U[this.format.currentStylePage].style.background=
-"#84d7ff");for(var ba=10*this.format.currentStylePage;ba<Math.min(10*(this.format.currentStylePage+1),Editor.styles.length);ba++){var qa=Editor.styles[ba];P(qa.commonStyle,qa.vertexStyle,qa.edgeStyle,qa.graph,ba)}}),ia=mxUtils.bind(this,function(ba){0<=ba&&ba<Z&&(U[this.format.currentStylePage].style.background="transparent",R.innerText="",this.format.currentStylePage=ba,V())});if(1<Z){u=document.createElement("div");u.style.whiteSpace="nowrap";u.style.position="relative";u.style.textAlign="center";
-u.style.paddingTop="4px";u.style.width="210px";a.style.paddingBottom="8px";for(C=0;C<Z;C++){var ha=document.createElement("div");ha.style.display="inline-block";ha.style.width="6px";ha.style.height="6px";ha.style.marginLeft="4px";ha.style.marginRight="3px";ha.style.borderRadius="3px";ha.style.cursor="pointer";ha.style.background="transparent";ha.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(ba,qa){mxEvent.addListener(ha,"click",mxUtils.bind(this,function(){ia(ba)}))})(C,ha);u.appendChild(ha);
-U.push(ha)}a.appendChild(u);V();15>Z&&(m=function(ba){mxEvent.addListener(ba,"mouseenter",function(){ba.style.opacity="1"});mxEvent.addListener(ba,"mouseleave",function(){ba.style.opacity="0.5"})},B=document.createElement("div"),B.style.position="absolute",B.style.left="0px",B.style.top="0px",B.style.bottom="0px",B.style.width="24px",B.style.height="24px",B.style.margin="0px",B.style.cursor="pointer",B.style.opacity="0.5",B.style.backgroundRepeat="no-repeat",B.style.backgroundPosition="center center",
-B.style.backgroundSize="24px 24px",B.style.backgroundImage="url("+Editor.previousImage+")",Editor.isDarkMode()&&(B.style.filter="invert(100%)"),C=B.cloneNode(!1),C.style.backgroundImage="url("+Editor.nextImage+")",C.style.left="",C.style.right="2px",u.appendChild(B),u.appendChild(C),mxEvent.addListener(B,"click",mxUtils.bind(this,function(){ia(mxUtils.mod(this.format.currentStylePage-1,Z))})),mxEvent.addListener(C,"click",mxUtils.bind(this,function(){ia(mxUtils.mod(this.format.currentStylePage+1,
+DiagramStylePanel.prototype.addView=function(a){var b=this.editorUi,f=b.editor.graph,e=f.getModel(),g=f.view.gridColor;a.style.whiteSpace="normal";var d="1"==f.currentVertexStyle.sketch&&"1"==f.currentEdgeStyle.sketch,k="1"==f.currentVertexStyle.rounded,n="1"==f.currentEdgeStyle.curved,u=document.createElement("div");u.style.marginRight="16px";a.style.paddingTop="8px";var m=document.createElement("table");m.style.width="210px";m.style.fontWeight="bold";var r=document.createElement("tbody"),x=document.createElement("tr");
+x.style.padding="0px";var B=document.createElement("td");B.style.padding="0px";B.style.width="50%";B.setAttribute("valign","middle");var C=B.cloneNode(!0);C.style.paddingLeft="8px";"1"!=urlParams.sketch&&(u.style.paddingBottom="12px",x.appendChild(B),B.appendChild(this.createOption(mxResources.get("sketch"),function(){return d},function(ea){(d=ea)?(f.currentEdgeStyle.sketch="1",f.currentVertexStyle.sketch="1"):(delete f.currentEdgeStyle.sketch,delete f.currentVertexStyle.sketch);f.updateCellStyles({sketch:ea?
+"1":null},f.getVerticesAndEdges())},null,function(ea){ea.style.width="auto"})));x.appendChild(C);r.appendChild(x);m.appendChild(r);C.appendChild(this.createOption(mxResources.get("rounded"),function(){return k},function(ea){(k=ea)?(f.currentEdgeStyle.rounded="1",f.currentVertexStyle.rounded="1"):(delete f.currentEdgeStyle.rounded,delete f.currentVertexStyle.rounded);f.updateCellStyles({rounded:ea?"1":"0"},f.getVerticesAndEdges())},null,function(ea){ea.style.width="auto"}));"1"!=urlParams.sketch&&
+(B=B.cloneNode(!1),C=C.cloneNode(!1),x=x.cloneNode(!1),x.appendChild(B),x.appendChild(C),r.appendChild(x),B.appendChild(this.createOption(mxResources.get("curved"),function(){return n},function(ea){(n=ea)?f.currentEdgeStyle.curved="1":delete f.currentEdgeStyle.curved;f.updateCellStyles({curved:ea?"1":null},f.getVerticesAndEdges(!1,!0))},null,function(ea){ea.style.width="auto"})));u.appendChild(m);a.appendChild(u);var F=["fillColor","strokeColor","fontColor","gradientColor"],J=mxUtils.bind(this,function(ea,
+qa){var O=f.getVerticesAndEdges();e.beginUpdate();try{for(var R=0;R<O.length;R++){var G=f.getCellStyle(O[R]);null!=G.labelBackgroundColor&&f.updateCellStyles({labelBackgroundColor:null!=qa?qa.background:null},[O[R]]);for(var K=e.isEdge(O[R]),Q=e.getStyle(O[R]),ba=K?f.currentEdgeStyle:f.currentVertexStyle,la=0;la<ea.length;la++)if(null!=G[ea[la]]&&G[ea[la]]!=mxConstants.NONE||ea[la]!=mxConstants.STYLE_FILLCOLOR&&ea[la]!=mxConstants.STYLE_STROKECOLOR)Q=mxUtils.setStyle(Q,ea[la],ba[ea[la]]);e.setStyle(O[R],
+Q)}}finally{e.endUpdate()}}),D=mxUtils.bind(this,function(ea,qa,O){if(null!=ea)for(var R=0;R<qa.length;R++)if(null!=ea[qa[R]]&&ea[qa[R]]!=mxConstants.NONE||qa[R]!=mxConstants.STYLE_FILLCOLOR&&qa[R]!=mxConstants.STYLE_STROKECOLOR)ea[qa[R]]=O[qa[R]]}),N=mxUtils.bind(this,function(ea,qa,O,R,G){if(null!=ea){null!=O&&null!=qa.labelBackgroundColor&&(R=null!=R?R.background:null,G=null!=G?G:f,null==R&&(R=G.background),null==R&&(R=G.defaultPageBackgroundColor),qa.labelBackgroundColor=R);for(var K in ea)if(null==
+O||null!=qa[K]&&qa[K]!=mxConstants.NONE||K!=mxConstants.STYLE_FILLCOLOR&&K!=mxConstants.STYLE_STROKECOLOR)qa[K]=ea[K]}});"1"!=urlParams.sketch&&(B=mxUtils.button(mxResources.get("reset"),mxUtils.bind(this,function(ea){ea=f.getVerticesAndEdges(!0,!0);if(0<ea.length){e.beginUpdate();try{f.updateCellStyles({sketch:null,rounded:null},ea),f.updateCellStyles({curved:null},f.getVerticesAndEdges(!1,!0))}finally{e.endUpdate()}}b.clearDefaultStyle()})),B.setAttribute("title",mxResources.get("reset")),B.style.textOverflow=
+"ellipsis",B.style.maxWidth="90px",C.appendChild(B));var S=mxUtils.bind(this,function(ea,qa,O,R,G){var K=document.createElement("div");K.style.position="absolute";K.style.display="inline-block";K.style.overflow="hidden";K.style.pointerEvents="none";K.style.width="100%";K.style.height="100%";G.appendChild(K);var Q=new Graph(K,null,null,f.getStylesheet());Q.resetViewOnRootChange=!1;Q.foldingEnabled=!1;Q.gridEnabled=!1;Q.autoScroll=!1;Q.setTooltips(!1);Q.setConnectable(!1);Q.setPanning(!1);Q.setEnabled(!1);
+Q.getCellStyle=function(ra,X){X=null!=X?X:!0;var ca=mxUtils.clone(f.getCellStyle.apply(this,arguments)),oa=f.stylesheet.getDefaultVertexStyle(),ta=qa;e.isEdge(ra)&&(oa=f.stylesheet.getDefaultEdgeStyle(),ta=O);D(ca,F,oa);N(ea,ca,ra,R,Q);N(ta,ca,ra,R,Q);X&&(ca=f.postProcessCellStyle(ra,ca));return ca};Q.model.beginUpdate();try{var ba=Q.insertVertex(Q.getDefaultParent(),null,"Shape",14,8,70,40,"strokeWidth=2;"),la=Q.insertEdge(Q.getDefaultParent(),null,"Connector",ba,ba,"edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;endSize=5;strokeWidth=2;");
+la.geometry.points=[new mxPoint(32,70)];la.geometry.offset=new mxPoint(0,8)}finally{Q.model.endUpdate()}}),T=document.createElement("div");T.style.position="relative";a.appendChild(T);null==this.format.cachedStyleEntries&&(this.format.cachedStyleEntries=[]);var P=mxUtils.bind(this,function(ea,qa,O,R,G){var K=this.format.cachedStyleEntries[G];null==K&&(K=document.createElement("div"),K.style.display="inline-block",K.style.position="relative",K.style.width="96px",K.style.height="90px",K.style.cursor=
+"pointer",K.style.border="1px solid gray",K.style.borderRadius="8px",K.style.margin="2px",K.style.overflow="hidden",null!=R&&null!=R.background&&(K.style.backgroundColor=R.background),S(ea,qa,O,R,K),mxEvent.addGestureListeners(K,mxUtils.bind(this,function(Q){K.style.opacity=.5}),null,mxUtils.bind(this,function(Q){K.style.opacity=1;f.currentVertexStyle=mxUtils.clone(f.defaultVertexStyle);f.currentEdgeStyle=mxUtils.clone(f.defaultEdgeStyle);N(ea,f.currentVertexStyle);N(ea,f.currentEdgeStyle);N(qa,f.currentVertexStyle);
+N(O,f.currentEdgeStyle);"1"==urlParams.sketch&&(d=Editor.sketchMode);d?(f.currentEdgeStyle.sketch="1",f.currentVertexStyle.sketch="1"):(f.currentEdgeStyle.sketch="0",f.currentVertexStyle.sketch="0");f.currentVertexStyle.rounded=k?"1":"0";f.currentEdgeStyle.rounded="1";f.currentEdgeStyle.curved=n?"1":"0";e.beginUpdate();try{var ba=F.slice(),la;for(la in ea)ba.push(la);J(ba,R);var ra=new ChangePageSetup(b,null!=R?R.background:null);ra.ignoreImage=!0;e.execute(ra);e.execute(new ChangeGridColor(b,null!=
+R&&null!=R.gridColor?R.gridColor:g))}finally{e.endUpdate()}})),mxEvent.addListener(K,"mouseenter",mxUtils.bind(this,function(Q){var ba=f.getCellStyle;Q=f.background;var la=f.view.gridColor;f.background=null!=R?R.background:null;f.view.gridColor=null!=R&&null!=R.gridColor?R.gridColor:g;f.getCellStyle=function(ra,X){X=null!=X?X:!0;var ca=mxUtils.clone(ba.apply(this,arguments)),oa=f.stylesheet.getDefaultVertexStyle(),ta=qa;e.isEdge(ra)&&(oa=f.stylesheet.getDefaultEdgeStyle(),ta=O);D(ca,F,oa);N(ea,ca,
+ra,R);N(ta,ca,ra,R);X&&(ca=this.postProcessCellStyle(ra,ca));return ca};f.refresh();f.getCellStyle=ba;f.background=Q;f.view.gridColor=la})),mxEvent.addListener(K,"mouseleave",mxUtils.bind(this,function(Q){f.refresh()})),mxClient.IS_IE||mxClient.IS_IE11||(this.format.cachedStyleEntries[G]=K));T.appendChild(K)}),Z=Math.ceil(Editor.styles.length/10);this.format.currentStylePage=null!=this.format.currentStylePage?this.format.currentStylePage:0;var U=[],V=mxUtils.bind(this,function(){0<U.length&&(U[this.format.currentStylePage].style.background=
+"#84d7ff");for(var ea=10*this.format.currentStylePage;ea<Math.min(10*(this.format.currentStylePage+1),Editor.styles.length);ea++){var qa=Editor.styles[ea];P(qa.commonStyle,qa.vertexStyle,qa.edgeStyle,qa.graph,ea)}}),aa=mxUtils.bind(this,function(ea){0<=ea&&ea<Z&&(U[this.format.currentStylePage].style.background="transparent",T.innerText="",this.format.currentStylePage=ea,V())});if(1<Z){u=document.createElement("div");u.style.whiteSpace="nowrap";u.style.position="relative";u.style.textAlign="center";
+u.style.paddingTop="4px";u.style.width="210px";a.style.paddingBottom="8px";for(C=0;C<Z;C++){var ia=document.createElement("div");ia.style.display="inline-block";ia.style.width="6px";ia.style.height="6px";ia.style.marginLeft="4px";ia.style.marginRight="3px";ia.style.borderRadius="3px";ia.style.cursor="pointer";ia.style.background="transparent";ia.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(ea,qa){mxEvent.addListener(ia,"click",mxUtils.bind(this,function(){aa(ea)}))})(C,ia);u.appendChild(ia);
+U.push(ia)}a.appendChild(u);V();15>Z&&(m=function(ea){mxEvent.addListener(ea,"mouseenter",function(){ea.style.opacity="1"});mxEvent.addListener(ea,"mouseleave",function(){ea.style.opacity="0.5"})},B=document.createElement("div"),B.style.position="absolute",B.style.left="0px",B.style.top="0px",B.style.bottom="0px",B.style.width="24px",B.style.height="24px",B.style.margin="0px",B.style.cursor="pointer",B.style.opacity="0.5",B.style.backgroundRepeat="no-repeat",B.style.backgroundPosition="center center",
+B.style.backgroundSize="24px 24px",B.style.backgroundImage="url("+Editor.previousImage+")",Editor.isDarkMode()&&(B.style.filter="invert(100%)"),C=B.cloneNode(!1),C.style.backgroundImage="url("+Editor.nextImage+")",C.style.left="",C.style.right="2px",u.appendChild(B),u.appendChild(C),mxEvent.addListener(B,"click",mxUtils.bind(this,function(){aa(mxUtils.mod(this.format.currentStylePage-1,Z))})),mxEvent.addListener(C,"click",mxUtils.bind(this,function(){aa(mxUtils.mod(this.format.currentStylePage+1,
Z))})),m(B),m(C))}else V();return a};DiagramStylePanel.prototype.destroy=function(){BaseFormatPanel.prototype.destroy.apply(this,arguments);this.darkModeChangedListener&&(this.editorUi.removeListener(this.darkModeChangedListener),this.darkModeChangedListener=null)};DiagramFormatPanel=function(a,b,f){BaseFormatPanel.call(this,a,b,f);this.init()};mxUtils.extend(DiagramFormatPanel,BaseFormatPanel);DiagramFormatPanel.showPageView=!0;DiagramFormatPanel.prototype.showBackgroundImageOption=!0;
DiagramFormatPanel.prototype.init=function(){var a=this.editorUi.editor.graph;this.container.appendChild(this.addView(this.createPanel()));a.isEnabled()&&(this.container.appendChild(this.addOptions(this.createPanel())),this.container.appendChild(this.addPaperSize(this.createPanel())),this.container.appendChild(this.addStyleOps(this.createPanel())))};
-DiagramFormatPanel.prototype.addView=function(a){var b=this.editorUi,f=b.editor.graph;a.appendChild(this.createTitle(mxResources.get("view")));this.addGridOption(a);DiagramFormatPanel.showPageView&&a.appendChild(this.createOption(mxResources.get("pageView"),function(){return f.pageVisible},function(e){b.actions.get("pageView").funct()},{install:function(e){this.listener=function(){e(f.pageVisible)};b.addListener("pageViewChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}}));
-if(f.isEnabled()){var d=this.createColorOption(mxResources.get("background"),function(){return f.background},function(e){var k=new ChangePageSetup(b,e);k.ignoreImage=null!=e&&e!=mxConstants.NONE;f.model.execute(k)},"#ffffff",{install:function(e){this.listener=function(){e(f.background)};b.addListener("backgroundColorChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}});if(this.showBackgroundImageOption){var g=d.getElementsByTagName("span")[0];g.style.display="inline-block";
-g.style.textOverflow="ellipsis";g.style.overflow="hidden";g.style.maxWidth="68px";mxClient.IS_FF&&(g.style.marginTop="1px");g=mxUtils.button(mxResources.get("change"),function(e){b.showBackgroundImageDialog(null,b.editor.graph.backgroundImage);mxEvent.consume(e)});g.className="geColorBtn";g.style.position="absolute";g.style.marginTop="-3px";g.style.height="22px";g.style.left="118px";g.style.width="56px";d.appendChild(g)}a.appendChild(d)}return a};
-DiagramFormatPanel.prototype.addOptions=function(a){var b=this.editorUi,f=b.editor.graph;a.appendChild(this.createTitle(mxResources.get("options")));f.isEnabled()&&(a.appendChild(this.createOption(mxResources.get("connectionArrows"),function(){return f.connectionArrowsEnabled},function(d){b.actions.get("connectionArrows").funct()},{install:function(d){this.listener=function(){d(f.connectionArrowsEnabled)};b.addListener("connectionArrowsChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}})),
-a.appendChild(this.createOption(mxResources.get("connectionPoints"),function(){return f.connectionHandler.isEnabled()},function(d){b.actions.get("connectionPoints").funct()},{install:function(d){this.listener=function(){d(f.connectionHandler.isEnabled())};b.addListener("connectionPointsChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}})),a.appendChild(this.createOption(mxResources.get("guides"),function(){return f.graphHandler.guidesEnabled},function(d){b.actions.get("guides").funct()},
-{install:function(d){this.listener=function(){d(f.graphHandler.guidesEnabled)};b.addListener("guidesEnabledChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}})));return a};
-DiagramFormatPanel.prototype.addGridOption=function(a){function b(u){var m=f.isFloatUnit()?parseFloat(e.value):parseInt(e.value);m=f.fromUnit(Math.max(f.inUnit(1),isNaN(m)?f.inUnit(10):m));m!=g.getGridSize()&&(mxGraph.prototype.gridSize=m,g.setGridSize(m));e.value=f.inUnit(m)+" "+f.getUnit();mxEvent.consume(u)}var f=this,d=this.editorUi,g=d.editor.graph,e=document.createElement("input");e.style.position="absolute";e.style.textAlign="right";e.style.width="48px";e.style.marginTop="-2px";e.style.height=
-"21px";e.style.border="1px solid rgb(160, 160, 160)";e.style.borderRadius="4px";e.style.boxSizing="border-box";e.value=this.inUnit(g.getGridSize())+" "+this.getUnit();var k=this.createStepper(e,b,this.getUnitStep(),null,null,null,this.isFloatUnit());e.style.display=g.isGridEnabled()?"":"none";k.style.display=e.style.display;mxEvent.addListener(e,"keydown",function(u){13==u.keyCode?(g.container.focus(),mxEvent.consume(u)):27==u.keyCode&&(e.value=g.getGridSize(),g.container.focus(),mxEvent.consume(u))});
-mxEvent.addListener(e,"blur",b);mxEvent.addListener(e,"change",b);e.style.right="78px";k.style.marginTop="-17px";k.style.right="66px";var n=this.createColorOption(mxResources.get("grid"),function(){var u=g.view.gridColor;return g.isGridEnabled()?u:null},function(u){var m=g.isGridEnabled();u==mxConstants.NONE?g.setGridEnabled(!1):(g.setGridEnabled(!0),d.setGridColor(u));e.style.display=g.isGridEnabled()?"":"none";k.style.display=e.style.display;m!=g.isGridEnabled()&&(g.defaultGridEnabled=g.isGridEnabled(),
-d.fireEvent(new mxEventObject("gridEnabledChanged")))},Editor.isDarkMode()?g.view.defaultDarkGridColor:g.view.defaultGridColor,{install:function(u){this.listener=function(){u(g.isGridEnabled()?g.view.gridColor:null)};d.addListener("gridColorChanged",this.listener);d.addListener("gridEnabledChanged",this.listener)},destroy:function(){d.removeListener(this.listener)}});n.appendChild(e);n.appendChild(k);a.appendChild(n)};
+DiagramFormatPanel.prototype.addView=function(a){var b=this.editorUi,f=b.editor.graph;a.appendChild(this.createTitle(mxResources.get("view")));this.addGridOption(a);DiagramFormatPanel.showPageView&&a.appendChild(this.createOption(mxResources.get("pageView"),function(){return f.pageVisible},function(d){b.actions.get("pageView").funct()},{install:function(d){this.listener=function(){d(f.pageVisible)};b.addListener("pageViewChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}}));
+if(f.isEnabled()){var e=this.createColorOption(mxResources.get("background"),function(){return f.background},function(d){var k=new ChangePageSetup(b,d);k.ignoreImage=null!=d&&d!=mxConstants.NONE;f.model.execute(k)},"#ffffff",{install:function(d){this.listener=function(){d(f.background)};b.addListener("backgroundColorChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}});if(this.showBackgroundImageOption){var g=e.getElementsByTagName("span")[0];g.style.display="inline-block";
+g.style.textOverflow="ellipsis";g.style.overflow="hidden";g.style.maxWidth="68px";mxClient.IS_FF&&(g.style.marginTop="1px");g=mxUtils.button(mxResources.get("change"),function(d){b.showBackgroundImageDialog(null,b.editor.graph.backgroundImage);mxEvent.consume(d)});g.className="geColorBtn";g.style.position="absolute";g.style.marginTop="-3px";g.style.height="22px";g.style.left="118px";g.style.width="56px";e.appendChild(g)}a.appendChild(e)}return a};
+DiagramFormatPanel.prototype.addOptions=function(a){var b=this.editorUi,f=b.editor.graph;a.appendChild(this.createTitle(mxResources.get("options")));f.isEnabled()&&(a.appendChild(this.createOption(mxResources.get("connectionArrows"),function(){return f.connectionArrowsEnabled},function(e){b.actions.get("connectionArrows").funct()},{install:function(e){this.listener=function(){e(f.connectionArrowsEnabled)};b.addListener("connectionArrowsChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}})),
+a.appendChild(this.createOption(mxResources.get("connectionPoints"),function(){return f.connectionHandler.isEnabled()},function(e){b.actions.get("connectionPoints").funct()},{install:function(e){this.listener=function(){e(f.connectionHandler.isEnabled())};b.addListener("connectionPointsChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}})),a.appendChild(this.createOption(mxResources.get("guides"),function(){return f.graphHandler.guidesEnabled},function(e){b.actions.get("guides").funct()},
+{install:function(e){this.listener=function(){e(f.graphHandler.guidesEnabled)};b.addListener("guidesEnabledChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}})));return a};
+DiagramFormatPanel.prototype.addGridOption=function(a){function b(u){var m=f.isFloatUnit()?parseFloat(d.value):parseInt(d.value);m=f.fromUnit(Math.max(f.inUnit(1),isNaN(m)?f.inUnit(10):m));m!=g.getGridSize()&&(mxGraph.prototype.gridSize=m,g.setGridSize(m));d.value=f.inUnit(m)+" "+f.getUnit();mxEvent.consume(u)}var f=this,e=this.editorUi,g=e.editor.graph,d=document.createElement("input");d.style.position="absolute";d.style.textAlign="right";d.style.width="48px";d.style.marginTop="-2px";d.style.height=
+"21px";d.style.border="1px solid rgb(160, 160, 160)";d.style.borderRadius="4px";d.style.boxSizing="border-box";d.value=this.inUnit(g.getGridSize())+" "+this.getUnit();var k=this.createStepper(d,b,this.getUnitStep(),null,null,null,this.isFloatUnit());d.style.display=g.isGridEnabled()?"":"none";k.style.display=d.style.display;mxEvent.addListener(d,"keydown",function(u){13==u.keyCode?(g.container.focus(),mxEvent.consume(u)):27==u.keyCode&&(d.value=g.getGridSize(),g.container.focus(),mxEvent.consume(u))});
+mxEvent.addListener(d,"blur",b);mxEvent.addListener(d,"change",b);d.style.right="78px";k.style.marginTop="-17px";k.style.right="66px";var n=this.createColorOption(mxResources.get("grid"),function(){var u=g.view.gridColor;return g.isGridEnabled()?u:null},function(u){var m=g.isGridEnabled();u==mxConstants.NONE?g.setGridEnabled(!1):(g.setGridEnabled(!0),e.setGridColor(u));d.style.display=g.isGridEnabled()?"":"none";k.style.display=d.style.display;m!=g.isGridEnabled()&&(g.defaultGridEnabled=g.isGridEnabled(),
+e.fireEvent(new mxEventObject("gridEnabledChanged")))},Editor.isDarkMode()?g.view.defaultDarkGridColor:g.view.defaultGridColor,{install:function(u){this.listener=function(){u(g.isGridEnabled()?g.view.gridColor:null)};e.addListener("gridColorChanged",this.listener);e.addListener("gridEnabledChanged",this.listener)},destroy:function(){e.removeListener(this.listener)}});n.appendChild(d);n.appendChild(k);a.appendChild(n)};
DiagramFormatPanel.prototype.addDocumentProperties=function(a){a.appendChild(this.createTitle(mxResources.get("options")));return a};
-DiagramFormatPanel.prototype.addPaperSize=function(a){var b=this.editorUi,f=b.editor.graph;a.appendChild(this.createTitle(mxResources.get("paperSize")));var d=PageSetupDialog.addPageFormatPanel(a,"formatpanel",f.pageFormat,function(e){if(null==f.pageFormat||f.pageFormat.width!=e.width||f.pageFormat.height!=e.height)e=new ChangePageSetup(b,null,null,e),e.ignoreColor=!0,e.ignoreImage=!0,f.model.execute(e)});this.addKeyHandler(d.widthInput,function(){d.set(f.pageFormat)});this.addKeyHandler(d.heightInput,
-function(){d.set(f.pageFormat)});var g=function(){d.set(f.pageFormat)};b.addListener("pageFormatChanged",g);this.listeners.push({destroy:function(){b.removeListener(g)}});f.getModel().addListener(mxEvent.CHANGE,g);this.listeners.push({destroy:function(){f.getModel().removeListener(g)}});return a};DiagramFormatPanel.prototype.addStyleOps=function(a){this.addActions(a,["editData"]);this.addActions(a,["clearDefaultStyle"]);return a};
-DiagramFormatPanel.prototype.destroy=function(){BaseFormatPanel.prototype.destroy.apply(this,arguments);this.gridEnabledListener&&(this.editorUi.removeListener(this.gridEnabledListener),this.gridEnabledListener=null)};(function(){function a(c,h,q){mxShape.call(this);this.line=c;this.stroke=h;this.strokewidth=null!=q?q:1;this.updateBoundsFromLine()}function b(){mxSwimlane.call(this)}function f(){mxSwimlane.call(this)}function d(){mxCylinder.call(this)}function g(){mxCylinder.call(this)}function e(){mxActor.call(this)}function k(){mxCylinder.call(this)}function n(){mxCylinder.call(this)}function u(){mxCylinder.call(this)}function m(){mxCylinder.call(this)}function r(){mxShape.call(this)}function x(){mxShape.call(this)}
-function B(c,h,q,l){mxShape.call(this);this.bounds=c;this.fill=h;this.stroke=q;this.strokewidth=null!=l?l:1}function C(){mxActor.call(this)}function G(){mxCylinder.call(this)}function J(){mxCylinder.call(this)}function D(){mxActor.call(this)}function N(){mxActor.call(this)}function Q(){mxActor.call(this)}function R(){mxActor.call(this)}function P(){mxActor.call(this)}function Z(){mxActor.call(this)}function U(){mxActor.call(this)}function V(c,h){this.canvas=c;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");
+DiagramFormatPanel.prototype.addPaperSize=function(a){var b=this.editorUi,f=b.editor.graph;a.appendChild(this.createTitle(mxResources.get("paperSize")));var e=PageSetupDialog.addPageFormatPanel(a,"formatpanel",f.pageFormat,function(d){if(null==f.pageFormat||f.pageFormat.width!=d.width||f.pageFormat.height!=d.height)d=new ChangePageSetup(b,null,null,d),d.ignoreColor=!0,d.ignoreImage=!0,f.model.execute(d)});this.addKeyHandler(e.widthInput,function(){e.set(f.pageFormat)});this.addKeyHandler(e.heightInput,
+function(){e.set(f.pageFormat)});var g=function(){e.set(f.pageFormat)};b.addListener("pageFormatChanged",g);this.listeners.push({destroy:function(){b.removeListener(g)}});f.getModel().addListener(mxEvent.CHANGE,g);this.listeners.push({destroy:function(){f.getModel().removeListener(g)}});return a};DiagramFormatPanel.prototype.addStyleOps=function(a){this.addActions(a,["editData"]);this.addActions(a,["clearDefaultStyle"]);return a};
+DiagramFormatPanel.prototype.destroy=function(){BaseFormatPanel.prototype.destroy.apply(this,arguments);this.gridEnabledListener&&(this.editorUi.removeListener(this.gridEnabledListener),this.gridEnabledListener=null)};(function(){function a(c,h,q){mxShape.call(this);this.line=c;this.stroke=h;this.strokewidth=null!=q?q:1;this.updateBoundsFromLine()}function b(){mxSwimlane.call(this)}function f(){mxSwimlane.call(this)}function e(){mxCylinder.call(this)}function g(){mxCylinder.call(this)}function d(){mxActor.call(this)}function k(){mxCylinder.call(this)}function n(){mxCylinder.call(this)}function u(){mxCylinder.call(this)}function m(){mxCylinder.call(this)}function r(){mxShape.call(this)}function x(){mxShape.call(this)}
+function B(c,h,q,l){mxShape.call(this);this.bounds=c;this.fill=h;this.stroke=q;this.strokewidth=null!=l?l:1}function C(){mxActor.call(this)}function F(){mxCylinder.call(this)}function J(){mxCylinder.call(this)}function D(){mxActor.call(this)}function N(){mxActor.call(this)}function S(){mxActor.call(this)}function T(){mxActor.call(this)}function P(){mxActor.call(this)}function Z(){mxActor.call(this)}function U(){mxActor.call(this)}function V(c,h){this.canvas=c;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");
this.defaultVariation=h;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,V.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,V.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,V.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,V.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,V.prototype.curveTo);
-this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,V.prototype.arcTo)}function ia(){mxRectangleShape.call(this)}function ha(){mxRectangleShape.call(this)}function ba(){mxActor.call(this)}function qa(){mxActor.call(this)}function O(){mxActor.call(this)}function S(){mxRectangleShape.call(this)}function F(){mxRectangleShape.call(this)}function L(){mxCylinder.call(this)}function T(){mxShape.call(this)}function ca(){mxShape.call(this)}function fa(){mxEllipse.call(this)}function wa(){mxShape.call(this)}
-function W(){mxShape.call(this)}function aa(){mxRectangleShape.call(this)}function oa(){mxShape.call(this)}function sa(){mxShape.call(this)}function Ka(){mxShape.call(this)}function Ha(){mxShape.call(this)}function ua(){mxShape.call(this)}function Ca(){mxCylinder.call(this)}function ra(){mxCylinder.call(this)}function Da(){mxRectangleShape.call(this)}function Ua(){mxDoubleEllipse.call(this)}function db(){mxDoubleEllipse.call(this)}function Ta(){mxArrowConnector.call(this);this.spacing=0}function $a(){mxArrowConnector.call(this);
-this.spacing=0}function Xa(){mxActor.call(this)}function Va(){mxRectangleShape.call(this)}function Ya(){mxActor.call(this)}function jb(){mxActor.call(this)}function bb(){mxActor.call(this)}function da(){mxActor.call(this)}function t(){mxActor.call(this)}function z(){mxActor.call(this)}function A(){mxActor.call(this)}function E(){mxActor.call(this)}function H(){mxActor.call(this)}function K(){mxActor.call(this)}function X(){mxEllipse.call(this)}function ja(){mxEllipse.call(this)}function ea(){mxEllipse.call(this)}
-function ka(){mxRhombus.call(this)}function ta(){mxEllipse.call(this)}function Aa(){mxEllipse.call(this)}function Ea(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function La(){mxActor.call(this)}function Ia(){mxActor.call(this)}function Fa(){mxActor.call(this)}function Ga(c,h,q,l){mxShape.call(this);this.bounds=c;this.fill=h;this.stroke=q;this.strokewidth=null!=l?l:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function Oa(){mxConnector.call(this)}
+this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,V.prototype.arcTo)}function aa(){mxRectangleShape.call(this)}function ia(){mxRectangleShape.call(this)}function ea(){mxActor.call(this)}function qa(){mxActor.call(this)}function O(){mxActor.call(this)}function R(){mxRectangleShape.call(this)}function G(){mxRectangleShape.call(this)}function K(){mxCylinder.call(this)}function Q(){mxShape.call(this)}function ba(){mxShape.call(this)}function la(){mxEllipse.call(this)}function ra(){mxShape.call(this)}
+function X(){mxShape.call(this)}function ca(){mxRectangleShape.call(this)}function oa(){mxShape.call(this)}function ta(){mxShape.call(this)}function Ka(){mxShape.call(this)}function Ha(){mxShape.call(this)}function va(){mxShape.call(this)}function Ca(){mxCylinder.call(this)}function sa(){mxCylinder.call(this)}function Da(){mxRectangleShape.call(this)}function Ua(){mxDoubleEllipse.call(this)}function db(){mxDoubleEllipse.call(this)}function Ta(){mxArrowConnector.call(this);this.spacing=0}function $a(){mxArrowConnector.call(this);
+this.spacing=0}function Xa(){mxActor.call(this)}function Va(){mxRectangleShape.call(this)}function Ya(){mxActor.call(this)}function jb(){mxActor.call(this)}function bb(){mxActor.call(this)}function da(){mxActor.call(this)}function t(){mxActor.call(this)}function z(){mxActor.call(this)}function A(){mxActor.call(this)}function E(){mxActor.call(this)}function H(){mxActor.call(this)}function L(){mxActor.call(this)}function W(){mxEllipse.call(this)}function ha(){mxEllipse.call(this)}function fa(){mxEllipse.call(this)}
+function ja(){mxRhombus.call(this)}function ua(){mxEllipse.call(this)}function Aa(){mxEllipse.call(this)}function Ea(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function La(){mxActor.call(this)}function Ia(){mxActor.call(this)}function Fa(){mxActor.call(this)}function Ga(c,h,q,l){mxShape.call(this);this.bounds=c;this.fill=h;this.stroke=q;this.strokewidth=null!=l?l:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function Oa(){mxConnector.call(this)}
function Pa(c,h,q,l,p,v,w,I,y,Y){w+=y;var M=l.clone();l.x-=p*(2*w+y);l.y-=v*(2*w+y);p*=w+y;v*=w+y;return function(){c.ellipse(M.x-p-w,M.y-v-w,2*w,2*w);Y?c.fillAndStroke():c.stroke()}}mxUtils.extend(a,mxShape);a.prototype.updateBoundsFromLine=function(){var c=null;if(null!=this.line)for(var h=0;h<this.line.length;h++){var q=this.line[h];null!=q&&(q=new mxRectangle(q.x,q.y,this.strokewidth,this.strokewidth),null==c?c=q:c.add(q))}this.bounds=null!=c?c:new mxRectangle};a.prototype.paintVertexShape=function(c,
h,q,l,p){this.paintTableLine(c,this.line,0,0)};a.prototype.paintTableLine=function(c,h,q,l){if(null!=h){var p=null;c.begin();for(var v=0;v<h.length;v++){var w=h[v];null!=w&&(null==p?c.moveTo(w.x+q,w.y+l):null!=p&&c.lineTo(w.x+q,w.y+l));p=w}c.end();c.stroke()}};a.prototype.intersectsRectangle=function(c){var h=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var q=null,l=0;l<this.line.length&&!h;l++){var p=this.line[l];null!=p&&null!=q&&(h=mxUtils.rectangleIntersectsSegment(c,
q,p));q=p}return h};mxCellRenderer.registerShape("tableLine",a);mxUtils.extend(b,mxSwimlane);b.prototype.getLabelBounds=function(c){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};b.prototype.paintVertexShape=function(c,h,q,l,p){var v=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):!1,w=this.isHorizontal(),I=this.getTitleSize();0==I||this.outline?Ea.prototype.paintVertexShape.apply(this,
arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-h,-q));v||this.outline||!(w&&I<p||!w&&I<l)||this.paintForeground(c,h,q,l,p)};b.prototype.paintForeground=function(c,h,q,l,p){if(null!=this.state){var v=this.flipH,w=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var I=v;v=w;w=I}c.rotate(-this.getShapeRotation(),v,w,h+l/2,q+p/2);s=this.scale;h=this.bounds.x/s;q=this.bounds.y/s;l=this.bounds.width/s;p=this.bounds.height/
s;this.paintTableForeground(c,h,q,l,p)}};b.prototype.paintTableForeground=function(c,h,q,l,p){l=this.state.view.graph.getTableLines(this.state.cell,"0"!=mxUtils.getValue(this.state.style,"rowLines","1"),"0"!=mxUtils.getValue(this.state.style,"columnLines","1"));for(p=0;p<l.length;p++)a.prototype.paintTableLine(c,l[p],h,q)};b.prototype.configurePointerEvents=function(c){0==this.getTitleSize()?c.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",
-b);mxUtils.extend(f,b);f.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",f);mxUtils.extend(d,mxCylinder);d.prototype.size=20;d.prototype.darkOpacity=0;d.prototype.darkOpacity2=0;d.prototype.paintVertexShape=function(c,h,q,l,p){var v=Math.max(0,Math.min(l,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),w=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),I=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+b);mxUtils.extend(f,b);f.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",f);mxUtils.extend(e,mxCylinder);e.prototype.size=20;e.prototype.darkOpacity=0;e.prototype.darkOpacity2=0;e.prototype.paintVertexShape=function(c,h,q,l,p){var v=Math.max(0,Math.min(l,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),w=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),I=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,
"darkOpacity2",this.darkOpacity2))));c.translate(h,q);c.begin();c.moveTo(0,0);c.lineTo(l-v,0);c.lineTo(l,v);c.lineTo(l,p);c.lineTo(v,p);c.lineTo(0,p-v);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=w&&(c.setFillAlpha(Math.abs(w)),c.setFillColor(0>w?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(l-v,0),c.lineTo(l,v),c.lineTo(v,v),c.close(),c.fill()),0!=I&&(c.setFillAlpha(Math.abs(I)),c.setFillColor(0>I?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(v,
-v),c.lineTo(v,p),c.lineTo(0,p-v),c.close(),c.fill()),c.begin(),c.moveTo(v,p),c.lineTo(v,v),c.lineTo(0,0),c.moveTo(v,v),c.lineTo(l,v),c.end(),c.stroke())};d.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?(c=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(c,c,0,0)):null};mxCellRenderer.registerShape("cube",d);var Na=Math.tan(mxUtils.toRadians(30)),Sa=(.5-Na)/2;mxCellRenderer.registerShape("isoRectangle",e);mxUtils.extend(g,
-mxCylinder);g.prototype.size=6;g.prototype.paintVertexShape=function(c,h,q,l,p){c.setFillColor(this.stroke);var v=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;c.ellipse(h+.5*(l-v),q+.5*(p-v),v,v);c.fill();c.setFillColor(mxConstants.NONE);c.rect(h,q,l,p);c.fill()};mxCellRenderer.registerShape("waypoint",g);mxUtils.extend(e,mxActor);e.prototype.size=20;e.prototype.redrawPath=function(c,h,q,l,p){h=Math.min(l,p/Na);c.translate((l-h)/2,(p-h)/2+h/4);c.moveTo(0,
-.25*h);c.lineTo(.5*h,h*Sa);c.lineTo(h,.25*h);c.lineTo(.5*h,(.5-Sa)*h);c.lineTo(0,.25*h);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",e);mxUtils.extend(k,mxCylinder);k.prototype.size=20;k.prototype.redrawPath=function(c,h,q,l,p,v){h=Math.min(l,p/(.5+Na));v?(c.moveTo(0,.25*h),c.lineTo(.5*h,(.5-Sa)*h),c.lineTo(h,.25*h),c.moveTo(.5*h,(.5-Sa)*h),c.lineTo(.5*h,(1-Sa)*h)):(c.translate((l-h)/2,(p-h)/2),c.moveTo(0,.25*h),c.lineTo(.5*h,h*Sa),c.lineTo(h,.25*h),c.lineTo(h,.75*h),c.lineTo(.5*
+v),c.lineTo(v,p),c.lineTo(0,p-v),c.close(),c.fill()),c.begin(),c.moveTo(v,p),c.lineTo(v,v),c.lineTo(0,0),c.moveTo(v,v),c.lineTo(l,v),c.end(),c.stroke())};e.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?(c=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(c,c,0,0)):null};mxCellRenderer.registerShape("cube",e);var Na=Math.tan(mxUtils.toRadians(30)),Sa=(.5-Na)/2;mxCellRenderer.registerShape("isoRectangle",d);mxUtils.extend(g,
+mxCylinder);g.prototype.size=6;g.prototype.paintVertexShape=function(c,h,q,l,p){c.setFillColor(this.stroke);var v=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;c.ellipse(h+.5*(l-v),q+.5*(p-v),v,v);c.fill();c.setFillColor(mxConstants.NONE);c.rect(h,q,l,p);c.fill()};mxCellRenderer.registerShape("waypoint",g);mxUtils.extend(d,mxActor);d.prototype.size=20;d.prototype.redrawPath=function(c,h,q,l,p){h=Math.min(l,p/Na);c.translate((l-h)/2,(p-h)/2+h/4);c.moveTo(0,
+.25*h);c.lineTo(.5*h,h*Sa);c.lineTo(h,.25*h);c.lineTo(.5*h,(.5-Sa)*h);c.lineTo(0,.25*h);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",d);mxUtils.extend(k,mxCylinder);k.prototype.size=20;k.prototype.redrawPath=function(c,h,q,l,p,v){h=Math.min(l,p/(.5+Na));v?(c.moveTo(0,.25*h),c.lineTo(.5*h,(.5-Sa)*h),c.lineTo(h,.25*h),c.moveTo(.5*h,(.5-Sa)*h),c.lineTo(.5*h,(1-Sa)*h)):(c.translate((l-h)/2,(p-h)/2),c.moveTo(0,.25*h),c.lineTo(.5*h,h*Sa),c.lineTo(h,.25*h),c.lineTo(h,.75*h),c.lineTo(.5*
h,(1-Sa)*h),c.lineTo(0,.75*h),c.close());c.end()};mxCellRenderer.registerShape("isoCube",k);mxUtils.extend(n,mxCylinder);n.prototype.redrawPath=function(c,h,q,l,p,v){h=Math.min(p/2,Math.round(p/8)+this.strokewidth-1);if(v&&null!=this.fill||!v&&null==this.fill)c.moveTo(0,h),c.curveTo(0,2*h,l,2*h,l,h),v||(c.stroke(),c.begin()),c.translate(0,h/2),c.moveTo(0,h),c.curveTo(0,2*h,l,2*h,l,h),v||(c.stroke(),c.begin()),c.translate(0,h/2),c.moveTo(0,h),c.curveTo(0,2*h,l,2*h,l,h),v||(c.stroke(),c.begin()),c.translate(0,
-h);v||(c.moveTo(0,h),c.curveTo(0,-h/3,l,-h/3,l,h),c.lineTo(l,p-h),c.curveTo(l,p+h/3,0,p+h/3,0,p-h),c.close())};n.prototype.getLabelMargins=function(c){return new mxRectangle(0,2.5*Math.min(c.height/2,Math.round(c.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",n);mxUtils.extend(u,mxCylinder);u.prototype.size=30;u.prototype.darkOpacity=0;u.prototype.paintVertexShape=function(c,h,q,l,p){var v=Math.max(0,Math.min(l,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",
this.size))))),w=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));c.translate(h,q);c.begin();c.moveTo(0,0);c.lineTo(l-v,0);c.lineTo(l,v);c.lineTo(l,p);c.lineTo(0,p);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=w&&(c.setFillAlpha(Math.abs(w)),c.setFillColor(0>w?"#FFFFFF":"#000000"),c.begin(),c.moveTo(l-v,0),c.lineTo(l-v,v),c.lineTo(l,v),c.close(),c.fill()),c.begin(),c.moveTo(l-v,0),c.lineTo(l-v,v),c.lineTo(l,v),
@@ -3541,23 +3544,23 @@ c.end(),c.stroke())};mxCellRenderer.registerShape("note",u);mxUtils.extend(m,u);
"isoAngle",this.isoAngle))))*Math.PI/200;v=Math.min(l*Math.tan(v),.5*p);c.translate(h,q);c.begin();c.moveTo(.5*l,0);c.lineTo(l,v);c.lineTo(l,p-v);c.lineTo(.5*l,p);c.lineTo(0,p-v);c.lineTo(0,v);c.close();c.fillAndStroke();c.setShadow(!1);c.begin();c.moveTo(0,v);c.lineTo(.5*l,2*v);c.lineTo(l,v);c.moveTo(.5*l,2*v);c.lineTo(.5*l,p);c.stroke()};mxCellRenderer.registerShape("isoCube2",r);mxUtils.extend(x,mxShape);x.prototype.size=15;x.prototype.paintVertexShape=function(c,h,q,l,p){var v=Math.max(0,Math.min(.5*
p,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.translate(h,q);0==v?(c.rect(0,0,l,p),c.fillAndStroke()):(c.begin(),c.moveTo(0,v),c.arcTo(.5*l,v,0,0,1,.5*l,0),c.arcTo(.5*l,v,0,0,1,l,v),c.lineTo(l,p-v),c.arcTo(.5*l,v,0,0,1,.5*l,p),c.arcTo(.5*l,v,0,0,1,0,p-v),c.close(),c.fillAndStroke(),c.setShadow(!1),c.begin(),c.moveTo(l,v),c.arcTo(.5*l,v,0,0,1,.5*l,2*v),c.arcTo(.5*l,v,0,0,1,0,v),c.stroke())};mxCellRenderer.registerShape("cylinder2",x);mxUtils.extend(B,mxCylinder);B.prototype.size=
15;B.prototype.paintVertexShape=function(c,h,q,l,p){var v=Math.max(0,Math.min(.5*p,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),w=mxUtils.getValue(this.style,"lid",!0);c.translate(h,q);0==v?(c.rect(0,0,l,p),c.fillAndStroke()):(c.begin(),w?(c.moveTo(0,v),c.arcTo(.5*l,v,0,0,1,.5*l,0),c.arcTo(.5*l,v,0,0,1,l,v)):(c.moveTo(0,0),c.arcTo(.5*l,v,0,0,0,.5*l,v),c.arcTo(.5*l,v,0,0,0,l,0)),c.lineTo(l,p-v),c.arcTo(.5*l,v,0,0,1,.5*l,p),c.arcTo(.5*l,v,0,0,1,0,p-v),c.close(),c.fillAndStroke(),c.setShadow(!1),
-w&&(c.begin(),c.moveTo(l,v),c.arcTo(.5*l,v,0,0,1,.5*l,2*v),c.arcTo(.5*l,v,0,0,1,0,v),c.stroke()))};mxCellRenderer.registerShape("cylinder3",B);mxUtils.extend(C,mxActor);C.prototype.redrawPath=function(c,h,q,l,p){c.moveTo(0,0);c.quadTo(l/2,.5*p,l,0);c.quadTo(.5*l,p/2,l,p);c.quadTo(l/2,.5*p,0,p);c.quadTo(.5*l,p/2,0,0);c.end()};mxCellRenderer.registerShape("switch",C);mxUtils.extend(G,mxCylinder);G.prototype.tabWidth=60;G.prototype.tabHeight=20;G.prototype.tabPosition="right";G.prototype.arcSize=.1;
-G.prototype.paintVertexShape=function(c,h,q,l,p){c.translate(h,q);h=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));q=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var v=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),w=mxUtils.getValue(this.style,"rounded",!1),I=mxUtils.getValue(this.style,"absoluteArcSize",!1),y=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));I||(y*=Math.min(l,p));
+w&&(c.begin(),c.moveTo(l,v),c.arcTo(.5*l,v,0,0,1,.5*l,2*v),c.arcTo(.5*l,v,0,0,1,0,v),c.stroke()))};mxCellRenderer.registerShape("cylinder3",B);mxUtils.extend(C,mxActor);C.prototype.redrawPath=function(c,h,q,l,p){c.moveTo(0,0);c.quadTo(l/2,.5*p,l,0);c.quadTo(.5*l,p/2,l,p);c.quadTo(l/2,.5*p,0,p);c.quadTo(.5*l,p/2,0,0);c.end()};mxCellRenderer.registerShape("switch",C);mxUtils.extend(F,mxCylinder);F.prototype.tabWidth=60;F.prototype.tabHeight=20;F.prototype.tabPosition="right";F.prototype.arcSize=.1;
+F.prototype.paintVertexShape=function(c,h,q,l,p){c.translate(h,q);h=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));q=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var v=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),w=mxUtils.getValue(this.style,"rounded",!1),I=mxUtils.getValue(this.style,"absoluteArcSize",!1),y=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));I||(y*=Math.min(l,p));
y=Math.min(y,.5*l,.5*(p-q));h=Math.max(h,y);h=Math.min(l-y,h);w||(y=0);c.begin();"left"==v?(c.moveTo(Math.max(y,0),q),c.lineTo(Math.max(y,0),0),c.lineTo(h,0),c.lineTo(h,q)):(c.moveTo(l-h,q),c.lineTo(l-h,0),c.lineTo(l-Math.max(y,0),0),c.lineTo(l-Math.max(y,0),q));w?(c.moveTo(0,y+q),c.arcTo(y,y,0,0,1,y,q),c.lineTo(l-y,q),c.arcTo(y,y,0,0,1,l,y+q),c.lineTo(l,p-y),c.arcTo(y,y,0,0,1,l-y,p),c.lineTo(y,p),c.arcTo(y,y,0,0,1,0,p-y)):(c.moveTo(0,q),c.lineTo(l,q),c.lineTo(l,p),c.lineTo(0,p));c.close();c.fillAndStroke();
-c.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(c.begin(),c.moveTo(l-30,q+20),c.lineTo(l-20,q+10),c.lineTo(l-10,q+20),c.close(),c.stroke())};mxCellRenderer.registerShape("folder",G);G.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var h=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var q=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;h=mxUtils.getValue(this.style,
+c.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(c.begin(),c.moveTo(l-30,q+20),c.lineTo(l-20,q+10),c.lineTo(l-10,q+20),c.close(),c.stroke())};mxCellRenderer.registerShape("folder",F);F.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var h=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var q=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;h=mxUtils.getValue(this.style,
"tabHeight",15)*this.scale;var l=mxUtils.getValue(this.style,"rounded",!1),p=mxUtils.getValue(this.style,"absoluteArcSize",!1),v=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));p||(v*=Math.min(c.width,c.height));v=Math.min(v,.5*c.width,.5*(c.height-h));l||(v=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(v,0,Math.min(c.width,c.width-q),Math.min(c.height,c.height-h)):new mxRectangle(Math.min(c.width,c.width-q),0,v,Math.min(c.height,c.height-
h))}return new mxRectangle(0,Math.min(c.height,h),0,0)}return null};mxUtils.extend(J,mxCylinder);J.prototype.arcSize=.1;J.prototype.paintVertexShape=function(c,h,q,l,p){c.translate(h,q);var v=mxUtils.getValue(this.style,"rounded",!1),w=mxUtils.getValue(this.style,"absoluteArcSize",!1);h=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));q=mxUtils.getValue(this.style,"umlStateConnection",null);w||(h*=Math.min(l,p));h=Math.min(h,.5*l,.5*p);v||(h=0);v=0;null!=q&&(v=10);c.begin();c.moveTo(v,
h);c.arcTo(h,h,0,0,1,v+h,0);c.lineTo(l-h,0);c.arcTo(h,h,0,0,1,l,h);c.lineTo(l,p-h);c.arcTo(h,h,0,0,1,l-h,p);c.lineTo(v+h,p);c.arcTo(h,h,0,0,1,v,p-h);c.close();c.fillAndStroke();c.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(c.roundrect(l-40,p-20,10,10,3,3),c.stroke(),c.roundrect(l-20,p-20,10,10,3,3),c.stroke(),c.begin(),c.moveTo(l-30,p-15),c.lineTo(l-20,p-15),c.stroke());"connPointRefEntry"==q?(c.ellipse(0,.5*p-10,20,20),c.fillAndStroke()):"connPointRefExit"==
q&&(c.ellipse(0,.5*p-10,20,20),c.fillAndStroke(),c.begin(),c.moveTo(5,.5*p-5),c.lineTo(15,.5*p+5),c.moveTo(15,.5*p-5),c.lineTo(5,.5*p+5),c.stroke())};J.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",J);mxUtils.extend(D,mxActor);D.prototype.size=30;D.prototype.isRoundable=function(){return!0};D.prototype.redrawPath=
function(c,h,q,l,p){h=Math.max(0,Math.min(l,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(h,0),new mxPoint(l,0),new mxPoint(l,p),new mxPoint(0,p),new mxPoint(0,h)],this.isRounded,q,!0);c.end()};mxCellRenderer.registerShape("card",D);mxUtils.extend(N,mxActor);N.prototype.size=.4;N.prototype.redrawPath=function(c,h,q,l,p){h=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
"size",this.size))));c.moveTo(0,h/2);c.quadTo(l/4,1.4*h,l/2,h/2);c.quadTo(3*l/4,h*(1-1.4),l,h/2);c.lineTo(l,p-h/2);c.quadTo(3*l/4,p-1.4*h,l/2,p-h/2);c.quadTo(l/4,p-h*(1-1.4),0,p-h/2);c.lineTo(0,h/2);c.close();c.end()};N.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var h=mxUtils.getValue(this.style,"size",this.size),q=c.width,l=c.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return h*=
-l,new mxRectangle(c.x,c.y+h,q,l-2*h);h*=q;return new mxRectangle(c.x+h,c.y,q-2*h,l)}return c};mxCellRenderer.registerShape("tape",N);mxUtils.extend(Q,mxActor);Q.prototype.size=.3;Q.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*c.height):null};Q.prototype.redrawPath=function(c,h,q,l,p){h=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,
-0);c.lineTo(l,0);c.lineTo(l,p-h/2);c.quadTo(3*l/4,p-1.4*h,l/2,p-h/2);c.quadTo(l/4,p-h*(1-1.4),0,p-h/2);c.lineTo(0,h/2);c.close();c.end()};mxCellRenderer.registerShape("document",Q);var eb=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,h,q,l){var p=mxUtils.getValue(this.style,"size");return null!=p?l*Math.max(0,Math.min(1,p)):eb.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var h=2*mxUtils.getValue(this.style,
-"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,c.height*h),0,0)}return null};B.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var h=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(h/=2);return new mxRectangle(0,Math.min(c.height*this.scale,2*h*this.scale),0,Math.max(0,.3*h*this.scale))}return null};G.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var h=mxUtils.getValue(this.style,
+l,new mxRectangle(c.x,c.y+h,q,l-2*h);h*=q;return new mxRectangle(c.x+h,c.y,q-2*h,l)}return c};mxCellRenderer.registerShape("tape",N);mxUtils.extend(S,mxActor);S.prototype.size=.3;S.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*c.height):null};S.prototype.redrawPath=function(c,h,q,l,p){h=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,
+0);c.lineTo(l,0);c.lineTo(l,p-h/2);c.quadTo(3*l/4,p-1.4*h,l/2,p-h/2);c.quadTo(l/4,p-h*(1-1.4),0,p-h/2);c.lineTo(0,h/2);c.close();c.end()};mxCellRenderer.registerShape("document",S);var eb=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,h,q,l){var p=mxUtils.getValue(this.style,"size");return null!=p?l*Math.max(0,Math.min(1,p)):eb.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var h=2*mxUtils.getValue(this.style,
+"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,c.height*h),0,0)}return null};B.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var h=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(h/=2);return new mxRectangle(0,Math.min(c.height*this.scale,2*h*this.scale),0,Math.max(0,.3*h*this.scale))}return null};F.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var h=mxUtils.getValue(this.style,
"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var q=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;h=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var l=mxUtils.getValue(this.style,"rounded",!1),p=mxUtils.getValue(this.style,"absoluteArcSize",!1),v=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));p||(v*=Math.min(c.width,c.height));v=Math.min(v,.5*c.width,.5*(c.height-h));l||(v=0);return"left"==mxUtils.getValue(this.style,"tabPosition",
this.tabPosition)?new mxRectangle(v,0,Math.min(c.width,c.width-q),Math.min(c.height,c.height-h)):new mxRectangle(Math.min(c.width,c.width-q),0,v,Math.min(c.height,c.height-h))}return new mxRectangle(0,Math.min(c.height,h),0,0)}return null};J.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};m.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,
-"boundedLbl",!1)){var h=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,h*this.scale),0,Math.max(0,h*this.scale))}return null};mxUtils.extend(R,mxActor);R.prototype.size=.2;R.prototype.fixedSize=20;R.prototype.isRoundable=function(){return!0};R.prototype.redrawPath=function(c,h,q,l,p){h="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,p),new mxPoint(h,0),new mxPoint(l,0),new mxPoint(l-h,p)],this.isRounded,q,!0);c.end()};mxCellRenderer.registerShape("parallelogram",R);mxUtils.extend(P,mxActor);P.prototype.size=.2;P.prototype.fixedSize=20;P.prototype.isRoundable=function(){return!0};P.prototype.redrawPath=function(c,h,q,l,p){h="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*
+"boundedLbl",!1)){var h=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,h*this.scale),0,Math.max(0,h*this.scale))}return null};mxUtils.extend(T,mxActor);T.prototype.size=.2;T.prototype.fixedSize=20;T.prototype.isRoundable=function(){return!0};T.prototype.redrawPath=function(c,h,q,l,p){h="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,p),new mxPoint(h,0),new mxPoint(l,0),new mxPoint(l-h,p)],this.isRounded,q,!0);c.end()};mxCellRenderer.registerShape("parallelogram",T);mxUtils.extend(P,mxActor);P.prototype.size=.2;P.prototype.fixedSize=20;P.prototype.isRoundable=function(){return!0};P.prototype.redrawPath=function(c,h,q,l,p){h="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*
l,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):l*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,p),new mxPoint(h,0),new mxPoint(l-h,0),new mxPoint(l,p)],this.isRounded,q,!0)};mxCellRenderer.registerShape("trapezoid",P);mxUtils.extend(Z,mxActor);Z.prototype.size=.5;Z.prototype.redrawPath=function(c,h,q,l,p){c.setFillColor(null);
h=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(h,0),new mxPoint(h,p/2),new mxPoint(0,p/2),new mxPoint(h,p/2),new mxPoint(h,p),new mxPoint(l,p)],this.isRounded,q,!1);c.end()};mxCellRenderer.registerShape("curlyBracket",Z);mxUtils.extend(U,mxActor);U.prototype.redrawPath=function(c,h,q,l,p){c.setStrokeWidth(1);c.setFillColor(this.stroke);
h=l/5;c.rect(0,0,h,p);c.fillAndStroke();c.rect(2*h,0,h,p);c.fillAndStroke();c.rect(4*h,0,h,p);c.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",U);V.prototype.moveTo=function(c,h){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=h;this.firstX=c;this.firstY=h};V.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};
@@ -3567,32 +3570,32 @@ h};V.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.ca
mxShape.prototype.afterPaint=function(c){pb.apply(this,arguments);null!=c.handJiggle&&(c.handJiggle.destroy(),delete c.handJiggle)};mxShape.prototype.createComicCanvas=function(c){return new V(c,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(c){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(c)};mxRhombus.prototype.defaultJiggle=2;var ub=mxRectangleShape.prototype.isHtmlAllowed;
mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&ub.apply(this,arguments)};var vb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(c,h,q,l,p){if(null==c.handJiggle||c.handJiggle.constructor!=V)vb.apply(this,arguments);else{var v=!0;null!=this.style&&(v="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,
"1"));if(v||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)v||null!=this.fill&&this.fill!=mxConstants.NONE||(c.pointerEvents=!1),c.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?v=Math.min(l/2,Math.min(p/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,v=Math.min(l*
-v,p*v)),c.moveTo(h+v,q),c.lineTo(h+l-v,q),c.quadTo(h+l,q,h+l,q+v),c.lineTo(h+l,q+p-v),c.quadTo(h+l,q+p,h+l-v,q+p),c.lineTo(h+v,q+p),c.quadTo(h,q+p,h,q+p-v),c.lineTo(h,q+v),c.quadTo(h,q,h+v,q)):(c.moveTo(h,q),c.lineTo(h+l,q),c.lineTo(h+l,q+p),c.lineTo(h,q+p),c.lineTo(h,q)),c.close(),c.end(),c.fillAndStroke()}};mxUtils.extend(ia,mxRectangleShape);ia.prototype.size=.1;ia.prototype.fixedSize=!1;ia.prototype.isHtmlAllowed=function(){return!1};ia.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.state.style,
+v,p*v)),c.moveTo(h+v,q),c.lineTo(h+l-v,q),c.quadTo(h+l,q,h+l,q+v),c.lineTo(h+l,q+p-v),c.quadTo(h+l,q+p,h+l-v,q+p),c.lineTo(h+v,q+p),c.quadTo(h,q+p,h,q+p-v),c.lineTo(h,q+v),c.quadTo(h,q,h+v,q)):(c.moveTo(h,q),c.lineTo(h+l,q),c.lineTo(h+l,q+p),c.lineTo(h,q+p),c.lineTo(h,q)),c.close(),c.end(),c.fillAndStroke()}};mxUtils.extend(aa,mxRectangleShape);aa.prototype.size=.1;aa.prototype.fixedSize=!1;aa.prototype.isHtmlAllowed=function(){return!1};aa.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.state.style,
mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var h=c.width,q=c.height;c=new mxRectangle(c.x,c.y,h,q);var l=h*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var p=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;l=Math.max(l,Math.min(h*p,q*p))}c.x+=Math.round(l);c.width-=Math.round(2*l);return c}return c};
-ia.prototype.paintForeground=function(c,h,q,l,p){var v=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),w=parseFloat(mxUtils.getValue(this.style,"size",this.size));w=v?Math.max(0,Math.min(l,w)):l*Math.max(0,Math.min(1,w));this.isRounded&&(v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,w=Math.max(w,Math.min(l*v,p*v)));w=Math.round(w);c.begin();c.moveTo(h+w,q);c.lineTo(h+w,q+p);c.moveTo(h+l-w,q);c.lineTo(h+l-w,q+p);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
-arguments)};mxCellRenderer.registerShape("process",ia);mxCellRenderer.registerShape("process2",ia);mxUtils.extend(ha,mxRectangleShape);ha.prototype.paintBackground=function(c,h,q,l,p){c.setFillColor(mxConstants.NONE);c.rect(h,q,l,p);c.fill()};ha.prototype.paintForeground=function(c,h,q,l,p){};mxCellRenderer.registerShape("transparent",ha);mxUtils.extend(ba,mxHexagon);ba.prototype.size=30;ba.prototype.position=.5;ba.prototype.position2=.5;ba.prototype.base=20;ba.prototype.getLabelMargins=function(){return new mxRectangle(0,
-0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};ba.prototype.isRoundable=function(){return!0};ba.prototype.redrawPath=function(c,h,q,l,p){h=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;q=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var v=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),w=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",
-this.position2)))),I=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(c,[new mxPoint(0,0),new mxPoint(l,0),new mxPoint(l,p-q),new mxPoint(Math.min(l,v+I),p-q),new mxPoint(w,p),new mxPoint(Math.max(0,v),p-q),new mxPoint(0,p-q)],this.isRounded,h,!0,[4])};mxCellRenderer.registerShape("callout",ba);mxUtils.extend(qa,mxActor);qa.prototype.size=.2;qa.prototype.fixedSize=20;qa.prototype.isRoundable=function(){return!0};qa.prototype.redrawPath=function(c,h,
+aa.prototype.paintForeground=function(c,h,q,l,p){var v=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),w=parseFloat(mxUtils.getValue(this.style,"size",this.size));w=v?Math.max(0,Math.min(l,w)):l*Math.max(0,Math.min(1,w));this.isRounded&&(v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,w=Math.max(w,Math.min(l*v,p*v)));w=Math.round(w);c.begin();c.moveTo(h+w,q);c.lineTo(h+w,q+p);c.moveTo(h+l-w,q);c.lineTo(h+l-w,q+p);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
+arguments)};mxCellRenderer.registerShape("process",aa);mxCellRenderer.registerShape("process2",aa);mxUtils.extend(ia,mxRectangleShape);ia.prototype.paintBackground=function(c,h,q,l,p){c.setFillColor(mxConstants.NONE);c.rect(h,q,l,p);c.fill()};ia.prototype.paintForeground=function(c,h,q,l,p){};mxCellRenderer.registerShape("transparent",ia);mxUtils.extend(ea,mxHexagon);ea.prototype.size=30;ea.prototype.position=.5;ea.prototype.position2=.5;ea.prototype.base=20;ea.prototype.getLabelMargins=function(){return new mxRectangle(0,
+0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};ea.prototype.isRoundable=function(){return!0};ea.prototype.redrawPath=function(c,h,q,l,p){h=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;q=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var v=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),w=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",
+this.position2)))),I=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(c,[new mxPoint(0,0),new mxPoint(l,0),new mxPoint(l,p-q),new mxPoint(Math.min(l,v+I),p-q),new mxPoint(w,p),new mxPoint(Math.max(0,v),p-q),new mxPoint(0,p-q)],this.isRounded,h,!0,[4])};mxCellRenderer.registerShape("callout",ea);mxUtils.extend(qa,mxActor);qa.prototype.size=.2;qa.prototype.fixedSize=20;qa.prototype.isRoundable=function(){return!0};qa.prototype.redrawPath=function(c,h,
q,l,p){h="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(l-h,0),new mxPoint(l,p/2),new mxPoint(l-h,p),new mxPoint(0,p),new mxPoint(h,p/2)],this.isRounded,q,!0);c.end()};mxCellRenderer.registerShape("step",
qa);mxUtils.extend(O,mxHexagon);O.prototype.size=.25;O.prototype.fixedSize=20;O.prototype.isRoundable=function(){return!0};O.prototype.redrawPath=function(c,h,q,l,p){h="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*l,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(h,
-0),new mxPoint(l-h,0),new mxPoint(l,.5*p),new mxPoint(l-h,p),new mxPoint(h,p),new mxPoint(0,.5*p)],this.isRounded,q,!0)};mxCellRenderer.registerShape("hexagon",O);mxUtils.extend(S,mxRectangleShape);S.prototype.isHtmlAllowed=function(){return!1};S.prototype.paintForeground=function(c,h,q,l,p){var v=Math.min(l/5,p/5)+1;c.begin();c.moveTo(h+l/2,q+v);c.lineTo(h+l/2,q+p-v);c.moveTo(h+v,q+p/2);c.lineTo(h+l-v,q+p/2);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",
-S);var cb=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var h=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+h,c.y+h,c.width-2*h,c.height-2*h)}return c};mxRhombus.prototype.paintVertexShape=function(c,h,q,l,p){cb.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var v=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
-0);h+=v;q+=v;l-=2*v;p-=2*v;0<l&&0<p&&(c.setShadow(!1),cb.apply(this,[c,h,q,l,p]))}};mxUtils.extend(F,mxRectangleShape);F.prototype.isHtmlAllowed=function(){return!1};F.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var h=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+h,c.y+h,c.width-2*h,c.height-2*h)}return c};F.prototype.paintForeground=function(c,h,q,l,p){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var v=
+0),new mxPoint(l-h,0),new mxPoint(l,.5*p),new mxPoint(l-h,p),new mxPoint(h,p),new mxPoint(0,.5*p)],this.isRounded,q,!0)};mxCellRenderer.registerShape("hexagon",O);mxUtils.extend(R,mxRectangleShape);R.prototype.isHtmlAllowed=function(){return!1};R.prototype.paintForeground=function(c,h,q,l,p){var v=Math.min(l/5,p/5)+1;c.begin();c.moveTo(h+l/2,q+v);c.lineTo(h+l/2,q+p-v);c.moveTo(h+v,q+p/2);c.lineTo(h+l-v,q+p/2);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",
+R);var cb=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var h=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+h,c.y+h,c.width-2*h,c.height-2*h)}return c};mxRhombus.prototype.paintVertexShape=function(c,h,q,l,p){cb.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var v=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
+0);h+=v;q+=v;l-=2*v;p-=2*v;0<l&&0<p&&(c.setShadow(!1),cb.apply(this,[c,h,q,l,p]))}};mxUtils.extend(G,mxRectangleShape);G.prototype.isHtmlAllowed=function(){return!1};G.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var h=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+h,c.y+h,c.width-2*h,c.height-2*h)}return c};G.prototype.paintForeground=function(c,h,q,l,p){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var v=
Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);h+=v;q+=v;l-=2*v;p-=2*v;0<l&&0<p&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}c.setDashed(!1);v=0;do{var w=mxCellRenderer.defaultShapes[this.style["symbol"+v]];if(null!=w){var I=this.style["symbol"+v+"Align"],y=this.style["symbol"+v+"VerticalAlign"],Y=this.style["symbol"+v+"Width"],M=this.style["symbol"+v+"Height"],Ba=this.style["symbol"+v+"Spacing"]||0,Qa=this.style["symbol"+v+"VSpacing"]||Ba,
-Ja=this.style["symbol"+v+"ArcSpacing"];null!=Ja&&(Ja*=this.getArcSize(l+this.strokewidth,p+this.strokewidth),Ba+=Ja,Qa+=Ja);Ja=h;var la=q;Ja=I==mxConstants.ALIGN_CENTER?Ja+(l-Y)/2:I==mxConstants.ALIGN_RIGHT?Ja+(l-Y-Ba):Ja+Ba;la=y==mxConstants.ALIGN_MIDDLE?la+(p-M)/2:y==mxConstants.ALIGN_BOTTOM?la+(p-M-Qa):la+Qa;c.save();I=new w;I.style=this.style;w.prototype.paintVertexShape.call(I,c,Ja,la,Y,M);c.restore()}v++}while(null!=w)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",
-F);mxUtils.extend(L,mxCylinder);L.prototype.redrawPath=function(c,h,q,l,p,v){v?(c.moveTo(0,0),c.lineTo(l/2,p/2),c.lineTo(l,0),c.end()):(c.moveTo(0,0),c.lineTo(l,0),c.lineTo(l,p),c.lineTo(0,p),c.close())};mxCellRenderer.registerShape("message",L);mxUtils.extend(T,mxShape);T.prototype.paintBackground=function(c,h,q,l,p){c.translate(h,q);c.ellipse(l/4,0,l/2,p/4);c.fillAndStroke();c.begin();c.moveTo(l/2,p/4);c.lineTo(l/2,2*p/3);c.moveTo(l/2,p/3);c.lineTo(0,p/3);c.moveTo(l/2,p/3);c.lineTo(l,p/3);c.moveTo(l/
-2,2*p/3);c.lineTo(0,p);c.moveTo(l/2,2*p/3);c.lineTo(l,p);c.end();c.stroke()};mxCellRenderer.registerShape("umlActor",T);mxUtils.extend(ca,mxShape);ca.prototype.getLabelMargins=function(c){return new mxRectangle(c.width/6,0,0,0)};ca.prototype.paintBackground=function(c,h,q,l,p){c.translate(h,q);c.begin();c.moveTo(0,p/4);c.lineTo(0,3*p/4);c.end();c.stroke();c.begin();c.moveTo(0,p/2);c.lineTo(l/6,p/2);c.end();c.stroke();c.ellipse(l/6,0,5*l/6,p);c.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",
-ca);mxUtils.extend(fa,mxEllipse);fa.prototype.paintVertexShape=function(c,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(h+l/8,q+p);c.lineTo(h+7*l/8,q+p);c.end();c.stroke()};mxCellRenderer.registerShape("umlEntity",fa);mxUtils.extend(wa,mxShape);wa.prototype.paintVertexShape=function(c,h,q,l,p){c.translate(h,q);c.begin();c.moveTo(l,0);c.lineTo(0,p);c.moveTo(0,0);c.lineTo(l,p);c.end();c.stroke()};mxCellRenderer.registerShape("umlDestroy",wa);mxUtils.extend(W,
-mxShape);W.prototype.getLabelBounds=function(c){return new mxRectangle(c.x,c.y+c.height/8,c.width,7*c.height/8)};W.prototype.paintBackground=function(c,h,q,l,p){c.translate(h,q);c.begin();c.moveTo(3*l/8,p/8*1.1);c.lineTo(5*l/8,0);c.end();c.stroke();c.ellipse(0,p/8,l,7*p/8);c.fillAndStroke()};W.prototype.paintForeground=function(c,h,q,l,p){c.begin();c.moveTo(3*l/8,p/8*1.1);c.lineTo(5*l/8,p/4);c.end();c.stroke()};mxCellRenderer.registerShape("umlControl",W);mxUtils.extend(aa,mxRectangleShape);aa.prototype.size=
-40;aa.prototype.isHtmlAllowed=function(){return!1};aa.prototype.getLabelBounds=function(c){var h=Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(c.x,c.y,c.width,h)};aa.prototype.paintBackground=function(c,h,q,l,p){var v=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),w=mxUtils.getValue(this.style,"participant");null==w||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,
-c,h,q,l,v):(w=this.state.view.graph.cellRenderer.getShape(w),null!=w&&w!=aa&&(w=new w,w.apply(this.state),c.save(),w.paintVertexShape(c,h,q,l,v),c.restore()));v<p&&(c.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),c.begin(),c.moveTo(h+l/2,q+v),c.lineTo(h+l/2,q+p),c.end(),c.stroke())};aa.prototype.paintForeground=function(c,h,q,l,p){var v=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,c,h,q,l,
-Math.min(p,v))};mxCellRenderer.registerShape("umlLifeline",aa);mxUtils.extend(oa,mxShape);oa.prototype.width=60;oa.prototype.height=30;oa.prototype.corner=10;oa.prototype.getLabelMargins=function(c){return new mxRectangle(0,0,c.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),c.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};oa.prototype.paintBackground=function(c,h,q,l,p){var v=this.corner,w=Math.min(l,Math.max(v,parseFloat(mxUtils.getValue(this.style,
+Ja=this.style["symbol"+v+"ArcSpacing"];null!=Ja&&(Ja*=this.getArcSize(l+this.strokewidth,p+this.strokewidth),Ba+=Ja,Qa+=Ja);Ja=h;var ka=q;Ja=I==mxConstants.ALIGN_CENTER?Ja+(l-Y)/2:I==mxConstants.ALIGN_RIGHT?Ja+(l-Y-Ba):Ja+Ba;ka=y==mxConstants.ALIGN_MIDDLE?ka+(p-M)/2:y==mxConstants.ALIGN_BOTTOM?ka+(p-M-Qa):ka+Qa;c.save();I=new w;I.style=this.style;w.prototype.paintVertexShape.call(I,c,Ja,ka,Y,M);c.restore()}v++}while(null!=w)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",
+G);mxUtils.extend(K,mxCylinder);K.prototype.redrawPath=function(c,h,q,l,p,v){v?(c.moveTo(0,0),c.lineTo(l/2,p/2),c.lineTo(l,0),c.end()):(c.moveTo(0,0),c.lineTo(l,0),c.lineTo(l,p),c.lineTo(0,p),c.close())};mxCellRenderer.registerShape("message",K);mxUtils.extend(Q,mxShape);Q.prototype.paintBackground=function(c,h,q,l,p){c.translate(h,q);c.ellipse(l/4,0,l/2,p/4);c.fillAndStroke();c.begin();c.moveTo(l/2,p/4);c.lineTo(l/2,2*p/3);c.moveTo(l/2,p/3);c.lineTo(0,p/3);c.moveTo(l/2,p/3);c.lineTo(l,p/3);c.moveTo(l/
+2,2*p/3);c.lineTo(0,p);c.moveTo(l/2,2*p/3);c.lineTo(l,p);c.end();c.stroke()};mxCellRenderer.registerShape("umlActor",Q);mxUtils.extend(ba,mxShape);ba.prototype.getLabelMargins=function(c){return new mxRectangle(c.width/6,0,0,0)};ba.prototype.paintBackground=function(c,h,q,l,p){c.translate(h,q);c.begin();c.moveTo(0,p/4);c.lineTo(0,3*p/4);c.end();c.stroke();c.begin();c.moveTo(0,p/2);c.lineTo(l/6,p/2);c.end();c.stroke();c.ellipse(l/6,0,5*l/6,p);c.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",
+ba);mxUtils.extend(la,mxEllipse);la.prototype.paintVertexShape=function(c,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(h+l/8,q+p);c.lineTo(h+7*l/8,q+p);c.end();c.stroke()};mxCellRenderer.registerShape("umlEntity",la);mxUtils.extend(ra,mxShape);ra.prototype.paintVertexShape=function(c,h,q,l,p){c.translate(h,q);c.begin();c.moveTo(l,0);c.lineTo(0,p);c.moveTo(0,0);c.lineTo(l,p);c.end();c.stroke()};mxCellRenderer.registerShape("umlDestroy",ra);mxUtils.extend(X,
+mxShape);X.prototype.getLabelBounds=function(c){return new mxRectangle(c.x,c.y+c.height/8,c.width,7*c.height/8)};X.prototype.paintBackground=function(c,h,q,l,p){c.translate(h,q);c.begin();c.moveTo(3*l/8,p/8*1.1);c.lineTo(5*l/8,0);c.end();c.stroke();c.ellipse(0,p/8,l,7*p/8);c.fillAndStroke()};X.prototype.paintForeground=function(c,h,q,l,p){c.begin();c.moveTo(3*l/8,p/8*1.1);c.lineTo(5*l/8,p/4);c.end();c.stroke()};mxCellRenderer.registerShape("umlControl",X);mxUtils.extend(ca,mxRectangleShape);ca.prototype.size=
+40;ca.prototype.isHtmlAllowed=function(){return!1};ca.prototype.getLabelBounds=function(c){var h=Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(c.x,c.y,c.width,h)};ca.prototype.paintBackground=function(c,h,q,l,p){var v=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),w=mxUtils.getValue(this.style,"participant");null==w||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,
+c,h,q,l,v):(w=this.state.view.graph.cellRenderer.getShape(w),null!=w&&w!=ca&&(w=new w,w.apply(this.state),c.save(),w.paintVertexShape(c,h,q,l,v),c.restore()));v<p&&(c.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),c.begin(),c.moveTo(h+l/2,q+v),c.lineTo(h+l/2,q+p),c.end(),c.stroke())};ca.prototype.paintForeground=function(c,h,q,l,p){var v=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,c,h,q,l,
+Math.min(p,v))};mxCellRenderer.registerShape("umlLifeline",ca);mxUtils.extend(oa,mxShape);oa.prototype.width=60;oa.prototype.height=30;oa.prototype.corner=10;oa.prototype.getLabelMargins=function(c){return new mxRectangle(0,0,c.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),c.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};oa.prototype.paintBackground=function(c,h,q,l,p){var v=this.corner,w=Math.min(l,Math.max(v,parseFloat(mxUtils.getValue(this.style,
"width",this.width)))),I=Math.min(p,Math.max(1.5*v,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),y=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);y!=mxConstants.NONE&&(c.setFillColor(y),c.rect(h,q,l,p),c.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(c,h,q,l,p),c.setGradient(this.fill,this.gradient,h,q,l,p,this.gradientDirection)):c.setFillColor(this.fill);c.begin();
c.moveTo(h,q);c.lineTo(h+w,q);c.lineTo(h+w,q+Math.max(0,I-1.5*v));c.lineTo(h+Math.max(0,w-v),q+I);c.lineTo(h,q+I);c.close();c.fillAndStroke();c.begin();c.moveTo(h+w,q);c.lineTo(h+l,q);c.lineTo(h+l,q+p);c.lineTo(h,q+p);c.lineTo(h,q+I);c.stroke()};mxCellRenderer.registerShape("umlFrame",oa);mxPerimeter.CenterPerimeter=function(c,h,q,l){return new mxPoint(c.getCenterX(),c.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(c,h,
-q,l){l=aa.prototype.size;null!=h&&(l=mxUtils.getValue(h.style,"size",l)*h.view.scale);h=parseFloat(h.style[mxConstants.STYLE_STROKEWIDTH]||1)*h.view.scale/2-1;q.x<c.getCenterX()&&(h=-1*(h+1));return new mxPoint(c.getCenterX()+h,Math.min(c.y+c.height,Math.max(c.y+l,q.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(c,h,q,l){l=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",
+q,l){l=ca.prototype.size;null!=h&&(l=mxUtils.getValue(h.style,"size",l)*h.view.scale);h=parseFloat(h.style[mxConstants.STYLE_STROKEWIDTH]||1)*h.view.scale/2-1;q.x<c.getCenterX()&&(h=-1*(h+1));return new mxPoint(c.getCenterX()+h,Math.min(c.y+c.height,Math.max(c.y+l,q.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(c,h,q,l){l=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",
mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(c,h,q,l){l=parseFloat(h.style[mxConstants.STYLE_STROKEWIDTH]||1)*h.view.scale/2-1;null!=h.style.backboneSize&&(l+=parseFloat(h.style.backboneSize)*h.view.scale/2-1);if("south"==h.style[mxConstants.STYLE_DIRECTION]||"north"==h.style[mxConstants.STYLE_DIRECTION])return q.x<c.getCenterX()&&(l=-1*(l+1)),new mxPoint(c.getCenterX()+l,Math.min(c.y+c.height,Math.max(c.y,q.y)));q.y<c.getCenterY()&&(l=-1*(l+1));return new mxPoint(Math.min(c.x+
-c.width,Math.max(c.x,q.x)),c.getCenterY()+l)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(c,h,q,l){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(c,new mxRectangle(0,0,0,Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(h.style,"size",ba.prototype.size))*h.view.scale))),h.style),h,q,l)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(c,
-h,q,l){var p="0"!=mxUtils.getValue(h.style,"fixedSize","0"),v=p?R.prototype.fixedSize:R.prototype.size;null!=h&&(v=mxUtils.getValue(h.style,"size",v));p&&(v*=h.view.scale);var w=c.x,I=c.y,y=c.width,Y=c.height;h=null!=h?mxUtils.getValue(h.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;h==mxConstants.DIRECTION_NORTH||h==mxConstants.DIRECTION_SOUTH?(p=p?Math.max(0,Math.min(Y,v)):Y*Math.max(0,Math.min(1,v)),I=[new mxPoint(w,I),new mxPoint(w+y,I+p),new mxPoint(w+
+c.width,Math.max(c.x,q.x)),c.getCenterY()+l)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(c,h,q,l){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(c,new mxRectangle(0,0,0,Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(h.style,"size",ea.prototype.size))*h.view.scale))),h.style),h,q,l)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(c,
+h,q,l){var p="0"!=mxUtils.getValue(h.style,"fixedSize","0"),v=p?T.prototype.fixedSize:T.prototype.size;null!=h&&(v=mxUtils.getValue(h.style,"size",v));p&&(v*=h.view.scale);var w=c.x,I=c.y,y=c.width,Y=c.height;h=null!=h?mxUtils.getValue(h.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;h==mxConstants.DIRECTION_NORTH||h==mxConstants.DIRECTION_SOUTH?(p=p?Math.max(0,Math.min(Y,v)):Y*Math.max(0,Math.min(1,v)),I=[new mxPoint(w,I),new mxPoint(w+y,I+p),new mxPoint(w+
y,I+Y),new mxPoint(w,I+Y-p),new mxPoint(w,I)]):(p=p?Math.max(0,Math.min(.5*y,v)):y*Math.max(0,Math.min(1,v)),I=[new mxPoint(w+p,I),new mxPoint(w+y,I),new mxPoint(w+y-p,I+Y),new mxPoint(w,I+Y),new mxPoint(w+p,I)]);Y=c.getCenterX();c=c.getCenterY();c=new mxPoint(Y,c);l&&(q.x<w||q.x>w+y?c.y=q.y:c.x=q.x);return mxUtils.getPerimeterPoint(I,c,q)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(c,h,q,l){var p="0"!=mxUtils.getValue(h.style,
"fixedSize","0"),v=p?P.prototype.fixedSize:P.prototype.size;null!=h&&(v=mxUtils.getValue(h.style,"size",v));p&&(v*=h.view.scale);var w=c.x,I=c.y,y=c.width,Y=c.height;h=null!=h?mxUtils.getValue(h.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;h==mxConstants.DIRECTION_EAST?(p=p?Math.max(0,Math.min(.5*y,v)):y*Math.max(0,Math.min(1,v)),I=[new mxPoint(w+p,I),new mxPoint(w+y-p,I),new mxPoint(w+y,I+Y),new mxPoint(w,I+Y),new mxPoint(w+p,I)]):h==mxConstants.DIRECTION_WEST?
(p=p?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),I=[new mxPoint(w,I),new mxPoint(w+y,I),new mxPoint(w+y-p,I+Y),new mxPoint(w+p,I+Y),new mxPoint(w,I)]):h==mxConstants.DIRECTION_NORTH?(p=p?Math.max(0,Math.min(Y,v)):Y*Math.max(0,Math.min(1,v)),I=[new mxPoint(w,I+p),new mxPoint(w+y,I),new mxPoint(w+y,I+Y),new mxPoint(w,I+Y-p),new mxPoint(w,I+p)]):(p=p?Math.max(0,Math.min(Y,v)):Y*Math.max(0,Math.min(1,v)),I=[new mxPoint(w,I),new mxPoint(w+y,I+p),new mxPoint(w+y,I+Y-p),new mxPoint(w,I+Y),new mxPoint(w,
@@ -3601,12 +3604,12 @@ h?mxUtils.getValue(h.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAS
y,I+Y),new mxPoint(w+p,I+Y),new mxPoint(w,c),new mxPoint(w+p,I)]):h==mxConstants.DIRECTION_NORTH?(p=p?Math.max(0,Math.min(Y,v)):Y*Math.max(0,Math.min(1,v)),I=[new mxPoint(w,I+p),new mxPoint(M,I),new mxPoint(w+y,I+p),new mxPoint(w+y,I+Y),new mxPoint(M,I+Y-p),new mxPoint(w,I+Y),new mxPoint(w,I+p)]):(p=p?Math.max(0,Math.min(Y,v)):Y*Math.max(0,Math.min(1,v)),I=[new mxPoint(w,I),new mxPoint(M,I+p),new mxPoint(w+y,I),new mxPoint(w+y,I+Y-p),new mxPoint(M,I+Y),new mxPoint(w,I+Y-p),new mxPoint(w,I)]);M=new mxPoint(M,
c);l&&(q.x<w||q.x>w+y?M.y=q.y:M.x=q.x);return mxUtils.getPerimeterPoint(I,M,q)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(c,h,q,l){var p="0"!=mxUtils.getValue(h.style,"fixedSize","0"),v=p?O.prototype.fixedSize:O.prototype.size;null!=h&&(v=mxUtils.getValue(h.style,"size",v));p&&(v*=h.view.scale);var w=c.x,I=c.y,y=c.width,Y=c.height,M=c.getCenterX();c=c.getCenterY();h=null!=h?mxUtils.getValue(h.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):
mxConstants.DIRECTION_EAST;h==mxConstants.DIRECTION_NORTH||h==mxConstants.DIRECTION_SOUTH?(p=p?Math.max(0,Math.min(Y,v)):Y*Math.max(0,Math.min(1,v)),I=[new mxPoint(M,I),new mxPoint(w+y,I+p),new mxPoint(w+y,I+Y-p),new mxPoint(M,I+Y),new mxPoint(w,I+Y-p),new mxPoint(w,I+p),new mxPoint(M,I)]):(p=p?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),I=[new mxPoint(w+p,I),new mxPoint(w+y-p,I),new mxPoint(w+y,c),new mxPoint(w+y-p,I+Y),new mxPoint(w+p,I+Y),new mxPoint(w,c),new mxPoint(w+p,I)]);M=new mxPoint(M,
-c);l&&(q.x<w||q.x>w+y?M.y=q.y:M.x=q.x);return mxUtils.getPerimeterPoint(I,M,q)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(sa,mxShape);sa.prototype.size=10;sa.prototype.paintBackground=function(c,h,q,l,p){var v=parseFloat(mxUtils.getValue(this.style,"size",this.size));c.translate(h,q);c.ellipse((l-v)/2,0,v,v);c.fillAndStroke();c.begin();c.moveTo(l/2,v);c.lineTo(l/2,p);c.end();c.stroke()};mxCellRenderer.registerShape("lollipop",sa);mxUtils.extend(Ka,
+c);l&&(q.x<w||q.x>w+y?M.y=q.y:M.x=q.x);return mxUtils.getPerimeterPoint(I,M,q)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(ta,mxShape);ta.prototype.size=10;ta.prototype.paintBackground=function(c,h,q,l,p){var v=parseFloat(mxUtils.getValue(this.style,"size",this.size));c.translate(h,q);c.ellipse((l-v)/2,0,v,v);c.fillAndStroke();c.begin();c.moveTo(l/2,v);c.lineTo(l/2,p);c.end();c.stroke()};mxCellRenderer.registerShape("lollipop",ta);mxUtils.extend(Ka,
mxShape);Ka.prototype.size=10;Ka.prototype.inset=2;Ka.prototype.paintBackground=function(c,h,q,l,p){var v=parseFloat(mxUtils.getValue(this.style,"size",this.size)),w=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(h,q);c.begin();c.moveTo(l/2,v+w);c.lineTo(l/2,p);c.end();c.stroke();c.begin();c.moveTo((l-v)/2-w,v/2);c.quadTo((l-v)/2-w,v+w,l/2,v+w);c.quadTo((l+v)/2+w,v+w,(l+v)/2+w,v/2);c.end();c.stroke()};mxCellRenderer.registerShape("requires",Ka);mxUtils.extend(Ha,
-mxShape);Ha.prototype.paintBackground=function(c,h,q,l,p){c.translate(h,q);c.begin();c.moveTo(0,0);c.quadTo(l,0,l,p/2);c.quadTo(l,p,0,p);c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",Ha);mxUtils.extend(ua,mxShape);ua.prototype.inset=2;ua.prototype.paintBackground=function(c,h,q,l,p){var v=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(h,q);c.ellipse(0,v,l-2*v,p-2*v);c.fillAndStroke();c.begin();c.moveTo(l/2,0);c.quadTo(l,0,l,p/2);c.quadTo(l,
-p,l/2,p);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",ua);mxUtils.extend(Ca,mxCylinder);Ca.prototype.jettyWidth=20;Ca.prototype.jettyHeight=10;Ca.prototype.redrawPath=function(c,h,q,l,p,v){var w=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));h=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));q=w/2;w=q+w/2;var I=Math.min(h,p-h),y=Math.min(I+2*h,p-h);v?(c.moveTo(q,I),c.lineTo(w,I),c.lineTo(w,I+h),c.lineTo(q,I+h),c.moveTo(q,
-y),c.lineTo(w,y),c.lineTo(w,y+h),c.lineTo(q,y+h)):(c.moveTo(q,0),c.lineTo(l,0),c.lineTo(l,p),c.lineTo(q,p),c.lineTo(q,y+h),c.lineTo(0,y+h),c.lineTo(0,y),c.lineTo(q,y),c.lineTo(q,I+h),c.lineTo(0,I+h),c.lineTo(0,I),c.lineTo(q,I),c.close());c.end()};mxCellRenderer.registerShape("module",Ca);mxUtils.extend(ra,mxCylinder);ra.prototype.jettyWidth=32;ra.prototype.jettyHeight=12;ra.prototype.redrawPath=function(c,h,q,l,p,v){var w=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));h=parseFloat(mxUtils.getValue(this.style,
-"jettyHeight",this.jettyHeight));q=w/2;w=q+w/2;var I=.3*p-h/2,y=.7*p-h/2;v?(c.moveTo(q,I),c.lineTo(w,I),c.lineTo(w,I+h),c.lineTo(q,I+h),c.moveTo(q,y),c.lineTo(w,y),c.lineTo(w,y+h),c.lineTo(q,y+h)):(c.moveTo(q,0),c.lineTo(l,0),c.lineTo(l,p),c.lineTo(q,p),c.lineTo(q,y+h),c.lineTo(0,y+h),c.lineTo(0,y),c.lineTo(q,y),c.lineTo(q,I+h),c.lineTo(0,I+h),c.lineTo(0,I),c.lineTo(q,I),c.close());c.end()};mxCellRenderer.registerShape("component",ra);mxUtils.extend(Da,mxRectangleShape);Da.prototype.paintForeground=
+mxShape);Ha.prototype.paintBackground=function(c,h,q,l,p){c.translate(h,q);c.begin();c.moveTo(0,0);c.quadTo(l,0,l,p/2);c.quadTo(l,p,0,p);c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",Ha);mxUtils.extend(va,mxShape);va.prototype.inset=2;va.prototype.paintBackground=function(c,h,q,l,p){var v=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(h,q);c.ellipse(0,v,l-2*v,p-2*v);c.fillAndStroke();c.begin();c.moveTo(l/2,0);c.quadTo(l,0,l,p/2);c.quadTo(l,
+p,l/2,p);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",va);mxUtils.extend(Ca,mxCylinder);Ca.prototype.jettyWidth=20;Ca.prototype.jettyHeight=10;Ca.prototype.redrawPath=function(c,h,q,l,p,v){var w=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));h=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));q=w/2;w=q+w/2;var I=Math.min(h,p-h),y=Math.min(I+2*h,p-h);v?(c.moveTo(q,I),c.lineTo(w,I),c.lineTo(w,I+h),c.lineTo(q,I+h),c.moveTo(q,
+y),c.lineTo(w,y),c.lineTo(w,y+h),c.lineTo(q,y+h)):(c.moveTo(q,0),c.lineTo(l,0),c.lineTo(l,p),c.lineTo(q,p),c.lineTo(q,y+h),c.lineTo(0,y+h),c.lineTo(0,y),c.lineTo(q,y),c.lineTo(q,I+h),c.lineTo(0,I+h),c.lineTo(0,I),c.lineTo(q,I),c.close());c.end()};mxCellRenderer.registerShape("module",Ca);mxUtils.extend(sa,mxCylinder);sa.prototype.jettyWidth=32;sa.prototype.jettyHeight=12;sa.prototype.redrawPath=function(c,h,q,l,p,v){var w=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));h=parseFloat(mxUtils.getValue(this.style,
+"jettyHeight",this.jettyHeight));q=w/2;w=q+w/2;var I=.3*p-h/2,y=.7*p-h/2;v?(c.moveTo(q,I),c.lineTo(w,I),c.lineTo(w,I+h),c.lineTo(q,I+h),c.moveTo(q,y),c.lineTo(w,y),c.lineTo(w,y+h),c.lineTo(q,y+h)):(c.moveTo(q,0),c.lineTo(l,0),c.lineTo(l,p),c.lineTo(q,p),c.lineTo(q,y+h),c.lineTo(0,y+h),c.lineTo(0,y),c.lineTo(q,y),c.lineTo(q,I+h),c.lineTo(0,I+h),c.lineTo(0,I),c.lineTo(q,I),c.close());c.end()};mxCellRenderer.registerShape("component",sa);mxUtils.extend(Da,mxRectangleShape);Da.prototype.paintForeground=
function(c,h,q,l,p){var v=l/2,w=p/2,I=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c.begin();this.addPoints(c,[new mxPoint(h+v,q),new mxPoint(h+l,q+w),new mxPoint(h+v,q+p),new mxPoint(h,q+w)],this.isRounded,I,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",Da);mxUtils.extend(Ua,mxDoubleEllipse);Ua.prototype.outerStroke=!0;Ua.prototype.paintVertexShape=function(c,h,q,l,p){var v=Math.min(4,
Math.min(l/5,p/5));0<l&&0<p&&(c.ellipse(h+v,q+v,l-2*v,p-2*v),c.fillAndStroke());c.setShadow(!1);this.outerStroke&&(c.ellipse(h,q,l,p),c.stroke())};mxCellRenderer.registerShape("endState",Ua);mxUtils.extend(db,Ua);db.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",db);mxUtils.extend(Ta,mxArrowConnector);Ta.prototype.defaultWidth=4;Ta.prototype.isOpenEnded=function(){return!0};Ta.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,
this.strokewidth-1)};Ta.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",Ta);mxUtils.extend($a,mxArrowConnector);$a.prototype.defaultWidth=10;$a.prototype.defaultArrowWidth=20;$a.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};$a.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};$a.prototype.getEdgeWidth=
@@ -3620,11 +3623,11 @@ this.arrowWidth))));h=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.s
h,q,l,p){var v=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",da.prototype.arrowWidth))));h=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",da.prototype.arrowSize))));q=(p-v)/2;v=q+v;var w=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,p/2),new mxPoint(h,0),new mxPoint(h,q),new mxPoint(l-h,q),new mxPoint(l-h,0),new mxPoint(l,p/2),new mxPoint(l-h,p),new mxPoint(l-h,v),new mxPoint(h,
v),new mxPoint(h,p)],this.isRounded,w,!0);c.end()};mxCellRenderer.registerShape("doubleArrow",t);mxUtils.extend(z,mxActor);z.prototype.size=.1;z.prototype.fixedSize=20;z.prototype.redrawPath=function(c,h,q,l,p){h="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(h,0);c.lineTo(l,0);c.quadTo(l-2*h,p/2,l,p);c.lineTo(h,p);c.quadTo(h-
2*h,p/2,h,0);c.close();c.end()};mxCellRenderer.registerShape("dataStorage",z);mxUtils.extend(A,mxActor);A.prototype.redrawPath=function(c,h,q,l,p){c.moveTo(0,0);c.quadTo(l,0,l,p/2);c.quadTo(l,p,0,p);c.close();c.end()};mxCellRenderer.registerShape("or",A);mxUtils.extend(E,mxActor);E.prototype.redrawPath=function(c,h,q,l,p){c.moveTo(0,0);c.quadTo(l,0,l,p/2);c.quadTo(l,p,0,p);c.quadTo(l/2,p/2,0,0);c.close();c.end()};mxCellRenderer.registerShape("xor",E);mxUtils.extend(H,mxActor);H.prototype.size=20;
-H.prototype.isRoundable=function(){return!0};H.prototype.redrawPath=function(c,h,q,l,p){h=Math.min(l/2,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(h,0),new mxPoint(l-h,0),new mxPoint(l,.8*h),new mxPoint(l,p),new mxPoint(0,p),new mxPoint(0,.8*h)],this.isRounded,q,!0);c.end()};mxCellRenderer.registerShape("loopLimit",H);mxUtils.extend(K,mxActor);K.prototype.size=
-.375;K.prototype.isRoundable=function(){return!0};K.prototype.redrawPath=function(c,h,q,l,p){h=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(l,0),new mxPoint(l,p-h),new mxPoint(l/2,p),new mxPoint(0,p-h)],this.isRounded,q,!0);c.end()};mxCellRenderer.registerShape("offPageConnector",K);mxUtils.extend(X,mxEllipse);X.prototype.paintVertexShape=
-function(c,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(h+l/2,q+p);c.lineTo(h+l,q+p);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",X);mxUtils.extend(ja,mxEllipse);ja.prototype.paintVertexShape=function(c,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(h,q+p/2);c.lineTo(h+l,q+p/2);c.end();c.stroke();c.begin();c.moveTo(h+l/2,q);c.lineTo(h+l/2,q+p);c.end();c.stroke()};mxCellRenderer.registerShape("orEllipse",
-ja);mxUtils.extend(ea,mxEllipse);ea.prototype.paintVertexShape=function(c,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(h+.145*l,q+.145*p);c.lineTo(h+.855*l,q+.855*p);c.end();c.stroke();c.begin();c.moveTo(h+.855*l,q+.145*p);c.lineTo(h+.145*l,q+.855*p);c.end();c.stroke()};mxCellRenderer.registerShape("sumEllipse",ea);mxUtils.extend(ka,mxRhombus);ka.prototype.paintVertexShape=function(c,h,q,l,p){mxRhombus.prototype.paintVertexShape.apply(this,
-arguments);c.setShadow(!1);c.begin();c.moveTo(h,q+p/2);c.lineTo(h+l,q+p/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",ka);mxUtils.extend(ta,mxEllipse);ta.prototype.paintVertexShape=function(c,h,q,l,p){c.begin();c.moveTo(h,q);c.lineTo(h+l,q);c.lineTo(h+l/2,q+p/2);c.close();c.fillAndStroke();c.begin();c.moveTo(h,q+p);c.lineTo(h+l,q+p);c.lineTo(h+l/2,q+p/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",ta);mxUtils.extend(Aa,mxEllipse);Aa.prototype.paintVertexShape=
+H.prototype.isRoundable=function(){return!0};H.prototype.redrawPath=function(c,h,q,l,p){h=Math.min(l/2,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(h,0),new mxPoint(l-h,0),new mxPoint(l,.8*h),new mxPoint(l,p),new mxPoint(0,p),new mxPoint(0,.8*h)],this.isRounded,q,!0);c.end()};mxCellRenderer.registerShape("loopLimit",H);mxUtils.extend(L,mxActor);L.prototype.size=
+.375;L.prototype.isRoundable=function(){return!0};L.prototype.redrawPath=function(c,h,q,l,p){h=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));q=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(l,0),new mxPoint(l,p-h),new mxPoint(l/2,p),new mxPoint(0,p-h)],this.isRounded,q,!0);c.end()};mxCellRenderer.registerShape("offPageConnector",L);mxUtils.extend(W,mxEllipse);W.prototype.paintVertexShape=
+function(c,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(h+l/2,q+p);c.lineTo(h+l,q+p);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",W);mxUtils.extend(ha,mxEllipse);ha.prototype.paintVertexShape=function(c,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(h,q+p/2);c.lineTo(h+l,q+p/2);c.end();c.stroke();c.begin();c.moveTo(h+l/2,q);c.lineTo(h+l/2,q+p);c.end();c.stroke()};mxCellRenderer.registerShape("orEllipse",
+ha);mxUtils.extend(fa,mxEllipse);fa.prototype.paintVertexShape=function(c,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(h+.145*l,q+.145*p);c.lineTo(h+.855*l,q+.855*p);c.end();c.stroke();c.begin();c.moveTo(h+.855*l,q+.145*p);c.lineTo(h+.145*l,q+.855*p);c.end();c.stroke()};mxCellRenderer.registerShape("sumEllipse",fa);mxUtils.extend(ja,mxRhombus);ja.prototype.paintVertexShape=function(c,h,q,l,p){mxRhombus.prototype.paintVertexShape.apply(this,
+arguments);c.setShadow(!1);c.begin();c.moveTo(h,q+p/2);c.lineTo(h+l,q+p/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",ja);mxUtils.extend(ua,mxEllipse);ua.prototype.paintVertexShape=function(c,h,q,l,p){c.begin();c.moveTo(h,q);c.lineTo(h+l,q);c.lineTo(h+l/2,q+p/2);c.close();c.fillAndStroke();c.begin();c.moveTo(h,q+p);c.lineTo(h+l,q+p);c.lineTo(h+l/2,q+p/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",ua);mxUtils.extend(Aa,mxEllipse);Aa.prototype.paintVertexShape=
function(c,h,q,l,p){var v=c.state.strokeWidth/2,w=10+2*v,I=q+p-w/2;c.begin();c.moveTo(h,q);c.lineTo(h,q+p);c.moveTo(h+v,I);c.lineTo(h+v+w,I-w/2);c.moveTo(h+v,I);c.lineTo(h+v+w,I+w/2);c.moveTo(h+v,I);c.lineTo(h+l-v,I);c.moveTo(h+l,q);c.lineTo(h+l,q+p);c.moveTo(h+l-v,I);c.lineTo(h+l-w-v,I-w/2);c.moveTo(h+l-v,I);c.lineTo(h+l-w-v,I+w/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",Aa);mxUtils.extend(Ea,mxEllipse);Ea.prototype.drawHidden=!0;Ea.prototype.paintVertexShape=function(c,h,q,
l,p){this.outline||c.setStrokeColor(null);if(null!=this.style){var v=c.pointerEvents,w=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||w||(c.pointerEvents=!1);var I="1"==mxUtils.getValue(this.style,"top","1"),y="1"==mxUtils.getValue(this.style,"left","1"),Y="1"==mxUtils.getValue(this.style,"right","1"),M="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||w||this.outline||I||Y||M||y?(c.rect(h,q,l,p),c.fill(),c.pointerEvents=
v,c.setStrokeColor(this.stroke),c.setLineCap("square"),c.begin(),c.moveTo(h,q),this.outline||I?c.lineTo(h+l,q):c.moveTo(h+l,q),this.outline||Y?c.lineTo(h+l,q+p):c.moveTo(h+l,q+p),this.outline||M?c.lineTo(h,q+p):c.moveTo(h,q+p),(this.outline||y)&&c.lineTo(h,q),c.end(),c.stroke(),c.setLineCap("flat")):c.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Ea);mxUtils.extend(Ma,mxEllipse);Ma.prototype.paintVertexShape=function(c,h,q,l,p){mxEllipse.prototype.paintVertexShape.apply(this,
@@ -3637,34 +3640,34 @@ type:"bool",defVal:!0},{name:"left",dispName:"Left ",type:"bool",defVal:!0},{nam
{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"}]}];Ga.prototype.paintVertexShape=function(c,h,q,l,p){c.translate(h,q);this.strictDrawShape(c,0,0,l,p)};Ga.prototype.strictDrawShape=function(c,h,q,l,p,v){var w=v&&v.rectStyle?v.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),I=v&&v.absoluteCornerSize?v.absoluteCornerSize:mxUtils.getValue(this.style,
"absoluteCornerSize",this.absoluteCornerSize),y=v&&v.size?v.size:Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),Y=v&&v.rectOutline?v.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),M=v&&v.indent?v.indent:Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),Ba=v&&v.dashed?v.dashed:mxUtils.getValue(this.style,"dashed",!1),Qa=v&&v.dashPattern?v.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),Ja=v&&
-v.relIndent?v.relIndent:Math.max(0,Math.min(50,M)),la=v&&v.top?v.top:mxUtils.getValue(this.style,"top",!0),pa=v&&v.right?v.right:mxUtils.getValue(this.style,"right",!0),na=v&&v.bottom?v.bottom:mxUtils.getValue(this.style,"bottom",!0),ma=v&&v.left?v.left:mxUtils.getValue(this.style,"left",!0),va=v&&v.topLeftStyle?v.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),xa=v&&v.topRightStyle?v.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),ya=v&&v.bottomRightStyle?
+v.relIndent?v.relIndent:Math.max(0,Math.min(50,M)),ka=v&&v.top?v.top:mxUtils.getValue(this.style,"top",!0),pa=v&&v.right?v.right:mxUtils.getValue(this.style,"right",!0),na=v&&v.bottom?v.bottom:mxUtils.getValue(this.style,"bottom",!0),ma=v&&v.left?v.left:mxUtils.getValue(this.style,"left",!0),wa=v&&v.topLeftStyle?v.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),xa=v&&v.topRightStyle?v.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),ya=v&&v.bottomRightStyle?
v.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),za=v&&v.bottomLeftStyle?v.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),zb=v&&v.fillColor?v.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");v&&v.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var Ab=v&&v.strokeWidth?v.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),wb=v&&v.fillColor2?v.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),yb=v&&v.gradientColor2?
v.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),Bb=v&&v.gradientDirection2?v.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Cb=v&&v.opacity?v.opacity:mxUtils.getValue(this.style,"opacity","100"),Db=Math.max(0,Math.min(50,y));v=Ga.prototype;c.setDashed(Ba);Qa&&""!=Qa&&c.setDashPattern(Qa);c.setStrokeWidth(Ab);y=Math.min(.5*p,.5*l,y);I||(y=Db*Math.min(l,p)/100);y=Math.min(y,.5*Math.min(l,p));I||(M=Math.min(Ja*Math.min(l,p)/100));M=Math.min(M,.5*Math.min(l,
-p)-y);(la||pa||na||ma)&&"frame"!=Y&&(c.begin(),la?v.moveNW(c,h,q,l,p,w,va,y,ma):c.moveTo(0,0),la&&v.paintNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),pa&&v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),na&&v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),ma&&v.paintSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,va,y,la),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(wb),Ba=I=Cb,"none"==wb&&(I=0),"none"==yb&&(Ba=0),c.setGradient(wb,yb,0,0,l,p,Bb,I,Ba),
-c.begin(),la?v.moveNWInner(c,h,q,l,p,w,va,y,M,la,ma):c.moveTo(M,0),v.paintLeftInner(c,h,q,l,p,w,za,y,M,na,ma),ma&&na&&v.paintSWInner(c,h,q,l,p,w,za,y,M,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na),na&&pa&&v.paintSEInner(c,h,q,l,p,w,ya,y,M),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa),pa&&la&&v.paintNEInner(c,h,q,l,p,w,xa,y,M),v.paintTopInner(c,h,q,l,p,w,va,y,M,ma,la),la&&ma&&v.paintNWInner(c,h,q,l,p,w,va,y,M),c.fill(),"none"==zb&&(c.begin(),v.paintFolds(c,h,q,l,p,w,va,xa,ya,za,y,la,pa,na,ma),c.stroke()));
-la||pa||na||!ma?la||pa||!na||ma?!la&&!pa&&na&&ma?"frame"!=Y?(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,va,y,la),"double"==Y&&(v.moveNWInner(c,h,q,l,p,w,va,y,M,la,ma),v.paintLeftInner(c,h,q,l,p,w,za,y,M,na,ma),v.paintSWInner(c,h,q,l,p,w,za,y,M,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na)),c.stroke()):(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,
-h,q,l,p,w,va,y,la),v.lineNWInner(c,h,q,l,p,w,va,y,M,la,ma),v.paintLeftInner(c,h,q,l,p,w,za,y,M,na,ma),v.paintSWInner(c,h,q,l,p,w,za,y,M,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na),c.close(),c.fillAndStroke()):la||!pa||na||ma?!la&&pa&&!na&&ma?"frame"!=Y?(c.begin(),v.moveSW(c,h,q,l,p,w,va,y,na),v.paintLeft(c,h,q,l,p,w,va,y,la),"double"==Y&&(v.moveNWInner(c,h,q,l,p,w,va,y,M,la,ma),v.paintLeftInner(c,h,q,l,p,w,za,y,M,na,ma)),c.stroke(),c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,
-p,w,ya,y,na),"double"==Y&&(v.moveSEInner(c,h,q,l,p,w,ya,y,M,na),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa)),c.stroke()):(c.begin(),v.moveSW(c,h,q,l,p,w,va,y,na),v.paintLeft(c,h,q,l,p,w,va,y,la),v.lineNWInner(c,h,q,l,p,w,va,y,M,la,ma),v.paintLeftInner(c,h,q,l,p,w,za,y,M,na,ma),c.close(),c.fillAndStroke(),c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),v.lineSEInner(c,h,q,l,p,w,ya,y,M,na),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa),c.close(),c.fillAndStroke()):!la&&pa&&na&&
-!ma?"frame"!=Y?(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),"double"==Y&&(v.moveSWInner(c,h,q,l,p,w,za,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,M),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa)),c.stroke()):(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.lineSWInner(c,
-h,q,l,p,w,za,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,M),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa),c.close(),c.fillAndStroke()):!la&&pa&&na&&ma?"frame"!=Y?(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,va,y,la),"double"==Y&&(v.moveNWInner(c,h,q,l,p,w,va,y,M,la,ma),v.paintLeftInner(c,h,q,l,p,w,za,y,M,na,ma),
-v.paintSWInner(c,h,q,l,p,w,za,y,M,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,M),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa)),c.stroke()):(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,va,y,la),v.lineNWInner(c,h,q,l,p,w,va,y,M,la,ma),v.paintLeftInner(c,h,q,l,p,w,za,y,M,na,ma),v.paintSWInner(c,h,q,l,p,w,za,y,M,na),
-v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,M),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa),c.close(),c.fillAndStroke()):!la||pa||na||ma?la&&!pa&&!na&&ma?"frame"!=Y?(c.begin(),v.moveSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,va,y,la),v.paintNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),"double"==Y&&(v.moveNEInner(c,h,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,h,q,l,p,w,va,y,M,ma,la),v.paintNWInner(c,h,q,l,p,w,va,y,M),v.paintLeftInner(c,h,q,l,p,w,za,y,M,na,
-ma)),c.stroke()):(c.begin(),v.moveSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,va,y,la),v.paintNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.lineNEInner(c,h,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,h,q,l,p,w,va,y,M,ma,la),v.paintNWInner(c,h,q,l,p,w,va,y,M),v.paintLeftInner(c,h,q,l,p,w,za,y,M,na,ma),c.close(),c.fillAndStroke()):la&&!pa&&na&&!ma?"frame"!=Y?(c.begin(),v.moveNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),"double"==Y&&(v.moveNEInner(c,h,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,
-h,q,l,p,w,va,y,M,ma,la)),c.stroke(),c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),"double"==Y&&(v.moveSWInner(c,h,q,l,p,w,za,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na)),c.stroke()):(c.begin(),v.moveNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.lineNEInner(c,h,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,h,q,l,p,w,va,y,M,ma,la),c.close(),c.fillAndStroke(),c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.lineSWInner(c,h,q,l,p,w,
-za,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na),c.close(),c.fillAndStroke()):la&&!pa&&na&&ma?"frame"!=Y?(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,va,y,la),v.paintNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),"double"==Y&&(v.moveNEInner(c,h,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,h,q,l,p,w,va,y,M,ma,la),v.paintNWInner(c,h,q,l,p,w,va,y,M),v.paintLeftInner(c,h,q,l,p,w,za,y,M,na,ma),v.paintSWInner(c,
-h,q,l,p,w,za,y,M,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na)),c.stroke()):(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,va,y,la),v.paintNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.lineNEInner(c,h,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,h,q,l,p,w,va,y,M,ma,la),v.paintNWInner(c,h,q,l,p,w,va,y,M),v.paintLeftInner(c,h,q,l,p,w,za,y,M,na,ma),v.paintSWInner(c,h,q,l,p,w,za,y,M,na),v.paintBottomInner(c,h,q,
-l,p,w,ya,y,M,pa,na),c.close(),c.fillAndStroke()):la&&pa&&!na&&!ma?"frame"!=Y?(c.begin(),v.moveNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),"double"==Y&&(v.moveSEInner(c,h,q,l,p,w,ya,y,M,na),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,M),v.paintTopInner(c,h,q,l,p,w,va,y,M,ma,la)),c.stroke()):(c.begin(),v.moveNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),
-v.paintRight(c,h,q,l,p,w,ya,y,na),v.lineSEInner(c,h,q,l,p,w,ya,y,M,na),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,M),v.paintTopInner(c,h,q,l,p,w,va,y,M,ma,la),c.close(),c.fillAndStroke()):la&&pa&&!na&&ma?"frame"!=Y?(c.begin(),v.moveSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,va,y,la),v.paintNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),"double"==Y&&(v.moveSEInner(c,h,q,l,p,w,ya,y,M,na),
-v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,M),v.paintTopInner(c,h,q,l,p,w,va,y,M,ma,la),v.paintNWInner(c,h,q,l,p,w,va,y,M),v.paintLeftInner(c,h,q,l,p,w,za,y,M,na,ma)),c.stroke()):(c.begin(),v.moveSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,va,y,la),v.paintNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),v.lineSEInner(c,h,q,l,p,w,ya,y,M,na),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa),v.paintNEInner(c,
-h,q,l,p,w,xa,y,M),v.paintTopInner(c,h,q,l,p,w,va,y,M,ma,la),v.paintNWInner(c,h,q,l,p,w,va,y,M),v.paintLeftInner(c,h,q,l,p,w,za,y,M,na,ma),c.close(),c.fillAndStroke()):la&&pa&&na&&!ma?"frame"!=Y?(c.begin(),v.moveNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),"double"==Y&&(v.moveSWInner(c,h,q,l,p,w,za,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na),v.paintSEInner(c,
-h,q,l,p,w,ya,y,M),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,M),v.paintTopInner(c,h,q,l,p,w,va,y,M,ma,la)),c.stroke()):(c.begin(),v.moveNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.lineSWInner(c,h,q,l,p,w,za,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,M),v.paintRightInner(c,h,q,l,p,
-w,xa,y,M,la,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,M),v.paintTopInner(c,h,q,l,p,w,va,y,M,ma,la),c.close(),c.fillAndStroke()):la&&pa&&na&&ma&&("frame"!=Y?(c.begin(),v.moveNW(c,h,q,l,p,w,va,y,ma),v.paintNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,va,y,la),c.close(),"double"==Y&&(v.moveSWInner(c,h,q,l,p,w,za,
-y,M,ma),v.paintSWInner(c,h,q,l,p,w,za,y,M,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,M),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,M),v.paintTopInner(c,h,q,l,p,w,va,y,M,ma,la),v.paintNWInner(c,h,q,l,p,w,va,y,M),v.paintLeftInner(c,h,q,l,p,w,za,y,M,na,ma),c.close()),c.stroke()):(c.begin(),v.moveNW(c,h,q,l,p,w,va,y,ma),v.paintNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,
-l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,va,y,la),c.close(),v.moveSWInner(c,h,q,l,p,w,za,y,M,ma),v.paintSWInner(c,h,q,l,p,w,za,y,M,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,M),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,M),v.paintTopInner(c,h,q,l,p,w,va,y,M,ma,la),v.paintNWInner(c,h,q,l,p,w,va,y,M),v.paintLeftInner(c,h,q,l,p,w,za,y,M,
-na,ma),c.close(),c.fillAndStroke())):"frame"!=Y?(c.begin(),v.moveNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),"double"==Y&&(v.moveNEInner(c,h,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,h,q,l,p,w,va,y,M,ma,la)),c.stroke()):(c.begin(),v.moveNW(c,h,q,l,p,w,va,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.lineNEInner(c,h,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,h,q,l,p,w,va,y,M,ma,la),c.close(),c.fillAndStroke()):"frame"!=Y?(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),"double"==
-Y&&(v.moveSEInner(c,h,q,l,p,w,ya,y,M,na),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa)),c.stroke()):(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,la),v.paintRight(c,h,q,l,p,w,ya,y,na),v.lineSEInner(c,h,q,l,p,w,ya,y,M,na),v.paintRightInner(c,h,q,l,p,w,xa,y,M,la,pa),c.close(),c.fillAndStroke()):"frame"!=Y?(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),"double"==Y&&(v.moveSWInner(c,h,q,l,p,w,za,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na)),c.stroke()):(c.begin(),v.moveSE(c,
-h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.lineSWInner(c,h,q,l,p,w,za,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na),c.close(),c.fillAndStroke()):"frame"!=Y?(c.begin(),v.moveSW(c,h,q,l,p,w,va,y,na),v.paintLeft(c,h,q,l,p,w,va,y,la),"double"==Y&&(v.moveNWInner(c,h,q,l,p,w,va,y,M,la,ma),v.paintLeftInner(c,h,q,l,p,w,za,y,M,na,ma)),c.stroke()):(c.begin(),v.moveSW(c,h,q,l,p,w,va,y,na),v.paintLeft(c,h,q,l,p,w,va,y,la),v.lineNWInner(c,h,q,l,p,w,va,y,M,la,ma),v.paintLeftInner(c,h,q,l,p,
-w,za,y,M,na,ma),c.close(),c.fillAndStroke());c.begin();v.paintFolds(c,h,q,l,p,w,va,xa,ya,za,y,la,pa,na,ma);c.stroke()};Ga.prototype.moveNW=function(c,h,q,l,p,v,w,I,y){"square"==w||"default"==w&&"square"==v||!y?c.moveTo(0,0):c.moveTo(0,I)};Ga.prototype.moveNE=function(c,h,q,l,p,v,w,I,y){"square"==w||"default"==w&&"square"==v||!y?c.moveTo(l,0):c.moveTo(l-I,0)};Ga.prototype.moveSE=function(c,h,q,l,p,v,w,I,y){"square"==w||"default"==w&&"square"==v||!y?c.moveTo(l,p):c.moveTo(l,p-I)};Ga.prototype.moveSW=
+p)-y);(ka||pa||na||ma)&&"frame"!=Y&&(c.begin(),ka?v.moveNW(c,h,q,l,p,w,wa,y,ma):c.moveTo(0,0),ka&&v.paintNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),pa&&v.paintNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,l,p,w,ya,y,na),na&&v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),ma&&v.paintSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,wa,y,ka),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(wb),Ba=I=Cb,"none"==wb&&(I=0),"none"==yb&&(Ba=0),c.setGradient(wb,yb,0,0,l,p,Bb,I,Ba),
+c.begin(),ka?v.moveNWInner(c,h,q,l,p,w,wa,y,M,ka,ma):c.moveTo(M,0),v.paintLeftInner(c,h,q,l,p,w,za,y,M,na,ma),ma&&na&&v.paintSWInner(c,h,q,l,p,w,za,y,M,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na),na&&pa&&v.paintSEInner(c,h,q,l,p,w,ya,y,M),v.paintRightInner(c,h,q,l,p,w,xa,y,M,ka,pa),pa&&ka&&v.paintNEInner(c,h,q,l,p,w,xa,y,M),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,ka),ka&&ma&&v.paintNWInner(c,h,q,l,p,w,wa,y,M),c.fill(),"none"==zb&&(c.begin(),v.paintFolds(c,h,q,l,p,w,wa,xa,ya,za,y,ka,pa,na,ma),c.stroke()));
+ka||pa||na||!ma?ka||pa||!na||ma?!ka&&!pa&&na&&ma?"frame"!=Y?(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,wa,y,ka),"double"==Y&&(v.moveNWInner(c,h,q,l,p,w,wa,y,M,ka,ma),v.paintLeftInner(c,h,q,l,p,w,za,y,M,na,ma),v.paintSWInner(c,h,q,l,p,w,za,y,M,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na)),c.stroke()):(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,
+h,q,l,p,w,wa,y,ka),v.lineNWInner(c,h,q,l,p,w,wa,y,M,ka,ma),v.paintLeftInner(c,h,q,l,p,w,za,y,M,na,ma),v.paintSWInner(c,h,q,l,p,w,za,y,M,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na),c.close(),c.fillAndStroke()):ka||!pa||na||ma?!ka&&pa&&!na&&ma?"frame"!=Y?(c.begin(),v.moveSW(c,h,q,l,p,w,wa,y,na),v.paintLeft(c,h,q,l,p,w,wa,y,ka),"double"==Y&&(v.moveNWInner(c,h,q,l,p,w,wa,y,M,ka,ma),v.paintLeftInner(c,h,q,l,p,w,za,y,M,na,ma)),c.stroke(),c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,l,
+p,w,ya,y,na),"double"==Y&&(v.moveSEInner(c,h,q,l,p,w,ya,y,M,na),v.paintRightInner(c,h,q,l,p,w,xa,y,M,ka,pa)),c.stroke()):(c.begin(),v.moveSW(c,h,q,l,p,w,wa,y,na),v.paintLeft(c,h,q,l,p,w,wa,y,ka),v.lineNWInner(c,h,q,l,p,w,wa,y,M,ka,ma),v.paintLeftInner(c,h,q,l,p,w,za,y,M,na,ma),c.close(),c.fillAndStroke(),c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,l,p,w,ya,y,na),v.lineSEInner(c,h,q,l,p,w,ya,y,M,na),v.paintRightInner(c,h,q,l,p,w,xa,y,M,ka,pa),c.close(),c.fillAndStroke()):!ka&&pa&&na&&
+!ma?"frame"!=Y?(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),"double"==Y&&(v.moveSWInner(c,h,q,l,p,w,za,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,M),v.paintRightInner(c,h,q,l,p,w,xa,y,M,ka,pa)),c.stroke()):(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.lineSWInner(c,
+h,q,l,p,w,za,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,M),v.paintRightInner(c,h,q,l,p,w,xa,y,M,ka,pa),c.close(),c.fillAndStroke()):!ka&&pa&&na&&ma?"frame"!=Y?(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,wa,y,ka),"double"==Y&&(v.moveNWInner(c,h,q,l,p,w,wa,y,M,ka,ma),v.paintLeftInner(c,h,q,l,p,w,za,y,M,na,ma),
+v.paintSWInner(c,h,q,l,p,w,za,y,M,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,M),v.paintRightInner(c,h,q,l,p,w,xa,y,M,ka,pa)),c.stroke()):(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,wa,y,ka),v.lineNWInner(c,h,q,l,p,w,wa,y,M,ka,ma),v.paintLeftInner(c,h,q,l,p,w,za,y,M,na,ma),v.paintSWInner(c,h,q,l,p,w,za,y,M,na),
+v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,M),v.paintRightInner(c,h,q,l,p,w,xa,y,M,ka,pa),c.close(),c.fillAndStroke()):!ka||pa||na||ma?ka&&!pa&&!na&&ma?"frame"!=Y?(c.begin(),v.moveSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,wa,y,ka),v.paintNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),"double"==Y&&(v.moveNEInner(c,h,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,ka),v.paintNWInner(c,h,q,l,p,w,wa,y,M),v.paintLeftInner(c,h,q,l,p,w,za,y,M,na,
+ma)),c.stroke()):(c.begin(),v.moveSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,wa,y,ka),v.paintNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.lineNEInner(c,h,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,ka),v.paintNWInner(c,h,q,l,p,w,wa,y,M),v.paintLeftInner(c,h,q,l,p,w,za,y,M,na,ma),c.close(),c.fillAndStroke()):ka&&!pa&&na&&!ma?"frame"!=Y?(c.begin(),v.moveNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),"double"==Y&&(v.moveNEInner(c,h,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,
+h,q,l,p,w,wa,y,M,ma,ka)),c.stroke(),c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),"double"==Y&&(v.moveSWInner(c,h,q,l,p,w,za,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na)),c.stroke()):(c.begin(),v.moveNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.lineNEInner(c,h,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,ka),c.close(),c.fillAndStroke(),c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.lineSWInner(c,h,q,l,p,w,
+za,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na),c.close(),c.fillAndStroke()):ka&&!pa&&na&&ma?"frame"!=Y?(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,wa,y,ka),v.paintNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),"double"==Y&&(v.moveNEInner(c,h,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,ka),v.paintNWInner(c,h,q,l,p,w,wa,y,M),v.paintLeftInner(c,h,q,l,p,w,za,y,M,na,ma),v.paintSWInner(c,
+h,q,l,p,w,za,y,M,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na)),c.stroke()):(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,wa,y,ka),v.paintNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.lineNEInner(c,h,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,ka),v.paintNWInner(c,h,q,l,p,w,wa,y,M),v.paintLeftInner(c,h,q,l,p,w,za,y,M,na,ma),v.paintSWInner(c,h,q,l,p,w,za,y,M,na),v.paintBottomInner(c,h,q,
+l,p,w,ya,y,M,pa,na),c.close(),c.fillAndStroke()):ka&&pa&&!na&&!ma?"frame"!=Y?(c.begin(),v.moveNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,l,p,w,ya,y,na),"double"==Y&&(v.moveSEInner(c,h,q,l,p,w,ya,y,M,na),v.paintRightInner(c,h,q,l,p,w,xa,y,M,ka,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,M),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,ka)),c.stroke()):(c.begin(),v.moveNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,ka),
+v.paintRight(c,h,q,l,p,w,ya,y,na),v.lineSEInner(c,h,q,l,p,w,ya,y,M,na),v.paintRightInner(c,h,q,l,p,w,xa,y,M,ka,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,M),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,ka),c.close(),c.fillAndStroke()):ka&&pa&&!na&&ma?"frame"!=Y?(c.begin(),v.moveSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,wa,y,ka),v.paintNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,l,p,w,ya,y,na),"double"==Y&&(v.moveSEInner(c,h,q,l,p,w,ya,y,M,na),
+v.paintRightInner(c,h,q,l,p,w,xa,y,M,ka,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,M),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,ka),v.paintNWInner(c,h,q,l,p,w,wa,y,M),v.paintLeftInner(c,h,q,l,p,w,za,y,M,na,ma)),c.stroke()):(c.begin(),v.moveSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,wa,y,ka),v.paintNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,l,p,w,ya,y,na),v.lineSEInner(c,h,q,l,p,w,ya,y,M,na),v.paintRightInner(c,h,q,l,p,w,xa,y,M,ka,pa),v.paintNEInner(c,
+h,q,l,p,w,xa,y,M),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,ka),v.paintNWInner(c,h,q,l,p,w,wa,y,M),v.paintLeftInner(c,h,q,l,p,w,za,y,M,na,ma),c.close(),c.fillAndStroke()):ka&&pa&&na&&!ma?"frame"!=Y?(c.begin(),v.moveNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),"double"==Y&&(v.moveSWInner(c,h,q,l,p,w,za,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na),v.paintSEInner(c,
+h,q,l,p,w,ya,y,M),v.paintRightInner(c,h,q,l,p,w,xa,y,M,ka,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,M),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,ka)),c.stroke()):(c.begin(),v.moveNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.lineSWInner(c,h,q,l,p,w,za,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,M),v.paintRightInner(c,h,q,l,p,
+w,xa,y,M,ka,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,M),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,ka),c.close(),c.fillAndStroke()):ka&&pa&&na&&ma&&("frame"!=Y?(c.begin(),v.moveNW(c,h,q,l,p,w,wa,y,ma),v.paintNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,wa,y,ka),c.close(),"double"==Y&&(v.moveSWInner(c,h,q,l,p,w,za,
+y,M,ma),v.paintSWInner(c,h,q,l,p,w,za,y,M,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,M),v.paintRightInner(c,h,q,l,p,w,xa,y,M,ka,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,M),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,ka),v.paintNWInner(c,h,q,l,p,w,wa,y,M),v.paintLeftInner(c,h,q,l,p,w,za,y,M,na,ma),c.close()),c.stroke()):(c.begin(),v.moveNW(c,h,q,l,p,w,wa,y,ma),v.paintNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.paintNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,
+l,p,w,ya,y,na),v.paintSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.paintSW(c,h,q,l,p,w,za,y,na),v.paintLeft(c,h,q,l,p,w,wa,y,ka),c.close(),v.moveSWInner(c,h,q,l,p,w,za,y,M,ma),v.paintSWInner(c,h,q,l,p,w,za,y,M,na),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na),v.paintSEInner(c,h,q,l,p,w,ya,y,M),v.paintRightInner(c,h,q,l,p,w,xa,y,M,ka,pa),v.paintNEInner(c,h,q,l,p,w,xa,y,M),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,ka),v.paintNWInner(c,h,q,l,p,w,wa,y,M),v.paintLeftInner(c,h,q,l,p,w,za,y,M,
+na,ma),c.close(),c.fillAndStroke())):"frame"!=Y?(c.begin(),v.moveNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),"double"==Y&&(v.moveNEInner(c,h,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,ka)),c.stroke()):(c.begin(),v.moveNW(c,h,q,l,p,w,wa,y,ma),v.paintTop(c,h,q,l,p,w,xa,y,pa),v.lineNEInner(c,h,q,l,p,w,xa,y,M,pa),v.paintTopInner(c,h,q,l,p,w,wa,y,M,ma,ka),c.close(),c.fillAndStroke()):"frame"!=Y?(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,l,p,w,ya,y,na),"double"==
+Y&&(v.moveSEInner(c,h,q,l,p,w,ya,y,M,na),v.paintRightInner(c,h,q,l,p,w,xa,y,M,ka,pa)),c.stroke()):(c.begin(),v.moveNE(c,h,q,l,p,w,xa,y,ka),v.paintRight(c,h,q,l,p,w,ya,y,na),v.lineSEInner(c,h,q,l,p,w,ya,y,M,na),v.paintRightInner(c,h,q,l,p,w,xa,y,M,ka,pa),c.close(),c.fillAndStroke()):"frame"!=Y?(c.begin(),v.moveSE(c,h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),"double"==Y&&(v.moveSWInner(c,h,q,l,p,w,za,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na)),c.stroke()):(c.begin(),v.moveSE(c,
+h,q,l,p,w,ya,y,pa),v.paintBottom(c,h,q,l,p,w,za,y,ma),v.lineSWInner(c,h,q,l,p,w,za,y,M,ma),v.paintBottomInner(c,h,q,l,p,w,ya,y,M,pa,na),c.close(),c.fillAndStroke()):"frame"!=Y?(c.begin(),v.moveSW(c,h,q,l,p,w,wa,y,na),v.paintLeft(c,h,q,l,p,w,wa,y,ka),"double"==Y&&(v.moveNWInner(c,h,q,l,p,w,wa,y,M,ka,ma),v.paintLeftInner(c,h,q,l,p,w,za,y,M,na,ma)),c.stroke()):(c.begin(),v.moveSW(c,h,q,l,p,w,wa,y,na),v.paintLeft(c,h,q,l,p,w,wa,y,ka),v.lineNWInner(c,h,q,l,p,w,wa,y,M,ka,ma),v.paintLeftInner(c,h,q,l,p,
+w,za,y,M,na,ma),c.close(),c.fillAndStroke());c.begin();v.paintFolds(c,h,q,l,p,w,wa,xa,ya,za,y,ka,pa,na,ma);c.stroke()};Ga.prototype.moveNW=function(c,h,q,l,p,v,w,I,y){"square"==w||"default"==w&&"square"==v||!y?c.moveTo(0,0):c.moveTo(0,I)};Ga.prototype.moveNE=function(c,h,q,l,p,v,w,I,y){"square"==w||"default"==w&&"square"==v||!y?c.moveTo(l,0):c.moveTo(l-I,0)};Ga.prototype.moveSE=function(c,h,q,l,p,v,w,I,y){"square"==w||"default"==w&&"square"==v||!y?c.moveTo(l,p):c.moveTo(l,p-I)};Ga.prototype.moveSW=
function(c,h,q,l,p,v,w,I,y){"square"==w||"default"==w&&"square"==v||!y?c.moveTo(0,p):c.moveTo(I,p)};Ga.prototype.paintNW=function(c,h,q,l,p,v,w,I,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){h=0;if("rounded"==w||"default"==w&&"rounded"==v)h=1;c.arcTo(I,I,0,0,h,I,0)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(I,0);else c.lineTo(0,0)};Ga.prototype.paintTop=function(c,h,q,l,p,v,w,I,y){"square"==w||"default"==
w&&"square"==v||!y?c.lineTo(l,0):c.lineTo(l-I,0)};Ga.prototype.paintNE=function(c,h,q,l,p,v,w,I,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){h=0;if("rounded"==w||"default"==w&&"rounded"==v)h=1;c.arcTo(I,I,0,0,h,l,I)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(l,I);else c.lineTo(l,0)};Ga.prototype.paintRight=function(c,h,q,l,p,v,w,I,y){"square"==w||"default"==w&&"square"==v||!y?c.lineTo(l,p):c.lineTo(l,p-
I)};Ga.prototype.paintLeft=function(c,h,q,l,p,v,w,I,y){"square"==w||"default"==w&&"square"==v||!y?c.lineTo(0,0):c.lineTo(0,I)};Ga.prototype.paintSE=function(c,h,q,l,p,v,w,I,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){h=0;if("rounded"==w||"default"==w&&"rounded"==v)h=1;c.arcTo(I,I,0,0,h,l-I,p)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(l-I,p);else c.lineTo(l,p)};Ga.prototype.paintBottom=function(c,h,q,
@@ -3679,8 +3682,8 @@ function(c,h,q,l,p,v,w,I,y,Y){Y?"square"==w||"default"==w&&"square"==v?c.lineTo(
y,p-I-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.moveTo(l-y,p-I-y):c.moveTo(l-y,p)};Ga.prototype.lineSEInner=function(c,h,q,l,p,v,w,I,y,Y){Y?"square"==w||"default"==w&&"square"==v?c.lineTo(l-y,p-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(l-y,p-I-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(l-y,p-I-y):c.lineTo(l-y,p)};Ga.prototype.moveNEInner=function(c,h,
q,l,p,v,w,I,y,Y){Y?"square"==w||"default"==w&&"square"==v||Y?c.moveTo(l-y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.moveTo(l-y,I+.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.moveTo(l-y,I+y):c.moveTo(l,y)};Ga.prototype.lineNEInner=function(c,h,q,l,p,v,w,I,y,Y){Y?"square"==w||"default"==w&&"square"==v||Y?c.lineTo(l-y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(l-y,I+.5*y):
("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(l-y,I+y):c.lineTo(l,y)};Ga.prototype.moveNWInner=function(c,h,q,l,p,v,w,I,y,Y,M){Y||M?!Y&&M?c.moveTo(y,0):Y&&!M?c.moveTo(0,y):"square"==w||"default"==w&&"square"==v?c.moveTo(y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.moveTo(y,I+.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.moveTo(y,I+y):c.moveTo(0,0)};Ga.prototype.lineNWInner=
-function(c,h,q,l,p,v,w,I,y,Y,M){Y||M?!Y&&M?c.lineTo(y,0):Y&&!M?c.lineTo(0,y):"square"==w||"default"==w&&"square"==v?c.lineTo(y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(y,I+.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(y,I+y):c.lineTo(0,0)};Ga.prototype.paintFolds=function(c,h,q,l,p,v,w,I,y,Y,M,Ba,Qa,Ja,la){if("fold"==v||"fold"==w||"fold"==I||"fold"==y||"fold"==Y)("fold"==w||"default"==w&&"fold"==v)&&
-Ba&&la&&(c.moveTo(0,M),c.lineTo(M,M),c.lineTo(M,0)),("fold"==I||"default"==I&&"fold"==v)&&Ba&&Qa&&(c.moveTo(l-M,0),c.lineTo(l-M,M),c.lineTo(l,M)),("fold"==y||"default"==y&&"fold"==v)&&Ja&&Qa&&(c.moveTo(l-M,p),c.lineTo(l-M,p-M),c.lineTo(l,p-M)),("fold"==Y||"default"==Y&&"fold"==v)&&Ja&&la&&(c.moveTo(0,p-M),c.lineTo(M,p-M),c.lineTo(M,p))};mxCellRenderer.registerShape(Ga.prototype.cst.RECT2,Ga);Ga.prototype.constraints=null;mxUtils.extend(Oa,mxConnector);Oa.prototype.origPaintEdgeShape=Oa.prototype.paintEdgeShape;
+function(c,h,q,l,p,v,w,I,y,Y,M){Y||M?!Y&&M?c.lineTo(y,0):Y&&!M?c.lineTo(0,y):"square"==w||"default"==w&&"square"==v?c.lineTo(y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(y,I+.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(y,I+y):c.lineTo(0,0)};Ga.prototype.paintFolds=function(c,h,q,l,p,v,w,I,y,Y,M,Ba,Qa,Ja,ka){if("fold"==v||"fold"==w||"fold"==I||"fold"==y||"fold"==Y)("fold"==w||"default"==w&&"fold"==v)&&
+Ba&&ka&&(c.moveTo(0,M),c.lineTo(M,M),c.lineTo(M,0)),("fold"==I||"default"==I&&"fold"==v)&&Ba&&Qa&&(c.moveTo(l-M,0),c.lineTo(l-M,M),c.lineTo(l,M)),("fold"==y||"default"==y&&"fold"==v)&&Ja&&Qa&&(c.moveTo(l-M,p),c.lineTo(l-M,p-M),c.lineTo(l,p-M)),("fold"==Y||"default"==Y&&"fold"==v)&&Ja&&ka&&(c.moveTo(0,p-M),c.lineTo(M,p-M),c.lineTo(M,p))};mxCellRenderer.registerShape(Ga.prototype.cst.RECT2,Ga);Ga.prototype.constraints=null;mxUtils.extend(Oa,mxConnector);Oa.prototype.origPaintEdgeShape=Oa.prototype.paintEdgeShape;
Oa.prototype.paintEdgeShape=function(c,h,q){for(var l=[],p=0;p<h.length;p++)l.push(mxUtils.clone(h[p]));p=c.state.dashed;var v=c.state.fixDash;Oa.prototype.origPaintEdgeShape.apply(this,[c,l,q]);3<=c.state.strokeWidth&&(l=mxUtils.getValue(this.style,"fillColor",null),null!=l&&(c.setStrokeColor(l),c.setStrokeWidth(c.state.strokeWidth-2),c.setDashed(p,v),Oa.prototype.origPaintEdgeShape.apply(this,[c,h,q])))};mxCellRenderer.registerShape("filledEdge",Oa);"undefined"!==typeof StyleFormatPanel&&function(){var c=
StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var h=this.editorUi.getSelectionState(),q=c.apply(this,arguments);"umlFrame"==h.style.shape&&q.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return q}}();mxMarker.addMarker("dash",function(c,h,q,l,p,v,w,I,y,Y){var M=p*(w+y+1),Ba=v*(w+y+1);return function(){c.begin();c.moveTo(l.x-M/2-Ba/2,l.y-Ba/2+M/2);c.lineTo(l.x+Ba/2-3*M/2,l.y-3*Ba/2-M/2);c.stroke()}});mxMarker.addMarker("box",
function(c,h,q,l,p,v,w,I,y,Y){var M=p*(w+y+1),Ba=v*(w+y+1),Qa=l.x+M/2,Ja=l.y+Ba/2;l.x-=M;l.y-=Ba;return function(){c.begin();c.moveTo(Qa-M/2-Ba/2,Ja-Ba/2+M/2);c.lineTo(Qa-M/2+Ba/2,Ja-Ba/2-M/2);c.lineTo(Qa+Ba/2-3*M/2,Ja-3*Ba/2-M/2);c.lineTo(Qa-Ba/2-3*M/2,Ja-3*Ba/2+M/2);c.close();Y?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("cross",function(c,h,q,l,p,v,w,I,y,Y){var M=p*(w+y+1),Ba=v*(w+y+1);return function(){c.begin();c.moveTo(l.x-M/2-Ba/2,l.y-Ba/2+M/2);c.lineTo(l.x+Ba/2-3*M/2,l.y-3*Ba/2-M/2);
@@ -3707,66 +3710,66 @@ c.view.scale)-v*l/2,w.y+v*(I+c.shape.strokewidth*c.view.scale)+p*l/2)},function(
c.style.startWidth=c.style.endWidth;mxEvent.isAltDown(Y.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<h/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(c.style.endWidth)-parseFloat(c.style.startWidth))<h&&(c.style.endWidth=c.style.startWidth))})));return q},swimlane:function(c){var h=[];if(mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED)){var q=parseFloat(mxUtils.getValue(c.style,
mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));h.push(fb(c,q/2))}h.push(Ra(c,[mxConstants.STYLE_STARTSIZE],function(l){var p=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(c.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(l.getCenterX(),l.y+Math.max(0,Math.min(l.height,p))):new mxPoint(l.x+Math.max(0,Math.min(l.width,p)),l.getCenterY())},function(l,p){c.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,
mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(l.height,p.y-l.y))):Math.round(Math.max(0,Math.min(l.width,p.x-l.x)))},!1,null,function(l){var p=c.view.graph;if(!mxEvent.isShiftDown(l.getEvent())&&!mxEvent.isControlDown(l.getEvent())&&(p.isTableRow(c.cell)||p.isTableCell(c.cell))){l=p.getSwimlaneDirection(c.style);var v=p.model.getParent(c.cell);v=p.model.getChildCells(v,!0);for(var w=[],I=0;I<v.length;I++)v[I]!=c.cell&&p.isSwimlane(v[I])&&p.getSwimlaneDirection(p.getCurrentCellStyle(v[I]))==
-l&&w.push(v[I]);p.setCellStyles(mxConstants.STYLE_STARTSIZE,c.style[mxConstants.STYLE_STARTSIZE],w)}}));return h},label:nb(),ext:nb(),rectangle:nb(),triangle:nb(),rhombus:nb(),umlLifeline:function(c){return[Ra(c,["size"],function(h){var q=Math.max(0,Math.min(h.height,parseFloat(mxUtils.getValue(this.state.style,"size",aa.prototype.size))));return new mxPoint(h.getCenterX(),h.y+q)},function(h,q){this.state.style.size=Math.round(Math.max(0,Math.min(h.height,q.y-h.y)))},!1)]},umlFrame:function(c){return[Ra(c,
+l&&w.push(v[I]);p.setCellStyles(mxConstants.STYLE_STARTSIZE,c.style[mxConstants.STYLE_STARTSIZE],w)}}));return h},label:nb(),ext:nb(),rectangle:nb(),triangle:nb(),rhombus:nb(),umlLifeline:function(c){return[Ra(c,["size"],function(h){var q=Math.max(0,Math.min(h.height,parseFloat(mxUtils.getValue(this.state.style,"size",ca.prototype.size))));return new mxPoint(h.getCenterX(),h.y+q)},function(h,q){this.state.style.size=Math.round(Math.max(0,Math.min(h.height,q.y-h.y)))},!1)]},umlFrame:function(c){return[Ra(c,
["width","height"],function(h){var q=Math.max(oa.prototype.corner,Math.min(h.width,mxUtils.getValue(this.state.style,"width",oa.prototype.width))),l=Math.max(1.5*oa.prototype.corner,Math.min(h.height,mxUtils.getValue(this.state.style,"height",oa.prototype.height)));return new mxPoint(h.x+q,h.y+l)},function(h,q){this.state.style.width=Math.round(Math.max(oa.prototype.corner,Math.min(h.width,q.x-h.x)));this.state.style.height=Math.round(Math.max(1.5*oa.prototype.corner,Math.min(h.height,q.y-h.y)))},
-!1)]},process:function(c){var h=[Ra(c,["size"],function(q){var l="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),p=parseFloat(mxUtils.getValue(this.state.style,"size",ia.prototype.size));return l?new mxPoint(q.x+p,q.y+q.height/4):new mxPoint(q.x+q.width*p,q.y+q.height/4)},function(q,l){q="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*q.width,l.x-q.x)):Math.max(0,Math.min(.5,(l.x-q.x)/q.width));this.state.style.size=q},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,
+!1)]},process:function(c){var h=[Ra(c,["size"],function(q){var l="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),p=parseFloat(mxUtils.getValue(this.state.style,"size",aa.prototype.size));return l?new mxPoint(q.x+p,q.y+q.height/4):new mxPoint(q.x+q.width*p,q.y+q.height/4)},function(q,l){q="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*q.width,l.x-q.x)):Math.max(0,Math.min(.5,(l.x-q.x)/q.width));this.state.style.size=q},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,
!1)&&h.push(fb(c));return h},cross:function(c){return[Ra(c,["size"],function(h){var q=Math.min(h.width,h.height);q=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",Ia.prototype.size)))*q/2;return new mxPoint(h.getCenterX()-q,h.getCenterY()-q)},function(h,q){var l=Math.min(h.width,h.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,h.getCenterY()-q.y)/l*2,Math.max(0,h.getCenterX()-q.x)/l*2)))})]},note:function(c){return[Ra(c,["size"],function(h){var q=Math.max(0,
Math.min(h.width,Math.min(h.height,parseFloat(mxUtils.getValue(this.state.style,"size",u.prototype.size)))));return new mxPoint(h.x+h.width-q,h.y+q)},function(h,q){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(h.width,h.x+h.width-q.x),Math.min(h.height,q.y-h.y))))})]},note2:function(c){return[Ra(c,["size"],function(h){var q=Math.max(0,Math.min(h.width,Math.min(h.height,parseFloat(mxUtils.getValue(this.state.style,"size",m.prototype.size)))));return new mxPoint(h.x+h.width-q,h.y+q)},
function(h,q){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(h.width,h.x+h.width-q.x),Math.min(h.height,q.y-h.y))))})]},manualInput:function(c){var h=[Ra(c,["size"],function(q){var l=Math.max(0,Math.min(q.height,mxUtils.getValue(this.state.style,"size",Xa.prototype.size)));return new mxPoint(q.x+q.width/4,q.y+3*l/4)},function(q,l){this.state.style.size=Math.round(Math.max(0,Math.min(q.height,4*(l.y-q.y)/3)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&h.push(fb(c));
return h},dataStorage:function(c){return[Ra(c,["size"],function(h){var q="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),l=parseFloat(mxUtils.getValue(this.state.style,"size",q?z.prototype.fixedSize:z.prototype.size));return new mxPoint(h.x+h.width-l*(q?1:h.width),h.getCenterY())},function(h,q){h="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(h.width,h.x+h.width-q.x)):Math.max(0,Math.min(1,(h.x+h.width-q.x)/h.width));this.state.style.size=h},!1)]},callout:function(c){var h=
-[Ra(c,["size","position"],function(q){var l=Math.max(0,Math.min(q.height,mxUtils.getValue(this.state.style,"size",ba.prototype.size))),p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ba.prototype.position)));mxUtils.getValue(this.state.style,"base",ba.prototype.base);return new mxPoint(q.x+p*q.width,q.y+q.height-l)},function(q,l){mxUtils.getValue(this.state.style,"base",ba.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(q.height,q.y+q.height-l.y)));this.state.style.position=
-Math.round(100*Math.max(0,Math.min(1,(l.x-q.x)/q.width)))/100},!1),Ra(c,["position2"],function(q){var l=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",ba.prototype.position2)));return new mxPoint(q.x+l*q.width,q.y+q.height)},function(q,l){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(l.x-q.x)/q.width)))/100},!1),Ra(c,["base"],function(q){var l=Math.max(0,Math.min(q.height,mxUtils.getValue(this.state.style,"size",ba.prototype.size))),p=Math.max(0,Math.min(1,
-mxUtils.getValue(this.state.style,"position",ba.prototype.position))),v=Math.max(0,Math.min(q.width,mxUtils.getValue(this.state.style,"base",ba.prototype.base)));return new mxPoint(q.x+Math.min(q.width,p*q.width+v),q.y+q.height-l)},function(q,l){var p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ba.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(q.width,l.x-q.x-p*q.width)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&h.push(fb(c));
+[Ra(c,["size","position"],function(q){var l=Math.max(0,Math.min(q.height,mxUtils.getValue(this.state.style,"size",ea.prototype.size))),p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ea.prototype.position)));mxUtils.getValue(this.state.style,"base",ea.prototype.base);return new mxPoint(q.x+p*q.width,q.y+q.height-l)},function(q,l){mxUtils.getValue(this.state.style,"base",ea.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(q.height,q.y+q.height-l.y)));this.state.style.position=
+Math.round(100*Math.max(0,Math.min(1,(l.x-q.x)/q.width)))/100},!1),Ra(c,["position2"],function(q){var l=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",ea.prototype.position2)));return new mxPoint(q.x+l*q.width,q.y+q.height)},function(q,l){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(l.x-q.x)/q.width)))/100},!1),Ra(c,["base"],function(q){var l=Math.max(0,Math.min(q.height,mxUtils.getValue(this.state.style,"size",ea.prototype.size))),p=Math.max(0,Math.min(1,
+mxUtils.getValue(this.state.style,"position",ea.prototype.position))),v=Math.max(0,Math.min(q.width,mxUtils.getValue(this.state.style,"base",ea.prototype.base)));return new mxPoint(q.x+Math.min(q.width,p*q.width+v),q.y+q.height-l)},function(q,l){var p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ea.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(q.width,l.x-q.x-p*q.width)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&h.push(fb(c));
return h},internalStorage:function(c){var h=[Ra(c,["dx","dy"],function(q){var l=Math.max(0,Math.min(q.width,mxUtils.getValue(this.state.style,"dx",Va.prototype.dx))),p=Math.max(0,Math.min(q.height,mxUtils.getValue(this.state.style,"dy",Va.prototype.dy)));return new mxPoint(q.x+l,q.y+p)},function(q,l){this.state.style.dx=Math.round(Math.max(0,Math.min(q.width,l.x-q.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(q.height,l.y-q.y)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&
h.push(fb(c));return h},module:function(c){return[Ra(c,["jettyWidth","jettyHeight"],function(h){var q=Math.max(0,Math.min(h.width,mxUtils.getValue(this.state.style,"jettyWidth",Ca.prototype.jettyWidth))),l=Math.max(0,Math.min(h.height,mxUtils.getValue(this.state.style,"jettyHeight",Ca.prototype.jettyHeight)));return new mxPoint(h.x+q/2,h.y+2*l)},function(h,q){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(h.width,q.x-h.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(h.height,
q.y-h.y))/2)})]},corner:function(c){return[Ra(c,["dx","dy"],function(h){var q=Math.max(0,Math.min(h.width,mxUtils.getValue(this.state.style,"dx",Ya.prototype.dx))),l=Math.max(0,Math.min(h.height,mxUtils.getValue(this.state.style,"dy",Ya.prototype.dy)));return new mxPoint(h.x+q,h.y+l)},function(h,q){this.state.style.dx=Math.round(Math.max(0,Math.min(h.width,q.x-h.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(h.height,q.y-h.y)))},!1)]},tee:function(c){return[Ra(c,["dx","dy"],function(h){var q=
Math.max(0,Math.min(h.width,mxUtils.getValue(this.state.style,"dx",bb.prototype.dx))),l=Math.max(0,Math.min(h.height,mxUtils.getValue(this.state.style,"dy",bb.prototype.dy)));return new mxPoint(h.x+(h.width+q)/2,h.y+l)},function(h,q){this.state.style.dx=Math.round(Math.max(0,2*Math.min(h.width/2,q.x-h.x-h.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(h.height,q.y-h.y)))},!1)]},singleArrow:ib(1),doubleArrow:ib(.5),folder:function(c){return[Ra(c,["tabWidth","tabHeight"],function(h){var q=
-Math.max(0,Math.min(h.width,mxUtils.getValue(this.state.style,"tabWidth",G.prototype.tabWidth))),l=Math.max(0,Math.min(h.height,mxUtils.getValue(this.state.style,"tabHeight",G.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",G.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(q=h.width-q);return new mxPoint(h.x+q,h.y+l)},function(h,q){var l=Math.max(0,Math.min(h.width,q.x-h.x));mxUtils.getValue(this.state.style,"tabPosition",G.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&
-(l=h.width-l);this.state.style.tabWidth=Math.round(l);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(h.height,q.y-h.y)))},!1)]},document:function(c){return[Ra(c,["size"],function(h){var q=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",Q.prototype.size))));return new mxPoint(h.x+3*h.width/4,h.y+(1-q)*h.height)},function(h,q){this.state.style.size=Math.max(0,Math.min(1,(h.y+h.height-q.y)/h.height))},!1)]},tape:function(c){return[Ra(c,["size"],function(h){var q=
+Math.max(0,Math.min(h.width,mxUtils.getValue(this.state.style,"tabWidth",F.prototype.tabWidth))),l=Math.max(0,Math.min(h.height,mxUtils.getValue(this.state.style,"tabHeight",F.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",F.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(q=h.width-q);return new mxPoint(h.x+q,h.y+l)},function(h,q){var l=Math.max(0,Math.min(h.width,q.x-h.x));mxUtils.getValue(this.state.style,"tabPosition",F.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&
+(l=h.width-l);this.state.style.tabWidth=Math.round(l);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(h.height,q.y-h.y)))},!1)]},document:function(c){return[Ra(c,["size"],function(h){var q=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",S.prototype.size))));return new mxPoint(h.x+3*h.width/4,h.y+(1-q)*h.height)},function(h,q){this.state.style.size=Math.max(0,Math.min(1,(h.y+h.height-q.y)/h.height))},!1)]},tape:function(c){return[Ra(c,["size"],function(h){var q=
Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",N.prototype.size))));return new mxPoint(h.getCenterX(),h.y+q*h.height/2)},function(h,q){this.state.style.size=Math.max(0,Math.min(1,(q.y-h.y)/h.height*2))},!1)]},isoCube2:function(c){return[Ra(c,["isoAngle"],function(h){var q=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",r.isoAngle))))*Math.PI/200;return new mxPoint(h.x,h.y+Math.min(h.width*Math.tan(q),.5*h.height))},function(h,q){this.state.style.isoAngle=
-Math.max(0,50*(q.y-h.y)/h.height)},!0)]},cylinder2:gb(x.prototype.size),cylinder3:gb(B.prototype.size),offPageConnector:function(c){return[Ra(c,["size"],function(h){var q=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",K.prototype.size))));return new mxPoint(h.getCenterX(),h.y+(1-q)*h.height)},function(h,q){this.state.style.size=Math.max(0,Math.min(1,(h.y+h.height-q.y)/h.height))},!1)]},"mxgraph.basic.rect":function(c){var h=[Graph.createHandle(c,["size"],function(q){var l=
+Math.max(0,50*(q.y-h.y)/h.height)},!0)]},cylinder2:gb(x.prototype.size),cylinder3:gb(B.prototype.size),offPageConnector:function(c){return[Ra(c,["size"],function(h){var q=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",L.prototype.size))));return new mxPoint(h.getCenterX(),h.y+(1-q)*h.height)},function(h,q){this.state.style.size=Math.max(0,Math.min(1,(h.y+h.height-q.y)/h.height))},!1)]},"mxgraph.basic.rect":function(c){var h=[Graph.createHandle(c,["size"],function(q){var l=
Math.max(0,Math.min(q.width/2,q.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(q.x+l,q.y+l)},function(q,l){this.state.style.size=Math.round(100*Math.max(0,Math.min(q.height/2,q.width/2,l.x-q.x)))/100})];c=Graph.createHandle(c,["indent"],function(q){var l=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(q.x+.75*q.width,q.y+l*q.height/200)},function(q,l){this.state.style.indent=Math.round(100*
-Math.max(0,Math.min(100,200*(l.y-q.y)/q.height)))/100});h.push(c);return h},step:qb(qa.prototype.size,!0,null,!0,qa.prototype.fixedSize),hexagon:qb(O.prototype.size,!0,.5,!0,O.prototype.fixedSize),curlyBracket:qb(Z.prototype.size,!1),display:qb(Fa.prototype.size,!1),cube:Wa(1,d.prototype.size,!1),card:Wa(.5,D.prototype.size,!0),loopLimit:Wa(.5,H.prototype.size,!0),trapezoid:tb(.5,P.prototype.size,P.prototype.fixedSize),parallelogram:tb(1,R.prototype.size,R.prototype.fixedSize)};Graph.createHandle=
+Math.max(0,Math.min(100,200*(l.y-q.y)/q.height)))/100});h.push(c);return h},step:qb(qa.prototype.size,!0,null,!0,qa.prototype.fixedSize),hexagon:qb(O.prototype.size,!0,.5,!0,O.prototype.fixedSize),curlyBracket:qb(Z.prototype.size,!1),display:qb(Fa.prototype.size,!1),cube:Wa(1,e.prototype.size,!1),card:Wa(.5,D.prototype.size,!0),loopLimit:Wa(.5,H.prototype.size,!0),trapezoid:tb(.5,P.prototype.size,P.prototype.fixedSize),parallelogram:tb(1,T.prototype.size,T.prototype.fixedSize)};Graph.createHandle=
Ra;Graph.handleFactory=rb;var xb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=xb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var h=this.state.style.shape;null==mxCellRenderer.defaultShapes[h]&&null==mxStencilRegistry.getStencil(h)?h=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(h=mxConstants.SHAPE_SWIMLANE);h=rb[h];null==h&&null!=this.state.shape&&this.state.shape.isRoundable()&&
(h=rb[mxConstants.SHAPE_RECTANGLE]);null!=h&&(h=h(this.state),null!=h&&(c=null==c?h:c.concat(h)))}return c};mxEdgeHandler.prototype.createCustomHandles=function(){var c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&null==mxStencilRegistry.getStencil(c)&&(c=mxConstants.SHAPE_CONNECTOR);c=rb[c];return null!=c?c(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var kb=new mxPoint(1,0),hb=new mxPoint(1,0),ob=mxUtils.toRadians(-30);kb=mxUtils.getRotatedPoint(kb,
Math.cos(ob),Math.sin(ob));var lb=mxUtils.toRadians(-150);hb=mxUtils.getRotatedPoint(hb,Math.cos(lb),Math.sin(lb));mxEdgeStyle.IsometricConnector=function(c,h,q,l,p){var v=c.view;l=null!=l&&0<l.length?l[0]:null;var w=c.absolutePoints,I=w[0];w=w[w.length-1];null!=l&&(l=v.transformControlPoint(c,l));null==I&&null!=h&&(I=new mxPoint(h.getCenterX(),h.getCenterY()));null==w&&null!=q&&(w=new mxPoint(q.getCenterX(),q.getCenterY()));var y=kb.x,Y=kb.y,M=hb.x,Ba=hb.y,Qa="horizontal"==mxUtils.getValue(c.style,
-"elbow","horizontal");if(null!=w&&null!=I){c=function(la,pa,na){la-=Ja.x;var ma=pa-Ja.y;pa=(Ba*la-M*ma)/(y*Ba-Y*M);la=(Y*la-y*ma)/(Y*M-y*Ba);Qa?(na&&(Ja=new mxPoint(Ja.x+y*pa,Ja.y+Y*pa),p.push(Ja)),Ja=new mxPoint(Ja.x+M*la,Ja.y+Ba*la)):(na&&(Ja=new mxPoint(Ja.x+M*la,Ja.y+Ba*la),p.push(Ja)),Ja=new mxPoint(Ja.x+y*pa,Ja.y+Y*pa));p.push(Ja)};var Ja=I;null==l&&(l=new mxPoint(I.x+(w.x-I.x)/2,I.y+(w.y-I.y)/2));c(l.x,l.y,!0);c(w.x,w.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);
-var sb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,h){if(h==mxEdgeStyle.IsometricConnector){var q=new mxElbowEdgeHandler(c);q.snapToTerminals=!1;return q}return sb.apply(this,arguments)};e.prototype.constraints=[];k.prototype.getConstraints=function(c,h,q){c=[];var l=Math.tan(mxUtils.toRadians(30)),p=(.5-l)/2;l=Math.min(h,q/(.5+l));h=(h-l)/2;q=(q-l)/2;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,q+.25*l));c.push(new mxConnectionConstraint(new mxPoint(0,
+"elbow","horizontal");if(null!=w&&null!=I){c=function(ka,pa,na){ka-=Ja.x;var ma=pa-Ja.y;pa=(Ba*ka-M*ma)/(y*Ba-Y*M);ka=(Y*ka-y*ma)/(Y*M-y*Ba);Qa?(na&&(Ja=new mxPoint(Ja.x+y*pa,Ja.y+Y*pa),p.push(Ja)),Ja=new mxPoint(Ja.x+M*ka,Ja.y+Ba*ka)):(na&&(Ja=new mxPoint(Ja.x+M*ka,Ja.y+Ba*ka),p.push(Ja)),Ja=new mxPoint(Ja.x+y*pa,Ja.y+Y*pa));p.push(Ja)};var Ja=I;null==l&&(l=new mxPoint(I.x+(w.x-I.x)/2,I.y+(w.y-I.y)/2));c(l.x,l.y,!0);c(w.x,w.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);
+var sb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,h){if(h==mxEdgeStyle.IsometricConnector){var q=new mxElbowEdgeHandler(c);q.snapToTerminals=!1;return q}return sb.apply(this,arguments)};d.prototype.constraints=[];k.prototype.getConstraints=function(c,h,q){c=[];var l=Math.tan(mxUtils.toRadians(30)),p=(.5-l)/2;l=Math.min(h,q/(.5+l));h=(h-l)/2;q=(q-l)/2;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,q+.25*l));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,h+.5*l,q+l*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h+l,q+.25*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h+l,q+.75*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h+.5*l,q+(1-p)*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,q+.75*l));return c};r.prototype.getConstraints=function(c,h,q){c=[];var l=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;l=Math.min(h*
Math.tan(l),.5*q);c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,l));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,q-l));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q-l));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
-0,l));return c};ba.prototype.getConstraints=function(c,h,q){c=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var l=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var p=h*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));c.push(new mxConnectionConstraint(new mxPoint(0,
+0,l));return c};ea.prototype.getConstraints=function(c,h,q){c=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var l=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var p=h*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1));c.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.5*(q-l)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,q-l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,q));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,
q-l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(q-l)));h>=2*l&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,
.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];Ea.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=
-mxRectangleShape.prototype.constraints;S.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;u.prototype.getConstraints=function(c,h,q){c=[];var l=Math.max(0,Math.min(h,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-l),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,
+mxRectangleShape.prototype.constraints;R.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;u.prototype.getConstraints=function(c,h,q){c=[];var l=Math.max(0,Math.min(h,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-l),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,
null,h-l,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-.5*l,.5*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.5*(q+l)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));h>=2*l&&c.push(new mxConnectionConstraint(new mxPoint(.5,
0),!1));return c};D.prototype.getConstraints=function(c,h,q){c=[];var l=Math.max(0,Math.min(h,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+l),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,.5*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,.5*(q+l)));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));h>=2*l&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};d.prototype.getConstraints=function(c,h,q){c=[];var l=Math.max(0,Math.min(h,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,.5*(q+l)));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));h>=2*l&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};e.prototype.getConstraints=function(c,h,q){c=[];var l=Math.max(0,Math.min(h,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-l),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-l,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-.5*l,.5*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.5*(q+l)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+l),q));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,l,q));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,q-.5*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q-l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(q-l)));return c};B.prototype.getConstraints=function(c,h,q){c=[];h=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,
1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,h));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,h));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-h));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-h));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,h+.5*(.5*q-h)));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,h+.5*(.5*q-h)));c.push(new mxConnectionConstraint(new mxPoint(1,
-0),!1,null,0,q-h-.5*(.5*q-h)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q-h-.5*(.5*q-h)));c.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*h));c.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*h));c.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-h));c.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-h));return c};G.prototype.getConstraints=function(c,h,q){c=[];var l=Math.max(0,Math.min(h,parseFloat(mxUtils.getValue(this.style,
+0),!1,null,0,q-h-.5*(.5*q-h)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q-h-.5*(.5*q-h)));c.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*h));c.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*h));c.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-h));c.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-h));return c};F.prototype.getConstraints=function(c,h,q){c=[];var l=Math.max(0,Math.min(h,parseFloat(mxUtils.getValue(this.style,
"tabWidth",this.tabWidth)))),p=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(c.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,p)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
.5*(h+l),p))):(c.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-.5*l,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-l,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-l,p)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-l),p)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.25*(q-p)+p));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,h,.5*(q-p)+p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.75*(q-p)+p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,q));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(q-p)+p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(q-p)+p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(q-p)+p));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,q));c.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return c};Va.prototype.constraints=mxRectangleShape.prototype.constraints;z.prototype.constraints=mxRectangleShape.prototype.constraints;X.prototype.constraints=mxEllipse.prototype.constraints;ja.prototype.constraints=mxEllipse.prototype.constraints;ea.prototype.constraints=mxEllipse.prototype.constraints;Ma.prototype.constraints=
+0),!1,null,0,q));c.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return c};Va.prototype.constraints=mxRectangleShape.prototype.constraints;z.prototype.constraints=mxRectangleShape.prototype.constraints;W.prototype.constraints=mxEllipse.prototype.constraints;ha.prototype.constraints=mxEllipse.prototype.constraints;fa.prototype.constraints=mxEllipse.prototype.constraints;Ma.prototype.constraints=
mxEllipse.prototype.constraints;Xa.prototype.constraints=mxRectangleShape.prototype.constraints;La.prototype.constraints=mxRectangleShape.prototype.constraints;Fa.prototype.getConstraints=function(c,h,q){c=[];var l=Math.min(h,q/2),p=Math.min(h-l,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*h);c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
.5*(p+h-l),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-l,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h-l,q));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(p+h-l),q));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,q));return c};Ca.prototype.getConstraints=function(c,h,q){h=parseFloat(mxUtils.getValue(c,"jettyWidth",Ca.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c,
"jettyHeight",Ca.prototype.jettyHeight));var l=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,h),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,
h),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(q-.5*c,1.5*c)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(q-.5*c,3.5*c))];q>5*c&&l.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,h));q>8*c&&l.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,h));q>
-15*c&&l.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,h));return l};H.prototype.constraints=mxRectangleShape.prototype.constraints;K.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,
-.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];T.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)];ra.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,
+15*c&&l.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,h));return l};H.prototype.constraints=mxRectangleShape.prototype.constraints;L.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,
+.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];Q.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)];sa.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)];C.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)];N.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)];qa.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)];sa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,
+.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ta.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,
1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=
[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),
new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,
-.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];R.prototype.constraints=mxRectangleShape.prototype.constraints;P.prototype.constraints=mxRectangleShape.prototype.constraints;Q.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
+.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];T.prototype.constraints=mxRectangleShape.prototype.constraints;P.prototype.constraints=mxRectangleShape.prototype.constraints;S.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;bb.prototype.getConstraints=function(c,h,q){c=[];var l=Math.max(0,Math.min(h,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),p=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,
"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*h+.25*l,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+l),p));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*(h+l),.5*(q+p)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+l),q));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-l),q));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-l),.5*(q+p)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h-l),p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*h-.25*l,p));c.push(new mxConnectionConstraint(new mxPoint(0,
@@ -3779,274 +3782,271 @@ function(c,h,q){c=[];var l=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(t
function(c,h,q){c=[];var l=Math.min(q,h),p=Math.max(0,Math.min(l,l*parseFloat(mxUtils.getValue(this.style,"size",this.size))));l=(q-p)/2;var v=l+p,w=(h-p)/2;p=w+p;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,.5*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,0));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*l));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,p,l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,q-.5*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,q));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,q));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,q-.5*l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+p),l));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,h,l));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,h,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(h+p),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*w,l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*w,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,l));return c};aa.prototype.constraints=null;A.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)];E.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)];Ha.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ua.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*w,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,l));return c};ca.prototype.constraints=null;A.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)];E.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)];Ha.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];va.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
-Actions.prototype.init=function(){function a(m){e.escape();m=e.deleteCells(e.getDeletableCells(e.getSelectionCells()),m);null!=m&&e.setSelectionCells(m)}function b(){if(!e.isSelectionEmpty()){e.getModel().beginUpdate();try{for(var m=e.getSelectionCells(),r=0;r<m.length;r++)e.cellLabelChanged(m[r],"")}finally{e.getModel().endUpdate()}}}function f(m,r,x,B,C){C.getModel().beginUpdate();try{var G=C.getCellGeometry(m);null!=G&&x&&B&&(x/=B,G=G.clone(),1<x?G.height=G.width/x:G.width=G.height*x,C.getModel().setGeometry(m,
-G));C.setCellStyles(mxConstants.STYLE_CLIP_PATH,r,[m]);C.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[m])}finally{C.getModel().endUpdate()}}var d=this.editorUi,g=d.editor,e=g.graph,k=function(){return Action.prototype.isEnabled.apply(this,arguments)&&e.isEnabled()};this.addAction("new...",function(){e.openLink(d.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";d.openFile()});this.addAction("smartFit",function(){e.popupMenuHandler.hideMenu();var m=e.view.scale,
-r=e.view.translate.x,x=e.view.translate.y;d.actions.get("resetView").funct();1E-5>Math.abs(m-e.view.scale)&&r==e.view.translate.x&&x==e.view.translate.y&&d.actions.get(e.pageVisible?"fitPage":"fitWindow").funct()});this.addAction("keyPressEnter",function(){e.isEnabled()&&(e.isSelectionEmpty()?d.actions.get("smartFit").funct():e.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){d.hideDialog()}));
-window.openFile.setConsumer(mxUtils.bind(this,function(m,r){try{var x=mxUtils.parseXml(m);g.graph.setSelectionCells(g.graph.importGraphModel(x.documentElement))}catch(B){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+B.message)}}));d.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=k;this.addAction("save",function(){d.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=k;this.addAction("saveAs...",function(){d.saveFile(!0)},null,
-null,Editor.ctrlKey+"+Shift+S").isEnabled=k;this.addAction("export...",function(){d.showDialog((new ExportDialog(d)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var m=new EditDiagramDialog(d);d.showDialog(m.container,620,420,!0,!1);m.init()});this.addAction("pageSetup...",function(){d.showDialog((new PageSetupDialog(d)).container,320,240,!0,!0)}).isEnabled=k;this.addAction("print...",function(){d.showDialog((new PrintDialog(d)).container,300,180,!0,!0)},null,"sprite-print",
-Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(e,null,10,10)});this.addAction("undo",function(){d.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){d.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var m=null;try{m=d.copyXml(),null!=m&&e.removeCells(m,!1)}catch(r){}null==m&&mxClipboard.cut(e)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{d.copyXml()}catch(m){}try{mxClipboard.copy(e)}catch(m){d.handleError(m)}},
-null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(e.isEnabled()&&!e.isCellLocked(e.getDefaultParent())){var m=!1;try{Editor.enableNativeCipboard&&(d.readGraphModelFromClipboard(function(r){if(null!=r){e.getModel().beginUpdate();try{d.pasteXml(r,!0)}finally{e.getModel().endUpdate()}}else mxClipboard.paste(e)}),m=!0)}catch(r){}m||mxClipboard.paste(e)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(m){function r(B){if(null!=B){for(var C=!0,G=0;G<
-B.length&&C;G++)C=C&&e.model.isEdge(B[G]);var J=e.view.translate;G=e.view.scale;var D=J.x,N=J.y;J=null;if(1==B.length&&C){var Q=e.getCellGeometry(B[0]);null!=Q&&(J=Q.getTerminalPoint(!0))}J=null!=J?J:e.getBoundingBoxFromGeometry(B,C);null!=J&&(C=Math.round(e.snap(e.popupMenuHandler.triggerX/G-D)),G=Math.round(e.snap(e.popupMenuHandler.triggerY/G-N)),e.cellsMoved(B,C-J.x,G-J.y))}}function x(){e.getModel().beginUpdate();try{r(mxClipboard.paste(e))}finally{e.getModel().endUpdate()}}if(e.isEnabled()&&
-!e.isCellLocked(e.getDefaultParent())){m=!1;try{Editor.enableNativeCipboard&&(d.readGraphModelFromClipboard(function(B){if(null!=B){e.getModel().beginUpdate();try{r(d.pasteXml(B,!0))}finally{e.getModel().endUpdate()}}else x()}),m=!0)}catch(B){}m||x()}});this.addAction("copySize",function(){var m=e.getSelectionCell();e.isEnabled()&&null!=m&&e.getModel().isVertex(m)&&(m=e.getCellGeometry(m),null!=m&&(d.copiedSize=new mxRectangle(m.x,m.y,m.width,m.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",
-function(){if(e.isEnabled()&&!e.isSelectionEmpty()&&null!=d.copiedSize){e.getModel().beginUpdate();try{for(var m=e.getResizableCells(e.getSelectionCells()),r=0;r<m.length;r++)if(e.getModel().isVertex(m[r])){var x=e.getCellGeometry(m[r]);null!=x&&(x=x.clone(),x.width=d.copiedSize.width,x.height=d.copiedSize.height,e.getModel().setGeometry(m[r],x))}}finally{e.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",function(){var m=e.getSelectionCell()||e.getModel().getRoot();e.isEnabled()&&
-null!=m&&(m=m.cloneValue(),null==m||isNaN(m.nodeType)||(d.copiedValue=m))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(m,r){function x(G,J){var D=B.getValue(G);J=G.cloneValue(J);J.removeAttribute("placeholders");null==D||isNaN(D.nodeType)||J.setAttribute("placeholders",D.getAttribute("placeholders"));null!=m&&mxEvent.isShiftDown(m)||J.setAttribute("label",e.convertValueToString(G));B.setValue(G,J)}m=null!=r?r:m;var B=e.getModel();if(e.isEnabled()&&!e.isSelectionEmpty()&&null!=d.copiedValue){B.beginUpdate();
-try{var C=e.getEditableCells(e.getSelectionCells());if(0==C.length)x(B.getRoot(),d.copiedValue);else for(r=0;r<C.length;r++)x(C[r],d.copiedValue)}finally{B.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(m,r){m=null!=r?r:m;null!=m&&mxEvent.isShiftDown(m)?b():a(null!=m&&(mxEvent.isControlDown(m)||mxEvent.isMetaDown(m)||mxEvent.isAltDown(m)))},null,null,"Delete");this.addAction("deleteAll",function(){a(!0)});this.addAction("deleteLabels",function(){b()},null,null,Editor.ctrlKey+
-"+Delete");this.addAction("duplicate",function(){try{e.setSelectionCells(e.duplicateCells()),e.scrollCellToVisible(e.getSelectionCell())}catch(m){d.handleError(m)}},null,null,Editor.ctrlKey+"+D");this.put("mergeCells",new Action(mxResources.get("merge"),function(){var m=d.getSelectionState();if(null!=m.mergeCell){e.getModel().beginUpdate();try{e.setCellStyles("rowspan",m.rowspan,[m.mergeCell]),e.setCellStyles("colspan",m.colspan,[m.mergeCell])}finally{e.getModel().endUpdate()}}}));this.put("unmergeCells",
-new Action(mxResources.get("unmerge"),function(){var m=d.getSelectionState();if(0<m.cells.length){e.getModel().beginUpdate();try{e.setCellStyles("rowspan",null,m.cells),e.setCellStyles("colspan",null,m.cells)}finally{e.getModel().endUpdate()}}}));this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(m,r){m=null!=r?r:m;e.turnShapes(e.getResizableCells(e.getSelectionCells()),null!=m?mxEvent.isShiftDown(m):!1)},null,null,mxClient.IS_SF?null:Editor.ctrlKey+"+R"));
-this.put("selectConnections",new Action(mxResources.get("selectEdges"),function(m){m=e.getSelectionCell();e.isEnabled()&&null!=m&&e.addSelectionCells(e.getEdges(m))}));this.addAction("selectVertices",function(){e.selectVertices(null,!0)},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){e.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){e.selectAll(null,!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){e.clearSelection()},
-null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!e.isSelectionEmpty()){e.getModel().beginUpdate();try{var m=e.getSelectionCells(),r=e.getCurrentCellStyle(e.getSelectionCell()),x=1==mxUtils.getValue(r,mxConstants.STYLE_EDITABLE,1)?0:1;e.setCellStyles(mxConstants.STYLE_MOVABLE,x,m);e.setCellStyles(mxConstants.STYLE_RESIZABLE,x,m);e.setCellStyles(mxConstants.STYLE_ROTATABLE,x,m);e.setCellStyles(mxConstants.STYLE_DELETABLE,x,m);e.setCellStyles(mxConstants.STYLE_EDITABLE,
-x,m);e.setCellStyles("connectable",x,m)}finally{e.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("home",function(){e.home()},null,null,"Shift+Home");this.addAction("exitGroup",function(){e.exitGroup()},null,null,Editor.ctrlKey+"+Shift+Home");this.addAction("enterGroup",function(){e.enterGroup()},null,null,Editor.ctrlKey+"+Shift+End");this.addAction("collapse",function(){e.foldCells(!0)},null,null,Editor.ctrlKey+"+Home");this.addAction("expand",function(){e.foldCells(!1)},
-null,null,Editor.ctrlKey+"+End");this.addAction("toFront",function(){e.orderCells(!1)},null,null,Editor.ctrlKey+"+Shift+F");this.addAction("toBack",function(){e.orderCells(!0)},null,null,Editor.ctrlKey+"+Shift+B");this.addAction("bringForward",function(m){e.orderCells(!1,null,!0)});this.addAction("sendBackward",function(m){e.orderCells(!0,null,!0)});this.addAction("group",function(){if(e.isEnabled()){var m=mxUtils.sortCells(e.getSelectionCells(),!0);1!=m.length||e.isTable(m[0])||e.isTableRow(m[0])?
-(m=e.getCellsForGroup(m),1<m.length&&e.setSelectionCell(e.groupCells(null,0,m))):e.setCellStyles("container","1")}},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",function(){if(e.isEnabled()){var m=e.getEditableCells(e.getSelectionCells());e.model.beginUpdate();try{var r=e.ungroupCells();if(null!=m)for(var x=0;x<m.length;x++)e.model.contains(m[x])&&(0==e.model.getChildCount(m[x])&&e.model.isVertex(m[x])&&e.setCellStyles("container","0",[m[x]]),r.push(m[x]))}finally{e.model.endUpdate()}0<
-r.length&&e.setSelectionCells(r)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){if(e.isEnabled()){var m=e.getSelectionCells();if(null!=m){for(var r=[],x=0;x<m.length;x++)e.isTableRow(m[x])||e.isTableCell(m[x])||r.push(m[x]);e.removeCellsFromParent(r)}}});this.addAction("edit",function(){e.isEnabled()&&e.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var m=e.getSelectionCell()||e.getModel().getRoot();d.showDataDialog(m)},null,
-null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var m=e.getSelectionCell();if(e.isEnabled()&&null!=m&&e.isCellEditable(m)){var r="";if(mxUtils.isNode(m.value)){var x=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&m.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(x=m.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==x&&(x=m.value.getAttribute("tooltip"));null!=x&&(r=x)}r=new TextareaDialog(d,mxResources.get("editTooltip")+":",r,function(B){e.setTooltipForCell(m,
-B)});d.showDialog(r.container,320,200,!0,!0);r.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var m=e.getLinkForCell(e.getSelectionCell());null!=m&&e.openLink(m)});this.addAction("editLink...",function(){var m=e.getSelectionCell();if(e.isEnabled()&&null!=m&&e.isCellEditable(m)){var r=e.getLinkForCell(m)||"";d.showLinkDialog(r,mxResources.get("apply"),function(x,B,C){x=mxUtils.trim(x);e.setLinkForCell(m,0<x.length?x:null);e.setAttributeForCell(m,"linkTarget",C)},!0,e.getLinkTargetForCell(m))}},
-null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){e.isEnabled()&&!e.isCellLocked(e.getDefaultParent())&&(e.clearSelection(),d.actions.get("image").funct())})).isEnabled=k;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){e.isEnabled()&&!e.isCellLocked(e.getDefaultParent())&&d.showLinkDialog("",mxResources.get("insert"),function(m,r,x){m=mxUtils.trim(m);if(0<m.length){var B=null,C=e.getLinkTitle(m);null!=r&&0<r.length&&(B=r[0].iconUrl,
-C=r[0].name||r[0].type,C=C.charAt(0).toUpperCase()+C.substring(1),30<C.length&&(C=C.substring(0,30)+"..."));r=new mxCell(C,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=B?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+B:"spacing=10;"));r.vertex=!0;B=e.getCenterInsertPoint(e.getBoundingBoxFromGeometry([r],!0));r.geometry.x=B.x;r.geometry.y=B.y;e.setAttributeForCell(r,"linkTarget",x);e.setLinkForCell(r,m);e.cellSizeUpdated(r,
-!0);e.getModel().beginUpdate();try{r=e.addCell(r),e.fireEvent(new mxEventObject("cellsInserted","cells",[r]))}finally{e.getModel().endUpdate()}e.setSelectionCell(r);e.scrollCellToVisible(e.getSelectionCell())}},!0)})).isEnabled=k;this.addAction("link...",mxUtils.bind(this,function(){if(e.isEnabled())if(e.cellEditor.isContentEditing()){var m=e.getSelectedElement(),r=e.getParentByName(m,"A",e.cellEditor.textarea),x="";if(null==r&&null!=m&&null!=m.getElementsByTagName)for(var B=m.getElementsByTagName("a"),
-C=0;C<B.length&&null==r;C++)B[C].textContent==m.textContent&&(r=B[C]);null!=r&&"A"==r.nodeName&&(x=r.getAttribute("href")||"",e.selectNode(r));var G=e.cellEditor.saveSelection();d.showLinkDialog(x,mxResources.get("apply"),mxUtils.bind(this,function(J){e.cellEditor.restoreSelection(G);null!=J&&e.insertLink(J)}))}else e.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=k;this.addAction("autosize",function(){var m=e.getSelectionCells();if(null!=m){e.getModel().beginUpdate();
-try{for(var r=0;r<m.length;r++){var x=m[r];0<e.getModel().getChildCount(x)?e.updateGroupBounds([x],0,!0):e.updateCellSize(x)}}finally{e.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){e.snapCellsToGrid(e.getSelectionCells(),e.gridSize)});this.addAction("formattedText",function(){e.stopEditing();var m=e.getCommonStyle(e.getSelectionCells());m="1"==mxUtils.getValue(m,"html","0")?null:"1";e.getModel().beginUpdate();try{for(var r=e.getEditableCells(e.getSelectionCells()),
-x=0;x<r.length;x++)if(state=e.getView().getState(r[x]),null!=state){var B=mxUtils.getValue(state.style,"html","0");if("1"==B&&null==m){var C=e.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(C=C.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var G=document.createElement("div");G.innerHTML=e.sanitizeHtml(C);C=mxUtils.extractTextWithWhitespace(G.childNodes);e.cellLabelChanged(state.cell,C);e.setCellStyles("html",m,[r[x]])}else"0"==B&&"1"==m&&(C=mxUtils.htmlEntities(e.convertValueToString(state.cell),
-!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(C=C.replace(/\n/g,"<br/>")),e.cellLabelChanged(state.cell,e.sanitizeHtml(C)),e.setCellStyles("html",m,[r[x]]))}d.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=m?m:"0"],"cells",r))}finally{e.getModel().endUpdate()}});this.addAction("wordWrap",function(){var m=e.getView().getState(e.getSelectionCell()),r="wrap";e.stopEditing();null!=m&&"wrap"==m.style[mxConstants.STYLE_WHITE_SPACE]&&(r=null);e.setCellStyles(mxConstants.STYLE_WHITE_SPACE,
-r)});this.addAction("rotation",function(){var m="0",r=e.getView().getState(e.getSelectionCell());null!=r&&(m=r.style[mxConstants.STYLE_ROTATION]||m);m=new FilenameDialog(d,m,mxResources.get("apply"),function(x){null!=x&&0<x.length&&e.setCellStyles(mxConstants.STYLE_ROTATION,x)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");d.showDialog(m.container,375,80,!0,!0);m.init()});this.addAction("resetView",function(){e.zoomTo(1);d.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",
-function(m){e.isFastZoomEnabled()?e.lazyZoom(!0,!0,d.buttonZoomDelay):e.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(m){e.isFastZoomEnabled()?e.lazyZoom(!1,!0,d.buttonZoomDelay):e.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var m=e.isSelectionEmpty()?e.getGraphBounds():e.getBoundingBox(e.getSelectionCells()),r=e.view.translate,x=e.view.scale;m.x=m.x/x-r.x;m.y=m.y/x-r.y;m.width/=x;
-m.height/=x;null!=e.backgroundImage&&(m=mxRectangle.fromRectangle(m),m.add(new mxRectangle(0,0,e.backgroundImage.width,e.backgroundImage.height)));0==m.width||0==m.height?(e.zoomTo(1),d.resetScrollbars()):(r=Editor.fitWindowBorders,null!=r&&(m.x-=r.x,m.y-=r.y,m.width+=r.width+r.x,m.height+=r.height+r.y),e.fitWindow(m))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){e.pageVisible||this.get("pageView").funct();var m=e.pageFormat,r=e.pageScale;e.zoomTo(Math.floor(20*
-Math.min((e.container.clientWidth-10)/m.width/r,(e.container.clientHeight-10)/m.height/r))/20);mxUtils.hasScrollbars(e.container)&&(m=e.getPagePadding(),e.container.scrollTop=m.y*e.view.scale-1,e.container.scrollLeft=Math.min(m.x*e.view.scale,(e.container.scrollWidth-e.container.clientWidth)/2)-1)}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){e.pageVisible||this.get("pageView").funct();var m=e.pageFormat,r=e.pageScale;e.zoomTo(Math.floor(20*Math.min((e.container.clientWidth-
-10)/(2*m.width)/r,(e.container.clientHeight-10)/m.height/r))/20);mxUtils.hasScrollbars(e.container)&&(m=e.getPagePadding(),e.container.scrollTop=Math.min(m.y,(e.container.scrollHeight-e.container.clientHeight)/2),e.container.scrollLeft=Math.min(m.x,(e.container.scrollWidth-e.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){e.pageVisible||this.get("pageView").funct();e.zoomTo(Math.floor(20*(e.container.clientWidth-10)/e.pageFormat.width/
-e.pageScale)/20);if(mxUtils.hasScrollbars(e.container)){var m=e.getPagePadding();e.container.scrollLeft=Math.min(m.x*e.view.scale,(e.container.scrollWidth-e.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var m=new FilenameDialog(this.editorUi,parseInt(100*e.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(r){r=parseInt(r);!isNaN(r)&&0<r&&e.zoomTo(r/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(m.container,
-300,80,!0,!0);m.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var m=new FilenameDialog(this.editorUi,parseInt(100*e.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(r){r=parseInt(r);!isNaN(r)&&0<r&&(r=new ChangePageSetup(d,null,null,null,r/100),r.ignoreColor=!0,r.ignoreImage=!0,e.model.execute(r))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(m.container,300,80,!0,!0);m.init()}));var n=null;n=this.addAction("grid",
-function(){e.setGridEnabled(!e.isGridEnabled());e.defaultGridEnabled=e.isGridEnabled();d.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");n.setToggleAction(!0);n.setSelectedCallback(function(){return e.isGridEnabled()});n.setEnabled(!1);n=this.addAction("guides",function(){e.graphHandler.guidesEnabled=!e.graphHandler.guidesEnabled;d.fireEvent(new mxEventObject("guidesEnabledChanged"))});n.setToggleAction(!0);n.setSelectedCallback(function(){return e.graphHandler.guidesEnabled});
-n.setEnabled(!1);n=this.addAction("tooltips",function(){e.tooltipHandler.setEnabled(!e.tooltipHandler.isEnabled());d.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});n.setToggleAction(!0);n.setSelectedCallback(function(){return e.tooltipHandler.isEnabled()});n=this.addAction("collapseExpand",function(){var m=new ChangePageSetup(d);m.ignoreColor=!0;m.ignoreImage=!0;m.foldingEnabled=!e.foldingEnabled;e.model.execute(m)});n.setToggleAction(!0);n.setSelectedCallback(function(){return e.foldingEnabled});
-n.isEnabled=k;n=this.addAction("scrollbars",function(){d.setScrollbars(!d.hasScrollbars())});n.setToggleAction(!0);n.setSelectedCallback(function(){return e.scrollbars});n=this.addAction("pageView",mxUtils.bind(this,function(){d.setPageVisible(!e.pageVisible)}));n.setToggleAction(!0);n.setSelectedCallback(function(){return e.pageVisible});n=this.addAction("connectionArrows",function(){e.connectionArrowsEnabled=!e.connectionArrowsEnabled;d.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,
-null,"Alt+Shift+A");n.setToggleAction(!0);n.setSelectedCallback(function(){return e.connectionArrowsEnabled});n=this.addAction("connectionPoints",function(){e.setConnectable(!e.connectionHandler.isEnabled());d.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");n.setToggleAction(!0);n.setSelectedCallback(function(){return e.connectionHandler.isEnabled()});n=this.addAction("copyConnect",function(){e.connectionHandler.setCreateTarget(!e.connectionHandler.isCreateTarget());
-d.fireEvent(new mxEventObject("copyConnectChanged"))});n.setToggleAction(!0);n.setSelectedCallback(function(){return e.connectionHandler.isCreateTarget()});n.isEnabled=k;n=this.addAction("autosave",function(){d.editor.setAutosave(!d.editor.autosave)});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.editor.autosave});n.isEnabled=k;n.visible=!1;this.addAction("help",function(){var m="";mxResources.isLanguageSupported(mxClient.language)&&(m="_"+mxClient.language);e.openLink(RESOURCES_PATH+
-"/help"+m+".html")});var u=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){u||(d.showDialog((new AboutDialog(d)).container,320,280,!0,!0,function(){u=!1}),u=!0)}));n=mxUtils.bind(this,function(m,r,x,B){return this.addAction(m,function(){if(null!=x&&e.cellEditor.isContentEditing())x();else{e.stopEditing(!1);e.getModel().beginUpdate();try{var C=e.getEditableCells(e.getSelectionCells());e.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,r,C);(r&mxConstants.FONT_BOLD)==
-mxConstants.FONT_BOLD?e.updateLabelElements(C,function(J){J.style.fontWeight=null;"B"==J.nodeName&&e.replaceElement(J)}):(r&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?e.updateLabelElements(C,function(J){J.style.fontStyle=null;"I"==J.nodeName&&e.replaceElement(J)}):(r&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&e.updateLabelElements(C,function(J){J.style.textDecoration=null;"U"==J.nodeName&&e.replaceElement(J)});for(var G=0;G<C.length;G++)0==e.model.getChildCount(C[G])&&e.autoSizeCell(C[G],
-!1)}finally{e.getModel().endUpdate()}}},null,null,B)});n("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");n("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");n("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){d.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",
-function(){d.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){d.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});this.addAction("gradientColor...",function(){d.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});this.addAction("backgroundColor...",function(){d.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor")});this.addAction("borderColor...",function(){d.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR)});this.addAction("vertical",function(){d.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,
-!0)});this.addAction("shadow",function(){d.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){e.getModel().beginUpdate();try{e.setCellStyles(mxConstants.STYLE_DASHED,null),e.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",e.getSelectionCells()))}finally{e.getModel().endUpdate()}});this.addAction("dashed",function(){e.getModel().beginUpdate();
-try{e.setCellStyles(mxConstants.STYLE_DASHED,"1"),e.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",e.getSelectionCells()))}finally{e.getModel().endUpdate()}});this.addAction("dotted",function(){e.getModel().beginUpdate();try{e.setCellStyles(mxConstants.STYLE_DASHED,"1"),e.setCellStyles(mxConstants.STYLE_DASH_PATTERN,"1 4"),d.fireEvent(new mxEventObject("styleChanged",
-"keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1","1 4"],"cells",e.getSelectionCells()))}finally{e.getModel().endUpdate()}});this.addAction("sharp",function(){e.getModel().beginUpdate();try{e.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),e.setCellStyles(mxConstants.STYLE_CURVED,"0"),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","0"],"cells",e.getSelectionCells()))}finally{e.getModel().endUpdate()}});
-this.addAction("rounded",function(){e.getModel().beginUpdate();try{e.setCellStyles(mxConstants.STYLE_ROUNDED,"1"),e.setCellStyles(mxConstants.STYLE_CURVED,"0"),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",e.getSelectionCells()))}finally{e.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!e.isSelectionEmpty()&&e.isEnabled()){e.getModel().beginUpdate();try{var m=e.getSelectionCells(),r=e.getCurrentCellStyle(m[0]),
-x="1"==mxUtils.getValue(r,mxConstants.STYLE_ROUNDED,"0")?"0":"1";e.setCellStyles(mxConstants.STYLE_ROUNDED,x);e.setCellStyles(mxConstants.STYLE_CURVED,null);d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[x,"0"],"cells",e.getSelectionCells()))}finally{e.getModel().endUpdate()}}});this.addAction("curved",function(){e.getModel().beginUpdate();try{e.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),e.setCellStyles(mxConstants.STYLE_CURVED,
-"1"),d.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",e.getSelectionCells()))}finally{e.getModel().endUpdate()}});this.addAction("collapsible",function(){var m=e.view.getState(e.getSelectionCell()),r="1";null!=m&&null!=e.getFoldingImage(m)&&(r="0");e.setCellStyles("collapsible",r);d.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[r],"cells",e.getSelectionCells()))});this.addAction("editStyle...",
-mxUtils.bind(this,function(){var m=e.getEditableCells(e.getSelectionCells());if(null!=m&&0<m.length){var r=e.getModel();r=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",r.getStyle(m[0])||"",function(x){null!=x&&e.setCellStyle(mxUtils.trim(x),m)},null,null,400,220);this.editorUi.showDialog(r.container,420,300,!0,!0);r.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){e.isEnabled()&&!e.isSelectionEmpty()&&d.setDefaultStyle(e.getSelectionCell())},
-null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){e.isEnabled()&&d.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var m=e.getSelectionCell();if(null!=m&&e.getModel().isEdge(m)){var r=g.graph.selectionCellsHandler.getHandler(m);if(r instanceof mxEdgeHandler){var x=e.view.translate,B=e.view.scale,C=x.x;x=x.y;m=e.getModel().getParent(m);for(var G=e.getCellGeometry(m);e.getModel().isVertex(m)&&null!=G;)C+=G.x,x+=G.y,m=
-e.getModel().getParent(m),G=e.getCellGeometry(m);C=Math.round(e.snap(e.popupMenuHandler.triggerX/B-C));B=Math.round(e.snap(e.popupMenuHandler.triggerY/B-x));r.addPointAt(r.state,C,B)}}});this.addAction("removeWaypoint",function(){var m=d.actions.get("removeWaypoint");null!=m.handler&&m.handler.removePoint(m.handler.state,m.index)});this.addAction("clearWaypoints",function(m,r){m=null!=r?r:m;var x=e.getSelectionCells();if(null!=x){x=e.getEditableCells(e.addAllEdges(x));e.getModel().beginUpdate();try{for(var B=
-0;B<x.length;B++){var C=x[B];if(e.getModel().isEdge(C)){var G=e.getCellGeometry(C);null!=r&&mxEvent.isShiftDown(m)?(e.setCellStyles(mxConstants.STYLE_EXIT_X,null,[C]),e.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[C]),e.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[C]),e.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[C])):null!=G&&(G=G.clone(),G.points=null,G.x=0,G.y=0,G.offset=null,e.getModel().setGeometry(C,G))}}}finally{e.getModel().endUpdate()}}},null,null,"Alt+Shift+C");n=this.addAction("subscript",
-mxUtils.bind(this,function(){e.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");n=this.addAction("superscript",mxUtils.bind(this,function(){e.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(e.isEnabled()&&!e.isCellLocked(e.getDefaultParent())){var m=mxResources.get("image")+" ("+mxResources.get("url")+"):",r=e.getView().getState(e.getSelectionCell()),
-x="",B=null;null!=r&&(x=r.style[mxConstants.STYLE_IMAGE]||x,B=r.style[mxConstants.STYLE_CLIP_PATH]||B);var C=e.cellEditor.saveSelection();d.showImageDialog(m,x,function(G,J,D,N,Q,R){if(e.cellEditor.isContentEditing())e.cellEditor.restoreSelection(C),e.insertImage(G,J,D);else{var P=e.getSelectionCells();if(null!=G&&(0<G.length||0<P.length)){var Z=null;e.getModel().beginUpdate();try{if(0==P.length){P=[e.insertVertex(e.getDefaultParent(),null,"",0,0,J,D,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];
-var U=e.getCenterInsertPoint(e.getBoundingBoxFromGeometry(P,!0));P[0].geometry.x=U.x;P[0].geometry.y=U.y;null!=N&&f(P[0],N,Q,R,e);Z=P;e.fireEvent(new mxEventObject("cellsInserted","cells",Z))}e.setCellStyles(mxConstants.STYLE_IMAGE,0<G.length?G:null,P);var V=e.getCurrentCellStyle(P[0]);"image"!=V[mxConstants.STYLE_SHAPE]&&"label"!=V[mxConstants.STYLE_SHAPE]?e.setCellStyles(mxConstants.STYLE_SHAPE,"image",P):0==G.length&&e.setCellStyles(mxConstants.STYLE_SHAPE,null,P);if(1==e.getSelectionCount()&&
-null!=J&&null!=D){var ia=P[0],ha=e.getModel().getGeometry(ia);null!=ha&&(ha=ha.clone(),ha.width=J,ha.height=D,e.getModel().setGeometry(ia,ha));null!=N?f(ia,N,Q,R,e):e.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,P)}}finally{e.getModel().endUpdate()}null!=Z&&(e.setSelectionCells(Z),e.scrollCellToVisible(Z[0]))}}},e.cellEditor.isContentEditing(),!e.cellEditor.isContentEditing(),!0,B)}}).isEnabled=k;this.addAction("crop...",function(){var m=e.getSelectionCell();if(e.isEnabled()&&!e.isCellLocked(e.getDefaultParent())&&
-null!=m){var r=e.getCurrentCellStyle(m),x=r[mxConstants.STYLE_IMAGE],B=r[mxConstants.STYLE_SHAPE];x&&"image"==B&&(r=new CropImageDialog(d,x,r[mxConstants.STYLE_CLIP_PATH],function(C,G,J){f(m,C,G,J,e)}),d.showDialog(r.container,300,390,!0,!0))}}).isEnabled=k;n=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(d,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",mxUtils.bind(this,function(){d.fireEvent(new mxEventObject("layers"))})),
-this.layersWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));n=this.addAction("formatPanel",mxUtils.bind(this,
-function(){d.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return 0<d.formatWidth}));n=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(d,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){d.fireEvent(new mxEventObject("outline"))})),this.outlineWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("outline"))}),
-this.outlineWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var m=e.getSelectionCell();if(e.isEnabled()&&!e.isCellLocked(e.getDefaultParent())&&null!=m){var r=new ConnectionPointsDialog(d,
-m);d.showDialog(r.container,350,450,!0,!1,function(){r.destroy()});r.init()}}).isEnabled=k};Actions.prototype.addAction=function(a,b,f,d,g){if("..."==a.substring(a.length-3)){a=a.substring(0,a.length-3);var e=mxResources.get(a)+"..."}else e=mxResources.get(a);return this.put(a,new Action(e,b,f,d,g))};Actions.prototype.put=function(a,b){return this.actions[a]=b};Actions.prototype.get=function(a){return this.actions[a]};
-function Action(a,b,f,d,g){mxEventSource.call(this);this.label=a;this.funct=this.createFunction(b);this.enabled=null!=f?f:!0;this.iconCls=d;this.shortcut=g;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(a){return a};Action.prototype.setEnabled=function(a){this.enabled!=a&&(this.enabled=a,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};
+Actions.prototype.init=function(){function a(m){d.escape();m=d.deleteCells(d.getDeletableCells(d.getSelectionCells()),m);null!=m&&d.setSelectionCells(m)}function b(){if(!d.isSelectionEmpty()){d.getModel().beginUpdate();try{for(var m=d.getSelectionCells(),r=0;r<m.length;r++)d.cellLabelChanged(m[r],"")}finally{d.getModel().endUpdate()}}}function f(m,r,x,B,C){C.getModel().beginUpdate();try{var F=C.getCellGeometry(m);null!=F&&x&&B&&(x/=B,F=F.clone(),1<x?F.height=F.width/x:F.width=F.height*x,C.getModel().setGeometry(m,
+F));C.setCellStyles(mxConstants.STYLE_CLIP_PATH,r,[m]);C.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[m])}finally{C.getModel().endUpdate()}}var e=this.editorUi,g=e.editor,d=g.graph,k=function(){return Action.prototype.isEnabled.apply(this,arguments)&&d.isEnabled()};this.addAction("new...",function(){d.openLink(e.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";e.openFile()});this.addAction("smartFit",function(){d.popupMenuHandler.hideMenu();var m=d.view.scale,
+r=d.view.translate.x,x=d.view.translate.y;e.actions.get("resetView").funct();1E-5>Math.abs(m-d.view.scale)&&r==d.view.translate.x&&x==d.view.translate.y&&e.actions.get(d.pageVisible?"fitPage":"fitWindow").funct()});this.addAction("keyPressEnter",function(){d.isEnabled()&&(d.isSelectionEmpty()?e.actions.get("smartFit").funct():d.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(m,r){try{var x=mxUtils.parseXml(m);g.graph.setSelectionCells(g.graph.importGraphModel(x.documentElement))}catch(B){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+B.message)}}));e.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=k;this.addAction("save",function(){e.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=k;this.addAction("saveAs...",function(){e.saveFile(!0)},null,
+null,Editor.ctrlKey+"+Shift+S").isEnabled=k;this.addAction("export...",function(){e.showDialog((new ExportDialog(e)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var m=new EditDiagramDialog(e);e.showDialog(m.container,620,420,!0,!1);m.init()});this.addAction("pageSetup...",function(){e.showDialog((new PageSetupDialog(e)).container,320,240,!0,!0)}).isEnabled=k;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(d,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 m=null;try{m=e.copyXml(),null!=m&&d.removeCells(m,!1)}catch(r){}null==m&&mxClipboard.cut(d)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{e.copyXml()}catch(m){}try{mxClipboard.copy(d)}catch(m){e.handleError(m)}},
+null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var m=!1;try{Editor.enableNativeCipboard&&(e.readGraphModelFromClipboard(function(r){if(null!=r){d.getModel().beginUpdate();try{e.pasteXml(r,!0)}finally{d.getModel().endUpdate()}}else mxClipboard.paste(d)}),m=!0)}catch(r){}m||mxClipboard.paste(d)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(m){function r(B){if(null!=B){for(var C=!0,F=0;F<
+B.length&&C;F++)C=C&&d.model.isEdge(B[F]);var J=d.view.translate;F=d.view.scale;var D=J.x,N=J.y;J=null;if(1==B.length&&C){var S=d.getCellGeometry(B[0]);null!=S&&(J=S.getTerminalPoint(!0))}J=null!=J?J:d.getBoundingBoxFromGeometry(B,C);null!=J&&(C=Math.round(d.snap(d.popupMenuHandler.triggerX/F-D)),F=Math.round(d.snap(d.popupMenuHandler.triggerY/F-N)),d.cellsMoved(B,C-J.x,F-J.y))}}function x(){d.getModel().beginUpdate();try{r(mxClipboard.paste(d))}finally{d.getModel().endUpdate()}}if(d.isEnabled()&&
+!d.isCellLocked(d.getDefaultParent())){m=!1;try{Editor.enableNativeCipboard&&(e.readGraphModelFromClipboard(function(B){if(null!=B){d.getModel().beginUpdate();try{r(e.pasteXml(B,!0))}finally{d.getModel().endUpdate()}}else x()}),m=!0)}catch(B){}m||x()}});this.addAction("copySize",function(){var m=d.getSelectionCell();d.isEnabled()&&null!=m&&d.getModel().isVertex(m)&&(m=d.getCellGeometry(m),null!=m&&(e.copiedSize=new mxRectangle(m.x,m.y,m.width,m.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",
+function(){if(d.isEnabled()&&!d.isSelectionEmpty()&&null!=e.copiedSize){d.getModel().beginUpdate();try{for(var m=d.getResizableCells(d.getSelectionCells()),r=0;r<m.length;r++)if(d.getModel().isVertex(m[r])){var x=d.getCellGeometry(m[r]);null!=x&&(x=x.clone(),x.width=e.copiedSize.width,x.height=e.copiedSize.height,d.getModel().setGeometry(m[r],x))}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",function(){var m=d.getSelectionCell()||d.getModel().getRoot();d.isEnabled()&&
+null!=m&&(m=m.cloneValue(),null==m||isNaN(m.nodeType)||(e.copiedValue=m))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(m,r){function x(F,J){var D=B.getValue(F);J=F.cloneValue(J);J.removeAttribute("placeholders");null==D||isNaN(D.nodeType)||J.setAttribute("placeholders",D.getAttribute("placeholders"));null!=m&&mxEvent.isShiftDown(m)||J.setAttribute("label",d.convertValueToString(F));B.setValue(F,J)}m=null!=r?r:m;var B=d.getModel();if(d.isEnabled()&&!d.isSelectionEmpty()&&null!=e.copiedValue){B.beginUpdate();
+try{var C=d.getEditableCells(d.getSelectionCells());if(0==C.length)x(B.getRoot(),e.copiedValue);else for(r=0;r<C.length;r++)x(C[r],e.copiedValue)}finally{B.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(m,r){m=null!=r?r:m;null!=m&&mxEvent.isShiftDown(m)?b():a(null!=m&&(mxEvent.isControlDown(m)||mxEvent.isMetaDown(m)||mxEvent.isAltDown(m)))},null,null,"Delete");this.addAction("deleteAll",function(){a(!0)});this.addAction("deleteLabels",function(){b()},null,null,Editor.ctrlKey+
+"+Delete");this.addAction("duplicate",function(){try{d.setSelectionCells(d.duplicateCells()),d.scrollCellToVisible(d.getSelectionCell())}catch(m){e.handleError(m)}},null,null,Editor.ctrlKey+"+D");this.put("mergeCells",new Action(mxResources.get("merge"),function(){var m=e.getSelectionState();if(null!=m.mergeCell){d.getModel().beginUpdate();try{d.setCellStyles("rowspan",m.rowspan,[m.mergeCell]),d.setCellStyles("colspan",m.colspan,[m.mergeCell])}finally{d.getModel().endUpdate()}}}));this.put("unmergeCells",
+new Action(mxResources.get("unmerge"),function(){var m=e.getSelectionState();if(0<m.cells.length){d.getModel().beginUpdate();try{d.setCellStyles("rowspan",null,m.cells),d.setCellStyles("colspan",null,m.cells)}finally{d.getModel().endUpdate()}}}));this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(m,r){m=null!=r?r:m;d.turnShapes(d.getResizableCells(d.getSelectionCells()),null!=m?mxEvent.isShiftDown(m):!1)},null,null,mxClient.IS_SF?null:Editor.ctrlKey+"+R"));
+this.put("selectConnections",new Action(mxResources.get("selectEdges"),function(m){m=d.getSelectionCell();d.isEnabled()&&null!=m&&d.addSelectionCells(d.getEdges(m))}));this.addAction("selectVertices",function(){d.selectVertices(null,!0)},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){d.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){d.selectAll(null,!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){d.clearSelection()},
+null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!d.isSelectionEmpty()){d.getModel().beginUpdate();try{var m=d.getSelectionCells(),r=d.getCurrentCellStyle(d.getSelectionCell()),x=1==mxUtils.getValue(r,mxConstants.STYLE_EDITABLE,1)?0:1;d.setCellStyles(mxConstants.STYLE_MOVABLE,x,m);d.setCellStyles(mxConstants.STYLE_RESIZABLE,x,m);d.setCellStyles(mxConstants.STYLE_ROTATABLE,x,m);d.setCellStyles(mxConstants.STYLE_DELETABLE,x,m);d.setCellStyles(mxConstants.STYLE_EDITABLE,
+x,m);d.setCellStyles("connectable",x,m)}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("home",function(){d.home()},null,null,"Shift+Home");this.addAction("exitGroup",function(){d.exitGroup()},null,null,Editor.ctrlKey+"+Shift+Home");this.addAction("enterGroup",function(){d.enterGroup()},null,null,Editor.ctrlKey+"+Shift+End");this.addAction("collapse",function(){d.foldCells(!0)},null,null,Editor.ctrlKey+"+Home");this.addAction("expand",function(){d.foldCells(!1)},
+null,null,Editor.ctrlKey+"+End");this.addAction("toFront",function(){d.orderCells(!1)},null,null,Editor.ctrlKey+"+Shift+F");this.addAction("toBack",function(){d.orderCells(!0)},null,null,Editor.ctrlKey+"+Shift+B");this.addAction("bringForward",function(m){d.orderCells(!1,null,!0)});this.addAction("sendBackward",function(m){d.orderCells(!0,null,!0)});this.addAction("group",function(){if(d.isEnabled()){var m=mxUtils.sortCells(d.getSelectionCells(),!0);1!=m.length||d.isTable(m[0])||d.isTableRow(m[0])?
+(m=d.getCellsForGroup(m),1<m.length&&d.setSelectionCell(d.groupCells(null,0,m))):d.setCellStyles("container","1")}},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",function(){if(d.isEnabled()){var m=d.getEditableCells(d.getSelectionCells());d.model.beginUpdate();try{var r=d.ungroupCells();if(null!=m)for(var x=0;x<m.length;x++)d.model.contains(m[x])&&(0==d.model.getChildCount(m[x])&&d.model.isVertex(m[x])&&d.setCellStyles("container","0",[m[x]]),r.push(m[x]))}finally{d.model.endUpdate()}0<
+r.length&&d.setSelectionCells(r)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){if(d.isEnabled()){var m=d.getSelectionCells();if(null!=m){for(var r=[],x=0;x<m.length;x++)d.isTableRow(m[x])||d.isTableCell(m[x])||r.push(m[x]);d.removeCellsFromParent(r)}}});this.addAction("edit",function(){d.isEnabled()&&d.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var m=d.getSelectionCell()||d.getModel().getRoot();e.showDataDialog(m)},null,
+null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var m=d.getSelectionCell();if(d.isEnabled()&&null!=m&&d.isCellEditable(m)){var r="";if(mxUtils.isNode(m.value)){var x=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&m.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(x=m.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==x&&(x=m.value.getAttribute("tooltip"));null!=x&&(r=x)}r=new TextareaDialog(e,mxResources.get("editTooltip")+":",r,function(B){d.setTooltipForCell(m,
+B)});e.showDialog(r.container,320,200,!0,!0);r.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var m=d.getLinkForCell(d.getSelectionCell());null!=m&&d.openLink(m)});this.addAction("editLink...",function(){var m=d.getSelectionCell();if(d.isEnabled()&&null!=m&&d.isCellEditable(m)){var r=d.getLinkForCell(m)||"";e.showLinkDialog(r,mxResources.get("apply"),function(x,B,C){x=mxUtils.trim(x);d.setLinkForCell(m,0<x.length?x:null);d.setAttributeForCell(m,"linkTarget",C)},!0,d.getLinkTargetForCell(m))}},
+null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&(d.clearSelection(),e.actions.get("image").funct())})).isEnabled=k;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&e.showLinkDialog("",mxResources.get("insert"),function(m,r,x){m=mxUtils.trim(m);if(0<m.length){var B=null,C=d.getLinkTitle(m);null!=r&&0<r.length&&(B=r[0].iconUrl,
+C=r[0].name||r[0].type,C=C.charAt(0).toUpperCase()+C.substring(1),30<C.length&&(C=C.substring(0,30)+"..."));r=new mxCell(C,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=B?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+B:"spacing=10;"));r.vertex=!0;B=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry([r],!0));r.geometry.x=B.x;r.geometry.y=B.y;d.setAttributeForCell(r,"linkTarget",x);d.setLinkForCell(r,m);d.cellSizeUpdated(r,
+!0);d.getModel().beginUpdate();try{r=d.addCell(r),d.fireEvent(new mxEventObject("cellsInserted","cells",[r]))}finally{d.getModel().endUpdate()}d.setSelectionCell(r);d.scrollCellToVisible(d.getSelectionCell())}},!0)})).isEnabled=k;this.addAction("link...",mxUtils.bind(this,function(){if(d.isEnabled())if(d.cellEditor.isContentEditing()){var m=d.getSelectedElement(),r=d.getParentByName(m,"A",d.cellEditor.textarea),x="";if(null==r&&null!=m&&null!=m.getElementsByTagName)for(var B=m.getElementsByTagName("a"),
+C=0;C<B.length&&null==r;C++)B[C].textContent==m.textContent&&(r=B[C]);null!=r&&"A"==r.nodeName&&(x=r.getAttribute("href")||"",d.selectNode(r));var F=d.cellEditor.saveSelection();e.showLinkDialog(x,mxResources.get("apply"),mxUtils.bind(this,function(J){d.cellEditor.restoreSelection(F);null!=J&&d.insertLink(J)}))}else d.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=k;this.addAction("autosize",function(){var m=d.getSelectionCells();if(null!=m){d.getModel().beginUpdate();
+try{for(var r=0;r<m.length;r++){var x=m[r];0<d.getModel().getChildCount(x)?d.updateGroupBounds([x],0,!0):d.updateCellSize(x)}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){d.snapCellsToGrid(d.getSelectionCells(),d.gridSize)});this.addAction("formattedText",function(){d.stopEditing();var m=d.getCommonStyle(d.getSelectionCells());m="1"==mxUtils.getValue(m,"html","0")?null:"1";d.getModel().beginUpdate();try{for(var r=d.getEditableCells(d.getSelectionCells()),
+x=0;x<r.length;x++)if(state=d.getView().getState(r[x]),null!=state){var B=mxUtils.getValue(state.style,"html","0");if("1"==B&&null==m){var C=d.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(C=C.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var F=document.createElement("div");F.innerHTML=d.sanitizeHtml(C);C=mxUtils.extractTextWithWhitespace(F.childNodes);d.cellLabelChanged(state.cell,C);d.setCellStyles("html",m,[r[x]])}else"0"==B&&"1"==m&&(C=mxUtils.htmlEntities(d.convertValueToString(state.cell),
+!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(C=C.replace(/\n/g,"<br/>")),d.cellLabelChanged(state.cell,d.sanitizeHtml(C)),d.setCellStyles("html",m,[r[x]]))}e.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=m?m:"0"],"cells",r))}finally{d.getModel().endUpdate()}});this.addAction("wordWrap",function(){var m=d.getView().getState(d.getSelectionCell()),r="wrap";d.stopEditing();null!=m&&"wrap"==m.style[mxConstants.STYLE_WHITE_SPACE]&&(r=null);d.setCellStyles(mxConstants.STYLE_WHITE_SPACE,
+r)});this.addAction("rotation",function(){var m="0",r=d.getView().getState(d.getSelectionCell());null!=r&&(m=r.style[mxConstants.STYLE_ROTATION]||m);m=new FilenameDialog(e,m,mxResources.get("apply"),function(x){null!=x&&0<x.length&&d.setCellStyles(mxConstants.STYLE_ROTATION,x)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");e.showDialog(m.container,375,80,!0,!0);m.init()});this.addAction("resetView",function(){d.zoomTo(1);e.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",
+function(m){d.isFastZoomEnabled()?d.lazyZoom(!0,!0,e.buttonZoomDelay):d.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(m){d.isFastZoomEnabled()?d.lazyZoom(!1,!0,e.buttonZoomDelay):d.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var m=d.isSelectionEmpty()?d.getGraphBounds():d.getBoundingBox(d.getSelectionCells()),r=d.view.translate,x=d.view.scale;m.x=m.x/x-r.x;m.y=m.y/x-r.y;m.width/=x;
+m.height/=x;null!=d.backgroundImage&&(m=mxRectangle.fromRectangle(m),m.add(new mxRectangle(0,0,d.backgroundImage.width,d.backgroundImage.height)));0==m.width||0==m.height?(d.zoomTo(1),e.resetScrollbars()):(r=Editor.fitWindowBorders,null!=r&&(m.x-=r.x,m.y-=r.y,m.width+=r.width+r.x,m.height+=r.height+r.y),d.fitWindow(m))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();var m=d.pageFormat,r=d.pageScale;d.zoomTo(Math.floor(20*
+Math.min((d.container.clientWidth-10)/m.width/r,(d.container.clientHeight-10)/m.height/r))/20);mxUtils.hasScrollbars(d.container)&&(m=d.getPagePadding(),d.container.scrollTop=m.y*d.view.scale-1,d.container.scrollLeft=Math.min(m.x*d.view.scale,(d.container.scrollWidth-d.container.clientWidth)/2)-1)}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();var m=d.pageFormat,r=d.pageScale;d.zoomTo(Math.floor(20*Math.min((d.container.clientWidth-
+10)/(2*m.width)/r,(d.container.clientHeight-10)/m.height/r))/20);mxUtils.hasScrollbars(d.container)&&(m=d.getPagePadding(),d.container.scrollTop=Math.min(m.y,(d.container.scrollHeight-d.container.clientHeight)/2),d.container.scrollLeft=Math.min(m.x,(d.container.scrollWidth-d.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();d.zoomTo(Math.floor(20*(d.container.clientWidth-10)/d.pageFormat.width/
+d.pageScale)/20);if(mxUtils.hasScrollbars(d.container)){var m=d.getPagePadding();d.container.scrollLeft=Math.min(m.x*d.view.scale,(d.container.scrollWidth-d.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var m=new FilenameDialog(this.editorUi,parseInt(100*d.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(r){r=parseInt(r);!isNaN(r)&&0<r&&d.zoomTo(r/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(m.container,
+300,80,!0,!0);m.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var m=new FilenameDialog(this.editorUi,parseInt(100*d.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(r){r=parseInt(r);!isNaN(r)&&0<r&&(r=new ChangePageSetup(e,null,null,null,r/100),r.ignoreColor=!0,r.ignoreImage=!0,d.model.execute(r))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(m.container,300,80,!0,!0);m.init()}));var n=null;n=this.addAction("grid",
+function(){d.setGridEnabled(!d.isGridEnabled());d.defaultGridEnabled=d.isGridEnabled();e.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");n.setToggleAction(!0);n.setSelectedCallback(function(){return d.isGridEnabled()});n.setEnabled(!1);n=this.addAction("guides",function(){d.graphHandler.guidesEnabled=!d.graphHandler.guidesEnabled;e.fireEvent(new mxEventObject("guidesEnabledChanged"))});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.graphHandler.guidesEnabled});
+n.setEnabled(!1);n=this.addAction("tooltips",function(){d.tooltipHandler.setEnabled(!d.tooltipHandler.isEnabled());e.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.tooltipHandler.isEnabled()});n=this.addAction("collapseExpand",function(){var m=new ChangePageSetup(e);m.ignoreColor=!0;m.ignoreImage=!0;m.foldingEnabled=!d.foldingEnabled;d.model.execute(m)});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.foldingEnabled});
+n.isEnabled=k;n=this.addAction("scrollbars",function(){e.setScrollbars(!e.hasScrollbars())});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.scrollbars});n=this.addAction("pageView",mxUtils.bind(this,function(){e.setPageVisible(!d.pageVisible)}));n.setToggleAction(!0);n.setSelectedCallback(function(){return d.pageVisible});n=this.addAction("connectionArrows",function(){d.connectionArrowsEnabled=!d.connectionArrowsEnabled;e.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,
+null,"Alt+Shift+A");n.setToggleAction(!0);n.setSelectedCallback(function(){return d.connectionArrowsEnabled});n=this.addAction("connectionPoints",function(){d.setConnectable(!d.connectionHandler.isEnabled());e.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");n.setToggleAction(!0);n.setSelectedCallback(function(){return d.connectionHandler.isEnabled()});n=this.addAction("copyConnect",function(){d.connectionHandler.setCreateTarget(!d.connectionHandler.isCreateTarget());
+e.fireEvent(new mxEventObject("copyConnectChanged"))});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.connectionHandler.isCreateTarget()});n.isEnabled=k;n=this.addAction("autosave",function(){e.editor.setAutosave(!e.editor.autosave)});n.setToggleAction(!0);n.setSelectedCallback(function(){return e.editor.autosave});n.isEnabled=k;n.visible=!1;this.addAction("help",function(){var m="";mxResources.isLanguageSupported(mxClient.language)&&(m="_"+mxClient.language);d.openLink(RESOURCES_PATH+
+"/help"+m+".html")});var u=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){u||(e.showDialog((new AboutDialog(e)).container,320,280,!0,!0,function(){u=!1}),u=!0)}));n=mxUtils.bind(this,function(m,r,x,B){return this.addAction(m,function(){if(null!=x&&d.cellEditor.isContentEditing())x();else{d.stopEditing(!1);d.getModel().beginUpdate();try{var C=d.getEditableCells(d.getSelectionCells());d.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,r,C);(r&mxConstants.FONT_BOLD)==
+mxConstants.FONT_BOLD?d.updateLabelElements(C,function(J){J.style.fontWeight=null;"B"==J.nodeName&&d.replaceElement(J)}):(r&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?d.updateLabelElements(C,function(J){J.style.fontStyle=null;"I"==J.nodeName&&d.replaceElement(J)}):(r&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&d.updateLabelElements(C,function(J){J.style.textDecoration=null;"U"==J.nodeName&&d.replaceElement(J)});for(var F=0;F<C.length;F++)0==d.model.getChildCount(C[F])&&d.autoSizeCell(C[F],
+!1)}finally{d.getModel().endUpdate()}}},null,null,B)});n("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");n("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");n("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){e.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",
+function(){e.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){e.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});this.addAction("gradientColor...",function(){e.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});this.addAction("backgroundColor...",function(){e.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor")});this.addAction("borderColor...",function(){e.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR)});this.addAction("vertical",function(){e.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,
+!0)});this.addAction("shadow",function(){e.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,null),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("dashed",function(){d.getModel().beginUpdate();
+try{d.setCellStyles(mxConstants.STYLE_DASHED,"1"),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("dotted",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,"1"),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,"1 4"),e.fireEvent(new mxEventObject("styleChanged",
+"keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1","1 4"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("sharp",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),d.setCellStyles(mxConstants.STYLE_CURVED,"0"),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});
+this.addAction("rounded",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,"1"),d.setCellStyles(mxConstants.STYLE_CURVED,"0"),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!d.isSelectionEmpty()&&d.isEnabled()){d.getModel().beginUpdate();try{var m=d.getSelectionCells(),r=d.getCurrentCellStyle(m[0]),
+x="1"==mxUtils.getValue(r,mxConstants.STYLE_ROUNDED,"0")?"0":"1";d.setCellStyles(mxConstants.STYLE_ROUNDED,x);d.setCellStyles(mxConstants.STYLE_CURVED,null);e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[x,"0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}}});this.addAction("curved",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),d.setCellStyles(mxConstants.STYLE_CURVED,
+"1"),e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("collapsible",function(){var m=d.view.getState(d.getSelectionCell()),r="1";null!=m&&null!=d.getFoldingImage(m)&&(r="0");d.setCellStyles("collapsible",r);e.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[r],"cells",d.getSelectionCells()))});this.addAction("editStyle...",
+mxUtils.bind(this,function(){var m=d.getEditableCells(d.getSelectionCells());if(null!=m&&0<m.length){var r=d.getModel();r=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",r.getStyle(m[0])||"",function(x){null!=x&&d.setCellStyle(mxUtils.trim(x),m)},null,null,400,220);this.editorUi.showDialog(r.container,420,300,!0,!0);r.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){d.isEnabled()&&!d.isSelectionEmpty()&&e.setDefaultStyle(d.getSelectionCell())},
+null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){d.isEnabled()&&e.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var m=d.getSelectionCell();if(null!=m&&d.getModel().isEdge(m)){var r=g.graph.selectionCellsHandler.getHandler(m);if(r instanceof mxEdgeHandler){var x=d.view.translate,B=d.view.scale,C=x.x;x=x.y;m=d.getModel().getParent(m);for(var F=d.getCellGeometry(m);d.getModel().isVertex(m)&&null!=F;)C+=F.x,x+=F.y,m=
+d.getModel().getParent(m),F=d.getCellGeometry(m);C=Math.round(d.snap(d.popupMenuHandler.triggerX/B-C));B=Math.round(d.snap(d.popupMenuHandler.triggerY/B-x));r.addPointAt(r.state,C,B)}}});this.addAction("removeWaypoint",function(){var m=e.actions.get("removeWaypoint");null!=m.handler&&m.handler.removePoint(m.handler.state,m.index)});this.addAction("clearWaypoints",function(m,r){m=null!=r?r:m;var x=d.getSelectionCells();if(null!=x){x=d.getEditableCells(d.addAllEdges(x));d.getModel().beginUpdate();try{for(var B=
+0;B<x.length;B++){var C=x[B];if(d.getModel().isEdge(C)){var F=d.getCellGeometry(C);null!=r&&mxEvent.isShiftDown(m)?(d.setCellStyles(mxConstants.STYLE_EXIT_X,null,[C]),d.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[C]),d.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[C]),d.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[C])):null!=F&&(F=F.clone(),F.points=null,F.x=0,F.y=0,F.offset=null,d.getModel().setGeometry(C,F))}}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+C");n=this.addAction("subscript",
+mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");n=this.addAction("superscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var m=mxResources.get("image")+" ("+mxResources.get("url")+"):",r=d.getView().getState(d.getSelectionCell()),
+x="",B=null;null!=r&&(x=r.style[mxConstants.STYLE_IMAGE]||x,B=r.style[mxConstants.STYLE_CLIP_PATH]||B);var C=d.cellEditor.saveSelection();e.showImageDialog(m,x,function(F,J,D,N,S,T){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(C),d.insertImage(F,J,D);else{var P=d.getSelectionCells();if(null!=F&&(0<F.length||0<P.length)){var Z=null;d.getModel().beginUpdate();try{if(0==P.length){P=[d.insertVertex(d.getDefaultParent(),null,"",0,0,J,D,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];
+var U=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry(P,!0));P[0].geometry.x=U.x;P[0].geometry.y=U.y;null!=N&&f(P[0],N,S,T,d);Z=P;d.fireEvent(new mxEventObject("cellsInserted","cells",Z))}d.setCellStyles(mxConstants.STYLE_IMAGE,0<F.length?F:null,P);var V=d.getCurrentCellStyle(P[0]);"image"!=V[mxConstants.STYLE_SHAPE]&&"label"!=V[mxConstants.STYLE_SHAPE]?d.setCellStyles(mxConstants.STYLE_SHAPE,"image",P):0==F.length&&d.setCellStyles(mxConstants.STYLE_SHAPE,null,P);if(1==d.getSelectionCount()&&
+null!=J&&null!=D){var aa=P[0],ia=d.getModel().getGeometry(aa);null!=ia&&(ia=ia.clone(),ia.width=J,ia.height=D,d.getModel().setGeometry(aa,ia));null!=N?f(aa,N,S,T,d):d.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,P)}}finally{d.getModel().endUpdate()}null!=Z&&(d.setSelectionCells(Z),d.scrollCellToVisible(Z[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing(),!0,B)}}).isEnabled=k;this.addAction("crop...",function(){var m=d.getSelectionCell();if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&
+null!=m){var r=d.getCurrentCellStyle(m),x=r[mxConstants.STYLE_IMAGE],B=r[mxConstants.STYLE_SHAPE];x&&"image"==B&&(r=new CropImageDialog(e,x,r[mxConstants.STYLE_CLIP_PATH],function(C,F,J){f(m,C,F,J,d)}),e.showDialog(r.container,300,390,!0,!0))}}).isEnabled=k;n=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",mxUtils.bind(this,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");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));n=this.addAction("formatPanel",mxUtils.bind(this,
+function(){e.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return 0<e.formatWidth}));n=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",mxUtils.bind(this,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");n.setToggleAction(!0);n.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var m=d.getSelectionCell();if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&null!=m){var r=new ConnectionPointsDialog(e,
+m);e.showDialog(r.container,350,450,!0,!1,function(){r.destroy()});r.init()}}).isEnabled=k};Actions.prototype.addAction=function(a,b,f,e,g){if("..."==a.substring(a.length-3)){a=a.substring(0,a.length-3);var d=mxResources.get(a)+"..."}else d=mxResources.get(a);return this.put(a,new Action(d,b,f,e,g))};Actions.prototype.put=function(a,b){return this.actions[a]=b};Actions.prototype.get=function(a){return this.actions[a]};
+function Action(a,b,f,e,g){mxEventSource.call(this);this.label=a;this.funct=this.createFunction(b);this.enabled=null!=f?f:!0;this.iconCls=e;this.shortcut=g;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(a){return a};Action.prototype.setEnabled=function(a){this.enabled!=a&&(this.enabled=a,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};
Action.prototype.setToggleAction=function(a){this.toggleAction=a};Action.prototype.setSelectedCallback=function(a){this.selectedCallback=a};Action.prototype.isSelected=function(){return this.selectedCallback()};Menus=function(a){this.editorUi=a;this.menus={};this.init();mxClient.IS_SVG||((new Image).src=this.checkmarkImage)};Menus.prototype.defaultFont="Helvetica";Menus.prototype.defaultFontSize="12";Menus.prototype.defaultMenuItems="file edit view arrange extras help".split(" ");Menus.prototype.defaultFonts="Helvetica;Verdana;Times New Roman;Garamond;Comic Sans MS;Courier New;Georgia;Lucida Console;Tahoma".split(";");
-Menus.prototype.init=function(){var a=this.editorUi,b=a.editor.graph,f=mxUtils.bind(b,b.isEnabled);this.customFonts=[];this.customFontSizes=[];this.put("fontFamily",new Menu(mxUtils.bind(this,function(d,g){for(var e=mxUtils.bind(this,function(n){this.styleChange(d,n,[mxConstants.STYLE_FONTFAMILY],[n],null,g,function(){document.execCommand("fontname",!1,n);a.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTFAMILY],"values",[n],"cells",[b.cellEditor.getEditingCell()]))},function(){b.updateLabelElements(b.getSelectionCells(),
-function(u){u.removeAttribute("face");u.style.fontFamily=null;"PRE"==u.nodeName&&b.replaceElement(u,"div")})}).firstChild.nextSibling.style.fontFamily=n}),k=0;k<this.defaultFonts.length;k++)e(this.defaultFonts[k]);d.addSeparator(g);if(0<this.customFonts.length){for(k=0;k<this.customFonts.length;k++)e(this.customFonts[k]);d.addSeparator(g);d.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){this.customFonts=[];this.editorUi.fireEvent(new mxEventObject("customFontsChanged"))}),g);d.addSeparator(g)}this.promptChange(d,
-mxResources.get("custom")+"...","",mxConstants.DEFAULT_FONTFAMILY,mxConstants.STYLE_FONTFAMILY,g,!0,mxUtils.bind(this,function(n){0>mxUtils.indexOf(this.customFonts,n)&&(this.customFonts.push(n),this.editorUi.fireEvent(new mxEventObject("customFontsChanged")))}))})));this.put("formatBlock",new Menu(mxUtils.bind(this,function(d,g){function e(k,n){return d.addItem(k,null,mxUtils.bind(this,function(){null!=b.cellEditor.textarea&&(b.cellEditor.textarea.focus(),document.execCommand("formatBlock",!1,"<"+
-n+">"))}),g)}e(mxResources.get("normal"),"p");e("","h1").firstChild.nextSibling.innerHTML='<h1 style="margin:0px;">'+mxResources.get("heading")+" 1</h1>";e("","h2").firstChild.nextSibling.innerHTML='<h2 style="margin:0px;">'+mxResources.get("heading")+" 2</h2>";e("","h3").firstChild.nextSibling.innerHTML='<h3 style="margin:0px;">'+mxResources.get("heading")+" 3</h3>";e("","h4").firstChild.nextSibling.innerHTML='<h4 style="margin:0px;">'+mxResources.get("heading")+" 4</h4>";e("","h5").firstChild.nextSibling.innerHTML=
-'<h5 style="margin:0px;">'+mxResources.get("heading")+" 5</h5>";e("","h6").firstChild.nextSibling.innerHTML='<h6 style="margin:0px;">'+mxResources.get("heading")+" 6</h6>";e("","pre").firstChild.nextSibling.innerHTML='<pre style="margin:0px;">'+mxResources.get("formatted")+"</pre>";e("","blockquote").firstChild.nextSibling.innerHTML='<blockquote style="margin-top:0px;margin-bottom:0px;">'+mxResources.get("blockquote")+"</blockquote>"})));this.put("fontSize",new Menu(mxUtils.bind(this,function(d,g){var e=
-[6,8,9,10,11,12,14,18,24,36,48,72];0>mxUtils.indexOf(e,this.defaultFontSize)&&(e.push(this.defaultFontSize),e.sort(function(x,B){return x-B}));for(var k=mxUtils.bind(this,function(x){if(null!=b.cellEditor.textarea){document.execCommand("fontSize",!1,"3");for(var B=b.cellEditor.textarea.getElementsByTagName("font"),C=0;C<B.length;C++)if("3"==B[C].getAttribute("size")){B[C].removeAttribute("size");B[C].style.fontSize=x+"px";break}a.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTSIZE],
-"values",[x],"cells",[b.cellEditor.getEditingCell()]))}}),n=mxUtils.bind(this,function(x){this.styleChange(d,x,[mxConstants.STYLE_FONTSIZE],[x],null,g,function(){k(x)})}),u=0;u<e.length;u++)n(e[u]);d.addSeparator(g);if(0<this.customFontSizes.length){var m=0;for(u=0;u<this.customFontSizes.length;u++)0>mxUtils.indexOf(e,this.customFontSizes[u])&&(n(this.customFontSizes[u]),m++);0<m&&d.addSeparator(g);d.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){this.customFontSizes=[]}),g);d.addSeparator(g)}var r=
-null;this.promptChange(d,mxResources.get("custom")+"...","("+mxResources.get("points")+")",this.defaultFontSize,mxConstants.STYLE_FONTSIZE,g,!0,mxUtils.bind(this,function(x){null!=r&&null!=b.cellEditor.textarea&&(b.cellEditor.textarea.focus(),b.cellEditor.restoreSelection(r));null!=x&&0<x.length&&(this.customFontSizes.push(x),k(x))}),null,function(){r=b.cellEditor.saveSelection();return!1})})));this.put("direction",new Menu(mxUtils.bind(this,function(d,g){d.addItem(mxResources.get("flipH"),null,function(){b.toggleCellStyles(mxConstants.STYLE_FLIPH,
-!1)},g);d.addItem(mxResources.get("flipV"),null,function(){b.toggleCellStyles(mxConstants.STYLE_FLIPV,!1)},g);this.addMenuItems(d,["-","rotation"],g)})));this.put("align",new Menu(mxUtils.bind(this,function(d,g){var e=1<this.editorUi.getSelectionState().vertices.length;d.addItem(mxResources.get("leftAlign"),null,function(){b.alignCells(mxConstants.ALIGN_LEFT)},g,null,e);d.addItem(mxResources.get("center"),null,function(){b.alignCells(mxConstants.ALIGN_CENTER)},g,null,e);d.addItem(mxResources.get("rightAlign"),
-null,function(){b.alignCells(mxConstants.ALIGN_RIGHT)},g,null,e);d.addSeparator(g);d.addItem(mxResources.get("topAlign"),null,function(){b.alignCells(mxConstants.ALIGN_TOP)},g,null,e);d.addItem(mxResources.get("middle"),null,function(){b.alignCells(mxConstants.ALIGN_MIDDLE)},g,null,e);d.addItem(mxResources.get("bottomAlign"),null,function(){b.alignCells(mxConstants.ALIGN_BOTTOM)},g,null,e);this.addMenuItems(d,["-","snapToGrid"],g)})));this.put("distribute",new Menu(mxUtils.bind(this,function(d,g){d.addItem(mxResources.get("horizontal"),
-null,function(){b.distributeCells(!0)},g);d.addItem(mxResources.get("vertical"),null,function(){b.distributeCells(!1)},g)})));this.put("line",new Menu(mxUtils.bind(this,function(d,g){var e=b.view.getState(b.getSelectionCell());null!=e&&(e=mxUtils.getValue(e.style,mxConstants.STYLE_SHAPE),"arrow"!=e&&(this.edgeStyleChange(d,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],"geIcon geSprite geSprite-straight",g,!0).setAttribute("title",mxResources.get("straight")),
-this.edgeStyleChange(d,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle",null,null],"geIcon geSprite geSprite-orthogonal",g,!0).setAttribute("title",mxResources.get("orthogonal")),this.edgeStyleChange(d,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalelbow",g,!0).setAttribute("title",mxResources.get("simple")),this.edgeStyleChange(d,
-"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalelbow",g,!0).setAttribute("title",mxResources.get("simple")),this.edgeStyleChange(d,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalisometric",g,!0).setAttribute("title",mxResources.get("isometric")),
-this.edgeStyleChange(d,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalisometric",g,!0).setAttribute("title",mxResources.get("isometric")),"connector"==e&&this.edgeStyleChange(d,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle","1",null],"geIcon geSprite geSprite-curved",g,!0).setAttribute("title",mxResources.get("curved")),
-this.edgeStyleChange(d,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["entityRelationEdgeStyle",null,null],"geIcon geSprite geSprite-entity",g,!0).setAttribute("title",mxResources.get("entityRelation"))),d.addSeparator(g),this.styleChange(d,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],[null,null,null,null],"geIcon geSprite geSprite-connection",g,!0,null,!0).setAttribute("title",mxResources.get("line")),this.styleChange(d,
-"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["link",null,null,null],"geIcon geSprite geSprite-linkedge",g,!0,null,!0).setAttribute("title",mxResources.get("link")),this.styleChange(d,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["flexArrow",null,null,null],"geIcon geSprite geSprite-arrow",g,!0,null,!0).setAttribute("title",mxResources.get("arrow")),this.styleChange(d,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,
-mxConstants.STYLE_ENDSIZE,"width"],["arrow",null,null,null],"geIcon geSprite geSprite-simplearrow",g,!0,null,!0).setAttribute("title",mxResources.get("simpleArrow")))})));this.put("layout",new Menu(mxUtils.bind(this,function(d,g){var e=mxUtils.bind(this,function(n,u){this.editorUi.prompt(mxResources.get("spacing"),n,u)}),k=mxUtils.bind(this,function(n){var u=b.getSelectionCell(),m=null;null==u||0==b.getModel().getChildCount(u)?0==b.getModel().getEdgeCount(u)&&(m=b.findTreeRoots(b.getDefaultParent())):
-m=b.findTreeRoots(u);null!=m&&0<m.length&&(u=m[0]);null!=u&&this.editorUi.executeLayout(function(){n.execute(b.getDefaultParent(),u);b.isSelectionEmpty()||(u=b.getModel().getParent(u),b.getModel().isVertex(u)&&b.updateGroupBounds([u],2*b.gridSize,!0))},!0)});d.addItem(mxResources.get("horizontalFlow"),null,mxUtils.bind(this,function(){var n=new mxHierarchicalLayout(b,mxConstants.DIRECTION_WEST);this.editorUi.executeLayout(function(){var u=b.getSelectionCells();n.execute(b.getDefaultParent(),0==u.length?
-null:u)},!0)}),g);d.addItem(mxResources.get("verticalFlow"),null,mxUtils.bind(this,function(){var n=new mxHierarchicalLayout(b,mxConstants.DIRECTION_NORTH);this.editorUi.executeLayout(function(){var u=b.getSelectionCells();n.execute(b.getDefaultParent(),0==u.length?null:u)},!0)}),g);d.addSeparator(g);d.addItem(mxResources.get("horizontalTree"),null,mxUtils.bind(this,function(){var n=new mxCompactTreeLayout(b,!0);n.edgeRouting=!1;n.levelDistance=30;e(n.levelDistance,mxUtils.bind(this,function(u){isNaN(u)||
-(n.levelDistance=u,k(n))}))}),g);d.addItem(mxResources.get("verticalTree"),null,mxUtils.bind(this,function(){var n=new mxCompactTreeLayout(b,!1);n.edgeRouting=!1;n.levelDistance=30;e(n.levelDistance,mxUtils.bind(this,function(u){isNaN(u)||(n.levelDistance=u,k(n))}))}),g);d.addItem(mxResources.get("radialTree"),null,mxUtils.bind(this,function(){var n=new mxRadialTreeLayout(b);n.levelDistance=80;n.autoRadius=!0;e(n.levelDistance,mxUtils.bind(this,function(u){isNaN(u)||(n.levelDistance=u,k(n))}))}),
-g);d.addSeparator(g);d.addItem(mxResources.get("organic"),null,mxUtils.bind(this,function(){var n=new mxFastOrganicLayout(b);e(n.forceConstant,mxUtils.bind(this,function(u){n.forceConstant=u;this.editorUi.executeLayout(function(){var m=b.getSelectionCell();if(null==m||0==b.getModel().getChildCount(m))m=b.getDefaultParent();n.execute(m);b.getModel().isVertex(m)&&b.updateGroupBounds([m],2*b.gridSize,!0)},!0)}))}),g);d.addItem(mxResources.get("circle"),null,mxUtils.bind(this,function(){var n=new mxCircleLayout(b);
-this.editorUi.executeLayout(function(){var u=b.getSelectionCell();if(null==u||0==b.getModel().getChildCount(u))u=b.getDefaultParent();n.execute(u);b.getModel().isVertex(u)&&b.updateGroupBounds([u],2*b.gridSize,!0)},!0)}),g)})));this.put("navigation",new Menu(mxUtils.bind(this,function(d,g){this.addMenuItems(d,"home - exitGroup enterGroup - expand collapse - collapsible".split(" "),g)})));this.put("arrange",new Menu(mxUtils.bind(this,function(d,g){this.addMenuItems(d,["toFront","toBack","bringForward",
-"sendBackward","-"],g);this.addSubmenu("direction",d,g);this.addMenuItems(d,["turn","-"],g);this.addSubmenu("align",d,g);this.addSubmenu("distribute",d,g);d.addSeparator(g);this.addSubmenu("navigation",d,g);this.addSubmenu("insert",d,g);this.addSubmenu("layout",d,g);this.addMenuItems(d,"- group ungroup removeFromGroup - clearWaypoints autosize".split(" "),g)}))).isEnabled=f;this.put("insert",new Menu(mxUtils.bind(this,function(d,g){this.addMenuItems(d,["insertLink","insertImage"],g)})));this.put("view",
-new Menu(mxUtils.bind(this,function(d,g){this.addMenuItems(d,(null!=this.editorUi.format?["formatPanel"]:[]).concat("outline layers - pageView pageScale - scrollbars tooltips - grid guides - connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),g))})));this.put("viewPanels",new Menu(mxUtils.bind(this,function(d,g){null!=this.editorUi.format&&this.addMenuItems(d,["formatPanel"],g);this.addMenuItems(d,["outline","layers"],g)})));this.put("viewZoom",new Menu(mxUtils.bind(this,function(d,
-g){this.addMenuItems(d,["resetView","-"],g);for(var e=[.25,.5,.75,1,1.25,1.5,2,3,4],k=0;k<e.length;k++)(function(n){d.addItem(100*n+"%",null,function(){b.zoomTo(n)},g)})(e[k]);this.addMenuItems(d,"- fitWindow fitPageWidth fitPage fitTwoPages - customZoom".split(" "),g)})));this.put("file",new Menu(mxUtils.bind(this,function(d,g){this.addMenuItems(d,"new open - save saveAs - import export - pageSetup print".split(" "),g)})));this.put("edit",new Menu(mxUtils.bind(this,function(d,g){this.addMenuItems(d,
-"undo redo - cut copy paste delete - duplicate - editData editTooltip - editStyle - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));this.put("extras",new Menu(mxUtils.bind(this,function(d,g){this.addMenuItems(d,["copyConnect","collapseExpand","-","editDiagram"])})));this.put("help",new Menu(mxUtils.bind(this,function(d,g){this.addMenuItems(d,["help","-","about"])})))};Menus.prototype.put=function(a,b){return this.menus[a]=b};
-Menus.prototype.get=function(a){return this.menus[a]};Menus.prototype.addSubmenu=function(a,b,f,d){var g=this.get(a);null!=g&&(g=g.isEnabled(),b.showDisabled||g)&&(f=b.addItem(d||mxResources.get(a),null,null,f,null,g),this.addMenu(a,b,f))};Menus.prototype.addMenu=function(a,b,f){var d=this.get(a);null!=d&&(b.showDisabled||d.isEnabled())&&this.get(a).execute(b,f)};
-Menus.prototype.addInsertTableCellItem=function(a,b){var f=this.editorUi.editor.graph,d=f.getSelectionCell(),g=f.getCurrentCellStyle(d);1<f.getSelectionCount()&&(f.isTableCell(d)&&(d=f.model.getParent(d)),f.isTableRow(d)&&(d=f.model.getParent(d)));var e=f.isTable(d)||f.isTableRow(d)||f.isTableCell(d),k=f.isStack(d)||f.isStackChild(d),n=e,u=e;k&&(g=f.isStack(d)?g:f.getCellStyle(f.model.getParent(d)),u="0"==g.horizontalStack,n=!u);null!=b||!e&&!k?this.addInsertTableItem(a,mxUtils.bind(this,function(m,
+Menus.prototype.init=function(){var a=this.editorUi,b=a.editor.graph,f=mxUtils.bind(b,b.isEnabled);this.customFonts=[];this.customFontSizes=[];this.put("fontFamily",new Menu(mxUtils.bind(this,function(e,g){for(var d=mxUtils.bind(this,function(n){this.styleChange(e,n,[mxConstants.STYLE_FONTFAMILY],[n],null,g,function(){document.execCommand("fontname",!1,n);a.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTFAMILY],"values",[n],"cells",[b.cellEditor.getEditingCell()]))},function(){b.updateLabelElements(b.getSelectionCells(),
+function(u){u.removeAttribute("face");u.style.fontFamily=null;"PRE"==u.nodeName&&b.replaceElement(u,"div")})}).firstChild.nextSibling.style.fontFamily=n}),k=0;k<this.defaultFonts.length;k++)d(this.defaultFonts[k]);e.addSeparator(g);if(0<this.customFonts.length){for(k=0;k<this.customFonts.length;k++)d(this.customFonts[k]);e.addSeparator(g);e.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){this.customFonts=[];this.editorUi.fireEvent(new mxEventObject("customFontsChanged"))}),g);e.addSeparator(g)}this.promptChange(e,
+mxResources.get("custom")+"...","",mxConstants.DEFAULT_FONTFAMILY,mxConstants.STYLE_FONTFAMILY,g,!0,mxUtils.bind(this,function(n){0>mxUtils.indexOf(this.customFonts,n)&&(this.customFonts.push(n),this.editorUi.fireEvent(new mxEventObject("customFontsChanged")))}))})));this.put("formatBlock",new Menu(mxUtils.bind(this,function(e,g){function d(k,n){return e.addItem(k,null,mxUtils.bind(this,function(){null!=b.cellEditor.textarea&&(b.cellEditor.textarea.focus(),document.execCommand("formatBlock",!1,"<"+
+n+">"))}),g)}d(mxResources.get("normal"),"p");d("","h1").firstChild.nextSibling.innerHTML='<h1 style="margin:0px;">'+mxResources.get("heading")+" 1</h1>";d("","h2").firstChild.nextSibling.innerHTML='<h2 style="margin:0px;">'+mxResources.get("heading")+" 2</h2>";d("","h3").firstChild.nextSibling.innerHTML='<h3 style="margin:0px;">'+mxResources.get("heading")+" 3</h3>";d("","h4").firstChild.nextSibling.innerHTML='<h4 style="margin:0px;">'+mxResources.get("heading")+" 4</h4>";d("","h5").firstChild.nextSibling.innerHTML=
+'<h5 style="margin:0px;">'+mxResources.get("heading")+" 5</h5>";d("","h6").firstChild.nextSibling.innerHTML='<h6 style="margin:0px;">'+mxResources.get("heading")+" 6</h6>";d("","pre").firstChild.nextSibling.innerHTML='<pre style="margin:0px;">'+mxResources.get("formatted")+"</pre>";d("","blockquote").firstChild.nextSibling.innerHTML='<blockquote style="margin-top:0px;margin-bottom:0px;">'+mxResources.get("blockquote")+"</blockquote>"})));this.put("fontSize",new Menu(mxUtils.bind(this,function(e,g){var d=
+[6,8,9,10,11,12,14,18,24,36,48,72];0>mxUtils.indexOf(d,this.defaultFontSize)&&(d.push(this.defaultFontSize),d.sort(function(x,B){return x-B}));for(var k=mxUtils.bind(this,function(x){if(null!=b.cellEditor.textarea){document.execCommand("fontSize",!1,"3");for(var B=b.cellEditor.textarea.getElementsByTagName("font"),C=0;C<B.length;C++)if("3"==B[C].getAttribute("size")){B[C].removeAttribute("size");B[C].style.fontSize=x+"px";break}a.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTSIZE],
+"values",[x],"cells",[b.cellEditor.getEditingCell()]))}}),n=mxUtils.bind(this,function(x){this.styleChange(e,x,[mxConstants.STYLE_FONTSIZE],[x],null,g,function(){k(x)})}),u=0;u<d.length;u++)n(d[u]);e.addSeparator(g);if(0<this.customFontSizes.length){var m=0;for(u=0;u<this.customFontSizes.length;u++)0>mxUtils.indexOf(d,this.customFontSizes[u])&&(n(this.customFontSizes[u]),m++);0<m&&e.addSeparator(g);e.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){this.customFontSizes=[]}),g);e.addSeparator(g)}var r=
+null;this.promptChange(e,mxResources.get("custom")+"...","("+mxResources.get("points")+")",this.defaultFontSize,mxConstants.STYLE_FONTSIZE,g,!0,mxUtils.bind(this,function(x){null!=r&&null!=b.cellEditor.textarea&&(b.cellEditor.textarea.focus(),b.cellEditor.restoreSelection(r));null!=x&&0<x.length&&(this.customFontSizes.push(x),k(x))}),null,function(){r=b.cellEditor.saveSelection();return!1})})));this.put("direction",new Menu(mxUtils.bind(this,function(e,g){e.addItem(mxResources.get("flipH"),null,function(){b.toggleCellStyles(mxConstants.STYLE_FLIPH,
+!1)},g);e.addItem(mxResources.get("flipV"),null,function(){b.toggleCellStyles(mxConstants.STYLE_FLIPV,!1)},g);this.addMenuItems(e,["-","rotation"],g)})));this.put("align",new Menu(mxUtils.bind(this,function(e,g){var d=1<this.editorUi.getSelectionState().vertices.length;e.addItem(mxResources.get("leftAlign"),null,function(){b.alignCells(mxConstants.ALIGN_LEFT)},g,null,d);e.addItem(mxResources.get("center"),null,function(){b.alignCells(mxConstants.ALIGN_CENTER)},g,null,d);e.addItem(mxResources.get("rightAlign"),
+null,function(){b.alignCells(mxConstants.ALIGN_RIGHT)},g,null,d);e.addSeparator(g);e.addItem(mxResources.get("topAlign"),null,function(){b.alignCells(mxConstants.ALIGN_TOP)},g,null,d);e.addItem(mxResources.get("middle"),null,function(){b.alignCells(mxConstants.ALIGN_MIDDLE)},g,null,d);e.addItem(mxResources.get("bottomAlign"),null,function(){b.alignCells(mxConstants.ALIGN_BOTTOM)},g,null,d);this.addMenuItems(e,["-","snapToGrid"],g)})));this.put("distribute",new Menu(mxUtils.bind(this,function(e,g){e.addItem(mxResources.get("horizontal"),
+null,function(){b.distributeCells(!0)},g);e.addItem(mxResources.get("vertical"),null,function(){b.distributeCells(!1)},g)})));this.put("line",new Menu(mxUtils.bind(this,function(e,g){var d=b.view.getState(b.getSelectionCell());null!=d&&(d=mxUtils.getValue(d.style,mxConstants.STYLE_SHAPE),"arrow"!=d&&(this.edgeStyleChange(e,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],"geIcon geSprite geSprite-straight",g,!0).setAttribute("title",mxResources.get("straight")),
+this.edgeStyleChange(e,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle",null,null],"geIcon geSprite geSprite-orthogonal",g,!0).setAttribute("title",mxResources.get("orthogonal")),this.edgeStyleChange(e,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalelbow",g,!0).setAttribute("title",mxResources.get("simple")),this.edgeStyleChange(e,
+"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalelbow",g,!0).setAttribute("title",mxResources.get("simple")),this.edgeStyleChange(e,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalisometric",g,!0).setAttribute("title",mxResources.get("isometric")),
+this.edgeStyleChange(e,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalisometric",g,!0).setAttribute("title",mxResources.get("isometric")),"connector"==d&&this.edgeStyleChange(e,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle","1",null],"geIcon geSprite geSprite-curved",g,!0).setAttribute("title",mxResources.get("curved")),
+this.edgeStyleChange(e,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["entityRelationEdgeStyle",null,null],"geIcon geSprite geSprite-entity",g,!0).setAttribute("title",mxResources.get("entityRelation"))),e.addSeparator(g),this.styleChange(e,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],[null,null,null,null],"geIcon geSprite geSprite-connection",g,!0,null,!0).setAttribute("title",mxResources.get("line")),this.styleChange(e,
+"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["link",null,null,null],"geIcon geSprite geSprite-linkedge",g,!0,null,!0).setAttribute("title",mxResources.get("link")),this.styleChange(e,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["flexArrow",null,null,null],"geIcon geSprite geSprite-arrow",g,!0,null,!0).setAttribute("title",mxResources.get("arrow")),this.styleChange(e,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,
+mxConstants.STYLE_ENDSIZE,"width"],["arrow",null,null,null],"geIcon geSprite geSprite-simplearrow",g,!0,null,!0).setAttribute("title",mxResources.get("simpleArrow")))})));this.put("layout",new Menu(mxUtils.bind(this,function(e,g){var d=mxUtils.bind(this,function(n,u){this.editorUi.prompt(mxResources.get("spacing"),n,u)}),k=mxUtils.bind(this,function(n){var u=b.getSelectionCell(),m=null;null==u||0==b.getModel().getChildCount(u)?0==b.getModel().getEdgeCount(u)&&(m=b.findTreeRoots(b.getDefaultParent())):
+m=b.findTreeRoots(u);null!=m&&0<m.length&&(u=m[0]);null!=u&&this.editorUi.executeLayout(function(){n.execute(b.getDefaultParent(),u);b.isSelectionEmpty()||(u=b.getModel().getParent(u),b.getModel().isVertex(u)&&b.updateGroupBounds([u],2*b.gridSize,!0))},!0)});e.addItem(mxResources.get("horizontalFlow"),null,mxUtils.bind(this,function(){var n=new mxHierarchicalLayout(b,mxConstants.DIRECTION_WEST);this.editorUi.executeLayout(function(){var u=b.getSelectionCells();n.execute(b.getDefaultParent(),0==u.length?
+null:u)},!0)}),g);e.addItem(mxResources.get("verticalFlow"),null,mxUtils.bind(this,function(){var n=new mxHierarchicalLayout(b,mxConstants.DIRECTION_NORTH);this.editorUi.executeLayout(function(){var u=b.getSelectionCells();n.execute(b.getDefaultParent(),0==u.length?null:u)},!0)}),g);e.addSeparator(g);e.addItem(mxResources.get("horizontalTree"),null,mxUtils.bind(this,function(){var n=new mxCompactTreeLayout(b,!0);n.edgeRouting=!1;n.levelDistance=30;d(n.levelDistance,mxUtils.bind(this,function(u){isNaN(u)||
+(n.levelDistance=u,k(n))}))}),g);e.addItem(mxResources.get("verticalTree"),null,mxUtils.bind(this,function(){var n=new mxCompactTreeLayout(b,!1);n.edgeRouting=!1;n.levelDistance=30;d(n.levelDistance,mxUtils.bind(this,function(u){isNaN(u)||(n.levelDistance=u,k(n))}))}),g);e.addItem(mxResources.get("radialTree"),null,mxUtils.bind(this,function(){var n=new mxRadialTreeLayout(b);n.levelDistance=80;n.autoRadius=!0;d(n.levelDistance,mxUtils.bind(this,function(u){isNaN(u)||(n.levelDistance=u,k(n))}))}),
+g);e.addSeparator(g);e.addItem(mxResources.get("organic"),null,mxUtils.bind(this,function(){var n=new mxFastOrganicLayout(b);d(n.forceConstant,mxUtils.bind(this,function(u){n.forceConstant=u;this.editorUi.executeLayout(function(){var m=b.getSelectionCell();if(null==m||0==b.getModel().getChildCount(m))m=b.getDefaultParent();n.execute(m);b.getModel().isVertex(m)&&b.updateGroupBounds([m],2*b.gridSize,!0)},!0)}))}),g);e.addItem(mxResources.get("circle"),null,mxUtils.bind(this,function(){var n=new mxCircleLayout(b);
+this.editorUi.executeLayout(function(){var u=b.getSelectionCell();if(null==u||0==b.getModel().getChildCount(u))u=b.getDefaultParent();n.execute(u);b.getModel().isVertex(u)&&b.updateGroupBounds([u],2*b.gridSize,!0)},!0)}),g)})));this.put("navigation",new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,"home - exitGroup enterGroup - expand collapse - collapsible".split(" "),g)})));this.put("arrange",new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,["toFront","toBack","bringForward",
+"sendBackward","-"],g);this.addSubmenu("direction",e,g);this.addMenuItems(e,["turn","-"],g);this.addSubmenu("align",e,g);this.addSubmenu("distribute",e,g);e.addSeparator(g);this.addSubmenu("navigation",e,g);this.addSubmenu("insert",e,g);this.addSubmenu("layout",e,g);this.addMenuItems(e,"- group ungroup removeFromGroup - clearWaypoints autosize".split(" "),g)}))).isEnabled=f;this.put("insert",new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,["insertLink","insertImage"],g)})));this.put("view",
+new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,(null!=this.editorUi.format?["formatPanel"]:[]).concat("outline layers - pageView pageScale - scrollbars tooltips - grid guides - connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),g))})));this.put("viewPanels",new Menu(mxUtils.bind(this,function(e,g){null!=this.editorUi.format&&this.addMenuItems(e,["formatPanel"],g);this.addMenuItems(e,["outline","layers"],g)})));this.put("viewZoom",new Menu(mxUtils.bind(this,function(e,
+g){this.addMenuItems(e,["resetView","-"],g);for(var d=[.25,.5,.75,1,1.25,1.5,2,3,4],k=0;k<d.length;k++)(function(n){e.addItem(100*n+"%",null,function(){b.zoomTo(n)},g)})(d[k]);this.addMenuItems(e,"- fitWindow fitPageWidth fitPage fitTwoPages - customZoom".split(" "),g)})));this.put("file",new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,"new open - save saveAs - import export - pageSetup print".split(" "),g)})));this.put("edit",new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,
+"undo redo - cut copy paste delete - duplicate - editData editTooltip - editStyle - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));this.put("extras",new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,["copyConnect","collapseExpand","-","editDiagram"])})));this.put("help",new Menu(mxUtils.bind(this,function(e,g){this.addMenuItems(e,["help","-","about"])})))};Menus.prototype.put=function(a,b){return this.menus[a]=b};
+Menus.prototype.get=function(a){return this.menus[a]};Menus.prototype.addSubmenu=function(a,b,f,e){var g=this.get(a);null!=g&&(g=g.isEnabled(),b.showDisabled||g)&&(f=b.addItem(e||mxResources.get(a),null,null,f,null,g),this.addMenu(a,b,f))};Menus.prototype.addMenu=function(a,b,f){var e=this.get(a);null!=e&&(b.showDisabled||e.isEnabled())&&this.get(a).execute(b,f)};
+Menus.prototype.addInsertTableCellItem=function(a,b){var f=this.editorUi.editor.graph,e=f.getSelectionCell(),g=f.getCurrentCellStyle(e);1<f.getSelectionCount()&&(f.isTableCell(e)&&(e=f.model.getParent(e)),f.isTableRow(e)&&(e=f.model.getParent(e)));var d=f.isTable(e)||f.isTableRow(e)||f.isTableCell(e),k=f.isStack(e)||f.isStackChild(e),n=d,u=d;k&&(g=f.isStack(e)?g:f.getCellStyle(f.model.getParent(e)),u="0"==g.horizontalStack,n=!u);null!=b||!d&&!k?this.addInsertTableItem(a,mxUtils.bind(this,function(m,
r,x,B,C){r=C||mxEvent.isControlDown(m)||mxEvent.isMetaDown(m)?f.createCrossFunctionalSwimlane(r,x,null,null,B||mxEvent.isShiftDown(m)?"Cross-Functional Flowchart":null):f.createTable(r,x,null,null,B||mxEvent.isShiftDown(m)?"Table":null);m=mxEvent.isAltDown(m)?f.getFreeInsertPoint():f.getCenterInsertPoint(f.getBoundingBoxFromGeometry([r],!0));x=null;f.getModel().beginUpdate();try{x=f.importCells([r],m.x,m.y),f.fireEvent(new mxEventObject("cellsInserted","cells",f.model.getDescendants(x[0])))}finally{f.getModel().endUpdate()}null!=
-x&&0<x.length&&(f.scrollCellToVisible(x[0]),f.setSelectionCells(x))}),b):(n&&(b=a.addItem(mxResources.get("insertColumnBefore"),null,mxUtils.bind(this,function(){try{k?f.insertLane(d,!0):f.insertTableColumn(d,!0)}catch(m){this.editorUi.handleError(m)}}),null,"geIcon geSprite geSprite-insertcolumnbefore"),b.setAttribute("title",mxResources.get("insertColumnBefore")),b=a.addItem(mxResources.get("insertColumnAfter"),null,mxUtils.bind(this,function(){try{k?f.insertLane(d,!1):f.insertTableColumn(d,!1)}catch(m){this.editorUi.handleError(m)}}),
-null,"geIcon geSprite geSprite-insertcolumnafter"),b.setAttribute("title",mxResources.get("insertColumnAfter")),b=a.addItem(mxResources.get("deleteColumn"),null,mxUtils.bind(this,function(){if(null!=d)try{k?f.deleteLane(d):f.deleteTableColumn(d)}catch(m){this.editorUi.handleError(m)}}),null,"geIcon geSprite geSprite-deletecolumn"),b.setAttribute("title",mxResources.get("deleteColumn"))),u&&(b=a.addItem(mxResources.get("insertRowBefore"),null,mxUtils.bind(this,function(){try{k?f.insertLane(d,!0):f.insertTableRow(d,
-!0)}catch(m){this.editorUi.handleError(m)}}),null,"geIcon geSprite geSprite-insertrowbefore"),b.setAttribute("title",mxResources.get("insertRowBefore")),b=a.addItem(mxResources.get("insertRowAfter"),null,mxUtils.bind(this,function(){try{k?f.insertLane(d,!1):f.insertTableRow(d,!1)}catch(m){this.editorUi.handleError(m)}}),null,"geIcon geSprite geSprite-insertrowafter"),b.setAttribute("title",mxResources.get("insertRowAfter")),b=a.addItem(mxResources.get("deleteRow"),null,mxUtils.bind(this,function(){try{k?
-f.deleteLane(d):f.deleteTableRow(d)}catch(m){this.editorUi.handleError(m)}}),null,"geIcon geSprite geSprite-deleterow"),b.setAttribute("title",mxResources.get("deleteRow")),u=this.editorUi.getSelectionState(),null!=u.mergeCell?this.addMenuItem(a,"mergeCells"):(1<u.style.colspan||1<u.style.rowspan)&&this.addMenuItem(a,"unmergeCells")))};
-Menus.prototype.addInsertTableItem=function(a,b,f,d){function g(C){n=e.getParentByName(mxEvent.getSource(C),"TD");var G=!1;if(null!=n){k=e.getParentByName(n,"TR");var J=mxEvent.isMouseEvent(C)?2:4,D=x,N=Math.min(20,k.sectionRowIndex+J);J=Math.min(20,n.cellIndex+J);for(var Q=D.rows.length;Q<N;Q++)for(var R=D.insertRow(Q),P=0;P<D.rows[0].cells.length;P++)R.insertCell(-1);for(Q=0;Q<D.rows.length;Q++)for(R=D.rows[Q],P=R.cells.length;P<J;P++)R.insertCell(-1);B.innerHTML=n.cellIndex+1+"x"+(k.sectionRowIndex+
-1);for(D=0;D<x.rows.length;D++)for(N=x.rows[D],J=0;J<N.cells.length;J++)Q=N.cells[J],D==k.sectionRowIndex&&J==n.cellIndex&&(G="blue"==Q.style.backgroundColor),Q.style.backgroundColor=D<=k.sectionRowIndex&&J<=n.cellIndex?"blue":"transparent"}mxEvent.consume(C);return G}d=null!=d?d:!0;b=null!=b?b:mxUtils.bind(this,function(C,G,J){var D=this.editorUi.editor.graph;C=D.getParentByName(mxEvent.getSource(C),"TD");if(null!=C&&null!=D.cellEditor.textarea){D.getParentByName(C,"TR");var N=D.cellEditor.textarea.getElementsByTagName("table");
-C=[];for(var Q=0;Q<N.length;Q++)C.push(N[Q]);D.container.focus();Q=D.pasteHtmlAtCaret;N=["<table>"];for(var R=0;R<G;R++){N.push("<tr>");for(var P=0;P<J;P++)N.push("<td><br></td>");N.push("</tr>")}N.push("</table>");G=N.join("");Q.call(D,G);G=D.cellEditor.textarea.getElementsByTagName("table");if(G.length==C.length+1)for(Q=G.length-1;0<=Q;Q--)if(0==Q||G[Q]!=C[Q-1]){D.selectNode(G[Q].rows[0].cells[0]);break}}});var e=this.editorUi.editor.graph,k=null,n=null;null==f&&(a.div.className+=" geToolbarMenu",
+x&&0<x.length&&(f.scrollCellToVisible(x[0]),f.setSelectionCells(x))}),b):(n&&(b=a.addItem(mxResources.get("insertColumnBefore"),null,mxUtils.bind(this,function(){try{k?f.insertLane(e,!0):f.insertTableColumn(e,!0)}catch(m){this.editorUi.handleError(m)}}),null,"geIcon geSprite geSprite-insertcolumnbefore"),b.setAttribute("title",mxResources.get("insertColumnBefore")),b=a.addItem(mxResources.get("insertColumnAfter"),null,mxUtils.bind(this,function(){try{k?f.insertLane(e,!1):f.insertTableColumn(e,!1)}catch(m){this.editorUi.handleError(m)}}),
+null,"geIcon geSprite geSprite-insertcolumnafter"),b.setAttribute("title",mxResources.get("insertColumnAfter")),b=a.addItem(mxResources.get("deleteColumn"),null,mxUtils.bind(this,function(){if(null!=e)try{k?f.deleteLane(e):f.deleteTableColumn(e)}catch(m){this.editorUi.handleError(m)}}),null,"geIcon geSprite geSprite-deletecolumn"),b.setAttribute("title",mxResources.get("deleteColumn"))),u&&(b=a.addItem(mxResources.get("insertRowBefore"),null,mxUtils.bind(this,function(){try{k?f.insertLane(e,!0):f.insertTableRow(e,
+!0)}catch(m){this.editorUi.handleError(m)}}),null,"geIcon geSprite geSprite-insertrowbefore"),b.setAttribute("title",mxResources.get("insertRowBefore")),b=a.addItem(mxResources.get("insertRowAfter"),null,mxUtils.bind(this,function(){try{k?f.insertLane(e,!1):f.insertTableRow(e,!1)}catch(m){this.editorUi.handleError(m)}}),null,"geIcon geSprite geSprite-insertrowafter"),b.setAttribute("title",mxResources.get("insertRowAfter")),b=a.addItem(mxResources.get("deleteRow"),null,mxUtils.bind(this,function(){try{k?
+f.deleteLane(e):f.deleteTableRow(e)}catch(m){this.editorUi.handleError(m)}}),null,"geIcon geSprite geSprite-deleterow"),b.setAttribute("title",mxResources.get("deleteRow")),u=this.editorUi.getSelectionState(),null!=u.mergeCell?this.addMenuItem(a,"mergeCells"):(1<u.style.colspan||1<u.style.rowspan)&&this.addMenuItem(a,"unmergeCells")))};
+Menus.prototype.addInsertTableItem=function(a,b,f,e){function g(C){n=d.getParentByName(mxEvent.getSource(C),"TD");var F=!1;if(null!=n){k=d.getParentByName(n,"TR");var J=mxEvent.isMouseEvent(C)?2:4,D=x,N=Math.min(20,k.sectionRowIndex+J);J=Math.min(20,n.cellIndex+J);for(var S=D.rows.length;S<N;S++)for(var T=D.insertRow(S),P=0;P<D.rows[0].cells.length;P++)T.insertCell(-1);for(S=0;S<D.rows.length;S++)for(T=D.rows[S],P=T.cells.length;P<J;P++)T.insertCell(-1);B.innerHTML=n.cellIndex+1+"x"+(k.sectionRowIndex+
+1);for(D=0;D<x.rows.length;D++)for(N=x.rows[D],J=0;J<N.cells.length;J++)S=N.cells[J],D==k.sectionRowIndex&&J==n.cellIndex&&(F="blue"==S.style.backgroundColor),S.style.backgroundColor=D<=k.sectionRowIndex&&J<=n.cellIndex?"blue":"transparent"}mxEvent.consume(C);return F}e=null!=e?e:!0;b=null!=b?b:mxUtils.bind(this,function(C,F,J){var D=this.editorUi.editor.graph;C=D.getParentByName(mxEvent.getSource(C),"TD");if(null!=C&&null!=D.cellEditor.textarea){D.getParentByName(C,"TR");var N=D.cellEditor.textarea.getElementsByTagName("table");
+C=[];for(var S=0;S<N.length;S++)C.push(N[S]);D.container.focus();S=D.pasteHtmlAtCaret;N=["<table>"];for(var T=0;T<F;T++){N.push("<tr>");for(var P=0;P<J;P++)N.push("<td><br></td>");N.push("</tr>")}N.push("</table>");F=N.join("");S.call(D,F);F=D.cellEditor.textarea.getElementsByTagName("table");if(F.length==C.length+1)for(S=F.length-1;0<=S;S--)if(0==S||F[S]!=C[S-1]){D.selectNode(F[S].rows[0].cells[0]);break}}});var d=this.editorUi.editor.graph,k=null,n=null;null==f&&(a.div.className+=" geToolbarMenu",
a.labels=!1);a=a.addItem("",null,null,f,null,null,null,!0);a.firstChild.style.fontSize=Menus.prototype.defaultFontSize+"px";a.firstChild.innerText="";var u=document.createElement("input");u.setAttribute("id","geTitleOption");u.setAttribute("type","checkbox");f=document.createElement("label");mxUtils.write(f,mxResources.get("title"));f.setAttribute("for","geTitleOption");mxEvent.addGestureListeners(f,null,null,mxUtils.bind(this,function(C){mxEvent.consume(C)}));mxEvent.addGestureListeners(u,null,null,
-mxUtils.bind(this,function(C){mxEvent.consume(C)}));var m=document.createElement("input");m.setAttribute("id","geContainerOption");m.setAttribute("type","checkbox");var r=document.createElement("label");mxUtils.write(r,mxResources.get("container"));r.setAttribute("for","geContainerOption");mxEvent.addGestureListeners(r,null,null,mxUtils.bind(this,function(C){mxEvent.consume(C)}));mxEvent.addGestureListeners(m,null,null,mxUtils.bind(this,function(C){mxEvent.consume(C)}));d&&(a.firstChild.appendChild(u),
-a.firstChild.appendChild(f),mxUtils.br(a.firstChild),a.firstChild.appendChild(m),a.firstChild.appendChild(r),mxUtils.br(a.firstChild),mxUtils.br(a.firstChild));var x=function(C,G){var J=document.createElement("table");J.setAttribute("border","1");J.style.borderCollapse="collapse";J.style.borderStyle="solid";J.setAttribute("cellPadding","8");for(var D=0;D<C;D++)for(var N=J.insertRow(D),Q=0;Q<G;Q++)N.insertCell(-1);return J}(5,5);a.firstChild.appendChild(x);var B=document.createElement("div");B.style.padding=
-"4px";B.innerHTML="1x1";a.firstChild.appendChild(B);mxEvent.addGestureListeners(x,null,null,mxUtils.bind(this,function(C){var G=g(C);null!=n&&null!=k&&G&&(b(C,k.sectionRowIndex+1,n.cellIndex+1,u.checked,m.checked),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0))}));mxEvent.addListener(x,"mouseover",g)};
-Menus.prototype.edgeStyleChange=function(a,b,f,d,g,e,k,n){return this.showIconOnly(a.addItem(b,n,mxUtils.bind(this,function(){var u=this.editorUi.editor.graph;u.stopEditing(!1);u.getModel().beginUpdate();try{for(var m=u.getSelectionCells(),r=[],x=0;x<m.length;x++){var B=m[x];if(u.getModel().isEdge(B)){if(k){var C=u.getCellGeometry(B);null!=C&&(C=C.clone(),C.points=null,u.getModel().setGeometry(B,C))}for(var G=0;G<f.length;G++)u.setCellStyles(f[G],d[G],[B]);r.push(B)}}this.editorUi.fireEvent(new mxEventObject("styleChanged",
-"keys",f,"values",d,"cells",r))}finally{u.getModel().endUpdate()}}),e,g))};Menus.prototype.showIconOnly=function(a){var b=a.getElementsByTagName("td");for(i=0;i<b.length;i++)"mxPopupMenuItem"==b[i].getAttribute("class")&&(b[i].style.display="none");return a};
-Menus.prototype.styleChange=function(a,b,f,d,g,e,k,n,u){var m=this.createStyleChangeFunction(f,d);a=a.addItem(b,null,mxUtils.bind(this,function(){var r=this.editorUi.editor.graph;null!=k&&r.cellEditor.isContentEditing()?k():m(n)}),e,g);u&&this.showIconOnly(a);return a};
-Menus.prototype.createStyleChangeFunction=function(a,b){return mxUtils.bind(this,function(f){var d=this.editorUi.editor.graph;d.stopEditing(!1);d.getModel().beginUpdate();try{for(var g=d.getEditableCells(d.getSelectionCells()),e=!1,k=0;k<a.length;k++)if(d.setCellStyles(a[k],b[k],g),a[k]==mxConstants.STYLE_ALIGN&&d.updateLabelElements(g,function(n){n.removeAttribute("align");n.style.textAlign=null}),a[k]==mxConstants.STYLE_FONTFAMILY||"fontSource"==a[k])e=!0;if(e)for(e=0;e<g.length;e++)0==d.model.getChildCount(g[e])&&
-d.autoSizeCell(g[e],!1);null!=f&&f();this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",a,"values",b,"cells",g))}finally{d.getModel().endUpdate()}})};
-Menus.prototype.promptChange=function(a,b,f,d,g,e,k,n,u,m){return a.addItem(b,null,mxUtils.bind(this,function(){var r=this.editorUi.editor.graph,x=d,B=r.getView().getState(r.getSelectionCell());null!=B&&(x=B.style[g]||x);var C=null!=m?m():!0;x=new FilenameDialog(this.editorUi,x,mxResources.get("apply"),mxUtils.bind(this,function(G){if(null!=G&&0<G.length){if(C){r.getModel().beginUpdate();try{r.stopEditing(!1),r.setCellStyles(g,G)}finally{r.getModel().endUpdate()}}null!=n&&n(G)}}),mxResources.get("enterValue")+
-(0<f.length?" "+f:""),null,null,null,null,function(){null!=n&&null!=m&&n(null)});this.editorUi.showDialog(x.container,300,80,!0,!0);x.init()}),e,u,k)};
-Menus.prototype.pickColor=function(a,b,f){var d=this.editorUi,g=d.editor.graph,e=226+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));if(null!=b&&g.cellEditor.isContentEditing()){var k=g.cellEditor.saveSelection();a=new ColorDialog(this.editorUi,f||g.shapeForegroundColor,mxUtils.bind(this,function(u){g.cellEditor.restoreSelection(k);document.execCommand(b,!1,u!=mxConstants.NONE?u:"transparent");var m={forecolor:mxConstants.STYLE_FONTCOLOR,
-backcolor:mxConstants.STYLE_LABEL_BACKGROUNDCOLOR}[b];null!=m&&d.fireEvent(new mxEventObject("styleChanged","keys",[m],"values",[u],"cells",[g.cellEditor.getEditingCell()]))}),function(){g.cellEditor.restoreSelection(k)});this.editorUi.showDialog(a.container,230,e,!0,!0);a.init()}else{null==this.colorDialog&&(this.colorDialog=new ColorDialog(this.editorUi));this.colorDialog.currentColorKey=a;f=g.getView().getState(g.getSelectionCell());var n=mxConstants.NONE;null!=f&&(n=f.style[a]||n);n==mxConstants.NONE?
-(n=g.shapeBackgroundColor.substring(1),this.colorDialog.picker.fromString(n),this.colorDialog.colorInput.value=mxConstants.NONE):this.colorDialog.picker.fromString(mxUtils.rgba2hex(n));this.editorUi.showDialog(this.colorDialog.container,230,e,!0,!0);this.colorDialog.init()}};Menus.prototype.toggleStyle=function(a,b){var f=this.editorUi.editor.graph;b=f.toggleCellStyles(a,b);this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",[a],"values",[b],"cells",f.getSelectionCells()))};
-Menus.prototype.addMenuItem=function(a,b,f,d,g,e){var k=this.editorUi.actions.get(b);return null!=k&&(a.showDisabled||k.isEnabled())&&k.visible?(b=a.addItem(e||k.label,null,function(n){k.funct(d,n)},f,g,k.isEnabled()),k.toggleAction&&k.isSelected()&&a.addCheckmark(b,Editor.checkmarkImage),this.addShortcut(b,k),b):null};
-Menus.prototype.addShortcut=function(a,b){if(null!=b.shortcut){a=a.firstChild.nextSibling.nextSibling;var f=document.createElement("span");f.style.color="gray";mxUtils.write(f,b.shortcut);a.appendChild(f)}};Menus.prototype.addMenuItems=function(a,b,f,d,g){for(var e=0;e<b.length;e++)"-"==b[e]?a.addSeparator(f):this.addMenuItem(a,b[e],f,d,null!=g?g[e]:null)};
+mxUtils.bind(this,function(C){mxEvent.consume(C)}));var m=document.createElement("input");m.setAttribute("id","geContainerOption");m.setAttribute("type","checkbox");var r=document.createElement("label");mxUtils.write(r,mxResources.get("container"));r.setAttribute("for","geContainerOption");mxEvent.addGestureListeners(r,null,null,mxUtils.bind(this,function(C){mxEvent.consume(C)}));mxEvent.addGestureListeners(m,null,null,mxUtils.bind(this,function(C){mxEvent.consume(C)}));e&&(a.firstChild.appendChild(u),
+a.firstChild.appendChild(f),mxUtils.br(a.firstChild),a.firstChild.appendChild(m),a.firstChild.appendChild(r),mxUtils.br(a.firstChild),mxUtils.br(a.firstChild));var x=function(C,F){var J=document.createElement("table");J.setAttribute("border","1");J.style.borderCollapse="collapse";J.style.borderStyle="solid";J.setAttribute("cellPadding","8");for(var D=0;D<C;D++)for(var N=J.insertRow(D),S=0;S<F;S++)N.insertCell(-1);return J}(5,5);a.firstChild.appendChild(x);var B=document.createElement("div");B.style.padding=
+"4px";B.innerHTML="1x1";a.firstChild.appendChild(B);mxEvent.addGestureListeners(x,null,null,mxUtils.bind(this,function(C){var F=g(C);null!=n&&null!=k&&F&&(b(C,k.sectionRowIndex+1,n.cellIndex+1,u.checked,m.checked),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0))}));mxEvent.addListener(x,"mouseover",g)};
+Menus.prototype.edgeStyleChange=function(a,b,f,e,g,d,k,n){return this.showIconOnly(a.addItem(b,n,mxUtils.bind(this,function(){var u=this.editorUi.editor.graph;u.stopEditing(!1);u.getModel().beginUpdate();try{for(var m=u.getSelectionCells(),r=[],x=0;x<m.length;x++){var B=m[x];if(u.getModel().isEdge(B)){if(k){var C=u.getCellGeometry(B);null!=C&&(C=C.clone(),C.points=null,u.getModel().setGeometry(B,C))}for(var F=0;F<f.length;F++)u.setCellStyles(f[F],e[F],[B]);r.push(B)}}this.editorUi.fireEvent(new mxEventObject("styleChanged",
+"keys",f,"values",e,"cells",r))}finally{u.getModel().endUpdate()}}),d,g))};Menus.prototype.showIconOnly=function(a){var b=a.getElementsByTagName("td");for(i=0;i<b.length;i++)"mxPopupMenuItem"==b[i].getAttribute("class")&&(b[i].style.display="none");return a};
+Menus.prototype.styleChange=function(a,b,f,e,g,d,k,n,u){var m=this.createStyleChangeFunction(f,e);a=a.addItem(b,null,mxUtils.bind(this,function(){var r=this.editorUi.editor.graph;null!=k&&r.cellEditor.isContentEditing()?k():m(n)}),d,g);u&&this.showIconOnly(a);return a};
+Menus.prototype.createStyleChangeFunction=function(a,b){return mxUtils.bind(this,function(f){var e=this.editorUi.editor.graph;e.stopEditing(!1);e.getModel().beginUpdate();try{for(var g=e.getEditableCells(e.getSelectionCells()),d=!1,k=0;k<a.length;k++)if(e.setCellStyles(a[k],b[k],g),a[k]==mxConstants.STYLE_ALIGN&&e.updateLabelElements(g,function(n){n.removeAttribute("align");n.style.textAlign=null}),a[k]==mxConstants.STYLE_FONTFAMILY||"fontSource"==a[k])d=!0;if(d)for(d=0;d<g.length;d++)0==e.model.getChildCount(g[d])&&
+e.autoSizeCell(g[d],!1);null!=f&&f();this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",a,"values",b,"cells",g))}finally{e.getModel().endUpdate()}})};
+Menus.prototype.promptChange=function(a,b,f,e,g,d,k,n,u,m){return a.addItem(b,null,mxUtils.bind(this,function(){var r=this.editorUi.editor.graph,x=e,B=r.getView().getState(r.getSelectionCell());null!=B&&(x=B.style[g]||x);var C=null!=m?m():!0;x=new FilenameDialog(this.editorUi,x,mxResources.get("apply"),mxUtils.bind(this,function(F){if(null!=F&&0<F.length){if(C){r.getModel().beginUpdate();try{r.stopEditing(!1),r.setCellStyles(g,F)}finally{r.getModel().endUpdate()}}null!=n&&n(F)}}),mxResources.get("enterValue")+
+(0<f.length?" "+f:""),null,null,null,null,function(){null!=n&&null!=m&&n(null)});this.editorUi.showDialog(x.container,300,80,!0,!0);x.init()}),d,u,k)};
+Menus.prototype.pickColor=function(a,b,f){var e=this.editorUi,g=e.editor.graph,d=226+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));if(null!=b&&g.cellEditor.isContentEditing()){var k=g.cellEditor.saveSelection();a=new ColorDialog(this.editorUi,f||g.shapeForegroundColor,mxUtils.bind(this,function(u){g.cellEditor.restoreSelection(k);document.execCommand(b,!1,u!=mxConstants.NONE?u:"transparent");var m={forecolor:mxConstants.STYLE_FONTCOLOR,
+backcolor:mxConstants.STYLE_LABEL_BACKGROUNDCOLOR}[b];null!=m&&e.fireEvent(new mxEventObject("styleChanged","keys",[m],"values",[u],"cells",[g.cellEditor.getEditingCell()]))}),function(){g.cellEditor.restoreSelection(k)});this.editorUi.showDialog(a.container,230,d,!0,!0);a.init()}else{null==this.colorDialog&&(this.colorDialog=new ColorDialog(this.editorUi));this.colorDialog.currentColorKey=a;f=g.getView().getState(g.getSelectionCell());var n=mxConstants.NONE;null!=f&&(n=f.style[a]||n);n==mxConstants.NONE?
+(n=g.shapeBackgroundColor.substring(1),this.colorDialog.picker.fromString(n),this.colorDialog.colorInput.value=mxConstants.NONE):this.colorDialog.picker.fromString(mxUtils.rgba2hex(n));this.editorUi.showDialog(this.colorDialog.container,230,d,!0,!0);this.colorDialog.init()}};Menus.prototype.toggleStyle=function(a,b){var f=this.editorUi.editor.graph;b=f.toggleCellStyles(a,b);this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",[a],"values",[b],"cells",f.getSelectionCells()))};
+Menus.prototype.addMenuItem=function(a,b,f,e,g,d){var k=this.editorUi.actions.get(b);return null!=k&&(a.showDisabled||k.isEnabled())&&k.visible?(b=a.addItem(d||k.label,null,function(n){k.funct(e,n)},f,g,k.isEnabled()),k.toggleAction&&k.isSelected()&&a.addCheckmark(b,Editor.checkmarkImage),this.addShortcut(b,k),b):null};
+Menus.prototype.addShortcut=function(a,b){if(null!=b.shortcut){a=a.firstChild.nextSibling.nextSibling;var f=document.createElement("span");f.style.color="gray";mxUtils.write(f,b.shortcut);a.appendChild(f)}};Menus.prototype.addMenuItems=function(a,b,f,e,g){for(var d=0;d<b.length;d++)"-"==b[d]?a.addSeparator(f):this.addMenuItem(a,b[d],f,e,null!=g?g[d]:null)};
Menus.prototype.createPopupMenu=function(a,b,f){a.smartSeparators=!0;this.addPopupMenuHistoryItems(a,b,f);this.addPopupMenuEditItems(a,b,f);this.addPopupMenuStyleItems(a,b,f);this.addPopupMenuArrangeItems(a,b,f);this.addPopupMenuCellItems(a,b,f);this.addPopupMenuSelectionItems(a,b,f)};Menus.prototype.addPopupMenuHistoryItems=function(a,b,f){this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(a,["undo","redo"],null,f)};
Menus.prototype.addPopupMenuEditItems=function(a,b,f){this.editorUi.editor.graph.isSelectionEmpty()?this.addMenuItems(a,["pasteHere"],null,f):this.addMenuItems(a,"delete - cut copy - duplicate".split(" "),null,f)};Menus.prototype.addPopupMenuStyleItems=function(a,b,f){1==this.editorUi.editor.graph.getSelectionCount()?this.addMenuItems(a,["-","setAsDefaultStyle"],null,f):this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(a,["-","clearDefaultStyle"],null,f)};
-Menus.prototype.addPopupMenuArrangeItems=function(a,b,f){var d=this.editorUi.editor.graph;0<d.getEditableCells(d.getSelectionCells()).length&&(this.addMenuItems(a,["-","toFront","toBack"],null,f),1==d.getSelectionCount()&&this.addMenuItems(a,["bringForward","sendBackward"],null,f));1<d.getSelectionCount()?this.addMenuItems(a,["-","group"],null,f):1==d.getSelectionCount()&&!d.getModel().isEdge(b)&&!d.isSwimlane(b)&&0<d.getModel().getChildCount(b)&&d.isCellEditable(b)&&this.addMenuItems(a,["-","ungroup"],
+Menus.prototype.addPopupMenuArrangeItems=function(a,b,f){var e=this.editorUi.editor.graph;0<e.getEditableCells(e.getSelectionCells()).length&&(this.addMenuItems(a,["-","toFront","toBack"],null,f),1==e.getSelectionCount()&&this.addMenuItems(a,["bringForward","sendBackward"],null,f));1<e.getSelectionCount()?this.addMenuItems(a,["-","group"],null,f):1==e.getSelectionCount()&&!e.getModel().isEdge(b)&&!e.isSwimlane(b)&&0<e.getModel().getChildCount(b)&&e.isCellEditable(b)&&this.addMenuItems(a,["-","ungroup"],
null,f)};
-Menus.prototype.addPopupMenuCellItems=function(a,b,f){var d=this.editorUi.editor.graph,g=d.view.getState(b);a.addSeparator();if(null!=g){var e=!1;1==d.getSelectionCount()&&d.getModel().isEdge(b)&&(a.addSeparator(),this.addSubmenu("line",a));if(d.getModel().isEdge(b)&&"entityRelationEdgeStyle"!=mxUtils.getValue(g.style,mxConstants.STYLE_EDGE,null)&&"arrow"!=mxUtils.getValue(g.style,mxConstants.STYLE_SHAPE,null)){g=d.selectionCellsHandler.getHandler(b);var k=!1;g instanceof mxEdgeHandler&&null!=g.bends&&
-2<g.bends.length&&(e=g.getHandleForEvent(d.updateMouseEvent(new mxMouseEvent(f))),0<e&&e<g.bends.length-1&&(null==g.bends[e]||null==g.bends[e].node||""==g.bends[e].node.style.opacity)&&(k=this.editorUi.actions.get("removeWaypoint"),k.handler=g,k.index=e,k=!0));a.addSeparator();this.addMenuItem(a,"turn",null,f,null,mxResources.get("reverse"));this.addMenuItems(a,[k?"removeWaypoint":"addWaypoint"],null,f);g=d.getModel().getGeometry(b);e=null!=g&&null!=g.points&&0<g.points.length}1==d.getSelectionCount()&&
-(e||d.getModel().isVertex(b)&&0<d.getModel().getEdgeCount(b))&&this.addMenuItems(a,["-","clearWaypoints"],null,f);1==d.getSelectionCount()&&d.isCellEditable(b)&&this.addPopupMenuCellEditItems(a,b,f)}};
-Menus.prototype.addPopupMenuCellEditItems=function(a,b,f,d){var g=this.editorUi.editor.graph,e=g.view.getState(b);this.addMenuItems(a,["-","editStyle","editData","editLink"],d,f);g.getModel().isVertex(b)&&null!=mxUtils.getValue(e.style,mxConstants.STYLE_IMAGE,null)&&(a.addSeparator(),this.addMenuItem(a,"image",d,f).firstChild.nextSibling.innerHTML=mxResources.get("editImage")+"...",this.addMenuItem(a,"crop",d,f));(g.getModel().isVertex(b)&&0==g.getModel().getChildCount(b)||g.isContainer(b))&&this.addMenuItem(a,
-"editConnectionPoints",d,f)};Menus.prototype.addPopupMenuSelectionItems=function(a,b,f){this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(a,["-","selectVertices","selectEdges","selectAll"],null,f)};
-Menus.prototype.createMenubar=function(a){for(var b=new Menubar(this.editorUi,a),f=this.defaultMenuItems,d=0;d<f.length;d++)mxUtils.bind(this,function(g){var e=b.addMenu(mxResources.get(f[d]),mxUtils.bind(this,function(){g.funct.apply(this,arguments)}));this.menuCreated(g,e)})(this.get(f[d]));return b};
+Menus.prototype.addPopupMenuCellItems=function(a,b,f){var e=this.editorUi.editor.graph,g=e.view.getState(b);a.addSeparator();if(null!=g){var d=!1;1==e.getSelectionCount()&&e.getModel().isEdge(b)&&(a.addSeparator(),this.addSubmenu("line",a));if(e.getModel().isEdge(b)&&"entityRelationEdgeStyle"!=mxUtils.getValue(g.style,mxConstants.STYLE_EDGE,null)&&"arrow"!=mxUtils.getValue(g.style,mxConstants.STYLE_SHAPE,null)){g=e.selectionCellsHandler.getHandler(b);var k=!1;g instanceof mxEdgeHandler&&null!=g.bends&&
+2<g.bends.length&&(d=g.getHandleForEvent(e.updateMouseEvent(new mxMouseEvent(f))),0<d&&d<g.bends.length-1&&(null==g.bends[d]||null==g.bends[d].node||""==g.bends[d].node.style.opacity)&&(k=this.editorUi.actions.get("removeWaypoint"),k.handler=g,k.index=d,k=!0));a.addSeparator();this.addMenuItem(a,"turn",null,f,null,mxResources.get("reverse"));this.addMenuItems(a,[k?"removeWaypoint":"addWaypoint"],null,f);g=e.getModel().getGeometry(b);d=null!=g&&null!=g.points&&0<g.points.length}1==e.getSelectionCount()&&
+(d||e.getModel().isVertex(b)&&0<e.getModel().getEdgeCount(b))&&this.addMenuItems(a,["-","clearWaypoints"],null,f);1==e.getSelectionCount()&&e.isCellEditable(b)&&this.addPopupMenuCellEditItems(a,b,f)}};
+Menus.prototype.addPopupMenuCellEditItems=function(a,b,f,e){var g=this.editorUi.editor.graph,d=g.view.getState(b);this.addMenuItems(a,["-","editStyle","editData","editLink"],e,f);g.getModel().isVertex(b)&&null!=mxUtils.getValue(d.style,mxConstants.STYLE_IMAGE,null)&&(a.addSeparator(),this.addMenuItem(a,"image",e,f).firstChild.nextSibling.innerHTML=mxResources.get("editImage")+"...",this.addMenuItem(a,"crop",e,f));(g.getModel().isVertex(b)&&0==g.getModel().getChildCount(b)||g.isContainer(b))&&this.addMenuItem(a,
+"editConnectionPoints",e,f)};Menus.prototype.addPopupMenuSelectionItems=function(a,b,f){this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(a,["-","selectVertices","selectEdges","selectAll"],null,f)};
+Menus.prototype.createMenubar=function(a){for(var b=new Menubar(this.editorUi,a),f=this.defaultMenuItems,e=0;e<f.length;e++)mxUtils.bind(this,function(g){var d=b.addMenu(mxResources.get(f[e]),mxUtils.bind(this,function(){g.funct.apply(this,arguments)}));this.menuCreated(g,d)})(this.get(f[e]));return b};
Menus.prototype.menuCreated=function(a,b,f){null!=b&&(f=null!=f?f:"geItem",a.addListener("stateChanged",function(){(b.enabled=a.enabled)?(b.className=f,8==document.documentMode&&(b.style.color="")):(b.className=f+" mxDisabled",8==document.documentMode&&(b.style.color="#c3c3c3"))}))};function Menubar(a,b){this.editorUi=a;this.container=b}Menubar.prototype.hideMenu=function(){this.editorUi.hideCurrentMenu()};
-Menubar.prototype.addMenu=function(a,b,f){var d=document.createElement("a");d.className="geItem";mxUtils.write(d,a);this.addMenuHandler(d,b);null!=f?this.container.insertBefore(d,f):this.container.appendChild(d);return d};
-Menubar.prototype.addMenuHandler=function(a,b){if(null!=b){var f=!0,d=mxUtils.bind(this,function(g){if(f&&(null==a.enabled||a.enabled)){this.editorUi.editor.graph.popupMenuHandler.hideMenu();var e=new mxPopupMenu(b);e.div.className+=" geMenubarMenu";e.smartSeparators=!0;e.showDisabled=!0;e.autoExpand=!0;e.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(e,arguments);this.editorUi.resetCurrentMenu();e.destroy()});var k=mxUtils.getOffset(a);e.popup(k.x,k.y+a.offsetHeight,null,
-g);this.editorUi.setCurrentMenu(e,a)}mxEvent.consume(g)});mxEvent.addListener(a,"mousemove",mxUtils.bind(this,function(g){null!=this.editorUi.currentMenu&&this.editorUi.currentMenuElt!=a&&(this.editorUi.hideCurrentMenu(),d(g))}));mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(g){f=null==this.editorUi.currentMenu;g.preventDefault()}));mxEvent.addListener(a,"click",mxUtils.bind(this,function(g){d(g);f=!0}))}};Menubar.prototype.destroy=function(){};
+Menubar.prototype.addMenu=function(a,b,f){var e=document.createElement("a");e.className="geItem";mxUtils.write(e,a);this.addMenuHandler(e,b);null!=f?this.container.insertBefore(e,f):this.container.appendChild(e);return e};
+Menubar.prototype.addMenuHandler=function(a,b){if(null!=b){var f=!0,e=mxUtils.bind(this,function(g){if(f&&(null==a.enabled||a.enabled)){this.editorUi.editor.graph.popupMenuHandler.hideMenu();var d=new mxPopupMenu(b);d.div.className+=" geMenubarMenu";d.smartSeparators=!0;d.showDisabled=!0;d.autoExpand=!0;d.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(d,arguments);this.editorUi.resetCurrentMenu();d.destroy()});var k=mxUtils.getOffset(a);d.popup(k.x,k.y+a.offsetHeight,null,
+g);this.editorUi.setCurrentMenu(d,a)}mxEvent.consume(g)});mxEvent.addListener(a,"mousemove",mxUtils.bind(this,function(g){null!=this.editorUi.currentMenu&&this.editorUi.currentMenuElt!=a&&(this.editorUi.hideCurrentMenu(),e(g))}));mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(g){f=null==this.editorUi.currentMenu;g.preventDefault()}));mxEvent.addListener(a,"click",mxUtils.bind(this,function(g){e(g);f=!0}))}};Menubar.prototype.destroy=function(){};
function Menu(a,b){mxEventSource.call(this);this.funct=a;this.enabled=null!=b?b:!0}mxUtils.extend(Menu,mxEventSource);Menu.prototype.isEnabled=function(){return this.enabled};Menu.prototype.setEnabled=function(a){this.enabled!=a&&(this.enabled=a,this.fireEvent(new mxEventObject("stateChanged")))};Menu.prototype.execute=function(a,b){this.funct(a,b)};EditorUi.prototype.createMenus=function(){return new Menus(this)};function Toolbar(a,b){this.editorUi=a;this.container=b;this.staticElements=[];this.init();this.gestureHandler=mxUtils.bind(this,function(f){null!=this.editorUi.currentMenu&&mxEvent.getSource(f)!=this.editorUi.currentMenu.div&&this.hideMenu()});mxEvent.addGestureListeners(document,this.gestureHandler)}
Toolbar.prototype.dropDownImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQANAIABAHt7e////yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IE1hY2ludG9zaCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpCREM1NkJFMjE0NEMxMUU1ODk1Q0M5MjQ0MTA4QjNDMSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpCREM1NkJFMzE0NEMxMUU1ODk1Q0M5MjQ0MTA4QjNDMSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkQzOUMzMjZCMTQ0QjExRTU4OTVDQzkyNDQxMDhCM0MxIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkQzOUMzMjZDMTQ0QjExRTU4OTVDQzkyNDQxMDhCM0MxIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+Af/+/fz7+vn49/b19PPy8fDv7u3s6+rp6Ofm5eTj4uHg397d3Nva2djX1tXU09LR0M/OzczLysnIx8bFxMPCwcC/vr28u7q5uLe2tbSzsrGwr66trKuqqainpqWko6KhoJ+enZybmpmYl5aVlJOSkZCPjo2Mi4qJiIeGhYSDgoGAf359fHt6eXh3dnV0c3JxcG9ubWxramloZ2ZlZGNiYWBfXl1cW1pZWFdWVVRTUlFQT05NTEtKSUhHRkVEQ0JBQD8+PTw7Ojk4NzY1NDMyMTAvLi0sKyopKCcmJSQjIiEgHx4dHBsaGRgXFhUUExIREA8ODQwLCgkIBwYFBAMCAQAAIfkEAQAAAQAsAAAAAA0ADQAAAhGMj6nL3QAjVHIu6azbvPtWAAA7":IMAGE_PATH+
"/dropdown.gif";Toolbar.prototype.selectedBackground="#d0d0d0";Toolbar.prototype.unselectedBackground="none";Toolbar.prototype.staticElements=null;
Toolbar.prototype.init=function(){var a=screen.width;a-=740<screen.height?56:0;if(700<=a){var b=this.addMenu("",mxResources.get("view")+" ("+mxResources.get("panTooltip")+")",!0,"viewPanels",null,!0);this.addDropDownArrow(b,"geSprite-formatpanel",38,50,-4,-3,36,-8);this.addSeparator()}var f=this.addMenu("",mxResources.get("zoom")+" (Alt+Mousewheel)",!0,"viewZoom",null,!0);f.showDisabled=!0;f.style.whiteSpace="nowrap";f.style.position="relative";f.style.overflow="hidden";f.style.width=EditorUi.compactUi?
"50px":"36px";420<=a&&(this.addSeparator(),b=this.addItems(["zoomIn","zoomOut"]),b[0].setAttribute("title",mxResources.get("zoomIn")+" ("+this.editorUi.actions.get("zoomIn").shortcut+")"),b[1].setAttribute("title",mxResources.get("zoomOut")+" ("+this.editorUi.actions.get("zoomOut").shortcut+")"));this.updateZoom=mxUtils.bind(this,function(){f.innerHTML=Math.round(100*this.editorUi.editor.graph.view.scale)+"%";this.appendDropDownImageHtml(f);EditorUi.compactUi&&(f.getElementsByTagName("img")[0].style.right=
"1px",f.getElementsByTagName("img")[0].style.top="5px")});this.editorUi.editor.graph.view.addListener(mxEvent.EVENT_SCALE,this.updateZoom);this.editorUi.editor.addListener("resetGraphView",this.updateZoom);b=this.addItems(["-","undo","redo"]);b[1].setAttribute("title",mxResources.get("undo")+" ("+this.editorUi.actions.get("undo").shortcut+")");b[2].setAttribute("title",mxResources.get("redo")+" ("+this.editorUi.actions.get("redo").shortcut+")");320<=a&&(b=this.addItems(["-","delete"]),b[1].setAttribute("title",
-mxResources.get("delete")+" ("+this.editorUi.actions.get("delete").shortcut+")"));550<=a&&this.addItems(["-","toFront","toBack"]);740<=a&&(this.addItems(["-","fillColor"]),780<=a&&(this.addItems(["strokeColor"]),820<=a&&this.addItems(["shadow"])));400<=a&&(this.addSeparator(),440<=a&&(this.edgeShapeMenu=this.addMenuFunction("",mxResources.get("connection"),!1,mxUtils.bind(this,function(d){this.editorUi.menus.edgeStyleChange(d,"",[mxConstants.STYLE_SHAPE,"width"],[null,null],"geIcon geSprite geSprite-connection",
-null,!0).setAttribute("title",mxResources.get("line"));this.editorUi.menus.edgeStyleChange(d,"",[mxConstants.STYLE_SHAPE,"width"],["link",null],"geIcon geSprite geSprite-linkedge",null,!0).setAttribute("title",mxResources.get("link"));this.editorUi.menus.edgeStyleChange(d,"",[mxConstants.STYLE_SHAPE,"width"],["flexArrow",null],"geIcon geSprite geSprite-arrow",null,!0).setAttribute("title",mxResources.get("arrow"));this.editorUi.menus.edgeStyleChange(d,"",[mxConstants.STYLE_SHAPE,"width"],["arrow",
-null],"geIcon geSprite geSprite-simplearrow",null,!0).setAttribute("title",mxResources.get("simpleArrow"))})),this.addDropDownArrow(this.edgeShapeMenu,"geSprite-connection",44,50,0,0,22,-4)),this.edgeStyleMenu=this.addMenuFunction("geSprite-orthogonal",mxResources.get("waypoints"),!1,mxUtils.bind(this,function(d){this.editorUi.menus.edgeStyleChange(d,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],"geIcon geSprite geSprite-straight",null,!0).setAttribute("title",
-mxResources.get("straight"));this.editorUi.menus.edgeStyleChange(d,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle",null,null],"geIcon geSprite geSprite-orthogonal",null,!0).setAttribute("title",mxResources.get("orthogonal"));this.editorUi.menus.edgeStyleChange(d,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalelbow",
-null,!0).setAttribute("title",mxResources.get("simple"));this.editorUi.menus.edgeStyleChange(d,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalelbow",null,!0).setAttribute("title",mxResources.get("simple"));this.editorUi.menus.edgeStyleChange(d,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle",
-null,null,null],"geIcon geSprite geSprite-horizontalisometric",null,!0).setAttribute("title",mxResources.get("isometric"));this.editorUi.menus.edgeStyleChange(d,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalisometric",null,!0).setAttribute("title",mxResources.get("isometric"));this.editorUi.menus.edgeStyleChange(d,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,
-mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle","1",null],"geIcon geSprite geSprite-curved",null,!0).setAttribute("title",mxResources.get("curved"));this.editorUi.menus.edgeStyleChange(d,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["entityRelationEdgeStyle",null,null],"geIcon geSprite geSprite-entity",null,!0).setAttribute("title",mxResources.get("entityRelation"))})),this.addDropDownArrow(this.edgeStyleMenu,"geSprite-orthogonal",44,50,0,0,22,-4));this.addSeparator();
+mxResources.get("delete")+" ("+this.editorUi.actions.get("delete").shortcut+")"));550<=a&&this.addItems(["-","toFront","toBack"]);740<=a&&(this.addItems(["-","fillColor"]),780<=a&&(this.addItems(["strokeColor"]),820<=a&&this.addItems(["shadow"])));400<=a&&(this.addSeparator(),440<=a&&(this.edgeShapeMenu=this.addMenuFunction("",mxResources.get("connection"),!1,mxUtils.bind(this,function(e){this.editorUi.menus.edgeStyleChange(e,"",[mxConstants.STYLE_SHAPE,"width"],[null,null],"geIcon geSprite geSprite-connection",
+null,!0).setAttribute("title",mxResources.get("line"));this.editorUi.menus.edgeStyleChange(e,"",[mxConstants.STYLE_SHAPE,"width"],["link",null],"geIcon geSprite geSprite-linkedge",null,!0).setAttribute("title",mxResources.get("link"));this.editorUi.menus.edgeStyleChange(e,"",[mxConstants.STYLE_SHAPE,"width"],["flexArrow",null],"geIcon geSprite geSprite-arrow",null,!0).setAttribute("title",mxResources.get("arrow"));this.editorUi.menus.edgeStyleChange(e,"",[mxConstants.STYLE_SHAPE,"width"],["arrow",
+null],"geIcon geSprite geSprite-simplearrow",null,!0).setAttribute("title",mxResources.get("simpleArrow"))})),this.addDropDownArrow(this.edgeShapeMenu,"geSprite-connection",44,50,0,0,22,-4)),this.edgeStyleMenu=this.addMenuFunction("geSprite-orthogonal",mxResources.get("waypoints"),!1,mxUtils.bind(this,function(e){this.editorUi.menus.edgeStyleChange(e,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],"geIcon geSprite geSprite-straight",null,!0).setAttribute("title",
+mxResources.get("straight"));this.editorUi.menus.edgeStyleChange(e,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle",null,null],"geIcon geSprite geSprite-orthogonal",null,!0).setAttribute("title",mxResources.get("orthogonal"));this.editorUi.menus.edgeStyleChange(e,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalelbow",
+null,!0).setAttribute("title",mxResources.get("simple"));this.editorUi.menus.edgeStyleChange(e,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalelbow",null,!0).setAttribute("title",mxResources.get("simple"));this.editorUi.menus.edgeStyleChange(e,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle",
+null,null,null],"geIcon geSprite geSprite-horizontalisometric",null,!0).setAttribute("title",mxResources.get("isometric"));this.editorUi.menus.edgeStyleChange(e,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalisometric",null,!0).setAttribute("title",mxResources.get("isometric"));this.editorUi.menus.edgeStyleChange(e,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,
+mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle","1",null],"geIcon geSprite geSprite-curved",null,!0).setAttribute("title",mxResources.get("curved"));this.editorUi.menus.edgeStyleChange(e,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["entityRelationEdgeStyle",null,null],"geIcon geSprite geSprite-entity",null,!0).setAttribute("title",mxResources.get("entityRelation"))})),this.addDropDownArrow(this.edgeStyleMenu,"geSprite-orthogonal",44,50,0,0,22,-4));this.addSeparator();
a=this.addMenu("",mxResources.get("insert")+" ("+mxResources.get("doubleClickTooltip")+")",!0,"insert",null,!0);this.addDropDownArrow(a,"geSprite-plus",38,48,-4,-3,36,-8);this.addSeparator();this.addTableDropDown()};
Toolbar.prototype.appendDropDownImageHtml=function(a){var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("valign","middle");b.setAttribute("src",Toolbar.prototype.dropDownImage);a.appendChild(b);b.style.position="absolute";b.style.right="4px";b.style.top=(EditorUi.compactUi?6:8)+"px"};
Toolbar.prototype.addTableDropDown=function(){var a=this.addMenuFunction("geIcon geSprite geSprite-table",mxResources.get("table"),!1,mxUtils.bind(this,function(f){this.editorUi.menus.addInsertTableCellItem(f)}));a.style.position="relative";a.style.whiteSpace="nowrap";a.style.overflow="hidden";a.style.width="30px";a.innerHTML='<div class="geSprite geSprite-table"></div>';this.appendDropDownImageHtml(a);a.getElementsByTagName("div")[0].style.marginLeft="-2px";EditorUi.compactUi&&(a.getElementsByTagName("img")[0].style.left=
"22px",a.getElementsByTagName("img")[0].style.top="5px");var b=this.editorUi.menus.get("insert");null!=b&&"function"===typeof a.setEnabled&&b.addListener("stateChanged",function(){a.setEnabled(b.enabled)});return a};
-Toolbar.prototype.addDropDownArrow=function(a,b,f,d,g,e,k,n){g=EditorUi.compactUi?g:n;a.style.whiteSpace="nowrap";a.style.overflow="hidden";a.style.position="relative";a.style.width=d-(null!=k?k:32)+"px";a.innerHTML='<div class="geSprite '+b+'"></div>';this.appendDropDownImageHtml(a);b=a.getElementsByTagName("div")[0];b.style.marginLeft=g+"px";b.style.marginTop=e+"px";EditorUi.compactUi&&(a.getElementsByTagName("img")[0].style.left="24px",a.getElementsByTagName("img")[0].style.top="5px",a.style.width=
+Toolbar.prototype.addDropDownArrow=function(a,b,f,e,g,d,k,n){g=EditorUi.compactUi?g:n;a.style.whiteSpace="nowrap";a.style.overflow="hidden";a.style.position="relative";a.style.width=e-(null!=k?k:32)+"px";a.innerHTML='<div class="geSprite '+b+'"></div>';this.appendDropDownImageHtml(a);b=a.getElementsByTagName("div")[0];b.style.marginLeft=g+"px";b.style.marginTop=d+"px";EditorUi.compactUi&&(a.getElementsByTagName("img")[0].style.left="24px",a.getElementsByTagName("img")[0].style.top="5px",a.style.width=
f-10+"px")};Toolbar.prototype.setFontName=function(a){if(null!=this.fontMenu){this.fontMenu.innerText="";var b=document.createElement("div");b.style.display="inline-block";b.style.overflow="hidden";b.style.textOverflow="ellipsis";b.style.maxWidth="66px";mxUtils.write(b,a);this.fontMenu.appendChild(b);this.appendDropDownImageHtml(this.fontMenu)}};
Toolbar.prototype.setFontSize=function(a){if(null!=this.sizeMenu){this.sizeMenu.innerText="";var b=document.createElement("div");b.style.display="inline-block";b.style.overflow="hidden";b.style.textOverflow="ellipsis";b.style.maxWidth="24px";mxUtils.write(b,a);this.sizeMenu.appendChild(b);this.appendDropDownImageHtml(this.sizeMenu)}};
Toolbar.prototype.createTextToolbar=function(){var a=this.editorUi,b=a.editor.graph,f=this.addMenu("",mxResources.get("style"),!0,"formatBlock");f.style.position="relative";f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.innerHTML=mxResources.get("style");this.appendDropDownImageHtml(f);EditorUi.compactUi&&(f.style.paddingRight="18px",f.getElementsByTagName("img")[0].style.right="1px",f.getElementsByTagName("img")[0].style.top="5px");this.addSeparator();this.fontMenu=this.addMenu("",mxResources.get("fontFamily"),
!0,"fontFamily");this.fontMenu.style.position="relative";this.fontMenu.style.whiteSpace="nowrap";this.fontMenu.style.overflow="hidden";this.fontMenu.style.width="68px";this.setFontName(Menus.prototype.defaultFont);EditorUi.compactUi&&(this.fontMenu.style.paddingRight="18px",this.fontMenu.getElementsByTagName("img")[0].style.right="1px",this.fontMenu.getElementsByTagName("img")[0].style.top="5px");this.addSeparator();this.sizeMenu=this.addMenu(Menus.prototype.defaultFontSize,mxResources.get("fontSize"),
!0,"fontSize");this.sizeMenu.style.position="relative";this.sizeMenu.style.whiteSpace="nowrap";this.sizeMenu.style.overflow="hidden";this.sizeMenu.style.width="24px";this.setFontSize(Menus.prototype.defaultFontSize);EditorUi.compactUi&&(this.sizeMenu.style.paddingRight="18px",this.sizeMenu.getElementsByTagName("img")[0].style.right="1px",this.sizeMenu.getElementsByTagName("img")[0].style.top="5px");f=this.addItems("- undo redo - bold italic underline".split(" "));f[1].setAttribute("title",mxResources.get("undo")+
-" ("+a.actions.get("undo").shortcut+")");f[2].setAttribute("title",mxResources.get("redo")+" ("+a.actions.get("redo").shortcut+")");f[4].setAttribute("title",mxResources.get("bold")+" ("+a.actions.get("bold").shortcut+")");f[5].setAttribute("title",mxResources.get("italic")+" ("+a.actions.get("italic").shortcut+")");f[6].setAttribute("title",mxResources.get("underline")+" ("+a.actions.get("underline").shortcut+")");var d=this.addMenuFunction("",mxResources.get("align"),!1,mxUtils.bind(this,function(e){g=
-e.addItem("",null,mxUtils.bind(this,function(k){b.cellEditor.alignText(mxConstants.ALIGN_LEFT,k);a.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_LEFT],"cells",[b.cellEditor.getEditingCell()]))}),null,"geIcon geSprite geSprite-left");g.setAttribute("title",mxResources.get("left"));g=e.addItem("",null,mxUtils.bind(this,function(k){b.cellEditor.alignText(mxConstants.ALIGN_CENTER,k);a.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],
-"values",[mxConstants.ALIGN_CENTER],"cells",[b.cellEditor.getEditingCell()]))}),null,"geIcon geSprite geSprite-center");g.setAttribute("title",mxResources.get("center"));g=e.addItem("",null,mxUtils.bind(this,function(k){b.cellEditor.alignText(mxConstants.ALIGN_RIGHT,k);a.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_RIGHT],"cells",[b.cellEditor.getEditingCell()]))}),null,"geIcon geSprite geSprite-right");g.setAttribute("title",mxResources.get("right"));
-g=e.addItem("",null,mxUtils.bind(this,function(){document.execCommand("justifyfull",!1,null)}),null,"geIcon geSprite geSprite-justifyfull");g.setAttribute("title",mxResources.get("justifyfull"));g=e.addItem("",null,mxUtils.bind(this,function(){document.execCommand("insertorderedlist",!1,null)}),null,"geIcon geSprite geSprite-orderedlist");g.setAttribute("title",mxResources.get("numberedList"));g=e.addItem("",null,mxUtils.bind(this,function(){document.execCommand("insertunorderedlist",!1,null)}),null,
-"geIcon geSprite geSprite-unorderedlist");g.setAttribute("title",mxResources.get("bulletedList"));g=e.addItem("",null,mxUtils.bind(this,function(){document.execCommand("outdent",!1,null)}),null,"geIcon geSprite geSprite-outdent");g.setAttribute("title",mxResources.get("decreaseIndent"));g=e.addItem("",null,mxUtils.bind(this,function(){document.execCommand("indent",!1,null)}),null,"geIcon geSprite geSprite-indent");g.setAttribute("title",mxResources.get("increaseIndent"))}));d.style.position="relative";
-d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.width="30px";d.innerText="";f=document.createElement("div");f.className="geSprite geSprite-left";f.style.marginLeft="-2px";d.appendChild(f);this.appendDropDownImageHtml(d);EditorUi.compactUi&&(d.getElementsByTagName("img")[0].style.left="22px",d.getElementsByTagName("img")[0].style.top="5px");d=this.addMenuFunction("",mxResources.get("format"),!1,mxUtils.bind(this,function(e){g=e.addItem("",null,this.editorUi.actions.get("subscript").funct,
-null,"geIcon geSprite geSprite-subscript");g.setAttribute("title",mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)");g=e.addItem("",null,this.editorUi.actions.get("superscript").funct,null,"geIcon geSprite geSprite-superscript");g.setAttribute("title",mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)");g=e.addItem("",null,this.editorUi.actions.get("fontColor").funct,null,"geIcon geSprite geSprite-fontcolor");g.setAttribute("title",mxResources.get("fontColor"));g=e.addItem("",null,this.editorUi.actions.get("backgroundColor").funct,
-null,"geIcon geSprite geSprite-fontbackground");g.setAttribute("title",mxResources.get("backgroundColor"));g=e.addItem("",null,mxUtils.bind(this,function(){document.execCommand("removeformat",!1,null)}),null,"geIcon geSprite geSprite-removeformat");g.setAttribute("title",mxResources.get("removeFormat"))}));d.style.position="relative";d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.width="30px";d.innerText="";f=document.createElement("div");f.className="geSprite geSprite-dots";f.style.marginLeft=
-"-2px";d.appendChild(f);this.appendDropDownImageHtml(d);EditorUi.compactUi&&(d.getElementsByTagName("img")[0].style.left="22px",d.getElementsByTagName("img")[0].style.top="5px");this.addSeparator();this.addButton("geIcon geSprite geSprite-code",mxResources.get("html"),function(){b.cellEditor.toggleViewMode();0<b.cellEditor.textarea.innerHTML.length&&("&nbsp;"!=b.cellEditor.textarea.innerHTML||!b.cellEditor.clearOnChange)&&window.setTimeout(function(){document.execCommand("selectAll",!1,null)})});
-this.addSeparator();d=this.addMenuFunction("",mxResources.get("insert"),!0,mxUtils.bind(this,function(e){e.addItem(mxResources.get("insertLink"),null,mxUtils.bind(this,function(){this.editorUi.actions.get("link").funct()}));e.addItem(mxResources.get("insertImage"),null,mxUtils.bind(this,function(){this.editorUi.actions.get("image").funct()}));e.addItem(mxResources.get("insertHorizontalRule"),null,mxUtils.bind(this,function(){document.execCommand("inserthorizontalrule",!1,null)}))}));d.style.whiteSpace=
-"nowrap";d.style.overflow="hidden";d.style.position="relative";d.style.width="16px";d.innerText="";f=document.createElement("div");f.className="geSprite geSprite-plus";f.style.marginLeft="-4px";f.style.marginTop="-3px";d.appendChild(f);this.appendDropDownImageHtml(d);EditorUi.compactUi&&(d.getElementsByTagName("img")[0].style.left="24px",d.getElementsByTagName("img")[0].style.top="5px",d.style.width="30px");this.addSeparator();var g=this.addMenuFunction("geIcon geSprite geSprite-table",mxResources.get("table"),
-!1,mxUtils.bind(this,function(e){var k=b.getSelectedElement(),n=b.getParentByNames(k,["TD","TH"],b.cellEditor.text2),u=b.getParentByName(k,"TR",b.cellEditor.text2);if(null==u)this.editorUi.menus.addInsertTableItem(e);else{var m=b.getParentByName(u,"TABLE",b.cellEditor.text2);k=e.addItem("",null,mxUtils.bind(this,function(){try{b.selectNode(b.insertColumn(m,null!=n?n.cellIndex:0))}catch(r){this.editorUi.handleError(r)}}),null,"geIcon geSprite geSprite-insertcolumnbefore");k.setAttribute("title",mxResources.get("insertColumnBefore"));
-k=e.addItem("",null,mxUtils.bind(this,function(){try{b.selectNode(b.insertColumn(m,null!=n?n.cellIndex+1:-1))}catch(r){this.editorUi.handleError(r)}}),null,"geIcon geSprite geSprite-insertcolumnafter");k.setAttribute("title",mxResources.get("insertColumnAfter"));k=e.addItem("Delete column",null,mxUtils.bind(this,function(){if(null!=n)try{b.deleteColumn(m,n.cellIndex)}catch(r){this.editorUi.handleError(r)}}),null,"geIcon geSprite geSprite-deletecolumn");k.setAttribute("title",mxResources.get("deleteColumn"));
-k=e.addItem("",null,mxUtils.bind(this,function(){try{b.selectNode(b.insertRow(m,u.sectionRowIndex))}catch(r){this.editorUi.handleError(r)}}),null,"geIcon geSprite geSprite-insertrowbefore");k.setAttribute("title",mxResources.get("insertRowBefore"));k=e.addItem("",null,mxUtils.bind(this,function(){try{b.selectNode(b.insertRow(m,u.sectionRowIndex+1))}catch(r){this.editorUi.handleError(r)}}),null,"geIcon geSprite geSprite-insertrowafter");k.setAttribute("title",mxResources.get("insertRowAfter"));k=e.addItem("",
-null,mxUtils.bind(this,function(){try{b.deleteRow(m,u.sectionRowIndex)}catch(r){this.editorUi.handleError(r)}}),null,"geIcon geSprite geSprite-deleterow");k.setAttribute("title",mxResources.get("deleteRow"));k=e.addItem("",null,mxUtils.bind(this,function(){var r=m.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(x,B,C,G){return"#"+("0"+Number(B).toString(16)).substr(-2)+("0"+Number(C).toString(16)).substr(-2)+("0"+Number(G).toString(16)).substr(-2)});this.editorUi.pickColor(r,
-function(x){null==x||x==mxConstants.NONE?(m.removeAttribute("border"),m.style.border="",m.style.borderCollapse=""):(m.setAttribute("border","1"),m.style.border="1px solid "+x,m.style.borderCollapse="collapse")})}),null,"geIcon geSprite geSprite-strokecolor");k.setAttribute("title",mxResources.get("borderColor"));k=e.addItem("",null,mxUtils.bind(this,function(){var r=m.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(x,B,C,G){return"#"+("0"+Number(B).toString(16)).substr(-2)+
-("0"+Number(C).toString(16)).substr(-2)+("0"+Number(G).toString(16)).substr(-2)});this.editorUi.pickColor(r,function(x){m.style.backgroundColor=null==x||x==mxConstants.NONE?"":x})}),null,"geIcon geSprite geSprite-fillcolor");k.setAttribute("title",mxResources.get("backgroundColor"));k=e.addItem("",null,mxUtils.bind(this,function(){var r=m.getAttribute("cellPadding")||0;r=new FilenameDialog(this.editorUi,r,mxResources.get("apply"),mxUtils.bind(this,function(x){null!=x&&0<x.length?m.setAttribute("cellPadding",
-x):m.removeAttribute("cellPadding")}),mxResources.get("spacing"));this.editorUi.showDialog(r.container,300,80,!0,!0);r.init()}),null,"geIcon geSprite geSprite-fit");k.setAttribute("title",mxResources.get("spacing"));k=e.addItem("",null,mxUtils.bind(this,function(){m.setAttribute("align","left")}),null,"geIcon geSprite geSprite-left");k.setAttribute("title",mxResources.get("left"));k=e.addItem("",null,mxUtils.bind(this,function(){m.setAttribute("align","center")}),null,"geIcon geSprite geSprite-center");
-k.setAttribute("title",mxResources.get("center"));k=e.addItem("",null,mxUtils.bind(this,function(){m.setAttribute("align","right")}),null,"geIcon geSprite geSprite-right");k.setAttribute("title",mxResources.get("right"))}}));g.style.position="relative";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.width="30px";g.innerText="";f=document.createElement("div");f.className="geSprite geSprite-table";f.style.marginLeft="-2px";g.appendChild(f);this.appendDropDownImageHtml(g);EditorUi.compactUi&&
-(g.getElementsByTagName("img")[0].style.left="22px",g.getElementsByTagName("img")[0].style.top="5px")};Toolbar.prototype.hideMenu=function(){this.editorUi.hideCurrentMenu()};Toolbar.prototype.addMenu=function(a,b,f,d,g,e,k){var n=this.editorUi.menus.get(d),u=this.addMenuFunction(a,b,f,function(){n.funct.apply(n,arguments)},g,e);k||"function"!==typeof u.setEnabled||n.addListener("stateChanged",function(){u.setEnabled(n.enabled)});return u};
-Toolbar.prototype.addMenuFunction=function(a,b,f,d,g,e){return this.addMenuFunctionInContainer(null!=g?g:this.container,a,b,f,d,e)};Toolbar.prototype.addMenuFunctionInContainer=function(a,b,f,d,g,e){b=d?this.createLabel(b):this.createButton(b);this.initElement(b,f);this.addMenuHandler(b,d,g,e);a.appendChild(b);return b};Toolbar.prototype.addSeparator=function(a){a=null!=a?a:this.container;var b=document.createElement("div");b.className="geSeparator";a.appendChild(b);return b};
-Toolbar.prototype.addItems=function(a,b,f){for(var d=[],g=0;g<a.length;g++){var e=a[g];"-"==e?d.push(this.addSeparator(b)):d.push(this.addItem("geSprite-"+e.toLowerCase(),e,b,f))}return d};Toolbar.prototype.addItem=function(a,b,f,d){var g=this.editorUi.actions.get(b),e=null;null!=g&&(b=g.label,null!=g.shortcut&&(b+=" ("+g.shortcut+")"),e=this.addButton(a,b,g.funct,f),d||"function"!==typeof e.setEnabled||(e.setEnabled(g.enabled),g.addListener("stateChanged",function(){e.setEnabled(g.enabled)})));return e};
-Toolbar.prototype.addButton=function(a,b,f,d){a=this.createButton(a);d=null!=d?d:this.container;this.initElement(a,b);this.addClickHandler(a,f);d.appendChild(a);return a};Toolbar.prototype.initElement=function(a,b){null!=b&&a.setAttribute("title",b);this.addEnabledState(a)};Toolbar.prototype.addEnabledState=function(a){var b=a.className;a.setEnabled=function(f){a.enabled=f;a.className=f?b:b+" mxDisabled"};a.setEnabled(!0)};
+" ("+a.actions.get("undo").shortcut+")");f[2].setAttribute("title",mxResources.get("redo")+" ("+a.actions.get("redo").shortcut+")");f[4].setAttribute("title",mxResources.get("bold")+" ("+a.actions.get("bold").shortcut+")");f[5].setAttribute("title",mxResources.get("italic")+" ("+a.actions.get("italic").shortcut+")");f[6].setAttribute("title",mxResources.get("underline")+" ("+a.actions.get("underline").shortcut+")");var e=this.addMenuFunction("",mxResources.get("align"),!1,mxUtils.bind(this,function(d){g=
+d.addItem("",null,mxUtils.bind(this,function(k){b.cellEditor.alignText(mxConstants.ALIGN_LEFT,k);a.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_LEFT],"cells",[b.cellEditor.getEditingCell()]))}),null,"geIcon geSprite geSprite-left");g.setAttribute("title",mxResources.get("left"));g=d.addItem("",null,mxUtils.bind(this,function(k){b.cellEditor.alignText(mxConstants.ALIGN_CENTER,k);a.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],
+"values",[mxConstants.ALIGN_CENTER],"cells",[b.cellEditor.getEditingCell()]))}),null,"geIcon geSprite geSprite-center");g.setAttribute("title",mxResources.get("center"));g=d.addItem("",null,mxUtils.bind(this,function(k){b.cellEditor.alignText(mxConstants.ALIGN_RIGHT,k);a.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_RIGHT],"cells",[b.cellEditor.getEditingCell()]))}),null,"geIcon geSprite geSprite-right");g.setAttribute("title",mxResources.get("right"));
+g=d.addItem("",null,mxUtils.bind(this,function(){document.execCommand("justifyfull",!1,null)}),null,"geIcon geSprite geSprite-justifyfull");g.setAttribute("title",mxResources.get("justifyfull"));g=d.addItem("",null,mxUtils.bind(this,function(){document.execCommand("insertorderedlist",!1,null)}),null,"geIcon geSprite geSprite-orderedlist");g.setAttribute("title",mxResources.get("numberedList"));g=d.addItem("",null,mxUtils.bind(this,function(){document.execCommand("insertunorderedlist",!1,null)}),null,
+"geIcon geSprite geSprite-unorderedlist");g.setAttribute("title",mxResources.get("bulletedList"));g=d.addItem("",null,mxUtils.bind(this,function(){document.execCommand("outdent",!1,null)}),null,"geIcon geSprite geSprite-outdent");g.setAttribute("title",mxResources.get("decreaseIndent"));g=d.addItem("",null,mxUtils.bind(this,function(){document.execCommand("indent",!1,null)}),null,"geIcon geSprite geSprite-indent");g.setAttribute("title",mxResources.get("increaseIndent"))}));e.style.position="relative";
+e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.width="30px";e.innerText="";f=document.createElement("div");f.className="geSprite geSprite-left";f.style.marginLeft="-2px";e.appendChild(f);this.appendDropDownImageHtml(e);EditorUi.compactUi&&(e.getElementsByTagName("img")[0].style.left="22px",e.getElementsByTagName("img")[0].style.top="5px");e=this.addMenuFunction("",mxResources.get("format"),!1,mxUtils.bind(this,function(d){g=d.addItem("",null,this.editorUi.actions.get("subscript").funct,
+null,"geIcon geSprite geSprite-subscript");g.setAttribute("title",mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)");g=d.addItem("",null,this.editorUi.actions.get("superscript").funct,null,"geIcon geSprite geSprite-superscript");g.setAttribute("title",mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)");g=d.addItem("",null,this.editorUi.actions.get("fontColor").funct,null,"geIcon geSprite geSprite-fontcolor");g.setAttribute("title",mxResources.get("fontColor"));g=d.addItem("",null,this.editorUi.actions.get("backgroundColor").funct,
+null,"geIcon geSprite geSprite-fontbackground");g.setAttribute("title",mxResources.get("backgroundColor"));g=d.addItem("",null,mxUtils.bind(this,function(){document.execCommand("removeformat",!1,null)}),null,"geIcon geSprite geSprite-removeformat");g.setAttribute("title",mxResources.get("removeFormat"))}));e.style.position="relative";e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.width="30px";e.innerText="";f=document.createElement("div");f.className="geSprite geSprite-dots";f.style.marginLeft=
+"-2px";e.appendChild(f);this.appendDropDownImageHtml(e);EditorUi.compactUi&&(e.getElementsByTagName("img")[0].style.left="22px",e.getElementsByTagName("img")[0].style.top="5px");this.addSeparator();this.addButton("geIcon geSprite geSprite-code",mxResources.get("html"),function(){b.cellEditor.toggleViewMode();0<b.cellEditor.textarea.innerHTML.length&&("&nbsp;"!=b.cellEditor.textarea.innerHTML||!b.cellEditor.clearOnChange)&&window.setTimeout(function(){document.execCommand("selectAll",!1,null)})});
+this.addSeparator();e=this.addMenuFunction("",mxResources.get("insert"),!0,mxUtils.bind(this,function(d){d.addItem(mxResources.get("insertLink"),null,mxUtils.bind(this,function(){this.editorUi.actions.get("link").funct()}));d.addItem(mxResources.get("insertImage"),null,mxUtils.bind(this,function(){this.editorUi.actions.get("image").funct()}));d.addItem(mxResources.get("insertHorizontalRule"),null,mxUtils.bind(this,function(){document.execCommand("inserthorizontalrule",!1,null)}))}));e.style.whiteSpace=
+"nowrap";e.style.overflow="hidden";e.style.position="relative";e.style.width="16px";e.innerText="";f=document.createElement("div");f.className="geSprite geSprite-plus";f.style.marginLeft="-4px";f.style.marginTop="-3px";e.appendChild(f);this.appendDropDownImageHtml(e);EditorUi.compactUi&&(e.getElementsByTagName("img")[0].style.left="24px",e.getElementsByTagName("img")[0].style.top="5px",e.style.width="30px");this.addSeparator();var g=this.addMenuFunction("geIcon geSprite geSprite-table",mxResources.get("table"),
+!1,mxUtils.bind(this,function(d){var k=b.getSelectedElement(),n=b.getParentByNames(k,["TD","TH"],b.cellEditor.text2),u=b.getParentByName(k,"TR",b.cellEditor.text2);if(null==u)this.editorUi.menus.addInsertTableItem(d);else{var m=b.getParentByName(u,"TABLE",b.cellEditor.text2);k=d.addItem("",null,mxUtils.bind(this,function(){try{b.selectNode(b.insertColumn(m,null!=n?n.cellIndex:0))}catch(r){this.editorUi.handleError(r)}}),null,"geIcon geSprite geSprite-insertcolumnbefore");k.setAttribute("title",mxResources.get("insertColumnBefore"));
+k=d.addItem("",null,mxUtils.bind(this,function(){try{b.selectNode(b.insertColumn(m,null!=n?n.cellIndex+1:-1))}catch(r){this.editorUi.handleError(r)}}),null,"geIcon geSprite geSprite-insertcolumnafter");k.setAttribute("title",mxResources.get("insertColumnAfter"));k=d.addItem("Delete column",null,mxUtils.bind(this,function(){if(null!=n)try{b.deleteColumn(m,n.cellIndex)}catch(r){this.editorUi.handleError(r)}}),null,"geIcon geSprite geSprite-deletecolumn");k.setAttribute("title",mxResources.get("deleteColumn"));
+k=d.addItem("",null,mxUtils.bind(this,function(){try{b.selectNode(b.insertRow(m,u.sectionRowIndex))}catch(r){this.editorUi.handleError(r)}}),null,"geIcon geSprite geSprite-insertrowbefore");k.setAttribute("title",mxResources.get("insertRowBefore"));k=d.addItem("",null,mxUtils.bind(this,function(){try{b.selectNode(b.insertRow(m,u.sectionRowIndex+1))}catch(r){this.editorUi.handleError(r)}}),null,"geIcon geSprite geSprite-insertrowafter");k.setAttribute("title",mxResources.get("insertRowAfter"));k=d.addItem("",
+null,mxUtils.bind(this,function(){try{b.deleteRow(m,u.sectionRowIndex)}catch(r){this.editorUi.handleError(r)}}),null,"geIcon geSprite geSprite-deleterow");k.setAttribute("title",mxResources.get("deleteRow"));k=d.addItem("",null,mxUtils.bind(this,function(){var r=m.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(x,B,C,F){return"#"+("0"+Number(B).toString(16)).substr(-2)+("0"+Number(C).toString(16)).substr(-2)+("0"+Number(F).toString(16)).substr(-2)});this.editorUi.pickColor(r,
+function(x){null==x||x==mxConstants.NONE?(m.removeAttribute("border"),m.style.border="",m.style.borderCollapse=""):(m.setAttribute("border","1"),m.style.border="1px solid "+x,m.style.borderCollapse="collapse")})}),null,"geIcon geSprite geSprite-strokecolor");k.setAttribute("title",mxResources.get("borderColor"));k=d.addItem("",null,mxUtils.bind(this,function(){var r=m.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(x,B,C,F){return"#"+("0"+Number(B).toString(16)).substr(-2)+
+("0"+Number(C).toString(16)).substr(-2)+("0"+Number(F).toString(16)).substr(-2)});this.editorUi.pickColor(r,function(x){m.style.backgroundColor=null==x||x==mxConstants.NONE?"":x})}),null,"geIcon geSprite geSprite-fillcolor");k.setAttribute("title",mxResources.get("backgroundColor"));k=d.addItem("",null,mxUtils.bind(this,function(){var r=m.getAttribute("cellPadding")||0;r=new FilenameDialog(this.editorUi,r,mxResources.get("apply"),mxUtils.bind(this,function(x){null!=x&&0<x.length?m.setAttribute("cellPadding",
+x):m.removeAttribute("cellPadding")}),mxResources.get("spacing"));this.editorUi.showDialog(r.container,300,80,!0,!0);r.init()}),null,"geIcon geSprite geSprite-fit");k.setAttribute("title",mxResources.get("spacing"));k=d.addItem("",null,mxUtils.bind(this,function(){m.setAttribute("align","left")}),null,"geIcon geSprite geSprite-left");k.setAttribute("title",mxResources.get("left"));k=d.addItem("",null,mxUtils.bind(this,function(){m.setAttribute("align","center")}),null,"geIcon geSprite geSprite-center");
+k.setAttribute("title",mxResources.get("center"));k=d.addItem("",null,mxUtils.bind(this,function(){m.setAttribute("align","right")}),null,"geIcon geSprite geSprite-right");k.setAttribute("title",mxResources.get("right"))}}));g.style.position="relative";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.width="30px";g.innerText="";f=document.createElement("div");f.className="geSprite geSprite-table";f.style.marginLeft="-2px";g.appendChild(f);this.appendDropDownImageHtml(g);EditorUi.compactUi&&
+(g.getElementsByTagName("img")[0].style.left="22px",g.getElementsByTagName("img")[0].style.top="5px")};Toolbar.prototype.hideMenu=function(){this.editorUi.hideCurrentMenu()};Toolbar.prototype.addMenu=function(a,b,f,e,g,d,k){var n=this.editorUi.menus.get(e),u=this.addMenuFunction(a,b,f,function(){n.funct.apply(n,arguments)},g,d);k||"function"!==typeof u.setEnabled||n.addListener("stateChanged",function(){u.setEnabled(n.enabled)});return u};
+Toolbar.prototype.addMenuFunction=function(a,b,f,e,g,d){return this.addMenuFunctionInContainer(null!=g?g:this.container,a,b,f,e,d)};Toolbar.prototype.addMenuFunctionInContainer=function(a,b,f,e,g,d){b=e?this.createLabel(b):this.createButton(b);this.initElement(b,f);this.addMenuHandler(b,e,g,d);a.appendChild(b);return b};Toolbar.prototype.addSeparator=function(a){a=null!=a?a:this.container;var b=document.createElement("div");b.className="geSeparator";a.appendChild(b);return b};
+Toolbar.prototype.addItems=function(a,b,f){for(var e=[],g=0;g<a.length;g++){var d=a[g];"-"==d?e.push(this.addSeparator(b)):e.push(this.addItem("geSprite-"+d.toLowerCase(),d,b,f))}return e};Toolbar.prototype.addItem=function(a,b,f,e){var g=this.editorUi.actions.get(b),d=null;null!=g&&(b=g.label,null!=g.shortcut&&(b+=" ("+g.shortcut+")"),d=this.addButton(a,b,g.funct,f),e||"function"!==typeof d.setEnabled||(d.setEnabled(g.enabled),g.addListener("stateChanged",function(){d.setEnabled(g.enabled)})));return d};
+Toolbar.prototype.addButton=function(a,b,f,e){a=this.createButton(a);e=null!=e?e:this.container;this.initElement(a,b);this.addClickHandler(a,f);e.appendChild(a);return a};Toolbar.prototype.initElement=function(a,b){null!=b&&a.setAttribute("title",b);this.addEnabledState(a)};Toolbar.prototype.addEnabledState=function(a){var b=a.className;a.setEnabled=function(f){a.enabled=f;a.className=f?b:b+" mxDisabled"};a.setEnabled(!0)};
Toolbar.prototype.addClickHandler=function(a,b){null!=b&&(mxEvent.addListener(a,"click",function(f){a.enabled&&b(f);mxEvent.consume(f)}),mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(f){f.preventDefault()})))};Toolbar.prototype.createButton=function(a){var b=document.createElement("a");b.className="geButton";var f=document.createElement("div");null!=a&&(f.className="geSprite "+a);b.appendChild(f);return b};
Toolbar.prototype.createLabel=function(a,b){b=document.createElement("a");b.className="geLabel";mxUtils.write(b,a);return b};
-Toolbar.prototype.addMenuHandler=function(a,b,f,d){if(null!=f){var g=this.editorUi.editor.graph,e=null,k=!0;mxEvent.addListener(a,"click",mxUtils.bind(this,function(n){if(k&&(null==a.enabled||a.enabled)){g.popupMenuHandler.hideMenu();e=new mxPopupMenu(f);e.div.className+=" geToolbarMenu";e.showDisabled=d;e.labels=b;e.autoExpand=!0;!b&&e.div.scrollHeight>e.div.clientHeight&&(e.div.style.width="40px");e.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(e,arguments);this.editorUi.resetCurrentMenu();
-e.destroy()});var u=mxUtils.getOffset(a);e.popup(u.x,u.y+a.offsetHeight,null,n);this.editorUi.setCurrentMenu(e,a)}k=!0;mxEvent.consume(n)}));mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(n){k=null==e||null==e.div||null==e.div.parentNode;n.preventDefault()}))}};Toolbar.prototype.destroy=function(){null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null)};var OpenDialog=function(){var a=document.createElement("iframe");a.style.backgroundColor="transparent";a.allowTransparency="true";a.style.borderStyle="none";a.style.borderWidth="0px";a.style.overflow="hidden";a.frameBorder="0";a.setAttribute("width",(Editor.useLocalStorage?640:320)+"px");a.setAttribute("height",(Editor.useLocalStorage?480:220)+"px");a.setAttribute("src",OPEN_FORM);this.container=a},ColorDialog=function(a,b,f,d){function g(){var J=k.value;/(^#?[a-zA-Z0-9]*$)/.test(J)?("none"!=J&&"#"!=
-J.charAt(0)&&(J="#"+J),ColorDialog.addRecentColor("none"!=J?J.substring(1):J,12),n(J),a.hideDialog()):a.handleError({message:mxResources.get("invalidInput")})}function e(){var J=r(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);J.style.marginBottom="8px";return J}this.editorUi=a;var k=document.createElement("input");k.style.marginBottom="10px";mxClient.IS_IE&&(k.style.marginTop="10px",document.body.appendChild(k));var n=null!=f?f:this.createApplyFunction();this.init=
-function(){mxClient.IS_TOUCH||k.focus()};var u=new mxJSColor.color(k);u.pickerOnfocus=!1;u.showPicker();f=document.createElement("div");mxJSColor.picker.box.style.position="relative";mxJSColor.picker.box.style.width="230px";mxJSColor.picker.box.style.height="100px";mxJSColor.picker.box.style.paddingBottom="10px";f.appendChild(mxJSColor.picker.box);var m=document.createElement("center"),r=mxUtils.bind(this,function(J,D,N,Q){D=null!=D?D:12;var R=document.createElement("table");R.style.borderCollapse=
-"collapse";R.setAttribute("cellspacing","0");R.style.marginBottom="20px";R.style.cellSpacing="0px";R.style.marginLeft="1px";var P=document.createElement("tbody");R.appendChild(P);for(var Z=J.length/D,U=0;U<Z;U++){for(var V=document.createElement("tr"),ia=0;ia<D;ia++)mxUtils.bind(this,function(ha){var ba=document.createElement("td");ba.style.border="0px solid black";ba.style.padding="0px";ba.style.width="16px";ba.style.height="16px";null==ha&&(ha=N);if(null!=ha){ba.style.borderWidth="1px";"none"==
-ha?ba.style.background="url('"+Dialog.prototype.noColorImage+"')":ba.style.backgroundColor="#"+ha;var qa=this.colorNames[ha.toUpperCase()];null!=qa&&ba.setAttribute("title",qa)}V.appendChild(ba);null!=ha&&(ba.style.cursor="pointer",mxEvent.addListener(ba,"click",function(){"none"==ha?(u.fromString("ffffff"),k.value="none"):u.fromString(ha)}),mxEvent.addListener(ba,"dblclick",g))})(J[U*D+ia]);P.appendChild(V)}Q&&(J=document.createElement("td"),J.setAttribute("title",mxResources.get("reset")),J.style.border=
-"1px solid black",J.style.padding="0px",J.style.width="16px",J.style.height="16px",J.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')",J.style.backgroundPosition="center center",J.style.backgroundRepeat="no-repeat",J.style.cursor="pointer",V.appendChild(J),mxEvent.addListener(J,"click",function(){ColorDialog.resetRecentColors();R.parentNode.replaceChild(e(),R)}));m.appendChild(R);return R});f.appendChild(k);if(mxClient.IS_IE||mxClient.IS_IE11)k.style.width="216px";else{k.style.width=
-"182px";var x=document.createElement("input");x.setAttribute("type","color");x.style.visibility="hidden";x.style.width="0px";x.style.height="0px";x.style.border="none";x.style.marginLeft="2px";f.style.whiteSpace="nowrap";f.appendChild(x);f.appendChild(mxUtils.button("...",function(){document.activeElement==x?k.focus():(x.value="#"+k.value,x.click())}));mxEvent.addListener(x,"input",function(){u.fromString(x.value.substring(1))})}mxUtils.br(f);e();var B=r(this.presetColors);B.style.marginBottom="8px";
-B=r(this.defaultColors);B.style.marginBottom="16px";f.appendChild(m);B=document.createElement("div");B.style.textAlign="right";B.style.whiteSpace="nowrap";var C=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=d&&d()});C.className="geBtn";a.editor.cancelFirst&&B.appendChild(C);var G=mxUtils.button(mxResources.get("apply"),g);G.className="geBtn gePrimaryBtn";B.appendChild(G);a.editor.cancelFirst||B.appendChild(C);null!=b&&("none"==b?(u.fromString("ffffff"),k.value="none"):u.fromString(b));
-f.appendChild(B);this.picker=u;this.colorInput=k;mxEvent.addListener(f,"keydown",function(J){27==J.keyCode&&(a.hideDialog(),null!=d&&d(),mxEvent.consume(J))});this.container=f};ColorDialog.prototype.presetColors="E6D0DE CDA2BE B5739D E1D5E7 C3ABD0 A680B8 D4E1F5 A9C4EB 7EA6E0 D5E8D4 9AC7BF 67AB9F D5E8D4 B9E0A5 97D077 FFF2CC FFE599 FFD966 FFF4C3 FFCE9F FFB570 F8CECC F19C99 EA6B66".split(" ");ColorDialog.prototype.colorNames={};ColorDialog.prototype.defaultColors="none FFFFFF E6E6E6 CCCCCC B3B3B3 999999 808080 666666 4D4D4D 333333 1A1A1A 000000 FFCCCC FFE6CC FFFFCC E6FFCC CCFFCC CCFFE6 CCFFFF CCE5FF CCCCFF E5CCFF FFCCFF FFCCE6 FF9999 FFCC99 FFFF99 CCFF99 99FF99 99FFCC 99FFFF 99CCFF 9999FF CC99FF FF99FF FF99CC FF6666 FFB366 FFFF66 B3FF66 66FF66 66FFB3 66FFFF 66B2FF 6666FF B266FF FF66FF FF66B3 FF3333 FF9933 FFFF33 99FF33 33FF33 33FF99 33FFFF 3399FF 3333FF 9933FF FF33FF FF3399 FF0000 FF8000 FFFF00 80FF00 00FF00 00FF80 00FFFF 007FFF 0000FF 7F00FF FF00FF FF0080 CC0000 CC6600 CCCC00 66CC00 00CC00 00CC66 00CCCC 0066CC 0000CC 6600CC CC00CC CC0066 990000 994C00 999900 4D9900 009900 00994D 009999 004C99 000099 4C0099 990099 99004D 660000 663300 666600 336600 006600 006633 006666 003366 000066 330066 660066 660033 330000 331A00 333300 1A3300 003300 00331A 003333 001933 000033 190033 330033 33001A".split(" ");
+Toolbar.prototype.addMenuHandler=function(a,b,f,e){if(null!=f){var g=this.editorUi.editor.graph,d=null,k=!0;mxEvent.addListener(a,"click",mxUtils.bind(this,function(n){if(k&&(null==a.enabled||a.enabled)){g.popupMenuHandler.hideMenu();d=new mxPopupMenu(f);d.div.className+=" geToolbarMenu";d.showDisabled=e;d.labels=b;d.autoExpand=!0;!b&&d.div.scrollHeight>d.div.clientHeight&&(d.div.style.width="40px");d.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(d,arguments);this.editorUi.resetCurrentMenu();
+d.destroy()});var u=mxUtils.getOffset(a);d.popup(u.x,u.y+a.offsetHeight,null,n);this.editorUi.setCurrentMenu(d,a)}k=!0;mxEvent.consume(n)}));mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(n){k=null==d||null==d.div||null==d.div.parentNode;n.preventDefault()}))}};Toolbar.prototype.destroy=function(){null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null)};var OpenDialog=function(){var a=document.createElement("iframe");a.style.backgroundColor="transparent";a.allowTransparency="true";a.style.borderStyle="none";a.style.borderWidth="0px";a.style.overflow="hidden";a.frameBorder="0";a.setAttribute("width",(Editor.useLocalStorage?640:320)+"px");a.setAttribute("height",(Editor.useLocalStorage?480:220)+"px");a.setAttribute("src",OPEN_FORM);this.container=a},ColorDialog=function(a,b,f,e){function g(){var J=k.value;/(^#?[a-zA-Z0-9]*$)/.test(J)?("none"!=J&&"#"!=
+J.charAt(0)&&(J="#"+J),ColorDialog.addRecentColor("none"!=J?J.substring(1):J,12),n(J),a.hideDialog()):a.handleError({message:mxResources.get("invalidInput")})}function d(){var J=r(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);J.style.marginBottom="8px";return J}this.editorUi=a;var k=document.createElement("input");k.style.marginBottom="10px";mxClient.IS_IE&&(k.style.marginTop="10px",document.body.appendChild(k));var n=null!=f?f:this.createApplyFunction();this.init=
+function(){mxClient.IS_TOUCH||k.focus()};var u=new mxJSColor.color(k);u.pickerOnfocus=!1;u.showPicker();f=document.createElement("div");mxJSColor.picker.box.style.position="relative";mxJSColor.picker.box.style.width="230px";mxJSColor.picker.box.style.height="100px";mxJSColor.picker.box.style.paddingBottom="10px";f.appendChild(mxJSColor.picker.box);var m=document.createElement("center"),r=mxUtils.bind(this,function(J,D,N,S){D=null!=D?D:12;var T=document.createElement("table");T.style.borderCollapse=
+"collapse";T.setAttribute("cellspacing","0");T.style.marginBottom="20px";T.style.cellSpacing="0px";T.style.marginLeft="1px";var P=document.createElement("tbody");T.appendChild(P);for(var Z=J.length/D,U=0;U<Z;U++){for(var V=document.createElement("tr"),aa=0;aa<D;aa++)mxUtils.bind(this,function(ia){var ea=document.createElement("td");ea.style.border="0px solid black";ea.style.padding="0px";ea.style.width="16px";ea.style.height="16px";null==ia&&(ia=N);if(null!=ia){ea.style.borderWidth="1px";"none"==
+ia?ea.style.background="url('"+Dialog.prototype.noColorImage+"')":ea.style.backgroundColor="#"+ia;var qa=this.colorNames[ia.toUpperCase()];null!=qa&&ea.setAttribute("title",qa)}V.appendChild(ea);null!=ia&&(ea.style.cursor="pointer",mxEvent.addListener(ea,"click",function(){"none"==ia?(u.fromString("ffffff"),k.value="none"):u.fromString(ia)}),mxEvent.addListener(ea,"dblclick",g))})(J[U*D+aa]);P.appendChild(V)}S&&(J=document.createElement("td"),J.setAttribute("title",mxResources.get("reset")),J.style.border=
+"1px solid black",J.style.padding="0px",J.style.width="16px",J.style.height="16px",J.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')",J.style.backgroundPosition="center center",J.style.backgroundRepeat="no-repeat",J.style.cursor="pointer",V.appendChild(J),mxEvent.addListener(J,"click",function(){ColorDialog.resetRecentColors();T.parentNode.replaceChild(d(),T)}));m.appendChild(T);return T});f.appendChild(k);if(mxClient.IS_IE||mxClient.IS_IE11)k.style.width="216px";else{k.style.width=
+"182px";var x=document.createElement("input");x.setAttribute("type","color");x.style.visibility="hidden";x.style.width="0px";x.style.height="0px";x.style.border="none";x.style.marginLeft="2px";f.style.whiteSpace="nowrap";f.appendChild(x);f.appendChild(mxUtils.button("...",function(){document.activeElement==x?k.focus():(x.value="#"+k.value,x.click())}));mxEvent.addListener(x,"input",function(){u.fromString(x.value.substring(1))})}mxUtils.br(f);d();var B=r(this.presetColors);B.style.marginBottom="8px";
+B=r(this.defaultColors);B.style.marginBottom="16px";f.appendChild(m);B=document.createElement("div");B.style.textAlign="right";B.style.whiteSpace="nowrap";var C=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=e&&e()});C.className="geBtn";a.editor.cancelFirst&&B.appendChild(C);var F=mxUtils.button(mxResources.get("apply"),g);F.className="geBtn gePrimaryBtn";B.appendChild(F);a.editor.cancelFirst||B.appendChild(C);null!=b&&("none"==b?(u.fromString("ffffff"),k.value="none"):u.fromString(b));
+f.appendChild(B);this.picker=u;this.colorInput=k;mxEvent.addListener(f,"keydown",function(J){27==J.keyCode&&(a.hideDialog(),null!=e&&e(),mxEvent.consume(J))});this.container=f};ColorDialog.prototype.presetColors="E6D0DE CDA2BE B5739D E1D5E7 C3ABD0 A680B8 D4E1F5 A9C4EB 7EA6E0 D5E8D4 9AC7BF 67AB9F D5E8D4 B9E0A5 97D077 FFF2CC FFE599 FFD966 FFF4C3 FFCE9F FFB570 F8CECC F19C99 EA6B66".split(" ");ColorDialog.prototype.colorNames={};ColorDialog.prototype.defaultColors="none FFFFFF E6E6E6 CCCCCC B3B3B3 999999 808080 666666 4D4D4D 333333 1A1A1A 000000 FFCCCC FFE6CC FFFFCC E6FFCC CCFFCC CCFFE6 CCFFFF CCE5FF CCCCFF E5CCFF FFCCFF FFCCE6 FF9999 FFCC99 FFFF99 CCFF99 99FF99 99FFCC 99FFFF 99CCFF 9999FF CC99FF FF99FF FF99CC FF6666 FFB366 FFFF66 B3FF66 66FF66 66FFB3 66FFFF 66B2FF 6666FF B266FF FF66FF FF66B3 FF3333 FF9933 FFFF33 99FF33 33FF33 33FF99 33FFFF 3399FF 3333FF 9933FF FF33FF FF3399 FF0000 FF8000 FFFF00 80FF00 00FF00 00FF80 00FFFF 007FFF 0000FF 7F00FF FF00FF FF0080 CC0000 CC6600 CCCC00 66CC00 00CC00 00CC66 00CCCC 0066CC 0000CC 6600CC CC00CC CC0066 990000 994C00 999900 4D9900 009900 00994D 009999 004C99 000099 4C0099 990099 99004D 660000 663300 666600 336600 006600 006633 006666 003366 000066 330066 660066 660033 330000 331A00 333300 1A3300 003300 00331A 003333 001933 000033 190033 330033 33001A".split(" ");
ColorDialog.prototype.createApplyFunction=function(){return mxUtils.bind(this,function(a){var b=this.editorUi.editor.graph;b.getModel().beginUpdate();try{b.setCellStyles(this.currentColorKey,a),this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",[this.currentColorKey],"values",[a],"cells",b.getSelectionCells()))}finally{b.getModel().endUpdate()}})};ColorDialog.recentColors=[];
ColorDialog.addRecentColor=function(a,b){null!=a&&(mxUtils.remove(a,ColorDialog.recentColors),ColorDialog.recentColors.splice(0,0,a),ColorDialog.recentColors.length>=b&&ColorDialog.recentColors.pop())};ColorDialog.resetRecentColors=function(){ColorDialog.recentColors=[]};
var AboutDialog=function(a){var b=document.createElement("div");b.setAttribute("align","center");var f=document.createElement("h3");mxUtils.write(f,mxResources.get("about")+" GraphEditor");b.appendChild(f);f=document.createElement("img");f.style.border="0px";f.setAttribute("width","176");f.setAttribute("width","151");f.setAttribute("src",IMAGE_PATH+"/logo.png");b.appendChild(f);mxUtils.br(b);mxUtils.write(b,"Powered by mxGraph "+mxClient.VERSION);mxUtils.br(b);f=document.createElement("a");f.setAttribute("href",
-"http://www.jgraph.com/");f.setAttribute("target","_blank");mxUtils.write(f,"www.jgraph.com");b.appendChild(f);mxUtils.br(b);mxUtils.br(b);f=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});f.className="geBtn gePrimaryBtn";b.appendChild(f);this.container=b},TextareaDialog=function(a,b,f,d,g,e,k,n,u,m,r,x,B,C,G){m=null!=m?m:!1;k=document.createElement("div");k.style.position="absolute";k.style.top="20px";k.style.bottom="20px";k.style.left="20px";k.style.right="20px";n=document.createElement("div");
-n.style.position="absolute";n.style.left="0px";n.style.right="0px";var J=n.cloneNode(!1),D=n.cloneNode(!1);n.style.top="0px";n.style.height="20px";J.style.top="20px";J.style.bottom="64px";D.style.bottom="0px";D.style.height="60px";D.style.textAlign="center";mxUtils.write(n,b);k.appendChild(n);k.appendChild(J);k.appendChild(D);null!=G&&n.appendChild(G);var N=document.createElement("textarea");r&&N.setAttribute("wrap","off");N.setAttribute("spellcheck","false");N.setAttribute("autocorrect","off");N.setAttribute("autocomplete",
-"off");N.setAttribute("autocapitalize","off");mxUtils.write(N,f||"");N.style.resize="none";N.style.outline="none";N.style.position="absolute";N.style.boxSizing="border-box";N.style.top="0px";N.style.left="0px";N.style.height="100%";N.style.width="100%";this.textarea=N;this.init=function(){N.focus();N.scrollTop=0};J.appendChild(N);null!=B&&(b=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(B)}),b.className="geBtn",D.appendChild(b));if(null!=C)for(b=0;b<C.length;b++)(function(R,
-P,Z){R=mxUtils.button(R,function(U){P(U,N)});null!=Z&&R.setAttribute("title",Z);R.className="geBtn";D.appendChild(R)})(C[b][0],C[b][1],C[b][2]);e=mxUtils.button(e||mxResources.get("cancel"),function(){a.hideDialog();null!=g&&g()});e.setAttribute("title","Escape");e.className="geBtn";a.editor.cancelFirst&&D.appendChild(e);null!=u&&u(D,N);if(null!=d){var Q=mxUtils.button(x||mxResources.get("apply"),function(){m||a.hideDialog();d(N.value)});Q.setAttribute("title","Ctrl+Enter");Q.className="geBtn gePrimaryBtn";
-D.appendChild(Q);mxEvent.addListener(N,"keypress",function(R){13==R.keyCode&&mxEvent.isControlDown(R)&&Q.click()})}a.editor.cancelFirst||D.appendChild(e);this.container=k},EditDiagramDialog=function(a){var b=document.createElement("div");b.style.textAlign="right";var f=document.createElement("textarea");f.setAttribute("wrap","off");f.setAttribute("spellcheck","false");f.setAttribute("autocorrect","off");f.setAttribute("autocomplete","off");f.setAttribute("autocapitalize","off");f.style.overflow="auto";
+"http://www.jgraph.com/");f.setAttribute("target","_blank");mxUtils.write(f,"www.jgraph.com");b.appendChild(f);mxUtils.br(b);mxUtils.br(b);f=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});f.className="geBtn gePrimaryBtn";b.appendChild(f);this.container=b},TextareaDialog=function(a,b,f,e,g,d,k,n,u,m,r,x,B,C,F){m=null!=m?m:!1;k=document.createElement("div");k.style.position="absolute";k.style.top="20px";k.style.bottom="20px";k.style.left="20px";k.style.right="20px";n=document.createElement("div");
+n.style.position="absolute";n.style.left="0px";n.style.right="0px";var J=n.cloneNode(!1),D=n.cloneNode(!1);n.style.top="0px";n.style.height="20px";J.style.top="20px";J.style.bottom="64px";D.style.bottom="0px";D.style.height="60px";D.style.textAlign="center";mxUtils.write(n,b);k.appendChild(n);k.appendChild(J);k.appendChild(D);null!=F&&n.appendChild(F);var N=document.createElement("textarea");r&&N.setAttribute("wrap","off");N.setAttribute("spellcheck","false");N.setAttribute("autocorrect","off");N.setAttribute("autocomplete",
+"off");N.setAttribute("autocapitalize","off");mxUtils.write(N,f||"");N.style.resize="none";N.style.outline="none";N.style.position="absolute";N.style.boxSizing="border-box";N.style.top="0px";N.style.left="0px";N.style.height="100%";N.style.width="100%";this.textarea=N;this.init=function(){N.focus();N.scrollTop=0};J.appendChild(N);null!=B&&(b=mxUtils.button(mxResources.get("help"),function(){a.editor.graph.openLink(B)}),b.className="geBtn",D.appendChild(b));if(null!=C)for(b=0;b<C.length;b++)(function(T,
+P,Z){T=mxUtils.button(T,function(U){P(U,N)});null!=Z&&T.setAttribute("title",Z);T.className="geBtn";D.appendChild(T)})(C[b][0],C[b][1],C[b][2]);d=mxUtils.button(d||mxResources.get("cancel"),function(){a.hideDialog();null!=g&&g()});d.setAttribute("title","Escape");d.className="geBtn";a.editor.cancelFirst&&D.appendChild(d);null!=u&&u(D,N);if(null!=e){var S=mxUtils.button(x||mxResources.get("apply"),function(){m||a.hideDialog();e(N.value)});S.setAttribute("title","Ctrl+Enter");S.className="geBtn gePrimaryBtn";
+D.appendChild(S);mxEvent.addListener(N,"keypress",function(T){13==T.keyCode&&mxEvent.isControlDown(T)&&S.click()})}a.editor.cancelFirst||D.appendChild(d);this.container=k},EditDiagramDialog=function(a){var b=document.createElement("div");b.style.textAlign="right";var f=document.createElement("textarea");f.setAttribute("wrap","off");f.setAttribute("spellcheck","false");f.setAttribute("autocorrect","off");f.setAttribute("autocomplete","off");f.setAttribute("autocapitalize","off");f.style.overflow="auto";
f.style.resize="none";f.style.width="600px";f.style.height="360px";f.style.marginBottom="16px";f.value=mxUtils.getPrettyXml(a.editor.getGraphXml());b.appendChild(f);this.init=function(){f.focus()};Graph.fileSupport&&(f.addEventListener("dragover",function(k){k.stopPropagation();k.preventDefault()},!1),f.addEventListener("drop",function(k){k.stopPropagation();k.preventDefault();if(0<k.dataTransfer.files.length){k=k.dataTransfer.files[0];var n=new FileReader;n.onload=function(u){f.value=u.target.result};
-n.readAsText(k)}else f.value=a.extractGraphModelFromEvent(k)},!1));var d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.className="geBtn";a.editor.cancelFirst&&b.appendChild(d);var g=document.createElement("select");g.style.width="180px";g.className="geBtn";if(a.editor.graph.isEnabled()){var e=document.createElement("option");e.setAttribute("value","replace");mxUtils.write(e,mxResources.get("replaceExistingDrawing"));g.appendChild(e)}e=document.createElement("option");e.setAttribute("value",
-"new");mxUtils.write(e,mxResources.get("openInNewWindow"));EditDiagramDialog.showNewWindowOption&&g.appendChild(e);a.editor.graph.isEnabled()&&(e=document.createElement("option"),e.setAttribute("value","import"),mxUtils.write(e,mxResources.get("addToExistingDrawing")),g.appendChild(e));b.appendChild(g);e=mxUtils.button(mxResources.get("ok"),function(){var k=Graph.zapGremlins(mxUtils.trim(f.value)),n=null;if("new"==g.value)a.hideDialog(),a.editor.editAsNew(k);else if("replace"==g.value){a.editor.graph.model.beginUpdate();
+n.readAsText(k)}else f.value=a.extractGraphModelFromEvent(k)},!1));var e=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});e.className="geBtn";a.editor.cancelFirst&&b.appendChild(e);var g=document.createElement("select");g.style.width="180px";g.className="geBtn";if(a.editor.graph.isEnabled()){var d=document.createElement("option");d.setAttribute("value","replace");mxUtils.write(d,mxResources.get("replaceExistingDrawing"));g.appendChild(d)}d=document.createElement("option");d.setAttribute("value",
+"new");mxUtils.write(d,mxResources.get("openInNewWindow"));EditDiagramDialog.showNewWindowOption&&g.appendChild(d);a.editor.graph.isEnabled()&&(d=document.createElement("option"),d.setAttribute("value","import"),mxUtils.write(d,mxResources.get("addToExistingDrawing")),g.appendChild(d));b.appendChild(g);d=mxUtils.button(mxResources.get("ok"),function(){var k=Graph.zapGremlins(mxUtils.trim(f.value)),n=null;if("new"==g.value)a.hideDialog(),a.editor.editAsNew(k);else if("replace"==g.value){a.editor.graph.model.beginUpdate();
try{a.editor.setGraphXml(mxUtils.parseXml(k).documentElement),a.hideDialog()}catch(x){n=x}finally{a.editor.graph.model.endUpdate()}}else if("import"==g.value){a.editor.graph.model.beginUpdate();try{var u=mxUtils.parseXml(k),m=new mxGraphModel;(new mxCodec(u)).decode(u.documentElement,m);var r=m.getChildren(m.getChildAt(m.getRoot(),0));a.editor.graph.setSelectionCells(a.editor.graph.importCells(r));a.hideDialog()}catch(x){n=x}finally{a.editor.graph.model.endUpdate()}}null!=n&&mxUtils.alert(n.message)});
-e.className="geBtn gePrimaryBtn";b.appendChild(e);a.editor.cancelFirst||b.appendChild(d);this.container=b};EditDiagramDialog.showNewWindowOption=!0;
-var ExportDialog=function(a){function b(){var V=r.value,ia=V.lastIndexOf(".");r.value=0<ia?V.substring(0,ia+1)+x.value:V+"."+x.value;"xml"===x.value?(B.setAttribute("disabled","true"),C.setAttribute("disabled","true"),G.setAttribute("disabled","true"),P.setAttribute("disabled","true")):(B.removeAttribute("disabled"),C.removeAttribute("disabled"),G.removeAttribute("disabled"),P.removeAttribute("disabled"));"png"===x.value||"svg"===x.value||"pdf"===x.value?Q.removeAttribute("disabled"):Q.setAttribute("disabled",
-"disabled");"png"===x.value||"jpg"===x.value||"pdf"===x.value?R.removeAttribute("disabled"):R.setAttribute("disabled","disabled");"png"===x.value?(J.removeAttribute("disabled"),D.removeAttribute("disabled")):(J.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"))}function f(){C.style.backgroundColor=C.value*G.value>MAX_AREA||0>=C.value?"red":"";G.style.backgroundColor=C.value*G.value>MAX_AREA||0>=G.value?"red":""}var d=a.editor.graph,g=d.getGraphBounds(),e=d.view.scale,k=Math.ceil(g.width/
-e),n=Math.ceil(g.height/e);e=document.createElement("table");var u=document.createElement("tbody");e.setAttribute("cellpadding",mxClient.IS_SF?"0":"2");g=document.createElement("tr");var m=document.createElement("td");m.style.fontSize="10pt";m.style.width="100px";mxUtils.write(m,mxResources.get("filename")+":");g.appendChild(m);var r=document.createElement("input");r.setAttribute("value",a.editor.getOrCreateFilename());r.style.width="180px";m=document.createElement("td");m.appendChild(r);g.appendChild(m);
+d.className="geBtn gePrimaryBtn";b.appendChild(d);a.editor.cancelFirst||b.appendChild(e);this.container=b};EditDiagramDialog.showNewWindowOption=!0;
+var ExportDialog=function(a){function b(){var V=r.value,aa=V.lastIndexOf(".");r.value=0<aa?V.substring(0,aa+1)+x.value:V+"."+x.value;"xml"===x.value?(B.setAttribute("disabled","true"),C.setAttribute("disabled","true"),F.setAttribute("disabled","true"),P.setAttribute("disabled","true")):(B.removeAttribute("disabled"),C.removeAttribute("disabled"),F.removeAttribute("disabled"),P.removeAttribute("disabled"));"png"===x.value||"svg"===x.value||"pdf"===x.value?S.removeAttribute("disabled"):S.setAttribute("disabled",
+"disabled");"png"===x.value||"jpg"===x.value||"pdf"===x.value?T.removeAttribute("disabled"):T.setAttribute("disabled","disabled");"png"===x.value?(J.removeAttribute("disabled"),D.removeAttribute("disabled")):(J.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"))}function f(){C.style.backgroundColor=C.value*F.value>MAX_AREA||0>=C.value?"red":"";F.style.backgroundColor=C.value*F.value>MAX_AREA||0>=F.value?"red":""}var e=a.editor.graph,g=e.getGraphBounds(),d=e.view.scale,k=Math.ceil(g.width/
+d),n=Math.ceil(g.height/d);d=document.createElement("table");var u=document.createElement("tbody");d.setAttribute("cellpadding",mxClient.IS_SF?"0":"2");g=document.createElement("tr");var m=document.createElement("td");m.style.fontSize="10pt";m.style.width="100px";mxUtils.write(m,mxResources.get("filename")+":");g.appendChild(m);var r=document.createElement("input");r.setAttribute("value",a.editor.getOrCreateFilename());r.style.width="180px";m=document.createElement("td");m.appendChild(r);g.appendChild(m);
u.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("format")+":");g.appendChild(m);var x=document.createElement("select");x.style.width="180px";m=document.createElement("option");m.setAttribute("value","png");mxUtils.write(m,mxResources.get("formatPng"));x.appendChild(m);m=document.createElement("option");ExportDialog.showGifOption&&(m.setAttribute("value","gif"),mxUtils.write(m,mxResources.get("formatGif")),x.appendChild(m));
m=document.createElement("option");m.setAttribute("value","jpg");mxUtils.write(m,mxResources.get("formatJpg"));x.appendChild(m);m=document.createElement("option");m.setAttribute("value","pdf");mxUtils.write(m,mxResources.get("formatPdf"));x.appendChild(m);m=document.createElement("option");m.setAttribute("value","svg");mxUtils.write(m,mxResources.get("formatSvg"));x.appendChild(m);ExportDialog.showXmlOption&&(m=document.createElement("option"),m.setAttribute("value","xml"),mxUtils.write(m,mxResources.get("formatXml")),
x.appendChild(m));m=document.createElement("td");m.appendChild(x);g.appendChild(m);u.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("zoom")+" (%):");g.appendChild(m);var B=document.createElement("input");B.setAttribute("type","number");B.setAttribute("value","100");B.style.width="180px";m=document.createElement("td");m.appendChild(B);g.appendChild(m);u.appendChild(g);g=document.createElement("tr");m=document.createElement("td");
-m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("width")+":");g.appendChild(m);var C=document.createElement("input");C.setAttribute("value",k);C.style.width="180px";m=document.createElement("td");m.appendChild(C);g.appendChild(m);u.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("height")+":");g.appendChild(m);var G=document.createElement("input");G.setAttribute("value",n);G.style.width="180px";m=document.createElement("td");
-m.appendChild(G);g.appendChild(m);u.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("dpi")+":");g.appendChild(m);var J=document.createElement("select");J.style.width="180px";m=document.createElement("option");m.setAttribute("value","100");mxUtils.write(m,"100dpi");J.appendChild(m);m=document.createElement("option");m.setAttribute("value","200");mxUtils.write(m,"200dpi");J.appendChild(m);m=document.createElement("option");
+m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("width")+":");g.appendChild(m);var C=document.createElement("input");C.setAttribute("value",k);C.style.width="180px";m=document.createElement("td");m.appendChild(C);g.appendChild(m);u.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("height")+":");g.appendChild(m);var F=document.createElement("input");F.setAttribute("value",n);F.style.width="180px";m=document.createElement("td");
+m.appendChild(F);g.appendChild(m);u.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("dpi")+":");g.appendChild(m);var J=document.createElement("select");J.style.width="180px";m=document.createElement("option");m.setAttribute("value","100");mxUtils.write(m,"100dpi");J.appendChild(m);m=document.createElement("option");m.setAttribute("value","200");mxUtils.write(m,"200dpi");J.appendChild(m);m=document.createElement("option");
m.setAttribute("value","300");mxUtils.write(m,"300dpi");J.appendChild(m);m=document.createElement("option");m.setAttribute("value","400");mxUtils.write(m,"400dpi");J.appendChild(m);m=document.createElement("option");m.setAttribute("value","custom");mxUtils.write(m,mxResources.get("custom"));J.appendChild(m);var D=document.createElement("input");D.style.width="180px";D.style.display="none";D.setAttribute("value","100");D.setAttribute("type","number");D.setAttribute("min","50");D.setAttribute("step",
"50");var N=!1;mxEvent.addListener(J,"change",function(){"custom"==this.value?(this.style.display="none",D.style.display="",D.focus()):(D.value=this.value,N||(B.value=this.value))});mxEvent.addListener(D,"change",function(){var V=parseInt(D.value);isNaN(V)||0>=V?D.style.backgroundColor="red":(D.style.backgroundColor="",N||(B.value=V))});m=document.createElement("td");m.appendChild(J);m.appendChild(D);g.appendChild(m);u.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.style.fontSize=
-"10pt";mxUtils.write(m,mxResources.get("background")+":");g.appendChild(m);var Q=document.createElement("input");Q.setAttribute("type","checkbox");Q.checked=null==d.background||d.background==mxConstants.NONE;m=document.createElement("td");m.appendChild(Q);mxUtils.write(m,mxResources.get("transparent"));g.appendChild(m);u.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("grid")+":");g.appendChild(m);var R=document.createElement("input");
-R.setAttribute("type","checkbox");R.checked=!1;m=document.createElement("td");m.appendChild(R);g.appendChild(m);u.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("borderWidth")+":");g.appendChild(m);var P=document.createElement("input");P.setAttribute("type","number");P.setAttribute("value",ExportDialog.lastBorderValue);P.style.width="180px";m=document.createElement("td");m.appendChild(P);g.appendChild(m);u.appendChild(g);
-e.appendChild(u);mxEvent.addListener(x,"change",b);b();mxEvent.addListener(B,"change",function(){N=!0;var V=Math.max(0,parseFloat(B.value)||100)/100;B.value=parseFloat((100*V).toFixed(2));0<k?(C.value=Math.floor(k*V),G.value=Math.floor(n*V)):(B.value="100",C.value=k,G.value=n);f()});mxEvent.addListener(C,"change",function(){var V=parseInt(C.value)/k;0<V?(B.value=parseFloat((100*V).toFixed(2)),G.value=Math.floor(n*V)):(B.value="100",C.value=k,G.value=n);f()});mxEvent.addListener(G,"change",function(){var V=
-parseInt(G.value)/n;0<V?(B.value=parseFloat((100*V).toFixed(2)),C.value=Math.floor(k*V)):(B.value="100",C.value=k,G.value=n);f()});g=document.createElement("tr");m=document.createElement("td");m.setAttribute("align","right");m.style.paddingTop="22px";m.colSpan=2;var Z=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(B.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var V=r.value,ia=x.value,ha=Math.max(0,parseFloat(B.value)||100)/100,ba=Math.max(0,parseInt(P.value)),
-qa=d.background,O=Math.max(1,parseInt(D.value));if(("svg"==ia||"png"==ia||"pdf"==ia)&&Q.checked)qa=null;else if(null==qa||qa==mxConstants.NONE)qa="#ffffff";ExportDialog.lastBorderValue=ba;ExportDialog.exportFile(a,V,ia,qa,ha,ba,O,R.checked)}}));Z.className="geBtn gePrimaryBtn";var U=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});U.className="geBtn";a.editor.cancelFirst?(m.appendChild(U),m.appendChild(Z)):(m.appendChild(Z),m.appendChild(U));g.appendChild(m);u.appendChild(g);e.appendChild(u);
-this.container=e};ExportDialog.lastBorderValue=0;ExportDialog.showGifOption=!0;ExportDialog.showXmlOption=!0;
-ExportDialog.exportFile=function(a,b,f,d,g,e,k,n){n=a.editor.graph;if("xml"==f)ExportDialog.saveLocalFile(a,mxUtils.getXml(a.editor.getGraphXml()),b,f);else if("svg"==f)ExportDialog.saveLocalFile(a,mxUtils.getXml(n.getSvg(d,g,e)),b,f);else{var u=n.getGraphBounds(),m=mxUtils.createXmlDocument(),r=m.createElement("output");m.appendChild(r);m=new mxXmlCanvas2D(r);m.translate(Math.floor((e/g-u.x)/n.view.scale),Math.floor((e/g-u.y)/n.view.scale));m.scale(g/n.view.scale);(new mxImageExport).drawState(n.getView().getState(n.model.root),
-m);r="xml="+encodeURIComponent(mxUtils.getXml(r));m=Math.ceil(u.width*g/n.view.scale+2*e);g=Math.ceil(u.height*g/n.view.scale+2*e);r.length<=MAX_REQUEST_SIZE&&m*g<MAX_AREA?(a.hideDialog(),(new mxXmlRequest(EXPORT_URL,"format="+f+"&filename="+encodeURIComponent(b)+"&bg="+(null!=d?d:"none")+"&w="+m+"&h="+g+"&"+r+"&dpi="+k)).simulate(document,"_blank")):mxUtils.alert(mxResources.get("drawingTooLarge"))}};
-ExportDialog.saveLocalFile=function(a,b,f,d){b.length<MAX_REQUEST_SIZE?(a.hideDialog(),(new mxXmlRequest(SAVE_URL,"xml="+encodeURIComponent(b)+"&filename="+encodeURIComponent(f)+"&format="+d)).simulate(document,"_blank")):(mxUtils.alert(mxResources.get("drawingTooLarge")),mxUtils.popup(xml))};
-var EditDataDialog=function(a,b){function f(){0<R.value.length?P.removeAttribute("disabled"):P.setAttribute("disabled","disabled")}var d=document.createElement("div"),g=a.editor.graph,e=g.getModel().getValue(b);if(!mxUtils.isNode(e)){var k=mxUtils.createXmlDocument().createElement("object");k.setAttribute("label",e||"");e=k}var n={};try{var u=mxUtils.getValue(a.editor.graph.getCurrentCellStyle(b),"metaData",null);null!=u&&(n=JSON.parse(u))}catch(U){}var m=new mxForm("properties");m.table.style.width=
-"100%";var r=e.attributes,x=[],B=[],C=0,G=null!=EditDataDialog.getDisplayIdForCell?EditDataDialog.getDisplayIdForCell(a,b):null,J=function(U,V){var ia=document.createElement("div");ia.style.position="relative";ia.style.paddingRight="20px";ia.style.boxSizing="border-box";ia.style.width="100%";var ha=document.createElement("a"),ba=mxUtils.createImage(Dialog.prototype.closeImage);ba.style.height="9px";ba.style.fontSize="9px";ba.style.marginBottom=mxClient.IS_IE11?"-1px":"5px";ha.className="geButton";
-ha.setAttribute("title",mxResources.get("delete"));ha.style.position="absolute";ha.style.top="4px";ha.style.right="0px";ha.style.margin="0px";ha.style.width="9px";ha.style.height="9px";ha.style.cursor="pointer";ha.appendChild(ba);V=function(qa){return function(){for(var O=0,S=0;S<x.length;S++){if(x[S]==qa){B[S]=null;m.table.deleteRow(O+(null!=G?1:0));break}null!=B[S]&&O++}}}(V);mxEvent.addListener(ha,"click",V);V=U.parentNode;ia.appendChild(U);ia.appendChild(ha);V.appendChild(ia)};k=function(U,V,
-ia){x[U]=V;B[U]=m.addTextarea(x[C]+":",ia,2);B[U].style.width="100%";0<ia.indexOf("\n")&&B[U].setAttribute("rows","2");J(B[U],V);null!=n[V]&&0==n[V].editable&&B[U].setAttribute("disabled","disabled")};u=[];for(var D=g.getModel().getParent(b)==g.getModel().getRoot(),N=0;N<r.length;N++)!D&&"label"==r[N].nodeName||"placeholders"==r[N].nodeName||u.push({name:r[N].nodeName,value:r[N].nodeValue});u.sort(function(U,V){return U.name<V.name?-1:U.name>V.name?1:0});if(null!=G){r=document.createElement("div");
-r.style.width="100%";r.style.fontSize="11px";r.style.textAlign="center";mxUtils.write(r,G);var Q=m.addField(mxResources.get("id")+":",r);mxEvent.addListener(r,"dblclick",function(U){mxEvent.isShiftDown(U)&&(U=new FilenameDialog(a,G,mxResources.get("apply"),mxUtils.bind(this,function(V){null!=V&&0<V.length&&V!=G&&(null==g.getModel().getCell(V)?(g.getModel().cellRemoved(b),b.setId(V),G=V,Q.innerHTML=mxUtils.htmlEntities(V),g.getModel().cellAdded(b)):a.handleError({message:mxResources.get("alreadyExst",
+"10pt";mxUtils.write(m,mxResources.get("background")+":");g.appendChild(m);var S=document.createElement("input");S.setAttribute("type","checkbox");S.checked=null==e.background||e.background==mxConstants.NONE;m=document.createElement("td");m.appendChild(S);mxUtils.write(m,mxResources.get("transparent"));g.appendChild(m);u.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("grid")+":");g.appendChild(m);var T=document.createElement("input");
+T.setAttribute("type","checkbox");T.checked=!1;m=document.createElement("td");m.appendChild(T);g.appendChild(m);u.appendChild(g);g=document.createElement("tr");m=document.createElement("td");m.style.fontSize="10pt";mxUtils.write(m,mxResources.get("borderWidth")+":");g.appendChild(m);var P=document.createElement("input");P.setAttribute("type","number");P.setAttribute("value",ExportDialog.lastBorderValue);P.style.width="180px";m=document.createElement("td");m.appendChild(P);g.appendChild(m);u.appendChild(g);
+d.appendChild(u);mxEvent.addListener(x,"change",b);b();mxEvent.addListener(B,"change",function(){N=!0;var V=Math.max(0,parseFloat(B.value)||100)/100;B.value=parseFloat((100*V).toFixed(2));0<k?(C.value=Math.floor(k*V),F.value=Math.floor(n*V)):(B.value="100",C.value=k,F.value=n);f()});mxEvent.addListener(C,"change",function(){var V=parseInt(C.value)/k;0<V?(B.value=parseFloat((100*V).toFixed(2)),F.value=Math.floor(n*V)):(B.value="100",C.value=k,F.value=n);f()});mxEvent.addListener(F,"change",function(){var V=
+parseInt(F.value)/n;0<V?(B.value=parseFloat((100*V).toFixed(2)),C.value=Math.floor(k*V)):(B.value="100",C.value=k,F.value=n);f()});g=document.createElement("tr");m=document.createElement("td");m.setAttribute("align","right");m.style.paddingTop="22px";m.colSpan=2;var Z=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(B.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var V=r.value,aa=x.value,ia=Math.max(0,parseFloat(B.value)||100)/100,ea=Math.max(0,parseInt(P.value)),
+qa=e.background,O=Math.max(1,parseInt(D.value));if(("svg"==aa||"png"==aa||"pdf"==aa)&&S.checked)qa=null;else if(null==qa||qa==mxConstants.NONE)qa="#ffffff";ExportDialog.lastBorderValue=ea;ExportDialog.exportFile(a,V,aa,qa,ia,ea,O,T.checked)}}));Z.className="geBtn gePrimaryBtn";var U=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});U.className="geBtn";a.editor.cancelFirst?(m.appendChild(U),m.appendChild(Z)):(m.appendChild(Z),m.appendChild(U));g.appendChild(m);u.appendChild(g);d.appendChild(u);
+this.container=d};ExportDialog.lastBorderValue=0;ExportDialog.showGifOption=!0;ExportDialog.showXmlOption=!0;
+ExportDialog.exportFile=function(a,b,f,e,g,d,k,n){n=a.editor.graph;if("xml"==f)ExportDialog.saveLocalFile(a,mxUtils.getXml(a.editor.getGraphXml()),b,f);else if("svg"==f)ExportDialog.saveLocalFile(a,mxUtils.getXml(n.getSvg(e,g,d)),b,f);else{var u=n.getGraphBounds(),m=mxUtils.createXmlDocument(),r=m.createElement("output");m.appendChild(r);m=new mxXmlCanvas2D(r);m.translate(Math.floor((d/g-u.x)/n.view.scale),Math.floor((d/g-u.y)/n.view.scale));m.scale(g/n.view.scale);(new mxImageExport).drawState(n.getView().getState(n.model.root),
+m);r="xml="+encodeURIComponent(mxUtils.getXml(r));m=Math.ceil(u.width*g/n.view.scale+2*d);g=Math.ceil(u.height*g/n.view.scale+2*d);r.length<=MAX_REQUEST_SIZE&&m*g<MAX_AREA?(a.hideDialog(),(new mxXmlRequest(EXPORT_URL,"format="+f+"&filename="+encodeURIComponent(b)+"&bg="+(null!=e?e:"none")+"&w="+m+"&h="+g+"&"+r+"&dpi="+k)).simulate(document,"_blank")):mxUtils.alert(mxResources.get("drawingTooLarge"))}};
+ExportDialog.saveLocalFile=function(a,b,f,e){b.length<MAX_REQUEST_SIZE?(a.hideDialog(),(new mxXmlRequest(SAVE_URL,"xml="+encodeURIComponent(b)+"&filename="+encodeURIComponent(f)+"&format="+e)).simulate(document,"_blank")):(mxUtils.alert(mxResources.get("drawingTooLarge")),mxUtils.popup(xml))};
+var EditDataDialog=function(a,b){function f(){0<T.value.length?P.removeAttribute("disabled"):P.setAttribute("disabled","disabled")}var e=document.createElement("div"),g=a.editor.graph,d=g.getModel().getValue(b);if(!mxUtils.isNode(d)){var k=mxUtils.createXmlDocument().createElement("object");k.setAttribute("label",d||"");d=k}var n={};try{var u=mxUtils.getValue(a.editor.graph.getCurrentCellStyle(b),"metaData",null);null!=u&&(n=JSON.parse(u))}catch(U){}var m=new mxForm("properties");m.table.style.width=
+"100%";var r=d.attributes,x=[],B=[],C=0,F=null!=EditDataDialog.getDisplayIdForCell?EditDataDialog.getDisplayIdForCell(a,b):null,J=function(U,V){var aa=document.createElement("div");aa.style.position="relative";aa.style.paddingRight="20px";aa.style.boxSizing="border-box";aa.style.width="100%";var ia=document.createElement("a"),ea=mxUtils.createImage(Dialog.prototype.closeImage);ea.style.height="9px";ea.style.fontSize="9px";ea.style.marginBottom=mxClient.IS_IE11?"-1px":"5px";ia.className="geButton";
+ia.setAttribute("title",mxResources.get("delete"));ia.style.position="absolute";ia.style.top="4px";ia.style.right="0px";ia.style.margin="0px";ia.style.width="9px";ia.style.height="9px";ia.style.cursor="pointer";ia.appendChild(ea);V=function(qa){return function(){for(var O=0,R=0;R<x.length;R++){if(x[R]==qa){B[R]=null;m.table.deleteRow(O+(null!=F?1:0));break}null!=B[R]&&O++}}}(V);mxEvent.addListener(ia,"click",V);V=U.parentNode;aa.appendChild(U);aa.appendChild(ia);V.appendChild(aa)};k=function(U,V,
+aa){x[U]=V;B[U]=m.addTextarea(x[C]+":",aa,2);B[U].style.width="100%";0<aa.indexOf("\n")&&B[U].setAttribute("rows","2");J(B[U],V);null!=n[V]&&0==n[V].editable&&B[U].setAttribute("disabled","disabled")};u=[];for(var D=g.getModel().getParent(b)==g.getModel().getRoot(),N=0;N<r.length;N++)!D&&"label"==r[N].nodeName||"placeholders"==r[N].nodeName||u.push({name:r[N].nodeName,value:r[N].nodeValue});u.sort(function(U,V){return U.name<V.name?-1:U.name>V.name?1:0});if(null!=F){r=document.createElement("div");
+r.style.width="100%";r.style.fontSize="11px";r.style.textAlign="center";mxUtils.write(r,F);var S=m.addField(mxResources.get("id")+":",r);mxEvent.addListener(r,"dblclick",function(U){mxEvent.isShiftDown(U)&&(U=new FilenameDialog(a,F,mxResources.get("apply"),mxUtils.bind(this,function(V){null!=V&&0<V.length&&V!=F&&(null==g.getModel().getCell(V)?(g.getModel().cellRemoved(b),b.setId(V),F=V,S.innerHTML=mxUtils.htmlEntities(V),g.getModel().cellAdded(b)):a.handleError({message:mxResources.get("alreadyExst",
[V])}))}),mxResources.get("id")),a.showDialog(U.container,300,80,!0,!0),U.init())});r.setAttribute("title","Shift+Double Click to Edit ID")}for(N=0;N<u.length;N++)k(C,u[N].name,u[N].value),C++;u=document.createElement("div");u.style.position="absolute";u.style.top="30px";u.style.left="30px";u.style.right="30px";u.style.bottom="80px";u.style.overflowY="auto";u.appendChild(m.table);k=document.createElement("div");k.style.boxSizing="border-box";k.style.paddingRight="160px";k.style.whiteSpace="nowrap";
-k.style.marginTop="6px";k.style.width="100%";var R=document.createElement("input");R.setAttribute("placeholder",mxResources.get("enterPropertyName"));R.setAttribute("type","text");R.setAttribute("size",mxClient.IS_IE||mxClient.IS_IE11?"36":"40");R.style.boxSizing="border-box";R.style.marginLeft="2px";R.style.width="100%";k.appendChild(R);u.appendChild(k);d.appendChild(u);var P=mxUtils.button(mxResources.get("addProperty"),function(){var U=R.value;if(0<U.length&&"label"!=U&&"placeholders"!=U&&0>U.indexOf(":"))try{var V=
-mxUtils.indexOf(x,U);if(0<=V&&null!=B[V])B[V].focus();else{e.cloneNode(!1).setAttribute(U,"");0<=V&&(x.splice(V,1),B.splice(V,1));x.push(U);var ia=m.addTextarea(U+":","",2);ia.style.width="100%";B.push(ia);J(ia,U);ia.focus()}P.setAttribute("disabled","disabled");R.value=""}catch(ha){mxUtils.alert(ha)}else mxUtils.alert(mxResources.get("invalidName"))});mxEvent.addListener(R,"keypress",function(U){13==U.keyCode&&P.click()});this.init=function(){0<B.length?B[0].focus():R.focus()};P.setAttribute("title",
-mxResources.get("addProperty"));P.setAttribute("disabled","disabled");P.style.textOverflow="ellipsis";P.style.position="absolute";P.style.overflow="hidden";P.style.width="144px";P.style.right="0px";P.className="geBtn";k.appendChild(P);u=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog.apply(a,arguments)});u.setAttribute("title","Escape");u.className="geBtn";var Z=mxUtils.button(mxResources.get("apply"),function(){try{a.hideDialog.apply(a,arguments);e=e.cloneNode(!0);for(var U=!1,V=
-0;V<x.length;V++)null==B[V]?e.removeAttribute(x[V]):(e.setAttribute(x[V],B[V].value),U=U||"placeholder"==x[V]&&"1"==e.getAttribute("placeholders"));U&&e.removeAttribute("label");g.getModel().setValue(b,e)}catch(ia){mxUtils.alert(ia)}});Z.setAttribute("title","Ctrl+Enter");Z.className="geBtn gePrimaryBtn";mxEvent.addListener(d,"keypress",function(U){13==U.keyCode&&mxEvent.isControlDown(U)&&Z.click()});mxEvent.addListener(R,"keyup",f);mxEvent.addListener(R,"change",f);k=document.createElement("div");
-k.style.cssText="position:absolute;left:30px;right:30px;text-align:right;bottom:30px;height:40px;";if(a.editor.graph.getModel().isVertex(b)||a.editor.graph.getModel().isEdge(b))r=document.createElement("span"),r.style.marginRight="10px",D=document.createElement("input"),D.setAttribute("type","checkbox"),D.style.marginRight="6px","1"==e.getAttribute("placeholders")&&(D.setAttribute("checked","checked"),D.defaultChecked=!0),mxEvent.addListener(D,"click",function(){"1"==e.getAttribute("placeholders")?
-e.removeAttribute("placeholders"):e.setAttribute("placeholders","1")}),r.appendChild(D),mxUtils.write(r,mxResources.get("placeholders")),null!=EditDataDialog.placeholderHelpLink&&(D=document.createElement("a"),D.setAttribute("href",EditDataDialog.placeholderHelpLink),D.setAttribute("title",mxResources.get("help")),D.setAttribute("target","_blank"),D.style.marginLeft="8px",D.style.cursor="help",N=document.createElement("img"),mxUtils.setOpacity(N,50),N.style.height="16px",N.style.width="16px",N.setAttribute("border",
-"0"),N.setAttribute("valign","middle"),N.style.marginTop=mxClient.IS_IE11?"0px":"-4px",N.setAttribute("src",Editor.helpImage),D.appendChild(N),r.appendChild(D)),k.appendChild(r);a.editor.cancelFirst?(k.appendChild(u),k.appendChild(Z)):(k.appendChild(Z),k.appendChild(u));d.appendChild(k);this.container=d};EditDataDialog.getDisplayIdForCell=function(a,b){var f=null;null!=a.editor.graph.getModel().getParent(b)&&(f=b.getId());return f};EditDataDialog.placeholderHelpLink=null;
-var LinkDialog=function(a,b,f,d){var g=document.createElement("div");mxUtils.write(g,mxResources.get("editLink")+":");var 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 k=document.createElement("input");k.setAttribute("value",b);k.setAttribute("placeholder","http://www.example.com/");k.setAttribute("type","text");
+k.style.marginTop="6px";k.style.width="100%";var T=document.createElement("input");T.setAttribute("placeholder",mxResources.get("enterPropertyName"));T.setAttribute("type","text");T.setAttribute("size",mxClient.IS_IE||mxClient.IS_IE11?"36":"40");T.style.boxSizing="border-box";T.style.marginLeft="2px";T.style.width="100%";k.appendChild(T);u.appendChild(k);e.appendChild(u);var P=mxUtils.button(mxResources.get("addProperty"),function(){var U=T.value;if(0<U.length&&"label"!=U&&"placeholders"!=U&&0>U.indexOf(":"))try{var V=
+mxUtils.indexOf(x,U);if(0<=V&&null!=B[V])B[V].focus();else{d.cloneNode(!1).setAttribute(U,"");0<=V&&(x.splice(V,1),B.splice(V,1));x.push(U);var aa=m.addTextarea(U+":","",2);aa.style.width="100%";B.push(aa);J(aa,U);aa.focus()}P.setAttribute("disabled","disabled");T.value=""}catch(ia){mxUtils.alert(ia)}else mxUtils.alert(mxResources.get("invalidName"))});mxEvent.addListener(T,"keypress",function(U){13==U.keyCode&&P.click()});this.init=function(){0<B.length?B[0].focus():T.focus()};P.setAttribute("title",
+mxResources.get("addProperty"));P.setAttribute("disabled","disabled");P.style.textOverflow="ellipsis";P.style.position="absolute";P.style.overflow="hidden";P.style.width="144px";P.style.right="0px";P.className="geBtn";k.appendChild(P);u=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog.apply(a,arguments)});u.setAttribute("title","Escape");u.className="geBtn";var Z=mxUtils.button(mxResources.get("apply"),function(){try{a.hideDialog.apply(a,arguments);d=d.cloneNode(!0);for(var U=!1,V=
+0;V<x.length;V++)null==B[V]?d.removeAttribute(x[V]):(d.setAttribute(x[V],B[V].value),U=U||"placeholder"==x[V]&&"1"==d.getAttribute("placeholders"));U&&d.removeAttribute("label");g.getModel().setValue(b,d)}catch(aa){mxUtils.alert(aa)}});Z.setAttribute("title","Ctrl+Enter");Z.className="geBtn gePrimaryBtn";mxEvent.addListener(e,"keypress",function(U){13==U.keyCode&&mxEvent.isControlDown(U)&&Z.click()});mxEvent.addListener(T,"keyup",f);mxEvent.addListener(T,"change",f);k=document.createElement("div");
+k.style.cssText="position:absolute;left:30px;right:30px;text-align:right;bottom:30px;height:40px;";if(a.editor.graph.getModel().isVertex(b)||a.editor.graph.getModel().isEdge(b))r=document.createElement("span"),r.style.marginRight="10px",D=document.createElement("input"),D.setAttribute("type","checkbox"),D.style.marginRight="6px","1"==d.getAttribute("placeholders")&&(D.setAttribute("checked","checked"),D.defaultChecked=!0),mxEvent.addListener(D,"click",function(){"1"==d.getAttribute("placeholders")?
+d.removeAttribute("placeholders"):d.setAttribute("placeholders","1")}),r.appendChild(D),mxUtils.write(r,mxResources.get("placeholders")),null!=EditDataDialog.placeholderHelpLink&&(D=document.createElement("a"),D.setAttribute("href",EditDataDialog.placeholderHelpLink),D.setAttribute("title",mxResources.get("help")),D.setAttribute("target","_blank"),D.style.marginLeft="8px",D.style.cursor="help",N=document.createElement("img"),mxUtils.setOpacity(N,50),N.style.height="16px",N.style.width="16px",N.setAttribute("border",
+"0"),N.setAttribute("valign","middle"),N.style.marginTop=mxClient.IS_IE11?"0px":"-4px",N.setAttribute("src",Editor.helpImage),D.appendChild(N),r.appendChild(D)),k.appendChild(r);a.editor.cancelFirst?(k.appendChild(u),k.appendChild(Z)):(k.appendChild(Z),k.appendChild(u));e.appendChild(k);this.container=e};EditDataDialog.getDisplayIdForCell=function(a,b){var f=null;null!=a.editor.graph.getModel().getParent(b)&&(f=b.getId());return f};EditDataDialog.placeholderHelpLink=null;
+var LinkDialog=function(a,b,f,e){var g=document.createElement("div");mxUtils.write(g,mxResources.get("editLink")+":");var d=document.createElement("div");d.className="geTitle";d.style.backgroundColor="transparent";d.style.borderColor="transparent";d.style.whiteSpace="nowrap";d.style.textOverflow="clip";d.style.cursor="default";d.style.paddingRight="20px";var k=document.createElement("input");k.setAttribute("value",b);k.setAttribute("placeholder","http://www.example.com/");k.setAttribute("type","text");
k.style.marginTop="6px";k.style.width="400px";k.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";k.style.backgroundRepeat="no-repeat";k.style.backgroundPosition="100% 50%";k.style.paddingRight="14px";b=document.createElement("div");b.setAttribute("title",mxResources.get("reset"));b.style.position="relative";b.style.left="-16px";b.style.width="12px";b.style.height="14px";b.style.cursor="pointer";b.style.display="inline-block";b.style.top="3px";b.style.background="url("+IMAGE_PATH+"/transparent.gif)";
-mxEvent.addListener(b,"click",function(){k.value="";k.focus()});e.appendChild(k);e.appendChild(b);g.appendChild(e);this.init=function(){k.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?k.select():document.execCommand("selectAll",!1,null)};e=document.createElement("div");e.style.marginTop="18px";e.style.textAlign="right";mxEvent.addListener(k,"keypress",function(n){13==n.keyCode&&(a.hideDialog(),d(k.value))});b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
-b.className="geBtn";a.editor.cancelFirst&&e.appendChild(b);f=mxUtils.button(f,function(){a.hideDialog();d(k.value)});f.className="geBtn gePrimaryBtn";e.appendChild(f);a.editor.cancelFirst||e.appendChild(b);g.appendChild(e);this.container=g},OutlineWindow=function(a,b,f,d,g){var e=a.editor.graph,k=document.createElement("div");k.style.position="absolute";k.style.width="100%";k.style.height="100%";k.style.overflow="hidden";this.window=new mxWindow(mxResources.get("outline"),k,b,f,d,g,!0,!0);this.window.minimumSize=
-new mxRectangle(0,0,80,80);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.setLocation=function(m,r){var x=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;m=Math.max(0,Math.min(m,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));r=Math.max(0,Math.min(r,x-this.table.clientHeight-("1"==urlParams.sketch?
-3:48)));this.getX()==m&&this.getY()==r||mxWindow.prototype.setLocation.apply(this,arguments)};var n=mxUtils.bind(this,function(){var m=this.window.getX(),r=this.window.getY();this.window.setLocation(m,r)});mxEvent.addListener(window,"resize",n);var u=a.createOutline(this.window);this.destroy=function(){mxEvent.removeListener(window,"resize",n);this.window.destroy();u.destroy()};this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit();u.setSuspended(!1)}));this.window.addListener(mxEvent.HIDE,
-mxUtils.bind(this,function(){u.setSuspended(!0)}));this.window.addListener(mxEvent.NORMALIZE,mxUtils.bind(this,function(){u.setSuspended(!1)}));this.window.addListener(mxEvent.MINIMIZE,mxUtils.bind(this,function(){u.setSuspended(!0)}));u.init(k);a.actions.get("zoomIn");a.actions.get("zoomOut");mxEvent.addMouseWheelListener(function(m,r){for(var x=!1,B=mxEvent.getSource(m);null!=B;){if(B==u.svg){x=!0;break}B=B.parentNode}x&&(x=e.zoomFactor,null!=m.deltaY&&Math.round(m.deltaY)!=m.deltaY&&(x=1+Math.abs(m.deltaY)/
-20*(x-1)),e.lazyZoom(r,null,null,x),mxEvent.consume(m))})},LayersWindow=function(a,b,f,d,g){function e(ha){if(u.isEnabled()&&null!=ha){var ba=u.convertValueToString(ha);ba=new FilenameDialog(a,ba||mxResources.get("background"),mxResources.get("rename"),mxUtils.bind(this,function(qa){null!=qa&&u.cellLabelChanged(ha,qa)}),mxResources.get("enterName"));a.showDialog(ba.container,300,100,!0,!0);ba.init()}}function k(){var ha=U.get(u.getLayerForCells(u.getSelectionCells()));null!=ha?ha.appendChild(V):null!=
-V.parentNode&&V.parentNode.removeChild(V)}function n(){function ha(O,S,F,L){var T=document.createElement("div");T.className="geToolbarContainer";U.put(F,T);T.style.overflow="hidden";T.style.position="relative";T.style.padding="4px";T.style.height="22px";T.style.display="block";T.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";T.style.borderWidth="0px 0px 1px 0px";T.style.borderColor="#c3c3c3";T.style.borderStyle="solid";T.style.whiteSpace="nowrap";T.setAttribute("title",
-S);var ca=document.createElement("div");ca.style.display="inline-block";ca.style.width="100%";ca.style.textOverflow="ellipsis";ca.style.overflow="hidden";mxEvent.addListener(T,"dragover",function(W){W.dataTransfer.dropEffect="move";C=O;W.stopPropagation();W.preventDefault()});mxEvent.addListener(T,"dragstart",function(W){B=T;mxClient.IS_FF&&W.dataTransfer.setData("Text","<layer/>")});mxEvent.addListener(T,"dragend",function(W){null!=B&&null!=C&&u.addCell(F,u.model.root,C);C=B=null;W.stopPropagation();
-W.preventDefault()});var fa=document.createElement("img");fa.setAttribute("draggable","false");fa.setAttribute("align","top");fa.setAttribute("border","0");fa.style.width="16px";fa.style.padding="0px 6px 0 4px";fa.style.marginTop="2px";fa.style.cursor="pointer";fa.setAttribute("title",mxResources.get(u.model.isVisible(F)?"hide":"show"));u.model.isVisible(F)?(fa.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(T,75)):(fa.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(T,25));Editor.isDarkMode()&&
-(fa.style.filter="invert(100%)");ca.appendChild(fa);mxEvent.addListener(fa,"click",function(W){u.model.setVisible(F,!u.model.isVisible(F));mxEvent.consume(W)});fa=document.createElement("img");fa.setAttribute("draggable","false");fa.setAttribute("align","top");fa.setAttribute("border","0");fa.style.width="16px";fa.style.padding="0px 6px 0 0";fa.style.marginTop="2px";fa.setAttribute("title",mxResources.get("lockUnlock"));var wa=u.getCurrentCellStyle(F);"1"==mxUtils.getValue(wa,"locked","0")?(fa.setAttribute("src",
-Editor.lockedImage),mxUtils.setOpacity(fa,75)):(fa.setAttribute("src",Editor.unlockedImage),mxUtils.setOpacity(fa,25));Editor.isDarkMode()&&(fa.style.filter="invert(100%)");u.isEnabled()&&(fa.style.cursor="pointer");mxEvent.addListener(fa,"click",function(W){if(u.isEnabled()){var aa=null;u.getModel().beginUpdate();try{aa="1"==mxUtils.getValue(wa,"locked","0")?null:"1",u.setCellStyles("locked",aa,[F])}finally{u.getModel().endUpdate()}"1"==aa&&u.removeSelectionCells(u.getModel().getDescendants(F));
-mxEvent.consume(W)}});ca.appendChild(fa);fa=document.createElement("span");mxUtils.write(fa,S);fa.style.display="block";fa.style.whiteSpace="nowrap";fa.style.overflow="hidden";fa.style.textOverflow="ellipsis";fa.style.position="absolute";fa.style.left="52px";fa.style.right="8px";fa.style.top="8px";ca.appendChild(fa);T.appendChild(ca);if(u.isEnabled()){if(mxClient.IS_TOUCH||mxClient.IS_POINTER||mxClient.IS_IE&&10>document.documentMode)S=document.createElement("div"),S.style.display="block",S.style.textAlign=
-"right",S.style.whiteSpace="nowrap",S.style.position="absolute",S.style.right="16px",S.style.top="6px",0<O&&(ca=document.createElement("a"),ca.setAttribute("title",mxResources.get("toBack")),ca.className="geButton",ca.style.cssFloat="none",ca.innerHTML="&#9660;",ca.style.width="14px",ca.style.height="14px",ca.style.fontSize="14px",ca.style.margin="0px",ca.style.marginTop="-1px",S.appendChild(ca),mxEvent.addListener(ca,"click",function(W){u.isEnabled()&&u.addCell(F,u.model.root,O-1);mxEvent.consume(W)})),
-0<=O&&O<G-1&&(ca=document.createElement("a"),ca.setAttribute("title",mxResources.get("toFront")),ca.className="geButton",ca.style.cssFloat="none",ca.innerHTML="&#9650;",ca.style.width="14px",ca.style.height="14px",ca.style.fontSize="14px",ca.style.margin="0px",ca.style.marginTop="-1px",S.appendChild(ca),mxEvent.addListener(ca,"click",function(W){u.isEnabled()&&u.addCell(F,u.model.root,O+1);mxEvent.consume(W)})),T.appendChild(S);mxClient.IS_SVG&&(!mxClient.IS_IE||10<=document.documentMode)&&(T.setAttribute("draggable",
-"true"),T.style.cursor="move")}mxEvent.addListener(T,"dblclick",function(W){var aa=mxEvent.getSource(W).nodeName;"INPUT"!=aa&&"IMG"!=aa&&(e(F),mxEvent.consume(W))});u.getDefaultParent()==F&&(T.style.background=Editor.isDarkMode()?"#505759":"#e6eff8",T.style.fontWeight=u.isEnabled()?"bold":"",J=F);mxEvent.addListener(T,"click",function(W){u.isEnabled()&&(u.setDefaultParent(L),u.view.setCurrentRoot(null),mxEvent.isShiftDown(W)&&u.setSelectionCells(F.children),mxEvent.consume(W))});x.appendChild(T)}
-G=u.model.getChildCount(u.model.root);x.innerText="";U.clear();for(var ba=G-1;0<=ba;ba--)mxUtils.bind(this,function(O){ha(ba,u.convertValueToString(O)||mxResources.get("background"),O,O)})(u.model.getChildAt(u.model.root,ba));var qa=u.convertValueToString(J)||mxResources.get("background");Q.setAttribute("title",mxResources.get("removeIt",[qa]));Z.setAttribute("title",mxResources.get("duplicateIt",[qa]));u.isSelectionEmpty()&&(R.className="geButton mxDisabled");k()}var u=a.editor.graph,m=document.createElement("div");
-m.style.userSelect="none";m.style.background=Editor.isDarkMode()?Dialog.backdropColor:"#fff";m.style.border="1px solid whiteSmoke";m.style.height="100%";m.style.marginBottom="10px";m.style.overflow="auto";var r=EditorUi.compactUi?"26px":"30px",x=document.createElement("div");x.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"#fff";x.style.position="absolute";x.style.overflow="auto";x.style.left="0px";x.style.right="0px";x.style.top="0px";x.style.bottom=parseInt(r)+7+"px";m.appendChild(x);
-var B=null,C=null;mxEvent.addListener(m,"dragover",function(ha){ha.dataTransfer.dropEffect="move";C=0;ha.stopPropagation();ha.preventDefault()});mxEvent.addListener(m,"drop",function(ha){ha.stopPropagation();ha.preventDefault()});var G=null,J=null,D=document.createElement("div");D.className="geToolbarContainer";D.style.position="absolute";D.style.bottom="0px";D.style.left="0px";D.style.right="0px";D.style.height=r;D.style.overflow="hidden";D.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";
-D.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";D.style.borderWidth="1px 0px 0px 0px";D.style.borderColor="#c3c3c3";D.style.borderStyle="solid";D.style.display="block";D.style.whiteSpace="nowrap";var N=document.createElement("a");N.className="geButton";var Q=N.cloneNode(!1);r=document.createElement("img");r.setAttribute("border","0");r.setAttribute("width","22");r.setAttribute("src",Editor.trashImage);r.style.opacity="0.9";Editor.isDarkMode()&&(r.style.filter="invert(100%)");
-Q.appendChild(r);mxEvent.addListener(Q,"click",function(ha){if(u.isEnabled()){u.model.beginUpdate();try{var ba=u.model.root.getIndex(J);u.removeCells([J],!1);0==u.model.getChildCount(u.model.root)?(u.model.add(u.model.root,new mxCell),u.setDefaultParent(null)):0<ba&&ba<=u.model.getChildCount(u.model.root)?u.setDefaultParent(u.model.getChildAt(u.model.root,ba-1)):u.setDefaultParent(null)}finally{u.model.endUpdate()}}mxEvent.consume(ha)});u.isEnabled()||(Q.className="geButton mxDisabled");D.appendChild(Q);
-var R=N.cloneNode();R.setAttribute("title",mxUtils.trim(mxResources.get("moveSelectionTo",["..."])));r=r.cloneNode(!1);r.setAttribute("src",Editor.verticalDotsImage);R.appendChild(r);mxEvent.addListener(R,"click",function(ha){if(u.isEnabled()&&!u.isSelectionEmpty()){var ba=mxUtils.getOffset(R);a.showPopupMenu(mxUtils.bind(this,function(qa,O){for(var S=G-1;0<=S;S--)mxUtils.bind(this,function(F){var L=qa.addItem(u.convertValueToString(F)||mxResources.get("background"),null,mxUtils.bind(this,function(){u.moveCells(u.getSelectionCells(),
-0,0,!1,F)}),O);1==u.getSelectionCount()&&u.model.isAncestor(F,u.getSelectionCell())&&qa.addCheckmark(L,Editor.checkmarkImage)})(u.model.getChildAt(u.model.root,S))}),ba.x,ba.y+R.offsetHeight,ha)}});D.appendChild(R);var P=N.cloneNode(!1);P.setAttribute("title",mxResources.get("editData"));r=r.cloneNode(!1);r.setAttribute("src",Editor.editImage);P.appendChild(r);mxEvent.addListener(P,"click",function(ha){u.isEnabled()&&a.showDataDialog(J);mxEvent.consume(ha)});u.isEnabled()||(P.className="geButton mxDisabled");
-D.appendChild(P);var Z=N.cloneNode(!1);Z.setAttribute("title",mxResources.get("duplicate"));r=r.cloneNode(!1);r.setAttribute("src",Editor.duplicateImage);Z.appendChild(r);mxEvent.addListener(Z,"click",function(ha){if(u.isEnabled()){ha=null;u.model.beginUpdate();try{ha=u.cloneCell(J),u.cellLabelChanged(ha,mxResources.get("untitledLayer")),ha.setVisible(!0),ha=u.addCell(ha,u.model.root),u.setDefaultParent(ha)}finally{u.model.endUpdate()}null==ha||u.isCellLocked(ha)||u.selectAll(ha)}});u.isEnabled()||
-(Z.className="geButton mxDisabled");D.appendChild(Z);N=N.cloneNode(!1);N.setAttribute("title",mxResources.get("addLayer"));r=r.cloneNode(!1);r.setAttribute("src",Editor.addImage);N.appendChild(r);mxEvent.addListener(N,"click",function(ha){if(u.isEnabled()){u.model.beginUpdate();try{var ba=u.addCell(new mxCell(mxResources.get("untitledLayer")),u.model.root);u.setDefaultParent(ba)}finally{u.model.endUpdate()}}mxEvent.consume(ha)});u.isEnabled()||(N.className="geButton mxDisabled");D.appendChild(N);
-m.appendChild(D);var U=new mxDictionary,V=document.createElement("span");V.setAttribute("title",mxResources.get("selectionOnly"));V.innerHTML="&#8226;";V.style.position="absolute";V.style.fontWeight="bold";V.style.fontSize="16pt";V.style.right="2px";V.style.top="2px";n();u.model.addListener(mxEvent.CHANGE,n);u.addListener("defaultParentChanged",n);u.selectionModel.addListener(mxEvent.CHANGE,function(){u.isSelectionEmpty()?R.className="geButton mxDisabled":R.className="geButton";k()});this.window=
-new mxWindow(mxResources.get("layers"),m,b,f,d,g,!0,!0);this.window.minimumSize=new mxRectangle(0,0,150,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.init=function(){x.scrollTop=x.scrollHeight-x.clientHeight};this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.refreshLayers=n;this.window.setLocation=function(ha,ba){var qa=window.innerHeight||document.body.clientHeight||
-document.documentElement.clientHeight;ha=Math.max(0,Math.min(ha,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));ba=Math.max(0,Math.min(ba,qa-this.table.clientHeight-("1"==urlParams.sketch?3:48)));this.getX()==ha&&this.getY()==ba||mxWindow.prototype.setLocation.apply(this,arguments)};var ia=mxUtils.bind(this,function(){var ha=this.window.getX(),ba=this.window.getY();this.window.setLocation(ha,ba)});mxEvent.addListener(window,"resize",ia);
-this.destroy=function(){mxEvent.removeListener(window,"resize",ia);this.window.destroy()}};
+mxEvent.addListener(b,"click",function(){k.value="";k.focus()});d.appendChild(k);d.appendChild(b);g.appendChild(d);this.init=function(){k.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?k.select():document.execCommand("selectAll",!1,null)};d=document.createElement("div");d.style.marginTop="18px";d.style.textAlign="right";mxEvent.addListener(k,"keypress",function(n){13==n.keyCode&&(a.hideDialog(),e(k.value))});b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
+b.className="geBtn";a.editor.cancelFirst&&d.appendChild(b);f=mxUtils.button(f,function(){a.hideDialog();e(k.value)});f.className="geBtn gePrimaryBtn";d.appendChild(f);a.editor.cancelFirst||d.appendChild(b);g.appendChild(d);this.container=g},OutlineWindow=function(a,b,f,e,g){var d=a.editor.graph,k=document.createElement("div");k.style.position="absolute";k.style.width="100%";k.style.height="100%";k.style.overflow="hidden";this.window=new mxWindow(mxResources.get("outline"),k,b,f,e,g,!0,!0);this.window.minimumSize=
+new mxRectangle(0,0,80,80);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);var n=a.createOutline(this.window);a.installResizeHandler(this,!0,function(){n.destroy()});this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit();n.setSuspended(!1)}));this.window.addListener(mxEvent.HIDE,mxUtils.bind(this,function(){n.setSuspended(!0)}));this.window.addListener(mxEvent.NORMALIZE,mxUtils.bind(this,
+function(){n.setSuspended(!1)}));this.window.addListener(mxEvent.MINIMIZE,mxUtils.bind(this,function(){n.setSuspended(!0)}));n.init(k);mxEvent.addMouseWheelListener(function(u,m){for(var r=!1,x=mxEvent.getSource(u);null!=x;){if(x==n.svg){r=!0;break}x=x.parentNode}r&&(r=d.zoomFactor,null!=u.deltaY&&Math.round(u.deltaY)!=u.deltaY&&(r=1+Math.abs(u.deltaY)/20*(r-1)),d.lazyZoom(m,null,null,r),mxEvent.consume(u))})},LayersWindow=function(a,b,f,e,g){function d(aa){if(u.isEnabled()&&null!=aa){var ia=u.convertValueToString(aa);
+ia=new FilenameDialog(a,ia||mxResources.get("background"),mxResources.get("rename"),mxUtils.bind(this,function(ea){null!=ea&&u.cellLabelChanged(aa,ea)}),mxResources.get("enterName"));a.showDialog(ia.container,300,100,!0,!0);ia.init()}}function k(){var aa=U.get(u.getLayerForCells(u.getSelectionCells()));null!=aa?aa.appendChild(V):null!=V.parentNode&&V.parentNode.removeChild(V)}function n(){function aa(qa,O,R,G){var K=document.createElement("div");K.className="geToolbarContainer";U.put(R,K);K.style.overflow=
+"hidden";K.style.position="relative";K.style.padding="4px";K.style.height="22px";K.style.display="block";K.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";K.style.borderWidth="0px 0px 1px 0px";K.style.borderColor="#c3c3c3";K.style.borderStyle="solid";K.style.whiteSpace="nowrap";K.setAttribute("title",O);var Q=document.createElement("div");Q.style.display="inline-block";Q.style.width="100%";Q.style.textOverflow="ellipsis";Q.style.overflow="hidden";mxEvent.addListener(K,
+"dragover",function(ra){ra.dataTransfer.dropEffect="move";C=qa;ra.stopPropagation();ra.preventDefault()});mxEvent.addListener(K,"dragstart",function(ra){B=K;mxClient.IS_FF&&ra.dataTransfer.setData("Text","<layer/>")});mxEvent.addListener(K,"dragend",function(ra){null!=B&&null!=C&&u.addCell(R,u.model.root,C);C=B=null;ra.stopPropagation();ra.preventDefault()});var ba=document.createElement("img");ba.setAttribute("draggable","false");ba.setAttribute("align","top");ba.setAttribute("border","0");ba.style.width=
+"16px";ba.style.padding="0px 6px 0 4px";ba.style.marginTop="2px";ba.style.cursor="pointer";ba.setAttribute("title",mxResources.get(u.model.isVisible(R)?"hide":"show"));u.model.isVisible(R)?(ba.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(K,75)):(ba.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(K,25));Editor.isDarkMode()&&(ba.style.filter="invert(100%)");Q.appendChild(ba);mxEvent.addListener(ba,"click",function(ra){u.model.setVisible(R,!u.model.isVisible(R));mxEvent.consume(ra)});
+ba=document.createElement("img");ba.setAttribute("draggable","false");ba.setAttribute("align","top");ba.setAttribute("border","0");ba.style.width="16px";ba.style.padding="0px 6px 0 0";ba.style.marginTop="2px";ba.setAttribute("title",mxResources.get("lockUnlock"));var la=u.getCurrentCellStyle(R);"1"==mxUtils.getValue(la,"locked","0")?(ba.setAttribute("src",Editor.lockedImage),mxUtils.setOpacity(ba,75)):(ba.setAttribute("src",Editor.unlockedImage),mxUtils.setOpacity(ba,25));Editor.isDarkMode()&&(ba.style.filter=
+"invert(100%)");u.isEnabled()&&(ba.style.cursor="pointer");mxEvent.addListener(ba,"click",function(ra){if(u.isEnabled()){var X=null;u.getModel().beginUpdate();try{X="1"==mxUtils.getValue(la,"locked","0")?null:"1",u.setCellStyles("locked",X,[R])}finally{u.getModel().endUpdate()}"1"==X&&u.removeSelectionCells(u.getModel().getDescendants(R));mxEvent.consume(ra)}});Q.appendChild(ba);ba=document.createElement("span");mxUtils.write(ba,O);ba.style.display="block";ba.style.whiteSpace="nowrap";ba.style.overflow=
+"hidden";ba.style.textOverflow="ellipsis";ba.style.position="absolute";ba.style.left="52px";ba.style.right="8px";ba.style.top="8px";Q.appendChild(ba);K.appendChild(Q);if(u.isEnabled()){if(mxClient.IS_TOUCH||mxClient.IS_POINTER||mxClient.IS_IE&&10>document.documentMode)O=document.createElement("div"),O.style.display="block",O.style.textAlign="right",O.style.whiteSpace="nowrap",O.style.position="absolute",O.style.right="16px",O.style.top="6px",0<qa&&(Q=document.createElement("a"),Q.setAttribute("title",
+mxResources.get("toBack")),Q.className="geButton",Q.style.cssFloat="none",Q.innerHTML="&#9660;",Q.style.width="14px",Q.style.height="14px",Q.style.fontSize="14px",Q.style.margin="0px",Q.style.marginTop="-1px",O.appendChild(Q),mxEvent.addListener(Q,"click",function(ra){u.isEnabled()&&u.addCell(R,u.model.root,qa-1);mxEvent.consume(ra)})),0<=qa&&qa<F-1&&(Q=document.createElement("a"),Q.setAttribute("title",mxResources.get("toFront")),Q.className="geButton",Q.style.cssFloat="none",Q.innerHTML="&#9650;",
+Q.style.width="14px",Q.style.height="14px",Q.style.fontSize="14px",Q.style.margin="0px",Q.style.marginTop="-1px",O.appendChild(Q),mxEvent.addListener(Q,"click",function(ra){u.isEnabled()&&u.addCell(R,u.model.root,qa+1);mxEvent.consume(ra)})),K.appendChild(O);mxClient.IS_SVG&&(!mxClient.IS_IE||10<=document.documentMode)&&(K.setAttribute("draggable","true"),K.style.cursor="move")}mxEvent.addListener(K,"dblclick",function(ra){var X=mxEvent.getSource(ra).nodeName;"INPUT"!=X&&"IMG"!=X&&(d(R),mxEvent.consume(ra))});
+u.getDefaultParent()==R&&(K.style.background=Editor.isDarkMode()?"#505759":"#e6eff8",K.style.fontWeight=u.isEnabled()?"bold":"",J=R);mxEvent.addListener(K,"click",function(ra){u.isEnabled()&&(u.setDefaultParent(G),u.view.setCurrentRoot(null),mxEvent.isShiftDown(ra)&&u.setSelectionCells(R.children),mxEvent.consume(ra))});x.appendChild(K)}F=u.model.getChildCount(u.model.root);x.innerText="";U.clear();for(var ia=F-1;0<=ia;ia--)mxUtils.bind(this,function(qa){aa(ia,u.convertValueToString(qa)||mxResources.get("background"),
+qa,qa)})(u.model.getChildAt(u.model.root,ia));var ea=u.convertValueToString(J)||mxResources.get("background");S.setAttribute("title",mxResources.get("removeIt",[ea]));Z.setAttribute("title",mxResources.get("duplicateIt",[ea]));u.isSelectionEmpty()&&(T.className="geButton mxDisabled");k()}var u=a.editor.graph,m=document.createElement("div");m.style.userSelect="none";m.style.background=Editor.isDarkMode()?Dialog.backdropColor:"#fff";m.style.border="1px solid whiteSmoke";m.style.height="100%";m.style.marginBottom=
+"10px";m.style.overflow="auto";var r=EditorUi.compactUi?"26px":"30px",x=document.createElement("div");x.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"#fff";x.style.position="absolute";x.style.overflow="auto";x.style.left="0px";x.style.right="0px";x.style.top="0px";x.style.bottom=parseInt(r)+7+"px";m.appendChild(x);var B=null,C=null;mxEvent.addListener(m,"dragover",function(aa){aa.dataTransfer.dropEffect="move";C=0;aa.stopPropagation();aa.preventDefault()});mxEvent.addListener(m,
+"drop",function(aa){aa.stopPropagation();aa.preventDefault()});var F=null,J=null,D=document.createElement("div");D.className="geToolbarContainer";D.style.position="absolute";D.style.bottom="0px";D.style.left="0px";D.style.right="0px";D.style.height=r;D.style.overflow="hidden";D.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";D.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";D.style.borderWidth="1px 0px 0px 0px";D.style.borderColor="#c3c3c3";D.style.borderStyle=
+"solid";D.style.display="block";D.style.whiteSpace="nowrap";var N=document.createElement("a");N.className="geButton";var S=N.cloneNode(!1);r=document.createElement("img");r.setAttribute("border","0");r.setAttribute("width","22");r.setAttribute("src",Editor.trashImage);r.style.opacity="0.9";Editor.isDarkMode()&&(r.style.filter="invert(100%)");S.appendChild(r);mxEvent.addListener(S,"click",function(aa){if(u.isEnabled()){u.model.beginUpdate();try{var ia=u.model.root.getIndex(J);u.removeCells([J],!1);
+0==u.model.getChildCount(u.model.root)?(u.model.add(u.model.root,new mxCell),u.setDefaultParent(null)):0<ia&&ia<=u.model.getChildCount(u.model.root)?u.setDefaultParent(u.model.getChildAt(u.model.root,ia-1)):u.setDefaultParent(null)}finally{u.model.endUpdate()}}mxEvent.consume(aa)});u.isEnabled()||(S.className="geButton mxDisabled");D.appendChild(S);var T=N.cloneNode();T.setAttribute("title",mxUtils.trim(mxResources.get("moveSelectionTo",["..."])));r=r.cloneNode(!1);r.setAttribute("src",Editor.verticalDotsImage);
+T.appendChild(r);mxEvent.addListener(T,"click",function(aa){if(u.isEnabled()&&!u.isSelectionEmpty()){var ia=mxUtils.getOffset(T);a.showPopupMenu(mxUtils.bind(this,function(ea,qa){for(var O=F-1;0<=O;O--)mxUtils.bind(this,function(R){var G=ea.addItem(u.convertValueToString(R)||mxResources.get("background"),null,mxUtils.bind(this,function(){u.moveCells(u.getSelectionCells(),0,0,!1,R)}),qa);1==u.getSelectionCount()&&u.model.isAncestor(R,u.getSelectionCell())&&ea.addCheckmark(G,Editor.checkmarkImage)})(u.model.getChildAt(u.model.root,
+O))}),ia.x,ia.y+T.offsetHeight,aa)}});D.appendChild(T);var P=N.cloneNode(!1);P.setAttribute("title",mxResources.get("editData"));r=r.cloneNode(!1);r.setAttribute("src",Editor.editImage);P.appendChild(r);mxEvent.addListener(P,"click",function(aa){u.isEnabled()&&a.showDataDialog(J);mxEvent.consume(aa)});u.isEnabled()||(P.className="geButton mxDisabled");D.appendChild(P);var Z=N.cloneNode(!1);Z.setAttribute("title",mxResources.get("duplicate"));r=r.cloneNode(!1);r.setAttribute("src",Editor.duplicateImage);
+Z.appendChild(r);mxEvent.addListener(Z,"click",function(aa){if(u.isEnabled()){aa=null;u.model.beginUpdate();try{aa=u.cloneCell(J),u.cellLabelChanged(aa,mxResources.get("untitledLayer")),aa.setVisible(!0),aa=u.addCell(aa,u.model.root),u.setDefaultParent(aa)}finally{u.model.endUpdate()}null==aa||u.isCellLocked(aa)||u.selectAll(aa)}});u.isEnabled()||(Z.className="geButton mxDisabled");D.appendChild(Z);N=N.cloneNode(!1);N.setAttribute("title",mxResources.get("addLayer"));r=r.cloneNode(!1);r.setAttribute("src",
+Editor.addImage);N.appendChild(r);mxEvent.addListener(N,"click",function(aa){if(u.isEnabled()){u.model.beginUpdate();try{var ia=u.addCell(new mxCell(mxResources.get("untitledLayer")),u.model.root);u.setDefaultParent(ia)}finally{u.model.endUpdate()}}mxEvent.consume(aa)});u.isEnabled()||(N.className="geButton mxDisabled");D.appendChild(N);m.appendChild(D);var U=new mxDictionary,V=document.createElement("span");V.setAttribute("title",mxResources.get("selectionOnly"));V.innerHTML="&#8226;";V.style.position=
+"absolute";V.style.fontWeight="bold";V.style.fontSize="16pt";V.style.right="2px";V.style.top="2px";n();u.model.addListener(mxEvent.CHANGE,n);u.addListener("defaultParentChanged",n);u.selectionModel.addListener(mxEvent.CHANGE,function(){u.isSelectionEmpty()?T.className="geButton mxDisabled":T.className="geButton";k()});this.window=new mxWindow(mxResources.get("layers"),m,b,f,e,g,!0,!0);this.window.minimumSize=new mxRectangle(0,0,150,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);
+this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.init=function(){x.scrollTop=x.scrollHeight-x.clientHeight};this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.refreshLayers=n;a.installResizeHandler(this,!0)};
(function(){Sidebar.prototype.tagIndex="5V1dV+M6sv01rDvngax0oLvveYQEaGaAziE0PW8sxVYSDbblI9uk6V9/VVWS7ST+kB0zL3etbmIn3ltlfZRKUqkU/rpRLN6MmFJym5yM/8QL/Xnw7yLceXQ03fA3JaOTyfjCQCKZehvu66tErCMW6J9E1M4jlJcFTJWIPP1VIKK1ixj/zML4VBRiTMaf9HOKx8G7/lwy71V/ZJEv8Vv8cKea9KW646tU41nk678/4tK7SZVu5FpC9oz/TDPVnkEPJlsn4wVma1lEnVemGByy6q+M+SXkSmaQ6Vv27gJeBDzyOQDMu1ma5FVEEVBEtuokgQhdyZ62Uv/9qWWoYPRltgx4A3U970/hc6BnIuD+kdI+KbGTcelGce6ec4evOBl/k0r8llGKtWBTvulF98xVKjzEvxWXDVS/M8VHF57Hk0TDpzpxJQGScC9TIoX3euXvVV/UcWWpDFkqsCYyfaM/1ly36vGfgVhv0oiasyfh7ypgyaaBaKHl5/nThqb5VeAvZEigXx8k0AolJJUkVjo7jGBOHFOm29Se3FZin6VsyRL42V+2U90z9crTOGAeIEK8Q1UCnMlGxk4CLWb/gsflKt0y/MLnbzyQccgjaIivAjgTT/Gtr4Quf9cXXWRLjRKxyRwvkBko75hHnjisPzUkP/kyESnHtwoAtQ7kkrehL7UyzUAtLrh6E5g7Nnn9iYo2SWW8ZVr1QYsTIW8gE+ll5kHWQlXGdr/Qug1Zl/RDe2O4FL+fWPBaiJSUZGoDT6HRYT3DN9Gdgy4agY3Q59gj+iIOdAOB/MmYYlHKqYp5PMLaFHMVirSSG2XYySnnZrGHNW19JdaZoiYxGV8LbGq+9DKsT0APT3Sk1ldzXaZszQvOpfzlkndUYodytAPDOEuxuocyEqlUmM+Jbm6HevkAq0sAW8+MB9BmQJs+8HQr1Wup3G2zL6uCetJZjXKofV7J+FLnUUWtxZyLTYa20FzpV1GxEgnVdxH4JOgyS0QECr4F3z3nEUHWUQfUjUi/ZUv7tjqTGaCkl0q6Wou0Ef9tdhslUBAn9Xq4GshZkG6gTmx0m8EqvuGoYzb4iwMYdDnVMcpbS2QM3TYB3mM0Sp71/0fuSVPf7lmki1d10DN3LE6x0/CKut+GuddVgGpRyFCtc/sZYS/Cm9FySdUj3sgIPlOZeZvWNAm1o0uTXH81UO3zZEEqQDkwD5q37t+zdAOqNe/RS/aJ6Tdi5purBt73xV930PiLapT8HTTXqz2Kh7JloQ26bIlVOtAl6dIY9uBPMhbeCdgtu/ZLJeEe1XdduTSPrpc6v9+TlIf64jakMpeQ9RumQFVr3YiV3vcb+eZyy9Viw4Ogl1p+nM2xmofSyNSdYgHjnSzA6m26fu+wTKtwYM30S1LXTkxPsYp0qp+nbu8yg271r4xnWM3/hoseBI+8qttygmLlSfLhZtmsS7CZUd1Kds295iT2m4dTh7aH0qLgF2QqGo5qVVdLtHiPvIp2mdDXinvvXtBgGhLRI4/1sJs09z5TqY6sRCNVqlU+2qxPDNuRuxm20MqLmqNOO3CqHRqxEGEclC3jNtATkMOLhFZpOynrH5FAc3UlcKRsbJHvy/9wD8iylUSFJHhrrfmRYBPaZCGDZ2Mu6QXolr3prFf16OdvsxOjqyqUVPXzVEngw+g2Qrur8WehCxWnqu71sE9gv/QWnrSalK00WglxllLFX+VXVaxv1TMae7yFcRrlV2059PNiNr2+wdxh60gmKamJ7trRDvIm4xsecYXqxI7z6sQ5pICWKDHp6jFiEyjpgtLioL1lU6MmSu3VHZm0QtcI1RVNeCPPjIeKHnuZLamxJzHnNIzdyIzsV2+DJm+Y22ZVlPINS35AxuFl1Bo4nQ5IJ7PIfxyW8xzGplLgaG9BGginPqsrUhn55RCZiLoxbRn4v4dAbkYubdBLFkWoRfXYs24CvPz8lGzpNZchT1XDzN8OSEkcF8ZBhnP+1cq2jJgddJORxMmOmMX7w5A96HXzILoS882Mr/IBWqAHTcjxejheKQPvJRo3kWNuP0g0msMlzn6upFoK36/o6A6R34t5fG0RKMGiNdXSwyFVJX4R6mwE9Y+GsodSb1gcv7cCTRUWmCEx1rI2SAbsPvY2+m9QmTl7mCeBdrAdKeMnTGC24X4ylMvU3qWtzY2Yf5/QdB+kwyKPB1i9agqkwEqZJqm+HLULWY27rx0Q72mUWoass8VjGOIQHihN0cRKenQVagMsqEtZ40YXPq4geB2yGWCXNjHdvWUBLwzZJqO0hL+TVEJ2va5urbACZWbCVYXEuLKywZep5bhnERlBRuANDHRa5c1HgwZlFJY2kWnipFFzIUE+znKy+EtINIQLcbvWDo8tdUmlOANNl1A7/85EXGmvHeBG00tYB81LS0AuLBVnVATUY8Ryv9DreSbjX5/Gw7BN6qTSVmRHniapOrKd1UqFa33dmLRcn4eiO68TzJgwXYga5OrAdj+l/P+s/3w5u4BXnkOdFpGwo5wOb+7Cf+7CX/0GtfRfzjCN8YfJX05g2BeQMAv9mxwCtgIWyOwr5L/o7pR+6SJ3Fe/5QLwwr4C6BIv1fKyzpToXHJTbLiG8/GQotrMJyTgA31zp7sYz07uavDfhI0+ET93fNFPKrlqZnmkCBaS85u7Qkeu8E9ciU7jYt/Oin4Cirkdwp8G3qlPh7jTYKupVrjsR5kytjqzkeYIFXRodnI/DcJL3VsvKmexWjgEoQCsdT/N5gLf5grrxeJ6vHTm4gO6UlxdM9fCJr5VdTooZGIdRDXwVSKniAK23gL3Xr/TsPT66RK06s+5MS1xeX2UqEqZDcGRYCDPKrMfWwKV89WhCtCt0umFC9cHJWKCO87lZ93ND0Yx1Ilesax5NH5/A6H4+Kc+ulmZcK+SoYJnx5BWnwRUNUOzoqJMouyS0VN6PSOkRm10jTnAgsGXKVzQTWkNVwXMVcD3cwHzgiccCc+0iwrV+eIB8vYYrzXPHQmiE1ZMQ1dCqZe8YRowhM391K5bkoGWFgTnpJC0cvypov69W1PHZKu61VvUKlrlgOFehv8dRqYiSVFVPrFeh9R+a6FKwUKF/2DYN5EtABZqrc/t6ZBF2b+Aky+I4EDDf0hE76YPlKyXWsFCNdaYrfEHqwDPaoVMBPZl25/OkuXfYh1AuGViPJI2HzBH4syPx50fiP/fFS0ErkVp1KFpUCxjqH1AdWqWlSspDr9t9mp8sRe05lZKcAbbwhWfvXCT5uaMGgh6KpJLW1xfoBw3LaFijA7pLbA/dLBaAHq0vExEoc+vIsCVvS8dsgKfzHs2zF5UcNegfdc9XQw7LtzEBEfnVuw5qsk9o/ZpU+TG0Qy5lmqJsZZKl/bKVR1cmoRI9kMKywhvIGYGrFIq+bi/73BQ0hZ97urenL6JXo5mqakobbtIVV66p/w8gNxay1cYALkHB9QnaBuTxx//OCudewXQalev3OcXoIopkah29PmH7C415oHVru0dODdPkGKapDAJyVt7oUe06YBVuotXIfZ+gJPdtaYfWuto0odAH8LSEDeELJ+eFgmTOYjMjHzutTu3jF0WpG5cTsOdrF/oO4OA7ZEqfB4GIEzsLWN3o6/CT3nipaAhKotcVWg06C0PjypdFnnW8zKDa16wc7zM8ads4WfHympGqW4QkbMBZ9BJqM5HWi99YkIFBog0Hzio7lkrk6FpEIqHNUzdS+rD2lUqc/dJZEPYVaHSDy8bczBP5mZ0nMo6LJDO2Kt7crnZYv2dpIkqO4Lj+UwiaZGA0N9XXHbZnPaKg7UVm+cmsVbpgLwQqTBDlK2QRjYqU9WGg36q1rR4EKSmgVoQS93g0qWbzMLnj/zKeThc2Ny9xdcxvW89tJ4FBZ+TrYS822IEJJ+OfG7MBproKdaU+lm6ha0k6VD5Wkg2Rn63EH5QRvWjn4LGOw95S7TY+lo3TH5bgr0x4r7qHlmhA5xdL8inC2+X+qnIjibHk+hEt7HPJHmiPr5FDKwqa25qJBIaLoGOvda+c0H4n10rRyKPrgymjDoVVMM5x8qynOBbcSwY9gDZTfidm4q9hNigH6Zq7EjwAgaEWn4CdRLdtSHCS1yLr+oE6voukO1CwEDCn2jNsm2CDCNlvtAe2HK3BYr8H2yZ1uJHuZl7so7STbMGZwqkd6+yc2C8a0q/ngU2T1/pvyFPmk83Tn/jK+AeZjy7QxdUCkrSe3NbTqNgL40jzsEOzt6u1D9tkTG81GT/skQ2ayLenp/lHp2H3zgzG+tdOZtsNHX1oJuNi99VAhH9Z9NF0P6/LNDBfboa6fZhgGdkTPhmqg3Eaf+zelGaa70Uruxfjpw7m7dWUBlIMPOJLqqEnlbYw7m/rCMN8W4EIq3yU28lRr/00O6EP07B7pPtJPgO3BzSObqMkNTPyh4nQVpli6C+Kh7umeGXIdYrzyrTE4a54V+7GdziaNakWdy8rutDfP+5Q6uGXHqZnFasiznRQXfSQERvNwMTfZtcLB/4N88lR1Bd6tC6Wmg+3UpO1nNAGReekn+dT/fCb2QYDbrLizeyyPyxWZ8bSBMBkfKP5KJTH8MncwhpdhJEJPjKZR2kWM4anfp4/4AqMtort1M9HJXJkDjXvCa99fDR7j1goZ+Ci5eNlH6zuA1JT24fiScpErMTelfGWWtwxQgHFjjzCtuJuPPlabFdZTK9hY7OU1LD5pjsLmKV+V7LRWsksxq1hcNHhDR5nYFYqnRg0I1Y7DGhmMD12qaM7njEng52y6I//yONAG9BDsy/0hb98H4T2Hv7Q9t5BMyMPDTB4Nn9XzMNV9SGpaZMwKq/cRu6MBdc0PRqMupDoGiLfYQUGNXqIoSzglobh11Ll0aDyYCql7wahxgrlvX5sEk9cZ8huDzRQKtakbzDk+1FCGCwTPmIQ6tuLe/08bRLHSBvMs1uV8of6M2tpff8UM/Pjklg8LY7ij2R0alrmSxLrke4KNjZKlWGvuIKL9jaT+K844epjeCsbzgtnkPNwXuM/X3fC4BwyjB44eY2kUW1gqzKElvowWzyKevTim5hHprYrSXGfbPU290OwgmbZRoHEXmVmBwR7emHQ9K589FG7k96B/hk0nQWuRNKy6Ee92NUl1NrCPFkWodFqXT7dWLX8EYuTjUw/LIFnGWQh/wD6BXjF5f1UsZTtMB/UxgsRVUy8uA9OYDJGlyEbZyNpS1HacBx90z06HU8knhzZ+GJAVIo1Vl/L92CjS6WtHnxx8r5FZ4xmPbZPYWNQQGbmEnRmuZ+BSxs5k2zBqQJpskiklWy1PIuQ4XrcZbGXdyOzpNmGIhLrhZhgucX6peINVyxIRreX0Gvda5tspRgFQCo8FlPjIwyemeTOGHtHJCIiCLF1sTgfj3fTib1jX+DJSDoQaa0feE+++5K/Z4mSnEGL3N11JS8SdE9HeEraqGfFD0fVEJwXKwldJ25PbrDKdG6T+y0F1RlOcDth5Q1LnHvED0S48Kx/2FCEsd33NxRhFplVkqLAB2obiywGV+ucayDaPEbVTg7QOnlfSrsfbDAhf+w3rmPInvWoA13OtB5XbLiyp9hIlxATesgqVVuZanqbKm6MJh1Y9lBCLL9k9Gl8cwW+HVN5dYJRLrKWiYZmurNPX2FH4z9mJNcfpaWJPKJ1YKpu6aZ3cv+m5HAb00cnVoSnzXdi39v8OjrjroXiW7JZiggXhh5ecLu4/2OIdA7Ih+C08S2Hz/Mi1Fqe56VEdMY8L6Zn4/H4j64J+gKCZEl0trLXXWAjGMsGJWQg26I8EcMmW9IrrmlhBZrg+JIlHLZJUsDSTda8UlJHNIXvj2Y5Dm0N7+NY9pee1o2LUIfB7vYSCPXf0b/4OxT2bsD8RsTjfKH/6Z9VXOcwfICpjK3rhMzX9DytZOyWPLfXrWCUPg9NPwImrq4cFDp2bgze3FOyVbYDpm9SprndbD67s+TRiPMDD27nJfk83rKrqZ7X5xQq0q9YDHNhWMhV5/fLowhZv+42gEJbG6qJssvEbZBSVOXSZTsKYuja+uiYEEIglnuoh940Z5eYnsnancUvHRghyGUuRsN2kzpsWYZVmcuVBAd9W77MgSF8cWI9JZs5sAeipm0DrrRhtrqDCGj+YStWogZxgwj9oEfBAkdsCZHMvHQ0uwCj1xdrQQeRMG1SSzqzI4JDRSpiZTWQ8TCDQIm6wsMEi66wv1qClVex6HKgZJe6zcRte5SqGO6zX6dWll1JmiVrIz2g68ZgQnab6IEXIcRmwh3ZYRxAHN5hGCfHMT5dGKlkiVuP1WAvj64TsOvFLGDWJOJAP/lY+rOPooctUXaFcG5CMCa1a0AHPB6LmSeMTZjfdEePpjmWiipzbiI1JJMhSCDb6SkZvNPUfwVnB0LYx541RzxuJ/k8hFT3ptWjI2OJC8b3RVLQnYF/CSf9GYYUlJRr45LCdn5cmnOM+J+nGctEOKfpC22h0DCFPGOcUCZPT0PubViEX01O6XyqRR4tbFvn7ONCdyczP8nnzoqrvnzzLNmUx3kP0PNFsKof4FFvGGqlYWNjR/bvu+xaITXs0W3mplMCaGSq9dDgslfw95VecO/809fRxfT0YkqMuRWRmxYdiWa1RIXZ4s43G5IMY9p07mxL6Mn4UtAY33ZVfdkuC2NpZQ2orngTjbcXfnaxl7EVNqU7WUX1OZLvoBYVfDWmbgulWK24yneHH1cVriJPvce4Kh95HZSwgX8Tx5T8neyLftHFIDycVUHfSFbhqFqHRluMTCF73Rk7urVIY0gLE+jEreOr5DkbiOfzMTy0c16rX25fTSgzM38k16QXl41tRaVVG+mqHQ9Kj2tRjO4N49KlY/vbrXN4V1f3WuAjOGZmozND0lk84L9yZ3zmzFEzTpQwu8YD2B2viUbXWWKDSOkmchQHFhbnzo2qkgRHQ8tEBty9dVYSnR8lzW0QZLBgZ46HuswCmA8R9ltgtcHh8HNJD3RKA4PMUdZbLlFOtrvUhnEyICPSHGYAsR3mR598eOA4RDUx91qTOIbeVNIBkpDJiqcJlB1dnsAJOg2hOSqwoxkt5cC8PixAfV9cX8Gqx8PJzjAM7N5oP9h+T2rYzFYabfWizslupwMJu8s4qIywhoDnZ+gK/DqkqPM94mMlfji1sFJxfTppGJD3YpwMzng2OOP54IyfB2f8cgzjvK6saydCejFOBmc8G5zxfHDGz4MzfunPCEXQt3+YDK4TahiP0Ak1jEfohBrGI3RCDeMROqGG8QidMBlcJ9QwHqETahiP0Ak1jEfohBrGI3RCDWMfnSDjVL6Y+cxIeMnoK67frkNzxEEetjrhb7XHe/VlzX35Z/NSCj73REj+FIdndDml9mfNO0Si1lGgL+nuK5gEjn+Du6vZ3iiMhyK1J7EeLjJ0IJ0MTApUp8xL0fUFY+1PIThD4lH4kcAc0ZZ7fsEUO87W7k3yOaX2XX9x6sksJg8y+L2461euSImrmyKhGTR4ZOeLfsTzjUylzdYYbqqzuZbvRY8OMSAUjkF3l2M7rL3GgfcSMN/nCg7P1gX0PUvjzEbVbDt124lo0ptoAFl6SwF7LF4S3QbMsrY0LjilL47hGt08fS+aQ3tDMPNvaYbHaMjVCm4278rUQudkb2+mtp+2Z3RgWoYf/YJS812Jv/v7mYQmH57QA7rd3d5cFu+VZMFuaksRSzpcr7Lp9ktr8l9M6+y/mNb5x6Y1f5j/18prJ60PLq+dtD64vHbS+uDyAhVlI6M799fdE5h8YAK31gsPt6BVaZt6RsUp69DTk3fr9ROx1h3yS5LHHaarfvARrtguLAODtUQzBeyZU8d6kM5KpOZkDlwuH5J18iGsZwOxPmOw7TcZpG2xuxs4cH33aI5Jd5J0A/u0wKZ8oZC56GjUdHaNAwVZp8aD2xqnlQ7dlXy5uknqlI8rfmfa4p+V00n/cZ2kaqGdDEA7r5a267C7hbLPjMiWvXFYo0Y/ZnPdiBUy+ToCJYpL0l6tk/j+06MLbE6e4m3OCmUMBlbBmIwYySAVIUXwCUXkNy1blzguKWaN4jE6VDljtma3rNJVX2ak5eHgFEcCGB0nG3TrWcrDQ+wrQdSQmIkm0+0tpXzFpGTTidwVMBCtiEwAsXob3RfLWCX4ypxyl0oZVL1mDXTKAh75Jk66e3WYbjBMgC8SL0vqzqOpBO7WH5vDDkAZ6haFYTV80TxG3EGhkULjQpwqMUeO68F4KirOKKgkwXBn/2FvzDVZc9pEc2C+SiA3Pgq6yskW3VGGFYeCeDJ2blwWhh1SQRGzpMmTZIdgizN+NtQNGoLctdpe2WPnJ+N/XIVx+o67L/O4wYoztyZe5jFhh4EpiyoZ6kje0SLH+OEmmkWxpN90tkyJ4zpgyWbHhcM19WsZkH6Ras0i8du55AloXNdaztzYgSmjVSMTb53tH+BUg7xhGZYONOBme6EMCujYxrX+rN3BeYD6xunkoQ3XlnTdTqBDlETN0hSK5ABzV3IzOXRyoYOyyjWjlS7C4Gzl2KFuctjgTfkpR62bf3bRrzgai5lv1GzlwbDVWPlKbkk35kykmnDxNfh7Eyk+b73cNsoi+HsbRY71qHcpDnlyBic7MhgeB3Q5TsmbJMsckqeTLbVSk+tI5EHclWjjK84IzRcv3ASRtGEiPyEv+h/61AUTSdPlpplatvIkMKP6LPiW06Ed6OhY1wfKmLYftpG+gY7Fc4RyhcXwxBznF3yQ2LXoERXmbJgl6LsIFIGoOEPugOC7tnWi/CywOxNXSxuzuPakZB7BoTLnqxhxGxNtsOAVRmUdSnF0fvb2MtDBzKimE2/MA2mNB7qTEI8873ZXiid0El/MsdYrniqHt38sni8oclZHCnqsvxCLcqZV5+t+fnro/r7m5ryWStYNhRnMYvM+Tnm60EOFmFThlPqfZeZcvRe6EzZntaWkS0wsOJ8spTa4HjHk+6Ibt48fQlPMCVXtlFkLkvG2iMbZYpnXMBwMWHzFas7yPYRn2FSxmTraXlU05nQ71NwNh5Uc4uTB2MANp7Sh5+EmdN03vFN026Vw7ud/xJ2r5Q8KdgOHyTIb+oN5bt1bHpGwXf/vNj8HUrMgLTPqDioiQ1eBf7KAoiFR2zLDcwecuIa+t7TluwWGYR+m9rzA4ghBJ5iZsdwJqknTOi4mHXJ0HtARirSFPaHPBXL1KyZjxYJaSwJh5izfLind6Vpr9KPN18QcHuVG8GizwuetHvkllLGJuoi6sGeG/eObVOI3NJkAhoY154U58DxDm/F6suBsH7TdDa8wy2tA3fQ6YlC9NOXTGgF0TuGI+bD1SyTEX3M0aAXOM1NHtJU7n0ZywCkYmwWjBz30PNV21NvJzuSeO0EfLBzLSaFI8HQybXkJbo+4tZ/tLMW0krl0QcGMLniY2CkXc+kC1c9lJPUyS1OcetH6+4SiDIMPmf4dGpT+0lgaIX3TQmvUXIL7tS5MjYlzg7gjwTfSQF3xN9z0aDhTy1PUXKarOmnpnCoJzWDUmgLFgLBZGF0hcDmELWGhtiVWVYyHIcbCnNNabPDKOwolTaRtHq1FxLnabcBlpslwVCMGezrNyo69hvxMhe7NKq2yCuzowiK1zpsqmSSnl5yFGAIM7kBRVJ1H68B2DYvgp5cBwwNf58z3A5yua4hje1NQxjHTqlC3Bed2VIAx6JNYZTRNUNy1A2UYw6GIJmxFftcFSGvDF8JELCgYOq0S75NO7UvgzpwS72R8qv8/ZWop8DTbmR5fknemaluT2kvj5fRFJLLje6ss2UCcubWuqSZOMX53Uj4XDH+0nxTziHBunKMpfIOWCGTtjU0KwgfbJPYIawXWuUKzqHiBn+9NQxjAUFssWiW8m2z0WSihRldm5Q/ElaZpXEz/6FMhmihnSOm+CF/mw3DTbBjZdrj6CLXi3E5041VrkdJWbsdN3SXA6E78nQk8jJVwWuBLIXHTLNl9S9Ec04PI8pHWKvfRbYEEcvuS8CixfoyRS1PbcJa+8F+wBL2m181vTnDqPM0v3FlG1+IX+QKnipndmk/ZksMe4W/ANBlflVJJs2W7StlP4oAHehqJJ3NiUn8MSXwN4xO/eAtQGNcsGjSN/bzqTf4DMn7D4rLAvbO91851AIa6CmB9wgvHx0e30ekd9TiPUo9cwMH+3uBFFLT571cSLcAO8roTkUFVIjoWj5N7XieKjDzA4dPtYd3b+jiPZCB+xaTSDirhaBFZnWFuWhNLdP3Sb/diemM6EMb2ms3QNzgeGsc+dOUKGM1ktsSZMgjAqTjuIn5idqksZYIGnp6A8MItr205EY/N+dkKcxzX0bLo3kLK9I8hiEr5BNFrh+KEfgwopR5JhgOTPkq5+gBK/QFjy4GFftODSX9ILqqJg5X/TGjj1R8yV3cYSdoPqRDXLMCAGUNSBtJGzhgsO/Y4jyg+xbxXE4/UhoiespQF77gOa0e7eWi0s/FkrD9WNG0CW882fBvwlNxvvFfyzRgorU/HptUVBG6zdODOGk83i2jQkJ/09x4uccbM/F6NH7EINuHhNEZktuOlMlO0SkxXYfnHZpoRBlaYybU5t2wpfL9lQyThV1L6NUm34kZThkF9C91FPjq0dLTEeyeea4Zle02yhLzFiaaEfORJyjLFIrtJa9XA0Uow6UZAnjseLcPmbjwh94VHlsZGJvFhyLlaFp2fuFnzDo/N8PQNxE4Sv5tiJNcw3WJ05d/Mzi2K0n03poX0KACac1zyGqKn2QyqF6wS7MV+zr3Ffc5W5pn9sNl7vLq9ZZrziinM8xgi12CwVt16W+ucAf8z04VDZ2xY+BrLXtdGBSPi9wrCaqp7RnE87+gFdANgfrM75R4c7dvjxeDKy9T7IFTkqpPoAXYQiJZlrB3kA4/TjEKfHyvEPMjQ8/9oogUz+xaPZ4rkdhWwV3hy27QQUIXFY31wI1PasqxWgZv0xJ31xJ13xv3QajQbpCI/82OJnMLpHwJG11x3p1i4shPunlAdMbY+mDQ74SadcT/xlUw/yfthJ12wCVtxPGJgw35XmVR1CLBmupkxBU53VCE5e4Jdu6a1N/jU1l1rz5B4AuZARroHljjTAMIHFadYVUBjqegcRrgofTqgIKykRANWm7VhSMLHsnbdtYLhX+yd4fYTuTUr3ZK8TFkk6wIn7BA84rk3y4CZBY38HByV/9CefZZqa1Lfl8YJ/XyCfkewgYfsgze+EV67KWnwCyZouIcpJvqubXp6Dx4JM7UHUTRkQsZPvlpZHKKVgpsUaIrDDQU11B6PcKoPHFdt7I03bXa7mAqW41X3yDo3lSmmJL/vwBFhASlaZ0jsXfm6MfThLpmtsXarWZdaWwJP3MEp9za1p9FUGY8NLHuHwdEZkWHpAMndYxfT4lC6Wk739fkD6OMCDguCJSBoA4IClZL1lcDRBKiPmgie8rc3xdFw+kwjeHIM+OwY8Pkx4M9dwLDLEephqUG/cXOaBJxi241gdIG+4kXW43VXMcosk0FYzgZhOR+E5fMgLF8GYfnan+USwwljIWfLACtK/kQvqslwVGfDUZ0PQTVlefBuPZhz8PpuYJkMwnI2CMv5kSxwXGOqMvSUXAmcQrK3XWhuFO41mYyfKrRZTYG1ki5oNfaSB2hC6bslXXbkMUtOTIXkCwSfOD/vaNHt0ykmoqEaniUbpOlZskEanyYLB3zLcLiXhOpJgh1RuSzNZBias2Fozoeh+TwMzZdhaL52pzEGUM0iQB1kRM61k/HD1QkeK5NuTjntucUb3rj/tprpZ8605QWTue7CtACZEpkVMuFND5kWP3MmIwfedJDpkq3XNBgIMnvlDFVLdMVZ0HaSDRPKa4knt0sAoRsm4wvsLhYye9Oj0RIfhHRISpdp4+kRO8y0lcR7L3nwnGCMOLdFAsNyFfA3490RiFWHF8OdweQFbLdrOSJxvmjOlJkv6jLjZBjmZqunZ7Og8kSzaixkPM4YUa53yfEfsR6TCvKKsRd7//4P";
Sidebar.prototype.searchIndexData="7Z1rU+M40Kh/zVbN+wEq98vHkHDbJUxeHGDrfFEpjkh0cKwc2R6G/fVHchKGKMwuRo7Usr21xQyBzUaPW62+qfuP9tkf3bM/Go0ofg2I+POP5kB+t8Rr8kdztPq54Hi9PMWcs5fodCD/QCP2Ev7RPFvGq0D8Sl389QfhMfVxcINnJJiwiMaUiV8ZzVgcs9W7XxgEdCF/ELO1eDWKOXsmj3QeL8VrjbdXhixgXLzyR6NZS/8RP5EfrTEUX182H7Jb23y73Hzb726+pfO3NWw+89t/F9DZBz/qjuRPsxK4IU+xdQK7JS/3gZghcEcXy5IjuF9bX7+lTXBGwjjdAyglYR2DIgZGMaQboeIgdgNMCL2mGQhDHAQsicXhmMwCAoRF245+2LH43wTPgZCwtDV2JMDsjo4iET1DHJbkB2chEAj9zh6EjiGzYUi5nwSYQ6GwvyU6fTMU/kxW6xO6FQVUt49hXxj6VjA0yoohtSJxOIejIVUQHYMgvCXma3Q+X5A5uiJQD09T+vKWxf5SkPDEOnDwtlns49iXkKYhHJU1tfG1dmIBBMW+MJgKQbzXFEBA2FES4JRD14py8AISzgkHHJUxJhBbEtMXhh7xawVDwhAfmqAppgEcdWHHB/NiTtdwINiJX3vil2gkKIA+Sk2JxJRTqIZVx1B4Zk9XoivG6T8sjHFgn4clkdjj8bBdlnUaavDOkGt6j6YJB2pfmQpgbhnI1DdMEJ2GURCA7Mzdyg07o1sQkPJ/dknAieAZ3hk+jXx2OktoMKfhIjo94zj0l+j70xP1yT6NNaNhTPj5DxLG0fa1OY6EDSa+kWt5okHwfo3NTk8s54PVP6X/fEjqi8jx9jufyI8oXmBJHNBQ/E/DkPjx9gOqsNv1fRO2fQA7xfMh6/QnZztuWszPw3lZgLf2gLcPjQAjwC9JSDj10e7dio69v2971Zu2uDOxqnAlSy7Kgr5eU9zkQ5vPCPrx6L7oqDv7/lbv0N8yQtpb4SAQ8h2JDxxFRYe+82F2Gr1lB/qUBMRnq1UiPjq6YklU+KO0Xts/S3uWFMsheTQZVvDNwL8PqViWWOtr4Yk3m/uK5rA08ojEhYCvpYBHabnHWhiP6yXhOIhOr8/GaIxp+MTxqvA6RynJ/CDk/x/PYLjj+EejJkiKr5NfLPN/LjSkaOC1Uke70A+mtb85PogagHowU/aSrq3Yz2Q/oNU9DGiBeSY3eL1ZaaEfiOIFd+pwH8gY+4I+i5aFfyb9/WeS2X0w+Eyoz9l6ycLCH/O9/0zVgXkoxXc1uj1nbK7JEA3m4igRjuAQ83nRn0xH8QFBbxN0x+SP/BI8F5d2DKfblRX6ifT382xNwKe852OxksI/EeWIz575NPhE1gQ/F/+JtPdd+D7kPZKE6JHx5yjGGyLFfjK99r6PAtiR9xLx3e7HhX8uyo45vPUH5rlM8SwgcdEfiHLMtwEbXlPCVzRUy2KL90g6yiMBfKrcF9+XVzYIZI/xgc4JE278Snxb9MfS2S/R+aAsG8xjeSQzdCaLPIt/vCsFwZBDw2UyhuFlGkNBJAh2z2XF5klAotN67fIcXQzZedGfiBqG/IL2eiP49kzGG4o5Po9mvdtC30YkehaL/R80DJIoDRS//XrRn1N3/5RpfmHnGHlOf8vndBEwxqun9FZTCu0pyf+LLKP2XmjsL9Hmf1D0Z9PraFsEJp7NBeXkRdYAe4T/oD7ZPh2xqV688f8U/SEpcczeFyLLJh7S/rMp/EOpO6HVvFdx2qxKdNqo4RmgttsD5XGCg91p8+t/ir49eEN5mbHwaq2ldFbLXH6c75OaizPGjxn/ZQmchwuxCPRtiP0lQaPtzwv/XNSivsw2wY6U3lPYvcvJMMBRhC7ojBM0XMpccvD2MIr+LNRTJnNCJq9nITjQWRKTeWnQK5FlW9vghon1zEvCXKkzameuJ86HuQw+LjhL1qURdjUGmTkhrwN+mcw2xtECx8LNe5WRxtoZjsgUXSWzoqNXjttWZu9OMPpl/1xuEebyGIby9TI8A+Wec3an4XjPYNdYYfumJXsS3cyn7vGeRLUPbNIfD7yy7IG2YgVlNvqP9xQ2nRhKsBMAn8rbG+o4KM1+0G1xdLxn8TC5LctTUPzhlrWzYSW+ntbbjeLfQe/rHsdj8eWrhDvdWk3m2ygpfMcdpd4je6hHh3O3XathHqFv3Xa9WfjgsnqTzKhID3yfRBGaSKqFB71/xSL7BTEt0MPC14hpZ0n0+HpF56vIb/bmRFp8R+PC89UNtWvx9Qao3S6+AddWenFkDqtrQY6ojyacyTOv+BkMJWjywZzXo8rzHarXSmMv9xTWmR1yLdbTQdH51mu61/70AI9Rs1d85azcUcp+YV8L8kPhLTi7FvLfk6LzVV1po3zPzrzCm8iqGt61HzREmBP8LIeFn7GfRSetNNs0q4rPOJ0vCl+v3tVNomghnnrCPi5BxF5t52tUkIcyNzvGIV6Ursy/aTSOPMTF57sfuWgajVwIvsKN5mmDPRou0OYSS9GRW02NDEeja3QhvhSdsl3felj8wHJ/35bLXr2kxVf+NQ3FFR2zcim0ZdSe22AeFj4Qp10Wrw/5PqTxKzr/ueYlGH2ktgqwwDttPFN0ztr9F7U4y1nSfowG/v9LKC++q6IOrTYap9vBHu4+cqFRd3Qv5euilteGpxyH0RPjq7R71a9bxNPzwld3KaPrDIu6dzIe3BU+raIWxpj1X7zxSeEJq+2/zAbxvHs08go/WbRe2+9FmP2ChRbk+7PCFyiqAxXNVtCNSFyKi9OKx5K9G7AWZBafzFnhS5mb+4yNxkVHk2nR8SpGW/aLPVp8vZtB4UOiSqcjs7W2I9lmaszmxc9wt22q4sfRGF3QoAROttKTKPswKB3OMkWF7mi4KDrlerNjUS1fcJY2QJuXp4BcGS5rVkmnXT6Enh6s1wHFoV94Za342Gavtu56qpRGtq1ejrjC4XxJgsIPSVTqyc2WzFxN0tnsRWes1NeZtfGuULPRLDzhusVj8HpYeF9QCWZkn2Gvx7fwwftuzSZf+UlDEiMv5kQOeio67Xptv07U7CWU6+8e8m7Oig5Z7bxjNFVyXfh7VIor0jV6y+d6Mi38jL6DklujZRmC8APa1WaU5HaE1eYO1xOBe7VKQrGaEmQA1UCd4SNwgkbeTdEZd21eJb6eFv4IVPWF0fjQn2ffR0UH3FAawRi1Mf4ihW9O2doX4LrRSyeCb+ErxpXrw9knw+sAvhncopgh8UfRMasFzEYNtxu6WMYvRH5Fg8KfeXa9khsWLjjBcvTXpPCliOpMNqPKYzwofDFtbz913TAqyeNh4fm2bd7gGZ/X68W/zqrdXVwLMZnTMoQqFCOuZ9QLGRMimzmsA1z86paWzXjFmETLyn47OmSxelQvQQ9b7ZlAWphpSNHD4O+iQ27rjpvRgsxmNCAlylkrCT+jBcxjr/DunnKhxGyR1vi+8MpCyYaYjdaP/y68/Kpd240G4W4Hw/JUgfcUx9qoCXdbDSk5Ll9hIuOwDNUWysUzs/qCxBELS9CQUrkOZdRCFpBfGH/elg+tSPHHRylnoFkb7pb8TKJSdPGzrKAl5oacW3KBZ/JC1PnPmITz4mtsu01AN9zbJRBvCJy7JeCsXNrpGE2wfvdjEhSdsJI6MesTfr/16mUYl6Z2wDaan/q+TteBBivhfD/R4h+Cyn1Vs27LjnbaLHHNeOENaqVRlNl7aZPBCNWLTliZSmc2rC8JNwpPeD/QYbZIYyI8b3Tty9UVm7JSy2zWmJucFT59ojTDMJvQngyRx57iF8wLH9xXSrrMTgkVnB/onLCiQ1ZLa43mAiejwk+A2Pkgu4slNaNW8mRc/MvBjX3Chg1jzmLms60fEpShCFQxL8yOqJv8fVF0vmr3cKNBjDsck1VS+HmhVodZ3pE1wSXo86kIstnpt3L0H0HeC439ZXn69Km6w6xcTzzxb9ERW22N4RH+gwpRLjpk5cKU2eqBLeS05wtnZctMmQ3KeSRGU7Yuw4zyet3meeh5hfcElXiR2aF0nneDpoSvaFgGH1Dtvmw0xOxNC9+xT6lrNtsK2Ct+vyI1hG9WfktyT0oZ5Gy2NtF7KH4eymYQY0oC4ssufeIDlyKrumu5ZSVRImnLAc6kBHd66k1FORutw5iKpRdelq1eUJtOUAlavih5P7ORuE1RHJYrLzblTt+iiTHlif9cdMIH2tjsuZdwTgpf2lnv7NfFmb3GOn0oOt9206II35/d9euFr7y3e1HnfnyJPMJp8RMjljlX6b2j8n3ASVD4085qWOihdONIzHoeD5NbmTeVn5hXiZBjw/YKr46tCvPjoGrwclS+117hx/X19gH3jQkwm5NVhHA4R+slC0l0OsSzgKSD3FdFh66UtDSzlyin9P5o1AQ/8XWSEsznKZAgQOn7Ff0hNLUnNB/tIVzg4lcbNTq6lsnR8F8xFq/LsAXUCujsyv9oz+B6Ug4tpBg4X4iXHO0RbNvmDnxZm45K+kB6oB5IGWyj/T4SjeylZUfjn77VyVMJDudaB+zBUAolBPhgvrsoh4+mzBz6QjX80R6BbLBQDvtUewJGTs9gTdg6IKeDcM7ZgoQsidCE8KgEVYX7BSzZL/tOUnJfRz7GPnpkK1x80vt2T72W2fDRRx2WA7Vq3tTbmQNwuqwnQ9lrufig9+2YeitzlEcX9F0ShjRclIF2bz9x3c9cRqTL2qOxnIBWDiWiXAHuZ44TaNOOhVFTEtFu7Bvj2ceL5wa7FLJtDzeXbTF4dCrMn9K1A85e93m3oaXBeTAdo827VLCNwJ7ixa7rSzm4a7eL0ud+xhme+ziKS4JcbTOeObOtj1z2JhGfGe16lZQSvA0dc0kXeEbjnY7ZqZxS8rch+NeDUTlh2xD26wlKbx4vWfhaTurZm2fnQN0bXpeEtnqdJXszUX3c+2UY5eDeV6azWVDkt8PzksAGoMhvSfwUsJeyAFcG02QOHeoD342n2TVsLAt5ZcpV5usE+uRLAtq+Ttm8A7oO0VlCAxm8LTp0pcHgW2sEC9QfabxEHg2oz8KtL1p0+kpHlex9SvXhV9EW08DXuDS468qFmezzx3LgHTMux2SVg7hSfJX9rr8+8Omoyg8Zg/3AKuVtEPcj/kECEi7isqTiAPidj5QL5qWJY6kJicw1nV8nHhE/4TR+PR3KXhcUXQjyLzgo/LiAltK+JXO+2duC02Iuv0Vv71Rw5KqUZ9YreSAvi3w3lJaSmVVKHrAvcUyeCVkXX4MrI4GzX1PPBXeC+bzwpBWLMHNsNg/S19+98pyUSm+dzLer8gB+w4rfo1bp75m9nXUeoG9J/ML4c2mMkpaiuDOHY/OAPrn+uzTqRPUurUj5Nv1QGuZKNZBZZ4f/SEs9U1/nPqRPlMzRZDsFIs0sF988VGacfMUaTynq8JdTTkKxILnOqJzcs98M1+c+EjrGjxl/LQlyJb/5FU9IF/kFDUhUCtg5RLHygF0S0VZof8VW1KV9xaLCd9ZWr4N/xUTU5Xw9mT6URKpzMMh1aY+pz9kLmZVDaUMA/v2qJNIN4ITcvMOm1q0c+Uxl2FL2+tkcoMtGlJz9LIvZrcSxvpJc00bOnuIXzAk6w5Fw8cvBXenHlD11nwN32XQC8zkqg3EIQZ9vqwvLIeBKCKWXuQJLH/h9SOOy6PG2km2zED7Z1BfKeGE57HEAQcLHx8eSyHdnvx+W0Uj4Rm9vMxFp3Oo8XNDi90fVno6zPfF0mAcsKXxpSr2nNIysZVcl2qRHNHomcVx4oW7rTpDUR30xRLs3KThsJWTVym4E6sOmM+FaDpdYfM4ASSlHXjKLXqO4+E3G9Z2eHPCL43KIZ+KzFt7HVFSLDdx3JEgT9ViIOo7xDEeF1zGKZZj9qo8+9an4IRpwjotf9mZfozySGRoGSVSCeLhdwzC9Vk82fSUvZHvDXfO383gpPKlS3Lrv6Hb08LYUdR9AOZoc6IdUcsA9DHAUoRZqlwS6cg88e6vxXKArHT23DSbr9eL3ae5D0DFv/Msh8rpztfNAvu+ZXuAZp35J+B80PrQi85ckJClz9hSXw5xRskTZ+03mgf1afOIgoJvvkRfj4l/RUrMX2bNzeXD3Rrcl0S9t5bKnFd43+JVw1EB3ZMViUhLyqmb/Qnw9N/TNkjAH4aSOL/9GvVqthsZJENNoz4wv+gPQbgyfywOQ3E92ZuSmdrQc+JVZWXasmhR/kOqdUil81ZWyJ/tbg3JEpOYpOnb1nLWj9Cdnf5dEzFWLMnuWKQ/cnInXVys8C8qiXkBEhMt8mloiTle/ztOScFc0jJWD9FcoDE0uH9H4clh47B0A5+gD5XGCA3RTInkHEYPf1KxXCVYL0MsBHEY87JHx5wVnybqifnzqL9smxKcDmVINcdFhK50V39owfB72rm2zDuxLId7hHE0JX9EQF741lzLCrL77sVnod3hOGZqyl+LX4jW7ipRnbr+QB3APp7nT4l/TUMeBtDIHdXPFLS8OFP7UVHRK9qKMPJA/0pMLKocKF5229rC4fGhv36PgsBXtnf36aJ6w0Rmn8xJc/tpvLZK9L3GuzG/YpoUlGqzXAcVh8VNEfd2O57nyn3IcRmvGC38LTG3TZQf7zeAWyZpezoKg+Mb5gb+fOa71Jegc+8+neO2fDiZD5K0wj9H9xEP1Wq120pS1MA8D1Ljfhx8oPDhdLON3Cw/Ik/w2WmOfhoub9LtRva0+IvFR5uzl4+f19lQOMHX2MTUPwyJySR9Skj8Qy8yDT3uLpg0YzQfGrwk03XZKpg6YTP3QE8ufzEadDeVXVO/X2rKgieIAydph8Wvxtk/Yb2dLuwxsuNNUOsgadSdZZdVIubBq1VPxEngqZJ9C1ujX3BQvC1ux0a+7yeqDiNvxWTmqtqywalesPsmq2W+0K1afZdWqWH2SVbdTa4Ln0jFvHwguLfBcPrgmYIBLBzyXj/L3BsD0wYNp1g8j2McHU4evYRofpFOODabXbNU2ofxNWP/ku3DgQnlgbScRilX/LtQPiZ2FU2vgDVC73Wuf/I0Gc7yO6Q/yNrbRBWQWHN6BdyejunXwW9GCg7tl0wDPxp7cNMRWq+j8jg58U9GCCb1lA99c7B32VjDDxgHDqN4/vCZoAk5fHFVwqVjSNAJKBy6UesvOPurX6jW4VBotS7LSl78OlUqnfVjsfWwqAsD8rStfs9aEJDRK2ap5OEPMhffJ0UT8gMS/Sp1QQ+1eCEmMLOjh34JqA+Zkwaf6LacOZIGyYAoOcYyD1yhGLXG8f3yJExIhK1vujVCjJ8zm/S7OIfm45SckaFb23xu0VgXtS9AqQL8H1GnXmifn8BC1lPmrFrWVQNRyAJGFJOJ7RB0HENU/aIdnklEfPKFGw3yY6B2hutBFgOH0zScX3+AoXm+jhp4YR1cTQLjUe+Dmc9S/o9VspLRGJAjg8vpgJJktXq0afF5Wgisf4qrXHMAFSLzqlfLKQqtZSdeHvK7nJIx3Y7XTutCPZuGW3NG7nnio1RYKyiNhJD8wVDYW4lHb8iw08H15LXh7RxUuIgvic0t+JpHMcNfQrjHg225zoD7LGrGG8B2mu0E65z9jEs5BVwdY49RotKYTdHlesfoEq2ZjMhGbsaL1SVrTcUXrs7Ravcn/VrQ+T6vSWp9j1azVO/DCnnDoVPmpf6PTaVV0fkunXcnO7+m0BZ1Jhef3ePqdKVwuVqIBOy738OXGGp+OvHoEnY61XdWRV0ig07FQS7Gh05XNtuq1Ey9gu6olOXM4imgEl5aNq7bvcfUcw9W1iqvlFi0bF9zf0eq7RatRM1++8/3WQ/V2s9beHyY6TKKYrQjf5Q4mAY6fGF/BhWfhTNyyExp/eIO877fn032IFbR/hTYeIG90BR1Zb39olYXC+w2xVru1kbGTQ2ic/aCRQCMbMcAjeCh05svMNgw7H89MhomtoTTabdTNFwRNlq+RbBz8q2lF6x55MeNY7akOScAsOACHoD5Ua4XqNmsQW5E6OxvE1gKMzcImvR96qC2LGcF7AhasDAmn02j17ie7pJ/sTMj9XTN4qKgsaK0NqjSO6hQqC5pKoho2GmjcRJvJznDpWBIkQadW4fkXPC0X6FjbWi0nhMcank6F51/wtNxQPdbwSOlpgMdjwZJ+HJyftOsNuEwsnFaSSadicsik24LLxIJqkUy6zVbVNe4QSreCsg/l4Rw1+oC3jxWVIqC0KyiHUDoVlEMo3XalaT+iUqnaQyq9SlYUKmT2Qbt65NW7NbicbGia33BqQuYESJ46FafT5fr0aoKEA9m+/NX67n2nBECENHtJXE2+iifl4b1GMVkhPx37ex76AYsSDrgcIWsyLyc8XUfw1FtWxCfqtN3gkzW893U81+ETDekZDufoYnQHXe00zMnNhLMbcVQJfXzTadT8bUR4I05g+RhUy+/5dCo+/8qn14bKp9m1zmd0U+/U0GUPDhRd7yIXKM1GjVRUDqh0KiofUllXVA6o9IDLSlYvMy8qsGXFEpV2ReWAShv4wWwBinfTaNYiUFR61nWtgNKGDcWcpOxaCg43lcHoIiA/T+o18e8IDh0bbhGdrU6vz8aoXq/Vag8DdD/xAAHRnF4uFqZBpF2rnTQa8Klk3UV6VLrtFrph/mYvRSwgaIxDvIBclpdV9+oBuhfKBcdogkPyi9FfNK74pHyaDuiZrPPJtYB0HACSNfKtBWT+U3jOcFkYVbdCKuTBDBhH1pyaLo62TKZdPcAFYlR5CCDddiUeWxo/m8LjQeMCFd9p4mg3KxzvcVTS8R5HR0pHEy4OoyftFgdg6TCNA/hmMY2jD/iUNcyiC3lytXEW7UqJ/sLRE1rj7zZcHEY92Z/NfoXj+ZSJrwE5vSUxx9tC2r+bJ40zePd5NQPw39OFagIaTprysvxgOhzsqo6hYVKs1nrG1qK5YepWmP4T07Rfg01J9YGyTk7OD1OtgvMhnG2RpNTZcNFktXPyIbPG3EfT1kkdvOhY5rM77NGYzZMAUK0tiDP/jVPxepzkwufvljzroaOxssX+7vxCU22ufUKbbXUuWwKuOY0IGrdcOOWz5kxyp9R2gVK9ZQNTddb/G5nqlP8PQvDP96zp67zItMCTyVp9qEsmCbcue8eZ+8OGNbJCaHdXfzdt/fznmsuRKRtlhBqtNarX0OXsHBBCy3ppn+C2Spr+Q+aolZL6DcsK4AHAKqL973hSN+Wth2clR4egRjjGQyLN8O39/5m8/78dmdXsAGKlWbaSA6udWqrXpJLaMuo21hWkDyD97+jufUeJSxyTF/wKr6uEfWK7SHfjBHDhi2kLfY8LoMtkAOxzJzIjFveR4HIDF4zpMIkEs5nYhRrycpmwhgac49eK0DtC/+fCe6PUrTcKVGiWN5wmZDiG00QCzgXlBE3roC/LmFfFKZW/G3VYVBogqLSAUYEhKy3Q94ks6ZW/W52SU1nT+Sle0BiL4yc6HWz/Jv5jcSBRztWg15pRGck4/0HCONq+tiPjp0EO8YKwEWM5PfFGQTljccxW735hsP0vY7ZW+aloejUlkHOIZr35+wEZ8fpuXVEObNC3QegvGf+fiswBmSFnUXRyRvCqonNIZ0QjHyqX5uGxZIyLbKxATjYB5QmezwMClVLLovRcpt0nINOxubeuSCA/PVQ0HziVxtBcr9YkCAjYA8smmwlnsOD0FR+q2bAHZ5rwGQ3BqhtjR9Z6jTmOkwiRgKzkqk/HOFwyNc9pDYz0d/fI1LLtqN36/mjUzrcrzAOSx/xnEktXYtueTawU3bJ//gEDrrnPLePpfixsyXrNeIzOpEdHYiCo6qqIQUJ1QxZAMDXaIHfiltMdDaGAUnVWI5syPzIo75lyODvPvnaXC+T0KVmQ6HT49nep2kfEx2ltyzfP5+QlDRyxgM6RtxR2FRTToX6gvjIx/LXkvNAJh4UulshbEzIHA0kVtGxK/hiQJoQ/MSG9BJo8AUSViM8Lxo0BuOHe9BNYoQLIjKSHh3AGIcUuAe4+YTCsVtX2+zdCAK0Ci3LEVmnhPeMROkE0YqdnAXshaeLtAodQAWUUo1+LFMbntfc9B0y/3lOiesB+kqzQJFmtK2T/jQx9e5NZOKFy4MRGVPwexwswGU3gvM7/L/FjONlx4LQmNIpZWMH6FCwZvqpQfQ4Vk0ktcT7CSd+AJxZj/lrB+hSs1JeuWH2KlcyisorVjhVP41QRWnAazoVCPx1uXgEK6IMSzH/js12dgHO5XV9+hIT1zuCqc1CgrjCoaAxkVNerNfbjCtUnUP2JwZ55oDhtjM8K1X+gSt9qiHZvi8bYF69BqY2BiG1MgyDN4CSBWBH9p7IaMsGqzsWvUauOyM9Qq/T+Zzk90BnHcoUVqh2qOafiHU5H8g+gUDJe/kiXkj0x+B6EvBmT0Hnat+sMcJ2QBTDb+KZwiH+QV8YFngCsgjbM51Xakt/FquUxtv12uMSr2Sa7LDPwT/L1aqNJXlcEx+k432QFF0i2IJ0ekE0cXAhIskIbdSyEZpqsZoEUpEpBbzF5a45fKxw7HGmQ+5e8yGqxX9+N2Q8pOzvNU3ZkT4TMJbOL9M9d5glN8QzO1c56raWjgjZL+zoaeS2PcbkOHKDNm4EBo6WbjwAGfRsTsV5AufGmwqhtH9F2jz1g4dVDwWRZlDYnGKj7eCoRQ4JD41jsnuj0TJg48/TsAsKjpXU8XWzXpQGEE/wcLzlLFksgSJo9rT2jjWQY4NVa+OMXAQ4XRHgOyTqAc6uuradR9OkwASeM0hZCMIgoW6hnHEglH+9wiF2zIrI7JongiAgsKOjbiMTCdpELOxG2DHsqir2SO6jzn+tALK3i9B+cZKu7kzsS0SjGIdwwKSxMaRij2om/RSesn/m7xh5AyDS0HIjcuIyS1epV0PkBJm7Ra9sFkwhBCaCwsOxWXbEIjMetsMjWi0sfxXW4uS4EBIdCw7RgXMul+UupQ2QweBNG//YrLAHl/LEdl/iY03fhem7+eh0ioXB8SCUWtpG9wal4bHhw+kR9giay92jFJGVyR+aJD8Zi6do15e6SdZxwAmnP2A5UeCR4OhGKRBavhQt0RwKCI7JJqgBBdJi3bBlmRAMSwtlEdVWnGJcZ8VWc0BvHCAgUu66QF3NMQzASYjlAvqMB63KbZSgPYm1ASNj2lR8oeZGHzWWAowgIE800db5M0LcbOaEEUPmHrejkUpZykp8bv5DL3Fs4J2EERtP2dJSKrFOVHTzflqeNZ8QS6TtP6JqgtAr27b2B8Orr7LL8eZ0HxI859VNYYCBpGnj5Y7qgP2VjRXmsC7WEpsmMRDDlS9VT2Y62/MldYcrXNATHqf+f8xHNYoK0/YDp9P19Jm1qGmy2IFTjAII0vSd2QcNQ6K+K2ReZ/bFpYAkVnfXj8YBdwDbRNPEDsDf8oAlcGrSvYH0OlremvDDdPg3g2rNcoWKzLWTpDkQ4nKMLLquonDDwMw6oy5/aHZkJgwwMH9Wwb9qlk/YGT2VKbj1FpFAdCLTOvkxla5VgGlqjgpYdWrOC9iG0TSZvImPOINV9H9YRubG7YKJST8Z+pulb+bOaLml4ckGDFTr/gdeMA7pApDfkNn9U9ycf6CwgrIBFCu+RJ39r7lIQ2jSzFf0pUV2HJzc0JGh7T3osX4VCqK/lMaZL0ebixVh8blhc9DxpPS5/hQQDasrQtYhC/NcyfjfBMZQ70o2ODRzrZLWOTof4B41fQU3kaTT3NWwmW0cu5MssyNuwnRQIGB9W2S6drjUiYBzUxh6Rrj0iULxPazIi23iA0h9aZQI6JC5xhLZj4WCg6DYsyYQk8W7yGwwaB2WAxg6WS4I5pC3S7u5HE+qmQFwxTv9hYbxVnkBw1NvKFPi6MSBFuk+pw2FCuLzGH4gPDASFGs3tm0KRzmqCtD1Uy6JjngQYu1N1TsztEC+ZrYSbR9MaYDjCUa/tA+lmur+lB0TIBWAS9Z6xjSK7ucKZRNLfb/mWLQ+mgwHedOF+f19bGDtEHrafFRKMutLspd4ytUHQCZrT8L3vDgWJXkx4i6Q2ur7VAvM2M7nC8h7Lue+nEuOjR8YrNvts0ts1bIUXIYFjtAOBI/39ish7Ilevc46ToBKUfSw39P8ldI7+JFCuDwPhckd8uubMT0vtKzR7aDYZ/80g+grNezRpvKBCskMiB1sLzbIJoHzbqBqo9fFfxPOVidbv8WzQvPMLKj4f8HlzDyo6H9CRxl4F5gMwlcb5LZrNmn6k3crWAfbJihSm0XPOpDhbyCyyhLWpVaowfYBpz2DeGocVqA9ApTZiReY0Imuclu1Hp5d8UwPo7V76Q46dJHEcvB9FCYOYXnX/2wqzx5Hf8dqMl36Hq0KzQ7MvQvQJbOMPu3SEy/HqB4D65wGjowSXK0r/RinaXHWYcGkC0Fj+rAKWEZhUV48EjAUOjNuE8BUOxYLRON2RFaYPMckuoAmnSJiYyUyYTBWmDzGJfVYh+ggRC+icPtG0D1jAIgImdAKNjpyNULF5xyadDLvbU6UHI16TjusK+0sakuj0/GfMk3SqMLC4SF2nYYS3WaZw/8fbheZJClaYBByoCQkC4Zn8I18ENHBCjScBACVjt+A2HlRMd0yIFRijCB6m7Xui7Tuib7/uE1XQPg1tVxtcIdsi+yE2Hwmi0zMMpdZImRyUrd3Pw2Y5OhjQt2vvOxT5sAyDcxLI+NCIJ1BqgJXb7xnTRvkiASUqeo00tMEk4fN2Mk569+IsXQkUNprJRl04AorwKWKCpjh8hoJEkZeuUdUylIZLOllKbKWUivhzKCxlwqEWdnZNi8xvAaFvZ4yBiUSrnLLNFTg2p0oLfRLVDVmA7SBdr9lRTuhbGnpNBwVsKvrSv17iCFC3bcVEzDZ6SBfVdjBTdcAdgJHmIeMI2mAvrbaXulAuGPfJ/GTE8VMsyLC0yGoKqGmQcme5n+nOsjadhIfYh3KTXclhWEHRgMnC8LmdttYSnz6AIhrN/ZZBZoMSksYVC+A09OzaDNFc4eBpMxZx29pz84ZA0BzYcd1MYxt04VyHckY86PNmv12IWRfzT+w/C5tt7ojoZGquo8vmr5D5zycsiSGFPtt1i5oGUjtppZlKr2cYhNwtdwQDal6n5gkydZfRJSJrktBZEjwjTxDBCyh2it7sa10qaV474fQfoWFBq9aGWXN2wtkaDRbb4mMYSKwqFFiapGXTnH27eQUpjmQ1vr2pbxxxCubwtcxjc8Igb70kHMpBYzc+sAvlgz5kzLo2gNSHVX0qOcDOFmbrv50Pj7dsxRmOwFxDVDtEWgJTFW/8O5o7xp6ggulb5pJOqYQmO/sxk7pZH3DHSHxyOFeaDo5mC0fSFok0WyCfTj0LaEZUfkDYisYuFik1jhxVDQukLnAQEWBgFCu4Xm9Y4BKwTYsgyFvLvJ+kgAGvks0CApQsrLf2lXCmiVa5gECPNF6iCfafAbWmtUplM3wCWji72dlnYjTrLltBoG9nBFJTPyXfYR5Hau9WPFIe8k9pzz09CRdAwBlRvCJitWBKatVkqlGV8otPau9uzDh5KHsJf8I+QdfhnMpeh3DuFCvGXc8mr/NwU6N9xtPqFjAy1bHpQf2G0aYnVOpGyeHs4kyHQsvqtcff0NoiOtnVkW3Kp8AQa8AjBulKieqANow6oL8BdAdpywEUIO+ZcjgqHKQITZeyQV0grIIoCUBZBTAEiq3AZPj6+2Xz2UYw5wXkIgmCk2kyIwfn2ZBROG0xGjajYjtWEwrmeAchOx5ZUQdkp25adiLx2aJTHFKhiKPTMznwvP7fMJ5oEAxZIING4n/UrKX/iNejmLNnsvtJyNLZpl8EdQD8QK6UeaWHR1q6uA9ppT8ZbFaty6vhCC81n/zBQOijAxsR4o6A9RQr4LCy1gwvVwRsF2z6fezp+LzYAn0PhfcmtKyj1A5rp45PLfE/UXIIgtZbO4XdCXmYHzg6rgvhxqArHPvCf3l1hJsiZR8Uhxwd218kDD9T4wuRV//wBt/ReY0Ziz5RJQ4Dl2KLWRCvW4aE9o/cBGbDtvDIZ+apg6B1UMRlwdb3AhY7Y1Ps9wLpWbApvBA/O6q9rGzGGM8+0ySj4rXhNSXz+Ss6+9TAdhDMOv/ZnudozJ4Ym8vun46Q0pauC7Her2Ia4jB6uwsQEFfMiW7LJjP29EQc1V2dzEejDqkRp6GsP0SPOHYpEGZTuhRmDUeYdTsWmV3gKEbpG7gBS9mUH1RhHROW+IKm3J0YmELrg2thR6T1V0ifnNH1+0GculFdf0eiGCcch7Ezel5tjmdUZ73j5YqOV8pE6rXMUcIvAlsSHMRLH3NyOgjEZwtxOpV+TObUp6Ez21NxiTIHDa/eMGgyDIXsLUlEsSvklPPSHrkoolEqezeyGXco7TTvVfztE33nQJDs6ZppeZE845iGjkADI35DzOdUrHnhTBpOiW1kNnRzJEeQF+OnJzTgxBm91wWyW4c4XiKxOle47YvdR11ITIGTv+BK2qmrWwCUF7URwU+uMOuDYcZXOHbqcFDQZa7Pyw0dFSuLnQl+q/EQa+bI+aujrpdVZOjRoWK9pmYWLy9uF3hFg1c04dgX63BG7HRTe7nhozyK0YA6GiC3B+6ShEQswNGjwd5+3bwPOp8nm/vvjvKzJnfifbg7gfR6TTknMgeG8+XWcISbKm6Zi7tzw8aiNY1x4IzEwdmoO3KuyFxPN+mVF7nr1SoJ6T/p8eDM+QrF278On4iwhFkSoRGNCHa1ct4mwbUQPfExXQEHJXNzLT5gGMkcmAyqu0IPjtil+evAteR1tw4E4F90HhJXQpxgqN0koTt3hRRo1pzYMV6tmPiZK8l9MEou1W1ppxvxQddyfgN3BaFyk8haoHiH8IbOOHbn2i00CbwjPuNzZzQfHHxhvGk1GDhzCVC7aj83eHfXjiADE3+6JQl3KXUNRtZuk5hTlwLsutcC8wL3PfRdEjgwJ8P3JEYTpwIn7Q4QkZssMV9h3xWRazeBiNxk+RqlxpxsoInXrvBTXQlrcndHFlSs3Kk8LJRgpydeQDc4XCSfmpUNAp7a+K5nLRvrMZ+KfesR/oP67tTXQUnyeAlfuNNy66BpjTVu09HIEWZg/Igpc6fbz8EI58z3XPOidh+IYzViSehMXZ2yRa3ZJI9LQgJ/iSlHA18cDRGdBcSZ6pPdhX2gGBuOYrSm/T7G2HQEo9p6w6w0hjhOZGE75s4cINrBlNt0zV+H9Weypu7kxHq6lwB0cY3xWmzHG3cuhfVsC9gYc2e8LeusCPcTZ7ysXdt/e5uRORNF0j4YdVndknWcOFPipW2O6eKaBEnMHIHV0Y2O68Ly5B+u7ER1pKLxneiF7OUpcKdFr/W96CWhM+64dlI5D1iuON0gYLniWls3TiWsVgXrc7CmURLiFXUFl5IfNo7rnuMwccVN7LQsq60H4hAs3Tt+X4a1JmwdkNMzPHt1xnxQ3MR6rZEV1yRdtSYuVwyIrm7yQ5fWcInDRdp5MXaqpkU316vNjYViwYnvEDM1kGpc1i7ICjszp0S7B7surbE7rNSWFW/fm6Tljovd1I1H5AHLlROyqRt31oaVrFauJDTUJuzGYU3InIgVU+zMoagbTNUl5i3Zi0PjXNR6WPPKawvMFf2lBnKM+0OeWG0QOFMgoVa+Zr81rAvsPqQR+ekILjUCbdzwesRiKcJ/vGNs5YwWU9zuL/S0zhWbK7qsp1vMr08tkOO8HMHVtm2NPbKVQ25RS7vRfD68XNmNLWviFeEnEr+enlG2xP9g7krBfr2m+JKZJ2h46cK/TmyIE4cChtrZbW1cS7JKL6s+Erx2FlvmU1IX2wUOgo1t4T+7kmXTbracBzSWxMhbksCdcnLrW/SC4wV1JlDd1a2+18V1hcN5QNAjjZdOdXzU7SKnzY0uluiBBTFeuHOzrWX7INij5oxZqxuRzZWaM8V1ugVQutT+ImSNRs5c/dC+h6XL69aV4nzrJsYtC0+uWUj/SW1aPKdOFaoo4y4zx2f16aHzMHZmXwKQNuStmENRRuvu5q+cLxpyFkUOodMtstZF55o2eyvn/PJsGl1iXkDX6MqlqGNXO6ytzSxmnKA7YdbG6H7tjPvUte0IKNxccaAsajWfktAnp2JFjGNBzxmrQxvZZuUazMZ4ERJX2oB2dS+Q5MCL+sLY8NnalRia9qUbfWa3iR8Q7E6xmX5QIzdkrip/C1L2SMP5SrBwhJg6qN0ksTXjcXQ6WK2XNCbYobSTbumBl65cAxn3l+5081RFLLse08R1hiMyw85syba2EtPlRUPmJ0GJGj9pE2PCI3/BwbMrwHSvd+UALEY3OAl9Rzv9tTNXsusiG+LV2qGrEor12jWuxba8HDVd21Z4PVF3ijJsWxWS14K71LFZ8SezR6+1iYXMnfoVNXeZvVw2F1yu6C/1FnTLvAJLuy7f0CdX4ojaLfu1iQV0NXMoYamdHdflJRO8aCh0fsxfkfdMZU2Go/rsC8nLY9BzRb2psmfe/H/1A4e2qnJ4Ghe2EeUxOqPOdOlU5csCsB8OiZd2NkmXFnsJl4KEc4eAImbGjVoVnKP637xCO/9JuE+jSp99ktcF5eSFMVec84POItnrpLSBRUuXVNnBkLjsxcU5EXNGhym1eHXj2n9HbELdSfbadtIlMzQMCA4dss/2Ja1jfGtessCVCT/q+Afjtqxk5Y5oabcV0ccVzlmAHcGlPTpaF9cVFvr+MqBzd0RMYdbpGGdGn505H7Wn1+QAyyHRUoKwxg/GK8ZlMZT/jKYcU1dKoqxH/q99grbGa4Xs88i8Zxw7hGzftPjKXSVdZsK0YBx5L3S1coibbRvjTxLLeKKjuIybF3/hV+xMpaJtNXZDnwj6UxyYzlxPOgiMGWc2ZjHjM1ni6UowUREz88Urv5A13ETWNK7GJtQPqe9ayzLbVRhbalMs59I7uj07xp3MPWqO7lDzFYx3OFwQvhuu5I602S4tVrg5I2+6s+K0uTH/GTlW1Kg9aSkfaHJIgkvjvOzv0XSsxCzALgW2bZdN3bEXaeO6gks5P+vGcSWhQ0lftWON+S354Agp1Zw1XkzsYRqgM4d2onaXAm1gIY0xf0UjKl6JcODaxFDbroAnPppwoB4oeUkhOcJNe0CaPrdkhpFbxdmKrBnPcXqERPjFTVpt4wEhjwRP6DJJCzSqpHAmck5HHo0nN2UymMxkpwx3dFnHtnfuPVP0Z7JaO8JrV9Bij1dA5g7Jl3pPzngSRfAia6n5HVNmfdvKbIWDjQvlVhsb+7cmvDANAvG5s8Jm3tAQyFZs5s6kIdUFML89BTGh0hhx5yhQu0GYl7KEO3QPQG1hZh7XtkjPnbTmvq2xa8togVjDFWJKVVDmYdw5EHNnQ+p3+tekNSVhSJ3pWWnbqKhCPRlgybi1I6x2sX1rLvijUylx7flB2rTEB4vSZhgVsk8iW+KApKkkh6DZbuos+9JHbln41uWMsTm6xPGScIeoWSuMiom/PB04VPOvuyWnYsEanBz1gvqZvSAdTkO8Ihy7KlPZ20TlwMpRucoej9BiRYIATZabFbpAq6Vr1mvRYqsVdrXRtVnFLlCtE4cSabqjM7RYceZMYtumTJ3/X+K7UjGnRpkzVxpqgZK2ujuDBNX4stHNlzZIdGjeg26bLB1WY2dDpV2j1vqEvbhz8tUtnnxy9DVzBZRSoZq5RkkLlOe5gslmOGFKArKW3owznnJrP071hXRhPrxc8ZabupWo+eBqOoJLmdH81l7ZNK+WK7zqILRX2xFcVnfjvXfmCKaWbjm4DqYHOicMbYKijvBSbIiW0TPxEW+ac4+xL/50xS/s6jad+CoyjsM0T5heAz1tocclEWrMGe9HCdNkPx731q8PcED5DLuSZFWH3fWz+0T541sH2CH7X20flj1OcSyCrngE9dq+C9XOHmo9FkJXvIS+dlLtWARd8Rv0o2jHIuiKK6HdNetoBDuuENzfxV/x9Y+FsOsIQvVaYCt74UreCFezRCD0XfFDtFtU5g4w9JeMu2MP6tYtHomfK9ag9pyqI/FzxhTUrTY+Ej9nDEHtQqKc+Z1R/9V3KCADzQzc8nPnANFtqncsgM6cINp5/iMBdPQIaWfPoR0JoDNniAIQjA50JpawfwhnbyaXO8AkcvUAAXACC3iOHh4N+4eHgOfowdHM3JPpGPBcOTR6+xHorxSS5UxviB0KuyidmqwrPQnPFaWnRk3tb1xJz1WtB0L0XNF62o0jjwHvhvnOzBVU6l+slx/IFt9zMkdXdLF8wa+OYFSb1lnfwxeEc1fgKTLYsR4vkFfCYp64s4mVE8R63veC8eeAPjlz/1A5RKwXEF1id8IFHe3a5iPAc8Vy1q/aPQI8ZwxnaFVrEp4rhjM8yeMsCedIeVs3YKoWjPWc2xXmM7lwF+llb2KfOz0SUJ+t3eleogZgOtYDMG65bx1oRRt/ErJ2xgJUs23WhS+l54oJqN/8JGd6N2LrxkuWRA7VvEDbv+8YuiKHbWgG4ZitydxVEbR/CWmDzxXpA1exMWYx42nVi5sEO9YzIRMs1oGD4BV5yWxF+EKI4yMn7kRVldSIdaCyWRIWUonSXuluUuxb39iez5hD+JRqXvv4CI7RGQlcie33oF3MFADRRF6KcwQguAtd3pK66xtbjwym9JyxCqGVok5x6Ir5osYE29bDqlP8kzoCD5zVMmUvaOBOQFXhZ78iQbyfH7t0DVhpX2vd+dgBdPTosF/YJufMhc7IXxua2bzB54r0dXSnsh4HnzOVHdDusG7weS4XJYCQwZUzClB13CBYMCtn9J96gxXABk78Z3eErw9O+CQ+R6WvBUDzSXzOnL5K9137zm+Kz5XKSnC3WDf4nLm7r9ygtp5I3+BzpQlgF1zINMXnSgNA9eiwfvLeh0RAQncMOzp20H7C6IEsqexe4tSdOAWilfjfDxKcDjinP2Q7/ItA1rRFjvA7mHvyFQ9ErF8LHHtB5zhyJVOu3oL7it2SA7Hbc1d45XDS5sFL7PGlI8h2MmUb2aMjvPKoa86Bl+fMlgTCiyXVlsyIrNqSmXg9EnfsCqW1knG74gwvFnjhTL2dYoYZN1zP3KlxUkXrK16SJis+Ixx5S3cGuO/r+6+1idNjRnASvyIPB+6kUjvWoTH2jAbhXNoWAg91S+aUM9O4SpNNue7Ep8OuTC9XujN8bZSLJrJoSV29JvGlWgc9XAzHaLh053aTWh78pcmHesgSzknov6Lzn/4Sh+4YaIqsGbdnh0kkFuBKJFa10b6STdbCNWIvYRRjyl0lZlzARpyGz2nMnyXi0KSumGk7X8neqTnaJkumLHHm6GxYPjrPA/JDXmt1hFdHNc2M+wLnkfjUDhFTL1J/paIjH2BIngWuUFNOAfP78o3avTOOpmKamd+aCWeOsOopVxSMB7LPf1JnQthKAMO4RXYlzFc/cQVXu2f7iLxiMXEl1qOW+tiBha7DJ8ZXTl1wUZquGz8hr1crKl6ukGVA9kvK3LmNYTvl+x5awxFobdvVUXIIhzPx624Od/U0aUVxml+SIR9HK437X7njrUVtnEQkWblCK4eeFlq0bhmaYC4Di64Qs51V2uJy5qTs5jAGJxdgrpyS1k2LiSSDvj8J8198QmeLyixsTYfOyTzam+vBEpIlPpwjuLq2I2OytMeZZKUiW8ZtMM+p1K7tOzZTKryiGI2xv6TOtKDsWY8nbrFNEu4vceQKN+t7c5qEoTNxWOsJkfu1W2Uqii7Tk6726P8D";
Sidebar.prototype.gearImage=GRAPH_IMAGE_PATH+"/clipart/Gear_128x128.png";Sidebar.prototype.libAliases={aws2:"aws3",gcp:"gcp2"};Sidebar.prototype.defaultEntries="general;uml;er;bpmn;flowchart;basic;arrows2";Sidebar.prototype.signs="Animals Food Healthcare Nature People Safety Science Sports Tech Transportation Travel".split(" ");Sidebar.prototype.ibm="Analytics Applications Blockchain Data DevOps Infrastructure Management Miscellaneous Security Social Users VPC Boxes Connectors".split(" ");Sidebar.prototype.allied_telesis=
@@ -10950,9 +10950,9 @@ DrawioFile.prototype.getShadowPages=function(){null==this.shadowPages&&(this.sha
DrawioFile.prototype.updateFile=function(b,f,l,d){null!=l&&l()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=f&&f():this.getLatestVersion(mxUtils.bind(this,function(t){try{null!=l&&l()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[t]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=f&&f():null!=t?this.mergeFile(t,b,f,d):this.reloadFile(b,
f))}catch(u){null!=f&&f(u)}}),f))};
DrawioFile.prototype.mergeFile=function(b,f,l,d){var t=!0;try{this.stats.fileMerged++;var u=this.getShadowPages(),E=b.getShadowPages();if(null!=E&&0<E.length){var c=[this.ui.diffPages(null!=d?d:u,E)],e=this.ignorePatches(c);this.setShadowPages(E);if(e)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",e);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(u,this.ui.pages):null;d={};e={};var g=this.ui.patchPages(u,c[0]),k=this.ui.getHashValueForPages(g,
-d),m=this.ui.getHashValueForPages(E,e);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",u,"pages",this.ui.pages,"patches",c,"backup",this.backupPatch,"checksum",k,"current",m,"valid",k==m,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=k&&k!=m){var p=this.compressReportData(this.getAnonymizedXmlForPages(E)),v=this.compressReportData(this.getAnonymizedXmlForPages(g)),x=this.ui.hashValue(b.getCurrentEtag()),z=this.ui.hashValue(this.getCurrentEtag());
-this.checksumError(l,c,"Shadow Details: "+JSON.stringify(d)+"\nChecksum: "+k+"\nCurrent: "+m+"\nCurrent Details: "+JSON.stringify(e)+"\nFrom: "+x+"\nTo: "+z+"\n\nFile Data:\n"+p+"\nPatched Shadow:\n"+v,null,"mergeFile");return}if(null!=this.sync){var y=this.sync.patchRealtime(c,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==y||mxUtils.isEmptyObject(y)||c.push(y)}this.patch(c,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw t=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=
-this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=f&&f()}catch(J){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=l&&l(J);try{if(t)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,J);else{var L=this.getCurrentUser(),N=null!=L?L.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),N,J)}}catch(q){}}};
+d),m=this.ui.getHashValueForPages(E,e);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",u,"pages",this.ui.pages,"patches",c,"backup",this.backupPatch,"checksum",k,"current",m,"valid",k==m,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=k&&k!=m){var p=this.compressReportData(this.getAnonymizedXmlForPages(E)),v=this.compressReportData(this.getAnonymizedXmlForPages(g)),x=this.ui.hashValue(b.getCurrentEtag()),A=this.ui.hashValue(this.getCurrentEtag());
+this.checksumError(l,c,"Shadow Details: "+JSON.stringify(d)+"\nChecksum: "+k+"\nCurrent: "+m+"\nCurrent Details: "+JSON.stringify(e)+"\nFrom: "+x+"\nTo: "+A+"\n\nFile Data:\n"+p+"\nPatched Shadow:\n"+v,null,"mergeFile");return}if(null!=this.sync){var y=this.sync.patchRealtime(c,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==y||mxUtils.isEmptyObject(y)||c.push(y)}this.patch(c,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw t=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=
+this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=f&&f()}catch(I){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=l&&l(I);try{if(t)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,I);else{var L=this.getCurrentUser(),N=null!=L?L.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),N,I)}}catch(q){}}};
DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var f=new mxCodec(mxUtils.createXmlDocument()),l=f.document.createElement("mxfile");if(null!=b)for(var d=0;d<b.length;d++){var t=f.encode(new mxGraphModel(b[d].root));"1"!=urlParams.dev&&(t=this.ui.anonymizeNode(t,!0));t.setAttribute("id",b[d].getId());b[d].viewState&&this.ui.editor.graph.saveViewState(b[d].viewState,t,!0);l.appendChild(t)}return mxUtils.getPrettyXml(l)};
DrawioFile.prototype.compressReportData=function(b,f,l){f=null!=f?f:1E4;null!=l&&null!=b&&b.length>l?b=b.substring(0,l)+"[...]":null!=b&&b.length>f&&(b=Graph.compress(b)+"\n");return b};
DrawioFile.prototype.checksumError=function(b,f,l,d,t){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!=f)for(b=0;b<f.length;b++)this.ui.anonymizePatch(f[b]);var u=mxUtils.bind(this,function(g){var k=this.compressReportData(JSON.stringify(f,null,2));g=null==g?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(g.data)),
@@ -11024,7 +11024,7 @@ LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=fu
LocalFile.prototype.getLatestVersion=function(b,f){null==this.fileHandle?b(null):this.ui.loadFileSystemEntry(this.fileHandle,b,f)};
LocalFile.prototype.saveFile=function(b,f,l,d,t){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;t||this.updateFileData();var u=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var E=this.getData(),c=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=l&&l()}),e=mxUtils.bind(this,function(g){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var k=mxUtils.bind(this,
function(p){this.savingFile=!1;null!=d&&d({error:p})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(p){this.fileHandle.getFile().then(mxUtils.bind(this,function(v){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[v],"conflict",this.desc.lastModified!=v.lastModified);this.desc.lastModified==v.lastModified?p.write(u?this.ui.base64ToBlob(g,"image/png"):g).then(mxUtils.bind(this,function(){p.close().then(mxUtils.bind(this,
-function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(x){try{var z=this.desc;this.savingFile=!1;this.desc=x;this.fileSaved(E,z,c,k);this.removeDraft()}catch(y){k(y)}}),k)}),k)}),k):(this.inConflictState=!0,k())}),mxUtils.bind(this,function(v){this.invalidFileHandle=!0;k(v)}))}),k)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(g,b,u?"image/png":"text/xml",u);else if(g.length<MAX_REQUEST_SIZE){var m=b.lastIndexOf(".");m=0<m?b.substring(m+1):"xml";
+function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(x){try{var A=this.desc;this.savingFile=!1;this.desc=x;this.fileSaved(E,A,c,k);this.removeDraft()}catch(y){k(y)}}),k)}),k)}),k):(this.inConflictState=!0,k())}),mxUtils.bind(this,function(v){this.invalidFileHandle=!0;k(v)}))}),k)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(g,b,u?"image/png":"text/xml",u);else if(g.length<MAX_REQUEST_SIZE){var m=b.lastIndexOf(".");m=0<m?b.substring(m+1):"xml";
(new mxXmlRequest(SAVE_URL,"format="+m+"&xml="+encodeURIComponent(g)+"&filename="+encodeURIComponent(b)+(u?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(g)}));c()}});u?(f=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(g){e(g)}),d,this.ui.getCurrentFile()!=this?E:null,f.scale,f.border)):e(E)};
LocalFile.prototype.rename=function(b,f,l){this.title=b;this.descriptorChanged();null!=f&&f()};LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};LocalLibrary=function(b,f,l){LocalFile.call(this,b,f,l)};mxUtils.extend(LocalLibrary,LocalFile);LocalLibrary.prototype.getHash=function(){return"F"+this.getTitle()};LocalLibrary.prototype.isAutosave=function(){return!1};LocalLibrary.prototype.saveAs=function(b,f,l){this.saveFile(b,!1,f,l)};LocalLibrary.prototype.updateFileData=function(){};LocalLibrary.prototype.open=function(){};StorageFile=function(b,f,l){DrawioFile.call(this,b,f);this.title=l};mxUtils.extend(StorageFile,DrawioFile);StorageFile.prototype.autosaveDelay=2E3;StorageFile.prototype.maxAutosaveDelay=2E4;StorageFile.prototype.type="F";StorageFile.prototype.getMode=function(){return App.MODE_BROWSER};StorageFile.prototype.isAutosaveOptional=function(){return!0};StorageFile.prototype.getHash=function(){return"L"+encodeURIComponent(this.getTitle())};StorageFile.prototype.getTitle=function(){return this.title};
StorageFile.prototype.isRenamable=function(){return!0};StorageFile.prototype.save=function(b,f,l){this.saveAs(this.getTitle(),f,l)};StorageFile.prototype.saveAs=function(b,f,l){DrawioFile.prototype.save.apply(this,arguments);this.saveFile(b,!1,f,l)};
@@ -11040,11 +11040,11 @@ StorageFile.listFiles=function(b,f,l,d){b.getDatabaseItems(function(t){var u=[];
StorageLibrary.prototype.isRenamable=function(b,f,l){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};RemoteFile=function(b,f,l){DrawioFile.call(this,b,f);this.title=l;this.mode=null};mxUtils.extend(RemoteFile,DrawioFile);RemoteFile.prototype.isAutosave=function(){return!1};RemoteFile.prototype.getMode=function(){return this.mode};RemoteFile.prototype.getTitle=function(){return this.title};RemoteFile.prototype.isRenamable=function(){return!1};RemoteFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};RemoteLibrary=function(b,f,l){RemoteFile.call(this,b,f,l.title);this.libObj=l};mxUtils.extend(RemoteLibrary,LocalFile);RemoteLibrary.prototype.getHash=function(){return"R"+encodeURIComponent(JSON.stringify([this.libObj.id,this.libObj.title,this.libObj.downloadUrl]))};RemoteLibrary.prototype.isEditable=function(){return!1};RemoteLibrary.prototype.isRenamable=function(){return!1};RemoteLibrary.prototype.isAutosave=function(){return!1};RemoteLibrary.prototype.save=function(b,f,l){};
RemoteLibrary.prototype.saveAs=function(b,f,l){};RemoteLibrary.prototype.updateFileData=function(){};RemoteLibrary.prototype.open=function(){};UrlLibrary=function(b,f,l){StorageFile.call(this,b,f,l);b=l;f=b.lastIndexOf("/");0<=f&&(b=b.substring(f+1));this.fname=b};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(b,f,l){return!1};UrlLibrary.prototype.saveAs=function(b,f,l){};UrlLibrary.prototype.open=function(){};EmbedFile=function(b,f,l){DrawioFile.call(this,b,f);this.desc=l||{};this.mode=App.MODE_EMBED};mxUtils.extend(EmbedFile,DrawioFile);EmbedFile.prototype.getMode=function(){return this.mode};EmbedFile.prototype.getTitle=function(){return this.desc.title||""};/*
mxClient.IS_IOS || */
-var StorageDialog=function(b,f,l){function d(m,p,v,x,z,y){function L(){mxEvent.addListener(N,"click",null!=y?y:function(){v!=App.MODE_GOOGLE||b.isDriveDomain()?v==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(v,!0);f()})):v==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(v,!0);f()}),
+var StorageDialog=function(b,f,l){function d(m,p,v,x,A,y){function L(){mxEvent.addListener(N,"click",null!=y?y:function(){v!=App.MODE_GOOGLE||b.isDriveDomain()?v==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(v,!0);f()})):v==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(v,!0);f()}),
function(C){b.spinner.stop();b.handleError(C)}):(b.setMode(v,!0),f()):window.location.hostname=DriveClient.prototype.newAppHostname})}c++;++E>l&&(mxUtils.br(e),E=1);var N=document.createElement("a");N.style.overflow="hidden";N.style.display="inline-block";N.className="geBaseButton";N.style.boxSizing="border-box";N.style.fontSize="11px";N.style.position="relative";N.style.margin="4px";N.style.marginTop="8px";N.style.marginBottom="0px";N.style.padding="8px 10px 8px 10px";N.style.width="88px";N.style.height=
-"100px";N.style.whiteSpace="nowrap";N.setAttribute("title",p);var J=document.createElement("div");J.style.textOverflow="ellipsis";J.style.overflow="hidden";J.style.position="absolute";J.style.bottom="8px";J.style.left="0px";J.style.right="0px";mxUtils.write(J,p);N.appendChild(J);if(null!=m){var q=document.createElement("img");q.setAttribute("src",m);q.setAttribute("border","0");q.setAttribute("align","absmiddle");q.style.width="60px";q.style.height="60px";q.style.paddingBottom="6px";N.appendChild(q)}else J.style.paddingTop=
-"5px",J.style.whiteSpace="normal",mxClient.IS_IOS?(N.style.padding="0px 10px 20px 10px",N.style.top="6px"):mxClient.IS_FF&&(J.style.paddingTop="0px",J.style.marginTop="-2px");if(null!=z)for(m=0;m<z.length;m++)mxUtils.br(J),mxUtils.write(J,z[m]);if(null!=x&&null==b[x]){q.style.visibility="hidden";mxUtils.setOpacity(J,10);var D=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});D.spin(N);
-var A=window.setTimeout(function(){null==b[x]&&(D.stop(),N.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(C,G){null!=b[x]&&G.getProperty("client")==b[x]&&(window.clearTimeout(A),mxUtils.setOpacity(J,100),q.style.visibility="",D.stop(),L(),"drive"==x&&null!=g.parentNode&&g.parentNode.removeChild(g))}))}else L();e.appendChild(N)}l=null!=l?l:2;var t=document.createElement("div");t.style.textAlign="center";t.style.whiteSpace="nowrap";t.style.paddingTop="0px";t.style.paddingBottom=
+"100px";N.style.whiteSpace="nowrap";N.setAttribute("title",p);var I=document.createElement("div");I.style.textOverflow="ellipsis";I.style.overflow="hidden";I.style.position="absolute";I.style.bottom="8px";I.style.left="0px";I.style.right="0px";mxUtils.write(I,p);N.appendChild(I);if(null!=m){var q=document.createElement("img");q.setAttribute("src",m);q.setAttribute("border","0");q.setAttribute("align","absmiddle");q.style.width="60px";q.style.height="60px";q.style.paddingBottom="6px";N.appendChild(q)}else I.style.paddingTop=
+"5px",I.style.whiteSpace="normal",mxClient.IS_IOS?(N.style.padding="0px 10px 20px 10px",N.style.top="6px"):mxClient.IS_FF&&(I.style.paddingTop="0px",I.style.marginTop="-2px");if(null!=A)for(m=0;m<A.length;m++)mxUtils.br(I),mxUtils.write(I,A[m]);if(null!=x&&null==b[x]){q.style.visibility="hidden";mxUtils.setOpacity(I,10);var D=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});D.spin(N);
+var z=window.setTimeout(function(){null==b[x]&&(D.stop(),N.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(C,G){null!=b[x]&&G.getProperty("client")==b[x]&&(window.clearTimeout(z),mxUtils.setOpacity(I,100),q.style.visibility="",D.stop(),L(),"drive"==x&&null!=g.parentNode&&g.parentNode.removeChild(g))}))}else L();e.appendChild(N)}l=null!=l?l:2;var t=document.createElement("div");t.style.textAlign="center";t.style.whiteSpace="nowrap";t.style.paddingTop="0px";t.style.paddingBottom=
"20px";var u=document.createElement("div");u.style.border="1px solid #d3d3d3";u.style.borderWidth="1px 0px 1px 0px";u.style.padding="10px 0px 20px 0px";var E=0,c=0,e=document.createElement("div");e.style.paddingTop="2px";u.appendChild(e);var g=document.createElement("p"),k=document.createElement("p");k.style.cssText="font-size:22px;padding:4px 0 16px 0;margin:0;color:gray;";mxUtils.write(k,mxResources.get("saveDiagramsTo")+":");t.appendChild(k);t.appendChild(u);E=0;"function"===typeof window.DriveClient&&
d(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===typeof window.OneDriveClient&&d(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");"1"!=urlParams.noDevice&&d(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||d(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);"function"===typeof window.DropboxClient&&
d(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox");null!=b.gitHub&&d(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub");null!=b.gitLab&&d(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab");u=document.createElement("span");u.style.position="absolute";u.style.cursor="pointer";u.style.bottom="27px";u.style.color="gray";u.style.userSelect="none";u.style.textAlign="center";u.style.left="50%";mxUtils.setPrefixedStyle(u.style,
@@ -11058,65 +11058,65 @@ mxUtils.setPrefixedStyle(l.style,"transform","translate(-50%,0)");mxUtils.write(
"18px";u.style.padding="10px";u.style.width="340px";mxUtils.write(u,mxResources.get("openExistingDiagram"));mxEvent.addListener(u,"click",function(){b.actions.get("open").funct()});t.appendChild(u);b.mode==App.MODE_GOOGLE?mxResources.get("googleDrive"):b.mode==App.MODE_DROPBOX?mxResources.get("dropbox"):b.mode==App.MODE_ONEDRIVE?mxResources.get("oneDrive"):b.mode==App.MODE_GITHUB?mxResources.get("github"):b.mode==App.MODE_GITLAB?mxResources.get("gitlab"):b.mode==App.MODE_TRELLO?mxResources.get("trello"):
b.mode==App.MODE_DEVICE?mxResources.get("device"):b.mode==App.MODE_BROWSER&&mxResources.get("browser");if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp)if(l=function(v){u.style.marginBottom="24px";var x=document.createElement("a");x.style.display="inline-block";x.style.color="gray";x.style.cursor="pointer";x.style.marginTop="6px";mxUtils.write(x,mxResources.get("signOut"));u.style.marginBottom="16px";t.style.paddingBottom="18px";mxEvent.addListener(x,"click",function(){b.confirm(mxResources.get("areYouSure"),
function(){v()})});t.appendChild(x)},b.mode==App.MODE_GOOGLE&&null!=b.drive){var m=b.drive.getUsersList();if(0<m.length){d=document.createElement("span");d.style.marginTop="6px";mxUtils.write(d,mxResources.get("changeUser")+":");u.style.marginBottom="16px";t.style.paddingBottom="18px";t.appendChild(d);var p=document.createElement("select");p.style.marginLeft="4px";p.style.width="140px";for(l=0;l<m.length;l++)E=document.createElement("option"),mxUtils.write(E,m[l].displayName),E.value=l,p.appendChild(E),
-E=document.createElement("option"),E.innerHTML="&nbsp;&nbsp;&nbsp;",mxUtils.write(E,"<"+m[l].email+">"),E.setAttribute("disabled","disabled"),p.appendChild(E);E=document.createElement("option");mxUtils.write(E,mxResources.get("addAccount"));E.value=m.length;p.appendChild(E);mxEvent.addListener(p,"change",function(){var v=p.value,x=m.length!=v;x&&b.drive.setUser(m[v]);b.drive.authorize(x,function(){b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash()},function(z){b.handleError(z,null,function(){b.hideDialog();
+E=document.createElement("option"),E.innerHTML="&nbsp;&nbsp;&nbsp;",mxUtils.write(E,"<"+m[l].email+">"),E.setAttribute("disabled","disabled"),p.appendChild(E);E=document.createElement("option");mxUtils.write(E,mxResources.get("addAccount"));E.value=m.length;p.appendChild(E);mxEvent.addListener(p,"change",function(){var v=p.value,x=m.length!=v;x&&b.drive.setUser(m[v]);b.drive.authorize(x,function(){b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash()},function(A){b.handleError(A,null,function(){b.hideDialog();
b.showSplash()})},!0)});t.appendChild(p)}else l(function(){b.drive.logout()})}else b.mode!=App.MODE_ONEDRIVE||null==b.oneDrive||b.oneDrive.noLogout?b.mode==App.MODE_GITHUB&&null!=b.gitHub?l(function(){b.gitHub.logout();b.openLink("https://www.github.com/logout")}):b.mode==App.MODE_GITLAB&&null!=b.gitLab?l(function(){b.gitLab.logout();b.openLink(DRAWIO_GITLAB_URL+"/users/sign_out")}):b.mode==App.MODE_TRELLO&&null!=b.trello?b.trello.isAuthorized()&&l(function(){b.trello.logout()}):b.mode==App.MODE_DROPBOX&&
null!=b.dropbox&&l(function(){b.dropbox.logout();b.openLink("https://www.dropbox.com/logout")}):l(function(){b.oneDrive.logout()});f.appendChild(t);this.container=f},EmbedDialog=function(b,f,l,d,t,u,E,c,e){E=null!=E?E:"Check out the diagram I made using @drawio";d=document.createElement("div");var g=/^https?:\/\//.test(f)||/^mailto:\/\//.test(f);null!=u?mxUtils.write(d,u):mxUtils.write(d,mxResources.get(5E5>f.length?g?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(d);u=document.createElement("div");
u.style.position="absolute";u.style.top="30px";u.style.right="30px";u.style.color="gray";mxUtils.write(u,b.formatFileSize(f.length));d.appendChild(u);var k=document.createElement("textarea");k.setAttribute("autocomplete","off");k.setAttribute("autocorrect","off");k.setAttribute("autocapitalize","off");k.setAttribute("spellcheck","false");k.style.fontFamily="monospace";k.style.wordBreak="break-all";k.style.marginTop="10px";k.style.resize="none";k.style.height="150px";k.style.width="440px";k.style.border=
"1px solid gray";k.value=mxResources.get("updatingDocument");d.appendChild(k);mxUtils.br(d);this.init=function(){window.setTimeout(function(){5E5>f.length?(k.value=f,k.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?k.select():document.execCommand("selectAll",!1,null)):(k.setAttribute("readonly","true"),k.value=mxResources.get("tooLargeUseDownload"))},0)};u=document.createElement("div");u.style.position="absolute";u.style.bottom="36px";u.style.right="32px";var m=null;!EmbedDialog.showPreviewOption||
mxClient.IS_CHROMEAPP&&!g||navigator.standalone||!(g||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(m=mxUtils.button(null!=c?c:mxResources.get(5E5>f.length?"preview":"openInNewWindow"),function(){var v=5E5>f.length?k.value:f;if(null!=t)t(v);else if(g)try{var x=b.openLink(v);null!=x&&(null==l||0<l)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=x&&null!=x.location.href&&x.location.href.substring(0,8)!=v.substring(0,8)&&(x.close(),b.handleError({message:mxResources.get("drawingTooLarge")}))}catch(y){}}),
-l||500)}catch(y){b.handleError({message:y.message||mxResources.get("drawingTooLarge")})}else{var z=window.open();z=null!=z?z.document:null;null!=z?(z.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+f+"</body></html>"),z.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}),m.className="geBtn",u.appendChild(m));if(!g||7500<f.length)c=mxUtils.button(mxResources.get("download"),function(){b.hideDialog();
+l||500)}catch(y){b.handleError({message:y.message||mxResources.get("drawingTooLarge")})}else{var A=window.open();A=null!=A?A.document:null;null!=A?(A.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+f+"</body></html>"),A.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}),m.className="geBtn",u.appendChild(m));if(!g||7500<f.length)c=mxUtils.button(mxResources.get("download"),function(){b.hideDialog();
b.saveData(null!=e?e:"embed.txt","txt",f,"text/plain")}),c.className="geBtn",u.appendChild(c);if(g&&(!b.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>f.length){var p=mxUtils.button("",function(){try{var v="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(k.value);b.openLink(v)}catch(x){b.handleError({message:x.message||mxResources.get("drawingTooLarge")})}});c=document.createElement("img");c.setAttribute("src",Editor.facebookImage);c.setAttribute("width","18");c.setAttribute("height",
"18");c.setAttribute("border","0");p.appendChild(c);p.setAttribute("title",mxResources.get("facebook")+" ("+b.formatFileSize(51200)+" max)");p.style.verticalAlign="bottom";p.style.paddingTop="4px";p.style.minWidth="46px";p.className="geBtn";u.appendChild(p)}7168>f.length&&(p=mxUtils.button("",function(){try{var v="https://twitter.com/intent/tweet?text="+encodeURIComponent(E)+"&url="+encodeURIComponent(k.value);b.openLink(v)}catch(x){b.handleError({message:x.message||mxResources.get("drawingTooLarge")})}}),
c=document.createElement("img"),c.setAttribute("src",Editor.tweetImage),c.setAttribute("width","18"),c.setAttribute("height","18"),c.setAttribute("border","0"),c.style.marginBottom="5px",p.appendChild(c),p.setAttribute("title",mxResources.get("twitter")+" ("+b.formatFileSize(7168)+" max)"),p.style.verticalAlign="bottom",p.style.paddingTop="4px",p.style.minWidth="46px",p.className="geBtn",u.appendChild(p))}!b.isOffline()&&5E5>f.length&&(p=mxUtils.button("",function(){try{var v="mailto:?subject="+encodeURIComponent(e||
b.defaultFilename)+"&body="+encodeURIComponent(k.value);b.openLink(v)}catch(x){b.handleError({message:x.message||mxResources.get("drawingTooLarge")})}}),c=document.createElement("img"),c.setAttribute("src",Editor.mailImage),c.setAttribute("width","18"),c.setAttribute("height","18"),c.setAttribute("border","0"),c.style.marginBottom="5px",Editor.isDarkMode()&&(c.style.filter="invert(100%)"),p.appendChild(c),p.style.verticalAlign="bottom",p.style.paddingTop="4px",p.style.minWidth="46px",p.className=
"geBtn",u.appendChild(p));c=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});u.appendChild(c);p=mxUtils.button(mxResources.get("copy"),function(){k.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?k.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");b.alert(mxResources.get("copiedToClipboard"))});5E5>f.length?mxClient.IS_SF||null!=document.documentMode?c.className="geBtn gePrimaryBtn":(u.appendChild(p),p.className="geBtn gePrimaryBtn",
c.className="geBtn"):(u.appendChild(m),c.className="geBtn",m.className="geBtn gePrimaryBtn");d.appendChild(u);this.container=d};EmbedDialog.showPreviewOption=!0;
-var GoogleSitesDialog=function(b,f){function l(){var C=null!=A&&null!=A.getTitle()?A.getTitle():this.defaultFilename;if(q.checked&&""!=p.value){var G="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(p.value));null!=C&&(G+="&title="+encodeURIComponent(C));0<D.length&&(G+="&s="+D);""!=v.value&&"0"!=v.value&&(G+="&border="+v.value);""!=m.value&&(G+="&height="+m.value);G+="&pan="+(x.checked?"1":"0");G+="&zoom="+(z.checked?"1":"0");G+="&fit="+(J.checked?"1":"0");
-G+="&resize="+(N.checked?"1":"0");G+="&x0="+Number(k.value);G+="&y0="+e;t.mathEnabled&&(G+="&math=1");L.checked?G+="&edit=_blank":y.checked&&(G+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));g.value=G}else A.constructor==DriveFile||A.constructor==DropboxFile?(G="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=p.value?G+=encodeURIComponent(mxUtils.htmlEntities(p.value))+"&type=3":(G+=A.getHash().substring(1),G=A.constructor==DropboxFile?G+"&type=2":G+"&type=1"),null!=
+var GoogleSitesDialog=function(b,f){function l(){var C=null!=z&&null!=z.getTitle()?z.getTitle():this.defaultFilename;if(q.checked&&""!=p.value){var G="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(p.value));null!=C&&(G+="&title="+encodeURIComponent(C));0<D.length&&(G+="&s="+D);""!=v.value&&"0"!=v.value&&(G+="&border="+v.value);""!=m.value&&(G+="&height="+m.value);G+="&pan="+(x.checked?"1":"0");G+="&zoom="+(A.checked?"1":"0");G+="&fit="+(I.checked?"1":"0");
+G+="&resize="+(N.checked?"1":"0");G+="&x0="+Number(k.value);G+="&y0="+e;t.mathEnabled&&(G+="&math=1");L.checked?G+="&edit=_blank":y.checked&&(G+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));g.value=G}else z.constructor==DriveFile||z.constructor==DropboxFile?(G="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=p.value?G+=encodeURIComponent(mxUtils.htmlEntities(p.value))+"&type=3":(G+=z.getHash().substring(1),G=z.constructor==DropboxFile?G+"&type=2":G+"&type=1"),null!=
C&&(G+="&title="+encodeURIComponent(C)),""!=m.value&&(C=parseInt(m.value)+parseInt(k.value),G+="&height="+C),g.value=G):g.value=""}var d=document.createElement("div"),t=b.editor.graph,u=t.getGraphBounds(),E=t.view.scale,c=Math.floor(u.x/E-t.view.translate.x),e=Math.floor(u.y/E-t.view.translate.y);mxUtils.write(d,mxResources.get("googleGadget")+":");mxUtils.br(d);var g=document.createElement("input");g.setAttribute("type","text");g.style.marginBottom="8px";g.style.marginTop="2px";g.style.width="410px";
d.appendChild(g);mxUtils.br(d);this.init=function(){g.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?g.select():document.execCommand("selectAll",!1,null)};mxUtils.write(d,mxResources.get("top")+":");var k=document.createElement("input");k.setAttribute("type","text");k.setAttribute("size","4");k.style.marginRight="16px";k.style.marginLeft="4px";k.value=c;d.appendChild(k);mxUtils.write(d,mxResources.get("height")+":");var m=document.createElement("input");m.setAttribute("type","text");
m.setAttribute("size","4");m.style.marginLeft="4px";m.value=Math.ceil(u.height/E);d.appendChild(m);mxUtils.br(d);u=document.createElement("hr");u.setAttribute("size","1");u.style.marginBottom="16px";u.style.marginTop="16px";d.appendChild(u);mxUtils.write(d,mxResources.get("publicDiagramUrl")+":");mxUtils.br(d);var p=document.createElement("input");p.setAttribute("type","text");p.setAttribute("size","28");p.style.marginBottom="8px";p.style.marginTop="2px";p.style.width="410px";p.value=f||"";d.appendChild(p);
-mxUtils.br(d);mxUtils.write(d,mxResources.get("borderWidth")+":");var v=document.createElement("input");v.setAttribute("type","text");v.setAttribute("size","3");v.style.marginBottom="8px";v.style.marginLeft="4px";v.value="0";d.appendChild(v);mxUtils.br(d);var x=document.createElement("input");x.setAttribute("type","checkbox");x.setAttribute("checked","checked");x.defaultChecked=!0;x.style.marginLeft="16px";d.appendChild(x);mxUtils.write(d,mxResources.get("pan")+" ");var z=document.createElement("input");
-z.setAttribute("type","checkbox");z.setAttribute("checked","checked");z.defaultChecked=!0;z.style.marginLeft="8px";d.appendChild(z);mxUtils.write(d,mxResources.get("zoom")+" ");var y=document.createElement("input");y.setAttribute("type","checkbox");y.style.marginLeft="8px";y.setAttribute("title",window.location.href);d.appendChild(y);mxUtils.write(d,mxResources.get("edit")+" ");var L=document.createElement("input");L.setAttribute("type","checkbox");L.style.marginLeft="8px";d.appendChild(L);mxUtils.write(d,
-mxResources.get("asNew")+" ");mxUtils.br(d);var N=document.createElement("input");N.setAttribute("type","checkbox");N.setAttribute("checked","checked");N.defaultChecked=!0;N.style.marginLeft="16px";d.appendChild(N);mxUtils.write(d,mxResources.get("resize")+" ");var J=document.createElement("input");J.setAttribute("type","checkbox");J.style.marginLeft="8px";d.appendChild(J);mxUtils.write(d,mxResources.get("fit")+" ");var q=document.createElement("input");q.setAttribute("type","checkbox");q.style.marginLeft=
-"8px";d.appendChild(q);mxUtils.write(d,mxResources.get("embed")+" ");var D=b.getBasenames().join(";"),A=b.getCurrentFile();mxEvent.addListener(x,"change",l);mxEvent.addListener(z,"change",l);mxEvent.addListener(N,"change",l);mxEvent.addListener(J,"change",l);mxEvent.addListener(y,"change",l);mxEvent.addListener(L,"change",l);mxEvent.addListener(q,"change",l);mxEvent.addListener(m,"change",l);mxEvent.addListener(k,"change",l);mxEvent.addListener(v,"change",l);mxEvent.addListener(p,"change",l);l();
+mxUtils.br(d);mxUtils.write(d,mxResources.get("borderWidth")+":");var v=document.createElement("input");v.setAttribute("type","text");v.setAttribute("size","3");v.style.marginBottom="8px";v.style.marginLeft="4px";v.value="0";d.appendChild(v);mxUtils.br(d);var x=document.createElement("input");x.setAttribute("type","checkbox");x.setAttribute("checked","checked");x.defaultChecked=!0;x.style.marginLeft="16px";d.appendChild(x);mxUtils.write(d,mxResources.get("pan")+" ");var A=document.createElement("input");
+A.setAttribute("type","checkbox");A.setAttribute("checked","checked");A.defaultChecked=!0;A.style.marginLeft="8px";d.appendChild(A);mxUtils.write(d,mxResources.get("zoom")+" ");var y=document.createElement("input");y.setAttribute("type","checkbox");y.style.marginLeft="8px";y.setAttribute("title",window.location.href);d.appendChild(y);mxUtils.write(d,mxResources.get("edit")+" ");var L=document.createElement("input");L.setAttribute("type","checkbox");L.style.marginLeft="8px";d.appendChild(L);mxUtils.write(d,
+mxResources.get("asNew")+" ");mxUtils.br(d);var N=document.createElement("input");N.setAttribute("type","checkbox");N.setAttribute("checked","checked");N.defaultChecked=!0;N.style.marginLeft="16px";d.appendChild(N);mxUtils.write(d,mxResources.get("resize")+" ");var I=document.createElement("input");I.setAttribute("type","checkbox");I.style.marginLeft="8px";d.appendChild(I);mxUtils.write(d,mxResources.get("fit")+" ");var q=document.createElement("input");q.setAttribute("type","checkbox");q.style.marginLeft=
+"8px";d.appendChild(q);mxUtils.write(d,mxResources.get("embed")+" ");var D=b.getBasenames().join(";"),z=b.getCurrentFile();mxEvent.addListener(x,"change",l);mxEvent.addListener(A,"change",l);mxEvent.addListener(N,"change",l);mxEvent.addListener(I,"change",l);mxEvent.addListener(y,"change",l);mxEvent.addListener(L,"change",l);mxEvent.addListener(q,"change",l);mxEvent.addListener(m,"change",l);mxEvent.addListener(k,"change",l);mxEvent.addListener(v,"change",l);mxEvent.addListener(p,"change",l);l();
mxEvent.addListener(g,"click",function(){g.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?g.select():document.execCommand("selectAll",!1,null)});f=document.createElement("div");f.style.paddingTop="12px";f.style.textAlign="right";u=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});u.className="geBtn gePrimaryBtn";f.appendChild(u);d.appendChild(f);this.container=d},CreateGraphDialog=function(b,f,l){var d=document.createElement("div");d.style.textAlign="right";this.init=
function(){var t=document.createElement("div");t.style.position="relative";t.style.border="1px solid gray";t.style.width="100%";t.style.height="360px";t.style.overflow="hidden";t.style.marginBottom="16px";mxEvent.disableContextMenu(t);d.appendChild(t);var u=new Graph(t);u.setCellsCloneable(!0);u.setPanning(!0);u.setAllowDanglingEdges(!1);u.connectionHandler.select=!1;u.view.setTranslate(20,20);u.border=20;u.panningHandler.useLeftButtonForPanning=!0;var E="curved=1;";u.cellRenderer.installCellOverlayListeners=
-function(z,y,L){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(L.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(N){y.fireEvent(new mxEventObject("pointerdown","event",N,"state",z))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(L.node,"touchstart",function(N){y.fireEvent(new mxEventObject("pointerdown","event",N,"state",z))})};u.getAllConnectionConstraints=function(){return null};u.connectionHandler.marker.highlight.keepOnTop=
-!1;u.connectionHandler.createEdgeState=function(z){z=u.createEdge(null,null,null,null,null,E);return new mxCellState(this.graph.view,z,this.graph.getCellStyle(z))};var c=u.getDefaultParent(),e=mxUtils.bind(this,function(z){var y=new mxCellOverlay(this.connectImage,"Add outgoing");y.cursor="hand";y.addListener(mxEvent.CLICK,function(L,N){u.connectionHandler.reset();u.clearSelection();var J=u.getCellGeometry(z),q;m(function(){q=u.insertVertex(c,null,"Entry",J.x,J.y,80,30,"rounded=1;");e(q);u.view.refresh(q);
-u.insertEdge(c,null,"",z,q,E)},function(){u.scrollCellToVisible(q)})});y.addListener("pointerdown",function(L,N){L=N.getProperty("event");N=N.getProperty("state");u.popupMenuHandler.hideMenu();u.stopEditing(!1);var J=mxUtils.convertPoint(u.container,mxEvent.getClientX(L),mxEvent.getClientY(L));u.connectionHandler.start(N,J.x,J.y);u.isMouseDown=!0;u.isMouseTrigger=mxEvent.isMouseEvent(L);mxEvent.consume(L)});u.addCellOverlay(z,y)});u.getModel().beginUpdate();try{var g=u.insertVertex(c,null,"Start",
+function(A,y,L){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(L.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(N){y.fireEvent(new mxEventObject("pointerdown","event",N,"state",A))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(L.node,"touchstart",function(N){y.fireEvent(new mxEventObject("pointerdown","event",N,"state",A))})};u.getAllConnectionConstraints=function(){return null};u.connectionHandler.marker.highlight.keepOnTop=
+!1;u.connectionHandler.createEdgeState=function(A){A=u.createEdge(null,null,null,null,null,E);return new mxCellState(this.graph.view,A,this.graph.getCellStyle(A))};var c=u.getDefaultParent(),e=mxUtils.bind(this,function(A){var y=new mxCellOverlay(this.connectImage,"Add outgoing");y.cursor="hand";y.addListener(mxEvent.CLICK,function(L,N){u.connectionHandler.reset();u.clearSelection();var I=u.getCellGeometry(A),q;m(function(){q=u.insertVertex(c,null,"Entry",I.x,I.y,80,30,"rounded=1;");e(q);u.view.refresh(q);
+u.insertEdge(c,null,"",A,q,E)},function(){u.scrollCellToVisible(q)})});y.addListener("pointerdown",function(L,N){L=N.getProperty("event");N=N.getProperty("state");u.popupMenuHandler.hideMenu();u.stopEditing(!1);var I=mxUtils.convertPoint(u.container,mxEvent.getClientX(L),mxEvent.getClientY(L));u.connectionHandler.start(N,I.x,I.y);u.isMouseDown=!0;u.isMouseTrigger=mxEvent.isMouseEvent(L);mxEvent.consume(L)});u.addCellOverlay(A,y)});u.getModel().beginUpdate();try{var g=u.insertVertex(c,null,"Start",
0,0,80,30,"ellipse");e(g)}finally{u.getModel().endUpdate()}if("horizontalTree"==l){var k=new mxCompactTreeLayout(u);k.edgeRouting=!1;k.levelDistance=30;E="edgeStyle=elbowEdgeStyle;elbow=horizontal;"}else"verticalTree"==l?(k=new mxCompactTreeLayout(u,!1),k.edgeRouting=!1,k.levelDistance=30,E="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==l?(k=new mxRadialTreeLayout(u,!1),k.edgeRouting=!1,k.levelDistance=80):"verticalFlow"==l?k=new mxHierarchicalLayout(u,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
-l?k=new mxHierarchicalLayout(u,mxConstants.DIRECTION_WEST):"organic"==l?(k=new mxFastOrganicLayout(u,!1),k.forceConstant=80):"circle"==l&&(k=new mxCircleLayout(u));if(null!=k){var m=function(z,y){u.getModel().beginUpdate();try{null!=z&&z(),k.execute(u.getDefaultParent(),g)}catch(L){throw L;}finally{z=new mxMorphing(u),z.addListener(mxEvent.DONE,mxUtils.bind(this,function(){u.getModel().endUpdate();null!=y&&y()})),z.startAnimation()}},p=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=
-function(z,y,L,N,J){p.apply(this,arguments);m()};u.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);m()};u.connectionHandler.addListener(mxEvent.CONNECT,function(){m()})}var v=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),function(){null!=t.parentNode&&(u.destroy(),t.parentNode.removeChild(t));b.hideDialog()})});v.className="geBtn";b.editor.cancelFirst&&d.appendChild(v);var x=mxUtils.button(mxResources.get("insert"),function(z){u.clearCellOverlays();
-var y=u.getModel().getChildren(u.getDefaultParent());z=mxEvent.isAltDown(z)?b.editor.graph.getFreeInsertPoint():b.editor.graph.getCenterInsertPoint(u.getBoundingBoxFromGeometry(y,!0));y=b.editor.graph.importCells(y,z.x,z.y);z=b.editor.graph.view;var L=z.getBounds(y);L.x-=z.translate.x;L.y-=z.translate.y;b.editor.graph.scrollRectToVisible(L);b.editor.graph.setSelectionCells(y);null!=t.parentNode&&(u.destroy(),t.parentNode.removeChild(t));b.hideDialog()});d.appendChild(x);x.className="geBtn gePrimaryBtn";
+l?k=new mxHierarchicalLayout(u,mxConstants.DIRECTION_WEST):"organic"==l?(k=new mxFastOrganicLayout(u,!1),k.forceConstant=80):"circle"==l&&(k=new mxCircleLayout(u));if(null!=k){var m=function(A,y){u.getModel().beginUpdate();try{null!=A&&A(),k.execute(u.getDefaultParent(),g)}catch(L){throw L;}finally{A=new mxMorphing(u),A.addListener(mxEvent.DONE,mxUtils.bind(this,function(){u.getModel().endUpdate();null!=y&&y()})),A.startAnimation()}},p=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=
+function(A,y,L,N,I){p.apply(this,arguments);m()};u.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);m()};u.connectionHandler.addListener(mxEvent.CONNECT,function(){m()})}var v=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),function(){null!=t.parentNode&&(u.destroy(),t.parentNode.removeChild(t));b.hideDialog()})});v.className="geBtn";b.editor.cancelFirst&&d.appendChild(v);var x=mxUtils.button(mxResources.get("insert"),function(A){u.clearCellOverlays();
+var y=u.getModel().getChildren(u.getDefaultParent());A=mxEvent.isAltDown(A)?b.editor.graph.getFreeInsertPoint():b.editor.graph.getCenterInsertPoint(u.getBoundingBoxFromGeometry(y,!0));y=b.editor.graph.importCells(y,A.x,A.y);A=b.editor.graph.view;var L=A.getBounds(y);L.x-=A.translate.x;L.y-=A.translate.y;b.editor.graph.scrollRectToVisible(L);b.editor.graph.setSelectionCells(y);null!=t.parentNode&&(u.destroy(),t.parentNode.removeChild(t));b.hideDialog()});d.appendChild(x);x.className="geBtn gePrimaryBtn";
b.editor.cancelFirst||d.appendChild(v)};this.container=d};
CreateGraphDialog.prototype.connectImage=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjQ3OTk0QjMyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjQ3OTk0QjQyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRjA0N0I2MjJENzExMUU1OEZBOEY0NUEyM0EyMUMzOSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGNDc5OTRCMjJENzIxMUU1OEZBOEY0NUEyM0EyMUMzOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjIf+MgAAATlSURBVHjanFZraFxFFD735u4ru3ls0yZG26ShgmJoKK1J2vhIYzBgRdtIURHyw1hQUH9IxIgI2h8iCEUF/1RRlNQYCsYfCTHVhiTtNolpZCEStqSC22xIsrs1bDfu7t37Gs/cO3Ozxs1DBw73zpk555vzmHNGgJ0NYatFgmNLYUHYUoHASMz5ijmgVLmxgfKCUiBxC4ACJAeSG8nb1dVVOTc3dyoSibwWDofPBIPBJzo7O8vpGtvjpDICGztxkciECpF2LS0tvZtOpwNkk5FKpcYXFxffwL1+JuPgllPj8nk1F6RoaGjoKCqZ5ApljZDZO4SMRA0SuG2QUJIQRV8HxMOM9vf3H0ZZH9Nhg20MMl2QkFwjIyNHWlpahtADnuUMwLcRHX5aNSBjCJYEsSSLUeLEbhGe3ytCmQtA1/XY+Pj46dbW1iDuyCJp9BC5ycBj4hoeHq5ra2sbw0Xn1ZgBZ+dVkA1Lc+6p0Ck2p0QS4Ox9EhwpEylYcmBg4LH29vYQLilIOt0u5FhDfevNZDI/u93uw6PLOrwTUtjxrbPYbhD42WgMrF8JmR894ICmCgnQjVe8Xu8pXEkzMJKbuo5oNPomBbm1ZsD7s2kwFA1JZ6QBUXWT1nmGNc/qoMgavDcrQzxjQGFh4aOYIJ0sFAXcEtui4uLiVjr5KpSBVFYDDZVrWUaKRRWSAYeK0fmKykgDXbVoNaPChRuyqdDv97czL5nXxQbq6empQmsaklkDBiNpSwFVrmr2P6UyicD5piI4f8wHh0oEm8/p4h8pyGiEWvVQd3e3nxtjAzU1NR2jP7NRBWQ8GbdEzzJAmc0V3RR4cI8Dvmwuhc8fKUFA0d6/ltHg5p+Kuaejo6OeY0jcNJ/PV00ZS0nFUoZRvvFS1bZFsKHCCQ2Pl8H0chY+C96B6ZUsrCQ1qKtwQVFRURW/QhIXMAzDPAZ6BgOr8tTa8dDxCmiYGApaJbJMxSzV+brE8pdgWkcpY5dbMF1AR9XH8/xu2ilef48bvn92n82ZwHh+8ssqTEXS9p7dHisiiURikd8PbpExNTU1UVNTA3V3Y7lC16n0gpB/NwpNcZjfa7dScC4Qh0kOQCwnlEgi3F/hMVl9fX0zvKrzSk2lfXjRhj0eT/2rvWG4+Pta3oJY7XfC3hInXAv/ldeFLx8shQ+eqQL0UAAz7ylkpej5eNZRVBWL6BU6ef14OYiY1oqyTtmsavr/5koaRucT1pzx+ZpL1+GV5nLutksUgIcmtwTRiuuVZXnU5XId7A2swJkfFsymRWC91hHg1Viw6x23+7vn9sPJ+j20BE1hCXqSWaNSQ8ScbknRZWxub1PGCw/fBV+c3AeijlUbY5bBjEqr9GuYZP4jP41WudGSC6erTRCqdGZm5i1WvXWeDHnbBCZGc2Nj4wBl/hZOwrmBBfgmlID1HmGJutHaF+tKoevp/XCgstDkjo2NtWKLuc6AVN4mNjY+s1XQxoenOoFuDPHGtnRbJj9ej5GvL0dI7+giuRyMk1giazc+DP6vgUDgOJVlOv7R+PJ12QIeL6SyeDz+Kfp8ZrNWjgDTsVjsQ7qXyTjztXJhm9ePxFLfMTg4eG9tbe1RTP9KFFYQfHliYmIS69kCC7jKYmKwxxD5P88tkVkqbPPcIps9t4T/+HjcuJ/s5BFJgf4WYABCtxGuxIZ90gAAAABJRU5ErkJggg==":IMAGE_PATH+
"/handle-connect.png",26,26);
var BackgroundImageDialog=function(b,f,l){var d=document.createElement("div");d.style.whiteSpace="nowrap";var t=document.createElement("h2");mxUtils.write(t,mxResources.get("backgroundImage"));t.style.marginTop="0px";d.appendChild(t);var u=null!=l&&null!=l.originalSrc;t=!1;var E=document.createElement("input");E.style.cssText="margin-right:8px;margin-bottom:8px;";E.setAttribute("value","url");E.setAttribute("type","radio");E.setAttribute("name","geBackgroundImageDialogOption");var c=document.createElement("input");
c.style.cssText="margin-right:8px;margin-bottom:8px;";c.setAttribute("value","url");c.setAttribute("type","radio");c.setAttribute("name","geBackgroundImageDialogOption");var e=document.createElement("input");e.setAttribute("type","text");e.style.marginBottom="8px";e.style.width="360px";e.value=u||null==l?"":l.src;var g=document.createElement("select");g.style.width="360px";if(null!=b.pages)for(var k=0;k<b.pages.length;k++){var m=document.createElement("option");mxUtils.write(m,b.pages[k].getName()||
-mxResources.get("pageWithNumber",[k+1]));m.setAttribute("value","data:page/id,"+b.pages[k].getId());b.pages[k]==b.currentPage&&m.setAttribute("disabled","disabled");null!=l&&l.originalSrc==m.getAttribute("value")&&(m.setAttribute("selected","selected"),t=!0);g.appendChild(m)}u||null!=b.pages&&1!=b.pages.length||(E.style.display="none",c.style.display="none",g.style.display="none");var p=document.createElement("option"),v=!1,x=!1,z=function(q,D){v||null!=q&&x||(c.checked?null!=D&&D(p.selected?null:
-g.value):""==e.value||b.isOffline()?(L.value="",N.value="",null!=D&&D("")):(e.value=mxUtils.trim(e.value),b.loadImage(e.value,function(A){L.value=A.width;N.value=A.height;null!=D&&D(e.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));L.value="";N.value="";null!=D&&D(null)})))},y=mxUtils.bind(this,function(q){b.importFiles(q,0,0,b.maxBackgroundSize,function(D,A,C,G,M,H){e.value=D;z();e.focus()},function(){},function(D){return"image/"==D.type.substring(0,
-6)},function(D){for(var A=0;A<D.length;A++)D[A]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0)});this.init=function(){u?g.focus():e.focus();mxEvent.addListener(g,"focus",function(){E.removeAttribute("checked");c.setAttribute("checked","checked");c.checked=!0});mxEvent.addListener(e,"focus",function(){c.removeAttribute("checked");E.setAttribute("checked","checked");E.checked=!0});if(Graph.fileSupport){e.setAttribute("placeholder",mxResources.get("dragImagesHere"));var q=d.parentNode,D=null;mxEvent.addListener(q,
-"dragleave",function(A){null!=D&&(D.parentNode.removeChild(D),D=null);A.stopPropagation();A.preventDefault()});mxEvent.addListener(q,"dragover",mxUtils.bind(this,function(A){null==D&&(!mxClient.IS_IE||10<document.documentMode)&&(D=b.highlightElement(q));A.stopPropagation();A.preventDefault()}));mxEvent.addListener(q,"drop",mxUtils.bind(this,function(A){null!=D&&(D.parentNode.removeChild(D),D=null);if(0<A.dataTransfer.files.length)y(A.dataTransfer.files);else if(0<=mxUtils.indexOf(A.dataTransfer.types,
-"text/uri-list")){var C=A.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(C)&&(e.value=decodeURIComponent(C),z())}A.stopPropagation();A.preventDefault()}),!1)}};d.appendChild(E);d.appendChild(e);mxUtils.br(d);k=document.createElement("span");k.style.marginLeft="30px";mxUtils.write(k,mxResources.get("width")+":");d.appendChild(k);var L=document.createElement("input");L.setAttribute("type","text");L.style.width="60px";L.style.marginLeft="8px";L.style.marginRight="16px";
-L.value=null==l||u?"":l.width;d.appendChild(L);mxUtils.write(d,mxResources.get("height")+":");var N=document.createElement("input");N.setAttribute("type","text");N.style.width="60px";N.style.marginLeft="8px";N.style.marginRight="16px";N.value=null==l||u?"":l.height;d.appendChild(N);mxUtils.br(d);mxUtils.br(d);mxEvent.addListener(e,"change",z);ImageDialog.filePicked=function(q){q.action==google.picker.Action.PICKED&&null!=q.docs[0].thumbnails&&(q=q.docs[0].thumbnails[q.docs[0].thumbnails.length-1],
-null!=q&&(e.value=q.url,z()));e.focus()};d.appendChild(c);d.appendChild(g);mxUtils.br(d);u?(c.setAttribute("checked","checked"),c.checked=!0):(E.setAttribute("checked","checked"),E.checked=!0);!t&&c.checked&&(mxUtils.write(p,mxResources.get("pageNotFound")),p.setAttribute("disabled","disabled"),p.setAttribute("selected","selected"),p.setAttribute("value","pageNotFound"),g.appendChild(p),mxEvent.addListener(g,"change",function(){null==p.parentNode||p.selected||p.parentNode.removeChild(p)}));l=document.createElement("div");
-l.style.marginTop="30px";l.style.textAlign="right";t=mxUtils.button(mxResources.get("cancel"),function(){v=!0;b.hideDialog()});t.className="geBtn";b.editor.cancelFirst&&l.appendChild(t);k=mxUtils.button(mxResources.get("reset"),function(){e.value="";L.value="";N.value="";E.checked=!0;v=!1});mxEvent.addGestureListeners(k,function(){v=!0});k.className="geBtn";k.width="100";l.appendChild(k);if(Graph.fileSupport){var J=document.createElement("input");J.setAttribute("multiple","multiple");J.setAttribute("type",
-"file");mxEvent.addListener(J,"change",function(q){null!=J.files&&(y(J.files),J.type="",J.type="file",J.value="")});J.style.display="none";d.appendChild(J);k=mxUtils.button(mxResources.get("open"),function(){J.click()});k.className="geBtn";l.appendChild(k)}applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();z(null,function(q){f(""!=q&&null!=q?new mxImage(q,L.value,N.value):null,null==q)})});mxEvent.addGestureListeners(applyBtn,function(){x=!0});applyBtn.className="geBtn gePrimaryBtn";
-l.appendChild(applyBtn);b.editor.cancelFirst||l.appendChild(t);d.appendChild(l);this.container=d},ParseDialog=function(b,f,l){function d(v,x,z){var y=v.split("\n");if("plantUmlPng"==x||"plantUmlSvg"==x||"plantUmlTxt"==x){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var L=function(X,O,W,U,n){u=mxEvent.isAltDown(z)?u:N.getCenterInsertPoint(new mxRectangle(0,0,U,n));var B=null;N.getModel().beginUpdate();try{B="txt"==O?b.insertAsPreText(W,u.x,u.y):N.insertVertex(null,null,null,u.x,u.y,
-U,n,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(W)+";"),N.setAttributeForCell(B,"plantUmlData",JSON.stringify({data:X,format:O},null,2))}finally{N.getModel().endUpdate()}null!=B&&(N.setSelectionCell(B),N.scrollCellToVisible(B))},N=b.editor.graph,J="plantUmlTxt"==x?"txt":"plantUmlPng"==x?"png":"svg";"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml"==
-v&&"svg"==J?window.setTimeout(function(){b.spinner.stop();L(v,J,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",
-295,212)},200):b.generatePlantUmlImage(v,J,function(X,O,W){b.spinner.stop();L(v,J,X,O,W)},function(X){b.handleError(X)})}}else if("mermaid"==x)b.spinner.spin(document.body,mxResources.get("inserting"))&&(N=b.editor.graph,b.generateMermaidImage(v,J,function(X,O,W){u=mxEvent.isAltDown(z)?u:N.getCenterInsertPoint(new mxRectangle(0,0,O,W));b.spinner.stop();var U=null;N.getModel().beginUpdate();try{U=N.insertVertex(null,null,null,u.x,u.y,O,W,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+
-X+";"),N.setAttributeForCell(U,"mermaidData",JSON.stringify({data:v,config:EditorUi.defaultMermaidConfig},null,2))}finally{N.getModel().endUpdate()}null!=U&&(N.setSelectionCell(U),N.scrollCellToVisible(U))},function(X){b.handleError(X)}));else if("table"==x){x=null;for(var q=[],D=0,A={},C=0;C<y.length;C++){var G=mxUtils.trim(y[C]);if("primary key"==G.substring(0,11).toLowerCase()){var M=G.match(/\((.+)\)/);M&&M[1]&&(A[M[1]]=!0);y.splice(C,1)}else 0<G.toLowerCase().indexOf("primary key")&&(A[G.split(" ")[0]]=
-!0,y[C]=mxUtils.trim(G.replace(/primary key/i,"")))}for(C=0;C<y.length;C++)if(G=mxUtils.trim(y[C]),"create table"==G.substring(0,12).toLowerCase())G=mxUtils.trim(G.substring(12)),"("==G.charAt(G.length-1)&&(G=mxUtils.trim(G.substring(0,G.length-1))),x=new mxCell(G,new mxGeometry(D,0,160,40),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),x.vertex=!0,q.push(x),G=b.editor.graph.getPreferredSizeForCell(H),null!=
-G&&(x.geometry.width=G.width+10);else if(null!=x&&")"==G.charAt(0))D+=x.geometry.width+40,x=null;else if("("!=G&&null!=x){G=G.substring(0,","==G.charAt(G.length-1)?G.length-1:G.length);M=A[G.split(" ")[0]];var H=new mxCell("",new mxGeometry(0,0,160,30),"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom="+(M?"1":"0")+";");H.vertex=!0;var F=new mxCell(M?"PK":"",
-new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;"+(M?"fontStyle=1;":""));F.vertex=!0;H.insert(F);G=new mxCell(G,new mxGeometry(30,0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;align=left;top=0;left=0;bottom=0;right=0;spacingLeft=6;"+(M?"fontStyle=5;":""));G.vertex=!0;H.insert(G);G=b.editor.graph.getPreferredSizeForCell(G);null!=G&&x.geometry.width<G.width+30&&(x.geometry.width=Math.min(320,
-Math.max(x.geometry.width,G.width+30)));x.insert(H,M?0:null);x.geometry.height+=30}0<q.length&&(N=b.editor.graph,u=mxEvent.isAltDown(z)?u:N.getCenterInsertPoint(N.getBoundingBoxFromGeometry(q,!0)),N.setSelectionCells(N.importCells(q,u.x,u.y)),N.scrollCellToVisible(N.getSelectionCell()))}else if("list"==x){if(0<y.length){N=b.editor.graph;H=null;q=[];for(C=x=0;C<y.length;C++)";"!=y[C].charAt(0)&&(0==y[C].length?H=null:null==H?(H=new mxCell(y[C],new mxGeometry(x,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),G=N.getPreferredSizeForCell(H),null!=G&&H.geometry.width<G.width+10&&(H.geometry.width=G.width+10),x+=H.geometry.width+40):"--"==y[C]?(G=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;"),G.vertex=!0,H.geometry.height+=G.geometry.height,H.insert(G)):0<y[C].length&&(D=new mxCell(y[C],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),
-D.vertex=!0,G=N.getPreferredSizeForCell(D),null!=G&&D.geometry.width<G.width&&(D.geometry.width=G.width),H.geometry.width=Math.max(H.geometry.width,D.geometry.width),H.geometry.height+=D.geometry.height,H.insert(D)));if(0<q.length){u=mxEvent.isAltDown(z)?u:N.getCenterInsertPoint(N.getBoundingBoxFromGeometry(q,!0));N.getModel().beginUpdate();try{q=N.importCells(q,u.x,u.y);G=[];for(C=0;C<q.length;C++)G.push(q[C]),G=G.concat(q[C].children);N.fireEvent(new mxEventObject("cellsInserted","cells",G))}finally{N.getModel().endUpdate()}N.setSelectionCells(q);
-N.scrollCellToVisible(N.getSelectionCell())}}}else{H=function(X){var O=I[X];null==O&&(O=new mxCell(X,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),O.vertex=!0,I[X]=O,q.push(O));return O};var I={};q=[];for(C=0;C<y.length;C++)if(";"!=y[C].charAt(0)){var R=y[C].split("->");2<=R.length&&(M=H(R[0]),F=H(R[R.length-1]),R=new mxCell(2<R.length?R[1]:"",new mxGeometry),R.edge=!0,M.insertEdge(R,!0),F.insertEdge(R,!1),q.push(R))}if(0<q.length){y=document.createElement("div");y.style.visibility="hidden";
+mxResources.get("pageWithNumber",[k+1]));m.setAttribute("value","data:page/id,"+b.pages[k].getId());b.pages[k]==b.currentPage&&m.setAttribute("disabled","disabled");null!=l&&l.originalSrc==m.getAttribute("value")&&(m.setAttribute("selected","selected"),t=!0);g.appendChild(m)}u||null!=b.pages&&1!=b.pages.length||(E.style.display="none",c.style.display="none",g.style.display="none");var p=document.createElement("option"),v=!1,x=!1,A=function(q,D){v||null!=q&&x||(c.checked?null!=D&&D(p.selected?null:
+g.value):""==e.value||b.isOffline()?(L.value="",N.value="",null!=D&&D("")):(e.value=mxUtils.trim(e.value),b.loadImage(e.value,function(z){L.value=z.width;N.value=z.height;null!=D&&D(e.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));L.value="";N.value="";null!=D&&D(null)})))},y=mxUtils.bind(this,function(q){b.importFiles(q,0,0,b.maxBackgroundSize,function(D,z,C,G,H,M){e.value=D;A();e.focus()},function(){},function(D){return"image/"==D.type.substring(0,
+6)},function(D){for(var z=0;z<D.length;z++)D[z]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0)});this.init=function(){u?g.focus():e.focus();mxEvent.addListener(g,"focus",function(){E.removeAttribute("checked");c.setAttribute("checked","checked");c.checked=!0});mxEvent.addListener(e,"focus",function(){c.removeAttribute("checked");E.setAttribute("checked","checked");E.checked=!0});if(Graph.fileSupport){e.setAttribute("placeholder",mxResources.get("dragImagesHere"));var q=d.parentNode,D=null;mxEvent.addListener(q,
+"dragleave",function(z){null!=D&&(D.parentNode.removeChild(D),D=null);z.stopPropagation();z.preventDefault()});mxEvent.addListener(q,"dragover",mxUtils.bind(this,function(z){null==D&&(!mxClient.IS_IE||10<document.documentMode)&&(D=b.highlightElement(q));z.stopPropagation();z.preventDefault()}));mxEvent.addListener(q,"drop",mxUtils.bind(this,function(z){null!=D&&(D.parentNode.removeChild(D),D=null);if(0<z.dataTransfer.files.length)y(z.dataTransfer.files);else if(0<=mxUtils.indexOf(z.dataTransfer.types,
+"text/uri-list")){var C=z.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(C)&&(e.value=decodeURIComponent(C),A())}z.stopPropagation();z.preventDefault()}),!1)}};d.appendChild(E);d.appendChild(e);mxUtils.br(d);k=document.createElement("span");k.style.marginLeft="30px";mxUtils.write(k,mxResources.get("width")+":");d.appendChild(k);var L=document.createElement("input");L.setAttribute("type","text");L.style.width="60px";L.style.marginLeft="8px";L.style.marginRight="16px";
+L.value=null==l||u?"":l.width;d.appendChild(L);mxUtils.write(d,mxResources.get("height")+":");var N=document.createElement("input");N.setAttribute("type","text");N.style.width="60px";N.style.marginLeft="8px";N.style.marginRight="16px";N.value=null==l||u?"":l.height;d.appendChild(N);mxUtils.br(d);mxUtils.br(d);mxEvent.addListener(e,"change",A);ImageDialog.filePicked=function(q){q.action==google.picker.Action.PICKED&&null!=q.docs[0].thumbnails&&(q=q.docs[0].thumbnails[q.docs[0].thumbnails.length-1],
+null!=q&&(e.value=q.url,A()));e.focus()};d.appendChild(c);d.appendChild(g);mxUtils.br(d);u?(c.setAttribute("checked","checked"),c.checked=!0):(E.setAttribute("checked","checked"),E.checked=!0);!t&&c.checked&&(mxUtils.write(p,mxResources.get("pageNotFound")),p.setAttribute("disabled","disabled"),p.setAttribute("selected","selected"),p.setAttribute("value","pageNotFound"),g.appendChild(p),mxEvent.addListener(g,"change",function(){null==p.parentNode||p.selected||p.parentNode.removeChild(p)}));l=document.createElement("div");
+l.style.marginTop="30px";l.style.textAlign="right";t=mxUtils.button(mxResources.get("cancel"),function(){v=!0;b.hideDialog()});t.className="geBtn";b.editor.cancelFirst&&l.appendChild(t);k=mxUtils.button(mxResources.get("reset"),function(){e.value="";L.value="";N.value="";E.checked=!0;v=!1});mxEvent.addGestureListeners(k,function(){v=!0});k.className="geBtn";k.width="100";l.appendChild(k);if(Graph.fileSupport){var I=document.createElement("input");I.setAttribute("multiple","multiple");I.setAttribute("type",
+"file");mxEvent.addListener(I,"change",function(q){null!=I.files&&(y(I.files),I.type="",I.type="file",I.value="")});I.style.display="none";d.appendChild(I);k=mxUtils.button(mxResources.get("open"),function(){I.click()});k.className="geBtn";l.appendChild(k)}applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();A(null,function(q){f(""!=q&&null!=q?new mxImage(q,L.value,N.value):null,null==q)})});mxEvent.addGestureListeners(applyBtn,function(){x=!0});applyBtn.className="geBtn gePrimaryBtn";
+l.appendChild(applyBtn);b.editor.cancelFirst||l.appendChild(t);d.appendChild(l);this.container=d},ParseDialog=function(b,f,l){function d(v,x,A){var y=v.split("\n");if("plantUmlPng"==x||"plantUmlSvg"==x||"plantUmlTxt"==x){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var L=function(X,P,V,W,n){u=mxEvent.isAltDown(A)?u:N.getCenterInsertPoint(new mxRectangle(0,0,W,n));var B=null;N.getModel().beginUpdate();try{B="txt"==P?b.insertAsPreText(V,u.x,u.y):N.insertVertex(null,null,null,u.x,u.y,
+W,n,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(V)+";"),N.setAttributeForCell(B,"plantUmlData",JSON.stringify({data:X,format:P},null,2))}finally{N.getModel().endUpdate()}null!=B&&(N.setSelectionCell(B),N.scrollCellToVisible(B))},N=b.editor.graph,I="plantUmlTxt"==x?"txt":"plantUmlPng"==x?"png":"svg";"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml"==
+v&&"svg"==I?window.setTimeout(function(){b.spinner.stop();L(v,I,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",
+295,212)},200):b.generatePlantUmlImage(v,I,function(X,P,V){b.spinner.stop();L(v,I,X,P,V)},function(X){b.handleError(X)})}}else if("mermaid"==x)b.spinner.spin(document.body,mxResources.get("inserting"))&&(N=b.editor.graph,b.generateMermaidImage(v,I,function(X,P,V){u=mxEvent.isAltDown(A)?u:N.getCenterInsertPoint(new mxRectangle(0,0,P,V));b.spinner.stop();var W=null;N.getModel().beginUpdate();try{W=N.insertVertex(null,null,null,u.x,u.y,P,V,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+
+X+";"),N.setAttributeForCell(W,"mermaidData",JSON.stringify({data:v,config:EditorUi.defaultMermaidConfig},null,2))}finally{N.getModel().endUpdate()}null!=W&&(N.setSelectionCell(W),N.scrollCellToVisible(W))},function(X){b.handleError(X)}));else if("table"==x){x=null;for(var q=[],D=0,z={},C=0;C<y.length;C++){var G=mxUtils.trim(y[C]);if("primary key"==G.substring(0,11).toLowerCase()){var H=G.match(/\((.+)\)/);H&&H[1]&&(z[H[1]]=!0);y.splice(C,1)}else 0<G.toLowerCase().indexOf("primary key")&&(z[G.split(" ")[0]]=
+!0,y[C]=mxUtils.trim(G.replace(/primary key/i,"")))}for(C=0;C<y.length;C++)if(G=mxUtils.trim(y[C]),"create table"==G.substring(0,12).toLowerCase())G=mxUtils.trim(G.substring(12)),"("==G.charAt(G.length-1)&&(G=mxUtils.trim(G.substring(0,G.length-1))),x=new mxCell(G,new mxGeometry(D,0,160,40),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),x.vertex=!0,q.push(x),G=b.editor.graph.getPreferredSizeForCell(M),null!=
+G&&(x.geometry.width=G.width+10);else if(null!=x&&")"==G.charAt(0))D+=x.geometry.width+40,x=null;else if("("!=G&&null!=x){G=G.substring(0,","==G.charAt(G.length-1)?G.length-1:G.length);H=z[G.split(" ")[0]];var M=new mxCell("",new mxGeometry(0,0,160,30),"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom="+(H?"1":"0")+";");M.vertex=!0;var F=new mxCell(H?"PK":"",
+new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;"+(H?"fontStyle=1;":""));F.vertex=!0;M.insert(F);G=new mxCell(G,new mxGeometry(30,0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;align=left;top=0;left=0;bottom=0;right=0;spacingLeft=6;"+(H?"fontStyle=5;":""));G.vertex=!0;M.insert(G);G=b.editor.graph.getPreferredSizeForCell(G);null!=G&&x.geometry.width<G.width+30&&(x.geometry.width=Math.min(320,
+Math.max(x.geometry.width,G.width+30)));x.insert(M,H?0:null);x.geometry.height+=30}0<q.length&&(N=b.editor.graph,u=mxEvent.isAltDown(A)?u:N.getCenterInsertPoint(N.getBoundingBoxFromGeometry(q,!0)),N.setSelectionCells(N.importCells(q,u.x,u.y)),N.scrollCellToVisible(N.getSelectionCell()))}else if("list"==x){if(0<y.length){N=b.editor.graph;M=null;q=[];for(C=x=0;C<y.length;C++)";"!=y[C].charAt(0)&&(0==y[C].length?M=null:null==M?(M=new mxCell(y[C],new mxGeometry(x,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),
+M.vertex=!0,q.push(M),G=N.getPreferredSizeForCell(M),null!=G&&M.geometry.width<G.width+10&&(M.geometry.width=G.width+10),x+=M.geometry.width+40):"--"==y[C]?(G=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;"),G.vertex=!0,M.geometry.height+=G.geometry.height,M.insert(G)):0<y[C].length&&(D=new mxCell(y[C],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),
+D.vertex=!0,G=N.getPreferredSizeForCell(D),null!=G&&D.geometry.width<G.width&&(D.geometry.width=G.width),M.geometry.width=Math.max(M.geometry.width,D.geometry.width),M.geometry.height+=D.geometry.height,M.insert(D)));if(0<q.length){u=mxEvent.isAltDown(A)?u:N.getCenterInsertPoint(N.getBoundingBoxFromGeometry(q,!0));N.getModel().beginUpdate();try{q=N.importCells(q,u.x,u.y);G=[];for(C=0;C<q.length;C++)G.push(q[C]),G=G.concat(q[C].children);N.fireEvent(new mxEventObject("cellsInserted","cells",G))}finally{N.getModel().endUpdate()}N.setSelectionCells(q);
+N.scrollCellToVisible(N.getSelectionCell())}}}else{M=function(X){var P=J[X];null==P&&(P=new mxCell(X,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),P.vertex=!0,J[X]=P,q.push(P));return P};var J={};q=[];for(C=0;C<y.length;C++)if(";"!=y[C].charAt(0)){var Q=y[C].split("->");2<=Q.length&&(H=M(Q[0]),F=M(Q[Q.length-1]),Q=new mxCell(2<Q.length?Q[1]:"",new mxGeometry),Q.edge=!0,H.insertEdge(Q,!0),F.insertEdge(Q,!1),q.push(Q))}if(0<q.length){y=document.createElement("div");y.style.visibility="hidden";
document.body.appendChild(y);N=new Graph(y);N.getModel().beginUpdate();try{q=N.importCells(q);for(C=0;C<q.length;C++)N.getModel().isVertex(q[C])&&(G=N.getPreferredSizeForCell(q[C]),q[C].geometry.width=Math.max(q[C].geometry.width,G.width),q[C].geometry.height=Math.max(q[C].geometry.height,G.height));C=!0;"horizontalFlow"==x||"verticalFlow"==x?((new mxHierarchicalLayout(N,"horizontalFlow"==x?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH)).execute(N.getDefaultParent(),q),C=!1):"circle"==x?
-(new mxCircleLayout(N)).execute(N.getDefaultParent()):(D=new mxFastOrganicLayout(N),D.disableEdgeStyle=!1,D.forceConstant=180,D.execute(N.getDefaultParent()));C&&(A=new mxParallelEdgeLayout(N),A.spacing=30,A.execute(N.getDefaultParent()))}finally{N.getModel().endUpdate()}N.clearCellOverlays();G=[];b.editor.graph.getModel().beginUpdate();try{q=N.getModel().getChildren(N.getDefaultParent()),u=mxEvent.isAltDown(z)?u:b.editor.graph.getCenterInsertPoint(N.getBoundingBoxFromGeometry(q,!0)),G=b.editor.graph.importCells(q,
+(new mxCircleLayout(N)).execute(N.getDefaultParent()):(D=new mxFastOrganicLayout(N),D.disableEdgeStyle=!1,D.forceConstant=180,D.execute(N.getDefaultParent()));C&&(z=new mxParallelEdgeLayout(N),z.spacing=30,z.execute(N.getDefaultParent()))}finally{N.getModel().endUpdate()}N.clearCellOverlays();G=[];b.editor.graph.getModel().beginUpdate();try{q=N.getModel().getChildren(N.getDefaultParent()),u=mxEvent.isAltDown(A)?u:b.editor.graph.getCenterInsertPoint(N.getBoundingBoxFromGeometry(q,!0)),G=b.editor.graph.importCells(q,
u.x,u.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",G))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(G);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());N.destroy();y.parentNode.removeChild(y)}}}function t(){return"list"==c.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"==c.value?
"graph TD;\n A--\x3eB;\n A--\x3eC;\n B--\x3eD;\n C--\x3eD;":"table"==c.value?"CREATE TABLE Suppliers\n(\nsupplier_id int NOT NULL PRIMARY KEY,\nsupplier_name char(50) NOT NULL,\ncontact_name char(50),\n);\nCREATE TABLE Customers\n(\ncustomer_id int NOT NULL PRIMARY KEY,\ncustomer_name char(50) NOT NULL,\naddress char(50),\ncity char(50),\nstate char(25),\nzip_code char(10)\n);\n":"plantUmlPng"==c.value?"@startuml\nskinparam backgroundcolor transparent\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":
"plantUmlSvg"==c.value||"plantUmlTxt"==c.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":";Example:\na->b\nb->edge label->c\nc->a\n"}var u=b.editor.graph.getFreeInsertPoint();f=document.createElement("div");f.style.textAlign="right";var E=document.createElement("textarea");E.style.boxSizing="border-box";E.style.resize=
@@ -11124,89 +11124,89 @@ u.x,u.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",G))}
l&&(c.appendChild(e),e.setAttribute("selected","selected"));e=document.createElement("option");e.setAttribute("value","mermaid");mxUtils.write(e,mxResources.get("formatSql"));"mermaid"==l&&(c.appendChild(e),e.setAttribute("selected","selected"));e=document.createElement("option");e.setAttribute("value","diagram");mxUtils.write(e,mxResources.get("diagram"));var g=document.createElement("option");g.setAttribute("value","circle");mxUtils.write(g,mxResources.get("circle"));var k=document.createElement("option");
k.setAttribute("value","horizontalFlow");mxUtils.write(k,mxResources.get("horizontalFlow"));var m=document.createElement("option");m.setAttribute("value","verticalFlow");mxUtils.write(m,mxResources.get("verticalFlow"));"plantUml"!=l&&(c.appendChild(e),c.appendChild(g),c.appendChild(k),c.appendChild(m));e=document.createElement("option");e.setAttribute("value","plantUmlSvg");mxUtils.write(e,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==l&&e.setAttribute("selected",
"selected");g=document.createElement("option");g.setAttribute("value","plantUmlPng");mxUtils.write(g,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");k=document.createElement("option");k.setAttribute("value","plantUmlTxt");mxUtils.write(k,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==l&&(c.appendChild(e),c.appendChild(g),c.appendChild(k));var p=t();E.value=p;f.appendChild(E);this.init=function(){E.focus()};
-Graph.fileSupport&&(E.addEventListener("dragover",function(v){v.stopPropagation();v.preventDefault()},!1),E.addEventListener("drop",function(v){v.stopPropagation();v.preventDefault();if(0<v.dataTransfer.files.length){v=v.dataTransfer.files[0];var x=new FileReader;x.onload=function(z){E.value=z.target.result};x.readAsText(v)}},!1));f.appendChild(c);mxEvent.addListener(c,"change",function(){var v=t();if(0==E.value.length||E.value==p)p=v,E.value=p});b.isOffline()||"mermaid"!=l&&"plantUml"!=l||(e=mxUtils.button(mxResources.get("help"),
+Graph.fileSupport&&(E.addEventListener("dragover",function(v){v.stopPropagation();v.preventDefault()},!1),E.addEventListener("drop",function(v){v.stopPropagation();v.preventDefault();if(0<v.dataTransfer.files.length){v=v.dataTransfer.files[0];var x=new FileReader;x.onload=function(A){E.value=A.target.result};x.readAsText(v)}},!1));f.appendChild(c);mxEvent.addListener(c,"change",function(){var v=t();if(0==E.value.length||E.value==p)p=v,E.value=p});b.isOffline()||"mermaid"!=l&&"plantUml"!=l||(e=mxUtils.button(mxResources.get("help"),
function(){b.openLink("mermaid"==l?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),e.className="geBtn",f.appendChild(e));e=mxUtils.button(mxResources.get("close"),function(){E.value==p?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});e.className="geBtn";b.editor.cancelFirst&&f.appendChild(e);g=mxUtils.button(mxResources.get("insert"),function(v){b.hideDialog();d(E.value,c.value,v)});f.appendChild(g);g.className="geBtn gePrimaryBtn";b.editor.cancelFirst||
-f.appendChild(e);this.container=f},NewDialog=function(b,f,l,d,t,u,E,c,e,g,k,m,p,v,x,z,y,L){function N(ea){null!=ea&&(Ba=Ha=ea?135:140);ea=!0;if(null!=xa)for(;I<xa.length&&(ea||0!=mxUtils.mod(I,30));){var wa=xa[I++];wa=D(wa.url,wa.libs,wa.title,wa.tooltip?wa.tooltip:wa.title,wa.select,wa.imgUrl,wa.info,wa.onClick,wa.preview,wa.noImg,wa.clibs);ea&&wa.click();ea=!1}}function J(){if(Y&&null!=v)l||b.hideDialog(),v(Y,aa,F.value);else if(d)l||b.hideDialog(),d(V,F.value,ca,P);else{var ea=F.value;null!=ea&&
-0<ea.length&&b.pickFolder(b.mode,function(wa){b.createFile(ea,V,null!=P&&0<P.length?P:null,null,function(){b.hideDialog()},null,wa,null,null!=T&&0<T.length?T:null)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}function q(ea,wa,ta,sa,ra,va,ia){null!=S&&(S.style.backgroundColor="transparent",S.style.border="1px solid transparent");X.removeAttribute("disabled");V=wa;P=ta;T=va;S=ea;Y=sa;ca=ia;aa=ra;S.style.backgroundColor=c;S.style.border=e}function D(ea,wa,ta,sa,ra,va,ia,ma,
-ba,fa,na){function la(Ka,Ta){null==Ca?(Oa=Ka,Oa=/^https?:\/\//.test(Oa)&&!b.editor.isCorsEnabledForUrl(Oa)?PROXY_URL+"?url="+encodeURIComponent(Oa):TEMPLATE_PATH+"/"+Oa,mxUtils.get(Oa,mxUtils.bind(this,function(Ua){200<=Ua.getStatus()&&299>=Ua.getStatus()&&(Ca=Ua.getText());Ta(Ca,Oa)}))):Ta(Ca,Oa)}function qa(Ka,Ta,Ua){if(null!=Ka&&mxUtils.isAncestorNode(document.body,ka)){Ka=mxUtils.parseXml(Ka);Ka=Editor.parseDiagramNode(Ka.documentElement);var Va=new mxCodec(Ka.ownerDocument),$a=new mxGraphModel;
-Va.decode(Ka,$a);Ka=$a.root.getChildAt(0).children;b.sidebar.createTooltip(ka,Ka,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!=ta?mxResources.get(ta,null,ta):null,!0,new mxPoint(Ta,Ua),!0,function(){Xa=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;q(ka,null,null,ea,ia,na)},!0,!1)}}function oa(Ka,Ta){null==ea||Sa||
-b.sidebar.currentElt==ka?b.sidebar.hideTooltip():(b.sidebar.hideTooltip(),null!=Ea?(Ta='<mxfile><diagram id="d" name="n">'+Graph.compress('<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="" style="shape=image;image='+Ea.src+';imageAspect=1;" parent="1" vertex="1"><mxGeometry width="'+Ea.naturalWidth+'" height="'+Ea.naturalHeight+'" as="geometry" /></mxCell></root></mxGraphModel>')+"</diagram></mxfile>",qa(Ta,mxEvent.getClientX(Ka),mxEvent.getClientY(Ka))):(b.sidebar.currentElt=
-ka,Sa=!0,la(ea,function(Ua){Sa&&b.sidebar.currentElt==ka&&qa(Ua,mxEvent.getClientX(Ka),mxEvent.getClientY(Ka));Sa=!1})))}var ka=document.createElement("div");ka.className="geTemplate";ka.style.position="relative";ka.style.height=Ba+"px";ka.style.width=Ha+"px";var Ca=null,Oa=ea;Editor.isDarkMode()&&(ka.style.filter="invert(100%)");null!=ta?ka.setAttribute("title",mxResources.get(ta,null,ta)):null!=sa&&0<sa.length&&ka.setAttribute("title",sa);var Sa=!1,Ea=null;if(null!=va){ka.style.display="inline-flex";
-ka.style.justifyContent="center";ka.style.alignItems="center";ra=document.createElement("img");ra.setAttribute("src",va);ra.setAttribute("alt",sa);ra.style.maxWidth=Ba+"px";ra.style.maxHeight=Ha+"px";Ea=ra;var Ia=va.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");ka.appendChild(ra);ra.onerror=function(){this.src!=Ia?this.src=Ia:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(ka,mxUtils.bind(this,function(Ka){q(ka,null,null,ea,ia,na)}),null,null);mxEvent.addListener(ka,
-"dblclick",function(Ka){J();mxEvent.consume(Ka)})}else if(!fa&&null!=ea&&0<ea.length){var Qa=function(Ka){X.setAttribute("disabled","disabled");ka.style.backgroundColor="transparent";ka.style.border="1px solid transparent";R.spin(da);la(ea,function(Ta,Ua){R.stop();null!=Ta&&(q(ka,Ta,wa,null,null,na,Ua),Ka&&J())})};ra=ba||TEMPLATE_PATH+"/"+ea.substring(0,ea.length-4)+".png";ka.style.backgroundImage="url("+ra+")";ka.style.backgroundPosition="center center";ka.style.backgroundRepeat="no-repeat";if(null!=
-ta){sa=document.createElement("table");sa.setAttribute("width","100%");sa.setAttribute("height","100%");sa.style.background=Editor.isDarkMode()?"transparent":"rgba(255,255,255,0.85)";sa.style.lineHeight="1.3em";sa.style.border="inherit";va=document.createElement("tbody");ba=document.createElement("tr");fa=document.createElement("td");fa.setAttribute("align","center");fa.setAttribute("valign","middle");var Ma=document.createElement("span");Ma.style.display="inline-block";Ma.style.padding="4px 8px 4px 8px";
-Ma.style.userSelect="none";Ma.style.borderRadius="3px";Ma.style.background="rgba(255,255,255,0.85)";Ma.style.overflow="hidden";Ma.style.textOverflow="ellipsis";Ma.style.maxWidth=Ba-34+"px";mxUtils.write(Ma,mxResources.get(ta,null,ta));fa.appendChild(Ma);ba.appendChild(fa);va.appendChild(ba);sa.appendChild(va);ka.appendChild(sa)}mxEvent.addGestureListeners(ka,mxUtils.bind(this,function(Ka){Qa()}),null,null);mxEvent.addListener(ka,"dblclick",function(Ka){Qa(!0);mxEvent.consume(Ka)})}else sa=document.createElement("table"),
-sa.setAttribute("width","100%"),sa.setAttribute("height","100%"),sa.style.lineHeight="1.3em",va=document.createElement("tbody"),ba=document.createElement("tr"),fa=document.createElement("td"),fa.setAttribute("align","center"),fa.setAttribute("valign","middle"),Ma=document.createElement("span"),Ma.style.display="inline-block",Ma.style.padding="4px 8px 4px 8px",Ma.style.userSelect="none",Ma.style.borderRadius="3px",Ma.style.background="#ffffff",Ma.style.overflow="hidden",Ma.style.textOverflow="ellipsis",
-Ma.style.maxWidth=Ba-34+"px",mxUtils.write(Ma,mxResources.get(ta,null,ta)),fa.appendChild(Ma),ba.appendChild(fa),va.appendChild(ba),sa.appendChild(va),ka.appendChild(sa),ra&&q(ka),mxEvent.addGestureListeners(ka,mxUtils.bind(this,function(Ka){q(ka,null,null,ea,ia)}),null,null),null!=ma?mxEvent.addListener(ka,"click",ma):(mxEvent.addListener(ka,"click",function(Ka){q(ka,null,null,ea,ia)}),mxEvent.addListener(ka,"dblclick",function(Ka){J();mxEvent.consume(Ka)}));if(null!=ea){var Ra=document.createElement("img");
-Ra.setAttribute("src",Sidebar.prototype.searchImage);Ra.setAttribute("title",mxResources.get("preview"));Ra.className="geActiveButton";Ra.style.position="absolute";Ra.style.cursor="default";Ra.style.padding="8px";Ra.style.right="0px";Ra.style.top="0px";ka.appendChild(Ra);var Xa=!1;mxEvent.addGestureListeners(Ra,mxUtils.bind(this,function(Ka){Xa=b.sidebar.currentElt==ka}),null,null);mxEvent.addListener(Ra,"click",mxUtils.bind(this,function(Ka){Xa||oa(Ka,Ra);mxEvent.consume(Ka)}))}da.appendChild(ka);
-return ka}function A(){function ea(oa,ka){var Ca=mxResources.get(oa);null==Ca&&(Ca=oa.substring(0,1).toUpperCase()+oa.substring(1));18<Ca.length&&(Ca=Ca.substring(0,18)+"&hellip;");return Ca+" ("+ka.length+")"}function wa(oa,ka,Ca){mxEvent.addListener(ka,"click",function(){Fa!=ka&&(Fa.style.backgroundColor="",Fa=ka,Fa.style.backgroundColor=E,da.scrollTop=0,da.innerText="",I=0,xa=Ca?Na[oa][Ca]:pa[oa],W=null,N(!1))})}Ja&&(Ja=!1,mxEvent.addListener(da,"scroll",function(oa){da.scrollTop+da.clientHeight>=
-da.scrollHeight&&(N(),mxEvent.consume(oa))}));if(0<ya){var ta=document.createElement("div");ta.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ta,mxResources.get("custom"));Ga.appendChild(ta);for(var sa in La){var ra=document.createElement("div"),va=sa;ta=La[sa];18<va.length&&(va=va.substring(0,18)+"&hellip;");ra.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";
-ra.setAttribute("title",va+" ("+ta.length+")");mxUtils.write(ra,ra.getAttribute("title"));null!=g&&(ra.style.padding=g);Ga.appendChild(ra);(function(oa,ka){mxEvent.addListener(ra,"click",function(){Fa!=ka&&(Fa.style.backgroundColor="",Fa=ka,Fa.style.backgroundColor=E,da.scrollTop=0,da.innerText="",I=0,xa=La[oa],W=null,N(!1))})})(sa,ra)}ta=document.createElement("div");ta.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ta,"draw.io");Ga.appendChild(ta)}for(sa in pa){va=
-Na[sa];var ia=ra=document.createElement(va?"ul":"div");ta=pa[sa];var ma=ea(sa,ta);if(null!=va){var ba=document.createElement("li"),fa=document.createElement("div");fa.className="geTempTreeCaret";fa.setAttribute("title",ma);mxUtils.write(fa,ma);ia=fa;ba.appendChild(fa);ma=document.createElement("ul");ma.className="geTempTreeNested";ma.style.visibility="hidden";for(var na in va){var la=document.createElement("li"),qa=ea(na,va[na]);la.setAttribute("title",qa);mxUtils.write(la,qa);wa(sa,la,na);ma.appendChild(la)}ba.appendChild(ma);
-ra.className="geTempTree";ra.appendChild(ba);(function(oa,ka){mxEvent.addListener(ka,"click",function(){oa.style.visibility="visible";oa.classList.toggle("geTempTreeActive");oa.classList.toggle("geTempTreeNested")&&setTimeout(function(){oa.style.visibility="hidden"},550);ka.classList.toggle("geTempTreeCaret-down")})})(ma,fa)}else ra.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;",
-ra.setAttribute("title",ma),mxUtils.write(ra,ma);null!=g&&(ra.style.padding=g);Ga.appendChild(ra);null==Fa&&0<ta.length&&(Fa=ra,Fa.style.backgroundColor=E,xa=ta);wa(sa,ia)}N(!1)}var C=500>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);l=null!=l?l:!0;t=null!=t?t:!1;E=null!=E?E:"#ebf2f9";c=null!=c?c:Editor.isDarkMode()?"#a2a2a2":"#e6eff8";e=null!=e?e:Editor.isDarkMode()?"1px dashed #00a8ff":"1px solid #ccd9ea";k=null!=k?k:EditorUi.templateFile;var G=document.createElement("div");
-G.style.userSelect="none";G.style.height="100%";var M=document.createElement("div");M.style.whiteSpace="nowrap";M.style.height="46px";l&&G.appendChild(M);var H=document.createElement("img");H.setAttribute("border","0");H.setAttribute("align","absmiddle");H.style.width="40px";H.style.height="40px";H.style.marginRight="10px";H.style.paddingBottom="4px";H.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_TRELLO?IMAGE_PATH+"/trello-logo.svg":b.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";f||C||!l||M.appendChild(H);l&&mxUtils.write(M,(C?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");H=".drawio";
-b.mode==App.MODE_GOOGLE&&null!=b.drive?H=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?H=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?H=b.oneDrive.extension:b.mode==App.MODE_GITHUB&&null!=b.gitHub?H=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?H=b.gitLab.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(H=b.trello.extension);var F=document.createElement("input");F.setAttribute("value",b.defaultFilename+H);F.style.marginLeft="10px";F.style.width=f||
-C?"144px":"244px";this.init=function(){l&&(F.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?F.select():document.execCommand("selectAll",!1,null));null!=da.parentNode&&null!=da.parentNode.parentNode&&mxEvent.addGestureListeners(da.parentNode.parentNode,mxUtils.bind(this,function(ea){b.sidebar.hideTooltip()}),null,null)};l&&(M.appendChild(F),L?F.style.width=f||C?"350px":"450px":(null!=b.editor.diagramFileTypes&&(L=FilenameDialog.createFileTypes(b,F,b.editor.diagramFileTypes),L.style.marginLeft=
-"6px",L.style.width=f||C?"80px":"180px",M.appendChild(L)),null!=b.editor.fileExtensions&&(C=FilenameDialog.createTypeHint(b,F,b.editor.fileExtensions),C.style.marginTop="12px",M.appendChild(C))));M=!1;var I=0,R=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}),X=mxUtils.button(z||mxResources.get("create"),function(){X.setAttribute("disabled","disabled");J();X.removeAttribute("disabled")});X.className="geBtn gePrimaryBtn";
-if(m||p){var O=[],W=null,U=null,n=null,B=function(ea){X.setAttribute("disabled","disabled");for(var wa=0;wa<O.length;wa++)O[wa].className=wa==ea?"geBtn gePrimaryBtn":"geBtn"};M=!0;z=document.createElement("div");z.style.whiteSpace="nowrap";z.style.height="30px";G.appendChild(z);C=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){Ga.style.display="";ja.style.display="";da.style.left="160px";B(0);da.scrollTop=0;da.innerText="";I=0;W!=xa&&(xa=W,pa=U,ya=n,Ga.innerText="",A(),W=null)});
-O.push(C);z.appendChild(C);var K=function(ea){Ga.style.display="none";ja.style.display="none";da.style.left="30px";B(ea?-1:1);null==W&&(W=xa);da.scrollTop=0;da.innerText="";R.spin(da);var wa=function(ta,sa,ra){I=0;R.stop();xa=ta;ra=ra||{};var va=0,ia;for(ia in ra)va+=ra[ia].length;if(sa)da.innerHTML=sa;else if(0==ta.length&&0==va)da.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found"));else if(da.innerText="",0<va){Ga.style.display="";da.style.left="160px";Ga.innerText=
-"";ya=0;pa={"draw.io":ta};for(ia in ra)pa[ia]=ra[ia];A()}else N(!0)};ea?p(Q.value,wa):m(wa)};m&&(C=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){K()}),z.appendChild(C),O.push(C));if(p){C=document.createElement("span");C.style.marginLeft="10px";C.innerHTML=mxUtils.htmlEntities(mxResources.get("search")+":");z.appendChild(C);var Q=document.createElement("input");Q.style.marginRight="10px";Q.style.marginLeft="10px";Q.style.width="220px";mxEvent.addListener(Q,"keypress",function(ea){13==
-ea.keyCode&&K(!0)});z.appendChild(Q);C=mxUtils.button(mxResources.get("search"),function(){K(!0)});C.className="geBtn";z.appendChild(C)}B(0)}var P=null,T=null,V=null,S=null,Y=null,ca=null,aa=null,da=document.createElement("div");da.style.border="1px solid #d3d3d3";da.style.position="absolute";da.style.left="160px";da.style.right="34px";z=(l?72:40)+(M?30:0);da.style.top=z+"px";da.style.bottom="68px";da.style.margin="6px 0 0 -1px";da.style.padding="6px";da.style.overflow="auto";var ja=document.createElement("div");
-ja.style.cssText="position:absolute;left:30px;width:128px;top:"+z+"px;height:22px;margin-top: 6px;white-space: nowrap";var ha=document.createElement("input");ha.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px";ha.setAttribute("placeholder",mxResources.get("search"));ha.setAttribute("type","text");ja.appendChild(ha);var Z=document.createElement("img"),Da="undefined"!=typeof Sidebar?Sidebar.prototype.searchImage:IMAGE_PATH+"/search.png";Z.setAttribute("src",
-Da);Z.setAttribute("title",mxResources.get("search"));Z.style.position="relative";Z.style.left="-18px";Z.style.top="1px";Z.style.background="url('"+b.editor.transparentImage+"')";ja.appendChild(Z);mxEvent.addListener(Z,"click",function(){Z.getAttribute("src")==Dialog.prototype.closeImage&&(Z.setAttribute("src",Da),Z.setAttribute("title",mxResources.get("search")),ha.value="",null!=Pa&&(Pa.click(),Pa=null));ha.focus()});mxEvent.addListener(ha,"keydown",mxUtils.bind(this,function(ea){if(13==ea.keyCode){var wa=
-ha.value;if(""==wa)null!=Pa&&(Pa.click(),Pa=null);else{if(null==NewDialog.tagsList[k]){var ta={};for(na in pa)for(var sa=pa[na],ra=0;ra<sa.length;ra++){var va=sa[ra];if(null!=va.tags)for(var ia=va.tags.toLowerCase().split(";"),ma=0;ma<ia.length;ma++)null==ta[ia[ma]]&&(ta[ia[ma]]=[]),ta[ia[ma]].push(va)}NewDialog.tagsList[k]=ta}var ba=wa.toLowerCase().split(" ");ta=NewDialog.tagsList[k];if(0<ya&&null==ta.__tagsList__){for(na in La)for(sa=La[na],ra=0;ra<sa.length;ra++)for(va=sa[ra],ia=va.title.split(" "),
-ia.push(na),ma=0;ma<ia.length;ma++){var fa=ia[ma].toLowerCase();null==ta[fa]&&(ta[fa]=[]);ta[fa].push(va)}ta.__tagsList__=!0}var na=[];sa={};for(ra=ia=0;ra<ba.length;ra++)if(0<ba[ra].length){fa=ta[ba[ra]];var la={};na=[];if(null!=fa)for(ma=0;ma<fa.length;ma++)va=fa[ma],0==ia==(null==sa[va.url])&&(la[va.url]=!0,na.push(va));sa=la;ia++}da.scrollTop=0;da.innerText="";I=0;ta=document.createElement("div");ta.style.cssText="border: 1px solid #D3D3D3; padding: 6px; background: #F5F5F5;";mxUtils.write(ta,
-mxResources.get(0==na.length?"noResultsFor":"resultsFor",[wa]));da.appendChild(ta);null!=Fa&&null==Pa&&(Fa.style.backgroundColor="",Pa=Fa,Fa=ta);xa=na;W=null;N(!1)}mxEvent.consume(ea)}}));mxEvent.addListener(ha,"keyup",mxUtils.bind(this,function(ea){""==ha.value?(Z.setAttribute("src",Da),Z.setAttribute("title",mxResources.get("search"))):(Z.setAttribute("src",Dialog.prototype.closeImage),Z.setAttribute("title",mxResources.get("reset")))}));z+=23;var Ga=document.createElement("div");Ga.style.cssText=
-"position:absolute;left:30px;width:128px;top:"+z+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(da,"scroll",function(){b.sidebar.hideTooltip()});var Ba=140,Ha=140,pa={},Na={},La={},ya=0,Ja=!0,Fa=null,Pa=null;pa.basic=[{title:"blankDiagram",select:!0}];var xa=pa.basic;if(!f){var za=function(){mxUtils.get(Aa,function(ea){if(!ua){ua=!0;ea=ea.getXml().documentElement.firstChild;for(var wa={};null!=ea;){if("undefined"!==typeof ea.getAttribute)if("clibs"==ea.nodeName){for(var ta=
-ea.getAttribute("name"),sa=ea.getElementsByTagName("add"),ra=[],va=0;va<sa.length;va++)ra.push(encodeURIComponent(mxUtils.getTextContent(sa[va])));null!=ta&&0<ra.length&&(wa[ta]=ra.join(";"))}else if(ra=ea.getAttribute("url"),null!=ra){sa=ea.getAttribute("section");ta=ea.getAttribute("subsection");if(null==sa&&(va=ra.indexOf("/"),sa=ra.substring(0,va),null==ta)){var ia=ra.indexOf("/",va+1);-1<ia&&(ta=ra.substring(va+1,ia))}va=pa[sa];null==va&&(va=[],pa[sa]=va);ra=ea.getAttribute("clibs");null!=wa[ra]&&
-(ra=wa[ra]);ra={url:ea.getAttribute("url"),libs:ea.getAttribute("libs"),title:ea.getAttribute("title"),tooltip:ea.getAttribute("name")||ea.getAttribute("url"),preview:ea.getAttribute("preview"),clibs:ra,tags:ea.getAttribute("tags")};va.push(ra);null!=ta&&(va=Na[sa],null==va&&(va={},Na[sa]=va),sa=va[ta],null==sa&&(sa=[],va[ta]=sa),sa.push(ra))}ea=ea.nextSibling}R.stop();A()}})};G.appendChild(ja);G.appendChild(Ga);G.appendChild(da);var ua=!1,Aa=k;/^https?:\/\//.test(Aa)&&!b.editor.isCorsEnabledForUrl(Aa)&&
-(Aa=PROXY_URL+"?url="+encodeURIComponent(Aa));R.spin(da);null!=y?y(function(ea,wa){La=ea;n=ya=wa;za()},za):za();U=pa}mxEvent.addListener(F,"keypress",function(ea){b.dialog.container.firstChild==G&&13==ea.keyCode&&J()});y=document.createElement("div");y.style.marginTop=f?"4px":"16px";y.style.textAlign="right";y.style.position="absolute";y.style.left="40px";y.style.bottom="24px";y.style.right="40px";f||b.isOffline()||!l||null!=d||t||(z=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),
-z.className="geBtn",y.appendChild(z));z=mxUtils.button(mxResources.get("cancel"),function(){null!=u&&u();b.hideDialog(!0)});z.className="geBtn";!b.editor.cancelFirst||t&&null==u||y.appendChild(z);f||"1"==urlParams.embed||t||mxClient.IS_ANDROID||mxClient.IS_IOS||"1"==urlParams.noDevice||(f=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var ea=new FilenameDialog(b,"",mxResources.get("create"),function(wa){null!=wa&&0<wa.length&&(wa=b.getUrl(window.location.pathname+"?mode="+b.mode+"&title="+
-encodeURIComponent(F.value)+"&create="+encodeURIComponent(wa)),null==b.getCurrentFile()?window.location.href=wa:window.openWindow(wa))},mxResources.get("url"));b.showDialog(ea.container,300,80,!0,!0);ea.init()}),f.className="geBtn",y.appendChild(f));Graph.fileSupport&&x&&(x=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var ea=document.createElement("input");ea.setAttribute("multiple","multiple");ea.setAttribute("type","file");mxEvent.addListener(ea,"change",function(wa){b.openFiles(ea.files,
-!0);ea.value=""});ea.style.display="none";document.body.appendChild(ea);b.newDlgFileInputElt=ea}b.newDlgFileInputElt.click()}),x.className="geBtn",y.appendChild(x));y.appendChild(X);b.editor.cancelFirst||null!=d||t&&null==u||y.appendChild(z);G.appendChild(y);this.container=G};NewDialog.tagsList={};
-var CreateDialog=function(b,f,l,d,t,u,E,c,e,g,k,m,p,v,x,z,y){function L(M,H,F,I){function R(){mxEvent.addListener(X,"click",function(){var B=F;if(E){var K=q.value,Q=K.lastIndexOf(".");if(0>f.lastIndexOf(".")&&0>Q){B=null!=B?B:G.value;var P="";B==App.MODE_GOOGLE?P=b.drive.extension:B==App.MODE_GITHUB?P=b.gitHub.extension:B==App.MODE_GITLAB?P=b.gitLab.extension:B==App.MODE_TRELLO?P=b.trello.extension:B==App.MODE_DROPBOX?P=b.dropbox.extension:B==App.MODE_ONEDRIVE?P=b.oneDrive.extension:B==App.MODE_DEVICE&&
-(P=".drawio");0<=Q&&(K=K.substring(0,Q));q.value=K+P}}N(F)})}var X=document.createElement("a");X.style.overflow="hidden";var O=document.createElement("img");O.src=M;O.setAttribute("border","0");O.setAttribute("align","absmiddle");O.style.width="60px";O.style.height="60px";O.style.paddingBottom="6px";X.style.display="inline-block";X.className="geBaseButton";X.style.position="relative";X.style.margin="4px";X.style.padding="8px 8px 10px 8px";X.style.whiteSpace="nowrap";X.appendChild(O);X.style.color=
-"gray";X.style.fontSize="11px";var W=document.createElement("div");X.appendChild(W);mxUtils.write(W,H);if(null!=I&&null==b[I]){O.style.visibility="hidden";mxUtils.setOpacity(W,10);var U=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});U.spin(X);var n=window.setTimeout(function(){null==b[I]&&(U.stop(),X.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[I]&&(window.clearTimeout(n),
-mxUtils.setOpacity(W,100),O.style.visibility="",U.stop(),R())}))}else R();A.appendChild(X);++C==m&&(mxUtils.br(A),C=0)}function N(M){var H=q.value;if(null==M||null!=H&&0<H.length)y&&b.hideDialog(),l(H,M,q)}k="1"==urlParams.noDevice?!1:k;E=null!=E?E:!0;c=null!=c?c:!0;m=null!=m?m:4;y=null!=y?y:!0;u=document.createElement("div");u.style.whiteSpace="nowrap";null==d&&b.addLanguageMenu(u);var J=document.createElement("h2");mxUtils.write(J,t||mxResources.get("create"));J.style.marginTop="0px";J.style.marginBottom=
-"24px";u.appendChild(J);mxUtils.write(u,mxResources.get("filename")+":");var q=document.createElement("input");q.setAttribute("value",f);q.style.width="200px";q.style.marginLeft="10px";q.style.marginBottom="20px";q.style.maxWidth="70%";this.init=function(){q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)};u.appendChild(q);null!=z&&(null!=b.editor.diagramFileTypes&&(t=FilenameDialog.createFileTypes(b,q,b.editor.diagramFileTypes),
-t.style.marginLeft="6px",t.style.width="90px",u.appendChild(t)),u.appendChild(FilenameDialog.createTypeHint(b,q,z)));z=null;if("1"!=urlParams.noDevice&&null!=p&&null!=v&&"image/"==v.substring(0,6)&&("image/svg"!=v.substring(0,9)||mxClient.IS_SVG)){q.style.width="160px";t=document.createElement("img");var D=x?p:btoa(unescape(encodeURIComponent(p)));t.setAttribute("src","data:"+v+";base64,"+D);t.style.position="absolute";t.style.top="70px";t.style.right="100px";t.style.maxWidth="120px";t.style.maxHeight=
-"80px";mxUtils.setPrefixedStyle(t.style,"transform","translate(50%,-50%)");u.appendChild(t);mxClient.IS_FF||null==navigator.clipboard||"image/png"!=v||(z=mxUtils.button(mxResources.get("copy"),function(M){M=b.base64ToBlob(D,"image/png");M=new ClipboardItem({"image/png":M,"text/html":new Blob(['<img src="data:'+v+";base64,"+D+'">'],{type:"text/html"})});navigator.clipboard.write([M]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(H){b.handleError(H)}))}),
-z.style.marginTop="6px",z.className="geBtn");e&&Editor.popupsAllowed&&(t.style.cursor="pointer",mxEvent.addGestureListeners(t,null,null,function(M){mxEvent.isPopupTrigger(M)||N("_blank")}))}mxUtils.br(u);var A=document.createElement("div");A.style.textAlign="center";var C=0;A.style.marginTop="6px";u.appendChild(A);var G=document.createElement("select");G.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(p=document.createElement("option"),p.setAttribute("value",
+f.appendChild(e);this.container=f},NewDialog=function(b,f,l,d,t,u,E,c,e,g,k,m,p,v,x,A,y,L){function N(ia){null!=ia&&(Ba=Ga=ia?135:140);ia=!0;if(null!=ya)for(;J<ya.length&&(ia||0!=mxUtils.mod(J,30));){var ja=ya[J++];ja=D(ja.url,ja.libs,ja.title,ja.tooltip?ja.tooltip:ja.title,ja.select,ja.imgUrl,ja.info,ja.onClick,ja.preview,ja.noImg,ja.clibs);ia&&ja.click();ia=!1}}function I(){if(Y&&null!=v)l||b.hideDialog(),v(Y,aa,F.value);else if(d)l||b.hideDialog(),d(S,F.value,ba,O);else{var ia=F.value;null!=ia&&
+0<ia.length&&b.pickFolder(b.mode,function(ja){b.createFile(ia,S,null!=O&&0<O.length?O:null,null,function(){b.hideDialog()},null,ja,null,null!=U&&0<U.length?U:null)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}function q(ia,ja,ua,va,qa,xa,ea){null!=T&&(T.style.backgroundColor="transparent",T.style.border="1px solid transparent");X.removeAttribute("disabled");S=ja;O=ua;U=xa;T=ia;Y=va;ba=ea;aa=qa;T.style.backgroundColor=c;T.style.border=e}function D(ia,ja,ua,va,qa,xa,ea,na,
+pa,ca,fa){function ra(Ka,Ta){null==ta?(La=Ka,La=/^https?:\/\//.test(La)&&!b.editor.isCorsEnabledForUrl(La)?PROXY_URL+"?url="+encodeURIComponent(La):TEMPLATE_PATH+"/"+La,mxUtils.get(La,mxUtils.bind(this,function(Ua){200<=Ua.getStatus()&&299>=Ua.getStatus()&&(ta=Ua.getText());Ta(ta,La)}))):Ta(ta,La)}function ka(Ka,Ta,Ua){if(null!=Ka&&mxUtils.isAncestorNode(document.body,oa)){Ka=mxUtils.parseXml(Ka);Ka=Editor.parseDiagramNode(Ka.documentElement);var Va=new mxCodec(Ka.ownerDocument),$a=new mxGraphModel;
+Va.decode(Ka,$a);Ka=$a.root.getChildAt(0).children;b.sidebar.createTooltip(oa,Ka,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!=ua?mxResources.get(ua,null,ua):null,!0,new mxPoint(Ta,Ua),!0,function(){Xa=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;q(oa,null,null,ia,ea,fa)},!0,!1)}}function la(Ka,Ta){null==ia||Sa||
+b.sidebar.currentElt==oa?b.sidebar.hideTooltip():(b.sidebar.hideTooltip(),null!=Da?(Ta='<mxfile><diagram id="d" name="n">'+Graph.compress('<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="" style="shape=image;image='+Da.src+';imageAspect=1;" parent="1" vertex="1"><mxGeometry width="'+Da.naturalWidth+'" height="'+Da.naturalHeight+'" as="geometry" /></mxCell></root></mxGraphModel>')+"</diagram></mxfile>",ka(Ta,mxEvent.getClientX(Ka),mxEvent.getClientY(Ka))):(b.sidebar.currentElt=
+oa,Sa=!0,ra(ia,function(Ua){Sa&&b.sidebar.currentElt==oa&&ka(Ua,mxEvent.getClientX(Ka),mxEvent.getClientY(Ka));Sa=!1})))}var oa=document.createElement("div");oa.className="geTemplate";oa.style.position="relative";oa.style.height=Ba+"px";oa.style.width=Ga+"px";var ta=null,La=ia;Editor.isDarkMode()&&(oa.style.filter="invert(100%)");null!=ua?oa.setAttribute("title",mxResources.get(ua,null,ua)):null!=va&&0<va.length&&oa.setAttribute("title",va);var Sa=!1,Da=null;if(null!=xa){oa.style.display="inline-flex";
+oa.style.justifyContent="center";oa.style.alignItems="center";qa=document.createElement("img");qa.setAttribute("src",xa);qa.setAttribute("alt",va);qa.style.maxWidth=Ba+"px";qa.style.maxHeight=Ga+"px";Da=qa;var Ha=xa.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");oa.appendChild(qa);qa.onerror=function(){this.src!=Ha?this.src=Ha:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(oa,mxUtils.bind(this,function(Ka){q(oa,null,null,ia,ea,fa)}),null,null);mxEvent.addListener(oa,
+"dblclick",function(Ka){I();mxEvent.consume(Ka)})}else if(!ca&&null!=ia&&0<ia.length){var Qa=function(Ka){X.setAttribute("disabled","disabled");oa.style.backgroundColor="transparent";oa.style.border="1px solid transparent";Q.spin(da);ra(ia,function(Ta,Ua){Q.stop();null!=Ta&&(q(oa,Ta,ja,null,null,fa,Ua),Ka&&I())})};qa=pa||TEMPLATE_PATH+"/"+ia.substring(0,ia.length-4)+".png";oa.style.backgroundImage="url("+qa+")";oa.style.backgroundPosition="center center";oa.style.backgroundRepeat="no-repeat";if(null!=
+ua){va=document.createElement("table");va.setAttribute("width","100%");va.setAttribute("height","100%");va.style.background=Editor.isDarkMode()?"transparent":"rgba(255,255,255,0.85)";va.style.lineHeight="1.3em";va.style.border="inherit";xa=document.createElement("tbody");pa=document.createElement("tr");ca=document.createElement("td");ca.setAttribute("align","center");ca.setAttribute("valign","middle");var Oa=document.createElement("span");Oa.style.display="inline-block";Oa.style.padding="4px 8px 4px 8px";
+Oa.style.userSelect="none";Oa.style.borderRadius="3px";Oa.style.background="rgba(255,255,255,0.85)";Oa.style.overflow="hidden";Oa.style.textOverflow="ellipsis";Oa.style.maxWidth=Ba-34+"px";mxUtils.write(Oa,mxResources.get(ua,null,ua));ca.appendChild(Oa);pa.appendChild(ca);xa.appendChild(pa);va.appendChild(xa);oa.appendChild(va)}mxEvent.addGestureListeners(oa,mxUtils.bind(this,function(Ka){Qa()}),null,null);mxEvent.addListener(oa,"dblclick",function(Ka){Qa(!0);mxEvent.consume(Ka)})}else va=document.createElement("table"),
+va.setAttribute("width","100%"),va.setAttribute("height","100%"),va.style.lineHeight="1.3em",xa=document.createElement("tbody"),pa=document.createElement("tr"),ca=document.createElement("td"),ca.setAttribute("align","center"),ca.setAttribute("valign","middle"),Oa=document.createElement("span"),Oa.style.display="inline-block",Oa.style.padding="4px 8px 4px 8px",Oa.style.userSelect="none",Oa.style.borderRadius="3px",Oa.style.background="#ffffff",Oa.style.overflow="hidden",Oa.style.textOverflow="ellipsis",
+Oa.style.maxWidth=Ba-34+"px",mxUtils.write(Oa,mxResources.get(ua,null,ua)),ca.appendChild(Oa),pa.appendChild(ca),xa.appendChild(pa),va.appendChild(xa),oa.appendChild(va),qa&&q(oa),mxEvent.addGestureListeners(oa,mxUtils.bind(this,function(Ka){q(oa,null,null,ia,ea)}),null,null),null!=na?mxEvent.addListener(oa,"click",na):(mxEvent.addListener(oa,"click",function(Ka){q(oa,null,null,ia,ea)}),mxEvent.addListener(oa,"dblclick",function(Ka){I();mxEvent.consume(Ka)}));if(null!=ia){var Ra=document.createElement("img");
+Ra.setAttribute("src",Sidebar.prototype.searchImage);Ra.setAttribute("title",mxResources.get("preview"));Ra.className="geActiveButton";Ra.style.position="absolute";Ra.style.cursor="default";Ra.style.padding="8px";Ra.style.right="0px";Ra.style.top="0px";oa.appendChild(Ra);var Xa=!1;mxEvent.addGestureListeners(Ra,mxUtils.bind(this,function(Ka){Xa=b.sidebar.currentElt==oa}),null,null);mxEvent.addListener(Ra,"click",mxUtils.bind(this,function(Ka){Xa||la(Ka,Ra);mxEvent.consume(Ka)}))}da.appendChild(oa);
+return oa}function z(){function ia(la,oa){var ta=mxResources.get(la);null==ta&&(ta=la.substring(0,1).toUpperCase()+la.substring(1));18<ta.length&&(ta=ta.substring(0,18)+"&hellip;");return ta+" ("+oa.length+")"}function ja(la,oa,ta){mxEvent.addListener(oa,"click",function(){Ea!=oa&&(Ea.style.backgroundColor="",Ea=oa,Ea.style.backgroundColor=E,da.scrollTop=0,da.innerText="",J=0,ya=ta?Ma[la][ta]:sa[la],V=null,N(!1))})}Ja&&(Ja=!1,mxEvent.addListener(da,"scroll",function(la){da.scrollTop+da.clientHeight>=
+da.scrollHeight&&(N(),mxEvent.consume(la))}));if(0<za){var ua=document.createElement("div");ua.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ua,mxResources.get("custom"));Ca.appendChild(ua);for(var va in Na){var qa=document.createElement("div"),xa=va;ua=Na[va];18<xa.length&&(xa=xa.substring(0,18)+"&hellip;");qa.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";
+qa.setAttribute("title",xa+" ("+ua.length+")");mxUtils.write(qa,qa.getAttribute("title"));null!=g&&(qa.style.padding=g);Ca.appendChild(qa);(function(la,oa){mxEvent.addListener(qa,"click",function(){Ea!=oa&&(Ea.style.backgroundColor="",Ea=oa,Ea.style.backgroundColor=E,da.scrollTop=0,da.innerText="",J=0,ya=Na[la],V=null,N(!1))})})(va,qa)}ua=document.createElement("div");ua.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ua,"draw.io");Ca.appendChild(ua)}for(va in sa){xa=
+Ma[va];var ea=qa=document.createElement(xa?"ul":"div");ua=sa[va];var na=ia(va,ua);if(null!=xa){var pa=document.createElement("li"),ca=document.createElement("div");ca.className="geTempTreeCaret";ca.setAttribute("title",na);mxUtils.write(ca,na);ea=ca;pa.appendChild(ca);na=document.createElement("ul");na.className="geTempTreeNested";na.style.visibility="hidden";for(var fa in xa){var ra=document.createElement("li"),ka=ia(fa,xa[fa]);ra.setAttribute("title",ka);mxUtils.write(ra,ka);ja(va,ra,fa);na.appendChild(ra)}pa.appendChild(na);
+qa.className="geTempTree";qa.appendChild(pa);(function(la,oa){mxEvent.addListener(oa,"click",function(){la.style.visibility="visible";la.classList.toggle("geTempTreeActive");la.classList.toggle("geTempTreeNested")&&setTimeout(function(){la.style.visibility="hidden"},550);oa.classList.toggle("geTempTreeCaret-down")})})(na,ca)}else qa.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;",
+qa.setAttribute("title",na),mxUtils.write(qa,na);null!=g&&(qa.style.padding=g);Ca.appendChild(qa);null==Ea&&0<ua.length&&(Ea=qa,Ea.style.backgroundColor=E,ya=ua);ja(va,ea)}N(!1)}var C=500>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);l=null!=l?l:!0;t=null!=t?t:!1;E=null!=E?E:"#ebf2f9";c=null!=c?c:Editor.isDarkMode()?"#a2a2a2":"#e6eff8";e=null!=e?e:Editor.isDarkMode()?"1px dashed #00a8ff":"1px solid #ccd9ea";k=null!=k?k:EditorUi.templateFile;var G=document.createElement("div");
+G.style.userSelect="none";G.style.height="100%";var H=document.createElement("div");H.style.whiteSpace="nowrap";H.style.height="46px";l&&G.appendChild(H);var M=document.createElement("img");M.setAttribute("border","0");M.setAttribute("align","absmiddle");M.style.width="40px";M.style.height="40px";M.style.marginRight="10px";M.style.paddingBottom="4px";M.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_TRELLO?IMAGE_PATH+"/trello-logo.svg":b.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";f||C||!l||H.appendChild(M);l&&mxUtils.write(H,(C?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");M=".drawio";
+b.mode==App.MODE_GOOGLE&&null!=b.drive?M=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?M=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?M=b.oneDrive.extension:b.mode==App.MODE_GITHUB&&null!=b.gitHub?M=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?M=b.gitLab.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(M=b.trello.extension);var F=document.createElement("input");F.setAttribute("value",b.defaultFilename+M);F.style.marginLeft="10px";F.style.width=f||
+C?"144px":"244px";this.init=function(){l&&(F.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?F.select():document.execCommand("selectAll",!1,null));null!=da.parentNode&&null!=da.parentNode.parentNode&&mxEvent.addGestureListeners(da.parentNode.parentNode,mxUtils.bind(this,function(ia){b.sidebar.hideTooltip()}),null,null)};l&&(H.appendChild(F),L?F.style.width=f||C?"350px":"450px":(null!=b.editor.diagramFileTypes&&(L=FilenameDialog.createFileTypes(b,F,b.editor.diagramFileTypes),L.style.marginLeft=
+"6px",L.style.width=f||C?"80px":"180px",H.appendChild(L)),null!=b.editor.fileExtensions&&(C=FilenameDialog.createTypeHint(b,F,b.editor.fileExtensions),C.style.marginTop="12px",H.appendChild(C))));H=!1;var J=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}),X=mxUtils.button(A||mxResources.get("create"),function(){X.setAttribute("disabled","disabled");I();X.removeAttribute("disabled")});X.className="geBtn gePrimaryBtn";
+if(m||p){var P=[],V=null,W=null,n=null,B=function(ia){X.setAttribute("disabled","disabled");for(var ja=0;ja<P.length;ja++)P[ja].className=ja==ia?"geBtn gePrimaryBtn":"geBtn"};H=!0;A=document.createElement("div");A.style.whiteSpace="nowrap";A.style.height="30px";G.appendChild(A);C=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){Ca.style.display="";ha.style.display="";da.style.left="160px";B(0);da.scrollTop=0;da.innerText="";J=0;V!=ya&&(ya=V,sa=W,za=n,Ca.innerText="",z(),V=null)});
+P.push(C);A.appendChild(C);var K=function(ia){Ca.style.display="none";ha.style.display="none";da.style.left="30px";B(ia?-1:1);null==V&&(V=ya);da.scrollTop=0;da.innerText="";Q.spin(da);var ja=function(ua,va,qa){J=0;Q.stop();ya=ua;qa=qa||{};var xa=0,ea;for(ea in qa)xa+=qa[ea].length;if(va)da.innerHTML=va;else if(0==ua.length&&0==xa)da.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found"));else if(da.innerText="",0<xa){Ca.style.display="";da.style.left="160px";Ca.innerText=
+"";za=0;sa={"draw.io":ua};for(ea in qa)sa[ea]=qa[ea];z()}else N(!0)};ia?p(R.value,ja):m(ja)};m&&(C=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){K()}),A.appendChild(C),P.push(C));if(p){C=document.createElement("span");C.style.marginLeft="10px";C.innerHTML=mxUtils.htmlEntities(mxResources.get("search")+":");A.appendChild(C);var R=document.createElement("input");R.style.marginRight="10px";R.style.marginLeft="10px";R.style.width="220px";mxEvent.addListener(R,"keypress",function(ia){13==
+ia.keyCode&&K(!0)});A.appendChild(R);C=mxUtils.button(mxResources.get("search"),function(){K(!0)});C.className="geBtn";A.appendChild(C)}B(0)}var O=null,U=null,S=null,T=null,Y=null,ba=null,aa=null,da=document.createElement("div");da.style.border="1px solid #d3d3d3";da.style.position="absolute";da.style.left="160px";da.style.right="34px";A=(l?72:40)+(H?30:0);da.style.top=A+"px";da.style.bottom="68px";da.style.margin="6px 0 0 -1px";da.style.padding="6px";da.style.overflow="auto";var ha=document.createElement("div");
+ha.style.cssText="position:absolute;left:30px;width:128px;top:"+A+"px;height:22px;margin-top: 6px;white-space: nowrap";var ma=document.createElement("input");ma.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px";ma.setAttribute("placeholder",mxResources.get("search"));ma.setAttribute("type","text");ha.appendChild(ma);var Z=document.createElement("img"),Fa="undefined"!=typeof Sidebar?Sidebar.prototype.searchImage:IMAGE_PATH+"/search.png";Z.setAttribute("src",
+Fa);Z.setAttribute("title",mxResources.get("search"));Z.style.position="relative";Z.style.left="-18px";Z.style.top="1px";Z.style.background="url('"+b.editor.transparentImage+"')";ha.appendChild(Z);mxEvent.addListener(Z,"click",function(){Z.getAttribute("src")==Dialog.prototype.closeImage&&(Z.setAttribute("src",Fa),Z.setAttribute("title",mxResources.get("search")),ma.value="",null!=Pa&&(Pa.click(),Pa=null));ma.focus()});mxEvent.addListener(ma,"keydown",mxUtils.bind(this,function(ia){if(13==ia.keyCode){var ja=
+ma.value;if(""==ja)null!=Pa&&(Pa.click(),Pa=null);else{if(null==NewDialog.tagsList[k]){var ua={};for(fa in sa)for(var va=sa[fa],qa=0;qa<va.length;qa++){var xa=va[qa];if(null!=xa.tags)for(var ea=xa.tags.toLowerCase().split(";"),na=0;na<ea.length;na++)null==ua[ea[na]]&&(ua[ea[na]]=[]),ua[ea[na]].push(xa)}NewDialog.tagsList[k]=ua}var pa=ja.toLowerCase().split(" ");ua=NewDialog.tagsList[k];if(0<za&&null==ua.__tagsList__){for(fa in Na)for(va=Na[fa],qa=0;qa<va.length;qa++)for(xa=va[qa],ea=xa.title.split(" "),
+ea.push(fa),na=0;na<ea.length;na++){var ca=ea[na].toLowerCase();null==ua[ca]&&(ua[ca]=[]);ua[ca].push(xa)}ua.__tagsList__=!0}var fa=[];va={};for(qa=ea=0;qa<pa.length;qa++)if(0<pa[qa].length){ca=ua[pa[qa]];var ra={};fa=[];if(null!=ca)for(na=0;na<ca.length;na++)xa=ca[na],0==ea==(null==va[xa.url])&&(ra[xa.url]=!0,fa.push(xa));va=ra;ea++}da.scrollTop=0;da.innerText="";J=0;ua=document.createElement("div");ua.style.cssText="border: 1px solid #D3D3D3; padding: 6px; background: #F5F5F5;";mxUtils.write(ua,
+mxResources.get(0==fa.length?"noResultsFor":"resultsFor",[ja]));da.appendChild(ua);null!=Ea&&null==Pa&&(Ea.style.backgroundColor="",Pa=Ea,Ea=ua);ya=fa;V=null;N(!1)}mxEvent.consume(ia)}}));mxEvent.addListener(ma,"keyup",mxUtils.bind(this,function(ia){""==ma.value?(Z.setAttribute("src",Fa),Z.setAttribute("title",mxResources.get("search"))):(Z.setAttribute("src",Dialog.prototype.closeImage),Z.setAttribute("title",mxResources.get("reset")))}));A+=23;var Ca=document.createElement("div");Ca.style.cssText=
+"position:absolute;left:30px;width:128px;top:"+A+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(da,"scroll",function(){b.sidebar.hideTooltip()});var Ba=140,Ga=140,sa={},Ma={},Na={},za=0,Ja=!0,Ea=null,Pa=null;sa.basic=[{title:"blankDiagram",select:!0}];var ya=sa.basic;if(!f){var Aa=function(){mxUtils.get(Ia,function(ia){if(!wa){wa=!0;ia=ia.getXml().documentElement.firstChild;for(var ja={};null!=ia;){if("undefined"!==typeof ia.getAttribute)if("clibs"==ia.nodeName){for(var ua=
+ia.getAttribute("name"),va=ia.getElementsByTagName("add"),qa=[],xa=0;xa<va.length;xa++)qa.push(encodeURIComponent(mxUtils.getTextContent(va[xa])));null!=ua&&0<qa.length&&(ja[ua]=qa.join(";"))}else if(qa=ia.getAttribute("url"),null!=qa){va=ia.getAttribute("section");ua=ia.getAttribute("subsection");if(null==va&&(xa=qa.indexOf("/"),va=qa.substring(0,xa),null==ua)){var ea=qa.indexOf("/",xa+1);-1<ea&&(ua=qa.substring(xa+1,ea))}xa=sa[va];null==xa&&(xa=[],sa[va]=xa);qa=ia.getAttribute("clibs");null!=ja[qa]&&
+(qa=ja[qa]);qa={url:ia.getAttribute("url"),libs:ia.getAttribute("libs"),title:ia.getAttribute("title"),tooltip:ia.getAttribute("name")||ia.getAttribute("url"),preview:ia.getAttribute("preview"),clibs:qa,tags:ia.getAttribute("tags")};xa.push(qa);null!=ua&&(xa=Ma[va],null==xa&&(xa={},Ma[va]=xa),va=xa[ua],null==va&&(va=[],xa[ua]=va),va.push(qa))}ia=ia.nextSibling}Q.stop();z()}})};G.appendChild(ha);G.appendChild(Ca);G.appendChild(da);var wa=!1,Ia=k;/^https?:\/\//.test(Ia)&&!b.editor.isCorsEnabledForUrl(Ia)&&
+(Ia=PROXY_URL+"?url="+encodeURIComponent(Ia));Q.spin(da);null!=y?y(function(ia,ja){Na=ia;n=za=ja;Aa()},Aa):Aa();W=sa}mxEvent.addListener(F,"keypress",function(ia){b.dialog.container.firstChild==G&&13==ia.keyCode&&I()});y=document.createElement("div");y.style.marginTop=f?"4px":"16px";y.style.textAlign="right";y.style.position="absolute";y.style.left="40px";y.style.bottom="24px";y.style.right="40px";f||b.isOffline()||!l||null!=d||t||(A=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),
+A.className="geBtn",y.appendChild(A));A=mxUtils.button(mxResources.get("cancel"),function(){null!=u&&u();b.hideDialog(!0)});A.className="geBtn";!b.editor.cancelFirst||t&&null==u||y.appendChild(A);f||"1"==urlParams.embed||t||mxClient.IS_ANDROID||mxClient.IS_IOS||"1"==urlParams.noDevice||(f=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var ia=new FilenameDialog(b,"",mxResources.get("create"),function(ja){null!=ja&&0<ja.length&&b.editor.loadUrl(ja,function(ua){S=ua;O=null;templateRealURl=
+ja;b.hideDialog();I()},function(ua){b.handleError(ua)})},mxResources.get("url"),null,null,null,!1);b.showDialog(ia.container,300,80,!0,!0);ia.init()}),f.className="geBtn",y.appendChild(f));Graph.fileSupport&&x&&(x=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var ia=document.createElement("input");ia.setAttribute("multiple","multiple");ia.setAttribute("type","file");mxEvent.addListener(ia,"change",function(ja){b.openFiles(ia.files,!0);ia.value=""});ia.style.display=
+"none";document.body.appendChild(ia);b.newDlgFileInputElt=ia}b.newDlgFileInputElt.click()}),x.className="geBtn",y.appendChild(x));y.appendChild(X);b.editor.cancelFirst||null!=d||t&&null==u||y.appendChild(A);G.appendChild(y);this.container=G};NewDialog.tagsList={};
+var CreateDialog=function(b,f,l,d,t,u,E,c,e,g,k,m,p,v,x,A,y){function L(H,M,F,J){function Q(){mxEvent.addListener(X,"click",function(){var B=F;if(E){var K=q.value,R=K.lastIndexOf(".");if(0>f.lastIndexOf(".")&&0>R){B=null!=B?B:G.value;var O="";B==App.MODE_GOOGLE?O=b.drive.extension:B==App.MODE_GITHUB?O=b.gitHub.extension:B==App.MODE_GITLAB?O=b.gitLab.extension:B==App.MODE_TRELLO?O=b.trello.extension:B==App.MODE_DROPBOX?O=b.dropbox.extension:B==App.MODE_ONEDRIVE?O=b.oneDrive.extension:B==App.MODE_DEVICE&&
+(O=".drawio");0<=R&&(K=K.substring(0,R));q.value=K+O}}N(F)})}var X=document.createElement("a");X.style.overflow="hidden";var P=document.createElement("img");P.src=H;P.setAttribute("border","0");P.setAttribute("align","absmiddle");P.style.width="60px";P.style.height="60px";P.style.paddingBottom="6px";X.style.display="inline-block";X.className="geBaseButton";X.style.position="relative";X.style.margin="4px";X.style.padding="8px 8px 10px 8px";X.style.whiteSpace="nowrap";X.appendChild(P);X.style.color=
+"gray";X.style.fontSize="11px";var V=document.createElement("div");X.appendChild(V);mxUtils.write(V,M);if(null!=J&&null==b[J]){P.style.visibility="hidden";mxUtils.setOpacity(V,10);var W=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});W.spin(X);var n=window.setTimeout(function(){null==b[J]&&(W.stop(),X.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[J]&&(window.clearTimeout(n),
+mxUtils.setOpacity(V,100),P.style.visibility="",W.stop(),Q())}))}else Q();z.appendChild(X);++C==m&&(mxUtils.br(z),C=0)}function N(H){var M=q.value;if(null==H||null!=M&&0<M.length)y&&b.hideDialog(),l(M,H,q)}k="1"==urlParams.noDevice?!1:k;E=null!=E?E:!0;c=null!=c?c:!0;m=null!=m?m:4;y=null!=y?y:!0;u=document.createElement("div");u.style.whiteSpace="nowrap";null==d&&b.addLanguageMenu(u);var I=document.createElement("h2");mxUtils.write(I,t||mxResources.get("create"));I.style.marginTop="0px";I.style.marginBottom=
+"24px";u.appendChild(I);mxUtils.write(u,mxResources.get("filename")+":");var q=document.createElement("input");q.setAttribute("value",f);q.style.width="200px";q.style.marginLeft="10px";q.style.marginBottom="20px";q.style.maxWidth="70%";this.init=function(){q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)};u.appendChild(q);null!=A&&(null!=b.editor.diagramFileTypes&&(t=FilenameDialog.createFileTypes(b,q,b.editor.diagramFileTypes),
+t.style.marginLeft="6px",t.style.width="90px",u.appendChild(t)),u.appendChild(FilenameDialog.createTypeHint(b,q,A)));A=null;if("1"!=urlParams.noDevice&&null!=p&&null!=v&&"image/"==v.substring(0,6)&&("image/svg"!=v.substring(0,9)||mxClient.IS_SVG)){q.style.width="160px";t=document.createElement("img");var D=x?p:btoa(unescape(encodeURIComponent(p)));t.setAttribute("src","data:"+v+";base64,"+D);t.style.position="absolute";t.style.top="70px";t.style.right="100px";t.style.maxWidth="120px";t.style.maxHeight=
+"80px";mxUtils.setPrefixedStyle(t.style,"transform","translate(50%,-50%)");u.appendChild(t);mxClient.IS_FF||null==navigator.clipboard||"image/png"!=v||(A=mxUtils.button(mxResources.get("copy"),function(H){H=b.base64ToBlob(D,"image/png");H=new ClipboardItem({"image/png":H,"text/html":new Blob(['<img src="data:'+v+";base64,"+D+'">'],{type:"text/html"})});navigator.clipboard.write([H]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(M){b.handleError(M)}))}),
+A.style.marginTop="6px",A.className="geBtn");e&&Editor.popupsAllowed&&(t.style.cursor="pointer",mxEvent.addGestureListeners(t,null,null,function(H){mxEvent.isPopupTrigger(H)||N("_blank")}))}mxUtils.br(u);var z=document.createElement("div");z.style.textAlign="center";var C=0;z.style.marginTop="6px";u.appendChild(z);var G=document.createElement("select");G.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(p=document.createElement("option"),p.setAttribute("value",
App.MODE_GOOGLE),mxUtils.write(p,mxResources.get("googleDrive")),G.appendChild(p),L(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(p,mxResources.get("oneDrive")),G.appendChild(p),b.mode==App.MODE_ONEDRIVE&&p.setAttribute("selected","selected"),L(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,
"oneDrive")),"function"===typeof window.DropboxClient&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(p,mxResources.get("dropbox")),G.appendChild(p),b.mode==App.MODE_DROPBOX&&p.setAttribute("selected","selected"),L(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_GITHUB),mxUtils.write(p,mxResources.get("github")),G.appendChild(p),L(IMAGE_PATH+
"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_GITLAB),mxUtils.write(p,mxResources.get("gitlab")),G.appendChild(p),L(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_TRELLO),mxUtils.write(p,mxResources.get("trello")),G.appendChild(p),L(IMAGE_PATH+"/trello-logo.svg",
mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice)p=document.createElement("option"),p.setAttribute("value",App.MODE_DEVICE),mxUtils.write(p,mxResources.get("device")),G.appendChild(p),b.mode!=App.MODE_DEVICE&&c||p.setAttribute("selected","selected"),k&&L(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);c&&isLocalStorage&&"0"!=urlParams.browser&&(c=document.createElement("option"),
c.setAttribute("value",App.MODE_BROWSER),mxUtils.write(c,mxResources.get("browser")),G.appendChild(c),b.mode==App.MODE_BROWSER&&c.setAttribute("selected","selected"),L(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));c=document.createElement("div");c.style.marginTop="26px";c.style.textAlign="center";null!=g&&(k=mxUtils.button(mxResources.get("help"),function(){b.openLink(g)}),k.className="geBtn",c.appendChild(k));k=mxUtils.button(mxResources.get(null!=d?"close":"cancel"),
function(){null!=d?d():(b.fileLoaded(null),b.hideDialog(),window.close(),window.location.href=b.getUrl())});k.className="geBtn";b.editor.cancelFirst&&null==d&&c.appendChild(k);null==d&&(p=mxUtils.button(mxResources.get("decideLater"),function(){N(null)}),p.className="geBtn",c.appendChild(p));e&&Editor.popupsAllowed&&(e=mxUtils.button(mxResources.get("openInNewWindow"),function(){N("_blank")}),e.className="geBtn",c.appendChild(e));CreateDialog.showDownloadButton&&(e=mxUtils.button(mxResources.get("download"),
-function(){N("download")}),e.className="geBtn",c.appendChild(e),null!=z&&(e.style.marginTop="6px",c.style.marginTop="6px"));null!=z&&(mxUtils.br(c),c.appendChild(z));b.editor.cancelFirst&&null==d||c.appendChild(k);mxEvent.addListener(q,"keypress",function(M){13==M.keyCode?N(App.MODE_DEVICE):27==M.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});u.appendChild(c);this.container=u};CreateDialog.showDownloadButton="1"!=urlParams.noDevice;
+function(){N("download")}),e.className="geBtn",c.appendChild(e),null!=A&&(e.style.marginTop="6px",c.style.marginTop="6px"));null!=A&&(mxUtils.br(c),c.appendChild(A));b.editor.cancelFirst&&null==d||c.appendChild(k);mxEvent.addListener(q,"keypress",function(H){13==H.keyCode?N(App.MODE_DEVICE):27==H.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});u.appendChild(c);this.container=u};CreateDialog.showDownloadButton="1"!=urlParams.noDevice;
var PopupDialog=function(b,f,l,d,t){t=null!=t?t:!0;var u=document.createElement("div");u.style.textAlign="left";u.style.height="100%";mxUtils.write(u,mxResources.get("fileOpenLocation"));mxUtils.br(u);mxUtils.br(u);var E=mxUtils.button(mxResources.get("openInThisWindow"),function(){t&&b.hideDialog();null!=d&&d()});E.className="geBtn";E.style.marginBottom="8px";E.style.width="280px";u.appendChild(E);mxUtils.br(u);var c=mxUtils.button(mxResources.get("openInNewWindow"),function(){t&&b.hideDialog();
null!=l&&l();b.openLink(f,null,!0)});c.className="geBtn gePrimaryBtn";c.style.width=E.style.width;u.appendChild(c);mxUtils.br(u);mxUtils.br(u);mxUtils.write(u,mxResources.get("allowPopups"));this.container=u},ImageDialog=function(b,f,l,d,t,u,E,c){function e(){0<m.value.length?N.removeAttribute("disabled"):N.setAttribute("disabled","disabled")}u=null!=u?u:!0;var g=b.editor.graph,k=document.createElement("div");mxUtils.write(k,f);f=document.createElement("div");f.className="geTitle";f.style.backgroundColor=
"transparent";f.style.borderColor="transparent";f.style.whiteSpace="nowrap";f.style.textOverflow="clip";f.style.cursor="default";f.style.paddingRight="20px";var m=document.createElement("input");m.setAttribute("value",l);m.setAttribute("type","text");m.setAttribute("spellcheck","false");m.setAttribute("autocorrect","off");m.setAttribute("autocomplete","off");m.setAttribute("autocapitalize","off");m.style.marginTop="6px";m.style.width=(Graph.fileSupport?460:340)-20+"px";m.style.backgroundImage="url('"+
Dialog.prototype.clearImage+"')";m.style.backgroundRepeat="no-repeat";m.style.backgroundPosition="100% 50%";m.style.paddingRight="14px";l=document.createElement("div");l.setAttribute("title",mxResources.get("reset"));l.style.position="relative";l.style.left="-16px";l.style.width="12px";l.style.height="14px";l.style.cursor="pointer";l.style.display="inline-block";l.style.top="3px";l.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(l,"click",function(){m.value="";m.focus()});
-f.appendChild(m);f.appendChild(l);k.appendChild(f);var p=c,v,x,z=function(J,q,D,A){var C="data:"==J.substring(0,5);!b.isOffline()||C&&"undefined"===typeof chrome?0<J.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(J,function(G){b.spinner.stop();b.hideDialog();var M=!1===A?1:null!=q&&null!=D?Math.max(q/G.width,D/G.height):Math.min(1,Math.min(520/G.width,520/G.height));u&&(J=b.convertDataUri(J));d(J,Math.round(Number(G.width)*M),Math.round(Number(G.height)*M),p,v,x)},
-function(){b.spinner.stop();d(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),d(J,null,null,p,v,x)):(J=b.convertDataUri(J),q=null==q?120:q,D=null==D?100:D,b.hideDialog(),d(J,q,D,p,v,x))},y=function(J,q){if(null!=J){var D=t?null:g.getModel().getGeometry(g.getSelectionCell());null!=D?z(J,D.width,D.height,q):z(J,null,null,q)}else b.hideDialog(),d(null)};this.init=function(){m.focus();if(Graph.fileSupport){m.setAttribute("placeholder",
-mxResources.get("dragImagesHere"));var J=k.parentNode,q=null;mxEvent.addListener(J,"dragleave",function(D){null!=q&&(q.parentNode.removeChild(q),q=null);D.stopPropagation();D.preventDefault()});mxEvent.addListener(J,"dragover",mxUtils.bind(this,function(D){null==q&&(!mxClient.IS_IE||10<document.documentMode)&&(q=b.highlightElement(J));D.stopPropagation();D.preventDefault()}));mxEvent.addListener(J,"drop",mxUtils.bind(this,function(D){null!=q&&(q.parentNode.removeChild(q),q=null);if(0<D.dataTransfer.files.length)b.importFiles(D.dataTransfer.files,
-0,0,b.maxImageSize,function(C,G,M,H,F,I,R,X){y(C,X)},function(){},function(C){return"image/"==C.type.substring(0,6)},function(C){for(var G=0;G<C.length;G++)C[G]()},!mxEvent.isControlDown(D),null,null,!0);else if(0<=mxUtils.indexOf(D.dataTransfer.types,"text/uri-list")){var A=D.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(A)&&y(decodeURIComponent(A))}D.stopPropagation();D.preventDefault()}),!1)}};c=document.createElement("div");c.style.marginTop="14px";c.style.textAlign=
-"center";l=mxUtils.button(mxResources.get("cancel"),function(){b.spinner.stop();b.hideDialog()});l.className="geBtn";b.editor.cancelFirst&&c.appendChild(l);ImageDialog.filePicked=function(J){J.action==google.picker.Action.PICKED&&null!=J.docs[0].thumbnails&&(J=J.docs[0].thumbnails[J.docs[0].thumbnails.length-1],null!=J&&(m.value=J.url));m.focus()};if(Graph.fileSupport){if(null==b.imgDlgFileInputElt){var L=document.createElement("input");L.setAttribute("multiple","multiple");L.setAttribute("type",
-"file");mxEvent.addListener(L,"change",function(J){null!=L.files&&(b.importFiles(L.files,0,0,b.maxImageSize,function(q,D,A,C,G,M){y(q)},function(){},function(q){return"image/"==q.type.substring(0,6)},function(q){for(var D=0;D<q.length;D++)q[D]()},!0),L.type="",L.type="file",L.value="")});L.style.display="none";document.body.appendChild(L);b.imgDlgFileInputElt=L}f=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});f.className="geBtn";c.appendChild(f)}mxEvent.addListener(m,
-"keypress",function(J){13==J.keyCode&&y(m.value)});var N=mxUtils.button(mxResources.get("crop"),function(){var J=new CropImageDialog(b,m.value,p,function(q,D,A){p=q;v=D;x=A});b.showDialog(J.container,300,390,!0,!0)});E&&(N.className="geBtn",c.appendChild(N));mxEvent.addListener(m,"change",function(J){p=null;e()});e();E=mxUtils.button(mxResources.get("apply"),function(){y(m.value)});E.className="geBtn gePrimaryBtn";c.appendChild(E);b.editor.cancelFirst||c.appendChild(l);Graph.fileSupport&&(c.style.marginTop=
-"120px",k.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",k.style.backgroundPosition="center 65%",k.style.backgroundRepeat="no-repeat",E=document.createElement("div"),E.style.position="absolute",E.style.width="420px",E.style.top="58%",E.style.textAlign="center",E.style.fontSize="18px",E.style.color="#a0c3ff",mxUtils.write(E,mxResources.get("dragImagesHere")),k.appendChild(E));k.appendChild(c);this.container=k},LinkDialog=function(b,f,l,d,t,u,E){function c(J,q,D){D=mxUtils.button("",D);
-D.className="geBtn";D.setAttribute("title",q);q=document.createElement("img");q.style.height="26px";q.style.width="26px";q.setAttribute("src",J);D.style.minWidth="42px";D.style.verticalAlign="middle";D.appendChild(q);N.appendChild(D)}var e=document.createElement("div");e.style.height="100%";mxUtils.write(e,mxResources.get("editLink")+":");var g=document.createElement("div");g.className="geTitle";g.style.backgroundColor="transparent";g.style.borderColor="transparent";g.style.whiteSpace="nowrap";g.style.textOverflow=
+f.appendChild(m);f.appendChild(l);k.appendChild(f);var p=c,v,x,A=function(I,q,D,z){var C="data:"==I.substring(0,5);!b.isOffline()||C&&"undefined"===typeof chrome?0<I.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(I,function(G){b.spinner.stop();b.hideDialog();var H=!1===z?1:null!=q&&null!=D?Math.max(q/G.width,D/G.height):Math.min(1,Math.min(520/G.width,520/G.height));u&&(I=b.convertDataUri(I));d(I,Math.round(Number(G.width)*H),Math.round(Number(G.height)*H),p,v,x)},
+function(){b.spinner.stop();d(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),d(I,null,null,p,v,x)):(I=b.convertDataUri(I),q=null==q?120:q,D=null==D?100:D,b.hideDialog(),d(I,q,D,p,v,x))},y=function(I,q){if(null!=I){var D=t?null:g.getModel().getGeometry(g.getSelectionCell());null!=D?A(I,D.width,D.height,q):A(I,null,null,q)}else b.hideDialog(),d(null)};this.init=function(){m.focus();if(Graph.fileSupport){m.setAttribute("placeholder",
+mxResources.get("dragImagesHere"));var I=k.parentNode,q=null;mxEvent.addListener(I,"dragleave",function(D){null!=q&&(q.parentNode.removeChild(q),q=null);D.stopPropagation();D.preventDefault()});mxEvent.addListener(I,"dragover",mxUtils.bind(this,function(D){null==q&&(!mxClient.IS_IE||10<document.documentMode)&&(q=b.highlightElement(I));D.stopPropagation();D.preventDefault()}));mxEvent.addListener(I,"drop",mxUtils.bind(this,function(D){null!=q&&(q.parentNode.removeChild(q),q=null);if(0<D.dataTransfer.files.length)b.importFiles(D.dataTransfer.files,
+0,0,b.maxImageSize,function(C,G,H,M,F,J,Q,X){y(C,X)},function(){},function(C){return"image/"==C.type.substring(0,6)},function(C){for(var G=0;G<C.length;G++)C[G]()},!mxEvent.isControlDown(D),null,null,!0);else if(0<=mxUtils.indexOf(D.dataTransfer.types,"text/uri-list")){var z=D.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(z)&&y(decodeURIComponent(z))}D.stopPropagation();D.preventDefault()}),!1)}};c=document.createElement("div");c.style.marginTop="14px";c.style.textAlign=
+"center";l=mxUtils.button(mxResources.get("cancel"),function(){b.spinner.stop();b.hideDialog()});l.className="geBtn";b.editor.cancelFirst&&c.appendChild(l);ImageDialog.filePicked=function(I){I.action==google.picker.Action.PICKED&&null!=I.docs[0].thumbnails&&(I=I.docs[0].thumbnails[I.docs[0].thumbnails.length-1],null!=I&&(m.value=I.url));m.focus()};if(Graph.fileSupport){if(null==b.imgDlgFileInputElt){var L=document.createElement("input");L.setAttribute("multiple","multiple");L.setAttribute("type",
+"file");mxEvent.addListener(L,"change",function(I){null!=L.files&&(b.importFiles(L.files,0,0,b.maxImageSize,function(q,D,z,C,G,H){y(q)},function(){},function(q){return"image/"==q.type.substring(0,6)},function(q){for(var D=0;D<q.length;D++)q[D]()},!0),L.type="",L.type="file",L.value="")});L.style.display="none";document.body.appendChild(L);b.imgDlgFileInputElt=L}f=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});f.className="geBtn";c.appendChild(f)}mxEvent.addListener(m,
+"keypress",function(I){13==I.keyCode&&y(m.value)});var N=mxUtils.button(mxResources.get("crop"),function(){var I=new CropImageDialog(b,m.value,p,function(q,D,z){p=q;v=D;x=z});b.showDialog(I.container,300,390,!0,!0)});E&&(N.className="geBtn",c.appendChild(N));mxEvent.addListener(m,"change",function(I){p=null;e()});e();E=mxUtils.button(mxResources.get("apply"),function(){y(m.value)});E.className="geBtn gePrimaryBtn";c.appendChild(E);b.editor.cancelFirst||c.appendChild(l);Graph.fileSupport&&(c.style.marginTop=
+"120px",k.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",k.style.backgroundPosition="center 65%",k.style.backgroundRepeat="no-repeat",E=document.createElement("div"),E.style.position="absolute",E.style.width="420px",E.style.top="58%",E.style.textAlign="center",E.style.fontSize="18px",E.style.color="#a0c3ff",mxUtils.write(E,mxResources.get("dragImagesHere")),k.appendChild(E));k.appendChild(c);this.container=k},LinkDialog=function(b,f,l,d,t,u,E){function c(I,q,D){D=mxUtils.button("",D);
+D.className="geBtn";D.setAttribute("title",q);q=document.createElement("img");q.style.height="26px";q.style.width="26px";q.setAttribute("src",I);D.style.minWidth="42px";D.style.verticalAlign="middle";D.appendChild(q);N.appendChild(D)}var e=document.createElement("div");e.style.height="100%";mxUtils.write(e,mxResources.get("editLink")+":");var g=document.createElement("div");g.className="geTitle";g.style.backgroundColor="transparent";g.style.borderColor="transparent";g.style.whiteSpace="nowrap";g.style.textOverflow=
"clip";g.style.cursor="default";g.style.paddingRight="20px";var k=document.createElement("input");k.setAttribute("placeholder",mxResources.get("dragUrlsHere"));k.setAttribute("type","text");k.style.marginTop="6px";k.style.width="97%";k.style.boxSizing="border-box";k.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";k.style.backgroundRepeat="no-repeat";k.style.backgroundPosition="100% 50%";k.style.paddingRight="14px";k.style.marginBottom="4px";var m=document.createElement("div");m.setAttribute("title",
mxResources.get("reset"));m.style.position="relative";m.style.left="-16px";m.style.width="12px";m.style.height="14px";m.style.cursor="pointer";m.style.display="inline-block";m.style.top="3px";m.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(m,"click",function(){k.value="";k.focus()});var p=document.createElement("input");p.style.cssText="margin-right:8px;margin-bottom:8px;";p.setAttribute("value","url");p.setAttribute("type","radio");p.setAttribute("name","geLinkDialogOption");
-var v=document.createElement("input");v.style.cssText="margin-right:8px;margin-bottom:8px;";v.setAttribute("value","url");v.setAttribute("type","radio");v.setAttribute("name","geLinkDialogOption");var x=document.createElement("select");x.style.width="520px";var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.margin="0 6p 0 6px";null!=E&&(z.setAttribute("checked","checked"),z.defaultChecked=!0);E=null!=E?E:"_blank";z.setAttribute("title",E);u&&(k.style.width="340px");if(t&&
-null!=b.pages){null!=f&&Graph.isPageLink(f)?(v.setAttribute("checked","checked"),v.defaultChecked=!0):(k.setAttribute("value",f),p.setAttribute("checked","checked"),p.defaultChecked=!0);g.appendChild(p);g.appendChild(k);g.appendChild(m);u&&(g.appendChild(z),mxUtils.write(g,mxResources.get("openInNewWindow")));mxUtils.br(g);g.appendChild(v);t=!1;for(u=0;u<b.pages.length;u++)m=document.createElement("option"),mxUtils.write(m,b.pages[u].getName()||mxResources.get("pageWithNumber",[u+1])),m.setAttribute("value",
+var v=document.createElement("input");v.style.cssText="margin-right:8px;margin-bottom:8px;";v.setAttribute("value","url");v.setAttribute("type","radio");v.setAttribute("name","geLinkDialogOption");var x=document.createElement("select");x.style.width="520px";var A=document.createElement("input");A.setAttribute("type","checkbox");A.style.margin="0 6p 0 6px";null!=E&&(A.setAttribute("checked","checked"),A.defaultChecked=!0);E=null!=E?E:"_blank";A.setAttribute("title",E);u&&(k.style.width="340px");if(t&&
+null!=b.pages){null!=f&&Graph.isPageLink(f)?(v.setAttribute("checked","checked"),v.defaultChecked=!0):(k.setAttribute("value",f),p.setAttribute("checked","checked"),p.defaultChecked=!0);g.appendChild(p);g.appendChild(k);g.appendChild(m);u&&(g.appendChild(A),mxUtils.write(g,mxResources.get("openInNewWindow")));mxUtils.br(g);g.appendChild(v);t=!1;for(u=0;u<b.pages.length;u++)m=document.createElement("option"),mxUtils.write(m,b.pages[u].getName()||mxResources.get("pageWithNumber",[u+1])),m.setAttribute("value",
"data:page/id,"+b.pages[u].getId()),f==m.getAttribute("value")&&(m.setAttribute("selected","selected"),t=!0),x.appendChild(m);if(!t&&v.checked){var y=document.createElement("option");mxUtils.write(y,mxResources.get("pageNotFound"));y.setAttribute("disabled","disabled");y.setAttribute("selected","selected");y.setAttribute("value","pageNotFound");x.appendChild(y);mxEvent.addListener(x,"change",function(){null==y.parentNode||y.selected||y.parentNode.removeChild(y)})}g.appendChild(x)}else k.setAttribute("value",
-f),g.appendChild(k),g.appendChild(m);e.appendChild(g);var L=mxUtils.button(l,function(){b.hideDialog();d(v.checked?"pageNotFound"!==x.value?x.value:f:k.value,LinkDialog.selectedDocs,z.checked?E:null)});L.style.verticalAlign="middle";L.className="geBtn gePrimaryBtn";this.init=function(){v.checked?x.focus():(k.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?k.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(x,"focus",function(){p.removeAttribute("checked");v.setAttribute("checked",
-"checked");v.checked=!0});mxEvent.addListener(k,"focus",function(){v.removeAttribute("checked");p.setAttribute("checked","checked");p.checked=!0});if(Graph.fileSupport){var J=e.parentNode,q=null;mxEvent.addListener(J,"dragleave",function(D){null!=q&&(q.parentNode.removeChild(q),q=null);D.stopPropagation();D.preventDefault()});mxEvent.addListener(J,"dragover",mxUtils.bind(this,function(D){null==q&&(!mxClient.IS_IE||10<document.documentMode)&&(q=b.highlightElement(J));D.stopPropagation();D.preventDefault()}));
-mxEvent.addListener(J,"drop",mxUtils.bind(this,function(D){null!=q&&(q.parentNode.removeChild(q),q=null);0<=mxUtils.indexOf(D.dataTransfer.types,"text/uri-list")&&(k.value=decodeURIComponent(D.dataTransfer.getData("text/uri-list")),p.setAttribute("checked","checked"),p.checked=!0,L.click());D.stopPropagation();D.preventDefault()}),!1)}};var N=document.createElement("div");N.style.marginTop="18px";N.style.textAlign="center";l=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/custom-links")});
-l.style.verticalAlign="middle";l.className="geBtn";N.appendChild(l);b.isOffline()&&!mxClient.IS_CHROMEAPP&&(l.style.display="none");l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});l.style.verticalAlign="middle";l.className="geBtn";b.editor.cancelFirst&&N.appendChild(l);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(J){if(J.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=J.docs;var q=J.docs[0].url;"application/mxe"==J.docs[0].mimeType||null!=J.docs[0].mimeType&&
-"application/vnd.jgraph."==J.docs[0].mimeType.substring(0,23)?q="https://www.draw.io/#G"+J.docs[0].id:"application/vnd.google-apps.folder"==J.docs[0].mimeType&&(q="https://drive.google.com/#folders/"+J.docs[0].id);k.value=q;k.focus()}else LinkDialog.selectedDocs=null;k.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=b.drive&&c(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googlePlus"),function(){b.spinner.spin(document.body,mxResources.get("authorizing"))&&b.drive.checkToken(mxUtils.bind(this,
-function(){b.spinner.stop();if(null==b.linkPicker){var J=b.drive.createLinkPicker();b.linkPicker=J.setCallback(function(q){LinkDialog.filePicked(q)}).build()}b.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&c(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(J){k.value=J[0].link;k.focus()}})});null!=b.oneDrive&&c(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),
-function(){b.oneDrive.pickFile(function(J,q){k.value=q.value[0].webUrl;k.focus()},!0)});null!=b.gitHub&&c(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){b.gitHub.pickFile(function(J){if(null!=J){J=J.split("/");var q=J[0],D=J[1],A=J[2];J=J.slice(3,J.length).join("/");k.value="https://github.com/"+q+"/"+D+"/blob/"+A+"/"+J;k.focus()}})});null!=b.gitLab&&c(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),function(){b.gitLab.pickFile(function(J){if(null!=J){J=J.split("/");var q=
-J[0],D=J[1],A=J[2];J=J.slice(3,J.length).join("/");k.value=DRAWIO_GITLAB_URL+"/"+q+"/"+D+"/blob/"+A+"/"+J;k.focus()}})});mxEvent.addListener(k,"keypress",function(J){13==J.keyCode&&(b.hideDialog(),d(v.checked?x.value:k.value,LinkDialog.selectedDocs))});N.appendChild(L);b.editor.cancelFirst||N.appendChild(l);e.appendChild(N);this.container=e},FeedbackDialog=function(b,f,l,d){var t=document.createElement("div"),u=document.createElement("div");mxUtils.write(u,mxResources.get("sendYourFeedback"));u.style.fontSize=
+f),g.appendChild(k),g.appendChild(m);e.appendChild(g);var L=mxUtils.button(l,function(){b.hideDialog();d(v.checked?"pageNotFound"!==x.value?x.value:f:k.value,LinkDialog.selectedDocs,A.checked?E:null)});L.style.verticalAlign="middle";L.className="geBtn gePrimaryBtn";this.init=function(){v.checked?x.focus():(k.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?k.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(x,"focus",function(){p.removeAttribute("checked");v.setAttribute("checked",
+"checked");v.checked=!0});mxEvent.addListener(k,"focus",function(){v.removeAttribute("checked");p.setAttribute("checked","checked");p.checked=!0});if(Graph.fileSupport){var I=e.parentNode,q=null;mxEvent.addListener(I,"dragleave",function(D){null!=q&&(q.parentNode.removeChild(q),q=null);D.stopPropagation();D.preventDefault()});mxEvent.addListener(I,"dragover",mxUtils.bind(this,function(D){null==q&&(!mxClient.IS_IE||10<document.documentMode)&&(q=b.highlightElement(I));D.stopPropagation();D.preventDefault()}));
+mxEvent.addListener(I,"drop",mxUtils.bind(this,function(D){null!=q&&(q.parentNode.removeChild(q),q=null);0<=mxUtils.indexOf(D.dataTransfer.types,"text/uri-list")&&(k.value=decodeURIComponent(D.dataTransfer.getData("text/uri-list")),p.setAttribute("checked","checked"),p.checked=!0,L.click());D.stopPropagation();D.preventDefault()}),!1)}};var N=document.createElement("div");N.style.marginTop="18px";N.style.textAlign="center";l=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/custom-links")});
+l.style.verticalAlign="middle";l.className="geBtn";N.appendChild(l);b.isOffline()&&!mxClient.IS_CHROMEAPP&&(l.style.display="none");l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});l.style.verticalAlign="middle";l.className="geBtn";b.editor.cancelFirst&&N.appendChild(l);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(I){if(I.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=I.docs;var q=I.docs[0].url;"application/mxe"==I.docs[0].mimeType||null!=I.docs[0].mimeType&&
+"application/vnd.jgraph."==I.docs[0].mimeType.substring(0,23)?q="https://www.draw.io/#G"+I.docs[0].id:"application/vnd.google-apps.folder"==I.docs[0].mimeType&&(q="https://drive.google.com/#folders/"+I.docs[0].id);k.value=q;k.focus()}else LinkDialog.selectedDocs=null;k.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=b.drive&&c(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googlePlus"),function(){b.spinner.spin(document.body,mxResources.get("authorizing"))&&b.drive.checkToken(mxUtils.bind(this,
+function(){b.spinner.stop();if(null==b.linkPicker){var I=b.drive.createLinkPicker();b.linkPicker=I.setCallback(function(q){LinkDialog.filePicked(q)}).build()}b.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&c(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(I){k.value=I[0].link;k.focus()}})});null!=b.oneDrive&&c(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),
+function(){b.oneDrive.pickFile(function(I,q){k.value=q.value[0].webUrl;k.focus()},!0)});null!=b.gitHub&&c(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){b.gitHub.pickFile(function(I){if(null!=I){I=I.split("/");var q=I[0],D=I[1],z=I[2];I=I.slice(3,I.length).join("/");k.value="https://github.com/"+q+"/"+D+"/blob/"+z+"/"+I;k.focus()}})});null!=b.gitLab&&c(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),function(){b.gitLab.pickFile(function(I){if(null!=I){I=I.split("/");var q=
+I[0],D=I[1],z=I[2];I=I.slice(3,I.length).join("/");k.value=DRAWIO_GITLAB_URL+"/"+q+"/"+D+"/blob/"+z+"/"+I;k.focus()}})});mxEvent.addListener(k,"keypress",function(I){13==I.keyCode&&(b.hideDialog(),d(v.checked?x.value:k.value,LinkDialog.selectedDocs))});N.appendChild(L);b.editor.cancelFirst||N.appendChild(l);e.appendChild(N);this.container=e},FeedbackDialog=function(b,f,l,d){var t=document.createElement("div"),u=document.createElement("div");mxUtils.write(u,mxResources.get("sendYourFeedback"));u.style.fontSize=
"18px";u.style.marginBottom="18px";t.appendChild(u);u=document.createElement("div");mxUtils.write(u,mxResources.get("yourEmailAddress")+(l?"":" ("+mxResources.get("required")+")"));t.appendChild(u);var E=document.createElement("input");E.setAttribute("type","text");E.style.marginTop="6px";E.style.width="600px";var c=mxUtils.button(mxResources.get("sendMessage"),function(){var m=k.value+(g.checked?"\nDiagram:\n"+(null!=d?d:mxUtils.getXml(b.getXmlFileData())):"")+"\nuserAgent:\n"+navigator.userAgent+
"\nappVersion:\n"+navigator.appVersion+"\nappName:\n"+navigator.appName+"\nplatform:\n"+navigator.platform;m.length>FeedbackDialog.maxAttachmentSize?b.alert(mxResources.get("drawingTooLarge")):(b.hideDialog(),b.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(E.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent((null!=f?f:"Feedback")+
":\n"+m),function(p){b.spinner.stop();200<=p.getStatus()&&299>=p.getStatus()?b.alert(mxResources.get("feedbackSent")):b.alert(mxResources.get("errorSendingFeedback"))},function(){b.spinner.stop();b.alert(mxResources.get("errorSendingFeedback"))}))});c.className="geBtn gePrimaryBtn";if(!l){c.setAttribute("disabled","disabled");var e=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;mxEvent.addListener(E,
@@ -11215,193 +11215,189 @@ l.appendChild(g);u=document.createElement("span");mxUtils.write(u," "+mxResource
t.appendChild(k);l=document.createElement("div");l.style.marginTop="26px";l.style.textAlign="right";u=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});u.className="geBtn";b.editor.cancelFirst?(l.appendChild(u),l.appendChild(c)):(l.appendChild(c),l.appendChild(u));t.appendChild(l);this.container=t};FeedbackDialog.maxAttachmentSize=1E6;
var RevisionDialog=function(b,f,l){var d=document.createElement("div"),t=document.createElement("h3");t.style.marginTop="0px";mxUtils.write(t,mxResources.get("revisionHistory"));d.appendChild(t);t=document.createElement("div");t.style.position="absolute";t.style.overflow="auto";t.style.width="170px";t.style.height="378px";d.appendChild(t);var u=document.createElement("div");u.style.position="absolute";u.style.border="1px solid lightGray";u.style.left="199px";u.style.width="470px";u.style.height="376px";
u.style.overflow="hidden";var E=document.createElement("div");E.style.cssText="position:absolute;left:0;right:0;top:0;bottom:20px;text-align:center;transform:translate(0,50%);pointer-events:none;";u.appendChild(E);mxEvent.disableContextMenu(u);d.appendChild(u);var c=new Graph(u);c.setTooltips(!1);c.setEnabled(!1);c.setPanning(!0);c.panningHandler.ignoreCell=!0;c.panningHandler.useLeftButtonForPanning=!0;c.minFitScale=null;c.maxFitScale=null;c.centerZoom=!0;var e=0,g=null,k=0,m=c.getGlobalVariable;
-c.getGlobalVariable=function(S){return"page"==S&&null!=g&&null!=g[k]?g[k].getAttribute("name"):"pagenumber"==S?k+1:"pagecount"==S?null!=g?g.length:1:m.apply(this,arguments)};c.getLinkForCell=function(){return null};Editor.MathJaxRender&&c.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(S,Y){b.editor.graph.mathEnabled&&Editor.MathJaxRender(c.container)}));var p={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%"},v=new Spinner(p),x=b.getCurrentFile(),z=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),y={};for(p=0;p<z.length;p++)y[z[p].getAttribute("id")]=z[p];var L=null,N=null,J=null,q=null,D=mxUtils.button("",function(){null!=J&&c.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 A=mxUtils.button("",function(){null!=J&&c.zoomOut()});A.className="geSprite geSprite-zoomout";A.setAttribute("title",mxResources.get("zoomOut"));A.style.outline="none";A.style.border="none";A.style.margin="2px";A.setAttribute("disabled","disabled");mxUtils.setOpacity(A,20);var C=mxUtils.button("",function(){null!=J&&(c.maxFitScale=8,c.fit(8),c.center())});C.className="geSprite geSprite-fit";C.setAttribute("title",mxResources.get("fit"));C.style.outline="none";C.style.border=
-"none";C.style.margin="2px";C.setAttribute("disabled","disabled");mxUtils.setOpacity(C,20);var G=mxUtils.button("",function(){null!=J&&(c.zoomActual(),c.center())});G.className="geSprite geSprite-actualsize";G.setAttribute("title",mxResources.get("actualSize"));G.style.outline="none";G.style.border="none";G.style.margin="2px";G.setAttribute("disabled","disabled");mxUtils.setOpacity(G,20);var M=mxUtils.button("",function(){});M.className="geSprite geSprite-middle";M.setAttribute("title",mxResources.get("compare"));
-M.style.outline="none";M.style.border="none";M.style.margin="2px";mxUtils.setOpacity(M,60);var H=u.cloneNode(!1);H.style.pointerEvent="none";u.parentNode.appendChild(H);var F=new Graph(H);F.setTooltips(!1);F.setEnabled(!1);F.setPanning(!0);F.panningHandler.ignoreCell=!0;F.panningHandler.useLeftButtonForPanning=!0;F.minFitScale=null;F.maxFitScale=null;F.centerZoom=!0;mxEvent.addGestureListeners(M,function(S){S=y[g[e].getAttribute("id")];mxUtils.setOpacity(M,20);E.innerText="";null==S?mxUtils.write(E,
-mxResources.get("pageNotFound")):(I.style.display="none",u.style.display="none",H.style.display="",H.style.backgroundColor=u.style.backgroundColor,S=Editor.parseDiagramNode(S),(new mxCodec(S.ownerDocument)).decode(S,F.getModel()),F.view.scaleAndTranslate(c.view.scale,c.view.translate.x,c.view.translate.y))},null,function(){mxUtils.setOpacity(M,60);E.innerText="";"none"==u.style.display&&(I.style.display="",u.style.display="",H.style.display="none")});var I=document.createElement("div");I.style.position=
-"absolute";I.style.textAlign="right";I.style.color="gray";I.style.marginTop="10px";I.style.backgroundColor="transparent";I.style.top="440px";I.style.right="32px";I.style.maxWidth="380px";I.style.cursor="default";var R=mxUtils.button(mxResources.get("download"),function(){if(null!=J){var S=mxUtils.getXml(J.documentElement),Y=b.getBaseFilename()+".drawio";b.isLocalFileSave()?b.saveLocalFile(S,Y,"text/xml"):(S="undefined"===typeof pako?"&xml="+encodeURIComponent(S):"&data="+encodeURIComponent(Graph.compress(S)),
-(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(Y)+"&format=xml"+S)).simulate(document,"_blank"))}});R.className="geBtn";R.setAttribute("disabled","disabled");var X=mxUtils.button(mxResources.get("restore"),function(S){null!=J&&null!=q&&(mxEvent.isShiftDown(S)?null!=J&&(S=b.getPagesForNode(J.documentElement),S=b.diffPages(b.pages,S),S=new TextareaDialog(b,mxResources.get("compare"),JSON.stringify(S,null,2),function(Y){if(0<Y.length)try{b.confirm(mxResources.get("areYouSure"),function(){x.patch([JSON.parse(Y)],
-null,!0);b.hideDialog();b.hideDialog()})}catch(ca){b.handleError(ca)}},null,null,null,null,null,!0,null,mxResources.get("merge")),b.showDialog(S.container,620,460,!0,!0),S.init()):b.confirm(mxResources.get("areYouSure"),function(){null!=l?l(q):b.spinner.spin(document.body,mxResources.get("restoring"))&&x.save(!0,function(Y){b.spinner.stop();b.replaceFileData(q);b.hideDialog()},function(Y){b.spinner.stop();b.editor.setStatus("");b.handleError(Y,null!=Y?mxResources.get("errorSavingFile"):null)})}))});
-X.className="geBtn";X.setAttribute("disabled","disabled");X.setAttribute("title","Shift+Click for Diff");var O=document.createElement("select");O.setAttribute("disabled","disabled");O.style.maxWidth="80px";O.style.position="relative";O.style.top="-2px";O.style.verticalAlign="bottom";O.style.marginRight="6px";O.style.display="none";var W=null;mxEvent.addListener(O,"change",function(S){null!=W&&(W(S),mxEvent.consume(S))});var U=mxUtils.button(mxResources.get("edit"),function(){null!=J&&(window.openFile=
-new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(J.documentElement)),b.openLink(b.getUrl(),null,!0))});U.className="geBtn";U.setAttribute("disabled","disabled");null!=l&&(U.style.display="none");var n=mxUtils.button(mxResources.get("show"),function(){null!=N&&b.openLink(N.getUrl(O.selectedIndex))});n.className="geBtn gePrimaryBtn";n.setAttribute("disabled","disabled");null!=l&&(n.style.display="none",X.className="geBtn gePrimaryBtn");z=document.createElement("div");
-z.style.position="absolute";z.style.top="482px";z.style.width="640px";z.style.textAlign="right";var B=document.createElement("div");B.className="geToolbarContainer";B.style.backgroundColor="transparent";B.style.padding="2px";B.style.border="none";B.style.left="199px";B.style.top="442px";var K=null;if(null!=f&&0<f.length){u.style.cursor="move";var Q=document.createElement("table");Q.style.border="1px solid lightGray";Q.style.borderCollapse="collapse";Q.style.borderSpacing="0px";Q.style.width="100%";
-var P=document.createElement("tbody"),T=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(e=mxUtils.indexOf(b.pages,b.currentPage));for(p=f.length-1;0<=p;p--){var V=function(S){var Y=new Date(S.modifiedDate),ca=null;if(0<=Y.getTime()){var aa=function(ja){v.stop();E.innerText="";var ha=mxUtils.parseXml(ja),Z=b.editor.extractGraphModel(ha.documentElement,!0);if(null!=Z){var Da=function(Ba){null!=Ba&&(Ba=Ga(Editor.parseDiagramNode(Ba)));return Ba},Ga=function(Ba){var Ha=Ba.getAttribute("background");
-if(null==Ha||""==Ha||Ha==mxConstants.NONE)Ha=c.defaultPageBackgroundColor;u.style.backgroundColor=Ha;(new mxCodec(Ba.ownerDocument)).decode(Ba,c.getModel());c.maxFitScale=1;c.fit(8);c.center();return Ba};O.style.display="none";O.innerText="";J=ha;q=ja;g=parseSelectFunction=null;k=0;if("mxfile"==Z.nodeName){ha=Z.getElementsByTagName("diagram");g=[];for(ja=0;ja<ha.length;ja++)g.push(ha[ja]);k=Math.min(e,g.length-1);0<g.length&&Da(g[k]);if(1<g.length)for(O.removeAttribute("disabled"),O.style.display=
-"",ja=0;ja<g.length;ja++)ha=document.createElement("option"),mxUtils.write(ha,g[ja].getAttribute("name")||mxResources.get("pageWithNumber",[ja+1])),ha.setAttribute("value",ja),ja==k&&ha.setAttribute("selected","selected"),O.appendChild(ha);W=function(){try{var Ba=parseInt(O.value);k=e=Ba;Da(g[Ba])}catch(Ha){O.value=e,b.handleError(Ha)}}}else Ga(Z);ja=S.lastModifyingUserName;null!=ja&&20<ja.length&&(ja=ja.substring(0,20)+"...");I.innerText="";mxUtils.write(I,(null!=ja?ja+" ":"")+Y.toLocaleDateString()+
-" "+Y.toLocaleTimeString());I.setAttribute("title",ca.getAttribute("title"));D.removeAttribute("disabled");A.removeAttribute("disabled");C.removeAttribute("disabled");G.removeAttribute("disabled");M.removeAttribute("disabled");null!=x&&x.isRestricted()||(b.editor.graph.isEnabled()&&X.removeAttribute("disabled"),R.removeAttribute("disabled"),n.removeAttribute("disabled"),U.removeAttribute("disabled"));mxUtils.setOpacity(D,60);mxUtils.setOpacity(A,60);mxUtils.setOpacity(C,60);mxUtils.setOpacity(G,60);
-mxUtils.setOpacity(M,60)}else O.style.display="none",O.innerText="",I.innerText="",mxUtils.write(I,mxResources.get("errorLoadingFile")),mxUtils.write(E,mxResources.get("errorLoadingFile"))};ca=document.createElement("tr");ca.style.borderBottom="1px solid lightGray";ca.style.fontSize="12px";ca.style.cursor="pointer";var da=document.createElement("td");da.style.padding="6px";da.style.whiteSpace="nowrap";S==f[f.length-1]?mxUtils.write(da,mxResources.get("current")):Y.toDateString()===T?mxUtils.write(da,
-Y.toLocaleTimeString()):mxUtils.write(da,Y.toLocaleDateString()+" "+Y.toLocaleTimeString());ca.appendChild(da);ca.setAttribute("title",Y.toLocaleDateString()+" "+Y.toLocaleTimeString()+(null!=S.fileSize?" "+b.formatFileSize(parseInt(S.fileSize)):"")+(null!=S.lastModifyingUserName?" "+S.lastModifyingUserName:""));mxEvent.addListener(ca,"click",function(ja){N!=S&&(v.stop(),null!=L&&(L.style.backgroundColor=""),N=S,L=ca,L.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9",q=J=null,I.removeAttribute("title"),
-I.innerHTML=mxUtils.htmlEntities(mxResources.get("loading")+"..."),u.style.backgroundColor=c.defaultPageBackgroundColor,E.innerText="",c.getModel().clear(),X.setAttribute("disabled","disabled"),R.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"),M.setAttribute("disabled","disabled"),U.setAttribute("disabled","disabled"),n.setAttribute("disabled","disabled"),O.setAttribute("disabled",
-"disabled"),mxUtils.setOpacity(D,20),mxUtils.setOpacity(A,20),mxUtils.setOpacity(C,20),mxUtils.setOpacity(G,20),mxUtils.setOpacity(M,20),v.spin(u),S.getXml(function(ha){if(N==S)try{aa(ha)}catch(Z){I.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+": "+Z.message)}},function(ha){v.stop();O.style.display="none";O.innerText="";I.innerText="";mxUtils.write(I,mxResources.get("errorLoadingFile"));mxUtils.write(E,mxResources.get("errorLoadingFile"))}),mxEvent.consume(ja))});mxEvent.addListener(ca,
-"dblclick",function(ja){n.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(ja)},!1);P.appendChild(ca)}return ca}(f[p]);null!=V&&p==f.length-1&&(K=V)}Q.appendChild(P);t.appendChild(Q)}else null==x||null==b.drive&&x.constructor==window.DriveFile||null==b.dropbox&&x.constructor==window.DropboxFile?(u.style.display="none",B.style.display="none",mxUtils.write(t,mxResources.get("notAvailable"))):(u.style.display="none",B.style.display=
-"none",mxUtils.write(t,mxResources.get("noRevisions")));this.init=function(){null!=K&&K.click()};t=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});t.className="geBtn";B.appendChild(O);B.appendChild(D);B.appendChild(A);B.appendChild(G);B.appendChild(C);B.appendChild(M);b.editor.cancelFirst?(z.appendChild(t),z.appendChild(R),z.appendChild(U),z.appendChild(X),z.appendChild(n)):(z.appendChild(R),z.appendChild(U),z.appendChild(X),z.appendChild(n),z.appendChild(t));d.appendChild(z);
-d.appendChild(B);d.appendChild(I);this.container=d},DraftDialog=function(b,f,l,d,t,u,E,c,e){var g=document.createElement("div"),k=document.createElement("div");k.style.marginTop="0px";k.style.whiteSpace="nowrap";k.style.overflow="auto";k.style.lineHeight="normal";mxUtils.write(k,f);g.appendChild(k);var m=document.createElement("select"),p=mxUtils.bind(this,function(){N=mxUtils.parseXml(e[m.value].data);J=b.editor.extractGraphModel(N.documentElement,!0);q=0;this.init()});if(null!=e){m.style.marginLeft=
-"4px";for(f=0;f<e.length;f++){var v=document.createElement("option");v.setAttribute("value",f);var x=new Date(e[f].created),z=new Date(e[f].modified);mxUtils.write(v,x.toLocaleDateString()+" "+x.toLocaleTimeString()+" - "+(x.toDateString(),z.toDateString(),z.toLocaleDateString())+" "+z.toLocaleTimeString());m.appendChild(v)}k.appendChild(m);mxEvent.addListener(m,"change",p)}null==l&&(l=e[0].data);var y=document.createElement("div");y.style.position="absolute";y.style.border="1px solid lightGray";
-y.style.marginTop="10px";y.style.left="40px";y.style.right="40px";y.style.top="46px";y.style.bottom="74px";y.style.overflow="hidden";mxEvent.disableContextMenu(y);g.appendChild(y);var L=new Graph(y);L.setEnabled(!1);L.setPanning(!0);L.panningHandler.ignoreCell=!0;L.panningHandler.useLeftButtonForPanning=!0;L.minFitScale=null;L.maxFitScale=null;L.centerZoom=!0;var N=mxUtils.parseXml(l),J=b.editor.extractGraphModel(N.documentElement,!0),q=0,D=null,A=L.getGlobalVariable;L.getGlobalVariable=function(G){return"page"==
-G&&null!=D&&null!=D[q]?D[q].getAttribute("name"):"pagenumber"==G?q+1:"pagecount"==G?null!=D?D.length:1:A.apply(this,arguments)};L.getLinkForCell=function(){return null};l=mxUtils.button("",function(){L.zoomIn()});l.className="geSprite geSprite-zoomin";l.setAttribute("title",mxResources.get("zoomIn"));l.style.outline="none";l.style.border="none";l.style.margin="2px";mxUtils.setOpacity(l,60);k=mxUtils.button("",function(){L.zoomOut()});k.className="geSprite geSprite-zoomout";k.setAttribute("title",
+c.getGlobalVariable=function(T){return"page"==T&&null!=g&&null!=g[k]?g[k].getAttribute("name"):"pagenumber"==T?k+1:"pagecount"==T?null!=g?g.length:1:m.apply(this,arguments)};c.getLinkForCell=function(){return null};Editor.MathJaxRender&&c.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(T,Y){b.editor.graph.mathEnabled&&Editor.MathJaxRender(c.container)}));var p={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%"},v=new Spinner(p),x=b.getCurrentFile(),A=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),y={};for(p=0;p<A.length;p++)y[A[p].getAttribute("id")]=A[p];var L=null,N=null,I=null,q=null,D=mxUtils.button("",function(){null!=I&&c.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 z=mxUtils.button("",function(){null!=I&&c.zoomOut()});z.className="geSprite geSprite-zoomout";z.setAttribute("title",mxResources.get("zoomOut"));z.style.outline="none";z.style.border="none";z.style.margin="2px";z.setAttribute("disabled","disabled");mxUtils.setOpacity(z,20);var C=mxUtils.button("",function(){null!=I&&(c.maxFitScale=8,c.fit(8),c.center())});C.className="geSprite geSprite-fit";C.setAttribute("title",mxResources.get("fit"));C.style.outline="none";C.style.border=
+"none";C.style.margin="2px";C.setAttribute("disabled","disabled");mxUtils.setOpacity(C,20);var G=mxUtils.button("",function(){null!=I&&(c.zoomActual(),c.center())});G.className="geSprite geSprite-actualsize";G.setAttribute("title",mxResources.get("actualSize"));G.style.outline="none";G.style.border="none";G.style.margin="2px";G.setAttribute("disabled","disabled");mxUtils.setOpacity(G,20);var H=mxUtils.button("",function(){});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 M=u.cloneNode(!1);M.style.pointerEvent="none";u.parentNode.appendChild(M);var F=new Graph(M);F.setTooltips(!1);F.setEnabled(!1);F.setPanning(!0);F.panningHandler.ignoreCell=!0;F.panningHandler.useLeftButtonForPanning=!0;F.minFitScale=null;F.maxFitScale=null;F.centerZoom=!0;mxEvent.addGestureListeners(H,function(T){T=y[g[e].getAttribute("id")];mxUtils.setOpacity(H,20);E.innerText="";null==T?mxUtils.write(E,
+mxResources.get("pageNotFound")):(J.style.display="none",u.style.display="none",M.style.display="",M.style.backgroundColor=u.style.backgroundColor,T=Editor.parseDiagramNode(T),(new mxCodec(T.ownerDocument)).decode(T,F.getModel()),F.view.scaleAndTranslate(c.view.scale,c.view.translate.x,c.view.translate.y))},null,function(){mxUtils.setOpacity(H,60);E.innerText="";"none"==u.style.display&&(J.style.display="",u.style.display="",M.style.display="none")});var J=document.createElement("div");J.style.position=
+"absolute";J.style.textAlign="right";J.style.color="gray";J.style.marginTop="10px";J.style.backgroundColor="transparent";J.style.top="440px";J.style.right="32px";J.style.maxWidth="380px";J.style.cursor="default";var Q=mxUtils.button(mxResources.get("download"),function(){if(null!=I){var T=mxUtils.getXml(I.documentElement),Y=b.getBaseFilename()+".drawio";b.isLocalFileSave()?b.saveLocalFile(T,Y,"text/xml"):(T="undefined"===typeof pako?"&xml="+encodeURIComponent(T):"&data="+encodeURIComponent(Graph.compress(T)),
+(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(Y)+"&format=xml"+T)).simulate(document,"_blank"))}});Q.className="geBtn";Q.setAttribute("disabled","disabled");var X=mxUtils.button(mxResources.get("restore"),function(T){null!=I&&null!=q&&(mxEvent.isShiftDown(T)?null!=I&&(T=b.getPagesForNode(I.documentElement),T=b.diffPages(b.pages,T),T=new TextareaDialog(b,mxResources.get("compare"),JSON.stringify(T,null,2),function(Y){if(0<Y.length)try{b.confirm(mxResources.get("areYouSure"),function(){x.patch([JSON.parse(Y)],
+null,!0);b.hideDialog();b.hideDialog()})}catch(ba){b.handleError(ba)}},null,null,null,null,null,!0,null,mxResources.get("merge")),b.showDialog(T.container,620,460,!0,!0),T.init()):b.confirm(mxResources.get("areYouSure"),function(){null!=l?l(q):b.spinner.spin(document.body,mxResources.get("restoring"))&&x.save(!0,function(Y){b.spinner.stop();b.replaceFileData(q);b.hideDialog()},function(Y){b.spinner.stop();b.editor.setStatus("");b.handleError(Y,null!=Y?mxResources.get("errorSavingFile"):null)})}))});
+X.className="geBtn";X.setAttribute("disabled","disabled");X.setAttribute("title","Shift+Click for Diff");var P=document.createElement("select");P.setAttribute("disabled","disabled");P.style.maxWidth="80px";P.style.position="relative";P.style.top="-2px";P.style.verticalAlign="bottom";P.style.marginRight="6px";P.style.display="none";var V=null;mxEvent.addListener(P,"change",function(T){null!=V&&(V(T),mxEvent.consume(T))});var W=mxUtils.button(mxResources.get("edit"),function(){null!=I&&(window.openFile=
+new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(I.documentElement)),b.openLink(b.getUrl(),null,!0))});W.className="geBtn";W.setAttribute("disabled","disabled");null!=l&&(W.style.display="none");var n=mxUtils.button(mxResources.get("show"),function(){null!=N&&b.openLink(N.getUrl(P.selectedIndex))});n.className="geBtn gePrimaryBtn";n.setAttribute("disabled","disabled");null!=l&&(n.style.display="none",X.className="geBtn gePrimaryBtn");A=document.createElement("div");
+A.style.position="absolute";A.style.top="482px";A.style.width="640px";A.style.textAlign="right";var B=document.createElement("div");B.className="geToolbarContainer";B.style.backgroundColor="transparent";B.style.padding="2px";B.style.border="none";B.style.left="199px";B.style.top="442px";var K=null;if(null!=f&&0<f.length){u.style.cursor="move";var R=document.createElement("table");R.style.border="1px solid lightGray";R.style.borderCollapse="collapse";R.style.borderSpacing="0px";R.style.width="100%";
+var O=document.createElement("tbody"),U=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(e=mxUtils.indexOf(b.pages,b.currentPage));for(p=f.length-1;0<=p;p--){var S=function(T){var Y=new Date(T.modifiedDate),ba=null;if(0<=Y.getTime()){var aa=function(ha){v.stop();E.innerText="";var ma=mxUtils.parseXml(ha),Z=b.editor.extractGraphModel(ma.documentElement,!0);if(null!=Z){var Fa=function(Ba){null!=Ba&&(Ba=Ca(Editor.parseDiagramNode(Ba)));return Ba},Ca=function(Ba){var Ga=Ba.getAttribute("background");
+if(null==Ga||""==Ga||Ga==mxConstants.NONE)Ga=c.defaultPageBackgroundColor;u.style.backgroundColor=Ga;(new mxCodec(Ba.ownerDocument)).decode(Ba,c.getModel());c.maxFitScale=1;c.fit(8);c.center();return Ba};P.style.display="none";P.innerText="";I=ma;q=ha;g=parseSelectFunction=null;k=0;if("mxfile"==Z.nodeName){ma=Z.getElementsByTagName("diagram");g=[];for(ha=0;ha<ma.length;ha++)g.push(ma[ha]);k=Math.min(e,g.length-1);0<g.length&&Fa(g[k]);if(1<g.length)for(P.removeAttribute("disabled"),P.style.display=
+"",ha=0;ha<g.length;ha++)ma=document.createElement("option"),mxUtils.write(ma,g[ha].getAttribute("name")||mxResources.get("pageWithNumber",[ha+1])),ma.setAttribute("value",ha),ha==k&&ma.setAttribute("selected","selected"),P.appendChild(ma);V=function(){try{var Ba=parseInt(P.value);k=e=Ba;Fa(g[Ba])}catch(Ga){P.value=e,b.handleError(Ga)}}}else Ca(Z);ha=T.lastModifyingUserName;null!=ha&&20<ha.length&&(ha=ha.substring(0,20)+"...");J.innerText="";mxUtils.write(J,(null!=ha?ha+" ":"")+Y.toLocaleDateString()+
+" "+Y.toLocaleTimeString());J.setAttribute("title",ba.getAttribute("title"));D.removeAttribute("disabled");z.removeAttribute("disabled");C.removeAttribute("disabled");G.removeAttribute("disabled");H.removeAttribute("disabled");null!=x&&x.isRestricted()||(b.editor.graph.isEnabled()&&X.removeAttribute("disabled"),Q.removeAttribute("disabled"),n.removeAttribute("disabled"),W.removeAttribute("disabled"));mxUtils.setOpacity(D,60);mxUtils.setOpacity(z,60);mxUtils.setOpacity(C,60);mxUtils.setOpacity(G,60);
+mxUtils.setOpacity(H,60)}else P.style.display="none",P.innerText="",J.innerText="",mxUtils.write(J,mxResources.get("errorLoadingFile")),mxUtils.write(E,mxResources.get("errorLoadingFile"))};ba=document.createElement("tr");ba.style.borderBottom="1px solid lightGray";ba.style.fontSize="12px";ba.style.cursor="pointer";var da=document.createElement("td");da.style.padding="6px";da.style.whiteSpace="nowrap";T==f[f.length-1]?mxUtils.write(da,mxResources.get("current")):Y.toDateString()===U?mxUtils.write(da,
+Y.toLocaleTimeString()):mxUtils.write(da,Y.toLocaleDateString()+" "+Y.toLocaleTimeString());ba.appendChild(da);ba.setAttribute("title",Y.toLocaleDateString()+" "+Y.toLocaleTimeString()+(null!=T.fileSize?" "+b.formatFileSize(parseInt(T.fileSize)):"")+(null!=T.lastModifyingUserName?" "+T.lastModifyingUserName:""));mxEvent.addListener(ba,"click",function(ha){N!=T&&(v.stop(),null!=L&&(L.style.backgroundColor=""),N=T,L=ba,L.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9",q=I=null,J.removeAttribute("title"),
+J.innerHTML=mxUtils.htmlEntities(mxResources.get("loading")+"..."),u.style.backgroundColor=c.defaultPageBackgroundColor,E.innerText="",c.getModel().clear(),X.setAttribute("disabled","disabled"),Q.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"),z.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"),W.setAttribute("disabled","disabled"),n.setAttribute("disabled","disabled"),P.setAttribute("disabled",
+"disabled"),mxUtils.setOpacity(D,20),mxUtils.setOpacity(z,20),mxUtils.setOpacity(C,20),mxUtils.setOpacity(G,20),mxUtils.setOpacity(H,20),v.spin(u),T.getXml(function(ma){if(N==T)try{aa(ma)}catch(Z){J.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+": "+Z.message)}},function(ma){v.stop();P.style.display="none";P.innerText="";J.innerText="";mxUtils.write(J,mxResources.get("errorLoadingFile"));mxUtils.write(E,mxResources.get("errorLoadingFile"))}),mxEvent.consume(ha))});mxEvent.addListener(ba,
+"dblclick",function(ha){n.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(ha)},!1);O.appendChild(ba)}return ba}(f[p]);null!=S&&p==f.length-1&&(K=S)}R.appendChild(O);t.appendChild(R)}else null==x||null==b.drive&&x.constructor==window.DriveFile||null==b.dropbox&&x.constructor==window.DropboxFile?(u.style.display="none",B.style.display="none",mxUtils.write(t,mxResources.get("notAvailable"))):(u.style.display="none",B.style.display=
+"none",mxUtils.write(t,mxResources.get("noRevisions")));this.init=function(){null!=K&&K.click()};t=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});t.className="geBtn";B.appendChild(P);B.appendChild(D);B.appendChild(z);B.appendChild(G);B.appendChild(C);B.appendChild(H);b.editor.cancelFirst?(A.appendChild(t),A.appendChild(Q),A.appendChild(W),A.appendChild(X),A.appendChild(n)):(A.appendChild(Q),A.appendChild(W),A.appendChild(X),A.appendChild(n),A.appendChild(t));d.appendChild(A);
+d.appendChild(B);d.appendChild(J);this.container=d},DraftDialog=function(b,f,l,d,t,u,E,c,e){var g=document.createElement("div"),k=document.createElement("div");k.style.marginTop="0px";k.style.whiteSpace="nowrap";k.style.overflow="auto";k.style.lineHeight="normal";mxUtils.write(k,f);g.appendChild(k);var m=document.createElement("select"),p=mxUtils.bind(this,function(){N=mxUtils.parseXml(e[m.value].data);I=b.editor.extractGraphModel(N.documentElement,!0);q=0;this.init()});if(null!=e){m.style.marginLeft=
+"4px";for(f=0;f<e.length;f++){var v=document.createElement("option");v.setAttribute("value",f);var x=new Date(e[f].created),A=new Date(e[f].modified);mxUtils.write(v,x.toLocaleDateString()+" "+x.toLocaleTimeString()+" - "+(x.toDateString(),A.toDateString(),A.toLocaleDateString())+" "+A.toLocaleTimeString());m.appendChild(v)}k.appendChild(m);mxEvent.addListener(m,"change",p)}null==l&&(l=e[0].data);var y=document.createElement("div");y.style.position="absolute";y.style.border="1px solid lightGray";
+y.style.marginTop="10px";y.style.left="40px";y.style.right="40px";y.style.top="46px";y.style.bottom="74px";y.style.overflow="hidden";mxEvent.disableContextMenu(y);g.appendChild(y);var L=new Graph(y);L.setEnabled(!1);L.setPanning(!0);L.panningHandler.ignoreCell=!0;L.panningHandler.useLeftButtonForPanning=!0;L.minFitScale=null;L.maxFitScale=null;L.centerZoom=!0;var N=mxUtils.parseXml(l),I=b.editor.extractGraphModel(N.documentElement,!0),q=0,D=null,z=L.getGlobalVariable;L.getGlobalVariable=function(G){return"page"==
+G&&null!=D&&null!=D[q]?D[q].getAttribute("name"):"pagenumber"==G?q+1:"pagecount"==G?null!=D?D.length:1:z.apply(this,arguments)};L.getLinkForCell=function(){return null};l=mxUtils.button("",function(){L.zoomIn()});l.className="geSprite geSprite-zoomin";l.setAttribute("title",mxResources.get("zoomIn"));l.style.outline="none";l.style.border="none";l.style.margin="2px";mxUtils.setOpacity(l,60);k=mxUtils.button("",function(){L.zoomOut()});k.className="geSprite geSprite-zoomout";k.setAttribute("title",
mxResources.get("zoomOut"));k.style.outline="none";k.style.border="none";k.style.margin="2px";mxUtils.setOpacity(k,60);f=mxUtils.button("",function(){L.maxFitScale=8;L.fit(8);L.center()});f.className="geSprite geSprite-fit";f.setAttribute("title",mxResources.get("fit"));f.style.outline="none";f.style.border="none";f.style.margin="2px";mxUtils.setOpacity(f,60);v=mxUtils.button("",function(){L.zoomActual();L.center()});v.className="geSprite geSprite-actualsize";v.setAttribute("title",mxResources.get("actualSize"));
v.style.outline="none";v.style.border="none";v.style.margin="2px";mxUtils.setOpacity(v,60);E=mxUtils.button(E||mxResources.get("discard"),function(){t.apply(this,[m.value,mxUtils.bind(this,function(){null!=m.parentNode&&(m.options[m.selectedIndex].parentNode.removeChild(m.options[m.selectedIndex]),0<m.options.length?(m.value=m.options[0].value,p()):b.hideDialog(!0))})])});E.className="geBtn";var C=document.createElement("select");C.style.maxWidth="80px";C.style.position="relative";C.style.top="-2px";
-C.style.verticalAlign="bottom";C.style.marginRight="6px";C.style.display="none";u=mxUtils.button(u||mxResources.get("edit"),function(){d.apply(this,[m.value])});u.className="geBtn gePrimaryBtn";x=document.createElement("div");x.style.position="absolute";x.style.bottom="30px";x.style.right="40px";x.style.textAlign="right";z=document.createElement("div");z.className="geToolbarContainer";z.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";
-this.init=function(){function G(I){if(null!=I){var R=I.getAttribute("background");if(null==R||""==R||R==mxConstants.NONE)R=Editor.isDarkMode()?"transparent":"#ffffff";y.style.backgroundColor=R;(new mxCodec(I.ownerDocument)).decode(I,L.getModel());L.maxFitScale=1;L.fit(8);L.center()}return I}function M(I){null!=I&&(I=G(Editor.parseDiagramNode(I)));return I}mxEvent.addListener(C,"change",function(I){q=parseInt(C.value);M(D[q]);mxEvent.consume(I)});if("mxfile"==J.nodeName){var H=J.getElementsByTagName("diagram");
-D=[];for(var F=0;F<H.length;F++)D.push(H[F]);0<D.length&&M(D[q]);C.innerText="";if(1<D.length)for(C.style.display="",F=0;F<D.length;F++)H=document.createElement("option"),mxUtils.write(H,D[F].getAttribute("name")||mxResources.get("pageWithNumber",[F+1])),H.setAttribute("value",F),F==q&&H.setAttribute("selected","selected"),C.appendChild(H);else C.style.display="none"}else G(J)};z.appendChild(C);z.appendChild(l);z.appendChild(k);z.appendChild(v);z.appendChild(f);l=mxUtils.button(mxResources.get("cancel"),
-function(){b.hideDialog(!0)});l.className="geBtn";c=null!=c?mxUtils.button(mxResources.get("ignore"),c):null;null!=c&&(c.className="geBtn");b.editor.cancelFirst?(x.appendChild(l),null!=c&&x.appendChild(c),x.appendChild(E),x.appendChild(u)):(x.appendChild(u),x.appendChild(E),null!=c&&x.appendChild(c),x.appendChild(l));g.appendChild(x);g.appendChild(z);this.container=g},FindWindow=function(b,f,l,d,t,u){function E(U,n,B,K){if("object"===typeof n.value&&null!=n.value.attributes){n=n.value.attributes;
-for(var Q=0;Q<n.length;Q++)if("label"!=n[Q].nodeName){var P=mxUtils.trim(n[Q].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==U&&(K&&0<=P.indexOf(B)||!K&&P.substring(0,B.length)===B)||null!=U&&U.test(P))return!0}}return!1}function c(){v&&D.value?(R.removeAttribute("disabled"),X.removeAttribute("disabled")):(R.setAttribute("disabled","disabled"),X.setAttribute("disabled","disabled"));D.value&&q.value?O.removeAttribute("disabled"):O.setAttribute("disabled","disabled")}function e(U,
-n,B){F.innerText="";var K=k.model.getDescendants(k.model.getRoot()),Q=q.value.toLowerCase(),P=A.checked?new RegExp(Q):null,T=null;z=null;m!=Q&&(m=Q,p=null,x=!1);var V=null==p;if(0<Q.length){if(x){x=!1;for(var S,Y=0;Y<b.pages.length;Y++)if(b.currentPage==b.pages[Y]){S=Y;break}U=(S+1)%b.pages.length;p=null;do x=!1,K=b.pages[U],k=b.createTemporaryGraph(k.getStylesheet()),b.updatePageRoot(K),k.model.setRoot(K.root),U=(U+1)%b.pages.length;while(!e(!0,n,B)&&U!=S);p&&(p=null,B?b.editor.graph.model.execute(new SelectPage(b,
-K)):b.selectPage(K));x=!1;k=b.editor.graph;return e(!0,n,B)}for(Y=0;Y<K.length;Y++){S=k.view.getState(K[Y]);n&&null!=P&&(V=V||S==p);if(null!=S&&null!=S.cell.value&&(V||null==T)&&(k.model.isVertex(S.cell)||k.model.isEdge(S.cell))){null!=S.style&&"1"==S.style.html?(G.innerHTML=k.sanitizeHtml(k.getLabel(S.cell)),label=mxUtils.extractTextWithWhitespace([G])):label=k.getLabel(S.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var ca=0;n&&u&&null!=P&&S==p&&(label=label.substr(y),
-ca=y);var aa=""==D.value,da=aa;if(null==P&&(da&&0<=label.indexOf(Q)||!da&&label.substring(0,Q.length)===Q||aa&&E(P,S.cell,Q,da))||null!=P&&(P.test(label)||aa&&E(P,S.cell,Q,da)))if(u&&(null!=P?(aa=label.match(P),null!=aa&&0<aa.length&&(z=aa[0].toLowerCase(),y=ca+aa.index+z.length)):(z=Q,y=z.length)),V){T=S;break}else null==T&&(T=S)}V=V||S==p}}if(null!=T){if(Y==K.length&&C.checked)return p=null,x=!0,e(!0,n,B);p=T;k.scrollCellToVisible(p.cell);k.isEnabled()&&!k.isCellLocked(p.cell)?B||k.getSelectionCell()==
-p.cell&&1==k.getSelectionCount()||k.setSelectionCell(p.cell):k.highlightCell(p.cell)}else{if(!U&&C.checked)return x=!0,e(!0,n,B);k.isEnabled()&&!B&&k.clearSelection()}v=null!=T;u&&!U&&c();return 0==Q.length||null!=T}var g=b.actions.get("findReplace"),k=b.editor.graph,m=null,p=null,v=!1,x=!1,z=null,y=0,L=1,N=document.createElement("div");N.style.userSelect="none";N.style.overflow="hidden";N.style.padding="10px";N.style.height="100%";var J=u?"260px":"200px",q=document.createElement("input");q.setAttribute("placeholder",
-mxResources.get("find"));q.setAttribute("type","text");q.style.marginTop="4px";q.style.marginBottom="6px";q.style.width=J;q.style.fontSize="12px";q.style.borderRadius="4px";q.style.padding="6px";N.appendChild(q);mxUtils.br(N);if(u){var 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=J;D.style.fontSize="12px";D.style.borderRadius="4px";D.style.padding="6px";
-N.appendChild(D);mxUtils.br(N);mxEvent.addListener(D,"input",c)}var A=document.createElement("input");A.setAttribute("id","geFindWinRegExChck");A.setAttribute("type","checkbox");A.style.marginRight="4px";N.appendChild(A);J=document.createElement("label");J.setAttribute("for","geFindWinRegExChck");N.appendChild(J);mxUtils.write(J,mxResources.get("regularExpression"));N.appendChild(J);J=b.menus.createHelpLink("https://www.diagrams.net/doc/faq/find-shapes");J.style.position="relative";J.style.marginLeft=
-"6px";J.style.top="-1px";N.appendChild(J);mxUtils.br(N);var C=document.createElement("input");C.setAttribute("id","geFindWinAllPagesChck");C.setAttribute("type","checkbox");C.style.marginRight="4px";N.appendChild(C);J=document.createElement("label");J.setAttribute("for","geFindWinAllPagesChck");N.appendChild(J);mxUtils.write(J,mxResources.get("allPages"));N.appendChild(J);var G=document.createElement("div");mxUtils.br(N);J=document.createElement("div");J.style.left="0px";J.style.right="0px";J.style.marginTop=
-"6px";J.style.padding="0 6px 0 6px";J.style.textAlign="center";N.appendChild(J);var M=mxUtils.button(mxResources.get("reset"),function(){F.innerText="";q.value="";q.style.backgroundColor="";u&&(D.value="",c());m=p=null;x=!1;q.focus()});M.setAttribute("title",mxResources.get("reset"));M.style.float="none";M.style.width="120px";M.style.marginTop="6px";M.style.marginLeft="8px";M.style.overflow="hidden";M.style.textOverflow="ellipsis";M.className="geBtn";u||J.appendChild(M);var H=mxUtils.button(mxResources.get("find"),
-function(){try{q.style.backgroundColor=e()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(U){b.handleError(U)}});H.setAttribute("title",mxResources.get("find")+" (Enter)");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 gePrimaryBtn";J.appendChild(H);var F=document.createElement("div");F.style.marginTop="10px";if(u){var I=function(U,n,B,K,Q){if(null==Q||"1"!=Q.html)return K=U.toLowerCase().indexOf(n,
-K),0>K?U:U.substr(0,K)+B+U.substr(K+n.length);var P=U;n=mxUtils.htmlEntities(n);Q=[];var T=-1;for(U=U.replace(/<br>/ig,"\n");-1<(T=U.indexOf("<",T+1));)Q.push(T);T=U.match(/<[^>]*>/g);U=U.replace(/<[^>]*>/g,"");K=U.toLowerCase().indexOf(n,K);if(0>K)return P;P=K+n.length;B=mxUtils.htmlEntities(B);U=U.substr(0,K)+B+U.substr(P);for(var V=0,S=0;S<Q.length;S++){if(Q[S]-V<K)U=U.substr(0,Q[S])+T[S]+U.substr(Q[S]);else{var Y=Q[S]-V<P?K+V:Q[S]+(B.length-n.length);U=U.substr(0,Y)+T[S]+U.substr(Y)}V+=T[S].length}return U.replace(/\n/g,
-"<br>")},R=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=z&&null!=p&&D.value){var U=p.cell,n=k.getLabel(U);k.isCellEditable(U)&&k.model.setValue(U,I(n,z,D.value,y-z.length,k.getCurrentCellStyle(U)));q.style.backgroundColor=e(!1,!0)?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}}catch(B){b.handleError(B)}});R.setAttribute("title",mxResources.get("replFind"));R.style.float="none";R.style.width="120px";R.style.marginTop="6px";R.style.marginLeft="8px";R.style.overflow="hidden";R.style.textOverflow=
-"ellipsis";R.className="geBtn gePrimaryBtn";R.setAttribute("disabled","disabled");J.appendChild(R);mxUtils.br(J);var X=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=z&&null!=p&&D.value){var U=p.cell,n=k.getLabel(U);k.model.setValue(U,I(n,z,D.value,y-z.length,k.getCurrentCellStyle(U)));R.setAttribute("disabled","disabled");X.setAttribute("disabled","disabled")}}catch(B){b.handleError(B)}});X.setAttribute("title",mxResources.get("replace"));X.style.float="none";X.style.width="120px";
-X.style.marginTop="6px";X.style.marginLeft="8px";X.style.overflow="hidden";X.style.textOverflow="ellipsis";X.className="geBtn gePrimaryBtn";X.setAttribute("disabled","disabled");J.appendChild(X);var O=mxUtils.button(mxResources.get("replaceAll"),function(){F.innerText="";if(D.value){m=null;var U=b.currentPage,n=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;k.getModel().beginUpdate();try{for(var B=0,K={};e(!1,!0,!0)&&100>B;){var Q=p.cell,P=k.getLabel(Q),T=K[Q.id];if(T&&T.replAllMrk==
-L&&T.replAllPos>=y)break;K[Q.id]={replAllMrk:L,replAllPos:y};k.isCellEditable(Q)&&(k.model.setValue(Q,I(P,z,D.value,y-z.length,k.getCurrentCellStyle(Q))),B++)}U!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,U));mxUtils.write(F,mxResources.get("matchesRepl",[B]))}catch(V){b.handleError(V)}finally{k.getModel().endUpdate(),b.editor.graph.setSelectionCells(n),b.editor.graph.rendering=!0}L++}});O.setAttribute("title",mxResources.get("replaceAll"));O.style.float="none";O.style.width="120px";
-O.style.marginTop="6px";O.style.marginLeft="8px";O.style.overflow="hidden";O.style.textOverflow="ellipsis";O.className="geBtn gePrimaryBtn";O.setAttribute("disabled","disabled");J.appendChild(O);mxUtils.br(J);J.appendChild(M);M=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));M.setAttribute("title",mxResources.get("close"));M.style.float="none";M.style.width="120px";M.style.marginTop="6px";M.style.marginLeft="8px";M.style.overflow="hidden";M.style.textOverflow=
-"ellipsis";M.className="geBtn";J.appendChild(M);mxUtils.br(J);J.appendChild(F)}else M.style.width="90px",H.style.width="90px";mxEvent.addListener(q,"keyup",function(U){if(91==U.keyCode||93==U.keyCode||17==U.keyCode)mxEvent.consume(U);else if(27==U.keyCode)g.funct();else if(m!=q.value.toLowerCase()||13==U.keyCode)try{q.style.backgroundColor=e()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(n){q.style.backgroundColor=Editor.isDarkMode()?"#ff0000":"#ffcfcf"}});mxEvent.addListener(N,"keydown",function(U){70==
-U.keyCode&&b.keyHandler.isControlDown(U)&&!mxEvent.isShiftDown(U)&&(g.funct(),mxEvent.consume(U))});this.window=new mxWindow(mxResources.get("find")+(u?"/"+mxResources.get("replace"):""),N,f,l,d,t,!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()?(q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?q.select():
-document.execCommand("selectAll",!1,null),null!=b.pages&&1<b.pages.length?C.removeAttribute("disabled"):(C.checked=!1,C.setAttribute("disabled","disabled"))):k.container.focus()}));this.window.setLocation=function(U,n){var B=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;U=Math.max(0,Math.min(U,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));n=Math.max(0,Math.min(n,B-this.table.clientHeight-("1"==
-urlParams.sketch?3:48)));this.getX()==U&&this.getY()==n||mxWindow.prototype.setLocation.apply(this,arguments)};var W=mxUtils.bind(this,function(){var U=this.window.getX(),n=this.window.getY();this.window.setLocation(U,n)});mxEvent.addListener(window,"resize",W);this.destroy=function(){mxEvent.removeListener(window,"resize",W);this.window.destroy()}},FreehandWindow=function(b,f,l,d,t,u){var E=b.editor.graph;b=document.createElement("div");b.style.textAlign="center";b.style.userSelect="none";b.style.overflow=
-"hidden";b.style.height="100%";if(u){var c=document.createElement("input");c.setAttribute("id","geFreehandBrush");c.setAttribute("type","checkbox");c.style.margin="10px 5px 0px 10px";c.style.float="left";b.appendChild(c);var e=document.createElement("label");e.setAttribute("for","geFreehandBrush");e.style.float="left";e.style.marginTop="10px";b.appendChild(e);mxUtils.write(e,mxResources.get("brush"));b.appendChild(e);mxUtils.br(b);var g=document.createElement("input");g.setAttribute("type","range");
-g.setAttribute("min","2");g.setAttribute("max","30");g.setAttribute("value",E.freehand.getBrushSize());g.style.width="90%";g.style.visibility="hidden";b.appendChild(g);mxUtils.br(b);mxEvent.addListener(c,"change",function(){E.freehand.setPerfectFreehandMode(this.checked);g.style.visibility=this.checked?"visible":"hidden"});mxEvent.addListener(g,"change",function(){E.freehand.setBrushSize(parseInt(this.value))})}var k=mxUtils.button(mxResources.get("startDrawing"),function(){E.freehand.isDrawing()?
-E.freehand.stopDrawing():E.freehand.startDrawing()});k.setAttribute("title",mxResources.get("startDrawing"));k.style.marginTop=u?"5px":"10px";k.style.width="90%";k.style.boxSizing="border-box";k.style.overflow="hidden";k.style.textOverflow="ellipsis";k.style.textAlign="center";k.className="geBtn gePrimaryBtn";b.appendChild(k);this.window=new mxWindow(mxResources.get("freehand"),b,f,l,d,t,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);
-E.addListener("freehandStateChanged",mxUtils.bind(this,function(){k.innerText="";mxUtils.write(k,mxResources.get(E.freehand.isDrawing()?"stopDrawing":"startDrawing"));k.setAttribute("title",mxResources.get(E.freehand.isDrawing()?"stopDrawing":"startDrawing"));k.className="geBtn"+(E.freehand.isDrawing()?"":" gePrimaryBtn")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){E.freehand.isDrawing()&&E.freehand.stopDrawing()}));
-this.window.setLocation=function(p,v){var x=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;p=Math.max(0,Math.min(p,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));v=Math.max(0,Math.min(v,x-this.table.clientHeight-("1"==urlParams.sketch?3:48)));this.getX()==p&&this.getY()==v||mxWindow.prototype.setLocation.apply(this,arguments)};var m=mxUtils.bind(this,function(){var p=this.window.getX(),v=this.window.getY();
-this.window.setLocation(p,v)});mxEvent.addListener(window,"resize",m);this.destroy=function(){mxEvent.removeListener(window,"resize",m);this.window.destroy()}},TagsWindow=function(b,f,l,d,t){var u=b.editor.graph,E=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(g,k){if(u.isEnabled()){var m=new FilenameDialog(b,"",mxResources.get("add"),function(p){b.hideDialog();if(null!=p&&0<p.length){p=p.split(" ");for(var v=[],x=0;x<p.length;x++){var z=
-mxUtils.trim(p[x]);""!=z&&0>mxUtils.indexOf(g,z)&&v.push(z)}0<v.length&&(u.isSelectionEmpty()?k(g.concat(v)):u.addTagsForCells(u.getSelectionCells(),v))}},mxResources.get("enterValue")+" ("+mxResources.get("tags")+")");b.showDialog(m.container,300,80,!0,!0);m.init()}}),c=E.div;this.window=new mxWindow(mxResources.get("tags"),c,f,l,d,t,!0,!0);this.window.minimumSize=new mxRectangle(0,0,212,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);
-this.window.addListener("show",mxUtils.bind(this,function(){E.refresh();this.window.fit()}));this.window.setLocation=function(g,k){var m=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;g=Math.max(0,Math.min(g,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));k=Math.max(0,Math.min(k,m-this.table.clientHeight-("1"==urlParams.sketch?3:48)));this.getX()==g&&this.getY()==k||mxWindow.prototype.setLocation.apply(this,
-arguments)};var e=mxUtils.bind(this,function(){var g=this.window.getX(),k=this.window.getY();this.window.setLocation(g,k)});mxEvent.addListener(window,"resize",e);this.destroy=function(){mxEvent.removeListener(window,"resize",e);this.window.destroy()}},AuthDialog=function(b,f,l,d){var t=document.createElement("div");t.style.textAlign="center";var u=document.createElement("p");u.style.fontSize="16pt";u.style.padding="0px";u.style.margin="0px";u.style.color="gray";mxUtils.write(u,mxResources.get("authorizationRequired"));
-var E="Unknown",c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("align","absmiddle");c.style.marginRight="10px";f==b.drive?(E=mxResources.get("googleDrive"),c.src=IMAGE_PATH+"/google-drive-logo-white.svg"):f==b.dropbox?(E=mxResources.get("dropbox"),c.src=IMAGE_PATH+"/dropbox-logo-white.svg"):f==b.oneDrive?(E=mxResources.get("oneDrive"),c.src=IMAGE_PATH+"/onedrive-logo-white.svg"):f==b.gitHub?(E=mxResources.get("github"),c.src=IMAGE_PATH+"/github-logo-white.svg"):f==b.gitLab?
-(E=mxResources.get("gitlab"),c.src=IMAGE_PATH+"/gitlab-logo.svg",c.style.width="32px"):f==b.trello&&(E=mxResources.get("trello"),c.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizeThisAppIn",[E]));var e=document.createElement("input");e.setAttribute("type","checkbox");E=mxUtils.button(mxResources.get("authorize"),function(){d(e.checked)});E.insertBefore(c,E.firstChild);E.style.marginTop="6px";E.className="geBigButton";E.style.fontSize=
-"18px";E.style.padding="14px";t.appendChild(u);t.appendChild(b);t.appendChild(E);l&&(l=document.createElement("p"),l.style.marginTop="20px",l.appendChild(e),u=document.createElement("span"),mxUtils.write(u," "+mxResources.get("rememberMe")),l.appendChild(u),t.appendChild(l),e.checked=!0,e.defaultChecked=!0,mxEvent.addListener(u,"click",function(g){e.checked=!e.checked;mxEvent.consume(g)}));this.container=t},MoreShapesDialog=function(b,f,l){l=null!=l?l:b.sidebar.entries;var d=document.createElement("div"),
-t=[];if(null!=b.sidebar.customEntries)for(var u=0;u<b.sidebar.customEntries.length;u++){for(var E=b.sidebar.customEntries[u],c={title:b.getResource(E.title),entries:[]},e=0;e<E.entries.length;e++){var g=E.entries[e];c.entries.push({id:g.id,title:b.getResource(g.title),desc:b.getResource(g.desc),image:g.preview})}t.push(c)}for(u=0;u<l.length;u++)if(null==b.sidebar.enabledLibraries)t.push(l[u]);else{c={title:l[u].title,entries:[]};for(e=0;e<l[u].entries.length;e++)0<=mxUtils.indexOf(b.sidebar.enabledLibraries,
-l[u].entries[e].id)&&c.entries.push(l[u].entries[e]);0<c.entries.length&&t.push(c)}l=t;if(f){u=mxUtils.bind(this,function(A){for(var C=0;C<A.length;C++)(function(G){var M=x.cloneNode(!1);M.style.fontWeight="bold";M.style.backgroundColor=Editor.isDarkMode()?"#505759":"#e5e5e5";M.style.padding="6px 0px 6px 20px";mxUtils.write(M,G.title);k.appendChild(M);for(var H=0;H<G.entries.length;H++)(function(F){var I=x.cloneNode(!1);I.style.cursor="pointer";I.style.padding="4px 0px 4px 20px";I.style.whiteSpace=
-"nowrap";I.style.overflow="hidden";I.style.textOverflow="ellipsis";I.setAttribute("title",F.title+" ("+F.id+")");var R=document.createElement("input");R.setAttribute("type","checkbox");R.checked=b.sidebar.isEntryVisible(F.id);R.defaultChecked=R.checked;I.appendChild(R);mxUtils.write(I," "+F.title);k.appendChild(I);var X=function(O){if(null==O||"INPUT"!=mxEvent.getSource(O).nodeName){m.style.textAlign="center";m.style.padding="0px";m.style.color="";m.innerText="";if(null!=F.desc){var W=document.createElement("pre");
-W.style.boxSizing="border-box";W.style.fontFamily="inherit";W.style.margin="20px";W.style.right="0px";W.style.textAlign="left";mxUtils.write(W,F.desc);m.appendChild(W)}null!=F.imageCallback?F.imageCallback(m):null!=F.image?m.innerHTML+='<img border="0" src="'+F.image+'"/>':null==F.desc&&(m.style.padding="20px",m.style.color="rgb(179, 179, 179)",mxUtils.write(m,mxResources.get("noPreview")));null!=p&&(p.style.backgroundColor="");p=I;p.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9";null!=
-O&&mxEvent.consume(O)}};mxEvent.addListener(I,"click",X);mxEvent.addListener(I,"dblclick",function(O){R.checked=!R.checked;mxEvent.consume(O)});v.push(function(){return R.checked?F.id:null});0==C&&0==H&&X()})(G.entries[H])})(A[C])});e=document.createElement("div");e.className="geDialogTitle";mxUtils.write(e,mxResources.get("shapes"));e.style.position="absolute";e.style.top="0px";e.style.left="0px";e.style.lineHeight="40px";e.style.height="40px";e.style.right="0px";var k=document.createElement("div"),
-m=document.createElement("div");k.style.position="absolute";k.style.top="40px";k.style.left="0px";k.style.width="202px";k.style.bottom="60px";k.style.overflow="auto";m.style.position="absolute";m.style.left="202px";m.style.right="0px";m.style.top="40px";m.style.bottom="60px";m.style.overflow="auto";m.style.borderLeft="1px solid rgb(211, 211, 211)";m.style.textAlign="center";var p=null,v=[],x=document.createElement("div");x.style.position="relative";x.style.left="0px";x.style.right="0px";u(l);d.style.padding=
-"30px";d.appendChild(e);d.appendChild(k);d.appendChild(m);l=document.createElement("div");l.className="geDialogFooter";l.style.position="absolute";l.style.paddingRight="16px";l.style.color="gray";l.style.left="0px";l.style.right="0px";l.style.bottom="0px";l.style.height="60px";l.style.lineHeight="52px";var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.position="relative";z.style.top="1px";z.checked=b.sidebar.sidebarTitles;z.defaultChecked=z.checked;l.appendChild(z);u=
-document.createElement("span");mxUtils.write(u," "+mxResources.get("labels"));u.style.paddingRight="20px";l.appendChild(u);mxEvent.addListener(u,"click",function(A){z.checked=!z.checked;mxEvent.consume(A)});var y=document.createElement("input");y.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)u=document.createElement("span"),u.style.paddingRight="20px",u.appendChild(y),mxUtils.write(u," "+mxResources.get("rememberThisSetting")),y.style.position="relative",y.style.top="1px",
-y.checked=!0,y.defaultChecked=!0,mxEvent.addListener(u,"click",function(A){mxEvent.getSource(A)!=y&&(y.checked=!y.checked,mxEvent.consume(A))}),l.appendChild(u);u=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});u.className="geBtn";e=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var A=[],C=0;C<v.length;C++){var G=v[C].apply(this,arguments);null!=G&&A.push(G)}"1"==urlParams.sketch&&b.isSettingsEnabled()&&(C=mxUtils.indexOf(A,".scratchpad"),null!=b.scratchpad!=
-(0<=C&&0<A.splice(C,1).length)&&b.toggleScratchpad(),C=mxUtils.indexOf(A,"search"),mxSettings.settings.search=0<=C&&0<A.splice(C,1).length,b.sidebar.showPalette("search",mxSettings.settings.search),y.checked&&mxSettings.save());b.sidebar.showEntries(A.join(";"),y.checked,!0);b.setSidebarTitles(z.checked,y.checked)});e.className="geBtn gePrimaryBtn"}else{var L=document.createElement("table");u=document.createElement("tbody");d.style.height="100%";d.style.overflow="auto";e=document.createElement("tr");
-L.style.width="100%";f=document.createElement("td");t=document.createElement("td");E=document.createElement("td");var N=mxUtils.bind(this,function(A,C,G){var M=document.createElement("input");M.type="checkbox";L.appendChild(M);M.checked=b.sidebar.isEntryVisible(G);var H=document.createElement("span");mxUtils.write(H,C);C=document.createElement("div");C.style.display="block";C.appendChild(M);C.appendChild(H);mxEvent.addListener(H,"click",function(F){M.checked=!M.checked;mxEvent.consume(F)});A.appendChild(C);
-return function(){return M.checked?G:null}});e.appendChild(f);e.appendChild(t);e.appendChild(E);u.appendChild(e);L.appendChild(u);v=[];var J=0;for(u=0;u<l.length;u++)for(e=0;e<l[u].entries.length;e++)J++;var q=[f,t,E],D=0;for(u=0;u<l.length;u++)(function(A){for(var C=0;C<A.entries.length;C++){var G=A.entries[C];v.push(N(q[Math.floor(D/(J/3))],G.title,G.id));D++}})(l[u]);d.appendChild(L);l=document.createElement("div");l.style.marginTop="18px";l.style.textAlign="center";y=document.createElement("input");
-isLocalStorage&&(y.setAttribute("type","checkbox"),y.checked=!0,y.defaultChecked=!0,l.appendChild(y),u=document.createElement("span"),mxUtils.write(u," "+mxResources.get("rememberThisSetting")),l.appendChild(u),mxEvent.addListener(u,"click",function(A){y.checked=!y.checked;mxEvent.consume(A)}));d.appendChild(l);u=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});u.className="geBtn";e=mxUtils.button(mxResources.get("apply"),function(){for(var A=["search"],C=0;C<v.length;C++){var G=
-v[C].apply(this,arguments);null!=G&&A.push(G)}b.sidebar.showEntries(0<A.length?A.join(";"):"",y.checked);b.hideDialog()});e.className="geBtn gePrimaryBtn";l=document.createElement("div");l.style.marginTop="26px";l.style.textAlign="right"}b.editor.cancelFirst?(l.appendChild(u),l.appendChild(e)):(l.appendChild(e),l.appendChild(u));d.appendChild(l);this.container=d},PluginsDialog=function(b,f,l,d){function t(){e=!0;if(0==c.length)E.innerHTML=mxUtils.htmlEntities(mxResources.get("noPlugins"));else{E.innerText=
-"";for(var x=0;x<c.length;x++){var z=document.createElement("span");z.style.whiteSpace="nowrap";var y=document.createElement("span");y.className="geSprite geSprite-delete";y.style.position="relative";y.style.cursor="pointer";y.style.top="5px";y.style.marginRight="4px";y.style.display="inline-block";z.appendChild(y);mxUtils.write(z,c[x]);E.appendChild(z);mxUtils.br(E);mxEvent.addListener(y,"click",function(L){return function(){b.confirm(mxResources.get("delete")+' "'+c[L]+'"?',function(){null!=l&&
-l(c[L]);c.splice(L,1);t()})}}(x))}}}var u=document.createElement("div"),E=document.createElement("div");E.style.height="180px";E.style.overflow="auto";var c=mxSettings.getPlugins().slice(),e=!1;u.appendChild(E);t();e=!1;var g=mxUtils.button(mxResources.get("add"),null!=f?function(){f(function(x){x&&0>mxUtils.indexOf(c,x)&&c.push(x);t()})}:function(){var x=document.createElement("div"),z=document.createElement("span");z.style.marginTop="6px";mxUtils.write(z,mxResources.get("builtinPlugins")+": ");
-x.appendChild(z);var y=document.createElement("select");y.style.width="150px";for(z=0;z<App.publicPlugin.length;z++){var L=document.createElement("option");mxUtils.write(L,App.publicPlugin[z]);L.value=App.publicPlugin[z];y.appendChild(L)}x.appendChild(y);mxUtils.br(x);mxUtils.br(x);z=mxUtils.button(mxResources.get("custom")+"...",function(){var N=new FilenameDialog(b,"",mxResources.get("add"),function(J){b.hideDialog();if(null!=J&&0<J.length){J=J.split(";");for(var q=0;q<J.length;q++){var D=J[q],
-A=App.pluginRegistry[D];null!=A&&(D=A);0<D.length&&0>mxUtils.indexOf(c,D)&&c.push(D)}t()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(N.container,300,80,!0,!0);N.init()});z.className="geBtn";x=new CustomDialog(b,x,mxUtils.bind(this,function(){var N=App.pluginRegistry[y.value];0>mxUtils.indexOf(c,N)&&(c.push(N),t())}),null,null,null,z);b.showDialog(x.container,300,100,!0,!0)});g.className="geBtn";var k=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});
-k.className="geBtn";var m=mxUtils.button(d?mxResources.get("close"):mxResources.get("apply"),function(){e?(mxSettings.setPlugins(c),mxSettings.save(),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))):b.hideDialog()});m.className="geBtn gePrimaryBtn";var p=document.createElement("div");p.style.marginTop="14px";p.style.textAlign="right";var v=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/plugins")});v.className="geBtn";b.isOffline()&&
-!mxClient.IS_CHROMEAPP&&(v.style.display="none");p.appendChild(v);b.editor.cancelFirst?(d||p.appendChild(k),p.appendChild(g),p.appendChild(m)):(p.appendChild(g),p.appendChild(m),d||p.appendChild(k));u.appendChild(p);this.container=u},CropImageDialog=function(b,f,l,d){function t(){var A=y.checked,C=L.checked,G=v.geometry,M=e.width,H=e.height,F=(300-M)/2,I=(300-H)/2;G.x<F?(G.width-=F-G.x,G.x=F):G.x+G.width>F+M&&(G.width=F+M-G.x,G.x=Math.min(G.x,F+M));G.y<I?(G.height-=I-G.y,G.y=I):G.y+G.height>I+H&&
-(G.height=I+H-G.y,G.y=Math.min(G.y,I+H));var R=(G.x-F)/M*100;M=100-(G.x+G.width-F)/M*100;F=(G.y-I)/H*100;G=100-(G.y+G.height-I)/H*100;return"inset("+mxUtils.format(F)+"% "+mxUtils.format(M)+"% "+mxUtils.format(G)+"% "+mxUtils.format(R)+"%"+(A?" round "+p+"%":C?" round 50%":"")+")"}function u(A){null!=k&&(!0!==A&&(k.model.setGeometry(v,m.clone()),p=5,J.value=p),k.model.setStyle(v,x+t()),k.selectAll(),N.style.visibility=y.checked?"visible":"hidden")}var E=document.createElement("div"),c=document.createElement("div");
-c.style.height="300px";c.style.width="300px";c.style.display="inline-flex";c.style.justifyContent="center";c.style.alignItems="center";c.style.position="absolute";var e=document.createElement("img");e.onload=function(){function A(){k.model.setStyle(v,x+t())}k=new Graph(g);k.autoExtend=!1;k.autoScroll=!1;k.setGridEnabled(!1);k.setEnabled(!0);k.setPanning(!1);k.setConnectable(!1);k.getRubberband().setEnabled(!1);k.graphHandler.allowLivePreview=!1;var C=k.createVertexHandler;k.createVertexHandler=function(){var Q=
-C.apply(this,arguments);Q.livePreview=!1;return Q};if(null!=l)try{if("inset"==l.substring(0,5)){var G=v.geometry,M=e.width,H=e.height,F=(300-M)/2,I=(300-H)/2,R=l.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),X=parseFloat(R[0]),O=parseFloat(R[1]),W=parseFloat(R[2]),U=parseFloat(R[3]);isFinite(X)&&isFinite(O)&&isFinite(W)&&isFinite(U)?(G.x=U/100*M+F,G.y=X/100*H+I,G.width=(100-O)/100*M+F-G.x,G.height=(100-W)/100*H+I-G.y,"round"==R[4]?"50%"==R[5]?L.setAttribute("checked","checked"):(p=parseInt(R[5]),J.value=
-p,y.setAttribute("checked","checked"),N.style.visibility="visible"):z.setAttribute("checked","checked")):l=null}else l=null}catch(Q){}v.style=x+(l?l:t());v.vertex=!0;k.addCell(v,null,null,null,null);k.selectAll();k.addListener(mxEvent.CELLS_MOVED,A);k.addListener(mxEvent.CELLS_RESIZED,A);var n=k.graphHandler.mouseUp,B=k.graphHandler.mouseDown;k.graphHandler.mouseUp=function(){n.apply(this,arguments);g.style.backgroundColor="#fff9"};k.graphHandler.mouseDown=function(){B.apply(this,arguments);g.style.backgroundColor=
-""};k.dblClick=function(){};var K=k.getSelectionModel().changeSelection;k.getSelectionModel().changeSelection=function(){K.call(this,[v],[v])}};e.onerror=function(){e.onload=null;e.src=Editor.errorImage};e.setAttribute("src",f);e.style.maxWidth="300px";e.style.maxHeight="300px";c.appendChild(e);E.appendChild(c);var g=document.createElement("div");g.style.width="300px";g.style.height="300px";g.style.overflow="hidden";g.style.backgroundColor="#fff9";E.appendChild(g);var k=null,m=new mxGeometry(100,
-100,100,100),p=5,v=new mxCell("",m.clone(),""),x="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+f.replace(";base64","")+";clipPath=",z=document.createElement("input");z.setAttribute("type","radio");z.setAttribute("id","croppingRect");z.setAttribute("name","croppingShape");z.setAttribute("checked","checked");z.style.margin="5px";E.appendChild(z);f=document.createElement("label");f.setAttribute("for","croppingRect");mxUtils.write(f,mxResources.get("rectangle"));E.appendChild(f);
-var y=document.createElement("input");y.setAttribute("type","radio");y.setAttribute("id","croppingRounded");y.setAttribute("name","croppingShape");y.style.margin="5px";E.appendChild(y);f=document.createElement("label");f.setAttribute("for","croppingRounded");mxUtils.write(f,mxResources.get("rounded"));E.appendChild(f);var L=document.createElement("input");L.setAttribute("type","radio");L.setAttribute("id","croppingEllipse");L.setAttribute("name","croppingShape");L.style.margin="5px";E.appendChild(L);
-f=document.createElement("label");f.setAttribute("for","croppingEllipse");mxUtils.write(f,mxResources.get("ellipse"));E.appendChild(f);mxEvent.addListener(z,"change",u);mxEvent.addListener(y,"change",u);mxEvent.addListener(L,"change",u);var N=document.createElement("div");N.style.textAlign="center";N.style.visibility="hidden";var J=document.createElement("input");J.setAttribute("type","range");J.setAttribute("min","1");J.setAttribute("max","49");J.setAttribute("value",p);J.setAttribute("title",mxResources.get("arcSize"));
-N.appendChild(J);E.appendChild(N);mxEvent.addListener(J,"change",function(){p=this.value;u(!0)});f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});f.className="geBtn";c=mxUtils.button(mxResources.get("apply"),function(){d(t(),v.geometry.width,v.geometry.height);b.hideDialog()});c.className="geBtn gePrimaryBtn";var q=mxUtils.button(mxResources.get("reset"),function(){d(null,e.width,e.height);b.hideDialog()});q.className="geBtn";var D=document.createElement("div");D.style.marginTop=
-"10px";D.style.textAlign="right";b.editor.cancelFirst?(D.appendChild(f),D.appendChild(q),D.appendChild(c)):(D.appendChild(q),D.appendChild(c),D.appendChild(f));E.appendChild(D);this.container=E},EditGeometryDialog=function(b,f){var l=b.editor.graph,d=1==f.length?l.getCellGeometry(f[0]):null,t=document.createElement("div"),u=document.createElement("table"),E=document.createElement("tbody"),c=document.createElement("tr"),e=document.createElement("td"),g=document.createElement("td");u.style.paddingLeft=
-"6px";mxUtils.write(e,mxResources.get("relative")+":");var k=document.createElement("input");k.setAttribute("type","checkbox");null!=d&&d.relative&&(k.setAttribute("checked","checked"),k.defaultChecked=!0);this.init=function(){k.focus()};g.appendChild(k);c.appendChild(e);c.appendChild(g);E.appendChild(c);c=document.createElement("tr");e=document.createElement("td");g=document.createElement("td");mxUtils.write(e,mxResources.get("left")+":");var m=document.createElement("input");m.setAttribute("type",
-"text");m.style.width="100px";m.value=null!=d?d.x:"";g.appendChild(m);c.appendChild(e);c.appendChild(g);E.appendChild(c);c=document.createElement("tr");e=document.createElement("td");g=document.createElement("td");mxUtils.write(e,mxResources.get("top")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value=null!=d?d.y:"";g.appendChild(p);c.appendChild(e);c.appendChild(g);E.appendChild(c);c=document.createElement("tr");e=document.createElement("td");
+C.style.verticalAlign="bottom";C.style.marginRight="6px";C.style.display="none";u=mxUtils.button(u||mxResources.get("edit"),function(){d.apply(this,[m.value])});u.className="geBtn gePrimaryBtn";x=document.createElement("div");x.style.position="absolute";x.style.bottom="30px";x.style.right="40px";x.style.textAlign="right";A=document.createElement("div");A.className="geToolbarContainer";A.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";
+this.init=function(){function G(J){if(null!=J){var Q=J.getAttribute("background");if(null==Q||""==Q||Q==mxConstants.NONE)Q=Editor.isDarkMode()?"transparent":"#ffffff";y.style.backgroundColor=Q;(new mxCodec(J.ownerDocument)).decode(J,L.getModel());L.maxFitScale=1;L.fit(8);L.center()}return J}function H(J){null!=J&&(J=G(Editor.parseDiagramNode(J)));return J}mxEvent.addListener(C,"change",function(J){q=parseInt(C.value);H(D[q]);mxEvent.consume(J)});if("mxfile"==I.nodeName){var M=I.getElementsByTagName("diagram");
+D=[];for(var F=0;F<M.length;F++)D.push(M[F]);0<D.length&&H(D[q]);C.innerText="";if(1<D.length)for(C.style.display="",F=0;F<D.length;F++)M=document.createElement("option"),mxUtils.write(M,D[F].getAttribute("name")||mxResources.get("pageWithNumber",[F+1])),M.setAttribute("value",F),F==q&&M.setAttribute("selected","selected"),C.appendChild(M);else C.style.display="none"}else G(I)};A.appendChild(C);A.appendChild(l);A.appendChild(k);A.appendChild(v);A.appendChild(f);l=mxUtils.button(mxResources.get("cancel"),
+function(){b.hideDialog(!0)});l.className="geBtn";c=null!=c?mxUtils.button(mxResources.get("ignore"),c):null;null!=c&&(c.className="geBtn");b.editor.cancelFirst?(x.appendChild(l),null!=c&&x.appendChild(c),x.appendChild(E),x.appendChild(u)):(x.appendChild(u),x.appendChild(E),null!=c&&x.appendChild(c),x.appendChild(l));g.appendChild(x);g.appendChild(A);this.container=g},FindWindow=function(b,f,l,d,t,u){function E(V,W,n,B){if("object"===typeof W.value&&null!=W.value.attributes){W=W.value.attributes;
+for(var K=0;K<W.length;K++)if("label"!=W[K].nodeName){var R=mxUtils.trim(W[K].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==V&&(B&&0<=R.indexOf(n)||!B&&R.substring(0,n.length)===n)||null!=V&&V.test(R))return!0}}return!1}function c(){v&&D.value?(Q.removeAttribute("disabled"),X.removeAttribute("disabled")):(Q.setAttribute("disabled","disabled"),X.setAttribute("disabled","disabled"));D.value&&q.value?P.removeAttribute("disabled"):P.setAttribute("disabled","disabled")}function e(V,
+W,n){F.innerText="";var B=k.model.getDescendants(k.model.getRoot()),K=q.value.toLowerCase(),R=z.checked?new RegExp(K):null,O=null;A=null;m!=K&&(m=K,p=null,x=!1);var U=null==p;if(0<K.length){if(x){x=!1;for(var S,T=0;T<b.pages.length;T++)if(b.currentPage==b.pages[T]){S=T;break}V=(S+1)%b.pages.length;p=null;do x=!1,B=b.pages[V],k=b.createTemporaryGraph(k.getStylesheet()),b.updatePageRoot(B),k.model.setRoot(B.root),V=(V+1)%b.pages.length;while(!e(!0,W,n)&&V!=S);p&&(p=null,n?b.editor.graph.model.execute(new SelectPage(b,
+B)):b.selectPage(B));x=!1;k=b.editor.graph;return e(!0,W,n)}for(T=0;T<B.length;T++){S=k.view.getState(B[T]);W&&null!=R&&(U=U||S==p);if(null!=S&&null!=S.cell.value&&(U||null==O)&&(k.model.isVertex(S.cell)||k.model.isEdge(S.cell))){null!=S.style&&"1"==S.style.html?(G.innerHTML=k.sanitizeHtml(k.getLabel(S.cell)),label=mxUtils.extractTextWithWhitespace([G])):label=k.getLabel(S.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var Y=0;W&&u&&null!=R&&S==p&&(label=label.substr(y),
+Y=y);var ba=""==D.value,aa=ba;if(null==R&&(aa&&0<=label.indexOf(K)||!aa&&label.substring(0,K.length)===K||ba&&E(R,S.cell,K,aa))||null!=R&&(R.test(label)||ba&&E(R,S.cell,K,aa)))if(u&&(null!=R?(ba=label.match(R),null!=ba&&0<ba.length&&(A=ba[0].toLowerCase(),y=Y+ba.index+A.length)):(A=K,y=A.length)),U){O=S;break}else null==O&&(O=S)}U=U||S==p}}if(null!=O){if(T==B.length&&C.checked)return p=null,x=!0,e(!0,W,n);p=O;k.scrollCellToVisible(p.cell);k.isEnabled()&&!k.isCellLocked(p.cell)?n||k.getSelectionCell()==
+p.cell&&1==k.getSelectionCount()||k.setSelectionCell(p.cell):k.highlightCell(p.cell)}else{if(!V&&C.checked)return x=!0,e(!0,W,n);k.isEnabled()&&!n&&k.clearSelection()}v=null!=O;u&&!V&&c();return 0==K.length||null!=O}var g=b.actions.get("findReplace"),k=b.editor.graph,m=null,p=null,v=!1,x=!1,A=null,y=0,L=1,N=document.createElement("div");N.style.userSelect="none";N.style.overflow="hidden";N.style.padding="10px";N.style.height="100%";var I=u?"260px":"200px",q=document.createElement("input");q.setAttribute("placeholder",
+mxResources.get("find"));q.setAttribute("type","text");q.style.marginTop="4px";q.style.marginBottom="6px";q.style.width=I;q.style.fontSize="12px";q.style.borderRadius="4px";q.style.padding="6px";N.appendChild(q);mxUtils.br(N);if(u){var 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=I;D.style.fontSize="12px";D.style.borderRadius="4px";D.style.padding="6px";
+N.appendChild(D);mxUtils.br(N);mxEvent.addListener(D,"input",c)}var z=document.createElement("input");z.setAttribute("id","geFindWinRegExChck");z.setAttribute("type","checkbox");z.style.marginRight="4px";N.appendChild(z);I=document.createElement("label");I.setAttribute("for","geFindWinRegExChck");N.appendChild(I);mxUtils.write(I,mxResources.get("regularExpression"));N.appendChild(I);I=b.menus.createHelpLink("https://www.diagrams.net/doc/faq/find-shapes");I.style.position="relative";I.style.marginLeft=
+"6px";I.style.top="-1px";N.appendChild(I);mxUtils.br(N);var C=document.createElement("input");C.setAttribute("id","geFindWinAllPagesChck");C.setAttribute("type","checkbox");C.style.marginRight="4px";N.appendChild(C);I=document.createElement("label");I.setAttribute("for","geFindWinAllPagesChck");N.appendChild(I);mxUtils.write(I,mxResources.get("allPages"));N.appendChild(I);var G=document.createElement("div");mxUtils.br(N);I=document.createElement("div");I.style.left="0px";I.style.right="0px";I.style.marginTop=
+"6px";I.style.padding="0 6px 0 6px";I.style.textAlign="center";N.appendChild(I);var H=mxUtils.button(mxResources.get("reset"),function(){F.innerText="";q.value="";q.style.backgroundColor="";u&&(D.value="",c());m=p=null;x=!1;q.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";u||I.appendChild(H);var M=mxUtils.button(mxResources.get("find"),
+function(){try{q.style.backgroundColor=e()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(V){b.handleError(V)}});M.setAttribute("title",mxResources.get("find")+" (Enter)");M.style.float="none";M.style.width="120px";M.style.marginTop="6px";M.style.marginLeft="8px";M.style.overflow="hidden";M.style.textOverflow="ellipsis";M.className="geBtn gePrimaryBtn";I.appendChild(M);var F=document.createElement("div");F.style.marginTop="10px";if(u){var J=function(V,W,n,B,K){if(null==K||"1"!=K.html)return B=V.toLowerCase().indexOf(W,
+B),0>B?V:V.substr(0,B)+n+V.substr(B+W.length);var R=V;W=mxUtils.htmlEntities(W);K=[];var O=-1;for(V=V.replace(/<br>/ig,"\n");-1<(O=V.indexOf("<",O+1));)K.push(O);O=V.match(/<[^>]*>/g);V=V.replace(/<[^>]*>/g,"");B=V.toLowerCase().indexOf(W,B);if(0>B)return R;R=B+W.length;n=mxUtils.htmlEntities(n);V=V.substr(0,B)+n+V.substr(R);for(var U=0,S=0;S<K.length;S++){if(K[S]-U<B)V=V.substr(0,K[S])+O[S]+V.substr(K[S]);else{var T=K[S]-U<R?B+U:K[S]+(n.length-W.length);V=V.substr(0,T)+O[S]+V.substr(T)}U+=O[S].length}return V.replace(/\n/g,
+"<br>")},Q=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=A&&null!=p&&D.value){var V=p.cell,W=k.getLabel(V);k.isCellEditable(V)&&k.model.setValue(V,J(W,A,D.value,y-A.length,k.getCurrentCellStyle(V)));q.style.backgroundColor=e(!1,!0)?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}}catch(n){b.handleError(n)}});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");I.appendChild(Q);mxUtils.br(I);var X=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=A&&null!=p&&D.value){var V=p.cell,W=k.getLabel(V);k.model.setValue(V,J(W,A,D.value,y-A.length,k.getCurrentCellStyle(V)));Q.setAttribute("disabled","disabled");X.setAttribute("disabled","disabled")}}catch(n){b.handleError(n)}});X.setAttribute("title",mxResources.get("replace"));X.style.float="none";X.style.width="120px";
+X.style.marginTop="6px";X.style.marginLeft="8px";X.style.overflow="hidden";X.style.textOverflow="ellipsis";X.className="geBtn gePrimaryBtn";X.setAttribute("disabled","disabled");I.appendChild(X);var P=mxUtils.button(mxResources.get("replaceAll"),function(){F.innerText="";if(D.value){m=null;var V=b.currentPage,W=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;k.getModel().beginUpdate();try{for(var n=0,B={};e(!1,!0,!0)&&100>n;){var K=p.cell,R=k.getLabel(K),O=B[K.id];if(O&&O.replAllMrk==
+L&&O.replAllPos>=y)break;B[K.id]={replAllMrk:L,replAllPos:y};k.isCellEditable(K)&&(k.model.setValue(K,J(R,A,D.value,y-A.length,k.getCurrentCellStyle(K))),n++)}V!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,V));mxUtils.write(F,mxResources.get("matchesRepl",[n]))}catch(U){b.handleError(U)}finally{k.getModel().endUpdate(),b.editor.graph.setSelectionCells(W),b.editor.graph.rendering=!0}L++}});P.setAttribute("title",mxResources.get("replaceAll"));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");I.appendChild(P);mxUtils.br(I);I.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";I.appendChild(H);mxUtils.br(I);I.appendChild(F)}else H.style.width="90px",M.style.width="90px";mxEvent.addListener(q,"keyup",function(V){if(91==V.keyCode||93==V.keyCode||17==V.keyCode)mxEvent.consume(V);else if(27==V.keyCode)g.funct();else if(m!=q.value.toLowerCase()||13==V.keyCode)try{q.style.backgroundColor=e()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(W){q.style.backgroundColor=Editor.isDarkMode()?"#ff0000":"#ffcfcf"}});mxEvent.addListener(N,"keydown",function(V){70==
+V.keyCode&&b.keyHandler.isControlDown(V)&&!mxEvent.isShiftDown(V)&&(g.funct(),mxEvent.consume(V))});this.window=new mxWindow(mxResources.get("find")+(u?"/"+mxResources.get("replace"):""),N,f,l,d,t,!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()?(q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?q.select():
+document.execCommand("selectAll",!1,null),null!=b.pages&&1<b.pages.length?C.removeAttribute("disabled"):(C.checked=!1,C.setAttribute("disabled","disabled"))):k.container.focus()}));b.installResizeHandler(this,!1)},FreehandWindow=function(b,f,l,d,t,u){var E=b.editor.graph,c=document.createElement("div");c.style.textAlign="center";c.style.userSelect="none";c.style.overflow="hidden";c.style.height="100%";if(u){var e=document.createElement("input");e.setAttribute("id","geFreehandBrush");e.setAttribute("type",
+"checkbox");e.style.margin="10px 5px 0px 10px";e.style.float="left";c.appendChild(e);var g=document.createElement("label");g.setAttribute("for","geFreehandBrush");g.style.float="left";g.style.marginTop="10px";c.appendChild(g);mxUtils.write(g,mxResources.get("brush"));c.appendChild(g);mxUtils.br(c);var k=document.createElement("input");k.setAttribute("type","range");k.setAttribute("min","2");k.setAttribute("max","30");k.setAttribute("value",E.freehand.getBrushSize());k.style.width="90%";k.style.visibility=
+"hidden";c.appendChild(k);mxUtils.br(c);mxEvent.addListener(e,"change",function(){E.freehand.setPerfectFreehandMode(this.checked);k.style.visibility=this.checked?"visible":"hidden"});mxEvent.addListener(k,"change",function(){E.freehand.setBrushSize(parseInt(this.value))})}var m=mxUtils.button(mxResources.get("startDrawing"),function(){E.freehand.isDrawing()?E.freehand.stopDrawing():E.freehand.startDrawing()});m.setAttribute("title",mxResources.get("startDrawing"));m.style.marginTop=u?"5px":"10px";
+m.style.width="90%";m.style.boxSizing="border-box";m.style.overflow="hidden";m.style.textOverflow="ellipsis";m.style.textAlign="center";m.className="geBtn gePrimaryBtn";c.appendChild(m);this.window=new mxWindow(mxResources.get("freehand"),c,f,l,d,t,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);E.addListener("freehandStateChanged",mxUtils.bind(this,function(){m.innerText="";mxUtils.write(m,mxResources.get(E.freehand.isDrawing()?
+"stopDrawing":"startDrawing"));m.setAttribute("title",mxResources.get(E.freehand.isDrawing()?"stopDrawing":"startDrawing"));m.className="geBtn"+(E.freehand.isDrawing()?"":" gePrimaryBtn")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){E.freehand.isDrawing()&&E.freehand.stopDrawing()}));b.installResizeHandler(this,!1)},TagsWindow=function(b,f,l,d,t){var u=b.editor.graph,E=b.editor.graph.createTagsDialog(mxUtils.bind(this,
+function(){return this.window.isVisible()}),null,function(e,g){if(u.isEnabled()){var k=new FilenameDialog(b,"",mxResources.get("add"),function(m){b.hideDialog();if(null!=m&&0<m.length){m=m.split(" ");for(var p=[],v=0;v<m.length;v++){var x=mxUtils.trim(m[v]);""!=x&&0>mxUtils.indexOf(e,x)&&p.push(x)}0<p.length&&(u.isSelectionEmpty()?g(e.concat(p)):u.addTagsForCells(u.getSelectionCells(),p))}},mxResources.get("enterValue")+" ("+mxResources.get("tags")+")");b.showDialog(k.container,300,80,!0,!0);k.init()}}),
+c=E.div;this.window=new mxWindow(mxResources.get("tags"),c,f,l,d,t,!0,!0);this.window.minimumSize=new mxRectangle(0,0,212,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){E.refresh();this.window.fit()}));b.installResizeHandler(this,!0)},AuthDialog=function(b,f,l,d){var t=document.createElement("div");t.style.textAlign="center";var u=document.createElement("p");u.style.fontSize=
+"16pt";u.style.padding="0px";u.style.margin="0px";u.style.color="gray";mxUtils.write(u,mxResources.get("authorizationRequired"));var E="Unknown",c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("align","absmiddle");c.style.marginRight="10px";f==b.drive?(E=mxResources.get("googleDrive"),c.src=IMAGE_PATH+"/google-drive-logo-white.svg"):f==b.dropbox?(E=mxResources.get("dropbox"),c.src=IMAGE_PATH+"/dropbox-logo-white.svg"):f==b.oneDrive?(E=mxResources.get("oneDrive"),c.src=
+IMAGE_PATH+"/onedrive-logo-white.svg"):f==b.gitHub?(E=mxResources.get("github"),c.src=IMAGE_PATH+"/github-logo-white.svg"):f==b.gitLab?(E=mxResources.get("gitlab"),c.src=IMAGE_PATH+"/gitlab-logo.svg",c.style.width="32px"):f==b.trello&&(E=mxResources.get("trello"),c.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizeThisAppIn",[E]));var e=document.createElement("input");e.setAttribute("type","checkbox");E=mxUtils.button(mxResources.get("authorize"),
+function(){d(e.checked)});E.insertBefore(c,E.firstChild);E.style.marginTop="6px";E.className="geBigButton";E.style.fontSize="18px";E.style.padding="14px";t.appendChild(u);t.appendChild(b);t.appendChild(E);l&&(l=document.createElement("p"),l.style.marginTop="20px",l.appendChild(e),u=document.createElement("span"),mxUtils.write(u," "+mxResources.get("rememberMe")),l.appendChild(u),t.appendChild(l),e.checked=!0,e.defaultChecked=!0,mxEvent.addListener(u,"click",function(g){e.checked=!e.checked;mxEvent.consume(g)}));
+this.container=t},MoreShapesDialog=function(b,f,l){l=null!=l?l:b.sidebar.entries;var d=document.createElement("div"),t=[];if(null!=b.sidebar.customEntries)for(var u=0;u<b.sidebar.customEntries.length;u++){for(var E=b.sidebar.customEntries[u],c={title:b.getResource(E.title),entries:[]},e=0;e<E.entries.length;e++){var g=E.entries[e];c.entries.push({id:g.id,title:b.getResource(g.title),desc:b.getResource(g.desc),image:g.preview})}t.push(c)}for(u=0;u<l.length;u++)if(null==b.sidebar.enabledLibraries)t.push(l[u]);
+else{c={title:l[u].title,entries:[]};for(e=0;e<l[u].entries.length;e++)0<=mxUtils.indexOf(b.sidebar.enabledLibraries,l[u].entries[e].id)&&c.entries.push(l[u].entries[e]);0<c.entries.length&&t.push(c)}l=t;if(f){u=mxUtils.bind(this,function(z){for(var C=0;C<z.length;C++)(function(G){var H=x.cloneNode(!1);H.style.fontWeight="bold";H.style.backgroundColor=Editor.isDarkMode()?"#505759":"#e5e5e5";H.style.padding="6px 0px 6px 20px";mxUtils.write(H,G.title);k.appendChild(H);for(var M=0;M<G.entries.length;M++)(function(F){var J=
+x.cloneNode(!1);J.style.cursor="pointer";J.style.padding="4px 0px 4px 20px";J.style.whiteSpace="nowrap";J.style.overflow="hidden";J.style.textOverflow="ellipsis";J.setAttribute("title",F.title+" ("+F.id+")");var Q=document.createElement("input");Q.setAttribute("type","checkbox");Q.checked=b.sidebar.isEntryVisible(F.id);Q.defaultChecked=Q.checked;J.appendChild(Q);mxUtils.write(J," "+F.title);k.appendChild(J);var X=function(P){if(null==P||"INPUT"!=mxEvent.getSource(P).nodeName){m.style.textAlign="center";
+m.style.padding="0px";m.style.color="";m.innerText="";if(null!=F.desc){var V=document.createElement("pre");V.style.boxSizing="border-box";V.style.fontFamily="inherit";V.style.margin="20px";V.style.right="0px";V.style.textAlign="left";mxUtils.write(V,F.desc);m.appendChild(V)}null!=F.imageCallback?F.imageCallback(m):null!=F.image?m.innerHTML+='<img border="0" src="'+F.image+'"/>':null==F.desc&&(m.style.padding="20px",m.style.color="rgb(179, 179, 179)",mxUtils.write(m,mxResources.get("noPreview")));
+null!=p&&(p.style.backgroundColor="");p=J;p.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9";null!=P&&mxEvent.consume(P)}};mxEvent.addListener(J,"click",X);mxEvent.addListener(J,"dblclick",function(P){Q.checked=!Q.checked;mxEvent.consume(P)});v.push(function(){return Q.checked?F.id:null});0==C&&0==M&&X()})(G.entries[M])})(z[C])});e=document.createElement("div");e.className="geDialogTitle";mxUtils.write(e,mxResources.get("shapes"));e.style.position="absolute";e.style.top="0px";e.style.left=
+"0px";e.style.lineHeight="40px";e.style.height="40px";e.style.right="0px";var k=document.createElement("div"),m=document.createElement("div");k.style.position="absolute";k.style.top="40px";k.style.left="0px";k.style.width="202px";k.style.bottom="60px";k.style.overflow="auto";m.style.position="absolute";m.style.left="202px";m.style.right="0px";m.style.top="40px";m.style.bottom="60px";m.style.overflow="auto";m.style.borderLeft="1px solid rgb(211, 211, 211)";m.style.textAlign="center";var p=null,v=[],
+x=document.createElement("div");x.style.position="relative";x.style.left="0px";x.style.right="0px";u(l);d.style.padding="30px";d.appendChild(e);d.appendChild(k);d.appendChild(m);l=document.createElement("div");l.className="geDialogFooter";l.style.position="absolute";l.style.paddingRight="16px";l.style.color="gray";l.style.left="0px";l.style.right="0px";l.style.bottom="0px";l.style.height="60px";l.style.lineHeight="52px";var A=document.createElement("input");A.setAttribute("type","checkbox");A.style.position=
+"relative";A.style.top="1px";A.checked=b.sidebar.sidebarTitles;A.defaultChecked=A.checked;l.appendChild(A);u=document.createElement("span");mxUtils.write(u," "+mxResources.get("labels"));u.style.paddingRight="20px";l.appendChild(u);mxEvent.addListener(u,"click",function(z){A.checked=!A.checked;mxEvent.consume(z)});var y=document.createElement("input");y.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)u=document.createElement("span"),u.style.paddingRight="20px",u.appendChild(y),
+mxUtils.write(u," "+mxResources.get("rememberThisSetting")),y.style.position="relative",y.style.top="1px",y.checked=!0,y.defaultChecked=!0,mxEvent.addListener(u,"click",function(z){mxEvent.getSource(z)!=y&&(y.checked=!y.checked,mxEvent.consume(z))}),l.appendChild(u);u=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});u.className="geBtn";e=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var z=[],C=0;C<v.length;C++){var G=v[C].apply(this,arguments);null!=G&&
+z.push(G)}"1"==urlParams.sketch&&b.isSettingsEnabled()&&(C=mxUtils.indexOf(z,".scratchpad"),null!=b.scratchpad!=(0<=C&&0<z.splice(C,1).length)&&b.toggleScratchpad(),C=mxUtils.indexOf(z,"search"),mxSettings.settings.search=0<=C&&0<z.splice(C,1).length,b.sidebar.showPalette("search",mxSettings.settings.search),y.checked&&mxSettings.save());b.sidebar.showEntries(z.join(";"),y.checked,!0);b.setSidebarTitles(A.checked,y.checked)});e.className="geBtn gePrimaryBtn"}else{var L=document.createElement("table");
+u=document.createElement("tbody");d.style.height="100%";d.style.overflow="auto";e=document.createElement("tr");L.style.width="100%";f=document.createElement("td");t=document.createElement("td");E=document.createElement("td");var N=mxUtils.bind(this,function(z,C,G){var H=document.createElement("input");H.type="checkbox";L.appendChild(H);H.checked=b.sidebar.isEntryVisible(G);var M=document.createElement("span");mxUtils.write(M,C);C=document.createElement("div");C.style.display="block";C.appendChild(H);
+C.appendChild(M);mxEvent.addListener(M,"click",function(F){H.checked=!H.checked;mxEvent.consume(F)});z.appendChild(C);return function(){return H.checked?G:null}});e.appendChild(f);e.appendChild(t);e.appendChild(E);u.appendChild(e);L.appendChild(u);v=[];var I=0;for(u=0;u<l.length;u++)for(e=0;e<l[u].entries.length;e++)I++;var q=[f,t,E],D=0;for(u=0;u<l.length;u++)(function(z){for(var C=0;C<z.entries.length;C++){var G=z.entries[C];v.push(N(q[Math.floor(D/(I/3))],G.title,G.id));D++}})(l[u]);d.appendChild(L);
+l=document.createElement("div");l.style.marginTop="18px";l.style.textAlign="center";y=document.createElement("input");isLocalStorage&&(y.setAttribute("type","checkbox"),y.checked=!0,y.defaultChecked=!0,l.appendChild(y),u=document.createElement("span"),mxUtils.write(u," "+mxResources.get("rememberThisSetting")),l.appendChild(u),mxEvent.addListener(u,"click",function(z){y.checked=!y.checked;mxEvent.consume(z)}));d.appendChild(l);u=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});
+u.className="geBtn";e=mxUtils.button(mxResources.get("apply"),function(){for(var z=["search"],C=0;C<v.length;C++){var G=v[C].apply(this,arguments);null!=G&&z.push(G)}b.sidebar.showEntries(0<z.length?z.join(";"):"",y.checked);b.hideDialog()});e.className="geBtn gePrimaryBtn";l=document.createElement("div");l.style.marginTop="26px";l.style.textAlign="right"}b.editor.cancelFirst?(l.appendChild(u),l.appendChild(e)):(l.appendChild(e),l.appendChild(u));d.appendChild(l);this.container=d},PluginsDialog=function(b,
+f,l,d){function t(){e=!0;if(0==c.length)E.innerHTML=mxUtils.htmlEntities(mxResources.get("noPlugins"));else{E.innerText="";for(var x=0;x<c.length;x++){var A=document.createElement("span");A.style.whiteSpace="nowrap";var y=document.createElement("span");y.className="geSprite geSprite-delete";y.style.position="relative";y.style.cursor="pointer";y.style.top="5px";y.style.marginRight="4px";y.style.display="inline-block";A.appendChild(y);mxUtils.write(A,c[x]);E.appendChild(A);mxUtils.br(E);mxEvent.addListener(y,
+"click",function(L){return function(){b.confirm(mxResources.get("delete")+' "'+c[L]+'"?',function(){null!=l&&l(c[L]);c.splice(L,1);t()})}}(x))}}}var u=document.createElement("div"),E=document.createElement("div");E.style.height="180px";E.style.overflow="auto";var c=mxSettings.getPlugins().slice(),e=!1;u.appendChild(E);t();e=!1;var g=mxUtils.button(mxResources.get("add"),null!=f?function(){f(function(x){x&&0>mxUtils.indexOf(c,x)&&c.push(x);t()})}:function(){var x=document.createElement("div"),A=document.createElement("span");
+A.style.marginTop="6px";mxUtils.write(A,mxResources.get("builtinPlugins")+": ");x.appendChild(A);var y=document.createElement("select");y.style.width="150px";for(A=0;A<App.publicPlugin.length;A++){var L=document.createElement("option");mxUtils.write(L,App.publicPlugin[A]);L.value=App.publicPlugin[A];y.appendChild(L)}x.appendChild(y);mxUtils.br(x);mxUtils.br(x);A=mxUtils.button(mxResources.get("custom")+"...",function(){var N=new FilenameDialog(b,"",mxResources.get("add"),function(I){b.hideDialog();
+if(null!=I&&0<I.length){I=I.split(";");for(var q=0;q<I.length;q++){var D=I[q],z=App.pluginRegistry[D];null!=z&&(D=z);0<D.length&&0>mxUtils.indexOf(c,D)&&c.push(D)}t()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(N.container,300,80,!0,!0);N.init()});A.className="geBtn";x=new CustomDialog(b,x,mxUtils.bind(this,function(){var N=App.pluginRegistry[y.value];0>mxUtils.indexOf(c,N)&&(c.push(N),t())}),null,null,null,A);b.showDialog(x.container,300,100,!0,!0)});g.className=
+"geBtn";var k=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});k.className="geBtn";var m=mxUtils.button(d?mxResources.get("close"):mxResources.get("apply"),function(){e?(mxSettings.setPlugins(c),mxSettings.save(),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))):b.hideDialog()});m.className="geBtn gePrimaryBtn";var p=document.createElement("div");p.style.marginTop="14px";p.style.textAlign="right";var v=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/plugins")});
+v.className="geBtn";b.isOffline()&&!mxClient.IS_CHROMEAPP&&(v.style.display="none");p.appendChild(v);b.editor.cancelFirst?(d||p.appendChild(k),p.appendChild(g),p.appendChild(m)):(p.appendChild(g),p.appendChild(m),d||p.appendChild(k));u.appendChild(p);this.container=u},CropImageDialog=function(b,f,l,d){function t(){var z=y.checked,C=L.checked,G=v.geometry,H=e.width,M=e.height,F=(300-H)/2,J=(300-M)/2;G.x<F?(G.width-=F-G.x,G.x=F):G.x+G.width>F+H&&(G.width=F+H-G.x,G.x=Math.min(G.x,F+H));G.y<J?(G.height-=
+J-G.y,G.y=J):G.y+G.height>J+M&&(G.height=J+M-G.y,G.y=Math.min(G.y,J+M));var Q=(G.x-F)/H*100;H=100-(G.x+G.width-F)/H*100;F=(G.y-J)/M*100;G=100-(G.y+G.height-J)/M*100;return"inset("+mxUtils.format(F)+"% "+mxUtils.format(H)+"% "+mxUtils.format(G)+"% "+mxUtils.format(Q)+"%"+(z?" round "+p+"%":C?" round 50%":"")+")"}function u(z){null!=k&&(!0!==z&&(k.model.setGeometry(v,m.clone()),p=5,I.value=p),k.model.setStyle(v,x+t()),k.selectAll(),N.style.visibility=y.checked?"visible":"hidden")}var E=document.createElement("div"),
+c=document.createElement("div");c.style.height="300px";c.style.width="300px";c.style.display="inline-flex";c.style.justifyContent="center";c.style.alignItems="center";c.style.position="absolute";var e=document.createElement("img");e.onload=function(){function z(){k.model.setStyle(v,x+t())}k=new Graph(g);k.autoExtend=!1;k.autoScroll=!1;k.setGridEnabled(!1);k.setEnabled(!0);k.setPanning(!1);k.setConnectable(!1);k.getRubberband().setEnabled(!1);k.graphHandler.allowLivePreview=!1;var C=k.createVertexHandler;
+k.createVertexHandler=function(){var R=C.apply(this,arguments);R.livePreview=!1;return R};if(null!=l)try{if("inset"==l.substring(0,5)){var G=v.geometry,H=e.width,M=e.height,F=(300-H)/2,J=(300-M)/2,Q=l.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),X=parseFloat(Q[0]),P=parseFloat(Q[1]),V=parseFloat(Q[2]),W=parseFloat(Q[3]);isFinite(X)&&isFinite(P)&&isFinite(V)&&isFinite(W)?(G.x=W/100*H+F,G.y=X/100*M+J,G.width=(100-P)/100*H+F-G.x,G.height=(100-V)/100*M+J-G.y,"round"==Q[4]?"50%"==Q[5]?L.setAttribute("checked",
+"checked"):(p=parseInt(Q[5]),I.value=p,y.setAttribute("checked","checked"),N.style.visibility="visible"):A.setAttribute("checked","checked")):l=null}else l=null}catch(R){}v.style=x+(l?l:t());v.vertex=!0;k.addCell(v,null,null,null,null);k.selectAll();k.addListener(mxEvent.CELLS_MOVED,z);k.addListener(mxEvent.CELLS_RESIZED,z);var n=k.graphHandler.mouseUp,B=k.graphHandler.mouseDown;k.graphHandler.mouseUp=function(){n.apply(this,arguments);g.style.backgroundColor="#fff9"};k.graphHandler.mouseDown=function(){B.apply(this,
+arguments);g.style.backgroundColor=""};k.dblClick=function(){};var K=k.getSelectionModel().changeSelection;k.getSelectionModel().changeSelection=function(){K.call(this,[v],[v])}};e.onerror=function(){e.onload=null;e.src=Editor.errorImage};e.setAttribute("src",f);e.style.maxWidth="300px";e.style.maxHeight="300px";c.appendChild(e);E.appendChild(c);var g=document.createElement("div");g.style.width="300px";g.style.height="300px";g.style.overflow="hidden";g.style.backgroundColor="#fff9";E.appendChild(g);
+var k=null,m=new mxGeometry(100,100,100,100),p=5,v=new mxCell("",m.clone(),""),x="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+f.replace(";base64","")+";clipPath=",A=document.createElement("input");A.setAttribute("type","radio");A.setAttribute("id","croppingRect");A.setAttribute("name","croppingShape");A.setAttribute("checked","checked");A.style.margin="5px";E.appendChild(A);f=document.createElement("label");f.setAttribute("for","croppingRect");mxUtils.write(f,mxResources.get("rectangle"));
+E.appendChild(f);var y=document.createElement("input");y.setAttribute("type","radio");y.setAttribute("id","croppingRounded");y.setAttribute("name","croppingShape");y.style.margin="5px";E.appendChild(y);f=document.createElement("label");f.setAttribute("for","croppingRounded");mxUtils.write(f,mxResources.get("rounded"));E.appendChild(f);var L=document.createElement("input");L.setAttribute("type","radio");L.setAttribute("id","croppingEllipse");L.setAttribute("name","croppingShape");L.style.margin="5px";
+E.appendChild(L);f=document.createElement("label");f.setAttribute("for","croppingEllipse");mxUtils.write(f,mxResources.get("ellipse"));E.appendChild(f);mxEvent.addListener(A,"change",u);mxEvent.addListener(y,"change",u);mxEvent.addListener(L,"change",u);var N=document.createElement("div");N.style.textAlign="center";N.style.visibility="hidden";var I=document.createElement("input");I.setAttribute("type","range");I.setAttribute("min","1");I.setAttribute("max","49");I.setAttribute("value",p);I.setAttribute("title",
+mxResources.get("arcSize"));N.appendChild(I);E.appendChild(N);mxEvent.addListener(I,"change",function(){p=this.value;u(!0)});f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});f.className="geBtn";c=mxUtils.button(mxResources.get("apply"),function(){d(t(),v.geometry.width,v.geometry.height);b.hideDialog()});c.className="geBtn gePrimaryBtn";var q=mxUtils.button(mxResources.get("reset"),function(){d(null,e.width,e.height);b.hideDialog()});q.className="geBtn";var D=document.createElement("div");
+D.style.marginTop="10px";D.style.textAlign="right";b.editor.cancelFirst?(D.appendChild(f),D.appendChild(q),D.appendChild(c)):(D.appendChild(q),D.appendChild(c),D.appendChild(f));E.appendChild(D);this.container=E},EditGeometryDialog=function(b,f){var l=b.editor.graph,d=1==f.length?l.getCellGeometry(f[0]):null,t=document.createElement("div"),u=document.createElement("table"),E=document.createElement("tbody"),c=document.createElement("tr"),e=document.createElement("td"),g=document.createElement("td");
+u.style.paddingLeft="6px";mxUtils.write(e,mxResources.get("relative")+":");var k=document.createElement("input");k.setAttribute("type","checkbox");null!=d&&d.relative&&(k.setAttribute("checked","checked"),k.defaultChecked=!0);this.init=function(){k.focus()};g.appendChild(k);c.appendChild(e);c.appendChild(g);E.appendChild(c);c=document.createElement("tr");e=document.createElement("td");g=document.createElement("td");mxUtils.write(e,mxResources.get("left")+":");var m=document.createElement("input");
+m.setAttribute("type","text");m.style.width="100px";m.value=null!=d?d.x:"";g.appendChild(m);c.appendChild(e);c.appendChild(g);E.appendChild(c);c=document.createElement("tr");e=document.createElement("td");g=document.createElement("td");mxUtils.write(e,mxResources.get("top")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value=null!=d?d.y:"";g.appendChild(p);c.appendChild(e);c.appendChild(g);E.appendChild(c);c=document.createElement("tr");e=document.createElement("td");
g=document.createElement("td");mxUtils.write(e,mxResources.get("dx")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.width="100px";v.value=null!=d&&null!=d.offset?d.offset.x:"";g.appendChild(v);c.appendChild(e);c.appendChild(g);E.appendChild(c);c=document.createElement("tr");e=document.createElement("td");g=document.createElement("td");mxUtils.write(e,mxResources.get("dy")+":");var x=document.createElement("input");x.setAttribute("type","text");x.style.width="100px";
-x.value=null!=d&&null!=d.offset?d.offset.y:"";g.appendChild(x);c.appendChild(e);c.appendChild(g);E.appendChild(c);c=document.createElement("tr");e=document.createElement("td");g=document.createElement("td");mxUtils.write(e,mxResources.get("width")+":");var z=document.createElement("input");z.setAttribute("type","text");z.style.width="100px";z.value=null!=d?d.width:"";g.appendChild(z);c.appendChild(e);c.appendChild(g);E.appendChild(c);c=document.createElement("tr");e=document.createElement("td");g=
+x.value=null!=d&&null!=d.offset?d.offset.y:"";g.appendChild(x);c.appendChild(e);c.appendChild(g);E.appendChild(c);c=document.createElement("tr");e=document.createElement("td");g=document.createElement("td");mxUtils.write(e,mxResources.get("width")+":");var A=document.createElement("input");A.setAttribute("type","text");A.style.width="100px";A.value=null!=d?d.width:"";g.appendChild(A);c.appendChild(e);c.appendChild(g);E.appendChild(c);c=document.createElement("tr");e=document.createElement("td");g=
document.createElement("td");mxUtils.write(e,mxResources.get("height")+":");var y=document.createElement("input");y.setAttribute("type","text");y.style.width="100px";y.value=null!=d?d.height:"";g.appendChild(y);c.appendChild(e);c.appendChild(g);E.appendChild(c);c=document.createElement("tr");e=document.createElement("td");g=document.createElement("td");mxUtils.write(e,mxResources.get("rotation")+":");var L=document.createElement("input");L.setAttribute("type","text");L.style.width="100px";L.value=
-1==f.length?mxUtils.getValue(l.getCellStyle(f[0]),mxConstants.STYLE_ROTATION,0):"";g.appendChild(L);c.appendChild(e);c.appendChild(g);E.appendChild(c);u.appendChild(E);t.appendChild(u);d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});d.className="geBtn";var N=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();l.getModel().beginUpdate();try{for(var J=0;J<f.length;J++){var q=l.getCellGeometry(f[J]);null!=q&&(q=q.clone(),l.isCellMovable(f[J])&&(q.relative=k.checked,
-0<mxUtils.trim(m.value).length&&(q.x=Number(m.value)),0<mxUtils.trim(p.value).length&&(q.y=Number(p.value)),0<mxUtils.trim(v.value).length&&(null==q.offset&&(q.offset=new mxPoint),q.offset.x=Number(v.value)),0<mxUtils.trim(x.value).length&&(null==q.offset&&(q.offset=new mxPoint),q.offset.y=Number(x.value))),l.isCellResizable(f[J])&&(0<mxUtils.trim(z.value).length&&(q.width=Number(z.value)),0<mxUtils.trim(y.value).length&&(q.height=Number(y.value))),l.getModel().setGeometry(f[J],q));0<mxUtils.trim(L.value).length&&
-l.setCellStyles(mxConstants.STYLE_ROTATION,Number(L.value),[f[J]])}}finally{l.getModel().endUpdate()}});N.className="geBtn gePrimaryBtn";mxEvent.addListener(t,"keypress",function(J){13==J.keyCode&&N.click()});u=document.createElement("div");u.style.marginTop="20px";u.style.textAlign="right";b.editor.cancelFirst?(u.appendChild(d),u.appendChild(N)):(u.appendChild(N),u.appendChild(d));t.appendChild(u);this.container=t},LibraryDialog=function(b,f,l,d,t,u){function E(C){for(C=document.elementFromPoint(C.clientX,
-C.clientY);null!=C&&C.parentNode!=v;)C=C.parentNode;var G=null;if(null!=C){var M=v.firstChild;for(G=0;null!=M&&M!=C;)M=M.nextSibling,G++}return G}function c(C,G,M,H,F,I,R,X,O){try{if(b.spinner.stop(),null==G||"image/"==G.substring(0,6))if(null==C&&null!=R||null==z[C]){var W=function(){V.innerText="";V.style.cursor="pointer";V.style.whiteSpace="nowrap";V.style.textOverflow="ellipsis";mxUtils.write(V,null!=S.title&&0<S.title.length?S.title:mxResources.get("untitled"));V.style.color=null==S.title||0==
-S.title.length?"#d0d0d0":""};v.style.backgroundImage="";x.style.display="none";var U=F,n=I;if(F>b.maxImageSize||I>b.maxImageSize){var B=Math.min(1,Math.min(b.maxImageSize/Math.max(1,F)),b.maxImageSize/Math.max(1,I));F*=B;I*=B}U>n?(n=Math.round(100*n/U),U=100):(U=Math.round(100*U/n),n=100);var K=document.createElement("div");K.setAttribute("draggable","true");K.style.display="inline-block";K.style.position="relative";K.style.padding="0 12px";K.style.cursor="move";mxUtils.setPrefixedStyle(K.style,"transition",
-"transform .1s ease-in-out");if(null!=C){var Q=document.createElement("img");Q.setAttribute("src",J.convert(C));Q.style.width=U+"px";Q.style.height=n+"px";Q.style.margin="10px";Q.style.paddingBottom=Math.floor((100-n)/2)+"px";Q.style.paddingLeft=Math.floor((100-U)/2)+"px";K.appendChild(Q)}else if(null!=R){var P=b.stringToCells(Graph.decompress(R.xml));0<P.length&&(b.sidebar.createThumb(P,100,100,K,null,!0,!1),K.firstChild.style.display="inline-block",K.firstChild.style.cursor="")}var T=document.createElement("img");
-T.setAttribute("src",Editor.closeBlackImage);T.setAttribute("border","0");T.setAttribute("title",mxResources.get("delete"));T.setAttribute("align","top");T.style.paddingTop="4px";T.style.position="absolute";T.style.marginLeft="-12px";T.style.zIndex="1";T.style.cursor="pointer";mxEvent.addListener(T,"dragstart",function(da){mxEvent.consume(da)});(function(da,ja,ha){mxEvent.addListener(T,"click",function(Z){z[ja]=null;for(var Da=0;Da<k.length;Da++)if(null!=k[Da].data&&k[Da].data==ja||null!=k[Da].xml&&
-null!=ha&&k[Da].xml==ha.xml){k.splice(Da,1);break}K.parentNode.removeChild(da);0==k.length&&(v.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",x.style.display="");mxEvent.consume(Z)});mxEvent.addListener(T,"dblclick",function(Z){mxEvent.consume(Z)})})(K,C,R);K.appendChild(T);K.style.marginBottom="30px";var V=document.createElement("div");V.style.position="absolute";V.style.boxSizing="border-box";V.style.bottom="-18px";V.style.left="10px";V.style.right="10px";V.style.backgroundColor=Editor.isDarkMode()?
-Editor.darkColor:"#ffffff";V.style.overflow="hidden";V.style.textAlign="center";var S=null;null!=C?(S={data:C,w:F,h:I,title:O},null!=X&&(S.aspect=X),z[C]=Q,k.push(S)):null!=R&&(R.aspect="fixed",k.push(R),S=R);mxEvent.addListener(V,"keydown",function(da){13==da.keyCode&&null!=N&&(N(),N=null,mxEvent.consume(da))});W();K.appendChild(V);mxEvent.addListener(V,"mousedown",function(da){"true"!=V.getAttribute("contentEditable")&&mxEvent.consume(da)});P=function(da){if(mxClient.IS_IOS||mxClient.IS_FF||!(null==
-document.documentMode||9<document.documentMode)){var ja=new FilenameDialog(b,S.title||"",mxResources.get("ok"),function(ha){null!=ha&&(S.title=ha,W())},mxResources.get("enterValue"));b.showDialog(ja.container,300,80,!0,!0);ja.init();mxEvent.consume(da)}else if("true"!=V.getAttribute("contentEditable")){null!=N&&(N(),N=null);if(null==S.title||0==S.title.length)V.innerText="";V.style.textOverflow="";V.style.whiteSpace="";V.style.cursor="text";V.style.color="";V.setAttribute("contentEditable","true");
-mxUtils.setPrefixedStyle(V.style,"user-select","text");V.focus();document.execCommand("selectAll",!1,null);N=function(){V.removeAttribute("contentEditable");V.style.cursor="pointer";S.title=V.innerHTML;W()};mxEvent.consume(da)}};mxEvent.addListener(V,"click",P);mxEvent.addListener(K,"dblclick",P);v.appendChild(K);mxEvent.addListener(K,"dragstart",function(da){null==C&&null!=R&&(T.style.visibility="hidden",V.style.visibility="hidden");mxClient.IS_FF&&null!=R.xml&&da.dataTransfer.setData("Text",R.xml);
-y=E(da);mxClient.IS_GC&&(K.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(K.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(K,30);T.style.visibility="";V.style.visibility=""},0)});mxEvent.addListener(K,"dragend",function(da){"hidden"==T.style.visibility&&(T.style.visibility="",V.style.visibility="");y=null;mxUtils.setOpacity(K,100);mxUtils.setPrefixedStyle(K.style,"transform",null)})}else q||(q=!0,b.handleError({message:mxResources.get("fileExists")}));else{F=!1;
-try{if(U=mxUtils.parseXml(C),"mxlibrary"==U.documentElement.nodeName){n=JSON.parse(mxUtils.getTextContent(U.documentElement));if(null!=n&&0<n.length)for(var Y=0;Y<n.length;Y++)null!=n[Y].xml?c(null,null,0,0,0,0,n[Y]):c(n[Y].data,null,0,0,n[Y].w,n[Y].h,null,"fixed",n[Y].title);F=!0}else if("mxfile"==U.documentElement.nodeName){var ca=U.documentElement.getElementsByTagName("diagram");for(Y=0;Y<ca.length;Y++){n=mxUtils.getTextContent(ca[Y]);P=b.stringToCells(Graph.decompress(n));var aa=b.editor.graph.getBoundingBoxFromGeometry(P);
+1==f.length?mxUtils.getValue(l.getCellStyle(f[0]),mxConstants.STYLE_ROTATION,0):"";g.appendChild(L);c.appendChild(e);c.appendChild(g);E.appendChild(c);u.appendChild(E);t.appendChild(u);d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});d.className="geBtn";var N=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();l.getModel().beginUpdate();try{for(var I=0;I<f.length;I++){var q=l.getCellGeometry(f[I]);null!=q&&(q=q.clone(),l.isCellMovable(f[I])&&(q.relative=k.checked,
+0<mxUtils.trim(m.value).length&&(q.x=Number(m.value)),0<mxUtils.trim(p.value).length&&(q.y=Number(p.value)),0<mxUtils.trim(v.value).length&&(null==q.offset&&(q.offset=new mxPoint),q.offset.x=Number(v.value)),0<mxUtils.trim(x.value).length&&(null==q.offset&&(q.offset=new mxPoint),q.offset.y=Number(x.value))),l.isCellResizable(f[I])&&(0<mxUtils.trim(A.value).length&&(q.width=Number(A.value)),0<mxUtils.trim(y.value).length&&(q.height=Number(y.value))),l.getModel().setGeometry(f[I],q));0<mxUtils.trim(L.value).length&&
+l.setCellStyles(mxConstants.STYLE_ROTATION,Number(L.value),[f[I]])}}finally{l.getModel().endUpdate()}});N.className="geBtn gePrimaryBtn";mxEvent.addListener(t,"keypress",function(I){13==I.keyCode&&N.click()});u=document.createElement("div");u.style.marginTop="20px";u.style.textAlign="right";b.editor.cancelFirst?(u.appendChild(d),u.appendChild(N)):(u.appendChild(N),u.appendChild(d));t.appendChild(u);this.container=t},LibraryDialog=function(b,f,l,d,t,u){function E(C){for(C=document.elementFromPoint(C.clientX,
+C.clientY);null!=C&&C.parentNode!=v;)C=C.parentNode;var G=null;if(null!=C){var H=v.firstChild;for(G=0;null!=H&&H!=C;)H=H.nextSibling,G++}return G}function c(C,G,H,M,F,J,Q,X,P){try{if(b.spinner.stop(),null==G||"image/"==G.substring(0,6))if(null==C&&null!=Q||null==A[C]){var V=function(){S.innerText="";S.style.cursor="pointer";S.style.whiteSpace="nowrap";S.style.textOverflow="ellipsis";mxUtils.write(S,null!=T.title&&0<T.title.length?T.title:mxResources.get("untitled"));S.style.color=null==T.title||0==
+T.title.length?"#d0d0d0":""};v.style.backgroundImage="";x.style.display="none";var W=F,n=J;if(F>b.maxImageSize||J>b.maxImageSize){var B=Math.min(1,Math.min(b.maxImageSize/Math.max(1,F)),b.maxImageSize/Math.max(1,J));F*=B;J*=B}W>n?(n=Math.round(100*n/W),W=100):(W=Math.round(100*W/n),n=100);var K=document.createElement("div");K.setAttribute("draggable","true");K.style.display="inline-block";K.style.position="relative";K.style.padding="0 12px";K.style.cursor="move";mxUtils.setPrefixedStyle(K.style,"transition",
+"transform .1s ease-in-out");if(null!=C){var R=document.createElement("img");R.setAttribute("src",I.convert(C));R.style.width=W+"px";R.style.height=n+"px";R.style.margin="10px";R.style.paddingBottom=Math.floor((100-n)/2)+"px";R.style.paddingLeft=Math.floor((100-W)/2)+"px";K.appendChild(R)}else if(null!=Q){var O=b.stringToCells(Graph.decompress(Q.xml));0<O.length&&(b.sidebar.createThumb(O,100,100,K,null,!0,!1),K.firstChild.style.display="inline-block",K.firstChild.style.cursor="")}var U=document.createElement("img");
+U.setAttribute("src",Editor.closeBlackImage);U.setAttribute("border","0");U.setAttribute("title",mxResources.get("delete"));U.setAttribute("align","top");U.style.paddingTop="4px";U.style.position="absolute";U.style.marginLeft="-12px";U.style.zIndex="1";U.style.cursor="pointer";mxEvent.addListener(U,"dragstart",function(da){mxEvent.consume(da)});(function(da,ha,ma){mxEvent.addListener(U,"click",function(Z){A[ha]=null;for(var Fa=0;Fa<k.length;Fa++)if(null!=k[Fa].data&&k[Fa].data==ha||null!=k[Fa].xml&&
+null!=ma&&k[Fa].xml==ma.xml){k.splice(Fa,1);break}K.parentNode.removeChild(da);0==k.length&&(v.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",x.style.display="");mxEvent.consume(Z)});mxEvent.addListener(U,"dblclick",function(Z){mxEvent.consume(Z)})})(K,C,Q);K.appendChild(U);K.style.marginBottom="30px";var S=document.createElement("div");S.style.position="absolute";S.style.boxSizing="border-box";S.style.bottom="-18px";S.style.left="10px";S.style.right="10px";S.style.backgroundColor=Editor.isDarkMode()?
+Editor.darkColor:"#ffffff";S.style.overflow="hidden";S.style.textAlign="center";var T=null;null!=C?(T={data:C,w:F,h:J,title:P},null!=X&&(T.aspect=X),A[C]=R,k.push(T)):null!=Q&&(Q.aspect="fixed",k.push(Q),T=Q);mxEvent.addListener(S,"keydown",function(da){13==da.keyCode&&null!=N&&(N(),N=null,mxEvent.consume(da))});V();K.appendChild(S);mxEvent.addListener(S,"mousedown",function(da){"true"!=S.getAttribute("contentEditable")&&mxEvent.consume(da)});O=function(da){if(mxClient.IS_IOS||mxClient.IS_FF||!(null==
+document.documentMode||9<document.documentMode)){var ha=new FilenameDialog(b,T.title||"",mxResources.get("ok"),function(ma){null!=ma&&(T.title=ma,V())},mxResources.get("enterValue"));b.showDialog(ha.container,300,80,!0,!0);ha.init();mxEvent.consume(da)}else if("true"!=S.getAttribute("contentEditable")){null!=N&&(N(),N=null);if(null==T.title||0==T.title.length)S.innerText="";S.style.textOverflow="";S.style.whiteSpace="";S.style.cursor="text";S.style.color="";S.setAttribute("contentEditable","true");
+mxUtils.setPrefixedStyle(S.style,"user-select","text");S.focus();document.execCommand("selectAll",!1,null);N=function(){S.removeAttribute("contentEditable");S.style.cursor="pointer";T.title=S.innerHTML;V()};mxEvent.consume(da)}};mxEvent.addListener(S,"click",O);mxEvent.addListener(K,"dblclick",O);v.appendChild(K);mxEvent.addListener(K,"dragstart",function(da){null==C&&null!=Q&&(U.style.visibility="hidden",S.style.visibility="hidden");mxClient.IS_FF&&null!=Q.xml&&da.dataTransfer.setData("Text",Q.xml);
+y=E(da);mxClient.IS_GC&&(K.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(K.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(K,30);U.style.visibility="";S.style.visibility=""},0)});mxEvent.addListener(K,"dragend",function(da){"hidden"==U.style.visibility&&(U.style.visibility="",S.style.visibility="");y=null;mxUtils.setOpacity(K,100);mxUtils.setPrefixedStyle(K.style,"transform",null)})}else q||(q=!0,b.handleError({message:mxResources.get("fileExists")}));else{F=!1;
+try{if(W=mxUtils.parseXml(C),"mxlibrary"==W.documentElement.nodeName){n=JSON.parse(mxUtils.getTextContent(W.documentElement));if(null!=n&&0<n.length)for(var Y=0;Y<n.length;Y++)null!=n[Y].xml?c(null,null,0,0,0,0,n[Y]):c(n[Y].data,null,0,0,n[Y].w,n[Y].h,null,"fixed",n[Y].title);F=!0}else if("mxfile"==W.documentElement.nodeName){var ba=W.documentElement.getElementsByTagName("diagram");for(Y=0;Y<ba.length;Y++){n=mxUtils.getTextContent(ba[Y]);O=b.stringToCells(Graph.decompress(n));var aa=b.editor.graph.getBoundingBoxFromGeometry(O);
c(null,null,0,0,0,0,{xml:n,w:aa.width,h:aa.height})}F=!0}}catch(da){}F||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(da){}return null}function e(C){C.dataTransfer.dropEffect=null!=y?"move":"copy";C.stopPropagation();C.preventDefault()}function g(C){C.stopPropagation();C.preventDefault();q=!1;L=E(C);if(null!=y)null!=L&&L<v.children.length?(k.splice(L>y?L-1:L,0,k.splice(y,1)[0]),v.insertBefore(v.children[y],v.children[L])):(k.push(k.splice(y,1)[0]),v.appendChild(v.children[y]));
-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 G=decodeURIComponent(C.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(G)||/(\.png)($|\?)/i.test(G)||/(\.gif)($|\?)/i.test(G)||/(\.svg)($|\?)/i.test(G))&&b.loadImage(G,function(M){c(G,null,0,0,M.width,M.height);v.scrollTop=v.scrollHeight})}C.stopPropagation();C.preventDefault()}var k=[];l=document.createElement("div");
+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 G=decodeURIComponent(C.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(G)||/(\.png)($|\?)/i.test(G)||/(\.gif)($|\?)/i.test(G)||/(\.svg)($|\?)/i.test(G))&&b.loadImage(G,function(H){c(G,null,0,0,H.width,H.height);v.scrollTop=v.scrollHeight})}C.stopPropagation();C.preventDefault()}var k=[];l=document.createElement("div");
l.style.height="100%";var m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.height="40px";l.appendChild(m);mxUtils.write(m,mxResources.get("filename")+":");null==f&&(f=b.defaultLibraryName+".xml");var p=document.createElement("input");p.setAttribute("value",f);p.style.marginRight="20px";p.style.marginLeft="10px";p.style.width="500px";null==t||t.isRenamable()||p.setAttribute("disabled","true");this.init=function(){if(null==t||t.isRenamable())p.focus(),mxClient.IS_GC||mxClient.IS_FF||
5<=document.documentMode?p.select():document.execCommand("selectAll",!1,null)};m.appendChild(p);var v=document.createElement("div");v.style.borderWidth="1px 0px 1px 0px";v.style.borderColor="#d3d3d3";v.style.borderStyle="solid";v.style.marginTop="6px";v.style.overflow="auto";v.style.height="340px";v.style.backgroundPosition="center center";v.style.backgroundRepeat="no-repeat";0==k.length&&Graph.fileSupport&&(v.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var x=document.createElement("div");
-x.style.position="absolute";x.style.width="640px";x.style.top="260px";x.style.textAlign="center";x.style.fontSize="22px";x.style.color="#a0c3ff";mxUtils.write(x,mxResources.get("dragImagesHere"));l.appendChild(x);var z={},y=null,L=null,N=null;f=function(C){"true"!=mxEvent.getSource(C).getAttribute("contentEditable")&&null!=N&&(N(),N=null,mxEvent.consume(C))};mxEvent.addListener(v,"mousedown",f);mxEvent.addListener(v,"pointerdown",f);mxEvent.addListener(v,"touchstart",f);var J=new mxUrlConverter,q=
-!1;if(null!=d)for(f=0;f<d.length;f++)m=d[f],c(m.data,null,0,0,m.w,m.h,m,m.aspect,m.title);mxEvent.addListener(v,"dragleave",function(C){x.style.cursor="";for(var G=mxEvent.getSource(C);null!=G;){if(G==v||G==x){C.stopPropagation();C.preventDefault();break}G=G.parentNode}});var D=function(C){return function(G,M,H,F,I,R,X,O,W){null!=W&&(/(\.v(dx|sdx?))($|\?)/i.test(W.name)||/(\.vs(x|sx?))($|\?)/i.test(W.name))?b.importVisio(W,mxUtils.bind(this,function(U){c(U,M,H,F,I,R,X,"fixed",mxEvent.isAltDown(C)?
-null:X.substring(0,X.lastIndexOf(".")).replace(/_/g," "))})):null!=W&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(G,W.name)?b.isExternalDataComms()?b.parseFile(W,mxUtils.bind(this,function(U){4==U.readyState&&(b.spinner.stop(),200<=U.status&&299>=U.status&&(c(U.responseText,M,H,F,I,R,X,"fixed",mxEvent.isAltDown(C)?null:X.substring(0,X.lastIndexOf(".")).replace(/_/g," ")),v.scrollTop=v.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):
-(c(G,M,H,F,I,R,X,"fixed",mxEvent.isAltDown(C)?null:X.substring(0,X.lastIndexOf(".")).replace(/_/g," ")),v.scrollTop=v.scrollHeight)}};mxEvent.addListener(v,"dragover",e);mxEvent.addListener(v,"drop",g);mxEvent.addListener(x,"dragover",e);mxEvent.addListener(x,"drop",g);l.appendChild(v);d=document.createElement("div");d.style.textAlign="right";d.style.marginTop="20px";f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});f.setAttribute("id","btnCancel");f.className="geBtn";b.editor.cancelFirst&&
+x.style.position="absolute";x.style.width="640px";x.style.top="260px";x.style.textAlign="center";x.style.fontSize="22px";x.style.color="#a0c3ff";mxUtils.write(x,mxResources.get("dragImagesHere"));l.appendChild(x);var A={},y=null,L=null,N=null;f=function(C){"true"!=mxEvent.getSource(C).getAttribute("contentEditable")&&null!=N&&(N(),N=null,mxEvent.consume(C))};mxEvent.addListener(v,"mousedown",f);mxEvent.addListener(v,"pointerdown",f);mxEvent.addListener(v,"touchstart",f);var I=new mxUrlConverter,q=
+!1;if(null!=d)for(f=0;f<d.length;f++)m=d[f],c(m.data,null,0,0,m.w,m.h,m,m.aspect,m.title);mxEvent.addListener(v,"dragleave",function(C){x.style.cursor="";for(var G=mxEvent.getSource(C);null!=G;){if(G==v||G==x){C.stopPropagation();C.preventDefault();break}G=G.parentNode}});var D=function(C){return function(G,H,M,F,J,Q,X,P,V){null!=V&&(/(\.v(dx|sdx?))($|\?)/i.test(V.name)||/(\.vs(x|sx?))($|\?)/i.test(V.name))?b.importVisio(V,mxUtils.bind(this,function(W){c(W,H,M,F,J,Q,X,"fixed",mxEvent.isAltDown(C)?
+null:X.substring(0,X.lastIndexOf(".")).replace(/_/g," "))})):null!=V&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(G,V.name)?b.isExternalDataComms()?b.parseFile(V,mxUtils.bind(this,function(W){4==W.readyState&&(b.spinner.stop(),200<=W.status&&299>=W.status&&(c(W.responseText,H,M,F,J,Q,X,"fixed",mxEvent.isAltDown(C)?null:X.substring(0,X.lastIndexOf(".")).replace(/_/g," ")),v.scrollTop=v.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):
+(c(G,H,M,F,J,Q,X,"fixed",mxEvent.isAltDown(C)?null:X.substring(0,X.lastIndexOf(".")).replace(/_/g," ")),v.scrollTop=v.scrollHeight)}};mxEvent.addListener(v,"dragover",e);mxEvent.addListener(v,"drop",g);mxEvent.addListener(x,"dragover",e);mxEvent.addListener(x,"drop",g);l.appendChild(v);d=document.createElement("div");d.style.textAlign="right";d.style.marginTop="20px";f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});f.setAttribute("id","btnCancel");f.className="geBtn";b.editor.cancelFirst&&
d.appendChild(f);"draw.io"!=b.getServiceName()||null==t||t.constructor!=DriveLibrary&&t.constructor!=GitHubLibrary||(m=mxUtils.button(mxResources.get("link"),function(){b.spinner.spin(document.body,mxResources.get("loading"))&&t.getPublicUrl(function(C){b.spinner.stop();if(null!=C){var G=b.getSearch("create title mode url drive splash state clibs ui".split(" "));G+=(0==G.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(C);C=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+
"/"+G,null,null,null,null,"Check out the library I made using @drawio");b.showDialog(C.container,450,240,!0);C.init()}else t.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(t.getId())}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),m.className="geBtn",d.appendChild(m));m=mxUtils.button(mxResources.get("export"),
-function(){var C=b.createLibraryDataFromImages(k),G=p.value;/(\.xml)$/i.test(G)||(G+=".xml");b.isLocalFileSave()?b.saveLocalFile(C,G,"text/xml",null,null,!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(G)+"&format=xml&xml="+encodeURIComponent(C))).simulate(document,"_blank")});m.setAttribute("id","btnDownload");m.className="geBtn";d.appendChild(m);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var A=document.createElement("input");A.setAttribute("multiple","multiple");
-A.setAttribute("type","file");mxEvent.addListener(A,"change",function(C){q=!1;b.importFiles(A.files,0,0,b.maxImageSize,function(G,M,H,F,I,R,X,O,W){null!=A.files&&(D(C)(G,M,H,F,I,R,X,O,W),A.type="",A.type="file",A.value="")});v.scrollTop=v.scrollHeight});A.style.display="none";document.body.appendChild(A);b.libDlgFileInputElt=A}m=mxUtils.button(mxResources.get("import"),function(){null!=N&&(N(),N=null);b.libDlgFileInputElt.click()});m.setAttribute("id","btnAddImage");m.className="geBtn";d.appendChild(m)}m=
-mxUtils.button(mxResources.get("addImages"),function(){null!=N&&(N(),N=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(C,G,M){q=!1;if(null!=C){if("data:image/"==C.substring(0,11)){var H=C.indexOf(",");0<H&&(C=C.substring(0,H)+";base64,"+C.substring(H+1))}c(C,null,0,0,G,M);v.scrollTop=v.scrollHeight}})});m.setAttribute("id","btnAddImageUrl");m.className="geBtn";d.appendChild(m);this.saveBtnClickHandler=function(C,G,M,H){b.saveLibrary(C,G,M,H)};m=mxUtils.button(mxResources.get("save"),
+function(){var C=b.createLibraryDataFromImages(k),G=p.value;/(\.xml)$/i.test(G)||(G+=".xml");b.isLocalFileSave()?b.saveLocalFile(C,G,"text/xml",null,null,!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(G)+"&format=xml&xml="+encodeURIComponent(C))).simulate(document,"_blank")});m.setAttribute("id","btnDownload");m.className="geBtn";d.appendChild(m);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var z=document.createElement("input");z.setAttribute("multiple","multiple");
+z.setAttribute("type","file");mxEvent.addListener(z,"change",function(C){q=!1;b.importFiles(z.files,0,0,b.maxImageSize,function(G,H,M,F,J,Q,X,P,V){null!=z.files&&(D(C)(G,H,M,F,J,Q,X,P,V),z.type="",z.type="file",z.value="")});v.scrollTop=v.scrollHeight});z.style.display="none";document.body.appendChild(z);b.libDlgFileInputElt=z}m=mxUtils.button(mxResources.get("import"),function(){null!=N&&(N(),N=null);b.libDlgFileInputElt.click()});m.setAttribute("id","btnAddImage");m.className="geBtn";d.appendChild(m)}m=
+mxUtils.button(mxResources.get("addImages"),function(){null!=N&&(N(),N=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(C,G,H){q=!1;if(null!=C){if("data:image/"==C.substring(0,11)){var M=C.indexOf(",");0<M&&(C=C.substring(0,M)+";base64,"+C.substring(M+1))}c(C,null,0,0,G,H);v.scrollTop=v.scrollHeight}})});m.setAttribute("id","btnAddImageUrl");m.className="geBtn";d.appendChild(m);this.saveBtnClickHandler=function(C,G,H,M){b.saveLibrary(C,G,H,M)};m=mxUtils.button(mxResources.get("save"),
mxUtils.bind(this,function(){null!=N&&(N(),N=null);this.saveBtnClickHandler(p.value,k,t,u)}));m.setAttribute("id","btnSave");m.className="geBtn gePrimaryBtn";d.appendChild(m);b.editor.cancelFirst||d.appendChild(f);l.appendChild(d);this.container=l},EditShapeDialog=function(b,f,l,d,t){d=null!=d?d:300;t=null!=t?t:120;var u=document.createElement("table"),E=document.createElement("tbody");u.style.cellPadding="4px";var c=document.createElement("tr");var e=document.createElement("td");e.setAttribute("colspan",
"2");e.style.fontSize="10pt";mxUtils.write(e,l);c.appendChild(e);E.appendChild(c);c=document.createElement("tr");e=document.createElement("td");var g=document.createElement("textarea");g.style.outline="none";g.style.resize="none";g.style.width=d-200+"px";g.style.height=t+"px";this.textarea=g;this.init=function(){g.focus();g.scrollTop=0};e.appendChild(g);c.appendChild(e);e=document.createElement("td");l=document.createElement("div");l.style.position="relative";l.style.border="1px solid gray";l.style.top=
"6px";l.style.width="200px";l.style.height=t+4+"px";l.style.overflow="hidden";l.style.marginBottom="16px";mxEvent.disableContextMenu(l);e.appendChild(l);var k=new Graph(l);k.setEnabled(!1);var m=b.editor.graph.cloneCell(f);k.addCells([m]);l=k.view.getState(m);var p="";null!=l.shape&&null!=l.shape.stencil&&(p=mxUtils.getPrettyXml(l.shape.stencil.desc));mxUtils.write(g,p||"");l=k.getGraphBounds();t=Math.min(160/l.width,(t-40)/l.height);k.view.scaleAndTranslate(t,20/t-l.x,20/t-l.y);c.appendChild(e);
E.appendChild(c);c=document.createElement("tr");e=document.createElement("td");e.setAttribute("colspan","2");e.style.paddingTop="2px";e.style.whiteSpace="nowrap";e.setAttribute("align","right");b.isOffline()||(t=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/shape-complex-create-edit")}),t.className="geBtn",e.appendChild(t));t=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});t.className="geBtn";b.editor.cancelFirst&&e.appendChild(t);
-var v=function(x,z,y){var L=g.value,N=mxUtils.parseXml(L);L=mxUtils.getPrettyXml(N.documentElement);N=N.documentElement.getElementsByTagName("parsererror");if(null!=N&&0<N.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(y&&b.hideDialog(),N=!x.model.contains(z),!y||N||L!=p){L=Graph.compress(L);x.getModel().beginUpdate();try{if(N){var J=b.editor.graph.getFreeInsertPoint();z.geometry.x=J.x;z.geometry.y=J.y;x.addCell(z)}x.setCellStyles(mxConstants.STYLE_SHAPE,
-"stencil("+L+")",[z])}catch(q){throw q;}finally{x.getModel().endUpdate()}N&&(x.setSelectionCell(z),x.scrollCellToVisible(z))}};l=mxUtils.button(mxResources.get("preview"),function(){v(k,m,!1)});l.className="geBtn";e.appendChild(l);l=mxUtils.button(mxResources.get("apply"),function(){v(b.editor.graph,f,!0)});l.className="geBtn gePrimaryBtn";e.appendChild(l);b.editor.cancelFirst||e.appendChild(t);c.appendChild(e);E.appendChild(c);u.appendChild(E);this.container=u},CustomDialog=function(b,f,l,d,t,u,
+var v=function(x,A,y){var L=g.value,N=mxUtils.parseXml(L);L=mxUtils.getPrettyXml(N.documentElement);N=N.documentElement.getElementsByTagName("parsererror");if(null!=N&&0<N.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(y&&b.hideDialog(),N=!x.model.contains(A),!y||N||L!=p){L=Graph.compress(L);x.getModel().beginUpdate();try{if(N){var I=b.editor.graph.getFreeInsertPoint();A.geometry.x=I.x;A.geometry.y=I.y;x.addCell(A)}x.setCellStyles(mxConstants.STYLE_SHAPE,
+"stencil("+L+")",[A])}catch(q){throw q;}finally{x.getModel().endUpdate()}N&&(x.setSelectionCell(A),x.scrollCellToVisible(A))}};l=mxUtils.button(mxResources.get("preview"),function(){v(k,m,!1)});l.className="geBtn";e.appendChild(l);l=mxUtils.button(mxResources.get("apply"),function(){v(b.editor.graph,f,!0)});l.className="geBtn gePrimaryBtn";e.appendChild(l);b.editor.cancelFirst||e.appendChild(t);c.appendChild(e);E.appendChild(c);u.appendChild(E);this.container=u},CustomDialog=function(b,f,l,d,t,u,
E,c,e,g,k){var m=document.createElement("div");m.appendChild(f);var p=document.createElement("div");p.style.marginTop="30px";p.style.textAlign="center";null!=E&&p.appendChild(E);b.isOffline()||null==u||(f=mxUtils.button(mxResources.get("help"),function(){b.openLink(u)}),f.className="geBtn",p.appendChild(f));e=mxUtils.button(e||mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d()});e.className="geBtn";c&&(e.style.display="none");b.editor.cancelFirst&&p.appendChild(e);t=mxUtils.button(t||
-mxResources.get("ok"),mxUtils.bind(this,function(){g||b.hideDialog(null,null,this.container);if(null!=l){var v=l();if("string"===typeof v){b.showError(mxResources.get("error"),v);return}}g&&b.hideDialog(null,null,this.container)}));p.appendChild(t);t.className="geBtn gePrimaryBtn";b.editor.cancelFirst||p.appendChild(e);if(null!=k)for(c=0;c<k.length;c++)(function(v,x,z){v=mxUtils.button(v,function(y){x(y)});null!=z&&v.setAttribute("title",z);v.className="geBtn";p.appendChild(v)})(k[c][0],k[c][1],k[c][2]);
-m.appendChild(p);this.cancelBtn=e;this.okButton=t;this.container=m},TemplatesDialog=function(b,f,l,d,t,u,E,c,e,g,k,m,p,v,x){function z(ia){Ja.innerHTML=mxUtils.htmlEntities(ia);Ja.style.display="block";setTimeout(function(){Ja.style.display="none"},4E3)}function y(){null!=n&&(n.style.fontWeight="normal",n.style.textDecoration="none",B=n,n=null)}function L(ia,ma,ba,fa,na,la,qa){if(-1<ia.className.indexOf("geTempDlgRadioBtnActive"))return!1;ia.className+=" geTempDlgRadioBtnActive";O.querySelector(".geTempDlgRadioBtn[data-id="+
-fa+"]").className="geTempDlgRadioBtn "+(qa?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");O.querySelector("."+ma).src="/images/"+ba+"-sel.svg";O.querySelector("."+na).src="/images/"+la+".svg";return!0}function N(ia,ma,ba,fa){function na(ka,Ca){null==qa?(ka=/^https?:\/\//.test(ka)&&!b.editor.isCorsEnabledForUrl(ka)?PROXY_URL+"?url="+encodeURIComponent(ka):TEMPLATE_PATH+"/"+ka,mxUtils.get(ka,mxUtils.bind(this,function(Oa){200<=Oa.getStatus()&&299>=Oa.getStatus()&&(qa=Oa.getText());Ca(qa)}))):Ca(qa)}
-function la(ka,Ca,Oa){if(null!=ka&&mxUtils.isAncestorNode(document.body,ma)&&(ka=mxUtils.parseXml(ka),ka=Editor.extractGraphModel(ka.documentElement,!0),null!=ka)){"mxfile"==ka.nodeName&&(ka=Editor.parseDiagramNode(ka.getElementsByTagName("diagram")[0]));var Sa=new mxCodec(ka.ownerDocument),Ea=new mxGraphModel;Sa.decode(ka,Ea);ka=Ea.root.getChildAt(0).children||[];b.sidebar.createTooltip(ma,ka,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!=ia.title?mxResources.get(ia.title,null,ia.title):null,!0,new mxPoint(Ca,Oa),!0,null,!0);var Ia=document.createElement("div");Ia.className="geTempDlgDialogMask";O.appendChild(Ia);var Qa=b.sidebar.hideTooltip;b.sidebar.hideTooltip=function(){Ia&&(O.removeChild(Ia),Ia=null,Qa.apply(this,arguments),b.sidebar.hideTooltip=Qa)};mxEvent.addListener(Ia,"click",function(){b.sidebar.hideTooltip()})}}var qa=null;if(Pa||b.sidebar.currentElt==
-ma)b.sidebar.hideTooltip();else{var oa=function(ka){Pa&&b.sidebar.currentElt==ma&&la(ka,mxEvent.getClientX(fa),mxEvent.getClientY(fa));Pa=!1;ba.src="/images/icon-search.svg"};b.sidebar.hideTooltip();b.sidebar.currentElt=ma;Pa=!0;ba.src="/images/aui-wait.gif";ia.isExt?e(ia,oa,function(){z(mxResources.get("cantLoadPrev"));Pa=!1;ba.src="/images/icon-search.svg"}):na(ia.url,oa)}}function J(ia,ma,ba){if(null!=K){for(var fa=K.className.split(" "),na=0;na<fa.length;na++)if(-1<fa[na].indexOf("Active")){fa.splice(na,
-1);break}K.className=fa.join(" ")}null!=ia?(K=ia,K.className+=" "+ma,Q=ba,Na.className="geTempDlgCreateBtn"):(Q=K=null,Na.className="geTempDlgCreateBtn geTempDlgBtnDisabled")}function q(ia,ma){if(null!=Q){var ba=function(oa){qa.isExternal?e(qa,function(ka){fa(ka,oa)},na):qa.url?mxUtils.get(TEMPLATE_PATH+"/"+qa.url,mxUtils.bind(this,function(ka){200<=ka.getStatus()&&299>=ka.getStatus()?fa(ka.getText(),oa):na()})):fa(b.emptyDiagramXml,oa)},fa=function(oa,ka){x||b.hideDialog(!0);f(oa,ka,qa,ma)},na=function(){z(mxResources.get("cannotLoad"));
-la()},la=function(){Q=qa;Na.className="geTempDlgCreateBtn";ma&&(La.className="geTempDlgOpenBtn")},qa=Q;Q=null;"boolean"!==typeof ma&&(ma=qa.isExternal&&m);1==ia?g(qa.url,qa):ma?(La.className="geTempDlgOpenBtn geTempDlgBtnDisabled geTempDlgBtnBusy",ba()):(Na.className="geTempDlgCreateBtn geTempDlgBtnDisabled geTempDlgBtnBusy",ia=null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"),ia=new FilenameDialog(b,b.defaultFilename+".drawio",
-mxResources.get("ok"),ba,ia,function(oa){var ka=null!=oa&&0<oa.length;return ka&&x?(ba(oa),!1):ka},null,null,null,la,v?null:[]),b.showDialog(ia.container,350,80,!0,!0),ia.init())}}function D(ia){Na.innerHTML=mxUtils.htmlEntities(mxResources.get(da||ia?"create":"copy"));ia=ia?"none":"";m&&(La.style.display=ia);for(var ma=O.querySelectorAll(".geTempDlgLinkToDiagram"),ba=0;ba<ma.length;ba++)ma[ba].style.display=ia}function A(ia,ma,ba,fa,na){na||(ha.innerText="",J(),S=ia,Y=fa);var la=null;if(ba){la=document.createElement("table");
-la.className="geTempDlgDiagramsListGrid";var qa=document.createElement("tr"),oa=document.createElement("th");oa.style.width="50%";oa.innerHTML=mxUtils.htmlEntities(mxResources.get("diagram"));qa.appendChild(oa);oa=document.createElement("th");oa.style.width="25%";oa.innerHTML=mxUtils.htmlEntities(mxResources.get("changedBy"));qa.appendChild(oa);oa=document.createElement("th");oa.style.width="25%";oa.innerHTML=mxUtils.htmlEntities(mxResources.get("lastModifiedOn"));qa.appendChild(oa);la.appendChild(qa);
-ha.appendChild(la)}for(qa=0;qa<ia.length;qa++){ia[qa].isExternal=!ma;var ka=ia[qa].url,Ca=(oa=mxUtils.htmlEntities(ma?mxResources.get(ia[qa].title,null,ia[qa].title):ia[qa].title))||ia[qa].url,Oa=ia[qa].imgUrl,Sa=mxUtils.htmlEntities(ia[qa].changedBy||""),Ea="";ia[qa].lastModifiedOn&&(Ea=b.timeSince(new Date(ia[qa].lastModifiedOn)),null==Ea&&(Ea=mxResources.get("lessThanAMinute")),Ea=mxUtils.htmlEntities(mxResources.get("timeAgo",[Ea],"{1} ago")));Oa||(Oa=TEMPLATE_PATH+"/"+ka.substring(0,ka.length-
-4)+".png");ka=ba?50:15;null!=oa&&oa.length>ka&&(oa=oa.substring(0,ka)+"&hellip;");if(ba){var Ia=document.createElement("tr");Oa=document.createElement("td");var Qa=document.createElement("img");Qa.src="/images/icon-search.svg";Qa.className="geTempDlgDiagramListPreviewBtn";Qa.setAttribute("title",mxResources.get("preview"));na||Oa.appendChild(Qa);Ca=document.createElement("span");Ca.className="geTempDlgDiagramTitle";Ca.innerHTML=oa;Oa.appendChild(Ca);Ia.appendChild(Oa);Oa=document.createElement("td");
-Oa.innerHTML=Sa;Ia.appendChild(Oa);Oa=document.createElement("td");Oa.innerHTML=Ea;Ia.appendChild(Oa);la.appendChild(Ia);null==K&&(D(ma),J(Ia,"geTempDlgDiagramsListGridActive",ia[qa]));(function(Ka,Ta,Ua){mxEvent.addListener(Ia,"click",function(){K!=Ta&&(D(ma),J(Ta,"geTempDlgDiagramsListGridActive",Ka))});mxEvent.addListener(Ia,"dblclick",q);mxEvent.addListener(Qa,"click",function(Va){N(Ka,Ta,Ua,Va)})})(ia[qa],Ia,Qa)}else{var Ma=document.createElement("div");Ma.className="geTempDlgDiagramTile";Ma.setAttribute("title",
-Ca);null==K&&(D(ma),J(Ma,"geTempDlgDiagramTileActive",ia[qa]));Sa=document.createElement("div");Sa.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var Ra=document.createElement("img");Ra.style.display="none";(function(Ka,Ta,Ua){Ra.onload=function(){Ta.className="geTempDlgDiagramTileImg";Ka.style.display=""};Ra.onerror=function(){this.src!=Ua?this.src=Ua:Ta.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(Ra,Sa,Oa?Oa.replace(".drawio.xml","").replace(".drawio",
-"").replace(".xml",""):"");Ra.src=Oa;Sa.appendChild(Ra);Ma.appendChild(Sa);Sa=document.createElement("div");Sa.className="geTempDlgDiagramTileLbl";Sa.innerHTML=null!=oa?oa:"";Ma.appendChild(Sa);Qa=document.createElement("img");Qa.src="/images/icon-search.svg";Qa.className="geTempDlgDiagramPreviewBtn";Qa.setAttribute("title",mxResources.get("preview"));na||Ma.appendChild(Qa);(function(Ka,Ta,Ua){mxEvent.addListener(Ma,"click",function(){K!=Ta&&(D(ma),J(Ta,"geTempDlgDiagramTileActive",Ka))});mxEvent.addListener(Ma,
-"dblclick",q);mxEvent.addListener(Qa,"click",function(Va){N(Ka,Ta,Ua,Va)})})(ia[qa],Ma,Qa);ha.appendChild(Ma)}}for(var Xa in fa)ia=fa[Xa],0<ia.length&&(na=document.createElement("div"),na.className="geTempDlgImportCat",na.innerHTML=mxResources.get(Xa,null,Xa),ha.appendChild(na),A(ia,ma,ba,null,!0))}function C(ia,ma){pa.innerHTML="";J();var ba=Math.floor(pa.offsetWidth/150)-1;ma=!ma&&ia.length>ba?ba:ia.length;for(var fa=0;fa<ma;fa++){var na=ia[fa];na.isCategory=!0;var la=document.createElement("div"),
-qa=mxResources.get(na.title);null==qa&&(qa=na.title.substring(0,1).toUpperCase()+na.title.substring(1));la.className="geTempDlgNewDiagramCatItem";la.setAttribute("title",qa);qa=mxUtils.htmlEntities(qa);15<qa.length&&(qa=qa.substring(0,15)+"&hellip;");null==K&&(D(!0),J(la,"geTempDlgNewDiagramCatItemActive",na));var oa=document.createElement("div");oa.className="geTempDlgNewDiagramCatItemImg";var ka=document.createElement("img");ka.src=NEW_DIAGRAM_CATS_PATH+"/"+na.img;oa.appendChild(ka);la.appendChild(oa);
-oa=document.createElement("div");oa.className="geTempDlgNewDiagramCatItemLbl";oa.innerHTML=qa;la.appendChild(oa);pa.appendChild(la);(function(Ca,Oa){mxEvent.addListener(la,"click",function(){K!=Oa&&(D(!0),J(Oa,"geTempDlgNewDiagramCatItemActive",Ca))});mxEvent.addListener(la,"dblclick",q)})(na,la)}la=document.createElement("div");la.className="geTempDlgNewDiagramCatItem";qa=mxResources.get("showAllTemps");la.setAttribute("title",qa);oa=document.createElement("div");oa.className="geTempDlgNewDiagramCatItemImg";
-oa.innerHTML="...";oa.style.fontSize="32px";la.appendChild(oa);oa=document.createElement("div");oa.className="geTempDlgNewDiagramCatItemLbl";oa.innerHTML=qa;la.appendChild(oa);pa.appendChild(la);mxEvent.addListener(la,"click",function(){function Ca(){var Sa=Oa.querySelector(".geTemplateDrawioCatLink");null!=Sa?Sa.click():setTimeout(Ca,200)}da=!0;var Oa=O.querySelector(".geTemplatesList");Oa.style.display="block";Ga.style.width="";ya.style.display="";ya.value="";ca=null;Ca()});ja.style.display=ia.length<=
-ba?"none":""}function G(ia,ma,ba){function fa(Ra,Xa){var Ka=mxResources.get(Ra);null==Ka&&(Ka=Ra.substring(0,1).toUpperCase()+Ra.substring(1));Ra=Ka+" ("+Xa.length+")";var Ta=Ka=mxUtils.htmlEntities(Ka);15<Ka.length&&(Ka=Ka.substring(0,15)+"&hellip;");return{lbl:Ka+" ("+Xa.length+")",fullLbl:Ra,lblOnly:Ta}}function na(Ra,Xa,Ka,Ta,Ua){mxEvent.addListener(Ka,"click",function(){n!=Ka&&(null!=n?(n.style.fontWeight="normal",n.style.textDecoration="none"):(Ha.style.display="none",Ba.style.minHeight="100%"),
-n=Ka,n.style.fontWeight="bold",n.style.textDecoration="underline",Ga.scrollTop=0,W&&(U=!0),Z.innerHTML=Xa,Da.style.display="none",A(Ua?ma[Ra]:Ta?Aa[Ra][Ta]:ia[Ra],Ua?!1:!0))})}var la=O.querySelector(".geTemplatesList");if(0<ba){ba=document.createElement("div");ba.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(ba,mxResources.get("custom"));la.appendChild(ba);for(var qa in ma){ba=document.createElement("div");var oa=ma[qa];
-oa=fa(qa,oa);ba.className="geTemplateCatLink";ba.setAttribute("title",oa.fullLbl);ba.innerHTML=oa.lbl;la.appendChild(ba);na(qa,oa.lblOnly,ba,null,!0)}ba=document.createElement("div");ba.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(ba,"draw.io");la.appendChild(ba)}for(qa in ia){var ka=Aa[qa],Ca=ba=document.createElement(ka?"ul":"div");oa=ia[qa];oa=fa(qa,oa);if(null!=ka){var Oa=document.createElement("li"),Sa=document.createElement("div");
-Sa.className="geTempTreeCaret geTemplateCatLink geTemplateDrawioCatLink";Sa.style.padding="0";Sa.setAttribute("title",oa.fullLbl);Sa.innerHTML=oa.lbl;Ca=Sa;Oa.appendChild(Sa);var Ea=document.createElement("ul");Ea.className="geTempTreeNested";Ea.style.visibility="hidden";for(var Ia in ka){var Qa=document.createElement("li"),Ma=fa(Ia,ka[Ia]);Qa.setAttribute("title",Ma.fullLbl);Qa.innerHTML=Ma.lbl;Qa.className="geTemplateCatLink";Qa.style.padding="0";Qa.style.margin="0";na(qa,Ma.lblOnly,Qa,Ia);Ea.appendChild(Qa)}Oa.appendChild(Ea);
-ba.className="geTempTree";ba.appendChild(Oa);(function(Ra,Xa){mxEvent.addListener(Xa,"click",function(){for(var Ka=Ra.querySelectorAll("li"),Ta=0;Ta<Ka.length;Ta++)Ka[Ta].style.margin="";Ra.style.visibility="visible";Ra.classList.toggle("geTempTreeActive");Ra.classList.toggle("geTempTreeNested")&&setTimeout(function(){for(var Ua=0;Ua<Ka.length;Ua++)Ka[Ua].style.margin="0";Ra.style.visibility="hidden"},250);Xa.classList.toggle("geTempTreeCaret-down")})})(Ea,Sa)}else ba.className="geTemplateCatLink geTemplateDrawioCatLink",
-ba.setAttribute("title",oa.fullLbl),ba.innerHTML=oa.lbl;la.appendChild(ba);na(qa,oa.lblOnly,Ca)}}function M(){mxUtils.get(d,function(ia){if(!xa){xa=!0;ia=ia.getXml().documentElement.firstChild;for(var ma={};null!=ia;){if("undefined"!==typeof ia.getAttribute)if("clibs"==ia.nodeName){for(var ba=ia.getAttribute("name"),fa=ia.getElementsByTagName("add"),na=[],la=0;la<fa.length;la++)na.push(encodeURIComponent(mxUtils.getTextContent(fa[la])));null!=ba&&0<na.length&&(ma[ba]=na.join(";"))}else if(na=ia.getAttribute("url"),
-null!=na){fa=ia.getAttribute("section");ba=ia.getAttribute("subsection");if(null==fa&&(la=na.indexOf("/"),fa=na.substring(0,la),null==ba)){var qa=na.indexOf("/",la+1);-1<qa&&(ba=na.substring(la+1,qa))}la=ua[fa];null==la&&(ta++,la=[],ua[fa]=la);na=ia.getAttribute("clibs");null!=ma[na]&&(na=ma[na]);na={url:ia.getAttribute("url"),libs:ia.getAttribute("libs"),title:ia.getAttribute("title")||ia.getAttribute("name"),preview:ia.getAttribute("preview"),clibs:na,tags:ia.getAttribute("tags")};la.push(na);null!=
-ba&&(la=Aa[fa],null==la&&(la={},Aa[fa]=la),fa=la[ba],null==fa&&(fa=[],la[ba]=fa),fa.push(na))}ia=ia.nextSibling}G(ua,ea,sa)}})}function H(ia){E&&(Ga.scrollTop=0,ha.innerText="",Fa.spin(ha),U=!1,W=!0,Z.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag")),ca=null,E(ra,function(){z(mxResources.get("cannotLoad"));ra([])},ia?null:u))}function F(ia){if(""==ia)null!=B&&(B.click(),B=null);else{if(null==TemplatesDialog.tagsList[d]){var ma={};for(Ca in ua)for(var ba=ua[Ca],fa=0;fa<ba.length;fa++){var na=
-ba[fa];if(null!=na.tags)for(var la=na.tags.toLowerCase().split(";"),qa=0;qa<la.length;qa++)null==ma[la[qa]]&&(ma[la[qa]]=[]),ma[la[qa]].push(na)}TemplatesDialog.tagsList[d]=ma}var oa=ia.toLowerCase().split(" ");ma=TemplatesDialog.tagsList[d];if(0<sa&&null==ma.__tagsList__){for(Ca in ea)for(ba=ea[Ca],fa=0;fa<ba.length;fa++)for(na=ba[fa],la=na.title.split(" "),la.push(Ca),qa=0;qa<la.length;qa++){var ka=la[qa].toLowerCase();null==ma[ka]&&(ma[ka]=[]);ma[ka].push(na)}ma.__tagsList__=!0}var Ca=[];ba={};
-for(fa=la=0;fa<oa.length;fa++)if(0<oa[fa].length){ka=ma[oa[fa]];var Oa={};Ca=[];if(null!=ka)for(qa=0;qa<ka.length;qa++)na=ka[qa],0==la==(null==ba[na.url])&&(Oa[na.url]=!0,Ca.push(na));ba=Oa;la++}0==Ca.length?Z.innerHTML=mxResources.get("noResultsFor",[ia]):A(Ca,!0)}}function I(ia){if(ca!=ia||T!=aa)y(),Ga.scrollTop=0,ha.innerText="",Z.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults"))+' "'+mxUtils.htmlEntities(ia)+'"',va=null,da?F(ia):c&&(ia?(Fa.spin(ha),U=!1,W=!0,c(ia,ra,function(){z(mxResources.get("searchFailed"));
-ra([])},T?null:u)):H(T)),ca=ia,aa=T}function R(ia){null!=va&&clearTimeout(va);13==ia.keyCode?I(ya.value):va=setTimeout(function(){I(ya.value)},1E3)}var X='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" '+(c?"":'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("ok"),mxUtils.bind(this,function(){g||b.hideDialog(null,null,this.container);if(null!=l){var v=l();if("string"===typeof v){b.showError(mxResources.get("error"),v);return}}g&&b.hideDialog(null,null,this.container)}));p.appendChild(t);t.className="geBtn gePrimaryBtn";b.editor.cancelFirst||p.appendChild(e);if(null!=k)for(c=0;c<k.length;c++)(function(v,x,A){v=mxUtils.button(v,function(y){x(y)});null!=A&&v.setAttribute("title",A);v.className="geBtn";p.appendChild(v)})(k[c][0],k[c][1],k[c][2]);
+m.appendChild(p);this.cancelBtn=e;this.okButton=t;this.container=m},TemplatesDialog=function(b,f,l,d,t,u,E,c,e,g,k,m,p,v,x){function A(ea){Ja.innerHTML=mxUtils.htmlEntities(ea);Ja.style.display="block";setTimeout(function(){Ja.style.display="none"},4E3)}function y(){null!=n&&(n.style.fontWeight="normal",n.style.textDecoration="none",B=n,n=null)}function L(ea,na,pa,ca,fa,ra,ka){if(-1<ea.className.indexOf("geTempDlgRadioBtnActive"))return!1;ea.className+=" geTempDlgRadioBtnActive";P.querySelector(".geTempDlgRadioBtn[data-id="+
+ca+"]").className="geTempDlgRadioBtn "+(ka?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");P.querySelector("."+na).src="/images/"+pa+"-sel.svg";P.querySelector("."+fa).src="/images/"+ra+".svg";return!0}function N(ea,na,pa,ca){function fa(oa,ta){null==ka?(oa=/^https?:\/\//.test(oa)&&!b.editor.isCorsEnabledForUrl(oa)?PROXY_URL+"?url="+encodeURIComponent(oa):TEMPLATE_PATH+"/"+oa,mxUtils.get(oa,mxUtils.bind(this,function(La){200<=La.getStatus()&&299>=La.getStatus()&&(ka=La.getText());ta(ka)}))):ta(ka)}
+function ra(oa,ta,La){if(null!=oa&&mxUtils.isAncestorNode(document.body,na)&&(oa=mxUtils.parseXml(oa),oa=Editor.extractGraphModel(oa.documentElement,!0),null!=oa)){"mxfile"==oa.nodeName&&(oa=Editor.parseDiagramNode(oa.getElementsByTagName("diagram")[0]));var Sa=new mxCodec(oa.ownerDocument),Da=new mxGraphModel;Sa.decode(oa,Da);oa=Da.root.getChildAt(0).children||[];b.sidebar.createTooltip(na,oa,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!=ea.title?mxResources.get(ea.title,null,ea.title):null,!0,new mxPoint(ta,La),!0,null,!0);var Ha=document.createElement("div");Ha.className="geTempDlgDialogMask";P.appendChild(Ha);var Qa=b.sidebar.hideTooltip;b.sidebar.hideTooltip=function(){Ha&&(P.removeChild(Ha),Ha=null,Qa.apply(this,arguments),b.sidebar.hideTooltip=Qa)};mxEvent.addListener(Ha,"click",function(){b.sidebar.hideTooltip()})}}var ka=null;if(Pa||b.sidebar.currentElt==
+na)b.sidebar.hideTooltip();else{var la=function(oa){Pa&&b.sidebar.currentElt==na&&ra(oa,mxEvent.getClientX(ca),mxEvent.getClientY(ca));Pa=!1;pa.src="/images/icon-search.svg"};b.sidebar.hideTooltip();b.sidebar.currentElt=na;Pa=!0;pa.src="/images/aui-wait.gif";ea.isExt?e(ea,la,function(){A(mxResources.get("cantLoadPrev"));Pa=!1;pa.src="/images/icon-search.svg"}):fa(ea.url,la)}}function I(ea,na,pa){if(null!=K){for(var ca=K.className.split(" "),fa=0;fa<ca.length;fa++)if(-1<ca[fa].indexOf("Active")){ca.splice(fa,
+1);break}K.className=ca.join(" ")}null!=ea?(K=ea,K.className+=" "+na,R=pa,Ma.className="geTempDlgCreateBtn"):(R=K=null,Ma.className="geTempDlgCreateBtn geTempDlgBtnDisabled")}function q(ea,na){if(null!=R){var pa=function(la){ka.isExternal?e(ka,function(oa){ca(oa,la)},fa):ka.url?mxUtils.get(TEMPLATE_PATH+"/"+ka.url,mxUtils.bind(this,function(oa){200<=oa.getStatus()&&299>=oa.getStatus()?ca(oa.getText(),la):fa()})):ca(b.emptyDiagramXml,la)},ca=function(la,oa){x||b.hideDialog(!0);f(la,oa,ka,na)},fa=function(){A(mxResources.get("cannotLoad"));
+ra()},ra=function(){R=ka;Ma.className="geTempDlgCreateBtn";na&&(Na.className="geTempDlgOpenBtn")},ka=R;R=null;"boolean"!==typeof na&&(na=ka.isExternal&&m);1==ea?g(ka.url,ka):na?(Na.className="geTempDlgOpenBtn geTempDlgBtnDisabled geTempDlgBtnBusy",pa()):(Ma.className="geTempDlgCreateBtn geTempDlgBtnDisabled geTempDlgBtnBusy",ea=null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"),ea=new FilenameDialog(b,b.defaultFilename+".drawio",
+mxResources.get("ok"),pa,ea,function(la){var oa=null!=la&&0<la.length;return oa&&x?(pa(la),!1):oa},null,null,null,ra,v?null:[]),b.showDialog(ea.container,350,80,!0,!0),ea.init())}}function D(ea){Ma.innerHTML=mxUtils.htmlEntities(mxResources.get(da||ea?"create":"copy"));ea=ea?"none":"";m&&(Na.style.display=ea);for(var na=P.querySelectorAll(".geTempDlgLinkToDiagram"),pa=0;pa<na.length;pa++)na[pa].style.display=ea}function z(ea,na,pa,ca,fa){fa||(ma.innerText="",I(),T=ea,Y=ca);var ra=null;if(pa){ra=document.createElement("table");
+ra.className="geTempDlgDiagramsListGrid";var ka=document.createElement("tr"),la=document.createElement("th");la.style.width="50%";la.innerHTML=mxUtils.htmlEntities(mxResources.get("diagram"));ka.appendChild(la);la=document.createElement("th");la.style.width="25%";la.innerHTML=mxUtils.htmlEntities(mxResources.get("changedBy"));ka.appendChild(la);la=document.createElement("th");la.style.width="25%";la.innerHTML=mxUtils.htmlEntities(mxResources.get("lastModifiedOn"));ka.appendChild(la);ra.appendChild(ka);
+ma.appendChild(ra)}for(ka=0;ka<ea.length;ka++){ea[ka].isExternal=!na;var oa=ea[ka].url,ta=(la=mxUtils.htmlEntities(na?mxResources.get(ea[ka].title,null,ea[ka].title):ea[ka].title))||ea[ka].url,La=ea[ka].imgUrl,Sa=mxUtils.htmlEntities(ea[ka].changedBy||""),Da="";ea[ka].lastModifiedOn&&(Da=b.timeSince(new Date(ea[ka].lastModifiedOn)),null==Da&&(Da=mxResources.get("lessThanAMinute")),Da=mxUtils.htmlEntities(mxResources.get("timeAgo",[Da],"{1} ago")));La||(La=TEMPLATE_PATH+"/"+oa.substring(0,oa.length-
+4)+".png");oa=pa?50:15;null!=la&&la.length>oa&&(la=la.substring(0,oa)+"&hellip;");if(pa){var Ha=document.createElement("tr");La=document.createElement("td");var Qa=document.createElement("img");Qa.src="/images/icon-search.svg";Qa.className="geTempDlgDiagramListPreviewBtn";Qa.setAttribute("title",mxResources.get("preview"));fa||La.appendChild(Qa);ta=document.createElement("span");ta.className="geTempDlgDiagramTitle";ta.innerHTML=la;La.appendChild(ta);Ha.appendChild(La);La=document.createElement("td");
+La.innerHTML=Sa;Ha.appendChild(La);La=document.createElement("td");La.innerHTML=Da;Ha.appendChild(La);ra.appendChild(Ha);null==K&&(D(na),I(Ha,"geTempDlgDiagramsListGridActive",ea[ka]));(function(Ka,Ta,Ua){mxEvent.addListener(Ha,"click",function(){K!=Ta&&(D(na),I(Ta,"geTempDlgDiagramsListGridActive",Ka))});mxEvent.addListener(Ha,"dblclick",q);mxEvent.addListener(Qa,"click",function(Va){N(Ka,Ta,Ua,Va)})})(ea[ka],Ha,Qa)}else{var Oa=document.createElement("div");Oa.className="geTempDlgDiagramTile";Oa.setAttribute("title",
+ta);null==K&&(D(na),I(Oa,"geTempDlgDiagramTileActive",ea[ka]));Sa=document.createElement("div");Sa.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var Ra=document.createElement("img");Ra.style.display="none";(function(Ka,Ta,Ua){Ra.onload=function(){Ta.className="geTempDlgDiagramTileImg";Ka.style.display=""};Ra.onerror=function(){this.src!=Ua?this.src=Ua:Ta.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(Ra,Sa,La?La.replace(".drawio.xml","").replace(".drawio",
+"").replace(".xml",""):"");Ra.src=La;Sa.appendChild(Ra);Oa.appendChild(Sa);Sa=document.createElement("div");Sa.className="geTempDlgDiagramTileLbl";Sa.innerHTML=null!=la?la:"";Oa.appendChild(Sa);Qa=document.createElement("img");Qa.src="/images/icon-search.svg";Qa.className="geTempDlgDiagramPreviewBtn";Qa.setAttribute("title",mxResources.get("preview"));fa||Oa.appendChild(Qa);(function(Ka,Ta,Ua){mxEvent.addListener(Oa,"click",function(){K!=Ta&&(D(na),I(Ta,"geTempDlgDiagramTileActive",Ka))});mxEvent.addListener(Oa,
+"dblclick",q);mxEvent.addListener(Qa,"click",function(Va){N(Ka,Ta,Ua,Va)})})(ea[ka],Oa,Qa);ma.appendChild(Oa)}}for(var Xa in ca)ea=ca[Xa],0<ea.length&&(fa=document.createElement("div"),fa.className="geTempDlgImportCat",fa.innerHTML=mxResources.get(Xa,null,Xa),ma.appendChild(fa),z(ea,na,pa,null,!0))}function C(ea,na){sa.innerHTML="";I();var pa=Math.floor(sa.offsetWidth/150)-1;na=!na&&ea.length>pa?pa:ea.length;for(var ca=0;ca<na;ca++){var fa=ea[ca];fa.isCategory=!0;var ra=document.createElement("div"),
+ka=mxResources.get(fa.title);null==ka&&(ka=fa.title.substring(0,1).toUpperCase()+fa.title.substring(1));ra.className="geTempDlgNewDiagramCatItem";ra.setAttribute("title",ka);ka=mxUtils.htmlEntities(ka);15<ka.length&&(ka=ka.substring(0,15)+"&hellip;");null==K&&(D(!0),I(ra,"geTempDlgNewDiagramCatItemActive",fa));var la=document.createElement("div");la.className="geTempDlgNewDiagramCatItemImg";var oa=document.createElement("img");oa.src=NEW_DIAGRAM_CATS_PATH+"/"+fa.img;la.appendChild(oa);ra.appendChild(la);
+la=document.createElement("div");la.className="geTempDlgNewDiagramCatItemLbl";la.innerHTML=ka;ra.appendChild(la);sa.appendChild(ra);(function(ta,La){mxEvent.addListener(ra,"click",function(){K!=La&&(D(!0),I(La,"geTempDlgNewDiagramCatItemActive",ta))});mxEvent.addListener(ra,"dblclick",q)})(fa,ra)}ra=document.createElement("div");ra.className="geTempDlgNewDiagramCatItem";ka=mxResources.get("showAllTemps");ra.setAttribute("title",ka);la=document.createElement("div");la.className="geTempDlgNewDiagramCatItemImg";
+la.innerHTML="...";la.style.fontSize="32px";ra.appendChild(la);la=document.createElement("div");la.className="geTempDlgNewDiagramCatItemLbl";la.innerHTML=ka;ra.appendChild(la);sa.appendChild(ra);mxEvent.addListener(ra,"click",function(){function ta(){var Sa=La.querySelector(".geTemplateDrawioCatLink");null!=Sa?Sa.click():setTimeout(ta,200)}da=!0;var La=P.querySelector(".geTemplatesList");La.style.display="block";Ca.style.width="";za.style.display="";za.value="";ba=null;ta()});ha.style.display=ea.length<=
+pa?"none":""}function G(ea,na,pa){function ca(Ra,Xa){var Ka=mxResources.get(Ra);null==Ka&&(Ka=Ra.substring(0,1).toUpperCase()+Ra.substring(1));Ra=Ka+" ("+Xa.length+")";var Ta=Ka=mxUtils.htmlEntities(Ka);15<Ka.length&&(Ka=Ka.substring(0,15)+"&hellip;");return{lbl:Ka+" ("+Xa.length+")",fullLbl:Ra,lblOnly:Ta}}function fa(Ra,Xa,Ka,Ta,Ua){mxEvent.addListener(Ka,"click",function(){n!=Ka&&(null!=n?(n.style.fontWeight="normal",n.style.textDecoration="none"):(Ga.style.display="none",Ba.style.minHeight="100%"),
+n=Ka,n.style.fontWeight="bold",n.style.textDecoration="underline",Ca.scrollTop=0,V&&(W=!0),Z.innerHTML=Xa,Fa.style.display="none",z(Ua?na[Ra]:Ta?Ia[Ra][Ta]:ea[Ra],Ua?!1:!0))})}var ra=P.querySelector(".geTemplatesList");if(0<pa){pa=document.createElement("div");pa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(pa,mxResources.get("custom"));ra.appendChild(pa);for(var ka in na){pa=document.createElement("div");var la=na[ka];
+la=ca(ka,la);pa.className="geTemplateCatLink";pa.setAttribute("title",la.fullLbl);pa.innerHTML=la.lbl;ra.appendChild(pa);fa(ka,la.lblOnly,pa,null,!0)}pa=document.createElement("div");pa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(pa,"draw.io");ra.appendChild(pa)}for(ka in ea){var oa=Ia[ka],ta=pa=document.createElement(oa?"ul":"div");la=ea[ka];la=ca(ka,la);if(null!=oa){var La=document.createElement("li"),Sa=document.createElement("div");
+Sa.className="geTempTreeCaret geTemplateCatLink geTemplateDrawioCatLink";Sa.style.padding="0";Sa.setAttribute("title",la.fullLbl);Sa.innerHTML=la.lbl;ta=Sa;La.appendChild(Sa);var Da=document.createElement("ul");Da.className="geTempTreeNested";Da.style.visibility="hidden";for(var Ha in oa){var Qa=document.createElement("li"),Oa=ca(Ha,oa[Ha]);Qa.setAttribute("title",Oa.fullLbl);Qa.innerHTML=Oa.lbl;Qa.className="geTemplateCatLink";Qa.style.padding="0";Qa.style.margin="0";fa(ka,Oa.lblOnly,Qa,Ha);Da.appendChild(Qa)}La.appendChild(Da);
+pa.className="geTempTree";pa.appendChild(La);(function(Ra,Xa){mxEvent.addListener(Xa,"click",function(){for(var Ka=Ra.querySelectorAll("li"),Ta=0;Ta<Ka.length;Ta++)Ka[Ta].style.margin="";Ra.style.visibility="visible";Ra.classList.toggle("geTempTreeActive");Ra.classList.toggle("geTempTreeNested")&&setTimeout(function(){for(var Ua=0;Ua<Ka.length;Ua++)Ka[Ua].style.margin="0";Ra.style.visibility="hidden"},250);Xa.classList.toggle("geTempTreeCaret-down")})})(Da,Sa)}else pa.className="geTemplateCatLink geTemplateDrawioCatLink",
+pa.setAttribute("title",la.fullLbl),pa.innerHTML=la.lbl;ra.appendChild(pa);fa(ka,la.lblOnly,ta)}}function H(){mxUtils.get(d,function(ea){if(!ya){ya=!0;ea=ea.getXml().documentElement.firstChild;for(var na={};null!=ea;){if("undefined"!==typeof ea.getAttribute)if("clibs"==ea.nodeName){for(var pa=ea.getAttribute("name"),ca=ea.getElementsByTagName("add"),fa=[],ra=0;ra<ca.length;ra++)fa.push(encodeURIComponent(mxUtils.getTextContent(ca[ra])));null!=pa&&0<fa.length&&(na[pa]=fa.join(";"))}else if(fa=ea.getAttribute("url"),
+null!=fa){ca=ea.getAttribute("section");pa=ea.getAttribute("subsection");if(null==ca&&(ra=fa.indexOf("/"),ca=fa.substring(0,ra),null==pa)){var ka=fa.indexOf("/",ra+1);-1<ka&&(pa=fa.substring(ra+1,ka))}ra=wa[ca];null==ra&&(ua++,ra=[],wa[ca]=ra);fa=ea.getAttribute("clibs");null!=na[fa]&&(fa=na[fa]);fa={url:ea.getAttribute("url"),libs:ea.getAttribute("libs"),title:ea.getAttribute("title")||ea.getAttribute("name"),preview:ea.getAttribute("preview"),clibs:fa,tags:ea.getAttribute("tags")};ra.push(fa);null!=
+pa&&(ra=Ia[ca],null==ra&&(ra={},Ia[ca]=ra),ca=ra[pa],null==ca&&(ca=[],ra[pa]=ca),ca.push(fa))}ea=ea.nextSibling}G(wa,ia,va)}})}function M(ea){E&&(Ca.scrollTop=0,ma.innerText="",Ea.spin(ma),W=!1,V=!0,Z.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag")),ba=null,E(qa,function(){A(mxResources.get("cannotLoad"));qa([])},ea?null:u))}function F(ea){if(""==ea)null!=B&&(B.click(),B=null);else{if(null==TemplatesDialog.tagsList[d]){var na={};for(ta in wa)for(var pa=wa[ta],ca=0;ca<pa.length;ca++){var fa=
+pa[ca];if(null!=fa.tags)for(var ra=fa.tags.toLowerCase().split(";"),ka=0;ka<ra.length;ka++)null==na[ra[ka]]&&(na[ra[ka]]=[]),na[ra[ka]].push(fa)}TemplatesDialog.tagsList[d]=na}var la=ea.toLowerCase().split(" ");na=TemplatesDialog.tagsList[d];if(0<va&&null==na.__tagsList__){for(ta in ia)for(pa=ia[ta],ca=0;ca<pa.length;ca++)for(fa=pa[ca],ra=fa.title.split(" "),ra.push(ta),ka=0;ka<ra.length;ka++){var oa=ra[ka].toLowerCase();null==na[oa]&&(na[oa]=[]);na[oa].push(fa)}na.__tagsList__=!0}var ta=[];pa={};
+for(ca=ra=0;ca<la.length;ca++)if(0<la[ca].length){oa=na[la[ca]];var La={};ta=[];if(null!=oa)for(ka=0;ka<oa.length;ka++)fa=oa[ka],0==ra==(null==pa[fa.url])&&(La[fa.url]=!0,ta.push(fa));pa=La;ra++}0==ta.length?Z.innerHTML=mxResources.get("noResultsFor",[ea]):z(ta,!0)}}function J(ea){if(ba!=ea||U!=aa)y(),Ca.scrollTop=0,ma.innerText="",Z.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults"))+' "'+mxUtils.htmlEntities(ea)+'"',xa=null,da?F(ea):c&&(ea?(Ea.spin(ma),W=!1,V=!0,c(ea,qa,function(){A(mxResources.get("searchFailed"));
+qa([])},U?null:u)):M(U)),ba=ea,aa=U}function Q(ea){null!=xa&&clearTimeout(xa);13==ea.keyCode?J(za.value):xa=setTimeout(function(){J(za.value)},1E3)}var X='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" '+(c?"":'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>'+
-(p?'<span class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramHint">'+mxResources.get("linkToDiagramHint")+'</span><button class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramBtn">'+mxResources.get("linkToDiagram")+"</button>":"")+(m?'<div class="geTempDlgOpenBtn">'+mxResources.get("open")+"</div>":"")+'<div class="geTempDlgCreateBtn">'+mxResources.get("create")+'</div><div class="geTempDlgCancelBtn">'+mxResources.get("cancel")+"</div></div>",O=document.createElement("div");O.innerHTML=X;O.className=
-"geTemplateDlg";this.container=O;d=null!=d?d:TEMPLATE_PATH+"/index.xml";t=null!=t?t:NEW_DIAGRAM_CATS_PATH+"/index.xml";var W=!1,U=!1,n=null,B=null,K=null,Q=null,P=!1,T=!0,V=!1,S=[],Y=null,ca,aa,da=!1,ja=O.querySelector(".geTempDlgShowAllBtn"),ha=O.querySelector(".geTempDlgDiagramsTiles"),Z=O.querySelector(".geTempDlgDiagramsListTitle"),Da=O.querySelector(".geTempDlgDiagramsListBtns"),Ga=O.querySelector(".geTempDlgContent"),Ba=O.querySelector(".geTempDlgDiagramsList"),Ha=O.querySelector(".geTempDlgNewDiagramCat"),
-pa=O.querySelector(".geTempDlgNewDiagramCatList"),Na=O.querySelector(".geTempDlgCreateBtn"),La=O.querySelector(".geTempDlgOpenBtn"),ya=O.querySelector(".geTempDlgSearchBox"),Ja=O.querySelector(".geTempDlgErrMsg"),Fa=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(O.querySelector(".geTempDlgBack"),"click",function(){y();da=!1;O.querySelector(".geTemplatesList").style.display="none";Ga.style.width=
-"100%";Ha.style.display="";Ba.style.minHeight="calc(100% - 280px)";ya.style.display=c?"":"none";ya.value="";ca=null;H(T)});mxEvent.addListener(O.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){L(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(T=!0,null==ca?H(T):I(ca))});mxEvent.addListener(O.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){L(this,"geTempDlgMyDiagramsBtnImg",
-"my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(T=!1,null==ca?H(T):I(ca))});mxEvent.addListener(O.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){L(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(V=!0,A(S,!1,V,Y))});mxEvent.addListener(O.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){L(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(V=!1,A(S,!1,V,Y))});
-var Pa=!1;mxEvent.addListener(ja,"click",function(){P?(Ha.style.height="280px",pa.style.height="190px",ja.innerHTML=mxUtils.htmlEntities(mxResources.get("showMore")),C(wa)):(Ha.style.height="440px",pa.style.height="355px",ja.innerHTML=mxUtils.htmlEntities(mxResources.get("showLess")),C(wa,!0));P=!P});var xa=!1,za=!1,ua={},Aa={},ea={},wa=[],ta=1,sa=0;null!=k?k(function(ia,ma){ea=ia;sa=ma;M()},M):M();mxUtils.get(t,function(ia){if(!za){za=!0;for(ia=ia.getXml().documentElement.firstChild;null!=ia;)"undefined"!==
-typeof ia.getAttribute&&null!=ia.getAttribute("title")&&wa.push({img:ia.getAttribute("img"),libs:ia.getAttribute("libs"),clibs:ia.getAttribute("clibs"),title:ia.getAttribute("title")}),ia=ia.nextSibling;C(wa)}});var ra=function(ia,ma,ba){Da.style.display="";Fa.stop();W=!1;if(U)U=!1;else if(ma)ha.innerHTML=ma;else{ba=ba||{};ma=0;for(var fa in ba)ma+=ba[fa].length;0==ia.length&&0==ma?ha.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams")):A(ia,!1,V,0==ma?null:ba)}};H(T);var va=null;mxEvent.addListener(ya,
-"keyup",R);mxEvent.addListener(ya,"search",R);mxEvent.addListener(ya,"input",R);mxEvent.addListener(Na,"click",function(ia){q(!1,!1)});m&&mxEvent.addListener(La,"click",function(ia){q(!1,!0)});p&&mxEvent.addListener(O.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(ia){q(!0)});mxEvent.addListener(O.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=l&&l();x||b.hideDialog(!0)})};TemplatesDialog.tagsList={};
+(p?'<span class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramHint">'+mxResources.get("linkToDiagramHint")+'</span><button class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramBtn">'+mxResources.get("linkToDiagram")+"</button>":"")+(m?'<div class="geTempDlgOpenBtn">'+mxResources.get("open")+"</div>":"")+'<div class="geTempDlgCreateBtn">'+mxResources.get("create")+'</div><div class="geTempDlgCancelBtn">'+mxResources.get("cancel")+"</div></div>",P=document.createElement("div");P.innerHTML=X;P.className=
+"geTemplateDlg";this.container=P;d=null!=d?d:TEMPLATE_PATH+"/index.xml";t=null!=t?t:NEW_DIAGRAM_CATS_PATH+"/index.xml";var V=!1,W=!1,n=null,B=null,K=null,R=null,O=!1,U=!0,S=!1,T=[],Y=null,ba,aa,da=!1,ha=P.querySelector(".geTempDlgShowAllBtn"),ma=P.querySelector(".geTempDlgDiagramsTiles"),Z=P.querySelector(".geTempDlgDiagramsListTitle"),Fa=P.querySelector(".geTempDlgDiagramsListBtns"),Ca=P.querySelector(".geTempDlgContent"),Ba=P.querySelector(".geTempDlgDiagramsList"),Ga=P.querySelector(".geTempDlgNewDiagramCat"),
+sa=P.querySelector(".geTempDlgNewDiagramCatList"),Ma=P.querySelector(".geTempDlgCreateBtn"),Na=P.querySelector(".geTempDlgOpenBtn"),za=P.querySelector(".geTempDlgSearchBox"),Ja=P.querySelector(".geTempDlgErrMsg"),Ea=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(P.querySelector(".geTempDlgBack"),"click",function(){y();da=!1;P.querySelector(".geTemplatesList").style.display="none";Ca.style.width=
+"100%";Ga.style.display="";Ba.style.minHeight="calc(100% - 280px)";za.style.display=c?"":"none";za.value="";ba=null;M(U)});mxEvent.addListener(P.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){L(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(U=!0,null==ba?M(U):J(ba))});mxEvent.addListener(P.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){L(this,"geTempDlgMyDiagramsBtnImg",
+"my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(U=!1,null==ba?M(U):J(ba))});mxEvent.addListener(P.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){L(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(S=!0,z(T,!1,S,Y))});mxEvent.addListener(P.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){L(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(S=!1,z(T,!1,S,Y))});
+var Pa=!1;mxEvent.addListener(ha,"click",function(){O?(Ga.style.height="280px",sa.style.height="190px",ha.innerHTML=mxUtils.htmlEntities(mxResources.get("showMore")),C(ja)):(Ga.style.height="440px",sa.style.height="355px",ha.innerHTML=mxUtils.htmlEntities(mxResources.get("showLess")),C(ja,!0));O=!O});var ya=!1,Aa=!1,wa={},Ia={},ia={},ja=[],ua=1,va=0;null!=k?k(function(ea,na){ia=ea;va=na;H()},H):H();mxUtils.get(t,function(ea){if(!Aa){Aa=!0;for(ea=ea.getXml().documentElement.firstChild;null!=ea;)"undefined"!==
+typeof ea.getAttribute&&null!=ea.getAttribute("title")&&ja.push({img:ea.getAttribute("img"),libs:ea.getAttribute("libs"),clibs:ea.getAttribute("clibs"),title:ea.getAttribute("title")}),ea=ea.nextSibling;C(ja)}});var qa=function(ea,na,pa){Fa.style.display="";Ea.stop();V=!1;if(W)W=!1;else if(na)ma.innerHTML=na;else{pa=pa||{};na=0;for(var ca in pa)na+=pa[ca].length;0==ea.length&&0==na?ma.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams")):z(ea,!1,S,0==na?null:pa)}};M(U);var xa=null;mxEvent.addListener(za,
+"keyup",Q);mxEvent.addListener(za,"search",Q);mxEvent.addListener(za,"input",Q);mxEvent.addListener(Ma,"click",function(ea){q(!1,!1)});m&&mxEvent.addListener(Na,"click",function(ea){q(!1,!0)});p&&mxEvent.addListener(P.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(ea){q(!0)});mxEvent.addListener(P.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=l&&l();x||b.hideDialog(!0)})};TemplatesDialog.tagsList={};
var BtnDialog=function(b,f,l,d){var t=document.createElement("div");t.style.textAlign="center";var u=document.createElement("p");u.style.fontSize="16pt";u.style.padding="0px";u.style.margin="0px";u.style.color="gray";mxUtils.write(u,mxResources.get("done"));var E="Unknown",c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("align","absmiddle");c.style.marginRight="10px";f==b.drive?(E=mxResources.get("googleDrive"),c.src=IMAGE_PATH+"/google-drive-logo-white.svg"):f==b.dropbox?
(E=mxResources.get("dropbox"),c.src=IMAGE_PATH+"/dropbox-logo-white.svg"):f==b.oneDrive?(E=mxResources.get("oneDrive"),c.src=IMAGE_PATH+"/onedrive-logo-white.svg"):f==b.gitHub?(E=mxResources.get("github"),c.src=IMAGE_PATH+"/github-logo-white.svg"):f==b.gitLab?(E=mxResources.get("gitlab"),c.src=IMAGE_PATH+"/gitlab-logo.svg"):f==b.trello&&(E=mxResources.get("trello"),c.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizedIn",[E],"You are now authorized in {1}"));
-l=mxUtils.button(l,d);l.insertBefore(c,l.firstChild);l.style.marginTop="6px";l.className="geBigButton";l.style.fontSize="18px";l.style.padding="14px";t.appendChild(u);t.appendChild(b);t.appendChild(l);this.container=t},FontDialog=function(b,f,l,d,t){function u(J){this.style.border="";13==J.keyCode&&N.click()}var E=document.createElement("table"),c=document.createElement("tbody");E.style.marginTop="8px";var e=document.createElement("tr");var g=document.createElement("td");g.colSpan=2;g.style.whiteSpace=
+l=mxUtils.button(l,d);l.insertBefore(c,l.firstChild);l.style.marginTop="6px";l.className="geBigButton";l.style.fontSize="18px";l.style.padding="14px";t.appendChild(u);t.appendChild(b);t.appendChild(l);this.container=t},FontDialog=function(b,f,l,d,t){function u(I){this.style.border="";13==I.keyCode&&N.click()}var E=document.createElement("table"),c=document.createElement("tbody");E.style.marginTop="8px";var e=document.createElement("tr");var g=document.createElement("td");g.colSpan=2;g.style.whiteSpace=
"nowrap";g.style.fontSize="10pt";g.style.fontWeight="bold";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-bottom:8px;";k.setAttribute("value","sysfonts");k.setAttribute("type","radio");k.setAttribute("name","current-fontdialog");k.setAttribute("id","fontdialog-sysfonts");g.appendChild(k);var m=document.createElement("label");m.setAttribute("for","fontdialog-sysfonts");mxUtils.write(m,mxResources.get("sysFonts",null,"System Fonts"));g.appendChild(m);e.appendChild(g);
c.appendChild(e);e=document.createElement("tr");g=document.createElement("td");g.style.whiteSpace="nowrap";g.style.fontSize="10pt";g.style.width="120px";g.style.paddingLeft="15px";mxUtils.write(g,mxResources.get("fontname",null,"Font Name")+":");e.appendChild(g);var p=document.createElement("input");"s"==d&&p.setAttribute("value",f);p.style.marginLeft="4px";p.style.width="250px";p.className="dlg_fontName_s";g=document.createElement("td");g.appendChild(p);e.appendChild(g);c.appendChild(e);e=document.createElement("tr");
g=document.createElement("td");g.colSpan=2;g.style.whiteSpace="nowrap";g.style.fontSize="10pt";g.style.fontWeight="bold";var v=document.createElement("input");v.style.cssText="margin-right:8px;margin-bottom:8px;";v.setAttribute("value","googlefonts");v.setAttribute("type","radio");v.setAttribute("name","current-fontdialog");v.setAttribute("id","fontdialog-googlefonts");g.appendChild(v);m=document.createElement("label");m.setAttribute("for","fontdialog-googlefonts");mxUtils.write(m,mxResources.get("googleFonts",
null,"Google Fonts"));g.appendChild(m);mxClient.IS_CHROMEAPP||b.isOffline()&&!EditorUi.isElectronApp||(m=b.menus.createHelpLink("https://fonts.google.com/"),m.getElementsByTagName("img")[0].setAttribute("valign","middle"),g.appendChild(m));e.appendChild(g);c.appendChild(e);e=document.createElement("tr");g=document.createElement("td");g.style.whiteSpace="nowrap";g.style.fontSize="10pt";g.style.width="120px";g.style.paddingLeft="15px";mxUtils.write(g,mxResources.get("fontname",null,"Font Name")+":");
-e.appendChild(g);var x=document.createElement("input");"g"==d&&x.setAttribute("value",f);x.style.marginLeft="4px";x.style.width="250px";x.className="dlg_fontName_g";g=document.createElement("td");g.appendChild(x);e.appendChild(g);c.appendChild(e);e=document.createElement("tr");g=document.createElement("td");g.colSpan=2;g.style.whiteSpace="nowrap";g.style.fontSize="10pt";g.style.fontWeight="bold";var z=document.createElement("input");z.style.cssText="margin-right:8px;margin-bottom:8px;";z.setAttribute("value",
-"webfonts");z.setAttribute("type","radio");z.setAttribute("name","current-fontdialog");z.setAttribute("id","fontdialog-webfonts");g.appendChild(z);m=document.createElement("label");m.setAttribute("for","fontdialog-webfonts");mxUtils.write(m,mxResources.get("webfonts",null,"Web Fonts"));g.appendChild(m);e.appendChild(g);Editor.enableWebFonts&&c.appendChild(e);e=document.createElement("tr");g=document.createElement("td");g.style.whiteSpace="nowrap";g.style.fontSize="10pt";g.style.width="120px";g.style.paddingLeft=
+e.appendChild(g);var x=document.createElement("input");"g"==d&&x.setAttribute("value",f);x.style.marginLeft="4px";x.style.width="250px";x.className="dlg_fontName_g";g=document.createElement("td");g.appendChild(x);e.appendChild(g);c.appendChild(e);e=document.createElement("tr");g=document.createElement("td");g.colSpan=2;g.style.whiteSpace="nowrap";g.style.fontSize="10pt";g.style.fontWeight="bold";var A=document.createElement("input");A.style.cssText="margin-right:8px;margin-bottom:8px;";A.setAttribute("value",
+"webfonts");A.setAttribute("type","radio");A.setAttribute("name","current-fontdialog");A.setAttribute("id","fontdialog-webfonts");g.appendChild(A);m=document.createElement("label");m.setAttribute("for","fontdialog-webfonts");mxUtils.write(m,mxResources.get("webfonts",null,"Web Fonts"));g.appendChild(m);e.appendChild(g);Editor.enableWebFonts&&c.appendChild(e);e=document.createElement("tr");g=document.createElement("td");g.style.whiteSpace="nowrap";g.style.fontSize="10pt";g.style.width="120px";g.style.paddingLeft=
"15px";mxUtils.write(g,mxResources.get("fontname",null,"Font Name")+":");e.appendChild(g);var y=document.createElement("input");"w"==d&&(Editor.enableWebFonts?y.setAttribute("value",f):p.setAttribute("value",f));y.style.marginLeft="4px";y.style.width="250px";y.className="dlg_fontName_w";g=document.createElement("td");g.appendChild(y);e.appendChild(g);Editor.enableWebFonts&&c.appendChild(e);e=document.createElement("tr");g=document.createElement("td");g.style.whiteSpace="nowrap";g.style.fontSize="10pt";
-g.style.width="120px";g.style.paddingLeft="15px";mxUtils.write(g,mxResources.get("fontUrl",null,"Font URL")+":");e.appendChild(g);var L=document.createElement("input");L.setAttribute("value",l||"");L.style.marginLeft="4px";L.style.width="250px";L.className="dlg_fontUrl";g=document.createElement("td");g.appendChild(L);e.appendChild(g);Editor.enableWebFonts&&c.appendChild(e);this.init=function(){var J=p;"g"==d?J=x:"w"==d&&Editor.enableWebFonts&&(J=y);J.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?
-J.select():document.execCommand("selectAll",!1,null)};e=document.createElement("tr");g=document.createElement("td");g.colSpan=2;g.style.paddingTop="20px";g.style.whiteSpace="nowrap";g.setAttribute("align","right");b.isOffline()||(f=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/blog/external-fonts")}),f.className="geBtn",g.appendChild(f));f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();t()});f.className="geBtn";b.editor.cancelFirst&&g.appendChild(f);
-var N=mxUtils.button(mxResources.get("apply"),function(){if(k.checked){var J=p.value;var q="s"}else if(v.checked){J=x.value;var D=Editor.GOOGLE_FONTS+encodeURIComponent(J).replace(/%20/g,"+");q="g"}else z.checked&&(J=y.value,D=L.value,q="w");var A=D;var C=q,G=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null==J||0==J.length?(E.querySelector(".dlg_fontName_"+C).style.border="1px solid red",A=!1):"w"!=C||G.test(A)?A=!0:(E.querySelector(".dlg_fontUrl").style.border=
-"1px solid red",A=!1);A&&(t(J,D,q),b.hideDialog())});N.className="geBtn gePrimaryBtn";mxEvent.addListener(p,"keypress",u);mxEvent.addListener(x,"keypress",u);mxEvent.addListener(y,"keypress",u);mxEvent.addListener(L,"keypress",u);mxEvent.addListener(p,"focus",function(){k.setAttribute("checked","checked");k.checked=!0});mxEvent.addListener(x,"focus",function(){v.setAttribute("checked","checked");v.checked=!0});mxEvent.addListener(y,"focus",function(){z.setAttribute("checked","checked");z.checked=
-!0});mxEvent.addListener(L,"focus",function(){z.setAttribute("checked","checked");z.checked=!0});g.appendChild(N);b.editor.cancelFirst||g.appendChild(f);e.appendChild(g);c.appendChild(e);E.appendChild(c);this.container=E};
+g.style.width="120px";g.style.paddingLeft="15px";mxUtils.write(g,mxResources.get("fontUrl",null,"Font URL")+":");e.appendChild(g);var L=document.createElement("input");L.setAttribute("value",l||"");L.style.marginLeft="4px";L.style.width="250px";L.className="dlg_fontUrl";g=document.createElement("td");g.appendChild(L);e.appendChild(g);Editor.enableWebFonts&&c.appendChild(e);this.init=function(){var I=p;"g"==d?I=x:"w"==d&&Editor.enableWebFonts&&(I=y);I.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?
+I.select():document.execCommand("selectAll",!1,null)};e=document.createElement("tr");g=document.createElement("td");g.colSpan=2;g.style.paddingTop="20px";g.style.whiteSpace="nowrap";g.setAttribute("align","right");b.isOffline()||(f=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/blog/external-fonts")}),f.className="geBtn",g.appendChild(f));f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();t()});f.className="geBtn";b.editor.cancelFirst&&g.appendChild(f);
+var N=mxUtils.button(mxResources.get("apply"),function(){if(k.checked){var I=p.value;var q="s"}else if(v.checked){I=x.value;var D=Editor.GOOGLE_FONTS+encodeURIComponent(I).replace(/%20/g,"+");q="g"}else A.checked&&(I=y.value,D=L.value,q="w");var z=D;var C=q,G=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null==I||0==I.length?(E.querySelector(".dlg_fontName_"+C).style.border="1px solid red",z=!1):"w"!=C||G.test(z)?z=!0:(E.querySelector(".dlg_fontUrl").style.border=
+"1px solid red",z=!1);z&&(t(I,D,q),b.hideDialog())});N.className="geBtn gePrimaryBtn";mxEvent.addListener(p,"keypress",u);mxEvent.addListener(x,"keypress",u);mxEvent.addListener(y,"keypress",u);mxEvent.addListener(L,"keypress",u);mxEvent.addListener(p,"focus",function(){k.setAttribute("checked","checked");k.checked=!0});mxEvent.addListener(x,"focus",function(){v.setAttribute("checked","checked");v.checked=!0});mxEvent.addListener(y,"focus",function(){A.setAttribute("checked","checked");A.checked=
+!0});mxEvent.addListener(L,"focus",function(){A.setAttribute("checked","checked");A.checked=!0});g.appendChild(N);b.editor.cancelFirst||g.appendChild(f);e.appendChild(g);c.appendChild(e);E.appendChild(c);this.container=E};
function AspectDialog(b,f,l,d,t){this.aspect={pageId:f||(b.pages?b.pages[0].getId():null),layerIds:l||[]};f=document.createElement("div");var u=document.createElement("h5");u.style.margin="0 0 10px";mxUtils.write(u,mxResources.get("pages"));f.appendChild(u);l=document.createElement("div");l.className="geAspectDlgList";f.appendChild(l);u=document.createElement("h5");u.style.margin="0 0 10px";mxUtils.write(u,mxResources.get("layers"));f.appendChild(u);u=document.createElement("div");u.className="geAspectDlgList";
f.appendChild(u);this.pagesContainer=l;this.layersContainer=u;this.ui=b;l=document.createElement("div");l.style.marginTop="16px";l.style.textAlign="center";u=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=t&&t()});u.className="geBtn";b.editor.cancelFirst&&l.appendChild(u);var E=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){b.hideDialog();d({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));l.appendChild(E);E.className="geBtn gePrimaryBtn";
b.editor.cancelFirst||l.appendChild(u);E.setAttribute("disabled","disabled");this.okBtn=E;f.appendChild(l);this.container=f}AspectDialog.prototype.init=function(){var b=this.ui.getFileData(!0);if(this.ui.pages)for(b=0;b<this.ui.pages.length;b++){var f=this.ui.updatePageRoot(this.ui.pages[b]);this.createPageItem(f.getId(),f.getName(),f.node)}else this.createPageItem("1","Page-1",mxUtils.parseXml(b).documentElement)};
@@ -11419,22 +11415,22 @@ k&&(m.setAttribute("checked","checked"),m.defaultChecked=!0);c=document.createEl
c.style.width="120px";mxUtils.write(c,mxResources.get("realtimeCollaboration")+":");t.appendChild(c);var p=document.createElement("input");p.setAttribute("type","checkbox");var v=d.isRealtimeEnabled();if(v="disabled"!=b.drive.getCustomProperty(d.desc,"collaboration"))p.setAttribute("checked","checked"),p.defaultChecked=!0;prevApply=u;u=function(){prevApply();b.hideDialog();p.checked!=v&&b.spinner.spin(document.body,mxResources.get("updatingDocument"))&&d.setRealtimeEnabled(p.checked,mxUtils.bind(this,
function(x){b.spinner.stop()}),mxUtils.bind(this,function(x){b.spinner.stop();b.showError(mxResources.get("error"),null!=x&&null!=x.error?x.error.message:mxResources.get("unknownError"),mxResources.get("ok"))}))};this.init=null!=this.init?this.init:function(){p.focus()};c=document.createElement("td");c.style.whiteSpace="nowrap";c.appendChild(p);c.appendChild(b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/2672"));t.appendChild(c);l.appendChild(t)}this.init=null!=this.init?this.init:
function(){};u=mxUtils.button(mxResources.get("apply"),u);u.className="geBtn gePrimaryBtn";t=document.createElement("tr");c=document.createElement("td");c.colSpan=2;c.style.paddingTop="20px";c.style.whiteSpace="nowrap";c.setAttribute("align","center");E=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});E.className="geBtn";b.editor.cancelFirst&&c.appendChild(E);c.appendChild(u);b.editor.cancelFirst||c.appendChild(E);t.appendChild(c);l.appendChild(t);f.appendChild(l);this.container=
-f},ConnectionPointsDialog=function(b,f){function l(){null!=t&&t.destroy()}var d=document.createElement("div");d.style.userSelect="none";var t=null;this.init=function(){function u(F,I){F=new mxCell("",new mxGeometry(F,I,6,6),"shape=mxgraph.basic.x;fillColor=#29b6f2;strokeColor=#29b6f2;points=[];rotatable=0;resizable=0;connectable=0;editable=0;");F.vertex=!0;F.cp=!0;return m.addCell(F)}function E(F){F=m.getSelectionCells();m.deleteCells(F)}function c(){var F=parseInt(C.value)||0;F=0>F?0:100<F?100:F;
-C.value=F;var I=parseInt(M.value)||0;I=0>I?0:100<I?100:I;M.value=I;var R=parseInt(G.value)||0,X=parseInt(H.value)||0;F=m.getConnectionPoint(x,new mxConnectionConstraint(new mxPoint(F/100,I/100),!1,null,R,X));I=m.getSelectionCell();if(null!=I){R=I.geometry.clone();X=m.view.scale;var O=m.view.translate;R.x=(F.x-3*X)/X-O.x;R.y=(F.y-3*X)/X-O.y;m.model.setGeometry(I,R)}}function e(F){var I=0,R=0,X=p.geometry,O=mxUtils.format((F.geometry.x+3-X.x)/X.width);F=mxUtils.format((F.geometry.y+3-X.y)/X.height);
-0>O?(I=O*X.width,O=0):1<O&&(I=(O-1)*X.width,O=1);0>F?(R=F*X.height,F=0):1<F&&(R=(F-1)*X.height,F=1);return{x:O,y:F,dx:parseInt(I),dy:parseInt(R)}}function g(){if(1==m.getSelectionCount()){var F=m.getSelectionCell();F=e(F);C.value=100*F.x;M.value=100*F.y;G.value=F.dx;H.value=F.dy;A.style.visibility=""}else A.style.visibility="hidden"}var k=document.createElement("div");k.style.width="350px";k.style.height="350px";k.style.overflow="hidden";k.style.border="1px solid lightGray";k.style.boxSizing="border-box";
-mxEvent.disableContextMenu(k);d.appendChild(k);var m=new Graph(k);m.autoExtend=!1;m.autoScroll=!1;m.setGridEnabled(!1);m.setEnabled(!0);m.setPanning(!0);m.setConnectable(!1);m.setTooltips(!1);m.minFitScale=null;m.maxFitScale=null;m.centerZoom=!0;m.maxFitScale=2;k=f.geometry;var p=new mxCell(f.value,new mxGeometry(0,0,k.width,k.height),f.style+";rotatable=0;resizable=0;connectable=0;editable=0;movable=0;");p.vertex=!0;m.addCell(p);m.dblClick=function(F,I){if(null!=I&&I!=p)m.setSelectionCell(I);else{I=
-mxUtils.convertPoint(m.container,mxEvent.getClientX(F),mxEvent.getClientY(F));mxEvent.consume(F);F=m.view.scale;var R=m.view.translate;m.setSelectionCell(u((I.x-3*F)/F-R.x,(I.y-3*F)/F-R.y))}};t=new mxKeyHandler(m);t.bindKey(46,E);t.bindKey(8,E);m.getRubberband().isForceRubberbandEvent=function(F){return 0==F.evt.button&&(null==F.getCell()||F.getCell()==p)};m.panningHandler.isForcePanningEvent=function(F){return 2==F.evt.button};var v=m.isCellSelectable;m.isCellSelectable=function(F){return F==p?!1:
-v.apply(this,arguments)};m.getLinkForCell=function(){return null};var x=m.view.getState(p);k=m.getAllConnectionConstraints(x);for(var z=0;null!=k&&z<k.length;z++){var y=m.getConnectionPoint(x,k[z]);u(y.x-3,y.y-3)}m.fit(8);m.center();z=mxUtils.button("",function(){m.zoomIn()});z.className="geSprite geSprite-zoomin";z.setAttribute("title",mxResources.get("zoomIn"));z.style.position="relative";z.style.outline="none";z.style.border="none";z.style.margin="2px";z.style.cursor="pointer";z.style.top=mxClient.IS_FF?
-"-6px":"0px";mxUtils.setOpacity(z,60);y=mxUtils.button("",function(){m.zoomOut()});y.className="geSprite geSprite-zoomout";y.setAttribute("title",mxResources.get("zoomOut"));y.style.position="relative";y.style.outline="none";y.style.border="none";y.style.margin="2px";y.style.cursor="pointer";y.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(y,60);var L=mxUtils.button("",function(){m.fit(8);m.center()});L.className="geSprite geSprite-fit";L.setAttribute("title",mxResources.get("fit"));L.style.position=
+f},ConnectionPointsDialog=function(b,f){function l(){null!=t&&t.destroy()}var d=document.createElement("div");d.style.userSelect="none";var t=null;this.init=function(){function u(F,J){F=new mxCell("",new mxGeometry(F,J,6,6),"shape=mxgraph.basic.x;fillColor=#29b6f2;strokeColor=#29b6f2;points=[];rotatable=0;resizable=0;connectable=0;editable=0;");F.vertex=!0;F.cp=!0;return m.addCell(F)}function E(F){F=m.getSelectionCells();m.deleteCells(F)}function c(){var F=parseInt(C.value)||0;F=0>F?0:100<F?100:F;
+C.value=F;var J=parseInt(H.value)||0;J=0>J?0:100<J?100:J;H.value=J;var Q=parseInt(G.value)||0,X=parseInt(M.value)||0;F=m.getConnectionPoint(x,new mxConnectionConstraint(new mxPoint(F/100,J/100),!1,null,Q,X));J=m.getSelectionCell();if(null!=J){Q=J.geometry.clone();X=m.view.scale;var P=m.view.translate;Q.x=(F.x-3*X)/X-P.x;Q.y=(F.y-3*X)/X-P.y;m.model.setGeometry(J,Q)}}function e(F){var J=0,Q=0,X=p.geometry,P=mxUtils.format((F.geometry.x+3-X.x)/X.width);F=mxUtils.format((F.geometry.y+3-X.y)/X.height);
+0>P?(J=P*X.width,P=0):1<P&&(J=(P-1)*X.width,P=1);0>F?(Q=F*X.height,F=0):1<F&&(Q=(F-1)*X.height,F=1);return{x:P,y:F,dx:parseInt(J),dy:parseInt(Q)}}function g(){if(1==m.getSelectionCount()){var F=m.getSelectionCell();F=e(F);C.value=100*F.x;H.value=100*F.y;G.value=F.dx;M.value=F.dy;z.style.visibility=""}else z.style.visibility="hidden"}var k=document.createElement("div");k.style.width="350px";k.style.height="350px";k.style.overflow="hidden";k.style.border="1px solid lightGray";k.style.boxSizing="border-box";
+mxEvent.disableContextMenu(k);d.appendChild(k);var m=new Graph(k);m.autoExtend=!1;m.autoScroll=!1;m.setGridEnabled(!1);m.setEnabled(!0);m.setPanning(!0);m.setConnectable(!1);m.setTooltips(!1);m.minFitScale=null;m.maxFitScale=null;m.centerZoom=!0;m.maxFitScale=2;k=f.geometry;var p=new mxCell(f.value,new mxGeometry(0,0,k.width,k.height),f.style+";rotatable=0;resizable=0;connectable=0;editable=0;movable=0;");p.vertex=!0;m.addCell(p);m.dblClick=function(F,J){if(null!=J&&J!=p)m.setSelectionCell(J);else{J=
+mxUtils.convertPoint(m.container,mxEvent.getClientX(F),mxEvent.getClientY(F));mxEvent.consume(F);F=m.view.scale;var Q=m.view.translate;m.setSelectionCell(u((J.x-3*F)/F-Q.x,(J.y-3*F)/F-Q.y))}};t=new mxKeyHandler(m);t.bindKey(46,E);t.bindKey(8,E);m.getRubberband().isForceRubberbandEvent=function(F){return 0==F.evt.button&&(null==F.getCell()||F.getCell()==p)};m.panningHandler.isForcePanningEvent=function(F){return 2==F.evt.button};var v=m.isCellSelectable;m.isCellSelectable=function(F){return F==p?!1:
+v.apply(this,arguments)};m.getLinkForCell=function(){return null};var x=m.view.getState(p);k=m.getAllConnectionConstraints(x);for(var A=0;null!=k&&A<k.length;A++){var y=m.getConnectionPoint(x,k[A]);u(y.x-3,y.y-3)}m.fit(8);m.center();A=mxUtils.button("",function(){m.zoomIn()});A.className="geSprite geSprite-zoomin";A.setAttribute("title",mxResources.get("zoomIn"));A.style.position="relative";A.style.outline="none";A.style.border="none";A.style.margin="2px";A.style.cursor="pointer";A.style.top=mxClient.IS_FF?
+"-6px":"0px";mxUtils.setOpacity(A,60);y=mxUtils.button("",function(){m.zoomOut()});y.className="geSprite geSprite-zoomout";y.setAttribute("title",mxResources.get("zoomOut"));y.style.position="relative";y.style.outline="none";y.style.border="none";y.style.margin="2px";y.style.cursor="pointer";y.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(y,60);var L=mxUtils.button("",function(){m.fit(8);m.center()});L.className="geSprite geSprite-fit";L.setAttribute("title",mxResources.get("fit"));L.style.position=
"relative";L.style.outline="none";L.style.border="none";L.style.margin="2px";L.style.cursor="pointer";L.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(L,60);var N=mxUtils.button("",function(){m.zoomActual();m.center()});N.className="geSprite geSprite-actualsize";N.setAttribute("title",mxResources.get("actualSize"));N.style.position="relative";N.style.outline="none";N.style.border="none";N.style.margin="2px";N.style.cursor="pointer";N.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(N,
-60);var J=mxUtils.button("",E);J.className="geSprite geSprite-delete";J.setAttribute("title",mxResources.get("delete"));J.style.position="relative";J.style.outline="none";J.style.border="none";J.style.margin="2px";J.style.float="right";J.style.cursor="pointer";mxUtils.setOpacity(J,10);k=document.createElement("div");k.appendChild(z);k.appendChild(y);k.appendChild(N);k.appendChild(L);k.appendChild(J);d.appendChild(k);var q=document.createElement("input");q.setAttribute("type","number");q.setAttribute("min",
-"1");q.setAttribute("value","1");q.style.width="45px";q.style.position="relative";q.style.top=mxClient.IS_FF?"0px":"-4px";q.style.margin="0 4px 0 4px";k.appendChild(q);var D=document.createElement("select");D.style.position="relative";D.style.top=mxClient.IS_FF?"0px":"-4px";y=["left","right","top","bottom"];for(z=0;z<y.length;z++)L=y[z],N=document.createElement("option"),mxUtils.write(N,mxResources.get(L)),N.value=L,D.appendChild(N);k.appendChild(D);z=mxUtils.button(mxResources.get("add"),function(){var F=
-parseInt(q.value);F=1>F?1:100<F?100:F;q.value=F;for(var I=D.value,R=p.geometry,X=[],O=0;O<F;O++){switch(I){case "left":var W=R.x;var U=R.y+(O+1)*R.height/(F+1);break;case "right":W=R.x+R.width;U=R.y+(O+1)*R.height/(F+1);break;case "top":W=R.x+(O+1)*R.width/(F+1);U=R.y;break;case "bottom":W=R.x+(O+1)*R.width/(F+1),U=R.y+R.height}X.push(u(W-3,U-3))}m.setSelectionCells(X)});z.style.position="relative";z.style.marginLeft="8px";z.style.top=mxClient.IS_FF?"0px":"-4px";k.appendChild(z);var A=document.createElement("div");
-A.style.margin="4px 0px 8px 0px";A.style.whiteSpace="nowrap";A.style.height="24px";k=document.createElement("span");mxUtils.write(k,mxResources.get("dx"));A.appendChild(k);var C=document.createElement("input");C.setAttribute("type","number");C.setAttribute("min","0");C.setAttribute("max","100");C.style.width="45px";C.style.margin="0 4px 0 4px";A.appendChild(C);mxUtils.write(A,"%");var G=document.createElement("input");G.setAttribute("type","number");G.style.width="45px";G.style.margin="0 4px 0 4px";
-A.appendChild(G);mxUtils.write(A,"pt");k=document.createElement("span");mxUtils.write(k,mxResources.get("dy"));k.style.marginLeft="12px";A.appendChild(k);var M=document.createElement("input");M.setAttribute("type","number");M.setAttribute("min","0");M.setAttribute("max","100");M.style.width="45px";M.style.margin="0 4px 0 4px";A.appendChild(M);mxUtils.write(A,"%");var H=document.createElement("input");H.setAttribute("type","number");H.style.width="45px";H.style.margin="0 4px 0 4px";A.appendChild(H);
-mxUtils.write(A,"pt");d.appendChild(A);g();m.getSelectionModel().addListener(mxEvent.CHANGE,function(){0<m.getSelectionCount()?mxUtils.setOpacity(J,60):mxUtils.setOpacity(J,10);g()});m.addListener(mxEvent.CELLS_MOVED,g);mxEvent.addListener(C,"change",c);mxEvent.addListener(M,"change",c);mxEvent.addListener(G,"change",c);mxEvent.addListener(H,"change",c);k=mxUtils.button(mxResources.get("cancel"),function(){l();b.hideDialog()});k.className="geBtn";z=mxUtils.button(mxResources.get("apply"),function(){var F=
-m.model.cells,I=[],R=[],X;for(X in F){var O=F[X];O.cp&&R.push(e(O))}R.sort(function(W,U){return W.x!=U.x?W.x-U.x:W.y!=U.y?W.y-U.y:W.dx!=U.dx?W.dx-U.dx:W.dy-U.dy});for(F=0;F<R.length;F++)0<F&&R[F].x==R[F-1].x&&R[F].y==R[F-1].y&&R[F].dx==R[F-1].dx&&R[F].dy==R[F-1].dy||I.push("["+R[F].x+","+R[F].y+",0,"+R[F].dx+","+R[F].dy+"]");b.editor.graph.setCellStyles("points","["+I.join(",")+"]",[f]);l();b.hideDialog()});z.className="geBtn gePrimaryBtn";y=mxUtils.button(mxResources.get("reset"),function(){b.editor.graph.setCellStyles("points",
-null,[f]);l();b.hideDialog()});y.className="geBtn";L=document.createElement("div");L.style.marginTop="10px";L.style.textAlign="right";b.editor.cancelFirst?(L.appendChild(k),L.appendChild(y),L.appendChild(z)):(L.appendChild(y),L.appendChild(z),L.appendChild(k));d.appendChild(L)};this.destroy=l;this.container=d};(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"},
+60);var I=mxUtils.button("",E);I.className="geSprite geSprite-delete";I.setAttribute("title",mxResources.get("delete"));I.style.position="relative";I.style.outline="none";I.style.border="none";I.style.margin="2px";I.style.float="right";I.style.cursor="pointer";mxUtils.setOpacity(I,10);k=document.createElement("div");k.appendChild(A);k.appendChild(y);k.appendChild(N);k.appendChild(L);k.appendChild(I);d.appendChild(k);var q=document.createElement("input");q.setAttribute("type","number");q.setAttribute("min",
+"1");q.setAttribute("value","1");q.style.width="45px";q.style.position="relative";q.style.top=mxClient.IS_FF?"0px":"-4px";q.style.margin="0 4px 0 4px";k.appendChild(q);var D=document.createElement("select");D.style.position="relative";D.style.top=mxClient.IS_FF?"0px":"-4px";y=["left","right","top","bottom"];for(A=0;A<y.length;A++)L=y[A],N=document.createElement("option"),mxUtils.write(N,mxResources.get(L)),N.value=L,D.appendChild(N);k.appendChild(D);A=mxUtils.button(mxResources.get("add"),function(){var F=
+parseInt(q.value);F=1>F?1:100<F?100:F;q.value=F;for(var J=D.value,Q=p.geometry,X=[],P=0;P<F;P++){switch(J){case "left":var V=Q.x;var W=Q.y+(P+1)*Q.height/(F+1);break;case "right":V=Q.x+Q.width;W=Q.y+(P+1)*Q.height/(F+1);break;case "top":V=Q.x+(P+1)*Q.width/(F+1);W=Q.y;break;case "bottom":V=Q.x+(P+1)*Q.width/(F+1),W=Q.y+Q.height}X.push(u(V-3,W-3))}m.setSelectionCells(X)});A.style.position="relative";A.style.marginLeft="8px";A.style.top=mxClient.IS_FF?"0px":"-4px";k.appendChild(A);var z=document.createElement("div");
+z.style.margin="4px 0px 8px 0px";z.style.whiteSpace="nowrap";z.style.height="24px";k=document.createElement("span");mxUtils.write(k,mxResources.get("dx"));z.appendChild(k);var C=document.createElement("input");C.setAttribute("type","number");C.setAttribute("min","0");C.setAttribute("max","100");C.style.width="45px";C.style.margin="0 4px 0 4px";z.appendChild(C);mxUtils.write(z,"%");var G=document.createElement("input");G.setAttribute("type","number");G.style.width="45px";G.style.margin="0 4px 0 4px";
+z.appendChild(G);mxUtils.write(z,"pt");k=document.createElement("span");mxUtils.write(k,mxResources.get("dy"));k.style.marginLeft="12px";z.appendChild(k);var H=document.createElement("input");H.setAttribute("type","number");H.setAttribute("min","0");H.setAttribute("max","100");H.style.width="45px";H.style.margin="0 4px 0 4px";z.appendChild(H);mxUtils.write(z,"%");var M=document.createElement("input");M.setAttribute("type","number");M.style.width="45px";M.style.margin="0 4px 0 4px";z.appendChild(M);
+mxUtils.write(z,"pt");d.appendChild(z);g();m.getSelectionModel().addListener(mxEvent.CHANGE,function(){0<m.getSelectionCount()?mxUtils.setOpacity(I,60):mxUtils.setOpacity(I,10);g()});m.addListener(mxEvent.CELLS_MOVED,g);mxEvent.addListener(C,"change",c);mxEvent.addListener(H,"change",c);mxEvent.addListener(G,"change",c);mxEvent.addListener(M,"change",c);k=mxUtils.button(mxResources.get("cancel"),function(){l();b.hideDialog()});k.className="geBtn";A=mxUtils.button(mxResources.get("apply"),function(){var F=
+m.model.cells,J=[],Q=[],X;for(X in F){var P=F[X];P.cp&&Q.push(e(P))}Q.sort(function(V,W){return V.x!=W.x?V.x-W.x:V.y!=W.y?V.y-W.y:V.dx!=W.dx?V.dx-W.dx:V.dy-W.dy});for(F=0;F<Q.length;F++)0<F&&Q[F].x==Q[F-1].x&&Q[F].y==Q[F-1].y&&Q[F].dx==Q[F-1].dx&&Q[F].dy==Q[F-1].dy||J.push("["+Q[F].x+","+Q[F].y+",0,"+Q[F].dx+","+Q[F].dy+"]");b.editor.graph.setCellStyles("points","["+J.join(",")+"]",[f]);l();b.hideDialog()});A.className="geBtn gePrimaryBtn";y=mxUtils.button(mxResources.get("reset"),function(){b.editor.graph.setCellStyles("points",
+null,[f]);l();b.hideDialog()});y.className="geBtn";L=document.createElement("div");L.style.marginTop="10px";L.style.textAlign="right";b.editor.cancelFirst?(L.appendChild(k),L.appendChild(y),L.appendChild(A)):(L.appendChild(y),L.appendChild(A),L.appendChild(k));d.appendChild(L)};this.destroy=l;this.container=d};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"},
{description:"diagramXmlDesc",extension:"xml",mimeType:"text/xml"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.styles=[{},{commonStyle:{fontColor:"#5C5C5C",strokeColor:"#006658",fillColor:"#21C0A5"}},{commonStyle:{fontColor:"#095C86",strokeColor:"#AF45ED",fillColor:"#F694C1"},edgeStyle:{strokeColor:"#60E696"}},
{commonStyle:{fontColor:"#46495D",strokeColor:"#788AA3",fillColor:"#B2C9AB"}},{commonStyle:{fontColor:"#5AA9E6",strokeColor:"#FF6392",fillColor:"#FFE45E"}},{commonStyle:{fontColor:"#1D3557",strokeColor:"#457B9D",fillColor:"#A8DADC"},graph:{background:"#F1FAEE"}},{commonStyle:{fontColor:"#393C56",strokeColor:"#E07A5F",fillColor:"#F2CC8F"},graph:{background:"#F4F1DE",gridColor:"#D4D0C0"}},{commonStyle:{fontColor:"#143642",strokeColor:"#0F8B8D",fillColor:"#FAE5C7"},edgeStyle:{strokeColor:"#A8201A"},
graph:{background:"#DAD2D8",gridColor:"#ABA4A9"}},{commonStyle:{fontColor:"#FEFAE0",strokeColor:"#DDA15E",fillColor:"#BC6C25"},graph:{background:"#283618",gridColor:"#48632C"}},{commonStyle:{fontColor:"#E4FDE1",strokeColor:"#028090",fillColor:"#F45B69"},graph:{background:"#114B5F",gridColor:"#0B3240"}},{},{vertexStyle:{strokeColor:"#D0CEE2",fillColor:"#FAD9D5"},edgeStyle:{strokeColor:"#09555B"},commonStyle:{fontColor:"#1A1A1A"}},{vertexStyle:{strokeColor:"#BAC8D3",fillColor:"#09555B",fontColor:"#EEEEEE"},
@@ -11483,86 +11479,86 @@ B.isVertex(B.getParent(n.vertices[0])):!1}},{name:"editable",dispName:"Editable"
{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"fixedWidth",dispName:"Fixed Width",type:"bool",defVal:!1},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},
{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(n,B){var K=mxUtils.getValue(n.style,mxConstants.STYLE_FILLCOLOR,null);return B.editorUi.editor.graph.isSwimlane(n.vertices[0])||null==K||K==mxConstants.NONE||0==mxUtils.getValue(n.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(n.style,mxConstants.STYLE_OPACITY,100)||
null!=n.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(n,B){return 0<n.vertices.length&&B.editorUi.editor.graph.isContainer(n.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Collapsed state for vertices. Possible values are true or false. Default is false.\n#\n# collapsed: false\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
-Editor.createRoughCanvas=function(n){var B=rough.canvas({getContext:function(){return n}});B.draw=function(K){var Q=K.sets||[];K=K.options||this.getDefaultOptions();for(var P=0;P<Q.length;P++){var T=Q[P];switch(T.type){case "path":null!=K.stroke&&this._drawToContext(n,T,K);break;case "fillPath":this._drawToContext(n,T,K);break;case "fillSketch":this.fillSketch(n,T,K)}}};B.fillSketch=function(K,Q,P){var T=n.state.strokeColor,V=n.state.strokeWidth,S=n.state.strokeAlpha,Y=n.state.dashed,ca=P.fillWeight;
-0>ca&&(ca=P.strokeWidth/2);n.setStrokeAlpha(n.state.fillAlpha);n.setStrokeColor(P.fill||"");n.setStrokeWidth(ca);n.setDashed(!1);this._drawToContext(K,Q,P);n.setDashed(Y);n.setStrokeWidth(V);n.setStrokeColor(T);n.setStrokeAlpha(S)};B._drawToContext=function(K,Q,P){K.begin();for(var T=0;T<Q.ops.length;T++){var V=Q.ops[T],S=V.data;switch(V.op){case "move":K.moveTo(S[0],S[1]);break;case "bcurveTo":K.curveTo(S[0],S[1],S[2],S[3],S[4],S[5]);break;case "lineTo":K.lineTo(S[0],S[1])}}K.end();"fillPath"===
-Q.type&&P.filled?K.fill():K.stroke()};return B};(function(){function n(T,V,S){this.canvas=T;this.rc=V;this.shape=S;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,n.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,n.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,n.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
+Editor.createRoughCanvas=function(n){var B=rough.canvas({getContext:function(){return n}});B.draw=function(K){var R=K.sets||[];K=K.options||this.getDefaultOptions();for(var O=0;O<R.length;O++){var U=R[O];switch(U.type){case "path":null!=K.stroke&&this._drawToContext(n,U,K);break;case "fillPath":this._drawToContext(n,U,K);break;case "fillSketch":this.fillSketch(n,U,K)}}};B.fillSketch=function(K,R,O){var U=n.state.strokeColor,S=n.state.strokeWidth,T=n.state.strokeAlpha,Y=n.state.dashed,ba=O.fillWeight;
+0>ba&&(ba=O.strokeWidth/2);n.setStrokeAlpha(n.state.fillAlpha);n.setStrokeColor(O.fill||"");n.setStrokeWidth(ba);n.setDashed(!1);this._drawToContext(K,R,O);n.setDashed(Y);n.setStrokeWidth(S);n.setStrokeColor(U);n.setStrokeAlpha(T)};B._drawToContext=function(K,R,O){K.begin();for(var U=0;U<R.ops.length;U++){var S=R.ops[U],T=S.data;switch(S.op){case "move":K.moveTo(T[0],T[1]);break;case "bcurveTo":K.curveTo(T[0],T[1],T[2],T[3],T[4],T[5]);break;case "lineTo":K.lineTo(T[0],T[1])}}K.end();"fillPath"===
+R.type&&O.filled?K.fill():K.stroke()};return B};(function(){function n(U,S,T){this.canvas=U;this.rc=S;this.shape=T;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,n.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,n.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,n.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
mxUtils.bind(this,n.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,n.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,n.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,n.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,n.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
n.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,n.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,n.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,n.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,n.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,n.prototype.fillAndStroke);
-this.path=[];this.passThrough=!1}n.prototype.moveOp="M";n.prototype.lineOp="L";n.prototype.quadOp="Q";n.prototype.curveOp="C";n.prototype.closeOp="Z";n.prototype.getStyle=function(T,V){var S=1;if(null!=this.shape.state){var Y=this.shape.state.cell.id;if(null!=Y)for(var ca=0;ca<Y.length;ca++)S=(S<<5)-S+Y.charCodeAt(ca)<<0}S={strokeWidth:this.canvas.state.strokeWidth,seed:S,preserveVertices:!0};Y=this.rc.getDefaultOptions();S.stroke=T?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":this.canvas.state.strokeColor:
-mxConstants.NONE;T=null;(S.filled=V)?(S.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,T=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):S.fill="";S.bowing=mxUtils.getValue(this.shape.style,"bowing",Y.bowing);S.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",Y.hachureAngle);S.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",Y.curveFitting);S.roughness=mxUtils.getValue(this.shape.style,"jiggle",
-Y.roughness);S.simplification=mxUtils.getValue(this.shape.style,"simplification",Y.simplification);S.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",Y.disableMultiStroke);S.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",Y.disableMultiStrokeFill);V=mxUtils.getValue(this.shape.style,"hachureGap",-1);S.hachureGap="auto"==V?-1:V;S.dashGap=mxUtils.getValue(this.shape.style,"dashGap",V);S.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",
-V);S.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",V);V=mxUtils.getValue(this.shape.style,"fillWeight",-1);S.fillWeight="auto"==V?-1:V;V=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==V&&(V=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),V=null!=S.fill&&(null!=T||null!=V&&S.fill==V)?"solid":Y.fillStyle);S.fillStyle=V;return S};n.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,
-arguments):this.path=[]};n.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};n.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var T=2;T<arguments.length;T+=2)this.lastX=arguments[T-1],this.lastY=arguments[T],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};n.prototype.lineTo=function(T,V){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,
-T,V),this.lastX=T,this.lastY=V)};n.prototype.moveTo=function(T,V){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,T,V),this.lastX=T,this.lastY=V,this.firstX=T,this.firstY=V)};n.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};n.prototype.quadTo=function(T,V,S,Y){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,T,V,S,Y),this.lastX=S,this.lastY=Y)};
-n.prototype.curveTo=function(T,V,S,Y,ca,aa){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,T,V,S,Y,ca,aa),this.lastX=ca,this.lastY=aa)};n.prototype.arcTo=function(T,V,S,Y,ca,aa,da){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var ja=mxUtils.arcToCurves(this.lastX,this.lastY,T,V,S,Y,ca,aa,da);if(null!=ja)for(var ha=0;ha<ja.length;ha+=6)this.curveTo(ja[ha],ja[ha+1],ja[ha+2],ja[ha+3],ja[ha+4],ja[ha+5]);this.lastX=aa;this.lastY=
-da}};n.prototype.rect=function(T,V,S,Y){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(T,V,S,Y,this.getStyle(!0,!0)))};n.prototype.ellipse=function(T,V,S,Y){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(T+S/2,V+Y/2,S,Y,this.getStyle(!0,!0)))};n.prototype.roundrect=function(T,V,S,Y,ca,aa){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):
-(this.begin(),this.moveTo(T+ca,V),this.lineTo(T+S-ca,V),this.quadTo(T+S,V,T+S,V+aa),this.lineTo(T+S,V+Y-aa),this.quadTo(T+S,V+Y,T+S-ca,V+Y),this.lineTo(T+ca,V+Y),this.quadTo(T,V+Y,T,V+Y-aa),this.lineTo(T,V+aa),this.quadTo(T,V,T+ca,V))};n.prototype.drawPath=function(T){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),T)}catch(S){}this.passThrough=!1}else if(null!=this.nextShape){for(var V in T)this.nextShape.options[V]=T[V];T.stroke!=mxConstants.NONE&&null!=T.stroke||
-delete this.nextShape.options.stroke;T.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};n.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};n.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};n.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,
+this.path=[];this.passThrough=!1}n.prototype.moveOp="M";n.prototype.lineOp="L";n.prototype.quadOp="Q";n.prototype.curveOp="C";n.prototype.closeOp="Z";n.prototype.getStyle=function(U,S){var T=1;if(null!=this.shape.state){var Y=this.shape.state.cell.id;if(null!=Y)for(var ba=0;ba<Y.length;ba++)T=(T<<5)-T+Y.charCodeAt(ba)<<0}T={strokeWidth:this.canvas.state.strokeWidth,seed:T,preserveVertices:!0};Y=this.rc.getDefaultOptions();T.stroke=U?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":this.canvas.state.strokeColor:
+mxConstants.NONE;U=null;(T.filled=S)?(T.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,U=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):T.fill="";T.bowing=mxUtils.getValue(this.shape.style,"bowing",Y.bowing);T.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",Y.hachureAngle);T.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",Y.curveFitting);T.roughness=mxUtils.getValue(this.shape.style,"jiggle",
+Y.roughness);T.simplification=mxUtils.getValue(this.shape.style,"simplification",Y.simplification);T.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",Y.disableMultiStroke);T.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",Y.disableMultiStrokeFill);S=mxUtils.getValue(this.shape.style,"hachureGap",-1);T.hachureGap="auto"==S?-1:S;T.dashGap=mxUtils.getValue(this.shape.style,"dashGap",S);T.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",
+S);T.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",S);S=mxUtils.getValue(this.shape.style,"fillWeight",-1);T.fillWeight="auto"==S?-1:S;S=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==S&&(S=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),S=null!=T.fill&&(null!=U||null!=S&&T.fill==S)?"solid":Y.fillStyle);T.fillStyle=S;return T};n.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,
+arguments):this.path=[]};n.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};n.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var U=2;U<arguments.length;U+=2)this.lastX=arguments[U-1],this.lastY=arguments[U],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};n.prototype.lineTo=function(U,S){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,
+U,S),this.lastX=U,this.lastY=S)};n.prototype.moveTo=function(U,S){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,U,S),this.lastX=U,this.lastY=S,this.firstX=U,this.firstY=S)};n.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};n.prototype.quadTo=function(U,S,T,Y){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,U,S,T,Y),this.lastX=T,this.lastY=Y)};
+n.prototype.curveTo=function(U,S,T,Y,ba,aa){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,U,S,T,Y,ba,aa),this.lastX=ba,this.lastY=aa)};n.prototype.arcTo=function(U,S,T,Y,ba,aa,da){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var ha=mxUtils.arcToCurves(this.lastX,this.lastY,U,S,T,Y,ba,aa,da);if(null!=ha)for(var ma=0;ma<ha.length;ma+=6)this.curveTo(ha[ma],ha[ma+1],ha[ma+2],ha[ma+3],ha[ma+4],ha[ma+5]);this.lastX=aa;this.lastY=
+da}};n.prototype.rect=function(U,S,T,Y){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(U,S,T,Y,this.getStyle(!0,!0)))};n.prototype.ellipse=function(U,S,T,Y){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(U+T/2,S+Y/2,T,Y,this.getStyle(!0,!0)))};n.prototype.roundrect=function(U,S,T,Y,ba,aa){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):
+(this.begin(),this.moveTo(U+ba,S),this.lineTo(U+T-ba,S),this.quadTo(U+T,S,U+T,S+aa),this.lineTo(U+T,S+Y-aa),this.quadTo(U+T,S+Y,U+T-ba,S+Y),this.lineTo(U+ba,S+Y),this.quadTo(U,S+Y,U,S+Y-aa),this.lineTo(U,S+aa),this.quadTo(U,S,U+ba,S))};n.prototype.drawPath=function(U){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),U)}catch(T){}this.passThrough=!1}else if(null!=this.nextShape){for(var S in U)this.nextShape.options[S]=U[S];U.stroke!=mxConstants.NONE&&null!=U.stroke||
+delete this.nextShape.options.stroke;U.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};n.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};n.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};n.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,
arguments):this.drawPath(this.getStyle(!0,!0))};n.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(T){return new n(T,Editor.createRoughCanvas(T),this)};var B=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(T){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?B.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle",
-"rough")?this.createComicCanvas(T):this.createRoughCanvas(T)};var K=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(T,V,S,Y,ca){null!=T.handJiggle&&T.handJiggle.passThrough||K.apply(this,arguments)};var Q=mxShape.prototype.paint;mxShape.prototype.paint=function(T){var V=T.addTolerance,S=!0;null!=this.style&&(S="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=T.handJiggle&&T.handJiggle.constructor==n&&!this.outline){T.save();
-var Y=this.fill,ca=this.stroke;this.stroke=this.fill=null;var aa=this.configurePointerEvents,da=T.setStrokeColor;T.setStrokeColor=function(){};var ja=T.setFillColor;T.setFillColor=function(){};S||null==Y||(this.configurePointerEvents=function(){});T.handJiggle.passThrough=!0;Q.apply(this,arguments);T.handJiggle.passThrough=!1;T.setFillColor=ja;T.setStrokeColor=da;this.configurePointerEvents=aa;this.stroke=ca;this.fill=Y;T.restore();S&&null!=Y&&(T.addTolerance=function(){})}Q.apply(this,arguments);
-T.addTolerance=V};var P=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(T,V,S,Y,ca,aa){null!=T.handJiggle&&T.handJiggle.constructor==n?(T.handJiggle.passThrough=!0,P.apply(this,arguments),T.handJiggle.passThrough=!1):P.apply(this,arguments)}})();Editor.fastCompress=function(n){return null==n||0==n.length||"undefined"===typeof pako?n:Graph.arrayBufferToString(pako.deflateRaw(n))};Editor.fastDecompress=function(n){return null==n||0==n.length||"undefined"===typeof pako?
-n:pako.inflateRaw(Graph.stringToArrayBuffer(atob(n)),{to:"string"})};Editor.extractGraphModel=function(n,B,K){if(null!=n&&"undefined"!==typeof pako){var Q=n.ownerDocument.getElementsByTagName("div"),P=[];if(null!=Q&&0<Q.length)for(var T=0;T<Q.length;T++)if("mxgraph"==Q[T].getAttribute("class")){P.push(Q[T]);break}0<P.length&&(Q=P[0].getAttribute("data-mxgraph"),null!=Q?(P=JSON.parse(Q),null!=P&&null!=P.xml&&(n=mxUtils.parseXml(P.xml),n=n.documentElement)):(P=P[0].getElementsByTagName("div"),0<P.length&&
-(Q=mxUtils.getTextContent(P[0]),Q=Graph.decompress(Q,null,K),0<Q.length&&(n=mxUtils.parseXml(Q),n=n.documentElement))))}if(null!=n&&"svg"==n.nodeName)if(Q=n.getAttribute("content"),null!=Q&&"<"!=Q.charAt(0)&&"%"!=Q.charAt(0)&&(Q=unescape(window.atob?atob(Q):Base64.decode(cont,Q))),null!=Q&&"%"==Q.charAt(0)&&(Q=decodeURIComponent(Q)),null!=Q&&0<Q.length)n=mxUtils.parseXml(Q).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==n||B||(P=null,"diagram"==n.nodeName?P=n:"mxfile"==
-n.nodeName&&(Q=n.getElementsByTagName("diagram"),0<Q.length&&(P=Q[Math.max(0,Math.min(Q.length-1,urlParams.page||0))])),null!=P&&(n=Editor.parseDiagramNode(P,K)));null==n||"mxGraphModel"==n.nodeName||B&&"mxfile"==n.nodeName||(n=null);return n};Editor.parseDiagramNode=function(n,B){var K=mxUtils.trim(mxUtils.getTextContent(n)),Q=null;0<K.length?(n=Graph.decompress(K,null,B),null!=n&&0<n.length&&(Q=mxUtils.parseXml(n).documentElement)):(n=mxUtils.getChildNodes(n),0<n.length&&(Q=mxUtils.createXmlDocument(),
-Q.appendChild(Q.importNode(n[0],!0)),Q=Q.documentElement));return Q};Editor.getDiagramNodeXml=function(n){var B=mxUtils.getTextContent(n),K=null;0<B.length?K=Graph.decompress(B):null!=n.firstChild&&(K=mxUtils.getXml(n.firstChild));return K};Editor.extractGraphModelFromPdf=function(n){n=n.substring(n.indexOf(",")+1);n=window.atob&&!mxClient.IS_SF?atob(n):Base64.decode(n,!0);if("%PDF-1.7"==n.substring(0,8)){var B=n.indexOf("EmbeddedFile");if(-1<B){var K=n.indexOf("stream",B)+9;if(0<n.substring(B,K).indexOf("application#2Fvnd.jgraph.mxfile"))return B=
-n.indexOf("endstream",K-1),pako.inflateRaw(Graph.stringToArrayBuffer(n.substring(K,B)),{to:"string"})}return null}K=null;B="";for(var Q=0,P=0,T=[],V=null;P<n.length;){var S=n.charCodeAt(P);P+=1;10!=S&&(B+=String.fromCharCode(S));S=="/Subject (%3Cmxfile".charCodeAt(Q)?Q++:Q=0;if(19==Q){var Y=n.indexOf("%3C%2Fmxfile%3E)",P)+15;P-=9;if(Y>P){K=n.substring(P,Y);break}}10==S&&("endobj"==B?V=null:"obj"==B.substring(B.length-3,B.length)||"xref"==B||"trailer"==B?(V=[],T[B.split(" ")[0]]=V):null!=V&&V.push(B),
-B="")}null==K&&(K=Editor.extractGraphModelFromXref(T));null!=K&&(K=decodeURIComponent(K.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return K};Editor.extractGraphModelFromXref=function(n){var B=n.trailer,K=null;null!=B&&(B=/.* \/Info (\d+) (\d+) R/g.exec(B.join("\n")),null!=B&&0<B.length&&(B=n[B[1]],null!=B&&(B=/.* \/Subject (\d+) (\d+) R/g.exec(B.join("\n")),null!=B&&0<B.length&&(n=n[B[1]],null!=n&&(n=n.join("\n"),K=n.substring(1,n.length-1))))));return K};Editor.extractParserError=function(n,B){var K=
+this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(U){return new n(U,Editor.createRoughCanvas(U),this)};var B=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(U){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?B.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle",
+"rough")?this.createComicCanvas(U):this.createRoughCanvas(U)};var K=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(U,S,T,Y,ba){null!=U.handJiggle&&U.handJiggle.passThrough||K.apply(this,arguments)};var R=mxShape.prototype.paint;mxShape.prototype.paint=function(U){var S=U.addTolerance,T=!0;null!=this.style&&(T="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=U.handJiggle&&U.handJiggle.constructor==n&&!this.outline){U.save();
+var Y=this.fill,ba=this.stroke;this.stroke=this.fill=null;var aa=this.configurePointerEvents,da=U.setStrokeColor;U.setStrokeColor=function(){};var ha=U.setFillColor;U.setFillColor=function(){};T||null==Y||(this.configurePointerEvents=function(){});U.handJiggle.passThrough=!0;R.apply(this,arguments);U.handJiggle.passThrough=!1;U.setFillColor=ha;U.setStrokeColor=da;this.configurePointerEvents=aa;this.stroke=ba;this.fill=Y;U.restore();T&&null!=Y&&(U.addTolerance=function(){})}R.apply(this,arguments);
+U.addTolerance=S};var O=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(U,S,T,Y,ba,aa){null!=U.handJiggle&&U.handJiggle.constructor==n?(U.handJiggle.passThrough=!0,O.apply(this,arguments),U.handJiggle.passThrough=!1):O.apply(this,arguments)}})();Editor.fastCompress=function(n){return null==n||0==n.length||"undefined"===typeof pako?n:Graph.arrayBufferToString(pako.deflateRaw(n))};Editor.fastDecompress=function(n){return null==n||0==n.length||"undefined"===typeof pako?
+n:pako.inflateRaw(Graph.stringToArrayBuffer(atob(n)),{to:"string"})};Editor.extractGraphModel=function(n,B,K){if(null!=n&&"undefined"!==typeof pako){var R=n.ownerDocument.getElementsByTagName("div"),O=[];if(null!=R&&0<R.length)for(var U=0;U<R.length;U++)if("mxgraph"==R[U].getAttribute("class")){O.push(R[U]);break}0<O.length&&(R=O[0].getAttribute("data-mxgraph"),null!=R?(O=JSON.parse(R),null!=O&&null!=O.xml&&(n=mxUtils.parseXml(O.xml),n=n.documentElement)):(O=O[0].getElementsByTagName("div"),0<O.length&&
+(R=mxUtils.getTextContent(O[0]),R=Graph.decompress(R,null,K),0<R.length&&(n=mxUtils.parseXml(R),n=n.documentElement))))}if(null!=n&&"svg"==n.nodeName)if(R=n.getAttribute("content"),null!=R&&"<"!=R.charAt(0)&&"%"!=R.charAt(0)&&(R=unescape(window.atob?atob(R):Base64.decode(cont,R))),null!=R&&"%"==R.charAt(0)&&(R=decodeURIComponent(R)),null!=R&&0<R.length)n=mxUtils.parseXml(R).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==n||B||(O=null,"diagram"==n.nodeName?O=n:"mxfile"==
+n.nodeName&&(R=n.getElementsByTagName("diagram"),0<R.length&&(O=R[Math.max(0,Math.min(R.length-1,urlParams.page||0))])),null!=O&&(n=Editor.parseDiagramNode(O,K)));null==n||"mxGraphModel"==n.nodeName||B&&"mxfile"==n.nodeName||(n=null);return n};Editor.parseDiagramNode=function(n,B){var K=mxUtils.trim(mxUtils.getTextContent(n)),R=null;0<K.length?(n=Graph.decompress(K,null,B),null!=n&&0<n.length&&(R=mxUtils.parseXml(n).documentElement)):(n=mxUtils.getChildNodes(n),0<n.length&&(R=mxUtils.createXmlDocument(),
+R.appendChild(R.importNode(n[0],!0)),R=R.documentElement));return R};Editor.getDiagramNodeXml=function(n){var B=mxUtils.getTextContent(n),K=null;0<B.length?K=Graph.decompress(B):null!=n.firstChild&&(K=mxUtils.getXml(n.firstChild));return K};Editor.extractGraphModelFromPdf=function(n){n=n.substring(n.indexOf(",")+1);n=window.atob&&!mxClient.IS_SF?atob(n):Base64.decode(n,!0);if("%PDF-1.7"==n.substring(0,8)){var B=n.indexOf("EmbeddedFile");if(-1<B){var K=n.indexOf("stream",B)+9;if(0<n.substring(B,K).indexOf("application#2Fvnd.jgraph.mxfile"))return B=
+n.indexOf("endstream",K-1),pako.inflateRaw(Graph.stringToArrayBuffer(n.substring(K,B)),{to:"string"})}return null}K=null;B="";for(var R=0,O=0,U=[],S=null;O<n.length;){var T=n.charCodeAt(O);O+=1;10!=T&&(B+=String.fromCharCode(T));T=="/Subject (%3Cmxfile".charCodeAt(R)?R++:R=0;if(19==R){var Y=n.indexOf("%3C%2Fmxfile%3E)",O)+15;O-=9;if(Y>O){K=n.substring(O,Y);break}}10==T&&("endobj"==B?S=null:"obj"==B.substring(B.length-3,B.length)||"xref"==B||"trailer"==B?(S=[],U[B.split(" ")[0]]=S):null!=S&&S.push(B),
+B="")}null==K&&(K=Editor.extractGraphModelFromXref(U));null!=K&&(K=decodeURIComponent(K.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return K};Editor.extractGraphModelFromXref=function(n){var B=n.trailer,K=null;null!=B&&(B=/.* \/Info (\d+) (\d+) R/g.exec(B.join("\n")),null!=B&&0<B.length&&(B=n[B[1]],null!=B&&(B=/.* \/Subject (\d+) (\d+) R/g.exec(B.join("\n")),null!=B&&0<B.length&&(n=n[B[1]],null!=n&&(n=n.join("\n"),K=n.substring(1,n.length-1))))));return K};Editor.extractParserError=function(n,B){var K=
null;n=null!=n?n.getElementsByTagName("parsererror"):null;null!=n&&0<n.length&&(K=B||mxResources.get("invalidChars"),B=n[0].getElementsByTagName("div"),0<B.length&&(K=mxUtils.getTextContent(B[0])));return null!=K?mxUtils.trim(K):K};Editor.addRetryToError=function(n,B){null!=n&&(n=null!=n.error?n.error:n,null==n.retry&&(n.retry=B))};Editor.configure=function(n,B){if(null!=n){Editor.config=n;Editor.configVersion=n.version;Menus.prototype.defaultFonts=n.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=
n.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=n.defaultColors||ColorDialog.prototype.defaultColors;ColorDialog.prototype.colorNames=n.colorNames||ColorDialog.prototype.colorNames;StyleFormatPanel.prototype.defaultColorSchemes=n.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=n.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=n.autosaveDelay||DrawioFile.prototype.autosaveDelay;
n.debug&&(urlParams.test="1");null!=n.templateFile&&(EditorUi.templateFile=n.templateFile);null!=n.styles&&(Array.isArray(n.styles)?Editor.styles=n.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=n.globalVars&&(Editor.globalVars=n.globalVars);null!=n.compressXml&&(Editor.compressXml=n.compressXml);null!=n.includeDiagram&&(Editor.defaultIncludeDiagram=n.includeDiagram);null!=n.simpleLabels&&(Editor.simpleLabels=n.simpleLabels);null!=n.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=
n.oneDriveInlinePicker);null!=n.darkColor&&(Editor.darkColor=n.darkColor);null!=n.lightColor&&(Editor.lightColor=n.lightColor);null!=n.settingsName&&(Editor.configurationKey="."+n.settingsName+"-configuration",Editor.settingsKey="."+n.settingsName+"-config",mxSettings.key=Editor.settingsKey);n.customFonts&&(Menus.prototype.defaultFonts=n.customFonts.concat(Menus.prototype.defaultFonts));n.customPresetColors&&(ColorDialog.prototype.presetColors=n.customPresetColors.concat(ColorDialog.prototype.presetColors));
-null!=n.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=n.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=n.css){var K=document.createElement("style");K.setAttribute("type","text/css");K.appendChild(document.createTextNode(n.css));var Q=document.getElementsByTagName("script")[0];Q.parentNode.insertBefore(K,Q)}null!=n.libraries&&(Sidebar.prototype.customEntries=n.libraries);null!=n.enabledLibraries&&(Array.isArray(n.enabledLibraries)?Sidebar.prototype.enabledLibraries=
+null!=n.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=n.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=n.css){var K=document.createElement("style");K.setAttribute("type","text/css");K.appendChild(document.createTextNode(n.css));var R=document.getElementsByTagName("script")[0];R.parentNode.insertBefore(K,R)}null!=n.libraries&&(Sidebar.prototype.customEntries=n.libraries);null!=n.enabledLibraries&&(Array.isArray(n.enabledLibraries)?Sidebar.prototype.enabledLibraries=
n.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=n.defaultLibraries&&(Sidebar.prototype.defaultEntries=n.defaultLibraries);null!=n.defaultCustomLibraries&&(Editor.defaultCustomLibraries=n.defaultCustomLibraries);null!=n.enableCustomLibraries&&(Editor.enableCustomLibraries=n.enableCustomLibraries);null!=n.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=n.defaultVertexStyle);null!=n.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=n.defaultEdgeStyle);
null!=n.defaultPageVisible&&(Graph.prototype.defaultPageVisible=n.defaultPageVisible);null!=n.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=n.defaultGridEnabled);null!=n.zoomWheel&&(Graph.zoomWheel=n.zoomWheel);null!=n.zoomFactor&&(K=parseFloat(n.zoomFactor),!isNaN(K)&&1<K?Graph.prototype.zoomFactor=K:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=n.gridSteps&&(K=parseInt(n.gridSteps),!isNaN(K)&&0<K?mxGraphView.prototype.gridSteps=K:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));
-null!=n.pageFormat&&(K=parseInt(n.pageFormat.width),Q=parseInt(n.pageFormat.height),!isNaN(K)&&0<K&&!isNaN(Q)&&0<Q?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,K,Q),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));n.thumbWidth&&(Sidebar.prototype.thumbWidth=n.thumbWidth);n.thumbHeight&&(Sidebar.prototype.thumbHeight=n.thumbHeight);n.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=
+null!=n.pageFormat&&(K=parseInt(n.pageFormat.width),R=parseInt(n.pageFormat.height),!isNaN(K)&&0<K&&!isNaN(R)&&0<R?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,K,R),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));n.thumbWidth&&(Sidebar.prototype.thumbWidth=n.thumbWidth);n.thumbHeight&&(Sidebar.prototype.thumbHeight=n.thumbHeight);n.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=
n.emptyLibraryXml);n.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=n.emptyDiagramXml);n.sidebarWidth&&(EditorUi.prototype.hsplitPosition=n.sidebarWidth);n.sidebarTitles&&(Sidebar.prototype.sidebarTitles=n.sidebarTitles);n.sidebarTitleSize&&(K=parseInt(n.sidebarTitleSize),!isNaN(K)&&0<K?Sidebar.prototype.sidebarTitleSize=K:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));n.fontCss&&("string"===typeof n.fontCss?Editor.configureFontCss(n.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));
null!=n.autosaveDelay&&(K=parseInt(n.autosaveDelay),!isNaN(K)&&0<K?DrawioFile.prototype.autosaveDelay=K:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));if(null!=n.plugins&&!B)for(App.initPluginCallback(),B=0;B<n.plugins.length;B++)mxscript(n.plugins[B]);null!=n.maxImageBytes&&(EditorUi.prototype.maxImageBytes=n.maxImageBytes);null!=n.maxImageSize&&(EditorUi.prototype.maxImageSize=n.maxImageSize);null!=n.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=n.shareCursorPosition);
-null!=n.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=n.showRemoteCursors)}};Editor.configureFontCss=function(n){if(null!=n){Editor.prototype.fontCss=n;var B=document.getElementsByTagName("script")[0];if(null!=B&&null!=B.parentNode){var K=document.createElement("style");K.setAttribute("type","text/css");K.appendChild(document.createTextNode(n));B.parentNode.insertBefore(K,B);n=n.split("url(");for(K=1;K<n.length;K++){var Q=n[K].indexOf(")");Q=Editor.trimCssUrl(n[K].substring(0,Q));var P=
-document.createElement("link");P.setAttribute("rel","preload");P.setAttribute("href",Q);P.setAttribute("as","font");P.setAttribute("crossorigin","");B.parentNode.insertBefore(P,B)}}}};Editor.trimCssUrl=function(n){return n.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(n){n=null!=
+null!=n.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=n.showRemoteCursors)}};Editor.configureFontCss=function(n){if(null!=n){Editor.prototype.fontCss=n;var B=document.getElementsByTagName("script")[0];if(null!=B&&null!=B.parentNode){var K=document.createElement("style");K.setAttribute("type","text/css");K.appendChild(document.createTextNode(n));B.parentNode.insertBefore(K,B);n=n.split("url(");for(K=1;K<n.length;K++){var R=n[K].indexOf(")");R=Editor.trimCssUrl(n[K].substring(0,R));var O=
+document.createElement("link");O.setAttribute("rel","preload");O.setAttribute("href",R);O.setAttribute("as","font");O.setAttribute("crossorigin","");B.parentNode.insertBefore(O,B)}}}};Editor.trimCssUrl=function(n){return n.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(n){n=null!=
n?n:Editor.GUID_LENGTH;for(var B=[],K=0;K<n;K++)B.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return B.join("")};Editor.prototype.timeout=25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(n){n=null!=n&&"mxlibrary"!=n.nodeName?this.extractGraphModel(n):null;if(null!=n){var B=Editor.extractParserError(n,
-mxResources.get("invalidOrMissingFile"));if(B)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[n],"cause",[B]),Error(mxResources.get("notADiagramFile")+" ("+B+")");if("mxGraphModel"==n.nodeName){B=n.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=B&&""!=B)B!=this.graph.currentStyle&&(K=null!=this.graph.themes?this.graph.themes[B]:mxUtils.load(STYLE_PATH+"/"+B+".xml").getDocumentElement(),null!=K&&(Q=new mxCodec(K.ownerDocument),Q.decode(K,this.graph.getStylesheet())));
-else{var K=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=K){var Q=new mxCodec(K.ownerDocument);Q.decode(K,this.graph.getStylesheet())}}this.graph.currentStyle=B;this.graph.mathEnabled="1"==urlParams.math||"1"==n.getAttribute("math");B=n.getAttribute("backgroundImage");null!=B?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(B)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&
-this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==n.getAttribute("shadow"),!1);if(B=n.getAttribute("extFonts"))try{for(B=B.split("|").map(function(P){P=P.split("^");return{name:P[0],url:P[1]}}),K=0;K<B.length;K++)this.graph.addExtFont(B[K].name,B[K].url)}catch(P){console.log("ExtFonts format error: "+P.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||
-"Invalid data",toString:function(){return this.message}};};var f=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(n,B){n=null!=n?n:!0;var K=f.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&K.setAttribute("style",this.graph.currentStyle);var Q=this.graph.getBackgroundImageObject(this.graph.backgroundImage,B);null!=Q&&K.setAttribute("backgroundImage",JSON.stringify(Q));K.setAttribute("math",this.graph.mathEnabled?"1":"0");K.setAttribute("shadow",
-this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(Q=this.graph.extFonts.map(function(P){return P.name+"^"+P.url}),K.setAttribute("extFonts",Q.join("|")));return K};Editor.prototype.isDataSvg=function(n){try{var B=mxUtils.parseXml(n).documentElement.getAttribute("content");if(null!=B&&(null!=B&&"<"!=B.charAt(0)&&"%"!=B.charAt(0)&&(B=unescape(window.atob?atob(B):Base64.decode(cont,B))),null!=B&&"%"==B.charAt(0)&&(B=decodeURIComponent(B)),null!=B&&0<B.length)){var K=
-mxUtils.parseXml(B).documentElement;return"mxfile"==K.nodeName||"mxGraphModel"==K.nodeName}}catch(Q){}return!1};Editor.prototype.extractGraphModel=function(n,B,K){return Editor.extractGraphModel.apply(this,arguments)};var l=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();
-l.apply(this,arguments)};var d=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){d.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(n,B){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){n=null!=n?n:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(P){try{MathJax.typesetClear([P]),
-MathJax.typeset([P]),Editor.onMathJaxDone()}catch(T){MathJax.typesetClear([P]),null!=T.retry?T.retry.then(function(){MathJax.typesetPromise([P]).then(Editor.onMathJaxDone)}):null!=window.console&&console.log("Error in MathJax: "+T.toString())}};window.MathJax=null!=B?B:{loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath"]},startup:{pageReady:function(){for(var P=0;P<Editor.mathJaxQueue.length;P++)Editor.doMathJaxRender(Editor.mathJaxQueue[P])}}};
-Editor.MathJaxRender=function(P){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(P):Editor.mathJaxQueue.push(P)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};Editor.onMathJaxDone=function(){};var K=Editor.prototype.init;Editor.prototype.init=function(){K.apply(this,arguments);var P=mxUtils.bind(this,function(T,V){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,
-P);this.graph.addListener(mxEvent.REFRESH,P)};B=document.getElementsByTagName("script");if(null!=B&&0<B.length){var Q=document.createElement("script");Q.setAttribute("type","text/javascript");Q.setAttribute("src",n);B[0].parentNode.appendChild(Q)}}};Editor.prototype.csvToArray=function(n){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(n))return null;
-var B=[];n.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(K,Q,P,T){void 0!==Q?B.push(Q.replace(/\\'/g,"'")):void 0!==P?B.push(P.replace(/\\"/g,'"')):void 0!==T&&B.push(T);return""});/,\s*$/.test(n)&&B.push("");return B};Editor.prototype.isCorsEnabledForUrl=function(n){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||n.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&
-null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(n)||"https://raw.githubusercontent.com/"===n.substring(0,34)||"https://fonts.googleapis.com/"===n.substring(0,29)||"https://fonts.gstatic.com/"===n.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var n=new mxUrlConverter;n.updateBaseUrl();var B=n.convert,K=this;n.convert=function(Q){if(null!=Q){var P="http://"==Q.substring(0,7)||"https://"==
-Q.substring(0,8);P&&!navigator.onLine?Q=Editor.svgBrokenImage.src:!P||Q.substring(0,n.baseUrl.length)==n.baseUrl||K.crossOriginImages&&K.isCorsEnabledForUrl(Q)?"chrome-extension://"==Q.substring(0,19)||mxClient.IS_CHROMEAPP||(Q=B.apply(this,arguments)):Q=PROXY_URL+"?url="+encodeURIComponent(Q)}return Q};return n};Editor.createSvgDataUri=function(n){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(n)))};Editor.prototype.convertImageToDataUri=function(n,B){try{var K=!0,Q=window.setTimeout(mxUtils.bind(this,
-function(){K=!1;B(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(n))mxUtils.get(n,mxUtils.bind(this,function(T){window.clearTimeout(Q);K&&B(Editor.createSvgDataUri(T.getText()))}),function(){window.clearTimeout(Q);K&&B(Editor.svgBrokenImage.src)});else{var P=new Image;this.crossOriginImages&&(P.crossOrigin="anonymous");P.onload=function(){window.clearTimeout(Q);if(K)try{var T=document.createElement("canvas"),V=T.getContext("2d");T.height=P.height;T.width=P.width;V.drawImage(P,0,0);
-B(T.toDataURL())}catch(S){B(Editor.svgBrokenImage.src)}};P.onerror=function(){window.clearTimeout(Q);K&&B(Editor.svgBrokenImage.src)};P.src=n}}catch(T){B(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(n,B,K,Q){null==Q&&(Q=this.createImageUrlConverter());var P=0,T=K||{};K=mxUtils.bind(this,function(V,S){V=n.getElementsByTagName(V);for(var Y=0;Y<V.length;Y++)mxUtils.bind(this,function(ca){try{if(null!=ca){var aa=Q.convert(ca.getAttribute(S));if(null!=aa&&"data:"!=aa.substring(0,
-5)){var da=T[aa];null==da?(P++,this.convertImageToDataUri(aa,function(ja){null!=ja&&(T[aa]=ja,ca.setAttribute(S,ja));P--;0==P&&B(n)})):ca.setAttribute(S,da)}else null!=aa&&ca.setAttribute(S,aa)}}catch(ja){}})(V[Y])});K("image","xlink:href");K("img","src");0==P&&B(n)};Editor.base64Encode=function(n){for(var B="",K=0,Q=n.length,P,T,V;K<Q;){P=n.charCodeAt(K++)&255;if(K==Q){B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>2);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&
-3)<<4);B+="==";break}T=n.charCodeAt(K++);if(K==Q){B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>2);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&3)<<4|(T&240)>>4);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&15)<<2);B+="=";break}V=n.charCodeAt(K++);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>2);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&
-3)<<4|(T&240)>>4);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&15)<<2|(V&192)>>6);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(V&63)}return B};Editor.prototype.loadUrl=function(n,B,K,Q,P,T,V,S){try{var Y=!V&&(Q||/(\.png)($|\?)/i.test(n)||/(\.jpe?g)($|\?)/i.test(n)||/(\.gif)($|\?)/i.test(n)||/(\.pdf)($|\?)/i.test(n));P=null!=P?P:!0;var ca=mxUtils.bind(this,function(){mxUtils.get(n,mxUtils.bind(this,function(aa){if(200<=aa.getStatus()&&
-299>=aa.getStatus()){if(null!=B){var da=aa.getText();if(Y){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){aa=mxUtilsBinaryToArray(aa.request.responseBody).toArray();da=Array(aa.length);for(var ja=0;ja<aa.length;ja++)da[ja]=String.fromCharCode(aa[ja]);da=da.join("")}T=null!=T?T:"data:image/png;base64,";da=T+Editor.base64Encode(da)}B(da)}}else null!=K&&(0==aa.getStatus()?K({message:mxResources.get("accessDenied")},aa):K({message:mxResources.get("error")+
-" "+aa.getStatus()},aa))}),function(aa){null!=K&&K({message:mxResources.get("error")+" "+aa.getStatus()})},Y,this.timeout,function(){P&&null!=K&&K({code:App.ERROR_TIMEOUT,retry:ca})},S)});ca()}catch(aa){null!=K&&K(aa)}};Editor.prototype.absoluteCssFonts=function(n){var B=null;if(null!=n){var K=n.split("url(");if(0<K.length){B=[K[0]];n=window.location.pathname;var Q=null!=n?n.lastIndexOf("/"):-1;0<=Q&&(n=n.substring(0,Q+1));Q=document.getElementsByTagName("base");var P=null;null!=Q&&0<Q.length&&(P=
-Q[0].getAttribute("href"));for(var T=1;T<K.length;T++)if(Q=K[T].indexOf(")"),0<Q){var V=Editor.trimCssUrl(K[T].substring(0,Q));this.graph.isRelativeUrl(V)&&(V=null!=P?P+V:window.location.protocol+"//"+window.location.hostname+("/"==V.charAt(0)?"":n)+V);B.push('url("'+V+'"'+K[T].substring(Q))}else B.push(K[T])}else B=[n]}return null!=B?B.join(""):null};Editor.prototype.mapFontUrl=function(n,B,K){/^https?:\/\//.test(B)&&!this.isCorsEnabledForUrl(B)&&(B=PROXY_URL+"?url="+encodeURIComponent(B));K(n,B)};
-Editor.prototype.embedCssFonts=function(n,B){var K=n.split("url("),Q=0;null==this.cachedFonts&&(this.cachedFonts={});var P=mxUtils.bind(this,function(){if(0==Q){for(var Y=[K[0]],ca=1;ca<K.length;ca++){var aa=K[ca].indexOf(")");Y.push('url("');Y.push(this.cachedFonts[Editor.trimCssUrl(K[ca].substring(0,aa))]);Y.push('"'+K[ca].substring(aa))}B(Y.join(""))}});if(0<K.length){for(n=1;n<K.length;n++){var T=K[n].indexOf(")"),V=null,S=K[n].indexOf("format(",T);0<S&&(V=Editor.trimCssUrl(K[n].substring(S+7,
-K[n].indexOf(")",S))));mxUtils.bind(this,function(Y){if(null==this.cachedFonts[Y]){this.cachedFonts[Y]=Y;Q++;var ca="application/x-font-ttf";if("svg"==V||/(\.svg)($|\?)/i.test(Y))ca="image/svg+xml";else if("otf"==V||"embedded-opentype"==V||/(\.otf)($|\?)/i.test(Y))ca="application/x-font-opentype";else if("woff"==V||/(\.woff)($|\?)/i.test(Y))ca="application/font-woff";else if("woff2"==V||/(\.woff2)($|\?)/i.test(Y))ca="application/font-woff2";else if("eot"==V||/(\.eot)($|\?)/i.test(Y))ca="application/vnd.ms-fontobject";
-else if("sfnt"==V||/(\.sfnt)($|\?)/i.test(Y))ca="application/font-sfnt";this.mapFontUrl(ca,Y,mxUtils.bind(this,function(aa,da){this.loadUrl(da,mxUtils.bind(this,function(ja){this.cachedFonts[Y]=ja;Q--;P()}),mxUtils.bind(this,function(ja){Q--;P()}),!0,null,"data:"+aa+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(K[n].substring(0,T)),V)}P()}else B(n)};Editor.prototype.loadFonts=function(n){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(B){this.resolvedFontCss=
-B;null!=n&&n()})):null!=n&&n()};Editor.prototype.createGoogleFontCache=function(){var n={},B;for(B in Graph.fontMapping)Graph.isCssFontUrl(B)&&(n[B]=Graph.fontMapping[B]);return n};Editor.prototype.embedExtFonts=function(n){var B=this.graph.getCustomFonts();if(0<B.length){var K=[],Q=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var P=mxUtils.bind(this,function(){0==Q&&this.embedCssFonts(K.join(""),n)}),T=0;T<B.length;T++)mxUtils.bind(this,function(V,S){Graph.isCssFontUrl(S)?
-null==this.cachedGoogleFonts[S]?(Q++,this.loadUrl(S,mxUtils.bind(this,function(Y){this.cachedGoogleFonts[S]=Y;K.push(Y+"\n");Q--;P()}),mxUtils.bind(this,function(Y){Q--;K.push("@import url("+S+");\n");P()}))):K.push(this.cachedGoogleFonts[S]+"\n"):K.push('@font-face {font-family: "'+V+'";src: url("'+S+'")}\n')})(B[T].name,B[T].url);P()}else n()};Editor.prototype.addMathCss=function(n){n=n.getElementsByTagName("defs");if(null!=n&&0<n.length)for(var B=document.getElementsByTagName("style"),K=0;K<B.length;K++){var Q=
-mxUtils.getTextContent(B[K]);0>Q.indexOf("mxPageSelector")&&0<Q.indexOf("MathJax")&&n[0].appendChild(B[K].cloneNode(!0))}};Editor.prototype.addFontCss=function(n,B){B=null!=B?B:this.absoluteCssFonts(this.fontCss);if(null!=B){var K=n.getElementsByTagName("defs"),Q=n.ownerDocument;0==K.length?(K=null!=Q.createElementNS?Q.createElementNS(mxConstants.NS_SVG,"defs"):Q.createElement("defs"),null!=n.firstChild?n.insertBefore(K,n.firstChild):n.appendChild(K)):K=K[0];n=null!=Q.createElementNS?Q.createElementNS(mxConstants.NS_SVG,
-"style"):Q.createElement("style");n.setAttribute("type","text/css");mxUtils.setTextContent(n,B);K.appendChild(n)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(n,B,K){var Q=mxClient.IS_FF?8192:16384;return Math.min(K,Math.min(Q/n,Q/B))};Editor.prototype.exportToCanvas=function(n,B,K,Q,P,T,V,S,Y,ca,aa,da,ja,ha,Z,Da,Ga,Ba){try{T=null!=T?T:!0;V=null!=V?V:!0;da=null!=da?da:this.graph;ja=null!=ja?ja:0;var Ha=
-Y?null:da.background;Ha==mxConstants.NONE&&(Ha=null);null==Ha&&(Ha=Q);null==Ha&&0==Y&&(Ha=Da?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(da.getSvg(null,null,ja,ha,null,V,null,null,null,ca,null,Da,Ga,Ba),mxUtils.bind(this,function(pa){try{var Na=new Image;Na.onload=mxUtils.bind(this,function(){try{var ya=function(){mxClient.IS_SF?window.setTimeout(function(){xa.drawImage(Na,0,0);n(Ja,pa)},0):(xa.drawImage(Na,0,0),n(Ja,pa))},Ja=document.createElement("canvas"),Fa=parseInt(pa.getAttribute("width")),
-Pa=parseInt(pa.getAttribute("height"));S=null!=S?S:1;null!=B&&(S=T?Math.min(1,Math.min(3*B/(4*Pa),B/Fa)):B/Fa);S=this.getMaxCanvasScale(Fa,Pa,S);Fa=Math.ceil(S*Fa);Pa=Math.ceil(S*Pa);Ja.setAttribute("width",Fa);Ja.setAttribute("height",Pa);var xa=Ja.getContext("2d");null!=Ha&&(xa.beginPath(),xa.rect(0,0,Fa,Pa),xa.fillStyle=Ha,xa.fill());1!=S&&xa.scale(S,S);if(Z){var za=da.view,ua=za.scale;za.scale=1;var Aa=btoa(unescape(encodeURIComponent(za.createSvgGrid(za.gridColor))));za.scale=ua;Aa="data:image/svg+xml;base64,"+
-Aa;var ea=da.gridSize*za.gridSteps*S,wa=da.getGraphBounds(),ta=za.translate.x*ua,sa=za.translate.y*ua,ra=ta+(wa.x-ta)/ua-ja,va=sa+(wa.y-sa)/ua-ja,ia=new Image;ia.onload=function(){try{for(var ma=-Math.round(ea-mxUtils.mod((ta-ra)*S,ea)),ba=-Math.round(ea-mxUtils.mod((sa-va)*S,ea));ma<Fa;ma+=ea)for(var fa=ba;fa<Pa;fa+=ea)xa.drawImage(ia,ma/S,fa/S);ya()}catch(na){null!=P&&P(na)}};ia.onerror=function(ma){null!=P&&P(ma)};ia.src=Aa}else ya()}catch(ma){null!=P&&P(ma)}});Na.onerror=function(ya){null!=P&&
-P(ya)};ca&&this.graph.addSvgShadow(pa);this.graph.mathEnabled&&this.addMathCss(pa);var La=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(pa,this.resolvedFontCss),Na.src=Editor.createSvgDataUri(mxUtils.getXml(pa))}catch(ya){null!=P&&P(ya)}});this.embedExtFonts(mxUtils.bind(this,function(ya){try{null!=ya&&this.addFontCss(pa,ya),this.loadFonts(La)}catch(Ja){null!=P&&P(Ja)}}))}catch(ya){null!=P&&P(ya)}}),K,aa)}catch(pa){null!=P&&P(pa)}};Editor.crcTable=[];for(var t=0;256>
-t;t++)for(var u=t,E=0;8>E;E++)u=1==(u&1)?3988292384^u>>>1:u>>>1,Editor.crcTable[t]=u;Editor.updateCRC=function(n,B,K,Q){for(var P=0;P<Q;P++)n=Editor.crcTable[(n^B.charCodeAt(K+P))&255]^n>>>8;return n};Editor.crc32=function(n){for(var B=-1,K=0;K<n.length;K++)B=B>>>8^Editor.crcTable[(B^n.charCodeAt(K))&255];return(B^-1)>>>0};Editor.writeGraphModelToPng=function(n,B,K,Q,P){function T(aa,da){var ja=Y;Y+=da;return aa.substring(ja,Y)}function V(aa){aa=T(aa,4);return aa.charCodeAt(3)+(aa.charCodeAt(2)<<
-8)+(aa.charCodeAt(1)<<16)+(aa.charCodeAt(0)<<24)}function S(aa){return String.fromCharCode(aa>>24&255,aa>>16&255,aa>>8&255,aa&255)}n=n.substring(n.indexOf(",")+1);n=window.atob?atob(n):Base64.decode(n,!0);var Y=0;if(T(n,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=P&&P();else if(T(n,4),"IHDR"!=T(n,4))null!=P&&P();else{T(n,17);P=n.substring(0,Y);do{var ca=V(n);if("IDAT"==T(n,4)){P=n.substring(0,Y-8);"pHYs"==B&&"dpi"==K?(K=Math.round(Q/.0254),K=S(K)+S(K)+String.fromCharCode(1)):
-K=K+String.fromCharCode(0)+("zTXt"==B?String.fromCharCode(0):"")+Q;Q=4294967295;Q=Editor.updateCRC(Q,B,0,4);Q=Editor.updateCRC(Q,K,0,K.length);P+=S(K.length)+B+K+S(Q^4294967295);P+=n.substring(Y-8,n.length);break}P+=n.substring(Y-8,Y-4+ca);T(n,ca);T(n,4)}while(ca);return"data:image/png;base64,"+(window.btoa?btoa(P):Base64.encode(P,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var c=ColorDialog.addRecentColor;ColorDialog.addRecentColor=
+mxResources.get("invalidOrMissingFile"));if(B)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[n],"cause",[B]),Error(mxResources.get("notADiagramFile")+" ("+B+")");if("mxGraphModel"==n.nodeName){B=n.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=B&&""!=B)B!=this.graph.currentStyle&&(K=null!=this.graph.themes?this.graph.themes[B]:mxUtils.load(STYLE_PATH+"/"+B+".xml").getDocumentElement(),null!=K&&(R=new mxCodec(K.ownerDocument),R.decode(K,this.graph.getStylesheet())));
+else{var K=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=K){var R=new mxCodec(K.ownerDocument);R.decode(K,this.graph.getStylesheet())}}this.graph.currentStyle=B;this.graph.mathEnabled="1"==urlParams.math||"1"==n.getAttribute("math");B=n.getAttribute("backgroundImage");null!=B?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(B)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&
+this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==n.getAttribute("shadow"),!1);if(B=n.getAttribute("extFonts"))try{for(B=B.split("|").map(function(O){O=O.split("^");return{name:O[0],url:O[1]}}),K=0;K<B.length;K++)this.graph.addExtFont(B[K].name,B[K].url)}catch(O){console.log("ExtFonts format error: "+O.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||
+"Invalid data",toString:function(){return this.message}};};var f=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(n,B){n=null!=n?n:!0;var K=f.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&K.setAttribute("style",this.graph.currentStyle);var R=this.graph.getBackgroundImageObject(this.graph.backgroundImage,B);null!=R&&K.setAttribute("backgroundImage",JSON.stringify(R));K.setAttribute("math",this.graph.mathEnabled?"1":"0");K.setAttribute("shadow",
+this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(R=this.graph.extFonts.map(function(O){return O.name+"^"+O.url}),K.setAttribute("extFonts",R.join("|")));return K};Editor.prototype.isDataSvg=function(n){try{var B=mxUtils.parseXml(n).documentElement.getAttribute("content");if(null!=B&&(null!=B&&"<"!=B.charAt(0)&&"%"!=B.charAt(0)&&(B=unescape(window.atob?atob(B):Base64.decode(cont,B))),null!=B&&"%"==B.charAt(0)&&(B=decodeURIComponent(B)),null!=B&&0<B.length)){var K=
+mxUtils.parseXml(B).documentElement;return"mxfile"==K.nodeName||"mxGraphModel"==K.nodeName}}catch(R){}return!1};Editor.prototype.extractGraphModel=function(n,B,K){return Editor.extractGraphModel.apply(this,arguments)};var l=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();
+l.apply(this,arguments)};var d=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){d.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(n,B){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){n=null!=n?n:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(O){try{MathJax.typesetClear([O]),
+MathJax.typeset([O]),Editor.onMathJaxDone()}catch(U){MathJax.typesetClear([O]),null!=U.retry?U.retry.then(function(){MathJax.typesetPromise([O]).then(Editor.onMathJaxDone)}):null!=window.console&&console.log("Error in MathJax: "+U.toString())}};window.MathJax=null!=B?B:{loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath"]},startup:{pageReady:function(){for(var O=0;O<Editor.mathJaxQueue.length;O++)Editor.doMathJaxRender(Editor.mathJaxQueue[O])}}};
+Editor.MathJaxRender=function(O){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(O):Editor.mathJaxQueue.push(O)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};Editor.onMathJaxDone=function(){};var K=Editor.prototype.init;Editor.prototype.init=function(){K.apply(this,arguments);var O=mxUtils.bind(this,function(U,S){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,
+O);this.graph.addListener(mxEvent.REFRESH,O)};B=document.getElementsByTagName("script");if(null!=B&&0<B.length){var R=document.createElement("script");R.setAttribute("type","text/javascript");R.setAttribute("src",n);B[0].parentNode.appendChild(R)}}};Editor.prototype.csvToArray=function(n){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(n))return null;
+var B=[];n.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(K,R,O,U){void 0!==R?B.push(R.replace(/\\'/g,"'")):void 0!==O?B.push(O.replace(/\\"/g,'"')):void 0!==U&&B.push(U);return""});/,\s*$/.test(n)&&B.push("");return B};Editor.prototype.isCorsEnabledForUrl=function(n){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||n.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&
+null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(n)||"https://raw.githubusercontent.com/"===n.substring(0,34)||"https://fonts.googleapis.com/"===n.substring(0,29)||"https://fonts.gstatic.com/"===n.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var n=new mxUrlConverter;n.updateBaseUrl();var B=n.convert,K=this;n.convert=function(R){if(null!=R){var O="http://"==R.substring(0,7)||"https://"==
+R.substring(0,8);O&&!navigator.onLine?R=Editor.svgBrokenImage.src:!O||R.substring(0,n.baseUrl.length)==n.baseUrl||K.crossOriginImages&&K.isCorsEnabledForUrl(R)?"chrome-extension://"==R.substring(0,19)||mxClient.IS_CHROMEAPP||(R=B.apply(this,arguments)):R=PROXY_URL+"?url="+encodeURIComponent(R)}return R};return n};Editor.createSvgDataUri=function(n){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(n)))};Editor.prototype.convertImageToDataUri=function(n,B){try{var K=!0,R=window.setTimeout(mxUtils.bind(this,
+function(){K=!1;B(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(n))mxUtils.get(n,mxUtils.bind(this,function(U){window.clearTimeout(R);K&&B(Editor.createSvgDataUri(U.getText()))}),function(){window.clearTimeout(R);K&&B(Editor.svgBrokenImage.src)});else{var O=new Image;this.crossOriginImages&&(O.crossOrigin="anonymous");O.onload=function(){window.clearTimeout(R);if(K)try{var U=document.createElement("canvas"),S=U.getContext("2d");U.height=O.height;U.width=O.width;S.drawImage(O,0,0);
+B(U.toDataURL())}catch(T){B(Editor.svgBrokenImage.src)}};O.onerror=function(){window.clearTimeout(R);K&&B(Editor.svgBrokenImage.src)};O.src=n}}catch(U){B(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(n,B,K,R){null==R&&(R=this.createImageUrlConverter());var O=0,U=K||{};K=mxUtils.bind(this,function(S,T){S=n.getElementsByTagName(S);for(var Y=0;Y<S.length;Y++)mxUtils.bind(this,function(ba){try{if(null!=ba){var aa=R.convert(ba.getAttribute(T));if(null!=aa&&"data:"!=aa.substring(0,
+5)){var da=U[aa];null==da?(O++,this.convertImageToDataUri(aa,function(ha){null!=ha&&(U[aa]=ha,ba.setAttribute(T,ha));O--;0==O&&B(n)})):ba.setAttribute(T,da)}else null!=aa&&ba.setAttribute(T,aa)}}catch(ha){}})(S[Y])});K("image","xlink:href");K("img","src");0==O&&B(n)};Editor.base64Encode=function(n){for(var B="",K=0,R=n.length,O,U,S;K<R;){O=n.charCodeAt(K++)&255;if(K==R){B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&
+3)<<4);B+="==";break}U=n.charCodeAt(K++);if(K==R){B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&3)<<4|(U&240)>>4);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((U&15)<<2);B+="=";break}S=n.charCodeAt(K++);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(O>>2);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&
+3)<<4|(U&240)>>4);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((U&15)<<2|(S&192)>>6);B+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(S&63)}return B};Editor.prototype.loadUrl=function(n,B,K,R,O,U,S,T){try{var Y=!S&&(R||/(\.png)($|\?)/i.test(n)||/(\.jpe?g)($|\?)/i.test(n)||/(\.gif)($|\?)/i.test(n)||/(\.pdf)($|\?)/i.test(n));O=null!=O?O:!0;var ba=mxUtils.bind(this,function(){mxUtils.get(n,mxUtils.bind(this,function(aa){if(200<=aa.getStatus()&&
+299>=aa.getStatus()){if(null!=B){var da=aa.getText();if(Y){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){aa=mxUtilsBinaryToArray(aa.request.responseBody).toArray();da=Array(aa.length);for(var ha=0;ha<aa.length;ha++)da[ha]=String.fromCharCode(aa[ha]);da=da.join("")}U=null!=U?U:"data:image/png;base64,";da=U+Editor.base64Encode(da)}B(da)}}else null!=K&&(0==aa.getStatus()?K({message:mxResources.get("accessDenied")},aa):404==aa.getStatus()?
+K({code:aa.getStatus()},aa):K({message:mxResources.get("error")+" "+aa.getStatus()},aa))}),function(aa){null!=K&&K({message:mxResources.get("error")+" "+aa.getStatus()})},Y,this.timeout,function(){O&&null!=K&&K({code:App.ERROR_TIMEOUT,retry:ba})},T)});ba()}catch(aa){null!=K&&K(aa)}};Editor.prototype.absoluteCssFonts=function(n){var B=null;if(null!=n){var K=n.split("url(");if(0<K.length){B=[K[0]];n=window.location.pathname;var R=null!=n?n.lastIndexOf("/"):-1;0<=R&&(n=n.substring(0,R+1));R=document.getElementsByTagName("base");
+var O=null;null!=R&&0<R.length&&(O=R[0].getAttribute("href"));for(var U=1;U<K.length;U++)if(R=K[U].indexOf(")"),0<R){var S=Editor.trimCssUrl(K[U].substring(0,R));this.graph.isRelativeUrl(S)&&(S=null!=O?O+S:window.location.protocol+"//"+window.location.hostname+("/"==S.charAt(0)?"":n)+S);B.push('url("'+S+'"'+K[U].substring(R))}else B.push(K[U])}else B=[n]}return null!=B?B.join(""):null};Editor.prototype.mapFontUrl=function(n,B,K){/^https?:\/\//.test(B)&&!this.isCorsEnabledForUrl(B)&&(B=PROXY_URL+"?url="+
+encodeURIComponent(B));K(n,B)};Editor.prototype.embedCssFonts=function(n,B){var K=n.split("url("),R=0;null==this.cachedFonts&&(this.cachedFonts={});var O=mxUtils.bind(this,function(){if(0==R){for(var Y=[K[0]],ba=1;ba<K.length;ba++){var aa=K[ba].indexOf(")");Y.push('url("');Y.push(this.cachedFonts[Editor.trimCssUrl(K[ba].substring(0,aa))]);Y.push('"'+K[ba].substring(aa))}B(Y.join(""))}});if(0<K.length){for(n=1;n<K.length;n++){var U=K[n].indexOf(")"),S=null,T=K[n].indexOf("format(",U);0<T&&(S=Editor.trimCssUrl(K[n].substring(T+
+7,K[n].indexOf(")",T))));mxUtils.bind(this,function(Y){if(null==this.cachedFonts[Y]){this.cachedFonts[Y]=Y;R++;var ba="application/x-font-ttf";if("svg"==S||/(\.svg)($|\?)/i.test(Y))ba="image/svg+xml";else if("otf"==S||"embedded-opentype"==S||/(\.otf)($|\?)/i.test(Y))ba="application/x-font-opentype";else if("woff"==S||/(\.woff)($|\?)/i.test(Y))ba="application/font-woff";else if("woff2"==S||/(\.woff2)($|\?)/i.test(Y))ba="application/font-woff2";else if("eot"==S||/(\.eot)($|\?)/i.test(Y))ba="application/vnd.ms-fontobject";
+else if("sfnt"==S||/(\.sfnt)($|\?)/i.test(Y))ba="application/font-sfnt";this.mapFontUrl(ba,Y,mxUtils.bind(this,function(aa,da){this.loadUrl(da,mxUtils.bind(this,function(ha){this.cachedFonts[Y]=ha;R--;O()}),mxUtils.bind(this,function(ha){R--;O()}),!0,null,"data:"+aa+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(K[n].substring(0,U)),S)}O()}else B(n)};Editor.prototype.loadFonts=function(n){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(B){this.resolvedFontCss=
+B;null!=n&&n()})):null!=n&&n()};Editor.prototype.createGoogleFontCache=function(){var n={},B;for(B in Graph.fontMapping)Graph.isCssFontUrl(B)&&(n[B]=Graph.fontMapping[B]);return n};Editor.prototype.embedExtFonts=function(n){var B=this.graph.getCustomFonts();if(0<B.length){var K=[],R=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var O=mxUtils.bind(this,function(){0==R&&this.embedCssFonts(K.join(""),n)}),U=0;U<B.length;U++)mxUtils.bind(this,function(S,T){Graph.isCssFontUrl(T)?
+null==this.cachedGoogleFonts[T]?(R++,this.loadUrl(T,mxUtils.bind(this,function(Y){this.cachedGoogleFonts[T]=Y;K.push(Y+"\n");R--;O()}),mxUtils.bind(this,function(Y){R--;K.push("@import url("+T+");\n");O()}))):K.push(this.cachedGoogleFonts[T]+"\n"):K.push('@font-face {font-family: "'+S+'";src: url("'+T+'")}\n')})(B[U].name,B[U].url);O()}else n()};Editor.prototype.addMathCss=function(n){n=n.getElementsByTagName("defs");if(null!=n&&0<n.length)for(var B=document.getElementsByTagName("style"),K=0;K<B.length;K++){var R=
+mxUtils.getTextContent(B[K]);0>R.indexOf("mxPageSelector")&&0<R.indexOf("MathJax")&&n[0].appendChild(B[K].cloneNode(!0))}};Editor.prototype.addFontCss=function(n,B){B=null!=B?B:this.absoluteCssFonts(this.fontCss);if(null!=B){var K=n.getElementsByTagName("defs"),R=n.ownerDocument;0==K.length?(K=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"defs"):R.createElement("defs"),null!=n.firstChild?n.insertBefore(K,n.firstChild):n.appendChild(K)):K=K[0];n=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,
+"style"):R.createElement("style");n.setAttribute("type","text/css");mxUtils.setTextContent(n,B);K.appendChild(n)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(n,B,K){var R=mxClient.IS_FF?8192:16384;return Math.min(K,Math.min(R/n,R/B))};Editor.prototype.exportToCanvas=function(n,B,K,R,O,U,S,T,Y,ba,aa,da,ha,ma,Z,Fa,Ca,Ba){try{U=null!=U?U:!0;S=null!=S?S:!0;da=null!=da?da:this.graph;ha=null!=ha?ha:0;var Ga=
+Y?null:da.background;Ga==mxConstants.NONE&&(Ga=null);null==Ga&&(Ga=R);null==Ga&&0==Y&&(Ga=Fa?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(da.getSvg(null,null,ha,ma,null,S,null,null,null,ba,null,Fa,Ca,Ba),mxUtils.bind(this,function(sa){try{var Ma=new Image;Ma.onload=mxUtils.bind(this,function(){try{var za=function(){mxClient.IS_SF?window.setTimeout(function(){ya.drawImage(Ma,0,0);n(Ja,sa)},0):(ya.drawImage(Ma,0,0),n(Ja,sa))},Ja=document.createElement("canvas"),Ea=parseInt(sa.getAttribute("width")),
+Pa=parseInt(sa.getAttribute("height"));T=null!=T?T:1;null!=B&&(T=U?Math.min(1,Math.min(3*B/(4*Pa),B/Ea)):B/Ea);T=this.getMaxCanvasScale(Ea,Pa,T);Ea=Math.ceil(T*Ea);Pa=Math.ceil(T*Pa);Ja.setAttribute("width",Ea);Ja.setAttribute("height",Pa);var ya=Ja.getContext("2d");null!=Ga&&(ya.beginPath(),ya.rect(0,0,Ea,Pa),ya.fillStyle=Ga,ya.fill());1!=T&&ya.scale(T,T);if(Z){var Aa=da.view,wa=Aa.scale;Aa.scale=1;var Ia=btoa(unescape(encodeURIComponent(Aa.createSvgGrid(Aa.gridColor))));Aa.scale=wa;Ia="data:image/svg+xml;base64,"+
+Ia;var ia=da.gridSize*Aa.gridSteps*T,ja=da.getGraphBounds(),ua=Aa.translate.x*wa,va=Aa.translate.y*wa,qa=ua+(ja.x-ua)/wa-ha,xa=va+(ja.y-va)/wa-ha,ea=new Image;ea.onload=function(){try{for(var na=-Math.round(ia-mxUtils.mod((ua-qa)*T,ia)),pa=-Math.round(ia-mxUtils.mod((va-xa)*T,ia));na<Ea;na+=ia)for(var ca=pa;ca<Pa;ca+=ia)ya.drawImage(ea,na/T,ca/T);za()}catch(fa){null!=O&&O(fa)}};ea.onerror=function(na){null!=O&&O(na)};ea.src=Ia}else za()}catch(na){null!=O&&O(na)}});Ma.onerror=function(za){null!=O&&
+O(za)};ba&&this.graph.addSvgShadow(sa);this.graph.mathEnabled&&this.addMathCss(sa);var Na=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(sa,this.resolvedFontCss),Ma.src=Editor.createSvgDataUri(mxUtils.getXml(sa))}catch(za){null!=O&&O(za)}});this.embedExtFonts(mxUtils.bind(this,function(za){try{null!=za&&this.addFontCss(sa,za),this.loadFonts(Na)}catch(Ja){null!=O&&O(Ja)}}))}catch(za){null!=O&&O(za)}}),K,aa)}catch(sa){null!=O&&O(sa)}};Editor.crcTable=[];for(var t=0;256>
+t;t++)for(var u=t,E=0;8>E;E++)u=1==(u&1)?3988292384^u>>>1:u>>>1,Editor.crcTable[t]=u;Editor.updateCRC=function(n,B,K,R){for(var O=0;O<R;O++)n=Editor.crcTable[(n^B.charCodeAt(K+O))&255]^n>>>8;return n};Editor.crc32=function(n){for(var B=-1,K=0;K<n.length;K++)B=B>>>8^Editor.crcTable[(B^n.charCodeAt(K))&255];return(B^-1)>>>0};Editor.writeGraphModelToPng=function(n,B,K,R,O){function U(aa,da){var ha=Y;Y+=da;return aa.substring(ha,Y)}function S(aa){aa=U(aa,4);return aa.charCodeAt(3)+(aa.charCodeAt(2)<<
+8)+(aa.charCodeAt(1)<<16)+(aa.charCodeAt(0)<<24)}function T(aa){return String.fromCharCode(aa>>24&255,aa>>16&255,aa>>8&255,aa&255)}n=n.substring(n.indexOf(",")+1);n=window.atob?atob(n):Base64.decode(n,!0);var Y=0;if(U(n,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=O&&O();else if(U(n,4),"IHDR"!=U(n,4))null!=O&&O();else{U(n,17);O=n.substring(0,Y);do{var ba=S(n);if("IDAT"==U(n,4)){O=n.substring(0,Y-8);"pHYs"==B&&"dpi"==K?(K=Math.round(R/.0254),K=T(K)+T(K)+String.fromCharCode(1)):
+K=K+String.fromCharCode(0)+("zTXt"==B?String.fromCharCode(0):"")+R;R=4294967295;R=Editor.updateCRC(R,B,0,4);R=Editor.updateCRC(R,K,0,K.length);O+=T(K.length)+B+K+T(R^4294967295);O+=n.substring(Y-8,n.length);break}O+=n.substring(Y-8,Y-4+ba);U(n,ba);U(n,4)}while(ba);return"data:image/png;base64,"+(window.btoa?btoa(O):Base64.encode(O,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var c=ColorDialog.addRecentColor;ColorDialog.addRecentColor=
function(n,B){c.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var e=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){e.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(n,B){var K=null;null!=n.editor.graph.getModel().getParent(B)?K=B.getId():null!=n.currentPage&&(K=n.currentPage.getId());return K});if(null!=window.StyleFormatPanel){var g=
Format.prototype.init;Format.prototype.init=function(){g.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var k=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?k.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var n=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=n&&n.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=
-function(n){return!1};var m=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(n){n=m.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var B=this.editorUi,K=B.editor.graph,Q=this.createOption(mxResources.get("shadow"),function(){return K.shadowVisible},function(P){var T=new ChangePageSetup(B);T.ignoreColor=!0;T.ignoreImage=!0;T.shadowVisible=P;K.model.execute(T)},{install:function(P){this.listener=function(){P(K.shadowVisible)};
-B.addListener("shadowVisibleChanged",this.listener)},destroy:function(){B.removeListener(this.listener)}});Editor.enableShadowOption||(Q.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(Q,60));n.appendChild(Q)}return n};var p=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(n){n=p.apply(this,arguments);var B=this.editorUi,K=B.editor.graph;if(K.isEnabled()){var Q=B.getCurrentFile();if(null!=Q&&Q.isAutosaveOptional()){var P=
-this.createOption(mxResources.get("autosave"),function(){return B.editor.autosave},function(V){B.editor.setAutosave(V);B.editor.autosave&&Q.isModified()&&Q.fileChanged()},{install:function(V){this.listener=function(){V(B.editor.autosave)};B.editor.addListener("autosaveChanged",this.listener)},destroy:function(){B.editor.removeListener(this.listener)}});n.appendChild(P)}}if(this.isMathOptionVisible()&&K.isEnabled()&&"undefined"!==typeof MathJax){P=this.createOption(mxResources.get("mathematicalTypesetting"),
-function(){return K.mathEnabled},function(V){B.actions.get("mathematicalTypesetting").funct()},{install:function(V){this.listener=function(){V(K.mathEnabled)};B.addListener("mathEnabledChanged",this.listener)},destroy:function(){B.removeListener(this.listener)}});P.style.paddingTop="5px";n.appendChild(P);var T=B.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");T.style.position="relative";T.style.marginLeft="6px";T.style.top="2px";P.appendChild(T)}return n};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=
+function(n){return!1};var m=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(n){n=m.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var B=this.editorUi,K=B.editor.graph,R=this.createOption(mxResources.get("shadow"),function(){return K.shadowVisible},function(O){var U=new ChangePageSetup(B);U.ignoreColor=!0;U.ignoreImage=!0;U.shadowVisible=O;K.model.execute(U)},{install:function(O){this.listener=function(){O(K.shadowVisible)};
+B.addListener("shadowVisibleChanged",this.listener)},destroy:function(){B.removeListener(this.listener)}});Editor.enableShadowOption||(R.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(R,60));n.appendChild(R)}return n};var p=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(n){n=p.apply(this,arguments);var B=this.editorUi,K=B.editor.graph;if(K.isEnabled()){var R=B.getCurrentFile();if(null!=R&&R.isAutosaveOptional()){var O=
+this.createOption(mxResources.get("autosave"),function(){return B.editor.autosave},function(S){B.editor.setAutosave(S);B.editor.autosave&&R.isModified()&&R.fileChanged()},{install:function(S){this.listener=function(){S(B.editor.autosave)};B.editor.addListener("autosaveChanged",this.listener)},destroy:function(){B.editor.removeListener(this.listener)}});n.appendChild(O)}}if(this.isMathOptionVisible()&&K.isEnabled()&&"undefined"!==typeof MathJax){O=this.createOption(mxResources.get("mathematicalTypesetting"),
+function(){return K.mathEnabled},function(S){B.actions.get("mathematicalTypesetting").funct()},{install:function(S){this.listener=function(){S(K.mathEnabled)};B.addListener("mathEnabledChanged",this.listener)},destroy:function(){B.removeListener(this.listener)}});O.style.paddingTop="5px";n.appendChild(O);var U=B.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");U.style.position="relative";U.style.marginLeft="6px";U.style.top="2px";O.appendChild(U)}return n};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=
[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",
dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",
type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",
@@ -11585,92 +11581,92 @@ defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName
stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",
font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},
{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=
-function(n,B,K){if(null!=B){var Q=function(T){if(null!=T)if(K)for(var V=0;V<T.length;V++)B[T[V].name]=T[V];else for(var S in B){var Y=!1;for(V=0;V<T.length;V++)if(T[V].name==S&&T[V].type==B[S].type){Y=!0;break}Y||delete B[S]}},P=this.editorUi.editor.graph.view.getState(n);null!=P&&null!=P.shape&&(P.shape.commonCustomPropAdded||(P.shape.commonCustomPropAdded=!0,P.shape.customProperties=P.shape.customProperties||[],P.cell.vertex?Array.prototype.push.apply(P.shape.customProperties,Editor.commonVertexProperties):
-Array.prototype.push.apply(P.shape.customProperties,Editor.commonEdgeProperties)),Q(P.shape.customProperties));n=n.getAttribute("customProperties");if(null!=n)try{Q(JSON.parse(n))}catch(T){}}};var v=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var n=this.editorUi.getSelectionState();"image"!=n.style.shape&&!n.containsLabel&&0<n.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));v.apply(this,arguments);if(Editor.enableCustomProperties){for(var B=
-{},K=n.vertices,Q=n.edges,P=0;P<K.length;P++)this.findCommonProperties(K[P],B,0==P);for(P=0;P<Q.length;P++)this.findCommonProperties(Q[P],B,0==K.length&&0==P);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(B).length&&this.container.appendChild(this.addProperties(this.createPanel(),B,n))}};var x=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(n){this.addActions(n,["copyStyle","pasteStyle"]);return x.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=
-!0;StyleFormatPanel.prototype.addProperties=function(n,B,K){function Q(xa,za,ua,Aa){da.getModel().beginUpdate();try{var ea=[],wa=[];if(null!=ua.index){for(var ta=[],sa=ua.parentRow.nextSibling;sa&&sa.getAttribute("data-pName")==xa;)ta.push(sa.getAttribute("data-pValue")),sa=sa.nextSibling;ua.index<ta.length?null!=Aa?ta.splice(Aa,1):ta[ua.index]=za:ta.push(za);null!=ua.size&&ta.length>ua.size&&(ta=ta.slice(0,ua.size));za=ta.join(",");null!=ua.countProperty&&(da.setCellStyles(ua.countProperty,ta.length,
-da.getSelectionCells()),ea.push(ua.countProperty),wa.push(ta.length))}da.setCellStyles(xa,za,da.getSelectionCells());ea.push(xa);wa.push(za);if(null!=ua.dependentProps)for(xa=0;xa<ua.dependentProps.length;xa++){var ra=ua.dependentPropsDefVal[xa],va=ua.dependentPropsVals[xa];if(va.length>za)va=va.slice(0,za);else for(var ia=va.length;ia<za;ia++)va.push(ra);va=va.join(",");da.setCellStyles(ua.dependentProps[xa],va,da.getSelectionCells());ea.push(ua.dependentProps[xa]);wa.push(va)}if("function"==typeof ua.onChange)ua.onChange(da,
-za);aa.editorUi.fireEvent(new mxEventObject("styleChanged","keys",ea,"values",wa,"cells",da.getSelectionCells()))}finally{da.getModel().endUpdate()}}function P(xa,za,ua){var Aa=mxUtils.getOffset(n,!0),ea=mxUtils.getOffset(xa,!0);za.style.position="absolute";za.style.left=ea.x-Aa.x+"px";za.style.top=ea.y-Aa.y+"px";za.style.width=xa.offsetWidth+"px";za.style.height=xa.offsetHeight-(ua?4:0)+"px";za.style.zIndex=5}function T(xa,za,ua){var Aa=document.createElement("div");Aa.style.width="32px";Aa.style.height=
-"4px";Aa.style.margin="2px";Aa.style.border="1px solid black";Aa.style.background=za&&"none"!=za?za:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(aa,function(ea){this.editorUi.pickColor(za,function(wa){Aa.style.background="none"==wa?"url('"+Dialog.prototype.noColorImage+"')":wa;Q(xa,wa,ua)});mxEvent.consume(ea)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(Aa);return btn}function V(xa,za,ua,Aa,ea,wa,ta){null!=za&&(za=za.split(","),
-ja.push({name:xa,values:za,type:ua,defVal:Aa,countProperty:ea,parentRow:wa,isDeletable:!0,flipBkg:ta}));btn=mxUtils.button("+",mxUtils.bind(aa,function(sa){for(var ra=wa,va=0;null!=ra.nextSibling;)if(ra.nextSibling.getAttribute("data-pName")==xa)ra=ra.nextSibling,va++;else break;var ia={type:ua,parentRow:wa,index:va,isDeletable:!0,defVal:Aa,countProperty:ea};va=ca(xa,"",ia,0==va%2,ta);Q(xa,Aa,ia);ra.parentNode.insertBefore(va,ra.nextSibling);mxEvent.consume(sa)}));btn.style.height="16px";btn.style.width=
-"25px";btn.className="geColorBtn";return btn}function S(xa,za,ua,Aa,ea,wa,ta){if(0<ea){var sa=Array(ea);za=null!=za?za.split(","):[];for(var ra=0;ra<ea;ra++)sa[ra]=null!=za[ra]?za[ra]:null!=Aa?Aa:"";ja.push({name:xa,values:sa,type:ua,defVal:Aa,parentRow:wa,flipBkg:ta,size:ea})}return document.createElement("div")}function Y(xa,za,ua){var Aa=document.createElement("input");Aa.type="checkbox";Aa.checked="1"==za;mxEvent.addListener(Aa,"change",function(){Q(xa,Aa.checked?"1":"0",ua)});return Aa}function ca(xa,
-za,ua,Aa,ea){var wa=ua.dispName,ta=ua.type,sa=document.createElement("tr");sa.className="gePropRow"+(ea?"Dark":"")+(Aa?"Alt":"")+" gePropNonHeaderRow";sa.setAttribute("data-pName",xa);sa.setAttribute("data-pValue",za);Aa=!1;null!=ua.index&&(sa.setAttribute("data-index",ua.index),wa=(null!=wa?wa:"")+"["+ua.index+"]",Aa=!0);var ra=document.createElement("td");ra.className="gePropRowCell";wa=mxResources.get(wa,null,wa);mxUtils.write(ra,wa);ra.setAttribute("title",wa);Aa&&(ra.style.textAlign="right");
-sa.appendChild(ra);ra=document.createElement("td");ra.className="gePropRowCell";if("color"==ta)ra.appendChild(T(xa,za,ua));else if("bool"==ta||"boolean"==ta)ra.appendChild(Y(xa,za,ua));else if("enum"==ta){var va=ua.enumList;for(ea=0;ea<va.length;ea++)if(wa=va[ea],wa.val==za){mxUtils.write(ra,mxResources.get(wa.dispName,null,wa.dispName));break}mxEvent.addListener(ra,"click",mxUtils.bind(aa,function(){var ia=document.createElement("select");P(ra,ia);for(var ma=0;ma<va.length;ma++){var ba=va[ma],fa=
-document.createElement("option");fa.value=mxUtils.htmlEntities(ba.val);mxUtils.write(fa,mxResources.get(ba.dispName,null,ba.dispName));ia.appendChild(fa)}ia.value=za;n.appendChild(ia);mxEvent.addListener(ia,"change",function(){var na=mxUtils.htmlEntities(ia.value);Q(xa,na,ua)});ia.focus();mxEvent.addListener(ia,"blur",function(){n.removeChild(ia)})}))}else"dynamicArr"==ta?ra.appendChild(V(xa,za,ua.subType,ua.subDefVal,ua.countProperty,sa,ea)):"staticArr"==ta?ra.appendChild(S(xa,za,ua.subType,ua.subDefVal,
-ua.size,sa,ea)):"readOnly"==ta?(ea=document.createElement("input"),ea.setAttribute("readonly",""),ea.value=za,ea.style.width="96px",ea.style.borderWidth="0px",ra.appendChild(ea)):(ra.innerHTML=mxUtils.htmlEntities(decodeURIComponent(za)),mxEvent.addListener(ra,"click",mxUtils.bind(aa,function(){function ia(){var ba=ma.value;ba=0==ba.length&&"string"!=ta?0:ba;ua.allowAuto&&(null!=ba.trim&&"auto"==ba.trim().toLowerCase()?(ba="auto",ta="string"):(ba=parseFloat(ba),ba=isNaN(ba)?0:ba));null!=ua.min&&ba<
-ua.min?ba=ua.min:null!=ua.max&&ba>ua.max&&(ba=ua.max);ba=encodeURIComponent(("int"==ta?parseInt(ba):ba)+"");Q(xa,ba,ua)}var ma=document.createElement("input");P(ra,ma,!0);ma.value=decodeURIComponent(za);ma.className="gePropEditor";"int"!=ta&&"float"!=ta||ua.allowAuto||(ma.type="number",ma.step="int"==ta?"1":"any",null!=ua.min&&(ma.min=parseFloat(ua.min)),null!=ua.max&&(ma.max=parseFloat(ua.max)));n.appendChild(ma);mxEvent.addListener(ma,"keypress",function(ba){13==ba.keyCode&&ia()});ma.focus();mxEvent.addListener(ma,
-"blur",function(){ia()})})));ua.isDeletable&&(ea=mxUtils.button("-",mxUtils.bind(aa,function(ia){Q(xa,"",ua,ua.index);mxEvent.consume(ia)})),ea.style.height="16px",ea.style.width="25px",ea.style.float="right",ea.className="geColorBtn",ra.appendChild(ea));sa.appendChild(ra);return sa}var aa=this,da=this.editorUi.editor.graph,ja=[];n.style.position="relative";n.style.padding="0";var ha=document.createElement("table");ha.className="geProperties";ha.style.whiteSpace="nowrap";ha.style.width="100%";var Z=
-document.createElement("tr");Z.className="gePropHeader";var Da=document.createElement("th");Da.className="gePropHeaderCell";var Ga=document.createElement("img");Ga.src=Sidebar.prototype.expandedImage;Ga.style.verticalAlign="middle";Da.appendChild(Ga);mxUtils.write(Da,mxResources.get("property"));Z.style.cursor="pointer";var Ba=function(){var xa=ha.querySelectorAll(".gePropNonHeaderRow");if(aa.editorUi.propertiesCollapsed){Ga.src=Sidebar.prototype.collapsedImage;var za="none";for(var ua=n.childNodes.length-
-1;0<=ua;ua--)try{var Aa=n.childNodes[ua],ea=Aa.nodeName.toUpperCase();"INPUT"!=ea&&"SELECT"!=ea||n.removeChild(Aa)}catch(wa){}}else Ga.src=Sidebar.prototype.expandedImage,za="";for(ua=0;ua<xa.length;ua++)xa[ua].style.display=za};mxEvent.addListener(Z,"click",function(){aa.editorUi.propertiesCollapsed=!aa.editorUi.propertiesCollapsed;Ba()});Z.appendChild(Da);Da=document.createElement("th");Da.className="gePropHeaderCell";Da.innerHTML=mxResources.get("value");Z.appendChild(Da);ha.appendChild(Z);var Ha=
-!1,pa=!1;Z=null;1==K.vertices.length&&0==K.edges.length?Z=K.vertices[0].id:0==K.vertices.length&&1==K.edges.length&&(Z=K.edges[0].id);null!=Z&&ha.appendChild(ca("id",mxUtils.htmlEntities(Z),{dispName:"ID",type:"readOnly"},!0,!1));for(var Na in B)if(Z=B[Na],"function"!=typeof Z.isVisible||Z.isVisible(K,this)){var La=null!=K.style[Na]?mxUtils.htmlEntities(K.style[Na]+""):null!=Z.getDefaultValue?Z.getDefaultValue(K,this):Z.defVal;if("separator"==Z.type)pa=!pa;else{if("staticArr"==Z.type)Z.size=parseInt(K.style[Z.sizeProperty]||
-B[Z.sizeProperty].defVal)||0;else if(null!=Z.dependentProps){var ya=Z.dependentProps,Ja=[],Fa=[];for(Da=0;Da<ya.length;Da++){var Pa=K.style[ya[Da]];Fa.push(B[ya[Da]].subDefVal);Ja.push(null!=Pa?Pa.split(","):[])}Z.dependentPropsDefVal=Fa;Z.dependentPropsVals=Ja}ha.appendChild(ca(Na,La,Z,Ha,pa));Ha=!Ha}}for(Da=0;Da<ja.length;Da++)for(Z=ja[Da],B=Z.parentRow,K=0;K<Z.values.length;K++)Na=ca(Z.name,Z.values[K],{type:Z.type,parentRow:Z.parentRow,isDeletable:Z.isDeletable,index:K,defVal:Z.defVal,countProperty:Z.countProperty,
-size:Z.size},0==K%2,Z.flipBkg),B.parentNode.insertBefore(Na,B.nextSibling),B=Na;n.appendChild(ha);Ba();return n};StyleFormatPanel.prototype.addStyles=function(n){function B(Z){mxEvent.addListener(Z,"mouseenter",function(){Z.style.opacity="1"});mxEvent.addListener(Z,"mouseleave",function(){Z.style.opacity="0.5"})}var K=this.editorUi,Q=K.editor.graph,P=document.createElement("div");P.style.whiteSpace="nowrap";P.style.paddingLeft="24px";P.style.paddingRight="20px";n.style.paddingLeft="16px";n.style.paddingBottom=
-"6px";n.style.position="relative";n.appendChild(P);var T="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(" "),V=document.createElement("div");V.style.whiteSpace="nowrap";V.style.position="relative";V.style.textAlign="center";V.style.width="210px";for(var S=[],Y=0;Y<this.defaultColorSchemes.length;Y++){var ca=document.createElement("div");ca.style.display="inline-block";ca.style.width=
-"6px";ca.style.height="6px";ca.style.marginLeft="4px";ca.style.marginRight="3px";ca.style.borderRadius="3px";ca.style.cursor="pointer";ca.style.background="transparent";ca.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(Z){mxEvent.addListener(ca,"click",mxUtils.bind(this,function(){aa(Z)}))})(Y);S.push(ca);V.appendChild(ca)}var aa=mxUtils.bind(this,function(Z){null!=S[Z]&&(null!=this.format.currentScheme&&null!=S[this.format.currentScheme]&&(S[this.format.currentScheme].style.background=
-"transparent"),this.format.currentScheme=Z,da(this.defaultColorSchemes[this.format.currentScheme]),S[this.format.currentScheme].style.background="#84d7ff")}),da=mxUtils.bind(this,function(Z){var Da=mxUtils.bind(this,function(Ba){var Ha=mxUtils.button("",mxUtils.bind(this,function(La){Q.getModel().beginUpdate();try{for(var ya=K.getSelectionState().cells,Ja=0;Ja<ya.length;Ja++){for(var Fa=Q.getModel().getStyle(ya[Ja]),Pa=0;Pa<T.length;Pa++)Fa=mxUtils.removeStylename(Fa,T[Pa]);var xa=Q.getModel().isVertex(ya[Ja])?
-Q.defaultVertexStyle:Q.defaultEdgeStyle;null!=Ba?(mxEvent.isShiftDown(La)||(Fa=""==Ba.fill?mxUtils.setStyle(Fa,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(Fa,mxConstants.STYLE_FILLCOLOR,Ba.fill||mxUtils.getValue(xa,mxConstants.STYLE_FILLCOLOR,null)),Fa=mxUtils.setStyle(Fa,mxConstants.STYLE_GRADIENTCOLOR,Ba.gradient||mxUtils.getValue(xa,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(La)||mxClient.IS_MAC&&mxEvent.isMetaDown(La)||!Q.getModel().isVertex(ya[Ja])||(Fa=mxUtils.setStyle(Fa,
-mxConstants.STYLE_FONTCOLOR,Ba.font||mxUtils.getValue(xa,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(La)||(Fa=""==Ba.stroke?mxUtils.setStyle(Fa,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(Fa,mxConstants.STYLE_STROKECOLOR,Ba.stroke||mxUtils.getValue(xa,mxConstants.STYLE_STROKECOLOR,null)))):(Fa=mxUtils.setStyle(Fa,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(xa,mxConstants.STYLE_FILLCOLOR,"#ffffff")),Fa=mxUtils.setStyle(Fa,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(xa,mxConstants.STYLE_STROKECOLOR,
-"#000000")),Fa=mxUtils.setStyle(Fa,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(xa,mxConstants.STYLE_GRADIENTCOLOR,null)),Q.getModel().isVertex(ya[Ja])&&(Fa=mxUtils.setStyle(Fa,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(xa,mxConstants.STYLE_FONTCOLOR,null))));Q.getModel().setStyle(ya[Ja],Fa)}}finally{Q.getModel().endUpdate()}}));Ha.className="geStyleButton";Ha.style.width="36px";Ha.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";Ha.style.margin="0px 6px 6px 0px";if(null!=Ba){var pa=
-"1"==urlParams.sketch?"2px solid":"1px solid";null!=Ba.gradient?mxClient.IS_IE&&10>document.documentMode?Ha.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+Ba.fill+"', EndColorStr='"+Ba.gradient+"', GradientType=0)":Ha.style.backgroundImage="linear-gradient("+Ba.fill+" 0px,"+Ba.gradient+" 100%)":Ba.fill==mxConstants.NONE?Ha.style.background="url('"+Dialog.prototype.noColorImage+"')":Ha.style.backgroundColor=""==Ba.fill?mxUtils.getValue(Q.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,
-Editor.isDarkMode()?Editor.darkColor:"#ffffff"):Ba.fill||mxUtils.getValue(Q.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");Ha.style.border=Ba.stroke==mxConstants.NONE?pa+" transparent":""==Ba.stroke?pa+" "+mxUtils.getValue(Q.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):pa+" "+(Ba.stroke||mxUtils.getValue(Q.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));
-null!=Ba.title&&Ha.setAttribute("title",Ba.title)}else{pa=mxUtils.getValue(Q.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var Na=mxUtils.getValue(Q.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");Ha.style.backgroundColor=pa;Ha.style.border="1px solid "+Na}Ha.style.borderRadius="0";P.appendChild(Ha)});P.innerText="";for(var Ga=0;Ga<Z.length;Ga++)0<Ga&&0==mxUtils.mod(Ga,4)&&mxUtils.br(P),Da(Z[Ga])});null==this.format.currentScheme?aa(Editor.isDarkMode()?1:"1"==urlParams.sketch?
-5:0):aa(this.format.currentScheme);Y=10>=this.defaultColorSchemes.length?28:8;var ja=document.createElement("div");ja.style.cssText="position:absolute;left:10px;top:8px;bottom:"+Y+"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(ja,"click",mxUtils.bind(this,function(){aa(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var ha=document.createElement("div");ha.style.cssText="position:absolute;left:202px;top:8px;bottom:"+Y+"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&&(n.appendChild(ja),n.appendChild(ha));mxEvent.addListener(ha,"click",mxUtils.bind(this,function(){aa(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));B(ja);B(ha);da(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&n.appendChild(V);return n};StyleFormatPanel.prototype.addEditOps=function(n){var B=this.editorUi.getSelectionState(),K=this.editorUi.editor.graph,Q=null;1==B.cells.length&&(Q=mxUtils.button(mxResources.get("editStyle"),
-mxUtils.bind(this,function(P){this.editorUi.actions.get("editStyle").funct()})),Q.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),Q.style.width="210px",Q.style.marginBottom="2px",n.appendChild(Q));K=1==B.cells.length?K.view.getState(B.cells[0]):null;null!=K&&null!=K.shape&&null!=K.shape.stencil?(B=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(P){this.editorUi.actions.get("editShape").funct()})),B.setAttribute("title",
-mxResources.get("editShape")),B.style.marginBottom="2px",null==Q?B.style.width="210px":(Q.style.width="104px",B.style.width="104px",B.style.marginLeft="2px"),n.appendChild(B)):B.image&&0<B.cells.length&&(B=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(P){this.editorUi.actions.get("image").funct()})),B.setAttribute("title",mxResources.get("editImage")),B.style.marginBottom="2px",null==Q?B.style.width="210px":(Q.style.width="104px",B.style.width="104px",B.style.marginLeft="2px"),
+function(n,B,K){if(null!=B){var R=function(U){if(null!=U)if(K)for(var S=0;S<U.length;S++)B[U[S].name]=U[S];else for(var T in B){var Y=!1;for(S=0;S<U.length;S++)if(U[S].name==T&&U[S].type==B[T].type){Y=!0;break}Y||delete B[T]}},O=this.editorUi.editor.graph.view.getState(n);null!=O&&null!=O.shape&&(O.shape.commonCustomPropAdded||(O.shape.commonCustomPropAdded=!0,O.shape.customProperties=O.shape.customProperties||[],O.cell.vertex?Array.prototype.push.apply(O.shape.customProperties,Editor.commonVertexProperties):
+Array.prototype.push.apply(O.shape.customProperties,Editor.commonEdgeProperties)),R(O.shape.customProperties));n=n.getAttribute("customProperties");if(null!=n)try{R(JSON.parse(n))}catch(U){}}};var v=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var n=this.editorUi.getSelectionState();"image"!=n.style.shape&&!n.containsLabel&&0<n.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));v.apply(this,arguments);if(Editor.enableCustomProperties){for(var B=
+{},K=n.vertices,R=n.edges,O=0;O<K.length;O++)this.findCommonProperties(K[O],B,0==O);for(O=0;O<R.length;O++)this.findCommonProperties(R[O],B,0==K.length&&0==O);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(B).length&&this.container.appendChild(this.addProperties(this.createPanel(),B,n))}};var x=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(n){this.addActions(n,["copyStyle","pasteStyle"]);return x.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=
+!0;StyleFormatPanel.prototype.addProperties=function(n,B,K){function R(ya,Aa,wa,Ia){da.getModel().beginUpdate();try{var ia=[],ja=[];if(null!=wa.index){for(var ua=[],va=wa.parentRow.nextSibling;va&&va.getAttribute("data-pName")==ya;)ua.push(va.getAttribute("data-pValue")),va=va.nextSibling;wa.index<ua.length?null!=Ia?ua.splice(Ia,1):ua[wa.index]=Aa:ua.push(Aa);null!=wa.size&&ua.length>wa.size&&(ua=ua.slice(0,wa.size));Aa=ua.join(",");null!=wa.countProperty&&(da.setCellStyles(wa.countProperty,ua.length,
+da.getSelectionCells()),ia.push(wa.countProperty),ja.push(ua.length))}da.setCellStyles(ya,Aa,da.getSelectionCells());ia.push(ya);ja.push(Aa);if(null!=wa.dependentProps)for(ya=0;ya<wa.dependentProps.length;ya++){var qa=wa.dependentPropsDefVal[ya],xa=wa.dependentPropsVals[ya];if(xa.length>Aa)xa=xa.slice(0,Aa);else for(var ea=xa.length;ea<Aa;ea++)xa.push(qa);xa=xa.join(",");da.setCellStyles(wa.dependentProps[ya],xa,da.getSelectionCells());ia.push(wa.dependentProps[ya]);ja.push(xa)}if("function"==typeof wa.onChange)wa.onChange(da,
+Aa);aa.editorUi.fireEvent(new mxEventObject("styleChanged","keys",ia,"values",ja,"cells",da.getSelectionCells()))}finally{da.getModel().endUpdate()}}function O(ya,Aa,wa){var Ia=mxUtils.getOffset(n,!0),ia=mxUtils.getOffset(ya,!0);Aa.style.position="absolute";Aa.style.left=ia.x-Ia.x+"px";Aa.style.top=ia.y-Ia.y+"px";Aa.style.width=ya.offsetWidth+"px";Aa.style.height=ya.offsetHeight-(wa?4:0)+"px";Aa.style.zIndex=5}function U(ya,Aa,wa){var Ia=document.createElement("div");Ia.style.width="32px";Ia.style.height=
+"4px";Ia.style.margin="2px";Ia.style.border="1px solid black";Ia.style.background=Aa&&"none"!=Aa?Aa:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(aa,function(ia){this.editorUi.pickColor(Aa,function(ja){Ia.style.background="none"==ja?"url('"+Dialog.prototype.noColorImage+"')":ja;R(ya,ja,wa)});mxEvent.consume(ia)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(Ia);return btn}function S(ya,Aa,wa,Ia,ia,ja,ua){null!=Aa&&(Aa=Aa.split(","),
+ha.push({name:ya,values:Aa,type:wa,defVal:Ia,countProperty:ia,parentRow:ja,isDeletable:!0,flipBkg:ua}));btn=mxUtils.button("+",mxUtils.bind(aa,function(va){for(var qa=ja,xa=0;null!=qa.nextSibling;)if(qa.nextSibling.getAttribute("data-pName")==ya)qa=qa.nextSibling,xa++;else break;var ea={type:wa,parentRow:ja,index:xa,isDeletable:!0,defVal:Ia,countProperty:ia};xa=ba(ya,"",ea,0==xa%2,ua);R(ya,Ia,ea);qa.parentNode.insertBefore(xa,qa.nextSibling);mxEvent.consume(va)}));btn.style.height="16px";btn.style.width=
+"25px";btn.className="geColorBtn";return btn}function T(ya,Aa,wa,Ia,ia,ja,ua){if(0<ia){var va=Array(ia);Aa=null!=Aa?Aa.split(","):[];for(var qa=0;qa<ia;qa++)va[qa]=null!=Aa[qa]?Aa[qa]:null!=Ia?Ia:"";ha.push({name:ya,values:va,type:wa,defVal:Ia,parentRow:ja,flipBkg:ua,size:ia})}return document.createElement("div")}function Y(ya,Aa,wa){var Ia=document.createElement("input");Ia.type="checkbox";Ia.checked="1"==Aa;mxEvent.addListener(Ia,"change",function(){R(ya,Ia.checked?"1":"0",wa)});return Ia}function ba(ya,
+Aa,wa,Ia,ia){var ja=wa.dispName,ua=wa.type,va=document.createElement("tr");va.className="gePropRow"+(ia?"Dark":"")+(Ia?"Alt":"")+" gePropNonHeaderRow";va.setAttribute("data-pName",ya);va.setAttribute("data-pValue",Aa);Ia=!1;null!=wa.index&&(va.setAttribute("data-index",wa.index),ja=(null!=ja?ja:"")+"["+wa.index+"]",Ia=!0);var qa=document.createElement("td");qa.className="gePropRowCell";ja=mxResources.get(ja,null,ja);mxUtils.write(qa,ja);qa.setAttribute("title",ja);Ia&&(qa.style.textAlign="right");
+va.appendChild(qa);qa=document.createElement("td");qa.className="gePropRowCell";if("color"==ua)qa.appendChild(U(ya,Aa,wa));else if("bool"==ua||"boolean"==ua)qa.appendChild(Y(ya,Aa,wa));else if("enum"==ua){var xa=wa.enumList;for(ia=0;ia<xa.length;ia++)if(ja=xa[ia],ja.val==Aa){mxUtils.write(qa,mxResources.get(ja.dispName,null,ja.dispName));break}mxEvent.addListener(qa,"click",mxUtils.bind(aa,function(){var ea=document.createElement("select");O(qa,ea);for(var na=0;na<xa.length;na++){var pa=xa[na],ca=
+document.createElement("option");ca.value=mxUtils.htmlEntities(pa.val);mxUtils.write(ca,mxResources.get(pa.dispName,null,pa.dispName));ea.appendChild(ca)}ea.value=Aa;n.appendChild(ea);mxEvent.addListener(ea,"change",function(){var fa=mxUtils.htmlEntities(ea.value);R(ya,fa,wa)});ea.focus();mxEvent.addListener(ea,"blur",function(){n.removeChild(ea)})}))}else"dynamicArr"==ua?qa.appendChild(S(ya,Aa,wa.subType,wa.subDefVal,wa.countProperty,va,ia)):"staticArr"==ua?qa.appendChild(T(ya,Aa,wa.subType,wa.subDefVal,
+wa.size,va,ia)):"readOnly"==ua?(ia=document.createElement("input"),ia.setAttribute("readonly",""),ia.value=Aa,ia.style.width="96px",ia.style.borderWidth="0px",qa.appendChild(ia)):(qa.innerHTML=mxUtils.htmlEntities(decodeURIComponent(Aa)),mxEvent.addListener(qa,"click",mxUtils.bind(aa,function(){function ea(){var pa=na.value;pa=0==pa.length&&"string"!=ua?0:pa;wa.allowAuto&&(null!=pa.trim&&"auto"==pa.trim().toLowerCase()?(pa="auto",ua="string"):(pa=parseFloat(pa),pa=isNaN(pa)?0:pa));null!=wa.min&&pa<
+wa.min?pa=wa.min:null!=wa.max&&pa>wa.max&&(pa=wa.max);pa=encodeURIComponent(("int"==ua?parseInt(pa):pa)+"");R(ya,pa,wa)}var na=document.createElement("input");O(qa,na,!0);na.value=decodeURIComponent(Aa);na.className="gePropEditor";"int"!=ua&&"float"!=ua||wa.allowAuto||(na.type="number",na.step="int"==ua?"1":"any",null!=wa.min&&(na.min=parseFloat(wa.min)),null!=wa.max&&(na.max=parseFloat(wa.max)));n.appendChild(na);mxEvent.addListener(na,"keypress",function(pa){13==pa.keyCode&&ea()});na.focus();mxEvent.addListener(na,
+"blur",function(){ea()})})));wa.isDeletable&&(ia=mxUtils.button("-",mxUtils.bind(aa,function(ea){R(ya,"",wa,wa.index);mxEvent.consume(ea)})),ia.style.height="16px",ia.style.width="25px",ia.style.float="right",ia.className="geColorBtn",qa.appendChild(ia));va.appendChild(qa);return va}var aa=this,da=this.editorUi.editor.graph,ha=[];n.style.position="relative";n.style.padding="0";var ma=document.createElement("table");ma.className="geProperties";ma.style.whiteSpace="nowrap";ma.style.width="100%";var Z=
+document.createElement("tr");Z.className="gePropHeader";var Fa=document.createElement("th");Fa.className="gePropHeaderCell";var Ca=document.createElement("img");Ca.src=Sidebar.prototype.expandedImage;Ca.style.verticalAlign="middle";Fa.appendChild(Ca);mxUtils.write(Fa,mxResources.get("property"));Z.style.cursor="pointer";var Ba=function(){var ya=ma.querySelectorAll(".gePropNonHeaderRow");if(aa.editorUi.propertiesCollapsed){Ca.src=Sidebar.prototype.collapsedImage;var Aa="none";for(var wa=n.childNodes.length-
+1;0<=wa;wa--)try{var Ia=n.childNodes[wa],ia=Ia.nodeName.toUpperCase();"INPUT"!=ia&&"SELECT"!=ia||n.removeChild(Ia)}catch(ja){}}else Ca.src=Sidebar.prototype.expandedImage,Aa="";for(wa=0;wa<ya.length;wa++)ya[wa].style.display=Aa};mxEvent.addListener(Z,"click",function(){aa.editorUi.propertiesCollapsed=!aa.editorUi.propertiesCollapsed;Ba()});Z.appendChild(Fa);Fa=document.createElement("th");Fa.className="gePropHeaderCell";Fa.innerHTML=mxResources.get("value");Z.appendChild(Fa);ma.appendChild(Z);var Ga=
+!1,sa=!1;Z=null;1==K.vertices.length&&0==K.edges.length?Z=K.vertices[0].id:0==K.vertices.length&&1==K.edges.length&&(Z=K.edges[0].id);null!=Z&&ma.appendChild(ba("id",mxUtils.htmlEntities(Z),{dispName:"ID",type:"readOnly"},!0,!1));for(var Ma in B)if(Z=B[Ma],"function"!=typeof Z.isVisible||Z.isVisible(K,this)){var Na=null!=K.style[Ma]?mxUtils.htmlEntities(K.style[Ma]+""):null!=Z.getDefaultValue?Z.getDefaultValue(K,this):Z.defVal;if("separator"==Z.type)sa=!sa;else{if("staticArr"==Z.type)Z.size=parseInt(K.style[Z.sizeProperty]||
+B[Z.sizeProperty].defVal)||0;else if(null!=Z.dependentProps){var za=Z.dependentProps,Ja=[],Ea=[];for(Fa=0;Fa<za.length;Fa++){var Pa=K.style[za[Fa]];Ea.push(B[za[Fa]].subDefVal);Ja.push(null!=Pa?Pa.split(","):[])}Z.dependentPropsDefVal=Ea;Z.dependentPropsVals=Ja}ma.appendChild(ba(Ma,Na,Z,Ga,sa));Ga=!Ga}}for(Fa=0;Fa<ha.length;Fa++)for(Z=ha[Fa],B=Z.parentRow,K=0;K<Z.values.length;K++)Ma=ba(Z.name,Z.values[K],{type:Z.type,parentRow:Z.parentRow,isDeletable:Z.isDeletable,index:K,defVal:Z.defVal,countProperty:Z.countProperty,
+size:Z.size},0==K%2,Z.flipBkg),B.parentNode.insertBefore(Ma,B.nextSibling),B=Ma;n.appendChild(ma);Ba();return n};StyleFormatPanel.prototype.addStyles=function(n){function B(Z){mxEvent.addListener(Z,"mouseenter",function(){Z.style.opacity="1"});mxEvent.addListener(Z,"mouseleave",function(){Z.style.opacity="0.5"})}var K=this.editorUi,R=K.editor.graph,O=document.createElement("div");O.style.whiteSpace="nowrap";O.style.paddingLeft="24px";O.style.paddingRight="20px";n.style.paddingLeft="16px";n.style.paddingBottom=
+"6px";n.style.position="relative";n.appendChild(O);var U="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(" "),S=document.createElement("div");S.style.whiteSpace="nowrap";S.style.position="relative";S.style.textAlign="center";S.style.width="210px";for(var T=[],Y=0;Y<this.defaultColorSchemes.length;Y++){var ba=document.createElement("div");ba.style.display="inline-block";ba.style.width=
+"6px";ba.style.height="6px";ba.style.marginLeft="4px";ba.style.marginRight="3px";ba.style.borderRadius="3px";ba.style.cursor="pointer";ba.style.background="transparent";ba.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(Z){mxEvent.addListener(ba,"click",mxUtils.bind(this,function(){aa(Z)}))})(Y);T.push(ba);S.appendChild(ba)}var aa=mxUtils.bind(this,function(Z){null!=T[Z]&&(null!=this.format.currentScheme&&null!=T[this.format.currentScheme]&&(T[this.format.currentScheme].style.background=
+"transparent"),this.format.currentScheme=Z,da(this.defaultColorSchemes[this.format.currentScheme]),T[this.format.currentScheme].style.background="#84d7ff")}),da=mxUtils.bind(this,function(Z){var Fa=mxUtils.bind(this,function(Ba){var Ga=mxUtils.button("",mxUtils.bind(this,function(Na){R.getModel().beginUpdate();try{for(var za=K.getSelectionState().cells,Ja=0;Ja<za.length;Ja++){for(var Ea=R.getModel().getStyle(za[Ja]),Pa=0;Pa<U.length;Pa++)Ea=mxUtils.removeStylename(Ea,U[Pa]);var ya=R.getModel().isVertex(za[Ja])?
+R.defaultVertexStyle:R.defaultEdgeStyle;null!=Ba?(mxEvent.isShiftDown(Na)||(Ea=""==Ba.fill?mxUtils.setStyle(Ea,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(Ea,mxConstants.STYLE_FILLCOLOR,Ba.fill||mxUtils.getValue(ya,mxConstants.STYLE_FILLCOLOR,null)),Ea=mxUtils.setStyle(Ea,mxConstants.STYLE_GRADIENTCOLOR,Ba.gradient||mxUtils.getValue(ya,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(Na)||mxClient.IS_MAC&&mxEvent.isMetaDown(Na)||!R.getModel().isVertex(za[Ja])||(Ea=mxUtils.setStyle(Ea,
+mxConstants.STYLE_FONTCOLOR,Ba.font||mxUtils.getValue(ya,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(Na)||(Ea=""==Ba.stroke?mxUtils.setStyle(Ea,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(Ea,mxConstants.STYLE_STROKECOLOR,Ba.stroke||mxUtils.getValue(ya,mxConstants.STYLE_STROKECOLOR,null)))):(Ea=mxUtils.setStyle(Ea,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(ya,mxConstants.STYLE_FILLCOLOR,"#ffffff")),Ea=mxUtils.setStyle(Ea,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(ya,mxConstants.STYLE_STROKECOLOR,
+"#000000")),Ea=mxUtils.setStyle(Ea,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(ya,mxConstants.STYLE_GRADIENTCOLOR,null)),R.getModel().isVertex(za[Ja])&&(Ea=mxUtils.setStyle(Ea,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(ya,mxConstants.STYLE_FONTCOLOR,null))));R.getModel().setStyle(za[Ja],Ea)}}finally{R.getModel().endUpdate()}}));Ga.className="geStyleButton";Ga.style.width="36px";Ga.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";Ga.style.margin="0px 6px 6px 0px";if(null!=Ba){var sa=
+"1"==urlParams.sketch?"2px solid":"1px solid";null!=Ba.gradient?mxClient.IS_IE&&10>document.documentMode?Ga.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+Ba.fill+"', EndColorStr='"+Ba.gradient+"', GradientType=0)":Ga.style.backgroundImage="linear-gradient("+Ba.fill+" 0px,"+Ba.gradient+" 100%)":Ba.fill==mxConstants.NONE?Ga.style.background="url('"+Dialog.prototype.noColorImage+"')":Ga.style.backgroundColor=""==Ba.fill?mxUtils.getValue(R.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,
+Editor.isDarkMode()?Editor.darkColor:"#ffffff"):Ba.fill||mxUtils.getValue(R.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");Ga.style.border=Ba.stroke==mxConstants.NONE?sa+" transparent":""==Ba.stroke?sa+" "+mxUtils.getValue(R.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):sa+" "+(Ba.stroke||mxUtils.getValue(R.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));
+null!=Ba.title&&Ga.setAttribute("title",Ba.title)}else{sa=mxUtils.getValue(R.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var Ma=mxUtils.getValue(R.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");Ga.style.backgroundColor=sa;Ga.style.border="1px solid "+Ma}Ga.style.borderRadius="0";O.appendChild(Ga)});O.innerText="";for(var Ca=0;Ca<Z.length;Ca++)0<Ca&&0==mxUtils.mod(Ca,4)&&mxUtils.br(O),Fa(Z[Ca])});null==this.format.currentScheme?aa(Editor.isDarkMode()?1:"1"==urlParams.sketch?
+5:0):aa(this.format.currentScheme);Y=10>=this.defaultColorSchemes.length?28:8;var ha=document.createElement("div");ha.style.cssText="position:absolute;left:10px;top:8px;bottom:"+Y+"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(ha,"click",mxUtils.bind(this,function(){aa(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var ma=document.createElement("div");ma.style.cssText="position:absolute;left:202px;top:8px;bottom:"+Y+"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&&(n.appendChild(ha),n.appendChild(ma));mxEvent.addListener(ma,"click",mxUtils.bind(this,function(){aa(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));B(ha);B(ma);da(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&n.appendChild(S);return n};StyleFormatPanel.prototype.addEditOps=function(n){var B=this.editorUi.getSelectionState(),K=this.editorUi.editor.graph,R=null;1==B.cells.length&&(R=mxUtils.button(mxResources.get("editStyle"),
+mxUtils.bind(this,function(O){this.editorUi.actions.get("editStyle").funct()})),R.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),R.style.width="210px",R.style.marginBottom="2px",n.appendChild(R));K=1==B.cells.length?K.view.getState(B.cells[0]):null;null!=K&&null!=K.shape&&null!=K.shape.stencil?(B=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(O){this.editorUi.actions.get("editShape").funct()})),B.setAttribute("title",
+mxResources.get("editShape")),B.style.marginBottom="2px",null==R?B.style.width="210px":(R.style.width="104px",B.style.width="104px",B.style.marginLeft="2px"),n.appendChild(B)):B.image&&0<B.cells.length&&(B=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(O){this.editorUi.actions.get("image").funct()})),B.setAttribute("title",mxResources.get("editImage")),B.style.marginBottom="2px",null==R?B.style.width="210px":(R.style.width="104px",B.style.width="104px",B.style.marginLeft="2px"),
n.appendChild(B));return n}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(n){return n.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(n){return Graph.isGoogleFontUrl(n)};Graph.createFontElement=function(n,
-B){var K=Graph.fontMapping[B];null==K&&Graph.isCssFontUrl(B)?(n=document.createElement("link"),n.setAttribute("rel","stylesheet"),n.setAttribute("type","text/css"),n.setAttribute("charset","UTF-8"),n.setAttribute("href",B)):(null==K&&(K='@font-face {\nfont-family: "'+n+'";\nsrc: url("'+B+'");\n}'),n=document.createElement("style"),mxUtils.write(n,K));return n};Graph.addFont=function(n,B,K){if(null!=n&&0<n.length&&null!=B&&0<B.length){var Q=n.toLowerCase();if("helvetica"!=Q&&"arial"!=n&&"sans-serif"!=
-Q){var P=Graph.customFontElements[Q];null!=P&&P.url!=B&&(P.elt.parentNode.removeChild(P.elt),P=null);null==P?(P=B,"http:"==B.substring(0,5)&&(P=PROXY_URL+"?url="+encodeURIComponent(B)),P={name:n,url:B,elt:Graph.createFontElement(n,P)},Graph.customFontElements[Q]=P,Graph.recentCustomFonts[Q]=P,B=document.getElementsByTagName("head")[0],null!=K&&("link"==P.elt.nodeName.toLowerCase()?(P.elt.onload=K,P.elt.onerror=K):K()),null!=B&&B.appendChild(P.elt)):null!=K&&K()}else null!=K&&K()}else null!=K&&K();
-return n};Graph.getFontUrl=function(n,B){n=Graph.customFontElements[n.toLowerCase()];null!=n&&(B=n.url);return B};Graph.processFontAttributes=function(n){n=n.getElementsByTagName("*");for(var B=0;B<n.length;B++){var K=n[B].getAttribute("data-font-src");if(null!=K){var Q="FONT"==n[B].nodeName?n[B].getAttribute("face"):n[B].style.fontFamily;null!=Q&&Graph.addFont(Q,K)}}};Graph.processFontStyle=function(n){if(null!=n){var B=mxUtils.getValue(n,"fontSource",null);if(null!=B){var K=mxUtils.getValue(n,mxConstants.STYLE_FONTFAMILY,
+B){var K=Graph.fontMapping[B];null==K&&Graph.isCssFontUrl(B)?(n=document.createElement("link"),n.setAttribute("rel","stylesheet"),n.setAttribute("type","text/css"),n.setAttribute("charset","UTF-8"),n.setAttribute("href",B)):(null==K&&(K='@font-face {\nfont-family: "'+n+'";\nsrc: url("'+B+'");\n}'),n=document.createElement("style"),mxUtils.write(n,K));return n};Graph.addFont=function(n,B,K){if(null!=n&&0<n.length&&null!=B&&0<B.length){var R=n.toLowerCase();if("helvetica"!=R&&"arial"!=n&&"sans-serif"!=
+R){var O=Graph.customFontElements[R];null!=O&&O.url!=B&&(O.elt.parentNode.removeChild(O.elt),O=null);null==O?(O=B,"http:"==B.substring(0,5)&&(O=PROXY_URL+"?url="+encodeURIComponent(B)),O={name:n,url:B,elt:Graph.createFontElement(n,O)},Graph.customFontElements[R]=O,Graph.recentCustomFonts[R]=O,B=document.getElementsByTagName("head")[0],null!=K&&("link"==O.elt.nodeName.toLowerCase()?(O.elt.onload=K,O.elt.onerror=K):K()),null!=B&&B.appendChild(O.elt)):null!=K&&K()}else null!=K&&K()}else null!=K&&K();
+return n};Graph.getFontUrl=function(n,B){n=Graph.customFontElements[n.toLowerCase()];null!=n&&(B=n.url);return B};Graph.processFontAttributes=function(n){n=n.getElementsByTagName("*");for(var B=0;B<n.length;B++){var K=n[B].getAttribute("data-font-src");if(null!=K){var R="FONT"==n[B].nodeName?n[B].getAttribute("face"):n[B].style.fontFamily;null!=R&&Graph.addFont(R,K)}}};Graph.processFontStyle=function(n){if(null!=n){var B=mxUtils.getValue(n,"fontSource",null);if(null!=B){var K=mxUtils.getValue(n,mxConstants.STYLE_FONTFAMILY,
null);null!=K&&Graph.addFont(K,decodeURIComponent(B))}}return n};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!=
-urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var z=Graph.prototype.init;Graph.prototype.init=function(){function n(P){B=P}z.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var B=null;mxEvent.addListener(this.container,"mouseenter",n);mxEvent.addListener(this.container,"mousemove",n);mxEvent.addListener(this.container,"mouseleave",function(P){B=null});this.isMouseInsertPoint=function(){return null!=B};var K=this.getInsertPoint;
-this.getInsertPoint=function(){return null!=B?this.getPointForEvent(B):K.apply(this,arguments)};var Q=this.layoutManager.getLayout;this.layoutManager.getLayout=function(P){var T=this.graph.getCellStyle(P);if(null!=T&&"rack"==T.childLayout){var V=new mxStackLayout(this.graph,!1);V.gridSize=null!=T.rackUnitSize?parseFloat(T.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;V.marginLeft=T.marginLeft||0;V.marginRight=T.marginRight||0;V.marginTop=T.marginTop||0;V.marginBottom=
-T.marginBottom||0;V.allowGaps=T.allowGaps||0;V.horizontal="1"==mxUtils.getValue(T,"horizontalRack","0");V.resizeParent=!1;V.fill=!0;return V}return Q.apply(this,arguments)};this.updateGlobalUrlVariables()};var y=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(n,B){return Graph.processFontStyle(y.apply(this,arguments))};var L=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(n,B,K,Q,P,T,V,S,Y,ca,aa){L.apply(this,arguments);Graph.processFontAttributes(aa)};
-var N=mxText.prototype.redraw;mxText.prototype.redraw=function(){N.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(n,B,K){function Q(){for(var Z=V.getSelectionCells(),Da=[],Ga=0;Ga<Z.length;Ga++)V.isCellVisible(Z[Ga])&&Da.push(Z[Ga]);V.setSelectionCells(Da)}function P(Z){V.setHiddenTags(Z?[]:S.slice());Q();V.refresh()}function T(Z,Da){ca.innerText="";if(0<Z.length){var Ga=document.createElement("table");
-Ga.setAttribute("cellpadding","2");Ga.style.boxSizing="border-box";Ga.style.tableLayout="fixed";Ga.style.width="100%";var Ba=document.createElement("tbody");if(null!=Z&&0<Z.length)for(var Ha=0;Ha<Z.length;Ha++)(function(pa){var Na=0>mxUtils.indexOf(V.hiddenTags,pa),La=document.createElement("tr"),ya=document.createElement("td");ya.style.align="center";ya.style.width="16px";var Ja=document.createElement("img");Ja.setAttribute("src",Na?Editor.visibleImage:Editor.hiddenImage);Ja.setAttribute("title",
-mxResources.get(Na?"hideIt":"show",[pa]));mxUtils.setOpacity(Ja,Na?75:25);Ja.style.verticalAlign="middle";Ja.style.cursor="pointer";Ja.style.width="16px";if(B||Editor.isDarkMode())Ja.style.filter="invert(100%)";ya.appendChild(Ja);mxEvent.addListener(Ja,"click",function(Pa){mxEvent.isShiftDown(Pa)?P(0<=mxUtils.indexOf(V.hiddenTags,pa)):(V.toggleHiddenTag(pa),Q(),V.refresh());mxEvent.consume(Pa)});La.appendChild(ya);ya=document.createElement("td");ya.style.overflow="hidden";ya.style.whiteSpace="nowrap";
-ya.style.textOverflow="ellipsis";ya.style.verticalAlign="middle";ya.style.cursor="pointer";ya.setAttribute("title",pa);a=document.createElement("a");mxUtils.write(a,pa);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,Na?100:40);ya.appendChild(a);mxEvent.addListener(ya,"click",function(Pa){if(mxEvent.isShiftDown(Pa)){P(!0);var xa=V.getCellsForTags([pa],null,null,!0);V.isEnabled()?V.setSelectionCells(xa):V.highlightCells(xa)}else if(Na&&0<V.hiddenTags.length)P(!0);else{xa=
-S.slice();var za=mxUtils.indexOf(xa,pa);xa.splice(za,1);V.setHiddenTags(xa);Q();V.refresh()}mxEvent.consume(Pa)});La.appendChild(ya);if(V.isEnabled()){ya=document.createElement("td");ya.style.verticalAlign="middle";ya.style.textAlign="center";ya.style.width="18px";if(null==Da){ya.style.align="center";ya.style.width="16px";Ja=document.createElement("img");Ja.setAttribute("src",Editor.crossImage);Ja.setAttribute("title",mxResources.get("removeIt",[pa]));mxUtils.setOpacity(Ja,Na?75:25);Ja.style.verticalAlign=
-"middle";Ja.style.cursor="pointer";Ja.style.width="16px";if(B||Editor.isDarkMode())Ja.style.filter="invert(100%)";mxEvent.addListener(Ja,"click",function(Pa){var xa=mxUtils.indexOf(S,pa);0<=xa&&S.splice(xa,1);V.removeTagsForCells(V.model.getDescendants(V.model.getRoot()),[pa]);V.refresh();mxEvent.consume(Pa)});ya.appendChild(Ja)}else{var Fa=document.createElement("input");Fa.setAttribute("type","checkbox");Fa.style.margin="0px";Fa.defaultChecked=null!=Da&&0<=mxUtils.indexOf(Da,pa);Fa.checked=Fa.defaultChecked;
-Fa.style.background="transparent";Fa.setAttribute("title",mxResources.get(Fa.defaultChecked?"removeIt":"add",[pa]));mxEvent.addListener(Fa,"change",function(Pa){Fa.checked?V.addTagsForCells(V.getSelectionCells(),[pa]):V.removeTagsForCells(V.getSelectionCells(),[pa]);mxEvent.consume(Pa)});ya.appendChild(Fa)}La.appendChild(ya)}Ba.appendChild(La)})(Z[Ha]);Ga.appendChild(Ba);ca.appendChild(Ga)}}var V=this,S=V.hiddenTags.slice(),Y=document.createElement("div");Y.style.userSelect="none";Y.style.overflow=
-"hidden";Y.style.padding="10px";Y.style.height="100%";var ca=document.createElement("div");ca.style.boxSizing="border-box";ca.style.borderRadius="4px";ca.style.userSelect="none";ca.style.overflow="auto";ca.style.position="absolute";ca.style.left="10px";ca.style.right="10px";ca.style.top="10px";ca.style.border=V.isEnabled()?"1px solid #808080":"none";ca.style.bottom=V.isEnabled()?"48px":"10px";Y.appendChild(ca);var aa=mxUtils.button(mxResources.get("reset"),function(Z){V.setHiddenTags([]);mxEvent.isShiftDown(Z)||
-(S=V.hiddenTags.slice());Q();V.refresh()});aa.setAttribute("title",mxResources.get("reset"));aa.className="geBtn";aa.style.margin="0 4px 0 0";var da=mxUtils.button(mxResources.get("add"),function(){null!=K&&K(S,function(Z){S=Z;ja()})});da.setAttribute("title",mxResources.get("add"));da.className="geBtn";da.style.margin="0";V.addListener(mxEvent.ROOT,function(){S=V.hiddenTags.slice()});var ja=mxUtils.bind(this,function(Z,Da){if(n()){Z=V.getAllTags();for(Da=0;Da<Z.length;Da++)0>mxUtils.indexOf(S,Z[Da])&&
-S.push(Z[Da]);S.sort();V.isSelectionEmpty()?T(S):T(S,V.getCommonTagsForCells(V.getSelectionCells()))}});V.selectionModel.addListener(mxEvent.CHANGE,ja);V.model.addListener(mxEvent.CHANGE,ja);V.addListener(mxEvent.REFRESH,ja);var ha=document.createElement("div");ha.style.boxSizing="border-box";ha.style.whiteSpace="nowrap";ha.style.position="absolute";ha.style.overflow="hidden";ha.style.bottom="0px";ha.style.height="42px";ha.style.right="10px";ha.style.left="10px";V.isEnabled()&&(ha.appendChild(aa),
-ha.appendChild(da),Y.appendChild(ha));return{div:Y,refresh:ja}};Graph.prototype.getCustomFonts=function(){var n=this.extFonts;n=null!=n?n.slice():[];for(var B in Graph.customFontElements){var K=Graph.customFontElements[B];n.push({name:K.name,url:K.url})}return n};Graph.prototype.setFont=function(n,B){Graph.addFont(n,B);document.execCommand("fontname",!1,n);if(null!=B){var K=this.cellEditor.textarea.getElementsByTagName("font");B=Graph.getFontUrl(n,B);for(var Q=0;Q<K.length;Q++)K[Q].getAttribute("face")==
-n&&K[Q].getAttribute("data-font-src")!=B&&K[Q].setAttribute("data-font-src",B)}};var J=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return J.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 n=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=n)for(var B in n)this.globalVars[B]=
+urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var A=Graph.prototype.init;Graph.prototype.init=function(){function n(O){B=O}A.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var B=null;mxEvent.addListener(this.container,"mouseenter",n);mxEvent.addListener(this.container,"mousemove",n);mxEvent.addListener(this.container,"mouseleave",function(O){B=null});this.isMouseInsertPoint=function(){return null!=B};var K=this.getInsertPoint;
+this.getInsertPoint=function(){return null!=B?this.getPointForEvent(B):K.apply(this,arguments)};var R=this.layoutManager.getLayout;this.layoutManager.getLayout=function(O){var U=this.graph.getCellStyle(O);if(null!=U&&"rack"==U.childLayout){var S=new mxStackLayout(this.graph,!1);S.gridSize=null!=U.rackUnitSize?parseFloat(U.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;S.marginLeft=U.marginLeft||0;S.marginRight=U.marginRight||0;S.marginTop=U.marginTop||0;S.marginBottom=
+U.marginBottom||0;S.allowGaps=U.allowGaps||0;S.horizontal="1"==mxUtils.getValue(U,"horizontalRack","0");S.resizeParent=!1;S.fill=!0;return S}return R.apply(this,arguments)};this.updateGlobalUrlVariables()};var y=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(n,B){return Graph.processFontStyle(y.apply(this,arguments))};var L=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(n,B,K,R,O,U,S,T,Y,ba,aa){L.apply(this,arguments);Graph.processFontAttributes(aa)};
+var N=mxText.prototype.redraw;mxText.prototype.redraw=function(){N.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(n,B,K){function R(){for(var Z=S.getSelectionCells(),Fa=[],Ca=0;Ca<Z.length;Ca++)S.isCellVisible(Z[Ca])&&Fa.push(Z[Ca]);S.setSelectionCells(Fa)}function O(Z){S.setHiddenTags(Z?[]:T.slice());R();S.refresh()}function U(Z,Fa){ba.innerText="";if(0<Z.length){var Ca=document.createElement("table");
+Ca.setAttribute("cellpadding","2");Ca.style.boxSizing="border-box";Ca.style.tableLayout="fixed";Ca.style.width="100%";var Ba=document.createElement("tbody");if(null!=Z&&0<Z.length)for(var Ga=0;Ga<Z.length;Ga++)(function(sa){var Ma=0>mxUtils.indexOf(S.hiddenTags,sa),Na=document.createElement("tr"),za=document.createElement("td");za.style.align="center";za.style.width="16px";var Ja=document.createElement("img");Ja.setAttribute("src",Ma?Editor.visibleImage:Editor.hiddenImage);Ja.setAttribute("title",
+mxResources.get(Ma?"hideIt":"show",[sa]));mxUtils.setOpacity(Ja,Ma?75:25);Ja.style.verticalAlign="middle";Ja.style.cursor="pointer";Ja.style.width="16px";if(B||Editor.isDarkMode())Ja.style.filter="invert(100%)";za.appendChild(Ja);mxEvent.addListener(Ja,"click",function(Pa){mxEvent.isShiftDown(Pa)?O(0<=mxUtils.indexOf(S.hiddenTags,sa)):(S.toggleHiddenTag(sa),R(),S.refresh());mxEvent.consume(Pa)});Na.appendChild(za);za=document.createElement("td");za.style.overflow="hidden";za.style.whiteSpace="nowrap";
+za.style.textOverflow="ellipsis";za.style.verticalAlign="middle";za.style.cursor="pointer";za.setAttribute("title",sa);a=document.createElement("a");mxUtils.write(a,sa);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,Ma?100:40);za.appendChild(a);mxEvent.addListener(za,"click",function(Pa){if(mxEvent.isShiftDown(Pa)){O(!0);var ya=S.getCellsForTags([sa],null,null,!0);S.isEnabled()?S.setSelectionCells(ya):S.highlightCells(ya)}else if(Ma&&0<S.hiddenTags.length)O(!0);else{ya=
+T.slice();var Aa=mxUtils.indexOf(ya,sa);ya.splice(Aa,1);S.setHiddenTags(ya);R();S.refresh()}mxEvent.consume(Pa)});Na.appendChild(za);if(S.isEnabled()){za=document.createElement("td");za.style.verticalAlign="middle";za.style.textAlign="center";za.style.width="18px";if(null==Fa){za.style.align="center";za.style.width="16px";Ja=document.createElement("img");Ja.setAttribute("src",Editor.crossImage);Ja.setAttribute("title",mxResources.get("removeIt",[sa]));mxUtils.setOpacity(Ja,Ma?75:25);Ja.style.verticalAlign=
+"middle";Ja.style.cursor="pointer";Ja.style.width="16px";if(B||Editor.isDarkMode())Ja.style.filter="invert(100%)";mxEvent.addListener(Ja,"click",function(Pa){var ya=mxUtils.indexOf(T,sa);0<=ya&&T.splice(ya,1);S.removeTagsForCells(S.model.getDescendants(S.model.getRoot()),[sa]);S.refresh();mxEvent.consume(Pa)});za.appendChild(Ja)}else{var Ea=document.createElement("input");Ea.setAttribute("type","checkbox");Ea.style.margin="0px";Ea.defaultChecked=null!=Fa&&0<=mxUtils.indexOf(Fa,sa);Ea.checked=Ea.defaultChecked;
+Ea.style.background="transparent";Ea.setAttribute("title",mxResources.get(Ea.defaultChecked?"removeIt":"add",[sa]));mxEvent.addListener(Ea,"change",function(Pa){Ea.checked?S.addTagsForCells(S.getSelectionCells(),[sa]):S.removeTagsForCells(S.getSelectionCells(),[sa]);mxEvent.consume(Pa)});za.appendChild(Ea)}Na.appendChild(za)}Ba.appendChild(Na)})(Z[Ga]);Ca.appendChild(Ba);ba.appendChild(Ca)}}var S=this,T=S.hiddenTags.slice(),Y=document.createElement("div");Y.style.userSelect="none";Y.style.overflow=
+"hidden";Y.style.padding="10px";Y.style.height="100%";var ba=document.createElement("div");ba.style.boxSizing="border-box";ba.style.borderRadius="4px";ba.style.userSelect="none";ba.style.overflow="auto";ba.style.position="absolute";ba.style.left="10px";ba.style.right="10px";ba.style.top="10px";ba.style.border=S.isEnabled()?"1px solid #808080":"none";ba.style.bottom=S.isEnabled()?"48px":"10px";Y.appendChild(ba);var aa=mxUtils.button(mxResources.get("reset"),function(Z){S.setHiddenTags([]);mxEvent.isShiftDown(Z)||
+(T=S.hiddenTags.slice());R();S.refresh()});aa.setAttribute("title",mxResources.get("reset"));aa.className="geBtn";aa.style.margin="0 4px 0 0";var da=mxUtils.button(mxResources.get("add"),function(){null!=K&&K(T,function(Z){T=Z;ha()})});da.setAttribute("title",mxResources.get("add"));da.className="geBtn";da.style.margin="0";S.addListener(mxEvent.ROOT,function(){T=S.hiddenTags.slice()});var ha=mxUtils.bind(this,function(Z,Fa){if(n()){Z=S.getAllTags();for(Fa=0;Fa<Z.length;Fa++)0>mxUtils.indexOf(T,Z[Fa])&&
+T.push(Z[Fa]);T.sort();S.isSelectionEmpty()?U(T):U(T,S.getCommonTagsForCells(S.getSelectionCells()))}});S.selectionModel.addListener(mxEvent.CHANGE,ha);S.model.addListener(mxEvent.CHANGE,ha);S.addListener(mxEvent.REFRESH,ha);var ma=document.createElement("div");ma.style.boxSizing="border-box";ma.style.whiteSpace="nowrap";ma.style.position="absolute";ma.style.overflow="hidden";ma.style.bottom="0px";ma.style.height="42px";ma.style.right="10px";ma.style.left="10px";S.isEnabled()&&(ma.appendChild(aa),
+ma.appendChild(da),Y.appendChild(ma));return{div:Y,refresh:ha}};Graph.prototype.getCustomFonts=function(){var n=this.extFonts;n=null!=n?n.slice():[];for(var B in Graph.customFontElements){var K=Graph.customFontElements[B];n.push({name:K.name,url:K.url})}return n};Graph.prototype.setFont=function(n,B){Graph.addFont(n,B);document.execCommand("fontname",!1,n);if(null!=B){var K=this.cellEditor.textarea.getElementsByTagName("font");B=Graph.getFontUrl(n,B);for(var R=0;R<K.length;R++)K[R].getAttribute("face")==
+n&&K[R].getAttribute("data-font-src")!=B&&K[R].setAttribute("data-font-src",B)}};var I=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return I.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 n=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=n)for(var B in n)this.globalVars[B]=
n[B]}catch(K){null!=window.console&&console.log("Error in vars URL parameter: "+K)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var q=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(n){var B=q.apply(this,arguments);null==B&&null!=this.globalVars&&(B=this.globalVars[n]);return B};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var n=this.themes["default-style2"];this.defaultStylesheet=
-(new mxCodec(n.ownerDocument)).decode(n)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var D=Graph.prototype.getSvg;Graph.prototype.getSvg=function(n,B,K,Q,P,T,V,S,Y,ca,aa,da,ja,ha){var Z=null,Da=null,Ga=null;da||null==this.themes||"darkTheme"!=this.defaultThemeName||(Z=this.stylesheet,Da=this.shapeForegroundColor,Ga=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?"#000000":Editor.lightColor,this.shapeBackgroundColor=
-"darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var Ba=D.apply(this,arguments),Ha=this.getCustomFonts();if(aa&&0<Ha.length){var pa=Ba.ownerDocument,Na=null!=pa.createElementNS?pa.createElementNS(mxConstants.NS_SVG,"style"):pa.createElement("style");null!=pa.setAttributeNS?Na.setAttributeNS("type","text/css"):Na.setAttribute("type","text/css");for(var La="",ya="",Ja=0;Ja<Ha.length;Ja++){var Fa=Ha[Ja].name,Pa=Ha[Ja].url;Graph.isCssFontUrl(Pa)?
-La+="@import url("+Pa+");\n":ya+='@font-face {\nfont-family: "'+Fa+'";\nsrc: url("'+Pa+'");\n}\n'}Na.appendChild(pa.createTextNode(La+ya));Ba.getElementsByTagName("defs")[0].appendChild(Na)}this.mathEnabled&&(document.body.appendChild(Ba),Editor.MathJaxRender(Ba),Ba.parentNode.removeChild(Ba));null!=Z&&(this.shapeBackgroundColor=Ga,this.shapeForegroundColor=Da,this.stylesheet=Z,this.refresh());return Ba};var A=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(n){A.apply(this,
+(new mxCodec(n.ownerDocument)).decode(n)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var D=Graph.prototype.getSvg;Graph.prototype.getSvg=function(n,B,K,R,O,U,S,T,Y,ba,aa,da,ha,ma){var Z=null,Fa=null,Ca=null;da||null==this.themes||"darkTheme"!=this.defaultThemeName||(Z=this.stylesheet,Fa=this.shapeForegroundColor,Ca=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?"#000000":Editor.lightColor,this.shapeBackgroundColor=
+"darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var Ba=D.apply(this,arguments),Ga=this.getCustomFonts();if(aa&&0<Ga.length){var sa=Ba.ownerDocument,Ma=null!=sa.createElementNS?sa.createElementNS(mxConstants.NS_SVG,"style"):sa.createElement("style");null!=sa.setAttributeNS?Ma.setAttributeNS("type","text/css"):Ma.setAttribute("type","text/css");for(var Na="",za="",Ja=0;Ja<Ga.length;Ja++){var Ea=Ga[Ja].name,Pa=Ga[Ja].url;Graph.isCssFontUrl(Pa)?
+Na+="@import url("+Pa+");\n":za+='@font-face {\nfont-family: "'+Ea+'";\nsrc: url("'+Pa+'");\n}\n'}Ma.appendChild(sa.createTextNode(Na+za));Ba.getElementsByTagName("defs")[0].appendChild(Ma)}this.mathEnabled&&(document.body.appendChild(Ba),Editor.MathJaxRender(Ba),Ba.parentNode.removeChild(Ba));null!=Z&&(this.shapeBackgroundColor=Ca,this.shapeForegroundColor=Fa,this.stylesheet=Z,this.refresh());return Ba};var z=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(n){z.apply(this,
arguments);null!=n.secondLabel&&(n.secondLabel.destroy(),n.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(n){return[n.shape,n.text,n.secondLabel,n.control]};var C=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){C.apply(this,arguments);this.enumerationState=0};var G=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(n){null!=n.shape&&this.redrawEnumerationState(n);return G.apply(this,arguments)};
mxGraphView.prototype.createEnumerationValue=function(n){n=decodeURIComponent(mxUtils.getValue(n.style,"enumerateValue",""));""==n&&(n=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(n)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(n){var B="1"==mxUtils.getValue(n.style,"enumerate",0);B&&null==n.secondLabel?(n.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),
-n.secondLabel.size=12,n.secondLabel.state=n,n.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(n,n.secondLabel)):B||null==n.secondLabel||(n.secondLabel.destroy(),n.secondLabel=null);B=n.secondLabel;if(null!=B){var K=n.view.scale,Q=this.createEnumerationValue(n);n=this.graph.model.isVertex(n.cell)?new mxRectangle(n.x+n.width-4*K,n.y+4*K,0,0):mxRectangle.fromPoint(n.view.getPoint(n));B.bounds.equals(n)&&B.value==Q&&B.scale==K||(B.bounds=n,B.value=Q,B.scale=
-K,B.redraw())}};var M=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){M.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var n=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;",n.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,n.ownerSVGElement))}};var H=Graph.prototype.refresh;Graph.prototype.refresh=function(){H.apply(this,
+n.secondLabel.size=12,n.secondLabel.state=n,n.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(n,n.secondLabel)):B||null==n.secondLabel||(n.secondLabel.destroy(),n.secondLabel=null);B=n.secondLabel;if(null!=B){var K=n.view.scale,R=this.createEnumerationValue(n);n=this.graph.model.isVertex(n.cell)?new mxRectangle(n.x+n.width-4*K,n.y+4*K,0,0):mxRectangle.fromPoint(n.view.getPoint(n));B.bounds.equals(n)&&B.value==R&&B.scale==K||(B.bounds=n,B.value=R,B.scale=
+K,B.redraw())}};var H=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){H.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var n=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;",n.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,n.ownerSVGElement))}};var M=Graph.prototype.refresh;Graph.prototype.refresh=function(){M.apply(this,
arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var F=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){F.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(n){"data:action/json,"==n.substring(0,17)&&(n=JSON.parse(n.substring(17)),null!=
-n.actions&&this.executeCustomActions(n.actions))};Graph.prototype.executeCustomActions=function(n,B){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 K=!1,Q=0,P=0,T=mxUtils.bind(this,function(){K||(K=!0,this.model.beginUpdate())}),V=mxUtils.bind(this,
-function(){K&&(K=!1,this.model.endUpdate())}),S=mxUtils.bind(this,function(){0<Q&&Q--;0==Q&&Y()}),Y=mxUtils.bind(this,function(){if(P<n.length){var ca=this.stoppingCustomActions,aa=n[P++],da=[];if(null!=aa.open)if(V(),this.isCustomLink(aa.open)){if(!this.customLinkClicked(aa.open))return}else this.openLink(aa.open);null==aa.wait||ca||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;S()}),Q++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,
-""!=aa.wait?parseInt(aa.wait):1E3),V());null!=aa.opacity&&null!=aa.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(aa.opacity,!0)),aa.opacity.value);null!=aa.fadeIn&&(Q++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(aa.fadeIn,!0)),0,1,S,ca?0:aa.fadeIn.delay));null!=aa.fadeOut&&(Q++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(aa.fadeOut,!0)),1,0,S,ca?0:aa.fadeOut.delay));null!=aa.wipeIn&&(da=da.concat(this.createWipeAnimations(this.getCellsForAction(aa.wipeIn,
-!0),!0)));null!=aa.wipeOut&&(da=da.concat(this.createWipeAnimations(this.getCellsForAction(aa.wipeOut,!0),!1)));null!=aa.toggle&&(T(),this.toggleCells(this.getCellsForAction(aa.toggle,!0)));if(null!=aa.show){T();var ja=this.getCellsForAction(aa.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(ja),1);this.setCellsVisible(ja,!0)}null!=aa.hide&&(T(),ja=this.getCellsForAction(aa.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(ja),0),this.setCellsVisible(ja,!1));null!=aa.toggleStyle&&null!=
-aa.toggleStyle.key&&(T(),this.toggleCellStyles(aa.toggleStyle.key,null!=aa.toggleStyle.defaultValue?aa.toggleStyle.defaultValue:"0",this.getCellsForAction(aa.toggleStyle,!0)));null!=aa.style&&null!=aa.style.key&&(T(),this.setCellStyles(aa.style.key,aa.style.value,this.getCellsForAction(aa.style,!0)));ja=[];null!=aa.select&&this.isEnabled()&&(ja=this.getCellsForAction(aa.select),this.setSelectionCells(ja));null!=aa.highlight&&(ja=this.getCellsForAction(aa.highlight),this.highlightCells(ja,aa.highlight.color,
-aa.highlight.duration,aa.highlight.opacity));null!=aa.scroll&&(ja=this.getCellsForAction(aa.scroll));null!=aa.viewbox&&this.fitWindow(aa.viewbox,aa.viewbox.border);0<ja.length&&this.scrollCellToVisible(ja[0]);if(null!=aa.tags){ja=[];null!=aa.tags.hidden&&(ja=ja.concat(aa.tags.hidden));if(null!=aa.tags.visible)for(var ha=this.getAllTags(),Z=0;Z<ha.length;Z++)0>mxUtils.indexOf(aa.tags.visible,ha[Z])&&0>mxUtils.indexOf(ja,ha[Z])&&ja.push(ha[Z]);this.setHiddenTags(ja);this.refresh()}0<da.length&&(Q++,
-this.executeAnimations(da,S,ca?1:aa.steps,ca?0:aa.delay));0==Q?Y():V()}else this.stoppingCustomActions=this.executingCustomActions=!1,V(),null!=B&&B()});Y()}};Graph.prototype.doUpdateCustomLinksForCell=function(n,B){var K=this.getLinkForCell(B);null!=K&&"data:action/json,"==K.substring(0,17)&&this.setLinkForCell(B,this.updateCustomLink(n,K));if(this.isHtmlLabel(B)){var Q=document.createElement("div");Q.innerHTML=this.sanitizeHtml(this.getLabel(B));for(var P=Q.getElementsByTagName("a"),T=!1,V=0;V<
-P.length;V++)K=P[V].getAttribute("href"),null!=K&&"data:action/json,"==K.substring(0,17)&&(P[V].setAttribute("href",this.updateCustomLink(n,K)),T=!0);T&&this.labelChanged(B,Q.innerHTML)}};Graph.prototype.updateCustomLink=function(n,B){if("data:action/json,"==B.substring(0,17))try{var K=JSON.parse(B.substring(17));null!=K.actions&&(this.updateCustomLinkActions(n,K.actions),B="data:action/json,"+JSON.stringify(K))}catch(Q){}return B};Graph.prototype.updateCustomLinkActions=function(n,B){for(var K=0;K<
-B.length;K++){var Q=B[K],P;for(P in Q)this.updateCustomLinkAction(n,Q[P],"cells"),this.updateCustomLinkAction(n,Q[P],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(n,B,K){if(null!=B&&null!=B[K]){for(var Q=[],P=0;P<B[K].length;P++)if("*"==B[K][P])Q.push(B[K][P]);else{var T=n[B[K][P]];null!=T?""!=T&&Q.push(T):Q.push(B[K][P])}B[K]=Q}};Graph.prototype.getCellsForAction=function(n,B){B=this.getCellsById(n.cells).concat(this.getCellsForTags(n.tags,null,B));if(null!=n.excludeCells){for(var K=
-[],Q=0;Q<B.length;Q++)0>n.excludeCells.indexOf(B[Q].id)&&K.push(B[Q]);B=K}return B};Graph.prototype.getCellsById=function(n){var B=[];if(null!=n)for(var K=0;K<n.length;K++)if("*"==n[K]){var Q=this.model.getRoot();B=B.concat(this.model.filterDescendants(function(T){return T!=Q},Q))}else{var P=this.model.getCell(n[K]);null!=P&&B.push(P)}return B};var I=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(n){return I.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(n))};
+n.actions&&this.executeCustomActions(n.actions))};Graph.prototype.executeCustomActions=function(n,B){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 K=!1,R=0,O=0,U=mxUtils.bind(this,function(){K||(K=!0,this.model.beginUpdate())}),S=mxUtils.bind(this,
+function(){K&&(K=!1,this.model.endUpdate())}),T=mxUtils.bind(this,function(){0<R&&R--;0==R&&Y()}),Y=mxUtils.bind(this,function(){if(O<n.length){var ba=this.stoppingCustomActions,aa=n[O++],da=[];if(null!=aa.open)if(S(),this.isCustomLink(aa.open)){if(!this.customLinkClicked(aa.open))return}else this.openLink(aa.open);null==aa.wait||ba||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;T()}),R++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,
+""!=aa.wait?parseInt(aa.wait):1E3),S());null!=aa.opacity&&null!=aa.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(aa.opacity,!0)),aa.opacity.value);null!=aa.fadeIn&&(R++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(aa.fadeIn,!0)),0,1,T,ba?0:aa.fadeIn.delay));null!=aa.fadeOut&&(R++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(aa.fadeOut,!0)),1,0,T,ba?0:aa.fadeOut.delay));null!=aa.wipeIn&&(da=da.concat(this.createWipeAnimations(this.getCellsForAction(aa.wipeIn,
+!0),!0)));null!=aa.wipeOut&&(da=da.concat(this.createWipeAnimations(this.getCellsForAction(aa.wipeOut,!0),!1)));null!=aa.toggle&&(U(),this.toggleCells(this.getCellsForAction(aa.toggle,!0)));if(null!=aa.show){U();var ha=this.getCellsForAction(aa.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(ha),1);this.setCellsVisible(ha,!0)}null!=aa.hide&&(U(),ha=this.getCellsForAction(aa.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(ha),0),this.setCellsVisible(ha,!1));null!=aa.toggleStyle&&null!=
+aa.toggleStyle.key&&(U(),this.toggleCellStyles(aa.toggleStyle.key,null!=aa.toggleStyle.defaultValue?aa.toggleStyle.defaultValue:"0",this.getCellsForAction(aa.toggleStyle,!0)));null!=aa.style&&null!=aa.style.key&&(U(),this.setCellStyles(aa.style.key,aa.style.value,this.getCellsForAction(aa.style,!0)));ha=[];null!=aa.select&&this.isEnabled()&&(ha=this.getCellsForAction(aa.select),this.setSelectionCells(ha));null!=aa.highlight&&(ha=this.getCellsForAction(aa.highlight),this.highlightCells(ha,aa.highlight.color,
+aa.highlight.duration,aa.highlight.opacity));null!=aa.scroll&&(ha=this.getCellsForAction(aa.scroll));null!=aa.viewbox&&this.fitWindow(aa.viewbox,aa.viewbox.border);0<ha.length&&this.scrollCellToVisible(ha[0]);if(null!=aa.tags){ha=[];null!=aa.tags.hidden&&(ha=ha.concat(aa.tags.hidden));if(null!=aa.tags.visible)for(var ma=this.getAllTags(),Z=0;Z<ma.length;Z++)0>mxUtils.indexOf(aa.tags.visible,ma[Z])&&0>mxUtils.indexOf(ha,ma[Z])&&ha.push(ma[Z]);this.setHiddenTags(ha);this.refresh()}0<da.length&&(R++,
+this.executeAnimations(da,T,ba?1:aa.steps,ba?0:aa.delay));0==R?Y():S()}else this.stoppingCustomActions=this.executingCustomActions=!1,S(),null!=B&&B()});Y()}};Graph.prototype.doUpdateCustomLinksForCell=function(n,B){var K=this.getLinkForCell(B);null!=K&&"data:action/json,"==K.substring(0,17)&&this.setLinkForCell(B,this.updateCustomLink(n,K));if(this.isHtmlLabel(B)){var R=document.createElement("div");R.innerHTML=this.sanitizeHtml(this.getLabel(B));for(var O=R.getElementsByTagName("a"),U=!1,S=0;S<
+O.length;S++)K=O[S].getAttribute("href"),null!=K&&"data:action/json,"==K.substring(0,17)&&(O[S].setAttribute("href",this.updateCustomLink(n,K)),U=!0);U&&this.labelChanged(B,R.innerHTML)}};Graph.prototype.updateCustomLink=function(n,B){if("data:action/json,"==B.substring(0,17))try{var K=JSON.parse(B.substring(17));null!=K.actions&&(this.updateCustomLinkActions(n,K.actions),B="data:action/json,"+JSON.stringify(K))}catch(R){}return B};Graph.prototype.updateCustomLinkActions=function(n,B){for(var K=0;K<
+B.length;K++){var R=B[K],O;for(O in R)this.updateCustomLinkAction(n,R[O],"cells"),this.updateCustomLinkAction(n,R[O],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(n,B,K){if(null!=B&&null!=B[K]){for(var R=[],O=0;O<B[K].length;O++)if("*"==B[K][O])R.push(B[K][O]);else{var U=n[B[K][O]];null!=U?""!=U&&R.push(U):R.push(B[K][O])}B[K]=R}};Graph.prototype.getCellsForAction=function(n,B){B=this.getCellsById(n.cells).concat(this.getCellsForTags(n.tags,null,B));if(null!=n.excludeCells){for(var K=
+[],R=0;R<B.length;R++)0>n.excludeCells.indexOf(B[R].id)&&K.push(B[R]);B=K}return B};Graph.prototype.getCellsById=function(n){var B=[];if(null!=n)for(var K=0;K<n.length;K++)if("*"==n[K]){var R=this.model.getRoot();B=B.concat(this.model.filterDescendants(function(U){return U!=R},R))}else{var O=this.model.getCell(n[K]);null!=O&&B.push(O)}return B};var J=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(n){return J.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(n))};
Graph.prototype.setHiddenTags=function(n){this.hiddenTags=n;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(n){var B=mxUtils.indexOf(this.hiddenTags,n);0>B?this.hiddenTags.push(n):0<=B&&this.hiddenTags.splice(B,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(n){if(null==n||0==n.length||0==this.hiddenTags.length)return!1;n=n.split(" ");if(n.length>this.hiddenTags.length)return!1;for(var B=0;B<n.length;B++)if(0>
-mxUtils.indexOf(this.hiddenTags,n[B]))return!1;return!0};Graph.prototype.getCellsForTags=function(n,B,K,Q){var P=[];if(null!=n){B=null!=B?B:this.model.getDescendants(this.model.getRoot());for(var T=0,V={},S=0;S<n.length;S++)0<n[S].length&&(V[n[S]]=!0,T++);for(S=0;S<B.length;S++)if(K&&this.model.getParent(B[S])==this.model.root||this.model.isVertex(B[S])||this.model.isEdge(B[S])){var Y=this.getTagsForCell(B[S]),ca=!1;if(0<Y.length&&(Y=Y.split(" "),Y.length>=n.length)){for(var aa=ca=0;aa<Y.length&&
-ca<T;aa++)null!=V[Y[aa]]&&ca++;ca=ca==T}ca&&(1!=Q||this.isCellVisible(B[S]))&&P.push(B[S])}}return P};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(n){for(var B=null,K=[],Q=0;Q<n.length;Q++){var P=this.getTagsForCell(n[Q]);K=[];if(0<P.length){P=P.split(" ");for(var T={},V=0;V<P.length;V++)if(null==B||null!=B[P[V]])T[P[V]]=!0,K.push(P[V]);B=T}else return[]}return K};Graph.prototype.getTagsForCells=
-function(n){for(var B=[],K={},Q=0;Q<n.length;Q++){var P=this.getTagsForCell(n[Q]);if(0<P.length){P=P.split(" ");for(var T=0;T<P.length;T++)null==K[P[T]]&&(K[P[T]]=!0,B.push(P[T]))}}return B};Graph.prototype.getTagsForCell=function(n){return this.getAttributeForCell(n,"tags","")};Graph.prototype.addTagsForCells=function(n,B){if(0<n.length&&0<B.length){this.model.beginUpdate();try{for(var K=0;K<n.length;K++){for(var Q=this.getTagsForCell(n[K]),P=Q.split(" "),T=!1,V=0;V<B.length;V++){var S=mxUtils.trim(B[V]);
-""!=S&&0>mxUtils.indexOf(P,S)&&(Q=0<Q.length?Q+" "+S:S,T=!0)}T&&this.setAttributeForCell(n[K],"tags",Q)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(n,B){if(0<n.length&&0<B.length){this.model.beginUpdate();try{for(var K=0;K<n.length;K++){var Q=this.getTagsForCell(n[K]);if(0<Q.length){for(var P=Q.split(" "),T=!1,V=0;V<B.length;V++){var S=mxUtils.indexOf(P,B[V]);0<=S&&(P.splice(S,1),T=!0)}T&&this.setAttributeForCell(n[K],"tags",P.join(" "))}}}finally{this.model.endUpdate()}}};
-Graph.prototype.toggleCells=function(n){this.model.beginUpdate();try{for(var B=0;B<n.length;B++)this.model.setVisible(n[B],!this.model.isVisible(n[B]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(n,B){this.model.beginUpdate();try{for(var K=0;K<n.length;K++)this.model.setVisible(n[K],B)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(n,B,K,Q){for(var P=0;P<n.length;P++)this.highlightCell(n[P],B,K,Q)};Graph.prototype.highlightCell=function(n,B,
-K,Q,P){B=null!=B?B:mxConstants.DEFAULT_VALID_COLOR;K=null!=K?K:1E3;n=this.view.getState(n);var T=null;null!=n&&(P=null!=P?P:4,P=Math.max(P+1,mxUtils.getValue(n.style,mxConstants.STYLE_STROKEWIDTH,1)+P),T=new mxCellHighlight(this,B,P,!1),null!=Q&&(T.opacity=Q),T.highlight(n),window.setTimeout(function(){null!=T.shape&&(mxUtils.setPrefixedStyle(T.shape.node.style,"transition","all 1200ms ease-in-out"),T.shape.node.style.opacity=0);window.setTimeout(function(){T.destroy()},1200)},K));return T};Graph.prototype.addSvgShadow=
-function(n,B,K,Q){K=null!=K?K:!1;Q=null!=Q?Q:!0;var P=n.ownerDocument,T=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"filter"):P.createElement("filter");T.setAttribute("id",this.shadowId);var V=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):P.createElement("feGaussianBlur");V.setAttribute("in","SourceAlpha");V.setAttribute("stdDeviation",this.svgShadowBlur);V.setAttribute("result","blur");T.appendChild(V);V=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,
-"feOffset"):P.createElement("feOffset");V.setAttribute("in","blur");V.setAttribute("dx",this.svgShadowSize);V.setAttribute("dy",this.svgShadowSize);V.setAttribute("result","offsetBlur");T.appendChild(V);V=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feFlood"):P.createElement("feFlood");V.setAttribute("flood-color",this.svgShadowColor);V.setAttribute("flood-opacity",this.svgShadowOpacity);V.setAttribute("result","offsetColor");T.appendChild(V);V=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,
-"feComposite"):P.createElement("feComposite");V.setAttribute("in","offsetColor");V.setAttribute("in2","offsetBlur");V.setAttribute("operator","in");V.setAttribute("result","offsetBlur");T.appendChild(V);V=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feBlend"):P.createElement("feBlend");V.setAttribute("in","SourceGraphic");V.setAttribute("in2","offsetBlur");T.appendChild(V);V=n.getElementsByTagName("defs");0==V.length?(P=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,
-"defs"):P.createElement("defs"),null!=n.firstChild?n.insertBefore(P,n.firstChild):n.appendChild(P)):P=V[0];P.appendChild(T);K||(B=null!=B?B:n.getElementsByTagName("g")[0],null!=B&&(B.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(n.getAttribute("width")))&&Q&&(n.setAttribute("width",parseInt(n.getAttribute("width"))+6),n.setAttribute("height",parseInt(n.getAttribute("height"))+6),B=n.getAttribute("viewBox"),null!=B&&0<B.length&&(B=B.split(" "),3<B.length&&(w=parseFloat(B[2])+6,h=
-parseFloat(B[3])+6,n.setAttribute("viewBox",B[0]+" "+B[1]+" "+w+" "+h))))));return T};Graph.prototype.setShadowVisible=function(n,B){mxClient.IS_SVG&&!mxClient.IS_SF&&(B=null!=B?B:!0,(this.shadowVisible=n)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),B&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var n=this.model.getChildCount(this.model.root),
+mxUtils.indexOf(this.hiddenTags,n[B]))return!1;return!0};Graph.prototype.getCellsForTags=function(n,B,K,R){var O=[];if(null!=n){B=null!=B?B:this.model.getDescendants(this.model.getRoot());for(var U=0,S={},T=0;T<n.length;T++)0<n[T].length&&(S[n[T]]=!0,U++);for(T=0;T<B.length;T++)if(K&&this.model.getParent(B[T])==this.model.root||this.model.isVertex(B[T])||this.model.isEdge(B[T])){var Y=this.getTagsForCell(B[T]),ba=!1;if(0<Y.length&&(Y=Y.split(" "),Y.length>=n.length)){for(var aa=ba=0;aa<Y.length&&
+ba<U;aa++)null!=S[Y[aa]]&&ba++;ba=ba==U}ba&&(1!=R||this.isCellVisible(B[T]))&&O.push(B[T])}}return O};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(n){for(var B=null,K=[],R=0;R<n.length;R++){var O=this.getTagsForCell(n[R]);K=[];if(0<O.length){O=O.split(" ");for(var U={},S=0;S<O.length;S++)if(null==B||null!=B[O[S]])U[O[S]]=!0,K.push(O[S]);B=U}else return[]}return K};Graph.prototype.getTagsForCells=
+function(n){for(var B=[],K={},R=0;R<n.length;R++){var O=this.getTagsForCell(n[R]);if(0<O.length){O=O.split(" ");for(var U=0;U<O.length;U++)null==K[O[U]]&&(K[O[U]]=!0,B.push(O[U]))}}return B};Graph.prototype.getTagsForCell=function(n){return this.getAttributeForCell(n,"tags","")};Graph.prototype.addTagsForCells=function(n,B){if(0<n.length&&0<B.length){this.model.beginUpdate();try{for(var K=0;K<n.length;K++){for(var R=this.getTagsForCell(n[K]),O=R.split(" "),U=!1,S=0;S<B.length;S++){var T=mxUtils.trim(B[S]);
+""!=T&&0>mxUtils.indexOf(O,T)&&(R=0<R.length?R+" "+T:T,U=!0)}U&&this.setAttributeForCell(n[K],"tags",R)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(n,B){if(0<n.length&&0<B.length){this.model.beginUpdate();try{for(var K=0;K<n.length;K++){var R=this.getTagsForCell(n[K]);if(0<R.length){for(var O=R.split(" "),U=!1,S=0;S<B.length;S++){var T=mxUtils.indexOf(O,B[S]);0<=T&&(O.splice(T,1),U=!0)}U&&this.setAttributeForCell(n[K],"tags",O.join(" "))}}}finally{this.model.endUpdate()}}};
+Graph.prototype.toggleCells=function(n){this.model.beginUpdate();try{for(var B=0;B<n.length;B++)this.model.setVisible(n[B],!this.model.isVisible(n[B]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(n,B){this.model.beginUpdate();try{for(var K=0;K<n.length;K++)this.model.setVisible(n[K],B)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(n,B,K,R){for(var O=0;O<n.length;O++)this.highlightCell(n[O],B,K,R)};Graph.prototype.highlightCell=function(n,B,
+K,R,O){B=null!=B?B:mxConstants.DEFAULT_VALID_COLOR;K=null!=K?K:1E3;n=this.view.getState(n);var U=null;null!=n&&(O=null!=O?O:4,O=Math.max(O+1,mxUtils.getValue(n.style,mxConstants.STYLE_STROKEWIDTH,1)+O),U=new mxCellHighlight(this,B,O,!1),null!=R&&(U.opacity=R),U.highlight(n),window.setTimeout(function(){null!=U.shape&&(mxUtils.setPrefixedStyle(U.shape.node.style,"transition","all 1200ms ease-in-out"),U.shape.node.style.opacity=0);window.setTimeout(function(){U.destroy()},1200)},K));return U};Graph.prototype.addSvgShadow=
+function(n,B,K,R){K=null!=K?K:!1;R=null!=R?R:!0;var O=n.ownerDocument,U=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"filter"):O.createElement("filter");U.setAttribute("id",this.shadowId);var S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):O.createElement("feGaussianBlur");S.setAttribute("in","SourceAlpha");S.setAttribute("stdDeviation",this.svgShadowBlur);S.setAttribute("result","blur");U.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,
+"feOffset"):O.createElement("feOffset");S.setAttribute("in","blur");S.setAttribute("dx",this.svgShadowSize);S.setAttribute("dy",this.svgShadowSize);S.setAttribute("result","offsetBlur");U.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feFlood"):O.createElement("feFlood");S.setAttribute("flood-color",this.svgShadowColor);S.setAttribute("flood-opacity",this.svgShadowOpacity);S.setAttribute("result","offsetColor");U.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,
+"feComposite"):O.createElement("feComposite");S.setAttribute("in","offsetColor");S.setAttribute("in2","offsetBlur");S.setAttribute("operator","in");S.setAttribute("result","offsetBlur");U.appendChild(S);S=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,"feBlend"):O.createElement("feBlend");S.setAttribute("in","SourceGraphic");S.setAttribute("in2","offsetBlur");U.appendChild(S);S=n.getElementsByTagName("defs");0==S.length?(O=null!=O.createElementNS?O.createElementNS(mxConstants.NS_SVG,
+"defs"):O.createElement("defs"),null!=n.firstChild?n.insertBefore(O,n.firstChild):n.appendChild(O)):O=S[0];O.appendChild(U);K||(B=null!=B?B:n.getElementsByTagName("g")[0],null!=B&&(B.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(n.getAttribute("width")))&&R&&(n.setAttribute("width",parseInt(n.getAttribute("width"))+6),n.setAttribute("height",parseInt(n.getAttribute("height"))+6),B=n.getAttribute("viewBox"),null!=B&&0<B.length&&(B=B.split(" "),3<B.length&&(w=parseFloat(B[2])+6,h=
+parseFloat(B[3])+6,n.setAttribute("viewBox",B[0]+" "+B[1]+" "+w+" "+h))))));return U};Graph.prototype.setShadowVisible=function(n,B){mxClient.IS_SVG&&!mxClient.IS_SF&&(B=null!=B?B:!0,(this.shadowVisible=n)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),B&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var n=this.model.getChildCount(this.model.root),
B=0;do var K=this.model.getChildAt(this.model.root,B);while(B++<n&&"1"==mxUtils.getValue(this.getCellStyle(K),"locked","0"));null!=K&&this.setDefaultParent(K)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+
"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.bpmn2=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.c4=[SHAPES_PATH+"/mxC4.js"];mxStencilRegistry.libraries.cisco19=[SHAPES_PATH+"/mxCisco19.js",STENCIL_PATH+"/cisco19.xml"];mxStencilRegistry.libraries.cisco_safe=[SHAPES_PATH+"/mxCiscoSafe.js",STENCIL_PATH+"/cisco_safe/architecture.xml",STENCIL_PATH+"/cisco_safe/business_icons.xml",STENCIL_PATH+"/cisco_safe/capability.xml",STENCIL_PATH+
"/cisco_safe/design.xml",STENCIL_PATH+"/cisco_safe/iot_things_icons.xml",STENCIL_PATH+"/cisco_safe/people_places_things_icons.xml",STENCIL_PATH+"/cisco_safe/security_icons.xml",STENCIL_PATH+"/cisco_safe/technology_icons.xml",STENCIL_PATH+"/cisco_safe/threat.xml"];mxStencilRegistry.libraries.dfd=[SHAPES_PATH+"/mxDFD.js"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.kubernetes=[SHAPES_PATH+"/mxKubernetes.js",STENCIL_PATH+"/kubernetes.xml"];mxStencilRegistry.libraries.flowchart=
@@ -11682,40 +11678,40 @@ mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js
"/mxBasic.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.ibm=[SHAPES_PATH+"/mxIBM.js",STENCIL_PATH+"/ibm.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=
[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",
STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+
-"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(n){var B=null;null!=n&&0<n.length&&("ER"==n.substring(0,2)?B="mxgraph.er":"sysML"==n.substring(0,5)&&(B="mxgraph.sysml"));return B};var R=mxMarker.createMarker;mxMarker.createMarker=function(n,B,K,Q,P,T,V,S,Y,ca){if(null!=K&&null==mxMarker.markers[K]){var aa=this.getPackageForType(K);null!=
-aa&&mxStencilRegistry.getStencil(aa)}return R.apply(this,arguments)};var X=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(n,B,K,Q,P,T){"1"==mxUtils.getValue(B.style,"lineShape",null)&&n.setFillColor(mxUtils.getValue(B.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return X.apply(this,arguments)};PrintDialog.prototype.create=function(n,B){function K(){ja.value=Math.max(1,Math.min(S,Math.max(parseInt(ja.value),parseInt(da.value))));da.value=Math.max(1,Math.min(S,Math.min(parseInt(ja.value),
-parseInt(da.value))))}function Q(wa){function ta(Ea,Ia,Qa){var Ma=Ea.useCssTransforms,Ra=Ea.currentTranslate,Xa=Ea.currentScale,Ka=Ea.view.translate,Ta=Ea.view.scale;Ea.useCssTransforms&&(Ea.useCssTransforms=!1,Ea.currentTranslate=new mxPoint(0,0),Ea.currentScale=1,Ea.view.translate=new mxPoint(0,0),Ea.view.scale=1);var Ua=Ea.getGraphBounds(),Va=0,$a=0,Wa=Aa.get(),ab=1/Ea.pageScale,Za=Ba.checked;if(Za){ab=parseInt(za.value);var gb=parseInt(ua.value);ab=Math.min(Wa.height*gb/(Ua.height/Ea.view.scale),
-Wa.width*ab/(Ua.width/Ea.view.scale))}else ab=parseInt(Ga.value)/(100*Ea.pageScale),isNaN(ab)&&(sa=1/Ea.pageScale,Ga.value="100 %");Wa=mxRectangle.fromRectangle(Wa);Wa.width=Math.ceil(Wa.width*sa);Wa.height=Math.ceil(Wa.height*sa);ab*=sa;!Za&&Ea.pageVisible?(Ua=Ea.getPageLayout(),Va-=Ua.x*Wa.width,$a-=Ua.y*Wa.height):Za=!0;if(null==Ia){Ia=PrintDialog.createPrintPreview(Ea,ab,Wa,0,Va,$a,Za);Ia.pageSelector=!1;Ia.mathEnabled=!1;ha.checked&&(Ia.isCellVisible=function(Ya){return Ea.isCellSelected(Ya)});
-Va=n.getCurrentFile();null!=Va&&(Ia.title=Va.getTitle());var hb=Ia.writeHead;Ia.writeHead=function(Ya){hb.apply(this,arguments);mxClient.IS_GC&&(Ya.writeln('<style type="text/css">'),Ya.writeln("@media print {"),Ya.writeln(".MathJax svg { shape-rendering: crispEdges; }"),Ya.writeln("}"),Ya.writeln("</style>"));null!=n.editor.fontCss&&(Ya.writeln('<style type="text/css">'),Ya.writeln(n.editor.fontCss),Ya.writeln("</style>"));for(var cb=Ea.getCustomFonts(),bb=0;bb<cb.length;bb++){var eb=cb[bb].name,
-db=cb[bb].url;Graph.isCssFontUrl(db)?Ya.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(db)+'" charset="UTF-8" type="text/css">'):(Ya.writeln('<style type="text/css">'),Ya.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(eb)+'";\nsrc: url("'+mxUtils.htmlEntities(db)+'");\n}'),Ya.writeln("</style>"))}};if("undefined"!==typeof MathJax){var ib=Ia.renderPage;Ia.renderPage=function(Ya,cb,bb,eb,db,kb){var jb=mxClient.NO_FO,fb=ib.apply(this,arguments);mxClient.NO_FO=jb;this.graph.mathEnabled?
-this.mathEnabled=this.mathEnabled||!0:fb.className="geDisableMathJax";return fb}}Va=null;$a=P.shapeForegroundColor;Za=P.shapeBackgroundColor;Wa=P.enableFlowAnimation;P.enableFlowAnimation=!1;null!=P.themes&&"darkTheme"==P.defaultThemeName&&(Va=P.stylesheet,P.stylesheet=P.getDefaultStylesheet(),P.shapeForegroundColor="#000000",P.shapeBackgroundColor="#ffffff",P.refresh());Ia.open(null,null,Qa,!0);P.enableFlowAnimation=Wa;null!=Va&&(P.shapeForegroundColor=$a,P.shapeBackgroundColor=Za,P.stylesheet=Va,
-P.refresh())}else{Wa=Ea.background;if(null==Wa||""==Wa||Wa==mxConstants.NONE)Wa="#ffffff";Ia.backgroundColor=Wa;Ia.autoOrigin=Za;Ia.appendGraph(Ea,ab,Va,$a,Qa,!0);Qa=Ea.getCustomFonts();if(null!=Ia.wnd)for(Va=0;Va<Qa.length;Va++)$a=Qa[Va].name,Za=Qa[Va].url,Graph.isCssFontUrl(Za)?Ia.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Za)+'" charset="UTF-8" type="text/css">'):(Ia.wnd.document.writeln('<style type="text/css">'),Ia.wnd.document.writeln('@font-face {\nfont-family: "'+
-mxUtils.htmlEntities($a)+'";\nsrc: url("'+mxUtils.htmlEntities(Za)+'");\n}'),Ia.wnd.document.writeln("</style>"))}Ma&&(Ea.useCssTransforms=Ma,Ea.currentTranslate=Ra,Ea.currentScale=Xa,Ea.view.translate=Ka,Ea.view.scale=Ta);return Ia}var sa=parseInt(ea.value)/100;isNaN(sa)&&(sa=1,ea.value="100 %");sa*=.75;var ra=null,va=P.shapeForegroundColor,ia=P.shapeBackgroundColor;null!=P.themes&&"darkTheme"==P.defaultThemeName&&(ra=P.stylesheet,P.stylesheet=P.getDefaultStylesheet(),P.shapeForegroundColor="#000000",
-P.shapeBackgroundColor="#ffffff",P.refresh());var ma=da.value,ba=ja.value,fa=!ca.checked,na=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(n,ca.checked,ma,ba,Ba.checked,za.value,ua.value,parseInt(Ga.value)/100,parseInt(ea.value)/100,Aa.get());else{fa&&(fa=ha.checked||ma==Y&&ba==Y);if(!fa&&null!=n.pages&&n.pages.length){var la=0;fa=n.pages.length-1;ca.checked||(la=parseInt(ma)-1,fa=parseInt(ba)-1);for(var qa=la;qa<=fa;qa++){var oa=n.pages[qa];ma=oa==n.currentPage?P:null;if(null==ma){ma=n.createTemporaryGraph(P.stylesheet);
-ma.shapeForegroundColor=P.shapeForegroundColor;ma.shapeBackgroundColor=P.shapeBackgroundColor;ba=!0;la=!1;var ka=null,Ca=null;null==oa.viewState&&null==oa.root&&n.updatePageRoot(oa);null!=oa.viewState&&(ba=oa.viewState.pageVisible,la=oa.viewState.mathEnabled,ka=oa.viewState.background,Ca=oa.viewState.backgroundImage,ma.extFonts=oa.viewState.extFonts);null!=Ca&&null!=Ca.originalSrc&&(Ca=n.createImageForPageLink(Ca.originalSrc,oa));ma.background=ka;ma.backgroundImage=null!=Ca?new mxImage(Ca.src,Ca.width,
-Ca.height,Ca.x,Ca.y):null;ma.pageVisible=ba;ma.mathEnabled=la;var Oa=ma.getGraphBounds;ma.getGraphBounds=function(){var Ea=Oa.apply(this,arguments),Ia=this.backgroundImage;if(null!=Ia&&null!=Ia.width&&null!=Ia.height){var Qa=this.view.translate,Ma=this.view.scale;Ea=mxRectangle.fromRectangle(Ea);Ea.add(new mxRectangle((Qa.x+Ia.x)*Ma,(Qa.y+Ia.y)*Ma,Ia.width*Ma,Ia.height*Ma))}return Ea};var Sa=ma.getGlobalVariable;ma.getGlobalVariable=function(Ea){return"page"==Ea?oa.getName():"pagenumber"==Ea?qa+1:
-"pagecount"==Ea?null!=n.pages?n.pages.length:1:Sa.apply(this,arguments)};document.body.appendChild(ma.container);n.updatePageRoot(oa);ma.model.setRoot(oa.root)}na=ta(ma,na,qa!=fa);ma!=P&&ma.container.parentNode.removeChild(ma.container)}}else na=ta(P);null==na?n.handleError({message:mxResources.get("errorUpdatingPreview")}):(na.mathEnabled&&(fa=na.wnd.document,wa&&(na.wnd.IMMEDIATE_PRINT=!0),fa.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),na.closeDocument(),
-!na.mathEnabled&&wa&&PrintDialog.printPreview(na));null!=ra&&(P.shapeForegroundColor=va,P.shapeBackgroundColor=ia,P.stylesheet=ra,P.refresh())}}var P=n.editor.graph,T=document.createElement("div"),V=document.createElement("h3");V.style.width="100%";V.style.textAlign="center";V.style.marginTop="0px";mxUtils.write(V,B||mxResources.get("print"));T.appendChild(V);var S=1,Y=1;V=document.createElement("div");V.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var ca=
-document.createElement("input");ca.style.cssText="margin-right:8px;margin-bottom:8px;";ca.setAttribute("value","all");ca.setAttribute("type","radio");ca.setAttribute("name","pages-printdialog");V.appendChild(ca);B=document.createElement("span");mxUtils.write(B,mxResources.get("printAllPages"));V.appendChild(B);mxUtils.br(V);var aa=ca.cloneNode(!0);ca.setAttribute("checked","checked");aa.setAttribute("value","range");V.appendChild(aa);B=document.createElement("span");mxUtils.write(B,mxResources.get("pages")+
-":");V.appendChild(B);var da=document.createElement("input");da.style.cssText="margin:0 8px 0 8px;";da.setAttribute("value","1");da.setAttribute("type","number");da.setAttribute("min","1");da.style.width="50px";V.appendChild(da);B=document.createElement("span");mxUtils.write(B,mxResources.get("to"));V.appendChild(B);var ja=da.cloneNode(!0);V.appendChild(ja);mxEvent.addListener(da,"focus",function(){aa.checked=!0});mxEvent.addListener(ja,"focus",function(){aa.checked=!0});mxEvent.addListener(da,"change",
-K);mxEvent.addListener(ja,"change",K);if(null!=n.pages&&(S=n.pages.length,null!=n.currentPage))for(B=0;B<n.pages.length;B++)if(n.currentPage==n.pages[B]){Y=B+1;da.value=Y;ja.value=Y;break}da.setAttribute("max",S);ja.setAttribute("max",S);n.isPagesEnabled()?1<S&&(T.appendChild(V),aa.checked=!0):aa.checked=!0;mxUtils.br(V);var ha=document.createElement("input");ha.setAttribute("value","all");ha.setAttribute("type","radio");ha.style.marginRight="8px";P.isSelectionEmpty()&&ha.setAttribute("disabled",
-"disabled");var Z=document.createElement("div");Z.style.marginBottom="10px";1==S?(ha.setAttribute("type","checkbox"),ha.style.marginBottom="12px",Z.appendChild(ha)):(ha.setAttribute("name","pages-printdialog"),ha.style.marginBottom="8px",V.appendChild(ha));B=document.createElement("span");mxUtils.write(B,mxResources.get("selectionOnly"));ha.parentNode.appendChild(B);1==S&&mxUtils.br(ha.parentNode);var Da=document.createElement("input");Da.style.marginRight="8px";Da.setAttribute("value","adjust");
-Da.setAttribute("type","radio");Da.setAttribute("name","printZoom");Z.appendChild(Da);B=document.createElement("span");mxUtils.write(B,mxResources.get("adjustTo"));Z.appendChild(B);var Ga=document.createElement("input");Ga.style.cssText="margin:0 8px 0 8px;";Ga.setAttribute("value","100 %");Ga.style.width="50px";Z.appendChild(Ga);mxEvent.addListener(Ga,"focus",function(){Da.checked=!0});T.appendChild(Z);V=V.cloneNode(!1);var Ba=Da.cloneNode(!0);Ba.setAttribute("value","fit");Da.setAttribute("checked",
-"checked");B=document.createElement("div");B.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";B.appendChild(Ba);V.appendChild(B);Z=document.createElement("table");Z.style.display="inline-block";var Ha=document.createElement("tbody"),pa=document.createElement("tr"),Na=pa.cloneNode(!0),La=document.createElement("td"),ya=La.cloneNode(!0),Ja=La.cloneNode(!0),Fa=La.cloneNode(!0),Pa=La.cloneNode(!0),xa=La.cloneNode(!0);La.style.textAlign="right";Fa.style.textAlign="right";mxUtils.write(La,
-mxResources.get("fitTo"));var za=document.createElement("input");za.style.cssText="margin:0 8px 0 8px;";za.setAttribute("value","1");za.setAttribute("min","1");za.setAttribute("type","number");za.style.width="40px";ya.appendChild(za);B=document.createElement("span");mxUtils.write(B,mxResources.get("fitToSheetsAcross"));Ja.appendChild(B);mxUtils.write(Fa,mxResources.get("fitToBy"));var ua=za.cloneNode(!0);Pa.appendChild(ua);mxEvent.addListener(za,"focus",function(){Ba.checked=!0});mxEvent.addListener(ua,
-"focus",function(){Ba.checked=!0});B=document.createElement("span");mxUtils.write(B,mxResources.get("fitToSheetsDown"));xa.appendChild(B);pa.appendChild(La);pa.appendChild(ya);pa.appendChild(Ja);Na.appendChild(Fa);Na.appendChild(Pa);Na.appendChild(xa);Ha.appendChild(pa);Ha.appendChild(Na);Z.appendChild(Ha);V.appendChild(Z);T.appendChild(V);V=document.createElement("div");B=document.createElement("div");B.style.fontWeight="bold";B.style.marginBottom="12px";mxUtils.write(B,mxResources.get("paperSize"));
-V.appendChild(B);B=document.createElement("div");B.style.marginBottom="12px";var Aa=PageSetupDialog.addPageFormatPanel(B,"printdialog",n.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);V.appendChild(B);B=document.createElement("span");mxUtils.write(B,mxResources.get("pageScale"));V.appendChild(B);var ea=document.createElement("input");ea.style.cssText="margin:0 8px 0 8px;";ea.setAttribute("value","100 %");ea.style.width="60px";V.appendChild(ea);T.appendChild(V);B=document.createElement("div");
-B.style.cssText="text-align:right;margin:48px 0 0 0;";V=mxUtils.button(mxResources.get("cancel"),function(){n.hideDialog()});V.className="geBtn";n.editor.cancelFirst&&B.appendChild(V);n.isOffline()||(Z=mxUtils.button(mxResources.get("help"),function(){P.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),Z.className="geBtn",B.appendChild(Z));PrintDialog.previewEnabled&&(Z=mxUtils.button(mxResources.get("preview"),function(){n.hideDialog();Q(!1)}),Z.className="geBtn",B.appendChild(Z));Z=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?
-"print":"ok"),function(){n.hideDialog();Q(!0)});Z.className="geBtn gePrimaryBtn";B.appendChild(Z);n.editor.cancelFirst||B.appendChild(V);T.appendChild(B);this.container=T};var O=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 n=this.image;null!=n&&null!=n.src&&Graph.isPageLink(n.src)&&
-(n={originalSrc:n.src});this.page.viewState.backgroundImage=n}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 O.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 W=document.createElement("canvas"),U=new Image;U.onload=function(){try{W.getContext("2d").drawImage(U,0,0);var n=W.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=n&&6<n.length}catch(B){}};U.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(n){}})();
+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(n){var B=null;null!=n&&0<n.length&&("ER"==n.substring(0,2)?B="mxgraph.er":"sysML"==n.substring(0,5)&&(B="mxgraph.sysml"));return B};var Q=mxMarker.createMarker;mxMarker.createMarker=function(n,B,K,R,O,U,S,T,Y,ba){if(null!=K&&null==mxMarker.markers[K]){var aa=this.getPackageForType(K);null!=
+aa&&mxStencilRegistry.getStencil(aa)}return Q.apply(this,arguments)};var X=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(n,B,K,R,O,U){"1"==mxUtils.getValue(B.style,"lineShape",null)&&n.setFillColor(mxUtils.getValue(B.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return X.apply(this,arguments)};PrintDialog.prototype.create=function(n,B){function K(){ha.value=Math.max(1,Math.min(T,Math.max(parseInt(ha.value),parseInt(da.value))));da.value=Math.max(1,Math.min(T,Math.min(parseInt(ha.value),
+parseInt(da.value))))}function R(ja){function ua(Da,Ha,Qa){var Oa=Da.useCssTransforms,Ra=Da.currentTranslate,Xa=Da.currentScale,Ka=Da.view.translate,Ta=Da.view.scale;Da.useCssTransforms&&(Da.useCssTransforms=!1,Da.currentTranslate=new mxPoint(0,0),Da.currentScale=1,Da.view.translate=new mxPoint(0,0),Da.view.scale=1);var Ua=Da.getGraphBounds(),Va=0,$a=0,Wa=Ia.get(),ab=1/Da.pageScale,Za=Ba.checked;if(Za){ab=parseInt(Aa.value);var gb=parseInt(wa.value);ab=Math.min(Wa.height*gb/(Ua.height/Da.view.scale),
+Wa.width*ab/(Ua.width/Da.view.scale))}else ab=parseInt(Ca.value)/(100*Da.pageScale),isNaN(ab)&&(va=1/Da.pageScale,Ca.value="100 %");Wa=mxRectangle.fromRectangle(Wa);Wa.width=Math.ceil(Wa.width*va);Wa.height=Math.ceil(Wa.height*va);ab*=va;!Za&&Da.pageVisible?(Ua=Da.getPageLayout(),Va-=Ua.x*Wa.width,$a-=Ua.y*Wa.height):Za=!0;if(null==Ha){Ha=PrintDialog.createPrintPreview(Da,ab,Wa,0,Va,$a,Za);Ha.pageSelector=!1;Ha.mathEnabled=!1;ma.checked&&(Ha.isCellVisible=function(Ya){return Da.isCellSelected(Ya)});
+Va=n.getCurrentFile();null!=Va&&(Ha.title=Va.getTitle());var hb=Ha.writeHead;Ha.writeHead=function(Ya){hb.apply(this,arguments);mxClient.IS_GC&&(Ya.writeln('<style type="text/css">'),Ya.writeln("@media print {"),Ya.writeln(".MathJax svg { shape-rendering: crispEdges; }"),Ya.writeln("}"),Ya.writeln("</style>"));null!=n.editor.fontCss&&(Ya.writeln('<style type="text/css">'),Ya.writeln(n.editor.fontCss),Ya.writeln("</style>"));for(var cb=Da.getCustomFonts(),bb=0;bb<cb.length;bb++){var eb=cb[bb].name,
+db=cb[bb].url;Graph.isCssFontUrl(db)?Ya.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(db)+'" charset="UTF-8" type="text/css">'):(Ya.writeln('<style type="text/css">'),Ya.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(eb)+'";\nsrc: url("'+mxUtils.htmlEntities(db)+'");\n}'),Ya.writeln("</style>"))}};if("undefined"!==typeof MathJax){var ib=Ha.renderPage;Ha.renderPage=function(Ya,cb,bb,eb,db,kb){var jb=mxClient.NO_FO,fb=ib.apply(this,arguments);mxClient.NO_FO=jb;this.graph.mathEnabled?
+this.mathEnabled=this.mathEnabled||!0:fb.className="geDisableMathJax";return fb}}Va=null;$a=O.shapeForegroundColor;Za=O.shapeBackgroundColor;Wa=O.enableFlowAnimation;O.enableFlowAnimation=!1;null!=O.themes&&"darkTheme"==O.defaultThemeName&&(Va=O.stylesheet,O.stylesheet=O.getDefaultStylesheet(),O.shapeForegroundColor="#000000",O.shapeBackgroundColor="#ffffff",O.refresh());Ha.open(null,null,Qa,!0);O.enableFlowAnimation=Wa;null!=Va&&(O.shapeForegroundColor=$a,O.shapeBackgroundColor=Za,O.stylesheet=Va,
+O.refresh())}else{Wa=Da.background;if(null==Wa||""==Wa||Wa==mxConstants.NONE)Wa="#ffffff";Ha.backgroundColor=Wa;Ha.autoOrigin=Za;Ha.appendGraph(Da,ab,Va,$a,Qa,!0);Qa=Da.getCustomFonts();if(null!=Ha.wnd)for(Va=0;Va<Qa.length;Va++)$a=Qa[Va].name,Za=Qa[Va].url,Graph.isCssFontUrl(Za)?Ha.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Za)+'" charset="UTF-8" type="text/css">'):(Ha.wnd.document.writeln('<style type="text/css">'),Ha.wnd.document.writeln('@font-face {\nfont-family: "'+
+mxUtils.htmlEntities($a)+'";\nsrc: url("'+mxUtils.htmlEntities(Za)+'");\n}'),Ha.wnd.document.writeln("</style>"))}Oa&&(Da.useCssTransforms=Oa,Da.currentTranslate=Ra,Da.currentScale=Xa,Da.view.translate=Ka,Da.view.scale=Ta);return Ha}var va=parseInt(ia.value)/100;isNaN(va)&&(va=1,ia.value="100 %");va*=.75;var qa=null,xa=O.shapeForegroundColor,ea=O.shapeBackgroundColor;null!=O.themes&&"darkTheme"==O.defaultThemeName&&(qa=O.stylesheet,O.stylesheet=O.getDefaultStylesheet(),O.shapeForegroundColor="#000000",
+O.shapeBackgroundColor="#ffffff",O.refresh());var na=da.value,pa=ha.value,ca=!ba.checked,fa=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(n,ba.checked,na,pa,Ba.checked,Aa.value,wa.value,parseInt(Ca.value)/100,parseInt(ia.value)/100,Ia.get());else{ca&&(ca=ma.checked||na==Y&&pa==Y);if(!ca&&null!=n.pages&&n.pages.length){var ra=0;ca=n.pages.length-1;ba.checked||(ra=parseInt(na)-1,ca=parseInt(pa)-1);for(var ka=ra;ka<=ca;ka++){var la=n.pages[ka];na=la==n.currentPage?O:null;if(null==na){na=n.createTemporaryGraph(O.stylesheet);
+na.shapeForegroundColor=O.shapeForegroundColor;na.shapeBackgroundColor=O.shapeBackgroundColor;pa=!0;ra=!1;var oa=null,ta=null;null==la.viewState&&null==la.root&&n.updatePageRoot(la);null!=la.viewState&&(pa=la.viewState.pageVisible,ra=la.viewState.mathEnabled,oa=la.viewState.background,ta=la.viewState.backgroundImage,na.extFonts=la.viewState.extFonts);null!=ta&&null!=ta.originalSrc&&(ta=n.createImageForPageLink(ta.originalSrc,la));na.background=oa;na.backgroundImage=null!=ta?new mxImage(ta.src,ta.width,
+ta.height,ta.x,ta.y):null;na.pageVisible=pa;na.mathEnabled=ra;var La=na.getGraphBounds;na.getGraphBounds=function(){var Da=La.apply(this,arguments),Ha=this.backgroundImage;if(null!=Ha&&null!=Ha.width&&null!=Ha.height){var Qa=this.view.translate,Oa=this.view.scale;Da=mxRectangle.fromRectangle(Da);Da.add(new mxRectangle((Qa.x+Ha.x)*Oa,(Qa.y+Ha.y)*Oa,Ha.width*Oa,Ha.height*Oa))}return Da};var Sa=na.getGlobalVariable;na.getGlobalVariable=function(Da){return"page"==Da?la.getName():"pagenumber"==Da?ka+1:
+"pagecount"==Da?null!=n.pages?n.pages.length:1:Sa.apply(this,arguments)};document.body.appendChild(na.container);n.updatePageRoot(la);na.model.setRoot(la.root)}fa=ua(na,fa,ka!=ca);na!=O&&na.container.parentNode.removeChild(na.container)}}else fa=ua(O);null==fa?n.handleError({message:mxResources.get("errorUpdatingPreview")}):(fa.mathEnabled&&(ca=fa.wnd.document,ja&&(fa.wnd.IMMEDIATE_PRINT=!0),ca.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),fa.closeDocument(),
+!fa.mathEnabled&&ja&&PrintDialog.printPreview(fa));null!=qa&&(O.shapeForegroundColor=xa,O.shapeBackgroundColor=ea,O.stylesheet=qa,O.refresh())}}var O=n.editor.graph,U=document.createElement("div"),S=document.createElement("h3");S.style.width="100%";S.style.textAlign="center";S.style.marginTop="0px";mxUtils.write(S,B||mxResources.get("print"));U.appendChild(S);var T=1,Y=1;S=document.createElement("div");S.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var ba=
+document.createElement("input");ba.style.cssText="margin-right:8px;margin-bottom:8px;";ba.setAttribute("value","all");ba.setAttribute("type","radio");ba.setAttribute("name","pages-printdialog");S.appendChild(ba);B=document.createElement("span");mxUtils.write(B,mxResources.get("printAllPages"));S.appendChild(B);mxUtils.br(S);var aa=ba.cloneNode(!0);ba.setAttribute("checked","checked");aa.setAttribute("value","range");S.appendChild(aa);B=document.createElement("span");mxUtils.write(B,mxResources.get("pages")+
+":");S.appendChild(B);var da=document.createElement("input");da.style.cssText="margin:0 8px 0 8px;";da.setAttribute("value","1");da.setAttribute("type","number");da.setAttribute("min","1");da.style.width="50px";S.appendChild(da);B=document.createElement("span");mxUtils.write(B,mxResources.get("to"));S.appendChild(B);var ha=da.cloneNode(!0);S.appendChild(ha);mxEvent.addListener(da,"focus",function(){aa.checked=!0});mxEvent.addListener(ha,"focus",function(){aa.checked=!0});mxEvent.addListener(da,"change",
+K);mxEvent.addListener(ha,"change",K);if(null!=n.pages&&(T=n.pages.length,null!=n.currentPage))for(B=0;B<n.pages.length;B++)if(n.currentPage==n.pages[B]){Y=B+1;da.value=Y;ha.value=Y;break}da.setAttribute("max",T);ha.setAttribute("max",T);n.isPagesEnabled()?1<T&&(U.appendChild(S),aa.checked=!0):aa.checked=!0;mxUtils.br(S);var ma=document.createElement("input");ma.setAttribute("value","all");ma.setAttribute("type","radio");ma.style.marginRight="8px";O.isSelectionEmpty()&&ma.setAttribute("disabled",
+"disabled");var Z=document.createElement("div");Z.style.marginBottom="10px";1==T?(ma.setAttribute("type","checkbox"),ma.style.marginBottom="12px",Z.appendChild(ma)):(ma.setAttribute("name","pages-printdialog"),ma.style.marginBottom="8px",S.appendChild(ma));B=document.createElement("span");mxUtils.write(B,mxResources.get("selectionOnly"));ma.parentNode.appendChild(B);1==T&&mxUtils.br(ma.parentNode);var Fa=document.createElement("input");Fa.style.marginRight="8px";Fa.setAttribute("value","adjust");
+Fa.setAttribute("type","radio");Fa.setAttribute("name","printZoom");Z.appendChild(Fa);B=document.createElement("span");mxUtils.write(B,mxResources.get("adjustTo"));Z.appendChild(B);var Ca=document.createElement("input");Ca.style.cssText="margin:0 8px 0 8px;";Ca.setAttribute("value","100 %");Ca.style.width="50px";Z.appendChild(Ca);mxEvent.addListener(Ca,"focus",function(){Fa.checked=!0});U.appendChild(Z);S=S.cloneNode(!1);var Ba=Fa.cloneNode(!0);Ba.setAttribute("value","fit");Fa.setAttribute("checked",
+"checked");B=document.createElement("div");B.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";B.appendChild(Ba);S.appendChild(B);Z=document.createElement("table");Z.style.display="inline-block";var Ga=document.createElement("tbody"),sa=document.createElement("tr"),Ma=sa.cloneNode(!0),Na=document.createElement("td"),za=Na.cloneNode(!0),Ja=Na.cloneNode(!0),Ea=Na.cloneNode(!0),Pa=Na.cloneNode(!0),ya=Na.cloneNode(!0);Na.style.textAlign="right";Ea.style.textAlign="right";mxUtils.write(Na,
+mxResources.get("fitTo"));var Aa=document.createElement("input");Aa.style.cssText="margin:0 8px 0 8px;";Aa.setAttribute("value","1");Aa.setAttribute("min","1");Aa.setAttribute("type","number");Aa.style.width="40px";za.appendChild(Aa);B=document.createElement("span");mxUtils.write(B,mxResources.get("fitToSheetsAcross"));Ja.appendChild(B);mxUtils.write(Ea,mxResources.get("fitToBy"));var wa=Aa.cloneNode(!0);Pa.appendChild(wa);mxEvent.addListener(Aa,"focus",function(){Ba.checked=!0});mxEvent.addListener(wa,
+"focus",function(){Ba.checked=!0});B=document.createElement("span");mxUtils.write(B,mxResources.get("fitToSheetsDown"));ya.appendChild(B);sa.appendChild(Na);sa.appendChild(za);sa.appendChild(Ja);Ma.appendChild(Ea);Ma.appendChild(Pa);Ma.appendChild(ya);Ga.appendChild(sa);Ga.appendChild(Ma);Z.appendChild(Ga);S.appendChild(Z);U.appendChild(S);S=document.createElement("div");B=document.createElement("div");B.style.fontWeight="bold";B.style.marginBottom="12px";mxUtils.write(B,mxResources.get("paperSize"));
+S.appendChild(B);B=document.createElement("div");B.style.marginBottom="12px";var Ia=PageSetupDialog.addPageFormatPanel(B,"printdialog",n.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);S.appendChild(B);B=document.createElement("span");mxUtils.write(B,mxResources.get("pageScale"));S.appendChild(B);var ia=document.createElement("input");ia.style.cssText="margin:0 8px 0 8px;";ia.setAttribute("value","100 %");ia.style.width="60px";S.appendChild(ia);U.appendChild(S);B=document.createElement("div");
+B.style.cssText="text-align:right;margin:48px 0 0 0;";S=mxUtils.button(mxResources.get("cancel"),function(){n.hideDialog()});S.className="geBtn";n.editor.cancelFirst&&B.appendChild(S);n.isOffline()||(Z=mxUtils.button(mxResources.get("help"),function(){O.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),Z.className="geBtn",B.appendChild(Z));PrintDialog.previewEnabled&&(Z=mxUtils.button(mxResources.get("preview"),function(){n.hideDialog();R(!1)}),Z.className="geBtn",B.appendChild(Z));Z=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?
+"print":"ok"),function(){n.hideDialog();R(!0)});Z.className="geBtn gePrimaryBtn";B.appendChild(Z);n.editor.cancelFirst||B.appendChild(S);U.appendChild(B);this.container=U};var P=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 n=this.image;null!=n&&null!=n.src&&Graph.isPageLink(n.src)&&
+(n={originalSrc:n.src});this.page.viewState.backgroundImage=n}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 P.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 V=document.createElement("canvas"),W=new Image;W.onload=function(){try{V.getContext("2d").drawImage(W,0,0);var n=V.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=n&&6<n.length}catch(B){}};W.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(n){}})();
(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(f,l,d){d.ui=f.ui;return l};b.afterDecode=function(f,l,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);null!=d.mathEnabled&&(d.mathEnabled=!d.mathEnabled);null!=d.shadowVisible&&(d.shadowVisible=!d.shadowVisible);return d};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(f,l,d){d.ui=f.ui;return l};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.0.2";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(f,l,d){d.ui=f.ui;return l};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.0.3";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=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&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;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(c,e,g,k,m,p,v){p=null!=p?p:0<=c.indexOf("NetworkError")||0<=c.indexOf("SecurityError")||0<=c.indexOf("NS_ERROR_FAILURE")||0<=c.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
"1"!=urlParams.dev)try{if(c!=EditorUi.lastErrorMessage&&(null==c||null==e||-1==c.indexOf("Script error")&&-1==c.indexOf("extension"))&&null!=c&&0>c.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=c;var x=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";m=null!=m?m:Error(c);(new Image).src=x+"/log?severity="+p+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(c)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(g)+(null!=k?":colno:"+
-encodeURIComponent(k):"")+(null!=m&&null!=m.stack?"&stack="+encodeURIComponent(m.stack):"")}}catch(z){}try{v||null==window.console||console.error(p,c,e,g,k,m)}catch(z){}};EditorUi.logEvent=function(c){if("1"==urlParams.dev)EditorUi.debug("logEvent",c);else if(EditorUi.enableLogging)try{var e=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=e+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=c?"&data="+encodeURIComponent(JSON.stringify(c)):"")}catch(g){}};EditorUi.sendReport=
+encodeURIComponent(k):"")+(null!=m&&null!=m.stack?"&stack="+encodeURIComponent(m.stack):"")}}catch(A){}try{v||null==window.console||console.error(p,c,e,g,k,m)}catch(A){}};EditorUi.logEvent=function(c){if("1"==urlParams.dev)EditorUi.debug("logEvent",c);else if(EditorUi.enableLogging)try{var e=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=e+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=c?"&data="+encodeURIComponent(JSON.stringify(c)):"")}catch(g){}};EditorUi.sendReport=
function(c,e){if("1"==urlParams.dev)EditorUi.debug("sendReport",c);else if(EditorUi.enableLogging)try{e=null!=e?e:5E4,c.length>e&&(c=c.substring(0,e)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(c))}catch(g){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var c=[(new Date).toISOString()],e=0;e<arguments.length;e++)c.push(arguments[e]);console.log.apply(console,
c)}}catch(g){}};EditorUi.removeChildNodes=function(c){for(;null!=c.firstChild;)c.removeChild(c.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=
@@ -11724,9 +11720,9 @@ e.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=m&&6<m.leng
EditorUi.prototype.jpgSupported=null!==k.match("image/jpeg")}catch(m){}})();EditorUi.prototype.openLink=function(c,e,g){return this.editor.graph.openLink(c,e,g)};EditorUi.prototype.showSplash=function(c){};EditorUi.prototype.getLocalData=function(c,e){e(localStorage.getItem(c))};EditorUi.prototype.setLocalData=function(c,e,g){localStorage.setItem(c,e);null!=g&&g()};EditorUi.prototype.removeLocalData=function(c,e){localStorage.removeItem(c);e()};EditorUi.prototype.setShareCursorPosition=function(c){this.shareCursorPosition=
c;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(c){this.showRemoteCursors=c;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(c){this.editor.graph.mathEnabled=c;this.editor.updateGraphComponents();this.editor.graph.refresh();
this.editor.graph.defaultMathEnabled=c;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(c){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(c){return this.isOfflineApp()||!navigator.onLine||!c&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};
-EditorUi.prototype.createSpinner=function(c,e,g){var k=null==c||null==e;g=null!=g?g:24;var m=new Spinner({lines:12,length:g,width:Math.round(g/3),radius:Math.round(g/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),p=m.spin;m.spin=function(x,z){var y=!1;this.active||(p.call(this,x),this.active=!0,null!=z&&(k&&(e=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/2-2),y=document.createElement("div"),
+EditorUi.prototype.createSpinner=function(c,e,g){var k=null==c||null==e;g=null!=g?g:24;var m=new Spinner({lines:12,length:g,width:Math.round(g/3),radius:Math.round(g/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),p=m.spin;m.spin=function(x,A){var y=!1;this.active||(p.call(this,x),this.active=!0,null!=A&&(k&&(e=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/2-2),y=document.createElement("div"),
y.style.position="absolute",y.style.whiteSpace="nowrap",y.style.background="#4B4243",y.style.color="white",y.style.fontFamily=Editor.defaultHtmlFont,y.style.fontSize="9pt",y.style.padding="6px",y.style.paddingLeft="10px",y.style.paddingRight="10px",y.style.zIndex=2E9,y.style.left=Math.max(0,c)+"px",y.style.top=Math.max(0,e+70)+"px",mxUtils.setPrefixedStyle(y.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(y.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(y.style,
-"boxShadow","2px 2px 3px 0px #ddd"),"..."!=z.substring(z.length-3,z.length)&&"!"!=z.charAt(z.length-1)&&(z+="..."),y.innerHTML=z,x.appendChild(y),m.status=y),this.pause=mxUtils.bind(this,function(){var L=function(){};this.active&&(L=mxUtils.bind(this,function(){this.spin(x,z)}));this.stop();return L}),y=!0);return y};var v=m.stop;m.stop=function(){v.call(this);this.active=!1;null!=m.status&&null!=m.status.parentNode&&m.status.parentNode.removeChild(m.status);m.status=null};m.pause=function(){return function(){}};
+"boxShadow","2px 2px 3px 0px #ddd"),"..."!=A.substring(A.length-3,A.length)&&"!"!=A.charAt(A.length-1)&&(A+="..."),y.innerHTML=A,x.appendChild(y),m.status=y),this.pause=mxUtils.bind(this,function(){var L=function(){};this.active&&(L=mxUtils.bind(this,function(){this.spin(x,A)}));this.stop();return L}),y=!0);return y};var v=m.stop;m.stop=function(){v.call(this);this.active=!1;null!=m.status&&null!=m.status.parentNode&&m.status.parentNode.removeChild(m.status);m.status=null};m.pause=function(){return function(){}};
return m};EditorUi.prototype.isCompatibleString=function(c){try{var e=mxUtils.parseXml(c),g=this.editor.extractGraphModel(e.documentElement,!0);return null!=g&&0==g.getElementsByTagName("parsererror").length}catch(k){}return!1};EditorUi.prototype.isVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&
3==c.charCodeAt(2)&&4==c.charCodeAt(3)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&3==c.charCodeAt(2)&&6==c.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||60==c.charCodeAt(0)&&63==c.charCodeAt(1)&&120==c.charCodeAt(2)&&109==c.charCodeAt(3)&&108==c.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;
EditorUi.prototype.createKeyHandler=function(c){var e=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var g=e.getFunction,k=this.editor.graph,m=this;e.getFunction=function(p){if(k.isSelectionEmpty()&&null!=m.pages&&0<m.pages.length){var v=m.getSelectedPageIndex();if(mxEvent.isShiftDown(p)){if(37==p.keyCode)return function(){0<v&&m.movePage(v,v-1)};if(38==p.keyCode)return function(){0<v&&m.movePage(v,0)};if(39==p.keyCode)return function(){v<m.pages.length-1&&m.movePage(v,
@@ -11735,11 +11731,11 @@ var f=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGra
p?mxUtils.getXml(p):""}}catch(v){}return e};EditorUi.prototype.validateFileData=function(c){if(null!=c&&0<c.length){var e=c.indexOf('<meta charset="utf-8">');0<=e&&(c=c.slice(0,e)+'<meta charset="utf-8"/>'+c.slice(e+23-1,c.length));c=Graph.zapGremlins(c)}return c};EditorUi.prototype.replaceFileData=function(c){c=this.validateFileData(c);c=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null;var e=null!=c?this.editor.extractGraphModel(c,!0):null;null!=e&&(c=e);if(null!=c){e=this.editor.graph;
e.model.beginUpdate();try{var g=null!=this.pages?this.pages.slice():null,k=c.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<k.length||1==k.length&&k[0].hasAttribute("name")){this.fileNode=c;this.pages=null!=this.pages?this.pages:[];for(var m=k.length-1;0<=m;m--){var p=this.updatePageRoot(new DiagramPage(k[m]));null==p.getName()&&p.setName(mxResources.get("pageWithNumber",[m+1]));e.model.execute(new ChangePage(this,p,0==m?p:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=
c.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(c.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),e.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(c),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=g)for(m=0;m<g.length;m++)e.model.execute(new ChangePage(this,g[m],null))}finally{e.model.endUpdate()}}};EditorUi.prototype.createFileData=
-function(c,e,g,k,m,p,v,x,z,y,L){e=null!=e?e:this.editor.graph;m=null!=m?m:!1;z=null!=z?z:!0;var N=null;if(null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER)var J="_blank";else N=J=k;if(null==c)return"";var q=c;if("mxfile"!=q.nodeName.toLowerCase()){if(L){var D=c.ownerDocument.createElement("diagram");D.setAttribute("id",Editor.guid());D.appendChild(c)}else{D=Graph.zapGremlins(mxUtils.getXml(c));q=Graph.compress(D);if(Graph.decompress(q)!=D)return D;D=c.ownerDocument.createElement("diagram");
+function(c,e,g,k,m,p,v,x,A,y,L){e=null!=e?e:this.editor.graph;m=null!=m?m:!1;A=null!=A?A:!0;var N=null;if(null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER)var I="_blank";else N=I=k;if(null==c)return"";var q=c;if("mxfile"!=q.nodeName.toLowerCase()){if(L){var D=c.ownerDocument.createElement("diagram");D.setAttribute("id",Editor.guid());D.appendChild(c)}else{D=Graph.zapGremlins(mxUtils.getXml(c));q=Graph.compress(D);if(Graph.decompress(q)!=D)return D;D=c.ownerDocument.createElement("diagram");
D.setAttribute("id",Editor.guid());mxUtils.setTextContent(D,q)}q=c.ownerDocument.createElement("mxfile");q.appendChild(D)}y?(q=q.cloneNode(!0),q.removeAttribute("modified"),q.removeAttribute("host"),q.removeAttribute("agent"),q.removeAttribute("etag"),q.removeAttribute("userAgent"),q.removeAttribute("version"),q.removeAttribute("editor"),q.removeAttribute("type")):(q.removeAttribute("userAgent"),q.removeAttribute("version"),q.removeAttribute("editor"),q.removeAttribute("pages"),q.removeAttribute("type"),
mxClient.IS_CHROMEAPP?q.setAttribute("host","Chrome"):EditorUi.isElectronApp?q.setAttribute("host","Electron"):q.setAttribute("host",window.location.hostname),q.setAttribute("modified",(new Date).toISOString()),q.setAttribute("agent",navigator.appVersion),q.setAttribute("version",EditorUi.VERSION),q.setAttribute("etag",Editor.guid()),c=null!=g?g.getMode():this.mode,null!=c&&q.setAttribute("type",c),1<q.getElementsByTagName("diagram").length&&null!=this.pages&&q.setAttribute("pages",this.pages.length));
-L=L?mxUtils.getPrettyXml(q):mxUtils.getXml(q);if(!p&&!m&&(v||null!=g&&/(\.html)$/i.test(g.getTitle())))L=this.getHtml2(mxUtils.getXml(q),e,null!=g?g.getTitle():null,J,N);else if(p||!m&&null!=g&&/(\.svg)$/i.test(g.getTitle()))null==g||g.getMode()!=App.MODE_DEVICE&&g.getMode()!=App.MODE_BROWSER||(k=null),L=this.getEmbeddedSvg(L,e,k,null,x,z,N);return L};EditorUi.prototype.getXmlFileData=function(c,e,g,k){c=null!=c?c:!0;e=null!=e?e:!1;g=null!=g?g:!Editor.compressXml;var m=this.editor.getGraphXml(c,k);
-if(c&&null!=this.fileNode&&null!=this.currentPage)if(c=function(z){var y=z.getElementsByTagName("mxGraphModel");y=0<y.length?y[0]:null;null==y&&g?(y=mxUtils.trim(mxUtils.getTextContent(z)),z=z.cloneNode(!1),0<y.length&&(y=Graph.decompress(y),null!=y&&0<y.length&&z.appendChild(mxUtils.parseXml(y).documentElement))):null==y||g?z=z.cloneNode(!0):(z=z.cloneNode(!1),mxUtils.setTextContent(z,Graph.compressNode(y)));m.appendChild(z)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,
+L=L?mxUtils.getPrettyXml(q):mxUtils.getXml(q);if(!p&&!m&&(v||null!=g&&/(\.html)$/i.test(g.getTitle())))L=this.getHtml2(mxUtils.getXml(q),e,null!=g?g.getTitle():null,I,N);else if(p||!m&&null!=g&&/(\.svg)$/i.test(g.getTitle()))null==g||g.getMode()!=App.MODE_DEVICE&&g.getMode()!=App.MODE_BROWSER||(k=null),L=this.getEmbeddedSvg(L,e,k,null,x,A,N);return L};EditorUi.prototype.getXmlFileData=function(c,e,g,k){c=null!=c?c:!0;e=null!=e?e:!1;g=null!=g?g:!Editor.compressXml;var m=this.editor.getGraphXml(c,k);
+if(c&&null!=this.fileNode&&null!=this.currentPage)if(c=function(A){var y=A.getElementsByTagName("mxGraphModel");y=0<y.length?y[0]:null;null==y&&g?(y=mxUtils.trim(mxUtils.getTextContent(A)),A=A.cloneNode(!1),0<y.length&&(y=Graph.decompress(y),null!=y&&0<y.length&&A.appendChild(mxUtils.parseXml(y).documentElement))):null==y||g?A=A.cloneNode(!0):(A=A.cloneNode(!1),mxUtils.setTextContent(A,Graph.compressNode(y)));m.appendChild(A)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,
Graph.compressNode(m)),m=this.fileNode.cloneNode(!1),e)c(this.currentPage.node);else for(e=0;e<this.pages.length;e++){var p=this.pages[e],v=p.node;if(p!=this.currentPage)if(p.needsUpdate){var x=new mxCodec(mxUtils.createXmlDocument());x=x.encode(new mxGraphModel(p.root));this.editor.graph.saveViewState(p.viewState,x,null,k);EditorUi.removeChildNodes(v);mxUtils.setTextContent(v,Graph.compressNode(x));delete p.needsUpdate}else k&&(this.updatePageRoot(p),null!=p.viewState.backgroundImage&&(null!=p.viewState.backgroundImage.originalSrc?
p.viewState.backgroundImage=this.createImageForPageLink(p.viewState.backgroundImage.originalSrc,p):Graph.isPageLink(p.viewState.backgroundImage.src)&&(p.viewState.backgroundImage=this.createImageForPageLink(p.viewState.backgroundImage.src,p))),null!=p.viewState.backgroundImage&&null!=p.viewState.backgroundImage.originalSrc&&(x=new mxCodec(mxUtils.createXmlDocument()),x=x.encode(new mxGraphModel(p.root)),this.editor.graph.saveViewState(p.viewState,x,null,k),v=v.cloneNode(!1),mxUtils.setTextContent(v,
Graph.compressNode(x))));c(v)}return m};EditorUi.prototype.anonymizeString=function(c,e){for(var g=[],k=0;k<c.length;k++){var m=c.charAt(k);0<=EditorUi.ignoredAnonymizedChars.indexOf(m)?g.push(m):isNaN(parseInt(m))?m.toLowerCase()!=m?g.push(String.fromCharCode(65+Math.round(25*Math.random()))):m.toUpperCase()!=m?g.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(m)?g.push(" "):g.push("?"):g.push(e?"0":Math.round(9*Math.random()))}return g.join("")};EditorUi.prototype.anonymizePatch=
@@ -11748,10 +11744,10 @@ function(c){if(null!=c[EditorUi.DIFF_INSERT])for(var e=0;e<c[EditorUi.DIFF_INSER
delete c[EditorUi.DIFF_UPDATE][k]}mxUtils.isEmptyObject(c[EditorUi.DIFF_UPDATE])&&delete c[EditorUi.DIFF_UPDATE]}return c};EditorUi.prototype.anonymizeAttributes=function(c,e){if(null!=c.attributes)for(var g=0;g<c.attributes.length;g++)"as"!=c.attributes[g].name&&c.setAttribute(c.attributes[g].name,this.anonymizeString(c.attributes[g].value,e));if(null!=c.childNodes)for(g=0;g<c.childNodes.length;g++)this.anonymizeAttributes(c.childNodes[g],e)};EditorUi.prototype.anonymizeNode=function(c,e){e=c.getElementsByTagName("mxCell");
for(var g=0;g<e.length;g++)null!=e[g].getAttribute("value")&&e[g].setAttribute("value","["+e[g].getAttribute("value").length+"]"),null!=e[g].getAttribute("xmlValue")&&e[g].setAttribute("xmlValue","["+e[g].getAttribute("xmlValue").length+"]"),null!=e[g].getAttribute("style")&&e[g].setAttribute("style","["+e[g].getAttribute("style").length+"]"),null!=e[g].parentNode&&"root"!=e[g].parentNode.nodeName&&null!=e[g].parentNode.parentNode&&(e[g].setAttribute("id",e[g].parentNode.getAttribute("id")),e[g].parentNode.parentNode.replaceChild(e[g],
e[g].parentNode));return c};EditorUi.prototype.synchronizeCurrentFile=function(c){var e=this.getCurrentFile();null!=e&&(e.savingFile?this.handleError({message:mxResources.get("busy")}):!c&&e.invalidChecksum?e.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(e.clearAutosave(),this.editor.setStatus(""),c?e.reloadFile(mxUtils.bind(this,function(){e.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){e.handleFileError(g,!0)})):e.synchronizeFile(mxUtils.bind(this,
-function(){e.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){e.handleFileError(g,!0)}))))};EditorUi.prototype.getFileData=function(c,e,g,k,m,p,v,x,z,y,L){m=null!=m?m:!0;p=null!=p?p:!1;var N=this.editor.graph;if(e||!c&&null!=z&&/(\.svg)$/i.test(z.getTitle())){var J=null!=N.themes&&"darkTheme"==N.defaultThemeName;y=!1;if(J||null!=this.pages&&this.currentPage!=this.pages[0]){var q=N.getGlobalVariable;N=this.createTemporaryGraph(J?N.getDefaultStylesheet():N.getStylesheet());
-N.setBackgroundImage=this.editor.graph.setBackgroundImage;N.background=this.editor.graph.background;var D=this.pages[0];this.currentPage==D?N.setBackgroundImage(this.editor.graph.backgroundImage):null!=D.viewState&&null!=D.viewState&&N.setBackgroundImage(D.viewState.backgroundImage);N.getGlobalVariable=function(A){return"page"==A?D.getName():"pagenumber"==A?1:q.apply(this,arguments)};document.body.appendChild(N.container);N.model.setRoot(D.root)}}v=null!=v?v:this.getXmlFileData(m,p,y,L);z=null!=z?
-z:this.getCurrentFile();c=this.createFileData(v,N,z,window.location.href,c,e,g,k,m,x,y);N!=this.editor.graph&&N.container.parentNode.removeChild(N.container);return c};EditorUi.prototype.getHtml=function(c,e,g,k,m,p){p=null!=p?p:!0;var v=null,x=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=e){v=p?e.getGraphBounds():e.getBoundingBox(e.getSelectionCells());var z=e.view.scale;p=Math.floor(v.x/z-e.view.translate.x);z=Math.floor(v.y/z-e.view.translate.y);v=e.background;null==m&&(e=this.getBasenames().join(";"),
-0<e.length&&(x=EditorUi.drawHost+"/embed.js?s="+e));c.setAttribute("x0",p);c.setAttribute("y0",z)}null!=c&&(c.setAttribute("pan","1"),c.setAttribute("zoom","1"),c.setAttribute("resize","0"),c.setAttribute("fit","0"),c.setAttribute("border","20"),c.setAttribute("links","1"),null!=k&&c.setAttribute("edit",k));null!=m&&(m=m.replace(/&/g,"&amp;"));c=null!=c?Graph.zapGremlins(mxUtils.getXml(c)):"";k=Graph.compress(c);Graph.decompress(k)!=c&&(k=encodeURIComponent(c));return(null==m?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':
+function(){e.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){e.handleFileError(g,!0)}))))};EditorUi.prototype.getFileData=function(c,e,g,k,m,p,v,x,A,y,L){m=null!=m?m:!0;p=null!=p?p:!1;var N=this.editor.graph;if(e||!c&&null!=A&&/(\.svg)$/i.test(A.getTitle())){var I=null!=N.themes&&"darkTheme"==N.defaultThemeName;y=!1;if(I||null!=this.pages&&this.currentPage!=this.pages[0]){var q=N.getGlobalVariable;N=this.createTemporaryGraph(I?N.getDefaultStylesheet():N.getStylesheet());
+N.setBackgroundImage=this.editor.graph.setBackgroundImage;N.background=this.editor.graph.background;var D=this.pages[0];this.currentPage==D?N.setBackgroundImage(this.editor.graph.backgroundImage):null!=D.viewState&&null!=D.viewState&&N.setBackgroundImage(D.viewState.backgroundImage);N.getGlobalVariable=function(z){return"page"==z?D.getName():"pagenumber"==z?1:q.apply(this,arguments)};document.body.appendChild(N.container);N.model.setRoot(D.root)}}v=null!=v?v:this.getXmlFileData(m,p,y,L);A=null!=A?
+A:this.getCurrentFile();c=this.createFileData(v,N,A,window.location.href,c,e,g,k,m,x,y);N!=this.editor.graph&&N.container.parentNode.removeChild(N.container);return c};EditorUi.prototype.getHtml=function(c,e,g,k,m,p){p=null!=p?p:!0;var v=null,x=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=e){v=p?e.getGraphBounds():e.getBoundingBox(e.getSelectionCells());var A=e.view.scale;p=Math.floor(v.x/A-e.view.translate.x);A=Math.floor(v.y/A-e.view.translate.y);v=e.background;null==m&&(e=this.getBasenames().join(";"),
+0<e.length&&(x=EditorUi.drawHost+"/embed.js?s="+e));c.setAttribute("x0",p);c.setAttribute("y0",A)}null!=c&&(c.setAttribute("pan","1"),c.setAttribute("zoom","1"),c.setAttribute("resize","0"),c.setAttribute("fit","0"),c.setAttribute("border","20"),c.setAttribute("links","1"),null!=k&&c.setAttribute("edit",k));null!=m&&(m=m.replace(/&/g,"&amp;"));c=null!=c?Graph.zapGremlins(mxUtils.getXml(c)):"";k=Graph.compress(c);Graph.decompress(k)!=c&&(k=encodeURIComponent(c));return(null==m?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':
"")+"<!DOCTYPE html>\n<html"+(null!=m?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==m?null!=g?"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=m?'<meta http-equiv="refresh" content="0;URL=\''+m+"'\"/>\n":"")+"</head>\n<body"+(null==m&&null!=v&&v!=mxConstants.NONE?' style="background-color:'+v+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+k+"</div>\n</div>\n"+
(null==m?'<script type="text/javascript" src="'+x+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+m+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(c,e,g,k,m){e=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=m&&(m=m.replace(/&/g,"&amp;"));c={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,
xml:Graph.zapGremlins(c),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==m?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=m?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==m?null!=g?"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=m?'<meta http-equiv="refresh" content="0;URL=\''+
@@ -11759,20 +11755,20 @@ m+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph"
function(c){c=this.validateFileData(c);this.pages=this.fileNode=this.currentPage=null;var e=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null,g=Editor.extractParserError(e,mxResources.get("invalidOrMissingFile"));if(g)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[c],"node",[e],"cause",[g]),Error(mxResources.get("notADiagramFile")+" ("+g+")");c=null!=e?this.editor.extractGraphModel(e,!0):null;null!=c&&(e=c);if(null!=e&&"mxfile"==e.nodeName&&(c=e.getElementsByTagName("diagram"),
"0"!=urlParams.pages||1<c.length||1==c.length&&c[0].hasAttribute("name"))){g=null;this.fileNode=e;this.pages=[];for(var k=0;k<c.length;k++)null==c[k].getAttribute("id")&&c[k].setAttribute("id",k),e=new DiagramPage(c[k]),null==e.getName()&&e.setName(mxResources.get("pageWithNumber",[k+1])),this.pages.push(e),null!=urlParams["page-id"]&&e.getId()==urlParams["page-id"]&&(g=e);this.currentPage=null!=g?g:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];e=this.currentPage.node}"0"!=
urlParams.pages&&null==this.fileNode&&null!=e&&(this.fileNode=e.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(e.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(e);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var m=urlParams["layer-ids"].split(" ");e={};for(k=0;k<m.length;k++)e[m[k]]=!0;var p=this.editor.graph.getModel(),
-v=p.getChildren(p.root);for(k=0;k<v.length;k++){var x=v[k];p.setVisible(x,e[x.id]||!1)}}catch(z){}};EditorUi.prototype.getBaseFilename=function(c){var e=this.getCurrentFile();e=null!=e&&null!=e.getTitle()?e.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(e)||/(\.html)$/i.test(e)||/(\.svg)$/i.test(e)||/(\.png)$/i.test(e))e=e.substring(0,e.lastIndexOf("."));/(\.drawio)$/i.test(e)&&(e=e.substring(0,e.lastIndexOf(".")));!c&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&
-0<this.currentPage.getName().length&&(e=e+"-"+this.currentPage.getName());return e};EditorUi.prototype.downloadFile=function(c,e,g,k,m,p,v,x,z,y,L,N){try{k=null!=k?k:this.editor.graph.isSelectionEmpty();var J=this.getBaseFilename("remoteSvg"==c?!1:!m),q=J+("xml"==c||"pdf"==c&&L?".drawio":"")+"."+c;if("xml"==c){var D=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,k,m,null,null,null,e);this.saveData(q,c,D,"text/xml")}else if("html"==c)D=this.getHtml2(this.getFileData(!0),this.editor.graph,
-J),this.saveData(q,c,D,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==c)q=J+".png";else if("jpeg"==c)q=J+".jpg";else if("remoteSvg"==c){q=J+".svg";c="svg";var A=parseInt(z);"string"===typeof x&&0<x.indexOf("%")&&(x=parseInt(x)/100);if(0<A){var C=this.editor.graph,G=C.getGraphBounds();var M=Math.ceil(G.width*x/C.view.scale+2*A);var H=Math.ceil(G.height*x/C.view.scale+2*A)}}this.saveRequest(q,c,mxUtils.bind(this,function(O,W){try{var U=
-this.editor.graph.pageVisible;0==p&&(this.editor.graph.pageVisible=p);var n=this.createDownloadRequest(O,c,k,W,v,m,x,z,y,L,N,M,H);this.editor.graph.pageVisible=U;return n}catch(B){this.handleError(B)}}))}else{var F=null,I=mxUtils.bind(this,function(O){O.length<=MAX_REQUEST_SIZE?this.saveData(q,"svg",O,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(F)}))});if("svg"==c){var R=this.editor.graph.background;
-if(v||R==mxConstants.NONE)R=null;var X=this.editor.graph.getSvg(R,null,null,null,null,k);g&&this.editor.graph.addSvgShadow(X);this.editor.convertImages(X,mxUtils.bind(this,mxUtils.bind(this,function(O){this.spinner.stop();I(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(O))})))}else q=J+".svg",F=this.getFileData(!1,!0,null,mxUtils.bind(this,function(O){this.spinner.stop();I(O)}),k)}}catch(O){this.handleError(O)}};EditorUi.prototype.createDownloadRequest=function(c,e,g,k,m,p,v,x,z,
-y,L,N,J){var q=this.editor.graph,D=q.getGraphBounds();g=this.getFileData(!0,null,null,null,g,0==p?!1:"xmlpng"!=e,null,null,null,!1,"pdf"==e);var A="",C="";if(D.width*D.height>MAX_AREA||g.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};y=y?"1":"0";"pdf"==e&&(null!=L?C="&from="+L.from+"&to="+L.to:0==p&&(C="&allPages=1"));"xmlpng"==e&&(y="1",e="png");if(("xmlpng"==e||"svg"==e)&&null!=this.pages&&null!=this.currentPage)for(p=0;p<this.pages.length;p++)if(this.pages[p]==this.currentPage){A=
-"&from="+p;break}p=q.background;"png"!=e&&"pdf"!=e&&"svg"!=e||!m?m||null!=p&&p!=mxConstants.NONE||(p="#ffffff"):p=mxConstants.NONE;m={globalVars:q.getExportVariables()};z&&(m.grid={size:q.gridSize,steps:q.view.gridSteps,color:q.view.gridColor});Graph.translateDiagram&&(m.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+e+A+C+"&bg="+(null!=p?p:mxConstants.NONE)+"&base64="+k+"&embedXml="+y+"&xml="+encodeURIComponent(g)+(null!=c?"&filename="+encodeURIComponent(c):"")+
-"&extras="+encodeURIComponent(JSON.stringify(m))+(null!=v?"&scale="+v:"")+(null!=x?"&border="+x:"")+(N&&isFinite(N)?"&w="+N:"")+(J&&isFinite(J)?"&h="+J:""))};EditorUi.prototype.setMode=function(c,e){this.mode=c};EditorUi.prototype.loadDescriptor=function(c,e,g){var k=window.location.hash,m=mxUtils.bind(this,function(p){var v=null!=c.data?c.data:"";null!=p&&0<p.length&&(0<v.length&&(v+="\n"),v+=p);p=new LocalFile(this,"csv"!=c.format&&0<v.length?v:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):
-this.defaultFilename,!0);p.getHash=function(){return k};this.fileLoaded(p);"csv"==c.format&&this.importCsv(v,mxUtils.bind(this,function(N){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=c.update){var x=null!=c.interval?parseInt(c.interval):6E4,z=null,y=mxUtils.bind(this,function(){var N=this.currentPage;mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(J){N===this.currentPage&&(200<=
-J.getStatus()&&300>=J.getStatus()?(this.updateDiagram(J.getText()),L()):this.handleError({message:mxResources.get("error")+" "+J.getStatus()}))}),mxUtils.bind(this,function(J){this.handleError(J)}))}),L=mxUtils.bind(this,function(){window.clearTimeout(z);z=window.setTimeout(y,x)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){L();y()}));L();y()}null!=e&&e()});null!=c.url&&0<c.url.length?this.editor.loadUrl(c.url,mxUtils.bind(this,function(p){m(p)}),mxUtils.bind(this,function(p){null!=
-g&&g(p)})):m("")};EditorUi.prototype.updateDiagram=function(c){function e(H){var F=new mxCellOverlay(H.image||m.warningImage,H.tooltip,H.align,H.valign,H.offset);F.addListener(mxEvent.CLICK,function(I,R){k.alert(H.tooltip)});return F}var g=null,k=this;if(null!=c&&0<c.length&&(g=mxUtils.parseXml(c),c=null!=g?g.documentElement:null,null!=c&&"updates"==c.nodeName)){var m=this.editor.graph,p=m.getModel();p.beginUpdate();var v=null;try{for(c=c.firstChild;null!=c;){if("update"==c.nodeName){var x=p.getCell(c.getAttribute("id"));
-if(null!=x){try{var z=c.getAttribute("value");if(null!=z){var y=mxUtils.parseXml(z).documentElement;if(null!=y)if("1"==y.getAttribute("replace-value"))p.setValue(x,y);else for(var L=y.attributes,N=0;N<L.length;N++)m.setAttributeForCell(x,L[N].nodeName,0<L[N].nodeValue.length?L[N].nodeValue:null)}}catch(H){null!=window.console&&console.log("Error in value for "+x.id+": "+H)}try{var J=c.getAttribute("style");null!=J&&m.model.setStyle(x,J)}catch(H){null!=window.console&&console.log("Error in style for "+
-x.id+": "+H)}try{var q=c.getAttribute("icon");if(null!=q){var D=0<q.length?JSON.parse(q):null;null!=D&&D.append||m.removeCellOverlays(x);null!=D&&m.addCellOverlay(x,e(D))}}catch(H){null!=window.console&&console.log("Error in icon for "+x.id+": "+H)}try{var A=c.getAttribute("geometry");if(null!=A){A=JSON.parse(A);var C=m.getCellGeometry(x);if(null!=C){C=C.clone();for(key in A){var G=parseFloat(A[key]);"dx"==key?C.x+=G:"dy"==key?C.y+=G:"dw"==key?C.width+=G:"dh"==key?C.height+=G:C[key]=parseFloat(A[key])}m.model.setGeometry(x,
-C)}}}catch(H){null!=window.console&&console.log("Error in icon for "+x.id+": "+H)}}}else if("model"==c.nodeName){for(var M=c.firstChild;null!=M&&M.nodeType!=mxConstants.NODETYPE_ELEMENT;)M=M.nextSibling;null!=M&&(new mxCodec(c.firstChild)).decode(M,p)}else if("view"==c.nodeName){if(c.hasAttribute("scale")&&(m.view.scale=parseFloat(c.getAttribute("scale"))),c.hasAttribute("dx")||c.hasAttribute("dy"))m.view.translate=new mxPoint(parseFloat(c.getAttribute("dx")||0),parseFloat(c.getAttribute("dy")||0))}else"fit"==
+v=p.getChildren(p.root);for(k=0;k<v.length;k++){var x=v[k];p.setVisible(x,e[x.id]||!1)}}catch(A){}};EditorUi.prototype.getBaseFilename=function(c){var e=this.getCurrentFile();e=null!=e&&null!=e.getTitle()?e.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(e)||/(\.html)$/i.test(e)||/(\.svg)$/i.test(e)||/(\.png)$/i.test(e))e=e.substring(0,e.lastIndexOf("."));/(\.drawio)$/i.test(e)&&(e=e.substring(0,e.lastIndexOf(".")));!c&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&
+0<this.currentPage.getName().length&&(e=e+"-"+this.currentPage.getName());return e};EditorUi.prototype.downloadFile=function(c,e,g,k,m,p,v,x,A,y,L,N){try{k=null!=k?k:this.editor.graph.isSelectionEmpty();var I=this.getBaseFilename("remoteSvg"==c?!1:!m),q=I+("xml"==c||"pdf"==c&&L?".drawio":"")+"."+c;if("xml"==c){var D=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,k,m,null,null,null,e);this.saveData(q,c,D,"text/xml")}else if("html"==c)D=this.getHtml2(this.getFileData(!0),this.editor.graph,
+I),this.saveData(q,c,D,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==c)q=I+".png";else if("jpeg"==c)q=I+".jpg";else if("remoteSvg"==c){q=I+".svg";c="svg";var z=parseInt(A);"string"===typeof x&&0<x.indexOf("%")&&(x=parseInt(x)/100);if(0<z){var C=this.editor.graph,G=C.getGraphBounds();var H=Math.ceil(G.width*x/C.view.scale+2*z);var M=Math.ceil(G.height*x/C.view.scale+2*z)}}this.saveRequest(q,c,mxUtils.bind(this,function(P,V){try{var W=
+this.editor.graph.pageVisible;0==p&&(this.editor.graph.pageVisible=p);var n=this.createDownloadRequest(P,c,k,V,v,m,x,A,y,L,N,H,M);this.editor.graph.pageVisible=W;return n}catch(B){this.handleError(B)}}))}else{var F=null,J=mxUtils.bind(this,function(P){P.length<=MAX_REQUEST_SIZE?this.saveData(q,"svg",P,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(F)}))});if("svg"==c){var Q=this.editor.graph.background;
+if(v||Q==mxConstants.NONE)Q=null;var X=this.editor.graph.getSvg(Q,null,null,null,null,k);g&&this.editor.graph.addSvgShadow(X);this.editor.convertImages(X,mxUtils.bind(this,mxUtils.bind(this,function(P){this.spinner.stop();J(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(P))})))}else q=I+".svg",F=this.getFileData(!1,!0,null,mxUtils.bind(this,function(P){this.spinner.stop();J(P)}),k)}}catch(P){this.handleError(P)}};EditorUi.prototype.createDownloadRequest=function(c,e,g,k,m,p,v,x,A,
+y,L,N,I){var q=this.editor.graph,D=q.getGraphBounds();g=this.getFileData(!0,null,null,null,g,0==p?!1:"xmlpng"!=e,null,null,null,!1,"pdf"==e);var z="",C="";if(D.width*D.height>MAX_AREA||g.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};y=y?"1":"0";"pdf"==e&&(null!=L?C="&from="+L.from+"&to="+L.to:0==p&&(C="&allPages=1"));"xmlpng"==e&&(y="1",e="png");if(("xmlpng"==e||"svg"==e)&&null!=this.pages&&null!=this.currentPage)for(p=0;p<this.pages.length;p++)if(this.pages[p]==this.currentPage){z=
+"&from="+p;break}p=q.background;"png"!=e&&"pdf"!=e&&"svg"!=e||!m?m||null!=p&&p!=mxConstants.NONE||(p="#ffffff"):p=mxConstants.NONE;m={globalVars:q.getExportVariables()};A&&(m.grid={size:q.gridSize,steps:q.view.gridSteps,color:q.view.gridColor});Graph.translateDiagram&&(m.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+e+z+C+"&bg="+(null!=p?p:mxConstants.NONE)+"&base64="+k+"&embedXml="+y+"&xml="+encodeURIComponent(g)+(null!=c?"&filename="+encodeURIComponent(c):"")+
+"&extras="+encodeURIComponent(JSON.stringify(m))+(null!=v?"&scale="+v:"")+(null!=x?"&border="+x:"")+(N&&isFinite(N)?"&w="+N:"")+(I&&isFinite(I)?"&h="+I:""))};EditorUi.prototype.setMode=function(c,e){this.mode=c};EditorUi.prototype.loadDescriptor=function(c,e,g){var k=window.location.hash,m=mxUtils.bind(this,function(p){var v=null!=c.data?c.data:"";null!=p&&0<p.length&&(0<v.length&&(v+="\n"),v+=p);p=new LocalFile(this,"csv"!=c.format&&0<v.length?v:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):
+this.defaultFilename,!0);p.getHash=function(){return k};this.fileLoaded(p);"csv"==c.format&&this.importCsv(v,mxUtils.bind(this,function(N){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=c.update){var x=null!=c.interval?parseInt(c.interval):6E4,A=null,y=mxUtils.bind(this,function(){var N=this.currentPage;mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(I){N===this.currentPage&&(200<=
+I.getStatus()&&300>=I.getStatus()?(this.updateDiagram(I.getText()),L()):this.handleError({message:mxResources.get("error")+" "+I.getStatus()}))}),mxUtils.bind(this,function(I){this.handleError(I)}))}),L=mxUtils.bind(this,function(){window.clearTimeout(A);A=window.setTimeout(y,x)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){L();y()}));L();y()}null!=e&&e()});null!=c.url&&0<c.url.length?this.editor.loadUrl(c.url,mxUtils.bind(this,function(p){m(p)}),mxUtils.bind(this,function(p){null!=
+g&&g(p)})):m("")};EditorUi.prototype.updateDiagram=function(c){function e(M){var F=new mxCellOverlay(M.image||m.warningImage,M.tooltip,M.align,M.valign,M.offset);F.addListener(mxEvent.CLICK,function(J,Q){k.alert(M.tooltip)});return F}var g=null,k=this;if(null!=c&&0<c.length&&(g=mxUtils.parseXml(c),c=null!=g?g.documentElement:null,null!=c&&"updates"==c.nodeName)){var m=this.editor.graph,p=m.getModel();p.beginUpdate();var v=null;try{for(c=c.firstChild;null!=c;){if("update"==c.nodeName){var x=p.getCell(c.getAttribute("id"));
+if(null!=x){try{var A=c.getAttribute("value");if(null!=A){var y=mxUtils.parseXml(A).documentElement;if(null!=y)if("1"==y.getAttribute("replace-value"))p.setValue(x,y);else for(var L=y.attributes,N=0;N<L.length;N++)m.setAttributeForCell(x,L[N].nodeName,0<L[N].nodeValue.length?L[N].nodeValue:null)}}catch(M){null!=window.console&&console.log("Error in value for "+x.id+": "+M)}try{var I=c.getAttribute("style");null!=I&&m.model.setStyle(x,I)}catch(M){null!=window.console&&console.log("Error in style for "+
+x.id+": "+M)}try{var q=c.getAttribute("icon");if(null!=q){var D=0<q.length?JSON.parse(q):null;null!=D&&D.append||m.removeCellOverlays(x);null!=D&&m.addCellOverlay(x,e(D))}}catch(M){null!=window.console&&console.log("Error in icon for "+x.id+": "+M)}try{var z=c.getAttribute("geometry");if(null!=z){z=JSON.parse(z);var C=m.getCellGeometry(x);if(null!=C){C=C.clone();for(key in z){var G=parseFloat(z[key]);"dx"==key?C.x+=G:"dy"==key?C.y+=G:"dw"==key?C.width+=G:"dh"==key?C.height+=G:C[key]=parseFloat(z[key])}m.model.setGeometry(x,
+C)}}}catch(M){null!=window.console&&console.log("Error in icon for "+x.id+": "+M)}}}else if("model"==c.nodeName){for(var H=c.firstChild;null!=H&&H.nodeType!=mxConstants.NODETYPE_ELEMENT;)H=H.nextSibling;null!=H&&(new mxCodec(c.firstChild)).decode(H,p)}else if("view"==c.nodeName){if(c.hasAttribute("scale")&&(m.view.scale=parseFloat(c.getAttribute("scale"))),c.hasAttribute("dx")||c.hasAttribute("dy"))m.view.translate=new mxPoint(parseFloat(c.getAttribute("dx")||0),parseFloat(c.getAttribute("dy")||0))}else"fit"==
c.nodeName&&(v=c.hasAttribute("max-scale")?parseFloat(c.getAttribute("max-scale")):1);c=c.nextSibling}}finally{p.endUpdate()}null!=v&&this.chromelessResize&&this.chromelessResize(!0,v)}return g};EditorUi.prototype.getCopyFilename=function(c,e){var g=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;c="";var k=g.lastIndexOf(".");0<=k&&(c=g.substring(k),g=g.substring(0,k));if(e){e=g;var m=new Date;g=m.getFullYear();k=m.getMonth()+1;var p=m.getDate(),v=m.getHours(),x=m.getMinutes();m=m.getSeconds();
g=e+(" "+(g+"-"+k+"-"+p+"-"+v+"-"+x+"-"+m))}return g=mxResources.get("copyOf",[g])+c};EditorUi.prototype.fileLoaded=function(c,e){var g=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var k=!1;this.hideDialog();null!=g&&(EditorUi.debug("File.closed",[g]),g.removeListener(this.descriptorChangedListener),g.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var m=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);
null!=g&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!e&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerText="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();e||this.showSplash()});if(null!=c)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility=
@@ -11781,29 +11777,29 @@ this.editor.setStatus('<span class="geStatusAlert">'+mxUtils.htmlEntities(mxReso
"1"==urlParams.sketch?"sketch":uiTheme;if(null==p)p="default";else if("sketch"==p||"min"==p)p+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:c.getMode().toUpperCase()+"-OPEN-FILE-"+c.getHash(),action:"size_"+c.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+p})}EditorUi.debug("File.opened",[c]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==c.getMode()&&c.getMode()!=App.MODE_DEVICE&&null!=
c.getMode())try{this.addRecent({id:c.getHash(),title:c.getTitle(),mode:c.getMode()})}catch(v){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(v){}}catch(v){this.fileLoadedError=v;if(null!=c)try{c.close()}catch(x){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=c?c.getHash():"none"),action:"message_"+v.message,label:"stack_"+v.stack})}catch(x){}c=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,
mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=g?this.fileLoaded(g)||m():m()});e?c():this.handleError(v,mxResources.get("errorLoadingFile"),c,!0,null,null,!0)}else m();return k};EditorUi.prototype.getHashValueForPages=function(c,e){var g=0,k=new mxGraphModel,m=new mxCodec;null!=e&&(e.byteCount=0,e.attrCount=0,e.eltCount=0,e.nodeCount=0);for(var p=0;p<c.length;p++){this.updatePageRoot(c[p]);var v=c[p].node.cloneNode(!1);v.removeAttribute("name");k.root=c[p].root;
-var x=m.encode(k);this.editor.graph.saveViewState(c[p].viewState,x,!0);x.removeAttribute("pageWidth");x.removeAttribute("pageHeight");v.appendChild(x);null!=e&&(e.eltCount+=v.getElementsByTagName("*").length,e.nodeCount+=v.getElementsByTagName("mxCell").length);g=(g<<5)-g+this.hashValue(v,function(z,y,L,N){return!N||"mxGeometry"!=z.nodeName&&"mxPoint"!=z.nodeName||"x"!=y&&"y"!=y&&"width"!=y&&"height"!=y?N&&"mxCell"==z.nodeName&&"previous"==y?null:L:Math.round(L)},e)<<0}return g};EditorUi.prototype.hashValue=
+var x=m.encode(k);this.editor.graph.saveViewState(c[p].viewState,x,!0);x.removeAttribute("pageWidth");x.removeAttribute("pageHeight");v.appendChild(x);null!=e&&(e.eltCount+=v.getElementsByTagName("*").length,e.nodeCount+=v.getElementsByTagName("mxCell").length);g=(g<<5)-g+this.hashValue(v,function(A,y,L,N){return!N||"mxGeometry"!=A.nodeName&&"mxPoint"!=A.nodeName||"x"!=y&&"y"!=y&&"width"!=y&&"height"!=y?N&&"mxCell"==A.nodeName&&"previous"==y?null:L:Math.round(L)},e)<<0}return g};EditorUi.prototype.hashValue=
function(c,e,g){var k=0;if(null!=c&&"object"===typeof c&&"number"===typeof c.nodeType&&"string"===typeof c.nodeName&&"function"===typeof c.getAttribute){null!=c.nodeName&&(k^=this.hashValue(c.nodeName,e,g));if(null!=c.attributes){null!=g&&(g.attrCount+=c.attributes.length);for(var m=0;m<c.attributes.length;m++){var p=c.attributes[m].name,v=null!=e?e(c,p,c.attributes[m].value,!0):c.attributes[m].value;null!=v&&(k^=this.hashValue(p,e,g)+this.hashValue(v,e,g))}}if(null!=c.childNodes)for(m=0;m<c.childNodes.length;m++)k=
(k<<5)-k+this.hashValue(c.childNodes[m],e,g)<<0}else if(null!=c&&"function"!==typeof c){c=String(c);e=0;null!=g&&(g.byteCount+=c.length);for(m=0;m<c.length;m++)e=(e<<5)-e+c.charCodeAt(m)<<0;k^=e}return k};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(c,e,g,k,m,p,v){};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(c){null==c&&(c=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,c,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(c){var e=mxUtils.createXmlDocument(),g=e.createElement("mxlibrary");mxUtils.setTextContent(g,JSON.stringify(c));e.appendChild(g);return mxUtils.getXml(e)};EditorUi.prototype.closeLibrary=function(c){null!=c&&(this.removeLibrarySidebar(c.getHash()),
c.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(c.getHash()),".scratchpad"==c.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(c){var e=this.sidebar.palettes[c];if(null!=e){for(var g=0;g<e.length;g++)e[g].parentNode.removeChild(e[g]);delete this.sidebar.palettes[c]}};EditorUi.prototype.repositionLibrary=function(c){var e=this.sidebar.container;if(null==c){var g=this.sidebar.palettes["L.scratchpad"];null==g&&(g=this.sidebar.palettes.search);null!=g&&(c=g[g.length-
1].nextSibling)}c=null!=c?c:e.firstChild.nextSibling.nextSibling;g=e.lastChild;var k=g.previousSibling;e.insertBefore(g,c);e.insertBefore(k,g)};EditorUi.prototype.loadLibrary=function(c,e){var g=mxUtils.parseXml(c.getData());if("mxlibrary"==g.documentElement.nodeName){var k=JSON.parse(mxUtils.getTextContent(g.documentElement));this.libraryLoaded(c,k,g.documentElement.getAttribute("title"),e)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(c){return""};
-EditorUi.prototype.libraryLoaded=function(c,e,g,k){if(null!=this.sidebar){c.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(c.getHash());".scratchpad"==c.title&&(this.scratchpad=c);var m=this.sidebar.palettes[c.getHash()];m=null!=m?m[m.length-1].nextSibling:null;this.removeLibrarySidebar(c.getHash());var p=null,v=mxUtils.bind(this,function(M,H){0==M.length&&c.isEditable()?(null==p&&(p=document.createElement("div"),p.className="geDropTarget",mxUtils.write(p,mxResources.get("dragElementsHere"))),
-H.appendChild(p)):this.addLibraryEntries(M,H)});null!=this.sidebar&&null!=e&&this.sidebar.addEntries(e);null==g&&(g=c.getTitle(),null!=g&&/(\.xml)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf("."))));var x=this.sidebar.addPalette(c.getHash(),g,null!=k?k:!0,mxUtils.bind(this,function(M){v(e,M)}));this.repositionLibrary(m);var z=x.parentNode.previousSibling;k=z.getAttribute("title");null!=k&&0<k.length&&".scratchpad"!=c.title&&z.setAttribute("title",this.getLibraryStorageHint(c)+"\n"+k);var y=document.createElement("div");
-y.style.position="absolute";y.style.right="0px";y.style.top="0px";y.style.padding="8px";y.style.backgroundColor="inherit";z.style.position="relative";var L=document.createElement("img");L.setAttribute("src",Editor.crossImage);L.setAttribute("title",mxResources.get("close"));L.setAttribute("valign","absmiddle");L.setAttribute("border","0");L.style.position="relative";L.style.top="2px";L.style.width="14px";L.style.cursor="pointer";L.style.margin="0 3px";Editor.isDarkMode()&&(L.style.filter="invert(100%)");
-var N=null;if(".scratchpad"!=c.title||this.closableScratchpad)y.appendChild(L),mxEvent.addListener(L,"click",mxUtils.bind(this,function(M){if(!mxEvent.isConsumed(M)){var H=mxUtils.bind(this,function(){this.closeLibrary(c)});null!=N?this.confirm(mxResources.get("allChangesLost"),null,H,mxResources.get("cancel"),mxResources.get("discardChanges")):H();mxEvent.consume(M)}}));if(c.isEditable()){var J=this.editor.graph,q=null,D=mxUtils.bind(this,function(M){this.showLibraryDialog(c.getTitle(),x,e,c,c.getMode());
-mxEvent.consume(M)}),A=mxUtils.bind(this,function(M){c.setModified(!0);c.isAutosave()?(null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q),q=L.cloneNode(!1),q.setAttribute("src",Editor.spinImage),q.setAttribute("title",mxResources.get("saving")),q.style.cursor="default",q.style.marginRight="2px",q.style.marginTop="-2px",y.insertBefore(q,y.firstChild),z.style.paddingRight=18*y.childNodes.length+"px",this.saveLibrary(c.getTitle(),e,c,c.getMode(),!0,!0,function(){null!=q&&null!=q.parentNode&&(q.parentNode.removeChild(q),
-z.style.paddingRight=18*y.childNodes.length+"px")})):null==N&&(N=L.cloneNode(!1),N.setAttribute("src",Editor.saveImage),N.setAttribute("title",mxResources.get("save")),y.insertBefore(N,y.firstChild),mxEvent.addListener(N,"click",mxUtils.bind(this,function(H){this.saveLibrary(c.getTitle(),e,c,c.getMode(),c.constructor==LocalLibrary,!0,function(){null==N||c.isModified()||(z.style.paddingRight=18*y.childNodes.length+"px",N.parentNode.removeChild(N),N=null)});mxEvent.consume(H)})),z.style.paddingRight=
-18*y.childNodes.length+"px")}),C=mxUtils.bind(this,function(M,H,F,I){M=J.cloneCells(mxUtils.sortCells(J.model.getTopmostCells(M)));for(var R=0;R<M.length;R++){var X=J.getCellGeometry(M[R]);null!=X&&X.translate(-H.x,-H.y)}x.appendChild(this.sidebar.createVertexTemplateFromCells(M,H.width,H.height,I||"",!0,null,!1));M={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(M))),w:H.width,h:H.height};null!=I&&(M.title=I);e.push(M);A(F);null!=p&&null!=p.parentNode&&0<e.length&&(p.parentNode.removeChild(p),
-p=null)}),G=mxUtils.bind(this,function(M){if(J.isSelectionEmpty())J.getRubberband().isActive()?(J.getRubberband().execute(M),J.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var H=J.getSelectionCells(),F=J.view.getBounds(H),I=J.view.scale;F.x/=I;F.y/=I;F.width/=I;F.height/=I;F.x-=J.view.translate.x;F.y-=J.view.translate.y;C(H,F)}mxEvent.consume(M)});mxEvent.addGestureListeners(x,function(){},mxUtils.bind(this,function(M){J.isMouseDown&&
-null!=J.panningManager&&null!=J.graphHandler.first&&(J.graphHandler.suspend(),null!=J.graphHandler.hint&&(J.graphHandler.hint.style.visibility="hidden"),x.style.backgroundColor="#f1f3f4",x.style.cursor="copy",J.panningManager.stop(),J.autoScroll=!1,mxEvent.consume(M))}),mxUtils.bind(this,function(M){J.isMouseDown&&null!=J.panningManager&&null!=J.graphHandler&&(x.style.backgroundColor="",x.style.cursor="default",this.sidebar.showTooltips=!0,J.panningManager.stop(),J.graphHandler.reset(),J.isMouseDown=
-!1,J.autoScroll=!0,G(M),mxEvent.consume(M))}));mxEvent.addListener(x,"mouseleave",mxUtils.bind(this,function(M){J.isMouseDown&&null!=J.graphHandler.first&&(J.graphHandler.resume(),null!=J.graphHandler.hint&&(J.graphHandler.hint.style.visibility="visible"),x.style.backgroundColor="",x.style.cursor="",J.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(x,"dragover",mxUtils.bind(this,function(M){x.style.backgroundColor="#f1f3f4";M.dataTransfer.dropEffect="copy";x.style.cursor="copy";this.sidebar.hideTooltip();
-M.stopPropagation();M.preventDefault()})),mxEvent.addListener(x,"drop",mxUtils.bind(this,function(M){x.style.cursor="";x.style.backgroundColor="";0<M.dataTransfer.files.length&&this.importFiles(M.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(H,F,I,R,X,O,W,U,n){if(null!=H&&"image/"==F.substring(0,6))H="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(H),H=[new mxCell("",new mxGeometry(0,0,X,O),H)],H[0].vertex=!0,
-C(H,new mxRectangle(0,0,X,O),M,mxEvent.isAltDown(M)?null:W.substring(0,W.lastIndexOf(".")).replace(/_/g," ")),null!=p&&null!=p.parentNode&&0<e.length&&(p.parentNode.removeChild(p),p=null);else{var B=!1,K=mxUtils.bind(this,function(Q,P){null!=Q&&"application/pdf"==P&&(P=Editor.extractGraphModelFromPdf(Q),null!=P&&0<P.length&&(Q=P));if(null!=Q)if(Q=mxUtils.parseXml(Q),"mxlibrary"==Q.documentElement.nodeName)try{var T=JSON.parse(mxUtils.getTextContent(Q.documentElement));v(T,x);e=e.concat(T);A(M);this.spinner.stop();
-B=!0}catch(ca){}else if("mxfile"==Q.documentElement.nodeName)try{var V=Q.documentElement.getElementsByTagName("diagram");for(T=0;T<V.length;T++){var S=this.stringToCells(Editor.getDiagramNodeXml(V[T])),Y=this.editor.graph.getBoundingBoxFromGeometry(S);C(S,new mxRectangle(0,0,Y.width,Y.height),M)}B=!0}catch(ca){null!=window.console&&console.log("error in drop handler:",ca)}B||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=p&&null!=p.parentNode&&0<e.length&&
-(p.parentNode.removeChild(p),p=null)});null!=n&&null!=W&&(/(\.v(dx|sdx?))($|\?)/i.test(W)||/(\.vs(x|sx?))($|\?)/i.test(W))?this.importVisio(n,function(Q){K(Q,"text/xml")},null,W):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(H,W)&&null!=n?this.isExternalDataComms()?this.parseFile(n,mxUtils.bind(this,function(Q){4==Q.readyState&&(this.spinner.stop(),200<=Q.status&&299>=Q.status?K(Q.responseText,"text/xml"):this.handleError({message:mxResources.get(413==Q.status?"drawingTooLarge":"invalidOrMissingFile")},
-mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):K(H,F)}}));M.stopPropagation();M.preventDefault()})),mxEvent.addListener(x,"dragleave",function(M){x.style.cursor="";x.style.backgroundColor="";M.stopPropagation();M.preventDefault()}));L=L.cloneNode(!1);L.setAttribute("src",Editor.editImage);L.setAttribute("title",mxResources.get("edit"));y.insertBefore(L,y.firstChild);mxEvent.addListener(L,"click",D);mxEvent.addListener(x,
-"dblclick",function(M){mxEvent.getSource(M)==x&&D(M)});k=L.cloneNode(!1);k.setAttribute("src",Editor.plusImage);k.setAttribute("title",mxResources.get("add"));y.insertBefore(k,y.firstChild);mxEvent.addListener(k,"click",G);this.isOffline()||".scratchpad"!=c.title||null==EditorUi.scratchpadHelpLink||(k=document.createElement("span"),k.setAttribute("title",mxResources.get("help")),k.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(k,"?"),mxEvent.addGestureListeners(k,
-mxUtils.bind(this,function(M){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(M)})),y.insertBefore(k,y.firstChild))}z.appendChild(y);z.style.paddingRight=18*y.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(c,e){for(var g=0;g<c.length;g++){var k=c[g],m=k.data;if(null!=m){m=this.convertDataUri(m);var p="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==k.aspect&&(p+="aspect=fixed;");e.appendChild(this.sidebar.createVertexTemplate(p+
+EditorUi.prototype.libraryLoaded=function(c,e,g,k){if(null!=this.sidebar){c.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(c.getHash());".scratchpad"==c.title&&(this.scratchpad=c);var m=this.sidebar.palettes[c.getHash()];m=null!=m?m[m.length-1].nextSibling:null;this.removeLibrarySidebar(c.getHash());var p=null,v=mxUtils.bind(this,function(H,M){0==H.length&&c.isEditable()?(null==p&&(p=document.createElement("div"),p.className="geDropTarget",mxUtils.write(p,mxResources.get("dragElementsHere"))),
+M.appendChild(p)):this.addLibraryEntries(H,M)});null!=this.sidebar&&null!=e&&this.sidebar.addEntries(e);null==g&&(g=c.getTitle(),null!=g&&/(\.xml)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf("."))));var x=this.sidebar.addPalette(c.getHash(),g,null!=k?k:!0,mxUtils.bind(this,function(H){v(e,H)}));this.repositionLibrary(m);var A=x.parentNode.previousSibling;k=A.getAttribute("title");null!=k&&0<k.length&&".scratchpad"!=c.title&&A.setAttribute("title",this.getLibraryStorageHint(c)+"\n"+k);var y=document.createElement("div");
+y.style.position="absolute";y.style.right="0px";y.style.top="0px";y.style.padding="8px";y.style.backgroundColor="inherit";A.style.position="relative";var L=document.createElement("img");L.setAttribute("src",Editor.crossImage);L.setAttribute("title",mxResources.get("close"));L.setAttribute("valign","absmiddle");L.setAttribute("border","0");L.style.position="relative";L.style.top="2px";L.style.width="14px";L.style.cursor="pointer";L.style.margin="0 3px";Editor.isDarkMode()&&(L.style.filter="invert(100%)");
+var N=null;if(".scratchpad"!=c.title||this.closableScratchpad)y.appendChild(L),mxEvent.addListener(L,"click",mxUtils.bind(this,function(H){if(!mxEvent.isConsumed(H)){var M=mxUtils.bind(this,function(){this.closeLibrary(c)});null!=N?this.confirm(mxResources.get("allChangesLost"),null,M,mxResources.get("cancel"),mxResources.get("discardChanges")):M();mxEvent.consume(H)}}));if(c.isEditable()){var I=this.editor.graph,q=null,D=mxUtils.bind(this,function(H){this.showLibraryDialog(c.getTitle(),x,e,c,c.getMode());
+mxEvent.consume(H)}),z=mxUtils.bind(this,function(H){c.setModified(!0);c.isAutosave()?(null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q),q=L.cloneNode(!1),q.setAttribute("src",Editor.spinImage),q.setAttribute("title",mxResources.get("saving")),q.style.cursor="default",q.style.marginRight="2px",q.style.marginTop="-2px",y.insertBefore(q,y.firstChild),A.style.paddingRight=18*y.childNodes.length+"px",this.saveLibrary(c.getTitle(),e,c,c.getMode(),!0,!0,function(){null!=q&&null!=q.parentNode&&(q.parentNode.removeChild(q),
+A.style.paddingRight=18*y.childNodes.length+"px")})):null==N&&(N=L.cloneNode(!1),N.setAttribute("src",Editor.saveImage),N.setAttribute("title",mxResources.get("save")),y.insertBefore(N,y.firstChild),mxEvent.addListener(N,"click",mxUtils.bind(this,function(M){this.saveLibrary(c.getTitle(),e,c,c.getMode(),c.constructor==LocalLibrary,!0,function(){null==N||c.isModified()||(A.style.paddingRight=18*y.childNodes.length+"px",N.parentNode.removeChild(N),N=null)});mxEvent.consume(M)})),A.style.paddingRight=
+18*y.childNodes.length+"px")}),C=mxUtils.bind(this,function(H,M,F,J){H=I.cloneCells(mxUtils.sortCells(I.model.getTopmostCells(H)));for(var Q=0;Q<H.length;Q++){var X=I.getCellGeometry(H[Q]);null!=X&&X.translate(-M.x,-M.y)}x.appendChild(this.sidebar.createVertexTemplateFromCells(H,M.width,M.height,J||"",!0,null,!1));H={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(H))),w:M.width,h:M.height};null!=J&&(H.title=J);e.push(H);z(F);null!=p&&null!=p.parentNode&&0<e.length&&(p.parentNode.removeChild(p),
+p=null)}),G=mxUtils.bind(this,function(H){if(I.isSelectionEmpty())I.getRubberband().isActive()?(I.getRubberband().execute(H),I.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var M=I.getSelectionCells(),F=I.view.getBounds(M),J=I.view.scale;F.x/=J;F.y/=J;F.width/=J;F.height/=J;F.x-=I.view.translate.x;F.y-=I.view.translate.y;C(M,F)}mxEvent.consume(H)});mxEvent.addGestureListeners(x,function(){},mxUtils.bind(this,function(H){I.isMouseDown&&
+null!=I.panningManager&&null!=I.graphHandler.first&&(I.graphHandler.suspend(),null!=I.graphHandler.hint&&(I.graphHandler.hint.style.visibility="hidden"),x.style.backgroundColor="#f1f3f4",x.style.cursor="copy",I.panningManager.stop(),I.autoScroll=!1,mxEvent.consume(H))}),mxUtils.bind(this,function(H){I.isMouseDown&&null!=I.panningManager&&null!=I.graphHandler&&(x.style.backgroundColor="",x.style.cursor="default",this.sidebar.showTooltips=!0,I.panningManager.stop(),I.graphHandler.reset(),I.isMouseDown=
+!1,I.autoScroll=!0,G(H),mxEvent.consume(H))}));mxEvent.addListener(x,"mouseleave",mxUtils.bind(this,function(H){I.isMouseDown&&null!=I.graphHandler.first&&(I.graphHandler.resume(),null!=I.graphHandler.hint&&(I.graphHandler.hint.style.visibility="visible"),x.style.backgroundColor="",x.style.cursor="",I.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(x,"dragover",mxUtils.bind(this,function(H){x.style.backgroundColor="#f1f3f4";H.dataTransfer.dropEffect="copy";x.style.cursor="copy";this.sidebar.hideTooltip();
+H.stopPropagation();H.preventDefault()})),mxEvent.addListener(x,"drop",mxUtils.bind(this,function(H){x.style.cursor="";x.style.backgroundColor="";0<H.dataTransfer.files.length&&this.importFiles(H.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(M,F,J,Q,X,P,V,W,n){if(null!=M&&"image/"==F.substring(0,6))M="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(M),M=[new mxCell("",new mxGeometry(0,0,X,P),M)],M[0].vertex=!0,
+C(M,new mxRectangle(0,0,X,P),H,mxEvent.isAltDown(H)?null:V.substring(0,V.lastIndexOf(".")).replace(/_/g," ")),null!=p&&null!=p.parentNode&&0<e.length&&(p.parentNode.removeChild(p),p=null);else{var B=!1,K=mxUtils.bind(this,function(R,O){null!=R&&"application/pdf"==O&&(O=Editor.extractGraphModelFromPdf(R),null!=O&&0<O.length&&(R=O));if(null!=R)if(R=mxUtils.parseXml(R),"mxlibrary"==R.documentElement.nodeName)try{var U=JSON.parse(mxUtils.getTextContent(R.documentElement));v(U,x);e=e.concat(U);z(H);this.spinner.stop();
+B=!0}catch(ba){}else if("mxfile"==R.documentElement.nodeName)try{var S=R.documentElement.getElementsByTagName("diagram");for(U=0;U<S.length;U++){var T=this.stringToCells(Editor.getDiagramNodeXml(S[U])),Y=this.editor.graph.getBoundingBoxFromGeometry(T);C(T,new mxRectangle(0,0,Y.width,Y.height),H)}B=!0}catch(ba){null!=window.console&&console.log("error in drop handler:",ba)}B||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=p&&null!=p.parentNode&&0<e.length&&
+(p.parentNode.removeChild(p),p=null)});null!=n&&null!=V&&(/(\.v(dx|sdx?))($|\?)/i.test(V)||/(\.vs(x|sx?))($|\?)/i.test(V))?this.importVisio(n,function(R){K(R,"text/xml")},null,V):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(M,V)&&null!=n?this.isExternalDataComms()?this.parseFile(n,mxUtils.bind(this,function(R){4==R.readyState&&(this.spinner.stop(),200<=R.status&&299>=R.status?K(R.responseText,"text/xml"):this.handleError({message:mxResources.get(413==R.status?"drawingTooLarge":"invalidOrMissingFile")},
+mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):K(M,F)}}));H.stopPropagation();H.preventDefault()})),mxEvent.addListener(x,"dragleave",function(H){x.style.cursor="";x.style.backgroundColor="";H.stopPropagation();H.preventDefault()}));L=L.cloneNode(!1);L.setAttribute("src",Editor.editImage);L.setAttribute("title",mxResources.get("edit"));y.insertBefore(L,y.firstChild);mxEvent.addListener(L,"click",D);mxEvent.addListener(x,
+"dblclick",function(H){mxEvent.getSource(H)==x&&D(H)});k=L.cloneNode(!1);k.setAttribute("src",Editor.plusImage);k.setAttribute("title",mxResources.get("add"));y.insertBefore(k,y.firstChild);mxEvent.addListener(k,"click",G);this.isOffline()||".scratchpad"!=c.title||null==EditorUi.scratchpadHelpLink||(k=document.createElement("span"),k.setAttribute("title",mxResources.get("help")),k.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(k,"?"),mxEvent.addGestureListeners(k,
+mxUtils.bind(this,function(H){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(H)})),y.insertBefore(k,y.firstChild))}A.appendChild(y);A.style.paddingRight=18*y.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(c,e){for(var g=0;g<c.length;g++){var k=c[g],m=k.data;if(null!=m){m=this.convertDataUri(m);var p="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==k.aspect&&(p+="aspect=fixed;");e.appendChild(this.sidebar.createVertexTemplate(p+
"image="+m,k.w,k.h,"",k.title||"",!1,null,!0))}else null!=k.xml&&(m=this.stringToCells(Graph.decompress(k.xml)),0<m.length&&e.appendChild(this.sidebar.createVertexTemplateFromCells(m,k.w,k.h,k.title||"",!0,null,!0)))}};EditorUi.prototype.getResource=function(c){return null!=c?c[mxLanguage]||c.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.shapeBackgroundColor=Editor.darkColor,Graph.prototype.shapeForegroundColor=Editor.lightColor,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=
@@ -11812,28 +11808,28 @@ startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",targetPerimeterSpacing:"8
Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);c.init()};EditorUi.prototype.showBackgroundImageDialog=function(c,e){c=null!=c?c:mxUtils.bind(this,function(g,k){k||(g=new ChangePageSetup(this,null,g),g.ignoreColor=!0,this.editor.graph.model.execute(g))});c=new BackgroundImageDialog(this,c,e);this.showDialog(c.container,400,200,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(c,e,g,k,m){c=new LibraryDialog(this,c,e,g,k,m);this.showDialog(c.container,640,440,!0,!1,mxUtils.bind(this,
function(p){p&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));c.init()};var l=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(c){var e=l.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(g){this.editor.graph.isSelectionEmpty()&&e.refresh()}));return e};EditorUi.prototype.createSidebarFooterContainer=function(){var c=this.createDiv("geSidebarContainer geSidebarFooter");c.style.position="absolute";c.style.overflow=
"hidden";var e=document.createElement("a");e.className="geTitle";e.style.color="#DF6C0C";e.style.fontWeight="bold";e.style.height="100%";e.style.paddingTop="9px";e.innerHTML="<span>+</span>";var g=e.getElementsByTagName("span")[0];g.style.fontSize="18px";g.style.marginRight="5px";mxUtils.write(e,mxResources.get("moreShapes")+"...");mxEvent.addListener(e,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(k){k.preventDefault()}));mxEvent.addListener(e,"click",mxUtils.bind(this,
-function(k){this.actions.get("shapes").funct();mxEvent.consume(k)}));c.appendChild(e);return c};EditorUi.prototype.handleError=function(c,e,g,k,m,p,v){var x=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},z=null!=c&&null!=c.error?c.error:c;if(null!=c&&("1"==urlParams.test||null!=c.stack)&&null!=c.message)try{v?null!=window.console&&console.error("EditorUi.handleError:",c):EditorUi.logError("Caught: "+(""==c.message&&null!=c.name)?c.name:c.message,c.filename,c.lineNumber,
-c.columnNumber,c,"INFO")}catch(q){}if(null!=z||null!=e){v=mxUtils.htmlEntities(mxResources.get("unknownError"));var y=mxResources.get("ok"),L=null;e=null!=e?e:mxResources.get("error");if(null!=z){null!=z.retry&&(y=mxResources.get("cancel"),L=function(){x();z.retry()});if(404==z.code||404==z.status||403==z.code){v=403==z.code?null!=z.message?mxUtils.htmlEntities(z.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=m?m:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=
-this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var N=null!=m?null:null!=p?p:window.location.hash;if(null!=N&&("#G"==N.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==N.substring(0,45))&&(null!=c&&null!=c.error&&(null!=c.error.errors&&0<c.error.errors.length&&"fileAccess"==c.error.errors[0].reason||null!=c.error.data&&0<c.error.data.length&&"fileAccess"==c.error.data[0].reason)||404==z.code||404==z.status)){N="#U"==N.substring(0,
-2)?N.substring(45,N.lastIndexOf("%26ex")):N.substring(2);this.showError(e,v,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+N);this.handleError(c,e,g,k,m)}),L,mxResources.get("changeUser"),mxUtils.bind(this,function(){function q(){G.innerText="";for(var M=0;M<D.length;M++){var H=document.createElement("option");mxUtils.write(H,D[M].displayName);H.value=M;G.appendChild(H);H=document.createElement("option");H.innerHTML="&nbsp;&nbsp;&nbsp;";
-mxUtils.write(H,"<"+D[M].email+">");H.setAttribute("disabled","disabled");G.appendChild(H)}H=document.createElement("option");mxUtils.write(H,mxResources.get("addAccount"));H.value=D.length;G.appendChild(H)}var D=this.drive.getUsersList(),A=document.createElement("div"),C=document.createElement("span");C.style.marginTop="6px";mxUtils.write(C,mxResources.get("changeUser")+": ");A.appendChild(C);var G=document.createElement("select");G.style.width="200px";q();mxEvent.addListener(G,"change",mxUtils.bind(this,
-function(){var M=G.value,H=D.length!=M;H&&this.drive.setUser(D[M]);this.drive.authorize(H,mxUtils.bind(this,function(){H||(D=this.drive.getUsersList(),q())}),mxUtils.bind(this,function(F){this.handleError(F)}),!0)}));A.appendChild(G);A=new CustomDialog(this,A,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(A.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=g&&g()}),480,150);return}}null!=z.message?
-v=""==z.message&&null!=z.name?mxUtils.htmlEntities(z.name):mxUtils.htmlEntities(z.message):null!=z.response&&null!=z.response.error?v=mxUtils.htmlEntities(z.response.error):"undefined"!==typeof window.App&&(z.code==App.ERROR_TIMEOUT?v=mxUtils.htmlEntities(mxResources.get("timeout")):z.code==App.ERROR_BUSY?v=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof z&&0<z.length&&(v=mxUtils.htmlEntities(z)))}var J=p=null;null!=z&&null!=z.helpLink?(p=mxResources.get("help"),J=mxUtils.bind(this,
-function(){return this.editor.graph.openLink(z.helpLink)})):null!=z&&null!=z.ownerEmail&&(p=mxResources.get("contactOwner"),v+=mxUtils.htmlEntities(" ("+p+": "+z.ownerEmail+")"),J=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(z.ownerEmail))}));this.showError(e,v,y,g,L,null,null,p,J,null,null,null,k?g:null)}else null!=g&&g()};EditorUi.prototype.alert=function(c,e,g){c=new ErrorDialog(this,null,c,mxResources.get("ok"),e);this.showDialog(c.container,g||340,100,!0,!1);
+function(k){this.actions.get("shapes").funct();mxEvent.consume(k)}));c.appendChild(e);return c};EditorUi.prototype.handleError=function(c,e,g,k,m,p,v){var x=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},A=null!=c&&null!=c.error?c.error:c;if(null!=c&&("1"==urlParams.test||null!=c.stack)&&null!=c.message)try{v?null!=window.console&&console.error("EditorUi.handleError:",c):EditorUi.logError("Caught: "+(""==c.message&&null!=c.name)?c.name:c.message,c.filename,c.lineNumber,
+c.columnNumber,c,"INFO")}catch(q){}if(null!=A||null!=e){v=mxUtils.htmlEntities(mxResources.get("unknownError"));var y=mxResources.get("ok"),L=null;e=null!=e?e:mxResources.get("error");if(null!=A){null!=A.retry&&(y=mxResources.get("cancel"),L=function(){x();A.retry()});if(404==A.code||404==A.status||403==A.code){v=403==A.code?null!=A.message?mxUtils.htmlEntities(A.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=m?m:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=
+this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var N=null!=m?null:null!=p?p:window.location.hash;if(null!=N&&("#G"==N.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==N.substring(0,45))&&(null!=c&&null!=c.error&&(null!=c.error.errors&&0<c.error.errors.length&&"fileAccess"==c.error.errors[0].reason||null!=c.error.data&&0<c.error.data.length&&"fileAccess"==c.error.data[0].reason)||404==A.code||404==A.status)){N="#U"==N.substring(0,
+2)?N.substring(45,N.lastIndexOf("%26ex")):N.substring(2);this.showError(e,v,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+N);this.handleError(c,e,g,k,m)}),L,mxResources.get("changeUser"),mxUtils.bind(this,function(){function q(){G.innerText="";for(var H=0;H<D.length;H++){var M=document.createElement("option");mxUtils.write(M,D[H].displayName);M.value=H;G.appendChild(M);M=document.createElement("option");M.innerHTML="&nbsp;&nbsp;&nbsp;";
+mxUtils.write(M,"<"+D[H].email+">");M.setAttribute("disabled","disabled");G.appendChild(M)}M=document.createElement("option");mxUtils.write(M,mxResources.get("addAccount"));M.value=D.length;G.appendChild(M)}var D=this.drive.getUsersList(),z=document.createElement("div"),C=document.createElement("span");C.style.marginTop="6px";mxUtils.write(C,mxResources.get("changeUser")+": ");z.appendChild(C);var G=document.createElement("select");G.style.width="200px";q();mxEvent.addListener(G,"change",mxUtils.bind(this,
+function(){var H=G.value,M=D.length!=H;M&&this.drive.setUser(D[H]);this.drive.authorize(M,mxUtils.bind(this,function(){M||(D=this.drive.getUsersList(),q())}),mxUtils.bind(this,function(F){this.handleError(F)}),!0)}));z.appendChild(G);z=new CustomDialog(this,z,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(z.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=g&&g()}),480,150);return}}null!=A.message?
+v=""==A.message&&null!=A.name?mxUtils.htmlEntities(A.name):mxUtils.htmlEntities(A.message):null!=A.response&&null!=A.response.error?v=mxUtils.htmlEntities(A.response.error):"undefined"!==typeof window.App&&(A.code==App.ERROR_TIMEOUT?v=mxUtils.htmlEntities(mxResources.get("timeout")):A.code==App.ERROR_BUSY?v=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof A&&0<A.length&&(v=mxUtils.htmlEntities(A)))}var I=p=null;null!=A&&null!=A.helpLink?(p=mxResources.get("help"),I=mxUtils.bind(this,
+function(){return this.editor.graph.openLink(A.helpLink)})):null!=A&&null!=A.ownerEmail&&(p=mxResources.get("contactOwner"),v+=mxUtils.htmlEntities(" ("+p+": "+A.ownerEmail+")"),I=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(A.ownerEmail))}));this.showError(e,v,y,g,L,null,null,p,I,null,null,null,k?g:null)}else null!=g&&g()};EditorUi.prototype.alert=function(c,e,g){c=new ErrorDialog(this,null,c,mxResources.get("ok"),e);this.showDialog(c.container,g||340,100,!0,!1);
c.init()};EditorUi.prototype.confirm=function(c,e,g,k,m,p){var v=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},x=Math.min(200,28*Math.ceil(c.length/50));c=new ConfirmDialog(this,c,function(){v();null!=e&&e()},function(){v();null!=g&&g()},k,m,null,null,null,null,x);this.showDialog(c.container,340,46+x,!0,p);c.init()};EditorUi.prototype.showBanner=function(c,e,g,k){var m=!1;if(!(this.bannerShowing||this["hideBanner"+c]||isLocalStorage&&null!=mxSettings.settings&&null!=
mxSettings.settings["close"+c])){var p=document.createElement("div");p.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(p.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(p.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(p.style,"transition","all 1s ease");p.className="geBtn gePrimaryBtn";
m=document.createElement("img");m.setAttribute("src",IMAGE_PATH+"/logo.png");m.setAttribute("border","0");m.setAttribute("align","absmiddle");m.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";p.appendChild(m);m=document.createElement("img");m.setAttribute("src",Dialog.prototype.closeImage);m.setAttribute("title",mxResources.get(k?"doNotShowAgain":"close"));m.setAttribute("border","0");m.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";
p.appendChild(m);mxUtils.write(p,e);document.body.appendChild(p);this.bannerShowing=!0;e=document.createElement("div");e.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var v=document.createElement("input");v.setAttribute("type","checkbox");v.setAttribute("id","geDoNotShowAgainCheckbox");v.style.marginRight="6px";if(!k){e.appendChild(v);var x=document.createElement("label");x.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(x,mxResources.get("doNotShowAgain"));e.appendChild(x);
-p.style.paddingBottom="30px";p.appendChild(e)}var z=mxUtils.bind(this,function(){null!=p.parentNode&&(p.parentNode.removeChild(p),this.bannerShowing=!1,v.checked||k)&&(this["hideBanner"+c]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});mxEvent.addListener(m,"click",mxUtils.bind(this,function(L){mxEvent.consume(L);z()}));var y=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(p.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,
-function(){z()}),1E3)});mxEvent.addListener(p,"click",mxUtils.bind(this,function(L){var N=mxEvent.getSource(L);N!=v&&N!=x?(null!=g&&g(),z(),mxEvent.consume(L)):y()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(p.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(y,3E4);m=!0}return m};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=
+p.style.paddingBottom="30px";p.appendChild(e)}var A=mxUtils.bind(this,function(){null!=p.parentNode&&(p.parentNode.removeChild(p),this.bannerShowing=!1,v.checked||k)&&(this["hideBanner"+c]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});mxEvent.addListener(m,"click",mxUtils.bind(this,function(L){mxEvent.consume(L);A()}));var y=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(p.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,
+function(){A()}),1E3)});mxEvent.addListener(p,"click",mxUtils.bind(this,function(L){var N=mxEvent.getSource(L);N!=v&&N!=x?(null!=g&&g(),A(),mxEvent.consume(L)):y()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(p.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(y,3E4);m=!0}return m};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=
function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(c,e,g,k){c=c.toDataURL("image/"+g);if(null!=c&&6<c.length)null!=e&&(c=Editor.writeGraphModelToPng(c,"tEXt","mxfile",encodeURIComponent(e))),0<k&&(c=Editor.writeGraphModelToPng(c,"pHYs","dpi",k));else throw{message:mxResources.get("unknownError")};return c};EditorUi.prototype.saveCanvas=function(c,e,g,k,m){var p="jpeg"==g?"jpg":g;k=this.getBaseFilename(k)+(null!=e?".drawio":"")+"."+p;c=this.createImageDataUri(c,
e,g,m);this.saveData(k,p,c.substring(c.lastIndexOf(",")+1),"image/"+g,!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(c,e){c=new TextareaDialog(this,c,e,null,null,mxResources.get("close"));this.showDialog(c.container,620,460,
!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(c,e,g,k,m,p){"text/xml"!=g||/(\.drawio)$/i.test(e)||/(\.xml)$/i.test(e)||/(\.svg)$/i.test(e)||/(\.html)$/i.test(e)||(e=e+"."+(null!=p?p:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)c=k?this.base64ToBlob(c,g):new Blob([c],{type:g}),navigator.msSaveOrOpenBlob(c,e);else if(mxClient.IS_IE)g=window.open("about:blank","_blank"),null==g?mxUtils.popup(c,!0):(g.document.write(c),
g.document.close(),g.document.execCommand("SaveAs",!0,e),g.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==g||"image/"!=g.substring(0,6)?this.showTextDialog(e+":",c):this.openInNewWindow(c,g,k);else{var v=document.createElement("a");p=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof v.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var x=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);p=65==(x?parseInt(x[2],10):
-!1)?!1:p}if(p||this.isOffline()){v.href=URL.createObjectURL(k?this.base64ToBlob(c,g):new Blob([c],{type:g}));p?v.download=e:v.setAttribute("target","_blank");document.body.appendChild(v);try{window.setTimeout(function(){URL.revokeObjectURL(v.href)},2E4),v.click(),v.parentNode.removeChild(v)}catch(z){}}else this.createEchoRequest(c,e,g,k,m).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(c,e,g,k,m,p){c="xml="+encodeURIComponent(c);return new mxXmlRequest(SAVE_URL,c+(null!=
-g?"&mime="+g:"")+(null!=m?"&format="+m:"")+(null!=p?"&base64="+p:"")+(null!=e?"&filename="+encodeURIComponent(e):"")+(k?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(c,e){e=e||"";c=atob(c);for(var g=c.length,k=Math.ceil(g/1024),m=Array(k),p=0;p<k;++p){for(var v=1024*p,x=Math.min(v+1024,g),z=Array(x-v),y=0;v<x;++y,++v)z[y]=c[v].charCodeAt(0);m[p]=new Uint8Array(z)}return new Blob(m,{type:e})};EditorUi.prototype.saveLocalFile=function(c,e,g,k,m,p,v,x){p=null!=p?p:!1;v=null!=v?v:"vsdx"!=
-m&&(!mxClient.IS_IOS||!navigator.standalone);m=this.getServiceCount(p);isLocalStorage&&m++;var z=4>=m?2:6<m?4:3;e=new CreateDialog(this,e,mxUtils.bind(this,function(y,L){try{if("_blank"==L)if(null!=g&&"image/"==g.substring(0,6))this.openInNewWindow(c,g,k);else if(null!=g&&"text/html"==g.substring(0,9)){var N=new EmbedDialog(this,c);this.showDialog(N.container,450,240,!0,!0);N.init()}else{var J=window.open("about:blank");null==J?mxUtils.popup(c,!0):(J.document.write("<pre>"+mxUtils.htmlEntities(c,
-!1)+"</pre>"),J.document.close())}else L==App.MODE_DEVICE||"download"==L?this.doSaveLocalFile(c,y,g,k,null,x):null!=y&&0<y.length&&this.pickFolder(L,mxUtils.bind(this,function(q){try{this.exportFile(c,y,g,k,L,q)}catch(D){this.handleError(D)}}))}catch(q){this.handleError(q)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,p,v,null,1<m,z,c,g,k);p=this.isServices(m)?m>z?390:280:160;this.showDialog(e.container,420,p,!0,!0);e.init()};EditorUi.prototype.openInNewWindow=
+!1)?!1:p}if(p||this.isOffline()){v.href=URL.createObjectURL(k?this.base64ToBlob(c,g):new Blob([c],{type:g}));p?v.download=e:v.setAttribute("target","_blank");document.body.appendChild(v);try{window.setTimeout(function(){URL.revokeObjectURL(v.href)},2E4),v.click(),v.parentNode.removeChild(v)}catch(A){}}else this.createEchoRequest(c,e,g,k,m).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(c,e,g,k,m,p){c="xml="+encodeURIComponent(c);return new mxXmlRequest(SAVE_URL,c+(null!=
+g?"&mime="+g:"")+(null!=m?"&format="+m:"")+(null!=p?"&base64="+p:"")+(null!=e?"&filename="+encodeURIComponent(e):"")+(k?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(c,e){e=e||"";c=atob(c);for(var g=c.length,k=Math.ceil(g/1024),m=Array(k),p=0;p<k;++p){for(var v=1024*p,x=Math.min(v+1024,g),A=Array(x-v),y=0;v<x;++y,++v)A[y]=c[v].charCodeAt(0);m[p]=new Uint8Array(A)}return new Blob(m,{type:e})};EditorUi.prototype.saveLocalFile=function(c,e,g,k,m,p,v,x){p=null!=p?p:!1;v=null!=v?v:"vsdx"!=
+m&&(!mxClient.IS_IOS||!navigator.standalone);m=this.getServiceCount(p);isLocalStorage&&m++;var A=4>=m?2:6<m?4:3;e=new CreateDialog(this,e,mxUtils.bind(this,function(y,L){try{if("_blank"==L)if(null!=g&&"image/"==g.substring(0,6))this.openInNewWindow(c,g,k);else if(null!=g&&"text/html"==g.substring(0,9)){var N=new EmbedDialog(this,c);this.showDialog(N.container,450,240,!0,!0);N.init()}else{var I=window.open("about:blank");null==I?mxUtils.popup(c,!0):(I.document.write("<pre>"+mxUtils.htmlEntities(c,
+!1)+"</pre>"),I.document.close())}else L==App.MODE_DEVICE||"download"==L?this.doSaveLocalFile(c,y,g,k,null,x):null!=y&&0<y.length&&this.pickFolder(L,mxUtils.bind(this,function(q){try{this.exportFile(c,y,g,k,L,q)}catch(D){this.handleError(D)}}))}catch(q){this.handleError(q)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,p,v,null,1<m,A,c,g,k);p=this.isServices(m)?m>A?390:280:160;this.showDialog(e.container,420,p,!0,!0);e.init()};EditorUi.prototype.openInNewWindow=
function(c,e,g){var k=window.open("about:blank");null==k||null==k.document?mxUtils.popup(c,!0):("image/svg+xml"!=e||mxClient.IS_SVG?"image/svg+xml"!=e||this.editor.graph.mathEnabled?(c=g?c:btoa(unescape(encodeURIComponent(c))),k.document.write('<html><img style="max-width:100%;" src="data:'+e+";base64,"+c+'"/></html>')):k.document.write("<html>"+c+"</html>"):k.document.write("<html><pre>"+mxUtils.htmlEntities(c,!1)+"</pre></html>"),k.document.close())};var d=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(c){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var e=c(mxUtils.bind(this,function(k){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=
@@ -11844,149 +11840,149 @@ null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(
"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 g=c(mxUtils.bind(this,function(k){var m=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",m);null!=this.exportDialog&&
(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)m.apply(this);else{this.exportDialog=document.createElement("div");var p=g.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=p.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";p=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=p.zIndex;var v=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});v.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(x){v.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var z=this.createImageDataUri(x,null,"png");x=document.createElement("img");x.style.maxWidth="140px";x.style.maxHeight="140px";x.style.cursor="pointer";x.style.backgroundColor="white";x.setAttribute("title",mxResources.get("openInNewWindow"));
-x.setAttribute("border","0");x.setAttribute("src",z);this.exportDialog.appendChild(x);mxEvent.addListener(x,"click",mxUtils.bind(this,function(){this.openInNewWindow(z.substring(z.indexOf(",")+1),"image/png",!0);m.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(x){this.spinner.stop();this.handleError(x)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",m);document.body.appendChild(this.exportDialog)}mxEvent.consume(k)}),
-Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(c,e,g,k,m){this.isLocalFileSave()?this.saveLocalFile(g,c,k,m,e):this.saveRequest(c,e,mxUtils.bind(this,function(p,v){return this.createEchoRequest(g,p,k,m,e,v)}),g,m,k)};EditorUi.prototype.saveRequest=function(c,e,g,k,m,p,v){v=null!=v?v:!mxClient.IS_IOS||!navigator.standalone;var x=this.getServiceCount(!1);isLocalStorage&&x++;var z=4>=x?2:6<x?4:3;c=new CreateDialog(this,c,mxUtils.bind(this,function(y,L){if("_blank"==
-L||null!=y&&0<y.length){var N=g("_blank"==L?null:y,L==App.MODE_DEVICE||"download"==L||null==L||"_blank"==L?"0":"1");null!=N&&(L==App.MODE_DEVICE||"download"==L||"_blank"==L?N.simulate(document,"_blank"):this.pickFolder(L,mxUtils.bind(this,function(J){p=null!=p?p:"pdf"==e?"application/pdf":"image/"+e;if(null!=k)try{this.exportFile(k,y,p,!0,L,J)}catch(q){this.handleError(q)}else this.spinner.spin(document.body,mxResources.get("saving"))&&N.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=
-N.getStatus()&&299>=N.getStatus())try{this.exportFile(N.getText(),y,p,!0,L,J)}catch(q){this.handleError(q)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(q){this.spinner.stop();this.handleError(q)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,v,null,1<x,z,k,p,m);x=this.isServices(x)?4<x?390:280:160;this.showDialog(c.container,420,x,!0,!0);c.init()};EditorUi.prototype.isServices=function(c){return 1!=
-c};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(c,e,g,k,m,p){};EditorUi.prototype.pickFolder=function(c,e,g){e(null)};EditorUi.prototype.exportSvg=function(c,e,g,k,m,p,v,x,z,y,L,N,J,q){if(this.spinner.spin(document.body,mxResources.get("export")))try{var D=this.editor.graph.isSelectionEmpty();g=null!=g?g:D;var A=e?null:this.editor.graph.background;A==mxConstants.NONE&&(A=null);null==A&&0==e&&(A=L?this.editor.graph.defaultPageBackgroundColor:
-"#ffffff");var C=this.editor.graph.getSvg(A,c,v,x,null,g,null,null,"blank"==y?"_blank":"self"==y?"_top":null,null,!J,L,N);k&&this.editor.graph.addSvgShadow(C);var G=this.getBaseFilename()+(m?".drawio":"")+".svg";q=null!=q?q:mxUtils.bind(this,function(F){this.isLocalFileSave()||F.length<=MAX_REQUEST_SIZE?this.saveData(G,"svg",F,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(F)}))});var M=mxUtils.bind(this,
-function(F){this.spinner.stop();m&&F.setAttribute("content",this.getFileData(!0,null,null,null,g,z,null,null,null,!1));q(Graph.xmlDeclaration+"\n"+(m?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(F))});this.editor.graph.mathEnabled&&this.editor.addMathCss(C);var H=mxUtils.bind(this,function(F){p?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(F,M,this.thumbImageCache)):M(F)});J?this.embedFonts(C,H):(this.editor.addFontCss(C),H(C))}catch(F){this.handleError(F)}};
-EditorUi.prototype.addRadiobox=function(c,e,g,k,m,p,v){return this.addCheckbox(c,g,k,m,p,v,!0,e)};EditorUi.prototype.addCheckbox=function(c,e,g,k,m,p,v,x){p=null!=p?p:!0;var z=document.createElement("input");z.style.marginRight="8px";z.style.marginTop="16px";z.setAttribute("type",v?"radio":"checkbox");v="geCheckbox-"+Editor.guid();z.id=v;null!=x&&z.setAttribute("name",x);g&&(z.setAttribute("checked","checked"),z.defaultChecked=!0);k&&z.setAttribute("disabled","disabled");p&&(c.appendChild(z),g=document.createElement("label"),
-mxUtils.write(g,e),g.setAttribute("for",v),c.appendChild(g),m||mxUtils.br(c));return z};EditorUi.prototype.addEditButton=function(c,e){var g=this.addCheckbox(c,mxResources.get("edit")+":",!0,null,!0);g.style.marginLeft="24px";var k=this.getCurrentFile(),m="";null!=k&&k.getMode()!=App.MODE_DEVICE&&k.getMode()!=App.MODE_BROWSER&&(m=window.location.href);var p=document.createElement("select");p.style.maxWidth="200px";p.style.width="auto";p.style.marginLeft="8px";p.style.marginRight="10px";p.className=
+speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});v.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(x){v.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var A=this.createImageDataUri(x,null,"png");x=document.createElement("img");x.style.maxWidth="140px";x.style.maxHeight="140px";x.style.cursor="pointer";x.style.backgroundColor="white";x.setAttribute("title",mxResources.get("openInNewWindow"));
+x.setAttribute("border","0");x.setAttribute("src",A);this.exportDialog.appendChild(x);mxEvent.addListener(x,"click",mxUtils.bind(this,function(){this.openInNewWindow(A.substring(A.indexOf(",")+1),"image/png",!0);m.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(x){this.spinner.stop();this.handleError(x)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",m);document.body.appendChild(this.exportDialog)}mxEvent.consume(k)}),
+Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(c,e,g,k,m){this.isLocalFileSave()?this.saveLocalFile(g,c,k,m,e):this.saveRequest(c,e,mxUtils.bind(this,function(p,v){return this.createEchoRequest(g,p,k,m,e,v)}),g,m,k)};EditorUi.prototype.saveRequest=function(c,e,g,k,m,p,v){v=null!=v?v:!mxClient.IS_IOS||!navigator.standalone;var x=this.getServiceCount(!1);isLocalStorage&&x++;var A=4>=x?2:6<x?4:3;c=new CreateDialog(this,c,mxUtils.bind(this,function(y,L){if("_blank"==
+L||null!=y&&0<y.length){var N=g("_blank"==L?null:y,L==App.MODE_DEVICE||"download"==L||null==L||"_blank"==L?"0":"1");null!=N&&(L==App.MODE_DEVICE||"download"==L||"_blank"==L?N.simulate(document,"_blank"):this.pickFolder(L,mxUtils.bind(this,function(I){p=null!=p?p:"pdf"==e?"application/pdf":"image/"+e;if(null!=k)try{this.exportFile(k,y,p,!0,L,I)}catch(q){this.handleError(q)}else this.spinner.spin(document.body,mxResources.get("saving"))&&N.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=
+N.getStatus()&&299>=N.getStatus())try{this.exportFile(N.getText(),y,p,!0,L,I)}catch(q){this.handleError(q)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(q){this.spinner.stop();this.handleError(q)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,v,null,1<x,A,k,p,m);x=this.isServices(x)?4<x?390:280:160;this.showDialog(c.container,420,x,!0,!0);c.init()};EditorUi.prototype.isServices=function(c){return 1!=
+c};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(c,e,g,k,m,p){};EditorUi.prototype.pickFolder=function(c,e,g){e(null)};EditorUi.prototype.exportSvg=function(c,e,g,k,m,p,v,x,A,y,L,N,I,q){if(this.spinner.spin(document.body,mxResources.get("export")))try{var D=this.editor.graph.isSelectionEmpty();g=null!=g?g:D;var z=e?null:this.editor.graph.background;z==mxConstants.NONE&&(z=null);null==z&&0==e&&(z=L?this.editor.graph.defaultPageBackgroundColor:
+"#ffffff");var C=this.editor.graph.getSvg(z,c,v,x,null,g,null,null,"blank"==y?"_blank":"self"==y?"_top":null,null,!I,L,N);k&&this.editor.graph.addSvgShadow(C);var G=this.getBaseFilename()+(m?".drawio":"")+".svg";q=null!=q?q:mxUtils.bind(this,function(F){this.isLocalFileSave()||F.length<=MAX_REQUEST_SIZE?this.saveData(G,"svg",F,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(F)}))});var H=mxUtils.bind(this,
+function(F){this.spinner.stop();m&&F.setAttribute("content",this.getFileData(!0,null,null,null,g,A,null,null,null,!1));q(Graph.xmlDeclaration+"\n"+(m?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(F))});this.editor.graph.mathEnabled&&this.editor.addMathCss(C);var M=mxUtils.bind(this,function(F){p?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(F,H,this.thumbImageCache)):H(F)});I?this.embedFonts(C,M):(this.editor.addFontCss(C),M(C))}catch(F){this.handleError(F)}};
+EditorUi.prototype.addRadiobox=function(c,e,g,k,m,p,v){return this.addCheckbox(c,g,k,m,p,v,!0,e)};EditorUi.prototype.addCheckbox=function(c,e,g,k,m,p,v,x){p=null!=p?p:!0;var A=document.createElement("input");A.style.marginRight="8px";A.style.marginTop="16px";A.setAttribute("type",v?"radio":"checkbox");v="geCheckbox-"+Editor.guid();A.id=v;null!=x&&A.setAttribute("name",x);g&&(A.setAttribute("checked","checked"),A.defaultChecked=!0);k&&A.setAttribute("disabled","disabled");p&&(c.appendChild(A),g=document.createElement("label"),
+mxUtils.write(g,e),g.setAttribute("for",v),c.appendChild(g),m||mxUtils.br(c));return A};EditorUi.prototype.addEditButton=function(c,e){var g=this.addCheckbox(c,mxResources.get("edit")+":",!0,null,!0);g.style.marginLeft="24px";var k=this.getCurrentFile(),m="";null!=k&&k.getMode()!=App.MODE_DEVICE&&k.getMode()!=App.MODE_BROWSER&&(m=window.location.href);var p=document.createElement("select");p.style.maxWidth="200px";p.style.width="auto";p.style.marginLeft="8px";p.style.marginRight="10px";p.className=
"geBtn";k=document.createElement("option");k.setAttribute("value","blank");mxUtils.write(k,mxResources.get("makeCopy"));p.appendChild(k);k=document.createElement("option");k.setAttribute("value","custom");mxUtils.write(k,mxResources.get("custom")+"...");p.appendChild(k);c.appendChild(p);mxEvent.addListener(p,"change",mxUtils.bind(this,function(){if("custom"==p.value){var v=new FilenameDialog(this,m,mxResources.get("ok"),function(x){null!=x?m=x:p.value="blank"},mxResources.get("url"),null,null,null,
null,function(){p.value="blank"});this.showDialog(v.container,300,80,!0,!1);v.init()}}));mxEvent.addListener(g,"change",mxUtils.bind(this,function(){g.checked&&(null==e||e.checked)?p.removeAttribute("disabled"):p.setAttribute("disabled","disabled")}));mxUtils.br(c);return{getLink:function(){return g.checked?"blank"===p.value?"_blank":m:null},getEditInput:function(){return g},getEditSelect:function(){return p}}};EditorUi.prototype.addLinkSection=function(c,e){function g(){var x=document.createElement("div");
x.style.width="100%";x.style.height="100%";x.style.boxSizing="border-box";null!=p&&p!=mxConstants.NONE?(x.style.border="1px solid black",x.style.backgroundColor=p):(x.style.backgroundPosition="center center",x.style.backgroundRepeat="no-repeat",x.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");v.innerText="";v.appendChild(x)}mxUtils.write(c,mxResources.get("links")+":");var k=document.createElement("select");k.style.width="100px";k.style.padding="0px";k.style.marginLeft="8px";k.style.marginRight=
"10px";k.className="geBtn";var m=document.createElement("option");m.setAttribute("value","auto");mxUtils.write(m,mxResources.get("automatic"));k.appendChild(m);m=document.createElement("option");m.setAttribute("value","blank");mxUtils.write(m,mxResources.get("openInNewWindow"));k.appendChild(m);m=document.createElement("option");m.setAttribute("value","self");mxUtils.write(m,mxResources.get("openInThisWindow"));k.appendChild(m);e&&(e=document.createElement("option"),e.setAttribute("value","frame"),
-mxUtils.write(e,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),k.appendChild(e));c.appendChild(k);mxUtils.write(c,mxResources.get("borderColor")+":");var p="#0000ff",v=null;v=mxUtils.button("",mxUtils.bind(this,function(x){this.pickColor(p||"none",function(z){p=z;g()});mxEvent.consume(x)}));g();v.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";v.style.marginLeft="4px";v.style.height="22px";v.style.width="22px";v.style.position="relative";v.style.top=mxClient.IS_IE||mxClient.IS_IE11||
+mxUtils.write(e,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),k.appendChild(e));c.appendChild(k);mxUtils.write(c,mxResources.get("borderColor")+":");var p="#0000ff",v=null;v=mxUtils.button("",mxUtils.bind(this,function(x){this.pickColor(p||"none",function(A){p=A;g()});mxEvent.consume(x)}));g();v.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";v.style.marginLeft="4px";v.style.height="22px";v.style.width="22px";v.style.position="relative";v.style.top=mxClient.IS_IE||mxClient.IS_IE11||
mxClient.IS_EDGE?"6px":"1px";v.className="geColorBtn";c.appendChild(v);mxUtils.br(c);return{getColor:function(){return p},getTarget:function(){return k.value},focus:function(){k.focus()}}};EditorUi.prototype.createUrlParameters=function(c,e,g,k,m,p,v){v=null!=v?v:[];k&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||v.push("lightbox=1"),"auto"!=c&&v.push("target="+c),null!=e&&e!=mxConstants.NONE&&v.push("highlight="+("#"==e.charAt(0)?e.substring(1):e)),null!=m&&0<m.length&&
-v.push("edit="+encodeURIComponent(m)),p&&v.push("layers=1"),this.editor.graph.foldingEnabled&&v.push("nav=1"));g&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&v.push("page-id="+this.currentPage.getId());return v};EditorUi.prototype.createLink=function(c,e,g,k,m,p,v,x,z,y){z=this.createUrlParameters(c,e,g,k,m,p,z);c=this.getCurrentFile();e=!0;null!=v?g="#U"+encodeURIComponent(v):(c=this.getCurrentFile(),x||null==c||c.constructor!=window.DriveFile?g="#R"+encodeURIComponent(g?
-this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(g="#"+c.getHash(),e=!1));e&&null!=c&&null!=c.getTitle()&&c.getTitle()!=this.defaultFilename&&z.push("title="+encodeURIComponent(c.getTitle()));y&&1<g.length&&(z.push("open="+g.substring(1)),g="");return(k&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+
-"/"+(0<z.length?"?"+z.join("&"):"")+g};EditorUi.prototype.createHtml=function(c,e,g,k,m,p,v,x,z,y,L,N){this.getBasenames();var J={};""!=m&&m!=mxConstants.NONE&&(J.highlight=m);"auto"!==k&&(J.target=k);y||(J.lightbox=!1);J.nav=this.editor.graph.foldingEnabled;g=parseInt(g);isNaN(g)||100==g||(J.zoom=g/100);g=[];v&&(g.push("pages"),J.resize=!0,null!=this.pages&&null!=this.currentPage&&(J.page=mxUtils.indexOf(this.pages,this.currentPage)));e&&(g.push("zoom"),J.resize=!0);x&&g.push("layers");z&&g.push("tags");
-0<g.length&&(y&&g.push("lightbox"),J.toolbar=g.join(" "));null!=L&&0<L.length&&(J.edit=L);null!=c?J.url=c:J.xml=this.getFileData(!0,null,null,null,null,!v);e='<div class="mxgraph" style="'+(p?"max-width:100%;":"")+(""!=g?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(J))+'"></div>';c=null!=c?"&fetch="+encodeURIComponent(c):"";N(e,'<script type="text/javascript" src="'+(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+
+v.push("edit="+encodeURIComponent(m)),p&&v.push("layers=1"),this.editor.graph.foldingEnabled&&v.push("nav=1"));g&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&v.push("page-id="+this.currentPage.getId());return v};EditorUi.prototype.createLink=function(c,e,g,k,m,p,v,x,A,y){A=this.createUrlParameters(c,e,g,k,m,p,A);c=this.getCurrentFile();e=!0;null!=v?g="#U"+encodeURIComponent(v):(c=this.getCurrentFile(),x||null==c||c.constructor!=window.DriveFile?g="#R"+encodeURIComponent(g?
+this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(g="#"+c.getHash(),e=!1));e&&null!=c&&null!=c.getTitle()&&c.getTitle()!=this.defaultFilename&&A.push("title="+encodeURIComponent(c.getTitle()));y&&1<g.length&&(A.push("open="+g.substring(1)),g="");return(k&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+
+"/"+(0<A.length?"?"+A.join("&"):"")+g};EditorUi.prototype.createHtml=function(c,e,g,k,m,p,v,x,A,y,L,N){this.getBasenames();var I={};""!=m&&m!=mxConstants.NONE&&(I.highlight=m);"auto"!==k&&(I.target=k);y||(I.lightbox=!1);I.nav=this.editor.graph.foldingEnabled;g=parseInt(g);isNaN(g)||100==g||(I.zoom=g/100);g=[];v&&(g.push("pages"),I.resize=!0,null!=this.pages&&null!=this.currentPage&&(I.page=mxUtils.indexOf(this.pages,this.currentPage)));e&&(g.push("zoom"),I.resize=!0);x&&g.push("layers");A&&g.push("tags");
+0<g.length&&(y&&g.push("lightbox"),I.toolbar=g.join(" "));null!=L&&0<L.length&&(I.edit=L);null!=c?I.url=c:I.xml=this.getFileData(!0,null,null,null,null,!v);e='<div class="mxgraph" style="'+(p?"max-width:100%;":"")+(""!=g?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(I))+'"></div>';c=null!=c?"&fetch="+encodeURIComponent(c):"";N(e,'<script type="text/javascript" src="'+(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+
"/embed2.js?")+c:"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(c,e,g,k){var m=document.createElement("div");m.style.whiteSpace="nowrap";var p=document.createElement("h3");mxUtils.write(p,mxResources.get("html"));p.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";m.appendChild(p);var v=document.createElement("div");
-v.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var x=document.createElement("input");x.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";x.setAttribute("value","url");x.setAttribute("type","radio");x.setAttribute("name","type-embedhtmldialog");p=x.cloneNode(!0);p.setAttribute("value","copy");v.appendChild(p);var z=document.createElement("span");mxUtils.write(z,mxResources.get("includeCopyOfMyDiagram"));v.appendChild(z);mxUtils.br(v);v.appendChild(x);
-z=document.createElement("span");mxUtils.write(z,mxResources.get("publicDiagramUrl"));v.appendChild(z);var y=this.getCurrentFile();null==g&&null!=y&&y.constructor==window.DriveFile&&(z=document.createElement("a"),z.style.paddingLeft="12px",z.style.color="gray",z.style.cursor="pointer",mxUtils.write(z,mxResources.get("share")),v.appendChild(z),mxEvent.addListener(z,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(y.getId())})));p.setAttribute("checked","checked");null==
-g&&x.setAttribute("disabled","disabled");m.appendChild(v);var L=this.addLinkSection(m),N=this.addCheckbox(m,mxResources.get("zoom"),!0,null,!0);mxUtils.write(m,":");var J=document.createElement("input");J.setAttribute("type","text");J.style.marginRight="16px";J.style.width="60px";J.style.marginLeft="4px";J.style.marginRight="12px";J.value="100%";m.appendChild(J);var q=this.addCheckbox(m,mxResources.get("fit"),!0);v=null!=this.pages&&1<this.pages.length;var D=D=this.addCheckbox(m,mxResources.get("allPages"),
-v,!v),A=this.addCheckbox(m,mxResources.get("layers"),!0),C=this.addCheckbox(m,mxResources.get("tags"),!0),G=this.addCheckbox(m,mxResources.get("lightbox"),!0),M=null;v=380;if(EditorUi.enableHtmlEditOption){M=this.addEditButton(m,G);var H=M.getEditInput();H.style.marginBottom="16px";v+=50;mxEvent.addListener(G,"change",function(){G.checked?H.removeAttribute("disabled"):H.setAttribute("disabled","disabled");H.checked&&G.checked?M.getEditSelect().removeAttribute("disabled"):M.getEditSelect().setAttribute("disabled",
-"disabled")})}c=new CustomDialog(this,m,mxUtils.bind(this,function(){k(x.checked?g:null,N.checked,J.value,L.getTarget(),L.getColor(),q.checked,D.checked,A.checked,C.checked,G.checked,null!=M?M.getLink():null)}),null,c,e);this.showDialog(c.container,340,v,!0,!0);p.focus()};EditorUi.prototype.showPublishLinkDialog=function(c,e,g,k,m,p,v,x){var z=document.createElement("div");z.style.whiteSpace="nowrap";var y=document.createElement("h3");mxUtils.write(y,c||mxResources.get("link"));y.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";
-z.appendChild(y);var L=this.getCurrentFile();c=0;if(null==L||L.constructor!=window.DriveFile||e)v=null!=v?v:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{c=80;v=null!=v?v:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";y=document.createElement("div");y.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"));
-y.appendChild(N);N=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(L.getId())}));N.style.marginTop="12px";N.className="geBtn";y.appendChild(N);z.appendChild(y);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"));y.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(I){this.spinner.stop();I=new ErrorDialog(this,null,mxResources.get(null!=I?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(I.container,300,80,!0,!1);I.init()}))}))}var J=null,q=null;if(null!=g||null!=k)c+=30,mxUtils.write(z,mxResources.get("width")+":"),J=document.createElement("input"),J.setAttribute("type","text"),J.style.marginRight="16px",J.style.width="50px",J.style.marginLeft="6px",J.style.marginRight=
-"16px",J.style.marginBottom="10px",J.value="100%",z.appendChild(J),mxUtils.write(z,mxResources.get("height")+":"),q=document.createElement("input"),q.setAttribute("type","text"),q.style.width="50px",q.style.marginLeft="6px",q.style.marginBottom="10px",q.value=k+"px",z.appendChild(q),mxUtils.br(z);var D=this.addLinkSection(z,p);g=null!=this.pages&&1<this.pages.length;var A=null;if(null==L||L.constructor!=window.DriveFile||e)A=this.addCheckbox(z,mxResources.get("allPages"),g,!g);var C=this.addCheckbox(z,
-mxResources.get("lightbox"),!0,null,null,!p),G=this.addEditButton(z,C),M=G.getEditInput();p&&(M.style.marginLeft=C.style.marginLeft,C.style.display="none",c-=20);var H=this.addCheckbox(z,mxResources.get("layers"),!0);H.style.marginLeft=M.style.marginLeft;H.style.marginTop="8px";var F=this.addCheckbox(z,mxResources.get("tags"),!0);F.style.marginLeft=M.style.marginLeft;F.style.marginBottom="16px";F.style.marginTop="16px";mxEvent.addListener(C,"change",function(){C.checked?(H.removeAttribute("disabled"),
-M.removeAttribute("disabled")):(H.setAttribute("disabled","disabled"),M.setAttribute("disabled","disabled"));M.checked&&C.checked?G.getEditSelect().removeAttribute("disabled"):G.getEditSelect().setAttribute("disabled","disabled")});e=new CustomDialog(this,z,mxUtils.bind(this,function(){m(D.getTarget(),D.getColor(),null==A?!0:A.checked,C.checked,G.getLink(),H.checked,null!=J?J.value:null,null!=q?q.value:null,F.checked)}),null,mxResources.get("create"),v,x);this.showDialog(e.container,340,300+c,!0,
-!0);null!=J?(J.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?J.select():document.execCommand("selectAll",!1,null)):D.focus()};EditorUi.prototype.showRemoteExportDialog=function(c,e,g,k,m){var p=document.createElement("div");p.style.whiteSpace="nowrap";var v=document.createElement("h3");mxUtils.write(v,mxResources.get("image"));v.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(m?"10":"4")+"px";p.appendChild(v);if(m){mxUtils.write(p,mxResources.get("zoom")+
-":");var x=document.createElement("input");x.setAttribute("type","text");x.style.marginRight="16px";x.style.width="60px";x.style.marginLeft="4px";x.style.marginRight="12px";x.value=this.lastExportZoom||"100%";p.appendChild(x);mxUtils.write(p,mxResources.get("borderWidth")+":");var z=document.createElement("input");z.setAttribute("type","text");z.style.marginRight="16px";z.style.width="60px";z.style.marginLeft="4px";z.value=this.lastExportBorder||"0";p.appendChild(z);mxUtils.br(p)}var y=this.addCheckbox(p,
-mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),L=k?null:this.addCheckbox(p,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);v=this.editor.graph;var N=k?null:this.addCheckbox(p,mxResources.get("transparentBackground"),v.background==mxConstants.NONE||null==v.background);null!=N&&(N.style.marginBottom="16px");c=new CustomDialog(this,p,mxUtils.bind(this,function(){var J=parseInt(x.value)/100||1,q=parseInt(z.value)||0;g(!y.checked,null!=L?L.checked:!1,
-null!=N?N.checked:!1,J,q)}),null,c,e);this.showDialog(c.container,300,(m?25:0)+(k?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,e,g,k,m,p,v,x,z){v=null!=v?v:Editor.defaultIncludeDiagram;var y=document.createElement("div");y.style.whiteSpace="nowrap";var L=this.editor.graph,N="jpeg"==x?220:300,J=document.createElement("h3");mxUtils.write(J,c);J.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";y.appendChild(J);mxUtils.write(y,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%";y.appendChild(q);mxUtils.write(y,mxResources.get("borderWidth")+":");var D=document.createElement("input");D.setAttribute("type","text");D.style.marginRight="16px";D.style.width="60px";D.style.marginLeft="4px";D.value=this.lastExportBorder||"0";y.appendChild(D);mxUtils.br(y);var A=this.addCheckbox(y,
-mxResources.get("selectionOnly"),!1,L.isSelectionEmpty()),C=document.createElement("input");C.style.marginTop="16px";C.style.marginRight="8px";C.style.marginLeft="24px";C.setAttribute("disabled","disabled");C.setAttribute("type","checkbox");var G=document.createElement("select");G.style.marginTop="16px";G.style.marginLeft="8px";c=["selectionOnly","diagram","page"];var M={};for(J=0;J<c.length;J++)if(!L.isSelectionEmpty()||"selectionOnly"!=c[J]){var H=document.createElement("option");mxUtils.write(H,
-mxResources.get(c[J]));H.setAttribute("value",c[J]);G.appendChild(H);M[c[J]]=H}z?(mxUtils.write(y,mxResources.get("size")+":"),y.appendChild(G),mxUtils.br(y),N+=26,mxEvent.addListener(G,"change",function(){"selectionOnly"==G.value&&(A.checked=!0)})):p&&(y.appendChild(C),mxUtils.write(y,mxResources.get("crop")),mxUtils.br(y),N+=30,mxEvent.addListener(A,"change",function(){A.checked?C.removeAttribute("disabled"):C.setAttribute("disabled","disabled")}));L.isSelectionEmpty()?z&&(A.style.display="none",
-A.nextSibling.style.display="none",A.nextSibling.nextSibling.style.display="none",N-=30):(G.value="diagram",C.setAttribute("checked","checked"),C.defaultChecked=!0,mxEvent.addListener(A,"change",function(){G.value=A.checked?"selectionOnly":"diagram"}));var F=this.addCheckbox(y,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=x),I=null;Editor.isDarkMode()&&(I=this.addCheckbox(y,mxResources.get("dark"),!0),N+=26);var R=this.addCheckbox(y,mxResources.get("shadow"),L.shadowVisible),X=null;
-if("png"==x||"jpeg"==x)X=this.addCheckbox(y,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),N+=30;var O=this.addCheckbox(y,mxResources.get("includeCopyOfMyDiagram"),v,null,null,"jpeg"!=x);O.style.marginBottom="16px";var W=document.createElement("input");W.style.marginBottom="16px";W.style.marginRight="8px";W.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||W.setAttribute("disabled","disabled");var U=document.createElement("select");U.style.maxWidth=
-"260px";U.style.marginLeft="8px";U.style.marginRight="10px";U.style.marginBottom="16px";U.className="geBtn";p=document.createElement("option");p.setAttribute("value","none");mxUtils.write(p,mxResources.get("noChange"));U.appendChild(p);p=document.createElement("option");p.setAttribute("value","embedFonts");mxUtils.write(p,mxResources.get("embedFonts"));U.appendChild(p);p=document.createElement("option");p.setAttribute("value","lblToSvg");mxUtils.write(p,mxResources.get("lblToSvg"));this.isOffline()||
-EditorUi.isElectronApp||U.appendChild(p);mxEvent.addListener(U,"change",mxUtils.bind(this,function(){"lblToSvg"==U.value?(W.checked=!0,W.setAttribute("disabled","disabled"),M.page.style.display="none","page"==G.value&&(G.value="diagram"),R.checked=!1,R.setAttribute("disabled","disabled"),B.style.display="inline-block",n.style.display="none"):"disabled"==W.getAttribute("disabled")&&(W.checked=!1,W.removeAttribute("disabled"),R.removeAttribute("disabled"),M.page.style.display="",B.style.display="none",
-n.style.display="")}));e&&(y.appendChild(W),mxUtils.write(y,mxResources.get("embedImages")),mxUtils.br(y),mxUtils.write(y,mxResources.get("txtSettings")+":"),y.appendChild(U),mxUtils.br(y),N+=60);var n=document.createElement("select");n.style.maxWidth="260px";n.style.marginLeft="8px";n.style.marginRight="10px";n.className="geBtn";e=document.createElement("option");e.setAttribute("value","auto");mxUtils.write(e,mxResources.get("automatic"));n.appendChild(e);e=document.createElement("option");e.setAttribute("value",
+v.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var x=document.createElement("input");x.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";x.setAttribute("value","url");x.setAttribute("type","radio");x.setAttribute("name","type-embedhtmldialog");p=x.cloneNode(!0);p.setAttribute("value","copy");v.appendChild(p);var A=document.createElement("span");mxUtils.write(A,mxResources.get("includeCopyOfMyDiagram"));v.appendChild(A);mxUtils.br(v);v.appendChild(x);
+A=document.createElement("span");mxUtils.write(A,mxResources.get("publicDiagramUrl"));v.appendChild(A);var y=this.getCurrentFile();null==g&&null!=y&&y.constructor==window.DriveFile&&(A=document.createElement("a"),A.style.paddingLeft="12px",A.style.color="gray",A.style.cursor="pointer",mxUtils.write(A,mxResources.get("share")),v.appendChild(A),mxEvent.addListener(A,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(y.getId())})));p.setAttribute("checked","checked");null==
+g&&x.setAttribute("disabled","disabled");m.appendChild(v);var L=this.addLinkSection(m),N=this.addCheckbox(m,mxResources.get("zoom"),!0,null,!0);mxUtils.write(m,":");var I=document.createElement("input");I.setAttribute("type","text");I.style.marginRight="16px";I.style.width="60px";I.style.marginLeft="4px";I.style.marginRight="12px";I.value="100%";m.appendChild(I);var q=this.addCheckbox(m,mxResources.get("fit"),!0);v=null!=this.pages&&1<this.pages.length;var D=D=this.addCheckbox(m,mxResources.get("allPages"),
+v,!v),z=this.addCheckbox(m,mxResources.get("layers"),!0),C=this.addCheckbox(m,mxResources.get("tags"),!0),G=this.addCheckbox(m,mxResources.get("lightbox"),!0),H=null;v=380;if(EditorUi.enableHtmlEditOption){H=this.addEditButton(m,G);var M=H.getEditInput();M.style.marginBottom="16px";v+=50;mxEvent.addListener(G,"change",function(){G.checked?M.removeAttribute("disabled"):M.setAttribute("disabled","disabled");M.checked&&G.checked?H.getEditSelect().removeAttribute("disabled"):H.getEditSelect().setAttribute("disabled",
+"disabled")})}c=new CustomDialog(this,m,mxUtils.bind(this,function(){k(x.checked?g:null,N.checked,I.value,L.getTarget(),L.getColor(),q.checked,D.checked,z.checked,C.checked,G.checked,null!=H?H.getLink():null)}),null,c,e);this.showDialog(c.container,340,v,!0,!0);p.focus()};EditorUi.prototype.showPublishLinkDialog=function(c,e,g,k,m,p,v,x){var A=document.createElement("div");A.style.whiteSpace="nowrap";var y=document.createElement("h3");mxUtils.write(y,c||mxResources.get("link"));y.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";
+A.appendChild(y);var L=this.getCurrentFile();c=0;if(null==L||L.constructor!=window.DriveFile||e)v=null!=v?v:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{c=80;v=null!=v?v:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";y=document.createElement("div");y.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"));
+y.appendChild(N);N=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(L.getId())}));N.style.marginTop="12px";N.className="geBtn";y.appendChild(N);A.appendChild(y);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"));y.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(J){this.spinner.stop();J=new ErrorDialog(this,null,mxResources.get(null!=J?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(J.container,300,80,!0,!1);J.init()}))}))}var I=null,q=null;if(null!=g||null!=k)c+=30,mxUtils.write(A,mxResources.get("width")+":"),I=document.createElement("input"),I.setAttribute("type","text"),I.style.marginRight="16px",I.style.width="50px",I.style.marginLeft="6px",I.style.marginRight=
+"16px",I.style.marginBottom="10px",I.value="100%",A.appendChild(I),mxUtils.write(A,mxResources.get("height")+":"),q=document.createElement("input"),q.setAttribute("type","text"),q.style.width="50px",q.style.marginLeft="6px",q.style.marginBottom="10px",q.value=k+"px",A.appendChild(q),mxUtils.br(A);var D=this.addLinkSection(A,p);g=null!=this.pages&&1<this.pages.length;var z=null;if(null==L||L.constructor!=window.DriveFile||e)z=this.addCheckbox(A,mxResources.get("allPages"),g,!g);var C=this.addCheckbox(A,
+mxResources.get("lightbox"),!0,null,null,!p),G=this.addEditButton(A,C),H=G.getEditInput();p&&(H.style.marginLeft=C.style.marginLeft,C.style.display="none",c-=20);var M=this.addCheckbox(A,mxResources.get("layers"),!0);M.style.marginLeft=H.style.marginLeft;M.style.marginTop="8px";var F=this.addCheckbox(A,mxResources.get("tags"),!0);F.style.marginLeft=H.style.marginLeft;F.style.marginBottom="16px";F.style.marginTop="16px";mxEvent.addListener(C,"change",function(){C.checked?(M.removeAttribute("disabled"),
+H.removeAttribute("disabled")):(M.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"));H.checked&&C.checked?G.getEditSelect().removeAttribute("disabled"):G.getEditSelect().setAttribute("disabled","disabled")});e=new CustomDialog(this,A,mxUtils.bind(this,function(){m(D.getTarget(),D.getColor(),null==z?!0:z.checked,C.checked,G.getLink(),M.checked,null!=I?I.value:null,null!=q?q.value:null,F.checked)}),null,mxResources.get("create"),v,x);this.showDialog(e.container,340,300+c,!0,
+!0);null!=I?(I.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?I.select():document.execCommand("selectAll",!1,null)):D.focus()};EditorUi.prototype.showRemoteExportDialog=function(c,e,g,k,m){var p=document.createElement("div");p.style.whiteSpace="nowrap";var v=document.createElement("h3");mxUtils.write(v,mxResources.get("image"));v.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(m?"10":"4")+"px";p.appendChild(v);if(m){mxUtils.write(p,mxResources.get("zoom")+
+":");var x=document.createElement("input");x.setAttribute("type","text");x.style.marginRight="16px";x.style.width="60px";x.style.marginLeft="4px";x.style.marginRight="12px";x.value=this.lastExportZoom||"100%";p.appendChild(x);mxUtils.write(p,mxResources.get("borderWidth")+":");var A=document.createElement("input");A.setAttribute("type","text");A.style.marginRight="16px";A.style.width="60px";A.style.marginLeft="4px";A.value=this.lastExportBorder||"0";p.appendChild(A);mxUtils.br(p)}var y=this.addCheckbox(p,
+mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),L=k?null:this.addCheckbox(p,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);v=this.editor.graph;var N=k?null:this.addCheckbox(p,mxResources.get("transparentBackground"),v.background==mxConstants.NONE||null==v.background);null!=N&&(N.style.marginBottom="16px");c=new CustomDialog(this,p,mxUtils.bind(this,function(){var I=parseInt(x.value)/100||1,q=parseInt(A.value)||0;g(!y.checked,null!=L?L.checked:!1,
+null!=N?N.checked:!1,I,q)}),null,c,e);this.showDialog(c.container,300,(m?25:0)+(k?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,e,g,k,m,p,v,x,A){v=null!=v?v:Editor.defaultIncludeDiagram;var y=document.createElement("div");y.style.whiteSpace="nowrap";var L=this.editor.graph,N="jpeg"==x?220:300,I=document.createElement("h3");mxUtils.write(I,c);I.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";y.appendChild(I);mxUtils.write(y,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%";y.appendChild(q);mxUtils.write(y,mxResources.get("borderWidth")+":");var D=document.createElement("input");D.setAttribute("type","text");D.style.marginRight="16px";D.style.width="60px";D.style.marginLeft="4px";D.value=this.lastExportBorder||"0";y.appendChild(D);mxUtils.br(y);var z=this.addCheckbox(y,
+mxResources.get("selectionOnly"),!1,L.isSelectionEmpty()),C=document.createElement("input");C.style.marginTop="16px";C.style.marginRight="8px";C.style.marginLeft="24px";C.setAttribute("disabled","disabled");C.setAttribute("type","checkbox");var G=document.createElement("select");G.style.marginTop="16px";G.style.marginLeft="8px";c=["selectionOnly","diagram","page"];var H={};for(I=0;I<c.length;I++)if(!L.isSelectionEmpty()||"selectionOnly"!=c[I]){var M=document.createElement("option");mxUtils.write(M,
+mxResources.get(c[I]));M.setAttribute("value",c[I]);G.appendChild(M);H[c[I]]=M}A?(mxUtils.write(y,mxResources.get("size")+":"),y.appendChild(G),mxUtils.br(y),N+=26,mxEvent.addListener(G,"change",function(){"selectionOnly"==G.value&&(z.checked=!0)})):p&&(y.appendChild(C),mxUtils.write(y,mxResources.get("crop")),mxUtils.br(y),N+=30,mxEvent.addListener(z,"change",function(){z.checked?C.removeAttribute("disabled"):C.setAttribute("disabled","disabled")}));L.isSelectionEmpty()?A&&(z.style.display="none",
+z.nextSibling.style.display="none",z.nextSibling.nextSibling.style.display="none",N-=30):(G.value="diagram",C.setAttribute("checked","checked"),C.defaultChecked=!0,mxEvent.addListener(z,"change",function(){G.value=z.checked?"selectionOnly":"diagram"}));var F=this.addCheckbox(y,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=x),J=null;Editor.isDarkMode()&&(J=this.addCheckbox(y,mxResources.get("dark"),!0),N+=26);var Q=this.addCheckbox(y,mxResources.get("shadow"),L.shadowVisible),X=null;
+if("png"==x||"jpeg"==x)X=this.addCheckbox(y,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),N+=30;var P=this.addCheckbox(y,mxResources.get("includeCopyOfMyDiagram"),v,null,null,"jpeg"!=x);P.style.marginBottom="16px";var V=document.createElement("input");V.style.marginBottom="16px";V.style.marginRight="8px";V.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||V.setAttribute("disabled","disabled");var W=document.createElement("select");W.style.maxWidth=
+"260px";W.style.marginLeft="8px";W.style.marginRight="10px";W.style.marginBottom="16px";W.className="geBtn";p=document.createElement("option");p.setAttribute("value","none");mxUtils.write(p,mxResources.get("noChange"));W.appendChild(p);p=document.createElement("option");p.setAttribute("value","embedFonts");mxUtils.write(p,mxResources.get("embedFonts"));W.appendChild(p);p=document.createElement("option");p.setAttribute("value","lblToSvg");mxUtils.write(p,mxResources.get("lblToSvg"));this.isOffline()||
+EditorUi.isElectronApp||W.appendChild(p);mxEvent.addListener(W,"change",mxUtils.bind(this,function(){"lblToSvg"==W.value?(V.checked=!0,V.setAttribute("disabled","disabled"),H.page.style.display="none","page"==G.value&&(G.value="diagram"),Q.checked=!1,Q.setAttribute("disabled","disabled"),B.style.display="inline-block",n.style.display="none"):"disabled"==V.getAttribute("disabled")&&(V.checked=!1,V.removeAttribute("disabled"),Q.removeAttribute("disabled"),H.page.style.display="",B.style.display="none",
+n.style.display="")}));e&&(y.appendChild(V),mxUtils.write(y,mxResources.get("embedImages")),mxUtils.br(y),mxUtils.write(y,mxResources.get("txtSettings")+":"),y.appendChild(W),mxUtils.br(y),N+=60);var n=document.createElement("select");n.style.maxWidth="260px";n.style.marginLeft="8px";n.style.marginRight="10px";n.className="geBtn";e=document.createElement("option");e.setAttribute("value","auto");mxUtils.write(e,mxResources.get("automatic"));n.appendChild(e);e=document.createElement("option");e.setAttribute("value",
"blank");mxUtils.write(e,mxResources.get("openInNewWindow"));n.appendChild(e);e=document.createElement("option");e.setAttribute("value","self");mxUtils.write(e,mxResources.get("openInThisWindow"));n.appendChild(e);var B=document.createElement("div");mxUtils.write(B,mxResources.get("LinksLost"));B.style.margin="7px";B.style.display="none";"svg"==x&&(mxUtils.write(y,mxResources.get("links")+":"),y.appendChild(n),y.appendChild(B),mxUtils.br(y),mxUtils.br(y),N+=50);g=new CustomDialog(this,y,mxUtils.bind(this,
-function(){this.lastExportBorder=D.value;this.lastExportZoom=q.value;m(q.value,F.checked,!A.checked,R.checked,O.checked,W.checked,D.value,C.checked,!1,n.value,null!=X?X.checked:null,null!=I?I.checked:null,G.value,"embedFonts"==U.value,"lblToSvg"==U.value)}),null,g,k);this.showDialog(g.container,340,N,!0,!0,null,null,null,null,!0);q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,
-e,g,k,m){var p=document.createElement("div");p.style.whiteSpace="nowrap";var v=this.editor.graph;if(null!=e){var x=document.createElement("h3");mxUtils.write(x,e);x.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";p.appendChild(x)}var z=this.addCheckbox(p,mxResources.get("fit"),!0),y=this.addCheckbox(p,mxResources.get("shadow"),v.shadowVisible&&k,!k),L=this.addCheckbox(p,g),N=this.addCheckbox(p,mxResources.get("lightbox"),!0),J=this.addEditButton(p,N),q=J.getEditInput(),
-D=1<v.model.getChildCount(v.model.getRoot()),A=this.addCheckbox(p,mxResources.get("layers"),D,!D);A.style.marginLeft=q.style.marginLeft;A.style.marginBottom="12px";A.style.marginTop="8px";mxEvent.addListener(N,"change",function(){N.checked?(D&&A.removeAttribute("disabled"),q.removeAttribute("disabled")):(A.setAttribute("disabled","disabled"),q.setAttribute("disabled","disabled"));q.checked&&N.checked?J.getEditSelect().removeAttribute("disabled"):J.getEditSelect().setAttribute("disabled","disabled")});
-e=new CustomDialog(this,p,mxUtils.bind(this,function(){c(z.checked,y.checked,L.checked,N.checked,J.getLink(),A.checked)}),null,mxResources.get("embed"),m);this.showDialog(e.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(c,e,g,k,m,p,v,x){function z(q){var D=" ",A="";k&&(D=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(null!=L?"&page="+L:"")+(m?"&edit=_blank":"")+(p?"&layers=1":"")+"');}})(this);\"",A+="cursor:pointer;");c&&(A+="max-width:100%;");var C="";g&&(C=' width="'+Math.round(y.width)+'" height="'+Math.round(y.height)+'"');v('<img src="'+q+'"'+C+(""!=A?' style="'+A+'"':"")+D+"/>")}var y=this.editor.graph.getGraphBounds(),L=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(q){var D=k?this.getFileData(!0):null;q=
-this.createImageDataUri(q,D,"png");z(q)}),null,null,null,mxUtils.bind(this,function(q){x({message:mxResources.get("unknownError")})}),null,!0,g?2:1,null,e,null,null,Editor.defaultBorder);else if(e=this.getFileData(!0),y.width*y.height<=MAX_AREA&&e.length<=MAX_REQUEST_SIZE){var N="";g&&(N="&w="+Math.round(2*y.width)+"&h="+Math.round(2*y.height));var J=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(k?"1":"0")+N+"&xml="+encodeURIComponent(e));J.send(mxUtils.bind(this,function(){200<=J.getStatus()&&
-299>=J.getStatus()?z("data:image/png;base64,"+J.getText()):x({message:mxResources.get("unknownError")})}))}else x({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(c,e,g,k,m,p,v){var x=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!g),z=x.getElementsByTagName("a");if(null!=z)for(var y=0;y<z.length;y++){var L=z[y].getAttribute("href");null!=L&&"#"==L.charAt(0)&&"_blank"==z[y].getAttribute("target")&&z[y].removeAttribute("target")}k&&
-x.setAttribute("content",this.getFileData(!0));e&&this.editor.graph.addSvgShadow(x);if(g){var N=" ",J="";k&&(N="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(m?"&edit=_blank":"")+(p?"&layers=1":
-"")+"');}})(this);\"",J+="cursor:pointer;");c&&(J+="max-width:100%;");this.editor.convertImages(x,mxUtils.bind(this,function(q){v('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(q))+'"'+(""!=J?' style="'+J+'"':"")+N+"/>")}))}else J="",k&&(e=this.getSelectedPageIndex(),x.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!=e?"&page="+e:"")+(m?"&edit=_blank":"")+(p?"&layers=1":"")+"');}}})(this);"),J+="cursor:pointer;"),c&&(c=parseInt(x.getAttribute("width")),m=parseInt(x.getAttribute("height")),x.setAttribute("viewBox","-0.5 -0.5 "+c+" "+m),J+="max-width:100%;max-height:"+m+"px;",x.removeAttribute("height")),""!=J&&x.setAttribute("style",J),this.editor.addFontCss(x),this.editor.graph.mathEnabled&&this.editor.addMathCss(x),v(mxUtils.getXml(x))};EditorUi.prototype.timeSince=function(c){c=
+function(){this.lastExportBorder=D.value;this.lastExportZoom=q.value;m(q.value,F.checked,!z.checked,Q.checked,P.checked,V.checked,D.value,C.checked,!1,n.value,null!=X?X.checked:null,null!=J?J.checked:null,G.value,"embedFonts"==W.value,"lblToSvg"==W.value)}),null,g,k);this.showDialog(g.container,340,N,!0,!0,null,null,null,null,!0);q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,
+e,g,k,m){var p=document.createElement("div");p.style.whiteSpace="nowrap";var v=this.editor.graph;if(null!=e){var x=document.createElement("h3");mxUtils.write(x,e);x.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";p.appendChild(x)}var A=this.addCheckbox(p,mxResources.get("fit"),!0),y=this.addCheckbox(p,mxResources.get("shadow"),v.shadowVisible&&k,!k),L=this.addCheckbox(p,g),N=this.addCheckbox(p,mxResources.get("lightbox"),!0),I=this.addEditButton(p,N),q=I.getEditInput(),
+D=1<v.model.getChildCount(v.model.getRoot()),z=this.addCheckbox(p,mxResources.get("layers"),D,!D);z.style.marginLeft=q.style.marginLeft;z.style.marginBottom="12px";z.style.marginTop="8px";mxEvent.addListener(N,"change",function(){N.checked?(D&&z.removeAttribute("disabled"),q.removeAttribute("disabled")):(z.setAttribute("disabled","disabled"),q.setAttribute("disabled","disabled"));q.checked&&N.checked?I.getEditSelect().removeAttribute("disabled"):I.getEditSelect().setAttribute("disabled","disabled")});
+e=new CustomDialog(this,p,mxUtils.bind(this,function(){c(A.checked,y.checked,L.checked,N.checked,I.getLink(),z.checked)}),null,mxResources.get("embed"),m);this.showDialog(e.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(c,e,g,k,m,p,v,x){function A(q){var D=" ",z="";k&&(D=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(null!=L?"&page="+L:"")+(m?"&edit=_blank":"")+(p?"&layers=1":"")+"');}})(this);\"",z+="cursor:pointer;");c&&(z+="max-width:100%;");var C="";g&&(C=' width="'+Math.round(y.width)+'" height="'+Math.round(y.height)+'"');v('<img src="'+q+'"'+C+(""!=z?' style="'+z+'"':"")+D+"/>")}var y=this.editor.graph.getGraphBounds(),L=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(q){var D=k?this.getFileData(!0):null;q=
+this.createImageDataUri(q,D,"png");A(q)}),null,null,null,mxUtils.bind(this,function(q){x({message:mxResources.get("unknownError")})}),null,!0,g?2:1,null,e,null,null,Editor.defaultBorder);else if(e=this.getFileData(!0),y.width*y.height<=MAX_AREA&&e.length<=MAX_REQUEST_SIZE){var N="";g&&(N="&w="+Math.round(2*y.width)+"&h="+Math.round(2*y.height));var I=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(k?"1":"0")+N+"&xml="+encodeURIComponent(e));I.send(mxUtils.bind(this,function(){200<=I.getStatus()&&
+299>=I.getStatus()?A("data:image/png;base64,"+I.getText()):x({message:mxResources.get("unknownError")})}))}else x({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(c,e,g,k,m,p,v){var x=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!g),A=x.getElementsByTagName("a");if(null!=A)for(var y=0;y<A.length;y++){var L=A[y].getAttribute("href");null!=L&&"#"==L.charAt(0)&&"_blank"==A[y].getAttribute("target")&&A[y].removeAttribute("target")}k&&
+x.setAttribute("content",this.getFileData(!0));e&&this.editor.graph.addSvgShadow(x);if(g){var N=" ",I="";k&&(N="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(m?"&edit=_blank":"")+(p?"&layers=1":
+"")+"');}})(this);\"",I+="cursor:pointer;");c&&(I+="max-width:100%;");this.editor.convertImages(x,mxUtils.bind(this,function(q){v('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(q))+'"'+(""!=I?' style="'+I+'"':"")+N+"/>")}))}else I="",k&&(e=this.getSelectedPageIndex(),x.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!=e?"&page="+e:"")+(m?"&edit=_blank":"")+(p?"&layers=1":"")+"');}}})(this);"),I+="cursor:pointer;"),c&&(c=parseInt(x.getAttribute("width")),m=parseInt(x.getAttribute("height")),x.setAttribute("viewBox","-0.5 -0.5 "+c+" "+m),I+="max-width:100%;max-height:"+m+"px;",x.removeAttribute("height")),""!=I&&x.setAttribute("style",I),this.editor.addFontCss(x),this.editor.graph.mathEnabled&&this.editor.addMathCss(x),v(mxUtils.getXml(x))};EditorUi.prototype.timeSince=function(c){c=
Math.floor((new Date-c)/1E3);var e=Math.floor(c/31536E3);if(1<e)return e+" "+mxResources.get("years");e=Math.floor(c/2592E3);if(1<e)return e+" "+mxResources.get("months");e=Math.floor(c/86400);if(1<e)return e+" "+mxResources.get("days");e=Math.floor(c/3600);if(1<e)return e+" "+mxResources.get("hours");e=Math.floor(c/60);return 1<e?e+" "+mxResources.get("minutes"):1==e?e+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(c,e){if(null!=c){var g=null;if("diagram"==c.nodeName)g=
c;else if("mxfile"==c.nodeName){var k=c.getElementsByTagName("diagram");if(0<k.length){g=k[0];var m=e.getGlobalVariable;e.getGlobalVariable=function(p){return"page"==p?g.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==p?1:m.apply(this,arguments)}}}null!=g&&(c=Editor.parseDiagramNode(g))}k=this.editor.graph;try{this.editor.graph=e,this.editor.setGraphXml(c)}catch(p){}finally{this.editor.graph=k}return c};EditorUi.prototype.getPngFileProperties=function(c){var e=1,g=0;if(null!=
c){if(c.hasAttribute("scale")){var k=parseFloat(c.getAttribute("scale"));!isNaN(k)&&0<k&&(e=k)}c.hasAttribute("border")&&(k=parseInt(c.getAttribute("border")),!isNaN(k)&&0<k&&(g=k))}return{scale:e,border:g}};EditorUi.prototype.getEmbeddedPng=function(c,e,g,k,m){try{var p=this.editor.graph,v=null!=p.themes&&"darkTheme"==p.defaultThemeName,x=null;if(null!=g&&0<g.length)p=this.createTemporaryGraph(v?p.getDefaultStylesheet():p.getStylesheet()),document.body.appendChild(p.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(g).documentElement,
-!0),p),x=g;else if(v||null!=this.pages&&this.currentPage!=this.pages[0]){p=this.createTemporaryGraph(v?p.getDefaultStylesheet():p.getStylesheet());var z=p.getGlobalVariable;p.setBackgroundImage=this.editor.graph.setBackgroundImage;var y=this.pages[0];this.currentPage==y?p.setBackgroundImage(this.editor.graph.backgroundImage):null!=y.viewState&&null!=y.viewState&&p.setBackgroundImage(y.viewState.backgroundImage);p.getGlobalVariable=function(L){return"page"==L?y.getName():"pagenumber"==L?1:z.apply(this,
-arguments)};document.body.appendChild(p.container);p.model.setRoot(y.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(L){try{null==x&&(x=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var N=L.toDataURL("image/png");N=Editor.writeGraphModelToPng(N,"tEXt","mxfile",encodeURIComponent(x));c(N.substring(N.lastIndexOf(",")+1));p!=this.editor.graph&&p.container.parentNode.removeChild(p.container)}catch(J){null!=e&&e(J)}}),null,null,null,mxUtils.bind(this,function(L){null!=e&&
-e(L)}),null,null,k,null,p.shadowVisible,null,p,m,null,null,null,"diagram",null)}catch(L){null!=e&&e(L)}};EditorUi.prototype.getEmbeddedSvg=function(c,e,g,k,m,p,v,x,z,y,L,N,J){x=null!=x?x:!0;L=null!=L?L:0;v=null!=z?z:e.background;v==mxConstants.NONE&&(v=null);p=e.getSvg(v,y,L,null,null,p,null,null,null,e.shadowVisible||N,null,J,"diagram");(e.shadowVisible||N)&&e.addSvgShadow(p,null,null,0==L);null!=c&&p.setAttribute("content",c);null!=g&&p.setAttribute("resource",g);var q=mxUtils.bind(this,function(D){D=
-(k?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(D);null!=m&&m(D);return D});e.mathEnabled&&this.editor.addMathCss(p);if(null!=m)this.embedFonts(p,mxUtils.bind(this,function(D){x?this.editor.convertImages(D,mxUtils.bind(this,function(A){q(A)})):q(D)}));else return q(p)};EditorUi.prototype.embedFonts=function(c,e){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(c,this.editor.resolvedFontCss),
-this.editor.embedExtFonts(mxUtils.bind(this,function(g){try{null!=g&&this.editor.addFontCss(c,g),e(c)}catch(k){e(c)}}))}catch(g){e(c)}}))};EditorUi.prototype.exportImage=function(c,e,g,k,m,p,v,x,z,y,L,N,J){z=null!=z?z:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var q=this.editor.graph.isSelectionEmpty();g=null!=g?g:q;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(D){this.spinner.stop();try{this.saveCanvas(D,
-m?this.getFileData(!0,null,null,null,g,x):null,z,null==this.pages||0==this.pages.length,L)}catch(A){this.handleError(A)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(D){this.spinner.stop();this.handleError(D)}),null,g,c||1,e,k,null,null,p,v,y,N,J)}catch(D){this.spinner.stop(),this.handleError(D)}}};EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.importXml=function(c,e,g,k,m,p,v){e=null!=e?e:0;g=null!=g?g:0;var x=[];try{var z=
-this.editor.graph;if(null!=c&&0<c.length){z.model.beginUpdate();try{var y=mxUtils.parseXml(c);c={};var L=this.editor.extractGraphModel(y.documentElement,null!=this.pages);if(null!=L&&"mxfile"==L.nodeName&&null!=this.pages){var N=L.getElementsByTagName("diagram");if(1==N.length&&!p){if(L=Editor.parseDiagramNode(N[0]),null!=this.currentPage&&(c[N[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var J=N[0].getAttribute("name");null!=J&&""!=J&&this.editor.graph.model.execute(new RenamePage(this,
-this.currentPage,J))}}else if(0<N.length){p=[];var q=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[N[0].getAttribute("id")]=this.pages[0].getId(),L=Editor.parseDiagramNode(N[0]),k=!1,q=1);for(;q<N.length;q++){var D=N[q].getAttribute("id");N[q].removeAttribute("id");var A=this.updatePageRoot(new DiagramPage(N[q]));c[D]=N[q].getAttribute("id");var C=this.pages.length;null==A.getName()&&A.setName(mxResources.get("pageWithNumber",[C+1]));z.model.execute(new ChangePage(this,A,A,C,
-!0));p.push(A)}this.updatePageLinks(c,p)}}if(null!=L&&"mxGraphModel"===L.nodeName){x=z.importGraphModel(L,e,g,k);if(null!=x)for(q=0;q<x.length;q++)this.updatePageLinksForCell(c,x[q]);var G=z.parseBackgroundImage(L.getAttribute("backgroundImage"));if(null!=G&&null!=G.originalSrc){this.updateBackgroundPageLink(c,G);var M=new ChangePageSetup(this,null,G);M.ignoreColor=!0;z.model.execute(M)}}v&&this.insertHandler(x,null,null,z.defaultVertexStyle,z.defaultEdgeStyle,!1,!0)}finally{z.model.endUpdate()}}}catch(H){if(m)throw H;
-this.handleError(H)}return x};EditorUi.prototype.updatePageLinks=function(c,e){for(var g=0;g<e.length;g++)this.updatePageLinksForCell(c,e[g].root),null!=e[g].viewState&&this.updateBackgroundPageLink(c,e[g].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(c,e){try{if(null!=e&&Graph.isPageLink(e.originalSrc)){var g=c[e.originalSrc.substring(e.originalSrc.indexOf(",")+1)];null!=g&&(e.originalSrc="data:page/id,"+g)}}catch(k){}};EditorUi.prototype.updatePageLinksForCell=
+!0),p),x=g;else if(v||null!=this.pages&&this.currentPage!=this.pages[0]){p=this.createTemporaryGraph(v?p.getDefaultStylesheet():p.getStylesheet());var A=p.getGlobalVariable;p.setBackgroundImage=this.editor.graph.setBackgroundImage;var y=this.pages[0];this.currentPage==y?p.setBackgroundImage(this.editor.graph.backgroundImage):null!=y.viewState&&null!=y.viewState&&p.setBackgroundImage(y.viewState.backgroundImage);p.getGlobalVariable=function(L){return"page"==L?y.getName():"pagenumber"==L?1:A.apply(this,
+arguments)};document.body.appendChild(p.container);p.model.setRoot(y.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(L){try{null==x&&(x=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var N=L.toDataURL("image/png");N=Editor.writeGraphModelToPng(N,"tEXt","mxfile",encodeURIComponent(x));c(N.substring(N.lastIndexOf(",")+1));p!=this.editor.graph&&p.container.parentNode.removeChild(p.container)}catch(I){null!=e&&e(I)}}),null,null,null,mxUtils.bind(this,function(L){null!=e&&
+e(L)}),null,null,k,null,p.shadowVisible,null,p,m,null,null,null,"diagram",null)}catch(L){null!=e&&e(L)}};EditorUi.prototype.getEmbeddedSvg=function(c,e,g,k,m,p,v,x,A,y,L,N,I){x=null!=x?x:!0;L=null!=L?L:0;v=null!=A?A:e.background;v==mxConstants.NONE&&(v=null);p=e.getSvg(v,y,L,null,null,p,null,null,null,e.shadowVisible||N,null,I,"diagram");(e.shadowVisible||N)&&e.addSvgShadow(p,null,null,0==L);null!=c&&p.setAttribute("content",c);null!=g&&p.setAttribute("resource",g);var q=mxUtils.bind(this,function(D){D=
+(k?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(D);null!=m&&m(D);return D});e.mathEnabled&&this.editor.addMathCss(p);if(null!=m)this.embedFonts(p,mxUtils.bind(this,function(D){x?this.editor.convertImages(D,mxUtils.bind(this,function(z){q(z)})):q(D)}));else return q(p)};EditorUi.prototype.embedFonts=function(c,e){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(c,this.editor.resolvedFontCss),
+this.editor.embedExtFonts(mxUtils.bind(this,function(g){try{null!=g&&this.editor.addFontCss(c,g),e(c)}catch(k){e(c)}}))}catch(g){e(c)}}))};EditorUi.prototype.exportImage=function(c,e,g,k,m,p,v,x,A,y,L,N,I){A=null!=A?A:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var q=this.editor.graph.isSelectionEmpty();g=null!=g?g:q;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(D){this.spinner.stop();try{this.saveCanvas(D,
+m?this.getFileData(!0,null,null,null,g,x):null,A,null==this.pages||0==this.pages.length,L)}catch(z){this.handleError(z)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(D){this.spinner.stop();this.handleError(D)}),null,g,c||1,e,k,null,null,p,v,y,N,I)}catch(D){this.spinner.stop(),this.handleError(D)}}};EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.importXml=function(c,e,g,k,m,p,v){e=null!=e?e:0;g=null!=g?g:0;var x=[];try{var A=
+this.editor.graph;if(null!=c&&0<c.length){A.model.beginUpdate();try{var y=mxUtils.parseXml(c);c={};var L=this.editor.extractGraphModel(y.documentElement,null!=this.pages);if(null!=L&&"mxfile"==L.nodeName&&null!=this.pages){var N=L.getElementsByTagName("diagram");if(1==N.length&&!p){if(L=Editor.parseDiagramNode(N[0]),null!=this.currentPage&&(c[N[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var I=N[0].getAttribute("name");null!=I&&""!=I&&this.editor.graph.model.execute(new RenamePage(this,
+this.currentPage,I))}}else if(0<N.length){p=[];var q=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[N[0].getAttribute("id")]=this.pages[0].getId(),L=Editor.parseDiagramNode(N[0]),k=!1,q=1);for(;q<N.length;q++){var D=N[q].getAttribute("id");N[q].removeAttribute("id");var z=this.updatePageRoot(new DiagramPage(N[q]));c[D]=N[q].getAttribute("id");var C=this.pages.length;null==z.getName()&&z.setName(mxResources.get("pageWithNumber",[C+1]));A.model.execute(new ChangePage(this,z,z,C,
+!0));p.push(z)}this.updatePageLinks(c,p)}}if(null!=L&&"mxGraphModel"===L.nodeName){x=A.importGraphModel(L,e,g,k);if(null!=x)for(q=0;q<x.length;q++)this.updatePageLinksForCell(c,x[q]);var G=A.parseBackgroundImage(L.getAttribute("backgroundImage"));if(null!=G&&null!=G.originalSrc){this.updateBackgroundPageLink(c,G);var H=new ChangePageSetup(this,null,G);H.ignoreColor=!0;A.model.execute(H)}}v&&this.insertHandler(x,null,null,A.defaultVertexStyle,A.defaultEdgeStyle,!1,!0)}finally{A.model.endUpdate()}}}catch(M){if(m)throw M;
+this.handleError(M)}return x};EditorUi.prototype.updatePageLinks=function(c,e){for(var g=0;g<e.length;g++)this.updatePageLinksForCell(c,e[g].root),null!=e[g].viewState&&this.updateBackgroundPageLink(c,e[g].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(c,e){try{if(null!=e&&Graph.isPageLink(e.originalSrc)){var g=c[e.originalSrc.substring(e.originalSrc.indexOf(",")+1)];null!=g&&(e.originalSrc="data:page/id,"+g)}}catch(k){}};EditorUi.prototype.updatePageLinksForCell=
function(c,e){var g=document.createElement("div"),k=this.editor.graph,m=k.getLinkForCell(e);null!=m&&k.setLinkForCell(e,this.updatePageLink(c,m));if(k.isHtmlLabel(e)){g.innerHTML=k.sanitizeHtml(k.getLabel(e));for(var p=g.getElementsByTagName("a"),v=!1,x=0;x<p.length;x++)m=p[x].getAttribute("href"),null!=m&&(p[x].setAttribute("href",this.updatePageLink(c,m)),v=!0);v&&k.labelChanged(e,g.innerHTML)}for(x=0;x<k.model.getChildCount(e);x++)this.updatePageLinksForCell(c,k.model.getChildAt(e,x))};EditorUi.prototype.updatePageLink=
function(c,e){if(Graph.isPageLink(e)){var g=c[e.substring(e.indexOf(",")+1)];e=null!=g?"data:page/id,"+g:null}else if("data:action/json,"==e.substring(0,17))try{var k=JSON.parse(e.substring(17));if(null!=k.actions){for(var m=0;m<k.actions.length;m++){var p=k.actions[m];if(null!=p.open&&Graph.isPageLink(p.open)){var v=p.open.substring(p.open.indexOf(",")+1);g=c[v];null!=g?p.open="data:page/id,"+g:null==this.getPageById(v)&&delete p.open}}e="data:action/json,"+JSON.stringify(k)}}catch(x){}return e};
-EditorUi.prototype.isRemoteVisioFormat=function(c){return/(\.v(sd|dx))($|\?)/i.test(c)||/(\.vs(s|x))($|\?)/i.test(c)};EditorUi.prototype.importVisio=function(c,e,g,k,m){k=null!=k?k:c.name;g=null!=g?g:mxUtils.bind(this,function(v){this.handleError(v)});var p=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var v=this.isRemoteVisioFormat(k);try{var x="UNKNOWN-VISIO",z=k.lastIndexOf(".");if(0<=z&&z<k.length)x=k.substring(z+1).toUpperCase();else{var y=k.lastIndexOf("/");0<=
+EditorUi.prototype.isRemoteVisioFormat=function(c){return/(\.v(sd|dx))($|\?)/i.test(c)||/(\.vs(s|x))($|\?)/i.test(c)};EditorUi.prototype.importVisio=function(c,e,g,k,m){k=null!=k?k:c.name;g=null!=g?g:mxUtils.bind(this,function(v){this.handleError(v)});var p=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var v=this.isRemoteVisioFormat(k);try{var x="UNKNOWN-VISIO",A=k.lastIndexOf(".");if(0<=A&&A<k.length)x=k.substring(A+1).toUpperCase();else{var y=k.lastIndexOf("/");0<=
y&&y<k.length&&(k=k.substring(y+1))}EditorUi.logEvent({category:x+"-MS-IMPORT-FILE",action:"filename_"+k,label:v?"remote":"local"})}catch(N){}if(v)if(null==VSD_CONVERT_URL||this.isOffline())g({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{v=new FormData;v.append("file1",c,k);var L=new XMLHttpRequest;L.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(k)?"?stencil=1":""));L.responseType="blob";this.addRemoteServiceSecurityCheck(L);
-null!=m&&L.setRequestHeader("x-convert-custom",m);L.onreadystatechange=mxUtils.bind(this,function(){if(4==L.readyState)if(200<=L.status&&299>=L.status)try{var N=L.response;if("text/xml"==N.type){var J=new FileReader;J.onload=mxUtils.bind(this,function(q){try{e(q.target.result)}catch(D){g({message:mxResources.get("errorLoadingFile")})}});J.readAsText(N)}else this.doImportVisio(N,e,g,k)}catch(q){g(q)}else try{""==L.responseType||"text"==L.responseType?g({message:L.responseText}):(J=new FileReader,J.onload=
-function(){g({message:JSON.parse(J.result).Message})},J.readAsText(L.response))}catch(q){g({})}});L.send(v)}else try{this.doImportVisio(c,e,g,k)}catch(N){g(N)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?p():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",p))};EditorUi.prototype.importGraphML=function(c,e,g){g=null!=g?g:mxUtils.bind(this,function(m){this.handleError(m)});
+null!=m&&L.setRequestHeader("x-convert-custom",m);L.onreadystatechange=mxUtils.bind(this,function(){if(4==L.readyState)if(200<=L.status&&299>=L.status)try{var N=L.response;if("text/xml"==N.type){var I=new FileReader;I.onload=mxUtils.bind(this,function(q){try{e(q.target.result)}catch(D){g({message:mxResources.get("errorLoadingFile")})}});I.readAsText(N)}else this.doImportVisio(N,e,g,k)}catch(q){g(q)}else try{""==L.responseType||"text"==L.responseType?g({message:L.responseText}):(I=new FileReader,I.onload=
+function(){g({message:JSON.parse(I.result).Message})},I.readAsText(L.response))}catch(q){g({})}});L.send(v)}else try{this.doImportVisio(c,e,g,k)}catch(N){g(N)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?p():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",p))};EditorUi.prototype.importGraphML=function(c,e,g){g=null!=g?g:mxUtils.bind(this,function(m){this.handleError(m)});
var k=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(c,e,g)}catch(m){g(m)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?k():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",k))};EditorUi.prototype.exportVisio=function(c){var e=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(c)||
this.handleError({message:mxResources.get("unknownError")})}catch(g){this.handleError(g)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?e():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",e))};EditorUi.prototype.convertLucidChart=function(c,e,g){var k=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{var m=
JSON.parse(c);e(LucidImporter.importState(m));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+c.length}),null!=window.console&&"1"==urlParams.test){var p=[(new Date).toISOString(),"convertLucidChart",m];null!=m.state&&p.push(JSON.parse(m.state));if(null!=m.svgThumbs)for(var v=0;v<m.svgThumbs.length;v++)p.push(Editor.createSvgDataUri(m.svgThumbs[v]));null!=m.thumb&&p.push(m.thumb);console.log.apply(console,p)}}catch(x){}}catch(x){null!=window.console&&console.error(x),g(x)}else g({message:mxResources.get("serviceUnavailableOrBlocked")})});
"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(k,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",k)})})})}):mxscript("js/extensions.min.js",k))};EditorUi.prototype.generateMermaidImage=function(c,
e,g,k){var m=this,p=function(){try{this.loadingMermaid=!1,e=null!=e?e:mxUtils.clone(EditorUi.defaultMermaidConfig),e.securityLevel="strict",e.startOnLoad=!1,Editor.isDarkMode()&&(e.theme="dark"),mermaid.mermaidAPI.initialize(e),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),c,function(v){try{if(mxClient.IS_IE||mxClient.IS_IE11)v=v.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var x=mxUtils.parseXml(v).getElementsByTagName("svg");
-if(0<x.length){var z=parseFloat(x[0].getAttribute("width")),y=parseFloat(x[0].getAttribute("height"));if(isNaN(z)||isNaN(y))try{var L=x[0].getAttribute("viewBox").split(/\s+/);z=parseFloat(L[2]);y=parseFloat(L[3])}catch(N){z=z||100,y=y||100}g(m.convertDataUri(Editor.createSvgDataUri(v)),z,y)}else k({message:mxResources.get("invalidInput")})}catch(N){k(N)}})}catch(v){k(v)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?p():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",
-p):mxscript("js/extensions.min.js",p))};EditorUi.prototype.generatePlantUmlImage=function(c,e,g,k){function m(x,z,y){c1=x>>2;c2=(x&3)<<4|z>>4;c3=(z&15)<<2|y>>6;c4=y&63;r="";r+=p(c1&63);r+=p(c2&63);r+=p(c3&63);return r+=p(c4&63)}function p(x){if(10>x)return String.fromCharCode(48+x);x-=10;if(26>x)return String.fromCharCode(65+x);x-=26;if(26>x)return String.fromCharCode(97+x);x-=26;return 0==x?"-":1==x?"_":"?"}var v=new XMLHttpRequest;v.open("GET",("txt"==e?PLANT_URL+"/txt/":"png"==e?PLANT_URL+"/png/":
-PLANT_URL+"/svg/")+function(x){r="";for(i=0;i<x.length;i+=3)r=i+2==x.length?r+m(x.charCodeAt(i),x.charCodeAt(i+1),0):i+1==x.length?r+m(x.charCodeAt(i),0,0):r+m(x.charCodeAt(i),x.charCodeAt(i+1),x.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=e&&(v.responseType="blob");v.onload=function(x){if(200<=this.status&&300>this.status)if("txt"==e)g(this.response);else{var z=new FileReader;z.readAsDataURL(this.response);z.onloadend=function(y){var L=new Image;L.onload=
-function(){try{var N=L.width,J=L.height;if(0==N&&0==J){var q=z.result,D=q.indexOf(","),A=decodeURIComponent(escape(atob(q.substring(D+1)))),C=mxUtils.parseXml(A).getElementsByTagName("svg");0<C.length&&(N=parseFloat(C[0].getAttribute("width")),J=parseFloat(C[0].getAttribute("height")))}g(z.result,N,J)}catch(G){k(G)}};L.src=z.result};z.onerror=function(y){k(y)}}else k(x)};v.onerror=function(x){k(x)};v.send()};EditorUi.prototype.insertAsPreText=function(c,e,g){var k=this.editor.graph,m=null;k.getModel().beginUpdate();
-try{m=k.insertVertex(null,null,"<pre>"+c+"</pre>",e,g,1,1,"text;html=1;align=left;verticalAlign=top;"),k.updateCellSize(m,!0)}finally{k.getModel().endUpdate()}return m};EditorUi.prototype.insertTextAt=function(c,e,g,k,m,p,v,x){p=null!=p?p:!0;v=null!=v?v:!0;if(null!=c)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(c.replace(/\s+/g," "),mxUtils.bind(this,function(J){4==
-J.readyState&&200<=J.status&&299>=J.status&&this.editor.graph.setSelectionCells(this.insertTextAt(J.responseText,e,g,!0))}));else if("data:"==c.substring(0,5)||!this.isOffline()&&(m||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c))){var z=this.editor.graph;if("data:application/pdf;base64,"==c.substring(0,28)){var y=Editor.extractGraphModelFromPdf(c);if(null!=y&&0<y.length)return this.importXml(y,e,g,p,!0,x)}if(Editor.isPngDataUrl(c)&&(y=Editor.extractGraphModelFromPng(c),null!=y&&0<y.length))return this.importXml(y,
-e,g,p,!0,x);if("data:image/svg+xml;"==c.substring(0,19))try{y=null;"data:image/svg+xml;base64,"==c.substring(0,26)?(y=c.substring(c.indexOf(",")+1),y=window.atob&&!mxClient.IS_SF?atob(y):Base64.decode(y,!0)):y=decodeURIComponent(c.substring(c.indexOf(",")+1));var L=this.importXml(y,e,g,p,!0,x);if(0<L.length)return L}catch(J){}this.loadImage(c,mxUtils.bind(this,function(J){if("data:"==c.substring(0,5))this.resizeImage(J,c,mxUtils.bind(this,function(A,C,G){z.setSelectionCell(z.insertVertex(null,null,
-"",z.snap(e),z.snap(g),C,G,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(A)+";"))}),v,this.maxImageSize);else{var q=Math.min(1,Math.min(this.maxImageSize/J.width,this.maxImageSize/J.height)),D=Math.round(J.width*q);J=Math.round(J.height*q);z.setSelectionCell(z.insertVertex(null,null,"",z.snap(e),z.snap(g),D,J,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-c+";"))}}),mxUtils.bind(this,function(){var J=null;z.getModel().beginUpdate();try{J=z.insertVertex(z.getDefaultParent(),null,c,z.snap(e),z.snap(g),1,1,"text;"+(k?"html=1;":"")),z.updateCellSize(J),z.fireEvent(new mxEventObject("textInserted","cells",[J]))}finally{z.getModel().endUpdate()}z.setSelectionCell(J)}))}else{c=Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,e,g,p,null,x);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this,
-function(J){this.editor.graph.setSelectionCells(this.importXml(J,e,g,p,null,x))}),mxUtils.bind(this,function(J){this.handleError(J)}));else{z=this.editor.graph;m=null;z.getModel().beginUpdate();try{m=z.insertVertex(z.getDefaultParent(),null,"",z.snap(e),z.snap(g),1,1,"text;whiteSpace=wrap;"+(k?"html=1;":""));z.fireEvent(new mxEventObject("textInserted","cells",[m]));"<"==c.charAt(0)&&c.indexOf(">")==c.length-1&&(c=mxUtils.htmlEntities(c));c.length>this.maxTextBytes&&(c=c.substring(0,this.maxTextBytes)+
-"...");m.value=c;z.updateCellSize(m);if(0<this.maxTextWidth&&m.geometry.width>this.maxTextWidth){var N=z.getPreferredSizeForCell(m,this.maxTextWidth);m.geometry.width=N.width;m.geometry.height=N.height}Graph.isLink(m.value)&&z.setLinkForCell(m,m.value);m.geometry.width+=z.gridSize;m.geometry.height+=z.gridSize}finally{z.getModel().endUpdate()}return[m]}}return[]};EditorUi.prototype.formatFileSize=function(c){var e=-1;do c/=1024,e++;while(1024<c);return Math.max(c,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[e]};
+if(0<x.length){var A=parseFloat(x[0].getAttribute("width")),y=parseFloat(x[0].getAttribute("height"));if(isNaN(A)||isNaN(y))try{var L=x[0].getAttribute("viewBox").split(/\s+/);A=parseFloat(L[2]);y=parseFloat(L[3])}catch(N){A=A||100,y=y||100}g(m.convertDataUri(Editor.createSvgDataUri(v)),A,y)}else k({message:mxResources.get("invalidInput")})}catch(N){k(N)}})}catch(v){k(v)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?p():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",
+p):mxscript("js/extensions.min.js",p))};EditorUi.prototype.generatePlantUmlImage=function(c,e,g,k){function m(x,A,y){c1=x>>2;c2=(x&3)<<4|A>>4;c3=(A&15)<<2|y>>6;c4=y&63;r="";r+=p(c1&63);r+=p(c2&63);r+=p(c3&63);return r+=p(c4&63)}function p(x){if(10>x)return String.fromCharCode(48+x);x-=10;if(26>x)return String.fromCharCode(65+x);x-=26;if(26>x)return String.fromCharCode(97+x);x-=26;return 0==x?"-":1==x?"_":"?"}var v=new XMLHttpRequest;v.open("GET",("txt"==e?PLANT_URL+"/txt/":"png"==e?PLANT_URL+"/png/":
+PLANT_URL+"/svg/")+function(x){r="";for(i=0;i<x.length;i+=3)r=i+2==x.length?r+m(x.charCodeAt(i),x.charCodeAt(i+1),0):i+1==x.length?r+m(x.charCodeAt(i),0,0):r+m(x.charCodeAt(i),x.charCodeAt(i+1),x.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=e&&(v.responseType="blob");v.onload=function(x){if(200<=this.status&&300>this.status)if("txt"==e)g(this.response);else{var A=new FileReader;A.readAsDataURL(this.response);A.onloadend=function(y){var L=new Image;L.onload=
+function(){try{var N=L.width,I=L.height;if(0==N&&0==I){var q=A.result,D=q.indexOf(","),z=decodeURIComponent(escape(atob(q.substring(D+1)))),C=mxUtils.parseXml(z).getElementsByTagName("svg");0<C.length&&(N=parseFloat(C[0].getAttribute("width")),I=parseFloat(C[0].getAttribute("height")))}g(A.result,N,I)}catch(G){k(G)}};L.src=A.result};A.onerror=function(y){k(y)}}else k(x)};v.onerror=function(x){k(x)};v.send()};EditorUi.prototype.insertAsPreText=function(c,e,g){var k=this.editor.graph,m=null;k.getModel().beginUpdate();
+try{m=k.insertVertex(null,null,"<pre>"+c+"</pre>",e,g,1,1,"text;html=1;align=left;verticalAlign=top;"),k.updateCellSize(m,!0)}finally{k.getModel().endUpdate()}return m};EditorUi.prototype.insertTextAt=function(c,e,g,k,m,p,v,x){p=null!=p?p:!0;v=null!=v?v:!0;if(null!=c)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(c.replace(/\s+/g," "),mxUtils.bind(this,function(I){4==
+I.readyState&&200<=I.status&&299>=I.status&&this.editor.graph.setSelectionCells(this.insertTextAt(I.responseText,e,g,!0))}));else if("data:"==c.substring(0,5)||!this.isOffline()&&(m||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c))){var A=this.editor.graph;if("data:application/pdf;base64,"==c.substring(0,28)){var y=Editor.extractGraphModelFromPdf(c);if(null!=y&&0<y.length)return this.importXml(y,e,g,p,!0,x)}if(Editor.isPngDataUrl(c)&&(y=Editor.extractGraphModelFromPng(c),null!=y&&0<y.length))return this.importXml(y,
+e,g,p,!0,x);if("data:image/svg+xml;"==c.substring(0,19))try{y=null;"data:image/svg+xml;base64,"==c.substring(0,26)?(y=c.substring(c.indexOf(",")+1),y=window.atob&&!mxClient.IS_SF?atob(y):Base64.decode(y,!0)):y=decodeURIComponent(c.substring(c.indexOf(",")+1));var L=this.importXml(y,e,g,p,!0,x);if(0<L.length)return L}catch(I){}this.loadImage(c,mxUtils.bind(this,function(I){if("data:"==c.substring(0,5))this.resizeImage(I,c,mxUtils.bind(this,function(z,C,G){A.setSelectionCell(A.insertVertex(null,null,
+"",A.snap(e),A.snap(g),C,G,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(z)+";"))}),v,this.maxImageSize);else{var q=Math.min(1,Math.min(this.maxImageSize/I.width,this.maxImageSize/I.height)),D=Math.round(I.width*q);I=Math.round(I.height*q);A.setSelectionCell(A.insertVertex(null,null,"",A.snap(e),A.snap(g),D,I,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+c+";"))}}),mxUtils.bind(this,function(){var I=null;A.getModel().beginUpdate();try{I=A.insertVertex(A.getDefaultParent(),null,c,A.snap(e),A.snap(g),1,1,"text;"+(k?"html=1;":"")),A.updateCellSize(I),A.fireEvent(new mxEventObject("textInserted","cells",[I]))}finally{A.getModel().endUpdate()}A.setSelectionCell(I)}))}else{c=Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,e,g,p,null,x);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this,
+function(I){this.editor.graph.setSelectionCells(this.importXml(I,e,g,p,null,x))}),mxUtils.bind(this,function(I){this.handleError(I)}));else{A=this.editor.graph;m=null;A.getModel().beginUpdate();try{m=A.insertVertex(A.getDefaultParent(),null,"",A.snap(e),A.snap(g),1,1,"text;whiteSpace=wrap;"+(k?"html=1;":""));A.fireEvent(new mxEventObject("textInserted","cells",[m]));"<"==c.charAt(0)&&c.indexOf(">")==c.length-1&&(c=mxUtils.htmlEntities(c));c.length>this.maxTextBytes&&(c=c.substring(0,this.maxTextBytes)+
+"...");m.value=c;A.updateCellSize(m);if(0<this.maxTextWidth&&m.geometry.width>this.maxTextWidth){var N=A.getPreferredSizeForCell(m,this.maxTextWidth);m.geometry.width=N.width;m.geometry.height=N.height}Graph.isLink(m.value)&&A.setLinkForCell(m,m.value);m.geometry.width+=A.gridSize;m.geometry.height+=A.gridSize}finally{A.getModel().endUpdate()}return[m]}}return[]};EditorUi.prototype.formatFileSize=function(c){var e=-1;do c/=1024,e++;while(1024<c);return Math.max(c,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[e]};
EditorUi.prototype.convertDataUri=function(c){if("data:"==c.substring(0,5)){var e=c.indexOf(";");0<e&&(c=c.substring(0,e)+c.substring(c.indexOf(",",e+1)))}return c};EditorUi.prototype.isRemoteFileFormat=function(c,e){return/("contentType":\s*"application\/gliffy\+json")/.test(c)};EditorUi.prototype.isLucidChartData=function(c){return null!=c&&('{"state":"{\\"Properties\\":'==c.substring(0,26)||'{"Properties":'==c.substring(0,14))};EditorUi.prototype.importLocalFile=function(c,e){if(c&&Graph.fileSupport){if(null==
this.importFileInputElt){var g=document.createElement("input");g.setAttribute("type","file");mxEvent.addListener(g,"change",mxUtils.bind(this,function(){null!=g.files&&(this.importFiles(g.files,null,null,this.maxImageSize),g.type="",g.type="file",g.value="")}));g.style.display="none";document.body.appendChild(g);this.importFileInputElt=g}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(v,x){StorageFile.listFiles(this,
-"F",v,x)});window.openBrowserFile=mxUtils.bind(this,function(v,x,z){StorageFile.getFileContent(this,v,x,z)});window.deleteBrowserFile=mxUtils.bind(this,function(v,x,z){StorageFile.deleteFile(this,v,x,z)});if(!e){var k=Editor.useLocalStorage;Editor.useLocalStorage=!c}window.openFile=new OpenFile(mxUtils.bind(this,function(v){this.hideDialog(v)}));window.openFile.setConsumer(mxUtils.bind(this,function(v,x){null!=x&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(x)?(v=new Blob([v],{type:"application/octet-stream"}),
-this.importVisio(v,mxUtils.bind(this,function(z){this.importXml(z,0,0,!0)}),null,x)):this.editor.graph.setSelectionCells(this.importXml(v,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!e){var m=this.dialog,p=m.close;this.dialog.close=mxUtils.bind(this,function(v){Editor.useLocalStorage=k;p.apply(m,arguments);v&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};
-EditorUi.prototype.importZipFile=function(c,e,g){var k=this,m=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(c).then(function(p){if(mxUtils.isEmptyObject(p.files))g();else{var v=0,x,z=!1;p.forEach(function(y,L){y=L.name.toLowerCase();"diagram/diagram.xml"==y?(z=!0,L.async("string").then(function(N){0==N.indexOf("<mxfile ")?e(N):g()})):0==y.indexOf("versions/")&&(y=parseInt(y.substr(9)),y>v&&(v=y,x=L))});0<v?x.async("string").then(function(y){(new XMLHttpRequest).upload&&
-k.isRemoteFileFormat(y,c.name)?k.isOffline()?k.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g):k.parseFileData(y,mxUtils.bind(this,function(L){4==L.readyState&&(200<=L.status&&299>=L.status?e(L.responseText):g())}),c.name):g()}):z||g()}},function(p){g(p)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?m():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",m))};EditorUi.prototype.importFile=function(c,e,g,k,m,p,v,x,z,y,L,N){y=null!=
-y?y:!0;var J=!1,q=null,D=mxUtils.bind(this,function(A){var C=null;null!=A&&"<mxlibrary"==A.substring(0,10)?this.loadLibrary(new LocalLibrary(this,A,v)):C=this.importXml(A,g,k,y,null,null!=N?mxEvent.isControlDown(N):null);null!=x&&x(C)});"image"==e.substring(0,5)?(z=!1,"image/png"==e.substring(0,9)&&(e=L?null:this.extractGraphModelFromPng(c),null!=e&&0<e.length&&(q=this.importXml(e,g,k,y,null,null!=N?mxEvent.isControlDown(N):null),z=!0)),z||(e=this.editor.graph,z=c.indexOf(";"),0<z&&(c=c.substring(0,
-z)+c.substring(c.indexOf(",",z+1))),y&&e.isGridEnabled()&&(g=e.snap(g),k=e.snap(k)),q=[e.insertVertex(null,null,"",g,k,m,p,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+c+";")])):/(\.*<graphml )/.test(c)?(J=!0,this.importGraphML(c,D)):null!=z&&null!=v&&(/(\.v(dx|sdx?))($|\?)/i.test(v)||/(\.vs(x|sx?))($|\?)/i.test(v))?(J=!0,this.importVisio(z,D)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,v)?this.isOffline()?
-this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(J=!0,m=mxUtils.bind(this,function(A){4==A.readyState&&(200<=A.status&&299>=A.status?D(A.responseText):null!=x&&x(null))}),null!=c?this.parseFileData(c,m,v):this.parseFile(z,m,v)):0==c.indexOf("PK")&&null!=z?(J=!0,this.importZipFile(z,D,mxUtils.bind(this,function(){q=this.insertTextAt(this.validateFileData(c),g,k,!0,null,y);x(q)}))):/(\.v(sd|dx))($|\?)/i.test(v)||/(\.vs(s|x))($|\?)/i.test(v)||(q=this.insertTextAt(this.validateFileData(c),
-g,k,!0,null,y,null,null!=N?mxEvent.isControlDown(N):null));J||null==x||x(q);return q};EditorUi.prototype.importFiles=function(c,e,g,k,m,p,v,x,z,y,L,N,J){k=null!=k?k:this.maxImageSize;y=null!=y?y:this.maxImageBytes;var q=null!=e&&null!=g,D=!0;e=null!=e?e:0;g=null!=g?g:0;var A=!1;if(!mxClient.IS_CHROMEAPP&&null!=c)for(var C=L||this.resampleThreshold,G=0;G<c.length;G++)if("image/svg"!==c[G].type.substring(0,9)&&"image/"===c[G].type.substring(0,6)&&c[G].size>C){A=!0;break}var M=mxUtils.bind(this,function(){var H=
-this.editor.graph,F=H.gridSize;m=null!=m?m:mxUtils.bind(this,function(U,n,B,K,Q,P,T,V,S){try{return null!=U&&"<mxlibrary"==U.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,U,T)),null):this.importFile(U,n,B,K,Q,P,T,V,S,q,N,J)}catch(Y){return this.handleError(Y),null}});p=null!=p?p:mxUtils.bind(this,function(U){H.setSelectionCells(U)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var I=c.length,R=I,X=[],O=mxUtils.bind(this,function(U,n){X[U]=n;if(0==
---R){this.spinner.stop();if(null!=x)x(X);else{var B=[];H.getModel().beginUpdate();try{for(U=0;U<X.length;U++){var K=X[U]();null!=K&&(B=B.concat(K))}}finally{H.getModel().endUpdate()}}p(B)}}),W=0;W<I;W++)mxUtils.bind(this,function(U){var n=c[U];if(null!=n){var B=new FileReader;B.onload=mxUtils.bind(this,function(K){if(null==v||v(n))if("image/"==n.type.substring(0,6))if("image/svg"==n.type.substring(0,9)){var Q=Graph.clipSvgDataUri(K.target.result),P=Q.indexOf(",");P=decodeURIComponent(escape(atob(Q.substring(P+
-1))));var T=mxUtils.parseXml(P);P=T.getElementsByTagName("svg");if(0<P.length){P=P[0];var V=N?null:P.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)?O(U,mxUtils.bind(this,function(){try{if(null!=T){var ca=T.getElementsByTagName("svg");if(0<ca.length){var aa=ca[0],da=aa.getAttribute("width"),ja=aa.getAttribute("height");
-da=null!=da&&"%"!=da.charAt(da.length-1)?parseFloat(da):NaN;ja=null!=ja&&"%"!=ja.charAt(ja.length-1)?parseFloat(ja):NaN;var ha=aa.getAttribute("viewBox");if(null==ha||0==ha.length)aa.setAttribute("viewBox","0 0 "+da+" "+ja);else if(isNaN(da)||isNaN(ja)){var Z=ha.split(" ");3<Z.length&&(da=parseFloat(Z[2]),ja=parseFloat(Z[3]))}Q=Editor.createSvgDataUri(mxUtils.getXml(aa));var Da=Math.min(1,Math.min(k/Math.max(1,da)),k/Math.max(1,ja)),Ga=m(Q,n.type,e+U*F,g+U*F,Math.max(1,Math.round(da*Da)),Math.max(1,
-Math.round(ja*Da)),n.name);if(isNaN(da)||isNaN(ja)){var Ba=new Image;Ba.onload=mxUtils.bind(this,function(){da=Math.max(1,Ba.width);ja=Math.max(1,Ba.height);Ga[0].geometry.width=da;Ga[0].geometry.height=ja;aa.setAttribute("viewBox","0 0 "+da+" "+ja);Q=Editor.createSvgDataUri(mxUtils.getXml(aa));var Ha=Q.indexOf(";");0<Ha&&(Q=Q.substring(0,Ha)+Q.substring(Q.indexOf(",",Ha+1)));H.setCellStyles("image",Q,[Ga[0]])});Ba.src=Editor.createSvgDataUri(mxUtils.getXml(aa))}return Ga}}}catch(Ha){}return null})):
-O(U,mxUtils.bind(this,function(){return m(V,"text/xml",e+U*F,g+U*F,0,0,n.name)}))}else O(U,mxUtils.bind(this,function(){return null}))}else{P=!1;if("image/png"==n.type){var S=N?null:this.extractGraphModelFromPng(K.target.result);if(null!=S&&0<S.length){var Y=new Image;Y.src=K.target.result;O(U,mxUtils.bind(this,function(){return m(S,"text/xml",e+U*F,g+U*F,Y.width,Y.height,n.name)}));P=!0}}P||(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(K.target.result,mxUtils.bind(this,function(ca){this.resizeImage(ca,K.target.result,mxUtils.bind(this,function(aa,da,ja){O(U,mxUtils.bind(this,function(){if(null!=aa&&aa.length<y){var ha=D&&this.isResampleImageSize(n.size,L)?Math.min(1,Math.min(k/da,k/ja)):1;return m(aa,n.type,e+U*F,g+U*F,Math.round(da*ha),Math.round(ja*ha),n.name)}this.handleError({message:mxResources.get("imageTooBig")});
-return null}))}),D,k,L,n.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else Q=K.target.result,m(Q,n.type,e+U*F,g+U*F,240,160,n.name,function(ca){O(U,function(){return ca})},n)});/(\.v(dx|sdx?))($|\?)/i.test(n.name)||/(\.vs(x|sx?))($|\?)/i.test(n.name)?m(null,n.type,e+U*F,g+U*F,240,160,n.name,function(K){O(U,function(){return K})},n):"image"==n.type.substring(0,5)||"application/pdf"==n.type?B.readAsDataURL(n):B.readAsText(n)}})(W)});if(A){A=
-[];for(G=0;G<c.length;G++)A.push(c[G]);c=A;this.confirmImageResize(function(H){D=H;M()},z)}else M()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(c,e){e=null!=e?e:!1;var g=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},k=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():
+"F",v,x)});window.openBrowserFile=mxUtils.bind(this,function(v,x,A){StorageFile.getFileContent(this,v,x,A)});window.deleteBrowserFile=mxUtils.bind(this,function(v,x,A){StorageFile.deleteFile(this,v,x,A)});if(!e){var k=Editor.useLocalStorage;Editor.useLocalStorage=!c}window.openFile=new OpenFile(mxUtils.bind(this,function(v){this.hideDialog(v)}));window.openFile.setConsumer(mxUtils.bind(this,function(v,x){null!=x&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(x)?(v=new Blob([v],{type:"application/octet-stream"}),
+this.importVisio(v,mxUtils.bind(this,function(A){this.importXml(A,0,0,!0)}),null,x)):this.editor.graph.setSelectionCells(this.importXml(v,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!e){var m=this.dialog,p=m.close;this.dialog.close=mxUtils.bind(this,function(v){Editor.useLocalStorage=k;p.apply(m,arguments);v&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};
+EditorUi.prototype.importZipFile=function(c,e,g){var k=this,m=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(c).then(function(p){if(mxUtils.isEmptyObject(p.files))g();else{var v=0,x,A=!1;p.forEach(function(y,L){y=L.name.toLowerCase();"diagram/diagram.xml"==y?(A=!0,L.async("string").then(function(N){0==N.indexOf("<mxfile ")?e(N):g()})):0==y.indexOf("versions/")&&(y=parseInt(y.substr(9)),y>v&&(v=y,x=L))});0<v?x.async("string").then(function(y){(new XMLHttpRequest).upload&&
+k.isRemoteFileFormat(y,c.name)?k.isOffline()?k.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g):k.parseFileData(y,mxUtils.bind(this,function(L){4==L.readyState&&(200<=L.status&&299>=L.status?e(L.responseText):g())}),c.name):g()}):A||g()}},function(p){g(p)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?m():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",m))};EditorUi.prototype.importFile=function(c,e,g,k,m,p,v,x,A,y,L,N){y=null!=
+y?y:!0;var I=!1,q=null,D=mxUtils.bind(this,function(z){var C=null;null!=z&&"<mxlibrary"==z.substring(0,10)?this.loadLibrary(new LocalLibrary(this,z,v)):C=this.importXml(z,g,k,y,null,null!=N?mxEvent.isControlDown(N):null);null!=x&&x(C)});"image"==e.substring(0,5)?(A=!1,"image/png"==e.substring(0,9)&&(e=L?null:this.extractGraphModelFromPng(c),null!=e&&0<e.length&&(q=this.importXml(e,g,k,y,null,null!=N?mxEvent.isControlDown(N):null),A=!0)),A||(e=this.editor.graph,A=c.indexOf(";"),0<A&&(c=c.substring(0,
+A)+c.substring(c.indexOf(",",A+1))),y&&e.isGridEnabled()&&(g=e.snap(g),k=e.snap(k)),q=[e.insertVertex(null,null,"",g,k,m,p,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+c+";")])):/(\.*<graphml )/.test(c)?(I=!0,this.importGraphML(c,D)):null!=A&&null!=v&&(/(\.v(dx|sdx?))($|\?)/i.test(v)||/(\.vs(x|sx?))($|\?)/i.test(v))?(I=!0,this.importVisio(A,D)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,v)?this.isOffline()?
+this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(I=!0,m=mxUtils.bind(this,function(z){4==z.readyState&&(200<=z.status&&299>=z.status?D(z.responseText):null!=x&&x(null))}),null!=c?this.parseFileData(c,m,v):this.parseFile(A,m,v)):0==c.indexOf("PK")&&null!=A?(I=!0,this.importZipFile(A,D,mxUtils.bind(this,function(){q=this.insertTextAt(this.validateFileData(c),g,k,!0,null,y);x(q)}))):/(\.v(sd|dx))($|\?)/i.test(v)||/(\.vs(s|x))($|\?)/i.test(v)||(q=this.insertTextAt(this.validateFileData(c),
+g,k,!0,null,y,null,null!=N?mxEvent.isControlDown(N):null));I||null==x||x(q);return q};EditorUi.prototype.importFiles=function(c,e,g,k,m,p,v,x,A,y,L,N,I){k=null!=k?k:this.maxImageSize;y=null!=y?y:this.maxImageBytes;var q=null!=e&&null!=g,D=!0;e=null!=e?e:0;g=null!=g?g:0;var z=!1;if(!mxClient.IS_CHROMEAPP&&null!=c)for(var C=L||this.resampleThreshold,G=0;G<c.length;G++)if("image/svg"!==c[G].type.substring(0,9)&&"image/"===c[G].type.substring(0,6)&&c[G].size>C){z=!0;break}var H=mxUtils.bind(this,function(){var M=
+this.editor.graph,F=M.gridSize;m=null!=m?m:mxUtils.bind(this,function(W,n,B,K,R,O,U,S,T){try{return null!=W&&"<mxlibrary"==W.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,W,U)),null):this.importFile(W,n,B,K,R,O,U,S,T,q,N,I)}catch(Y){return this.handleError(Y),null}});p=null!=p?p:mxUtils.bind(this,function(W){M.setSelectionCells(W)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var J=c.length,Q=J,X=[],P=mxUtils.bind(this,function(W,n){X[W]=n;if(0==
+--Q){this.spinner.stop();if(null!=x)x(X);else{var B=[];M.getModel().beginUpdate();try{for(W=0;W<X.length;W++){var K=X[W]();null!=K&&(B=B.concat(K))}}finally{M.getModel().endUpdate()}}p(B)}}),V=0;V<J;V++)mxUtils.bind(this,function(W){var n=c[W];if(null!=n){var B=new FileReader;B.onload=mxUtils.bind(this,function(K){if(null==v||v(n))if("image/"==n.type.substring(0,6))if("image/svg"==n.type.substring(0,9)){var R=Graph.clipSvgDataUri(K.target.result),O=R.indexOf(",");O=decodeURIComponent(escape(atob(R.substring(O+
+1))));var U=mxUtils.parseXml(O);O=U.getElementsByTagName("svg");if(0<O.length){O=O[0];var S=N?null:O.getAttribute("content");null!=S&&"<"!=S.charAt(0)&&"%"!=S.charAt(0)&&(S=unescape(window.atob?atob(S):Base64.decode(S,!0)));null!=S&&"%"==S.charAt(0)&&(S=decodeURIComponent(S));null==S||"<mxfile "!==S.substring(0,8)&&"<mxGraphModel "!==S.substring(0,14)?P(W,mxUtils.bind(this,function(){try{if(null!=U){var ba=U.getElementsByTagName("svg");if(0<ba.length){var aa=ba[0],da=aa.getAttribute("width"),ha=aa.getAttribute("height");
+da=null!=da&&"%"!=da.charAt(da.length-1)?parseFloat(da):NaN;ha=null!=ha&&"%"!=ha.charAt(ha.length-1)?parseFloat(ha):NaN;var ma=aa.getAttribute("viewBox");if(null==ma||0==ma.length)aa.setAttribute("viewBox","0 0 "+da+" "+ha);else if(isNaN(da)||isNaN(ha)){var Z=ma.split(" ");3<Z.length&&(da=parseFloat(Z[2]),ha=parseFloat(Z[3]))}R=Editor.createSvgDataUri(mxUtils.getXml(aa));var Fa=Math.min(1,Math.min(k/Math.max(1,da)),k/Math.max(1,ha)),Ca=m(R,n.type,e+W*F,g+W*F,Math.max(1,Math.round(da*Fa)),Math.max(1,
+Math.round(ha*Fa)),n.name);if(isNaN(da)||isNaN(ha)){var Ba=new Image;Ba.onload=mxUtils.bind(this,function(){da=Math.max(1,Ba.width);ha=Math.max(1,Ba.height);Ca[0].geometry.width=da;Ca[0].geometry.height=ha;aa.setAttribute("viewBox","0 0 "+da+" "+ha);R=Editor.createSvgDataUri(mxUtils.getXml(aa));var Ga=R.indexOf(";");0<Ga&&(R=R.substring(0,Ga)+R.substring(R.indexOf(",",Ga+1)));M.setCellStyles("image",R,[Ca[0]])});Ba.src=Editor.createSvgDataUri(mxUtils.getXml(aa))}return Ca}}}catch(Ga){}return null})):
+P(W,mxUtils.bind(this,function(){return m(S,"text/xml",e+W*F,g+W*F,0,0,n.name)}))}else P(W,mxUtils.bind(this,function(){return null}))}else{O=!1;if("image/png"==n.type){var T=N?null:this.extractGraphModelFromPng(K.target.result);if(null!=T&&0<T.length){var Y=new Image;Y.src=K.target.result;P(W,mxUtils.bind(this,function(){return m(T,"text/xml",e+W*F,g+W*F,Y.width,Y.height,n.name)}));O=!0}}O||(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(K.target.result,mxUtils.bind(this,function(ba){this.resizeImage(ba,K.target.result,mxUtils.bind(this,function(aa,da,ha){P(W,mxUtils.bind(this,function(){if(null!=aa&&aa.length<y){var ma=D&&this.isResampleImageSize(n.size,L)?Math.min(1,Math.min(k/da,k/ha)):1;return m(aa,n.type,e+W*F,g+W*F,Math.round(da*ma),Math.round(ha*ma),n.name)}this.handleError({message:mxResources.get("imageTooBig")});
+return null}))}),D,k,L,n.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else R=K.target.result,m(R,n.type,e+W*F,g+W*F,240,160,n.name,function(ba){P(W,function(){return ba})},n)});/(\.v(dx|sdx?))($|\?)/i.test(n.name)||/(\.vs(x|sx?))($|\?)/i.test(n.name)?m(null,n.type,e+W*F,g+W*F,240,160,n.name,function(K){P(W,function(){return K})},n):"image"==n.type.substring(0,5)||"application/pdf"==n.type?B.readAsDataURL(n):B.readAsText(n)}})(V)});if(z){z=
+[];for(G=0;G<c.length;G++)z.push(c[G]);c=z;this.confirmImageResize(function(M){D=M;H()},A)}else H()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(c,e){e=null!=e?e:!1;var g=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},k=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():
null,m=function(p,v){if(p||e)mxSettings.setResizeImages(p?v:null),mxSettings.save();g();c(v)};null==k||e?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(p){m(p,!0)},function(p){m(p,!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):m(!1,k)};EditorUi.prototype.parseFile=function(c,e,g){g=null!=g?g:c.name;var k=new FileReader;k.onload=mxUtils.bind(this,function(){this.parseFileData(k.result,e,g)});k.readAsText(c)};EditorUi.prototype.parseFileData=function(c,e,g){var k=new XMLHttpRequest;k.open("POST",OPEN_URL);k.setRequestHeader("Content-Type","application/x-www-form-urlencoded");k.onreadystatechange=function(){e(k)};k.send("format=xml&filename="+encodeURIComponent(g)+"&data="+encodeURIComponent(c));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",
-action:"size_"+file.size})}catch(m){}};EditorUi.prototype.isResampleImageSize=function(c,e){e=null!=e?e:this.resampleThreshold;return c>e};EditorUi.prototype.resizeImage=function(c,e,g,k,m,p,v){m=null!=m?m:this.maxImageSize;var x=Math.max(1,c.width),z=Math.max(1,c.height);if(k&&this.isResampleImageSize(null!=v?v:e.length,p))try{var y=Math.max(x/m,z/m);if(1<y){var L=Math.round(x/y),N=Math.round(z/y),J=document.createElement("canvas");J.width=L;J.height=N;J.getContext("2d").drawImage(c,0,0,L,N);var q=
-J.toDataURL();if(q.length<e.length){var D=document.createElement("canvas");D.width=L;D.height=N;var A=D.toDataURL();q!==A&&(e=q,x=L,z=N)}}}catch(C){}g(e,x,z)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)};EditorUi.prototype.loadImage=function(c,e,g){try{var k=new Image;k.onload=function(){k.width=0<k.width?k.width:120;k.height=0<k.height?k.height:120;e(k)};null!=g&&(k.onerror=g);k.src=c}catch(m){if(null!=g)g(m);else throw m;}};EditorUi.prototype.getDefaultSketchMode=
+action:"size_"+file.size})}catch(m){}};EditorUi.prototype.isResampleImageSize=function(c,e){e=null!=e?e:this.resampleThreshold;return c>e};EditorUi.prototype.resizeImage=function(c,e,g,k,m,p,v){m=null!=m?m:this.maxImageSize;var x=Math.max(1,c.width),A=Math.max(1,c.height);if(k&&this.isResampleImageSize(null!=v?v:e.length,p))try{var y=Math.max(x/m,A/m);if(1<y){var L=Math.round(x/y),N=Math.round(A/y),I=document.createElement("canvas");I.width=L;I.height=N;I.getContext("2d").drawImage(c,0,0,L,N);var q=
+I.toDataURL();if(q.length<e.length){var D=document.createElement("canvas");D.width=L;D.height=N;var z=D.toDataURL();q!==z&&(e=q,x=L,A=N)}}}catch(C){}g(e,x,A)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)};EditorUi.prototype.loadImage=function(c,e,g){try{var k=new Image;k.onload=function(){k.width=0<k.width?k.width:120;k.height=0<k.height?k.height:120;e(k)};null!=g&&(k.onerror=g);k.src=c}catch(m){if(null!=g)g(m);else throw m;}};EditorUi.prototype.getDefaultSketchMode=
function(){var c="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?urlParams.rough:c)};var t=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:this.getDefaultSketchMode()),null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=
mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());var c=this,e=this.editor.graph;Editor.isDarkMode()&&(e.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);Graph.touchStyle&&(e.panningHandler.isPanningTrigger=function(C){var G=C.getEvent();return null==C.getState()&&!mxEvent.isMouseEvent(G)&&!e.freehand.isDrawing()||mxEvent.isPopupTrigger(G)&&(null==C.getState()||mxEvent.isControlDown(G)||mxEvent.isShiftDown(G))});e.cellEditor.editPlantUmlData=function(C,
-G,M){var H=JSON.parse(M);G=new TextareaDialog(c,mxResources.get("plantUml")+":",H.data,function(F){null!=F&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(F,H.format,function(I,R,X){c.spinner.stop();e.getModel().beginUpdate();try{if("txt"==H.format)e.labelChanged(C,"<pre>"+I+"</pre>"),e.updateCellSize(C,!0);else{e.setCellStyles("image",c.convertDataUri(I),[C]);var O=e.model.getGeometry(C);null!=O&&(O=O.clone(),O.width=R,O.height=X,e.cellsResized([C],[O],!1))}e.setAttributeForCell(C,
-"plantUmlData",JSON.stringify({data:F,format:H.format}))}finally{e.getModel().endUpdate()}},function(I){c.handleError(I)})},null,null,400,220);c.showDialog(G.container,420,300,!0,!0);G.init()};e.cellEditor.editMermaidData=function(C,G,M){var H=JSON.parse(M);G=new TextareaDialog(c,mxResources.get("mermaid")+":",H.data,function(F){null!=F&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generateMermaidImage(F,H.config,function(I,R,X){c.spinner.stop();e.getModel().beginUpdate();try{e.setCellStyles("image",
-I,[C]);var O=e.model.getGeometry(C);null!=O&&(O=O.clone(),O.width=Math.max(O.width,R),O.height=Math.max(O.height,X),e.cellsResized([C],[O],!1));e.setAttributeForCell(C,"mermaidData",JSON.stringify({data:F,config:H.config},null,2))}finally{e.getModel().endUpdate()}},function(I){c.handleError(I)})},null,null,400,220);c.showDialog(G.container,420,300,!0,!0);G.init()};var g=e.cellEditor.startEditing;e.cellEditor.startEditing=function(C,G){try{var M=this.graph.getAttributeForCell(C,"plantUmlData");if(null!=
-M)this.editPlantUmlData(C,G,M);else if(M=this.graph.getAttributeForCell(C,"mermaidData"),null!=M)this.editMermaidData(C,G,M);else{var H=e.getCellStyle(C);"1"==mxUtils.getValue(H,"metaEdit","0")?c.showDataDialog(C):g.apply(this,arguments)}}catch(F){c.handleError(F)}};e.getLinkTitle=function(C){return c.getLinkTitle(C)};e.customLinkClicked=function(C){var G=!1;try{c.handleCustomLink(C),G=!0}catch(M){c.handleError(M)}return G};var k=e.parseBackgroundImage;e.parseBackgroundImage=function(C){var G=k.apply(this,
+G,H){var M=JSON.parse(H);G=new TextareaDialog(c,mxResources.get("plantUml")+":",M.data,function(F){null!=F&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(F,M.format,function(J,Q,X){c.spinner.stop();e.getModel().beginUpdate();try{if("txt"==M.format)e.labelChanged(C,"<pre>"+J+"</pre>"),e.updateCellSize(C,!0);else{e.setCellStyles("image",c.convertDataUri(J),[C]);var P=e.model.getGeometry(C);null!=P&&(P=P.clone(),P.width=Q,P.height=X,e.cellsResized([C],[P],!1))}e.setAttributeForCell(C,
+"plantUmlData",JSON.stringify({data:F,format:M.format}))}finally{e.getModel().endUpdate()}},function(J){c.handleError(J)})},null,null,400,220);c.showDialog(G.container,420,300,!0,!0);G.init()};e.cellEditor.editMermaidData=function(C,G,H){var M=JSON.parse(H);G=new TextareaDialog(c,mxResources.get("mermaid")+":",M.data,function(F){null!=F&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generateMermaidImage(F,M.config,function(J,Q,X){c.spinner.stop();e.getModel().beginUpdate();try{e.setCellStyles("image",
+J,[C]);var P=e.model.getGeometry(C);null!=P&&(P=P.clone(),P.width=Math.max(P.width,Q),P.height=Math.max(P.height,X),e.cellsResized([C],[P],!1));e.setAttributeForCell(C,"mermaidData",JSON.stringify({data:F,config:M.config},null,2))}finally{e.getModel().endUpdate()}},function(J){c.handleError(J)})},null,null,400,220);c.showDialog(G.container,420,300,!0,!0);G.init()};var g=e.cellEditor.startEditing;e.cellEditor.startEditing=function(C,G){try{var H=this.graph.getAttributeForCell(C,"plantUmlData");if(null!=
+H)this.editPlantUmlData(C,G,H);else if(H=this.graph.getAttributeForCell(C,"mermaidData"),null!=H)this.editMermaidData(C,G,H);else{var M=e.getCellStyle(C);"1"==mxUtils.getValue(M,"metaEdit","0")?c.showDataDialog(C):g.apply(this,arguments)}}catch(F){c.handleError(F)}};e.getLinkTitle=function(C){return c.getLinkTitle(C)};e.customLinkClicked=function(C){var G=!1;try{c.handleCustomLink(C),G=!0}catch(H){c.handleError(H)}return G};var k=e.parseBackgroundImage;e.parseBackgroundImage=function(C){var G=k.apply(this,
arguments);null!=G&&null!=G.src&&Graph.isPageLink(G.src)&&(G={originalSrc:G.src});return G};var m=e.setBackgroundImage;e.setBackgroundImage=function(C){null!=C&&null!=C.originalSrc&&(C=c.createImageForPageLink(C.originalSrc,c.currentPage,this));m.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){e.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){e.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",
-mxUtils.bind(this,function(C,G){C=null!=e.backgroundImage?e.backgroundImage.originalSrc:null;if(null!=C){var M=C.indexOf(",");if(0<M)for(C=C.substring(M+1),G=G.getProperty("patches"),M=0;M<G.length;M++)if(null!=G[M][EditorUi.DIFF_UPDATE]&&null!=G[M][EditorUi.DIFF_UPDATE][C]||null!=G[M][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(G[M][EditorUi.DIFF_REMOVE],C)){e.refreshBackgroundImage();break}}}));var p=e.getBackgroundImageObject;e.getBackgroundImageObject=function(C,G){var M=p.apply(this,arguments);
-if(null!=M&&null!=M.originalSrc)if(!G)M={src:M.originalSrc};else if(G&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var H=this.stylesheet,F=this.shapeForegroundColor,I=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";M=c.createImageForPageLink(M.originalSrc);this.shapeBackgroundColor=I;this.shapeForegroundColor=F;this.stylesheet=H}return M};var v=this.clearDefaultStyle;this.clearDefaultStyle=function(){v.apply(this,
+mxUtils.bind(this,function(C,G){C=null!=e.backgroundImage?e.backgroundImage.originalSrc:null;if(null!=C){var H=C.indexOf(",");if(0<H)for(C=C.substring(H+1),G=G.getProperty("patches"),H=0;H<G.length;H++)if(null!=G[H][EditorUi.DIFF_UPDATE]&&null!=G[H][EditorUi.DIFF_UPDATE][C]||null!=G[H][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(G[H][EditorUi.DIFF_REMOVE],C)){e.refreshBackgroundImage();break}}}));var p=e.getBackgroundImageObject;e.getBackgroundImageObject=function(C,G){var H=p.apply(this,arguments);
+if(null!=H&&null!=H.originalSrc)if(!G)H={src:H.originalSrc};else if(G&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var M=this.stylesheet,F=this.shapeForegroundColor,J=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";H=c.createImageForPageLink(H.originalSrc);this.shapeBackgroundColor=J;this.shapeForegroundColor=F;this.stylesheet=M}return H};var v=this.clearDefaultStyle;this.clearDefaultStyle=function(){v.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 x=c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(C){C=null!=C?C:"";"1"==urlParams.dev&&(C+=(0<C.length?"&":"?")+"dev=1");return x.apply(this,arguments)};
-var z=e.addClickHandler;e.addClickHandler=function(C,G,M){var H=G;G=function(F,I){if(null==I){var R=mxEvent.getSource(F);"a"==R.nodeName.toLowerCase()&&(I=R.getAttribute("href"))}null!=I&&e.isCustomLink(I)&&(mxEvent.isTouchEvent(F)||!mxEvent.isPopupTrigger(F))&&e.customLinkClicked(I)&&mxEvent.consume(F);null!=H&&H(F,I)};z.call(this,C,G,M)};t.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(e.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var y=Menus.prototype.addPopupMenuEditItems;
-this.menus.addPopupMenuEditItems=function(C,G,M){c.editor.graph.isSelectionEmpty()?y.apply(this,arguments):c.menus.addMenuItems(C,"delete - cut copy copyAsImage - duplicate".split(" "),null,M)}}c.actions.get("print").funct=function(){c.showDialog((new PrintDialog(c)).container,360,null!=c.pages&&1<c.pages.length?470:390,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var L=e.getExportVariables;e.getExportVariables=function(){var C=L.apply(this,arguments),G=c.getCurrentFile();null!=
+var A=e.addClickHandler;e.addClickHandler=function(C,G,H){var M=G;G=function(F,J){if(null==J){var Q=mxEvent.getSource(F);"a"==Q.nodeName.toLowerCase()&&(J=Q.getAttribute("href"))}null!=J&&e.isCustomLink(J)&&(mxEvent.isTouchEvent(F)||!mxEvent.isPopupTrigger(F))&&e.customLinkClicked(J)&&mxEvent.consume(F);null!=M&&M(F,J)};A.call(this,C,G,H)};t.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(e.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var y=Menus.prototype.addPopupMenuEditItems;
+this.menus.addPopupMenuEditItems=function(C,G,H){c.editor.graph.isSelectionEmpty()?y.apply(this,arguments):c.menus.addMenuItems(C,"delete - cut copy copyAsImage - duplicate".split(" "),null,H)}}c.actions.get("print").funct=function(){c.showDialog((new PrintDialog(c)).container,360,null!=c.pages&&1<c.pages.length?470:390,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var L=e.getExportVariables;e.getExportVariables=function(){var C=L.apply(this,arguments),G=c.getCurrentFile();null!=
G&&(C.filename=G.getTitle());C.pagecount=null!=c.pages?c.pages.length:1;C.page=null!=c.currentPage?c.currentPage.getName():"";C.pagenumber=null!=c.pages&&null!=c.currentPage?mxUtils.indexOf(c.pages,c.currentPage)+1:1;return C};var N=e.getGlobalVariable;e.getGlobalVariable=function(C){var G=c.getCurrentFile();return"filename"==C&&null!=G?G.getTitle():"page"==C&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==C?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:
-"pagecount"==C?null!=c.pages?c.pages.length:1:N.apply(this,arguments)};var J=e.labelLinkClicked;e.labelLinkClicked=function(C,G,M){var H=G.getAttribute("href");if(null==H||!e.isCustomLink(H)||!mxEvent.isTouchEvent(M)&&mxEvent.isPopupTrigger(M))J.apply(this,arguments);else{if(!e.isEnabled()||null!=C&&e.isCellLocked(C.cell))e.customLinkClicked(H),e.getRubberband().reset();mxEvent.consume(M)}};this.editor.getOrCreateFilename=function(){var C=c.defaultFilename,G=c.getCurrentFile();null!=G&&(C=null!=G.getTitle()?
+"pagecount"==C?null!=c.pages?c.pages.length:1:N.apply(this,arguments)};var I=e.labelLinkClicked;e.labelLinkClicked=function(C,G,H){var M=G.getAttribute("href");if(null==M||!e.isCustomLink(M)||!mxEvent.isTouchEvent(H)&&mxEvent.isPopupTrigger(H))I.apply(this,arguments);else{if(!e.isEnabled()||null!=C&&e.isCellLocked(C.cell))e.customLinkClicked(M),e.getRubberband().reset();mxEvent.consume(H)}};this.editor.getOrCreateFilename=function(){var C=c.defaultFilename,G=c.getCurrentFile();null!=G&&(C=null!=G.getTitle()?
G.getTitle():C);return C};var q=this.actions.get("print");q.setEnabled(!mxClient.IS_IOS||!navigator.standalone);q.visible=q.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"insertRectangle"),this.keyHandler.bindAction(75,
-!0,"insertEllipse",!0),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&e.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(C){var G=e.cellEditor.text2,M=null;null!=G&&(mxEvent.addListener(G,"dragleave",function(H){null!=M&&(M.parentNode.removeChild(M),M=null);H.stopPropagation();
-H.preventDefault()}),mxEvent.addListener(G,"dragover",mxUtils.bind(this,function(H){null==M&&(!mxClient.IS_IE||10<document.documentMode)&&(M=this.highlightElement(G));H.stopPropagation();H.preventDefault()})),mxEvent.addListener(G,"drop",mxUtils.bind(this,function(H){null!=M&&(M.parentNode.removeChild(M),M=null);if(0<H.dataTransfer.files.length)this.importFiles(H.dataTransfer.files,0,0,this.maxImageSize,function(I,R,X,O,W,U){e.insertImage(I,W,U)},function(){},function(I){return"image/"==I.type.substring(0,
-6)},function(I){for(var R=0;R<I.length;R++)I[R]()},mxEvent.isControlDown(H));else if(0<=mxUtils.indexOf(H.dataTransfer.types,"text/uri-list")){var F=H.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(F)?this.loadImage(decodeURIComponent(F),mxUtils.bind(this,function(I){var R=Math.max(1,I.width);I=Math.max(1,I.height);var X=this.maxImageSize;X=Math.min(1,Math.min(X/Math.max(1,R)),X/Math.max(1,I));e.insertImage(decodeURIComponent(F),R*X,I*X)})):document.execCommand("insertHTML",
-!1,H.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(H.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,H.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(H.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,H.dataTransfer.getData("text/plain"));H.stopPropagation();H.preventDefault()})))}));this.isSettingsEnabled()&&(q=this.editor.graph.view,q.setUnit(mxSettings.getUnit()),q.addListener("unitChanged",function(C,G){mxSettings.setUnit(G.getProperty("unit"));
+!0,"insertEllipse",!0),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&e.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(C){var G=e.cellEditor.text2,H=null;null!=G&&(mxEvent.addListener(G,"dragleave",function(M){null!=H&&(H.parentNode.removeChild(H),H=null);M.stopPropagation();
+M.preventDefault()}),mxEvent.addListener(G,"dragover",mxUtils.bind(this,function(M){null==H&&(!mxClient.IS_IE||10<document.documentMode)&&(H=this.highlightElement(G));M.stopPropagation();M.preventDefault()})),mxEvent.addListener(G,"drop",mxUtils.bind(this,function(M){null!=H&&(H.parentNode.removeChild(H),H=null);if(0<M.dataTransfer.files.length)this.importFiles(M.dataTransfer.files,0,0,this.maxImageSize,function(J,Q,X,P,V,W){e.insertImage(J,V,W)},function(){},function(J){return"image/"==J.type.substring(0,
+6)},function(J){for(var Q=0;Q<J.length;Q++)J[Q]()},mxEvent.isControlDown(M));else if(0<=mxUtils.indexOf(M.dataTransfer.types,"text/uri-list")){var F=M.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(F)?this.loadImage(decodeURIComponent(F),mxUtils.bind(this,function(J){var Q=Math.max(1,J.width);J=Math.max(1,J.height);var X=this.maxImageSize;X=Math.min(1,Math.min(X/Math.max(1,Q)),X/Math.max(1,J));e.insertImage(decodeURIComponent(F),Q*X,J*X)})):document.execCommand("insertHTML",
+!1,M.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(M.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,M.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(M.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,M.dataTransfer.getData("text/plain"));M.stopPropagation();M.preventDefault()})))}));this.isSettingsEnabled()&&(q=this.editor.graph.view,q.setUnit(mxSettings.getUnit()),q.addListener("unitChanged",function(C,G){mxSettings.setUnit(G.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,q.unit),this.refresh());if("1"==urlParams.styledev){q=document.getElementById("geFooter");null!=q&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left=
"2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),q.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(C,G){0<this.editor.graph.getSelectionCount()?(C=this.editor.graph.getSelectionCell(),
-C=this.editor.graph.getModel().getStyle(C),this.styleInput.value=C||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var D=this.isSelectionAllowed;this.isSelectionAllowed=function(C){return mxEvent.getSource(C)==this.styleInput?!0:D.apply(this,arguments)}}q=document.getElementById("geInfo");null!=q&&q.parentNode.removeChild(q);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var A=null;mxEvent.addListener(e.container,"dragleave",function(C){e.isEnabled()&&
-(null!=A&&(A.parentNode.removeChild(A),A=null),C.stopPropagation(),C.preventDefault())});mxEvent.addListener(e.container,"dragover",mxUtils.bind(this,function(C){null==A&&(!mxClient.IS_IE||10<document.documentMode)&&(A=this.highlightElement(e.container));null!=this.sidebar&&this.sidebar.hideTooltip();C.stopPropagation();C.preventDefault()}));mxEvent.addListener(e.container,"drop",mxUtils.bind(this,function(C){null!=A&&(A.parentNode.removeChild(A),A=null);if(e.isEnabled()){var G=mxUtils.convertPoint(e.container,
-mxEvent.getClientX(C),mxEvent.getClientY(C)),M=C.dataTransfer.files,H=e.view.translate,F=e.view.scale,I=G.x/F-H.x,R=G.y/F-H.y;if(0<M.length)G=1==M.length&&this.isBlankFile()&&!this.canUndo()&&("image/svg"===M[0].type.substring(0,9)||"image/"!==M[0].type.substring(0,6)||/(\.drawio.png)$/i.test(M[0].name)),"1"!=urlParams.embed&&(mxEvent.isShiftDown(C)||G)?(!mxEvent.isShiftDown(C)&&G&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(M,!0)):(mxEvent.isAltDown(C)&&(R=I=null),this.importFiles(M,
-I,R,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(C),null,null,mxEvent.isShiftDown(C),C));else{mxEvent.isAltDown(C)&&(R=I=0);var X=0<=mxUtils.indexOf(C.dataTransfer.types,"text/uri-list")?C.dataTransfer.getData("text/uri-list"):null;M=this.extractGraphModelFromEvent(C,null!=this.pages);if(null!=M)e.setSelectionCells(this.importXml(M,I,R,!0));else if(0<=mxUtils.indexOf(C.dataTransfer.types,"text/html")){var O=C.dataTransfer.getData("text/html");M=document.createElement("div");M.innerHTML=
-e.sanitizeHtml(O);var W=null;G=M.getElementsByTagName("img");null!=G&&1==G.length?(O=G[0].getAttribute("src"),null==O&&(O=G[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(O)||(W=!0)):(G=M.getElementsByTagName("a"),null!=G&&1==G.length?O=G[0].getAttribute("href"):(M=M.getElementsByTagName("pre"),null!=M&&1==M.length&&(O=mxUtils.getTextContent(M[0]))));var U=!0,n=mxUtils.bind(this,function(){e.setSelectionCells(this.insertTextAt(O,I,R,!0,W,null,U,mxEvent.isControlDown(C)))});W&&null!=
-O&&O.length>this.resampleThreshold?this.confirmImageResize(function(B){U=B;n()},mxEvent.isControlDown(C)):n()}else null!=X&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(X)?this.loadImage(decodeURIComponent(X),mxUtils.bind(this,function(B){var K=Math.max(1,B.width);B=Math.max(1,B.height);var Q=this.maxImageSize;Q=Math.min(1,Math.min(Q/Math.max(1,K)),Q/Math.max(1,B));e.setSelectionCell(e.insertVertex(null,null,"",I,R,K*Q,B*Q,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-X+";"))}),mxUtils.bind(this,function(B){e.setSelectionCells(this.insertTextAt(X,I,R,!0))})):0<=mxUtils.indexOf(C.dataTransfer.types,"text/plain")&&e.setSelectionCells(this.insertTextAt(C.dataTransfer.getData("text/plain"),I,R,!0))}}C.stopPropagation();C.preventDefault()}),!1)}e.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var c=this.editor.graph;c.container.addEventListener("paste",
-mxUtils.bind(this,function(e){if(!mxEvent.isConsumed(e))try{for(var g=e.clipboardData||e.originalEvent.clipboardData,k=!1,m=0;m<g.types.length;m++)if("text/"===g.types[m].substring(0,5)){k=!0;break}if(!k){var p=g.items;for(index in p){var v=p[index];if("file"===v.kind){if(c.isEditing())this.importFiles([v.getAsFile()],0,0,this.maxImageSize,function(z,y,L,N,J,q){c.insertImage(z,J,q)},function(){},function(z){return"image/"==z.type.substring(0,6)},function(z){for(var y=0;y<z.length;y++)z[y]()});else{var x=
-this.editor.graph.getInsertPoint();this.importFiles([v.getAsFile()],x.x,x.y,this.maxImageSize);mxEvent.consume(e)}break}}}}catch(z){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function c(){window.setTimeout(function(){g.innerHTML="&nbsp;";g.focus();document.execCommand("selectAll",!1,null)},0)}var e=this.editor.graph,g=document.createElement("div");g.setAttribute("autocomplete","off");g.setAttribute("autocorrect","off");g.setAttribute("autocapitalize","off");g.setAttribute("spellcheck",
+C=this.editor.graph.getModel().getStyle(C),this.styleInput.value=C||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var D=this.isSelectionAllowed;this.isSelectionAllowed=function(C){return mxEvent.getSource(C)==this.styleInput?!0:D.apply(this,arguments)}}q=document.getElementById("geInfo");null!=q&&q.parentNode.removeChild(q);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var z=null;mxEvent.addListener(e.container,"dragleave",function(C){e.isEnabled()&&
+(null!=z&&(z.parentNode.removeChild(z),z=null),C.stopPropagation(),C.preventDefault())});mxEvent.addListener(e.container,"dragover",mxUtils.bind(this,function(C){null==z&&(!mxClient.IS_IE||10<document.documentMode)&&(z=this.highlightElement(e.container));null!=this.sidebar&&this.sidebar.hideTooltip();C.stopPropagation();C.preventDefault()}));mxEvent.addListener(e.container,"drop",mxUtils.bind(this,function(C){null!=z&&(z.parentNode.removeChild(z),z=null);if(e.isEnabled()){var G=mxUtils.convertPoint(e.container,
+mxEvent.getClientX(C),mxEvent.getClientY(C)),H=C.dataTransfer.files,M=e.view.translate,F=e.view.scale,J=G.x/F-M.x,Q=G.y/F-M.y;if(0<H.length)G=1==H.length&&this.isBlankFile()&&!this.canUndo()&&("image/svg"===H[0].type.substring(0,9)||"image/"!==H[0].type.substring(0,6)||/(\.drawio.png)$/i.test(H[0].name)),"1"!=urlParams.embed&&(mxEvent.isShiftDown(C)||G)?(!mxEvent.isShiftDown(C)&&G&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(H,!0)):(mxEvent.isAltDown(C)&&(Q=J=null),this.importFiles(H,
+J,Q,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(C),null,null,mxEvent.isShiftDown(C),C));else{mxEvent.isAltDown(C)&&(Q=J=0);var X=0<=mxUtils.indexOf(C.dataTransfer.types,"text/uri-list")?C.dataTransfer.getData("text/uri-list"):null;H=this.extractGraphModelFromEvent(C,null!=this.pages);if(null!=H)e.setSelectionCells(this.importXml(H,J,Q,!0));else if(0<=mxUtils.indexOf(C.dataTransfer.types,"text/html")){var P=C.dataTransfer.getData("text/html");H=document.createElement("div");H.innerHTML=
+e.sanitizeHtml(P);var V=null;G=H.getElementsByTagName("img");null!=G&&1==G.length?(P=G[0].getAttribute("src"),null==P&&(P=G[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(P)||(V=!0)):(G=H.getElementsByTagName("a"),null!=G&&1==G.length?P=G[0].getAttribute("href"):(H=H.getElementsByTagName("pre"),null!=H&&1==H.length&&(P=mxUtils.getTextContent(H[0]))));var W=!0,n=mxUtils.bind(this,function(){e.setSelectionCells(this.insertTextAt(P,J,Q,!0,V,null,W,mxEvent.isControlDown(C)))});V&&null!=
+P&&P.length>this.resampleThreshold?this.confirmImageResize(function(B){W=B;n()},mxEvent.isControlDown(C)):n()}else null!=X&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(X)?this.loadImage(decodeURIComponent(X),mxUtils.bind(this,function(B){var K=Math.max(1,B.width);B=Math.max(1,B.height);var R=this.maxImageSize;R=Math.min(1,Math.min(R/Math.max(1,K)),R/Math.max(1,B));e.setSelectionCell(e.insertVertex(null,null,"",J,Q,K*R,B*R,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+X+";"))}),mxUtils.bind(this,function(B){e.setSelectionCells(this.insertTextAt(X,J,Q,!0))})):0<=mxUtils.indexOf(C.dataTransfer.types,"text/plain")&&e.setSelectionCells(this.insertTextAt(C.dataTransfer.getData("text/plain"),J,Q,!0))}}C.stopPropagation();C.preventDefault()}),!1)}e.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var c=this.editor.graph;c.container.addEventListener("paste",
+mxUtils.bind(this,function(e){if(!mxEvent.isConsumed(e))try{for(var g=e.clipboardData||e.originalEvent.clipboardData,k=!1,m=0;m<g.types.length;m++)if("text/"===g.types[m].substring(0,5)){k=!0;break}if(!k){var p=g.items;for(index in p){var v=p[index];if("file"===v.kind){if(c.isEditing())this.importFiles([v.getAsFile()],0,0,this.maxImageSize,function(A,y,L,N,I,q){c.insertImage(A,I,q)},function(){},function(A){return"image/"==A.type.substring(0,6)},function(A){for(var y=0;y<A.length;y++)A[y]()});else{var x=
+this.editor.graph.getInsertPoint();this.importFiles([v.getAsFile()],x.x,x.y,this.maxImageSize);mxEvent.consume(e)}break}}}}catch(A){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function c(){window.setTimeout(function(){g.innerHTML="&nbsp;";g.focus();document.execCommand("selectAll",!1,null)},0)}var e=this.editor.graph,g=document.createElement("div");g.setAttribute("autocomplete","off");g.setAttribute("autocorrect","off");g.setAttribute("autocapitalize","off");g.setAttribute("spellcheck",
"false");g.style.textRendering="optimizeSpeed";g.style.fontFamily="monospace";g.style.wordBreak="break-all";g.style.background="transparent";g.style.color="transparent";g.style.position="absolute";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.display="block";g.style.fontSize="1";g.style.zIndex="-1";g.style.resize="none";g.style.outline="none";g.style.width="1px";g.style.height="1px";mxUtils.setOpacity(g,0);g.contentEditable=!0;g.innerHTML="&nbsp;";var k=!1;this.keyHandler.bindControlKey(88,
null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(p){var v=mxEvent.getSource(p);null==e.container||!e.isEnabled()||e.isMouseDown||e.isEditing()||null!=this.dialog||"INPUT"==v.nodeName||"TEXTAREA"==v.nodeName||224!=p.keyCode&&(mxClient.IS_MAC||17!=p.keyCode)&&(!mxClient.IS_MAC||91!=p.keyCode&&93!=p.keyCode)||k||(g.style.left=e.container.scrollLeft+10+"px",g.style.top=e.container.scrollTop+10+"px",
e.container.appendChild(g),k=!0,g.focus(),document.execCommand("selectAll",!1,null))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(p){var v=p.keyCode;window.setTimeout(mxUtils.bind(this,function(){!k||224!=v&&17!=v&&91!=v&&93!=v||(k=!1,e.isEditing()||null!=this.dialog||null==e.container||e.container.focus(),g.parentNode.removeChild(g),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(g,"copy",mxUtils.bind(this,function(p){if(e.isEnabled())try{mxClipboard.copy(e),
@@ -12003,14 +11999,14 @@ mxUtils.bind(this,function(c,e){"1"!=urlParams["ext-fonts"]?mxSettings.setCustom
mxSettings.save()}));this.editor.graph.pageFormat=null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(c,e){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor=mxSettings.getGridColor(!0);this.editor.graph.view.defaultGridColor=mxSettings.getGridColor(!1);
this.addListener("gridColorChanged",mxUtils.bind(this,function(c,e){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(c,e){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),
this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(c,e,g){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&
-this.editor.exportToCanvas(mxUtils.bind(this,function(k,m){try{this.spinner.stop();var p=this.createImageDataUri(k,e,"png"),v=parseInt(m.getAttribute("width")),x=parseInt(m.getAttribute("height"));this.writeImageToClipboard(p,v,x,mxUtils.bind(this,function(z){this.handleError(z)}))}catch(z){this.handleError(z)}}),null,null,null,mxUtils.bind(this,function(k){this.spinner.stop();this.handleError(k)}),null,null,null!=g?g:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,
+this.editor.exportToCanvas(mxUtils.bind(this,function(k,m){try{this.spinner.stop();var p=this.createImageDataUri(k,e,"png"),v=parseInt(m.getAttribute("width")),x=parseInt(m.getAttribute("height"));this.writeImageToClipboard(p,v,x,mxUtils.bind(this,function(A){this.handleError(A)}))}catch(A){this.handleError(A)}}),null,null,null,mxUtils.bind(this,function(k){this.spinner.stop();this.handleError(k)}),null,null,null!=g?g:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,
null,null,null,10,null,null,!1,null,0<c.length?c:null)}catch(k){this.handleError(k)}};EditorUi.prototype.writeImageToClipboard=function(c,e,g,k){var m=this.base64ToBlob(c.substring(c.indexOf(",")+1),"image/png");c=new ClipboardItem({"image/png":m,"text/html":new Blob(['<img src="'+c+'" width="'+e+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([c])["catch"](k)};EditorUi.prototype.copyCells=function(c,e){var g=this.editor.graph;if(g.isSelectionEmpty())c.innerText="";else{var k=
mxUtils.sortCells(g.model.getTopmostCells(g.getSelectionCells())),m=mxUtils.getXml(g.encodeCells(k));mxUtils.setTextContent(c,encodeURIComponent(m));e?(g.removeCells(k,!1),g.lastPasteXml=null):(g.lastPasteXml=m,g.pasteCounter=0);c.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var c=null;if(Editor.enableNativeCipboard){var e=this.editor.graph;e.isSelectionEmpty()||(c=mxUtils.sortCells(e.getExportableCells(e.model.getTopmostCells(e.getSelectionCells()))),
e=mxUtils.getXml(e.encodeCells(c)),navigator.clipboard.writeText(e))}return c};EditorUi.prototype.pasteXml=function(c,e,g,k){var m=this.editor.graph,p=null;m.lastPasteXml==c?m.pasteCounter++:(m.lastPasteXml=c,m.pasteCounter=0);var v=m.pasteCounter*m.gridSize;if(g||this.isCompatibleString(c))p=this.importXml(c,v,v),m.setSelectionCells(p);else if(e&&1==m.getSelectionCount()){v=m.getStartEditingCell(m.getSelectionCell(),k);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)&&"image"==m.getCurrentCellStyle(v)[mxConstants.STYLE_SHAPE])m.setCellStyles(mxConstants.STYLE_IMAGE,
c,[v]);else{m.model.beginUpdate();try{m.labelChanged(v,c),Graph.isLink(c)&&m.setLinkForCell(v,c)}finally{m.model.endUpdate()}}m.setSelectionCell(v)}else p=m.getInsertPoint(),m.isMouseInsertPoint()&&(v=0,m.lastPasteXml==c&&0<m.pasteCounter&&m.pasteCounter--),p=this.insertTextAt(c,p.x+v,p.y+v,!0),m.setSelectionCells(p);m.isSelectionEmpty()||(m.scrollCellToVisible(m.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(m.view.getState(m.getSelectionCell())));return p};EditorUi.prototype.pasteCells=
-function(c,e,g,k){if(!mxEvent.isConsumed(c)){var m=e,p=!1;if(g&&null!=c.clipboardData&&c.clipboardData.getData){var v=c.clipboardData.getData("text/plain"),x=!1;if(null!=v&&0<v.length&&"%3CmxGraphModel%3E"==v.substring(0,18))try{var z=decodeURIComponent(v);this.isCompatibleString(z)&&(x=!0,v=z)}catch(N){}x=x?null:c.clipboardData.getData("text/html");null!=x&&0<x.length?(m=this.parseHtmlData(x),p="text/plain"!=m.getAttribute("data-type")):null!=v&&0<v.length&&(m=document.createElement("div"),mxUtils.setTextContent(m,
-x))}v=m.getElementsByTagName("span");if(null!=v&&0<v.length&&"application/vnd.lucid.chart.objects"===v[0].getAttribute("data-lucid-type"))g=v[0].getAttribute("data-lucid-content"),null!=g&&0<g.length&&(this.convertLucidChart(g,mxUtils.bind(this,function(N){var J=this.editor.graph;J.lastPasteXml==N?J.pasteCounter++:(J.lastPasteXml=N,J.pasteCounter=0);var q=J.pasteCounter*J.gridSize;J.setSelectionCells(this.importXml(N,q,q));J.scrollCellToVisible(J.getSelectionCell())}),mxUtils.bind(this,function(N){this.handleError(N)})),
-mxEvent.consume(c));else{p=p?m.innerHTML:mxUtils.trim(null==m.innerText?mxUtils.getTextContent(m):m.innerText);x=!1;try{var y=p.lastIndexOf("%3E");0<=y&&y<p.length-3&&(p=p.substring(0,y+3))}catch(N){}try{v=m.getElementsByTagName("span"),(z=null!=v&&0<v.length?mxUtils.trim(decodeURIComponent(v[0].textContent)):decodeURIComponent(p))&&(this.isCompatibleString(z)||0==z.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(x=!0,p=z)}catch(N){}try{if(null!=p&&0<p.length){if(0==p.substring(0,
+function(c,e,g,k){if(!mxEvent.isConsumed(c)){var m=e,p=!1;if(g&&null!=c.clipboardData&&c.clipboardData.getData){var v=c.clipboardData.getData("text/plain"),x=!1;if(null!=v&&0<v.length&&"%3CmxGraphModel%3E"==v.substring(0,18))try{var A=decodeURIComponent(v);this.isCompatibleString(A)&&(x=!0,v=A)}catch(N){}x=x?null:c.clipboardData.getData("text/html");null!=x&&0<x.length?(m=this.parseHtmlData(x),p="text/plain"!=m.getAttribute("data-type")):null!=v&&0<v.length&&(m=document.createElement("div"),mxUtils.setTextContent(m,
+x))}v=m.getElementsByTagName("span");if(null!=v&&0<v.length&&"application/vnd.lucid.chart.objects"===v[0].getAttribute("data-lucid-type"))g=v[0].getAttribute("data-lucid-content"),null!=g&&0<g.length&&(this.convertLucidChart(g,mxUtils.bind(this,function(N){var I=this.editor.graph;I.lastPasteXml==N?I.pasteCounter++:(I.lastPasteXml=N,I.pasteCounter=0);var q=I.pasteCounter*I.gridSize;I.setSelectionCells(this.importXml(N,q,q));I.scrollCellToVisible(I.getSelectionCell())}),mxUtils.bind(this,function(N){this.handleError(N)})),
+mxEvent.consume(c));else{p=p?m.innerHTML:mxUtils.trim(null==m.innerText?mxUtils.getTextContent(m):m.innerText);x=!1;try{var y=p.lastIndexOf("%3E");0<=y&&y<p.length-3&&(p=p.substring(0,y+3))}catch(N){}try{v=m.getElementsByTagName("span"),(A=null!=v&&0<v.length?mxUtils.trim(decodeURIComponent(v[0].textContent)):decodeURIComponent(p))&&(this.isCompatibleString(A)||0==A.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(x=!0,p=A)}catch(N){}try{if(null!=p&&0<p.length){if(0==p.substring(0,
20).replace(/\s/g,"").indexOf('{"isProtected":'))try{"undefined"!==typeof MiroImporter&&(p=(new MiroImporter).importMiroJson(JSON.parse(p)))}catch(N){console.log("Miro import error:",N)}this.pasteXml(p,k,x,c);try{mxEvent.consume(c)}catch(N){}}else if(!g){var L=this.editor.graph;L.lastPasteXml=null;L.pasteCounter=0}}catch(N){this.handleError(N)}}}e.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(c){if(Graph.fileSupport)for(var e=null,g=0;g<c.length;g++)mxEvent.addListener(c[g],"dragleave",
function(k){null!=e&&(e.parentNode.removeChild(e),e=null);k.stopPropagation();k.preventDefault()}),mxEvent.addListener(c[g],"dragover",mxUtils.bind(this,function(k){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==e&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(e=this.highlightElement());k.stopPropagation();k.preventDefault()})),mxEvent.addListener(c[g],"drop",mxUtils.bind(this,function(k){null!=e&&(e.parentNode.removeChild(e),e=null);if(this.editor.graph.isEnabled()||
"1"!=urlParams.embed)if(0<k.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(k.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(k)&&!mxEvent.isShiftDown(k)):this.openFiles(k.dataTransfer.files,!0);else{var m=this.extractGraphModelFromEvent(k);if(null==m){var p=null!=k.dataTransfer?k.dataTransfer:k.clipboardData;null!=p&&(10==document.documentMode||11==document.documentMode?m=p.getData("Text"):(m=null,m=0<=mxUtils.indexOf(p.types,
@@ -12019,7 +12015,7 @@ this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInO
null,!0)}k.stopPropagation();k.preventDefault()}))};EditorUi.prototype.highlightElement=function(c){var e=0,g=0;if(null==c){var k=document.body;var m=document.documentElement;var p=(k.clientWidth||m.clientWidth)-3;k=Math.max(k.clientHeight||0,m.clientHeight)-3}else e=c.offsetTop,g=c.offsetLeft,p=c.clientWidth,k=c.clientHeight;m=document.createElement("div");m.style.zIndex=mxPopupMenu.prototype.zIndex+2;m.style.border="3px dotted rgb(254, 137, 12)";m.style.pointerEvents="none";m.style.position="absolute";
m.style.top=e+"px";m.style.left=g+"px";m.style.width=Math.max(0,p-3)+"px";m.style.height=Math.max(0,k-3)+"px";null!=c&&c.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(m):document.body.appendChild(m);return m};EditorUi.prototype.stringToCells=function(c){c=mxUtils.parseXml(c);var e=this.editor.extractGraphModel(c.documentElement);c=[];if(null!=e){var g=new mxCodec(e.ownerDocument),k=new mxGraphModel;g.decode(e,k);e=k.getChildAt(k.getRoot(),0);for(g=0;g<k.getChildCount(e);g++)c.push(k.getChildAt(e,
g))}return c};EditorUi.prototype.openFileHandle=function(c,e,g,k,m){if(null!=e&&0<e.length){!this.useCanvasForExport&&/(\.png)$/i.test(e)?e=e.substring(0,e.length-4)+".drawio":/(\.pdf)$/i.test(e)&&(e=e.substring(0,e.length-4)+".drawio");var p=mxUtils.bind(this,function(x){e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".drawio":e+".drawio";if("<mxlibrary"==x.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,
-k);try{this.loadLibrary(new LocalLibrary(this,x,e))}catch(z){this.handleError(z,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(x,e,k)});if(/(\.v(dx|sdx?))($|\?)/i.test(e)||/(\.vs(x|sx?))($|\?)/i.test(e))this.importVisio(g,mxUtils.bind(this,function(x){this.spinner.stop();p(x)}));else if(/(\.*<graphml )/.test(c))this.importGraphML(c,mxUtils.bind(this,function(x){this.spinner.stop();p(x)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,e))this.isOffline()?
+k);try{this.loadLibrary(new LocalLibrary(this,x,e))}catch(A){this.handleError(A,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(x,e,k)});if(/(\.v(dx|sdx?))($|\?)/i.test(e)||/(\.vs(x|sx?))($|\?)/i.test(e))this.importVisio(g,mxUtils.bind(this,function(x){this.spinner.stop();p(x)}));else if(/(\.*<graphml )/.test(c))this.importGraphML(c,mxUtils.bind(this,function(x){this.spinner.stop();p(x)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,e))this.isOffline()?
(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(g,mxUtils.bind(this,function(x){4==x.readyState&&(this.spinner.stop(),200<=x.status&&299>=x.status?p(x.responseText):this.handleError({message:mxResources.get(413==x.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(c))/(\.json)$/i.test(e)&&(e=e.substring(0,e.length-5)+".drawio"),this.convertLucidChart(c,mxUtils.bind(this,
function(x){this.spinner.stop();this.openLocalFile(x,e,k)}),mxUtils.bind(this,function(x){this.spinner.stop();this.handleError(x)}));else if("<mxlibrary"==c.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,k);try{this.loadLibrary(new LocalLibrary(this,c,g.name))}catch(x){this.handleError(x,mxResources.get("errorLoadingFile"))}}else if(0==c.indexOf("PK"))this.importZipFile(g,mxUtils.bind(this,function(x){this.spinner.stop();
p(x)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(c,e,k)}));else{if("image/png"==g.type.substring(0,9))c=this.extractGraphModelFromPng(c);else if("application/pdf"==g.type){var v=Editor.extractGraphModelFromPdf(c);null!=v&&(m=null,k=!0,c=v)}this.spinner.stop();this.openLocalFile(c,e,k,m,null!=m?g:null)}}};EditorUi.prototype.openFiles=function(c,e){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var g=0;g<c.length;g++)mxUtils.bind(this,function(k){var m=
@@ -12030,63 +12026,63 @@ mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=ne
(g(mxMarker.getPackageForType(m[mxConstants.STYLE_STARTARROW])),g(mxMarker.getPackageForType(m[mxConstants.STYLE_ENDARROW])));m=k.model.getChildCount(c);for(var p=0;p<m;p++)this.addBasenamesForCell(k.model.getChildAt(c,p),e)};EditorUi.prototype.setGraphEnabled=function(c){this.diagramContainer.style.visibility=c?"":"hidden";this.formatContainer.style.visibility=c?"":"hidden";this.sidebarFooterContainer.style.display=c?"":"none";this.sidebarContainer.style.display=c?"":"none";this.hsplit.style.display=
c?"":"none";this.editor.graph.setEnabled(c);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=c?"":"hidden",this.ruler.vRuler.container.style.visibility=c?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=c?"":"hidden");c||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=
this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var c=!1;this.installMessageHandler(mxUtils.bind(this,function(e,g,k,m){c||(c=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));
-if(null==e||0==e.length)e=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,e,{}));this.mode=App.MODE_EMBED;this.setFileData(e);if(m)try{var p=this.editor.graph;p.setGridEnabled(!1);p.pageVisible=!1;var v=p.model.cells,x;for(x in v){var z=v[x];null!=z&&null!=z.style&&(z.style+=";sketch=1;"+(-1==z.style.indexOf("fontFamily=")||-1<z.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":
+if(null==e||0==e.length)e=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,e,{}));this.mode=App.MODE_EMBED;this.setFileData(e);if(m)try{var p=this.editor.graph;p.setGridEnabled(!1);p.pageVisible=!1;var v=p.model.cells,x;for(x in v){var A=v[x];null!=A&&null!=A.style&&(A.style+=";sketch=1;"+(-1==A.style.indexOf("fontFamily=")||-1<A.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":
""))}}catch(y){console.log(y)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=k?k:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?
this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(c,e){null!=c?c.getPublicUrl(e):e(null)};EditorUi.prototype.createLoadMessage=function(c){var e=this.editor.graph;return{event:c,pageVisible:e.pageVisible,translate:e.view.translate,bounds:e.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:e.view.scale,page:e.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(c){var e=this.editor.graph;
e.isEditing()&&e.stopEditing(!e.isInvokesStopCellEditing());var g=window.opener||window.parent;if(this.editor.modified){var k=e.background;if(null==k||k==mxConstants.NONE)k=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),e,null,!0,mxUtils.bind(this,function(m){g.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=c?!c:!0,data:Editor.createSvgDataUri(m)}),"*")}),null,null,!0,k,1,this.embedExportBorder)}else c||
-g.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");c||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,e.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler=function(c){var e=null,g=!1,k=!1,m=null,p=mxUtils.bind(this,function(z,y){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,p);mxEvent.addListener(window,"message",mxUtils.bind(this,function(z){if(z.source==(window.opener||window.parent)){var y=z.data,L=null,N=mxUtils.bind(this,function(S){if(null!=S&&"function"===typeof S.charAt&&"<"!=S.charAt(0))try{Editor.isPngDataUrl(S)?S=Editor.extractGraphModelFromPng(S):"data:image/svg+xml;base64,"==S.substring(0,
-26)?S=atob(S.substring(26)):"data:image/svg+xml;utf8,"==S.substring(0,24)&&(S=S.substring(24)),null!=S&&("%"==S.charAt(0)?S=decodeURIComponent(S):"<"!=S.charAt(0)&&(S=Graph.decompress(S)))}catch(Y){}return S});if("json"==urlParams.proto){var J=!1;try{y=JSON.parse(y),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[z],"data",[y])}catch(S){y=null}try{if(null==y)return;if("dialog"==y.action){this.showError(null!=y.titleKey?mxResources.get(y.titleKey):y.title,null!=y.messageKey?mxResources.get(y.messageKey):
-y.message,null!=y.buttonKey?mxResources.get(y.buttonKey):y.button);null!=y.modified&&(this.editor.modified=y.modified);return}if("layout"==y.action){this.executeLayouts(this.editor.graph.createLayouts(y.layouts));return}if("prompt"==y.action){this.spinner.stop();var q=new FilenameDialog(this,y.defaultValue||"",null!=y.okKey?mxResources.get(y.okKey):y.ok,function(S){null!=S?v.postMessage(JSON.stringify({event:"prompt",value:S,message:y}),"*"):v.postMessage(JSON.stringify({event:"prompt-cancel",message:y}),
+g.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");c||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,e.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler=function(c){var e=null,g=!1,k=!1,m=null,p=mxUtils.bind(this,function(A,y){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,p);mxEvent.addListener(window,"message",mxUtils.bind(this,function(A){if(A.source==(window.opener||window.parent)){var y=A.data,L=null,N=mxUtils.bind(this,function(T){if(null!=T&&"function"===typeof T.charAt&&"<"!=T.charAt(0))try{Editor.isPngDataUrl(T)?T=Editor.extractGraphModelFromPng(T):"data:image/svg+xml;base64,"==T.substring(0,
+26)?T=atob(T.substring(26)):"data:image/svg+xml;utf8,"==T.substring(0,24)&&(T=T.substring(24)),null!=T&&("%"==T.charAt(0)?T=decodeURIComponent(T):"<"!=T.charAt(0)&&(T=Graph.decompress(T)))}catch(Y){}return T});if("json"==urlParams.proto){var I=!1;try{y=JSON.parse(y),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[A],"data",[y])}catch(T){y=null}try{if(null==y)return;if("dialog"==y.action){this.showError(null!=y.titleKey?mxResources.get(y.titleKey):y.title,null!=y.messageKey?mxResources.get(y.messageKey):
+y.message,null!=y.buttonKey?mxResources.get(y.buttonKey):y.button);null!=y.modified&&(this.editor.modified=y.modified);return}if("layout"==y.action){this.executeLayouts(this.editor.graph.createLayouts(y.layouts));return}if("prompt"==y.action){this.spinner.stop();var q=new FilenameDialog(this,y.defaultValue||"",null!=y.okKey?mxResources.get(y.okKey):y.ok,function(T){null!=T?v.postMessage(JSON.stringify({event:"prompt",value:T,message:y}),"*"):v.postMessage(JSON.stringify({event:"prompt-cancel",message:y}),
"*")},null!=y.titleKey?mxResources.get(y.titleKey):y.title);this.showDialog(q.container,300,80,!0,!1);q.init();return}if("draft"==y.action){var D=N(y.xml);this.spinner.stop();q=new DraftDialog(this,mxResources.get("draftFound",[y.name||this.defaultFilename]),D,mxUtils.bind(this,function(){this.hideDialog();v.postMessage(JSON.stringify({event:"draft",result:"edit",message:y}),"*")}),mxUtils.bind(this,function(){this.hideDialog();v.postMessage(JSON.stringify({event:"draft",result:"discard",message:y}),
-"*")}),y.editKey?mxResources.get(y.editKey):null,y.discardKey?mxResources.get(y.discardKey):null,y.ignore?mxUtils.bind(this,function(){this.hideDialog();v.postMessage(JSON.stringify({event:"draft",result:"ignore",message:y}),"*")}):null);this.showDialog(q.container,640,480,!0,!1,mxUtils.bind(this,function(S){S&&this.actions.get("exit").funct()}));try{q.init()}catch(S){v.postMessage(JSON.stringify({event:"draft",error:S.toString(),message:y}),"*")}return}if("template"==y.action){this.spinner.stop();
-var A=1==y.enableRecent,C=1==y.enableSearch,G=1==y.enableCustomTemp;if("1"==urlParams.newTempDlg&&!y.templatesOnly&&null!=y.callback){var M=this.getCurrentUser(),H=new TemplatesDialog(this,function(S,Y,ca){S=S||this.emptyDiagramXml;v.postMessage(JSON.stringify({event:"template",xml:S,blank:S==this.emptyDiagramXml,name:Y,tempUrl:ca.url,libs:ca.libs,builtIn:null!=ca.info&&null!=ca.info.custContentId,message:y}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=M?
-M.id:null,A?mxUtils.bind(this,function(S,Y,ca){this.remoteInvoke("getRecentDiagrams",[ca],null,S,Y)}):null,C?mxUtils.bind(this,function(S,Y,ca,aa){this.remoteInvoke("searchDiagrams",[S,aa],null,Y,ca)}):null,mxUtils.bind(this,function(S,Y,ca){this.remoteInvoke("getFileContent",[S.url],null,Y,ca)}),null,G?mxUtils.bind(this,function(S){this.remoteInvoke("getCustomTemplates",null,null,S,function(){S({},0)})}):null,!1,!1,!0,!0);this.showDialog(H.container,window.innerWidth,window.innerHeight,!0,!1,null,
-!1,!0);return}q=new NewDialog(this,!1,y.templatesOnly?!1:null!=y.callback,mxUtils.bind(this,function(S,Y,ca,aa){S=S||this.emptyDiagramXml;null!=y.callback?v.postMessage(JSON.stringify({event:"template",xml:S,blank:S==this.emptyDiagramXml,name:Y,tempUrl:ca,libs:aa,builtIn:!0,message:y}),"*"):(c(S,z,S!=this.emptyDiagramXml,y.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,A?mxUtils.bind(this,function(S){this.remoteInvoke("getRecentDiagrams",[null],null,
-S,function(){S(null,"Network Error!")})}):null,C?mxUtils.bind(this,function(S,Y){this.remoteInvoke("searchDiagrams",[S,null],null,Y,function(){Y(null,"Network Error!")})}):null,mxUtils.bind(this,function(S,Y,ca){v.postMessage(JSON.stringify({event:"template",docUrl:S,info:Y,name:ca}),"*")}),null,null,G?mxUtils.bind(this,function(S){this.remoteInvoke("getCustomTemplates",null,null,S,function(){S({},0)})}):null,1==y.withoutType);this.showDialog(q.container,620,460,!0,!1,mxUtils.bind(this,function(S){this.sidebar.hideTooltip();
-S&&this.actions.get("exit").funct()}));q.init();return}if("textContent"==y.action){var F=this.getDiagramTextContent();v.postMessage(JSON.stringify({event:"textContent",data:F,message:y}),"*");return}if("status"==y.action){null!=y.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(y.messageKey))):null!=y.message&&this.editor.setStatus(mxUtils.htmlEntities(y.message));null!=y.modified&&(this.editor.modified=y.modified);return}if("spinner"==y.action){var I=null!=y.messageKey?mxResources.get(y.messageKey):
-y.message;null==y.show||y.show?this.spinner.spin(document.body,I):this.spinner.stop();return}if("exit"==y.action){this.actions.get("exit").funct();return}if("viewport"==y.action){null!=y.viewport&&(this.embedViewport=y.viewport);return}if("snapshot"==y.action){this.sendEmbeddedSvgExport(!0);return}if("export"==y.action){if("png"==y.format||"xmlpng"==y.format){if(null==y.spin&&null==y.spinKey||this.spinner.spin(document.body,null!=y.spinKey?mxResources.get(y.spinKey):y.spin)){var R=null!=y.xml?y.xml:
-this.getFileData(!0);this.editor.graph.setEnabled(!1);var X=this.editor.graph,O=mxUtils.bind(this,function(S){this.editor.graph.setEnabled(!0);this.spinner.stop();var Y=this.createLoadMessage("export");Y.format=y.format;Y.message=y;Y.data=S;Y.xml=R;v.postMessage(JSON.stringify(Y),"*")}),W=mxUtils.bind(this,function(S){null==S&&(S=Editor.blankImage);"xmlpng"==y.format&&(S=Editor.writeGraphModelToPng(S,"tEXt","mxfile",encodeURIComponent(R)));X!=this.editor.graph&&X.container.parentNode.removeChild(X.container);
-O(S)}),U=y.pageId||(null!=this.pages?y.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()!=U){var S=X.getGlobalVariable;X=this.createTemporaryGraph(X.getStylesheet());for(var Y,ca=0;ca<this.pages.length;ca++)if(this.pages[ca].getId()==U){Y=this.updatePageRoot(this.pages[ca]);break}null==Y&&(Y=this.currentPage);X.getGlobalVariable=function(ha){return"page"==ha?Y.getName():"pagenumber"==
-ha?1:S.apply(this,arguments)};document.body.appendChild(X.container);X.model.setRoot(Y.root)}if(null!=y.layerIds){var aa=X.model,da=aa.getChildCells(aa.getRoot()),ja={};for(ca=0;ca<y.layerIds.length;ca++)ja[y.layerIds[ca]]=!0;for(ca=0;ca<da.length;ca++)aa.setVisible(da[ca],ja[da[ca].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(ha){W(ha.toDataURL("image/png"))}),y.width,null,y.background,mxUtils.bind(this,function(){W(null)}),null,null,y.scale,y.transparent,y.shadow,null,X,y.border,
-null,y.grid,y.keepTheme)});null!=y.xml&&0<y.xml.length&&(g=!0,this.setFileData(R),g=!1);n()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==y.format?"1":"0")+(null!=U?"&pageId="+U:"")+(null!=y.layerIds&&0<y.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:y.layerIds})):"")+(null!=y.scale?"&scale="+y.scale:"")+"&base64=1&xml="+encodeURIComponent(R))).send(mxUtils.bind(this,function(S){200<=S.getStatus()&&299>=S.getStatus()?O("data:image/png;base64,"+S.getText()):
-W(null)}),mxUtils.bind(this,function(){W(null)}))}}else if(n=mxUtils.bind(this,function(){var S=this.createLoadMessage("export");S.message=y;if("html2"==y.format||"html"==y.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var Y=this.getXmlFileData();S.xml=mxUtils.getXml(Y);S.data=this.getFileData(null,null,!0,null,null,null,Y);S.format=y.format}else if("html"==y.format)Y=this.editor.getGraphXml(),S.data=this.getHtml(Y,this.editor.graph),S.xml=mxUtils.getXml(Y),S.format=y.format;
-else{mxSvgCanvas2D.prototype.foAltText=null;Y=null!=y.background?y.background:this.editor.graph.background;Y==mxConstants.NONE&&(Y=null);S.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);S.format="svg";var ca=mxUtils.bind(this,function(aa){this.editor.graph.setEnabled(!0);this.spinner.stop();S.data=Editor.createSvgDataUri(aa);v.postMessage(JSON.stringify(S),"*")});if("xmlsvg"==y.format)(null==y.spin&&null==y.spinKey||this.spinner.spin(document.body,null!=y.spinKey?mxResources.get(y.spinKey):
-y.spin))&&this.getEmbeddedSvg(S.xml,this.editor.graph,null,!0,ca,null,null,y.embedImages,Y,y.scale,y.border,y.shadow,y.keepTheme);else if(null==y.spin&&null==y.spinKey||this.spinner.spin(document.body,null!=y.spinKey?mxResources.get(y.spinKey):y.spin))this.editor.graph.setEnabled(!1),Y=this.editor.graph.getSvg(Y,y.scale,y.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||y.shadow,null,y.keepTheme),(this.editor.graph.shadowVisible||y.shadow)&&this.editor.graph.addSvgShadow(Y),this.embedFonts(Y,
-mxUtils.bind(this,function(aa){y.embedImages||null==y.embedImages?this.editor.convertImages(aa,mxUtils.bind(this,function(da){ca(mxUtils.getXml(da))})):ca(mxUtils.getXml(aa))}));return}v.postMessage(JSON.stringify(S),"*")}),null!=y.xml&&0<y.xml.length){if(this.editor.graph.mathEnabled){var B=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){B.apply(this,arguments);n()}}g=!0;this.setFileData(y.xml);g=!1;this.editor.graph.mathEnabled||n()}else n();return}if("load"==y.action){J=y.toSketch;k=1==y.autosave;
+"*")}),y.editKey?mxResources.get(y.editKey):null,y.discardKey?mxResources.get(y.discardKey):null,y.ignore?mxUtils.bind(this,function(){this.hideDialog();v.postMessage(JSON.stringify({event:"draft",result:"ignore",message:y}),"*")}):null);this.showDialog(q.container,640,480,!0,!1,mxUtils.bind(this,function(T){T&&this.actions.get("exit").funct()}));try{q.init()}catch(T){v.postMessage(JSON.stringify({event:"draft",error:T.toString(),message:y}),"*")}return}if("template"==y.action){this.spinner.stop();
+var z=1==y.enableRecent,C=1==y.enableSearch,G=1==y.enableCustomTemp;if("1"==urlParams.newTempDlg&&!y.templatesOnly&&null!=y.callback){var H=this.getCurrentUser(),M=new TemplatesDialog(this,function(T,Y,ba){T=T||this.emptyDiagramXml;v.postMessage(JSON.stringify({event:"template",xml:T,blank:T==this.emptyDiagramXml,name:Y,tempUrl:ba.url,libs:ba.libs,builtIn:null!=ba.info&&null!=ba.info.custContentId,message:y}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=H?
+H.id:null,z?mxUtils.bind(this,function(T,Y,ba){this.remoteInvoke("getRecentDiagrams",[ba],null,T,Y)}):null,C?mxUtils.bind(this,function(T,Y,ba,aa){this.remoteInvoke("searchDiagrams",[T,aa],null,Y,ba)}):null,mxUtils.bind(this,function(T,Y,ba){this.remoteInvoke("getFileContent",[T.url],null,Y,ba)}),null,G?mxUtils.bind(this,function(T){this.remoteInvoke("getCustomTemplates",null,null,T,function(){T({},0)})}):null,!1,!1,!0,!0);this.showDialog(M.container,window.innerWidth,window.innerHeight,!0,!1,null,
+!1,!0);return}q=new NewDialog(this,!1,y.templatesOnly?!1:null!=y.callback,mxUtils.bind(this,function(T,Y,ba,aa){T=T||this.emptyDiagramXml;null!=y.callback?v.postMessage(JSON.stringify({event:"template",xml:T,blank:T==this.emptyDiagramXml,name:Y,tempUrl:ba,libs:aa,builtIn:!0,message:y}),"*"):(c(T,A,T!=this.emptyDiagramXml,y.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,z?mxUtils.bind(this,function(T){this.remoteInvoke("getRecentDiagrams",[null],null,
+T,function(){T(null,"Network Error!")})}):null,C?mxUtils.bind(this,function(T,Y){this.remoteInvoke("searchDiagrams",[T,null],null,Y,function(){Y(null,"Network Error!")})}):null,mxUtils.bind(this,function(T,Y,ba){v.postMessage(JSON.stringify({event:"template",docUrl:T,info:Y,name:ba}),"*")}),null,null,G?mxUtils.bind(this,function(T){this.remoteInvoke("getCustomTemplates",null,null,T,function(){T({},0)})}):null,1==y.withoutType);this.showDialog(q.container,620,460,!0,!1,mxUtils.bind(this,function(T){this.sidebar.hideTooltip();
+T&&this.actions.get("exit").funct()}));q.init();return}if("textContent"==y.action){var F=this.getDiagramTextContent();v.postMessage(JSON.stringify({event:"textContent",data:F,message:y}),"*");return}if("status"==y.action){null!=y.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(y.messageKey))):null!=y.message&&this.editor.setStatus(mxUtils.htmlEntities(y.message));null!=y.modified&&(this.editor.modified=y.modified);return}if("spinner"==y.action){var J=null!=y.messageKey?mxResources.get(y.messageKey):
+y.message;null==y.show||y.show?this.spinner.spin(document.body,J):this.spinner.stop();return}if("exit"==y.action){this.actions.get("exit").funct();return}if("viewport"==y.action){null!=y.viewport&&(this.embedViewport=y.viewport);return}if("snapshot"==y.action){this.sendEmbeddedSvgExport(!0);return}if("export"==y.action){if("png"==y.format||"xmlpng"==y.format){if(null==y.spin&&null==y.spinKey||this.spinner.spin(document.body,null!=y.spinKey?mxResources.get(y.spinKey):y.spin)){var Q=null!=y.xml?y.xml:
+this.getFileData(!0);this.editor.graph.setEnabled(!1);var X=this.editor.graph,P=mxUtils.bind(this,function(T){this.editor.graph.setEnabled(!0);this.spinner.stop();var Y=this.createLoadMessage("export");Y.format=y.format;Y.message=y;Y.data=T;Y.xml=Q;v.postMessage(JSON.stringify(Y),"*")}),V=mxUtils.bind(this,function(T){null==T&&(T=Editor.blankImage);"xmlpng"==y.format&&(T=Editor.writeGraphModelToPng(T,"tEXt","mxfile",encodeURIComponent(Q)));X!=this.editor.graph&&X.container.parentNode.removeChild(X.container);
+P(T)}),W=y.pageId||(null!=this.pages?y.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()!=W){var T=X.getGlobalVariable;X=this.createTemporaryGraph(X.getStylesheet());for(var Y,ba=0;ba<this.pages.length;ba++)if(this.pages[ba].getId()==W){Y=this.updatePageRoot(this.pages[ba]);break}null==Y&&(Y=this.currentPage);X.getGlobalVariable=function(ma){return"page"==ma?Y.getName():"pagenumber"==
+ma?1:T.apply(this,arguments)};document.body.appendChild(X.container);X.model.setRoot(Y.root)}if(null!=y.layerIds){var aa=X.model,da=aa.getChildCells(aa.getRoot()),ha={};for(ba=0;ba<y.layerIds.length;ba++)ha[y.layerIds[ba]]=!0;for(ba=0;ba<da.length;ba++)aa.setVisible(da[ba],ha[da[ba].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(ma){V(ma.toDataURL("image/png"))}),y.width,null,y.background,mxUtils.bind(this,function(){V(null)}),null,null,y.scale,y.transparent,y.shadow,null,X,y.border,
+null,y.grid,y.keepTheme)});null!=y.xml&&0<y.xml.length&&(g=!0,this.setFileData(Q),g=!1);n()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==y.format?"1":"0")+(null!=W?"&pageId="+W:"")+(null!=y.layerIds&&0<y.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:y.layerIds})):"")+(null!=y.scale?"&scale="+y.scale:"")+"&base64=1&xml="+encodeURIComponent(Q))).send(mxUtils.bind(this,function(T){200<=T.getStatus()&&299>=T.getStatus()?P("data:image/png;base64,"+T.getText()):
+V(null)}),mxUtils.bind(this,function(){V(null)}))}}else if(n=mxUtils.bind(this,function(){var T=this.createLoadMessage("export");T.message=y;if("html2"==y.format||"html"==y.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var Y=this.getXmlFileData();T.xml=mxUtils.getXml(Y);T.data=this.getFileData(null,null,!0,null,null,null,Y);T.format=y.format}else if("html"==y.format)Y=this.editor.getGraphXml(),T.data=this.getHtml(Y,this.editor.graph),T.xml=mxUtils.getXml(Y),T.format=y.format;
+else{mxSvgCanvas2D.prototype.foAltText=null;Y=null!=y.background?y.background:this.editor.graph.background;Y==mxConstants.NONE&&(Y=null);T.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);T.format="svg";var ba=mxUtils.bind(this,function(aa){this.editor.graph.setEnabled(!0);this.spinner.stop();T.data=Editor.createSvgDataUri(aa);v.postMessage(JSON.stringify(T),"*")});if("xmlsvg"==y.format)(null==y.spin&&null==y.spinKey||this.spinner.spin(document.body,null!=y.spinKey?mxResources.get(y.spinKey):
+y.spin))&&this.getEmbeddedSvg(T.xml,this.editor.graph,null,!0,ba,null,null,y.embedImages,Y,y.scale,y.border,y.shadow,y.keepTheme);else if(null==y.spin&&null==y.spinKey||this.spinner.spin(document.body,null!=y.spinKey?mxResources.get(y.spinKey):y.spin))this.editor.graph.setEnabled(!1),Y=this.editor.graph.getSvg(Y,y.scale,y.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||y.shadow,null,y.keepTheme),(this.editor.graph.shadowVisible||y.shadow)&&this.editor.graph.addSvgShadow(Y),this.embedFonts(Y,
+mxUtils.bind(this,function(aa){y.embedImages||null==y.embedImages?this.editor.convertImages(aa,mxUtils.bind(this,function(da){ba(mxUtils.getXml(da))})):ba(mxUtils.getXml(aa))}));return}v.postMessage(JSON.stringify(T),"*")}),null!=y.xml&&0<y.xml.length){if(this.editor.graph.mathEnabled){var B=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){B.apply(this,arguments);n()}}g=!0;this.setFileData(y.xml);g=!1;this.editor.graph.mathEnabled||n()}else n();return}if("load"==y.action){I=y.toSketch;k=1==y.autosave;
this.hideDialog();null!=y.modified&&null==urlParams.modified&&(urlParams.modified=y.modified);null!=y.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=y.saveAndExit);null!=y.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=y.noSaveBtn);if(null!=y.rough){var K=Editor.sketchMode;this.doSetSketchMode(y.rough);K!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=y.dark&&(K=Editor.darkMode,this.doSetDarkMode(y.dark),K!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));
-null!=y.border&&(this.embedExportBorder=y.border);null!=y.background&&(this.embedExportBackground=y.background);null!=y.viewport&&(this.embedViewport=y.viewport);this.embedExitPoint=null;if(null!=y.rect){var Q=this.embedExportBorder;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.top=y.rect.top+"px";this.diagramContainer.style.left=y.rect.left+"px";this.diagramContainer.style.height=y.rect.height+"px";this.diagramContainer.style.width=y.rect.width+"px";this.diagramContainer.style.bottom=
-"";this.diagramContainer.style.right="";L=mxUtils.bind(this,function(){var S=this.editor.graph,Y=S.maxFitScale;S.maxFitScale=y.maxFitScale;S.fit(2*Q);S.maxFitScale=Y;S.container.scrollTop-=2*Q;S.container.scrollLeft-=2*Q;this.fireEvent(new mxEventObject("editInlineStart","data",[y]))})}null!=y.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=y.noExitBtn);null!=y.title&&null!=this.buttonContainer&&(D=document.createElement("span"),mxUtils.write(D,y.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),
-this.buttonContainer.appendChild(D),this.embedFilenameSpan=D);try{y.libs&&this.sidebar.showEntries(y.libs)}catch(S){}y=null!=y.xmlpng?this.extractGraphModelFromPng(y.xmlpng):null!=y.descriptor?y.descriptor:y.xml}else{if("merge"==y.action){var P=this.getCurrentFile();null!=P&&(D=N(y.xml),null!=D&&""!=D&&P.mergeFile(new LocalFile(this,D),function(){v.postMessage(JSON.stringify({event:"merge",message:y}),"*")},function(S){v.postMessage(JSON.stringify({event:"merge",message:y,error:S}),"*")}))}else"remoteInvokeReady"==
-y.action?this.handleRemoteInvokeReady(v):"remoteInvoke"==y.action?this.handleRemoteInvoke(y,z.origin):"remoteInvokeResponse"==y.action?this.handleRemoteInvokeResponse(y):v.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(y)}),"*");return}}catch(S){this.handleError(S)}}var T=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),V=mxUtils.bind(this,function(S,Y){g=!0;try{c(S,
-Y,null,J)}catch(ca){this.handleError(ca)}g=!1;null!=urlParams.modified&&this.editor.setStatus("");m=T();k&&null==e&&(e=mxUtils.bind(this,function(ca,aa){ca=T();ca==m||g||(aa=this.createLoadMessage("autosave"),aa.xml=ca,(window.opener||window.parent).postMessage(JSON.stringify(aa),"*"));m=ca}),this.editor.graph.model.addListener(mxEvent.CHANGE,e),this.editor.graph.addListener("gridSizeChanged",e),this.editor.graph.addListener("shadowVisibleChanged",e),this.addListener("pageFormatChanged",e),this.addListener("pageScaleChanged",
-e),this.addListener("backgroundColorChanged",e),this.addListener("backgroundImageChanged",e),this.addListener("foldingEnabledChanged",e),this.addListener("mathEnabledChanged",e),this.addListener("gridEnabledChanged",e),this.addListener("guidesEnabledChanged",e),this.addListener("pageViewChanged",e));if("1"==urlParams.returnbounds||"json"==urlParams.proto)Y=this.createLoadMessage("load"),Y.xml=S,v.postMessage(JSON.stringify(Y),"*");null!=L&&L()});null!=y&&"function"===typeof y.substring&&"data:application/vnd.visio;base64,"==
-y.substring(0,34)?(N="0M8R4KGxGuE"==y.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(y.substring(y.indexOf(",")+1)),function(S){V(S,z)},mxUtils.bind(this,function(S){this.handleError(S)}),N)):null!=y&&"function"===typeof y.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(y,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(y,mxUtils.bind(this,function(S){4==S.readyState&&200<=S.status&&299>=S.status&&
-"<mxGraphModel"==S.responseText.substring(0,13)&&V(S.responseText,z)}),""):null!=y&&"function"===typeof y.substring&&this.isLucidChartData(y)?this.convertLucidChart(y,mxUtils.bind(this,function(S){V(S)}),mxUtils.bind(this,function(S){this.handleError(S)})):null==y||"object"!==typeof y||null==y.format||null==y.data&&null==y.url?(y=N(y),V(y,z)):this.loadDescriptor(y,mxUtils.bind(this,function(S){V(T(),z)}),mxUtils.bind(this,function(S){this.handleError(S,mxResources.get("errorLoadingFile"))}))}}));
-var v=window.opener||window.parent;p="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";v.postMessage(p,"*");if("json"==urlParams.proto){var x=this.editor.graph.openLink;this.editor.graph.openLink=function(z,y,L){x.apply(this,arguments);v.postMessage(JSON.stringify({event:"openLink",href:z,target:y,allowOpener:L}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar&&"1"!=urlParams.embedInline){var c=document.createElement("div");c.style.display=
+null!=y.border&&(this.embedExportBorder=y.border);null!=y.background&&(this.embedExportBackground=y.background);null!=y.viewport&&(this.embedViewport=y.viewport);this.embedExitPoint=null;if(null!=y.rect){var R=this.embedExportBorder;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.top=y.rect.top+"px";this.diagramContainer.style.left=y.rect.left+"px";this.diagramContainer.style.height=y.rect.height+"px";this.diagramContainer.style.width=y.rect.width+"px";this.diagramContainer.style.bottom=
+"";this.diagramContainer.style.right="";L=mxUtils.bind(this,function(){var T=this.editor.graph,Y=T.maxFitScale;T.maxFitScale=y.maxFitScale;T.fit(2*R);T.maxFitScale=Y;T.container.scrollTop-=2*R;T.container.scrollLeft-=2*R;this.fireEvent(new mxEventObject("editInlineStart","data",[y]))})}null!=y.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=y.noExitBtn);null!=y.title&&null!=this.buttonContainer&&(D=document.createElement("span"),mxUtils.write(D,y.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),
+this.buttonContainer.appendChild(D),this.embedFilenameSpan=D);try{y.libs&&this.sidebar.showEntries(y.libs)}catch(T){}y=null!=y.xmlpng?this.extractGraphModelFromPng(y.xmlpng):null!=y.descriptor?y.descriptor:y.xml}else{if("merge"==y.action){var O=this.getCurrentFile();null!=O&&(D=N(y.xml),null!=D&&""!=D&&O.mergeFile(new LocalFile(this,D),function(){v.postMessage(JSON.stringify({event:"merge",message:y}),"*")},function(T){v.postMessage(JSON.stringify({event:"merge",message:y,error:T}),"*")}))}else"remoteInvokeReady"==
+y.action?this.handleRemoteInvokeReady(v):"remoteInvoke"==y.action?this.handleRemoteInvoke(y,A.origin):"remoteInvokeResponse"==y.action?this.handleRemoteInvokeResponse(y):v.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(y)}),"*");return}}catch(T){this.handleError(T)}}var U=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),S=mxUtils.bind(this,function(T,Y){g=!0;try{c(T,
+Y,null,I)}catch(ba){this.handleError(ba)}g=!1;null!=urlParams.modified&&this.editor.setStatus("");m=U();k&&null==e&&(e=mxUtils.bind(this,function(ba,aa){ba=U();ba==m||g||(aa=this.createLoadMessage("autosave"),aa.xml=ba,(window.opener||window.parent).postMessage(JSON.stringify(aa),"*"));m=ba}),this.editor.graph.model.addListener(mxEvent.CHANGE,e),this.editor.graph.addListener("gridSizeChanged",e),this.editor.graph.addListener("shadowVisibleChanged",e),this.addListener("pageFormatChanged",e),this.addListener("pageScaleChanged",
+e),this.addListener("backgroundColorChanged",e),this.addListener("backgroundImageChanged",e),this.addListener("foldingEnabledChanged",e),this.addListener("mathEnabledChanged",e),this.addListener("gridEnabledChanged",e),this.addListener("guidesEnabledChanged",e),this.addListener("pageViewChanged",e));if("1"==urlParams.returnbounds||"json"==urlParams.proto)Y=this.createLoadMessage("load"),Y.xml=T,v.postMessage(JSON.stringify(Y),"*");null!=L&&L()});null!=y&&"function"===typeof y.substring&&"data:application/vnd.visio;base64,"==
+y.substring(0,34)?(N="0M8R4KGxGuE"==y.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(y.substring(y.indexOf(",")+1)),function(T){S(T,A)},mxUtils.bind(this,function(T){this.handleError(T)}),N)):null!=y&&"function"===typeof y.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(y,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(y,mxUtils.bind(this,function(T){4==T.readyState&&200<=T.status&&299>=T.status&&
+"<mxGraphModel"==T.responseText.substring(0,13)&&S(T.responseText,A)}),""):null!=y&&"function"===typeof y.substring&&this.isLucidChartData(y)?this.convertLucidChart(y,mxUtils.bind(this,function(T){S(T)}),mxUtils.bind(this,function(T){this.handleError(T)})):null==y||"object"!==typeof y||null==y.format||null==y.data&&null==y.url?(y=N(y),S(y,A)):this.loadDescriptor(y,mxUtils.bind(this,function(T){S(U(),A)}),mxUtils.bind(this,function(T){this.handleError(T,mxResources.get("errorLoadingFile"))}))}}));
+var v=window.opener||window.parent;p="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";v.postMessage(p,"*");if("json"==urlParams.proto){var x=this.editor.graph.openLink;this.editor.graph.openLink=function(A,y,L){x.apply(this,arguments);v.postMessage(JSON.stringify({event:"openLink",href:A,target:y,allowOpener:L}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar&&"1"!=urlParams.embedInline){var c=document.createElement("div");c.style.display=
"inline-block";c.style.position="absolute";c.style.paddingTop="atlas"==uiTheme||"1"==urlParams.atlas?"2px":"0px";c.style.paddingLeft="8px";c.style.paddingBottom="2px";var e=document.createElement("button");e.className="geBigButton";var g=e;if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var k="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(e,k);e.setAttribute("title",k);mxEvent.addListener(e,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));
c.appendChild(e)}}else mxUtils.write(e,mxResources.get("save")),e.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(e,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),c.appendChild(e),"1"==urlParams.saveAndExit&&(e=document.createElement("a"),mxUtils.write(e,mxResources.get("saveAndExit")),e.setAttribute("title",mxResources.get("saveAndExit")),e.className="geBigButton geBigStandardButton",e.style.marginLeft="6px",mxEvent.addListener(e,
"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),c.appendChild(e),g=e);"1"!=urlParams.noExitBtn&&(e=document.createElement("a"),g="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(e,g),e.setAttribute("title",g),e.className="geBigButton geBigStandardButton",e.style.marginLeft="6px",mxEvent.addListener(e,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),c.appendChild(e),g=e);g.style.marginRight="20px";this.toolbar.container.appendChild(c);
this.toolbar.staticElements.push(c);c.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(c){this.importCsv(c)}),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.loadOrgChartLayouts=function(c){var e=mxUtils.bind(this,function(){this.loadingOrgChart=!1;this.spinner.stop();c()});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?e():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.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",e)})})}):mxscript(DRAWIO_BASE_URL+"/js/orgchart.min.js",e))};EditorUi.prototype.importCsv=function(c,e){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(c,e)}))};EditorUi.prototype.doImportCsv=function(c,e){try{var g=c.split("\n"),k=[],m=[],p=[],v={};if(0<g.length){var x={},z=this.editor.graph,y=null,L=null,N=null,J=null,q=null,D=null,A=null,C="whiteSpace=wrap;html=1;",G=null,M=null,H="",F="auto",I="auto",R=!1,X=null,O=null,
-W=40,U=40,n=100,B=0,K=function(){null!=e?e(Aa):(z.setSelectionCells(Aa),z.scrollCellToVisible(z.getSelectionCell()))},Q=z.getFreeInsertPoint(),P=Q.x,T=Q.y;Q=T;var V=null,S="auto";M=null;for(var Y=[],ca=null,aa=null,da=0;da<g.length&&"#"==g[da].charAt(0);){c=g[da].replace(/\r$/,"");for(da++;da<g.length&&"\\"==c.charAt(c.length-1)&&"#"==g[da].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(g[da].substring(1)),da++;if("#"!=c.charAt(1)){var ja=c.indexOf(":");if(0<ja){var ha=mxUtils.trim(c.substring(1,
-ja)),Z=mxUtils.trim(c.substring(ja+1));"label"==ha?V=z.sanitizeHtml(Z):"labelname"==ha&&0<Z.length&&"-"!=Z?q=Z:"labels"==ha&&0<Z.length&&"-"!=Z?A=JSON.parse(Z):"style"==ha?L=Z:"parentstyle"==ha?C=Z:"unknownStyle"==ha&&"-"!=Z?D=Z:"stylename"==ha&&0<Z.length&&"-"!=Z?J=Z:"styles"==ha&&0<Z.length&&"-"!=Z?N=JSON.parse(Z):"vars"==ha&&0<Z.length&&"-"!=Z?y=JSON.parse(Z):"identity"==ha&&0<Z.length&&"-"!=Z?G=Z:"parent"==ha&&0<Z.length&&"-"!=Z?M=Z:"namespace"==ha&&0<Z.length&&"-"!=Z?H=Z:"width"==ha?F=Z:"height"==
-ha?I=Z:"collapsed"==ha&&"-"!=Z?R="true"==Z:"left"==ha&&0<Z.length?X=Z:"top"==ha&&0<Z.length?O=Z:"ignore"==ha?aa=Z.split(","):"connect"==ha?Y.push(JSON.parse(Z)):"link"==ha?ca=Z:"padding"==ha?B=parseFloat(Z):"edgespacing"==ha?W=parseFloat(Z):"nodespacing"==ha?U=parseFloat(Z):"levelspacing"==ha?n=parseFloat(Z):"layout"==ha&&(S=Z)}}}if(null==g[da])throw Error(mxResources.get("invalidOrMissingFile"));var Da=this.editor.csvToArray(g[da].replace(/\r$/,""));ja=c=null;ha=[];for(Z=0;Z<Da.length;Z++)G==Da[Z]&&
-(c=Z),M==Da[Z]&&(ja=Z),ha.push(mxUtils.trim(Da[Z]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==V&&(V="%"+ha[0]+"%");if(null!=Y)for(var Ga=0;Ga<Y.length;Ga++)null==x[Y[Ga].to]&&(x[Y[Ga].to]={});G=[];for(Z=da+1;Z<g.length;Z++){var Ba=this.editor.csvToArray(g[Z].replace(/\r$/,""));if(null==Ba){var Ha=40<g[Z].length?g[Z].substring(0,40)+"...":g[Z];throw Error(Ha+" ("+Z+"):\n"+mxResources.get("containsValidationErrors"));}0<Ba.length&&G.push(Ba)}z.model.beginUpdate();try{for(Z=
-0;Z<G.length;Z++){Ba=G[Z];var pa=null,Na=null!=c?H+Ba[c]:null;g=!1;null!=Na&&(pa=z.model.getCell(Na),g=null==pa||0<=mxUtils.indexOf(k,pa));var La=new mxCell(V,new mxGeometry(P,Q,0,0),L||"whiteSpace=wrap;html=1;");La.collapsed=R;La.vertex=!0;La.id=Na;null==pa||g||z.model.setCollapsed(pa,R);for(var ya=0;ya<Ba.length;ya++)z.setAttributeForCell(La,ha[ya],Ba[ya]),null==pa||g||z.setAttributeForCell(pa,ha[ya],Ba[ya]);if(null!=q&&null!=A){var Ja=A[La.getAttribute(q)];null!=Ja&&(z.labelChanged(La,Ja),null==
-pa||g||z.cellLabelChanged(pa,Ja))}if(null!=J&&null!=N){var Fa=N[La.getAttribute(J)];null!=Fa&&(La.style=Fa)}z.setAttributeForCell(La,"placeholders","1");La.style=z.replacePlaceholders(La,La.style,y);null==pa||g?z.fireEvent(new mxEventObject("cellsInserted","cells",[La])):(z.model.setStyle(pa,La.style),0>mxUtils.indexOf(p,pa)&&p.push(pa),z.fireEvent(new mxEventObject("cellsInserted","cells",[pa])));g=null!=pa;pa=La;if(!g)for(Ga=0;Ga<Y.length;Ga++)x[Y[Ga].to][pa.getAttribute(Y[Ga].to)]=pa;null!=ca&&
-"link"!=ca&&(z.setLinkForCell(pa,pa.getAttribute(ca)),z.setAttributeForCell(pa,ca,null));var Pa=this.editor.graph.getPreferredSizeForCell(pa);M=null!=ja?z.model.getCell(H+Ba[ja]):null;if(pa.vertex){Ha=null!=M?0:P;da=null!=M?0:T;null!=X&&null!=pa.getAttribute(X)&&(pa.geometry.x=Ha+parseFloat(pa.getAttribute(X)));null!=O&&null!=pa.getAttribute(O)&&(pa.geometry.y=da+parseFloat(pa.getAttribute(O)));var xa="@"==F.charAt(0)?pa.getAttribute(F.substring(1)):null;pa.geometry.width=null!=xa&&"auto"!=xa?parseFloat(pa.getAttribute(F.substring(1))):
-"auto"==F||"auto"==xa?Pa.width+B:parseFloat(F);var za="@"==I.charAt(0)?pa.getAttribute(I.substring(1)):null;pa.geometry.height=null!=za&&"auto"!=za?parseFloat(za):"auto"==I||"auto"==za?Pa.height+B:parseFloat(I);Q+=pa.geometry.height+U}g?(null==v[Na]&&(v[Na]=[]),v[Na].push(pa)):(k.push(pa),null!=M?(M.style=z.replacePlaceholders(M,C,y),z.addCell(pa,M),m.push(M)):p.push(z.addCell(pa)))}for(Z=0;Z<m.length;Z++)xa="@"==F.charAt(0)?m[Z].getAttribute(F.substring(1)):null,za="@"==I.charAt(0)?m[Z].getAttribute(I.substring(1)):
-null,"auto"!=F&&"auto"!=xa||"auto"!=I&&"auto"!=za||z.updateGroupBounds([m[Z]],B,!0);var ua=p.slice(),Aa=p.slice();for(Ga=0;Ga<Y.length;Ga++){var ea=Y[Ga];for(Z=0;Z<k.length;Z++){pa=k[Z];var wa=mxUtils.bind(this,function(oa,ka,Ca){var Oa=ka.getAttribute(Ca.from);if(null!=Oa&&""!=Oa){Oa=Oa.split(",");for(var Sa=0;Sa<Oa.length;Sa++){var Ea=x[Ca.to][Oa[Sa]];if(null==Ea&&null!=D){Ea=new mxCell(Oa[Sa],new mxGeometry(P,T,0,0),D);Ea.style=z.replacePlaceholders(ka,Ea.style,y);var Ia=this.editor.graph.getPreferredSizeForCell(Ea);
-Ea.geometry.width=Ia.width+B;Ea.geometry.height=Ia.height+B;x[Ca.to][Oa[Sa]]=Ea;Ea.vertex=!0;Ea.id=Oa[Sa];p.push(z.addCell(Ea))}if(null!=Ea){Ia=Ca.label;null!=Ca.fromlabel&&(Ia=(ka.getAttribute(Ca.fromlabel)||"")+(Ia||""));null!=Ca.sourcelabel&&(Ia=z.replacePlaceholders(ka,Ca.sourcelabel,y)+(Ia||""));null!=Ca.tolabel&&(Ia=(Ia||"")+(Ea.getAttribute(Ca.tolabel)||""));null!=Ca.targetlabel&&(Ia=(Ia||"")+z.replacePlaceholders(Ea,Ca.targetlabel,y));var Qa="target"==Ca.placeholders==!Ca.invert?Ea:oa;Qa=
-null!=Ca.style?z.replacePlaceholders(Qa,Ca.style,y):z.createCurrentEdgeStyle();Ia=z.insertEdge(null,null,Ia||"",Ca.invert?Ea:oa,Ca.invert?oa:Ea,Qa);if(null!=Ca.labels)for(Qa=0;Qa<Ca.labels.length;Qa++){var Ma=Ca.labels[Qa],Ra=new mxCell(Ma.label||Qa,new mxGeometry(null!=Ma.x?Ma.x:0,null!=Ma.y?Ma.y:0,0,0),"resizable=0;html=1;");Ra.vertex=!0;Ra.connectable=!1;Ra.geometry.relative=!0;null!=Ma.placeholders&&(Ra.value=z.replacePlaceholders("target"==Ma.placeholders==!Ca.invert?Ea:oa,Ra.value,y));if(null!=
-Ma.dx||null!=Ma.dy)Ra.geometry.offset=new mxPoint(null!=Ma.dx?Ma.dx:0,null!=Ma.dy?Ma.dy:0);Ia.insert(Ra)}Aa.push(Ia);mxUtils.remove(Ca.invert?oa:Ea,ua)}}}});wa(pa,pa,ea);if(null!=v[pa.id])for(ya=0;ya<v[pa.id].length;ya++)wa(pa,v[pa.id][ya],ea)}}if(null!=aa)for(Z=0;Z<k.length;Z++)for(pa=k[Z],ya=0;ya<aa.length;ya++)z.setAttributeForCell(pa,mxUtils.trim(aa[ya]),null);if(0<p.length){var ta=new mxParallelEdgeLayout(z);ta.spacing=W;ta.checkOverlap=!0;var sa=function(){0<ta.spacing&&ta.execute(z.getDefaultParent());
-for(var oa=0;oa<p.length;oa++){var ka=z.getCellGeometry(p[oa]);ka.x=Math.round(z.snap(ka.x));ka.y=Math.round(z.snap(ka.y));"auto"==F&&(ka.width=Math.round(z.snap(ka.width)));"auto"==I&&(ka.height=Math.round(z.snap(ka.height)))}};if("["==S.charAt(0)){var ra=K;z.view.validate();this.executeLayouts(z.createLayouts(JSON.parse(S)),function(){sa();ra()});K=null}else if("circle"==S){var va=new mxCircleLayout(z);va.disableEdgeStyle=!1;va.resetEdges=!1;var ia=va.isVertexIgnored;va.isVertexIgnored=function(oa){return ia.apply(this,
-arguments)||0>mxUtils.indexOf(p,oa)};this.executeLayout(function(){va.execute(z.getDefaultParent());sa()},!0,K);K=null}else if("horizontaltree"==S||"verticaltree"==S||"auto"==S&&Aa.length==2*p.length-1&&1==ua.length){z.view.validate();var ma=new mxCompactTreeLayout(z,"horizontaltree"==S);ma.levelDistance=U;ma.edgeRouting=!1;ma.resetEdges=!1;this.executeLayout(function(){ma.execute(z.getDefaultParent(),0<ua.length?ua[0]:null)},!0,K);K=null}else if("horizontalflow"==S||"verticalflow"==S||"auto"==S&&
-1==ua.length){z.view.validate();var ba=new mxHierarchicalLayout(z,"horizontalflow"==S?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ba.intraCellSpacing=U;ba.parallelEdgeSpacing=W;ba.interRankCellSpacing=n;ba.disableEdgeStyle=!1;this.executeLayout(function(){ba.execute(z.getDefaultParent(),Aa);z.moveCells(Aa,P,T)},!0,K);K=null}else if("orgchart"==S){z.view.validate();var fa=new mxOrgChartLayout(z,2,n,U),na=fa.isVertexIgnored;fa.isVertexIgnored=function(oa){return na.apply(this,arguments)||
-0>mxUtils.indexOf(p,oa)};this.executeLayout(function(){fa.execute(z.getDefaultParent());sa()},!0,K);K=null}else if("organic"==S||"auto"==S&&Aa.length>p.length){z.view.validate();var la=new mxFastOrganicLayout(z);la.forceConstant=3*U;la.disableEdgeStyle=!1;la.resetEdges=!1;var qa=la.isVertexIgnored;la.isVertexIgnored=function(oa){return qa.apply(this,arguments)||0>mxUtils.indexOf(p,oa)};this.executeLayout(function(){la.execute(z.getDefaultParent());sa()},!0,K);K=null}}this.hideDialog()}finally{z.model.endUpdate()}null!=
-K&&K()}}catch(oa){this.handleError(oa)}};EditorUi.prototype.getSearch=function(c){var e="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=c&&0<window.location.search.length){var g="?",k;for(k in urlParams)0>mxUtils.indexOf(c,k)&&null!=urlParams[k]&&(e+=g+k+"="+urlParams[k],g="&")}else e=window.location.search;return e};EditorUi.prototype.getUrl=function(c){c=null!=c?c:window.location.pathname;var e=0<c.indexOf("?")?1:0;if("1"==urlParams.offline)c+=window.location.search;else{var g="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
+function(){mxscript("js/orgchart/mxOrgChartLayout.js",e)})})}):mxscript(DRAWIO_BASE_URL+"/js/orgchart.min.js",e))};EditorUi.prototype.importCsv=function(c,e){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(c,e)}))};EditorUi.prototype.doImportCsv=function(c,e){try{var g=c.split("\n"),k=[],m=[],p=[],v={};if(0<g.length){var x={},A=this.editor.graph,y=null,L=null,N=null,I=null,q=null,D=null,z=null,C="whiteSpace=wrap;html=1;",G=null,H=null,M="",F="auto",J="auto",Q=!1,X=null,P=null,
+V=40,W=40,n=100,B=0,K=function(){null!=e?e(Ia):(A.setSelectionCells(Ia),A.scrollCellToVisible(A.getSelectionCell()))},R=A.getFreeInsertPoint(),O=R.x,U=R.y;R=U;var S=null,T="auto";H=null;for(var Y=[],ba=null,aa=null,da=0;da<g.length&&"#"==g[da].charAt(0);){c=g[da].replace(/\r$/,"");for(da++;da<g.length&&"\\"==c.charAt(c.length-1)&&"#"==g[da].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(g[da].substring(1)),da++;if("#"!=c.charAt(1)){var ha=c.indexOf(":");if(0<ha){var ma=mxUtils.trim(c.substring(1,
+ha)),Z=mxUtils.trim(c.substring(ha+1));"label"==ma?S=A.sanitizeHtml(Z):"labelname"==ma&&0<Z.length&&"-"!=Z?q=Z:"labels"==ma&&0<Z.length&&"-"!=Z?z=JSON.parse(Z):"style"==ma?L=Z:"parentstyle"==ma?C=Z:"unknownStyle"==ma&&"-"!=Z?D=Z:"stylename"==ma&&0<Z.length&&"-"!=Z?I=Z:"styles"==ma&&0<Z.length&&"-"!=Z?N=JSON.parse(Z):"vars"==ma&&0<Z.length&&"-"!=Z?y=JSON.parse(Z):"identity"==ma&&0<Z.length&&"-"!=Z?G=Z:"parent"==ma&&0<Z.length&&"-"!=Z?H=Z:"namespace"==ma&&0<Z.length&&"-"!=Z?M=Z:"width"==ma?F=Z:"height"==
+ma?J=Z:"collapsed"==ma&&"-"!=Z?Q="true"==Z:"left"==ma&&0<Z.length?X=Z:"top"==ma&&0<Z.length?P=Z:"ignore"==ma?aa=Z.split(","):"connect"==ma?Y.push(JSON.parse(Z)):"link"==ma?ba=Z:"padding"==ma?B=parseFloat(Z):"edgespacing"==ma?V=parseFloat(Z):"nodespacing"==ma?W=parseFloat(Z):"levelspacing"==ma?n=parseFloat(Z):"layout"==ma&&(T=Z)}}}if(null==g[da])throw Error(mxResources.get("invalidOrMissingFile"));var Fa=this.editor.csvToArray(g[da].replace(/\r$/,""));ha=c=null;ma=[];for(Z=0;Z<Fa.length;Z++)G==Fa[Z]&&
+(c=Z),H==Fa[Z]&&(ha=Z),ma.push(mxUtils.trim(Fa[Z]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==S&&(S="%"+ma[0]+"%");if(null!=Y)for(var Ca=0;Ca<Y.length;Ca++)null==x[Y[Ca].to]&&(x[Y[Ca].to]={});G=[];for(Z=da+1;Z<g.length;Z++){var Ba=this.editor.csvToArray(g[Z].replace(/\r$/,""));if(null==Ba){var Ga=40<g[Z].length?g[Z].substring(0,40)+"...":g[Z];throw Error(Ga+" ("+Z+"):\n"+mxResources.get("containsValidationErrors"));}0<Ba.length&&G.push(Ba)}A.model.beginUpdate();try{for(Z=
+0;Z<G.length;Z++){Ba=G[Z];var sa=null,Ma=null!=c?M+Ba[c]:null;g=!1;null!=Ma&&(sa=A.model.getCell(Ma),g=null==sa||0<=mxUtils.indexOf(k,sa));var Na=new mxCell(S,new mxGeometry(O,R,0,0),L||"whiteSpace=wrap;html=1;");Na.collapsed=Q;Na.vertex=!0;Na.id=Ma;null==sa||g||A.model.setCollapsed(sa,Q);for(var za=0;za<Ba.length;za++)A.setAttributeForCell(Na,ma[za],Ba[za]),null==sa||g||A.setAttributeForCell(sa,ma[za],Ba[za]);if(null!=q&&null!=z){var Ja=z[Na.getAttribute(q)];null!=Ja&&(A.labelChanged(Na,Ja),null==
+sa||g||A.cellLabelChanged(sa,Ja))}if(null!=I&&null!=N){var Ea=N[Na.getAttribute(I)];null!=Ea&&(Na.style=Ea)}A.setAttributeForCell(Na,"placeholders","1");Na.style=A.replacePlaceholders(Na,Na.style,y);null==sa||g?A.fireEvent(new mxEventObject("cellsInserted","cells",[Na])):(A.model.setStyle(sa,Na.style),0>mxUtils.indexOf(p,sa)&&p.push(sa),A.fireEvent(new mxEventObject("cellsInserted","cells",[sa])));g=null!=sa;sa=Na;if(!g)for(Ca=0;Ca<Y.length;Ca++)x[Y[Ca].to][sa.getAttribute(Y[Ca].to)]=sa;null!=ba&&
+"link"!=ba&&(A.setLinkForCell(sa,sa.getAttribute(ba)),A.setAttributeForCell(sa,ba,null));var Pa=this.editor.graph.getPreferredSizeForCell(sa);H=null!=ha?A.model.getCell(M+Ba[ha]):null;if(sa.vertex){Ga=null!=H?0:O;da=null!=H?0:U;null!=X&&null!=sa.getAttribute(X)&&(sa.geometry.x=Ga+parseFloat(sa.getAttribute(X)));null!=P&&null!=sa.getAttribute(P)&&(sa.geometry.y=da+parseFloat(sa.getAttribute(P)));var ya="@"==F.charAt(0)?sa.getAttribute(F.substring(1)):null;sa.geometry.width=null!=ya&&"auto"!=ya?parseFloat(sa.getAttribute(F.substring(1))):
+"auto"==F||"auto"==ya?Pa.width+B:parseFloat(F);var Aa="@"==J.charAt(0)?sa.getAttribute(J.substring(1)):null;sa.geometry.height=null!=Aa&&"auto"!=Aa?parseFloat(Aa):"auto"==J||"auto"==Aa?Pa.height+B:parseFloat(J);R+=sa.geometry.height+W}g?(null==v[Ma]&&(v[Ma]=[]),v[Ma].push(sa)):(k.push(sa),null!=H?(H.style=A.replacePlaceholders(H,C,y),A.addCell(sa,H),m.push(H)):p.push(A.addCell(sa)))}for(Z=0;Z<m.length;Z++)ya="@"==F.charAt(0)?m[Z].getAttribute(F.substring(1)):null,Aa="@"==J.charAt(0)?m[Z].getAttribute(J.substring(1)):
+null,"auto"!=F&&"auto"!=ya||"auto"!=J&&"auto"!=Aa||A.updateGroupBounds([m[Z]],B,!0);var wa=p.slice(),Ia=p.slice();for(Ca=0;Ca<Y.length;Ca++){var ia=Y[Ca];for(Z=0;Z<k.length;Z++){sa=k[Z];var ja=mxUtils.bind(this,function(la,oa,ta){var La=oa.getAttribute(ta.from);if(null!=La&&""!=La){La=La.split(",");for(var Sa=0;Sa<La.length;Sa++){var Da=x[ta.to][La[Sa]];if(null==Da&&null!=D){Da=new mxCell(La[Sa],new mxGeometry(O,U,0,0),D);Da.style=A.replacePlaceholders(oa,Da.style,y);var Ha=this.editor.graph.getPreferredSizeForCell(Da);
+Da.geometry.width=Ha.width+B;Da.geometry.height=Ha.height+B;x[ta.to][La[Sa]]=Da;Da.vertex=!0;Da.id=La[Sa];p.push(A.addCell(Da))}if(null!=Da){Ha=ta.label;null!=ta.fromlabel&&(Ha=(oa.getAttribute(ta.fromlabel)||"")+(Ha||""));null!=ta.sourcelabel&&(Ha=A.replacePlaceholders(oa,ta.sourcelabel,y)+(Ha||""));null!=ta.tolabel&&(Ha=(Ha||"")+(Da.getAttribute(ta.tolabel)||""));null!=ta.targetlabel&&(Ha=(Ha||"")+A.replacePlaceholders(Da,ta.targetlabel,y));var Qa="target"==ta.placeholders==!ta.invert?Da:la;Qa=
+null!=ta.style?A.replacePlaceholders(Qa,ta.style,y):A.createCurrentEdgeStyle();Ha=A.insertEdge(null,null,Ha||"",ta.invert?Da:la,ta.invert?la:Da,Qa);if(null!=ta.labels)for(Qa=0;Qa<ta.labels.length;Qa++){var Oa=ta.labels[Qa],Ra=new mxCell(Oa.label||Qa,new mxGeometry(null!=Oa.x?Oa.x:0,null!=Oa.y?Oa.y:0,0,0),"resizable=0;html=1;");Ra.vertex=!0;Ra.connectable=!1;Ra.geometry.relative=!0;null!=Oa.placeholders&&(Ra.value=A.replacePlaceholders("target"==Oa.placeholders==!ta.invert?Da:la,Ra.value,y));if(null!=
+Oa.dx||null!=Oa.dy)Ra.geometry.offset=new mxPoint(null!=Oa.dx?Oa.dx:0,null!=Oa.dy?Oa.dy:0);Ha.insert(Ra)}Ia.push(Ha);mxUtils.remove(ta.invert?la:Da,wa)}}}});ja(sa,sa,ia);if(null!=v[sa.id])for(za=0;za<v[sa.id].length;za++)ja(sa,v[sa.id][za],ia)}}if(null!=aa)for(Z=0;Z<k.length;Z++)for(sa=k[Z],za=0;za<aa.length;za++)A.setAttributeForCell(sa,mxUtils.trim(aa[za]),null);if(0<p.length){var ua=new mxParallelEdgeLayout(A);ua.spacing=V;ua.checkOverlap=!0;var va=function(){0<ua.spacing&&ua.execute(A.getDefaultParent());
+for(var la=0;la<p.length;la++){var oa=A.getCellGeometry(p[la]);oa.x=Math.round(A.snap(oa.x));oa.y=Math.round(A.snap(oa.y));"auto"==F&&(oa.width=Math.round(A.snap(oa.width)));"auto"==J&&(oa.height=Math.round(A.snap(oa.height)))}};if("["==T.charAt(0)){var qa=K;A.view.validate();this.executeLayouts(A.createLayouts(JSON.parse(T)),function(){va();qa()});K=null}else if("circle"==T){var xa=new mxCircleLayout(A);xa.disableEdgeStyle=!1;xa.resetEdges=!1;var ea=xa.isVertexIgnored;xa.isVertexIgnored=function(la){return ea.apply(this,
+arguments)||0>mxUtils.indexOf(p,la)};this.executeLayout(function(){xa.execute(A.getDefaultParent());va()},!0,K);K=null}else if("horizontaltree"==T||"verticaltree"==T||"auto"==T&&Ia.length==2*p.length-1&&1==wa.length){A.view.validate();var na=new mxCompactTreeLayout(A,"horizontaltree"==T);na.levelDistance=W;na.edgeRouting=!1;na.resetEdges=!1;this.executeLayout(function(){na.execute(A.getDefaultParent(),0<wa.length?wa[0]:null)},!0,K);K=null}else if("horizontalflow"==T||"verticalflow"==T||"auto"==T&&
+1==wa.length){A.view.validate();var pa=new mxHierarchicalLayout(A,"horizontalflow"==T?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);pa.intraCellSpacing=W;pa.parallelEdgeSpacing=V;pa.interRankCellSpacing=n;pa.disableEdgeStyle=!1;this.executeLayout(function(){pa.execute(A.getDefaultParent(),Ia);A.moveCells(Ia,O,U)},!0,K);K=null}else if("orgchart"==T){A.view.validate();var ca=new mxOrgChartLayout(A,2,n,W),fa=ca.isVertexIgnored;ca.isVertexIgnored=function(la){return fa.apply(this,arguments)||
+0>mxUtils.indexOf(p,la)};this.executeLayout(function(){ca.execute(A.getDefaultParent());va()},!0,K);K=null}else if("organic"==T||"auto"==T&&Ia.length>p.length){A.view.validate();var ra=new mxFastOrganicLayout(A);ra.forceConstant=3*W;ra.disableEdgeStyle=!1;ra.resetEdges=!1;var ka=ra.isVertexIgnored;ra.isVertexIgnored=function(la){return ka.apply(this,arguments)||0>mxUtils.indexOf(p,la)};this.executeLayout(function(){ra.execute(A.getDefaultParent());va()},!0,K);K=null}}this.hideDialog()}finally{A.model.endUpdate()}null!=
+K&&K()}}catch(la){this.handleError(la)}};EditorUi.prototype.getSearch=function(c){var e="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=c&&0<window.location.search.length){var g="?",k;for(k in urlParams)0>mxUtils.indexOf(c,k)&&null!=urlParams[k]&&(e+=g+k+"="+urlParams[k],g="&")}else e=window.location.search;return e};EditorUi.prototype.getUrl=function(c){c=null!=c?c:window.location.pathname;var e=0<c.indexOf("?")?1:0;if("1"==urlParams.offline)c+=window.location.search;else{var g="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
k;for(k in urlParams)0>mxUtils.indexOf(g,k)&&(c=0==e?c+"?":c+"&",null!=urlParams[k]&&(c+=k+"="+urlParams[k],e++))}return c};EditorUi.prototype.showLinkDialog=function(c,e,g,k,m){c=new LinkDialog(this,c,e,g,!0,k,m);this.showDialog(c.container,560,130,!0,!0);c.init()};EditorUi.prototype.getServiceCount=function(c){var e=1;null==this.drive&&"function"!==typeof window.DriveClient||e++;null==this.dropbox&&"function"!==typeof window.DropboxClient||e++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||
e++;null!=this.gitHub&&e++;null!=this.gitLab&&e++;c&&isLocalStorage&&"1"==urlParams.browser&&e++;return e};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var c=this.getCurrentFile(),e=null!=c||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(e);this.menus.get("viewZoom").setEnabled(e);var g=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==c||c.isRestricted());this.actions.get("makeCopy").setEnabled(!g);
this.actions.get("print").setEnabled(!g);this.menus.get("exportAs").setEnabled(!g);this.menus.get("embed").setEnabled(!g);g="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(g);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(g),this.menus.get("newLibrary").setEnabled(g));c="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=c&&c.isEditable();this.actions.get("image").setEnabled(e);this.actions.get("zoomIn").setEnabled(e);this.actions.get("zoomOut").setEnabled(e);
@@ -12096,23 +12092,23 @@ e=this.getCurrentFile(),g=this.getSelectionState(),k=this.isDiagramActive();this
this.actions.get("pasteStyle").setEnabled(k&&0<g.cells.length);this.actions.get("editGeometry").setEnabled(0<g.vertices.length);this.actions.get("createShape").setEnabled(k);this.actions.get("createRevision").setEnabled(k);this.actions.get("moveToFolder").setEnabled(null!=e);this.actions.get("makeCopy").setEnabled(null!=e&&!e.isRestricted());this.actions.get("editDiagram").setEnabled(k&&(null==e||!e.isRestricted()));this.actions.get("publishLink").setEnabled(null!=e&&!e.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!=e&&e.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=e);this.menus.get("publish").setEnabled(null!=e&&!e.isRestricted());e=this.actions.get("findReplace");e.setEnabled("hidden"!=this.diagramContainer.style.visibility);
e.label=mxResources.get("find")+(c.isEnabled()?"/"+mxResources.get("replace"):"")+"...";c=c.view.getState(c.getSelectionCell());this.actions.get("editShape").setEnabled(k&&null!=c&&null!=c.shape&&null!=c.shape.stencil)};var E=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);E.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=
-!1,ExportDialog.exportFile=function(c,e,g,k,m,p,v,x){var z=c.editor.graph;if("xml"==g)c.hideDialog(),c.saveData(e,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml");else if("svg"==g)c.hideDialog(),c.saveData(e,"svg",mxUtils.getXml(z.getSvg(k,m,p)),"image/svg+xml");else{var y=c.getFileData(!0,null,null,null,null,!0),L=z.getGraphBounds(),N=Math.floor(L.width*m/z.view.scale),J=Math.floor(L.height*m/z.view.scale);if(y.length<=MAX_REQUEST_SIZE&&N*J<MAX_AREA)if(c.hideDialog(),"png"!=g&&"jpg"!=g&&
-"jpeg"!=g||!c.isExportToCanvas()){var q={globalVars:z.getExportVariables()};x&&(q.grid={size:z.gridSize,steps:z.view.gridSteps,color:z.view.gridColor});c.saveRequest(e,g,function(D,A){return new mxXmlRequest(EXPORT_URL,"format="+g+"&base64="+(A||"0")+(null!=D?"&filename="+encodeURIComponent(D):"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(0<v?"&dpi="+v:"")+"&bg="+(null!=k?k:"none")+"&w="+N+"&h="+J+"&border="+p+"&xml="+encodeURIComponent(y))})}else"png"==g?c.exportImage(m,null==k||"none"==
+!1,ExportDialog.exportFile=function(c,e,g,k,m,p,v,x){var A=c.editor.graph;if("xml"==g)c.hideDialog(),c.saveData(e,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml");else if("svg"==g)c.hideDialog(),c.saveData(e,"svg",mxUtils.getXml(A.getSvg(k,m,p)),"image/svg+xml");else{var y=c.getFileData(!0,null,null,null,null,!0),L=A.getGraphBounds(),N=Math.floor(L.width*m/A.view.scale),I=Math.floor(L.height*m/A.view.scale);if(y.length<=MAX_REQUEST_SIZE&&N*I<MAX_AREA)if(c.hideDialog(),"png"!=g&&"jpg"!=g&&
+"jpeg"!=g||!c.isExportToCanvas()){var q={globalVars:A.getExportVariables()};x&&(q.grid={size:A.gridSize,steps:A.view.gridSteps,color:A.view.gridColor});c.saveRequest(e,g,function(D,z){return new mxXmlRequest(EXPORT_URL,"format="+g+"&base64="+(z||"0")+(null!=D?"&filename="+encodeURIComponent(D):"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(0<v?"&dpi="+v:"")+"&bg="+(null!=k?k:"none")+"&w="+N+"&h="+I+"&border="+p+"&xml="+encodeURIComponent(y))})}else"png"==g?c.exportImage(m,null==k||"none"==
k,!0,!1,!1,p,!0,!1,null,x,v):c.exportImage(m,!1,!0,!1,!1,p,!0,!1,"jpeg",x);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var c=this.editor.graph,e="";if(null!=this.pages)for(var g=0;g<this.pages.length;g++){var k=c;this.currentPage!=this.pages[g]&&(k=this.createTemporaryGraph(c.getStylesheet()),this.updatePageRoot(this.pages[g]),k.model.setRoot(this.pages[g].root));e+=this.pages[g].getName()+" "+k.getIndexableText()+
" "}else e=c.getIndexableText();this.editor.graph.setEnabled(!0);return e};EditorUi.prototype.showRemotelyStoredLibrary=function(c){var e={},g=document.createElement("div");g.style.whiteSpace="nowrap";var k=document.createElement("h3");mxUtils.write(k,mxUtils.htmlEntities(c));k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(k);var m=document.createElement("div");m.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";m.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+
-IMAGE_PATH+'/spin.gif"></div>';var p={};try{var v=mxSettings.getCustomLibraries();for(c=0;c<v.length;c++){var x=v[c];if("R"==x.substring(0,1)){var z=JSON.parse(decodeURIComponent(x.substring(1)));p[z[0]]={id:z[0],title:z[1],downloadUrl:z[2]}}}}catch(y){}this.remoteInvoke("getCustomLibraries",null,null,function(y){m.innerText="";if(0==y.length)m.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var L=0;L<
-y.length;L++){var N=y[L];p[N.id]&&(e[N.id]=N);var J=this.addCheckbox(m,N.title,p[N.id]);(function(q,D){mxEvent.addListener(D,"change",function(){this.checked?e[q.id]=q:delete e[q.id]})})(N,J)}},mxUtils.bind(this,function(y){m.innerText="";var L=document.createElement("div");L.style.padding="8px";L.style.textAlign="center";mxUtils.write(L,mxResources.get("error")+": ");mxUtils.write(L,null!=y&&null!=y.message?y.message:mxResources.get("unknownError"));m.appendChild(L)}));g.appendChild(m);g=new CustomDialog(this,
-g,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var y=0,L;for(L in e)null==p[L]&&(y++,mxUtils.bind(this,function(N){this.remoteInvoke("getFileContent",[N.downloadUrl],null,mxUtils.bind(this,function(J){y--;0==y&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,J,N))}catch(q){this.handleError(q,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){y--;0==y&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(e[L]));
+IMAGE_PATH+'/spin.gif"></div>';var p={};try{var v=mxSettings.getCustomLibraries();for(c=0;c<v.length;c++){var x=v[c];if("R"==x.substring(0,1)){var A=JSON.parse(decodeURIComponent(x.substring(1)));p[A[0]]={id:A[0],title:A[1],downloadUrl:A[2]}}}}catch(y){}this.remoteInvoke("getCustomLibraries",null,null,function(y){m.innerText="";if(0==y.length)m.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var L=0;L<
+y.length;L++){var N=y[L];p[N.id]&&(e[N.id]=N);var I=this.addCheckbox(m,N.title,p[N.id]);(function(q,D){mxEvent.addListener(D,"change",function(){this.checked?e[q.id]=q:delete e[q.id]})})(N,I)}},mxUtils.bind(this,function(y){m.innerText="";var L=document.createElement("div");L.style.padding="8px";L.style.textAlign="center";mxUtils.write(L,mxResources.get("error")+": ");mxUtils.write(L,null!=y&&null!=y.message?y.message:mxResources.get("unknownError"));m.appendChild(L)}));g.appendChild(m);g=new CustomDialog(this,
+g,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var y=0,L;for(L in e)null==p[L]&&(y++,mxUtils.bind(this,function(N){this.remoteInvoke("getFileContent",[N.downloadUrl],null,mxUtils.bind(this,function(I){y--;0==y&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,I,N))}catch(q){this.handleError(q,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){y--;0==y&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(e[L]));
for(L in p)e[L]||this.closeLibrary(new RemoteLibrary(this,null,p[L]));0==y&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(g.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(c){this.remoteWin=c;for(var e=0;e<this.remoteInvokeQueue.length;e++)c.postMessage(this.remoteInvokeQueue[e],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(c){var e=c.msgMarkers,g=this.remoteInvokeCallbacks[e.callbackId];if(null==g)throw Error("No callback for "+(null!=e?e.callbackId:"null"));c.error?g.error&&g.error(c.error.errResp):
-g.callback&&g.callback.apply(this,c.resp);this.remoteInvokeCallbacks[e.callbackId]=null};EditorUi.prototype.remoteInvoke=function(c,e,g,k,m){var p=!0,v=window.setTimeout(mxUtils.bind(this,function(){p=!1;m({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),x=mxUtils.bind(this,function(){window.clearTimeout(v);p&&k.apply(this,arguments)}),z=mxUtils.bind(this,function(){window.clearTimeout(v);p&&m.apply(this,arguments)});g=g||{};g.callbackId=this.remoteInvokeCallbacks.length;
-this.remoteInvokeCallbacks.push({callback:x,error:z});c=JSON.stringify({event:"remoteInvoke",funtionName:c,functionArgs:e,msgMarkers:g});null!=this.remoteWin?this.remoteWin.postMessage(c,"*"):this.remoteInvokeQueue.push(c)};EditorUi.prototype.handleRemoteInvoke=function(c,e){var g=mxUtils.bind(this,function(y,L){var N={event:"remoteInvokeResponse",msgMarkers:c.msgMarkers};null!=L?N.error={errResp:L}:null!=y&&(N.resp=y);this.remoteWin.postMessage(JSON.stringify(N),"*")});try{var k=c.funtionName,m=
-this.remoteInvokableFns[k];if(null!=m&&"function"===typeof this[k]){if(m.allowedDomains){for(var p=!1,v=0;v<m.allowedDomains.length;v++)if(e=="https://"+m.allowedDomains[v]){p=!0;break}if(!p){g(null,"Invalid Call: "+k+" is not allowed.");return}}var x=c.functionArgs;Array.isArray(x)||(x=[]);if(m.isAsync)x.push(function(){g(Array.prototype.slice.apply(arguments))}),x.push(function(y){g(null,y||"Unkown Error")}),this[k].apply(this,x);else{var z=this[k].apply(this,x);g([z])}}else g(null,"Invalid Call: "+
+g.callback&&g.callback.apply(this,c.resp);this.remoteInvokeCallbacks[e.callbackId]=null};EditorUi.prototype.remoteInvoke=function(c,e,g,k,m){var p=!0,v=window.setTimeout(mxUtils.bind(this,function(){p=!1;m({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),x=mxUtils.bind(this,function(){window.clearTimeout(v);p&&k.apply(this,arguments)}),A=mxUtils.bind(this,function(){window.clearTimeout(v);p&&m.apply(this,arguments)});g=g||{};g.callbackId=this.remoteInvokeCallbacks.length;
+this.remoteInvokeCallbacks.push({callback:x,error:A});c=JSON.stringify({event:"remoteInvoke",funtionName:c,functionArgs:e,msgMarkers:g});null!=this.remoteWin?this.remoteWin.postMessage(c,"*"):this.remoteInvokeQueue.push(c)};EditorUi.prototype.handleRemoteInvoke=function(c,e){var g=mxUtils.bind(this,function(y,L){var N={event:"remoteInvokeResponse",msgMarkers:c.msgMarkers};null!=L?N.error={errResp:L}:null!=y&&(N.resp=y);this.remoteWin.postMessage(JSON.stringify(N),"*")});try{var k=c.funtionName,m=
+this.remoteInvokableFns[k];if(null!=m&&"function"===typeof this[k]){if(m.allowedDomains){for(var p=!1,v=0;v<m.allowedDomains.length;v++)if(e=="https://"+m.allowedDomains[v]){p=!0;break}if(!p){g(null,"Invalid Call: "+k+" is not allowed.");return}}var x=c.functionArgs;Array.isArray(x)||(x=[]);if(m.isAsync)x.push(function(){g(Array.prototype.slice.apply(arguments))}),x.push(function(y){g(null,y||"Unkown Error")}),this[k].apply(this,x);else{var A=this[k].apply(this,x);g([A])}}else g(null,"Invalid Call: "+
k+" is not found.")}catch(y){g(null,"Invalid Call: An error occurred, "+y.message)}};EditorUi.prototype.openDatabase=function(c,e){if(null==this.database){var g=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=g)try{var k=g.open("database",2);k.onupgradeneeded=function(m){try{var p=k.result;1>m.oldVersion&&p.createObjectStore("objects",{keyPath:"key"});2>m.oldVersion&&(p.createObjectStore("files",{keyPath:"title"}),p.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=
isLocalStorage)}catch(v){null!=e&&e(v)}};k.onsuccess=mxUtils.bind(this,function(m){var p=k.result;this.database=p;EditorUi.migrateStorageFiles&&(StorageFile.migrate(p),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(v){if(!v||"1"==urlParams.forceMigration){var x=document.createElement("iframe");x.style.display="none";x.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+
-urlParams.forceMigration);document.body.appendChild(x);var z=!0,y=!1,L,N=0,J=mxUtils.bind(this,function(){y=!0;this.setDatabaseItem(".drawioMigrated3",!0);x.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),q=mxUtils.bind(this,function(){N++;D()}),D=mxUtils.bind(this,function(){try{if(N>=L.length)J();else{var C=L[N];StorageFile.getFileContent(this,C,mxUtils.bind(this,function(G){null==G||".scratchpad"==C&&G==this.emptyLibraryXml?x.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
-funtionName:"getLocalStorageFile",functionArgs:[C]}),"*"):q()}),q)}}catch(G){console.log(G)}}),A=mxUtils.bind(this,function(C){try{this.setDatabaseItem(null,[{title:C.title,size:C.data.length,lastModified:Date.now(),type:C.isLib?"L":"F"},{title:C.title,data:C.data}],q,q,["filesInfo","files"])}catch(G){console.log(G)}});v=mxUtils.bind(this,function(C){try{if(C.source==x.contentWindow){var G={};try{G=JSON.parse(C.data)}catch(M){}"init"==G.event?(x.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),
-"*"),x.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=G.event||y||(z?null!=G.resp&&0<G.resp.length&&null!=G.resp[0]?(L=G.resp[0],z=!1,D()):J():null!=G.resp&&0<G.resp.length&&null!=G.resp[0]?A(G.resp[0]):q())}}catch(M){console.log(M)}});window.addEventListener("message",v)}})));c(p);p.onversionchange=function(){p.close()}});k.onerror=e;k.onblocked=function(){}}catch(m){null!=e&&e(m)}else null!=e&&e()}else c(this.database)};
+urlParams.forceMigration);document.body.appendChild(x);var A=!0,y=!1,L,N=0,I=mxUtils.bind(this,function(){y=!0;this.setDatabaseItem(".drawioMigrated3",!0);x.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),q=mxUtils.bind(this,function(){N++;D()}),D=mxUtils.bind(this,function(){try{if(N>=L.length)I();else{var C=L[N];StorageFile.getFileContent(this,C,mxUtils.bind(this,function(G){null==G||".scratchpad"==C&&G==this.emptyLibraryXml?x.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
+funtionName:"getLocalStorageFile",functionArgs:[C]}),"*"):q()}),q)}}catch(G){console.log(G)}}),z=mxUtils.bind(this,function(C){try{this.setDatabaseItem(null,[{title:C.title,size:C.data.length,lastModified:Date.now(),type:C.isLib?"L":"F"},{title:C.title,data:C.data}],q,q,["filesInfo","files"])}catch(G){console.log(G)}});v=mxUtils.bind(this,function(C){try{if(C.source==x.contentWindow){var G={};try{G=JSON.parse(C.data)}catch(H){}"init"==G.event?(x.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),
+"*"),x.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=G.event||y||(A?null!=G.resp&&0<G.resp.length&&null!=G.resp[0]?(L=G.resp[0],A=!1,D()):I():null!=G.resp&&0<G.resp.length&&null!=G.resp[0]?z(G.resp[0]):q())}}catch(H){console.log(H)}});window.addEventListener("message",v)}})));c(p);p.onversionchange=function(){p.close()}});k.onerror=e;k.onblocked=function(){}}catch(m){null!=e&&e(m)}else null!=e&&e()}else c(this.database)};
EditorUi.prototype.setDatabaseItem=function(c,e,g,k,m){this.openDatabase(mxUtils.bind(this,function(p){try{m=m||"objects";Array.isArray(m)||(m=[m],c=[c],e=[e]);var v=p.transaction(m,"readwrite");v.oncomplete=g;v.onerror=k;for(p=0;p<m.length;p++)v.objectStore(m[p]).put(null!=c&&null!=c[p]?{key:c[p],data:e[p]}:e[p])}catch(x){null!=k&&k(x)}}),k)};EditorUi.prototype.removeDatabaseItem=function(c,e,g,k){this.openDatabase(mxUtils.bind(this,function(m){k=k||"objects";Array.isArray(k)||(k=[k],c=[c]);m=m.transaction(k,
"readwrite");m.oncomplete=e;m.onerror=g;for(var p=0;p<k.length;p++)m.objectStore(k[p]).delete(c[p])}),g)};EditorUi.prototype.getDatabaseItem=function(c,e,g,k){this.openDatabase(mxUtils.bind(this,function(m){try{k=k||"objects";var p=m.transaction([k],"readonly").objectStore(k).get(c);p.onsuccess=function(){e(p.result)};p.onerror=g}catch(v){null!=g&&g(v)}}),g)};EditorUi.prototype.getDatabaseItems=function(c,e,g){this.openDatabase(mxUtils.bind(this,function(k){try{g=g||"objects";var m=k.transaction([g],
"readonly").objectStore(g).openCursor(IDBKeyRange.lowerBound(0)),p=[];m.onsuccess=function(v){null==v.target.result?c(p):(p.push(v.target.result.value),v.target.result.continue())};m.onerror=e}catch(v){null!=e&&e(v)}}),e)};EditorUi.prototype.getDatabaseItemKeys=function(c,e,g){this.openDatabase(mxUtils.bind(this,function(k){try{g=g||"objects";var m=k.transaction([g],"readonly").objectStore(g).getAllKeys();m.onsuccess=function(){c(m.result)};m.onerror=e}catch(p){null!=e&&e(p)}}),e)};EditorUi.prototype.commentsSupported=
@@ -12120,46 +12116,45 @@ function(){var c=this.getCurrentFile();return null!=c?c.commentsSupported():!1};
null!=k?k.addComment(c,e,g):e(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var c=this.getCurrentFile();return null!=c?c.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var c=this.getCurrentFile();return null!=c?c.canComment():!0};EditorUi.prototype.newComment=function(c,e){var g=this.getCurrentFile();return null!=g?g.newComment(c,e):new DrawioComment(this,null,c,Date.now(),Date.now(),!1,e)};EditorUi.prototype.isRevisionHistorySupported=function(){var c=this.getCurrentFile();
return null!=c&&c.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(c,e){var g=this.getCurrentFile();null!=g&&g.getRevisions?g.getRevisions(c,e):e({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var c=this.getCurrentFile();return null!=c&&(c.constructor==DriveFile&&c.isEditable()||c.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(c){c.setRequestHeader("Content-Language",
"da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(c,e,g,k,m,p,v,x){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(c,e,g,k,m,p,v,x)};EditorUi.prototype.loadFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(c)};EditorUi.prototype.createSvgDataUri=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(c)};EditorUi.prototype.embedCssFonts=function(c,e){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");
-return this.editor.embedCssFonts(c,e)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,e,g,k,m,p,v,x,z,y,L,N,J,q,D,A){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(c,e,g,k,m,p,v,x,z,y,L,N,J,q,D,A)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");
+return this.editor.embedCssFonts(c,e)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,e,g,k,m,p,v,x,A,y,L,N,I,q,D,z){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(c,e,g,k,m,p,v,x,A,y,L,N,I,q,D,z)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");
return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,e,g,k){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(c,e,g,k)};EditorUi.prototype.convertImageToDataUri=function(c,e){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(c,e)};EditorUi.prototype.base64Encode=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(c)};EditorUi.prototype.updateCRC=
function(c,e,g,k){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(c,e,g,k)};EditorUi.prototype.crc32=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(c)};EditorUi.prototype.writeGraphModelToPng=function(c,e,g,k,m){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(c,e,g,k,m)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=
urlParams.forceMigration)return null;for(var c=[],e=0;e<localStorage.length;e++){var g=localStorage.key(e),k=localStorage.getItem(g);if(0<g.length&&(".scratchpad"==g||"."!=g.charAt(0))&&0<k.length){var m="<mxfile "===k.substring(0,8)||"<?xml"===k.substring(0,5)||"\x3c!--[if IE]>"===k.substring(0,12);k="<mxlibrary>"===k.substring(0,11);(m||k)&&c.push(g)}}return c};EditorUi.prototype.getLocalStorageFile=function(c){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;
var e=localStorage.getItem(c);return{title:c,data:e,isLib:"<mxlibrary>"===e.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(b,f,l,d,t,u){function E(){for(var H=N.getElementsByTagName("div"),F=0,I=0;I<H.length;I++)"none"!=H[I].style.display&&H[I].parentNode==N&&F++;J.style.display=0==F?"block":"none"}function c(H,F,I,R){function X(){F.removeChild(U);F.removeChild(n);W.style.display="block";O.style.display="block"}z={div:F,comment:H,saveCallback:I,deleteOnCancel:R};var O=F.querySelector(".geCommentTxt"),W=F.querySelector(".geCommentActionsList"),U=document.createElement("textarea");U.className=
-"geCommentEditTxtArea";U.style.minHeight=O.offsetHeight+"px";U.value=H.content;F.insertBefore(U,O);var n=document.createElement("div");n.className="geCommentEditBtns";var B=mxUtils.button(mxResources.get("cancel"),function(){R?(F.parentNode.removeChild(F),E()):X();z=null});B.className="geCommentEditBtn";n.appendChild(B);var K=mxUtils.button(mxResources.get("save"),function(){O.innerText="";H.content=U.value;mxUtils.write(O,H.content);X();I(H);z=null});mxEvent.addListener(U,"keydown",mxUtils.bind(this,
-function(Q){mxEvent.isConsumed(Q)||((mxEvent.isControlDown(Q)||mxClient.IS_MAC&&mxEvent.isMetaDown(Q))&&13==Q.keyCode?(K.click(),mxEvent.consume(Q)):27==Q.keyCode&&(B.click(),mxEvent.consume(Q)))}));K.focus();K.className="geCommentEditBtn gePrimaryBtn";n.appendChild(K);F.insertBefore(n,O);W.style.display="none";O.style.display="none";U.focus()}function e(H,F){F.innerText="";H=new Date(H.modifiedDate);var I=b.timeSince(H);null==I&&(I=mxResources.get("lessThanAMinute"));mxUtils.write(F,mxResources.get("timeAgo",
-[I],"{1} ago"));F.setAttribute("title",H.toLocaleDateString()+" "+H.toLocaleTimeString())}function g(H){var F=document.createElement("img");F.className="geCommentBusyImg";F.src=IMAGE_PATH+"/spin.gif";H.appendChild(F);H.busyImg=F}function k(H){H.style.border="1px solid red";H.removeChild(H.busyImg)}function m(H){H.style.border="";H.removeChild(H.busyImg)}function p(H,F,I,R,X){function O(T,V,S){var Y=document.createElement("li");Y.className="geCommentAction";var ca=document.createElement("a");ca.className=
-"geCommentActionLnk";mxUtils.write(ca,T);Y.appendChild(ca);mxEvent.addListener(ca,"click",function(aa){V(aa,H);aa.preventDefault();mxEvent.consume(aa)});P.appendChild(Y);S&&(Y.style.display="none")}function W(){function T(Y){V.push(S);if(null!=Y.replies)for(var ca=0;ca<Y.replies.length;ca++)S=S.nextSibling,T(Y.replies[ca])}var V=[],S=n;T(H);return{pdiv:S,replies:V}}function U(T,V,S,Y,ca){function aa(){g(Z);H.addReply(ha,function(Da){ha.id=Da;H.replies.push(ha);m(Z);S&&S()},function(Da){da();k(Z);
-b.handleError(Da,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},Y,ca)}function da(){c(ha,Z,function(Da){aa()},!0)}var ja=W().pdiv,ha=b.newComment(T,b.getCurrentUser());ha.pCommentId=H.id;null==H.replies&&(H.replies=[]);var Z=p(ha,H.replies,ja,R+1);V?da():aa()}if(X||!H.isResolved){J.style.display="none";var n=document.createElement("div");n.className="geCommentContainer";n.setAttribute("data-commentId",H.id);n.style.marginLeft=20*R+5+"px";H.isResolved&&!Editor.isDarkMode()&&
-(n.style.backgroundColor="ghostWhite");var B=document.createElement("div");B.className="geCommentHeader";var K=document.createElement("img");K.className="geCommentUserImg";K.src=H.user.pictureUrl||Editor.userImage;B.appendChild(K);K=document.createElement("div");K.className="geCommentHeaderTxt";B.appendChild(K);var Q=document.createElement("div");Q.className="geCommentUsername";mxUtils.write(Q,H.user.displayName||"");K.appendChild(Q);Q=document.createElement("div");Q.className="geCommentDate";Q.setAttribute("data-commentId",
-H.id);e(H,Q);K.appendChild(Q);n.appendChild(B);B=document.createElement("div");B.className="geCommentTxt";mxUtils.write(B,H.content||"");n.appendChild(B);H.isLocked&&(n.style.opacity="0.5");B=document.createElement("div");B.className="geCommentActions";var P=document.createElement("ul");P.className="geCommentActionsList";B.appendChild(P);v||H.isLocked||0!=R&&!x||O(mxResources.get("reply"),function(){U("",!0)},H.isResolved);K=b.getCurrentUser();null==K||K.id!=H.user.id||v||H.isLocked||(O(mxResources.get("edit"),
-function(){function T(){c(H,n,function(){g(n);H.editComment(H.content,function(){m(n)},function(V){k(n);T();b.handleError(V,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}T()},H.isResolved),O(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){g(n);H.deleteComment(function(T){if(!0===T){T=n.querySelector(".geCommentTxt");T.innerText="";mxUtils.write(T,mxResources.get("msgDeleted"));var V=n.querySelectorAll(".geCommentAction");for(T=
-0;T<V.length;T++)V[T].parentNode.removeChild(V[T]);m(n);n.style.opacity="0.5"}else{V=W(H).replies;for(T=0;T<V.length;T++)N.removeChild(V[T]);for(T=0;T<F.length;T++)if(F[T]==H){F.splice(T,1);break}J.style.display=0==N.getElementsByTagName("div").length?"block":"none"}},function(T){k(n);b.handleError(T,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},H.isResolved));v||H.isLocked||0!=R||O(H.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(T){function V(){var S=
-T.target;S.innerText="";H.isResolved=!H.isResolved;mxUtils.write(S,H.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var Y=H.isResolved?"none":"",ca=W(H).replies,aa=Editor.isDarkMode()?"transparent":H.isResolved?"ghostWhite":"white",da=0;da<ca.length;da++){ca[da].style.backgroundColor=aa;for(var ja=ca[da].querySelectorAll(".geCommentAction"),ha=0;ha<ja.length;ha++)ja[ha]!=S.parentNode&&(ja[ha].style.display=Y);A||(ca[da].style.display="none")}E()}H.isResolved?U(mxResources.get("reOpened")+
-": ",!0,V,!1,!0):U(mxResources.get("markedAsResolved"),!1,V,!0)});n.appendChild(B);null!=I?N.insertBefore(n,I.nextSibling):N.appendChild(n);for(I=0;null!=H.replies&&I<H.replies.length;I++)B=H.replies[I],B.isResolved=H.isResolved,p(B,H.replies,null,R+1,X);null!=z&&(z.comment.id==H.id?(X=H.content,H.content=z.comment.content,c(H,n,z.saveCallback,z.deleteOnCancel),H.content=X):null==z.comment.id&&z.comment.pCommentId==H.id&&(N.appendChild(z.div),c(z.comment,z.div,z.saveCallback,z.deleteOnCancel)));return n}}
-var v=!b.canComment(),x=b.canReplyToReplies(),z=null,y=document.createElement("div");y.className="geCommentsWin";y.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var L=EditorUi.compactUi?"26px":"30px",N=document.createElement("div");N.className="geCommentsList";N.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";N.style.bottom=parseInt(L)+7+"px";y.appendChild(N);var J=document.createElement("span");J.style.cssText="display:none;padding-top:10px;text-align:center;";
-mxUtils.write(J,mxResources.get("noCommentsFound"));var q=document.createElement("div");q.className="geToolbarContainer geCommentsToolbar";q.style.height=L;q.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";q.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";L=document.createElement("a");L.className="geButton";if(!v){var D=L.cloneNode();D.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';D.setAttribute("title",mxResources.get("create")+
-"...");mxEvent.addListener(D,"click",function(H){function F(){c(I,R,function(X){g(R);b.addComment(X,function(O){X.id=O;C.push(X);m(R)},function(O){k(R);F();b.handleError(O,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var I=b.newComment("",b.getCurrentUser()),R=p(I,C,null,0);F();H.preventDefault();mxEvent.consume(H)});q.appendChild(D)}D=L.cloneNode();D.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';D.setAttribute("title",mxResources.get("showResolved"));
-var A=!1;Editor.isDarkMode()&&(D.style.filter="invert(100%)");mxEvent.addListener(D,"click",function(H){this.className=(A=!A)?"geButton geCheckedBtn":"geButton";G();H.preventDefault();mxEvent.consume(H)});q.appendChild(D);b.commentsRefreshNeeded()&&(D=L.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(H){G();
-H.preventDefault();mxEvent.consume(H)}),q.appendChild(D));b.commentsSaveNeeded()&&(L=L.cloneNode(),L.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',L.setAttribute("title",mxResources.get("save")),Editor.isDarkMode()&&(L.style.filter="invert(100%)"),mxEvent.addListener(L,"click",function(H){u();H.preventDefault();mxEvent.consume(H)}),q.appendChild(L));y.appendChild(q);var C=[],G=mxUtils.bind(this,function(){this.hasError=!1;if(null!=z)try{z.div=z.div.cloneNode(!0);
-var H=z.div.querySelector(".geCommentEditTxtArea"),F=z.div.querySelector(".geCommentEditBtns");z.comment.content=H.value;H.parentNode.removeChild(H);F.parentNode.removeChild(F)}catch(I){b.handleError(I)}N.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";x=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(I){function R(X){if(null!=X){X.sort(function(W,U){return new Date(W.modifiedDate)-
-new Date(U.modifiedDate)});for(var O=0;O<X.length;O++)R(X[O].replies)}}I.sort(function(X,O){return new Date(X.modifiedDate)-new Date(O.modifiedDate)});N.innerText="";N.appendChild(J);J.style.display="block";C=I;for(I=0;I<C.length;I++)R(C[I].replies),p(C[I],C,null,0,A);null!=z&&null==z.comment.id&&null==z.comment.pCommentId&&(N.appendChild(z.div),c(z.comment,z.div,z.saveCallback,z.deleteOnCancel))},mxUtils.bind(this,function(I){N.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(I&&I.message?
-": "+I.message:""));this.hasError=!0})):N.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});G();this.refreshComments=G;q=mxUtils.bind(this,function(){function H(O){var W=I[O.id];if(null!=W)for(e(O,W),W=0;null!=O.replies&&W<O.replies.length;W++)H(O.replies[W])}if(this.window.isVisible()){for(var F=N.querySelectorAll(".geCommentDate"),I={},R=0;R<F.length;R++){var X=F[R];I[X.getAttribute("data-commentId")]=X}for(R=0;R<C.length;R++)H(C[R])}});setInterval(q,6E4);this.refreshCommentsTime=q;this.window=
-new mxWindow(mxResources.get("comments"),y,f,l,d,t,!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(H,F){var I=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;H=Math.max(0,Math.min(H,(window.innerWidth||
-document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));F=Math.max(0,Math.min(F,I-this.table.clientHeight-48));this.getX()==H&&this.getY()==F||mxWindow.prototype.setLocation.apply(this,arguments)};var M=mxUtils.bind(this,function(){var H=this.window.getX(),F=this.window.getY();this.window.setLocation(H,F)});mxEvent.addListener(window,"resize",M);this.destroy=function(){mxEvent.removeListener(window,"resize",M);this.window.destroy()}},ConfirmDialog=function(b,f,l,
-d,t,u,E,c,e,g,k){var m=document.createElement("div");m.style.textAlign="center";k=null!=k?k:44;var p=document.createElement("div");p.style.padding="6px";p.style.overflow="auto";p.style.maxHeight=k+"px";p.style.lineHeight="1.2em";mxUtils.write(p,f);m.appendChild(p);null!=g&&(p=document.createElement("div"),p.style.padding="6px 0 6px 0",f=document.createElement("img"),f.setAttribute("src",g),p.appendChild(f),m.appendChild(p));g=document.createElement("div");g.style.textAlign="center";g.style.whiteSpace=
-"nowrap";var v=document.createElement("input");v.setAttribute("type","checkbox");u=mxUtils.button(u||mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d(v.checked)});u.className="geBtn";null!=c&&(u.innerHTML=c+"<br>"+u.innerHTML,u.style.paddingBottom="8px",u.style.paddingTop="8px",u.style.height="auto",u.style.width="40%");b.editor.cancelFirst&&g.appendChild(u);var x=mxUtils.button(t||mxResources.get("ok"),function(){b.hideDialog();null!=l&&l(v.checked)});g.appendChild(x);null!=E?(x.innerHTML=
-E+"<br>"+x.innerHTML+"<br>",x.style.paddingBottom="8px",x.style.paddingTop="8px",x.style.height="auto",x.className="geBtn",x.style.width="40%"):x.className="geBtn gePrimaryBtn";b.editor.cancelFirst||g.appendChild(u);m.appendChild(g);e?(g.style.marginTop="10px",p=document.createElement("p"),p.style.marginTop="20px",p.style.marginBottom="0px",p.appendChild(v),t=document.createElement("span"),mxUtils.write(t," "+mxResources.get("rememberThisSetting")),p.appendChild(t),m.appendChild(p),mxEvent.addListener(t,
-"click",function(z){v.checked=!v.checked;mxEvent.consume(z)})):g.style.marginTop="12px";this.init=function(){x.focus()};this.container=m};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.transientViewStateProperties="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0,extFonts:!0};
+var CommentsWindow=function(b,f,l,d,t,u){function E(){for(var H=N.getElementsByTagName("div"),M=0,F=0;F<H.length;F++)"none"!=H[F].style.display&&H[F].parentNode==N&&M++;I.style.display=0==M?"block":"none"}function c(H,M,F,J){function Q(){M.removeChild(V);M.removeChild(W);P.style.display="block";X.style.display="block"}A={div:M,comment:H,saveCallback:F,deleteOnCancel:J};var X=M.querySelector(".geCommentTxt"),P=M.querySelector(".geCommentActionsList"),V=document.createElement("textarea");V.className=
+"geCommentEditTxtArea";V.style.minHeight=X.offsetHeight+"px";V.value=H.content;M.insertBefore(V,X);var W=document.createElement("div");W.className="geCommentEditBtns";var n=mxUtils.button(mxResources.get("cancel"),function(){J?(M.parentNode.removeChild(M),E()):Q();A=null});n.className="geCommentEditBtn";W.appendChild(n);var B=mxUtils.button(mxResources.get("save"),function(){X.innerText="";H.content=V.value;mxUtils.write(X,H.content);Q();F(H);A=null});mxEvent.addListener(V,"keydown",mxUtils.bind(this,
+function(K){mxEvent.isConsumed(K)||((mxEvent.isControlDown(K)||mxClient.IS_MAC&&mxEvent.isMetaDown(K))&&13==K.keyCode?(B.click(),mxEvent.consume(K)):27==K.keyCode&&(n.click(),mxEvent.consume(K)))}));B.focus();B.className="geCommentEditBtn gePrimaryBtn";W.appendChild(B);M.insertBefore(W,X);P.style.display="none";X.style.display="none";V.focus()}function e(H,M){M.innerText="";H=new Date(H.modifiedDate);var F=b.timeSince(H);null==F&&(F=mxResources.get("lessThanAMinute"));mxUtils.write(M,mxResources.get("timeAgo",
+[F],"{1} ago"));M.setAttribute("title",H.toLocaleDateString()+" "+H.toLocaleTimeString())}function g(H){var M=document.createElement("img");M.className="geCommentBusyImg";M.src=IMAGE_PATH+"/spin.gif";H.appendChild(M);H.busyImg=M}function k(H){H.style.border="1px solid red";H.removeChild(H.busyImg)}function m(H){H.style.border="";H.removeChild(H.busyImg)}function p(H,M,F,J,Q){function X(O,U,S){var T=document.createElement("li");T.className="geCommentAction";var Y=document.createElement("a");Y.className=
+"geCommentActionLnk";mxUtils.write(Y,O);T.appendChild(Y);mxEvent.addListener(Y,"click",function(ba){U(ba,H);ba.preventDefault();mxEvent.consume(ba)});R.appendChild(T);S&&(T.style.display="none")}function P(){function O(T){U.push(S);if(null!=T.replies)for(var Y=0;Y<T.replies.length;Y++)S=S.nextSibling,O(T.replies[Y])}var U=[],S=W;O(H);return{pdiv:S,replies:U}}function V(O,U,S,T,Y){function ba(){g(ma);H.addReply(ha,function(Z){ha.id=Z;H.replies.push(ha);m(ma);S&&S()},function(Z){aa();k(ma);b.handleError(Z,
+null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},T,Y)}function aa(){c(ha,ma,function(Z){ba()},!0)}var da=P().pdiv,ha=b.newComment(O,b.getCurrentUser());ha.pCommentId=H.id;null==H.replies&&(H.replies=[]);var ma=p(ha,H.replies,da,J+1);U?aa():ba()}if(Q||!H.isResolved){I.style.display="none";var W=document.createElement("div");W.className="geCommentContainer";W.setAttribute("data-commentId",H.id);W.style.marginLeft=20*J+5+"px";H.isResolved&&!Editor.isDarkMode()&&(W.style.backgroundColor=
+"ghostWhite");var n=document.createElement("div");n.className="geCommentHeader";var B=document.createElement("img");B.className="geCommentUserImg";B.src=H.user.pictureUrl||Editor.userImage;n.appendChild(B);B=document.createElement("div");B.className="geCommentHeaderTxt";n.appendChild(B);var K=document.createElement("div");K.className="geCommentUsername";mxUtils.write(K,H.user.displayName||"");B.appendChild(K);K=document.createElement("div");K.className="geCommentDate";K.setAttribute("data-commentId",
+H.id);e(H,K);B.appendChild(K);W.appendChild(n);n=document.createElement("div");n.className="geCommentTxt";mxUtils.write(n,H.content||"");W.appendChild(n);H.isLocked&&(W.style.opacity="0.5");n=document.createElement("div");n.className="geCommentActions";var R=document.createElement("ul");R.className="geCommentActionsList";n.appendChild(R);v||H.isLocked||0!=J&&!x||X(mxResources.get("reply"),function(){V("",!0)},H.isResolved);B=b.getCurrentUser();null==B||B.id!=H.user.id||v||H.isLocked||(X(mxResources.get("edit"),
+function(){function O(){c(H,W,function(){g(W);H.editComment(H.content,function(){m(W)},function(U){k(W);O();b.handleError(U,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}O()},H.isResolved),X(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){g(W);H.deleteComment(function(O){if(!0===O){O=W.querySelector(".geCommentTxt");O.innerText="";mxUtils.write(O,mxResources.get("msgDeleted"));var U=W.querySelectorAll(".geCommentAction");for(O=
+0;O<U.length;O++)U[O].parentNode.removeChild(U[O]);m(W);W.style.opacity="0.5"}else{U=P(H).replies;for(O=0;O<U.length;O++)N.removeChild(U[O]);for(O=0;O<M.length;O++)if(M[O]==H){M.splice(O,1);break}I.style.display=0==N.getElementsByTagName("div").length?"block":"none"}},function(O){k(W);b.handleError(O,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},H.isResolved));v||H.isLocked||0!=J||X(H.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(O){function U(){var S=
+O.target;S.innerText="";H.isResolved=!H.isResolved;mxUtils.write(S,H.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var T=H.isResolved?"none":"",Y=P(H).replies,ba=Editor.isDarkMode()?"transparent":H.isResolved?"ghostWhite":"white",aa=0;aa<Y.length;aa++){Y[aa].style.backgroundColor=ba;for(var da=Y[aa].querySelectorAll(".geCommentAction"),ha=0;ha<da.length;ha++)da[ha]!=S.parentNode&&(da[ha].style.display=T);z||(Y[aa].style.display="none")}E()}H.isResolved?V(mxResources.get("reOpened")+
+": ",!0,U,!1,!0):V(mxResources.get("markedAsResolved"),!1,U,!0)});W.appendChild(n);null!=F?N.insertBefore(W,F.nextSibling):N.appendChild(W);for(F=0;null!=H.replies&&F<H.replies.length;F++)n=H.replies[F],n.isResolved=H.isResolved,p(n,H.replies,null,J+1,Q);null!=A&&(A.comment.id==H.id?(Q=H.content,H.content=A.comment.content,c(H,W,A.saveCallback,A.deleteOnCancel),H.content=Q):null==A.comment.id&&A.comment.pCommentId==H.id&&(N.appendChild(A.div),c(A.comment,A.div,A.saveCallback,A.deleteOnCancel)));return W}}
+var v=!b.canComment(),x=b.canReplyToReplies(),A=null,y=document.createElement("div");y.className="geCommentsWin";y.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var L=EditorUi.compactUi?"26px":"30px",N=document.createElement("div");N.className="geCommentsList";N.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";N.style.bottom=parseInt(L)+7+"px";y.appendChild(N);var I=document.createElement("span");I.style.cssText="display:none;padding-top:10px;text-align:center;";
+mxUtils.write(I,mxResources.get("noCommentsFound"));var q=document.createElement("div");q.className="geToolbarContainer geCommentsToolbar";q.style.height=L;q.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";q.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";L=document.createElement("a");L.className="geButton";if(!v){var D=L.cloneNode();D.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';D.setAttribute("title",mxResources.get("create")+
+"...");mxEvent.addListener(D,"click",function(H){function M(){c(F,J,function(Q){g(J);b.addComment(Q,function(X){Q.id=X;C.push(Q);m(J)},function(X){k(J);M();b.handleError(X,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var F=b.newComment("",b.getCurrentUser()),J=p(F,C,null,0);M();H.preventDefault();mxEvent.consume(H)});q.appendChild(D)}D=L.cloneNode();D.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';D.setAttribute("title",mxResources.get("showResolved"));
+var z=!1;Editor.isDarkMode()&&(D.style.filter="invert(100%)");mxEvent.addListener(D,"click",function(H){this.className=(z=!z)?"geButton geCheckedBtn":"geButton";G();H.preventDefault();mxEvent.consume(H)});q.appendChild(D);b.commentsRefreshNeeded()&&(D=L.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(H){G();
+H.preventDefault();mxEvent.consume(H)}),q.appendChild(D));b.commentsSaveNeeded()&&(L=L.cloneNode(),L.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',L.setAttribute("title",mxResources.get("save")),Editor.isDarkMode()&&(L.style.filter="invert(100%)"),mxEvent.addListener(L,"click",function(H){u();H.preventDefault();mxEvent.consume(H)}),q.appendChild(L));y.appendChild(q);var C=[],G=mxUtils.bind(this,function(){this.hasError=!1;if(null!=A)try{A.div=A.div.cloneNode(!0);
+var H=A.div.querySelector(".geCommentEditTxtArea"),M=A.div.querySelector(".geCommentEditBtns");A.comment.content=H.value;H.parentNode.removeChild(H);M.parentNode.removeChild(M)}catch(F){b.handleError(F)}N.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";x=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(F){function J(Q){if(null!=Q){Q.sort(function(P,V){return new Date(P.modifiedDate)-
+new Date(V.modifiedDate)});for(var X=0;X<Q.length;X++)J(Q[X].replies)}}F.sort(function(Q,X){return new Date(Q.modifiedDate)-new Date(X.modifiedDate)});N.innerText="";N.appendChild(I);I.style.display="block";C=F;for(F=0;F<C.length;F++)J(C[F].replies),p(C[F],C,null,0,z);null!=A&&null==A.comment.id&&null==A.comment.pCommentId&&(N.appendChild(A.div),c(A.comment,A.div,A.saveCallback,A.deleteOnCancel))},mxUtils.bind(this,function(F){N.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(F&&F.message?
+": "+F.message:""));this.hasError=!0})):N.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});G();this.refreshComments=G;q=mxUtils.bind(this,function(){function H(X){var P=F[X.id];if(null!=P)for(e(X,P),P=0;null!=X.replies&&P<X.replies.length;P++)H(X.replies[P])}if(this.window.isVisible()){for(var M=N.querySelectorAll(".geCommentDate"),F={},J=0;J<M.length;J++){var Q=M[J];F[Q.getAttribute("data-commentId")]=Q}for(J=0;J<C.length;J++)H(C[J])}});setInterval(q,6E4);this.refreshCommentsTime=q;this.window=
+new mxWindow(mxResources.get("comments"),y,f,l,d,t,!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()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,f,l,d,t,u,E,c,e,g,k){var m=document.createElement("div");m.style.textAlign="center";k=null!=k?k:44;var p=
+document.createElement("div");p.style.padding="6px";p.style.overflow="auto";p.style.maxHeight=k+"px";p.style.lineHeight="1.2em";mxUtils.write(p,f);m.appendChild(p);null!=g&&(p=document.createElement("div"),p.style.padding="6px 0 6px 0",f=document.createElement("img"),f.setAttribute("src",g),p.appendChild(f),m.appendChild(p));g=document.createElement("div");g.style.textAlign="center";g.style.whiteSpace="nowrap";var v=document.createElement("input");v.setAttribute("type","checkbox");u=mxUtils.button(u||
+mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d(v.checked)});u.className="geBtn";null!=c&&(u.innerHTML=c+"<br>"+u.innerHTML,u.style.paddingBottom="8px",u.style.paddingTop="8px",u.style.height="auto",u.style.width="40%");b.editor.cancelFirst&&g.appendChild(u);var x=mxUtils.button(t||mxResources.get("ok"),function(){b.hideDialog();null!=l&&l(v.checked)});g.appendChild(x);null!=E?(x.innerHTML=E+"<br>"+x.innerHTML+"<br>",x.style.paddingBottom="8px",x.style.paddingTop="8px",x.style.height=
+"auto",x.className="geBtn",x.style.width="40%"):x.className="geBtn gePrimaryBtn";b.editor.cancelFirst||g.appendChild(u);m.appendChild(g);e?(g.style.marginTop="10px",p=document.createElement("p"),p.style.marginTop="20px",p.style.marginBottom="0px",p.appendChild(v),t=document.createElement("span"),mxUtils.write(t," "+mxResources.get("rememberThisSetting")),p.appendChild(t),m.appendChild(p),mxEvent.addListener(t,"click",function(A){v.checked=!v.checked;mxEvent.consume(A)})):g.style.marginTop="12px";
+this.init=function(){x.focus()};this.container=m};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.transientViewStateProperties="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0,extFonts:!0};
EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,overlays:!0,mxObjectId:!0,mxTransient:!0};EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.applyPatches=function(b,f,l,d,t){if(null!=f)for(var u=0;u<f.length;u++)null!=f[u]&&(b=this.patchPages(b,f[u],l,d,t));return b};
EditorUi.prototype.patchPages=function(b,f,l,d,t){var u={},E=[],c={},e={},g={},k={};if(null!=d&&null!=d[EditorUi.DIFF_UPDATE])for(var m in d[EditorUi.DIFF_UPDATE])u[m]=d[EditorUi.DIFF_UPDATE][m];if(null!=f[EditorUi.DIFF_REMOVE])for(d=0;d<f[EditorUi.DIFF_REMOVE].length;d++)e[f[EditorUi.DIFF_REMOVE][d]]=!0;if(null!=f[EditorUi.DIFF_INSERT])for(d=0;d<f[EditorUi.DIFF_INSERT].length;d++)c[f[EditorUi.DIFF_INSERT][d].previous]=f[EditorUi.DIFF_INSERT][d];if(null!=f[EditorUi.DIFF_UPDATE])for(m in f[EditorUi.DIFF_UPDATE])d=
-f[EditorUi.DIFF_UPDATE][m],null!=d.previous&&(k[d.previous]=m);if(null!=b){var p="";for(d=0;d<b.length;d++){var v=b[d].getId();g[v]=b[d];null!=k[p]||e[v]||null!=f[EditorUi.DIFF_UPDATE]&&null!=f[EditorUi.DIFF_UPDATE][v]&&null!=f[EditorUi.DIFF_UPDATE][v].previous||(k[p]=v);p=v}}var x={},z=mxUtils.bind(this,function(L){var N=null!=L?L.getId():"";if(null!=L&&!x[N]){x[N]=!0;E.push(L);var J=null!=f[EditorUi.DIFF_UPDATE]?f[EditorUi.DIFF_UPDATE][N]:null;null!=J&&(this.updatePageRoot(L),null!=J.name&&L.setName(J.name),
-null!=J.view&&this.patchViewState(L,J.view),null!=J.cells&&this.patchPage(L,J.cells,u[L.getId()],t),!l||null==J.cells&&null==J.view||(L.needsUpdate=!0))}L=k[N];null!=L&&(delete k[N],z(g[L]));L=c[N];null!=L&&(delete c[N],y(L))}),y=mxUtils.bind(this,function(L){L=mxUtils.parseXml(L.data).documentElement;L=new DiagramPage(L);this.updatePageRoot(L);var N=g[L.getId()];null==N?z(L):(this.patchPage(N,this.diffPages([N],[L]),u[N.getId()],t),l&&(N.needsUpdate=!0))});z();for(m in k)z(g[k[m]]),delete k[m];for(m in c)y(c[m]),
+f[EditorUi.DIFF_UPDATE][m],null!=d.previous&&(k[d.previous]=m);if(null!=b){var p="";for(d=0;d<b.length;d++){var v=b[d].getId();g[v]=b[d];null!=k[p]||e[v]||null!=f[EditorUi.DIFF_UPDATE]&&null!=f[EditorUi.DIFF_UPDATE][v]&&null!=f[EditorUi.DIFF_UPDATE][v].previous||(k[p]=v);p=v}}var x={},A=mxUtils.bind(this,function(L){var N=null!=L?L.getId():"";if(null!=L&&!x[N]){x[N]=!0;E.push(L);var I=null!=f[EditorUi.DIFF_UPDATE]?f[EditorUi.DIFF_UPDATE][N]:null;null!=I&&(this.updatePageRoot(L),null!=I.name&&L.setName(I.name),
+null!=I.view&&this.patchViewState(L,I.view),null!=I.cells&&this.patchPage(L,I.cells,u[L.getId()],t),!l||null==I.cells&&null==I.view||(L.needsUpdate=!0))}L=k[N];null!=L&&(delete k[N],A(g[L]));L=c[N];null!=L&&(delete c[N],y(L))}),y=mxUtils.bind(this,function(L){L=mxUtils.parseXml(L.data).documentElement;L=new DiagramPage(L);this.updatePageRoot(L);var N=g[L.getId()];null==N?A(L):(this.patchPage(N,this.diffPages([N],[L]),u[N.getId()],t),l&&(N.needsUpdate=!0))});A();for(m in k)A(g[k[m]]),delete k[m];for(m in c)y(c[m]),
delete c[m];return E};EditorUi.prototype.patchViewState=function(b,f){if(null!=b.viewState&&null!=f){b==this.currentPage&&(b.viewState=this.editor.graph.getViewState());for(var l in f)try{this.patchViewStateProperty(b,f,l)}catch(d){}b==this.currentPage&&this.editor.graph.setViewState(b.viewState,!0)}};EditorUi.prototype.patchViewStateProperty=function(b,f,l){b.viewState[l]=JSON.parse(f[l])};
EditorUi.prototype.createParentLookup=function(b,f){function l(g){var k=d[g];null==k&&(k={inserted:[],moved:{}},d[g]=k);return k}var d={};if(null!=f[EditorUi.DIFF_INSERT])for(var t=0;t<f[EditorUi.DIFF_INSERT].length;t++){var u=f[EditorUi.DIFF_INSERT][t],E=null!=u.parent?u.parent:"",c=null!=u.previous?u.previous:"";l(E).inserted[c]=u}if(null!=f[EditorUi.DIFF_UPDATE])for(var e in f[EditorUi.DIFF_UPDATE])u=f[EditorUi.DIFF_UPDATE][e],null!=u.previous&&(E=u.parent,null==E&&(t=b.getCell(e),null!=t&&(t=
b.getParent(t),null!=t&&(E=t.getId()))),null!=E&&(l(E).moved[u.previous]=e));return d};
EditorUi.prototype.patchPage=function(b,f,l,d){var t=b==this.currentPage?this.editor.graph.model:new mxGraphModel(b.root),u=this.createParentLookup(t,f);t.beginUpdate();try{var E=t.updateEdgeParent,c=new mxDictionary,e=[];t.updateEdgeParent=function(y,L){!c.get(y)&&d&&(c.put(y,!0),e.push(y))};var g=u[""],k=null!=g&&null!=g.inserted?g.inserted[""]:null,m=null;null!=k&&(m=this.getCellForJson(k));if(null==m){var p=null!=g&&null!=g.moved?g.moved[""]:null;null!=p&&(m=t.getCell(p))}null!=m&&(t.setRoot(m),
-b.root=m);this.patchCellRecursive(b,t,t.root,u,f);if(null!=f[EditorUi.DIFF_REMOVE])for(var v=0;v<f[EditorUi.DIFF_REMOVE].length;v++){var x=t.getCell(f[EditorUi.DIFF_REMOVE][v]);null!=x&&t.remove(x)}if(null!=f[EditorUi.DIFF_UPDATE]){var z=null!=l&&null!=l.cells?l.cells[EditorUi.DIFF_UPDATE]:null;for(p in f[EditorUi.DIFF_UPDATE])this.patchCell(t,t.getCell(p),f[EditorUi.DIFF_UPDATE][p],null!=z?z[p]:null)}if(null!=f[EditorUi.DIFF_INSERT])for(v=0;v<f[EditorUi.DIFF_INSERT].length;v++)k=f[EditorUi.DIFF_INSERT][v],
+b.root=m);this.patchCellRecursive(b,t,t.root,u,f);if(null!=f[EditorUi.DIFF_REMOVE])for(var v=0;v<f[EditorUi.DIFF_REMOVE].length;v++){var x=t.getCell(f[EditorUi.DIFF_REMOVE][v]);null!=x&&t.remove(x)}if(null!=f[EditorUi.DIFF_UPDATE]){var A=null!=l&&null!=l.cells?l.cells[EditorUi.DIFF_UPDATE]:null;for(p in f[EditorUi.DIFF_UPDATE])this.patchCell(t,t.getCell(p),f[EditorUi.DIFF_UPDATE][p],null!=A?A[p]:null)}if(null!=f[EditorUi.DIFF_INSERT])for(v=0;v<f[EditorUi.DIFF_INSERT].length;v++)k=f[EditorUi.DIFF_INSERT][v],
x=t.getCell(k.id),null!=x&&(t.setTerminal(x,t.getCell(k.source),!0),t.setTerminal(x,t.getCell(k.target),!1));t.updateEdgeParent=E;if(d&&0<e.length)for(v=0;v<e.length;v++)t.contains(e[v])&&t.updateEdgeParent(e[v])}finally{t.endUpdate()}};
EditorUi.prototype.patchCellRecursive=function(b,f,l,d,t){if(null!=l){var u=d[l.getId()],E=null!=u&&null!=u.inserted?u.inserted:{};u=null!=u&&null!=u.moved?u.moved:{};for(var c=0,e=f.getChildCount(l),g="",k=0;k<e;k++){var m=f.getChildAt(l,k).getId();null==u[g]&&(null==t[EditorUi.DIFF_UPDATE]||null==t[EditorUi.DIFF_UPDATE][m]||null==t[EditorUi.DIFF_UPDATE][m].previous&&null==t[EditorUi.DIFF_UPDATE][m].parent)&&(u[g]=m);g=m}e=mxUtils.bind(this,function(p,v){var x=null!=p?p.getId():"";null!=p&&v&&(v=
f.getCell(x),null!=v&&v!=p&&(p=null));null!=p&&(f.getChildAt(l,c)!=p&&f.add(l,p,c),this.patchCellRecursive(b,f,p,d,t),c++);return x});for(g=[null];0<g.length;)if(k=g.shift(),k=e(null!=k?k.child:null,null!=k?k.insert:!1),m=u[k],null!=m&&(delete u[k],g.push({child:f.getCell(m)})),m=E[k],null!=m&&(delete E[k],g.push({child:this.getCellForJson(m),insert:!0})),0==g.length){for(k in u)g.push({child:f.getCell(u[k])}),delete u[k];for(k in E)g.push({child:this.getCellForJson(E[k]),insert:!0}),delete E[k]}}};
@@ -12235,14 +12230,14 @@ b,l)}};DrawioFileSync.prototype.doReceiveRemoteChanges=function(b){this.file.isR
DrawioFileSync.prototype.merge=function(b,f,l,d,t,u){try{this.file.stats.merged++;this.lastModified=new Date;var E=this.file.getDescriptorRevisionId(l);if(!this.file.ignorePatches(b)){this.sendLocalChanges();var c=this.file.getShadowPages();this.file.backupPatch=this.file.isModified()&&!this.file.isRealtime()?this.ui.diffPages(c,this.ui.pages):null;var e=this.file.isRealtime()?this.ui.diffPages(c,this.file.ownPages):null;c=this.ui.applyPatches(c,b);var g=null==f?null:this.ui.getHashValueForPages(c);
this.file.setShadowPages(c);EditorUi.debug("DrawioFileSync.merge",[this],"patches",b,"backup",this.file.backupPatch,"pending",e,"checksum",f,"current",g,"valid",f==g,"attempt",this.catchupRetryCount,"of",this.maxCatchupRetries,"from",this.file.getCurrentRevisionId(),"to",E,"etag",this.file.getDescriptorEtag(l));if(null!=f&&f!=g){var k=this.ui.hashValue(E),m=this.ui.hashValue(this.file.getCurrentRevisionId());this.file.checksumError(t,b,"From: "+m+"\nTo: "+k+"\nChecksum: "+f+"\nCurrent: "+g,E,"merge");
"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.merge.checksumError",[this],"data",[this.file.data,this.file.createData(),this.ui.getXmlForPages(c)]);return}null==this.patchRealtime(b,null,e)&&this.file.patch(b,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),l);this.file.backupPatch=null;null!=d&&d(!0)}catch(x){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();
-null!=t&&t(x);try{if(this.file.errorReportsEnabled)m=this.ui.hashValue(this.file.getCurrentRevisionId()),k=this.ui.hashValue(E),this.file.sendErrorReport("Error in merge","From: "+m+"\nTo: "+k+"\nChecksum: "+f+"\nPatches:\n"+this.file.compressReportData(JSON.stringify(b,null,2)),x);else{var p=this.file.getCurrentUser(),v=null!=p?p.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),v,x)}}catch(z){}}};
+null!=t&&t(x);try{if(this.file.errorReportsEnabled)m=this.ui.hashValue(this.file.getCurrentRevisionId()),k=this.ui.hashValue(E),this.file.sendErrorReport("Error in merge","From: "+m+"\nTo: "+k+"\nChecksum: "+f+"\nPatches:\n"+this.file.compressReportData(JSON.stringify(b,null,2)),x);else{var p=this.file.getCurrentUser(),v=null!=p?p.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),v,x)}}catch(A){}}};
DrawioFileSync.prototype.fileChanged=function(b,f,l,d){var t=window.setTimeout(mxUtils.bind(this,function(){null!=l&&l()||(EditorUi.debug("DrawioFileSync.fileChanged",[this],"lazy",d,"valid",this.isValidState()),this.isValidState()?this.file.loadPatchDescriptor(mxUtils.bind(this,function(u){null!=l&&l()||(this.isValidState()?this.catchup(u,b,f,l):null!=f&&f())}),f):null!=f&&f())}),d?this.cacheReadyDelay:0);return this.notifyThread=t};
DrawioFileSync.prototype.reloadDescriptor=function(){this.file.loadDescriptor(mxUtils.bind(this,function(b){null!=b?(this.file.setDescriptorRevisionId(b,this.file.getCurrentRevisionId()),this.updateDescriptor(b),this.fileChangedNotify()):(this.file.inConflictState=!0,this.file.handleFileError())}),mxUtils.bind(this,function(b){this.file.inConflictState=!0;this.file.handleFileError(b)}))};
DrawioFileSync.prototype.updateDescriptor=function(b){this.file.setDescriptor(b);this.file.descriptorChanged();this.start()};
DrawioFileSync.prototype.catchup=function(b,f,l,d){if(null!=b&&(null==d||!d())){var t=this.file.getCurrentRevisionId(),u=this.file.getDescriptorRevisionId(b);EditorUi.debug("DrawioFileSync.catchup",[this],"desc",[b],"from",t,"to",u,"valid",this.isValidState());if(t==u)this.file.patchDescriptor(this.file.getDescriptor(),b),null!=f&&f(!0);else if(this.isValidState()){var E=this.file.getDescriptorSecret(b);if(null==E||"1"==urlParams.lockdown)this.reload(f,l,d);else{var c=0,e=!1,g=mxUtils.bind(this,function(){if(null==
d||!d())if(t!=this.file.getCurrentRevisionId())null!=f&&f(!0);else if(this.isValidState()){this.scheduleCleanup(!0);var k=!0,m=window.setTimeout(mxUtils.bind(this,function(){k=!1;this.reload(f,l,d)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(t)+"&to="+encodeURIComponent(u)+(null!=E?"&secret="+encodeURIComponent(E):""),mxUtils.bind(this,function(p){this.file.stats.bytesReceived+=p.getText().length;window.clearTimeout(m);if(k&&
-(null==d||!d()))if(t!=this.file.getCurrentRevisionId())null!=f&&f(!0);else if(this.isValidState()){var v=null,x=[];EditorUi.debug("DrawioFileSync.doCatchup",[this],"req",[p],"status",p.getStatus(),"cacheReadyRetryCount",c,"maxCacheReadyRetries",this.maxCacheReadyRetries);if(200<=p.getStatus()&&299>=p.getStatus()&&0<p.getText().length)try{var z=JSON.parse(p.getText());if(null!=z&&0<z.length)for(var y=0;y<z.length;y++){var L=this.stringToObject(z[y]);if(L.v>DrawioFileSync.PROTOCOL){e=!0;x=[];break}else if(L.v===
-DrawioFileSync.PROTOCOL&&null!=L.d)v=L.d.checksum,x.push(L.d.patch);else{e=!0;x=[];break}}EditorUi.debug("DrawioFileSync.doCatchup",[this],"response",[z],"failed",e,"temp",x,"checksum",v)}catch(N){x=[],null!=window.console&&"1"==urlParams.test&&console.log(N)}try{0<x.length?(this.file.stats.cacheHits++,this.merge(x,v,b,f,l,d)):c<=this.maxCacheReadyRetries-1&&!e&&401!=p.getStatus()&&503!=p.getStatus()&&410!=p.getStatus()?(c++,this.file.stats.cacheMiss++,window.setTimeout(g,(c+1)*this.cacheReadyDelay)):
+(null==d||!d()))if(t!=this.file.getCurrentRevisionId())null!=f&&f(!0);else if(this.isValidState()){var v=null,x=[];EditorUi.debug("DrawioFileSync.doCatchup",[this],"req",[p],"status",p.getStatus(),"cacheReadyRetryCount",c,"maxCacheReadyRetries",this.maxCacheReadyRetries);if(200<=p.getStatus()&&299>=p.getStatus()&&0<p.getText().length)try{var A=JSON.parse(p.getText());if(null!=A&&0<A.length)for(var y=0;y<A.length;y++){var L=this.stringToObject(A[y]);if(L.v>DrawioFileSync.PROTOCOL){e=!0;x=[];break}else if(L.v===
+DrawioFileSync.PROTOCOL&&null!=L.d)v=L.d.checksum,x.push(L.d.patch);else{e=!0;x=[];break}}EditorUi.debug("DrawioFileSync.doCatchup",[this],"response",[A],"failed",e,"temp",x,"checksum",v)}catch(N){x=[],null!=window.console&&"1"==urlParams.test&&console.log(N)}try{0<x.length?(this.file.stats.cacheHits++,this.merge(x,v,b,f,l,d)):c<=this.maxCacheReadyRetries-1&&!e&&401!=p.getStatus()&&503!=p.getStatus()&&410!=p.getStatus()?(c++,this.file.stats.cacheMiss++,window.setTimeout(g,(c+1)*this.cacheReadyDelay)):
(this.file.stats.cacheFail++,this.reload(f,l,d))}catch(N){null!=l&&l(N)}}else null!=l&&l()}))}else null!=l&&l()});window.setTimeout(g,this.cacheReadyDelay)}}else null!=l&&l()}};DrawioFileSync.prototype.reload=function(b,f,l,d){this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=b&&b()}),mxUtils.bind(this,function(t){null!=f&&f(t)}),l,d)};
DrawioFileSync.prototype.descriptorChanged=function(b){this.lastModified=this.file.getLastModifiedDate();if(null!=this.channelId){var f=this.objectToString(this.createMessage({a:"desc",m:this.lastModified.getTime()})),l=this.file.getCurrentRevisionId(),d=this.objectToString({});mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(b)+"&to="+encodeURIComponent(l)+"&msg="+encodeURIComponent(f)+"&data="+encodeURIComponent(d));this.file.stats.bytesSent+=d.length;this.file.stats.msgSent++;
EditorUi.debug("DrawioFileSync.descriptorChanged",[this],"from",b,"to",l)}this.updateStatus()};DrawioFileSync.prototype.objectToString=function(b){b=Graph.compress(JSON.stringify(b));null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.encrypt(b,this.key).toString());return b};DrawioFileSync.prototype.stringToObject=function(b){null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.decrypt(b,this.key).toString(CryptoJS.enc.Utf8));return JSON.parse(Graph.decompress(b))};
@@ -12275,12 +12270,12 @@ App.getStoredMode=function(){var b=null;null==b&&isLocalStorage&&(b=localStorage
2)?mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,null,"dropboxjs",App.DROPBOX_APPKEY,!0)}):"0"==urlParams.chrome&&(window.DropboxClient=null):window.DropboxClient=null),"function"===typeof window.OneDriveClient&&("0"!=urlParams.od&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?App.mode==App.MODE_ONEDRIVE||null!=window.location.hash&&"#W"==window.location.hash.substring(0,2)?mxscript(App.ONEDRIVE_URL):"0"==urlParams.chrome&&(window.OneDriveClient=
null):window.OneDriveClient=null),"function"===typeof window.TrelloClient&&("1"==urlParams.tr&&isSvgBrowser&&!mxClient.IS_IE11&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_TRELLO||null!=window.location.hash&&"#T"==window.location.hash.substring(0,2)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL)}):"0"==urlParams.chrome&&(window.TrelloClient=null):window.TrelloClient=null)))})();
App.clearServiceWorker=function(b,f){navigator.serviceWorker.getRegistrations().then(function(l){if(null!=l&&0<l.length){for(var d=0;d<l.length;d++)l[d].unregister();null!=b&&b()}})["catch"](function(){null!=f&&f()})};
-App.main=function(b,f){function l(k){mxUtils.getAll("1"!=urlParams.dev?[k]:[k,STYLE_PATH+"/default.xml"],function(m){function p(){var J=null!=f?f():new App(new Editor("0"==urlParams.chrome||"min"==uiTheme,null,null,null,"0"!=urlParams.chrome));if(null!=window.mxscript){if("function"===typeof window.DropboxClient&&null==window.Dropbox&&null!=window.DrawDropboxClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&isSvgBrowser&&(null==document.documentMode||
+App.main=function(b,f){function l(k){mxUtils.getAll("1"!=urlParams.dev?[k]:[k,STYLE_PATH+"/default.xml"],function(m){function p(){var I=null!=f?f():new App(new Editor("0"==urlParams.chrome||"min"==uiTheme,null,null,null,"0"!=urlParams.chrome));if(null!=window.mxscript){if("function"===typeof window.DropboxClient&&null==window.Dropbox&&null!=window.DrawDropboxClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&isSvgBrowser&&(null==document.documentMode||
9<document.documentMode))mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,function(){DrawDropboxClientCallback()},"dropboxjs",App.DROPBOX_APPKEY)});else if("undefined"===typeof window.Dropbox||"undefined"===typeof window.Dropbox.choose)window.DropboxClient=null;"function"===typeof window.OneDriveClient&&"undefined"===typeof OneDrive&&null!=window.DrawOneDriveClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&(null==navigator.userAgent||
0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.ONEDRIVE_URL,window.DrawOneDriveClientCallback):"undefined"===typeof window.OneDrive&&(window.OneDriveClient=null);"function"===typeof window.TrelloClient&&!mxClient.IS_IE11&&"undefined"===typeof window.Trello&&null!=window.DrawTrelloClientCallback&&"1"==urlParams.tr&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL,
-function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null)}null!=b&&b(J);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("App.start",[J,(new Date).getTime()-t0.getTime()+"ms"]),null!=urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))}mxResources.parse(m[0].getText());if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var v=function(J){if(null!=J)for(var q=0;q<J.length;q++)if(!x[J[q]])throw Error(mxResources.get("invalidInput")+
-' "'+J[q])+'"';return!0},x={},z;for(z in App.pluginRegistry)x[App.pluginRegistry[z]]=!0;var y=JSON.parse(Graph.decompress(window.location.hash.substring(9)));if(null!=y&&v(y.plugins)){EditorUi.debug("Setting configuration",JSON.stringify(y));if(null!=y.merge){var L=localStorage.getItem(Editor.configurationKey);if(null!=L)try{var N=JSON.parse(L);for(z in y.merge)N[z]=y.merge[z];y=N}catch(J){window.location.hash="",alert(J)}else y=y.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&
-(localStorage.setItem(Editor.configurationKey,JSON.stringify(y)),window.location.hash="",window.location.reload())}window.location.hash=""}catch(J){window.location.hash="",alert(J)}1<m.length&&(Graph.prototype.defaultThemes["default-style2"]=m[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=m[1].getDocumentElement());"1"==urlParams.dev||EditorUi.isElectronApp?p():(mxStencilRegistry.allowEval=!1,App.loadScripts(["js/shapes-14-6-5.min.js","js/stencils.min.js","js/extensions.min.js"],
+function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null)}null!=b&&b(I);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("App.start",[I,(new Date).getTime()-t0.getTime()+"ms"]),null!=urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))}mxResources.parse(m[0].getText());if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var v=function(I){if(null!=I)for(var q=0;q<I.length;q++)if(!x[I[q]])throw Error(mxResources.get("invalidInput")+
+' "'+I[q])+'"';return!0},x={},A;for(A in App.pluginRegistry)x[App.pluginRegistry[A]]=!0;var y=JSON.parse(Graph.decompress(window.location.hash.substring(9)));if(null!=y&&v(y.plugins)){EditorUi.debug("Setting configuration",JSON.stringify(y));if(null!=y.merge){var L=localStorage.getItem(Editor.configurationKey);if(null!=L)try{var N=JSON.parse(L);for(A in y.merge)N[A]=y.merge[A];y=N}catch(I){window.location.hash="",alert(I)}else y=y.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&
+(localStorage.setItem(Editor.configurationKey,JSON.stringify(y)),window.location.hash="",window.location.reload())}window.location.hash=""}catch(I){window.location.hash="",alert(I)}1<m.length&&(Graph.prototype.defaultThemes["default-style2"]=m[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=m[1].getDocumentElement());"1"==urlParams.dev||EditorUi.isElectronApp?p():(mxStencilRegistry.allowEval=!1,App.loadScripts(["js/shapes-14-6-5.min.js","js/stencils.min.js","js/extensions.min.js"],
p))},function(m){m=document.getElementById("geStatus");null!=m&&(m.innerHTML="Error loading page. <a>Please try refreshing.</a>",m.getElementsByTagName("a")[0].onclick=function(){mxLanguage="en";l(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))})})}function d(){try{if(null!=mxSettings.settings){document.body.style.backgroundColor="dark"==uiTheme||mxSettings.settings.darkMode?Editor.darkColor:"#ffffff";if(null!=mxSettings.settings.autosaveDelay){var k=
parseInt(mxSettings.settings.autosaveDelay);!isNaN(k)&&0<k?(DrawioFile.prototype.autosaveDelay=k,EditorUi.debug("Setting autosaveDelay",k)):EditorUi.debug("Invalid autosaveDelay",k)}null!=mxSettings.settings.defaultEdgeLength&&(k=parseInt(mxSettings.settings.defaultEdgeLength),!isNaN(k)&&0<k?(Graph.prototype.defaultEdgeLength=k,EditorUi.debug("Using defaultEdgeLength",k)):EditorUi.debug("Invalid defaultEdgeLength",k))}}catch(p){null!=window.console&&console.error(p)}if(null!=Menus.prototype.defaultFonts)for(k=
0;k<Menus.prototype.defaultFonts.length;k++){var m=Menus.prototype.defaultFonts[k];"string"!==typeof m&&null!=m.fontFamily&&null!=m.fontUrl&&Graph.addFont(m.fontFamily,m.fontUrl)}mxResources.loadDefaultBundle=!1;l(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))}window.onerror=function(k,m,p,v,x){EditorUi.logError("Global: "+(null!=k?k:""),m,p,v,x,null,!0)};if(window.top==window.self&&(/ac\.draw\.io$/.test(window.location.hostname)||/ac-ent\.draw\.io$/.test(window.location.hostname)||
@@ -12341,9 +12336,9 @@ 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,f=this.getCurrentFile();this.isOfflineApp()&&(b+=" app");null!=f&&(b=(null!=f.getTitle()?f.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,f){var l=!1;try{var d=!0,t=window.setTimeout(mxUtils.bind(this,function(){d=!1;f(null)}),this.timeout),u=mxUtils.bind(this,function(G){window.clearTimeout(t);d&&f(G)});null==this.thumbImageCache&&(this.thumbImageCache={});var E=this.editor.graph,c=E.backgroundImage,e=null!=E.themes&&"darkTheme"==E.defaultThemeName;if(null!=this.pages&&(e||this.currentPage!=this.pages[0])){var g=E.getGlobalVariable;E=this.createTemporaryGraph(E.getStylesheet());E.setBackgroundImage=
this.editor.graph.setBackgroundImage;var k=this.pages[0];this.currentPage==k?E.setBackgroundImage(c):null!=k.viewState&&null!=k.viewState&&(c=k.viewState.backgroundImage,E.setBackgroundImage(c));E.getGlobalVariable=function(G){return"page"==G?k.getName():"pagenumber"==G?1:g.apply(this,arguments)};E.getGlobalVariable=g;document.body.appendChild(E.container);E.model.setRoot(k.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(G){try{E!=this.editor.graph&&
-null!=E.container.parentNode&&E.container.parentNode.removeChild(E.container)}catch(M){G=null}u(G)}),b,this.thumbImageCache,"#ffffff",function(){u()},null,null,null,null,null,null,E,null,null,null,null,"diagram",null),l=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var m=document.createElement("canvas"),p=E.getGraphBounds(),v=E.view.translate,x=E.view.scale;null!=c&&(p=mxRectangle.fromRectangle(p),p.add(new mxRectangle((v.x+c.x)*x,(v.y+c.y)*x,c.width*x,c.height*x)));var z=b/p.width;
-z=Math.min(1,Math.min(3*b/(4*p.height),z));var y=Math.floor(p.x),L=Math.floor(p.y);m.setAttribute("width",Math.ceil(z*(p.width+4)));m.setAttribute("height",Math.ceil(z*(p.height+4)));var N=m.getContext("2d");N.scale(z,z);N.translate(-y,-L);var J=E.background;if(null==J||""==J||J==mxConstants.NONE)J="#ffffff";N.save();N.fillStyle=J;N.fillRect(y,L,Math.ceil(p.width+4),Math.ceil(p.height+4));N.restore();if(null!=c){var q=new Image;q.src=c.src;N.drawImage(q,c.x*z,c.y*z,c.width*z,c.height*z)}var D=new mxJsCanvas(m),
-A=new mxAsyncCanvas(this.thumbImageCache);D.images=this.thumbImageCache.images;var C=new mxImageExport;C.drawShape=function(G,M){G.shape instanceof mxShape&&G.shape.checkBounds()&&(M.save(),M.translate(.5,.5),G.shape.paint(M),M.translate(-.5,-.5),M.restore())};C.drawText=function(G,M){};C.drawState(E.getView().getState(E.model.root),A);A.finish(mxUtils.bind(this,function(){try{C.drawState(E.getView().getState(E.model.root),D),E!=this.editor.graph&&null!=E.container.parentNode&&E.container.parentNode.removeChild(E.container)}catch(G){m=
+null!=E.container.parentNode&&E.container.parentNode.removeChild(E.container)}catch(H){G=null}u(G)}),b,this.thumbImageCache,"#ffffff",function(){u()},null,null,null,null,null,null,E,null,null,null,null,"diagram",null),l=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var m=document.createElement("canvas"),p=E.getGraphBounds(),v=E.view.translate,x=E.view.scale;null!=c&&(p=mxRectangle.fromRectangle(p),p.add(new mxRectangle((v.x+c.x)*x,(v.y+c.y)*x,c.width*x,c.height*x)));var A=b/p.width;
+A=Math.min(1,Math.min(3*b/(4*p.height),A));var y=Math.floor(p.x),L=Math.floor(p.y);m.setAttribute("width",Math.ceil(A*(p.width+4)));m.setAttribute("height",Math.ceil(A*(p.height+4)));var N=m.getContext("2d");N.scale(A,A);N.translate(-y,-L);var I=E.background;if(null==I||""==I||I==mxConstants.NONE)I="#ffffff";N.save();N.fillStyle=I;N.fillRect(y,L,Math.ceil(p.width+4),Math.ceil(p.height+4));N.restore();if(null!=c){var q=new Image;q.src=c.src;N.drawImage(q,c.x*A,c.y*A,c.width*A,c.height*A)}var D=new mxJsCanvas(m),
+z=new mxAsyncCanvas(this.thumbImageCache);D.images=this.thumbImageCache.images;var C=new mxImageExport;C.drawShape=function(G,H){G.shape instanceof mxShape&&G.shape.checkBounds()&&(H.save(),H.translate(.5,.5),G.shape.paint(H),H.translate(-.5,-.5),H.restore())};C.drawText=function(G,H){};C.drawState(E.getView().getState(E.model.root),z);z.finish(mxUtils.bind(this,function(){try{C.drawState(E.getView().getState(E.model.root),D),E!=this.editor.graph&&null!=E.container.parentNode&&E.container.parentNode.removeChild(E.container)}catch(G){m=
null}u(m)}));l=!0}}catch(G){l=!1,null!=E&&E!=this.editor.graph&&null!=E.container.parentNode&&E.container.parentNode.removeChild(E.container)}l||window.clearTimeout(t);return l};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(f,l){b.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(null!=this.appIcon){var d=this.getCurrentFile();f=null!=d?d.getMode():f;f==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):f==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])),
this.appIcon.style.cursor="pointer"):f==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=f==App.MODE_DEVICE?"pointer":"default")}if(l)try{if(isLocalStorage)localStorage.setItem(".mode",f);else if("undefined"!=typeof Storage){var t=new Date;t.setYear(t.getFullYear()+1);document.cookie="MODE="+f+"; expires="+t.toUTCString()}}catch(u){}}})();
@@ -12369,7 +12364,7 @@ this.dialog)if("1"==urlParams.demo)c=Editor.useLocalStorage,this.createFile(this
function(){var e=decodeURIComponent(urlParams.viewbox||"");if(""!=e)try{var g=JSON.parse(e);this.editor.graph.fitWindow(g,g.border)}catch(k){console.error(k)}})):"0"!=urlParams.splash||null!=urlParams.mode?this.loadFile():EditorUi.isElectronApp||this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0):this.checkDrafts())}}),l=decodeURIComponent(urlParams.create||"");if((null==window.location.hash||1>=window.location.hash.length)&&null!=l&&0<l.length&&this.spinner.spin(document.body,
mxResources.get("loading"))){var d=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create","title"]))}),t=mxUtils.bind(this,function(u){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,u,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var E=urlParams.title;E=null!=E?decodeURIComponent(E):this.defaultFilename;u=this.getServiceCount(!0);isLocalStorage&&u++;var c=4>=
u?2:6<u?4:3;E=new CreateDialog(this,E,mxUtils.bind(this,function(e,g){if(null==g){this.hideDialog();var k=Editor.useLocalStorage;this.createFile(0<e.length?e:this.defaultFilename,this.getFileData(),null,null,null,!0,null,!0);Editor.useLocalStorage=k}else this.pickFolder(g,mxUtils.bind(this,function(m){this.createFile(e,this.getFileData(!0),null,g,null,!0,m)}))}),null,null,null,null,"1"==urlParams.browser,null,null,!0,c,null,null,null,this.editor.fileExtensions);this.showDialog(E.container,420,u>c?
-390:280,!0,!1,mxUtils.bind(this,function(e){e&&null==this.getCurrentFile()&&this.showSplash()}));E.init()}});l=decodeURIComponent(l);if("http://"!=l.substring(0,7)&&"https://"!=l.substring(0,8))try{null!=window.opener&&null!=window.opener[l]?t(window.opener[l]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(u){this.handleError(u,mxResources.get("errorLoadingFile"))}else this.loadTemplate(l,function(u){t(u)},mxUtils.bind(this,function(){this.handleError(null,mxResources.get("errorLoadingFile"),
+390:280,!0,!1,mxUtils.bind(this,function(e){e&&null==this.getCurrentFile()&&this.showSplash()}));E.init()}});l=decodeURIComponent(l);if("http://"!=l.substring(0,7)&&"https://"!=l.substring(0,8))try{null!=window.opener&&null!=window.opener[l]?t(window.opener[l]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(u){this.handleError(u,mxResources.get("errorLoadingFile"))}else this.loadTemplate(l,function(u){t(u)},mxUtils.bind(this,function(u){this.handleError(u,mxResources.get("errorLoadingFile"),
d)}))}else(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.state&&null!=this.stateArg&&"open"==this.stateArg.action?null!=this.stateArg.ids&&(window.history&&window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state"])),window.location.hash="G"+this.stateArg.ids[0]):(null==window.location.hash||1>=window.location.hash.length)&&null!=this.drive&&null!=this.stateArg&&"create"==this.stateArg.action?(window.history&&
window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state"])),this.setMode(App.MODE_GOOGLE),"0"==urlParams.splash?this.createFile(null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename):this.actions.get("new").funct()):(null!=urlParams.open&&window.history&&window.history.replaceState&&(window.history.replaceState(null,null,window.location.pathname+this.getSearch(["open","sketch"])),window.location.hash=urlParams.open),
f())}}catch(u){this.handleError(u)}};App.prototype.loadDraft=function(b,f){this.createFile(this.defaultFilename,b,null,null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){var l=this.getCurrentFile();null!=l&&(l.fileChanged(),null!=f&&f())}),0)}),null,null,!0)};
@@ -12417,25 +12412,25 @@ this.drive.insertFile(b,f,E,mxUtils.bind(this,function(m){g();this.fileCreated(m
function(m,p){var v=new LocalFile(this,f,p.name,null,m,p);v.saveFile(p.name,!1,mxUtils.bind(this,function(){this.fileCreated(v,l,u,t,e)}),k,!0)}),mxUtils.bind(this,function(m){"AbortError"!=m.name&&k(m)}),this.createFileSystemOptions(b))):(g(),this.fileCreated(new LocalFile(this,f,b,null==d),l,u,t,e))}catch(m){g(),this.handleError(m)}}};
App.prototype.fileCreated=function(b,f,l,d,t){var u=window.location.pathname;null!=f&&0<f.length&&(u+="?libs="+f);null!=t&&0<t.length&&(u+="?clibs="+t);u=this.getUrl(u);b.getMode()!=App.MODE_DEVICE&&(u+="#"+b.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var E=b.getData();E=0<E.length?this.editor.extractGraphModel(mxUtils.parseXml(E).documentElement,!0):null;var c=window.location.protocol+"//"+window.location.hostname+u,e=E,g=null;null!=E&&/\.svg$/i.test(b.getTitle())&&
(g=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(g.container),e=this.decodeNodeIntoGraph(e,g));b.setData(this.createFileData(E,g,b,c));null!=g&&g.container.parentNode.removeChild(g.container);var k=mxUtils.bind(this,function(){this.spinner.stop()}),m=mxUtils.bind(this,function(){k();var p=this.getCurrentFile();null==l&&null!=p&&(l=!p.isModified()&&null==p.getMode());var v=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b);l&&b.addAllSavedStatus();
-null!=f&&this.sidebar.showEntries(f);if(null!=t){for(var z=[],y=t.split(";"),L=0;L<y.length;L++)z.push(decodeURIComponent(y[L]));this.loadLibraries(z)}}),x=mxUtils.bind(this,function(){l||null==p||!p.isModified()?v():this.confirm(mxResources.get("allChangesLost"),null,v,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=d&&d();null==l||l?x():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),b.getTitle(),
+null!=f&&this.sidebar.showEntries(f);if(null!=t){for(var A=[],y=t.split(";"),L=0;L<y.length;L++)A.push(decodeURIComponent(y[L]));this.loadLibraries(A)}}),x=mxUtils.bind(this,function(){l||null==p||!p.isModified()?v():this.confirm(mxResources.get("allChangesLost"),null,v,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=d&&d();null==l||l?x():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),b.getTitle(),
null==b.getMode())),null!=d&&d(),window.openWindow(u,null,x))});b.constructor==LocalFile?m():b.saveFile(b.getTitle(),!1,mxUtils.bind(this,function(){m()}),mxUtils.bind(this,function(p){k();null!=p&&"AbortError"==p.name||this.handleError(p)}))}};
App.prototype.loadFile=function(b,f,l,d,t){if("1"==urlParams.openInSameWin||navigator.standalone)f=!0;this.hideDialog();var u=mxUtils.bind(this,function(){if(null==b||0==b.length)this.editor.setStatus(""),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==b.charAt(0))if(this.spinner.stop(),isLocalStorage){var e=mxUtils.bind(this,function(v){this.handleError(v,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var x=this.getCurrentFile();
window.location.hash=null!=x?x.getHash():""}))});b=decodeURIComponent(b.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(v){null!=v?(this.fileLoaded(new StorageFile(this,v,b)),null!=d&&d()):e({message:mxResources.get("fileNotFound")})}),e)}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var v=this.getCurrentFile();window.location.hash=null!=v?v.getHash():""}));else if(null!=l)this.spinner.stop(),
this.fileLoaded(l),null!=d&&d();else if("S"==b.charAt(0))this.spinner.stop(),this.alert("[Deprecation] #S is no longer supported, go to https://app.diagrams.net/?desc="+b.substring(1).substring(0,10),mxUtils.bind(this,function(){window.location.href="https://app.diagrams.net/?desc="+b.substring(1)}));else if("R"==b.charAt(0)){this.spinner.stop();var g=decodeURIComponent(b.substring(1));"<"!=g.charAt(0)&&(g=Graph.decompress(g));g=new LocalFile(this,g,null!=urlParams.title?decodeURIComponent(urlParams.title):
this.defaultFilename,!0);g.getHash=function(){return b};this.fileLoaded(g);null!=d&&d()}else if("E"==b.charAt(0))null==this.getCurrentFile()?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile")):this.remoteInvoke("getDraftFileContent",null,null,mxUtils.bind(this,function(v,x){this.spinner.stop();this.fileLoaded(new EmbedFile(this,v,x));null!=d&&d()}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},
-mxResources.get("errorLoadingFile"))}));else if("U"==b.charAt(0)){var k=decodeURIComponent(b.substring(1)),m=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=k.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var v=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var x=k.substring(31,k.lastIndexOf("&ex"));this.loadFile("G"+x,f,null,mxUtils.bind(this,function(){var z=this.getCurrentFile();null!=z&&this.editor.chromeless&&
-!this.editor.editable&&(z.getHash=function(){return"G"+x},window.location.hash="#"+z.getHash());null!=d&&d()}));return!0}return!1});!v()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",v);return!0});this.loadTemplate(k,mxUtils.bind(this,function(v){this.spinner.stop();if(null!=v&&0<v.length){var x=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var z=k,y=k.lastIndexOf("."),L=z.lastIndexOf("/");y>L&&0<L&&(z=z.substring(L+1,y),y=k.substring(y),
-this.useCanvasForExport||".png"!=y||(y=".drawio"),".svg"===y||".xml"===y||".html"===y||".png"===y||".drawio"===y)&&(x=z+y)}v=new LocalFile(this,v,null!=urlParams.title?decodeURIComponent(urlParams.title):x,!0);v.getHash=function(){return b};this.fileLoaded(v,!0)?null!=d&&d():m()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else m()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,
+mxResources.get("errorLoadingFile"))}));else if("U"==b.charAt(0)){var k=decodeURIComponent(b.substring(1)),m=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=k.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var v=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var x=k.substring(31,k.lastIndexOf("&ex"));this.loadFile("G"+x,f,null,mxUtils.bind(this,function(){var A=this.getCurrentFile();null!=A&&this.editor.chromeless&&
+!this.editor.editable&&(A.getHash=function(){return"G"+x},window.location.hash="#"+A.getHash());null!=d&&d()}));return!0}return!1});!v()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",v);return!0});this.loadTemplate(k,mxUtils.bind(this,function(v){this.spinner.stop();if(null!=v&&0<v.length){var x=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var A=k,y=k.lastIndexOf("."),L=A.lastIndexOf("/");y>L&&0<L&&(A=A.substring(L+1,y),y=k.substring(y),
+this.useCanvasForExport||".png"!=y||(y=".drawio"),".svg"===y||".xml"===y||".html"===y||".png"===y||".drawio"===y)&&(x=A+y)}v=new LocalFile(this,v,null!=urlParams.title?decodeURIComponent(urlParams.title):x,!0);v.getHash=function(){return b};this.fileLoaded(v,!0)?null!=d&&d():m()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else m()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,
function(){m()||(this.spinner.stop(),this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile")))}),null!=urlParams["template-filename"]?decodeURIComponent(urlParams["template-filename"]):null)}else if(g=null,"G"==b.charAt(0)?g=this.drive:"D"==b.charAt(0)?g=this.dropbox:"W"==b.charAt(0)?g=this.oneDrive:"H"==b.charAt(0)?g=this.gitHub:"A"==b.charAt(0)?g=this.gitLab:"T"==b.charAt(0)&&(g=this.trello),null==g)this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},
mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var v=this.getCurrentFile();window.location.hash=null!=v?v.getHash():""}));else{var p=b.charAt(0);b=decodeURIComponent(b.substring(1));g.getFile(b,mxUtils.bind(this,function(v){this.spinner.stop();this.fileLoaded(v);var x=this.getCurrentFile();null==x?(window.location.hash="",this.showSplash()):this.editor.chromeless&&!this.editor.editable?(x.getHash=function(){return p+b},window.location.hash="#"+x.getHash()):v==x&&null==v.getMode()&&
-(v=mxResources.get("copyCreated"),this.editor.setStatus('<div title="'+v+'" class="geStatusAlert">'+v+"</div>"));null!=d&&d()}),mxUtils.bind(this,function(v){null!=window.console&&null!=v&&console.log("error in loadFile:",b,v);var x=mxUtils.bind(this,function(){var z=this.getCurrentFile();null==z?(window.location.hash="",this.showSplash()):window.location.hash="#"+z.getHash()});null==v||"AbortError"!=v.name?this.handleError(v,null!=v?mxResources.get("errorLoadingFile"):null,x,null,null,"#"+p+b):x()}))}}),
+(v=mxResources.get("copyCreated"),this.editor.setStatus('<div title="'+v+'" class="geStatusAlert">'+v+"</div>"));null!=d&&d()}),mxUtils.bind(this,function(v){null!=window.console&&null!=v&&console.log("error in loadFile:",b,v);var x=mxUtils.bind(this,function(){var A=this.getCurrentFile();null==A?(window.location.hash="",this.showSplash()):window.location.hash="#"+A.getHash()});null==v||"AbortError"!=v.name?this.handleError(v,null!=v?mxResources.get("errorLoadingFile"):null,x,null,null,"#"+p+b):x()}))}}),
E=this.getCurrentFile(),c=mxUtils.bind(this,function(){t||null==E||!E.isModified()?u():this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=E&&(window.location.hash=E.getHash())}),u,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==b||0==b.length?c():null==E||f?c():this.showDialog((new PopupDialog(this,this.getUrl()+"#"+b,null,c)).container,320,140,!0,!0)};
App.prototype.getLibraryStorageHint=function(b){var f=b.getTitle();b.constructor!=LocalLibrary&&(f+="\n"+b.getHash());b.constructor==DriveLibrary?f+=" ("+mxResources.get("googleDrive")+")":b.constructor==GitHubLibrary?f+=" ("+mxResources.get("github")+")":b.constructor==TrelloLibrary?f+=" ("+mxResources.get("trello")+")":b.constructor==DropboxLibrary?f+=" ("+mxResources.get("dropbox")+")":b.constructor==OneDriveLibrary?f+=" ("+mxResources.get("oneDrive")+")":b.constructor==StorageLibrary?f+=" ("+
mxResources.get("browser")+")":b.constructor==LocalLibrary&&(f+=" ("+mxResources.get("device")+")");return f};App.prototype.restoreLibraries=function(){function b(l){for(var d=0;d<l.length;d++)""!=l[d]&&0>mxUtils.indexOf(f,l[d])&&f.push(l[d])}var f=[];b(mxSettings.getCustomLibraries());b((urlParams.clibs||"").split(";"));this.loadLibraries(f)};
App.prototype.loadLibraries=function(b,f){if(null!=this.sidebar){null==this.loadedLibraries&&(this.loadedLibraries={});var l=mxUtils.bind(this,function(g,k){k||mxSettings.removeCustomLibrary(g);delete this.loadedLibraries[g]}),d=0,t=[],u=0<b.length&&"L.scratchpad"==b[0]?1:0,E=mxUtils.bind(this,function(){if(0==d){if(null!=b)for(var g=b.length-1;0<=g;g--)null!=t[g]&&this.loadLibrary(t[g],g<=u);null!=f&&f()}});if(null!=b)for(var c=0;c<b.length;c++){var e=encodeURIComponent(decodeURIComponent(b[c]));
mxUtils.bind(this,function(g,k){if(null!=g&&0<g.length&&null==this.loadedLibraries[g]&&null==this.sidebar.palettes[g]){this.loadedLibraries[g]=!0;d++;var m=mxUtils.bind(this,function(L){t[k]=L;d--;E()}),p=mxUtils.bind(this,function(L){l(g,L);d--;E()}),v=g.substring(0,1);if("L"==v)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var L=decodeURIComponent(g.substring(1));StorageFile.getFileContent(this,L,mxUtils.bind(this,function(N){".scratchpad"==L&&null==
-N&&(N=this.emptyLibraryXml);null!=N?m(new StorageLibrary(this,N,L)):p()}),p)}catch(N){p()}}),0);else if("U"==v){var x=decodeURIComponent(g.substring(1));this.isOffline()||this.loadTemplate(x,mxUtils.bind(this,function(L){null!=L&&0<L.length?m(new UrlLibrary(this,L,x)):p()}),function(){p()},null,!0)}else if("R"==v){v=decodeURIComponent(g.substring(1));try{v=JSON.parse(v);var z={id:v[0],title:v[1],downloadUrl:v[2]};this.remoteInvoke("getFileContent",[z.downloadUrl],null,mxUtils.bind(this,function(L){try{m(new RemoteLibrary(this,
-L,z))}catch(N){p()}}),function(){p()})}catch(L){p()}}else if("S"==v&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(g.substring(1)),function(L){m(L)},p)}catch(L){p()}else{var y=null;"G"==v?null!=this.drive&&null!=this.drive.user&&(y=this.drive):"H"==v?null!=this.gitHub&&null!=this.gitHub.getUser()&&(y=this.gitHub):"T"==v?null!=this.trello&&this.trello.isAuthorized()&&(y=this.trello):"D"==v?null!=this.dropbox&&null!=this.dropbox.getUser()&&(y=this.dropbox):"W"==v&&null!=this.oneDrive&&
+N&&(N=this.emptyLibraryXml);null!=N?m(new StorageLibrary(this,N,L)):p()}),p)}catch(N){p()}}),0);else if("U"==v){var x=decodeURIComponent(g.substring(1));this.isOffline()||this.loadTemplate(x,mxUtils.bind(this,function(L){null!=L&&0<L.length?m(new UrlLibrary(this,L,x)):p()}),function(){p()},null,!0)}else if("R"==v){v=decodeURIComponent(g.substring(1));try{v=JSON.parse(v);var A={id:v[0],title:v[1],downloadUrl:v[2]};this.remoteInvoke("getFileContent",[A.downloadUrl],null,mxUtils.bind(this,function(L){try{m(new RemoteLibrary(this,
+L,A))}catch(N){p()}}),function(){p()})}catch(L){p()}}else if("S"==v&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(g.substring(1)),function(L){m(L)},p)}catch(L){p()}else{var y=null;"G"==v?null!=this.drive&&null!=this.drive.user&&(y=this.drive):"H"==v?null!=this.gitHub&&null!=this.gitHub.getUser()&&(y=this.gitHub):"T"==v?null!=this.trello&&this.trello.isAuthorized()&&(y=this.trello):"D"==v?null!=this.dropbox&&null!=this.dropbox.getUser()&&(y=this.dropbox):"W"==v&&null!=this.oneDrive&&
null!=this.oneDrive.getUser()&&(y=this.oneDrive);null!=y?y.getLibrary(decodeURIComponent(g.substring(1)),mxUtils.bind(this,function(L){try{m(L)}catch(N){p()}}),function(L){p()}):p(!0)}}})(e,c)}E()}};
App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer){var b=this.getCurrentFile();"1"==urlParams.embed&&("atlas"==uiTheme||"1"==urlParams.atlas?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="1"==urlParams.noLangIcon?"0":"25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"));this.commentsSupported()&&"1"!=urlParams.sketch?null==this.commentButton&&
(this.commentButton=document.createElement("a"),this.commentButton.setAttribute("title",mxResources.get("comments")),this.commentButton.className="geToolbarButton",this.commentButton.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;float:left;cursor:pointer;width:24px;height:24px;background-size:24px 24px;background-position:center center;background-repeat:no-repeat;background-image:url("+Editor.commentImage+");","atlas"==uiTheme?(this.commentButton.style.marginRight=
@@ -12466,7 +12461,7 @@ window.location.hash=f:0<window.location.hash.length&&(window.location.hash=""))
App.prototype.showAuthDialog=function(b,f,l,d){var t=this.spinner.pause();this.showDialog((new AuthDialog(this,b,f,mxUtils.bind(this,function(u){try{null!=l&&l(u,mxUtils.bind(this,function(){this.hideDialog();t()}))}catch(E){this.editor.setStatus(mxUtils.htmlEntities(E.message))}}))).container,300,f?180:140,!0,!0,mxUtils.bind(this,function(u){null!=d&&d(u);u&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
App.prototype.convertFile=function(b,f,l,d,t,u,E,c){var e=f;/\.svg$/i.test(e)||(e=e.substring(0,f.lastIndexOf("."))+d);var g=!1;null!=this.gitHub&&b.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(g=!0);if(/\.v(dx|sdx?)$/i.test(f)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var k=new XMLHttpRequest;k.open("GET",b,!0);g||(k.responseType="blob");if(c)for(var m in c)k.setRequestHeader(m,c[m]);k.onload=mxUtils.bind(this,function(){if(200<=
k.status&&299>=k.status){var v=null;g?(v=JSON.parse(k.responseText),v=this.base64ToBlob(v.content,"application/octet-stream")):v=new Blob([k.response],{type:"application/octet-stream"});this.importVisio(v,mxUtils.bind(this,function(x){t(new LocalFile(this,x,e,!0))}),u,f)}else null!=u&&u({message:mxResources.get("errorLoadingFile")})});k.onerror=u;k.send()}else{var p=mxUtils.bind(this,function(v){try{if(/\.pdf$/i.test(f)){var x=Editor.extractGraphModelFromPdf(v);null!=x&&0<x.length&&t(new LocalFile(this,
-x,e,!0))}else/\.png$/i.test(f)?(x=this.extractGraphModelFromPng(v),null!=x?t(new LocalFile(this,x,e,!0)):t(new LocalFile(this,v,f,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(v,b)?this.parseFileData(v,mxUtils.bind(this,function(z){4==z.readyState&&(200<=z.status&&299>=z.status?t(new LocalFile(this,z.responseText,e,!0)):null!=u&&u({message:mxResources.get("errorLoadingFile")}))}),f):t(new LocalFile(this,v,e,!0))}catch(z){null!=u&&u(z)}});l=/\.png$/i.test(f)||/\.jpe?g$/i.test(f)||
+x,e,!0))}else/\.png$/i.test(f)?(x=this.extractGraphModelFromPng(v),null!=x?t(new LocalFile(this,x,e,!0)):t(new LocalFile(this,v,f,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(v,b)?this.parseFileData(v,mxUtils.bind(this,function(A){4==A.readyState&&(200<=A.status&&299>=A.status?t(new LocalFile(this,A.responseText,e,!0)):null!=u&&u({message:mxResources.get("errorLoadingFile")}))}),f):t(new LocalFile(this,v,e,!0))}catch(A){null!=u&&u(A)}});l=/\.png$/i.test(f)||/\.jpe?g$/i.test(f)||
/\.pdf$/i.test(f)||null!=l&&"image/"==l.substring(0,6);g?mxUtils.get(b,mxUtils.bind(this,function(v){if(200<=v.getStatus()&&299>=v.getStatus()){if(null!=t){v=JSON.parse(v.getText());var x=v.content;"base64"===v.encoding&&(x=/\.png$/i.test(f)?"data:image/png;base64,"+x:/\.pdf$/i.test(f)?"data:application/pdf;base64,"+x:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(x):atob(x));p(x)}}else null!=u&&u({code:App.ERROR_UNKNOWN})}),function(){null!=u&&u({code:App.ERROR_UNKNOWN})},!1,this.timeout,
function(){null!=u&&u({code:App.ERROR_TIMEOUT,retry:fn})},c):null!=E?E(b,p,u,l):this.editor.loadUrl(b,p,u,l,null,null,null,c)}};
App.prototype.updateHeader=function(){if(null!=this.menubar){this.appIcon=document.createElement("a");this.appIcon.style.display="block";this.appIcon.style.position="absolute";this.appIcon.style.width="32px";this.appIcon.style.height=this.menubarHeight-28+"px";this.appIcon.style.margin="14px 0px 8px 16px";this.appIcon.style.opacity="0.85";this.appIcon.style.borderRadius="3px";"dark"!=uiTheme&&(this.appIcon.style.backgroundColor="#f08705");mxEvent.disableContextMenu(this.appIcon);mxEvent.addListener(this.appIcon,
@@ -12500,8 +12495,8 @@ m.setAttribute("height","50");m.setAttribute("border","0");m.setAttribute("src",
this.drive.authorize(!0,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(x){this.handleError(x)}),!0)}),mxResources.get("closingFile")+"...");mxEvent.consume(v)})));return g});d=!0;var E=document.createElement("table");E.style.borderSpacing="0";E.style.fontSize="10pt";E.style.width="100%";E.style.padding="10px";for(var c=0;c<t.length;c++)E.appendChild(l(t[c]));this.userPanel.appendChild(E);l=document.createElement("div");l.style.textAlign=
"left";l.style.padding="10px";l.style.whiteSpace="nowrap";l.style.borderTop="1px solid rgb(224, 224, 224)";E=mxUtils.button(mxResources.get("signOut"),mxUtils.bind(this,function(){this.confirm(mxResources.get("areYouSure"),mxUtils.bind(this,function(){u(mxUtils.bind(this,function(){this.stateArg=null;this.drive.logout();this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxResources.get("signOut"))}))}));E.className="geBtn";E.style.float="right";l.appendChild(E);E=mxUtils.button(mxResources.get("addAccount"),
mxUtils.bind(this,function(){var e=this.drive.createAuthWin();e.blur();window.focus();u(mxUtils.bind(this,function(){this.stateArg=null;this.drive.authorize(!1,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(g){this.handleError(g)}),!0,e)}),mxResources.get("closingFile")+"...")}));E.className="geBtn";E.style.margin="0px";l.appendChild(E);this.userPanel.appendChild(l)}}l=mxUtils.bind(this,function(e,g,k,m){if(null!=e){d&&this.userPanel.appendChild(document.createElement("hr"));
-d=!0;var p=document.createElement("table");p.style.borderSpacing="0";p.style.fontSize="10pt";p.style.width="100%";p.style.padding="10px";var v=document.createElement("tbody"),x=document.createElement("tr"),z=document.createElement("td");z.setAttribute("valig","top");z.style.width="40px";if(null!=g){var y=document.createElement("img");y.setAttribute("width","40");y.setAttribute("height","40");y.setAttribute("border","0");y.setAttribute("src",g);y.style.marginRight="6px";z.appendChild(y)}x.appendChild(z);
-z=document.createElement("td");z.setAttribute("valign","middle");z.style.whiteSpace="nowrap";z.style.maxWidth="0";z.style.overflow="hidden";z.style.textOverflow="ellipsis";mxUtils.write(z,e.displayName);null!=e.email&&(mxUtils.br(z),g=document.createElement("small"),g.style.color="gray",mxUtils.write(g,e.email),z.appendChild(g));null!=m&&(e=document.createElement("div"),e.style.marginTop="4px",g=document.createElement("i"),mxUtils.write(g,m),e.appendChild(g),z.appendChild(e));x.appendChild(z);v.appendChild(x);
+d=!0;var p=document.createElement("table");p.style.borderSpacing="0";p.style.fontSize="10pt";p.style.width="100%";p.style.padding="10px";var v=document.createElement("tbody"),x=document.createElement("tr"),A=document.createElement("td");A.setAttribute("valig","top");A.style.width="40px";if(null!=g){var y=document.createElement("img");y.setAttribute("width","40");y.setAttribute("height","40");y.setAttribute("border","0");y.setAttribute("src",g);y.style.marginRight="6px";A.appendChild(y)}x.appendChild(A);
+A=document.createElement("td");A.setAttribute("valign","middle");A.style.whiteSpace="nowrap";A.style.maxWidth="0";A.style.overflow="hidden";A.style.textOverflow="ellipsis";mxUtils.write(A,e.displayName);null!=e.email&&(mxUtils.br(A),g=document.createElement("small"),g.style.color="gray",mxUtils.write(g,e.email),A.appendChild(g));null!=m&&(e=document.createElement("div"),e.style.marginTop="4px",g=document.createElement("i"),mxUtils.write(g,m),e.appendChild(g),A.appendChild(e));x.appendChild(A);v.appendChild(x);
p.appendChild(v);this.userPanel.appendChild(p);e=document.createElement("div");e.style.textAlign="center";e.style.padding="10px";e.style.whiteSpace="nowrap";null!=k&&(k=mxUtils.button(mxResources.get("signOut"),k),k.className="geBtn",e.appendChild(k));this.userPanel.appendChild(e)}});null!=this.dropbox&&l(this.dropbox.getUser(),IMAGE_PATH+"/dropbox-logo.svg",mxUtils.bind(this,function(){var e=this.getCurrentFile();if(null!=e&&e.constructor==DropboxFile){var g=mxUtils.bind(this,function(){this.dropbox.logout();
window.location.hash=""});e.isModified()?this.confirm(mxResources.get("allChangesLost"),null,g,mxResources.get("cancel"),mxResources.get("discardChanges")):g()}else this.dropbox.logout()}),mxResources.get("dropbox"));null!=this.oneDrive&&l(this.oneDrive.getUser(),IMAGE_PATH+"/onedrive-logo.svg",this.oneDrive.noLogout?null:mxUtils.bind(this,function(){var e=this.getCurrentFile();if(null!=e&&e.constructor==OneDriveFile){var g=mxUtils.bind(this,function(){this.oneDrive.logout();window.location.hash=
""});e.isModified()?this.confirm(mxResources.get("allChangesLost"),null,g,mxResources.get("cancel"),mxResources.get("discardChanges")):g()}else this.oneDrive.logout()}),mxResources.get("oneDrive"));null!=this.gitHub&&l(this.gitHub.getUser(),IMAGE_PATH+"/github-logo.svg",mxUtils.bind(this,function(){var e=this.getCurrentFile();if(null!=e&&e.constructor==GitHubFile){var g=mxUtils.bind(this,function(){this.gitHub.logout();window.location.hash=""});e.isModified()?this.confirm(mxResources.get("allChangesLost"),
@@ -12515,158 +12510,158 @@ null!=b?(this.userElement.innerText="",560<screen.width&&(mxUtils.write(this.use
App.prototype.getCurrentUser=function(){var b=null;null!=this.drive&&null!=this.drive.getUser()?b=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?b=this.oneDrive.getUser():null!=this.dropbox&&null!=this.dropbox.getUser()?b=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()&&(b=this.gitHub.getUser());return b};var editorResetGraph=Editor.prototype.resetGraph;
Editor.prototype.resetGraph=function(){editorResetGraph.apply(this,arguments);null==this.graph.defaultPageFormat&&(this.graph.pageFormat=mxSettings.getPageFormat())};(function(){var b=mxPopupMenu.prototype.showMenu;mxPopupMenu.prototype.showMenu=function(){this.div.style.overflowY="auto";this.div.style.overflowX="hidden";this.div.style.maxHeight=Math.max(document.body.clientHeight,document.documentElement.clientHeight)-(EditorUi.isElectronApp?50:10)+"px";b.apply(this,arguments)};Menus.prototype.createHelpLink=function(l){var d=document.createElement("span");d.setAttribute("title",mxResources.get("help"));d.style.cssText="color:blue;text-decoration:underline;margin-left:8px;cursor:help;";
var t=document.createElement("img");mxUtils.setOpacity(t,50);t.style.height="16px";t.style.width="16px";t.setAttribute("border","0");t.setAttribute("valign","bottom");t.setAttribute("src",Editor.helpImage);d.appendChild(t);mxEvent.addGestureListeners(d,mxUtils.bind(this,function(u){this.editorUi.hideCurrentMenu();this.editorUi.openLink(l);mxEvent.consume(u)}));return d};Menus.prototype.addLinkToItem=function(l,d){null!=l&&l.firstChild.nextSibling.appendChild(this.createHelpLink(d))};var f=Menus.prototype.init;
-Menus.prototype.init=function(){function l(q,D,A){this.ui=q;this.previousExtFonts=this.extFonts=D;this.prevCustomFonts=this.customFonts=A}f.apply(this,arguments);var d=this.editorUi,t=d.editor.graph,u=mxUtils.bind(t,t.isEnabled),E=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),c=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&
+Menus.prototype.init=function(){function l(q,D,z){this.ui=q;this.previousExtFonts=this.extFonts=D;this.prevCustomFonts=this.customFonts=z}f.apply(this,arguments);var d=this.editorUi,t=d.editor.graph,u=mxUtils.bind(t,t.isEnabled),E=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),c=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&
(null==document.documentMode||9<document.documentMode),e=("www.draw.io"==window.location.hostname||"test.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"app.diagrams.net"==window.location.hostname)&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!mxClient.IS_IOS&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode),g="1"==urlParams.tr&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode);mxClient.IS_SVG||
d.isOffline()||((new Image).src=IMAGE_PATH+"/help.png");"1"==urlParams.noFileMenu&&(this.defaultMenuItems=this.defaultMenuItems.filter(function(q){return"file"!=q}));d.actions.addAction("new...",function(){var q=d.isOffline();if(q||"1"!=urlParams.newTempDlg||d.mode!=App.MODE_GOOGLE){var D=new NewDialog(d,q,!(d.mode==App.MODE_DEVICE&&"chooseFileSystemEntries"in window));d.showDialog(D.container,q?350:620,q?70:460,!0,!0,function(C){d.sidebar.hideTooltip();C&&null==d.getCurrentFile()&&d.showSplash()});
-D.init()}else{var A=function(C){return{id:C.id,isExt:!0,url:C.downloadUrl,title:C.title,imgUrl:C.thumbnailLink,changedBy:C.lastModifyingUserName,lastModifiedOn:C.modifiedDate}};q=new TemplatesDialog(d,function(C,G,M){var H=M.libs,F=M.clibs;d.pickFolder(d.mode,function(I){d.createFile(G,C,null!=H&&0<H.length?H:null,null,function(){d.hideDialog()},null,I,null,null!=F&&0<F.length?F:null)},null==d.stateArg||null==d.stateArg.folderId)},null,null,null,"user",function(C,G,M){var H=new Date;H.setDate(H.getDate()-
-7);d.drive.listFiles(null,H,M?!0:!1,function(F){for(var I=[],R=0;R<F.items.length;R++)I.push(A(F.items[R]));C(I)},G)},function(C,G,M,H){d.drive.listFiles(C,null,H?!0:!1,function(F){for(var I=[],R=0;R<F.items.length;R++)I.push(A(F.items[R]));G(I)},M)},function(C,G,M){d.drive.getFile(C.id,function(H){G(H.data)},M)},null,null,!1,!1);d.showDialog(q.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}});d.actions.put("insertTemplate",new Action(mxResources.get("template")+"...",function(){if(t.isEnabled()&&
-!t.isCellLocked(t.getDefaultParent())){var q=new NewDialog(d,null,!1,function(D){d.hideDialog();if(null!=D){var A=d.editor.graph.getFreeInsertPoint();t.setSelectionCells(d.importXml(D,Math.max(A.x,20),Math.max(A.y,20),!0,null,null,!0));t.scrollCellToVisible(t.getSelectionCell())}},null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"));d.showDialog(q.container,620,460,!0,!0,function(){d.sidebar.hideTooltip()});q.init()}})).isEnabled=u;var k=d.actions.addAction("shareCursor",
+D.init()}else{var z=function(C){return{id:C.id,isExt:!0,url:C.downloadUrl,title:C.title,imgUrl:C.thumbnailLink,changedBy:C.lastModifyingUserName,lastModifiedOn:C.modifiedDate}};q=new TemplatesDialog(d,function(C,G,H){var M=H.libs,F=H.clibs;d.pickFolder(d.mode,function(J){d.createFile(G,C,null!=M&&0<M.length?M:null,null,function(){d.hideDialog()},null,J,null,null!=F&&0<F.length?F:null)},null==d.stateArg||null==d.stateArg.folderId)},null,null,null,"user",function(C,G,H){var M=new Date;M.setDate(M.getDate()-
+7);d.drive.listFiles(null,M,H?!0:!1,function(F){for(var J=[],Q=0;Q<F.items.length;Q++)J.push(z(F.items[Q]));C(J)},G)},function(C,G,H,M){d.drive.listFiles(C,null,M?!0:!1,function(F){for(var J=[],Q=0;Q<F.items.length;Q++)J.push(z(F.items[Q]));G(J)},H)},function(C,G,H){d.drive.getFile(C.id,function(M){G(M.data)},H)},null,null,!1,!1);d.showDialog(q.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}});d.actions.put("insertTemplate",new Action(mxResources.get("template")+"...",function(){if(t.isEnabled()&&
+!t.isCellLocked(t.getDefaultParent())){var q=new NewDialog(d,null,!1,function(D){d.hideDialog();if(null!=D){var z=d.editor.graph.getFreeInsertPoint();t.setSelectionCells(d.importXml(D,Math.max(z.x,20),Math.max(z.y,20),!0,null,null,!0));t.scrollCellToVisible(t.getSelectionCell())}},null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"));d.showDialog(q.container,620,460,!0,!0,function(){d.sidebar.hideTooltip()});q.init()}})).isEnabled=u;var k=d.actions.addAction("shareCursor",
function(){d.setShareCursorPosition(!d.isShareCursorPosition())});k.setToggleAction(!0);k.setSelectedCallback(function(){return d.isShareCursorPosition()});k=d.actions.addAction("showRemoteCursors",function(){d.setShowRemoteCursors(!d.isShowRemoteCursors())});k.setToggleAction(!0);k.setSelectedCallback(function(){return d.isShowRemoteCursors()});k=d.actions.addAction("points",function(){d.editor.graph.view.setUnit(mxConstants.POINTS)});k.setToggleAction(!0);k.setSelectedCallback(function(){return d.editor.graph.view.unit==
mxConstants.POINTS});k=d.actions.addAction("inches",function(){d.editor.graph.view.setUnit(mxConstants.INCHES)});k.setToggleAction(!0);k.setSelectedCallback(function(){return d.editor.graph.view.unit==mxConstants.INCHES});k=d.actions.addAction("millimeters",function(){d.editor.graph.view.setUnit(mxConstants.MILLIMETERS)});k.setToggleAction(!0);k.setSelectedCallback(function(){return d.editor.graph.view.unit==mxConstants.MILLIMETERS});k=d.actions.addAction("meters",function(){d.editor.graph.view.setUnit(mxConstants.METERS)});
k.setToggleAction(!0);k.setSelectedCallback(function(){return d.editor.graph.view.unit==mxConstants.METERS});this.put("units",new Menu(mxUtils.bind(this,function(q,D){this.addMenuItems(q,["points","inches","millimeters","meters"],D)})));k=d.actions.addAction("ruler",function(){mxSettings.setRulerOn(!mxSettings.isRulerOn());mxSettings.save();null!=d.ruler?(d.ruler.destroy(),d.ruler=null):d.ruler=new mxDualRuler(d,d.editor.graph.view.unit);d.refresh()});k.setEnabled(d.canvasSupported&&9!=document.documentMode);
k.setToggleAction(!0);k.setSelectedCallback(function(){return null!=d.ruler});k=d.actions.addAction("fullscreen",function(){"1"==urlParams.embedInline?d.setInlineFullscreen(!Editor.inlineFullscreen):null==document.fullscreenElement?document.body.requestFullscreen():document.exitFullscreen()});k.visible="1"==urlParams.embedInline||window==window.top&&document.fullscreenEnabled&&null!=document.body.requestFullscreen;k.setToggleAction(!0);k.setSelectedCallback(function(){return"1"==urlParams.embedInline?
-Editor.inlineFullscreen:null!=document.fullscreenElement});d.actions.addAction("properties...",function(){var q=new FilePropertiesDialog(d);d.showDialog(q.container,320,120,!0,!0);q.init()}).isEnabled=u;window.mxFreehand&&(d.actions.put("insertFreehand",new Action(mxResources.get("freehand")+"...",function(q){t.isEnabled()&&(null==this.freehandWindow&&(q=!mxClient.IS_IE&&!mxClient.IS_IE11,this.freehandWindow=new FreehandWindow(d,document.body.offsetWidth-420,102,176,q?120:84,q)),t.freehand.isDrawing()?
-t.freehand.stopDrawing():t.freehand.startDrawing(),this.freehandWindow.window.setVisible(t.freehand.isDrawing()))})).isEnabled=function(){return u()&&mxClient.IS_SVG});d.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var q=document.createElement("div");q.style.whiteSpace="nowrap";var D=null==d.pages||1>=d.pages.length,A=document.createElement("h3");mxUtils.write(A,mxResources.get("formatXml"));A.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
-q.appendChild(A);var C=d.addCheckbox(q,mxResources.get("selectionOnly"),!1,t.isSelectionEmpty()),G=d.addCheckbox(q,mxResources.get("compressed"),!0),M=d.addCheckbox(q,mxResources.get("allPages"),!D,D);M.style.marginBottom="16px";mxEvent.addListener(C,"change",function(){C.checked?M.setAttribute("disabled","disabled"):M.removeAttribute("disabled")});q=new CustomDialog(d,q,mxUtils.bind(this,function(){d.downloadFile("xml",!G.checked,null,!C.checked,D||!M.checked)}),null,mxResources.get("export"));d.showDialog(q.container,
-300,200,!0,!0)}));Editor.enableExportUrl&&d.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){d.showPublishLinkDialog(mxResources.get("url"),!0,null,null,function(q,D,A,C,G,M,H,F,I){H=[];I&&H.push("tags=%7B%7D");q=new EmbedDialog(d,d.createLink(q,D,A,C,G,M,null,!0,H));d.showDialog(q.container,450,240,!0,!0);q.init()})}));d.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),
-function(q){d.spinner.stop();d.showHtmlDialog(mxResources.get("export"),null,q,function(D,A,C,G,M,H,F,I,R,X,O){d.createHtml(D,A,C,G,M,H,F,I,R,X,O,mxUtils.bind(this,function(W,U){var n=d.getBaseFilename(F);W='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+mxUtils.htmlEntities(n)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+W+"\n"+U+"\n</body>\n</html>";d.saveData(n+(".drawio"==n.substring(n.lenth-7)?"":".drawio")+
-".html","html",W,"text/html")}))})})}));d.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){if(EditorUi.isElectronApp||!d.isOffline()&&!d.printPdfExport){var q=null==d.pages||1>=d.pages.length,D=document.createElement("div");D.style.whiteSpace="nowrap";var A=document.createElement("h3");mxUtils.write(A,mxResources.get("formatPdf"));A.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";D.appendChild(A);var C=function(){F!=this&&this.checked?
-(U.removeAttribute("disabled"),U.checked=!t.pageVisible):(U.setAttribute("disabled","disabled"),U.checked=!1)};A=200;var G=1,M=null;if(d.pdfPageExport&&!q){var H=function(){O.value=Math.max(1,Math.min(G,Math.max(parseInt(O.value),parseInt(R.value))));R.value=Math.max(1,Math.min(G,Math.min(parseInt(O.value),parseInt(R.value))))},F=d.addRadiobox(D,"pages",mxResources.get("allPages"),!0),I=d.addRadiobox(D,"pages",mxResources.get("pages")+":",!1,null,!0),R=document.createElement("input");R.style.cssText=
-"margin:0 8px 0 8px;";R.setAttribute("value","1");R.setAttribute("type","number");R.setAttribute("min","1");R.style.width="50px";D.appendChild(R);var X=document.createElement("span");mxUtils.write(X,mxResources.get("to"));D.appendChild(X);var O=R.cloneNode(!0);D.appendChild(O);mxEvent.addListener(R,"focus",function(){I.checked=!0});mxEvent.addListener(O,"focus",function(){I.checked=!0});mxEvent.addListener(R,"change",H);mxEvent.addListener(O,"change",H);if(null!=d.pages&&(G=d.pages.length,null!=d.currentPage))for(H=
-0;H<d.pages.length;H++)if(d.currentPage==d.pages[H]){M=H+1;R.value=M;O.value=M;break}R.setAttribute("max",G);O.setAttribute("max",G);mxUtils.br(D);var W=d.addRadiobox(D,"pages",mxResources.get("selectionOnly"),!1,t.isSelectionEmpty()),U=d.addCheckbox(D,mxResources.get("crop"),!1,!0),n=d.addCheckbox(D,mxResources.get("grid"),!1,!1);mxEvent.addListener(F,"change",C);mxEvent.addListener(I,"change",C);mxEvent.addListener(W,"change",C);A+=64}else W=d.addCheckbox(D,mxResources.get("selectionOnly"),!1,t.isSelectionEmpty()),
-U=d.addCheckbox(D,mxResources.get("crop"),!t.pageVisible||!d.pdfPageExport,!d.pdfPageExport),n=d.addCheckbox(D,mxResources.get("grid"),!1,!1),d.pdfPageExport||mxEvent.addListener(W,"change",C);C=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"draw.io"==d.getServiceName();var B=null,K=null;if(EditorUi.isElectronApp||C)K=d.addCheckbox(D,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram),A+=30;C&&(B=d.addCheckbox(D,mxResources.get("transparentBackground"),!1),A+=30);D=new CustomDialog(d,
-D,mxUtils.bind(this,function(){var Q=null;if(!q){Q=parseInt(R.value);var P=parseInt(O.value);Q=F.checked||Q==M&&P==M?null:{from:Math.max(0,Math.min(G-1,Q-1)),to:Math.max(0,Math.min(G-1,P-1))}}d.downloadFile("pdf",null,null,!W.checked,q?!0:!F.checked&&null==Q,!U.checked,null!=B&&B.checked,null,null,n.checked,null!=K&&K.checked,Q)}),null,mxResources.get("export"));d.showDialog(D.container,300,A,!0,!0)}else d.showDialog((new PrintDialog(d,mxResources.get("formatPdf"))).container,360,null!=d.pages&&1<
+Editor.inlineFullscreen:null!=document.fullscreenElement});d.actions.addAction("properties...",function(){var q=new FilePropertiesDialog(d);d.showDialog(q.container,320,120,!0,!0);q.init()}).isEnabled=u;window.mxFreehand&&(d.actions.put("insertFreehand",new Action(mxResources.get("freehand")+"...",function(){if(t.isEnabled()){if(null==this.freehandWindow){var q=!mxClient.IS_IE&&!mxClient.IS_IE11;this.freehandWindow=new FreehandWindow(d,document.body.offsetWidth-420,102,176,q?120:84,q)}t.freehand.isDrawing()?
+t.freehand.stopDrawing():t.freehand.startDrawing();this.freehandWindow.window.setVisible(t.freehand.isDrawing())}})).isEnabled=function(){return u()&&mxClient.IS_SVG});d.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var q=document.createElement("div");q.style.whiteSpace="nowrap";var D=null==d.pages||1>=d.pages.length,z=document.createElement("h3");mxUtils.write(z,mxResources.get("formatXml"));z.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
+q.appendChild(z);var C=d.addCheckbox(q,mxResources.get("selectionOnly"),!1,t.isSelectionEmpty()),G=d.addCheckbox(q,mxResources.get("compressed"),!0),H=d.addCheckbox(q,mxResources.get("allPages"),!D,D);H.style.marginBottom="16px";mxEvent.addListener(C,"change",function(){C.checked?H.setAttribute("disabled","disabled"):H.removeAttribute("disabled")});q=new CustomDialog(d,q,mxUtils.bind(this,function(){d.downloadFile("xml",!G.checked,null,!C.checked,D||!H.checked)}),null,mxResources.get("export"));d.showDialog(q.container,
+300,200,!0,!0)}));Editor.enableExportUrl&&d.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){d.showPublishLinkDialog(mxResources.get("url"),!0,null,null,function(q,D,z,C,G,H,M,F,J){M=[];J&&M.push("tags=%7B%7D");q=new EmbedDialog(d,d.createLink(q,D,z,C,G,H,null,!0,M));d.showDialog(q.container,450,240,!0,!0);q.init()})}));d.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),
+function(q){d.spinner.stop();d.showHtmlDialog(mxResources.get("export"),null,q,function(D,z,C,G,H,M,F,J,Q,X,P){d.createHtml(D,z,C,G,H,M,F,J,Q,X,P,mxUtils.bind(this,function(V,W){var n=d.getBaseFilename(F);V='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+mxUtils.htmlEntities(n)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+V+"\n"+W+"\n</body>\n</html>";d.saveData(n+(".drawio"==n.substring(n.lenth-7)?"":".drawio")+
+".html","html",V,"text/html")}))})})}));d.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){if(EditorUi.isElectronApp||!d.isOffline()&&!d.printPdfExport){var q=null==d.pages||1>=d.pages.length,D=document.createElement("div");D.style.whiteSpace="nowrap";var z=document.createElement("h3");mxUtils.write(z,mxResources.get("formatPdf"));z.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";D.appendChild(z);var C=function(){F!=this&&this.checked?
+(W.removeAttribute("disabled"),W.checked=!t.pageVisible):(W.setAttribute("disabled","disabled"),W.checked=!1)};z=200;var G=1,H=null;if(d.pdfPageExport&&!q){var M=function(){P.value=Math.max(1,Math.min(G,Math.max(parseInt(P.value),parseInt(Q.value))));Q.value=Math.max(1,Math.min(G,Math.min(parseInt(P.value),parseInt(Q.value))))},F=d.addRadiobox(D,"pages",mxResources.get("allPages"),!0),J=d.addRadiobox(D,"pages",mxResources.get("pages")+":",!1,null,!0),Q=document.createElement("input");Q.style.cssText=
+"margin:0 8px 0 8px;";Q.setAttribute("value","1");Q.setAttribute("type","number");Q.setAttribute("min","1");Q.style.width="50px";D.appendChild(Q);var X=document.createElement("span");mxUtils.write(X,mxResources.get("to"));D.appendChild(X);var P=Q.cloneNode(!0);D.appendChild(P);mxEvent.addListener(Q,"focus",function(){J.checked=!0});mxEvent.addListener(P,"focus",function(){J.checked=!0});mxEvent.addListener(Q,"change",M);mxEvent.addListener(P,"change",M);if(null!=d.pages&&(G=d.pages.length,null!=d.currentPage))for(M=
+0;M<d.pages.length;M++)if(d.currentPage==d.pages[M]){H=M+1;Q.value=H;P.value=H;break}Q.setAttribute("max",G);P.setAttribute("max",G);mxUtils.br(D);var V=d.addRadiobox(D,"pages",mxResources.get("selectionOnly"),!1,t.isSelectionEmpty()),W=d.addCheckbox(D,mxResources.get("crop"),!1,!0),n=d.addCheckbox(D,mxResources.get("grid"),!1,!1);mxEvent.addListener(F,"change",C);mxEvent.addListener(J,"change",C);mxEvent.addListener(V,"change",C);z+=64}else V=d.addCheckbox(D,mxResources.get("selectionOnly"),!1,t.isSelectionEmpty()),
+W=d.addCheckbox(D,mxResources.get("crop"),!t.pageVisible||!d.pdfPageExport,!d.pdfPageExport),n=d.addCheckbox(D,mxResources.get("grid"),!1,!1),d.pdfPageExport||mxEvent.addListener(V,"change",C);C=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"draw.io"==d.getServiceName();var B=null,K=null;if(EditorUi.isElectronApp||C)K=d.addCheckbox(D,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram),z+=30;C&&(B=d.addCheckbox(D,mxResources.get("transparentBackground"),!1),z+=30);D=new CustomDialog(d,
+D,mxUtils.bind(this,function(){var R=null;if(!q){R=parseInt(Q.value);var O=parseInt(P.value);R=F.checked||R==H&&O==H?null:{from:Math.max(0,Math.min(G-1,R-1)),to:Math.max(0,Math.min(G-1,O-1))}}d.downloadFile("pdf",null,null,!V.checked,q?!0:!F.checked&&null==R,!W.checked,null!=B&&B.checked,null,null,n.checked,null!=K&&K.checked,R)}),null,mxResources.get("export"));d.showDialog(D.container,300,z,!0,!0)}else d.showDialog((new PrintDialog(d,mxResources.get("formatPdf"))).container,360,null!=d.pages&&1<
d.pages.length&&(d.editor.editable||"1"!=urlParams["hide-pages"])?470:390,!0,!0)}));d.actions.addAction("open...",function(){d.pickFile()});d.actions.addAction("close",function(){function q(){null!=D&&D.removeDraft();d.fileLoaded(null)}var D=d.getCurrentFile();null!=D&&D.isModified()?d.confirm(mxResources.get("allChangesLost"),null,q,mxResources.get("cancel"),mxResources.get("discardChanges")):q()});d.actions.addAction("editShape...",mxUtils.bind(this,function(){t.getSelectionCells();if(1==t.getSelectionCount()){var q=
t.getSelectionCell(),D=t.view.getState(q);null!=D&&null!=D.shape&&null!=D.shape.stencil&&(q=new EditShapeDialog(d,q,mxResources.get("editShape")+":",630,400),d.showDialog(q.container,640,480,!0,!1),q.init())}}));d.actions.addAction("revisionHistory...",function(){d.isRevisionHistorySupported()?d.spinner.spin(document.body,mxResources.get("loading"))&&d.getRevisions(mxUtils.bind(this,function(q,D){d.spinner.stop();q=new RevisionDialog(d,q,D);d.showDialog(q.container,640,480,!0,!0);q.init()}),mxUtils.bind(this,
function(q){d.handleError(q)})):d.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"))});d.actions.addAction("createRevision",function(){d.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");k=d.actions.addAction("synchronize",function(){d.synchronizeCurrentFile("none"==DrawioFile.SYNC)},null,null,"Alt+Shift+S");"none"==DrawioFile.SYNC&&(k.label=mxResources.get("refresh"));d.actions.addAction("upload...",function(){var q=d.getCurrentFile();null!=q&&(window.drawdata=
d.getFileData(),q=null!=q.getTitle()?q.getTitle():d.defaultFilename,d.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+(d.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(q),null,!0))});"undefined"!==typeof MathJax&&(k=d.actions.addAction("mathematicalTypesetting",function(){var q=new ChangePageSetup(d);q.ignoreColor=!0;q.ignoreImage=!0;q.mathEnabled=!d.isMathEnabled();t.model.execute(q)}),k.setToggleAction(!0),k.setSelectedCallback(function(){return d.isMathEnabled()}),
k.isEnabled=u);isLocalStorage&&(k=d.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),k.setToggleAction(!0),k.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var m=d.actions.addAction("autosave",function(){d.editor.setAutosave(!d.editor.autosave)});m.setToggleAction(!0);m.setSelectedCallback(function(){return m.isEnabled()&&d.editor.autosave});d.actions.addAction("editGeometry...",function(){for(var q=
-t.getSelectionCells(),D=[],A=0;A<q.length;A++)t.getModel().isVertex(q[A])&&D.push(q[A]);0<D.length&&(q=new EditGeometryDialog(d,D),d.showDialog(q.container,200,270,!0,!0),q.init())},null,null,Editor.ctrlKey+"+Shift+M");var p=null;d.actions.addAction("copyStyle",function(){t.isEnabled()&&!t.isSelectionEmpty()&&(p=t.copyStyle(t.getSelectionCell()))},null,null,Editor.ctrlKey+"+Shift+C");d.actions.addAction("pasteStyle",function(){t.isEnabled()&&!t.isSelectionEmpty()&&null!=p&&t.pasteStyle(p,t.getSelectionCells())},
+t.getSelectionCells(),D=[],z=0;z<q.length;z++)t.getModel().isVertex(q[z])&&D.push(q[z]);0<D.length&&(q=new EditGeometryDialog(d,D),d.showDialog(q.container,200,270,!0,!0),q.init())},null,null,Editor.ctrlKey+"+Shift+M");var p=null;d.actions.addAction("copyStyle",function(){t.isEnabled()&&!t.isSelectionEmpty()&&(p=t.copyStyle(t.getSelectionCell()))},null,null,Editor.ctrlKey+"+Shift+C");d.actions.addAction("pasteStyle",function(){t.isEnabled()&&!t.isSelectionEmpty()&&null!=p&&t.pasteStyle(p,t.getSelectionCells())},
null,null,Editor.ctrlKey+"+Shift+V");d.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!d.isOffline()){var q=new BackgroundImageDialog(d,function(D){d.setBackgroundImage(D)});d.showDialog(q.container,400,170,!0,!0);q.init()}}));d.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){d.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,
-function(q,D,A,C,G,M,H,F,I,R,X,O,W,U,n){I=parseInt(q);!isNaN(I)&&0<I&&(n?d.downloadFile("remoteSvg",null,null,A,null,F,D,q,H,null,G):d.exportSvg(I/100,D,A,C,G,M,H,!F,!1,R,O,W,U))}),!0,null,"svg",!0)}));d.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){d.isExportToCanvas()?d.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(q,D,A,C,G,M,H,F,I,R,X,O,W){q=parseInt(q);!isNaN(q)&&
-0<q&&d.exportImage(q/100,D,A,C,G,H,!F,!1,null,X,null,O,W)}),!0,Editor.defaultIncludeDiagram,"png",!0):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||d.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(q,D,A,C,G){d.downloadFile(D?"xmlpng":"png",null,null,q,null,null,A,C,G)}),!1,!0)}));d.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){d.isExportToCanvas()?d.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",
-mxUtils.bind(this,function(q,D,A,C,G,M,H,F,I,R,X,O,W){q=parseInt(q);!isNaN(q)&&0<q&&d.exportImage(q/100,!1,A,C,!1,H,!F,!1,"jpeg",X,null,O,W)}),!0,!1,"jpeg",!0):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||d.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(q,D,A,C,G){d.downloadFile("jpeg",null,null,q,null,null,null,C,G)}),!0,!0)}));k=d.actions.addAction("copyAsImage",mxUtils.bind(this,function(){var q=mxUtils.sortCells(t.model.getTopmostCells(t.getSelectionCells())),
+function(q,D,z,C,G,H,M,F,J,Q,X,P,V,W,n){J=parseInt(q);!isNaN(J)&&0<J&&(n?d.downloadFile("remoteSvg",null,null,z,null,F,D,q,M,null,G):d.exportSvg(J/100,D,z,C,G,H,M,!F,!1,Q,P,V,W))}),!0,null,"svg",!0)}));d.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){d.isExportToCanvas()?d.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(q,D,z,C,G,H,M,F,J,Q,X,P,V){q=parseInt(q);!isNaN(q)&&
+0<q&&d.exportImage(q/100,D,z,C,G,M,!F,!1,null,X,null,P,V)}),!0,Editor.defaultIncludeDiagram,"png",!0):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||d.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(q,D,z,C,G){d.downloadFile(D?"xmlpng":"png",null,null,q,null,null,z,C,G)}),!1,!0)}));d.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){d.isExportToCanvas()?d.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",
+mxUtils.bind(this,function(q,D,z,C,G,H,M,F,J,Q,X,P,V){q=parseInt(q);!isNaN(q)&&0<q&&d.exportImage(q/100,!1,z,C,!1,M,!F,!1,"jpeg",X,null,P,V)}),!0,!1,"jpeg",!0):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||d.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(q,D,z,C,G){d.downloadFile("jpeg",null,null,q,null,null,null,C,G)}),!0,!0)}));k=d.actions.addAction("copyAsImage",mxUtils.bind(this,function(){var q=mxUtils.sortCells(t.model.getTopmostCells(t.getSelectionCells())),
D=mxUtils.getXml(0==q.length?d.editor.getGraphXml():t.encodeCells(q));d.copyImage(q,D)}));k.visible=Editor.enableNativeCipboard&&d.isExportToCanvas()&&!mxClient.IS_SF;k=d.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){t.setShadowVisible(!t.shadowVisible)}));k.setToggleAction(!0);k.setSelectedCallback(function(){return t.shadowVisible});d.actions.put("about",new Action(mxResources.get("about")+" "+EditorUi.VERSION+"...",function(){d.isOffline()||mxClient.IS_CHROMEAPP||
EditorUi.isElectronApp?d.alert(d.editor.appName+" "+EditorUi.VERSION):d.openLink("https://www.diagrams.net/")}));d.actions.addAction("support...",function(){EditorUi.isElectronApp?d.openLink("https://github.com/jgraph/drawio-desktop/wiki/Getting-Support"):d.openLink("https://github.com/jgraph/drawio/wiki/Getting-Support")});d.actions.addAction("exportOptionsDisabled...",function(){d.handleError({message:mxResources.get("exportOptionsDisabledDetails")},mxResources.get("exportOptionsDisabled"))});d.actions.addAction("keyboardShortcuts...",
function(){!mxClient.IS_SVG||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?d.openLink("https://viewer.diagrams.net/#Uhttps%3A%2F%2Fviewer.diagrams.net%2Fshortcuts.svg"):d.openLink("shortcuts.svg")});d.actions.addAction("feedback...",function(){var q=new FeedbackDialog(d);d.showDialog(q.container,610,360,!0,!1);q.init()});d.actions.addAction("quickStart...",function(){d.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});k=d.actions.addAction("tags",mxUtils.bind(this,function(){null==this.tagsWindow?
(this.tagsWindow=new TagsWindow(d,document.body.offsetWidth-400,60,212,200),this.tagsWindow.window.addListener("show",mxUtils.bind(this,function(){d.fireEvent(new mxEventObject("tags"))})),this.tagsWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}));k.setToggleAction(!0);k.setSelectedCallback(mxUtils.bind(this,function(){return null!=
-this.tagsWindow&&this.tagsWindow.window.isVisible()}));k=d.actions.addAction("findReplace...",mxUtils.bind(this,function(q,D){var A=(q=t.isEnabled()&&(null==D||!mxEvent.isShiftDown(D)))?"findReplace":"find";D=A+"Window";if(null==this[D]){var C=q?"min"==uiTheme?330:300:240;this[D]=new FindWindow(d,document.body.offsetWidth-(C+20),100,C,q?"min"==uiTheme?304:288:170,q);this[D].window.addListener("show",function(){d.fireEvent(new mxEventObject(A))});this[D].window.addListener("hide",function(){d.fireEvent(new mxEventObject(A))});
+this.tagsWindow&&this.tagsWindow.window.isVisible()}));k=d.actions.addAction("findReplace...",mxUtils.bind(this,function(q,D){var z=(q=t.isEnabled()&&(null==D||!mxEvent.isShiftDown(D)))?"findReplace":"find";D=z+"Window";if(null==this[D]){var C=q?"min"==uiTheme?330:300:240;this[D]=new FindWindow(d,document.body.offsetWidth-(C+20),100,C,q?"min"==uiTheme?304:288:170,q);this[D].window.addListener("show",function(){d.fireEvent(new mxEventObject(z))});this[D].window.addListener("hide",function(){d.fireEvent(new mxEventObject(z))});
this[D].window.setVisible(!0)}else this[D].window.setVisible(!this[D].window.isVisible())}),null,null,Editor.ctrlKey+"+F");k.setToggleAction(!0);k.setSelectedCallback(mxUtils.bind(this,function(){var q=t.isEnabled()?"findReplaceWindow":"findWindow";return null!=this[q]&&this[q].window.isVisible()}));d.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){var q=null==d.pages||1>=d.pages.length;if(q)d.exportVisio();else{var D=document.createElement("div");D.style.whiteSpace=
-"nowrap";var A=document.createElement("h3");mxUtils.write(A,mxResources.get("formatVsdx"));A.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";D.appendChild(A);var C=d.addCheckbox(D,mxResources.get("allPages"),!q,q);C.style.marginBottom="16px";q=new CustomDialog(d,D,mxUtils.bind(this,function(){d.exportVisio(!C.checked)}),null,mxResources.get("export"));d.showDialog(q.container,300,130,!0,!0)}}));isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&d.actions.addAction("configuration...",
+"nowrap";var z=document.createElement("h3");mxUtils.write(z,mxResources.get("formatVsdx"));z.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";D.appendChild(z);var C=d.addCheckbox(D,mxResources.get("allPages"),!q,q);C.style.marginBottom="16px";q=new CustomDialog(d,D,mxUtils.bind(this,function(){d.exportVisio(!C.checked)}),null,mxResources.get("export"));d.showDialog(q.container,300,130,!0,!0)}}));isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&d.actions.addAction("configuration...",
function(){var q=document.createElement("input");q.setAttribute("type","checkbox");q.style.marginRight="4px";q.checked=mxSettings.getShowStartScreen();q.defaultChecked=q.checked;if(d.isSettingsEnabled()&&"1"==urlParams.sketch){var D=document.createElement("span");D.style["float"]="right";D.style.cursor="pointer";D.style.userSelect="none";D.style.marginTop="-4px";D.appendChild(q);mxUtils.write(D,mxResources.get("showStartScreen"));mxEvent.addListener(D,"click",function(G){mxEvent.getSource(G)!=q&&
-(q.checked=!q.checked)});header=D}var A=localStorage.getItem(Editor.configurationKey);D=[[mxResources.get("reset"),function(G,M){d.confirm(mxResources.get("areYouSure"),function(){try{mxEvent.isShiftDown(G)?(localStorage.removeItem(Editor.settingsKey),localStorage.removeItem(".drawio-config")):(localStorage.removeItem(Editor.configurationKey),d.hideDialog(),d.alert(mxResources.get("restartForChangeRequired")))}catch(H){d.handleError(H)}})},"Shift+Click to Reset Settings"]];var C=d.actions.get("plugins");
-null!=C&&"1"==urlParams.sketch&&D.push([mxResources.get("plugins"),C.funct]);EditorUi.isElectronApp||D.push([mxResources.get("share"),function(G,M){if(0<M.value.length)try{var H=JSON.parse(M.value),F=window.location.protocol+"//"+window.location.host+"/"+d.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(H)),I=new EmbedDialog(d,F);d.showDialog(I.container,450,240,!0);I.init()}catch(R){d.handleError(R)}else d.handleError({message:mxResources.get("invalidInput")})}]);D=new TextareaDialog(d,mxResources.get("configuration")+
-":",null!=A?JSON.stringify(JSON.parse(A),null,2):"",function(G){if(null!=G)try{if(null!=q.parentNode&&(mxSettings.setShowStartScreen(q.checked),mxSettings.save()),G==A)d.hideDialog();else{if(0<G.length){var M=JSON.parse(G);localStorage.setItem(Editor.configurationKey,JSON.stringify(M))}else localStorage.removeItem(Editor.configurationKey);d.hideDialog();d.alert(mxResources.get("restartForChangeRequired"))}}catch(H){d.handleError(H)}},null,null,null,null,null,!0,null,null,"https://www.diagrams.net/doc/faq/configure-diagram-editor",
-D,q.parentNode);d.showDialog(D.container,620,460,!0,!1);D.init()});if(mxClient.IS_CHROMEAPP||isLocalStorage){this.put("language",new Menu(mxUtils.bind(this,function(q,D){var A=mxUtils.bind(this,function(G){var M=""==G?mxResources.get("automatic"):mxLanguageMap[G],H=null;""!=M&&(H=q.addItem(M,null,mxUtils.bind(this,function(){mxSettings.setLanguage(G);mxSettings.save();mxClient.language=G;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);d.alert(mxResources.get("restartForChangeRequired"))}),
-D),(G==mxLanguage||""==G&&null==mxLanguage)&&q.addCheckmark(H,Editor.checkmarkImage));return H});A("");q.addSeparator(D);for(var C in mxLanguageMap)A(C)})));var v=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(q){var D=v.apply(this,arguments);if(null!=D&&"1"!=urlParams.noLangIcon){var A=this.get("language");if(null!=A){A=D.addMenu("",A.funct);A.setAttribute("title",mxResources.get("language"));A.style.width="16px";A.style.paddingTop="2px";A.style.paddingLeft="4px";A.style.zIndex=
-"1";A.style.position="absolute";A.style.display="block";A.style.cursor="pointer";A.style.right="17px";"atlas"==uiTheme?(A.style.top="6px",A.style.right="15px"):A.style.top="min"==uiTheme?"2px":"0px";var C=document.createElement("div");C.style.backgroundImage="url("+Editor.globeImage+")";C.style.backgroundPosition="center center";C.style.backgroundRepeat="no-repeat";C.style.backgroundSize="19px 19px";C.style.position="absolute";C.style.height="19px";C.style.width="19px";C.style.marginTop="2px";C.style.zIndex=
-"1";A.appendChild(C);mxUtils.setOpacity(A,40);"1"==urlParams.winCtrls&&(A.style.right="95px",A.style.width="19px",A.style.height="19px",A.style.webkitAppRegion="no-drag",C.style.webkitAppRegion="no-drag");if("atlas"==uiTheme||"dark"==uiTheme)A.style.opacity="0.85",A.style.filter="invert(100%)";document.body.appendChild(A);D.langIcon=A}}return D}}d.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];
-d.actions.addAction("runLayout",function(){var q=new TextareaDialog(d,"Run Layouts:",JSON.stringify(d.customLayoutConfig,null,2),function(D){if(0<D.length)try{var A=JSON.parse(D);d.executeLayouts(t.createLayouts(A));d.customLayoutConfig=A;d.hideDialog()}catch(C){d.handleError(C)}},null,null,null,null,function(D,A){var C=mxUtils.button(mxResources.get("copy"),function(){try{var G=A.value;A.value=JSON.stringify(JSON.parse(G));A.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?A.select():
-document.execCommand("selectAll",!1,null);document.execCommand("copy");d.alert(mxResources.get("copiedToClipboard"));A.value=G}catch(M){d.handleError(M)}});C.setAttribute("title","copy");C.className="geBtn";D.appendChild(C)},!0,null,null,"https://www.diagrams.net/doc/faq/apply-layouts");d.showDialog(q.container,620,460,!0,!0);q.init()});k=this.get("layout");var x=k.funct;k.funct=function(q,D){x.apply(this,arguments);q.addItem(mxResources.get("orgChart"),null,function(){var A=null,C=20,G=20,M=function(){if("undefined"!==
-typeof mxOrgChartLayout&&null!=A){var U=d.editor.graph,n=new mxOrgChartLayout(U,A,C,G),B=U.getDefaultParent();1<U.model.getChildCount(U.getSelectionCell())&&(B=U.getSelectionCell());n.execute(B)}},H=document.createElement("div"),F=document.createElement("div");F.style.marginTop="6px";F.style.display="inline-block";F.style.width="140px";mxUtils.write(F,mxResources.get("orgChartType")+": ");H.appendChild(F);var I=document.createElement("select");I.style.width="200px";I.style.boxSizing="border-box";
-F=[mxResources.get("linear"),mxResources.get("hanger2"),mxResources.get("hanger4"),mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")];for(var R=0;R<F.length;R++){var X=document.createElement("option");mxUtils.write(X,F[R]);X.value=R;2==R&&X.setAttribute("selected","selected");I.appendChild(X)}mxEvent.addListener(I,"change",function(){A=I.value});H.appendChild(I);F=document.createElement("div");F.style.marginTop=
-"6px";F.style.display="inline-block";F.style.width="140px";mxUtils.write(F,mxResources.get("parentChildSpacing")+": ");H.appendChild(F);var O=document.createElement("input");O.type="number";O.value=C;O.style.width="200px";O.style.boxSizing="border-box";H.appendChild(O);mxEvent.addListener(O,"change",function(){C=O.value});F=document.createElement("div");F.style.marginTop="6px";F.style.display="inline-block";F.style.width="140px";mxUtils.write(F,mxResources.get("siblingSpacing")+": ");H.appendChild(F);
-var W=document.createElement("input");W.type="number";W.value=G;W.style.width="200px";W.style.boxSizing="border-box";H.appendChild(W);mxEvent.addListener(W,"change",function(){G=W.value});H=new CustomDialog(d,H,function(){null==A&&(A=2);d.loadOrgChartLayouts(M)});d.showDialog(H.container,355,140,!0,!0)},D,null,u());q.addSeparator(D);q.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){var A=new mxParallelEdgeLayout(t);A.checkOverlap=!0;d.prompt(mxResources.get("spacing"),A.spacing,
-mxUtils.bind(this,function(C){A.spacing=C;d.executeLayout(function(){A.execute(t.getDefaultParent(),t.isSelectionEmpty()?null:t.getSelectionCells())},!1)}))}),D);q.addSeparator(D);d.menus.addMenuItem(q,"runLayout",D,null,null,mxResources.get("apply")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(q,D){if(!mxClient.IS_CHROMEAPP&&d.isOffline())this.addMenuItems(q,["about"],D);else{var A=q.addItem("Search:",null,null,D,null,null,!1);A.style.backgroundColor=Editor.isDarkMode()?"#505759":
-"whiteSmoke";A.style.cursor="default";var C=document.createElement("input");C.setAttribute("type","text");C.setAttribute("size","25");C.style.marginLeft="8px";mxEvent.addListener(C,"keydown",mxUtils.bind(this,function(G){var M=mxUtils.trim(C.value);13==G.keyCode&&0<M.length?(this.editorUi.openLink("https://www.diagrams.net/search?src="+(EditorUi.isElectronApp?"DESKTOP":encodeURIComponent(location.host))+"&search="+encodeURIComponent(M)),C.value="",EditorUi.logEvent({category:"SEARCH-HELP",action:"search",
-label:M}),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0)):27==G.keyCode&&(C.value="")}));A.firstChild.nextSibling.appendChild(C);mxEvent.addGestureListeners(C,function(G){document.activeElement!=C&&C.focus();mxEvent.consume(G)},function(G){mxEvent.consume(G)},function(G){mxEvent.consume(G)});window.setTimeout(function(){C.focus()},0);EditorUi.isElectronApp?(d.actions.addAction("website...",function(){d.openLink("https://www.diagrams.net")}),d.actions.addAction("check4Updates",
+(q.checked=!q.checked)});header=D}var z=localStorage.getItem(Editor.configurationKey);D=[[mxResources.get("reset"),function(G,H){d.confirm(mxResources.get("areYouSure"),function(){try{mxEvent.isShiftDown(G)?(localStorage.removeItem(Editor.settingsKey),localStorage.removeItem(".drawio-config")):(localStorage.removeItem(Editor.configurationKey),d.hideDialog(),d.alert(mxResources.get("restartForChangeRequired")))}catch(M){d.handleError(M)}})},"Shift+Click to Reset Settings"]];var C=d.actions.get("plugins");
+null!=C&&"1"==urlParams.sketch&&D.push([mxResources.get("plugins"),C.funct]);EditorUi.isElectronApp||D.push([mxResources.get("share"),function(G,H){if(0<H.value.length)try{var M=JSON.parse(H.value),F=window.location.protocol+"//"+window.location.host+"/"+d.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(M)),J=new EmbedDialog(d,F);d.showDialog(J.container,450,240,!0);J.init()}catch(Q){d.handleError(Q)}else d.handleError({message:mxResources.get("invalidInput")})}]);D=new TextareaDialog(d,mxResources.get("configuration")+
+":",null!=z?JSON.stringify(JSON.parse(z),null,2):"",function(G){if(null!=G)try{if(null!=q.parentNode&&(mxSettings.setShowStartScreen(q.checked),mxSettings.save()),G==z)d.hideDialog();else{if(0<G.length){var H=JSON.parse(G);localStorage.setItem(Editor.configurationKey,JSON.stringify(H))}else localStorage.removeItem(Editor.configurationKey);d.hideDialog();d.alert(mxResources.get("restartForChangeRequired"))}}catch(M){d.handleError(M)}},null,null,null,null,null,!0,null,null,"https://www.diagrams.net/doc/faq/configure-diagram-editor",
+D,q.parentNode);d.showDialog(D.container,620,460,!0,!1);D.init()});if(mxClient.IS_CHROMEAPP||isLocalStorage){this.put("language",new Menu(mxUtils.bind(this,function(q,D){var z=mxUtils.bind(this,function(G){var H=""==G?mxResources.get("automatic"):mxLanguageMap[G],M=null;""!=H&&(M=q.addItem(H,null,mxUtils.bind(this,function(){mxSettings.setLanguage(G);mxSettings.save();mxClient.language=G;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);d.alert(mxResources.get("restartForChangeRequired"))}),
+D),(G==mxLanguage||""==G&&null==mxLanguage)&&q.addCheckmark(M,Editor.checkmarkImage));return M});z("");q.addSeparator(D);for(var C in mxLanguageMap)z(C)})));var v=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(q){var D=v.apply(this,arguments);if(null!=D&&"1"!=urlParams.noLangIcon){var z=this.get("language");if(null!=z){z=D.addMenu("",z.funct);z.setAttribute("title",mxResources.get("language"));z.style.width="16px";z.style.paddingTop="2px";z.style.paddingLeft="4px";z.style.zIndex=
+"1";z.style.position="absolute";z.style.display="block";z.style.cursor="pointer";z.style.right="17px";"atlas"==uiTheme?(z.style.top="6px",z.style.right="15px"):z.style.top="min"==uiTheme?"2px":"0px";var C=document.createElement("div");C.style.backgroundImage="url("+Editor.globeImage+")";C.style.backgroundPosition="center center";C.style.backgroundRepeat="no-repeat";C.style.backgroundSize="19px 19px";C.style.position="absolute";C.style.height="19px";C.style.width="19px";C.style.marginTop="2px";C.style.zIndex=
+"1";z.appendChild(C);mxUtils.setOpacity(z,40);"1"==urlParams.winCtrls&&(z.style.right="95px",z.style.width="19px",z.style.height="19px",z.style.webkitAppRegion="no-drag",C.style.webkitAppRegion="no-drag");if("atlas"==uiTheme||"dark"==uiTheme)z.style.opacity="0.85",z.style.filter="invert(100%)";document.body.appendChild(z);D.langIcon=z}}return D}}d.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];
+d.actions.addAction("runLayout",function(){var q=new TextareaDialog(d,"Run Layouts:",JSON.stringify(d.customLayoutConfig,null,2),function(D){if(0<D.length)try{var z=JSON.parse(D);d.executeLayouts(t.createLayouts(z));d.customLayoutConfig=z;d.hideDialog()}catch(C){d.handleError(C)}},null,null,null,null,function(D,z){var C=mxUtils.button(mxResources.get("copy"),function(){try{var G=z.value;z.value=JSON.stringify(JSON.parse(G));z.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?z.select():
+document.execCommand("selectAll",!1,null);document.execCommand("copy");d.alert(mxResources.get("copiedToClipboard"));z.value=G}catch(H){d.handleError(H)}});C.setAttribute("title","copy");C.className="geBtn";D.appendChild(C)},!0,null,null,"https://www.diagrams.net/doc/faq/apply-layouts");d.showDialog(q.container,620,460,!0,!0);q.init()});k=this.get("layout");var x=k.funct;k.funct=function(q,D){x.apply(this,arguments);q.addItem(mxResources.get("orgChart"),null,function(){var z=null,C=20,G=20,H=function(){if("undefined"!==
+typeof mxOrgChartLayout&&null!=z){var W=d.editor.graph,n=new mxOrgChartLayout(W,z,C,G),B=W.getDefaultParent();1<W.model.getChildCount(W.getSelectionCell())&&(B=W.getSelectionCell());n.execute(B)}},M=document.createElement("div"),F=document.createElement("div");F.style.marginTop="6px";F.style.display="inline-block";F.style.width="140px";mxUtils.write(F,mxResources.get("orgChartType")+": ");M.appendChild(F);var J=document.createElement("select");J.style.width="200px";J.style.boxSizing="border-box";
+F=[mxResources.get("linear"),mxResources.get("hanger2"),mxResources.get("hanger4"),mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")];for(var Q=0;Q<F.length;Q++){var X=document.createElement("option");mxUtils.write(X,F[Q]);X.value=Q;2==Q&&X.setAttribute("selected","selected");J.appendChild(X)}mxEvent.addListener(J,"change",function(){z=J.value});M.appendChild(J);F=document.createElement("div");F.style.marginTop=
+"6px";F.style.display="inline-block";F.style.width="140px";mxUtils.write(F,mxResources.get("parentChildSpacing")+": ");M.appendChild(F);var P=document.createElement("input");P.type="number";P.value=C;P.style.width="200px";P.style.boxSizing="border-box";M.appendChild(P);mxEvent.addListener(P,"change",function(){C=P.value});F=document.createElement("div");F.style.marginTop="6px";F.style.display="inline-block";F.style.width="140px";mxUtils.write(F,mxResources.get("siblingSpacing")+": ");M.appendChild(F);
+var V=document.createElement("input");V.type="number";V.value=G;V.style.width="200px";V.style.boxSizing="border-box";M.appendChild(V);mxEvent.addListener(V,"change",function(){G=V.value});M=new CustomDialog(d,M,function(){null==z&&(z=2);d.loadOrgChartLayouts(H)});d.showDialog(M.container,355,140,!0,!0)},D,null,u());q.addSeparator(D);q.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){var z=new mxParallelEdgeLayout(t);z.checkOverlap=!0;d.prompt(mxResources.get("spacing"),z.spacing,
+mxUtils.bind(this,function(C){z.spacing=C;d.executeLayout(function(){z.execute(t.getDefaultParent(),t.isSelectionEmpty()?null:t.getSelectionCells())},!1)}))}),D);q.addSeparator(D);d.menus.addMenuItem(q,"runLayout",D,null,null,mxResources.get("apply")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(q,D){if(!mxClient.IS_CHROMEAPP&&d.isOffline())this.addMenuItems(q,["about"],D);else{var z=q.addItem("Search:",null,null,D,null,null,!1);z.style.backgroundColor=Editor.isDarkMode()?"#505759":
+"whiteSmoke";z.style.cursor="default";var C=document.createElement("input");C.setAttribute("type","text");C.setAttribute("size","25");C.style.marginLeft="8px";mxEvent.addListener(C,"keydown",mxUtils.bind(this,function(G){var H=mxUtils.trim(C.value);13==G.keyCode&&0<H.length?(this.editorUi.openLink("https://www.diagrams.net/search?src="+(EditorUi.isElectronApp?"DESKTOP":encodeURIComponent(location.host))+"&search="+encodeURIComponent(H)),C.value="",EditorUi.logEvent({category:"SEARCH-HELP",action:"search",
+label:H}),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0)):27==G.keyCode&&(C.value="")}));z.firstChild.nextSibling.appendChild(C);mxEvent.addGestureListeners(C,function(G){document.activeElement!=C&&C.focus();mxEvent.consume(G)},function(G){mxEvent.consume(G)},function(G){mxEvent.consume(G)});window.setTimeout(function(){C.focus()},0);EditorUi.isElectronApp?(d.actions.addAction("website...",function(){d.openLink("https://www.diagrams.net")}),d.actions.addAction("check4Updates",
function(){d.checkForUpdates()}),this.addMenuItems(q,"- keyboardShortcuts quickStart website support -".split(" "),D),"1"!=urlParams.disableUpdate&&this.addMenuItems(q,["check4Updates"],D),this.addMenuItems(q,["openDevTools","-","about"],D)):this.addMenuItems(q,"- keyboardShortcuts quickStart support - about".split(" "),D)}"1"==urlParams.test&&(q.addSeparator(D),this.addSubmenu("testDevelop",q,D))})));mxResources.parse("diagramLanguage=Diagram Language");d.actions.addAction("diagramLanguage...",function(){var q=
prompt("Language Code",Graph.diagramLanguage||"");null!=q&&(Graph.diagramLanguage=0<q.length?q:null,t.refresh())});if("1"==urlParams.test){mxResources.parse("testDevelop=Develop");mxResources.parse("showBoundingBox=Show bounding box");mxResources.parse("createSidebarEntry=Create Sidebar Entry");mxResources.parse("testCheckFile=Check File");mxResources.parse("testDiff=Diff/Sync");mxResources.parse("testInspectPages=Check Pages");mxResources.parse("testFixPages=Fix Pages");mxResources.parse("testInspect=Inspect");
mxResources.parse("testShowConsole=Show Console");mxResources.parse("testXmlImageExport=XML Image Export");mxResources.parse("testOptimize=Remove Inline Images");d.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){if(!t.isSelectionEmpty()){var q=t.cloneCells(t.getSelectionCells()),D=t.getBoundingBoxFromGeometry(q);q=t.moveCells(q,-D.x,-D.y);d.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+D.width+", "+D.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(t.encodeCells(q)))+
-"'),")}}));d.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var q=t.getGraphBounds(),D=t.view.translate,A=t.view.scale;t.insertVertex(t.getDefaultParent(),null,"",q.x/A-D.x,q.y/A-D.y,q.width/A,q.height/A,"fillColor=none;strokeColor=red;")}));d.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var q=null!=d.pages&&null!=d.getCurrentFile()?d.getCurrentFile().getAnonymizedXmlForPages(d.pages):"";q=new TextareaDialog(d,"Paste Data:",q,function(D){if(0<D.length)try{var A=
-function(F){function I(P){if(null==Q[P]){if(Q[P]=!0,null!=O[P]){for(;0<O[P].length;){var T=O[P].pop();I(T)}delete O[P]}}else mxLog.debug(R+": Visited: "+P)}var R=F.parentNode.id,X=F.childNodes;F={};for(var O={},W=null,U={},n=0;n<X.length;n++){var B=X[n];if(null!=B.id&&0<B.id.length)if(null==F[B.id]){F[B.id]=B.id;var K=B.getAttribute("parent");null==K?null!=W?mxLog.debug(R+": Multiple roots: "+B.id):W=B.id:(null==O[K]&&(O[K]=[]),O[K].push(B.id))}else U[B.id]=B.id}X=Object.keys(U);0<X.length?(X=R+": "+
-X.length+" Duplicates: "+X.join(", "),mxLog.debug(X+" (see console)")):mxLog.debug(R+": Checked");var Q={};null==W?mxLog.debug(R+": No root"):(I(W),Object.keys(Q).length!=Object.keys(F).length&&(mxLog.debug(R+": Invalid tree: (see console)"),console.log(R+": Invalid tree",O)))};"<"!=D.charAt(0)&&(D=Graph.decompress(D),mxLog.debug("See console for uncompressed XML"),console.log("xml",D));var C=mxUtils.parseXml(D),G=d.getPagesForNode(C.documentElement,"mxGraphModel");if(null!=G&&0<G.length)try{var M=
-d.getHashValueForPages(G);mxLog.debug("Checksum: ",M)}catch(F){mxLog.debug("Error: ",F.message)}else mxLog.debug("No pages found for checksum");var H=C.getElementsByTagName("root");for(D=0;D<H.length;D++)A(H[D]);mxLog.show()}catch(F){d.handleError(F),null!=window.console&&console.error(F)}});d.showDialog(q.container,620,460,!0,!0);q.init()}));var z=null;d.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=d.pages){var q=new TextareaDialog(d,"Diff/Sync:","",function(D){var A=d.getCurrentFile();
-if(0<D.length&&null!=A)try{var C=JSON.parse(D);A.patch([C],null,!0);d.hideDialog()}catch(G){d.handleError(G)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(D,A){z=d.getPagesForXml(d.getFileData(!0));q.textarea.value="Snapshot updated "+(new Date).toLocaleString()+" Checksum "+d.getHashValueForPages(z)}],["Diff",function(D,A){try{q.textarea.value=JSON.stringify(d.diffPages(z,d.pages),null,2)}catch(C){d.handleError(C)}}]]);null==z?(z=d.getPagesForXml(d.getFileData(!0)),q.textarea.value=
-"Snapshot created "+(new Date).toLocaleString()+" Checksum "+d.getHashValueForPages(z)):q.textarea.value=JSON.stringify(d.diffPages(z,d.pages),null,2);d.showDialog(q.container,620,460,!0,!0);q.init()}else d.alert("No pages")}));d.actions.addAction("testInspectPages",mxUtils.bind(this,function(){var q=d.getCurrentFile();console.log("editorUi",d,"file",q);if(null!=q&&q.isRealtime()){console.log("Checksum ownPages",d.getHashValueForPages(q.ownPages));console.log("Checksum theirPages",d.getHashValueForPages(q.theirPages));
+"'),")}}));d.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var q=t.getGraphBounds(),D=t.view.translate,z=t.view.scale;t.insertVertex(t.getDefaultParent(),null,"",q.x/z-D.x,q.y/z-D.y,q.width/z,q.height/z,"fillColor=none;strokeColor=red;")}));d.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var q=null!=d.pages&&null!=d.getCurrentFile()?d.getCurrentFile().getAnonymizedXmlForPages(d.pages):"";q=new TextareaDialog(d,"Paste Data:",q,function(D){if(0<D.length)try{var z=
+function(F){function J(O){if(null==R[O]){if(R[O]=!0,null!=P[O]){for(;0<P[O].length;){var U=P[O].pop();J(U)}delete P[O]}}else mxLog.debug(Q+": Visited: "+O)}var Q=F.parentNode.id,X=F.childNodes;F={};for(var P={},V=null,W={},n=0;n<X.length;n++){var B=X[n];if(null!=B.id&&0<B.id.length)if(null==F[B.id]){F[B.id]=B.id;var K=B.getAttribute("parent");null==K?null!=V?mxLog.debug(Q+": Multiple roots: "+B.id):V=B.id:(null==P[K]&&(P[K]=[]),P[K].push(B.id))}else W[B.id]=B.id}X=Object.keys(W);0<X.length?(X=Q+": "+
+X.length+" Duplicates: "+X.join(", "),mxLog.debug(X+" (see console)")):mxLog.debug(Q+": Checked");var R={};null==V?mxLog.debug(Q+": No root"):(J(V),Object.keys(R).length!=Object.keys(F).length&&(mxLog.debug(Q+": Invalid tree: (see console)"),console.log(Q+": Invalid tree",P)))};"<"!=D.charAt(0)&&(D=Graph.decompress(D),mxLog.debug("See console for uncompressed XML"),console.log("xml",D));var C=mxUtils.parseXml(D),G=d.getPagesForNode(C.documentElement,"mxGraphModel");if(null!=G&&0<G.length)try{var H=
+d.getHashValueForPages(G);mxLog.debug("Checksum: ",H)}catch(F){mxLog.debug("Error: ",F.message)}else mxLog.debug("No pages found for checksum");var M=C.getElementsByTagName("root");for(D=0;D<M.length;D++)z(M[D]);mxLog.show()}catch(F){d.handleError(F),null!=window.console&&console.error(F)}});d.showDialog(q.container,620,460,!0,!0);q.init()}));var A=null;d.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=d.pages){var q=new TextareaDialog(d,"Diff/Sync:","",function(D){var z=d.getCurrentFile();
+if(0<D.length&&null!=z)try{var C=JSON.parse(D);z.patch([C],null,!0);d.hideDialog()}catch(G){d.handleError(G)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(D,z){A=d.getPagesForXml(d.getFileData(!0));q.textarea.value="Snapshot updated "+(new Date).toLocaleString()+" Checksum "+d.getHashValueForPages(A)}],["Diff",function(D,z){try{q.textarea.value=JSON.stringify(d.diffPages(A,d.pages),null,2)}catch(C){d.handleError(C)}}]]);null==A?(A=d.getPagesForXml(d.getFileData(!0)),q.textarea.value=
+"Snapshot created "+(new Date).toLocaleString()+" Checksum "+d.getHashValueForPages(A)):q.textarea.value=JSON.stringify(d.diffPages(A,d.pages),null,2);d.showDialog(q.container,620,460,!0,!0);q.init()}else d.alert("No pages")}));d.actions.addAction("testInspectPages",mxUtils.bind(this,function(){var q=d.getCurrentFile();console.log("editorUi",d,"file",q);if(null!=q&&q.isRealtime()){console.log("Checksum ownPages",d.getHashValueForPages(q.ownPages));console.log("Checksum theirPages",d.getHashValueForPages(q.theirPages));
console.log("diff ownPages/theirPages",d.diffPages(q.ownPages,q.theirPages));var D=q.getShadowPages();null!=D&&(console.log("Checksum shadowPages",d.getHashValueForPages(D)),console.log("diff shadowPages/ownPages",d.diffPages(D,q.ownPages)),console.log("diff ownPages/shadowPages",d.diffPages(q.ownPages,D)),console.log("diff theirPages/shadowPages",d.diffPages(q.theirPages,D)));null!=q.sync&&null!=q.sync.snapshot&&(console.log("Checksum snapshot",d.getHashValueForPages(q.sync.snapshot)),console.log("diff ownPages/snapshot",
d.diffPages(q.ownPages,q.sync.snapshot)),console.log("diff theirPages/snapshot",d.diffPages(q.theirPages,q.sync.snapshot)),null!=d.pages&&console.log("diff snapshot/actualPages",d.diffPages(q.sync.snapshot,d.pages)));null!=d.pages&&(console.log("diff ownPages/actualPages",d.diffPages(q.ownPages,d.pages)),console.log("diff theirPages/actualPages",d.diffPages(q.theirPages,d.pages)))}null!=q&&console.log("Shadow pages",[d.getXmlForPages(q.getShadowPages())]);null!=d.pages&&console.log("Checksum actualPages",
d.getHashValueForPages(d.pages))}));d.actions.addAction("testFixPages",mxUtils.bind(this,function(){console.log("editorUi",d);var q=d.getCurrentFile();null!=q&&q.isRealtime()&&null!=q.shadowPages&&(console.log("patching actualPages to shadowPages",q.patch([d.diffPages(q.shadowPages,d.pages)])),q.ownPages=d.clonePages(d.pages),q.theirPages=d.clonePages(d.pages),q.shadowPages=d.clonePages(d.pages),null!=q.sync&&(q.sync.snapshot=d.clonePages(d.pages)))}));d.actions.addAction("testOptimize",mxUtils.bind(this,
-function(){t.model.beginUpdate();try{var q=t.model.cells,D=0,A=[],C=[],G;for(G in q){var M=q[G],H=t.getCurrentCellStyle(M)[mxConstants.STYLE_IMAGE];null!=H&&"data:"==H.substring(0,5)&&(null==A[H]&&(A[H]=(A[H]||0)+1,D++),C.push(M))}t.setCellStyles(mxConstants.STYLE_IMAGE,null,C);console.log("Removed",D,"image(s) from",C.length,"cell(s): ",[C,A])}finally{t.model.endUpdate()}}));d.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(d,t.getModel())}));d.actions.addAction("testXmlImageExport",
-mxUtils.bind(this,function(){var q=new mxImageExport,D=t.getGraphBounds(),A=t.view.scale,C=mxUtils.createXmlDocument(),G=C.createElement("output");C.appendChild(G);C=new mxXmlCanvas2D(G);C.translate(Math.floor((1-D.x)/A),Math.floor((1-D.y)/A));C.scale(1/A);var M=0,H=C.save;C.save=function(){M++;H.apply(this,arguments)};var F=C.restore;C.restore=function(){M--;F.apply(this,arguments)};var I=q.drawShape;q.drawShape=function(R){mxLog.debug("entering shape",R,M);I.apply(this,arguments);mxLog.debug("leaving shape",
-R,M)};q.drawState(t.getView().getState(t.model.root),C);mxLog.show();mxLog.debug(mxUtils.getXml(G));mxLog.debug("stateCounter",M)}));d.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(q,D){this.addMenuItems(q,"createSidebarEntry showBoundingBox - testInspectPages testFixPages - testCheckFile testDiff - testInspect testOptimize - testXmlImageExport - testShowConsole".split(" "),
+function(){t.model.beginUpdate();try{var q=t.model.cells,D=0,z=[],C=[],G;for(G in q){var H=q[G],M=t.getCurrentCellStyle(H)[mxConstants.STYLE_IMAGE];null!=M&&"data:"==M.substring(0,5)&&(null==z[M]&&(z[M]=(z[M]||0)+1,D++),C.push(H))}t.setCellStyles(mxConstants.STYLE_IMAGE,null,C);console.log("Removed",D,"image(s) from",C.length,"cell(s): ",[C,z])}finally{t.model.endUpdate()}}));d.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(d,t.getModel())}));d.actions.addAction("testXmlImageExport",
+mxUtils.bind(this,function(){var q=new mxImageExport,D=t.getGraphBounds(),z=t.view.scale,C=mxUtils.createXmlDocument(),G=C.createElement("output");C.appendChild(G);C=new mxXmlCanvas2D(G);C.translate(Math.floor((1-D.x)/z),Math.floor((1-D.y)/z));C.scale(1/z);var H=0,M=C.save;C.save=function(){H++;M.apply(this,arguments)};var F=C.restore;C.restore=function(){H--;F.apply(this,arguments)};var J=q.drawShape;q.drawShape=function(Q){mxLog.debug("entering shape",Q,H);J.apply(this,arguments);mxLog.debug("leaving shape",
+Q,H)};q.drawState(t.getView().getState(t.model.root),C);mxLog.show();mxLog.debug(mxUtils.getXml(G));mxLog.debug("stateCounter",H)}));d.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(q,D){this.addMenuItems(q,"createSidebarEntry showBoundingBox - testInspectPages testFixPages - testCheckFile testDiff - testInspect testOptimize - testXmlImageExport - testShowConsole".split(" "),
D)})))}d.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!d.isOffline()?d.showDialog((new MoreShapesDialog(d,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):d.showDialog((new MoreShapesDialog(d,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});d.actions.put("createShape",new Action(mxResources.get("shape")+"...",function(q){t.isEnabled()&&(q=new mxCell("",new mxGeometry(0,0,120,120),d.defaultCustomShapeStyle),q.vertex=!0,q=new EditShapeDialog(d,
-q,mxResources.get("editShape")+":",630,400),d.showDialog(q.container,640,480,!0,!1),q.init())})).isEnabled=u;d.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(q){d.spinner.stop();d.showHtmlDialog(mxResources.get("create"),"https://www.diagrams.net/doc/faq/embed-html-options",q,function(D,A,C,G,M,H,F,I,R,X,O){d.createHtml(D,A,C,G,M,H,F,I,R,X,O,mxUtils.bind(this,function(W,
-U){var n=new EmbedDialog(d,W+"\n"+U,null,null,function(){var B=window.open(),K=B.document;if(null!=K){"CSS1Compat"===document.compatMode&&K.writeln("<!DOCTYPE html>");K.writeln("<html>");K.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');K.writeln("<body>");K.writeln(W);var Q=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;Q&&K.writeln(U);K.writeln("</body>");K.writeln("</html>");K.close();if(!Q){var P=B.document.createElement("div");
-P.marginLeft="26px";P.marginTop="26px";mxUtils.write(P,mxResources.get("updatingDocument"));Q=B.document.createElement("img");Q.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");Q.style.marginLeft="6px";P.appendChild(Q);B.document.body.insertBefore(P,B.document.body.firstChild);window.setTimeout(function(){var T=document.createElement("script");T.type="text/javascript";T.src=/<script.*?src="(.*?)"/.exec(U)[1];K.body.appendChild(T);P.parentNode.removeChild(P)},
+q,mxResources.get("editShape")+":",630,400),d.showDialog(q.container,640,480,!0,!1),q.init())})).isEnabled=u;d.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(q){d.spinner.stop();d.showHtmlDialog(mxResources.get("create"),"https://www.diagrams.net/doc/faq/embed-html-options",q,function(D,z,C,G,H,M,F,J,Q,X,P){d.createHtml(D,z,C,G,H,M,F,J,Q,X,P,mxUtils.bind(this,function(V,
+W){var n=new EmbedDialog(d,V+"\n"+W,null,null,function(){var B=window.open(),K=B.document;if(null!=K){"CSS1Compat"===document.compatMode&&K.writeln("<!DOCTYPE html>");K.writeln("<html>");K.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');K.writeln("<body>");K.writeln(V);var R=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;R&&K.writeln(W);K.writeln("</body>");K.writeln("</html>");K.close();if(!R){var O=B.document.createElement("div");
+O.marginLeft="26px";O.marginTop="26px";mxUtils.write(O,mxResources.get("updatingDocument"));R=B.document.createElement("img");R.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");R.style.marginLeft="6px";O.appendChild(R);B.document.body.insertBefore(O,B.document.body.firstChild);window.setTimeout(function(){var U=document.createElement("script");U.type="text/javascript";U.src=/<script.*?src="(.*?)"/.exec(W)[1];K.body.appendChild(U);O.parentNode.removeChild(O)},
20)}}else d.handleError({message:mxResources.get("errorUpdatingPreview")})});d.showDialog(n.container,450,240,!0,!0);n.init()}))})})}));d.actions.put("liveImage",new Action("Live image...",function(){var q=d.getCurrentFile();null!=q&&d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(D){d.spinner.stop();null!=D?(D=new EmbedDialog(d,'<img src="'+(q.constructor!=DriveFile?D:"https://drive.google.com/uc?id="+q.getId())+'"/>'),d.showDialog(D.container,
-450,240,!0,!0),D.init()):d.handleError({message:mxResources.get("invalidPublicUrl")})})}));d.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){d.showEmbedImageDialog(function(q,D,A,C,G,M){d.spinner.spin(document.body,mxResources.get("loading"))&&d.createEmbedImage(q,D,A,C,G,M,function(H){d.spinner.stop();H=new EmbedDialog(d,H);d.showDialog(H.container,450,240,!0,!0);H.init()},function(H){d.spinner.stop();d.handleError(H)})},mxResources.get("image"),mxResources.get("retina"),
-d.isExportToCanvas())}));d.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){d.showEmbedImageDialog(function(q,D,A,C,G,M){d.spinner.spin(document.body,mxResources.get("loading"))&&d.createEmbedSvg(q,D,A,C,G,M,function(H){d.spinner.stop();H=new EmbedDialog(d,H);d.showDialog(H.container,450,240,!0,!0);H.init()},function(H){d.spinner.stop();d.handleError(H)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.diagrams.net/doc/faq/embed-svg.html")}));
-d.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var q=t.getGraphBounds();d.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil(q.height/t.view.scale)+2,function(D,A,C,G,M,H,F,I,R){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(X){d.spinner.stop();var O=[];R&&O.push("tags=%7B%7D");X=new EmbedDialog(d,'<iframe frameborder="0" style="width:'+F+";height:"+I+';" src="'+d.createLink(D,A,C,G,M,H,X,null,
-O)+'"></iframe>');d.showDialog(X.container,450,240,!0,!0);X.init()})},!0)}));d.actions.put("embedNotion",new Action(mxResources.get("notion")+"...",function(){var q=document.createElement("div");q.style.position="absolute";q.style.bottom="30px";q.style.textAlign="center";q.style.width="100%";q.style.left="0px";var D=document.createElement("a");D.setAttribute("href","javascript:void(0);");D.setAttribute("target","_blank");D.style.cursor="pointer";mxUtils.write(D,mxResources.get("getNotionChromeExtension"));
-q.appendChild(D);mxEvent.addListener(D,"click",function(A){d.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");mxEvent.consume(A)});d.showPublishLinkDialog(mxResources.get("notion"),null,null,null,function(A,C,G,M,H,F,I,R,X){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(O){d.spinner.stop();var W=["border=0"];X&&W.push("tags=%7B%7D");O=new EmbedDialog(d,d.createLink(A,C,G,M,H,F,O,null,W,!0));
-d.showDialog(O.container,450,240,!0,!0);O.init()})},!0,"https://www.diagrams.net/blog/drawio-notion",q)}));d.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){d.showPublishLinkDialog(null,null,null,null,function(q,D,A,C,G,M,H,F,I){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(R){d.spinner.stop();var X=[];I&&X.push("tags=%7B%7D");R=new EmbedDialog(d,d.createLink(q,D,A,C,G,M,R,null,X));d.showDialog(R.container,450,240,
-!0,!0);R.init()})})}));d.actions.addAction("microsoftOffice...",function(){d.openLink("https://office.draw.io")});d.actions.addAction("googleDocs...",function(){d.openLink("http://docsaddon.draw.io")});d.actions.addAction("googleSlides...",function(){d.openLink("https://slidesaddon.draw.io")});d.actions.addAction("googleSheets...",function(){d.openLink("https://sheetsaddon.draw.io")});d.actions.addAction("googleSites...",function(){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),
+450,240,!0,!0),D.init()):d.handleError({message:mxResources.get("invalidPublicUrl")})})}));d.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){d.showEmbedImageDialog(function(q,D,z,C,G,H){d.spinner.spin(document.body,mxResources.get("loading"))&&d.createEmbedImage(q,D,z,C,G,H,function(M){d.spinner.stop();M=new EmbedDialog(d,M);d.showDialog(M.container,450,240,!0,!0);M.init()},function(M){d.spinner.stop();d.handleError(M)})},mxResources.get("image"),mxResources.get("retina"),
+d.isExportToCanvas())}));d.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){d.showEmbedImageDialog(function(q,D,z,C,G,H){d.spinner.spin(document.body,mxResources.get("loading"))&&d.createEmbedSvg(q,D,z,C,G,H,function(M){d.spinner.stop();M=new EmbedDialog(d,M);d.showDialog(M.container,450,240,!0,!0);M.init()},function(M){d.spinner.stop();d.handleError(M)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.diagrams.net/doc/faq/embed-svg.html")}));
+d.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var q=t.getGraphBounds();d.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil(q.height/t.view.scale)+2,function(D,z,C,G,H,M,F,J,Q){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(X){d.spinner.stop();var P=[];Q&&P.push("tags=%7B%7D");X=new EmbedDialog(d,'<iframe frameborder="0" style="width:'+F+";height:"+J+';" src="'+d.createLink(D,z,C,G,H,M,X,null,
+P)+'"></iframe>');d.showDialog(X.container,450,240,!0,!0);X.init()})},!0)}));d.actions.put("embedNotion",new Action(mxResources.get("notion")+"...",function(){var q=document.createElement("div");q.style.position="absolute";q.style.bottom="30px";q.style.textAlign="center";q.style.width="100%";q.style.left="0px";var D=document.createElement("a");D.setAttribute("href","javascript:void(0);");D.setAttribute("target","_blank");D.style.cursor="pointer";mxUtils.write(D,mxResources.get("getNotionChromeExtension"));
+q.appendChild(D);mxEvent.addListener(D,"click",function(z){d.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");mxEvent.consume(z)});d.showPublishLinkDialog(mxResources.get("notion"),null,null,null,function(z,C,G,H,M,F,J,Q,X){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(P){d.spinner.stop();var V=["border=0"];X&&V.push("tags=%7B%7D");P=new EmbedDialog(d,d.createLink(z,C,G,H,M,F,P,null,V,!0));
+d.showDialog(P.container,450,240,!0,!0);P.init()})},!0,"https://www.diagrams.net/blog/drawio-notion",q)}));d.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){d.showPublishLinkDialog(null,null,null,null,function(q,D,z,C,G,H,M,F,J){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(Q){d.spinner.stop();var X=[];J&&X.push("tags=%7B%7D");Q=new EmbedDialog(d,d.createLink(q,D,z,C,G,H,Q,null,X));d.showDialog(Q.container,450,240,
+!0,!0);Q.init()})})}));d.actions.addAction("microsoftOffice...",function(){d.openLink("https://office.draw.io")});d.actions.addAction("googleDocs...",function(){d.openLink("http://docsaddon.draw.io")});d.actions.addAction("googleSlides...",function(){d.openLink("https://slidesaddon.draw.io")});d.actions.addAction("googleSheets...",function(){d.openLink("https://sheetsaddon.draw.io")});d.actions.addAction("googleSites...",function(){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),
function(q){d.spinner.stop();q=new GoogleSitesDialog(d,q);d.showDialog(q.container,420,256,!0,!0);q.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)k=d.actions.addAction("scratchpad",function(){d.toggleScratchpad()}),k.setToggleAction(!0),k.setSelectedCallback(function(){return null!=d.scratchpad}),"0"!=urlParams.plugins&&d.actions.addAction("plugins...",function(){d.showDialog((new PluginsDialog(d)).container,380,240,!0,!1)});k=d.actions.addAction("search",function(){var q=d.sidebar.isEntryVisible("search");
-d.sidebar.showPalette("search",!q);isLocalStorage&&(mxSettings.settings.search=!q,mxSettings.save())});k.label=mxResources.get("searchShapes");k.setToggleAction(!0);k.setSelectedCallback(function(){return d.sidebar.isEntryVisible("search")});"1"==urlParams.embed&&(d.actions.get("save").funct=function(q){t.isEditing()&&t.stopEditing();var D="0"!=urlParams.pages||null!=d.pages&&1<d.pages.length?d.getFileData(!0):mxUtils.getXml(d.editor.getGraphXml());if("json"==urlParams.proto){var A=d.createLoadMessage("save");
-A.xml=D;q&&(A.exit=!0);D=JSON.stringify(A)}(window.opener||window.parent).postMessage(D,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(d.editor.modified=!1,d.editor.setStatus(""));q=d.getCurrentFile();null==q||q.constructor==EmbedFile||q.constructor==LocalFile&&null==q.mode||d.saveFile()},d.actions.addAction("saveAndExit",function(){"1"==urlParams.toSvg?d.sendEmbeddedSvgExport():d.actions.get("save").funct(!0)}).label="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),
+d.sidebar.showPalette("search",!q);isLocalStorage&&(mxSettings.settings.search=!q,mxSettings.save())});k.label=mxResources.get("searchShapes");k.setToggleAction(!0);k.setSelectedCallback(function(){return d.sidebar.isEntryVisible("search")});"1"==urlParams.embed&&(d.actions.get("save").funct=function(q){t.isEditing()&&t.stopEditing();var D="0"!=urlParams.pages||null!=d.pages&&1<d.pages.length?d.getFileData(!0):mxUtils.getXml(d.editor.getGraphXml());if("json"==urlParams.proto){var z=d.createLoadMessage("save");
+z.xml=D;q&&(z.exit=!0);D=JSON.stringify(z)}(window.opener||window.parent).postMessage(D,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(d.editor.modified=!1,d.editor.setStatus(""));q=d.getCurrentFile();null==q||q.constructor==EmbedFile||q.constructor==LocalFile&&null==q.mode||d.saveFile()},d.actions.addAction("saveAndExit",function(){"1"==urlParams.toSvg?d.sendEmbeddedSvgExport():d.actions.get("save").funct(!0)}).label="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),
d.actions.addAction("exit",function(){if("1"==urlParams.embedInline)d.sendEmbeddedSvgExport();else{var q=function(){d.editor.modified=!1;var D="json"==urlParams.proto?JSON.stringify({event:"exit",modified:d.editor.modified}):"";(window.opener||window.parent).postMessage(D,"*")};d.editor.modified?d.confirm(mxResources.get("allChangesLost"),null,q,mxResources.get("cancel"),mxResources.get("discardChanges")):q()}}));this.put("exportAs",new Menu(mxUtils.bind(this,function(q,D){d.isExportToCanvas()?(this.addMenuItems(q,
["exportPng"],D),d.jpgSupported&&this.addMenuItems(q,["exportJpg"],D)):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(q,["exportPng","exportJpg"],D);this.addMenuItems(q,["exportSvg","-"],D);d.isOffline()||d.printPdfExport?this.addMenuItems(q,["exportPdf"],D):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(q,["exportPdf"],D);mxClient.IS_IE||"undefined"===typeof VsdxExport&&d.isOffline()||this.addMenuItems(q,["exportVsdx"],D);this.addMenuItems(q,["-",
-"exportHtml","exportXml","exportUrl"],D);d.isOffline()||(q.addSeparator(D),this.addMenuItem(q,"export",D).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.put("importFrom",new Menu(mxUtils.bind(this,function(q,D){function A(M){M.pickFile(function(H){d.spinner.spin(document.body,mxResources.get("loading"))&&M.getFile(H,function(F){var I="data:image/"==F.getData().substring(0,11)?G(F.getTitle()):"text/xml";/\.svg$/i.test(F.getTitle())&&!d.editor.isDataSvg(F.getData())&&(F.setData(Editor.createSvgDataUri(F.getData())),
-I="image/svg+xml");C(F.getData(),I,F.getTitle())},function(F){d.handleError(F,null!=F?mxResources.get("errorLoadingFile"):null)},M==d.drive)},!0)}var C=mxUtils.bind(this,function(M,H,F){var I=t.view,R=t.getGraphBounds(),X=t.snap(Math.ceil(Math.max(0,R.x/I.scale-I.translate.x)+4*t.gridSize)),O=t.snap(Math.ceil(Math.max(0,(R.y+R.height)/I.scale-I.translate.y)+4*t.gridSize));"data:image/"==M.substring(0,11)?d.loadImage(M,mxUtils.bind(this,function(W){var U=!0,n=mxUtils.bind(this,function(){d.resizeImage(W,
-M,mxUtils.bind(this,function(B,K,Q){B=U?Math.min(1,Math.min(d.maxImageSize/K,d.maxImageSize/Q)):1;d.importFile(M,H,X,O,Math.round(K*B),Math.round(Q*B),F,function(P){d.spinner.stop();t.setSelectionCells(P);t.scrollCellToVisible(t.getSelectionCell())})}),U)});M.length>d.resampleThreshold?d.confirmImageResize(function(B){U=B;n()}):n()}),mxUtils.bind(this,function(){d.handleError({message:mxResources.get("cannotOpenFile")})})):d.importFile(M,H,X,O,0,0,F,function(W){d.spinner.stop();t.setSelectionCells(W);
-t.scrollCellToVisible(t.getSelectionCell())})}),G=mxUtils.bind(this,function(M){var H="text/xml";/\.png$/i.test(M)?H="image/png":/\.jpe?g$/i.test(M)?H="image/jpg":/\.gif$/i.test(M)?H="image/gif":/\.pdf$/i.test(M)&&(H="application/pdf");return H});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?q.addItem(mxResources.get("googleDrive")+"...",null,function(){A(d.drive)},D):E&&"function"===typeof window.DriveClient&&q.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+
-"...)",null,function(){},D,null,!1));null!=d.oneDrive?q.addItem(mxResources.get("oneDrive")+"...",null,function(){A(d.oneDrive)},D):e&&"function"===typeof window.OneDriveClient&&q.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1);null!=d.dropbox?q.addItem(mxResources.get("dropbox")+"...",null,function(){A(d.dropbox)},D):c&&"function"===typeof window.DropboxClient&&q.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,
-function(){},D,null,!1);q.addSeparator(D);null!=d.gitHub&&q.addItem(mxResources.get("github")+"...",null,function(){A(d.gitHub)},D);null!=d.gitLab&&q.addItem(mxResources.get("gitlab")+"...",null,function(){A(d.gitLab)},D);null!=d.trello?q.addItem(mxResources.get("trello")+"...",null,function(){A(d.trello)},D):g&&"function"===typeof window.TrelloClient&&q.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1);q.addSeparator(D);isLocalStorage&&"0"!=urlParams.browser&&
-q.addItem(mxResources.get("browser")+"...",null,function(){d.importLocalFile(!1)},D);"1"!=urlParams.noDevice&&q.addItem(mxResources.get("device")+"...",null,function(){d.importLocalFile(!0)},D);d.isOffline()||(q.addSeparator(D),q.addItem(mxResources.get("url")+"...",null,function(){var M=new FilenameDialog(d,"",mxResources.get("import"),function(H){if(null!=H&&0<H.length&&d.spinner.spin(document.body,mxResources.get("loading"))){var F=/(\.png)($|\?)/i.test(H)?"image/png":"text/xml";d.editor.loadUrl(PROXY_URL+
-"?url="+encodeURIComponent(H),function(I){C(I,F,H)},function(){d.spinner.stop();d.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==F)}},mxResources.get("url"));d.showDialog(M.container,300,80,!0,!0);M.init()},D))}))).isEnabled=u;this.put("theme",new Menu(mxUtils.bind(this,function(q,D){var A="1"==urlParams.sketch?"sketch":mxSettings.getUi(),C=q.addItem(mxResources.get("automatic"),null,function(){mxSettings.setUi("");d.alert(mxResources.get("restartForChangeRequired"))},D);"kennedy"!=
-A&&"atlas"!=A&&"dark"!=A&&"min"!=A&&"sketch"!=A&&q.addCheckmark(C,Editor.checkmarkImage);q.addSeparator(D);C=q.addItem(mxResources.get("default"),null,function(){mxSettings.setUi("kennedy");d.alert(mxResources.get("restartForChangeRequired"))},D);"kennedy"==A&&q.addCheckmark(C,Editor.checkmarkImage);C=q.addItem(mxResources.get("minimal"),null,function(){mxSettings.setUi("min");d.alert(mxResources.get("restartForChangeRequired"))},D);"min"==A&&q.addCheckmark(C,Editor.checkmarkImage);C=q.addItem(mxResources.get("atlas"),
-null,function(){mxSettings.setUi("atlas");d.alert(mxResources.get("restartForChangeRequired"))},D);"atlas"==A&&q.addCheckmark(C,Editor.checkmarkImage);if("dark"==A||!mxClient.IS_IE&&!mxClient.IS_IE11)C=q.addItem(mxResources.get("dark"),null,function(){mxSettings.setUi("dark");d.alert(mxResources.get("restartForChangeRequired"))},D),"dark"==A&&q.addCheckmark(C,Editor.checkmarkImage);q.addSeparator(D);C=q.addItem(mxResources.get("sketch"),null,function(){mxSettings.setUi("sketch");d.alert(mxResources.get("restartForChangeRequired"))},
-D);"sketch"==A&&q.addCheckmark(C,Editor.checkmarkImage)})));k=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var q=this.editorUi.getCurrentFile();if(null!=q)if(q.constructor==LocalFile&&null!=q.fileHandle)d.showSaveFilePicker(mxUtils.bind(d,function(A,C){q.invalidFileHandle=null;q.fileHandle=A;q.title=C.name;q.desc=C;d.save(C.name)}),null,d.createFileSystemOptions(q.getTitle()));else{var D=null!=q.getTitle()?q.getTitle():this.editorUi.defaultFilename;D=new FilenameDialog(this.editorUi,
-D,mxResources.get("rename"),mxUtils.bind(this,function(A){null!=A&&0<A.length&&null!=q&&A!=q.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&q.rename(A,mxUtils.bind(this,function(C){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(C){this.editorUi.handleError(C,null!=C?mxResources.get("errorRenamingFile"):null)}))}),q.constructor==DriveFile||q.constructor==StorageFile?mxResources.get("diagramName"):null,function(A){if(null!=A&&0<A.length)return!0;d.showError(mxResources.get("error"),
-mxResources.get("invalidName"),mxResources.get("ok"));return!1},null,null,null,null,d.editor.fileExtensions);this.editorUi.showDialog(D.container,340,96,!0,!0);D.init()}}));k.isEnabled=function(){return this.enabled&&u.apply(this,arguments)};k.visible="1"!=urlParams.embed;d.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var q=d.getCurrentFile();if(null!=q){var D=d.getCopyFilename(q);q.constructor==DriveFile?(D=new CreateDialog(d,D,mxUtils.bind(this,function(A,C){"_blank"==C?d.editor.editAsNew(d.getFileData(),
-A):("download"==C&&(C=App.MODE_GOOGLE),null!=A&&0<A.length&&(C==App.MODE_GOOGLE?d.spinner.spin(document.body,mxResources.get("saving"))&&q.saveAs(A,mxUtils.bind(this,function(G){q.desc=G;q.save(!1,mxUtils.bind(this,function(){d.spinner.stop();q.setModified(!1);q.addAllSavedStatus()}),mxUtils.bind(this,function(M){d.handleError(M)}))}),mxUtils.bind(this,function(G){d.handleError(G)})):d.createFile(A,d.getFileData(!0),null,C)))}),mxUtils.bind(this,function(){d.hideDialog()}),mxResources.get("makeCopy"),
-mxResources.get("create"),null,null,!0,null,!0,null,null,null,null,d.editor.fileExtensions),d.showDialog(D.container,420,380,!0,!0),D.init()):d.editor.editAsNew(this.editorUi.getFileData(!0),D)}}));d.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var q=d.getCurrentFile();if(q.getMode()==App.MODE_GOOGLE||q.getMode()==App.MODE_ONEDRIVE){var D=!1;if(q.getMode()==App.MODE_GOOGLE&&null!=q.desc.parents)for(var A=0;A<q.desc.parents.length;A++)if(q.desc.parents[A].isRoot){D=!0;break}d.pickFolder(q.getMode(),
-mxUtils.bind(this,function(C){d.spinner.spin(document.body,mxResources.get("moving"))&&q.move(C,mxUtils.bind(this,function(G){d.spinner.stop()}),mxUtils.bind(this,function(G){d.handleError(G)}))}),null,!0,D)}}));this.put("publish",new Menu(mxUtils.bind(this,function(q,D){this.addMenuItems(q,["publishLink"],D)})));d.actions.put("useOffline",new Action(mxResources.get("useOffline")+"...",function(){d.openLink("https://app.draw.io/")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){try{var q=
-d.getCurrentFile();null!=q&&q.share()}catch(D){d.handleError(D)}}));this.put("embed",new Menu(mxUtils.bind(this,function(q,D){var A=d.getCurrentFile();null==A||A.getMode()!=App.MODE_GOOGLE&&A.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(A.getTitle())||this.addMenuItems(q,["liveImage","-"],D);this.addMenuItems(q,["embedImage","embedSvg","-","embedHtml"],D);navigator.standalone||d.isOffline()||this.addMenuItems(q,["embedIframe"],D);"1"==urlParams.embed||d.isOffline()||this.addMenuItems(q,"- googleDocs googleSlides googleSheets - microsoftOffice - embedNotion".split(" "),
-D)})));d.addInsertItem=function(q,D,A,C){("plantUml"!=C||EditorUi.enablePlantUml&&!d.isOffline())&&q.addItem(A,null,mxUtils.bind(this,function(){if("fromText"==C||"formatSql"==C||"plantUml"==C||"mermaid"==C){var G=new ParseDialog(d,A,C);d.showDialog(G.container,620,420,!0,!1);d.dialog.container.style.overflow="auto"}else G=new CreateGraphDialog(d,A,C),d.showDialog(G.container,620,420,!0,!1);G.init()}),D,null,u())};var y=function(q,D,A,C){var G=new mxCell(q,new mxGeometry(0,0,D,A),C);G.vertex=!0;q=
-t.getCenterInsertPoint(t.getBoundingBoxFromGeometry([G],!0));G.geometry.x=q.x;G.geometry.y=q.y;t.getModel().beginUpdate();try{G=t.addCell(G),t.fireEvent(new mxEventObject("cellsInserted","cells",[G]))}finally{t.getModel().endUpdate()}t.scrollCellToVisible(G);t.setSelectionCell(G);t.container.focus();t.editAfterInsert&&t.startEditing(G);window.setTimeout(function(){null!=d.hoverIcons&&d.hoverIcons.update(t.view.getState(G))},0);return G};d.actions.put("insertText",new Action(mxResources.get("text"),
-function(){t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&t.startEditingAtCell(y("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;"))}),null,null,Editor.ctrlKey+"+Shift+X").isEnabled=u;d.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(){t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&y("",120,60,"whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+K").isEnabled=u;d.actions.put("insertEllipse",
-new Action(mxResources.get("ellipse"),function(){t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&y("",80,80,"ellipse;whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+Shift+K").isEnabled=u;d.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(){t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&y("",80,80,"rhombus;whiteSpace=wrap;html=1;")})).isEnabled=u;d.addInsertMenuItems=mxUtils.bind(this,function(q,D,A){for(var C=0;C<A.length;C++)"-"==A[C]?q.addSeparator(D):
-d.addInsertItem(q,D,mxResources.get(A[C])+"...",A[C])});this.put("insert",new Menu(mxUtils.bind(this,function(q,D){this.addMenuItems(q,"insertRectangle insertEllipse insertRhombus - insertText insertLink - createShape insertFreehand - insertImage".split(" "),D);d.insertTemplateEnabled&&!d.isOffline()&&this.addMenuItems(q,["insertTemplate"],D);q.addSeparator(D);this.addSubmenu("insertLayout",q,D,mxResources.get("layout"));this.addSubmenu("insertAdvanced",q,D,mxResources.get("advanced"))})));this.put("insertLayout",
-new Menu(mxUtils.bind(this,function(q,D){d.addInsertMenuItems(q,D,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(q,D){d.addInsertMenuItems(q,D,["fromText","plantUml","mermaid","-","formatSql"]);q.addItem(mxResources.get("csv")+"...",null,function(){d.showImportCsvDialog()},D,null,u())})));this.put("openRecent",new Menu(function(q,D){var A=d.getRecent();if(null!=A){for(var C=0;C<A.length;C++)(function(G){var M=
-G.mode;M==App.MODE_GOOGLE?M="googleDrive":M==App.MODE_ONEDRIVE&&(M="oneDrive");q.addItem(G.title+" ("+mxResources.get(M)+")",null,function(){d.loadFile(G.id)},D)})(A[C]);q.addSeparator(D)}q.addItem(mxResources.get("reset"),null,function(){d.resetRecent()},D)}));this.put("openFrom",new Menu(function(q,D){null!=d.drive?q.addItem(mxResources.get("googleDrive")+"...",null,function(){d.pickFile(App.MODE_GOOGLE)},D):E&&"function"===typeof window.DriveClient&&q.addItem(mxResources.get("googleDrive")+" ("+
-mxResources.get("loading")+"...)",null,function(){},D,null,!1);null!=d.oneDrive?q.addItem(mxResources.get("oneDrive")+"...",null,function(){d.pickFile(App.MODE_ONEDRIVE)},D):e&&"function"===typeof window.OneDriveClient&&q.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1);null!=d.dropbox?q.addItem(mxResources.get("dropbox")+"...",null,function(){d.pickFile(App.MODE_DROPBOX)},D):c&&"function"===typeof window.DropboxClient&&q.addItem(mxResources.get("dropbox")+
-" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1);q.addSeparator(D);null!=d.gitHub&&q.addItem(mxResources.get("github")+"...",null,function(){d.pickFile(App.MODE_GITHUB)},D);null!=d.gitLab&&q.addItem(mxResources.get("gitlab")+"...",null,function(){d.pickFile(App.MODE_GITLAB)},D);null!=d.trello?q.addItem(mxResources.get("trello")+"...",null,function(){d.pickFile(App.MODE_TRELLO)},D):g&&"function"===typeof window.TrelloClient&&q.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+
-"...)",null,function(){},D,null,!1);q.addSeparator(D);isLocalStorage&&"0"!=urlParams.browser&&q.addItem(mxResources.get("browser")+"...",null,function(){d.pickFile(App.MODE_BROWSER)},D);"1"!=urlParams.noDevice&&q.addItem(mxResources.get("device")+"...",null,function(){d.pickFile(App.MODE_DEVICE)},D);d.isOffline()||(q.addSeparator(D),q.addItem(mxResources.get("url")+"...",null,function(){var A=new FilenameDialog(d,"",mxResources.get("open"),function(C){null!=C&&0<C.length&&(null==d.getCurrentFile()?
-window.location.hash="#U"+encodeURIComponent(C):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(C)))},mxResources.get("url"));d.showDialog(A.container,300,80,!0,!0);A.init()},D))}));Editor.enableCustomLibraries&&(this.put("newLibrary",new Menu(function(q,D){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?q.addItem(mxResources.get("googleDrive")+"...",null,function(){d.showLibraryDialog(null,
-null,null,null,App.MODE_GOOGLE)},D):E&&"function"===typeof window.DriveClient&&q.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1));null!=d.oneDrive?q.addItem(mxResources.get("oneDrive")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},D):e&&"function"===typeof window.OneDriveClient&&q.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1);null!=d.dropbox?q.addItem(mxResources.get("dropbox")+
-"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},D):c&&"function"===typeof window.DropboxClient&&q.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1);q.addSeparator(D);null!=d.gitHub&&q.addItem(mxResources.get("github")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},D);null!=d.gitLab&&q.addItem(mxResources.get("gitlab")+"...",null,function(){d.showLibraryDialog(null,null,null,null,
-App.MODE_GITLAB)},D);null!=d.trello?q.addItem(mxResources.get("trello")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},D):g&&"function"===typeof window.TrelloClient&&q.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1);q.addSeparator(D);isLocalStorage&&"0"!=urlParams.browser&&q.addItem(mxResources.get("browser")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},D);"1"!=urlParams.noDevice&&
-q.addItem(mxResources.get("device")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},D)})),this.put("openLibraryFrom",new Menu(function(q,D){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?q.addItem(mxResources.get("googleDrive")+"...",null,function(){d.pickLibrary(App.MODE_GOOGLE)},D):E&&"function"===typeof window.DriveClient&&q.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1));
-null!=d.oneDrive?q.addItem(mxResources.get("oneDrive")+"...",null,function(){d.pickLibrary(App.MODE_ONEDRIVE)},D):e&&"function"===typeof window.OneDriveClient&&q.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1);null!=d.dropbox?q.addItem(mxResources.get("dropbox")+"...",null,function(){d.pickLibrary(App.MODE_DROPBOX)},D):c&&"function"===typeof window.DropboxClient&&q.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,
-function(){},D,null,!1);q.addSeparator(D);null!=d.gitHub&&q.addItem(mxResources.get("github")+"...",null,function(){d.pickLibrary(App.MODE_GITHUB)},D);null!=d.gitLab&&q.addItem(mxResources.get("gitlab")+"...",null,function(){d.pickLibrary(App.MODE_GITLAB)},D);null!=d.trello?q.addItem(mxResources.get("trello")+"...",null,function(){d.pickLibrary(App.MODE_TRELLO)},D):g&&"function"===typeof window.TrelloClient&&q.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},
-D,null,!1);q.addSeparator(D);isLocalStorage&&"0"!=urlParams.browser&&q.addItem(mxResources.get("browser")+"...",null,function(){d.pickLibrary(App.MODE_BROWSER)},D);"1"!=urlParams.noDevice&&q.addItem(mxResources.get("device")+"...",null,function(){d.pickLibrary(App.MODE_DEVICE)},D);d.isOffline()||(q.addSeparator(D),q.addItem(mxResources.get("url")+"...",null,function(){var A=new FilenameDialog(d,"",mxResources.get("open"),function(C){if(null!=C&&0<C.length&&d.spinner.spin(document.body,mxResources.get("loading"))){var G=
-C;d.editor.isCorsEnabledForUrl(C)||(G=PROXY_URL+"?url="+encodeURIComponent(C));mxUtils.get(G,function(M){if(200<=M.getStatus()&&299>=M.getStatus()){d.spinner.stop();try{d.loadLibrary(new UrlLibrary(this,M.getText(),C))}catch(H){d.handleError(H,mxResources.get("errorLoadingFile"))}}else d.spinner.stop(),d.handleError(null,mxResources.get("errorLoadingFile"))},function(){d.spinner.stop();d.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));d.showDialog(A.container,300,
-80,!0,!0);A.init()},D));"1"==urlParams.confLib&&(q.addSeparator(D),q.addItem(mxResources.get("confluenceCloud")+"...",null,function(){d.showRemotelyStoredLibrary(mxResources.get("libraries"))},D))})));this.put("edit",new Menu(mxUtils.bind(this,function(q,D){this.addMenuItems(q,"undo redo - cut copy copyAsImage paste delete - duplicate - findReplace - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));
+"exportHtml","exportXml","exportUrl"],D);d.isOffline()||(q.addSeparator(D),this.addMenuItem(q,"export",D).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.put("importFrom",new Menu(mxUtils.bind(this,function(q,D){function z(H){H.pickFile(function(M){d.spinner.spin(document.body,mxResources.get("loading"))&&H.getFile(M,function(F){var J="data:image/"==F.getData().substring(0,11)?G(F.getTitle()):"text/xml";/\.svg$/i.test(F.getTitle())&&!d.editor.isDataSvg(F.getData())&&(F.setData(Editor.createSvgDataUri(F.getData())),
+J="image/svg+xml");C(F.getData(),J,F.getTitle())},function(F){d.handleError(F,null!=F?mxResources.get("errorLoadingFile"):null)},H==d.drive)},!0)}var C=mxUtils.bind(this,function(H,M,F){var J=t.view,Q=t.getGraphBounds(),X=t.snap(Math.ceil(Math.max(0,Q.x/J.scale-J.translate.x)+4*t.gridSize)),P=t.snap(Math.ceil(Math.max(0,(Q.y+Q.height)/J.scale-J.translate.y)+4*t.gridSize));"data:image/"==H.substring(0,11)?d.loadImage(H,mxUtils.bind(this,function(V){var W=!0,n=mxUtils.bind(this,function(){d.resizeImage(V,
+H,mxUtils.bind(this,function(B,K,R){B=W?Math.min(1,Math.min(d.maxImageSize/K,d.maxImageSize/R)):1;d.importFile(H,M,X,P,Math.round(K*B),Math.round(R*B),F,function(O){d.spinner.stop();t.setSelectionCells(O);t.scrollCellToVisible(t.getSelectionCell())})}),W)});H.length>d.resampleThreshold?d.confirmImageResize(function(B){W=B;n()}):n()}),mxUtils.bind(this,function(){d.handleError({message:mxResources.get("cannotOpenFile")})})):d.importFile(H,M,X,P,0,0,F,function(V){d.spinner.stop();t.setSelectionCells(V);
+t.scrollCellToVisible(t.getSelectionCell())})}),G=mxUtils.bind(this,function(H){var M="text/xml";/\.png$/i.test(H)?M="image/png":/\.jpe?g$/i.test(H)?M="image/jpg":/\.gif$/i.test(H)?M="image/gif":/\.pdf$/i.test(H)&&(M="application/pdf");return M});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?q.addItem(mxResources.get("googleDrive")+"...",null,function(){z(d.drive)},D):E&&"function"===typeof window.DriveClient&&q.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+
+"...)",null,function(){},D,null,!1));null!=d.oneDrive?q.addItem(mxResources.get("oneDrive")+"...",null,function(){z(d.oneDrive)},D):e&&"function"===typeof window.OneDriveClient&&q.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1);null!=d.dropbox?q.addItem(mxResources.get("dropbox")+"...",null,function(){z(d.dropbox)},D):c&&"function"===typeof window.DropboxClient&&q.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,
+function(){},D,null,!1);q.addSeparator(D);null!=d.gitHub&&q.addItem(mxResources.get("github")+"...",null,function(){z(d.gitHub)},D);null!=d.gitLab&&q.addItem(mxResources.get("gitlab")+"...",null,function(){z(d.gitLab)},D);null!=d.trello?q.addItem(mxResources.get("trello")+"...",null,function(){z(d.trello)},D):g&&"function"===typeof window.TrelloClient&&q.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1);q.addSeparator(D);isLocalStorage&&"0"!=urlParams.browser&&
+q.addItem(mxResources.get("browser")+"...",null,function(){d.importLocalFile(!1)},D);"1"!=urlParams.noDevice&&q.addItem(mxResources.get("device")+"...",null,function(){d.importLocalFile(!0)},D);d.isOffline()||(q.addSeparator(D),q.addItem(mxResources.get("url")+"...",null,function(){var H=new FilenameDialog(d,"",mxResources.get("import"),function(M){if(null!=M&&0<M.length&&d.spinner.spin(document.body,mxResources.get("loading"))){var F=/(\.png)($|\?)/i.test(M)?"image/png":"text/xml";d.editor.loadUrl(PROXY_URL+
+"?url="+encodeURIComponent(M),function(J){C(J,F,M)},function(){d.spinner.stop();d.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==F)}},mxResources.get("url"));d.showDialog(H.container,300,80,!0,!0);H.init()},D))}))).isEnabled=u;this.put("theme",new Menu(mxUtils.bind(this,function(q,D){var z="1"==urlParams.sketch?"sketch":mxSettings.getUi(),C=q.addItem(mxResources.get("automatic"),null,function(){mxSettings.setUi("");d.alert(mxResources.get("restartForChangeRequired"))},D);"kennedy"!=
+z&&"atlas"!=z&&"dark"!=z&&"min"!=z&&"sketch"!=z&&q.addCheckmark(C,Editor.checkmarkImage);q.addSeparator(D);C=q.addItem(mxResources.get("default"),null,function(){mxSettings.setUi("kennedy");d.alert(mxResources.get("restartForChangeRequired"))},D);"kennedy"==z&&q.addCheckmark(C,Editor.checkmarkImage);C=q.addItem(mxResources.get("minimal"),null,function(){mxSettings.setUi("min");d.alert(mxResources.get("restartForChangeRequired"))},D);"min"==z&&q.addCheckmark(C,Editor.checkmarkImage);C=q.addItem(mxResources.get("atlas"),
+null,function(){mxSettings.setUi("atlas");d.alert(mxResources.get("restartForChangeRequired"))},D);"atlas"==z&&q.addCheckmark(C,Editor.checkmarkImage);if("dark"==z||!mxClient.IS_IE&&!mxClient.IS_IE11)C=q.addItem(mxResources.get("dark"),null,function(){mxSettings.setUi("dark");d.alert(mxResources.get("restartForChangeRequired"))},D),"dark"==z&&q.addCheckmark(C,Editor.checkmarkImage);q.addSeparator(D);C=q.addItem(mxResources.get("sketch"),null,function(){mxSettings.setUi("sketch");d.alert(mxResources.get("restartForChangeRequired"))},
+D);"sketch"==z&&q.addCheckmark(C,Editor.checkmarkImage)})));k=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var q=this.editorUi.getCurrentFile();if(null!=q)if(q.constructor==LocalFile&&null!=q.fileHandle)d.showSaveFilePicker(mxUtils.bind(d,function(z,C){q.invalidFileHandle=null;q.fileHandle=z;q.title=C.name;q.desc=C;d.save(C.name)}),null,d.createFileSystemOptions(q.getTitle()));else{var D=null!=q.getTitle()?q.getTitle():this.editorUi.defaultFilename;D=new FilenameDialog(this.editorUi,
+D,mxResources.get("rename"),mxUtils.bind(this,function(z){null!=z&&0<z.length&&null!=q&&z!=q.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&q.rename(z,mxUtils.bind(this,function(C){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(C){this.editorUi.handleError(C,null!=C?mxResources.get("errorRenamingFile"):null)}))}),q.constructor==DriveFile||q.constructor==StorageFile?mxResources.get("diagramName"):null,function(z){if(null!=z&&0<z.length)return!0;d.showError(mxResources.get("error"),
+mxResources.get("invalidName"),mxResources.get("ok"));return!1},null,null,null,null,d.editor.fileExtensions);this.editorUi.showDialog(D.container,340,96,!0,!0);D.init()}}));k.isEnabled=function(){return this.enabled&&u.apply(this,arguments)};k.visible="1"!=urlParams.embed;d.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var q=d.getCurrentFile();if(null!=q){var D=d.getCopyFilename(q);q.constructor==DriveFile?(D=new CreateDialog(d,D,mxUtils.bind(this,function(z,C){"_blank"==C?d.editor.editAsNew(d.getFileData(),
+z):("download"==C&&(C=App.MODE_GOOGLE),null!=z&&0<z.length&&(C==App.MODE_GOOGLE?d.spinner.spin(document.body,mxResources.get("saving"))&&q.saveAs(z,mxUtils.bind(this,function(G){q.desc=G;q.save(!1,mxUtils.bind(this,function(){d.spinner.stop();q.setModified(!1);q.addAllSavedStatus()}),mxUtils.bind(this,function(H){d.handleError(H)}))}),mxUtils.bind(this,function(G){d.handleError(G)})):d.createFile(z,d.getFileData(!0),null,C)))}),mxUtils.bind(this,function(){d.hideDialog()}),mxResources.get("makeCopy"),
+mxResources.get("create"),null,null,!0,null,!0,null,null,null,null,d.editor.fileExtensions),d.showDialog(D.container,420,380,!0,!0),D.init()):d.editor.editAsNew(this.editorUi.getFileData(!0),D)}}));d.actions.put("openFolder",new Action(mxResources.get("openIt",[mxResources.get("folder")])+"...",function(q,D){d.appIconClicked(D)}));d.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var q=d.getCurrentFile();if(q.getMode()==App.MODE_GOOGLE||q.getMode()==App.MODE_ONEDRIVE){var D=!1;if(q.getMode()==
+App.MODE_GOOGLE&&null!=q.desc.parents)for(var z=0;z<q.desc.parents.length;z++)if(q.desc.parents[z].isRoot){D=!0;break}d.pickFolder(q.getMode(),mxUtils.bind(this,function(C){d.spinner.spin(document.body,mxResources.get("moving"))&&q.move(C,mxUtils.bind(this,function(G){d.spinner.stop()}),mxUtils.bind(this,function(G){d.handleError(G)}))}),null,!0,D)}}));this.put("publish",new Menu(mxUtils.bind(this,function(q,D){this.addMenuItems(q,["publishLink"],D)})));d.actions.put("useOffline",new Action(mxResources.get("useOffline")+
+"...",function(){d.openLink("https://app.draw.io/")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){try{var q=d.getCurrentFile();null!=q&&q.share()}catch(D){d.handleError(D)}}));this.put("embed",new Menu(mxUtils.bind(this,function(q,D){var z=d.getCurrentFile();null==z||z.getMode()!=App.MODE_GOOGLE&&z.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(z.getTitle())||this.addMenuItems(q,["liveImage","-"],D);this.addMenuItems(q,["embedImage","embedSvg","-","embedHtml"],D);navigator.standalone||
+d.isOffline()||this.addMenuItems(q,["embedIframe"],D);"1"==urlParams.embed||d.isOffline()||this.addMenuItems(q,"- googleDocs googleSlides googleSheets - microsoftOffice - embedNotion".split(" "),D)})));d.addInsertItem=function(q,D,z,C){("plantUml"!=C||EditorUi.enablePlantUml&&!d.isOffline())&&q.addItem(z,null,mxUtils.bind(this,function(){if("fromText"==C||"formatSql"==C||"plantUml"==C||"mermaid"==C){var G=new ParseDialog(d,z,C);d.showDialog(G.container,620,420,!0,!1);d.dialog.container.style.overflow=
+"auto"}else G=new CreateGraphDialog(d,z,C),d.showDialog(G.container,620,420,!0,!1);G.init()}),D,null,u())};var y=function(q,D,z,C){var G=new mxCell(q,new mxGeometry(0,0,D,z),C);G.vertex=!0;q=t.getCenterInsertPoint(t.getBoundingBoxFromGeometry([G],!0));G.geometry.x=q.x;G.geometry.y=q.y;t.getModel().beginUpdate();try{G=t.addCell(G),t.fireEvent(new mxEventObject("cellsInserted","cells",[G]))}finally{t.getModel().endUpdate()}t.scrollCellToVisible(G);t.setSelectionCell(G);t.container.focus();t.editAfterInsert&&
+t.startEditing(G);window.setTimeout(function(){null!=d.hoverIcons&&d.hoverIcons.update(t.view.getState(G))},0);return G};d.actions.put("insertText",new Action(mxResources.get("text"),function(){t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&t.startEditingAtCell(y("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;"))}),null,null,Editor.ctrlKey+"+Shift+X").isEnabled=u;d.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),
+function(){t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&y("",120,60,"whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+K").isEnabled=u;d.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(){t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&y("",80,80,"ellipse;whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+Shift+K").isEnabled=u;d.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(){t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&
+y("",80,80,"rhombus;whiteSpace=wrap;html=1;")})).isEnabled=u;d.addInsertMenuItems=mxUtils.bind(this,function(q,D,z){for(var C=0;C<z.length;C++)"-"==z[C]?q.addSeparator(D):d.addInsertItem(q,D,mxResources.get(z[C])+"...",z[C])});this.put("insert",new Menu(mxUtils.bind(this,function(q,D){this.addMenuItems(q,"insertRectangle insertEllipse insertRhombus - insertText insertLink - createShape insertFreehand - insertImage".split(" "),D);d.insertTemplateEnabled&&!d.isOffline()&&this.addMenuItems(q,["insertTemplate"],
+D);q.addSeparator(D);this.addSubmenu("insertLayout",q,D,mxResources.get("layout"));this.addSubmenu("insertAdvanced",q,D,mxResources.get("advanced"))})));this.put("insertLayout",new Menu(mxUtils.bind(this,function(q,D){d.addInsertMenuItems(q,D,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(q,D){d.addInsertMenuItems(q,D,["fromText","plantUml","mermaid","-","formatSql"]);q.addItem(mxResources.get("csv")+
+"...",null,function(){d.showImportCsvDialog()},D,null,u())})));this.put("openRecent",new Menu(function(q,D){var z=d.getRecent();if(null!=z){for(var C=0;C<z.length;C++)(function(G){var H=G.mode;H==App.MODE_GOOGLE?H="googleDrive":H==App.MODE_ONEDRIVE&&(H="oneDrive");q.addItem(G.title+" ("+mxResources.get(H)+")",null,function(){d.loadFile(G.id)},D)})(z[C]);q.addSeparator(D)}q.addItem(mxResources.get("reset"),null,function(){d.resetRecent()},D)}));this.put("openFrom",new Menu(function(q,D){null!=d.drive?
+q.addItem(mxResources.get("googleDrive")+"...",null,function(){d.pickFile(App.MODE_GOOGLE)},D):E&&"function"===typeof window.DriveClient&&q.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1);null!=d.oneDrive?q.addItem(mxResources.get("oneDrive")+"...",null,function(){d.pickFile(App.MODE_ONEDRIVE)},D):e&&"function"===typeof window.OneDriveClient&&q.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},D,
+null,!1);null!=d.dropbox?q.addItem(mxResources.get("dropbox")+"...",null,function(){d.pickFile(App.MODE_DROPBOX)},D):c&&"function"===typeof window.DropboxClient&&q.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1);q.addSeparator(D);null!=d.gitHub&&q.addItem(mxResources.get("github")+"...",null,function(){d.pickFile(App.MODE_GITHUB)},D);null!=d.gitLab&&q.addItem(mxResources.get("gitlab")+"...",null,function(){d.pickFile(App.MODE_GITLAB)},D);null!=
+d.trello?q.addItem(mxResources.get("trello")+"...",null,function(){d.pickFile(App.MODE_TRELLO)},D):g&&"function"===typeof window.TrelloClient&&q.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1);q.addSeparator(D);isLocalStorage&&"0"!=urlParams.browser&&q.addItem(mxResources.get("browser")+"...",null,function(){d.pickFile(App.MODE_BROWSER)},D);"1"!=urlParams.noDevice&&q.addItem(mxResources.get("device")+"...",null,function(){d.pickFile(App.MODE_DEVICE)},
+D);d.isOffline()||(q.addSeparator(D),q.addItem(mxResources.get("url")+"...",null,function(){var z=new FilenameDialog(d,"",mxResources.get("open"),function(C){null!=C&&0<C.length&&(null==d.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(C):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(C)))},mxResources.get("url"));d.showDialog(z.container,300,80,!0,!0);z.init()},D))}));Editor.enableCustomLibraries&&
+(this.put("newLibrary",new Menu(function(q,D){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?q.addItem(mxResources.get("googleDrive")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_GOOGLE)},D):E&&"function"===typeof window.DriveClient&&q.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1));null!=d.oneDrive?q.addItem(mxResources.get("oneDrive")+"...",null,function(){d.showLibraryDialog(null,
+null,null,null,App.MODE_ONEDRIVE)},D):e&&"function"===typeof window.OneDriveClient&&q.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1);null!=d.dropbox?q.addItem(mxResources.get("dropbox")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},D):c&&"function"===typeof window.DropboxClient&&q.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1);q.addSeparator(D);null!=
+d.gitHub&&q.addItem(mxResources.get("github")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},D);null!=d.gitLab&&q.addItem(mxResources.get("gitlab")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_GITLAB)},D);null!=d.trello?q.addItem(mxResources.get("trello")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},D):g&&"function"===typeof window.TrelloClient&&q.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+
+"...)",null,function(){},D,null,!1);q.addSeparator(D);isLocalStorage&&"0"!=urlParams.browser&&q.addItem(mxResources.get("browser")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},D);"1"!=urlParams.noDevice&&q.addItem(mxResources.get("device")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},D)})),this.put("openLibraryFrom",new Menu(function(q,D){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?q.addItem(mxResources.get("googleDrive")+
+"...",null,function(){d.pickLibrary(App.MODE_GOOGLE)},D):E&&"function"===typeof window.DriveClient&&q.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1));null!=d.oneDrive?q.addItem(mxResources.get("oneDrive")+"...",null,function(){d.pickLibrary(App.MODE_ONEDRIVE)},D):e&&"function"===typeof window.OneDriveClient&&q.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1);null!=d.dropbox?q.addItem(mxResources.get("dropbox")+
+"...",null,function(){d.pickLibrary(App.MODE_DROPBOX)},D):c&&"function"===typeof window.DropboxClient&&q.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1);q.addSeparator(D);null!=d.gitHub&&q.addItem(mxResources.get("github")+"...",null,function(){d.pickLibrary(App.MODE_GITHUB)},D);null!=d.gitLab&&q.addItem(mxResources.get("gitlab")+"...",null,function(){d.pickLibrary(App.MODE_GITLAB)},D);null!=d.trello?q.addItem(mxResources.get("trello")+"...",
+null,function(){d.pickLibrary(App.MODE_TRELLO)},D):g&&"function"===typeof window.TrelloClient&&q.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1);q.addSeparator(D);isLocalStorage&&"0"!=urlParams.browser&&q.addItem(mxResources.get("browser")+"...",null,function(){d.pickLibrary(App.MODE_BROWSER)},D);"1"!=urlParams.noDevice&&q.addItem(mxResources.get("device")+"...",null,function(){d.pickLibrary(App.MODE_DEVICE)},D);d.isOffline()||(q.addSeparator(D),
+q.addItem(mxResources.get("url")+"...",null,function(){var z=new FilenameDialog(d,"",mxResources.get("open"),function(C){if(null!=C&&0<C.length&&d.spinner.spin(document.body,mxResources.get("loading"))){var G=C;d.editor.isCorsEnabledForUrl(C)||(G=PROXY_URL+"?url="+encodeURIComponent(C));mxUtils.get(G,function(H){if(200<=H.getStatus()&&299>=H.getStatus()){d.spinner.stop();try{d.loadLibrary(new UrlLibrary(this,H.getText(),C))}catch(M){d.handleError(M,mxResources.get("errorLoadingFile"))}}else d.spinner.stop(),
+d.handleError(null,mxResources.get("errorLoadingFile"))},function(){d.spinner.stop();d.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));d.showDialog(z.container,300,80,!0,!0);z.init()},D));"1"==urlParams.confLib&&(q.addSeparator(D),q.addItem(mxResources.get("confluenceCloud")+"...",null,function(){d.showRemotelyStoredLibrary(mxResources.get("libraries"))},D))})));this.put("edit",new Menu(mxUtils.bind(this,function(q,D){this.addMenuItems(q,"undo redo - cut copy copyAsImage paste delete - duplicate - findReplace - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));
k=d.actions.addAction("comments",mxUtils.bind(this,function(){if(null==this.commentsWindow)this.commentsWindow=new CommentsWindow(d,document.body.offsetWidth-380,120,300,350),this.commentsWindow.window.addListener("show",function(){d.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("comments"));else{var q=!this.commentsWindow.window.isVisible();
this.commentsWindow.window.setVisible(q);this.commentsWindow.refreshCommentsTime();q&&this.commentsWindow.hasError&&this.commentsWindow.refreshComments()}}));k.setToggleAction(!0);k.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.commentsWindow&&this.commentsWindow.window.isVisible()}));d.editor.addListener("fileLoaded",mxUtils.bind(this,function(){null!=this.commentsWindow&&(this.commentsWindow.destroy(),this.commentsWindow=null)}));k=this.get("viewPanels");var L=k.funct;k.funct=
-function(q,D){L.apply(this,arguments);d.menus.addMenuItems(q,["tags"],D);d.commentsSupported()&&d.menus.addMenuItems(q,["comments"],D)};this.put("view",new Menu(mxUtils.bind(this,function(q,D){this.addMenuItems(q,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers","tags"]).concat(d.commentsSupported()?["comments","-"]:["-"]));this.addMenuItems(q,["-","search"],D);if(isLocalStorage||mxClient.IS_CHROMEAPP){var A=this.addMenuItem(q,"scratchpad",D);(!d.isOffline()||mxClient.IS_CHROMEAPP||
-EditorUi.isElectronApp)&&this.addLinkToItem(A,"https://www.diagrams.net/doc/faq/scratchpad")}this.addMenuItems(q,["shapes","-","pageView","pageScale"]);this.addSubmenu("units",q,D);this.addMenuItems(q,"- scrollbars tooltips ruler - grid guides".split(" "),D);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(q,"shadowVisible",D);this.addMenuItems(q,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),D);"1"!=urlParams.sketch&&this.addMenuItems(q,
-["-","fullscreen"],D)})));if(EditorUi.isElectronApp){var N="1"==urlParams.enableSpellCheck;k=d.actions.addAction("spellCheck",function(){d.toggleSpellCheck();N=!N;d.alert(mxResources.get("restartForChangeRequired"))});k.setToggleAction(!0);k.setSelectedCallback(function(){return N});var J="1"==urlParams.enableStoreBkp;k=d.actions.addAction("autoBkp",function(){d.toggleStoreBkp();J=!J});k.setToggleAction(!0);k.setSelectedCallback(function(){return J});d.actions.addAction("openDevTools",function(){d.openDevTools()});
+function(q,D){L.apply(this,arguments);d.menus.addMenuItems(q,["tags"],D);d.commentsSupported()&&d.menus.addMenuItems(q,["comments"],D)};this.put("view",new Menu(mxUtils.bind(this,function(q,D){this.addMenuItems(q,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers","tags"]).concat(d.commentsSupported()?["comments","-"]:["-"]));this.addMenuItems(q,["-","search"],D);if(isLocalStorage||mxClient.IS_CHROMEAPP){var z=this.addMenuItem(q,"scratchpad",D);(!d.isOffline()||mxClient.IS_CHROMEAPP||
+EditorUi.isElectronApp)&&this.addLinkToItem(z,"https://www.diagrams.net/doc/faq/scratchpad")}this.addMenuItems(q,["shapes","-","pageView","pageScale"]);this.addSubmenu("units",q,D);this.addMenuItems(q,"- scrollbars tooltips ruler - grid guides".split(" "),D);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(q,"shadowVisible",D);this.addMenuItems(q,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),D);"1"!=urlParams.sketch&&this.addMenuItems(q,
+["-","fullscreen"],D)})));if(EditorUi.isElectronApp){var N="1"==urlParams.enableSpellCheck;k=d.actions.addAction("spellCheck",function(){d.toggleSpellCheck();N=!N;d.alert(mxResources.get("restartForChangeRequired"))});k.setToggleAction(!0);k.setSelectedCallback(function(){return N});var I="1"==urlParams.enableStoreBkp;k=d.actions.addAction("autoBkp",function(){d.toggleStoreBkp();I=!I});k.setToggleAction(!0);k.setSelectedCallback(function(){return I});d.actions.addAction("openDevTools",function(){d.openDevTools()});
d.actions.addAction("drafts...",function(){var q=new FilenameDialog(d,EditorUi.draftSaveDelay/1E3+"",mxResources.get("apply"),mxUtils.bind(this,function(D){D=parseInt(D);0<=D&&(EditorUi.draftSaveDelay=1E3*D,EditorUi.enableDrafts=0<D,mxSettings.setDraftSaveDelay(D),mxSettings.save())}),mxResources.get("draftSaveInt"),null,null,null,null,null,null,50,250);d.showDialog(q.container,320,80,!0,!0);q.init()})}this.put("extras",new Menu(mxUtils.bind(this,function(q,D){"1"==urlParams.noLangIcon&&(this.addSubmenu("language",
-q,D),q.addSeparator(D));"1"!=urlParams.embed&&(this.addSubmenu("theme",q,D),q.addSeparator(D));if("undefined"!==typeof MathJax){var A=this.addMenuItem(q,"mathematicalTypesetting",D);(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(A,"https://www.diagrams.net/doc/faq/math-typesetting")}EditorUi.isElectronApp&&this.addMenuItems(q,["spellCheck","autoBkp","drafts"],D);this.addMenuItems(q,["copyConnect","collapseExpand","-"],D);"1"!=urlParams.embed&&(A=d.getCurrentFile(),
-null!=A&&A.isRealtimeEnabled()&&A.isRealtimeSupported()&&this.addMenuItems(q,["showRemoteCursors","shareCursor"],D),this.addMenuItems(q,["autosave"],D));q.addSeparator(D);!d.isOfflineApp()&&isLocalStorage&&this.addMenuItem(q,"plugins",D);this.addMenuItems(q,["-","editDiagram"],D);Graph.translateDiagram&&this.addMenuItems(q,["diagramLanguage"]);q.addSeparator(D);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&this.addMenuItems(q,["showStartScreen"],D);this.addMenuItems(q,["configuration"],
-D);q.addSeparator(D);"1"==urlParams.newTempDlg&&(d.actions.addAction("templates",function(){function C(M){return{id:M.id,isExt:!0,url:M.downloadUrl,title:M.title,imgUrl:M.thumbnailLink,changedBy:M.lastModifyingUserName,lastModifiedOn:M.modifiedDate}}var G=new TemplatesDialog(d,function(M){console.log(arguments)},null,null,null,"user",function(M,H,F){var I=new Date;I.setDate(I.getDate()-7);d.drive.listFiles(null,I,F?!0:!1,function(R){for(var X=[],O=0;O<R.items.length;O++)X.push(C(R.items[O]));M(X)},
-H)},function(M,H,F,I){d.drive.listFiles(M,null,I?!0:!1,function(R){for(var X=[],O=0;O<R.items.length;O++)X.push(C(R.items[O]));H(X)},F)},function(M,H,F){d.drive.getFile(M.id,function(I){H(I.data)},F)},null,function(M){M({Test:[]},1)},!0,!1);d.showDialog(G.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}),this.addMenuItem(q,"templates",D))})));this.put("file",new Menu(mxUtils.bind(this,function(q,D){if("1"==urlParams.embed)this.addSubmenu("importFrom",q,D),this.addSubmenu("exportAs",
+q,D),q.addSeparator(D));"1"!=urlParams.embed&&(this.addSubmenu("theme",q,D),q.addSeparator(D));if("undefined"!==typeof MathJax){var z=this.addMenuItem(q,"mathematicalTypesetting",D);(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(z,"https://www.diagrams.net/doc/faq/math-typesetting")}EditorUi.isElectronApp&&this.addMenuItems(q,["spellCheck","autoBkp","drafts"],D);this.addMenuItems(q,["copyConnect","collapseExpand","-"],D);"1"!=urlParams.embed&&(z=d.getCurrentFile(),
+null!=z&&z.isRealtimeEnabled()&&z.isRealtimeSupported()&&this.addMenuItems(q,["showRemoteCursors","shareCursor"],D),this.addMenuItems(q,["autosave"],D));q.addSeparator(D);!d.isOfflineApp()&&isLocalStorage&&this.addMenuItem(q,"plugins",D);this.addMenuItems(q,["-","editDiagram"],D);Graph.translateDiagram&&this.addMenuItems(q,["diagramLanguage"]);q.addSeparator(D);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&this.addMenuItems(q,["showStartScreen"],D);this.addMenuItems(q,["configuration"],
+D);q.addSeparator(D);"1"==urlParams.newTempDlg&&(d.actions.addAction("templates",function(){function C(H){return{id:H.id,isExt:!0,url:H.downloadUrl,title:H.title,imgUrl:H.thumbnailLink,changedBy:H.lastModifyingUserName,lastModifiedOn:H.modifiedDate}}var G=new TemplatesDialog(d,function(H){console.log(arguments)},null,null,null,"user",function(H,M,F){var J=new Date;J.setDate(J.getDate()-7);d.drive.listFiles(null,J,F?!0:!1,function(Q){for(var X=[],P=0;P<Q.items.length;P++)X.push(C(Q.items[P]));H(X)},
+M)},function(H,M,F,J){d.drive.listFiles(H,null,J?!0:!1,function(Q){for(var X=[],P=0;P<Q.items.length;P++)X.push(C(Q.items[P]));M(X)},F)},function(H,M,F){d.drive.getFile(H.id,function(J){M(J.data)},F)},null,function(H){H({Test:[]},1)},!0,!1);d.showDialog(G.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}),this.addMenuItem(q,"templates",D))})));this.put("file",new Menu(mxUtils.bind(this,function(q,D){if("1"==urlParams.embed)this.addSubmenu("importFrom",q,D),this.addSubmenu("exportAs",
q,D),this.addSubmenu("embed",q,D),"1"==urlParams.libraries&&(this.addMenuItems(q,["-"],D),this.addSubmenu("newLibrary",q,D),this.addSubmenu("openLibraryFrom",q,D)),d.isRevisionHistorySupported()&&this.addMenuItems(q,["-","revisionHistory"],D),this.addMenuItems(q,["-","pageSetup","print","-","rename"],D),"1"!=urlParams.embedInline&&("1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.addMenuItems(q,["saveAndExit"],D):(this.addMenuItems(q,["save"],D),"1"==urlParams.saveAndExit&&this.addMenuItems(q,
-["saveAndExit"],D))),"1"!=urlParams.noExitBtn&&this.addMenuItems(q,["exit"],D);else{var A=this.editorUi.getCurrentFile();if(null!=A&&A.constructor==DriveFile){A.isRestricted()&&this.addMenuItems(q,["exportOptionsDisabled"],D);this.addMenuItems(q,["save","-","share"],D);var C=this.addMenuItem(q,"synchronize",D);(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(C,"https://www.diagrams.net/doc/faq/synchronize");q.addSeparator(D)}else this.addMenuItems(q,["new"],D);this.addSubmenu("openFrom",
-q,D);isLocalStorage&&this.addSubmenu("openRecent",q,D);null!=A&&A.constructor==DriveFile?this.addMenuItems(q,["new","-","rename","makeCopy","moveToFolder"],D):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==A||A.constructor==LocalFile&&null==A.fileHandle||(q.addSeparator(D),C=this.addMenuItem(q,"synchronize",D),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(C,"https://www.diagrams.net/doc/faq/synchronize")),this.addMenuItems(q,["-","save","saveAs","-"],D),
-mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=d.getServiceName()||d.isOfflineApp()||null==A||this.addMenuItems(q,["share","-"],D),this.addMenuItems(q,["rename"],D),d.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(q,["upload"],D):(this.addMenuItems(q,["makeCopy"],D),null!=A&&A.constructor==OneDriveFile&&this.addMenuItems(q,["moveToFolder"],D)));q.addSeparator(D);this.addSubmenu("importFrom",q,D);this.addSubmenu("exportAs",q,D);q.addSeparator(D);
-this.addSubmenu("embed",q,D);this.addSubmenu("publish",q,D);q.addSeparator(D);this.addSubmenu("newLibrary",q,D);this.addSubmenu("openLibraryFrom",q,D);d.isRevisionHistorySupported()&&this.addMenuItems(q,["-","revisionHistory"],D);null!=A&&null!=d.fileNode&&"1"!=urlParams.embedInline&&(C=null!=A.getTitle()?A.getTitle():d.defaultFilename,(A.constructor==DriveFile&&null!=A.sync&&A.sync.isConnected()||!/(\.html)$/i.test(C)&&!/(\.svg)$/i.test(C))&&this.addMenuItems(q,["-","properties"]));this.addMenuItems(q,
-["-","pageSetup"],D);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(q,["print"],D);this.addMenuItems(q,["-","close"])}})));l.prototype.execute=function(){var q=this.ui.editor.graph;this.customFonts=this.prevCustomFonts;this.prevCustomFonts=this.ui.menus.customFonts;this.ui.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts));this.extFonts=this.previousExtFonts;for(var D=q.extFonts,A=0;null!=D&&A<D.length;A++){var C=document.getElementById("extFont_"+D[A].name);
-null!=C&&C.parentNode.removeChild(C)}q.extFonts=[];for(A=0;null!=this.previousExtFonts&&A<this.previousExtFonts.length;A++)this.ui.editor.graph.addExtFont(this.previousExtFonts[A].name,this.previousExtFonts[A].url);this.previousExtFonts=D};this.put("fontFamily",new Menu(mxUtils.bind(this,function(q,D){for(var A=mxUtils.bind(this,function(O,W,U,n,B){var K=d.editor.graph;n=this.styleChange(q,n||O,"1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],
-"1"!=urlParams["ext-fonts"]?[O,null!=W?encodeURIComponent(W):null,null]:[O],null,D,function(){"1"!=urlParams["ext-fonts"]?K.setFont(O,W):(document.execCommand("fontname",!1,O),K.addExtFont(O,W));d.fireEvent(new mxEventObject("styleChanged","keys","1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"values","1"!=urlParams["ext-fonts"]?[O,null!=W?encodeURIComponent(W):null,null]:[O],"cells",[K.cellEditor.getEditingCell()]))},function(){K.updateLabelElements(K.getSelectionCells(),
-function(Q){Q.removeAttribute("face");Q.style.fontFamily=null;"PRE"==Q.nodeName&&K.replaceElement(Q,"div")});"1"==urlParams["ext-fonts"]&&K.addExtFont(O,W)});U&&(U=document.createElement("span"),U.className="geSprite geSprite-delete",U.style.cursor="pointer",U.style.display="inline-block",n.firstChild.nextSibling.nextSibling.appendChild(U),mxEvent.addListener(U,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(Q){if("1"!=urlParams["ext-fonts"]){delete Graph.recentCustomFonts[O.toLowerCase()];
-for(var P=0;P<this.customFonts.length;P++)if(this.customFonts[P].name==O&&this.customFonts[P].url==W){this.customFonts.splice(P,1);d.fireEvent(new mxEventObject("customFontsChanged"));break}}else{var T=mxUtils.clone(this.editorUi.editor.graph.extFonts);if(null!=T&&0<T.length)for(P=0;P<T.length;P++)if(T[P].name==O){T.splice(P,1);break}var V=mxUtils.clone(this.customFonts);for(P=0;P<V.length;P++)if(V[P].name==O){V.splice(P,1);break}P=new l(this.editorUi,T,V);this.editorUi.editor.graph.model.execute(P)}this.editorUi.hideCurrentMenu();
-mxEvent.consume(Q)})));Graph.addFont(O,W);n.firstChild.nextSibling.style.fontFamily=O;null!=B&&n.setAttribute("title",B)}),C={},G=0;G<this.defaultFonts.length;G++){var M=this.defaultFonts[G];"string"===typeof M?A(M):null!=M.fontFamily&&null!=M.fontUrl&&(C[encodeURIComponent(M.fontFamily)+"@"+encodeURIComponent(M.fontUrl)]=!0,A(M.fontFamily,M.fontUrl))}q.addSeparator(D);if("1"!=urlParams["ext-fonts"]){M=function(O){var W=encodeURIComponent(O.name)+(null==O.url?"":"@"+encodeURIComponent(O.url));if(!C[W]){for(var U=
-O.name,n=0;null!=F[U.toLowerCase()];)U=O.name+" ("+ ++n+")";null==H[W]&&(I.push({name:O.name,url:O.url,label:U,title:O.url}),F[U.toLowerCase()]=O,H[W]=O)}};var H={},F={},I=[];for(G=0;G<this.customFonts.length;G++)M(this.customFonts[G]);for(var R in Graph.recentCustomFonts)M(Graph.recentCustomFonts[R]);I.sort(function(O,W){return O.label<W.label?-1:O.label>W.label?1:0});if(0<I.length){for(G=0;G<I.length;G++)A(I[G].name,I[G].url,!0,I[G].label,I[G].url);q.addSeparator(D)}q.addItem(mxResources.get("reset"),
-null,mxUtils.bind(this,function(){Graph.recentCustomFonts={};this.customFonts=[];d.fireEvent(new mxEventObject("customFontsChanged"))}),D);q.addSeparator(D)}else{R=this.editorUi.editor.graph.extFonts;if(null!=R&&0<R.length){M={};var X=!1;for(G=0;G<this.customFonts.length;G++)M[this.customFonts[G].name]=!0;for(G=0;G<R.length;G++)M[R[G].name]||(this.customFonts.push(R[G]),X=!0);X&&this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts))}if(0<this.customFonts.length){for(G=
-0;G<this.customFonts.length;G++)R=this.customFonts[G].name,M=this.customFonts[G].url,A(R,M,!0),this.editorUi.editor.graph.addExtFont(R,M,!0);q.addSeparator(D);q.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){var O=new l(this.editorUi,[],[]);d.editor.graph.model.execute(O)}),D);q.addSeparator(D)}}q.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var O=this.editorUi.editor.graph,W=O.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],U=
-"s",n=null;if("1"!=urlParams["ext-fonts"]&&O.isEditing()){var B=O.getSelectedEditingElement();null!=B&&(B=mxUtils.getCurrentStyle(B),null!=B&&(W=Graph.stripQuotes(B.fontFamily),n=Graph.getFontUrl(W,null),null!=n&&(Graph.isGoogleFontUrl(n)?(n=null,U="g"):U="w")))}else B=O.getView().getState(O.getSelectionCell()),null!=B&&(W=B.style[mxConstants.STYLE_FONTFAMILY]||W,"1"!=urlParams["ext-fonts"]?(B=B.style.fontSource,null!=B&&(B=decodeURIComponent(B),Graph.isGoogleFontUrl(B)?U="g":(U="w",n=B))):(U=B.style.FType||
-U,"w"==U&&(n=this.editorUi.editor.graph.extFonts,B=null,null!=n&&(B=n.find(function(Q){return Q.name==W})),n=null!=B?B.url:mxResources.get("urlNotFound",null,"URL not found"))));null!=n&&n.substring(0,PROXY_URL.length)==PROXY_URL&&(n=decodeURIComponent(n.substr((PROXY_URL+"?url=").length)));var K=null;document.activeElement==O.cellEditor.textarea&&(K=O.cellEditor.saveSelection());U=new FontDialog(this.editorUi,W,n,U,mxUtils.bind(this,function(Q,P,T){null!=K&&(O.cellEditor.restoreSelection(K),K=null);
-if(null!=Q&&0<Q.length)if("1"!=urlParams["ext-fonts"]&&O.isEditing())O.setFont(Q,P);else{O.getModel().beginUpdate();try{O.stopEditing(!1);"1"!=urlParams["ext-fonts"]?(O.setCellStyles(mxConstants.STYLE_FONTFAMILY,Q),O.setCellStyles("fontSource",null!=P?encodeURIComponent(P):null),O.setCellStyles("FType",null)):(O.setCellStyles(mxConstants.STYLE_FONTFAMILY,Q),"s"!=T&&(O.setCellStyles("FType",T),0==P.indexOf("http://")&&(P=PROXY_URL+"?url="+encodeURIComponent(P)),this.editorUi.editor.graph.addExtFont(Q,
-P)));T=!0;for(var V=0;V<this.customFonts.length;V++)if(this.customFonts[V].name==Q){T=!1;break}T&&(this.customFonts.push({name:Q,url:P}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))}finally{O.getModel().endUpdate()}}}));this.editorUi.showDialog(U.container,380,Editor.enableWebFonts?250:180,!0,!0);U.init()}),D,null,!0)})))}})();function DiagramPage(b,f){this.node=b;null!=f?this.node.setAttribute("id",f):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")};
+["saveAndExit"],D))),"1"!=urlParams.noExitBtn&&this.addMenuItems(q,["exit"],D);else{var z=this.editorUi.getCurrentFile();if(null!=z&&z.constructor==DriveFile){z.isRestricted()&&this.addMenuItems(q,["exportOptionsDisabled"],D);this.addMenuItems(q,["save","-","share"],D);var C=this.addMenuItem(q,"synchronize",D);(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(C,"https://www.diagrams.net/doc/faq/synchronize");q.addSeparator(D)}else this.addMenuItems(q,["new"],D);this.addSubmenu("openFrom",
+q,D);isLocalStorage&&this.addSubmenu("openRecent",q,D);null!=z&&z.constructor==DriveFile?this.addMenuItems(q,["new","-","rename","makeCopy","moveToFolder"],D):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==z||z.constructor==LocalFile&&null==z.fileHandle||(q.addSeparator(D),C=this.addMenuItem(q,"synchronize",D),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(C,"https://www.diagrams.net/doc/faq/synchronize")),this.addMenuItems(q,["-","save","saveAs","-"],D),
+mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=d.getServiceName()||d.isOfflineApp()||null==z||this.addMenuItems(q,["share","-"],D),this.addMenuItems(q,["rename"],D),d.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(q,["upload"],D):(this.addMenuItems(q,["makeCopy"],D),null!=z&&z.constructor==OneDriveFile&&this.addMenuItems(q,["moveToFolder"],D)));q.addSeparator(D);this.addSubmenu("importFrom",q,D);this.addSubmenu("exportAs",q,D);q.addSeparator(D);
+this.addSubmenu("embed",q,D);this.addSubmenu("publish",q,D);q.addSeparator(D);this.addSubmenu("newLibrary",q,D);this.addSubmenu("openLibraryFrom",q,D);d.isRevisionHistorySupported()&&this.addMenuItems(q,["-","revisionHistory"],D);null!=z&&null!=d.fileNode&&"1"!=urlParams.embedInline&&(C=null!=z.getTitle()?z.getTitle():d.defaultFilename,(z.constructor==DriveFile&&null!=z.sync&&z.sync.isConnected()||!/(\.html)$/i.test(C)&&!/(\.svg)$/i.test(C))&&this.addMenuItems(q,["-","properties"]));this.addMenuItems(q,
+["-","pageSetup"],D);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(q,["print"],D);this.addMenuItems(q,["-","close"])}})));l.prototype.execute=function(){var q=this.ui.editor.graph;this.customFonts=this.prevCustomFonts;this.prevCustomFonts=this.ui.menus.customFonts;this.ui.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts));this.extFonts=this.previousExtFonts;for(var D=q.extFonts,z=0;null!=D&&z<D.length;z++){var C=document.getElementById("extFont_"+D[z].name);
+null!=C&&C.parentNode.removeChild(C)}q.extFonts=[];for(z=0;null!=this.previousExtFonts&&z<this.previousExtFonts.length;z++)this.ui.editor.graph.addExtFont(this.previousExtFonts[z].name,this.previousExtFonts[z].url);this.previousExtFonts=D};this.put("fontFamily",new Menu(mxUtils.bind(this,function(q,D){for(var z=mxUtils.bind(this,function(P,V,W,n,B){var K=d.editor.graph;n=this.styleChange(q,n||P,"1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],
+"1"!=urlParams["ext-fonts"]?[P,null!=V?encodeURIComponent(V):null,null]:[P],null,D,function(){"1"!=urlParams["ext-fonts"]?K.setFont(P,V):(document.execCommand("fontname",!1,P),K.addExtFont(P,V));d.fireEvent(new mxEventObject("styleChanged","keys","1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"values","1"!=urlParams["ext-fonts"]?[P,null!=V?encodeURIComponent(V):null,null]:[P],"cells",[K.cellEditor.getEditingCell()]))},function(){K.updateLabelElements(K.getSelectionCells(),
+function(R){R.removeAttribute("face");R.style.fontFamily=null;"PRE"==R.nodeName&&K.replaceElement(R,"div")});"1"==urlParams["ext-fonts"]&&K.addExtFont(P,V)});W&&(W=document.createElement("span"),W.className="geSprite geSprite-delete",W.style.cursor="pointer",W.style.display="inline-block",n.firstChild.nextSibling.nextSibling.appendChild(W),mxEvent.addListener(W,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(R){if("1"!=urlParams["ext-fonts"]){delete Graph.recentCustomFonts[P.toLowerCase()];
+for(var O=0;O<this.customFonts.length;O++)if(this.customFonts[O].name==P&&this.customFonts[O].url==V){this.customFonts.splice(O,1);d.fireEvent(new mxEventObject("customFontsChanged"));break}}else{var U=mxUtils.clone(this.editorUi.editor.graph.extFonts);if(null!=U&&0<U.length)for(O=0;O<U.length;O++)if(U[O].name==P){U.splice(O,1);break}var S=mxUtils.clone(this.customFonts);for(O=0;O<S.length;O++)if(S[O].name==P){S.splice(O,1);break}O=new l(this.editorUi,U,S);this.editorUi.editor.graph.model.execute(O)}this.editorUi.hideCurrentMenu();
+mxEvent.consume(R)})));Graph.addFont(P,V);n.firstChild.nextSibling.style.fontFamily=P;null!=B&&n.setAttribute("title",B)}),C={},G=0;G<this.defaultFonts.length;G++){var H=this.defaultFonts[G];"string"===typeof H?z(H):null!=H.fontFamily&&null!=H.fontUrl&&(C[encodeURIComponent(H.fontFamily)+"@"+encodeURIComponent(H.fontUrl)]=!0,z(H.fontFamily,H.fontUrl))}q.addSeparator(D);if("1"!=urlParams["ext-fonts"]){H=function(P){var V=encodeURIComponent(P.name)+(null==P.url?"":"@"+encodeURIComponent(P.url));if(!C[V]){for(var W=
+P.name,n=0;null!=F[W.toLowerCase()];)W=P.name+" ("+ ++n+")";null==M[V]&&(J.push({name:P.name,url:P.url,label:W,title:P.url}),F[W.toLowerCase()]=P,M[V]=P)}};var M={},F={},J=[];for(G=0;G<this.customFonts.length;G++)H(this.customFonts[G]);for(var Q in Graph.recentCustomFonts)H(Graph.recentCustomFonts[Q]);J.sort(function(P,V){return P.label<V.label?-1:P.label>V.label?1:0});if(0<J.length){for(G=0;G<J.length;G++)z(J[G].name,J[G].url,!0,J[G].label,J[G].url);q.addSeparator(D)}q.addItem(mxResources.get("reset"),
+null,mxUtils.bind(this,function(){Graph.recentCustomFonts={};this.customFonts=[];d.fireEvent(new mxEventObject("customFontsChanged"))}),D);q.addSeparator(D)}else{Q=this.editorUi.editor.graph.extFonts;if(null!=Q&&0<Q.length){H={};var X=!1;for(G=0;G<this.customFonts.length;G++)H[this.customFonts[G].name]=!0;for(G=0;G<Q.length;G++)H[Q[G].name]||(this.customFonts.push(Q[G]),X=!0);X&&this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts))}if(0<this.customFonts.length){for(G=
+0;G<this.customFonts.length;G++)Q=this.customFonts[G].name,H=this.customFonts[G].url,z(Q,H,!0),this.editorUi.editor.graph.addExtFont(Q,H,!0);q.addSeparator(D);q.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){var P=new l(this.editorUi,[],[]);d.editor.graph.model.execute(P)}),D);q.addSeparator(D)}}q.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var P=this.editorUi.editor.graph,V=P.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],W=
+"s",n=null;if("1"!=urlParams["ext-fonts"]&&P.isEditing()){var B=P.getSelectedEditingElement();null!=B&&(B=mxUtils.getCurrentStyle(B),null!=B&&(V=Graph.stripQuotes(B.fontFamily),n=Graph.getFontUrl(V,null),null!=n&&(Graph.isGoogleFontUrl(n)?(n=null,W="g"):W="w")))}else B=P.getView().getState(P.getSelectionCell()),null!=B&&(V=B.style[mxConstants.STYLE_FONTFAMILY]||V,"1"!=urlParams["ext-fonts"]?(B=B.style.fontSource,null!=B&&(B=decodeURIComponent(B),Graph.isGoogleFontUrl(B)?W="g":(W="w",n=B))):(W=B.style.FType||
+W,"w"==W&&(n=this.editorUi.editor.graph.extFonts,B=null,null!=n&&(B=n.find(function(R){return R.name==V})),n=null!=B?B.url:mxResources.get("urlNotFound",null,"URL not found"))));null!=n&&n.substring(0,PROXY_URL.length)==PROXY_URL&&(n=decodeURIComponent(n.substr((PROXY_URL+"?url=").length)));var K=null;document.activeElement==P.cellEditor.textarea&&(K=P.cellEditor.saveSelection());W=new FontDialog(this.editorUi,V,n,W,mxUtils.bind(this,function(R,O,U){null!=K&&(P.cellEditor.restoreSelection(K),K=null);
+if(null!=R&&0<R.length)if("1"!=urlParams["ext-fonts"]&&P.isEditing())P.setFont(R,O);else{P.getModel().beginUpdate();try{P.stopEditing(!1);"1"!=urlParams["ext-fonts"]?(P.setCellStyles(mxConstants.STYLE_FONTFAMILY,R),P.setCellStyles("fontSource",null!=O?encodeURIComponent(O):null),P.setCellStyles("FType",null)):(P.setCellStyles(mxConstants.STYLE_FONTFAMILY,R),"s"!=U&&(P.setCellStyles("FType",U),0==O.indexOf("http://")&&(O=PROXY_URL+"?url="+encodeURIComponent(O)),this.editorUi.editor.graph.addExtFont(R,
+O)));U=!0;for(var S=0;S<this.customFonts.length;S++)if(this.customFonts[S].name==R){U=!1;break}U&&(this.customFonts.push({name:R,url:O}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))}finally{P.getModel().endUpdate()}}}));this.editorUi.showDialog(W.container,380,Editor.enableWebFonts?250:180,!0,!0);W.init()}),D,null,!0)})))}})();function DiagramPage(b,f){this.node=b;null!=f?this.node.setAttribute("id",f):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,f,l){this.ui=b;this.page=f;this.previous=this.name=l}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,f,l){this.ui=b;this.oldIndex=f;this.newIndex=l}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,f,l){this.ui=b;this.previousPage=this.page=f;this.neverShown=!0;null!=f&&(this.neverShown=null==f.viewState,this.ui.updatePageRoot(f),null!=l&&(f.viewState=l,this.neverShown=!1))}
@@ -12720,7 +12715,7 @@ EditorUi.prototype.createTab=function(b){var f=document.createElement("div");f.s
this.tabContainer.style.backgroundColor;f.style.cursor="move";f.style.color="gray";b&&(mxEvent.addListener(f,"mouseenter",mxUtils.bind(this,function(l){this.editor.graph.isMouseDown||(f.style.backgroundColor=Editor.isDarkMode()?"black":"#e8eaed",mxEvent.consume(l))})),mxEvent.addListener(f,"mouseleave",mxUtils.bind(this,function(l){f.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(l)})));return f};
EditorUi.prototype.createControlTab=function(b,f,l){l=this.createTab(null!=l?l:!0);l.style.lineHeight=this.tabContainerHeight+"px";l.style.paddingTop=b+"px";l.style.cursor="pointer";l.style.width="30px";l.innerHTML=f;null!=l.firstChild&&null!=l.firstChild.style&&mxUtils.setOpacity(l.firstChild,40);return l};EditorUi.prototype.getShortPageName=function(b){b=b.getName();36<b.length&&(b=b.substring(0,34)+"...");return b};
EditorUi.prototype.createPageMenuTab=function(b,f){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 l=b.getElementsByTagName("div")[0];l.style.display="inline-block";l.style.marginTop="5px";l.style.width="21px";l.style.height="21px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(d){this.editor.graph.popupMenuHandler.hideMenu();
-var t=new mxPopupMenu(mxUtils.bind(this,function(c,e){var g=mxUtils.bind(this,function(){for(var v=0;v<this.pages.length;v++)mxUtils.bind(this,function(x){var z=c.addItem(this.getShortPageName(this.pages[x]),null,mxUtils.bind(this,function(){this.selectPage(this.pages[x])}),e),y=this.pages[x].getId();z.setAttribute("title",this.pages[x].getName()+" ("+(x+1)+"/"+this.pages.length+")"+(null!=y?" ["+y+"]":""));this.pages[x]==this.currentPage&&c.addCheckmark(z,Editor.checkmarkImage)})(v)}),k=mxUtils.bind(this,
+var t=new mxPopupMenu(mxUtils.bind(this,function(c,e){var g=mxUtils.bind(this,function(){for(var v=0;v<this.pages.length;v++)mxUtils.bind(this,function(x){var A=c.addItem(this.getShortPageName(this.pages[x]),null,mxUtils.bind(this,function(){this.selectPage(this.pages[x])}),e),y=this.pages[x].getId();A.setAttribute("title",this.pages[x].getName()+" ("+(x+1)+"/"+this.pages.length+")"+(null!=y?" ["+y+"]":""));this.pages[x]==this.currentPage&&c.addCheckmark(A,Editor.checkmarkImage)})(v)}),k=mxUtils.bind(this,
function(){c.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),e)});f||g();if(this.editor.graph.isEnabled()){f||(c.addSeparator(e),k());var m=this.currentPage;if(null!=m){c.addSeparator(e);var p=this.getShortPageName(m);c.addItem(mxResources.get("removeIt",[p]),null,mxUtils.bind(this,function(){this.removePage(m)}),e);c.addItem(mxResources.get("renameIt",[p]),null,mxUtils.bind(this,function(){this.renamePage(m,m.getName())}),e);f||c.addSeparator(e);c.addItem(mxResources.get("duplicateIt",
[p]),null,mxUtils.bind(this,function(){this.duplicatePage(m,mxResources.get("copyOf",[m.getName()]))}),e)}}f&&(c.addSeparator(e),k(),c.addSeparator(e),g())}));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);t.destroy()});var u=mxEvent.getClientX(d),E=mxEvent.getClientY(d);t.popup(u,E,null,d);this.setCurrentMenu(t);mxEvent.consume(d)}));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(l){this.insertPage();mxEvent.consume(l)}));var f=b.getElementsByTagName("div")[0];f.style.display="inline-block";f.style.width="21px";f.style.height="21px";return b};
@@ -12732,41 +12727,41 @@ EditorUi.drawHost:"https://"+window.location.host)+"/"+t+"#"+d.getHash()}}return
EditorUi.prototype.createPageMenu=function(b,f){return mxUtils.bind(this,function(l,d){var t=this.editor.graph;l.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,b)+1)}),d);l.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),d);l.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(b,f)}),d);null!=this.getLinkForPage(b)&&(l.addSeparator(d),l.addItem(mxResources.get("link"),
null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(u,E,c,e,g,k){u=this.createUrlParameters(u,E,c,e,g,k);c||u.push("hide-pages=1");t.isSelectionEmpty()||(c=t.getBoundingBox(t.getSelectionCells()),E=t.view.translate,g=t.view.scale,c.width/=g,c.height/=g,c.x=c.x/g-E.x,c.y=c.y/g-E.y,u.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(c.x),y:Math.round(c.y),width:Math.round(c.width),height:Math.round(c.height),border:100}))));
e=new EmbedDialog(this,this.getLinkForPage(b,u,e));this.showDialog(e.container,450,240,!0,!0);e.init()}))})));l.addSeparator(d);l.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),d);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(l.addSeparator(d),l.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,
-!0,!0))}),d))})};(function(){var b=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(f){b.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(f,l,d){d.ui=f.ui;return l};b.afterDecode=function(f,l,d){f=d.oldIndex;d.oldIndex=d.newIndex;d.newIndex=f;return d};mxCodecRegistry.register(b)})();
+!0,!0))}),d))})};(function(){var b=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(){b.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(f,l,d){d.ui=f.ui;return l};b.afterDecode=function(f,l,d){f=d.oldIndex;d.oldIndex=d.newIndex;d.newIndex=f;return d};mxCodecRegistry.register(b)})();
(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(f,l,d){d.ui=f.ui;return l};b.afterDecode=function(f,l,d){f=d.previous;d.previous=d.name;d.name=f;return d};mxCodecRegistry.register(b)})();
(function(){var b=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" "));b.afterEncode=function(f,l,d){d.setAttribute("relatedPage",l.relatedPage.getId());null==l.index&&(d.setAttribute("name",l.relatedPage.getName()),null!=l.relatedPage.viewState&&d.setAttribute("viewState",JSON.stringify(l.relatedPage.viewState,function(t,u){return 0>mxUtils.indexOf(EditorUi.transientViewStateProperties,t)?u:void 0})),null!=l.relatedPage.root&&f.encodeCell(l.relatedPage.root,
d));return d};b.beforeDecode=function(f,l,d){d.ui=f.ui;d.relatedPage=d.ui.getPageById(l.getAttribute("relatedPage"));if(null==d.relatedPage){var t=l.ownerDocument.createElement("diagram");t.setAttribute("id",l.getAttribute("relatedPage"));t.setAttribute("name",l.getAttribute("name"));d.relatedPage=new DiagramPage(t);t=l.getAttribute("viewState");null!=t&&(d.relatedPage.viewState=JSON.parse(t),l.removeAttribute("viewState"));l=l.cloneNode(!0);t=l.firstChild;if(null!=t)for(d.relatedPage.root=f.decodeCell(t,
!1),d=t.nextSibling,t.parentNode.removeChild(t),t=d;null!=t;){d=t.nextSibling;if(t.nodeType==mxConstants.NODETYPE_ELEMENT){var u=t.getAttribute("id");null==f.lookup(u)&&f.decodeCell(t)}t.parentNode.removeChild(t);t=d}}return l};b.afterDecode=function(f,l,d){d.index=d.previousIndex;return d};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(d,t,u,E,c){t=null!=t?t:!1;null==u&&(u=this.getFoldableCells(this.getSelectionCells(),d));this.stopEditing();this.model.beginUpdate();try{for(var e=u.slice(),g=0;g<u.length;g++)"1"==mxUtils.getValue(this.getCurrentCellStyle(u[g]),"treeFolding","0")&&this.foldTreeCell(d,u[g]);u=e;u=b.apply(this,arguments)}finally{this.model.endUpdate()}return u};Graph.prototype.foldTreeCell=
function(d,t){this.model.beginUpdate();try{var u=[];this.traverse(t,!0,mxUtils.bind(this,function(c,e){var g=null!=e&&this.isTreeEdge(e);g&&u.push(e);c==t||null!=e&&!g||u.push(c);return(null==e||g)&&(c==t||!this.model.isCollapsed(c))}));this.model.setCollapsed(t,d);for(var E=0;E<u.length;E++)this.model.setVisible(u[E],!d)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(d){return!this.isEdgeIgnored(d)};Graph.prototype.getTreeEdges=function(d,t,u,E,c,e){return this.model.filterCells(this.getEdges(d,
-t,u,E,c,e),mxUtils.bind(this,function(g){return this.isTreeEdge(g)}))};Graph.prototype.getIncomingTreeEdges=function(d,t){return this.getTreeEdges(d,t,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(d,t){return this.getTreeEdges(d,t,!1,!0,!1)};var f=EditorUi.prototype.init;EditorUi.prototype.init=function(){f.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function d(I){return z.isVertex(I)&&u(I)}function t(I){var R=
-!1;null!=I&&(R="1"==x.getCurrentCellStyle(I).treeMoving);return R}function u(I){var R=!1;null!=I&&(I=z.getParent(I),R=x.view.getState(I),R="tree"==(null!=R?R.style:x.getCellStyle(I)).containerType);return R}function E(I){var R=!1;null!=I&&(I=z.getParent(I),R=x.view.getState(I),x.view.getState(I),R=null!=(null!=R?R.style:x.getCellStyle(I)).childLayout);return R}function c(I){I=x.view.getState(I);if(null!=I){var R=x.getIncomingTreeEdges(I.cell);if(0<R.length&&(R=x.view.getState(R[0]),null!=R&&(R=R.absolutePoints,
-null!=R&&0<R.length&&(R=R[R.length-1],null!=R)))){if(R.y==I.y&&Math.abs(R.x-I.getCenterX())<I.width/2)return mxConstants.DIRECTION_SOUTH;if(R.y==I.y+I.height&&Math.abs(R.x-I.getCenterX())<I.width/2)return mxConstants.DIRECTION_NORTH;if(R.x>I.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function e(I,R){R=null!=R?R:!0;x.model.beginUpdate();try{var X=x.model.getParent(I),O=x.getIncomingTreeEdges(I),W=x.cloneCells([O[0],I]);x.model.setTerminal(W[0],x.model.getTerminal(O[0],
-!0),!0);var U=c(I),n=X.geometry;U==mxConstants.DIRECTION_SOUTH||U==mxConstants.DIRECTION_NORTH?W[1].geometry.x+=R?I.geometry.width+10:-W[1].geometry.width-10:W[1].geometry.y+=R?I.geometry.height+10:-W[1].geometry.height-10;x.view.currentRoot!=X&&(W[1].geometry.x-=n.x,W[1].geometry.y-=n.y);var B=x.view.getState(I),K=x.view.scale;if(null!=B){var Q=mxRectangle.fromRectangle(B);U==mxConstants.DIRECTION_SOUTH||U==mxConstants.DIRECTION_NORTH?Q.x+=(R?I.geometry.width+10:-W[1].geometry.width-10)*K:Q.y+=(R?
-I.geometry.height+10:-W[1].geometry.height-10)*K;var P=x.getOutgoingTreeEdges(x.model.getTerminal(O[0],!0));if(null!=P){for(var T=U==mxConstants.DIRECTION_SOUTH||U==mxConstants.DIRECTION_NORTH,V=n=O=0;V<P.length;V++){var S=x.model.getTerminal(P[V],!1);if(U==c(S)){var Y=x.view.getState(S);S!=I&&null!=Y&&(T&&R!=Y.getCenterX()<B.getCenterX()||!T&&R!=Y.getCenterY()<B.getCenterY())&&mxUtils.intersects(Q,Y)&&(O=10+Math.max(O,(Math.min(Q.x+Q.width,Y.x+Y.width)-Math.max(Q.x,Y.x))/K),n=10+Math.max(n,(Math.min(Q.y+
-Q.height,Y.y+Y.height)-Math.max(Q.y,Y.y))/K))}}T?n=0:O=0;for(V=0;V<P.length;V++)if(S=x.model.getTerminal(P[V],!1),U==c(S)&&(Y=x.view.getState(S),S!=I&&null!=Y&&(T&&R!=Y.getCenterX()<B.getCenterX()||!T&&R!=Y.getCenterY()<B.getCenterY()))){var ca=[];x.traverse(Y.cell,!0,function(aa,da){var ja=null!=da&&x.isTreeEdge(da);ja&&ca.push(da);(null==da||ja)&&ca.push(aa);return null==da||ja});x.moveCells(ca,(R?1:-1)*O,(R?1:-1)*n)}}}return x.addCells(W,X)}finally{x.model.endUpdate()}}function g(I){x.model.beginUpdate();
-try{var R=c(I),X=x.getIncomingTreeEdges(I),O=x.cloneCells([X[0],I]);x.model.setTerminal(X[0],O[1],!1);x.model.setTerminal(O[0],O[1],!0);x.model.setTerminal(O[0],I,!1);var W=x.model.getParent(I),U=W.geometry,n=[];x.view.currentRoot!=W&&(O[1].geometry.x-=U.x,O[1].geometry.y-=U.y);x.traverse(I,!0,function(Q,P){var T=null!=P&&x.isTreeEdge(P);T&&n.push(P);(null==P||T)&&n.push(Q);return null==P||T});var B=I.geometry.width+40,K=I.geometry.height+40;R==mxConstants.DIRECTION_SOUTH?B=0:R==mxConstants.DIRECTION_NORTH?
-(B=0,K=-K):R==mxConstants.DIRECTION_WEST?(B=-B,K=0):R==mxConstants.DIRECTION_EAST&&(K=0);x.moveCells(n,B,K);return x.addCells(O,W)}finally{x.model.endUpdate()}}function k(I,R){x.model.beginUpdate();try{var X=x.model.getParent(I),O=x.getIncomingTreeEdges(I),W=c(I);0==O.length&&(O=[x.createEdge(X,null,"",null,null,x.createCurrentEdgeStyle())],W=R);var U=x.cloneCells([O[0],I]);x.model.setTerminal(U[0],I,!0);if(null==x.model.getTerminal(U[0],!1)){x.model.setTerminal(U[0],U[1],!1);var n=x.getCellStyle(U[1]).newEdgeStyle;
-if(null!=n)try{var B=JSON.parse(n),K;for(K in B)x.setCellStyles(K,B[K],[U[0]]),"edgeStyle"==K&&"elbowEdgeStyle"==B[K]&&x.setCellStyles("elbow",W==mxConstants.DIRECTION_SOUTH||W==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[U[0]])}catch(Y){}}O=x.getOutgoingTreeEdges(I);var Q=X.geometry;R=[];x.view.currentRoot==X&&(Q=new mxRectangle);for(n=0;n<O.length;n++){var P=x.model.getTerminal(O[n],!1);null!=P&&R.push(P)}var T=x.view.getBounds(R),V=x.view.translate,S=x.view.scale;W==mxConstants.DIRECTION_SOUTH?
-(U[1].geometry.x=null==T?I.geometry.x+(I.geometry.width-U[1].geometry.width)/2:(T.x+T.width)/S-V.x-Q.x+10,U[1].geometry.y+=U[1].geometry.height-Q.y+40):W==mxConstants.DIRECTION_NORTH?(U[1].geometry.x=null==T?I.geometry.x+(I.geometry.width-U[1].geometry.width)/2:(T.x+T.width)/S-V.x+-Q.x+10,U[1].geometry.y-=U[1].geometry.height+Q.y+40):(U[1].geometry.x=W==mxConstants.DIRECTION_WEST?U[1].geometry.x-(U[1].geometry.width+Q.x+40):U[1].geometry.x+(U[1].geometry.width-Q.x+40),U[1].geometry.y=null==T?I.geometry.y+
-(I.geometry.height-U[1].geometry.height)/2:(T.y+T.height)/S-V.y+-Q.y+10);return x.addCells(U,X)}finally{x.model.endUpdate()}}function m(I,R,X){I=x.getOutgoingTreeEdges(I);X=x.view.getState(X);var O=[];if(null!=X&&null!=I){for(var W=0;W<I.length;W++){var U=x.view.getState(x.model.getTerminal(I[W],!1));null!=U&&(!R&&Math.min(U.x+U.width,X.x+X.width)>=Math.max(U.x,X.x)||R&&Math.min(U.y+U.height,X.y+X.height)>=Math.max(U.y,X.y))&&O.push(U)}O.sort(function(n,B){return R?n.x+n.width-B.x-B.width:n.y+n.height-
-B.y-B.height})}return O}function p(I,R){var X=c(I),O=R==mxConstants.DIRECTION_EAST||R==mxConstants.DIRECTION_WEST;(X==mxConstants.DIRECTION_EAST||X==mxConstants.DIRECTION_WEST)==O&&X!=R?v.actions.get("selectParent").funct():X==R?(R=x.getOutgoingTreeEdges(I),null!=R&&0<R.length&&x.setSelectionCell(x.model.getTerminal(R[0],!1))):(X=x.getIncomingTreeEdges(I),null!=X&&0<X.length&&(O=m(x.model.getTerminal(X[0],!0),O,I),I=x.view.getState(I),null!=I&&(I=mxUtils.indexOf(O,I),0<=I&&(I+=R==mxConstants.DIRECTION_NORTH||
-R==mxConstants.DIRECTION_WEST?-1:1,0<=I&&I<=O.length-1&&x.setSelectionCell(O[I].cell)))))}var v=this,x=v.editor.graph,z=x.getModel(),y=v.menus.createPopupMenu;v.menus.createPopupMenu=function(I,R,X){y.apply(this,arguments);if(1==x.getSelectionCount()){R=x.getSelectionCell();var O=x.getOutgoingTreeEdges(R);I.addSeparator();0<O.length&&(d(x.getSelectionCell())&&this.addMenuItems(I,["selectChildren"],null,X),this.addMenuItems(I,["selectDescendants"],null,X));d(x.getSelectionCell())?(I.addSeparator(),
-0<x.getIncomingTreeEdges(R).length&&this.addMenuItems(I,["selectSiblings","selectParent"],null,X)):0<x.model.getEdgeCount(R)&&this.addMenuItems(I,["selectConnections"],null,X)}};v.actions.addAction("selectChildren",function(){if(x.isEnabled()&&1==x.getSelectionCount()){var I=x.getSelectionCell();I=x.getOutgoingTreeEdges(I);if(null!=I){for(var R=[],X=0;X<I.length;X++)R.push(x.model.getTerminal(I[X],!1));x.setSelectionCells(R)}}},null,null,"Alt+Shift+X");v.actions.addAction("selectSiblings",function(){if(x.isEnabled()&&
-1==x.getSelectionCount()){var I=x.getSelectionCell();I=x.getIncomingTreeEdges(I);if(null!=I&&0<I.length&&(I=x.getOutgoingTreeEdges(x.model.getTerminal(I[0],!0)),null!=I)){for(var R=[],X=0;X<I.length;X++)R.push(x.model.getTerminal(I[X],!1));x.setSelectionCells(R)}}},null,null,"Alt+Shift+S");v.actions.addAction("selectParent",function(){if(x.isEnabled()&&1==x.getSelectionCount()){var I=x.getSelectionCell();I=x.getIncomingTreeEdges(I);null!=I&&0<I.length&&x.setSelectionCell(x.model.getTerminal(I[0],
-!0))}},null,null,"Alt+Shift+P");v.actions.addAction("selectDescendants",function(I,R){I=x.getSelectionCell();if(x.isEnabled()&&x.model.isVertex(I)){if(null!=R&&mxEvent.isAltDown(R))x.setSelectionCells(x.model.getTreeEdges(I,null==R||!mxEvent.isShiftDown(R),null==R||!mxEvent.isControlDown(R)));else{var X=[];x.traverse(I,!0,function(O,W){var U=null!=W&&x.isTreeEdge(W);U&&X.push(W);null!=W&&!U||null!=R&&mxEvent.isShiftDown(R)||X.push(O);return null==W||U})}x.setSelectionCells(X)}},null,null,"Alt+Shift+D");
-var L=x.removeCells;x.removeCells=function(I,R){R=null!=R?R:!0;null==I&&(I=this.getDeletableCells(this.getSelectionCells()));R&&(I=this.getDeletableCells(this.addAllEdges(I)));for(var X=[],O=0;O<I.length;O++){var W=I[O];z.isEdge(W)&&u(W)&&(X.push(W),W=z.getTerminal(W,!1));if(d(W)){var U=[];x.traverse(W,!0,function(n,B){var K=null!=B&&x.isTreeEdge(B);K&&U.push(B);(null==B||K)&&U.push(n);return null==B||K});0<U.length&&(X=X.concat(U),W=x.getIncomingTreeEdges(I[O]),I=I.concat(W))}else null!=W&&X.push(I[O])}I=
-X;return L.apply(this,arguments)};v.hoverIcons.getStateAt=function(I,R,X){return d(I.cell)?null:this.graph.view.getState(this.graph.getCellAt(R,X))};var N=x.duplicateCells;x.duplicateCells=function(I,R){I=null!=I?I:this.getSelectionCells();for(var X=I.slice(0),O=0;O<X.length;O++){var W=x.view.getState(X[O]);if(null!=W&&d(W.cell)){var U=x.getIncomingTreeEdges(W.cell);for(W=0;W<U.length;W++)mxUtils.remove(U[W],I)}}this.model.beginUpdate();try{var n=N.call(this,I,R);if(n.length==I.length)for(O=0;O<I.length;O++)if(d(I[O])){var B=
-x.getIncomingTreeEdges(n[O]);U=x.getIncomingTreeEdges(I[O]);if(0==B.length&&0<U.length){var K=this.cloneCell(U[0]);this.addEdge(K,x.getDefaultParent(),this.model.getTerminal(U[0],!0),n[O])}}}finally{this.model.endUpdate()}return n};var J=x.moveCells;x.moveCells=function(I,R,X,O,W,U,n){var B=null;this.model.beginUpdate();try{var K=W,Q=this.getCurrentCellStyle(W);if(null!=I&&d(W)&&"1"==mxUtils.getValue(Q,"treeFolding","0")){for(var P=0;P<I.length;P++)if(d(I[P])||x.model.isEdge(I[P])&&null==x.model.getTerminal(I[P],
-!0)){W=x.model.getParent(I[P]);break}if(null!=K&&W!=K&&null!=this.view.getState(I[0])){var T=x.getIncomingTreeEdges(I[0]);if(0<T.length){var V=x.view.getState(x.model.getTerminal(T[0],!0));if(null!=V){var S=x.view.getState(K);null!=S&&(R=(S.getCenterX()-V.getCenterX())/x.view.scale,X=(S.getCenterY()-V.getCenterY())/x.view.scale)}}}}B=J.apply(this,arguments);if(null!=B&&null!=I&&B.length==I.length)for(P=0;P<B.length;P++)if(this.model.isEdge(B[P]))d(K)&&0>mxUtils.indexOf(B,this.model.getTerminal(B[P],
-!0))&&this.model.setTerminal(B[P],K,!0);else if(d(I[P])&&(T=x.getIncomingTreeEdges(I[P]),0<T.length))if(!O)d(K)&&0>mxUtils.indexOf(I,this.model.getTerminal(T[0],!0))&&this.model.setTerminal(T[0],K,!0);else if(0==x.getIncomingTreeEdges(B[P]).length){Q=K;if(null==Q||Q==x.model.getParent(I[P]))Q=x.model.getTerminal(T[0],!0);O=this.cloneCell(T[0]);this.addEdge(O,x.getDefaultParent(),Q,B[P])}}finally{this.model.endUpdate()}return B};if(null!=v.sidebar){var q=v.sidebar.dropAndConnect;v.sidebar.dropAndConnect=
-function(I,R,X,O){var W=x.model,U=null;W.beginUpdate();try{if(U=q.apply(this,arguments),d(I))for(var n=0;n<U.length;n++)if(W.isEdge(U[n])&&null==W.getTerminal(U[n],!0)){W.setTerminal(U[n],I,!0);var B=x.getCellGeometry(U[n]);B.points=null;null!=B.getTerminalPoint(!0)&&B.setTerminalPoint(null,!0)}}finally{W.endUpdate()}return U}}var D={88:v.actions.get("selectChildren"),84:v.actions.get("selectSubtree"),80:v.actions.get("selectParent"),83:v.actions.get("selectSiblings")},A=v.onKeyDown;v.onKeyDown=function(I){try{if(x.isEnabled()&&
-!x.isEditing()&&d(x.getSelectionCell())&&1==x.getSelectionCount()){var R=null;0<x.getIncomingTreeEdges(x.getSelectionCell()).length&&(9==I.which?R=mxEvent.isShiftDown(I)?g(x.getSelectionCell()):k(x.getSelectionCell()):13==I.which&&(R=e(x.getSelectionCell(),!mxEvent.isShiftDown(I))));if(null!=R&&0<R.length)1==R.length&&x.model.isEdge(R[0])?x.setSelectionCell(x.model.getTerminal(R[0],!1)):x.setSelectionCell(R[R.length-1]),null!=v.hoverIcons&&v.hoverIcons.update(x.view.getState(x.getSelectionCell())),
-x.startEditingAtCell(x.getSelectionCell()),mxEvent.consume(I);else if(mxEvent.isAltDown(I)&&mxEvent.isShiftDown(I)){var X=D[I.keyCode];null!=X&&(X.funct(I),mxEvent.consume(I))}else 37==I.keyCode?(p(x.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(I)):38==I.keyCode?(p(x.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(I)):39==I.keyCode?(p(x.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(I)):40==I.keyCode&&(p(x.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
-mxEvent.consume(I))}}catch(O){v.handleError(O)}mxEvent.isConsumed(I)||A.apply(this,arguments)};var C=x.connectVertex;x.connectVertex=function(I,R,X,O,W,U,n){var B=x.getIncomingTreeEdges(I);if(d(I)){var K=c(I),Q=K==mxConstants.DIRECTION_EAST||K==mxConstants.DIRECTION_WEST,P=R==mxConstants.DIRECTION_EAST||R==mxConstants.DIRECTION_WEST;return K==R||0==B.length?k(I,R):Q==P?g(I):e(I,R!=mxConstants.DIRECTION_NORTH&&R!=mxConstants.DIRECTION_WEST)}return C.apply(this,arguments)};x.getSubtree=function(I){var R=
-[I];!t(I)&&!d(I)||E(I)||x.traverse(I,!0,function(X,O){var W=null!=O&&x.isTreeEdge(O);W&&0>mxUtils.indexOf(R,O)&&R.push(O);(null==O||W)&&0>mxUtils.indexOf(R,X)&&R.push(X);return null==O||W});return R};var G=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){G.apply(this,arguments);(t(this.state.cell)||d(this.state.cell))&&!E(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(I){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(I),mxEvent.getClientY(I),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(I);
-this.graph.isMouseDown=!0;v.hoverIcons.reset();mxEvent.consume(I)})))};var M=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){M.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var H=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(I){H.apply(this,
-arguments);null!=this.moveHandle&&(this.moveHandle.style.display=I?"":"none")};var F=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(I,R){F.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var l=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var d=l.apply(this,arguments),t=this.graph;return d.concat([this.addEntry("tree container",
+t,u,E,c,e),mxUtils.bind(this,function(g){return this.isTreeEdge(g)}))};Graph.prototype.getIncomingTreeEdges=function(d,t){return this.getTreeEdges(d,t,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(d,t){return this.getTreeEdges(d,t,!1,!0,!1)};var f=EditorUi.prototype.init;EditorUi.prototype.init=function(){f.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function d(J){return A.isVertex(J)&&u(J)}function t(J){var Q=
+!1;null!=J&&(Q="1"==x.getCurrentCellStyle(J).treeMoving);return Q}function u(J){var Q=!1;null!=J&&(J=A.getParent(J),Q=x.view.getState(J),Q="tree"==(null!=Q?Q.style:x.getCellStyle(J)).containerType);return Q}function E(J){var Q=!1;null!=J&&(J=A.getParent(J),Q=x.view.getState(J),x.view.getState(J),Q=null!=(null!=Q?Q.style:x.getCellStyle(J)).childLayout);return Q}function c(J){J=x.view.getState(J);if(null!=J){var Q=x.getIncomingTreeEdges(J.cell);if(0<Q.length&&(Q=x.view.getState(Q[0]),null!=Q&&(Q=Q.absolutePoints,
+null!=Q&&0<Q.length&&(Q=Q[Q.length-1],null!=Q)))){if(Q.y==J.y&&Math.abs(Q.x-J.getCenterX())<J.width/2)return mxConstants.DIRECTION_SOUTH;if(Q.y==J.y+J.height&&Math.abs(Q.x-J.getCenterX())<J.width/2)return mxConstants.DIRECTION_NORTH;if(Q.x>J.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function e(J,Q){Q=null!=Q?Q:!0;x.model.beginUpdate();try{var X=x.model.getParent(J),P=x.getIncomingTreeEdges(J),V=x.cloneCells([P[0],J]);x.model.setTerminal(V[0],x.model.getTerminal(P[0],
+!0),!0);var W=c(J),n=X.geometry;W==mxConstants.DIRECTION_SOUTH||W==mxConstants.DIRECTION_NORTH?V[1].geometry.x+=Q?J.geometry.width+10:-V[1].geometry.width-10:V[1].geometry.y+=Q?J.geometry.height+10:-V[1].geometry.height-10;x.view.currentRoot!=X&&(V[1].geometry.x-=n.x,V[1].geometry.y-=n.y);var B=x.view.getState(J),K=x.view.scale;if(null!=B){var R=mxRectangle.fromRectangle(B);W==mxConstants.DIRECTION_SOUTH||W==mxConstants.DIRECTION_NORTH?R.x+=(Q?J.geometry.width+10:-V[1].geometry.width-10)*K:R.y+=(Q?
+J.geometry.height+10:-V[1].geometry.height-10)*K;var O=x.getOutgoingTreeEdges(x.model.getTerminal(P[0],!0));if(null!=O){for(var U=W==mxConstants.DIRECTION_SOUTH||W==mxConstants.DIRECTION_NORTH,S=n=P=0;S<O.length;S++){var T=x.model.getTerminal(O[S],!1);if(W==c(T)){var Y=x.view.getState(T);T!=J&&null!=Y&&(U&&Q!=Y.getCenterX()<B.getCenterX()||!U&&Q!=Y.getCenterY()<B.getCenterY())&&mxUtils.intersects(R,Y)&&(P=10+Math.max(P,(Math.min(R.x+R.width,Y.x+Y.width)-Math.max(R.x,Y.x))/K),n=10+Math.max(n,(Math.min(R.y+
+R.height,Y.y+Y.height)-Math.max(R.y,Y.y))/K))}}U?n=0:P=0;for(S=0;S<O.length;S++)if(T=x.model.getTerminal(O[S],!1),W==c(T)&&(Y=x.view.getState(T),T!=J&&null!=Y&&(U&&Q!=Y.getCenterX()<B.getCenterX()||!U&&Q!=Y.getCenterY()<B.getCenterY()))){var ba=[];x.traverse(Y.cell,!0,function(aa,da){var ha=null!=da&&x.isTreeEdge(da);ha&&ba.push(da);(null==da||ha)&&ba.push(aa);return null==da||ha});x.moveCells(ba,(Q?1:-1)*P,(Q?1:-1)*n)}}}return x.addCells(V,X)}finally{x.model.endUpdate()}}function g(J){x.model.beginUpdate();
+try{var Q=c(J),X=x.getIncomingTreeEdges(J),P=x.cloneCells([X[0],J]);x.model.setTerminal(X[0],P[1],!1);x.model.setTerminal(P[0],P[1],!0);x.model.setTerminal(P[0],J,!1);var V=x.model.getParent(J),W=V.geometry,n=[];x.view.currentRoot!=V&&(P[1].geometry.x-=W.x,P[1].geometry.y-=W.y);x.traverse(J,!0,function(R,O){var U=null!=O&&x.isTreeEdge(O);U&&n.push(O);(null==O||U)&&n.push(R);return null==O||U});var B=J.geometry.width+40,K=J.geometry.height+40;Q==mxConstants.DIRECTION_SOUTH?B=0:Q==mxConstants.DIRECTION_NORTH?
+(B=0,K=-K):Q==mxConstants.DIRECTION_WEST?(B=-B,K=0):Q==mxConstants.DIRECTION_EAST&&(K=0);x.moveCells(n,B,K);return x.addCells(P,V)}finally{x.model.endUpdate()}}function k(J,Q){x.model.beginUpdate();try{var X=x.model.getParent(J),P=x.getIncomingTreeEdges(J),V=c(J);0==P.length&&(P=[x.createEdge(X,null,"",null,null,x.createCurrentEdgeStyle())],V=Q);var W=x.cloneCells([P[0],J]);x.model.setTerminal(W[0],J,!0);if(null==x.model.getTerminal(W[0],!1)){x.model.setTerminal(W[0],W[1],!1);var n=x.getCellStyle(W[1]).newEdgeStyle;
+if(null!=n)try{var B=JSON.parse(n),K;for(K in B)x.setCellStyles(K,B[K],[W[0]]),"edgeStyle"==K&&"elbowEdgeStyle"==B[K]&&x.setCellStyles("elbow",V==mxConstants.DIRECTION_SOUTH||V==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[W[0]])}catch(Y){}}P=x.getOutgoingTreeEdges(J);var R=X.geometry;Q=[];x.view.currentRoot==X&&(R=new mxRectangle);for(n=0;n<P.length;n++){var O=x.model.getTerminal(P[n],!1);null!=O&&Q.push(O)}var U=x.view.getBounds(Q),S=x.view.translate,T=x.view.scale;V==mxConstants.DIRECTION_SOUTH?
+(W[1].geometry.x=null==U?J.geometry.x+(J.geometry.width-W[1].geometry.width)/2:(U.x+U.width)/T-S.x-R.x+10,W[1].geometry.y+=W[1].geometry.height-R.y+40):V==mxConstants.DIRECTION_NORTH?(W[1].geometry.x=null==U?J.geometry.x+(J.geometry.width-W[1].geometry.width)/2:(U.x+U.width)/T-S.x+-R.x+10,W[1].geometry.y-=W[1].geometry.height+R.y+40):(W[1].geometry.x=V==mxConstants.DIRECTION_WEST?W[1].geometry.x-(W[1].geometry.width+R.x+40):W[1].geometry.x+(W[1].geometry.width-R.x+40),W[1].geometry.y=null==U?J.geometry.y+
+(J.geometry.height-W[1].geometry.height)/2:(U.y+U.height)/T-S.y+-R.y+10);return x.addCells(W,X)}finally{x.model.endUpdate()}}function m(J,Q,X){J=x.getOutgoingTreeEdges(J);X=x.view.getState(X);var P=[];if(null!=X&&null!=J){for(var V=0;V<J.length;V++){var W=x.view.getState(x.model.getTerminal(J[V],!1));null!=W&&(!Q&&Math.min(W.x+W.width,X.x+X.width)>=Math.max(W.x,X.x)||Q&&Math.min(W.y+W.height,X.y+X.height)>=Math.max(W.y,X.y))&&P.push(W)}P.sort(function(n,B){return Q?n.x+n.width-B.x-B.width:n.y+n.height-
+B.y-B.height})}return P}function p(J,Q){var X=c(J),P=Q==mxConstants.DIRECTION_EAST||Q==mxConstants.DIRECTION_WEST;(X==mxConstants.DIRECTION_EAST||X==mxConstants.DIRECTION_WEST)==P&&X!=Q?v.actions.get("selectParent").funct():X==Q?(Q=x.getOutgoingTreeEdges(J),null!=Q&&0<Q.length&&x.setSelectionCell(x.model.getTerminal(Q[0],!1))):(X=x.getIncomingTreeEdges(J),null!=X&&0<X.length&&(P=m(x.model.getTerminal(X[0],!0),P,J),J=x.view.getState(J),null!=J&&(J=mxUtils.indexOf(P,J),0<=J&&(J+=Q==mxConstants.DIRECTION_NORTH||
+Q==mxConstants.DIRECTION_WEST?-1:1,0<=J&&J<=P.length-1&&x.setSelectionCell(P[J].cell)))))}var v=this,x=v.editor.graph,A=x.getModel(),y=v.menus.createPopupMenu;v.menus.createPopupMenu=function(J,Q,X){y.apply(this,arguments);if(1==x.getSelectionCount()){Q=x.getSelectionCell();var P=x.getOutgoingTreeEdges(Q);J.addSeparator();0<P.length&&(d(x.getSelectionCell())&&this.addMenuItems(J,["selectChildren"],null,X),this.addMenuItems(J,["selectDescendants"],null,X));d(x.getSelectionCell())?(J.addSeparator(),
+0<x.getIncomingTreeEdges(Q).length&&this.addMenuItems(J,["selectSiblings","selectParent"],null,X)):0<x.model.getEdgeCount(Q)&&this.addMenuItems(J,["selectConnections"],null,X)}};v.actions.addAction("selectChildren",function(){if(x.isEnabled()&&1==x.getSelectionCount()){var J=x.getSelectionCell();J=x.getOutgoingTreeEdges(J);if(null!=J){for(var Q=[],X=0;X<J.length;X++)Q.push(x.model.getTerminal(J[X],!1));x.setSelectionCells(Q)}}},null,null,"Alt+Shift+X");v.actions.addAction("selectSiblings",function(){if(x.isEnabled()&&
+1==x.getSelectionCount()){var J=x.getSelectionCell();J=x.getIncomingTreeEdges(J);if(null!=J&&0<J.length&&(J=x.getOutgoingTreeEdges(x.model.getTerminal(J[0],!0)),null!=J)){for(var Q=[],X=0;X<J.length;X++)Q.push(x.model.getTerminal(J[X],!1));x.setSelectionCells(Q)}}},null,null,"Alt+Shift+S");v.actions.addAction("selectParent",function(){if(x.isEnabled()&&1==x.getSelectionCount()){var J=x.getSelectionCell();J=x.getIncomingTreeEdges(J);null!=J&&0<J.length&&x.setSelectionCell(x.model.getTerminal(J[0],
+!0))}},null,null,"Alt+Shift+P");v.actions.addAction("selectDescendants",function(J,Q){J=x.getSelectionCell();if(x.isEnabled()&&x.model.isVertex(J)){if(null!=Q&&mxEvent.isAltDown(Q))x.setSelectionCells(x.model.getTreeEdges(J,null==Q||!mxEvent.isShiftDown(Q),null==Q||!mxEvent.isControlDown(Q)));else{var X=[];x.traverse(J,!0,function(P,V){var W=null!=V&&x.isTreeEdge(V);W&&X.push(V);null!=V&&!W||null!=Q&&mxEvent.isShiftDown(Q)||X.push(P);return null==V||W})}x.setSelectionCells(X)}},null,null,"Alt+Shift+D");
+var L=x.removeCells;x.removeCells=function(J,Q){Q=null!=Q?Q:!0;null==J&&(J=this.getDeletableCells(this.getSelectionCells()));Q&&(J=this.getDeletableCells(this.addAllEdges(J)));for(var X=[],P=0;P<J.length;P++){var V=J[P];A.isEdge(V)&&u(V)&&(X.push(V),V=A.getTerminal(V,!1));if(d(V)){var W=[];x.traverse(V,!0,function(n,B){var K=null!=B&&x.isTreeEdge(B);K&&W.push(B);(null==B||K)&&W.push(n);return null==B||K});0<W.length&&(X=X.concat(W),V=x.getIncomingTreeEdges(J[P]),J=J.concat(V))}else null!=V&&X.push(J[P])}J=
+X;return L.apply(this,arguments)};v.hoverIcons.getStateAt=function(J,Q,X){return d(J.cell)?null:this.graph.view.getState(this.graph.getCellAt(Q,X))};var N=x.duplicateCells;x.duplicateCells=function(J,Q){J=null!=J?J:this.getSelectionCells();for(var X=J.slice(0),P=0;P<X.length;P++){var V=x.view.getState(X[P]);if(null!=V&&d(V.cell)){var W=x.getIncomingTreeEdges(V.cell);for(V=0;V<W.length;V++)mxUtils.remove(W[V],J)}}this.model.beginUpdate();try{var n=N.call(this,J,Q);if(n.length==J.length)for(P=0;P<J.length;P++)if(d(J[P])){var B=
+x.getIncomingTreeEdges(n[P]);W=x.getIncomingTreeEdges(J[P]);if(0==B.length&&0<W.length){var K=this.cloneCell(W[0]);this.addEdge(K,x.getDefaultParent(),this.model.getTerminal(W[0],!0),n[P])}}}finally{this.model.endUpdate()}return n};var I=x.moveCells;x.moveCells=function(J,Q,X,P,V,W,n){var B=null;this.model.beginUpdate();try{var K=V,R=this.getCurrentCellStyle(V);if(null!=J&&d(V)&&"1"==mxUtils.getValue(R,"treeFolding","0")){for(var O=0;O<J.length;O++)if(d(J[O])||x.model.isEdge(J[O])&&null==x.model.getTerminal(J[O],
+!0)){V=x.model.getParent(J[O]);break}if(null!=K&&V!=K&&null!=this.view.getState(J[0])){var U=x.getIncomingTreeEdges(J[0]);if(0<U.length){var S=x.view.getState(x.model.getTerminal(U[0],!0));if(null!=S){var T=x.view.getState(K);null!=T&&(Q=(T.getCenterX()-S.getCenterX())/x.view.scale,X=(T.getCenterY()-S.getCenterY())/x.view.scale)}}}}B=I.apply(this,arguments);if(null!=B&&null!=J&&B.length==J.length)for(O=0;O<B.length;O++)if(this.model.isEdge(B[O]))d(K)&&0>mxUtils.indexOf(B,this.model.getTerminal(B[O],
+!0))&&this.model.setTerminal(B[O],K,!0);else if(d(J[O])&&(U=x.getIncomingTreeEdges(J[O]),0<U.length))if(!P)d(K)&&0>mxUtils.indexOf(J,this.model.getTerminal(U[0],!0))&&this.model.setTerminal(U[0],K,!0);else if(0==x.getIncomingTreeEdges(B[O]).length){R=K;if(null==R||R==x.model.getParent(J[O]))R=x.model.getTerminal(U[0],!0);P=this.cloneCell(U[0]);this.addEdge(P,x.getDefaultParent(),R,B[O])}}finally{this.model.endUpdate()}return B};if(null!=v.sidebar){var q=v.sidebar.dropAndConnect;v.sidebar.dropAndConnect=
+function(J,Q,X,P){var V=x.model,W=null;V.beginUpdate();try{if(W=q.apply(this,arguments),d(J))for(var n=0;n<W.length;n++)if(V.isEdge(W[n])&&null==V.getTerminal(W[n],!0)){V.setTerminal(W[n],J,!0);var B=x.getCellGeometry(W[n]);B.points=null;null!=B.getTerminalPoint(!0)&&B.setTerminalPoint(null,!0)}}finally{V.endUpdate()}return W}}var D={88:v.actions.get("selectChildren"),84:v.actions.get("selectSubtree"),80:v.actions.get("selectParent"),83:v.actions.get("selectSiblings")},z=v.onKeyDown;v.onKeyDown=function(J){try{if(x.isEnabled()&&
+!x.isEditing()&&d(x.getSelectionCell())&&1==x.getSelectionCount()){var Q=null;0<x.getIncomingTreeEdges(x.getSelectionCell()).length&&(9==J.which?Q=mxEvent.isShiftDown(J)?g(x.getSelectionCell()):k(x.getSelectionCell()):13==J.which&&(Q=e(x.getSelectionCell(),!mxEvent.isShiftDown(J))));if(null!=Q&&0<Q.length)1==Q.length&&x.model.isEdge(Q[0])?x.setSelectionCell(x.model.getTerminal(Q[0],!1)):x.setSelectionCell(Q[Q.length-1]),null!=v.hoverIcons&&v.hoverIcons.update(x.view.getState(x.getSelectionCell())),
+x.startEditingAtCell(x.getSelectionCell()),mxEvent.consume(J);else if(mxEvent.isAltDown(J)&&mxEvent.isShiftDown(J)){var X=D[J.keyCode];null!=X&&(X.funct(J),mxEvent.consume(J))}else 37==J.keyCode?(p(x.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(J)):38==J.keyCode?(p(x.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(J)):39==J.keyCode?(p(x.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(J)):40==J.keyCode&&(p(x.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
+mxEvent.consume(J))}}catch(P){v.handleError(P)}mxEvent.isConsumed(J)||z.apply(this,arguments)};var C=x.connectVertex;x.connectVertex=function(J,Q,X,P,V,W,n){var B=x.getIncomingTreeEdges(J);if(d(J)){var K=c(J),R=K==mxConstants.DIRECTION_EAST||K==mxConstants.DIRECTION_WEST,O=Q==mxConstants.DIRECTION_EAST||Q==mxConstants.DIRECTION_WEST;return K==Q||0==B.length?k(J,Q):R==O?g(J):e(J,Q!=mxConstants.DIRECTION_NORTH&&Q!=mxConstants.DIRECTION_WEST)}return C.apply(this,arguments)};x.getSubtree=function(J){var Q=
+[J];!t(J)&&!d(J)||E(J)||x.traverse(J,!0,function(X,P){var V=null!=P&&x.isTreeEdge(P);V&&0>mxUtils.indexOf(Q,P)&&Q.push(P);(null==P||V)&&0>mxUtils.indexOf(Q,X)&&Q.push(X);return null==P||V});return Q};var G=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){G.apply(this,arguments);(t(this.state.cell)||d(this.state.cell))&&!E(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(J){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(J),mxEvent.getClientY(J),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(J);
+this.graph.isMouseDown=!0;v.hoverIcons.reset();mxEvent.consume(J)})))};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 M=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(J){M.apply(this,
+arguments);null!=this.moveHandle&&(this.moveHandle.style.display=J?"":"none")};var F=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(J,Q){F.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var l=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var d=l.apply(this,arguments),t=this.graph;return d.concat([this.addEntry("tree container",
function(){var u=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");u.vertex=!0;var E=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');E.vertex=!0;var c=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
c.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");e.geometry.relative=!0;e.edge=!0;E.insertEdge(e,!0);c.insertEdge(e,!1);u.insert(e);u.insert(E);u.insert(c);return sb.createVertexTemplateFromCells([u],u.geometry.width,u.geometry.height,u.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var u=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");
u.vertex=!0;var E=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};');E.vertex=!0;var c=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
@@ -12784,26 +12779,25 @@ k.geometry.relative=!0;k.edge=!0;E.insertEdge(k,!0);g.insertEdge(k,!1);u.insert(
E.geometry.setTerminalPoint(new mxPoint(0,0),!0);E.geometry.relative=!0;E.edge=!0;u.insertEdge(E,!1);return sb.createVertexTemplateFromCells([u,E],u.geometry.width,u.geometry.height,u.value)}),this.addEntry("tree sub sections",function(){var u=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");u.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");
E.geometry.setTerminalPoint(new mxPoint(110,-40),!0);E.geometry.relative=!0;E.edge=!0;u.insertEdge(E,!1);var c=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");c.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");e.geometry.setTerminalPoint(new mxPoint(110,-40),!0);e.geometry.relative=
!0;e.edge=!0;c.insertEdge(e,!1);return sb.createVertexTemplateFromCells([E,e,u,c],220,60,"Sub Sections")})])}}})();EditorUi.windowed="0"!=urlParams.windows;
-EditorUi.initMinimalTheme=function(){function b(A,C){if(EditorUi.windowed){var G=A.editor.graph;G.popupMenuHandler.hideMenu();if(null==A.formatWindow){C="1"==urlParams.sketch?Math.max(10,A.diagramContainer.clientWidth-241):Math.max(10,A.diagramContainer.clientWidth-248);var M="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;G="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,G.container.clientHeight-10);A.formatWindow=new u(A,mxResources.get("format"),C,M,240,G,function(F){var I=
-A.createFormat(F);I.init();A.addListener("darkModeChanged",mxUtils.bind(this,function(){I.refresh()}));return I});A.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){A.formatWindow.window.fit()}));A.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else A.formatWindow.window.setVisible(null!=C?C:!A.formatWindow.window.isVisible())}else{if(null==A.formatElt){A.formatElt=t();var H=A.createFormat(A.formatElt);H.init();A.formatElt.style.border="none";A.formatElt.style.width=
-"240px";A.formatElt.style.borderLeft="1px solid gray";A.formatElt.style.right="0px";A.addListener("darkModeChanged",mxUtils.bind(this,function(){H.refresh()}))}G=A.diagramContainer.parentNode;null!=A.formatElt.parentNode?(A.formatElt.parentNode.removeChild(A.formatElt),G.style.right="0px"):(G.parentNode.appendChild(A.formatElt),G.style.right=A.formatElt.style.width)}}function f(A,C){function G(I,R){var X=A.menus.get(I);I=F.addMenu(R,mxUtils.bind(this,function(){X.funct.apply(this,arguments)}));I.style.cssText=
-"position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;";I.className="geTitle";C.appendChild(I);return I}var M=document.createElement("div");M.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";M.className="geTitle";var H=document.createElement("span");H.style.fontSize="18px";H.style.marginRight="5px";
-H.innerHTML="+";M.appendChild(H);mxUtils.write(M,mxResources.get("moreShapes"));C.appendChild(M);mxEvent.addListener(M,"click",function(){A.actions.get("shapes").funct()});var F=new Menubar(A,C);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?M.style.bottom="0":null!=A.actions.get("newLibrary")?(M=document.createElement("div"),M.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",
-M.className="geTitle",H=document.createElement("span"),H.style.cssText="position:relative;top:6px;",mxUtils.write(H,mxResources.get("newLibrary")),M.appendChild(H),C.appendChild(M),mxEvent.addListener(M,"click",A.actions.get("newLibrary").funct),M=document.createElement("div"),M.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;",M.className="geTitle",H=document.createElement("span"),
-H.style.cssText="position:relative;top:6px;",mxUtils.write(H,mxResources.get("openLibrary")),M.appendChild(H),C.appendChild(M),mxEvent.addListener(M,"click",A.actions.get("openLibrary").funct)):(M=G("newLibrary",mxResources.get("newLibrary")),M.style.boxSizing="border-box",M.style.paddingRight="6px",M.style.paddingLeft="6px",M.style.height="32px",M.style.left="0",M=G("openLibraryFrom",mxResources.get("openLibraryFrom")),M.style.borderLeft="1px solid lightgray",M.style.boxSizing="border-box",M.style.paddingRight=
-"6px",M.style.paddingLeft="6px",M.style.height="32px",M.style.left="50%");C.appendChild(A.sidebar.container);C.style.overflow="hidden"}function l(A,C){if(EditorUi.windowed){var G=A.editor.graph;G.popupMenuHandler.hideMenu();if(null==A.sidebarWindow){C=Math.min(G.container.clientWidth-10,218);var M="1"==urlParams.embedInline?650:Math.min(G.container.clientHeight-40,650);A.sidebarWindow=new u(A,mxResources.get("shapes"),"1"==urlParams.sketch&&"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&
-"1"!=urlParams.embedInline?Math.max(30,(G.container.clientHeight-M)/2):56,C-6,M-6,function(H){f(A,H)});A.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){A.sidebarWindow.window.fit()}));A.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);A.sidebarWindow.window.setVisible(!0);isLocalStorage&&A.getLocalData("sidebar",function(H){A.sidebar.showEntries(H,null,!0)});A.restoreLibraries()}else A.sidebarWindow.window.setVisible(null!=C?C:!A.sidebarWindow.window.isVisible())}else null==
-A.sidebarElt&&(A.sidebarElt=t(),f(A,A.sidebarElt),A.sidebarElt.style.border="none",A.sidebarElt.style.width="210px",A.sidebarElt.style.borderRight="1px solid gray"),G=A.diagramContainer.parentNode,null!=A.sidebarElt.parentNode?(A.sidebarElt.parentNode.removeChild(A.sidebarElt),G.style.left="0px"):(G.parentNode.appendChild(A.sidebarElt),G.style.left=A.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=
-null;else{var d=0;try{d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(A){}var t=function(){var A=document.createElement("div");A.className="geSidebarContainer";A.style.position="absolute";A.style.width="100%";A.style.height="100%";A.style.border="1px solid whiteSmoke";A.style.overflowX="hidden";A.style.overflowY="auto";return A},u=function(A,C,G,M,H,F,I){var R=t();I(R);this.window=new mxWindow(C,R,G,M,H,F,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);
-this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.setLocation=function(X,O){var W=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,U=this.table.firstChild.firstChild.firstChild;X=Math.max(0,Math.min(X,(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-U.clientWidth-2));O=Math.max(0,Math.min(O,W-U.clientHeight-2));this.getX()==X&&this.getY()==O||mxWindow.prototype.setLocation.apply(this,
-arguments)};mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(X){null==X&&(X=window.event);return null!=X&&A.isSelectionAllowed(X)}))};Editor.checkmarkImage=Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;
-mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');
+EditorUi.initMinimalTheme=function(){function b(z,C){if(EditorUi.windowed){var G=z.editor.graph;G.popupMenuHandler.hideMenu();if(null==z.formatWindow){C="1"==urlParams.sketch?Math.max(10,z.diagramContainer.clientWidth-241):Math.max(10,z.diagramContainer.clientWidth-248);var H="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;G="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,G.container.clientHeight-10);z.formatWindow=new u(z,mxResources.get("format"),C,H,240,G,function(F){var J=
+z.createFormat(F);J.init();z.addListener("darkModeChanged",mxUtils.bind(this,function(){J.refresh()}));return J});z.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){z.formatWindow.window.fit()}));z.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else z.formatWindow.window.setVisible(null!=C?C:!z.formatWindow.window.isVisible())}else{if(null==z.formatElt){z.formatElt=t();var M=z.createFormat(z.formatElt);M.init();z.formatElt.style.border="none";z.formatElt.style.width=
+"240px";z.formatElt.style.borderLeft="1px solid gray";z.formatElt.style.right="0px";z.addListener("darkModeChanged",mxUtils.bind(this,function(){M.refresh()}))}G=z.diagramContainer.parentNode;null!=z.formatElt.parentNode?(z.formatElt.parentNode.removeChild(z.formatElt),G.style.right="0px"):(G.parentNode.appendChild(z.formatElt),G.style.right=z.formatElt.style.width)}}function f(z,C){function G(J,Q){var X=z.menus.get(J);J=F.addMenu(Q,mxUtils.bind(this,function(){X.funct.apply(this,arguments)}));J.style.cssText=
+"position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;";J.className="geTitle";C.appendChild(J);return J}var H=document.createElement("div");H.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";H.className="geTitle";var M=document.createElement("span");M.style.fontSize="18px";M.style.marginRight="5px";
+M.innerHTML="+";H.appendChild(M);mxUtils.write(H,mxResources.get("moreShapes"));C.appendChild(H);mxEvent.addListener(H,"click",function(){z.actions.get("shapes").funct()});var F=new Menubar(z,C);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?H.style.bottom="0":null!=z.actions.get("newLibrary")?(H=document.createElement("div"),H.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",
+H.className="geTitle",M=document.createElement("span"),M.style.cssText="position:relative;top:6px;",mxUtils.write(M,mxResources.get("newLibrary")),H.appendChild(M),C.appendChild(H),mxEvent.addListener(H,"click",z.actions.get("newLibrary").funct),H=document.createElement("div"),H.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;",H.className="geTitle",M=document.createElement("span"),
+M.style.cssText="position:relative;top:6px;",mxUtils.write(M,mxResources.get("openLibrary")),H.appendChild(M),C.appendChild(H),mxEvent.addListener(H,"click",z.actions.get("openLibrary").funct)):(H=G("newLibrary",mxResources.get("newLibrary")),H.style.boxSizing="border-box",H.style.paddingRight="6px",H.style.paddingLeft="6px",H.style.height="32px",H.style.left="0",H=G("openLibraryFrom",mxResources.get("openLibraryFrom")),H.style.borderLeft="1px solid lightgray",H.style.boxSizing="border-box",H.style.paddingRight=
+"6px",H.style.paddingLeft="6px",H.style.height="32px",H.style.left="50%");C.appendChild(z.sidebar.container);C.style.overflow="hidden"}function l(z,C){if(EditorUi.windowed){var G=z.editor.graph;G.popupMenuHandler.hideMenu();if(null==z.sidebarWindow){C=Math.min(G.container.clientWidth-10,218);var H="1"==urlParams.embedInline?650:Math.min(G.container.clientHeight-40,650);z.sidebarWindow=new u(z,mxResources.get("shapes"),"1"==urlParams.sketch&&"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&
+"1"!=urlParams.embedInline?Math.max(30,(G.container.clientHeight-H)/2):56,C-6,H-6,function(M){f(z,M)});z.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){z.sidebarWindow.window.fit()}));z.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);z.sidebarWindow.window.setVisible(!0);isLocalStorage&&z.getLocalData("sidebar",function(M){z.sidebar.showEntries(M,null,!0)});z.restoreLibraries()}else z.sidebarWindow.window.setVisible(null!=C?C:!z.sidebarWindow.window.isVisible())}else null==
+z.sidebarElt&&(z.sidebarElt=t(),f(z,z.sidebarElt),z.sidebarElt.style.border="none",z.sidebarElt.style.width="210px",z.sidebarElt.style.borderRight="1px solid gray"),G=z.diagramContainer.parentNode,null!=z.sidebarElt.parentNode?(z.sidebarElt.parentNode.removeChild(z.sidebarElt),G.style.left="0px"):(G.parentNode.appendChild(z.sidebarElt),G.style.left=z.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=
+null;else{var d=0;try{d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(z){}var t=function(){var z=document.createElement("div");z.className="geSidebarContainer";z.style.position="absolute";z.style.width="100%";z.style.height="100%";z.style.border="1px solid whiteSmoke";z.style.overflowX="hidden";z.style.overflowY="auto";return z},u=function(z,C,G,H,M,F,J){var Q=t();J(Q);this.window=new mxWindow(C,Q,G,H,M,F,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);
+this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);z.installResizeHandler(this,!0);mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(X){null==X&&(X=window.event);return null!=X&&z.isSelectionAllowed(X)}))};Editor.checkmarkImage=Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;
+mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');
mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR="#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR="#C0C0C0";mxConstants.HIGHLIGHT_STROKEWIDTH=5;mxConstants.HIGHLIGHT_OPACITY=35;mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity=
"0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur="1.2";Format.inactiveTabBackgroundColor="#f0f0f0";mxGraphHandler.prototype.previewColor="#C0C0C0";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight="1"==urlParams.sketch?1:46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert="1"!=urlParams.sketch&&!mxClient.IS_IOS&&!mxClient.IS_ANDROID;
-EditorUi.prototype.setDarkMode=function(A){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetDarkMode(A);null==urlParams.dark&&(mxSettings.settings.darkMode=A,mxSettings.save());this.fireEvent(new mxEventObject("darkModeChanged"))}),0)};var E=document.createElement("link");E.setAttribute("rel","stylesheet");E.setAttribute("href",STYLE_PATH+"/dark.css");E.setAttribute("charset","UTF-8");E.setAttribute("type",
-"text/css");EditorUi.prototype.doSetDarkMode=function(A){if(Editor.darkMode!=A){var C=this.editor.graph;Editor.darkMode=A;this.spinner.opts.color=Editor.isDarkMode()?"#c0c0c0":"#000";C.view.gridColor=Editor.isDarkMode()?C.view.defaultDarkGridColor:C.view.defaultGridColor;C.defaultPageBackgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";C.defaultPageBorderColor=Editor.isDarkMode()?"#505759":"#ffffff";C.shapeBackgroundColor=Editor.isDarkMode()?Editor.darkColor:
-"#ffffff";C.shapeForegroundColor=Editor.isDarkMode()?Editor.lightColor:"#000000";C.defaultThemeName=Editor.isDarkMode()?"darkTheme":"default-style2";C.graphHandler.previewColor=Editor.isDarkMode()?"#cccccc":"black";document.body.style.backgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";C.loadStylesheet();null!=this.actions.layersWindow&&(A=this.actions.layersWindow.window.isVisible(),this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),
-this.actions.layersWindow=null,A&&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();Graph.prototype.defaultPageBackgroundColor=C.defaultPageBackgroundColor;Graph.prototype.defaultPageBorderColor=C.defaultPageBorderColor;Graph.prototype.shapeBackgroundColor=C.shapeBackgroundColor;Graph.prototype.shapeForegroundColor=
+EditorUi.prototype.setDarkMode=function(z){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetDarkMode(z);null==urlParams.dark&&(mxSettings.settings.darkMode=z,mxSettings.save());this.fireEvent(new mxEventObject("darkModeChanged"))}),0)};var E=document.createElement("link");E.setAttribute("rel","stylesheet");E.setAttribute("href",STYLE_PATH+"/dark.css");E.setAttribute("charset","UTF-8");E.setAttribute("type",
+"text/css");EditorUi.prototype.doSetDarkMode=function(z){if(Editor.darkMode!=z){var C=this.editor.graph;Editor.darkMode=z;this.spinner.opts.color=Editor.isDarkMode()?"#c0c0c0":"#000";C.view.gridColor=Editor.isDarkMode()?C.view.defaultDarkGridColor:C.view.defaultGridColor;C.defaultPageBackgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";C.defaultPageBorderColor=Editor.isDarkMode()?"#505759":"#ffffff";C.shapeBackgroundColor=Editor.isDarkMode()?Editor.darkColor:
+"#ffffff";C.shapeForegroundColor=Editor.isDarkMode()?Editor.lightColor:"#000000";C.defaultThemeName=Editor.isDarkMode()?"darkTheme":"default-style2";C.graphHandler.previewColor=Editor.isDarkMode()?"#cccccc":"black";document.body.style.backgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";C.loadStylesheet();null!=this.actions.layersWindow&&(z=this.actions.layersWindow.window.isVisible(),this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),
+this.actions.layersWindow=null,z&&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();Graph.prototype.defaultPageBackgroundColor=C.defaultPageBackgroundColor;Graph.prototype.defaultPageBorderColor=C.defaultPageBorderColor;Graph.prototype.shapeBackgroundColor=C.shapeBackgroundColor;Graph.prototype.shapeForegroundColor=
C.shapeForegroundColor;Graph.prototype.defaultThemeName=C.defaultThemeName;StyleFormatPanel.prototype.defaultStrokeColor=Editor.isDarkMode()?"#cccccc":"black";BaseFormatPanel.prototype.buttonBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"white";Format.inactiveTabBackgroundColor=Editor.isDarkMode()?"black":"#f0f0f0";Dialog.backdropColor=Editor.isDarkMode()?Editor.darkColor:"white";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;c.innerHTML=Editor.createMinimalCss();Editor.darkMode?null==E.parentNode&&document.getElementsByTagName("head")[0].appendChild(E):null!=E.parentNode&&E.parentNode.removeChild(E)}};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; }":
@@ -12814,139 +12808,139 @@ Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMo
(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 c=document.createElement("style");c.type="text/css";c.innerHTML=Editor.createMinimalCss();document.getElementsByTagName("head")[0].appendChild(c);Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var e=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");e.apply(this,arguments)};var g=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){g.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var k=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(A,
-C){null!=C.shortcut&&900>d&&!mxClient.IS_IOS?A.firstChild.nextSibling.setAttribute("title",C.shortcut):k.apply(this,arguments)};var m=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){m.apply(this,arguments);if(null!=this.userElement){var A=this.userElement;A.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+A.style.display;A.className="geToolbarButton";A.innerText="";A.style.backgroundImage="url("+Editor.userImage+")";A.style.backgroundPosition="center center";
-A.style.backgroundRepeat="no-repeat";A.style.backgroundSize="24px 24px";A.style.height="24px";A.style.width="24px";A.style.cssFloat="right";A.setAttribute("title",mxResources.get("changeUser"));if("none"!=A.style.display){A.style.display="inline-block";var C=this.getCurrentFile();if(null!=C&&C.isRealtimeEnabled()&&C.isRealtimeSupported()){var G=document.createElement("img");G.setAttribute("border","0");G.style.position="absolute";G.style.left="18px";G.style.top="2px";G.style.width="12px";G.style.height=
-"12px";var M=C.getRealtimeError();C=C.getRealtimeState();var H=mxResources.get("realtimeCollaboration");1==C?(G.src=Editor.syncImage,H+=" ("+mxResources.get("online")+")"):(G.src=Editor.syncProblemImage,H=null!=M&&null!=M.message?H+(" ("+M.message+")"):H+(" ("+mxResources.get("disconnected")+")"));G.setAttribute("title",H);A.style.paddingRight="4px";A.appendChild(G)}}}};var p=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){p.apply(this,arguments);if(null!=this.shareButton){var A=
-this.shareButton;A.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";A.className="geToolbarButton";A.innerText="";A.style.backgroundImage="url("+Editor.shareImage+")";A.style.backgroundPosition="center center";A.style.backgroundRepeat="no-repeat";A.style.backgroundSize="24px 24px";A.style.height="24px";A.style.width="24px";"1"==urlParams.sketch&&(this.shareButton.style.display="none")}null!=this.buttonContainer&&(this.buttonContainer.style.marginTop=
-"-2px",this.buttonContainer.style.paddingTop="4px")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer&&"1"!=urlParams.embedInline){var A=document.createElement("div");A.style.display="inline-block";A.style.position="relative";A.style.marginTop="6px";A.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 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()}));A.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()})),A.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()})),A.appendChild(C));"1"!=urlParams.noExitBtn&&(C=document.createElement("a"),G="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(C,G),C.setAttribute("title",G),C.className="geMenuItem",
-C.style.marginLeft="6px",C.style.padding="6px",mxEvent.addListener(C,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),A.appendChild(C));this.buttonContainer.appendChild(A);this.buttonContainer.style.top="6px";this.editor.fireEvent(new mxEventObject("statusChanged"))}};var v=Sidebar.prototype.getTooltipOffset;Sidebar.prototype.getTooltipOffset=function(A,C){if(null==this.editorUi.sidebarWindow||mxUtils.isAncestorNode(this.editorUi.picker,A)){var G=mxUtils.getOffset(this.editorUi.picker);
-G.x+=this.editorUi.picker.offsetWidth+4;G.y+=A.offsetTop-C.height/2+16;return G}var M=v.apply(this,arguments);G=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);M.x+=G.x-16;M.y+=G.y;return M};var x=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(A,C,G){var M=this.editorUi.editor.graph;A.smartSeparators=!0;x.apply(this,arguments);"1"==urlParams.sketch?M.isEnabled()&&(A.addSeparator(),1==M.getSelectionCount()&&this.addMenuItems(A,["-","lockUnlock"],null,G)):1==M.getSelectionCount()?
-(M.isCellFoldable(M.getSelectionCell())&&this.addMenuItems(A,M.isCellCollapsed(C)?["expand"]:["collapse"],null,G),this.addMenuItems(A,["collapsible","-","lockUnlock","enterGroup"],null,G),A.addSeparator(),this.addSubmenu("layout",A)):M.isSelectionEmpty()&&M.isEnabled()?(A.addSeparator(),this.addMenuItems(A,["editData"],null,G),A.addSeparator(),this.addSubmenu("layout",A),this.addSubmenu("insert",A),this.addMenuItems(A,["-","exitGroup"],null,G)):M.isEnabled()&&this.addMenuItems(A,["-","lockUnlock"],
-null,G)};var z=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(A,C,G){z.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(A,["copyAsImage"],null,G)};EditorUi.prototype.toggleFormatPanel=function(A){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=A?A:!this.formatWindow.window.isVisible()):b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var y=EditorUi.prototype.destroy;EditorUi.prototype.destroy=
+EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");e.apply(this,arguments)};var g=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){g.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var k=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(z,
+C){null!=C.shortcut&&900>d&&!mxClient.IS_IOS?z.firstChild.nextSibling.setAttribute("title",C.shortcut):k.apply(this,arguments)};var m=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){m.apply(this,arguments);if(null!=this.userElement){var z=this.userElement;z.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+z.style.display;z.className="geToolbarButton";z.innerText="";z.style.backgroundImage="url("+Editor.userImage+")";z.style.backgroundPosition="center center";
+z.style.backgroundRepeat="no-repeat";z.style.backgroundSize="24px 24px";z.style.height="24px";z.style.width="24px";z.style.cssFloat="right";z.setAttribute("title",mxResources.get("changeUser"));if("none"!=z.style.display){z.style.display="inline-block";var C=this.getCurrentFile();if(null!=C&&C.isRealtimeEnabled()&&C.isRealtimeSupported()){var G=document.createElement("img");G.setAttribute("border","0");G.style.position="absolute";G.style.left="18px";G.style.top="2px";G.style.width="12px";G.style.height=
+"12px";var H=C.getRealtimeError();C=C.getRealtimeState();var M=mxResources.get("realtimeCollaboration");1==C?(G.src=Editor.syncImage,M+=" ("+mxResources.get("online")+")"):(G.src=Editor.syncProblemImage,M=null!=H&&null!=H.message?M+(" ("+H.message+")"):M+(" ("+mxResources.get("disconnected")+")"));G.setAttribute("title",M);z.style.paddingRight="4px";z.appendChild(G)}}}};var p=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){p.apply(this,arguments);if(null!=this.shareButton){var z=
+this.shareButton;z.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";z.className="geToolbarButton";z.innerText="";z.style.backgroundImage="url("+Editor.shareImage+")";z.style.backgroundPosition="center center";z.style.backgroundRepeat="no-repeat";z.style.backgroundSize="24px 24px";z.style.height="24px";z.style.width="24px";"1"==urlParams.sketch&&(this.shareButton.style.display="none")}null!=this.buttonContainer&&(this.buttonContainer.style.marginTop=
+"-2px",this.buttonContainer.style.paddingTop="4px")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer&&"1"!=urlParams.embedInline){var z=document.createElement("div");z.style.display="inline-block";z.style.position="relative";z.style.marginTop="6px";z.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 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()}));z.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()})),z.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()})),z.appendChild(C));"1"!=urlParams.noExitBtn&&(C=document.createElement("a"),G="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(C,G),C.setAttribute("title",G),C.className="geMenuItem",
+C.style.marginLeft="6px",C.style.padding="6px",mxEvent.addListener(C,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),z.appendChild(C));this.buttonContainer.appendChild(z);this.buttonContainer.style.top="6px";this.editor.fireEvent(new mxEventObject("statusChanged"))}};var v=Sidebar.prototype.getTooltipOffset;Sidebar.prototype.getTooltipOffset=function(z,C){if(null==this.editorUi.sidebarWindow||mxUtils.isAncestorNode(this.editorUi.picker,z)){var G=mxUtils.getOffset(this.editorUi.picker);
+G.x+=this.editorUi.picker.offsetWidth+4;G.y+=z.offsetTop-C.height/2+16;return G}var H=v.apply(this,arguments);G=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);H.x+=G.x-16;H.y+=G.y;return H};var x=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(z,C,G){var H=this.editorUi.editor.graph;z.smartSeparators=!0;x.apply(this,arguments);"1"==urlParams.sketch?H.isEnabled()&&(z.addSeparator(),1==H.getSelectionCount()&&this.addMenuItems(z,["-","lockUnlock"],null,G)):1==H.getSelectionCount()?
+(H.isCellFoldable(H.getSelectionCell())&&this.addMenuItems(z,H.isCellCollapsed(C)?["expand"]:["collapse"],null,G),this.addMenuItems(z,["collapsible","-","lockUnlock","enterGroup"],null,G),z.addSeparator(),this.addSubmenu("layout",z)):H.isSelectionEmpty()&&H.isEnabled()?(z.addSeparator(),this.addMenuItems(z,["editData"],null,G),z.addSeparator(),this.addSubmenu("layout",z),this.addSubmenu("insert",z),this.addMenuItems(z,["-","exitGroup"],null,G)):H.isEnabled()&&this.addMenuItems(z,["-","lockUnlock"],
+null,G)};var A=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(z,C,G){A.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(z,["copyAsImage"],null,G)};EditorUi.prototype.toggleFormatPanel=function(z){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=z?z:!this.formatWindow.window.isVisible()):b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var y=EditorUi.prototype.destroy;EditorUi.prototype.destroy=
function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.window.setVisible(!1),this.actions.outlineWindow.window.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.window.setVisible(!1),
this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.window.setVisible(!1),this.menus.tagsWindow.window.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.window.setVisible(!1),this.menus.findWindow.window.destroy(),this.menus.findWindow=null);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.window.setVisible(!1),this.menus.findReplaceWindow.window.destroy(),this.menus.findReplaceWindow=
-null);y.apply(this,arguments)};var L=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(A){L.apply(this,arguments);if(A){var C=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=C&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=C||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),
-null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var N=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(A){A=N.apply(this,arguments);var C=this.editorUi,G=C.editor.graph;if(G.isEnabled()&&"1"==urlParams.sketch){var M=this.createOption(mxResources.get("sketch"),function(){return Editor.sketchMode},function(H,F){C.setSketchMode(!Editor.sketchMode);null!=F&&mxEvent.isShiftDown(F)||G.updateCellStyles({sketch:H?
-"1":null},G.getVerticesAndEdges())},{install:function(H){this.listener=function(){H(Editor.sketchMode)};C.addListener("sketchModeChanged",this.listener)},destroy:function(){C.removeListener(this.listener)}});A.appendChild(M)}return A};var J=Menus.prototype.init;Menus.prototype.init=function(){J.apply(this,arguments);var A=this.editorUi,C=A.editor.graph;A.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";A.actions.get("createShape").label=mxResources.get("shape")+"...";A.actions.get("outline").label=
-mxResources.get("outline")+"...";A.actions.get("layers").label=mxResources.get("layers")+"...";A.actions.get("tags").label=mxResources.get("tags")+"...";A.actions.get("comments").label=mxResources.get("comments")+"...";var G=A.actions.put("toggleDarkMode",new Action(mxResources.get("dark"),function(O){A.setDarkMode(!Editor.darkMode)}));G.setToggleAction(!0);G.setSelectedCallback(function(){return Editor.isDarkMode()});G=A.actions.put("toggleSketchMode",new Action(mxResources.get("sketch"),function(O){A.setSketchMode(!Editor.sketchMode)}));
-G.setToggleAction(!0);G.setSelectedCallback(function(){return Editor.sketchMode});G=A.actions.put("togglePagesVisible",new Action(mxResources.get("pages"),function(O){A.setPagesVisible(!Editor.pagesVisible)}));G.setToggleAction(!0);G.setSelectedCallback(function(){return Editor.pagesVisible});A.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){C.popupMenuHandler.hideMenu();A.showImportCsvDialog()}));A.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var O=
-new ParseDialog(A,"Insert from Text");A.showDialog(O.container,620,420,!0,!1);O.init()}));A.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var O=new ParseDialog(A,"Insert from Text","formatSql");A.showDialog(O.container,620,420,!0,!1);O.init()}));A.actions.put("toggleShapes",new Action(mxResources.get("1"==urlParams.sketch?"moreShapes":"shapes")+"...",function(){l(A)},null,null,Editor.ctrlKey+"+Shift+K"));A.actions.put("toggleFormat",new Action(mxResources.get("format")+
-"...",function(){b(A)})).shortcut=A.actions.get("formatPanel").shortcut;EditorUi.enablePlantUml&&!A.isOffline()&&A.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var O=new ParseDialog(A,mxResources.get("plantUml")+"...","plantUml");A.showDialog(O.container,620,420,!0,!1);O.init()}));A.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var O=new ParseDialog(A,mxResources.get("mermaid")+"...","mermaid");A.showDialog(O.container,620,420,!0,!1);
-O.init()}));var M=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,function(O,W){var U=this.editorUi.editor.graph,n=U.getSelectionCell();M.call(this,O,n,null,W);this.addMenuItems(O,["editTooltip"],W);U.model.isVertex(n)&&this.addMenuItems(O,["editGeometry"],W);this.addMenuItems(O,["-","edit"],W)})));this.addPopupMenuCellEditItems=function(O,W,U,n){O.addSeparator();this.addSubmenu("editCell",O,n,mxResources.get("edit"))};this.put("file",new Menu(mxUtils.bind(this,function(O,
-W){var U=A.getCurrentFile();A.menus.addMenuItems(O,["new"],W);A.menus.addSubmenu("openFrom",O,W);isLocalStorage&&this.addSubmenu("openRecent",O,W);O.addSeparator(W);null!=U&&U.constructor==DriveFile?A.menus.addMenuItems(O,["save","rename","makeCopy","moveToFolder"],W):(A.menus.addMenuItems(O,["save","saveAs","-","rename"],W),A.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(O,["upload"],W):A.menus.addMenuItems(O,["makeCopy"],W));O.addSeparator(W);
-null!=U&&(U.isRevisionHistorySupported()&&A.menus.addMenuItems(O,["revisionHistory"],W),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||U.constructor==LocalFile&&null==U.fileHandle||A.menus.addMenuItems(O,["synchronize"],W));A.menus.addMenuItems(O,["autosave"],W);if(null!=U&&(O.addSeparator(W),U.constructor==DriveFile&&A.menus.addMenuItems(O,["share"],W),null!=A.fileNode&&"1"!=urlParams.embedInline)){var n=null!=U.getTitle()?U.getTitle():A.defaultFilename;(U.constructor==DriveFile&&null!=U.sync&&U.sync.isConnected()||
-!/(\.html)$/i.test(n)&&!/(\.svg)$/i.test(n))&&this.addMenuItems(O,["-","properties"],W)}})));this.put("diagram",new Menu(mxUtils.bind(this,function(O,W){var U=A.getCurrentFile();A.menus.addSubmenu("extras",O,W,mxResources.get("preferences"));O.addSeparator(W);if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)A.menus.addMenuItems(O,"new open - synchronize - save saveAs -".split(" "),W);else if("1"==urlParams.embed||A.mode==App.MODE_ATLAS){"1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&A.menus.addMenuItems(O,
-["-","save"],W);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||A.mode==App.MODE_ATLAS)A.menus.addMenuItems(O,["saveAndExit"],W),null!=U&&U.isRevisionHistorySupported()&&A.menus.addMenuItems(O,["revisionHistory"],W);O.addSeparator(W)}else A.mode==App.MODE_ATLAS?A.menus.addMenuItems(O,["save","synchronize","-"],W):"1"!=urlParams.noFileMenu&&("1"!=urlParams.sketch?(A.menus.addMenuItems(O,["new"],W),A.menus.addSubmenu("openFrom",O,W),isLocalStorage&&this.addSubmenu("openRecent",
-O,W),O.addSeparator(W),null!=U&&(U.constructor==DriveFile&&A.menus.addMenuItems(O,["share"],W),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||U.constructor==LocalFile||A.menus.addMenuItems(O,["synchronize"],W)),O.addSeparator(W),A.menus.addSubmenu("save",O,W)):A.menus.addSubmenu("file",O,W));A.menus.addSubmenu("exportAs",O,W);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?A.menus.addMenuItems(O,["import"],W):"1"!=urlParams.noFileMenu&&A.menus.addSubmenu("importFrom",O,W);A.commentsSupported()&&A.menus.addMenuItems(O,
-["-","comments"],W);A.menus.addMenuItems(O,"- findReplace outline layers tags - pageSetup".split(" "),W);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||A.menus.addMenuItems(O,["print"],W);"1"!=urlParams.sketch&&null!=U&&null!=A.fileNode&&"1"!=urlParams.embedInline&&(U=null!=U.getTitle()?U.getTitle():A.defaultFilename,/(\.html)$/i.test(U)||/(\.svg)$/i.test(U)||this.addMenuItems(O,["-","properties"]));O.addSeparator(W);A.menus.addSubmenu("help",O,W);"1"==urlParams.embed||A.mode==
-App.MODE_ATLAS?("1"!=urlParams.noExitBtn||A.mode==App.MODE_ATLAS)&&A.menus.addMenuItems(O,["-","exit"],W):"1"!=urlParams.noFileMenu&&A.menus.addMenuItems(O,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(O,W){var U=A.getCurrentFile();null!=U&&U.constructor==DriveFile?A.menus.addMenuItems(O,["save","makeCopy","-","rename","moveToFolder"],W):(A.menus.addMenuItems(O,["save","saveAs","-","rename"],W),A.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&
-this.addMenuItems(O,["upload"],W):A.menus.addMenuItems(O,["makeCopy"],W));A.menus.addMenuItems(O,["-","autosave"],W);null!=U&&U.isRevisionHistorySupported()&&A.menus.addMenuItems(O,["-","revisionHistory"],W)})));var H=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(O,W){H.funct(O,W);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||A.menus.addMenuItems(O,["publishLink"],W);A.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(O.addSeparator(W),A.menus.addSubmenu("embed",O,W))})));
-var F=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(O,W){A.menus.addInsertTableCellItem(O,W)})));if("1"==urlParams.sketch){var I=this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(O,W){I.funct(O,W);this.addMenuItems(O,["-","pageScale","-","ruler"],W)})))}this.put("extras",new Menu(mxUtils.bind(this,function(O,W){null!=F&&A.menus.addSubmenu("language",O,W);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&A.mode!=App.MODE_ATLAS&&A.menus.addSubmenu("theme",
-O,W);A.menus.addSubmenu("units",O,W);O.addSeparator(W);"1"!=urlParams.sketch&&A.menus.addMenuItems(O,"pageScale ruler scrollbars - tooltips copyConnect collapseExpand".split(" "),W);"1"!=urlParams.embedInline&&"1"!=urlParams.sketch&&"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&A.mode!=App.MODE_ATLAS&&A.menus.addMenuItems(O,["-","showStartScreen","search","scratchpad"],W);O.addSeparator(W);"1"==urlParams.sketch?A.menus.addMenuItems(O,"configuration - copyConnect collapseExpand tooltips -".split(" "),
-W):(A.mode!=App.MODE_ATLAS&&A.menus.addMenuItem(O,"configuration",W),!A.isOfflineApp()&&isLocalStorage&&A.mode!=App.MODE_ATLAS&&A.menus.addMenuItem(O,"plugins",W));EditorUi.isElectronApp&&A.menus.addMenuItems(O,["-","spellCheck","autoBkp","drafts","-"],W);var U=A.getCurrentFile();null!=U&&U.isRealtimeEnabled()&&U.isRealtimeSupported()&&this.addMenuItems(O,["-","showRemoteCursors","shareCursor","-"],W);O.addSeparator(W);A.mode!=App.MODE_ATLAS&&this.addMenuItems(O,["fullscreen"],W);("1"!=urlParams.embedInline&&
-Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(O,["toggleDarkMode"],W);O.addSeparator(W)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(O,W){A.menus.addMenuItems(O,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),W)})));mxUtils.bind(this,function(){var O=this.get("insert"),W=O.funct;O.funct=function(U,n){"1"==urlParams.sketch?(A.insertTemplateEnabled&&!A.isOffline()&&A.menus.addMenuItems(U,["insertTemplate"],n),
-A.menus.addMenuItems(U,["insertImage","insertLink","-"],n),A.menus.addSubmenu("insertAdvanced",U,n,mxResources.get("advanced")),A.menus.addSubmenu("layout",U,n)):(W.apply(this,arguments),A.menus.addSubmenu("table",U,n))}})();var R="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),X=function(O,W,U,n){O.addItem(U,null,mxUtils.bind(this,function(){var B=new CreateGraphDialog(A,U,n);A.showDialog(B.container,620,420,!0,!1);B.init()}),W)};this.put("insertLayout",
-new Menu(mxUtils.bind(this,function(O,W){for(var U=0;U<R.length;U++)"-"==R[U]?O.addSeparator(W):X(O,W,mxResources.get(R[U])+"...",R[U])})))};EditorUi.prototype.installFormatToolbar=function(A){var C=this.editor.graph,G=document.createElement("div");G.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(M,H){0<C.getSelectionCount()?(A.appendChild(G),G.innerHTML="Selected: "+C.getSelectionCount()):null!=G.parentNode&&G.parentNode.removeChild(G)}))};var q=!1;EditorUi.prototype.initFormatWindow=function(){if(!q&&null!=this.formatWindow){q=!0;this.formatWindow.window.setClosable(!1);var A=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){A.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(C){mxEvent.getSource(C)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var D=EditorUi.prototype.init;EditorUi.prototype.init=function(){function A(ba,fa,na){var la=F.menus.get(ba),qa=O.addMenu(mxResources.get(ba),
-mxUtils.bind(this,function(){la.funct.apply(this,arguments)}),X);qa.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";qa.style.display="inline-block";qa.style.boxSizing="border-box";qa.style.top="6px";qa.style.marginRight="6px";qa.style.height="30px";qa.style.paddingTop="6px";qa.style.paddingBottom="6px";qa.style.cursor="pointer";qa.setAttribute("title",mxResources.get(ba));F.menus.menuCreated(la,qa,"geMenuItem");null!=na?(qa.style.backgroundImage="url("+na+")",qa.style.backgroundPosition=
-"center center",qa.style.backgroundRepeat="no-repeat",qa.style.backgroundSize="24px 24px",qa.style.width="34px",qa.innerText=""):fa||(qa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",qa.style.backgroundPosition="right 6px center",qa.style.backgroundRepeat="no-repeat",qa.style.paddingRight="22px");return qa}function C(ba,fa,na,la,qa,oa){var ka=document.createElement("a");ka.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";ka.style.display="inline-block";ka.style.boxSizing=
-"border-box";ka.style.height="30px";ka.style.padding="6px";ka.style.position="relative";ka.style.verticalAlign="top";ka.style.top="0px";"1"==urlParams.sketch&&(ka.style.borderStyle="none",ka.style.boxShadow="none",ka.style.padding="6px",ka.style.margin="0px");null!=F.statusContainer?R.insertBefore(ka,F.statusContainer):R.appendChild(ka);null!=oa?(ka.style.backgroundImage="url("+oa+")",ka.style.backgroundPosition="center center",ka.style.backgroundRepeat="no-repeat",ka.style.backgroundSize="24px 24px",
-ka.style.width="34px"):mxUtils.write(ka,ba);mxEvent.addListener(ka,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(Ca){Ca.preventDefault()}));mxEvent.addListener(ka,"click",function(Ca){"disabled"!=ka.getAttribute("disabled")&&fa(Ca);mxEvent.consume(Ca)});null==na&&(ka.style.marginRight="4px");null!=la&&ka.setAttribute("title",la);null!=qa&&(ba=function(){qa.isEnabled()?(ka.removeAttribute("disabled"),ka.style.cursor="pointer"):(ka.setAttribute("disabled","disabled"),ka.style.cursor=
-"default")},qa.addListener("stateChanged",ba),I.addListener("enabledChanged",ba),ba());return ka}function G(ba,fa,na){na=document.createElement("div");na.className="geMenuItem";na.style.display="inline-block";na.style.verticalAlign="top";na.style.marginRight="6px";na.style.padding="0 4px 0 4px";na.style.height="30px";na.style.position="relative";na.style.top="0px";"1"==urlParams.sketch&&(na.style.boxShadow="none");for(var la=0;la<ba.length;la++)null!=ba[la]&&("1"==urlParams.sketch&&(ba[la].style.padding=
-"10px 8px",ba[la].style.width="30px"),ba[la].style.margin="0px",ba[la].style.boxShadow="none",na.appendChild(ba[la]));null!=fa&&mxUtils.setOpacity(na,fa);null!=F.statusContainer&&"1"!=urlParams.sketch?R.insertBefore(na,F.statusContainer):R.appendChild(na);return na}function M(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(T.style.left=58>P.offsetTop-P.offsetHeight/2?"70px":"10px");else{for(var ba=R.firstChild;null!=ba;){var fa=ba.nextSibling;"geMenuItem"!=ba.className&&"geItem"!=ba.className||
-ba.parentNode.removeChild(ba);ba=fa}X=R.firstChild;d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;ba=1E3>d||"1"==urlParams.sketch;var na=null;ba||(na=A("diagram"));fa=ba?A("diagram",null,Editor.drawLogoImage):null;null!=fa&&(na=fa);G([na,C(mxResources.get("shapes"),F.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),F.actions.get("image"),ba?Editor.shapesImage:null),C(mxResources.get("format"),F.actions.get("toggleFormat").funct,null,mxResources.get("format")+
-" ("+F.actions.get("formatPanel").shortcut+")",F.actions.get("image"),ba?Editor.formatImage:null)],ba?60:null);fa=A("insert",!0,ba?K:null);G([fa,C(mxResources.get("delete"),F.actions.get("delete").funct,null,mxResources.get("delete"),F.actions.get("delete"),ba?Editor.trashImage:null)],ba?60:null);411<=d&&(G([ya,Ja],60),520<=d&&G([wa,640<=d?C("",Ba.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",Ba,Editor.zoomInImage):null,640<=d?C("",Ha.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+
-" -)",Ha,Editor.zoomOutImage):null],60))}null!=na&&(mxEvent.disableContextMenu(na),mxEvent.addGestureListeners(na,mxUtils.bind(this,function(la){(mxEvent.isShiftDown(la)||mxEvent.isAltDown(la)||mxEvent.isMetaDown(la)||mxEvent.isControlDown(la)||mxEvent.isPopupTrigger(la))&&F.appIconClicked(la)}),null,null));fa=F.menus.get("language");null!=fa&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=d&&"1"!=urlParams.sketch?(null==sa&&(fa=O.addMenu("",fa.funct),fa.setAttribute("title",mxResources.get("language")),
-fa.className="geToolbarButton",fa.style.backgroundImage="url("+Editor.globeImage+")",fa.style.backgroundPosition="center center",fa.style.backgroundRepeat="no-repeat",fa.style.backgroundSize="24px 24px",fa.style.position="absolute",fa.style.height="24px",fa.style.width="24px",fa.style.zIndex="1",fa.style.right="8px",fa.style.cursor="pointer",fa.style.top="1"==urlParams.embed?"12px":"11px",R.appendChild(fa),sa=fa),F.buttonContainer.style.paddingRight="34px"):(F.buttonContainer.style.paddingRight="4px",
-null!=sa&&(sa.parentNode.removeChild(sa),sa=null))}D.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 H=document.createElement("div");H.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";H.style.bottom="1"!=urlParams.embed||
-"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(H);"1"==urlParams.sketch&&null!=this.sidebar&&this.isSettingsEnabled()&&(this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save()),this.sidebar.showPalette("search",mxSettings.settings.search));if("1"!=urlParams.sketch&&1E3<=d||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])l(this,!0),null!=
-this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));var F=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==F.embedViewport)mxUtils.fit(this.div);else{var ba=parseInt(this.div.offsetLeft),fa=parseInt(this.div.offsetWidth),na=F.embedViewport.x+F.embedViewport.width,la=parseInt(this.div.offsetTop),qa=parseInt(this.div.offsetHeight),oa=F.embedViewport.y+F.embedViewport.height;
-this.div.style.left=Math.max(F.embedViewport.x,Math.min(ba,na-fa))+"px";this.div.style.top=Math.max(F.embedViewport.y,Math.min(la,oa-qa))+"px";this.div.style.height=Math.min(F.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(F.embedViewport.width,parseInt(this.div.style.width))+"px"}};this.keyHandler.bindAction(75,!0,"toggleShapes",!0);EditorUi.windowed&&("1"==urlParams.sketch||1E3<=d)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?(this.initFormatWindow(),
-H=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>d||708>H)?this.formatWindow.window.toggleMinimized():this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));F=this;var I=F.editor.graph;F.toolbar=this.createToolbar(F.createDiv("geToolbar"));F.defaultLibraryName=mxResources.get("untitledLibrary");var R=document.createElement("div");R.className="geMenubarContainer";var X=null,O=new Menubar(F,R);F.statusContainer=
-F.createStatusContainer();F.statusContainer.style.position="relative";F.statusContainer.style.maxWidth="";F.statusContainer.style.marginTop="7px";F.statusContainer.style.marginLeft="6px";F.statusContainer.style.color="gray";F.statusContainer.style.cursor="default";var W=F.hideCurrentMenu;F.hideCurrentMenu=function(){W.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var U=F.descriptorChanged;F.descriptorChanged=function(){U.apply(this,arguments);var ba=F.getCurrentFile();if(null!=
-ba&&null!=ba.getTitle()){var fa=ba.getMode();"google"==fa?fa="googleDrive":"github"==fa?fa="gitHub":"gitlab"==fa?fa="gitLab":"onedrive"==fa&&(fa="oneDrive");fa=mxResources.get(fa);R.setAttribute("title",ba.getTitle()+(null!=fa?" ("+fa+")":""))}else R.removeAttribute("title")};F.setStatusText(F.editor.getStatus());R.appendChild(F.statusContainer);F.buttonContainer=document.createElement("div");F.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";
-R.appendChild(F.buttonContainer);F.menubarContainer=F.buttonContainer;F.tabContainer=document.createElement("div");F.tabContainer.className="geTabContainer";F.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";H=F.diagramContainer.parentNode;var n=document.createElement("div");n.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";F.diagramContainer.style.top="1"==urlParams.sketch?
-"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){n.style.top="20px";F.titlebar=document.createElement("div");F.titlebar.style.cssText="position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var B=document.createElement("div");B.style.cssText="max-width: calc(100% - 100px);text-overflow: ellipsis;user-select:none;height:20px;margin: 2px 10px;font-size: 12px;white-space: nowrap;overflow: hidden;";F.titlebar.appendChild(B);H.appendChild(F.titlebar)}B=
-F.menus.get("viewZoom");var K="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,Q="1"==urlParams.sketch?document.createElement("div"):null,P="1"==urlParams.sketch?document.createElement("div"):null,T="1"==urlParams.sketch?document.createElement("div"):null,V=mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.refresh();I.refresh();I.view.validateBackground()});F.addListener("darkModeChanged",V);F.addListener("sketchModeChanged",V);var S=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)T.style.left=
-"10px",T.style.top="10px",P.style.left="10px",P.style.top="60px",Q.style.top="10px",Q.style.right="12px",Q.style.left="",F.diagramContainer.setAttribute("data-bounds",F.diagramContainer.style.top+" "+F.diagramContainer.style.left+" "+F.diagramContainer.style.width+" "+F.diagramContainer.style.height),F.diagramContainer.style.top="0px",F.diagramContainer.style.left="0px",F.diagramContainer.style.bottom="0px",F.diagramContainer.style.right="0px",F.diagramContainer.style.width="",F.diagramContainer.style.height=
-"";else{var ba=F.diagramContainer.getAttribute("data-bounds");if(null!=ba){F.diagramContainer.style.background="transparent";F.diagramContainer.removeAttribute("data-bounds");var fa=I.getGraphBounds();ba=ba.split(" ");F.diagramContainer.style.top=ba[0];F.diagramContainer.style.left=ba[1];F.diagramContainer.style.width=fa.width+50+"px";F.diagramContainer.style.height=fa.height+46+"px";F.diagramContainer.style.bottom="";F.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",
-rect:F.diagramContainer.getBoundingClientRect()}),"*");F.refresh()}T.style.left=F.diagramContainer.offsetLeft+"px";T.style.top=F.diagramContainer.offsetTop-T.offsetHeight-4+"px";P.style.display="";P.style.left=F.diagramContainer.offsetLeft-P.offsetWidth-4+"px";P.style.top=F.diagramContainer.offsetTop+"px";Q.style.left=F.diagramContainer.offsetLeft+F.diagramContainer.offsetWidth-Q.offsetWidth+"px";Q.style.top=T.style.top;Q.style.right="";F.bottomResizer.style.left=F.diagramContainer.offsetLeft+(F.diagramContainer.offsetWidth-
-F.bottomResizer.offsetWidth)/2+"px";F.bottomResizer.style.top=F.diagramContainer.offsetTop+F.diagramContainer.offsetHeight-F.bottomResizer.offsetHeight/2-1+"px";F.rightResizer.style.left=F.diagramContainer.offsetLeft+F.diagramContainer.offsetWidth-F.rightResizer.offsetWidth/2-1+"px";F.rightResizer.style.top=F.diagramContainer.offsetTop+(F.diagramContainer.offsetHeight-F.bottomResizer.offsetHeight)/2+"px"}F.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";F.rightResizer.style.visibility=
-F.bottomResizer.style.visibility;R.style.display="none";T.style.visibility="";Q.style.visibility=""}),Y=mxUtils.bind(this,function(){Fa.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";S()});V=mxUtils.bind(this,function(){Y();b(F,!0);F.initFormatWindow();var ba=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(ba.x+
-ba.width+4,ba.y)});F.addListener("inlineFullscreenChanged",Y);F.addListener("editInlineStart",V);"1"==urlParams.embedInline&&F.addListener("darkModeChanged",V);F.addListener("editInlineStop",mxUtils.bind(this,function(ba){F.diagramContainer.style.width="10px";F.diagramContainer.style.height="10px";F.diagramContainer.style.border="";F.bottomResizer.style.visibility="hidden";F.rightResizer.style.visibility="hidden";T.style.visibility="hidden";Q.style.visibility="hidden";P.style.display="none"}));if(null!=
-F.hoverIcons){var ca=F.hoverIcons.update;F.hoverIcons.update=function(){I.freehand.isDrawing()||ca.apply(this,arguments)}}if(null!=I.freehand){var aa=I.freehand.createStyle;I.freehand.createStyle=function(ba){return aa.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){P.className="geToolbarContainer";Q.className="geToolbarContainer";T.className="geToolbarContainer";R.className="geToolbarContainer";F.picker=P;var da=!1;"1"!=urlParams.embed&&"atlassian"!=F.getServiceName()&&(mxEvent.addListener(R,
-"mouseenter",function(){F.statusContainer.style.display="inline-block"}),mxEvent.addListener(R,"mouseleave",function(){da||(F.statusContainer.style.display="none")}));var ja=mxUtils.bind(this,function(ba){null!=F.notificationBtn&&(null!=ba?F.notificationBtn.setAttribute("title",ba):F.notificationBtn.removeAttribute("title"))});R.style.visibility=20>R.clientWidth?"hidden":"";F.editor.addListener("statusChanged",mxUtils.bind(this,function(){F.setStatusText(F.editor.getStatus());if("1"!=urlParams.embed&&
-"atlassian"!=F.getServiceName())if(F.statusContainer.style.display="inline-block",da=!0,1==F.statusContainer.children.length&&""==F.editor.getStatus())R.style.visibility="hidden";else{if(0==F.statusContainer.children.length||1==F.statusContainer.children.length&&"function"===typeof F.statusContainer.firstChild.getAttribute&&null==F.statusContainer.firstChild.getAttribute("class")){var ba=null!=F.statusContainer.firstChild&&"function"===typeof F.statusContainer.firstChild.getAttribute?F.statusContainer.firstChild.getAttribute("title"):
-F.editor.getStatus();ja(ba);var fa=F.getCurrentFile();fa=null!=fa?fa.savingStatusKey:DrawioFile.prototype.savingStatusKey;ba==mxResources.get(fa)+"..."?(F.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(fa))+'..."src="'+Editor.tailSpin+'">',F.statusContainer.style.display="inline-block",da=!0):6<F.buttonContainer.clientWidth&&(F.statusContainer.style.display="none",da=!1)}else F.statusContainer.style.display="inline-block",ja(null),da=!0;R.style.visibility=20>R.clientWidth&&
-!da?"hidden":""}}));ea=A("diagram",null,Editor.menuImage);ea.style.boxShadow="none";ea.style.padding="6px";ea.style.margin="0px";T.appendChild(ea);mxEvent.disableContextMenu(ea);mxEvent.addGestureListeners(ea,mxUtils.bind(this,function(ba){(mxEvent.isShiftDown(ba)||mxEvent.isAltDown(ba)||mxEvent.isMetaDown(ba)||mxEvent.isControlDown(ba)||mxEvent.isPopupTrigger(ba))&&this.appIconClicked(ba)}),null,null);F.statusContainer.style.position="";F.statusContainer.style.display="none";F.statusContainer.style.margin=
-"0px";F.statusContainer.style.padding="6px 0px";F.statusContainer.style.maxWidth=Math.min(d-240,280)+"px";F.statusContainer.style.display="inline-block";F.statusContainer.style.textOverflow="ellipsis";F.buttonContainer.style.position="";F.buttonContainer.style.paddingRight="0px";F.buttonContainer.style.display="inline-block";var ha=document.createElement("a");ha.style.padding="0px";ha.style.boxShadow="none";ha.className="geMenuItem";ha.style.display="inline-block";ha.style.width="40px";ha.style.height=
-"12px";ha.style.marginBottom="-2px";ha.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";ha.style.backgroundPosition="top center";ha.style.backgroundRepeat="no-repeat";ha.setAttribute("title","Minimize");var Z=!1,Da=mxUtils.bind(this,function(){P.innerText="";if(!Z){var ba=function(la,qa,oa){la=C("",la.funct,null,qa,la,oa);la.style.width="40px";la.style.opacity="0.7";return fa(la,null,"pointer")},fa=function(la,qa,oa){null!=qa&&la.setAttribute("title",qa);la.style.cursor=null!=oa?
-oa:"default";la.style.margin="2px 0px";P.appendChild(la);mxUtils.br(P);return la};fa(F.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text"),!0,!1,null,!0,!0),mxResources.get("text")+" ("+Editor.ctrlKey+"+Shift+X)");fa(F.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,!1,null,!0),mxResources.get("note"));fa(F.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle"),!0,!1,null,!0),mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");fa(F.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse"),!0,!1,null,!0),mxResources.get("ellipse"));(function(){var la=new mxCell("",new mxGeometry(0,0,I.defaultEdgeLength,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");
-la.geometry.setTerminalPoint(new mxPoint(0,0),!0);la.geometry.setTerminalPoint(new mxPoint(la.geometry.width,0),!1);la.geometry.points=[];la.geometry.relative=!0;la.edge=!0;fa(F.sidebar.createEdgeTemplateFromCells([la],la.geometry.width,la.geometry.height,mxResources.get("line"),!0,null,!0,!1),mxResources.get("line"));la=la.clone();la.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";la.geometry.width=I.defaultEdgeLength+20;la.geometry.setTerminalPoint(new mxPoint(0,
-20),!0);la.geometry.setTerminalPoint(new mxPoint(la.geometry.width,20),!1);la=fa(F.sidebar.createEdgeTemplateFromCells([la],la.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"));la.style.borderBottom="1px solid "+(Editor.isDarkMode()?"#505050":"lightgray");la.style.paddingBottom="14px";la.style.marginBottom="14px"})();ba(F.actions.get("insertFreehand"),mxResources.get("freehand"),Editor.freehandImage);var na=F.actions.get("toggleShapes");ba(na,mxResources.get("shapes")+
-" ("+na.shortcut+")",K);ea=A("table",null,Editor.calendarImage);ea.style.boxShadow="none";ea.style.opacity="0.7";ea.style.padding="6px";ea.style.margin="0px";ea.style.width="37px";fa(ea,null,"pointer");ea=A("insert",null,Editor.plusImage);ea.style.boxShadow="none";ea.style.opacity="0.7";ea.style.padding="6px";ea.style.margin="0px";ea.style.width="37px";fa(ea,null,"pointer")}"1"!=urlParams.embedInline&&P.appendChild(ha)});mxEvent.addListener(ha,"click",mxUtils.bind(this,function(){Z?(mxUtils.setPrefixedStyle(P.style,
-"transform","translate(0, -50%)"),P.style.padding="8px 6px 4px",P.style.top="50%",P.style.bottom="",P.style.height="",ha.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",ha.style.width="40px",ha.style.height="12px",ha.setAttribute("title","Minimize"),Z=!1,Da()):(P.innerText="",P.appendChild(ha),mxUtils.setPrefixedStyle(P.style,"transform","translate(0, 0)"),P.style.top="",P.style.bottom="12px",P.style.padding="0px",P.style.height="24px",ha.style.height="24px",ha.style.backgroundImage=
-"url("+Editor.plusImage+")",ha.setAttribute("title",mxResources.get("insert")),ha.style.width="24px",Z=!0)}));Da();F.addListener("darkModeChanged",Da);F.addListener("sketchModeChanged",Da)}else F.editor.addListener("statusChanged",mxUtils.bind(this,function(){F.setStatusText(F.editor.getStatus())}));if(null!=B){var Ga=function(ba){mxEvent.isShiftDown(ba)?(F.hideCurrentMenu(),F.actions.get("smartFit").funct(),mxEvent.consume(ba)):mxEvent.isAltDown(ba)&&(F.hideCurrentMenu(),F.actions.get("customZoom").funct(),
-mxEvent.consume(ba))},Ba=F.actions.get("zoomIn"),Ha=F.actions.get("zoomOut"),pa=F.actions.get("resetView");V=F.actions.get("fullscreen");var Na=F.actions.get("undo"),La=F.actions.get("redo"),ya=C("",Na.funct,null,mxResources.get("undo")+" ("+Na.shortcut+")",Na,Editor.undoImage),Ja=C("",La.funct,null,mxResources.get("redo")+" ("+La.shortcut+")",La,Editor.redoImage),Fa=C("",V.funct,null,mxResources.get("fullscreen"),V,Editor.fullscreenImage);if(null!=Q){pa=function(){Aa.style.display=null!=F.pages&&
-("0"!=urlParams.pages||1<F.pages.length||Editor.pagesVisible)?"inline-block":"none"};var Pa=function(){Aa.innerText="";if(null!=F.currentPage){mxUtils.write(Aa,F.currentPage.getName());var ba=null!=F.pages?F.pages.length:1,fa=F.getPageIndex(F.currentPage);fa=null!=fa?fa+1:1;var na=F.currentPage.getId();Aa.setAttribute("title",F.currentPage.getName()+" ("+fa+"/"+ba+")"+(null!=na?" ["+na+"]":""))}};Fa.parentNode.removeChild(Fa);var xa=F.actions.get("delete"),za=C("",xa.funct,null,mxResources.get("delete"),
-xa,Editor.trashImage);za.style.opacity="0.1";T.appendChild(za);xa.addListener("stateChanged",function(){za.style.opacity=xa.enabled?"":"0.1"});var ua=function(){ya.style.display=0<F.editor.undoManager.history.length||I.isEditing()?"inline-block":"none";Ja.style.display=ya.style.display;ya.style.opacity=Na.enabled?"":"0.1";Ja.style.opacity=La.enabled?"":"0.1"};T.appendChild(ya);T.appendChild(Ja);Na.addListener("stateChanged",ua);La.addListener("stateChanged",ua);ua();var Aa=this.createPageMenuTab(!1,
-!0);Aa.style.display="none";Aa.style.position="";Aa.style.marginLeft="";Aa.style.top="";Aa.style.left="";Aa.style.height="100%";Aa.style.lineHeight="";Aa.style.borderStyle="none";Aa.style.padding="3px 0";Aa.style.margin="0px";Aa.style.background="";Aa.style.border="";Aa.style.boxShadow="none";Aa.style.verticalAlign="top";Aa.style.width="auto";Aa.style.maxWidth="160px";Aa.style.position="relative";Aa.style.padding="6px";Aa.style.textOverflow="ellipsis";Aa.style.opacity="0.8";Q.appendChild(Aa);F.editor.addListener("pagesPatched",
-Pa);F.editor.addListener("pageSelected",Pa);F.editor.addListener("pageRenamed",Pa);F.editor.addListener("fileLoaded",Pa);Pa();F.addListener("fileDescriptorChanged",pa);F.addListener("pagesVisibleChanged",pa);F.editor.addListener("pagesPatched",pa);pa();pa=C("",Ha.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",Ha,Editor.zoomOutImage);Q.appendChild(pa);var ea=O.addMenu("100%",B.funct);ea.setAttribute("title",mxResources.get("zoom"));ea.innerHTML="100%";ea.style.display=
-"inline-block";ea.style.color="inherit";ea.style.cursor="pointer";ea.style.textAlign="center";ea.style.whiteSpace="nowrap";ea.style.paddingRight="10px";ea.style.textDecoration="none";ea.style.verticalAlign="top";ea.style.padding="6px 0";ea.style.fontSize="14px";ea.style.width="40px";ea.style.opacity="0.4";Q.appendChild(ea);B=C("",Ba.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",Ba,Editor.zoomInImage);Q.appendChild(B);V.visible&&(Q.appendChild(Fa),mxEvent.addListener(document,
-"fullscreenchange",function(){Fa.style.backgroundImage="url("+(null!=document.fullscreenElement?Editor.fullscreenExitImage:Editor.fullscreenImage)+")"}));"1"==urlParams.embedInline&&(B=F.actions.get("exit"),Q.appendChild(C("",B.funct,null,mxResources.get("exit"),B,Editor.closeImage)));F.tabContainer.style.visibility="hidden";R.style.cssText="position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px 0px 6px 6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
-T.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";Q.style.cssText="position:absolute;right:14px;bottom:14px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";n.appendChild(T);n.appendChild(Q);P.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";
-mxClient.IS_POINTER&&(P.style.touchAction="none");n.appendChild(P);window.setTimeout(function(){mxUtils.setPrefixedStyle(P.style,"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(n)}else{var wa=C("",Ga,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",pa,Editor.zoomFitImage);R.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";ea=O.addMenu("100%",
-B.funct);ea.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");ea.style.whiteSpace="nowrap";ea.style.paddingRight="10px";ea.style.textDecoration="none";ea.style.textDecoration="none";ea.style.overflow="hidden";ea.style.visibility="hidden";ea.style.textAlign="center";ea.style.cursor="pointer";ea.style.height=parseInt(F.tabContainerHeight)-1+"px";ea.style.lineHeight=parseInt(F.tabContainerHeight)+1+"px";ea.style.position="absolute";ea.style.display="block";ea.style.fontSize="12px";ea.style.width=
-"59px";ea.style.right="0px";ea.style.bottom="0px";ea.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";ea.style.backgroundPosition="right 6px center";ea.style.backgroundRepeat="no-repeat";n.appendChild(ea)}(function(ba){mxEvent.addListener(ba,"click",Ga);var fa=mxUtils.bind(this,function(){ba.innerText="";mxUtils.write(ba,Math.round(100*F.editor.graph.view.scale)+"%")});F.editor.graph.view.addListener(mxEvent.EVENT_SCALE,fa);F.editor.addListener("resetGraphView",fa);F.editor.addListener("pageSelected",
-fa)})(ea);var ta=F.setGraphEnabled;F.setGraphEnabled=function(){ta.apply(this,arguments);null!=this.tabContainer&&(ea.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==Q?this.tabContainerHeight+"px":"0px")}}n.appendChild(R);n.appendChild(F.diagramContainer);H.appendChild(n);F.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=d)&&"1"!=urlParams.embedInline&&b(this,!0);null==Q&&n.appendChild(F.tabContainer);
-var sa=null;M();mxEvent.addListener(window,"resize",function(){M();null!=F.sidebarWindow&&F.sidebarWindow.window.fit();null!=F.formatWindow&&F.formatWindow.window.fit();null!=F.actions.outlineWindow&&F.actions.outlineWindow.window.fit();null!=F.actions.layersWindow&&F.actions.layersWindow.window.fit();null!=F.menus.tagsWindow&&F.menus.tagsWindow.window.fit();null!=F.menus.findWindow&&F.menus.findWindow.window.fit();null!=F.menus.findReplaceWindow&&F.menus.findReplaceWindow.window.fit()});if("1"==
-urlParams.embedInline){document.body.style.cursor="text";P.style.transform="";mxEvent.addGestureListeners(F.diagramContainer.parentNode,function(ba){mxEvent.getSource(ba)==F.diagramContainer.parentNode&&(F.embedExitPoint=new mxPoint(mxEvent.getClientX(ba),mxEvent.getClientY(ba)),F.sendEmbeddedSvgExport())});H=document.createElement("div");H.style.position="absolute";H.style.width="10px";H.style.height="10px";H.style.borderRadius="5px";H.style.border="1px solid gray";H.style.background="#ffffff";H.style.cursor=
-"row-resize";F.diagramContainer.parentNode.appendChild(H);F.bottomResizer=H;var ra=null,va=null,ia=null,ma=null;mxEvent.addGestureListeners(H,function(ba){ma=parseInt(F.diagramContainer.style.height);va=mxEvent.getClientY(ba);I.popupMenuHandler.hideMenu();mxEvent.consume(ba)});H=H.cloneNode(!1);H.style.cursor="col-resize";F.diagramContainer.parentNode.appendChild(H);F.rightResizer=H;mxEvent.addGestureListeners(H,function(ba){ia=parseInt(F.diagramContainer.style.width);ra=mxEvent.getClientX(ba);I.popupMenuHandler.hideMenu();
-mxEvent.consume(ba)});mxEvent.addGestureListeners(document.body,null,function(ba){var fa=!1;null!=ra&&(F.diagramContainer.style.width=Math.max(20,ia+mxEvent.getClientX(ba)-ra)+"px",fa=!0);null!=va&&(F.diagramContainer.style.height=Math.max(20,ma+mxEvent.getClientY(ba)-va)+"px",fa=!0);fa&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:F.diagramContainer.getBoundingClientRect()}),"*"),S(),F.refresh())},function(ba){null==ra&&null==
-va||mxEvent.consume(ba);va=ra=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";F.bottomResizer.style.visibility="hidden";F.rightResizer.style.visibility="hidden";T.style.visibility="hidden";Q.style.visibility="hidden";P.style.display="none"}"1"==urlParams.prefetchFonts&&F.editor.loadFonts()}}};
-(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var f=EditorUi.initTheme;EditorUi.initTheme=function(){f.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(d,t,u,E){var c=t.y,e=t.x,g=!1,k=!1;if(null!=this.states&&null!=d&&null!=t){var m=this,p=new mxCellState,v=this.graph.getView().scale,x=Math.max(2,this.getGuideTolerance()/2);p.x=d.x+e;p.y=d.y+c;p.width=d.width;p.height=d.height;for(var z=[],y=[],L=0;L<this.states.length;L++){var N=this.states[L];N instanceof mxCellState&&(E||!this.graph.isCellSelected(N.cell))&&((p.x>=N.x&&p.x<=N.x+N.width||N.x>=p.x&&N.x<=p.x+p.width)&&(p.y>
-N.y+N.height+4||p.y+p.height+4<N.y)?z.push(N):(p.y>=N.y&&p.y<=N.y+N.height||N.y>=p.y&&N.y<=p.y+p.height)&&(p.x>N.x+N.width+4||p.x+p.width+4<N.x)&&y.push(N))}var J=0,q=0,D=N=0,A=0,C=0,G=0,M=0,H=5*v;if(1<z.length){z.push(p);z.sort(function(X,O){return X.y-O.y});var F=!1;L=p==z[0];v=p==z[z.length-1];if(!L&&!v)for(L=1;L<z.length-1;L++)if(p==z[L]){v=z[L-1];L=z[L+1];N=q=D=(L.y-v.y-v.height-p.height)/2;break}for(L=0;L<z.length-1;L++){v=z[L];var I=z[L+1],R=p==v||p==I;I=I.y-v.y-v.height;F|=p==v;if(0==q&&0==
-J)q=I,J=1;else if(Math.abs(q-I)<=(R||1==L&&F?x:0))J+=1;else if(1<J&&F){z=z.slice(0,L+1);break}else if(3<=z.length-L&&!F)J=0,N=q=0!=D?D:0,z.splice(0,0==L?1:L),L=-1;else break;0!=N||R||(q=N=I)}3==z.length&&z[1]==p&&(N=0)}if(1<y.length){y.push(p);y.sort(function(X,O){return X.x-O.x});F=!1;L=p==y[0];v=p==y[y.length-1];if(!L&&!v)for(L=1;L<y.length-1;L++)if(p==y[L]){v=y[L-1];L=y[L+1];G=C=M=(L.x-v.x-v.width-p.width)/2;break}for(L=0;L<y.length-1;L++){v=y[L];I=y[L+1];R=p==v||p==I;I=I.x-v.x-v.width;F|=p==v;
-if(0==C&&0==A)C=I,A=1;else if(Math.abs(C-I)<=(R||1==L&&F?x:0))A+=1;else if(1<A&&F){y=y.slice(0,L+1);break}else if(3<=y.length-L&&!F)A=0,G=C=0!=M?M:0,y.splice(0,0==L?1:L),L=-1;else break;0!=G||R||(C=G=I)}3==y.length&&y[1]==p&&(G=0)}x=function(X,O,W,U){var n=[];if(U){U=H;var B=0}else U=0,B=H;n.push(new mxPoint(X.x-U,X.y-B));n.push(new mxPoint(X.x+U,X.y+B));n.push(X);n.push(O);n.push(new mxPoint(O.x-U,O.y-B));n.push(new mxPoint(O.x+U,O.y+B));if(null!=W)return W.points=n,W;X=new mxPolyline(n,mxConstants.GUIDE_COLOR,
-mxConstants.GUIDE_STROKEWIDTH);X.dialect=mxConstants.DIALECT_SVG;X.pointerEvents=!1;X.init(m.graph.getView().getOverlayPane());return X};C=function(X,O){if(X&&null!=m.guidesArrHor)for(X=0;X<m.guidesArrHor.length;X++)m.guidesArrHor[X].node.style.visibility="hidden";if(O&&null!=m.guidesArrVer)for(X=0;X<m.guidesArrVer.length;X++)m.guidesArrVer[X].node.style.visibility="hidden"};if(1<A&&A==y.length-1){A=[];M=m.guidesArrHor;g=[];e=0;L=y[0]==p?1:0;F=y[L].y+y[L].height;if(0<G)for(L=0;L<y.length-1;L++)v=
-y[L],I=y[L+1],p==v?(e=I.x-v.width-G,g.push(new mxPoint(e+v.width+H,F)),g.push(new mxPoint(I.x-H,F))):p==I?(g.push(new mxPoint(v.x+v.width+H,F)),e=v.x+v.width+G,g.push(new mxPoint(e-H,F))):(g.push(new mxPoint(v.x+v.width+H,F)),g.push(new mxPoint(I.x-H,F)));else v=y[0],L=y[2],e=v.x+v.width+(L.x-v.x-v.width-p.width)/2,g.push(new mxPoint(v.x+v.width+H,F)),g.push(new mxPoint(e-H,F)),g.push(new mxPoint(e+p.width+H,F)),g.push(new mxPoint(L.x-H,F));for(L=0;L<g.length;L+=2)y=g[L],G=g[L+1],y=x(y,G,null!=M?
-M[L/2]:null),y.node.style.visibility="visible",y.redraw(),A.push(y);for(L=g.length/2;null!=M&&L<M.length;L++)M[L].destroy();m.guidesArrHor=A;e-=d.x;g=!0}else C(!0);if(1<J&&J==z.length-1){A=[];M=m.guidesArrVer;k=[];c=0;L=z[0]==p?1:0;J=z[L].x+z[L].width;if(0<N)for(L=0;L<z.length-1;L++)v=z[L],I=z[L+1],p==v?(c=I.y-v.height-N,k.push(new mxPoint(J,c+v.height+H)),k.push(new mxPoint(J,I.y-H))):p==I?(k.push(new mxPoint(J,v.y+v.height+H)),c=v.y+v.height+N,k.push(new mxPoint(J,c-H))):(k.push(new mxPoint(J,v.y+
-v.height+H)),k.push(new mxPoint(J,I.y-H)));else v=z[0],L=z[2],c=v.y+v.height+(L.y-v.y-v.height-p.height)/2,k.push(new mxPoint(J,v.y+v.height+H)),k.push(new mxPoint(J,c-H)),k.push(new mxPoint(J,c+p.height+H)),k.push(new mxPoint(J,L.y-H));for(L=0;L<k.length;L+=2)y=k[L],G=k[L+1],y=x(y,G,null!=M?M[L/2]:null,!0),y.node.style.visibility="visible",y.redraw(),A.push(y);for(L=k.length/2;null!=M&&L<M.length;L++)M[L].destroy();m.guidesArrVer=A;c-=d.y;k=!0}else C(!1,!0)}if(g||k)return p=new mxPoint(e,c),z=b.call(this,
-d,p,u,E),g&&!k?p.y=z.y:k&&!g&&(p.x=z.x),z.y!=p.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),z.x!=p.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),p;C(!0,!0);return b.apply(this,arguments)};var f=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(d){f.call(this,d);var t=this.guidesArrVer,u=this.guidesArrHor;if(null!=t)for(var E=0;E<t.length;E++)t[E].node.style.visibility=d?"visible":"hidden";if(null!=
-u)for(E=0;E<u.length;E++)u[E].node.style.visibility=d?"visible":"hidden"};var l=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){l.call(this);var d=this.guidesArrVer,t=this.guidesArrHor;if(null!=d){for(var u=0;u<d.length;u++)d[u].destroy();this.guidesArrVer=null}if(null!=t){for(u=0;u<t.length;u++)t[u].destroy();this.guidesArrHor=null}}})();function mxRuler(b,f,l,d){function t(){var J=b.diagramContainer;m.style.top=J.offsetTop-e+"px";m.style.left=J.offsetLeft-e+"px";m.style.width=(l?0:J.offsetWidth)+e+"px";m.style.height=(l?J.offsetHeight:0)+e+"px"}function u(J,q,D){if(null!=E)return J;var A;return function(){var C=this,G=arguments,M=D&&!A;clearTimeout(A);A=setTimeout(function(){A=null;D||J.apply(C,G)},q);M&&J.apply(C,G)}}var E=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,
+null);y.apply(this,arguments)};var L=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(z){L.apply(this,arguments);if(z){var C=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=C&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=C||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),
+null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var N=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(z){z=N.apply(this,arguments);var C=this.editorUi,G=C.editor.graph;if(G.isEnabled()&&"1"==urlParams.sketch){var H=this.createOption(mxResources.get("sketch"),function(){return Editor.sketchMode},function(M,F){C.setSketchMode(!Editor.sketchMode);null!=F&&mxEvent.isShiftDown(F)||G.updateCellStyles({sketch:M?
+"1":null},G.getVerticesAndEdges())},{install:function(M){this.listener=function(){M(Editor.sketchMode)};C.addListener("sketchModeChanged",this.listener)},destroy:function(){C.removeListener(this.listener)}});z.appendChild(H)}return z};var I=Menus.prototype.init;Menus.prototype.init=function(){I.apply(this,arguments);var z=this.editorUi,C=z.editor.graph;z.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";z.actions.get("createShape").label=mxResources.get("shape")+"...";z.actions.get("outline").label=
+mxResources.get("outline")+"...";z.actions.get("layers").label=mxResources.get("layers")+"...";z.actions.get("tags").label=mxResources.get("tags")+"...";z.actions.get("comments").label=mxResources.get("comments")+"...";var G=z.actions.put("toggleDarkMode",new Action(mxResources.get("dark"),function(P){z.setDarkMode(!Editor.darkMode)}));G.setToggleAction(!0);G.setSelectedCallback(function(){return Editor.isDarkMode()});G=z.actions.put("toggleSketchMode",new Action(mxResources.get("sketch"),function(P){z.setSketchMode(!Editor.sketchMode)}));
+G.setToggleAction(!0);G.setSelectedCallback(function(){return Editor.sketchMode});G=z.actions.put("togglePagesVisible",new Action(mxResources.get("pages"),function(P){z.setPagesVisible(!Editor.pagesVisible)}));G.setToggleAction(!0);G.setSelectedCallback(function(){return Editor.pagesVisible});z.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){C.popupMenuHandler.hideMenu();z.showImportCsvDialog()}));z.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var P=
+new ParseDialog(z,"Insert from Text");z.showDialog(P.container,620,420,!0,!1);P.init()}));z.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var P=new ParseDialog(z,"Insert from Text","formatSql");z.showDialog(P.container,620,420,!0,!1);P.init()}));z.actions.put("toggleShapes",new Action(mxResources.get("1"==urlParams.sketch?"moreShapes":"shapes")+"...",function(){l(z)},null,null,Editor.ctrlKey+"+Shift+K"));z.actions.put("toggleFormat",new Action(mxResources.get("format")+
+"...",function(){b(z)})).shortcut=z.actions.get("formatPanel").shortcut;EditorUi.enablePlantUml&&!z.isOffline()&&z.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var P=new ParseDialog(z,mxResources.get("plantUml")+"...","plantUml");z.showDialog(P.container,620,420,!0,!1);P.init()}));z.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var P=new ParseDialog(z,mxResources.get("mermaid")+"...","mermaid");z.showDialog(P.container,620,420,!0,!1);
+P.init()}));var H=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,function(P,V){var W=this.editorUi.editor.graph,n=W.getSelectionCell();H.call(this,P,n,null,V);this.addMenuItems(P,["editTooltip"],V);W.model.isVertex(n)&&this.addMenuItems(P,["editGeometry"],V);this.addMenuItems(P,["-","edit"],V)})));this.addPopupMenuCellEditItems=function(P,V,W,n){P.addSeparator();this.addSubmenu("editCell",P,n,mxResources.get("edit"))};this.put("file",new Menu(mxUtils.bind(this,function(P,
+V){var W=z.getCurrentFile();z.menus.addMenuItems(P,["new"],V);z.menus.addSubmenu("openFrom",P,V);isLocalStorage&&this.addSubmenu("openRecent",P,V);P.addSeparator(V);null!=W&&W.constructor==DriveFile?z.menus.addMenuItems(P,["save","rename","makeCopy","moveToFolder"],V):(z.menus.addMenuItems(P,["save","saveAs","-","rename"],V),z.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(P,["upload"],V):z.menus.addMenuItems(P,["makeCopy"],V));P.addSeparator(V);
+null!=W&&(W.isRevisionHistorySupported()&&z.menus.addMenuItems(P,["revisionHistory"],V),W.constructor==DriveFile&&z.menus.addMenuItems(P,["openFolder"],V),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||W.constructor==LocalFile&&null==W.fileHandle||z.menus.addMenuItems(P,["synchronize"],V));z.menus.addMenuItems(P,["autosave"],V);if(null!=W){P.addSeparator(V);"1"==urlParams.sketch&&z.commentsSupported()&&z.menus.addMenuItems(P,["comments"],V);if(null!=z.fileNode&&"1"!=urlParams.embedInline){var n=null!=
+W.getTitle()?W.getTitle():z.defaultFilename;(W.constructor==DriveFile&&null!=W.sync&&W.sync.isConnected()||!/(\.html)$/i.test(n)&&!/(\.svg)$/i.test(n))&&this.addMenuItems(P,["properties"],V)}W.constructor==DriveFile&&z.menus.addMenuItems(P,["share"],V)}})));this.put("diagram",new Menu(mxUtils.bind(this,function(P,V){var W=z.getCurrentFile();z.menus.addSubmenu("extras",P,V,mxResources.get("preferences"));P.addSeparator(V);if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)z.menus.addMenuItems(P,"new open - synchronize - save saveAs -".split(" "),
+V);else if("1"==urlParams.embed||z.mode==App.MODE_ATLAS){"1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&z.menus.addMenuItems(P,["-","save"],V);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||z.mode==App.MODE_ATLAS)z.menus.addMenuItems(P,["saveAndExit"],V),null!=W&&W.isRevisionHistorySupported()&&z.menus.addMenuItems(P,["revisionHistory"],V);P.addSeparator(V)}else z.mode==App.MODE_ATLAS?z.menus.addMenuItems(P,["save","synchronize","-"],V):"1"!=urlParams.noFileMenu&&
+("1"!=urlParams.sketch?(z.menus.addMenuItems(P,["new"],V),z.menus.addSubmenu("openFrom",P,V),isLocalStorage&&this.addSubmenu("openRecent",P,V),P.addSeparator(V),null!=W&&(W.constructor==DriveFile&&z.menus.addMenuItems(P,["share"],V),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||W.constructor==LocalFile||z.menus.addMenuItems(P,["synchronize"],V)),P.addSeparator(V),z.menus.addSubmenu("save",P,V)):z.menus.addSubmenu("file",P,V));z.menus.addSubmenu("exportAs",P,V);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?
+z.menus.addMenuItems(P,["import"],V):"1"!=urlParams.noFileMenu&&z.menus.addSubmenu("importFrom",P,V);"1"!=urlParams.embed&&"1"==urlParams.sketch&&"1"!=urlParams.noFileMenu||!z.commentsSupported()||z.menus.addMenuItems(P,["-","comments"],V);z.menus.addMenuItems(P,"- findReplace layers tags - pageSetup".split(" "),V);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||z.menus.addMenuItems(P,["print"],V);"1"!=urlParams.sketch&&null!=W&&null!=z.fileNode&&"1"!=urlParams.embedInline&&(W=null!=
+W.getTitle()?W.getTitle():z.defaultFilename,/(\.html)$/i.test(W)||/(\.svg)$/i.test(W)||this.addMenuItems(P,["-","properties"]));P.addSeparator(V);z.menus.addSubmenu("help",P,V);"1"==urlParams.embed||z.mode==App.MODE_ATLAS?("1"!=urlParams.noExitBtn||z.mode==App.MODE_ATLAS)&&z.menus.addMenuItems(P,["-","exit"],V):"1"!=urlParams.noFileMenu&&z.menus.addMenuItems(P,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(P,V){var W=z.getCurrentFile();null!=W&&W.constructor==DriveFile?z.menus.addMenuItems(P,
+["save","makeCopy","-","rename","moveToFolder"],V):(z.menus.addMenuItems(P,["save","saveAs","-","rename"],V),z.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(P,["upload"],V):z.menus.addMenuItems(P,["makeCopy"],V));z.menus.addMenuItems(P,["-","autosave"],V);null!=W&&W.isRevisionHistorySupported()&&z.menus.addMenuItems(P,["-","revisionHistory"],V)})));var M=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(P,V){M.funct(P,
+V);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||z.menus.addMenuItems(P,["publishLink"],V);z.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(P.addSeparator(V),z.menus.addSubmenu("embed",P,V))})));var F=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(P,V){z.menus.addInsertTableCellItem(P,V)})));if("1"==urlParams.sketch){var J=this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(P,V){J.funct(P,V);this.addMenuItems(P,["-","pageScale","-","ruler"],V)})))}this.put("extras",
+new Menu(mxUtils.bind(this,function(P,V){null!=F&&z.menus.addSubmenu("language",P,V);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&z.mode!=App.MODE_ATLAS&&z.menus.addSubmenu("theme",P,V);z.menus.addSubmenu("units",P,V);P.addSeparator(V);"1"!=urlParams.sketch&&z.menus.addMenuItems(P,"pageScale ruler scrollbars - tooltips copyConnect collapseExpand".split(" "),V);"1"!=urlParams.embedInline&&"1"!=urlParams.sketch&&"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&z.mode!=App.MODE_ATLAS&&
+z.menus.addMenuItems(P,["-","showStartScreen","search","scratchpad"],V);P.addSeparator(V);"1"==urlParams.sketch?z.menus.addMenuItems(P,"configuration - copyConnect collapseExpand tooltips -".split(" "),V):(z.mode!=App.MODE_ATLAS&&z.menus.addMenuItem(P,"configuration",V),!z.isOfflineApp()&&isLocalStorage&&z.mode!=App.MODE_ATLAS&&z.menus.addMenuItem(P,"plugins",V));EditorUi.isElectronApp&&z.menus.addMenuItems(P,["-","spellCheck","autoBkp","drafts","-"],V);var W=z.getCurrentFile();null!=W&&W.isRealtimeEnabled()&&
+W.isRealtimeSupported()&&this.addMenuItems(P,["-","showRemoteCursors","shareCursor","-"],V);P.addSeparator(V);z.mode!=App.MODE_ATLAS&&this.addMenuItems(P,["fullscreen"],V);("1"!=urlParams.embedInline&&Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(P,["toggleDarkMode"],V);P.addSeparator(V)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(P,V){z.menus.addMenuItems(P,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),
+V)})));mxUtils.bind(this,function(){var P=this.get("insert"),V=P.funct;P.funct=function(W,n){"1"==urlParams.sketch?(z.insertTemplateEnabled&&!z.isOffline()&&z.menus.addMenuItems(W,["insertTemplate"],n),z.menus.addMenuItems(W,["insertImage","insertLink","-"],n),z.menus.addSubmenu("insertAdvanced",W,n,mxResources.get("advanced")),z.menus.addSubmenu("layout",W,n)):(V.apply(this,arguments),z.menus.addSubmenu("table",W,n))}})();var Q="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),
+X=function(P,V,W,n){P.addItem(W,null,mxUtils.bind(this,function(){var B=new CreateGraphDialog(z,W,n);z.showDialog(B.container,620,420,!0,!1);B.init()}),V)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(P,V){for(var W=0;W<Q.length;W++)"-"==Q[W]?P.addSeparator(V):X(P,V,mxResources.get(Q[W])+"...",Q[W])})))};EditorUi.prototype.installFormatToolbar=function(z){var C=this.editor.graph,G=document.createElement("div");G.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(H,M){0<C.getSelectionCount()?(z.appendChild(G),G.innerHTML="Selected: "+C.getSelectionCount()):null!=G.parentNode&&G.parentNode.removeChild(G)}))};var q=!1;EditorUi.prototype.initFormatWindow=function(){if(!q&&null!=this.formatWindow){q=!0;this.formatWindow.window.setClosable(!1);var z=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){z.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(C){mxEvent.getSource(C)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var D=EditorUi.prototype.init;EditorUi.prototype.init=function(){function z(ca,
+fa,ra){var ka=F.menus.get(ca),la=P.addMenu(mxResources.get(ca),mxUtils.bind(this,function(){ka.funct.apply(this,arguments)}),X);la.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";la.style.display="inline-block";la.style.boxSizing="border-box";la.style.top="6px";la.style.marginRight="6px";la.style.height="30px";la.style.paddingTop="6px";la.style.paddingBottom="6px";la.style.cursor="pointer";la.setAttribute("title",mxResources.get(ca));F.menus.menuCreated(ka,la,"geMenuItem");null!=ra?
+(la.style.backgroundImage="url("+ra+")",la.style.backgroundPosition="center center",la.style.backgroundRepeat="no-repeat",la.style.backgroundSize="24px 24px",la.style.width="34px",la.innerText=""):fa||(la.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",la.style.backgroundPosition="right 6px center",la.style.backgroundRepeat="no-repeat",la.style.paddingRight="22px");return la}function C(ca,fa,ra,ka,la,oa){var ta=document.createElement("a");ta.className="1"==urlParams.sketch?"geToolbarButton":
+"geMenuItem";ta.style.display="inline-block";ta.style.boxSizing="border-box";ta.style.height="30px";ta.style.padding="6px";ta.style.position="relative";ta.style.verticalAlign="top";ta.style.top="0px";"1"==urlParams.sketch&&(ta.style.borderStyle="none",ta.style.boxShadow="none",ta.style.padding="6px",ta.style.margin="0px");null!=F.statusContainer?Q.insertBefore(ta,F.statusContainer):Q.appendChild(ta);null!=oa?(ta.style.backgroundImage="url("+oa+")",ta.style.backgroundPosition="center center",ta.style.backgroundRepeat=
+"no-repeat",ta.style.backgroundSize="24px 24px",ta.style.width="34px"):mxUtils.write(ta,ca);mxEvent.addListener(ta,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(La){La.preventDefault()}));mxEvent.addListener(ta,"click",function(La){"disabled"!=ta.getAttribute("disabled")&&fa(La);mxEvent.consume(La)});null==ra&&(ta.style.marginRight="4px");null!=ka&&ta.setAttribute("title",ka);null!=la&&(ca=function(){la.isEnabled()?(ta.removeAttribute("disabled"),ta.style.cursor="pointer"):
+(ta.setAttribute("disabled","disabled"),ta.style.cursor="default")},la.addListener("stateChanged",ca),J.addListener("enabledChanged",ca),ca());return ta}function G(ca,fa,ra){ra=document.createElement("div");ra.className="geMenuItem";ra.style.display="inline-block";ra.style.verticalAlign="top";ra.style.marginRight="6px";ra.style.padding="0 4px 0 4px";ra.style.height="30px";ra.style.position="relative";ra.style.top="0px";"1"==urlParams.sketch&&(ra.style.boxShadow="none");for(var ka=0;ka<ca.length;ka++)null!=
+ca[ka]&&("1"==urlParams.sketch&&(ca[ka].style.padding="10px 8px",ca[ka].style.width="30px"),ca[ka].style.margin="0px",ca[ka].style.boxShadow="none",ra.appendChild(ca[ka]));null!=fa&&mxUtils.setOpacity(ra,fa);null!=F.statusContainer&&"1"!=urlParams.sketch?Q.insertBefore(ra,F.statusContainer):Q.appendChild(ra);return ra}function H(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(S.style.left=58>U.offsetTop-U.offsetHeight/2?"70px":"10px");else{for(var ca=Q.firstChild;null!=ca;){var fa=ca.nextSibling;
+"geMenuItem"!=ca.className&&"geItem"!=ca.className||ca.parentNode.removeChild(ca);ca=fa}X=Q.firstChild;d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;ca=1E3>d||"1"==urlParams.sketch;var ra=null;ca||(ra=z("diagram"));fa=ca?z("diagram",null,Editor.drawLogoImage):null;null!=fa&&(ra=fa);G([ra,C(mxResources.get("shapes"),F.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),F.actions.get("image"),ca?Editor.shapesImage:null),C(mxResources.get("format"),
+F.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+F.actions.get("formatPanel").shortcut+")",F.actions.get("image"),ca?Editor.formatImage:null)],ca?60:null);fa=z("insert",!0,ca?R:null);G([fa,C(mxResources.get("delete"),F.actions.get("delete").funct,null,mxResources.get("delete"),F.actions.get("delete"),ca?Editor.trashImage:null)],ca?60:null);411<=d&&(G([Ja,Ea],60),520<=d&&G([ua,640<=d?C("",Ga.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",Ga,Editor.zoomInImage):
+null,640<=d?C("",sa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",sa,Editor.zoomOutImage):null],60))}null!=ra&&(mxEvent.disableContextMenu(ra),mxEvent.addGestureListeners(ra,mxUtils.bind(this,function(ka){(mxEvent.isShiftDown(ka)||mxEvent.isAltDown(ka)||mxEvent.isMetaDown(ka)||mxEvent.isControlDown(ka)||mxEvent.isPopupTrigger(ka))&&F.appIconClicked(ka)}),null,null));fa=F.menus.get("language");null!=fa&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=d&&"1"!=urlParams.sketch?
+(null==qa&&(fa=P.addMenu("",fa.funct),fa.setAttribute("title",mxResources.get("language")),fa.className="geToolbarButton",fa.style.backgroundImage="url("+Editor.globeImage+")",fa.style.backgroundPosition="center center",fa.style.backgroundRepeat="no-repeat",fa.style.backgroundSize="24px 24px",fa.style.position="absolute",fa.style.height="24px",fa.style.width="24px",fa.style.zIndex="1",fa.style.right="8px",fa.style.cursor="pointer",fa.style.top="1"==urlParams.embed?"12px":"11px",Q.appendChild(fa),
+qa=fa),F.buttonContainer.style.paddingRight="34px"):(F.buttonContainer.style.paddingRight="4px",null!=qa&&(qa.parentNode.removeChild(qa),qa=null))}D.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 M=document.createElement("div");M.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";
+M.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(M);"1"==urlParams.sketch&&null!=this.sidebar&&this.isSettingsEnabled()&&(this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save()),this.sidebar.showPalette("search",mxSettings.settings.search));if("1"!=urlParams.sketch&&1E3<=d||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])l(this,
+!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));var F=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==F.embedViewport)mxUtils.fit(this.div);else{var ca=parseInt(this.div.offsetLeft),fa=parseInt(this.div.offsetWidth),ra=F.embedViewport.x+F.embedViewport.width,ka=parseInt(this.div.offsetTop),la=parseInt(this.div.offsetHeight),oa=F.embedViewport.y+
+F.embedViewport.height;this.div.style.left=Math.max(F.embedViewport.x,Math.min(ca,ra-fa))+"px";this.div.style.top=Math.max(F.embedViewport.y,Math.min(ka,oa-la))+"px";this.div.style.height=Math.min(F.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(F.embedViewport.width,parseInt(this.div.style.width))+"px"}};this.keyHandler.bindAction(75,!0,"toggleShapes",!0);EditorUi.windowed&&("1"==urlParams.sketch||1E3<=d)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?
+(this.initFormatWindow(),M=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>d||708>M)?this.formatWindow.window.toggleMinimized():this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));F=this;var J=F.editor.graph;F.toolbar=this.createToolbar(F.createDiv("geToolbar"));F.defaultLibraryName=mxResources.get("untitledLibrary");var Q=document.createElement("div");Q.className="geMenubarContainer";var X=null,P=new Menubar(F,
+Q);F.statusContainer=F.createStatusContainer();F.statusContainer.style.position="relative";F.statusContainer.style.maxWidth="";F.statusContainer.style.marginTop="7px";F.statusContainer.style.marginLeft="6px";F.statusContainer.style.color="gray";F.statusContainer.style.cursor="default";var V=F.hideCurrentMenu;F.hideCurrentMenu=function(){V.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var W=F.descriptorChanged;F.descriptorChanged=function(){W.apply(this,arguments);var ca=F.getCurrentFile();
+if(null!=ca&&null!=ca.getTitle()){var fa=ca.getMode();"google"==fa?fa="googleDrive":"github"==fa?fa="gitHub":"gitlab"==fa?fa="gitLab":"onedrive"==fa&&(fa="oneDrive");fa=mxResources.get(fa);Q.setAttribute("title",ca.getTitle()+(null!=fa?" ("+fa+")":""))}else Q.removeAttribute("title")};F.setStatusText(F.editor.getStatus());Q.appendChild(F.statusContainer);F.buttonContainer=document.createElement("div");F.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";
+Q.appendChild(F.buttonContainer);F.menubarContainer=F.buttonContainer;F.tabContainer=document.createElement("div");F.tabContainer.className="geTabContainer";F.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";M=F.diagramContainer.parentNode;var n=document.createElement("div");n.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";F.diagramContainer.style.top="1"==urlParams.sketch?
+"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){n.style.top="20px";F.titlebar=document.createElement("div");F.titlebar.style.cssText="position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var B=document.createElement("div");B.style.cssText="max-width: calc(100% - 100px);text-overflow: ellipsis;user-select:none;height:20px;margin: 2px 10px;font-size: 12px;white-space: nowrap;overflow: hidden;";F.titlebar.appendChild(B);M.appendChild(F.titlebar)}B=
+F.menus.get("viewZoom");var K=B.funct;B.funct=function(ca,fa){K.apply(this,arguments);F.menus.addMenuItems(ca,["-","outline"],fa)};var R="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,O="1"==urlParams.sketch?document.createElement("div"):null,U="1"==urlParams.sketch?document.createElement("div"):null,S="1"==urlParams.sketch?document.createElement("div"):null,T=mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.refresh();J.refresh();J.view.validateBackground()});F.addListener("darkModeChanged",
+T);F.addListener("sketchModeChanged",T);var Y=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)S.style.left="10px",S.style.top="10px",U.style.left="10px",U.style.top="60px",O.style.top="10px",O.style.right="12px",O.style.left="",F.diagramContainer.setAttribute("data-bounds",F.diagramContainer.style.top+" "+F.diagramContainer.style.left+" "+F.diagramContainer.style.width+" "+F.diagramContainer.style.height),F.diagramContainer.style.top="0px",F.diagramContainer.style.left="0px",F.diagramContainer.style.bottom=
+"0px",F.diagramContainer.style.right="0px",F.diagramContainer.style.width="",F.diagramContainer.style.height="";else{var ca=F.diagramContainer.getAttribute("data-bounds");if(null!=ca){F.diagramContainer.style.background="transparent";F.diagramContainer.removeAttribute("data-bounds");var fa=J.getGraphBounds();ca=ca.split(" ");F.diagramContainer.style.top=ca[0];F.diagramContainer.style.left=ca[1];F.diagramContainer.style.width=fa.width+50+"px";F.diagramContainer.style.height=fa.height+46+"px";F.diagramContainer.style.bottom=
+"";F.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:F.diagramContainer.getBoundingClientRect()}),"*");F.refresh()}S.style.left=F.diagramContainer.offsetLeft+"px";S.style.top=F.diagramContainer.offsetTop-S.offsetHeight-4+"px";U.style.display="";U.style.left=F.diagramContainer.offsetLeft-U.offsetWidth-4+"px";U.style.top=F.diagramContainer.offsetTop+"px";O.style.left=F.diagramContainer.offsetLeft+F.diagramContainer.offsetWidth-O.offsetWidth+
+"px";O.style.top=S.style.top;O.style.right="";F.bottomResizer.style.left=F.diagramContainer.offsetLeft+(F.diagramContainer.offsetWidth-F.bottomResizer.offsetWidth)/2+"px";F.bottomResizer.style.top=F.diagramContainer.offsetTop+F.diagramContainer.offsetHeight-F.bottomResizer.offsetHeight/2-1+"px";F.rightResizer.style.left=F.diagramContainer.offsetLeft+F.diagramContainer.offsetWidth-F.rightResizer.offsetWidth/2-1+"px";F.rightResizer.style.top=F.diagramContainer.offsetTop+(F.diagramContainer.offsetHeight-
+F.bottomResizer.offsetHeight)/2+"px"}F.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";F.rightResizer.style.visibility=F.bottomResizer.style.visibility;Q.style.display="none";S.style.visibility="";O.style.visibility=""}),ba=mxUtils.bind(this,function(){Pa.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";
+Y()});T=mxUtils.bind(this,function(){ba();b(F,!0);F.initFormatWindow();var ca=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(ca.x+ca.width+4,ca.y)});F.addListener("inlineFullscreenChanged",ba);F.addListener("editInlineStart",T);"1"==urlParams.embedInline&&F.addListener("darkModeChanged",T);F.addListener("editInlineStop",mxUtils.bind(this,function(ca){F.diagramContainer.style.width="10px";F.diagramContainer.style.height="10px";F.diagramContainer.style.border="";
+F.bottomResizer.style.visibility="hidden";F.rightResizer.style.visibility="hidden";S.style.visibility="hidden";O.style.visibility="hidden";U.style.display="none"}));if(null!=F.hoverIcons){var aa=F.hoverIcons.update;F.hoverIcons.update=function(){J.freehand.isDrawing()||aa.apply(this,arguments)}}if(null!=J.freehand){var da=J.freehand.createStyle;J.freehand.createStyle=function(ca){return da.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){U.className="geToolbarContainer";O.className="geToolbarContainer";
+S.className="geToolbarContainer";Q.className="geToolbarContainer";F.picker=U;var ha=!1;"1"!=urlParams.embed&&"atlassian"!=F.getServiceName()&&(mxEvent.addListener(Q,"mouseenter",function(){F.statusContainer.style.display="inline-block"}),mxEvent.addListener(Q,"mouseleave",function(){ha||(F.statusContainer.style.display="none")}));var ma=mxUtils.bind(this,function(ca){null!=F.notificationBtn&&(null!=ca?F.notificationBtn.setAttribute("title",ca):F.notificationBtn.removeAttribute("title"))});Q.style.visibility=
+20>Q.clientWidth?"hidden":"";F.editor.addListener("statusChanged",mxUtils.bind(this,function(){F.setStatusText(F.editor.getStatus());if("1"!=urlParams.embed&&"atlassian"!=F.getServiceName())if(F.statusContainer.style.display="inline-block",ha=!0,1==F.statusContainer.children.length&&""==F.editor.getStatus())Q.style.visibility="hidden";else{if(0==F.statusContainer.children.length||1==F.statusContainer.children.length&&"function"===typeof F.statusContainer.firstChild.getAttribute&&null==F.statusContainer.firstChild.getAttribute("class")){var ca=
+null!=F.statusContainer.firstChild&&"function"===typeof F.statusContainer.firstChild.getAttribute?F.statusContainer.firstChild.getAttribute("title"):F.editor.getStatus();ma(ca);var fa=F.getCurrentFile();fa=null!=fa?fa.savingStatusKey:DrawioFile.prototype.savingStatusKey;ca==mxResources.get(fa)+"..."?(F.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(fa))+'..."src="'+Editor.tailSpin+'">',F.statusContainer.style.display="inline-block",ha=!0):6<F.buttonContainer.clientWidth&&
+(F.statusContainer.style.display="none",ha=!1)}else F.statusContainer.style.display="inline-block",ma(null),ha=!0;Q.style.visibility=20>Q.clientWidth&&!ha?"hidden":""}}));ja=z("diagram",null,Editor.menuImage);ja.style.boxShadow="none";ja.style.padding="6px";ja.style.margin="0px";S.appendChild(ja);mxEvent.disableContextMenu(ja);mxEvent.addGestureListeners(ja,mxUtils.bind(this,function(ca){(mxEvent.isShiftDown(ca)||mxEvent.isAltDown(ca)||mxEvent.isMetaDown(ca)||mxEvent.isControlDown(ca)||mxEvent.isPopupTrigger(ca))&&
+this.appIconClicked(ca)}),null,null);F.statusContainer.style.position="";F.statusContainer.style.display="none";F.statusContainer.style.margin="0px";F.statusContainer.style.padding="6px 0px";F.statusContainer.style.maxWidth=Math.min(d-240,280)+"px";F.statusContainer.style.display="inline-block";F.statusContainer.style.textOverflow="ellipsis";F.buttonContainer.style.position="";F.buttonContainer.style.paddingRight="0px";F.buttonContainer.style.display="inline-block";var Z=document.createElement("a");
+Z.style.padding="0px";Z.style.boxShadow="none";Z.className="geMenuItem";Z.style.display="inline-block";Z.style.width="40px";Z.style.height="12px";Z.style.marginBottom="-2px";Z.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";Z.style.backgroundPosition="top center";Z.style.backgroundRepeat="no-repeat";Z.setAttribute("title","Minimize");var Fa=!1,Ca=mxUtils.bind(this,function(){U.innerText="";if(!Fa){var ca=function(ka,la,oa){ka=C("",ka.funct,null,la,ka,oa);ka.style.width="40px";ka.style.opacity=
+"0.7";return fa(ka,null,"pointer")},fa=function(ka,la,oa){null!=la&&ka.setAttribute("title",la);ka.style.cursor=null!=oa?oa:"default";ka.style.margin="2px 0px";U.appendChild(ka);mxUtils.br(U);return ka};fa(F.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text"),!0,!1,null,!0,!0),mxResources.get("text")+" ("+Editor.ctrlKey+"+Shift+X)");fa(F.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,!1,null,!0),mxResources.get("note"));fa(F.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle"),!0,!1,null,!0),mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");fa(F.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse"),!0,!1,null,!0),mxResources.get("ellipse"));(function(){var ka=new mxCell("",new mxGeometry(0,0,J.defaultEdgeLength,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");
+ka.geometry.setTerminalPoint(new mxPoint(0,0),!0);ka.geometry.setTerminalPoint(new mxPoint(ka.geometry.width,0),!1);ka.geometry.points=[];ka.geometry.relative=!0;ka.edge=!0;fa(F.sidebar.createEdgeTemplateFromCells([ka],ka.geometry.width,ka.geometry.height,mxResources.get("line"),!0,null,!0,!1),mxResources.get("line"));ka=ka.clone();ka.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";ka.geometry.width=J.defaultEdgeLength+20;ka.geometry.setTerminalPoint(new mxPoint(0,
+20),!0);ka.geometry.setTerminalPoint(new mxPoint(ka.geometry.width,20),!1);ka=fa(F.sidebar.createEdgeTemplateFromCells([ka],ka.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"));ka.style.borderBottom="1px solid "+(Editor.isDarkMode()?"#505050":"lightgray");ka.style.paddingBottom="14px";ka.style.marginBottom="14px"})();ca(F.actions.get("insertFreehand"),mxResources.get("freehand"),Editor.freehandImage);var ra=F.actions.get("toggleShapes");ca(ra,mxResources.get("shapes")+
+" ("+ra.shortcut+")",R);ja=z("table",null,Editor.calendarImage);ja.style.boxShadow="none";ja.style.opacity="0.7";ja.style.padding="6px";ja.style.margin="0px";ja.style.width="37px";fa(ja,null,"pointer");ja=z("insert",null,Editor.plusImage);ja.style.boxShadow="none";ja.style.opacity="0.7";ja.style.padding="6px";ja.style.margin="0px";ja.style.width="37px";fa(ja,null,"pointer")}"1"!=urlParams.embedInline&&U.appendChild(Z)});mxEvent.addListener(Z,"click",mxUtils.bind(this,function(){Fa?(mxUtils.setPrefixedStyle(U.style,
+"transform","translate(0, -50%)"),U.style.padding="8px 6px 4px",U.style.top="50%",U.style.bottom="",U.style.height="",Z.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",Z.style.width="40px",Z.style.height="12px",Z.setAttribute("title","Minimize"),Fa=!1,Ca()):(U.innerText="",U.appendChild(Z),mxUtils.setPrefixedStyle(U.style,"transform","translate(0, 0)"),U.style.top="",U.style.bottom="12px",U.style.padding="0px",U.style.height="24px",Z.style.height="24px",Z.style.backgroundImage=
+"url("+Editor.plusImage+")",Z.setAttribute("title",mxResources.get("insert")),Z.style.width="24px",Fa=!0)}));Ca();F.addListener("darkModeChanged",Ca);F.addListener("sketchModeChanged",Ca)}else F.editor.addListener("statusChanged",mxUtils.bind(this,function(){F.setStatusText(F.editor.getStatus())}));if(null!=B){var Ba=function(ca){mxEvent.isShiftDown(ca)?(F.hideCurrentMenu(),F.actions.get("smartFit").funct(),mxEvent.consume(ca)):mxEvent.isAltDown(ca)&&(F.hideCurrentMenu(),F.actions.get("customZoom").funct(),
+mxEvent.consume(ca))},Ga=F.actions.get("zoomIn"),sa=F.actions.get("zoomOut"),Ma=F.actions.get("resetView");T=F.actions.get("fullscreen");var Na=F.actions.get("undo"),za=F.actions.get("redo"),Ja=C("",Na.funct,null,mxResources.get("undo")+" ("+Na.shortcut+")",Na,Editor.undoImage),Ea=C("",za.funct,null,mxResources.get("redo")+" ("+za.shortcut+")",za,Editor.redoImage),Pa=C("",T.funct,null,mxResources.get("fullscreen"),T,Editor.fullscreenImage);if(null!=O){Ma=function(){ia.style.display=null!=F.pages&&
+("0"!=urlParams.pages||1<F.pages.length||Editor.pagesVisible)?"inline-block":"none"};var ya=function(){ia.innerText="";if(null!=F.currentPage){mxUtils.write(ia,F.currentPage.getName());var ca=null!=F.pages?F.pages.length:1,fa=F.getPageIndex(F.currentPage);fa=null!=fa?fa+1:1;var ra=F.currentPage.getId();ia.setAttribute("title",F.currentPage.getName()+" ("+fa+"/"+ca+")"+(null!=ra?" ["+ra+"]":""))}};Pa.parentNode.removeChild(Pa);var Aa=F.actions.get("delete"),wa=C("",Aa.funct,null,mxResources.get("delete"),
+Aa,Editor.trashImage);wa.style.opacity="0.1";S.appendChild(wa);Aa.addListener("stateChanged",function(){wa.style.opacity=Aa.enabled?"":"0.1"});var Ia=function(){Ja.style.display=0<F.editor.undoManager.history.length||J.isEditing()?"inline-block":"none";Ea.style.display=Ja.style.display;Ja.style.opacity=Na.enabled?"":"0.1";Ea.style.opacity=za.enabled?"":"0.1"};S.appendChild(Ja);S.appendChild(Ea);Na.addListener("stateChanged",Ia);za.addListener("stateChanged",Ia);Ia();var ia=this.createPageMenuTab(!1,
+!0);ia.style.display="none";ia.style.position="";ia.style.marginLeft="";ia.style.top="";ia.style.left="";ia.style.height="100%";ia.style.lineHeight="";ia.style.borderStyle="none";ia.style.padding="3px 0";ia.style.margin="0px";ia.style.background="";ia.style.border="";ia.style.boxShadow="none";ia.style.verticalAlign="top";ia.style.width="auto";ia.style.maxWidth="160px";ia.style.position="relative";ia.style.padding="6px";ia.style.textOverflow="ellipsis";ia.style.opacity="0.8";O.appendChild(ia);F.editor.addListener("pagesPatched",
+ya);F.editor.addListener("pageSelected",ya);F.editor.addListener("pageRenamed",ya);F.editor.addListener("fileLoaded",ya);ya();F.addListener("fileDescriptorChanged",Ma);F.addListener("pagesVisibleChanged",Ma);F.editor.addListener("pagesPatched",Ma);Ma();Ma=C("",sa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",sa,Editor.zoomOutImage);O.appendChild(Ma);var ja=P.addMenu("100%",B.funct);ja.setAttribute("title",mxResources.get("zoom"));ja.innerHTML="100%";ja.style.display=
+"inline-block";ja.style.color="inherit";ja.style.cursor="pointer";ja.style.textAlign="center";ja.style.whiteSpace="nowrap";ja.style.paddingRight="10px";ja.style.textDecoration="none";ja.style.verticalAlign="top";ja.style.padding="6px 0";ja.style.fontSize="14px";ja.style.width="40px";ja.style.opacity="0.4";O.appendChild(ja);B=C("",Ga.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",Ga,Editor.zoomInImage);O.appendChild(B);T.visible&&(O.appendChild(Pa),mxEvent.addListener(document,
+"fullscreenchange",function(){Pa.style.backgroundImage="url("+(null!=document.fullscreenElement?Editor.fullscreenExitImage:Editor.fullscreenImage)+")"}));"1"==urlParams.embedInline&&(B=F.actions.get("exit"),O.appendChild(C("",B.funct,null,mxResources.get("exit"),B,Editor.closeImage)));F.tabContainer.style.visibility="hidden";Q.style.cssText="position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px 0px 6px 6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
+S.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";O.style.cssText="position:absolute;right:14px;bottom:14px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";n.appendChild(S);n.appendChild(O);U.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";
+mxClient.IS_POINTER&&(U.style.touchAction="none");n.appendChild(U);window.setTimeout(function(){mxUtils.setPrefixedStyle(U.style,"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(n)}else{var ua=C("",Ba,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",Ma,Editor.zoomFitImage);Q.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";ja=P.addMenu("100%",
+B.funct);ja.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");ja.style.whiteSpace="nowrap";ja.style.paddingRight="10px";ja.style.textDecoration="none";ja.style.textDecoration="none";ja.style.overflow="hidden";ja.style.visibility="hidden";ja.style.textAlign="center";ja.style.cursor="pointer";ja.style.height=parseInt(F.tabContainerHeight)-1+"px";ja.style.lineHeight=parseInt(F.tabContainerHeight)+1+"px";ja.style.position="absolute";ja.style.display="block";ja.style.fontSize="12px";ja.style.width=
+"59px";ja.style.right="0px";ja.style.bottom="0px";ja.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";ja.style.backgroundPosition="right 6px center";ja.style.backgroundRepeat="no-repeat";n.appendChild(ja)}(function(ca){mxEvent.addListener(ca,"click",Ba);var fa=mxUtils.bind(this,function(){ca.innerText="";mxUtils.write(ca,Math.round(100*F.editor.graph.view.scale)+"%")});F.editor.graph.view.addListener(mxEvent.EVENT_SCALE,fa);F.editor.addListener("resetGraphView",fa);F.editor.addListener("pageSelected",
+fa)})(ja);var va=F.setGraphEnabled;F.setGraphEnabled=function(){va.apply(this,arguments);null!=this.tabContainer&&(ja.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==O?this.tabContainerHeight+"px":"0px")}}n.appendChild(Q);n.appendChild(F.diagramContainer);M.appendChild(n);F.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=d)&&"1"!=urlParams.embedInline&&b(this,!0);null==O&&n.appendChild(F.tabContainer);
+var qa=null;H();mxEvent.addListener(window,"resize",function(){H();null!=F.sidebarWindow&&F.sidebarWindow.window.fit();null!=F.formatWindow&&F.formatWindow.window.fit();null!=F.actions.outlineWindow&&F.actions.outlineWindow.window.fit();null!=F.actions.layersWindow&&F.actions.layersWindow.window.fit();null!=F.menus.tagsWindow&&F.menus.tagsWindow.window.fit();null!=F.menus.findWindow&&F.menus.findWindow.window.fit();null!=F.menus.findReplaceWindow&&F.menus.findReplaceWindow.window.fit()});if("1"==
+urlParams.embedInline){document.body.style.cursor="text";U.style.transform="";mxEvent.addGestureListeners(F.diagramContainer.parentNode,function(ca){mxEvent.getSource(ca)==F.diagramContainer.parentNode&&(F.embedExitPoint=new mxPoint(mxEvent.getClientX(ca),mxEvent.getClientY(ca)),F.sendEmbeddedSvgExport())});M=document.createElement("div");M.style.position="absolute";M.style.width="10px";M.style.height="10px";M.style.borderRadius="5px";M.style.border="1px solid gray";M.style.background="#ffffff";M.style.cursor=
+"row-resize";F.diagramContainer.parentNode.appendChild(M);F.bottomResizer=M;var xa=null,ea=null,na=null,pa=null;mxEvent.addGestureListeners(M,function(ca){pa=parseInt(F.diagramContainer.style.height);ea=mxEvent.getClientY(ca);J.popupMenuHandler.hideMenu();mxEvent.consume(ca)});M=M.cloneNode(!1);M.style.cursor="col-resize";F.diagramContainer.parentNode.appendChild(M);F.rightResizer=M;mxEvent.addGestureListeners(M,function(ca){na=parseInt(F.diagramContainer.style.width);xa=mxEvent.getClientX(ca);J.popupMenuHandler.hideMenu();
+mxEvent.consume(ca)});mxEvent.addGestureListeners(document.body,null,function(ca){var fa=!1;null!=xa&&(F.diagramContainer.style.width=Math.max(20,na+mxEvent.getClientX(ca)-xa)+"px",fa=!0);null!=ea&&(F.diagramContainer.style.height=Math.max(20,pa+mxEvent.getClientY(ca)-ea)+"px",fa=!0);fa&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:F.diagramContainer.getBoundingClientRect()}),"*"),Y(),F.refresh())},function(ca){null==xa&&null==
+ea||mxEvent.consume(ca);ea=xa=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";F.bottomResizer.style.visibility="hidden";F.rightResizer.style.visibility="hidden";S.style.visibility="hidden";O.style.visibility="hidden";U.style.display="none"}"1"==urlParams.prefetchFonts&&F.editor.loadFonts()}}};
+(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var f=EditorUi.initTheme;EditorUi.initTheme=function(){f.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(d,t,u,E){var c=t.y,e=t.x,g=!1,k=!1;if(null!=this.states&&null!=d&&null!=t){var m=this,p=new mxCellState,v=this.graph.getView().scale,x=Math.max(2,this.getGuideTolerance()/2);p.x=d.x+e;p.y=d.y+c;p.width=d.width;p.height=d.height;for(var A=[],y=[],L=0;L<this.states.length;L++){var N=this.states[L];N instanceof mxCellState&&(E||!this.graph.isCellSelected(N.cell))&&((p.x>=N.x&&p.x<=N.x+N.width||N.x>=p.x&&N.x<=p.x+p.width)&&(p.y>
+N.y+N.height+4||p.y+p.height+4<N.y)?A.push(N):(p.y>=N.y&&p.y<=N.y+N.height||N.y>=p.y&&N.y<=p.y+p.height)&&(p.x>N.x+N.width+4||p.x+p.width+4<N.x)&&y.push(N))}var I=0,q=0,D=N=0,z=0,C=0,G=0,H=0,M=5*v;if(1<A.length){A.push(p);A.sort(function(X,P){return X.y-P.y});var F=!1;L=p==A[0];v=p==A[A.length-1];if(!L&&!v)for(L=1;L<A.length-1;L++)if(p==A[L]){v=A[L-1];L=A[L+1];N=q=D=(L.y-v.y-v.height-p.height)/2;break}for(L=0;L<A.length-1;L++){v=A[L];var J=A[L+1],Q=p==v||p==J;J=J.y-v.y-v.height;F|=p==v;if(0==q&&0==
+I)q=J,I=1;else if(Math.abs(q-J)<=(Q||1==L&&F?x:0))I+=1;else if(1<I&&F){A=A.slice(0,L+1);break}else if(3<=A.length-L&&!F)I=0,N=q=0!=D?D:0,A.splice(0,0==L?1:L),L=-1;else break;0!=N||Q||(q=N=J)}3==A.length&&A[1]==p&&(N=0)}if(1<y.length){y.push(p);y.sort(function(X,P){return X.x-P.x});F=!1;L=p==y[0];v=p==y[y.length-1];if(!L&&!v)for(L=1;L<y.length-1;L++)if(p==y[L]){v=y[L-1];L=y[L+1];G=C=H=(L.x-v.x-v.width-p.width)/2;break}for(L=0;L<y.length-1;L++){v=y[L];J=y[L+1];Q=p==v||p==J;J=J.x-v.x-v.width;F|=p==v;
+if(0==C&&0==z)C=J,z=1;else if(Math.abs(C-J)<=(Q||1==L&&F?x:0))z+=1;else if(1<z&&F){y=y.slice(0,L+1);break}else if(3<=y.length-L&&!F)z=0,G=C=0!=H?H:0,y.splice(0,0==L?1:L),L=-1;else break;0!=G||Q||(C=G=J)}3==y.length&&y[1]==p&&(G=0)}x=function(X,P,V,W){var n=[];if(W){W=M;var B=0}else W=0,B=M;n.push(new mxPoint(X.x-W,X.y-B));n.push(new mxPoint(X.x+W,X.y+B));n.push(X);n.push(P);n.push(new mxPoint(P.x-W,P.y-B));n.push(new mxPoint(P.x+W,P.y+B));if(null!=V)return V.points=n,V;X=new mxPolyline(n,mxConstants.GUIDE_COLOR,
+mxConstants.GUIDE_STROKEWIDTH);X.dialect=mxConstants.DIALECT_SVG;X.pointerEvents=!1;X.init(m.graph.getView().getOverlayPane());return X};C=function(X,P){if(X&&null!=m.guidesArrHor)for(X=0;X<m.guidesArrHor.length;X++)m.guidesArrHor[X].node.style.visibility="hidden";if(P&&null!=m.guidesArrVer)for(X=0;X<m.guidesArrVer.length;X++)m.guidesArrVer[X].node.style.visibility="hidden"};if(1<z&&z==y.length-1){z=[];H=m.guidesArrHor;g=[];e=0;L=y[0]==p?1:0;F=y[L].y+y[L].height;if(0<G)for(L=0;L<y.length-1;L++)v=
+y[L],J=y[L+1],p==v?(e=J.x-v.width-G,g.push(new mxPoint(e+v.width+M,F)),g.push(new mxPoint(J.x-M,F))):p==J?(g.push(new mxPoint(v.x+v.width+M,F)),e=v.x+v.width+G,g.push(new mxPoint(e-M,F))):(g.push(new mxPoint(v.x+v.width+M,F)),g.push(new mxPoint(J.x-M,F)));else v=y[0],L=y[2],e=v.x+v.width+(L.x-v.x-v.width-p.width)/2,g.push(new mxPoint(v.x+v.width+M,F)),g.push(new mxPoint(e-M,F)),g.push(new mxPoint(e+p.width+M,F)),g.push(new mxPoint(L.x-M,F));for(L=0;L<g.length;L+=2)y=g[L],G=g[L+1],y=x(y,G,null!=H?
+H[L/2]:null),y.node.style.visibility="visible",y.redraw(),z.push(y);for(L=g.length/2;null!=H&&L<H.length;L++)H[L].destroy();m.guidesArrHor=z;e-=d.x;g=!0}else C(!0);if(1<I&&I==A.length-1){z=[];H=m.guidesArrVer;k=[];c=0;L=A[0]==p?1:0;I=A[L].x+A[L].width;if(0<N)for(L=0;L<A.length-1;L++)v=A[L],J=A[L+1],p==v?(c=J.y-v.height-N,k.push(new mxPoint(I,c+v.height+M)),k.push(new mxPoint(I,J.y-M))):p==J?(k.push(new mxPoint(I,v.y+v.height+M)),c=v.y+v.height+N,k.push(new mxPoint(I,c-M))):(k.push(new mxPoint(I,v.y+
+v.height+M)),k.push(new mxPoint(I,J.y-M)));else v=A[0],L=A[2],c=v.y+v.height+(L.y-v.y-v.height-p.height)/2,k.push(new mxPoint(I,v.y+v.height+M)),k.push(new mxPoint(I,c-M)),k.push(new mxPoint(I,c+p.height+M)),k.push(new mxPoint(I,L.y-M));for(L=0;L<k.length;L+=2)y=k[L],G=k[L+1],y=x(y,G,null!=H?H[L/2]:null,!0),y.node.style.visibility="visible",y.redraw(),z.push(y);for(L=k.length/2;null!=H&&L<H.length;L++)H[L].destroy();m.guidesArrVer=z;c-=d.y;k=!0}else C(!1,!0)}if(g||k)return p=new mxPoint(e,c),A=b.call(this,
+d,p,u,E),g&&!k?p.y=A.y:k&&!g&&(p.x=A.x),A.y!=p.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),A.x!=p.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),p;C(!0,!0);return b.apply(this,arguments)};var f=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(d){f.call(this,d);var t=this.guidesArrVer,u=this.guidesArrHor;if(null!=t)for(var E=0;E<t.length;E++)t[E].node.style.visibility=d?"visible":"hidden";if(null!=
+u)for(E=0;E<u.length;E++)u[E].node.style.visibility=d?"visible":"hidden"};var l=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){l.call(this);var d=this.guidesArrVer,t=this.guidesArrHor;if(null!=d){for(var u=0;u<d.length;u++)d[u].destroy();this.guidesArrVer=null}if(null!=t){for(u=0;u<t.length;u++)t[u].destroy();this.guidesArrHor=null}}})();function mxRuler(b,f,l,d){function t(){var I=b.diagramContainer;m.style.top=I.offsetTop-e+"px";m.style.left=I.offsetLeft-e+"px";m.style.width=(l?0:I.offsetWidth)+e+"px";m.style.height=(l?I.offsetHeight:0)+e+"px"}function u(I,q,D){if(null!=E)return I;var z;return function(){var C=this,G=arguments,H=D&&!z;clearTimeout(z);z=setTimeout(function(){z=null;D||I.apply(C,G)},q);H&&I.apply(C,G)}}var E=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,
c=window.cancelAnimationFrame||window.mozCancelAnimationFrame,e=this.RULER_THICKNESS,g=this;this.unit=f;var k=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"},m=document.createElement("div");m.style.position="absolute";this.updateStyle=mxUtils.bind(this,function(){k=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"};m.style.background=k.bkgClr;m.style[l?"borderRight":"borderBottom"]="0.5px solid "+k.strokeClr;m.style.borderLeft="0.5px solid "+k.strokeClr});this.updateStyle();document.body.appendChild(m);mxEvent.disableContextMenu(m);this.editorUiRefresh=b.refresh;b.refresh=
-function(J){g.editorUiRefresh.apply(b,arguments);t()};t();var p=document.createElement("canvas");p.width=m.offsetWidth;p.height=m.offsetHeight;m.style.overflow="hidden";p.style.position="relative";m.appendChild(p);var v=p.getContext("2d");this.ui=b;var x=b.editor.graph;this.graph=x;this.container=m;this.canvas=p;var z=function(J,q,D,A,C){J=Math.round(J);q=Math.round(q);D=Math.round(D);A=Math.round(A);v.beginPath();v.moveTo(J+.5,q+.5);v.lineTo(D+.5,A+.5);v.stroke();C&&(l?(v.save(),v.translate(J,q),
-v.rotate(-Math.PI/2),v.fillText(C,0,0),v.restore()):v.fillText(C,J,q))},y=function(){v.clearRect(0,0,p.width,p.height);v.beginPath();v.lineWidth=.7;v.strokeStyle=k.strokeClr;v.setLineDash([]);v.font="9px Arial";v.textAlign="center";var J=x.view.scale,q=x.view.getBackgroundPageBounds(),D=x.view.translate,A=x.pageVisible;D=A?e+(l?q.y-x.container.scrollTop:q.x-x.container.scrollLeft):e+(l?D.y*J-x.container.scrollTop:D.x*J-x.container.scrollLeft);var C=0;A&&(C=x.getPageLayout(),C=l?C.y*x.pageFormat.height:
-C.x*x.pageFormat.width);var G;switch(g.unit){case mxConstants.POINTS:var M=G=10;var H=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:G=10;M=mxConstants.PIXELS_PER_MM;H=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:G=20;M=mxConstants.PIXELS_PER_MM;H=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:G=.5>=J||4<=J?8:16,M=mxConstants.PIXELS_PER_INCH/G,H=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var F=M;2<=J?F=M/(2*Math.floor(J/2)):.5>=J&&(F=M*Math.floor(1/J/2)*(g.unit==
-mxConstants.MILLIMETERS?2:1));M=null;q=A?Math.min(D+(l?q.height:q.width),l?p.height:p.width):l?p.height:p.width;if(A)if(v.fillStyle=k.outBkgClr,l){var I=D-e;0<I&&v.fillRect(0,e,e,I);q<p.height&&v.fillRect(0,q,e,p.height)}else I=D-e,0<I&&v.fillRect(e,0,I,e),q<p.width&&v.fillRect(q,0,p.width,e);v.fillStyle=k.fontClr;for(A=A?D:D%(F*J);A<=q;A+=F*J)if(I=Math.round((A-D)/J/F),!(A<e||I==M)){M=I;var R=null;0==I%G&&(R=g.formatText(C+I*F)+"");l?z(e-H[Math.abs(I)%G],A,e,A,R):z(A,e-H[Math.abs(I)%G],A,e,R)}v.lineWidth=
-1;z(l?0:e,l?e:0,e,e);v.fillStyle=k.cornerClr;v.fillRect(0,0,e,e)},L=-1,N=function(){null!=E?(null!=c&&c(L),L=E(y)):y()};this.drawRuler=N;this.sizeListener=f=u(function(){var J=x.container;l?(J=J.offsetHeight+e,p.height!=J&&(p.height=J,m.style.height=J+"px",N())):(J=J.offsetWidth+e,p.width!=J&&(p.width=J,m.style.width=J+"px",N()))},10);this.pageListener=function(){N()};this.scrollListener=d=u(function(){var J=l?x.container.scrollTop:x.container.scrollLeft;g.lastScroll!=J&&(g.lastScroll=J,N())},10);
-this.unitListener=function(J,q){g.setUnit(q.getProperty("unit"))};x.addListener(mxEvent.SIZE,f);x.container.addEventListener("scroll",d);x.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(J){k=J;m.style.background=k.bkgClr;y()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(J,q,D,A){if(l&&4<J.height||
-!l&&4<J.width){if(null!=g.guidePart)try{v.putImageData(g.guidePart.imgData1,g.guidePart.x1,g.guidePart.y1),v.putImageData(g.guidePart.imgData2,g.guidePart.x2,g.guidePart.y2),v.putImageData(g.guidePart.imgData3,g.guidePart.x3,g.guidePart.y3)}catch(U){}var C=g.origGuideMove.apply(this,arguments);try{v.lineWidth=.5;v.strokeStyle=k.guideClr;v.setLineDash([2]);if(l){var G=J.y+C.y+e-this.graph.container.scrollTop;var M=0;var H=G+J.height/2;var F=e/2;var I=G+J.height;var R=0;var X=v.getImageData(M,G-1,e,
-3);z(M,G,e,G);G--;var O=v.getImageData(F,H-1,e,3);z(F,H,e,H);H--;var W=v.getImageData(R,I-1,e,3);z(R,I,e,I);I--}else G=0,M=J.x+C.x+e-this.graph.container.scrollLeft,H=e/2,F=M+J.width/2,I=0,R=M+J.width,X=v.getImageData(M-1,G,3,e),z(M,G,M,e),M--,O=v.getImageData(F-1,H,3,e),z(F,H,F,e),F--,W=v.getImageData(R-1,I,3,e),z(R,I,R,e),R--;if(null==g.guidePart||g.guidePart.x1!=M||g.guidePart.y1!=G)g.guidePart={imgData1:X,x1:M,y1:G,imgData2:O,x2:F,y2:H,imgData3:W,x3:R,y3:I}}catch(U){}}else C=g.origGuideMove.apply(this,
-arguments);return C};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var J=g.origGuideDestroy.apply(this,arguments);if(null!=g.guidePart)try{v.putImageData(g.guidePart.imgData1,g.guidePart.x1,g.guidePart.y1),v.putImageData(g.guidePart.imgData2,g.guidePart.x2,g.guidePart.y2),v.putImageData(g.guidePart.imgData3,g.guidePart.x3,g.guidePart.y3),g.guidePart=null}catch(q){}return J}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;
+function(I){g.editorUiRefresh.apply(b,arguments);t()};t();var p=document.createElement("canvas");p.width=m.offsetWidth;p.height=m.offsetHeight;m.style.overflow="hidden";p.style.position="relative";m.appendChild(p);var v=p.getContext("2d");this.ui=b;var x=b.editor.graph;this.graph=x;this.container=m;this.canvas=p;var A=function(I,q,D,z,C){I=Math.round(I);q=Math.round(q);D=Math.round(D);z=Math.round(z);v.beginPath();v.moveTo(I+.5,q+.5);v.lineTo(D+.5,z+.5);v.stroke();C&&(l?(v.save(),v.translate(I,q),
+v.rotate(-Math.PI/2),v.fillText(C,0,0),v.restore()):v.fillText(C,I,q))},y=function(){v.clearRect(0,0,p.width,p.height);v.beginPath();v.lineWidth=.7;v.strokeStyle=k.strokeClr;v.setLineDash([]);v.font="9px Arial";v.textAlign="center";var I=x.view.scale,q=x.view.getBackgroundPageBounds(),D=x.view.translate,z=x.pageVisible;D=z?e+(l?q.y-x.container.scrollTop:q.x-x.container.scrollLeft):e+(l?D.y*I-x.container.scrollTop:D.x*I-x.container.scrollLeft);var C=0;z&&(C=x.getPageLayout(),C=l?C.y*x.pageFormat.height:
+C.x*x.pageFormat.width);var G;switch(g.unit){case mxConstants.POINTS:var H=G=10;var M=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:G=10;H=mxConstants.PIXELS_PER_MM;M=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:G=20;H=mxConstants.PIXELS_PER_MM;M=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:G=.5>=I||4<=I?8:16,H=mxConstants.PIXELS_PER_INCH/G,M=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var F=H;2<=I?F=H/(2*Math.floor(I/2)):.5>=I&&(F=H*Math.floor(1/I/2)*(g.unit==
+mxConstants.MILLIMETERS?2:1));H=null;q=z?Math.min(D+(l?q.height:q.width),l?p.height:p.width):l?p.height:p.width;if(z)if(v.fillStyle=k.outBkgClr,l){var J=D-e;0<J&&v.fillRect(0,e,e,J);q<p.height&&v.fillRect(0,q,e,p.height)}else J=D-e,0<J&&v.fillRect(e,0,J,e),q<p.width&&v.fillRect(q,0,p.width,e);v.fillStyle=k.fontClr;for(z=z?D:D%(F*I);z<=q;z+=F*I)if(J=Math.round((z-D)/I/F),!(z<e||J==H)){H=J;var Q=null;0==J%G&&(Q=g.formatText(C+J*F)+"");l?A(e-M[Math.abs(J)%G],z,e,z,Q):A(z,e-M[Math.abs(J)%G],z,e,Q)}v.lineWidth=
+1;A(l?0:e,l?e:0,e,e);v.fillStyle=k.cornerClr;v.fillRect(0,0,e,e)},L=-1,N=function(){null!=E?(null!=c&&c(L),L=E(y)):y()};this.drawRuler=N;this.sizeListener=f=u(function(){var I=x.container;l?(I=I.offsetHeight+e,p.height!=I&&(p.height=I,m.style.height=I+"px",N())):(I=I.offsetWidth+e,p.width!=I&&(p.width=I,m.style.width=I+"px",N()))},10);this.pageListener=function(){N()};this.scrollListener=d=u(function(){var I=l?x.container.scrollTop:x.container.scrollLeft;g.lastScroll!=I&&(g.lastScroll=I,N())},10);
+this.unitListener=function(I,q){g.setUnit(q.getProperty("unit"))};x.addListener(mxEvent.SIZE,f);x.container.addEventListener("scroll",d);x.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(I){k=I;m.style.background=k.bkgClr;y()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(I,q,D,z){if(l&&4<I.height||
+!l&&4<I.width){if(null!=g.guidePart)try{v.putImageData(g.guidePart.imgData1,g.guidePart.x1,g.guidePart.y1),v.putImageData(g.guidePart.imgData2,g.guidePart.x2,g.guidePart.y2),v.putImageData(g.guidePart.imgData3,g.guidePart.x3,g.guidePart.y3)}catch(W){}var C=g.origGuideMove.apply(this,arguments);try{v.lineWidth=.5;v.strokeStyle=k.guideClr;v.setLineDash([2]);if(l){var G=I.y+C.y+e-this.graph.container.scrollTop;var H=0;var M=G+I.height/2;var F=e/2;var J=G+I.height;var Q=0;var X=v.getImageData(H,G-1,e,
+3);A(H,G,e,G);G--;var P=v.getImageData(F,M-1,e,3);A(F,M,e,M);M--;var V=v.getImageData(Q,J-1,e,3);A(Q,J,e,J);J--}else G=0,H=I.x+C.x+e-this.graph.container.scrollLeft,M=e/2,F=H+I.width/2,J=0,Q=H+I.width,X=v.getImageData(H-1,G,3,e),A(H,G,H,e),H--,P=v.getImageData(F-1,M,3,e),A(F,M,F,e),F--,V=v.getImageData(Q-1,J,3,e),A(Q,J,Q,e),Q--;if(null==g.guidePart||g.guidePart.x1!=H||g.guidePart.y1!=G)g.guidePart={imgData1:X,x1:H,y1:G,imgData2:P,x2:F,y2:M,imgData3:V,x3:Q,y3:J}}catch(W){}}else C=g.origGuideMove.apply(this,
+arguments);return C};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var I=g.origGuideDestroy.apply(this,arguments);if(null!=g.guidePart)try{v.putImageData(g.guidePart.imgData1,g.guidePart.x1,g.guidePart.y1),v.putImageData(g.guidePart.imgData2,g.guidePart.x2,g.guidePart.y2),v.putImageData(g.guidePart.imgData3,g.guidePart.x3,g.guidePart.y3),g.guidePart=null}catch(q){}return I}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;
mxRuler.prototype.setUnit=function(b){this.unit=b;this.drawRuler()};mxRuler.prototype.formatText=function(b){switch(this.unit){case mxConstants.POINTS:return Math.round(b);case mxConstants.MILLIMETERS:return(b/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(b/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(b/mxConstants.PIXELS_PER_INCH).toFixed(2)}};
mxRuler.prototype.destroy=function(){this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.graph.removeListener(this.sizeListener);this.graph.container.removeEventListener("scroll",this.scrollListener);this.graph.view.removeListener("unitChanged",this.unitListener);this.ui.removeListener("pageViewChanged",this.pageListener);this.ui.removeListener("pageScaleChanged",this.pageListener);this.ui.removeListener("pageFormatChanged",
this.pageListener);null!=this.container&&this.container.parentNode.removeChild(this.container)};
function mxDualRuler(b,f){var l=new mxPoint(mxRuler.prototype.RULER_THICKNESS,mxRuler.prototype.RULER_THICKNESS);this.editorUiGetDiagContOffset=b.getDiagramContainerOffset;b.getDiagramContainerOffset=function(){return l};this.editorUiRefresh=b.refresh;this.ui=b;this.origGuideMove=mxGuide.prototype.move;this.origGuideDestroy=mxGuide.prototype.destroy;this.vRuler=new mxRuler(b,f,!0);this.hRuler=new mxRuler(b,f,!1,!0);f=mxUtils.bind(this,function(d){var t=!1;mxEvent.addGestureListeners(d,mxUtils.bind(this,
function(u){t=null!=b.currentMenu;mxEvent.consume(u)}),null,mxUtils.bind(this,function(u){if(b.editor.graph.isEnabled()&&!b.editor.graph.isMouseDown&&(mxEvent.isTouchEvent(u)||mxEvent.isPopupTrigger(u))){b.editor.graph.popupMenuHandler.hideMenu();b.hideCurrentMenu();if(!mxEvent.isTouchEvent(u)||!t){var E=new mxPopupMenu(mxUtils.bind(this,function(g,k){b.menus.addMenuItems(g,["points","inches","millimeters","meters"],k)}));E.div.className+=" geMenubarMenu";E.smartSeparators=!0;E.showDisabled=!0;E.autoExpand=
!0;E.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(E,arguments);b.resetCurrentMenu();E.destroy()});var c=mxEvent.getClientX(u),e=mxEvent.getClientY(u);E.popup(c,e,null,u);b.setCurrentMenu(E,d)}mxEvent.consume(u)}}))});f(this.hRuler.container);f(this.vRuler.container);this.vRuler.drawRuler();this.hRuler.drawRuler()}mxDualRuler.prototype.updateStyle=function(){this.vRuler.updateStyle();this.hRuler.updateStyle();this.vRuler.drawRuler();this.hRuler.drawRuler()};
-mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var f=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=f){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var l=mxFreehand.prototype.NORMAL_SMOOTHING,d=null,t=[],u,E=[],c,e=!1,g=!0,k=!0,m=!0,p=!0,v=[],x=!1,z=!0,y=!1,L={size:12,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},N=!1;this.setClosedPath=function(H){e=H};this.setAutoClose=function(H){g=H};this.setAutoInsert=
-function(H){k=H};this.setAutoScroll=function(H){m=H};this.setOpenFill=function(H){p=H};this.setStopClickEnabled=function(H){z=H};this.setSelectInserted=function(H){y=H};this.setSmoothing=function(H){l=H};this.setPerfectFreehandMode=function(H){N=H};this.setBrushSize=function(H){L.size=H};this.getBrushSize=function(){return L.size};var J=function(H){x=H;b.getRubberband().setEnabled(!H);b.graphHandler.setSelectEnabled(!H);b.graphHandler.setMoveEnabled(!H);b.container.style.cursor=H?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};
-this.startDrawing=function(){J(!0)};this.isDrawing=function(){return x};var q=mxUtils.bind(this,function(H){if(d){var F=c.length,I=z&&0<E.length&&null!=c&&2>c.length;I||E.push.apply(E,c);c=[];E.push(null);t.push(d);d=null;(I||k)&&this.stopDrawing();k&&2<=F&&this.startDrawing();mxEvent.consume(H)}}),D=new mxCell;D.edge=!0;var A=function(){var H=b.getCurrentCellStyle(D);H=mxUtils.getValue(b.currentVertexStyle,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(H,mxConstants.STYLE_STROKECOLOR,"#000"));"default"==
-H&&(H=b.shapeForegroundColor);return H};this.createStyle=function(H){var F=";fillColor=none;";N&&(F=";lineShape=1;");return mxConstants.STYLE_SHAPE+"="+H+F};this.stopDrawing=function(){if(0<t.length){if(N){for(var H=[],F=0;F<E.length;F++)null!=E[F]&&H.push([E[F].x,E[F].y]);H=PerfectFreehand.getStroke(H,L);E=[];for(F=0;F<H.length;F++)E.push({x:H[F][0],y:H[F][1]});E.push(null)}H=E[0].x;var I=E[0].x,R=E[0].y,X=E[0].y;for(F=1;F<E.length;F++)null!=E[F]&&(H=Math.max(H,E[F].x),I=Math.min(I,E[F].x),R=Math.max(R,
-E[F].y),X=Math.min(X,E[F].y));H-=I;R-=X;if(0<H&&0<R){var O=100/H,W=100/R;E.map(function(Q){if(null==Q)return Q;Q.x=(Q.x-I)*O;Q.y=(Q.y-X)*W;return Q});var U='<shape strokewidth="inherit"><foreground>',n=0;for(F=0;F<E.length;F++){var B=E[F];if(null==B){B=!1;n=E[n];var K=E[F-1];!e&&g&&(B=n.x-K.x,K=n.y-K.y,B=Math.sqrt(B*B+K*K)<=b.tolerance);if(e||B)U+='<line x="'+n.x.toFixed(2)+'" y="'+n.y.toFixed(2)+'"/>';U+="</path>"+(p||e||B?"<fillstroke/>":"<stroke/>");n=F+1}else U=F==n?U+('<path><move x="'+B.x.toFixed(2)+
-'" y="'+B.y.toFixed(2)+'"/>'):U+('<line x="'+B.x.toFixed(2)+'" y="'+B.y.toFixed(2)+'"/>')}U+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){F=this.createStyle("stencil("+Graph.compress(U)+")");U=b.view.scale;n=b.view.translate;F=new mxCell("",new mxGeometry(I/U-n.x,X/U-n.y,H/U,R/U),F);F.vertex=1;b.model.beginUpdate();try{F=b.addCell(F),b.fireEvent(new mxEventObject("cellsInserted","cells",[F])),b.fireEvent(new mxEventObject("freehandInserted","cell",F))}finally{b.model.endUpdate()}y&&
-b.setSelectionCells([F])}}for(F=0;F<t.length;F++)t[F].parentNode.removeChild(t[F]);d=null;t=[];E=[]}J(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(H,F){H=F.getProperty("eventName");F=F.getProperty("event");H==mxEvent.MOUSE_MOVE&&x&&(null!=F.sourceState&&F.sourceState.setCursor("crosshair"),F.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(H,F){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(H=F.getEvent(),x&&!mxEvent.isPopupTrigger(H)&&!mxEvent.isMultiTouchEvent(H))){var I=
-parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1);I=Math.max(1,I*b.view.scale);var R=A();d=document.createElementNS("http://www.w3.org/2000/svg","path");d.setAttribute("fill",N?R:"none");d.setAttribute("stroke",R);d.setAttribute("stroke-width",I);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(R=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",R=R.split(" ").map(function(X){return parseFloat(X)*I}).join(" "),d.setAttribute("stroke-dasharray",R));v=[];H=C(H);G(H);
-u="M"+H.x+" "+H.y;E.push(H);c=[];d.setAttribute("d",N?PerfectFreehand.getSvgPathFromStroke([[H.x,H.y]],L):u);f.appendChild(d);F.consume()}}),mouseMove:mxUtils.bind(this,function(H,F){if(d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){H=F.getEvent();H=C(H);G(H);var I=M(0);if(I)if(E.push(I),N){var R=[];for(I=0;I<E.length;I++)R.push([E[I].x,E[I].y]);c=[];for(var X=2;X<v.length;X+=2)I=M(X),R.push([I.x,I.y]),c.push(I);d.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(R,L))}else{u+=" L"+
-I.x+" "+I.y;R="";c=[];for(X=2;X<v.length;X+=2)I=M(X),R+=" L"+I.x+" "+I.y,c.push(I);d.setAttribute("d",u+R)}m&&(I=b.view.translate,b.scrollRectToVisible((new mxRectangle(H.x-I.x,H.y-I.y)).grow(20)));F.consume()}}),mouseUp:mxUtils.bind(this,function(H,F){d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(q(F.getEvent()),F.consume())})});var C=function(H){return mxUtils.convertPoint(b.container,mxEvent.getClientX(H),mxEvent.getClientY(H))},G=function(H){for(v.push(H);v.length>l;)v.shift()},M=
-function(H){var F=v.length;if(1===F%2||F>=l){var I=0,R=0,X,O=0;for(X=H;X<F;X++)O++,H=v[X],I+=H.x,R+=H.y;return{x:I/O,y:R/O}}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;DrawioUser=function(b,f,l,d,t){this.id=b;this.email=f;this.displayName=l;this.pictureUrl=d;this.locale=t};DrawioComment=function(b,f,l,d,t,u,E){this.file=b;this.id=f;this.content=l;this.modifiedDate=d;this.createdDate=t;this.isResolved=u;this.user=E;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,f,l,d,t){f()};DrawioComment.prototype.editComment=function(b,f,l){f()};DrawioComment.prototype.deleteComment=function(b,f){b()};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="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="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><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="default"/></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;
+mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var f=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=f){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var l=mxFreehand.prototype.NORMAL_SMOOTHING,d=null,t=[],u,E=[],c,e=!1,g=!0,k=!0,m=!0,p=!0,v=[],x=!1,A=!0,y=!1,L={size:12,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},N=!1;this.setClosedPath=function(M){e=M};this.setAutoClose=function(M){g=M};this.setAutoInsert=
+function(M){k=M};this.setAutoScroll=function(M){m=M};this.setOpenFill=function(M){p=M};this.setStopClickEnabled=function(M){A=M};this.setSelectInserted=function(M){y=M};this.setSmoothing=function(M){l=M};this.setPerfectFreehandMode=function(M){N=M};this.setBrushSize=function(M){L.size=M};this.getBrushSize=function(){return L.size};var I=function(M){x=M;b.getRubberband().setEnabled(!M);b.graphHandler.setSelectEnabled(!M);b.graphHandler.setMoveEnabled(!M);b.container.style.cursor=M?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};
+this.startDrawing=function(){I(!0)};this.isDrawing=function(){return x};var q=mxUtils.bind(this,function(M){if(d){var F=c.length,J=A&&0<E.length&&null!=c&&2>c.length;J||E.push.apply(E,c);c=[];E.push(null);t.push(d);d=null;(J||k)&&this.stopDrawing();k&&2<=F&&this.startDrawing();mxEvent.consume(M)}}),D=new mxCell;D.edge=!0;var z=function(){var M=b.getCurrentCellStyle(D);M=mxUtils.getValue(b.currentVertexStyle,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(M,mxConstants.STYLE_STROKECOLOR,"#000"));"default"==
+M&&(M=b.shapeForegroundColor);return M};this.createStyle=function(M){var F=";fillColor=none;";N&&(F=";lineShape=1;");return mxConstants.STYLE_SHAPE+"="+M+F};this.stopDrawing=function(){if(0<t.length){if(N){for(var M=[],F=0;F<E.length;F++)null!=E[F]&&M.push([E[F].x,E[F].y]);M=PerfectFreehand.getStroke(M,L);E=[];for(F=0;F<M.length;F++)E.push({x:M[F][0],y:M[F][1]});E.push(null)}M=E[0].x;var J=E[0].x,Q=E[0].y,X=E[0].y;for(F=1;F<E.length;F++)null!=E[F]&&(M=Math.max(M,E[F].x),J=Math.min(J,E[F].x),Q=Math.max(Q,
+E[F].y),X=Math.min(X,E[F].y));M-=J;Q-=X;if(0<M&&0<Q){var P=100/M,V=100/Q;E.map(function(R){if(null==R)return R;R.x=(R.x-J)*P;R.y=(R.y-X)*V;return R});var W='<shape strokewidth="inherit"><foreground>',n=0;for(F=0;F<E.length;F++){var B=E[F];if(null==B){B=!1;n=E[n];var K=E[F-1];!e&&g&&(B=n.x-K.x,K=n.y-K.y,B=Math.sqrt(B*B+K*K)<=b.tolerance);if(e||B)W+='<line x="'+n.x.toFixed(2)+'" y="'+n.y.toFixed(2)+'"/>';W+="</path>"+(p||e||B?"<fillstroke/>":"<stroke/>");n=F+1}else W=F==n?W+('<path><move x="'+B.x.toFixed(2)+
+'" y="'+B.y.toFixed(2)+'"/>'):W+('<line x="'+B.x.toFixed(2)+'" y="'+B.y.toFixed(2)+'"/>')}W+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){F=this.createStyle("stencil("+Graph.compress(W)+")");W=b.view.scale;n=b.view.translate;F=new mxCell("",new mxGeometry(J/W-n.x,X/W-n.y,M/W,Q/W),F);F.vertex=1;b.model.beginUpdate();try{F=b.addCell(F),b.fireEvent(new mxEventObject("cellsInserted","cells",[F])),b.fireEvent(new mxEventObject("freehandInserted","cell",F))}finally{b.model.endUpdate()}y&&
+b.setSelectionCells([F])}}for(F=0;F<t.length;F++)t[F].parentNode.removeChild(t[F]);d=null;t=[];E=[]}I(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(M,F){M=F.getProperty("eventName");F=F.getProperty("event");M==mxEvent.MOUSE_MOVE&&x&&(null!=F.sourceState&&F.sourceState.setCursor("crosshair"),F.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(M,F){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(M=F.getEvent(),x&&!mxEvent.isPopupTrigger(M)&&!mxEvent.isMultiTouchEvent(M))){var J=
+parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1);J=Math.max(1,J*b.view.scale);var Q=z();d=document.createElementNS("http://www.w3.org/2000/svg","path");d.setAttribute("fill",N?Q:"none");d.setAttribute("stroke",Q);d.setAttribute("stroke-width",J);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(Q=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",Q=Q.split(" ").map(function(X){return parseFloat(X)*J}).join(" "),d.setAttribute("stroke-dasharray",Q));v=[];M=C(M);G(M);
+u="M"+M.x+" "+M.y;E.push(M);c=[];d.setAttribute("d",N?PerfectFreehand.getSvgPathFromStroke([[M.x,M.y]],L):u);f.appendChild(d);F.consume()}}),mouseMove:mxUtils.bind(this,function(M,F){if(d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){M=F.getEvent();M=C(M);G(M);var J=H(0);if(J)if(E.push(J),N){var Q=[];for(J=0;J<E.length;J++)Q.push([E[J].x,E[J].y]);c=[];for(var X=2;X<v.length;X+=2)J=H(X),Q.push([J.x,J.y]),c.push(J);d.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(Q,L))}else{u+=" L"+
+J.x+" "+J.y;Q="";c=[];for(X=2;X<v.length;X+=2)J=H(X),Q+=" L"+J.x+" "+J.y,c.push(J);d.setAttribute("d",u+Q)}m&&(J=b.view.translate,b.scrollRectToVisible((new mxRectangle(M.x-J.x,M.y-J.y)).grow(20)));F.consume()}}),mouseUp:mxUtils.bind(this,function(M,F){d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(q(F.getEvent()),F.consume())})});var C=function(M){return mxUtils.convertPoint(b.container,mxEvent.getClientX(M),mxEvent.getClientY(M))},G=function(M){for(v.push(M);v.length>l;)v.shift()},H=
+function(M){var F=v.length;if(1===F%2||F>=l){var J=0,Q=0,X,P=0;for(X=M;X<F;X++)P++,M=v[X],J+=M.x,Q+=M.y;return{x:J/P,y:Q/P}}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;DrawioUser=function(b,f,l,d,t){this.id=b;this.email=f;this.displayName=l;this.pictureUrl=d;this.locale=t};DrawioComment=function(b,f,l,d,t,u,E){this.file=b;this.id=f;this.content=l;this.modifiedDate=d;this.createdDate=t;this.isResolved=u;this.user=E;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,f,l,d,t){f()};DrawioComment.prototype.editComment=function(b,f,l){f()};DrawioComment.prototype.deleteComment=function(b,f){b()};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="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="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><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="default"/></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=Graph.prototype.defaultThemes["default-style2"];
LucidImporter={};
(function(){function h(u){if(u&&null!=LucidImporter.imgSrcRepl){var E=LucidImporter.imgSrcRepl.attMap;if(E[u])u=E[u];else{E=LucidImporter.imgSrcRepl.imgRepl;for(var F=0;F<E.length;F++){var t=E[F];u=u.replace(t.searchVal,t.replVal)}LucidImporter.hasExtImgs=!0}}return u}function y(u){lb="";try{if(u){var E=null;LucidImporter.advImpConfig&&LucidImporter.advImpConfig.fontMapping&&(E=LucidImporter.advImpConfig.fontMapping[u]);if(E){for(var F in E)lb+=F+"="+E[F]+";";return E.fontFamily?"font-family: "+E.fontFamily:
diff --git a/src/main/webapp/js/viewer-static.min.js b/src/main/webapp/js/viewer-static.min.js
index 46641d80..c0a9dd79 100644
--- a/src/main/webapp/js/viewer-static.min.js
+++ b/src/main/webapp/js/viewer-static.min.js
@@ -98,8 +98,8 @@ window.DRAWIO_GITHUB_ID=window.DRAWIO_GITHUB_ID||"Iv1.98d62f0431e40543";window.D
window.RT_WEBSOCKET_URL=window.RT_WEBSOCKET_URL||"wss://"+("test.draw.io"==window.location.hostname?"app.diagrams.net":window.location.hostname)+"/rt";window.SHAPES_PATH=window.SHAPES_PATH||"shapes";window.GRAPH_IMAGE_PATH=window.GRAPH_IMAGE_PATH||"img";window.ICONSEARCH_PATH=window.ICONSEARCH_PATH||((null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE")||urlParams.dev)&&"file:"!=window.location.protocol?"iconSearch":window.DRAWIO_BASE_URL+"/iconSearch");
window.TEMPLATE_PATH=window.TEMPLATE_PATH||"templates";window.NEW_DIAGRAM_CATS_PATH=window.NEW_DIAGRAM_CATS_PATH||"newDiagramCats";window.PLUGINS_BASE_PATH=window.PLUGINS_BASE_PATH||"";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||RESOURCES_PATH+"/dia";window.DRAWIO_CONFIG=window.DRAWIO_CONFIG||null;window.mxLoadResources=window.mxLoadResources||!1;
window.mxLanguage=window.mxLanguage||function(){var a=urlParams.lang;if(null==a&&"undefined"!=typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).language||null);if(!a&&window.mxIsElectron&&(a=urlParams.appLang,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.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",lt:"Lietuvių",lv:"Latviešu",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)}
"1"==urlParams.extAuth&&/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent)&&(urlParams.gapi="0",urlParams.noDevice="1","1"!=urlParams.lightbox&&(urlParams.lightbox="1",urlParams.layers="1",urlParams.viewerOnlyMsg="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");function setCurrentXml(a,b){null!=window.parent&&null!=window.parent.openFile&&window.parent.openFile.setData(a,b)}
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");
@@ -110,7 +110,7 @@ if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==url
"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");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,ADD_ATTR:["target","content"]};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:"20.0.2",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.0.3",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)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints,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]"!==
@@ -1992,12 +1992,12 @@ Editor.prototype.setFilename=function(b){this.filename=b};
Editor.prototype.createUndoManager=function(){var b=this.graph,e=new mxUndoManager;this.undoListener=function(n,D){e.undoableEditHappened(D.getProperty("edit"))};var k=mxUtils.bind(this,function(n,D){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,k);b.getView().addListener(mxEvent.UNDO,k);k=function(n,D){n=b.getSelectionCellsForChanges(D.getProperty("edit").changes,function(E){return!(E instanceof mxChildChange)});if(0<n.length){b.getModel();D=[];for(var t=0;t<n.length;t++)null!=
b.view.getState(n[t])&&D.push(n[t]);b.setSelectionCells(D)}};e.addListener(mxEvent.UNDO,k);e.addListener(mxEvent.REDO,k);return e};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,e,k,n,D,t,E,d,f,g,m){var q=f?57:0,y=k,F=n,C=f?0:64,I=Editor.inlineFullscreen||null==b.embedViewport?mxUtils.getDocumentSize():mxUtils.clone(b.embedViewport);null==b.embedViewport&&null!=window.innerHeight&&(I.height=window.innerHeight);var G=I.height,Y=Math.max(1,Math.round((I.width-k-C)/2)),ba=Math.max(1,Math.round((G-n-b.footerHeight)/3));e.style.maxHeight="100%";k=null!=document.body?Math.min(k,document.body.scrollWidth-C):k;n=Math.min(n,G-C);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=G+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));I=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=I.x+"px";this.bg.style.top=I.y+"px";Y+=I.x;ba+=I.y;Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px",
-ba+=b.embedViewport.y,Y+=b.embedViewport.x);D&&document.body.appendChild(this.bg);var Z=b.createDiv(f?"geTransDialog":"geDialog");D=this.getPosition(Y,ba,k,n);Y=D.x;ba=D.y;Z.style.width=k+"px";Z.style.height=n+"px";Z.style.left=Y+"px";Z.style.top=ba+"px";Z.style.zIndex=this.zIndex;Z.appendChild(e);document.body.appendChild(Z);!d&&e.clientHeight>Z.clientHeight-C&&(e.style.overflowY="auto");e.style.overflowX="hidden";if(t&&(t=document.createElement("img"),t.setAttribute("src",Dialog.prototype.closeImage),
-t.setAttribute("title",mxResources.get("close")),t.className="geDialogClose",t.style.top=ba+14+"px",t.style.left=Y+k+38-q+"px",t.style.zIndex=this.zIndex,mxEvent.addListener(t,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(t),this.dialogImg=t,!m)){var X=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(qa){X=!0}),null,mxUtils.bind(this,function(qa){X&&(b.hideDialog(!0),X=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=g){var qa=
-g();null!=qa&&(y=k=qa.w,F=n=qa.h)}qa=mxUtils.getDocumentSize();G=qa.height;this.bg.style.height=G+"px";Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");Y=Math.max(1,Math.round((qa.width-k-C)/2));ba=Math.max(1,Math.round((G-n-b.footerHeight)/3));k=null!=document.body?Math.min(y,document.body.scrollWidth-C):y;n=Math.min(F,G-C);qa=this.getPosition(Y,ba,k,n);Y=qa.x;ba=qa.y;Z.style.left=Y+"px";Z.style.top=ba+"px";Z.style.width=k+"px";Z.style.height=
-n+"px";!d&&e.clientHeight>Z.clientHeight-C&&(e.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=ba+14+"px",this.dialogImg.style.left=Y+k+38-q+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=E;this.container=Z;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
+function Dialog(b,e,k,n,D,t,E,d,f,g,m){var q=f?57:0,y=k,F=n,C=f?0:64,I=Editor.inlineFullscreen||null==b.embedViewport?mxUtils.getDocumentSize():mxUtils.clone(b.embedViewport);null==b.embedViewport&&null!=window.innerHeight&&(I.height=window.innerHeight);var G=I.height,Z=Math.max(1,Math.round((I.width-k-C)/2)),ca=Math.max(1,Math.round((G-n-b.footerHeight)/3));e.style.maxHeight="100%";k=null!=document.body?Math.min(k,document.body.scrollWidth-C):k;n=Math.min(n,G-C);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=G+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));I=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=I.x+"px";this.bg.style.top=I.y+"px";Z+=I.x;ca+=I.y;Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px",
+ca+=b.embedViewport.y,Z+=b.embedViewport.x);D&&document.body.appendChild(this.bg);var aa=b.createDiv(f?"geTransDialog":"geDialog");D=this.getPosition(Z,ca,k,n);Z=D.x;ca=D.y;aa.style.width=k+"px";aa.style.height=n+"px";aa.style.left=Z+"px";aa.style.top=ca+"px";aa.style.zIndex=this.zIndex;aa.appendChild(e);document.body.appendChild(aa);!d&&e.clientHeight>aa.clientHeight-C&&(e.style.overflowY="auto");e.style.overflowX="hidden";if(t&&(t=document.createElement("img"),t.setAttribute("src",Dialog.prototype.closeImage),
+t.setAttribute("title",mxResources.get("close")),t.className="geDialogClose",t.style.top=ca+14+"px",t.style.left=Z+k+38-q+"px",t.style.zIndex=this.zIndex,mxEvent.addListener(t,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(t),this.dialogImg=t,!m)){var Y=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(pa){Y=!0}),null,mxUtils.bind(this,function(pa){Y&&(b.hideDialog(!0),Y=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=g){var pa=
+g();null!=pa&&(y=k=pa.w,F=n=pa.h)}pa=mxUtils.getDocumentSize();G=pa.height;this.bg.style.height=G+"px";Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");Z=Math.max(1,Math.round((pa.width-k-C)/2));ca=Math.max(1,Math.round((G-n-b.footerHeight)/3));k=null!=document.body?Math.min(y,document.body.scrollWidth-C):y;n=Math.min(F,G-C);pa=this.getPosition(Z,ca,k,n);Z=pa.x;ca=pa.y;aa.style.left=Z+"px";aa.style.top=ca+"px";aa.style.width=k+"px";aa.style.height=
+n+"px";!d&&e.clientHeight>aa.clientHeight-C&&(e.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=ca+14+"px",this.dialogImg.style.left=Z+k+38-q+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=E;this.container=aa;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+
@@ -2005,40 +2005,40 @@ Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKA
var ErrorDialog=function(b,e,k,n,D,t,E,d,f,g,m){f=null!=f?f:!0;var q=document.createElement("div");q.style.textAlign="center";if(null!=e){var y=document.createElement("div");y.style.padding="0px";y.style.margin="0px";y.style.fontSize="18px";y.style.paddingBottom="16px";y.style.marginBottom="10px";y.style.borderBottom="1px solid #c0c0c0";y.style.color="gray";y.style.whiteSpace="nowrap";y.style.textOverflow="ellipsis";y.style.overflow="hidden";mxUtils.write(y,e);y.setAttribute("title",e);q.appendChild(y)}e=
document.createElement("div");e.style.lineHeight="1.2em";e.style.padding="6px";e.innerHTML=k;q.appendChild(e);k=document.createElement("div");k.style.marginTop="12px";k.style.textAlign="center";null!=t&&(e=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();t()}),e.className="geBtn",k.appendChild(e),k.style.textAlign="center");null!=g&&(g=mxUtils.button(g,function(){null!=m&&m()}),g.className="geBtn",k.appendChild(g));var F=mxUtils.button(n,function(){f&&b.hideDialog();null!=D&&D()});
F.className="geBtn";k.appendChild(F);null!=E&&(n=mxUtils.button(E,function(){f&&b.hideDialog();null!=d&&d()}),n.className="geBtn gePrimaryBtn",k.appendChild(n));this.init=function(){F.focus()};q.appendChild(k);this.container=q},PrintDialog=function(b,e){this.create(b,e)};
-PrintDialog.prototype.create=function(b){function e(F){var C=E.checked||g.checked,I=parseInt(q.value)/100;isNaN(I)&&(I=1,q.value="100%");I*=.75;var G=k.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,Y=1/k.pageScale;if(C){var ba=E.checked?1:parseInt(m.value);isNaN(ba)||(Y=mxUtils.getScaleForPageCount(ba,k,G))}k.getGraphBounds();var Z=ba=0;G=mxRectangle.fromRectangle(G);G.width=Math.ceil(G.width*I);G.height=Math.ceil(G.height*I);Y*=I;!C&&k.pageVisible?(I=k.getPageLayout(),ba-=I.x*G.width,Z-=I.y*G.height):
-C=!0;C=PrintDialog.createPrintPreview(k,Y,G,0,ba,Z,C);C.open();F&&PrintDialog.printPreview(C)}var k=b.editor.graph,n=document.createElement("table");n.style.width="100%";n.style.height="100%";var D=document.createElement("tbody");var t=document.createElement("tr");var E=document.createElement("input");E.setAttribute("type","checkbox");var d=document.createElement("td");d.setAttribute("colspan","2");d.style.fontSize="10pt";d.appendChild(E);var f=document.createElement("span");mxUtils.write(f," "+mxResources.get("fitPage"));
-d.appendChild(f);mxEvent.addListener(f,"click",function(F){E.checked=!E.checked;g.checked=!E.checked;mxEvent.consume(F)});mxEvent.addListener(E,"change",function(){g.checked=!E.checked});t.appendChild(d);D.appendChild(t);t=t.cloneNode(!1);var g=document.createElement("input");g.setAttribute("type","checkbox");d=document.createElement("td");d.style.fontSize="10pt";d.appendChild(g);f=document.createElement("span");mxUtils.write(f," "+mxResources.get("posterPrint")+":");d.appendChild(f);mxEvent.addListener(f,
-"click",function(F){g.checked=!g.checked;E.checked=!g.checked;mxEvent.consume(F)});t.appendChild(d);var m=document.createElement("input");m.setAttribute("value","1");m.setAttribute("type","number");m.setAttribute("min","1");m.setAttribute("size","4");m.setAttribute("disabled","disabled");m.style.width="50px";d=document.createElement("td");d.style.fontSize="10pt";d.appendChild(m);mxUtils.write(d," "+mxResources.get("pages")+" (max)");t.appendChild(d);D.appendChild(t);mxEvent.addListener(g,"change",
-function(){g.checked?m.removeAttribute("disabled"):m.setAttribute("disabled","disabled");E.checked=!g.checked});t=t.cloneNode(!1);d=document.createElement("td");mxUtils.write(d,mxResources.get("pageScale")+":");t.appendChild(d);d=document.createElement("td");var q=document.createElement("input");q.setAttribute("value","100 %");q.setAttribute("size","5");q.style.width="50px";d.appendChild(q);t.appendChild(d);D.appendChild(t);t=document.createElement("tr");d=document.createElement("td");d.colSpan=2;
-d.style.paddingTop="20px";d.setAttribute("align","right");f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});f.className="geBtn";b.editor.cancelFirst&&d.appendChild(f);if(PrintDialog.previewEnabled){var y=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();e(!1)});y.className="geBtn";d.appendChild(y)}y=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();e(!0)});y.className="geBtn gePrimaryBtn";d.appendChild(y);b.editor.cancelFirst||
-d.appendChild(f);t.appendChild(d);D.appendChild(t);n.appendChild(D);this.container=n};PrintDialog.printPreview=function(b){try{if(null!=b.wnd){var e=function(){b.wnd.focus();b.wnd.print();b.wnd.close()};mxClient.IS_GC?window.setTimeout(e,500):e()}}catch(k){}};
+PrintDialog.prototype.create=function(b){function e(F){var C=E.checked||g.checked,I=parseInt(q.value)/100;isNaN(I)&&(I=1,q.value="100%");I*=.75;var G=k.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,Z=1/k.pageScale;if(C){var ca=E.checked?1:parseInt(m.value);isNaN(ca)||(Z=mxUtils.getScaleForPageCount(ca,k,G))}k.getGraphBounds();var aa=ca=0;G=mxRectangle.fromRectangle(G);G.width=Math.ceil(G.width*I);G.height=Math.ceil(G.height*I);Z*=I;!C&&k.pageVisible?(I=k.getPageLayout(),ca-=I.x*G.width,aa-=I.y*
+G.height):C=!0;C=PrintDialog.createPrintPreview(k,Z,G,0,ca,aa,C);C.open();F&&PrintDialog.printPreview(C)}var k=b.editor.graph,n=document.createElement("table");n.style.width="100%";n.style.height="100%";var D=document.createElement("tbody");var t=document.createElement("tr");var E=document.createElement("input");E.setAttribute("type","checkbox");var d=document.createElement("td");d.setAttribute("colspan","2");d.style.fontSize="10pt";d.appendChild(E);var f=document.createElement("span");mxUtils.write(f,
+" "+mxResources.get("fitPage"));d.appendChild(f);mxEvent.addListener(f,"click",function(F){E.checked=!E.checked;g.checked=!E.checked;mxEvent.consume(F)});mxEvent.addListener(E,"change",function(){g.checked=!E.checked});t.appendChild(d);D.appendChild(t);t=t.cloneNode(!1);var g=document.createElement("input");g.setAttribute("type","checkbox");d=document.createElement("td");d.style.fontSize="10pt";d.appendChild(g);f=document.createElement("span");mxUtils.write(f," "+mxResources.get("posterPrint")+":");
+d.appendChild(f);mxEvent.addListener(f,"click",function(F){g.checked=!g.checked;E.checked=!g.checked;mxEvent.consume(F)});t.appendChild(d);var m=document.createElement("input");m.setAttribute("value","1");m.setAttribute("type","number");m.setAttribute("min","1");m.setAttribute("size","4");m.setAttribute("disabled","disabled");m.style.width="50px";d=document.createElement("td");d.style.fontSize="10pt";d.appendChild(m);mxUtils.write(d," "+mxResources.get("pages")+" (max)");t.appendChild(d);D.appendChild(t);
+mxEvent.addListener(g,"change",function(){g.checked?m.removeAttribute("disabled"):m.setAttribute("disabled","disabled");E.checked=!g.checked});t=t.cloneNode(!1);d=document.createElement("td");mxUtils.write(d,mxResources.get("pageScale")+":");t.appendChild(d);d=document.createElement("td");var q=document.createElement("input");q.setAttribute("value","100 %");q.setAttribute("size","5");q.style.width="50px";d.appendChild(q);t.appendChild(d);D.appendChild(t);t=document.createElement("tr");d=document.createElement("td");
+d.colSpan=2;d.style.paddingTop="20px";d.setAttribute("align","right");f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});f.className="geBtn";b.editor.cancelFirst&&d.appendChild(f);if(PrintDialog.previewEnabled){var y=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();e(!1)});y.className="geBtn";d.appendChild(y)}y=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();e(!0)});y.className="geBtn gePrimaryBtn";d.appendChild(y);
+b.editor.cancelFirst||d.appendChild(f);t.appendChild(d);D.appendChild(t);n.appendChild(D);this.container=n};PrintDialog.printPreview=function(b){try{if(null!=b.wnd){var e=function(){b.wnd.focus();b.wnd.print();b.wnd.close()};mxClient.IS_GC?window.setTimeout(e,500):e()}}catch(k){}};
PrintDialog.createPrintPreview=function(b,e,k,n,D,t,E){e=new mxPrintPreview(b,e,k,n,D,t);e.title=mxResources.get("preview");e.printBackgroundImage=!0;e.autoOrigin=E;b=b.background;if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";e.backgroundColor=b;var d=e.writeHead;e.writeHead=function(f){d.apply(this,arguments);f.writeln('<style type="text/css">');f.writeln("@media screen {");f.writeln(" body > div { padding:30px;box-sizing:content-box; }");f.writeln("}");f.writeln("</style>")};return e};
PrintDialog.previewEnabled=!0;
var PageSetupDialog=function(b){function e(){null==m||m==mxConstants.NONE?(g.style.backgroundColor="",g.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(g.style.backgroundColor=m,g.style.backgroundImage="")}function k(){var G=C;null!=G&&Graph.isPageLink(G.src)&&(G=b.createImageForPageLink(G.src,null));null!=G&&null!=G.src?(F.setAttribute("src",G.src),F.style.display=""):(F.removeAttribute("src"),F.style.display="none")}var n=b.editor.graph,D=document.createElement("table");D.style.width=
"100%";D.style.height="100%";var t=document.createElement("tbody");var E=document.createElement("tr");var d=document.createElement("td");d.style.verticalAlign="top";d.style.fontSize="10pt";mxUtils.write(d,mxResources.get("paperSize")+":");E.appendChild(d);d=document.createElement("td");d.style.verticalAlign="top";d.style.fontSize="10pt";var f=PageSetupDialog.addPageFormatPanel(d,"pagesetupdialog",n.pageFormat);E.appendChild(d);t.appendChild(E);E=document.createElement("tr");d=document.createElement("td");
mxUtils.write(d,mxResources.get("background")+":");E.appendChild(d);d=document.createElement("td");d.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var g=document.createElement("button");g.style.width="22px";g.style.height="22px";g.style.cursor="pointer";g.style.marginRight="20px";g.style.backgroundPosition="center center";g.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(g.style.position="relative",g.style.top="-6px");var m=n.background;e();mxEvent.addListener(g,
-"click",function(G){b.pickColor(m||"none",function(Y){m=Y;e()});mxEvent.consume(G)});d.appendChild(g);mxUtils.write(d,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=n.getGridSize();d.appendChild(q);mxEvent.addListener(q,"change",function(){var G=parseInt(q.value);q.value=Math.max(1,isNaN(G)?n.getGridSize():G)});E.appendChild(d);t.appendChild(E);E=document.createElement("tr");
+"click",function(G){b.pickColor(m||"none",function(Z){m=Z;e()});mxEvent.consume(G)});d.appendChild(g);mxUtils.write(d,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=n.getGridSize();d.appendChild(q);mxEvent.addListener(q,"change",function(){var G=parseInt(q.value);q.value=Math.max(1,isNaN(G)?n.getGridSize():G)});E.appendChild(d);t.appendChild(E);E=document.createElement("tr");
d=document.createElement("td");mxUtils.write(d,mxResources.get("image")+":");E.appendChild(d);d=document.createElement("td");var y=document.createElement("button");y.className="geBtn";y.style.margin="0px";mxUtils.write(y,mxResources.get("change")+"...");var F=document.createElement("img");F.setAttribute("valign","middle");F.style.verticalAlign="middle";F.style.border="1px solid lightGray";F.style.borderRadius="4px";F.style.marginRight="14px";F.style.maxWidth="100px";F.style.cursor="pointer";F.style.height=
-"60px";F.style.padding="4px";var C=n.backgroundImage,I=function(G){b.showBackgroundImageDialog(function(Y,ba){ba||(C=Y,k())},C);mxEvent.consume(G)};mxEvent.addListener(y,"click",I);mxEvent.addListener(F,"click",I);k();d.appendChild(F);d.appendChild(y);E.appendChild(d);t.appendChild(E);E=document.createElement("tr");d=document.createElement("td");d.colSpan=2;d.style.paddingTop="16px";d.setAttribute("align","right");y=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});y.className=
+"60px";F.style.padding="4px";var C=n.backgroundImage,I=function(G){b.showBackgroundImageDialog(function(Z,ca){ca||(C=Z,k())},C);mxEvent.consume(G)};mxEvent.addListener(y,"click",I);mxEvent.addListener(F,"click",I);k();d.appendChild(F);d.appendChild(y);E.appendChild(d);t.appendChild(E);E=document.createElement("tr");d=document.createElement("td");d.colSpan=2;d.style.paddingTop="16px";d.setAttribute("align","right");y=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});y.className=
"geBtn";b.editor.cancelFirst&&d.appendChild(y);I=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var G=parseInt(q.value);isNaN(G)||n.gridSize===G||n.setGridSize(G);G=new ChangePageSetup(b,m,C,f.get());G.ignoreColor=n.background==m;G.ignoreImage=(null!=n.backgroundImage?n.backgroundImage.src:null)===(null!=C?C.src:null);n.pageFormat.width==G.previousFormat.width&&n.pageFormat.height==G.previousFormat.height&&G.ignoreColor&&G.ignoreImage||n.model.execute(G)});I.className="geBtn gePrimaryBtn";
d.appendChild(I);b.editor.cancelFirst||d.appendChild(y);E.appendChild(d);t.appendChild(E);D.appendChild(t);this.container=D};
-PageSetupDialog.addPageFormatPanel=function(b,e,k,n){function D(qa,Q,W){if(W||q!=document.activeElement&&y!=document.activeElement){qa=!1;for(Q=0;Q<C.length;Q++)W=C[Q],ba?"custom"==W.key&&(d.value=W.key,ba=!1):null!=W.format&&("a4"==W.key?826==k.width?(k=mxRectangle.fromRectangle(k),k.width=827):826==k.height&&(k=mxRectangle.fromRectangle(k),k.height=827):"a5"==W.key&&(584==k.width?(k=mxRectangle.fromRectangle(k),k.width=583):584==k.height&&(k=mxRectangle.fromRectangle(k),k.height=583)),k.width==
-W.format.width&&k.height==W.format.height?(d.value=W.key,t.setAttribute("checked","checked"),t.defaultChecked=!0,t.checked=!0,E.removeAttribute("checked"),E.defaultChecked=!1,E.checked=!1,qa=!0):k.width==W.format.height&&k.height==W.format.width&&(d.value=W.key,t.removeAttribute("checked"),t.defaultChecked=!1,t.checked=!1,E.setAttribute("checked","checked"),E.defaultChecked=!0,qa=E.checked=!0));qa?(f.style.display="",m.style.display="none"):(q.value=k.width/100,y.value=k.height/100,t.setAttribute("checked",
+PageSetupDialog.addPageFormatPanel=function(b,e,k,n){function D(pa,Q,X){if(X||q!=document.activeElement&&y!=document.activeElement){pa=!1;for(Q=0;Q<C.length;Q++)X=C[Q],ca?"custom"==X.key&&(d.value=X.key,ca=!1):null!=X.format&&("a4"==X.key?826==k.width?(k=mxRectangle.fromRectangle(k),k.width=827):826==k.height&&(k=mxRectangle.fromRectangle(k),k.height=827):"a5"==X.key&&(584==k.width?(k=mxRectangle.fromRectangle(k),k.width=583):584==k.height&&(k=mxRectangle.fromRectangle(k),k.height=583)),k.width==
+X.format.width&&k.height==X.format.height?(d.value=X.key,t.setAttribute("checked","checked"),t.defaultChecked=!0,t.checked=!0,E.removeAttribute("checked"),E.defaultChecked=!1,E.checked=!1,pa=!0):k.width==X.format.height&&k.height==X.format.width&&(d.value=X.key,t.removeAttribute("checked"),t.defaultChecked=!1,t.checked=!1,E.setAttribute("checked","checked"),E.defaultChecked=!0,pa=E.checked=!0));pa?(f.style.display="",m.style.display="none"):(q.value=k.width/100,y.value=k.height/100,t.setAttribute("checked",
"checked"),d.value="custom",f.style.display="none",m.style.display="")}}e="format-"+e;var t=document.createElement("input");t.setAttribute("name",e);t.setAttribute("type","radio");t.setAttribute("value","portrait");var E=document.createElement("input");E.setAttribute("name",e);E.setAttribute("type","radio");E.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";t.style.marginRight="6px";f.appendChild(t);e=document.createElement("span");e.style.maxWidth="100px";mxUtils.write(e,mxResources.get("portrait"));f.appendChild(e);E.style.marginLeft="10px";E.style.marginRight="6px";f.appendChild(E);var g=document.createElement("span");g.style.width="100px";mxUtils.write(g,mxResources.get("landscape"));f.appendChild(g);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 y=document.createElement("input");y.setAttribute("size","7");y.style.textAlign="right";m.appendChild(y);mxUtils.write(m," in");f.style.display="none";m.style.display="none";for(var F={},C=PageSetupDialog.getFormats(),I=0;I<C.length;I++){var G=C[I];F[G.key]=G;var Y=document.createElement("option");Y.setAttribute("value",
-G.key);mxUtils.write(Y,G.title);d.appendChild(Y)}var ba=!1;D();b.appendChild(d);mxUtils.br(b);b.appendChild(f);b.appendChild(m);var Z=k,X=function(qa,Q){qa=F[d.value];null!=qa.format?(q.value=qa.format.width/100,y.value=qa.format.height/100,m.style.display="none",f.style.display=""):(f.style.display="none",m.style.display="");qa=parseFloat(q.value);if(isNaN(qa)||0>=qa)q.value=k.width/100;qa=parseFloat(y.value);if(isNaN(qa)||0>=qa)y.value=k.height/100;qa=new mxRectangle(0,0,Math.floor(100*parseFloat(q.value)),
-Math.floor(100*parseFloat(y.value)));"custom"!=d.value&&E.checked&&(qa=new mxRectangle(0,0,qa.height,qa.width));Q&&ba||qa.width==Z.width&&qa.height==Z.height||(Z=qa,null!=n&&n(Z))};mxEvent.addListener(e,"click",function(qa){t.checked=!0;X(qa);mxEvent.consume(qa)});mxEvent.addListener(g,"click",function(qa){E.checked=!0;X(qa);mxEvent.consume(qa)});mxEvent.addListener(q,"blur",X);mxEvent.addListener(q,"click",X);mxEvent.addListener(y,"blur",X);mxEvent.addListener(y,"click",X);mxEvent.addListener(E,
-"change",X);mxEvent.addListener(t,"change",X);mxEvent.addListener(d,"change",function(qa){ba="custom"==d.value;X(qa,!0)});X();return{set:function(qa){k=qa;D(null,null,!0)},get:function(){return Z},widthInput:q,heightInput:y}};
+"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 y=document.createElement("input");y.setAttribute("size","7");y.style.textAlign="right";m.appendChild(y);mxUtils.write(m," in");f.style.display="none";m.style.display="none";for(var F={},C=PageSetupDialog.getFormats(),I=0;I<C.length;I++){var G=C[I];F[G.key]=G;var Z=document.createElement("option");Z.setAttribute("value",
+G.key);mxUtils.write(Z,G.title);d.appendChild(Z)}var ca=!1;D();b.appendChild(d);mxUtils.br(b);b.appendChild(f);b.appendChild(m);var aa=k,Y=function(pa,Q){pa=F[d.value];null!=pa.format?(q.value=pa.format.width/100,y.value=pa.format.height/100,m.style.display="none",f.style.display=""):(f.style.display="none",m.style.display="");pa=parseFloat(q.value);if(isNaN(pa)||0>=pa)q.value=k.width/100;pa=parseFloat(y.value);if(isNaN(pa)||0>=pa)y.value=k.height/100;pa=new mxRectangle(0,0,Math.floor(100*parseFloat(q.value)),
+Math.floor(100*parseFloat(y.value)));"custom"!=d.value&&E.checked&&(pa=new mxRectangle(0,0,pa.height,pa.width));Q&&ca||pa.width==aa.width&&pa.height==aa.height||(aa=pa,null!=n&&n(aa))};mxEvent.addListener(e,"click",function(pa){t.checked=!0;Y(pa);mxEvent.consume(pa)});mxEvent.addListener(g,"click",function(pa){E.checked=!0;Y(pa);mxEvent.consume(pa)});mxEvent.addListener(q,"blur",Y);mxEvent.addListener(q,"click",Y);mxEvent.addListener(y,"blur",Y);mxEvent.addListener(y,"click",Y);mxEvent.addListener(E,
+"change",Y);mxEvent.addListener(t,"change",Y);mxEvent.addListener(d,"change",function(pa){ca="custom"==d.value;Y(pa,!0)});Y();return{set:function(pa){k=pa;D(null,null,!0)},get:function(){return aa},widthInput:q,heightInput:y}};
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,e,k,n,D,t,E,d,f,g,m,q,y){f=null!=f?f:!0;var F=document.createElement("table"),C=document.createElement("tbody");F.style.position="absolute";F.style.top="30px";F.style.left="20px";var I=document.createElement("tr");var G=document.createElement("td");G.style.textOverflow="ellipsis";G.style.textAlign="right";G.style.maxWidth=(y?y+15:100)+"px";G.style.fontSize="10pt";G.style.width=(y?y:84)+"px";mxUtils.write(G,(D||mxResources.get("filename"))+":");I.appendChild(G);var Y=
-document.createElement("input");Y.setAttribute("value",e||"");Y.style.marginLeft="4px";Y.style.width=null!=q?q+"px":"180px";var ba=mxUtils.button(k,function(){if(null==t||t(Y.value))f&&b.hideDialog(),n(Y.value)});ba.className="geBtn gePrimaryBtn";this.init=function(){if(null!=D||null==E)if(Y.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?Y.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var Z=F.parentNode;if(null!=Z){var X=null;mxEvent.addListener(Z,"dragleave",
-function(qa){null!=X&&(X.style.backgroundColor="",X=null);qa.stopPropagation();qa.preventDefault()});mxEvent.addListener(Z,"dragover",mxUtils.bind(this,function(qa){null==X&&(!mxClient.IS_IE||10<document.documentMode)&&(X=Y,X.style.backgroundColor="#ebf2f9");qa.stopPropagation();qa.preventDefault()}));mxEvent.addListener(Z,"drop",mxUtils.bind(this,function(qa){null!=X&&(X.style.backgroundColor="",X=null);0<=mxUtils.indexOf(qa.dataTransfer.types,"text/uri-list")&&(Y.value=decodeURIComponent(qa.dataTransfer.getData("text/uri-list")),
-ba.click());qa.stopPropagation();qa.preventDefault()}))}}};G=document.createElement("td");G.style.whiteSpace="nowrap";G.appendChild(Y);I.appendChild(G);if(null!=D||null==E)C.appendChild(I),null!=m&&(G.appendChild(FilenameDialog.createTypeHint(b,Y,m)),null!=b.editor.diagramFileTypes&&(I=document.createElement("tr"),G=document.createElement("td"),G.style.textOverflow="ellipsis",G.style.textAlign="right",G.style.maxWidth="100px",G.style.fontSize="10pt",G.style.width="84px",mxUtils.write(G,mxResources.get("type")+
-":"),I.appendChild(G),G=document.createElement("td"),G.style.whiteSpace="nowrap",I.appendChild(G),e=FilenameDialog.createFileTypes(b,Y,b.editor.diagramFileTypes),e.style.marginLeft="4px",e.style.width="198px",G.appendChild(e),Y.style.width=null!=q?q-40+"px":"190px",I.appendChild(G),C.appendChild(I)));null!=E&&(I=document.createElement("tr"),G=document.createElement("td"),G.colSpan=2,G.appendChild(E),I.appendChild(G),C.appendChild(I));I=document.createElement("tr");G=document.createElement("td");G.colSpan=
-2;G.style.paddingTop=null!=m?"12px":"20px";G.style.whiteSpace="nowrap";G.setAttribute("align","right");m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=g&&g()});m.className="geBtn";b.editor.cancelFirst&&G.appendChild(m);null!=d&&(q=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(d)}),q.className="geBtn",G.appendChild(q));mxEvent.addListener(Y,"keypress",function(Z){13==Z.keyCode&&ba.click()});G.appendChild(ba);b.editor.cancelFirst||G.appendChild(m);
+var FilenameDialog=function(b,e,k,n,D,t,E,d,f,g,m,q,y){f=null!=f?f:!0;var F=document.createElement("table"),C=document.createElement("tbody");F.style.position="absolute";F.style.top="30px";F.style.left="20px";var I=document.createElement("tr");var G=document.createElement("td");G.style.textOverflow="ellipsis";G.style.textAlign="right";G.style.maxWidth=(y?y+15:100)+"px";G.style.fontSize="10pt";G.style.width=(y?y:84)+"px";mxUtils.write(G,(D||mxResources.get("filename"))+":");I.appendChild(G);var Z=
+document.createElement("input");Z.setAttribute("value",e||"");Z.style.marginLeft="4px";Z.style.width=null!=q?q+"px":"180px";var ca=mxUtils.button(k,function(){if(null==t||t(Z.value))f&&b.hideDialog(),n(Z.value)});ca.className="geBtn gePrimaryBtn";this.init=function(){if(null!=D||null==E)if(Z.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?Z.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var aa=F.parentNode;if(null!=aa){var Y=null;mxEvent.addListener(aa,"dragleave",
+function(pa){null!=Y&&(Y.style.backgroundColor="",Y=null);pa.stopPropagation();pa.preventDefault()});mxEvent.addListener(aa,"dragover",mxUtils.bind(this,function(pa){null==Y&&(!mxClient.IS_IE||10<document.documentMode)&&(Y=Z,Y.style.backgroundColor="#ebf2f9");pa.stopPropagation();pa.preventDefault()}));mxEvent.addListener(aa,"drop",mxUtils.bind(this,function(pa){null!=Y&&(Y.style.backgroundColor="",Y=null);0<=mxUtils.indexOf(pa.dataTransfer.types,"text/uri-list")&&(Z.value=decodeURIComponent(pa.dataTransfer.getData("text/uri-list")),
+ca.click());pa.stopPropagation();pa.preventDefault()}))}}};G=document.createElement("td");G.style.whiteSpace="nowrap";G.appendChild(Z);I.appendChild(G);if(null!=D||null==E)C.appendChild(I),null!=m&&(G.appendChild(FilenameDialog.createTypeHint(b,Z,m)),null!=b.editor.diagramFileTypes&&(I=document.createElement("tr"),G=document.createElement("td"),G.style.textOverflow="ellipsis",G.style.textAlign="right",G.style.maxWidth="100px",G.style.fontSize="10pt",G.style.width="84px",mxUtils.write(G,mxResources.get("type")+
+":"),I.appendChild(G),G=document.createElement("td"),G.style.whiteSpace="nowrap",I.appendChild(G),e=FilenameDialog.createFileTypes(b,Z,b.editor.diagramFileTypes),e.style.marginLeft="4px",e.style.width="198px",G.appendChild(e),Z.style.width=null!=q?q-40+"px":"190px",I.appendChild(G),C.appendChild(I)));null!=E&&(I=document.createElement("tr"),G=document.createElement("td"),G.colSpan=2,G.appendChild(E),I.appendChild(G),C.appendChild(I));I=document.createElement("tr");G=document.createElement("td");G.colSpan=
+2;G.style.paddingTop=null!=m?"12px":"20px";G.style.whiteSpace="nowrap";G.setAttribute("align","right");m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=g&&g()});m.className="geBtn";b.editor.cancelFirst&&G.appendChild(m);null!=d&&(q=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(d)}),q.className="geBtn",G.appendChild(q));mxEvent.addListener(Z,"keypress",function(aa){13==aa.keyCode&&ca.click()});G.appendChild(ca);b.editor.cancelFirst||G.appendChild(m);
I.appendChild(G);C.appendChild(I);F.appendChild(C);this.container=F};FilenameDialog.filenameHelpLink=null;
FilenameDialog.createTypeHint=function(b,e,k){var n=document.createElement("img");n.style.backgroundPosition="center bottom";n.style.backgroundRepeat="no-repeat";n.style.margin="2px 0 0 4px";n.style.verticalAlign="top";n.style.cursor="pointer";n.style.height="16px";n.style.width="16px";mxUtils.setOpacity(n,70);var D=function(){n.setAttribute("src",Editor.helpImage);n.setAttribute("title",mxResources.get("help"));for(var t=0;t<k.length;t++)if(0<k[t].ext.length&&e.value.toLowerCase().substring(e.value.length-
k[t].ext.length-1)=="."+k[t].ext){n.setAttribute("title",mxResources.get(k[t].title));break}};mxEvent.addListener(e,"keyup",D);mxEvent.addListener(e,"change",D);mxEvent.addListener(n,"click",function(t){var E=n.getAttribute("title");n.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(t)});
@@ -2053,39 +2053,39 @@ mxGraphView.prototype.validateBackgroundStyles=function(){var E=this.graph,d=nul
E.defaultPageBorderColor,E.container.className="geDiagramContainer geDiagramBackdrop",f.style.backgroundImage="none",f.style.backgroundColor=""):(E.container.className="geDiagramContainer",f.style.backgroundPosition=m,f.style.backgroundColor=d,f.style.backgroundImage=g)};mxGraphView.prototype.createSvgGrid=function(E){for(var d=this.graph.gridSize*this.scale;d<this.minGridSize;)d*=2;for(var f=this.gridSteps*d,g=[],m=1;m<this.gridSteps;m++){var q=m*d;g.push("M 0 "+q+" L "+f+" "+q+" M "+q+" 0 L "+q+
" "+f)}return'<svg width="'+f+'" height="'+f+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+f+'" height="'+f+'" patternUnits="userSpaceOnUse"><path d="'+g.join(" ")+'" fill="none" stroke="'+E+'" opacity="0.2" stroke-width="1"/><path d="M '+f+" 0 L 0 0 0 "+f+'" fill="none" stroke="'+E+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(E,d){b.apply(this,arguments);
if(null!=this.shiftPreview1){var f=this.view.canvas;null!=f.ownerSVGElement&&(f=f.ownerSVGElement);var g=this.gridSize*this.view.scale*this.view.gridSteps;g=-Math.round(g-mxUtils.mod(this.view.translate.x*this.view.scale+E,g))+"px "+-Math.round(g-mxUtils.mod(this.view.translate.y*this.view.scale+d,g))+"px";f.style.backgroundPosition=g}};mxGraph.prototype.updatePageBreaks=function(E,d,f){var g=this.view.scale,m=this.view.translate,q=this.pageFormat,y=g*this.pageScale,F=this.view.getBackgroundPageBounds();
-d=F.width;f=F.height;var C=new mxRectangle(g*m.x,g*m.y,q.width*y,q.height*y),I=(E=E&&Math.min(C.width,C.height)>this.minPageBreakDist)?Math.ceil(f/C.height)-1:0,G=E?Math.ceil(d/C.width)-1:0,Y=F.x+d,ba=F.y+f;null==this.horizontalPageBreaks&&0<I&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<G&&(this.verticalPageBreaks=[]);E=mxUtils.bind(this,function(Z){if(null!=Z){for(var X=Z==this.horizontalPageBreaks?I:G,qa=0;qa<=X;qa++){var Q=Z==this.horizontalPageBreaks?[new mxPoint(Math.round(F.x),
-Math.round(F.y+(qa+1)*C.height)),new mxPoint(Math.round(Y),Math.round(F.y+(qa+1)*C.height))]:[new mxPoint(Math.round(F.x+(qa+1)*C.width),Math.round(F.y)),new mxPoint(Math.round(F.x+(qa+1)*C.width),Math.round(ba))];null!=Z[qa]?(Z[qa].points=Q,Z[qa].redraw()):(Q=new mxPolyline(Q,this.pageBreakColor),Q.dialect=this.dialect,Q.isDashed=this.pageBreakDashed,Q.pointerEvents=!1,Q.init(this.view.backgroundPane),Q.redraw(),Z[qa]=Q)}for(qa=X;qa<Z.length;qa++)Z[qa].destroy();Z.splice(X,Z.length-X)}});E(this.horizontalPageBreaks);
-E(this.verticalPageBreaks)};var e=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(E,d,f){for(var g=0;g<d.length;g++){if(this.graph.isTableCell(d[g])||this.graph.isTableRow(d[g]))return!1;if(this.graph.getModel().isVertex(d[g])){var m=this.graph.getCellGeometry(d[g]);if(null!=m&&m.relative)return!1}}return e.apply(this,arguments)};var k=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var E=
-k.apply(this,arguments);E.intersects=mxUtils.bind(this,function(d,f){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(E,arguments)});return E};mxGraphView.prototype.createBackgroundPageShape=function(E){return new mxRectangleShape(E,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var E=this.getGraphBounds(),d=0<E.width?E.x/this.scale-this.translate.x:0,f=0<E.height?E.y/this.scale-this.translate.y:0,g=this.graph.pageFormat,
+d=F.width;f=F.height;var C=new mxRectangle(g*m.x,g*m.y,q.width*y,q.height*y),I=(E=E&&Math.min(C.width,C.height)>this.minPageBreakDist)?Math.ceil(f/C.height)-1:0,G=E?Math.ceil(d/C.width)-1:0,Z=F.x+d,ca=F.y+f;null==this.horizontalPageBreaks&&0<I&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<G&&(this.verticalPageBreaks=[]);E=mxUtils.bind(this,function(aa){if(null!=aa){for(var Y=aa==this.horizontalPageBreaks?I:G,pa=0;pa<=Y;pa++){var Q=aa==this.horizontalPageBreaks?[new mxPoint(Math.round(F.x),
+Math.round(F.y+(pa+1)*C.height)),new mxPoint(Math.round(Z),Math.round(F.y+(pa+1)*C.height))]:[new mxPoint(Math.round(F.x+(pa+1)*C.width),Math.round(F.y)),new mxPoint(Math.round(F.x+(pa+1)*C.width),Math.round(ca))];null!=aa[pa]?(aa[pa].points=Q,aa[pa].redraw()):(Q=new mxPolyline(Q,this.pageBreakColor),Q.dialect=this.dialect,Q.isDashed=this.pageBreakDashed,Q.pointerEvents=!1,Q.init(this.view.backgroundPane),Q.redraw(),aa[pa]=Q)}for(pa=Y;pa<aa.length;pa++)aa[pa].destroy();aa.splice(Y,aa.length-Y)}});
+E(this.horizontalPageBreaks);E(this.verticalPageBreaks)};var e=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(E,d,f){for(var g=0;g<d.length;g++){if(this.graph.isTableCell(d[g])||this.graph.isTableRow(d[g]))return!1;if(this.graph.getModel().isVertex(d[g])){var m=this.graph.getCellGeometry(d[g]);if(null!=m&&m.relative)return!1}}return e.apply(this,arguments)};var k=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=
+function(){var E=k.apply(this,arguments);E.intersects=mxUtils.bind(this,function(d,f){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(E,arguments)});return E};mxGraphView.prototype.createBackgroundPageShape=function(E){return new mxRectangleShape(E,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var E=this.getGraphBounds(),d=0<E.width?E.x/this.scale-this.translate.x:0,f=0<E.height?E.y/this.scale-this.translate.y:0,g=this.graph.pageFormat,
m=this.graph.pageScale,q=g.width*m;g=g.height*m;m=Math.floor(Math.min(0,d)/q);var y=Math.floor(Math.min(0,f)/g);return new mxRectangle(this.scale*(this.translate.x+m*q),this.scale*(this.translate.y+y*g),this.scale*(Math.ceil(Math.max(1,d+E.width/this.scale)/q)-m)*q,this.scale*(Math.ceil(Math.max(1,f+E.height/this.scale)/g)-y)*g)};var n=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(E,d){n.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=E+"px",this.view.backgroundPageShape.node.style.marginTop=d+"px")};var D=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(E,d,f,g,m,q){var y=D.apply(this,arguments);null==q||q||mxEvent.addListener(y,"mousedown",function(F){mxEvent.consume(F)});return y};var t=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
function(E,d,f){var g=this.graph.model.getParent(E);if(d){var m=this.graph.model.isEdge(E)?null:this.graph.getCellGeometry(E);m=!this.graph.model.isEdge(g)&&!this.graph.isSiblingSelected(E)&&(null!=m&&m.relative||!this.graph.isContainer(g)||this.graph.isPart(E))}else if(m=t.apply(this,arguments),this.graph.isTableCell(E)||this.graph.isTableRow(E))m=g,this.graph.isTable(m)||(m=this.graph.model.getParent(m)),m=!this.graph.selectionCellsHandler.isHandled(m)||this.graph.isCellSelected(m)&&this.graph.isToggleEvent(f.getEvent())||
-this.graph.isCellSelected(E)&&!this.graph.isToggleEvent(f.getEvent())||this.graph.isTableCell(E)&&this.graph.isCellSelected(g);return m};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(E){E=E.getCell();for(var d=this.graph.getModel(),f=d.getParent(E),g=this.graph.view.getState(f),m=this.graph.isCellSelected(E);null!=g&&(d.isVertex(f)||d.isEdge(f));){var q=this.graph.isCellSelected(f);m=m||q;if(q||!m&&(this.graph.isTableCell(E)||this.graph.isTableRow(E)))E=f;f=d.getParent(f)}return E}})();EditorUi=function(b,e,k){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var n=this.editor.graph;n.lightbox=k;var D=n.getGraphBounds;n.getGraphBounds=function(){var O=D.apply(this,arguments),N=this.backgroundImage;if(null!=N&&null!=N.width&&null!=N.height){var aa=this.view.translate,ma=this.view.scale;O=mxRectangle.fromRectangle(O);O.add(new mxRectangle((aa.x+N.x)*ma,(aa.y+N.y)*ma,N.width*ma,N.height*ma))}return O};n.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.selectionStateListener=mxUtils.bind(this,function(O,N){this.clearSelectionState()});n.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);
-n.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);n.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);n.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);n.getView().addListener("unitChanged",this.selectionStateListener);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,n.isEnabled=function(){return!1},n.panningHandler.isForcePanningEvent=function(O){return!mxEvent.isPopupTrigger(O.getEvent())});this.actions=new Actions(this);this.menus=
+this.graph.isCellSelected(E)&&!this.graph.isToggleEvent(f.getEvent())||this.graph.isTableCell(E)&&this.graph.isCellSelected(g);return m};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(E){E=E.getCell();for(var d=this.graph.getModel(),f=d.getParent(E),g=this.graph.view.getState(f),m=this.graph.isCellSelected(E);null!=g&&(d.isVertex(f)||d.isEdge(f));){var q=this.graph.isCellSelected(f);m=m||q;if(q||!m&&(this.graph.isTableCell(E)||this.graph.isTableRow(E)))E=f;f=d.getParent(f)}return E}})();EditorUi=function(b,e,k){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var n=this.editor.graph;n.lightbox=k;var D=n.getGraphBounds;n.getGraphBounds=function(){var N=D.apply(this,arguments),O=this.backgroundImage;if(null!=O&&null!=O.width&&null!=O.height){var ba=this.view.translate,la=this.view.scale;N=mxRectangle.fromRectangle(N);N.add(new mxRectangle((ba.x+O.x)*la,(ba.y+O.y)*la,O.width*la,O.height*la))}return N};n.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.selectionStateListener=mxUtils.bind(this,function(N,O){this.clearSelectionState()});n.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);
+n.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);n.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);n.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);n.getView().addListener("unitChanged",this.selectionStateListener);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,n.isEnabled=function(){return!1},n.panningHandler.isForcePanningEvent=function(N){return!mxEvent.isPopupTrigger(N.getEvent())});this.actions=new Actions(this);this.menus=
this.createMenus();if(!n.standalone){var t="rounded shadow glass dashed dashPattern labelBackgroundColor labelBorderColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents".split(" "),E="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" "),
-d="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" "),f=!1,g=!1;this.setDefaultStyle=function(O){try{var N=n.getCellStyle(O,!1),aa=[],ma=[],u;for(u in N)aa.push(N[u]),ma.push(u);n.getModel().isEdge(O)?n.currentEdgeStyle={}:n.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",ma,"values",aa,"cells",[O]));n.getModel().isEdge(O)?g=!0:f=!0}catch(H){this.handleError(H)}};this.clearDefaultStyle=function(){n.currentEdgeStyle=
+d="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" "),f=!1,g=!1;this.setDefaultStyle=function(N){try{var O=n.getCellStyle(N,!1),ba=[],la=[],u;for(u in O)ba.push(O[u]),la.push(u);n.getModel().isEdge(N)?n.currentEdgeStyle={}:n.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",la,"values",ba,"cells",[N]));n.getModel().isEdge(N)?g=!0:f=!0}catch(H){this.handleError(H)}};this.clearDefaultStyle=function(){n.currentEdgeStyle=
mxUtils.clone(n.defaultEdgeStyle);n.currentVertexStyle=mxUtils.clone(n.defaultVertexStyle);f=g=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var m=["fontFamily","fontSource","fontSize","fontColor"];for(e=0;e<m.length;e++)0>mxUtils.indexOf(t,m[e])&&t.push(m[e]);var q="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),y=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],
-["strokeColor","strokeWidth"],["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(e=0;e<y.length;e++)for(k=0;k<y[e].length;k++)t.push(y[e][k]);for(e=0;e<E.length;e++)0>mxUtils.indexOf(t,E[e])&&t.push(E[e]);var F=function(O,N,aa,ma,u,H,P){ma=null!=ma?ma:n.currentVertexStyle;u=null!=u?u:n.currentEdgeStyle;H=null!=H?H:!0;aa=null!=aa?aa:n.getModel();if(P){P=[];for(var S=0;S<O.length;S++)P=P.concat(aa.getDescendants(O[S]));O=P}aa.beginUpdate();try{for(S=0;S<O.length;S++){var R=
-O[S];if(N)var ca=["fontSize","fontFamily","fontColor"];else{var ea=aa.getStyle(R),fa=null!=ea?ea.split(";"):[];ca=t.slice();for(var ra=0;ra<fa.length;ra++){var ua=fa[ra],sa=ua.indexOf("=");if(0<=sa){var Aa=ua.substring(0,sa),Ca=mxUtils.indexOf(ca,Aa);0<=Ca&&ca.splice(Ca,1);for(P=0;P<y.length;P++){var Ba=y[P];if(0<=mxUtils.indexOf(Ba,Aa))for(var ta=0;ta<Ba.length;ta++){var Pa=mxUtils.indexOf(ca,Ba[ta]);0<=Pa&&ca.splice(Pa,1)}}}}}var Ta=aa.isEdge(R);P=Ta?u:ma;var Oa=aa.getStyle(R);for(ra=0;ra<ca.length;ra++){Aa=
-ca[ra];var Xa=P[Aa];null!=Xa&&"edgeStyle"!=Aa&&("shape"!=Aa||Ta)&&(!Ta||H||0>mxUtils.indexOf(d,Aa))&&(Oa=mxUtils.setStyle(Oa,Aa,Xa))}Editor.simpleLabels&&(Oa=mxUtils.setStyle(mxUtils.setStyle(Oa,"html",null),"whiteSpace",null));aa.setStyle(R,Oa)}}finally{aa.endUpdate()}return O};n.addListener("cellsInserted",function(O,N){F(N.getProperty("cells"),null,null,null,null,!0,!0)});n.addListener("textInserted",function(O,N){F(N.getProperty("cells"),!0)});this.insertHandler=F;this.createDivs();this.createUi();
-this.refresh();var C=mxUtils.bind(this,function(O){null==O&&(O=window.event);return n.isEditing()||null!=O&&this.isSelectionAllowed(O)});this.container==document.body&&(this.menubarContainer.onselectstart=C,this.menubarContainer.onmousedown=C,this.toolbarContainer.onselectstart=C,this.toolbarContainer.onmousedown=C,this.diagramContainer.onselectstart=C,this.diagramContainer.onmousedown=C,this.sidebarContainer.onselectstart=C,this.sidebarContainer.onmousedown=C,this.formatContainer.onselectstart=C,
-this.formatContainer.onmousedown=C,this.footerContainer.onselectstart=C,this.footerContainer.onmousedown=C,null!=this.tabContainer&&(this.tabContainer.onselectstart=C));!this.editor.chromeless||this.editor.editable?(e=function(O){if(null!=O){var N=mxEvent.getSource(O);if("A"==N.nodeName)for(;null!=N;){if("geHint"==N.className)return!0;N=N.parentNode}}return C(O)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",
-e):this.diagramContainer.oncontextmenu=e):n.panningHandler.usePopupTrigger=!1;n.init(this.diagramContainer);mxClient.IS_SVG&&null!=n.view.getDrawPane()&&(e=n.view.getDrawPane().ownerSVGElement,null!=e&&(e.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=n.graphHandler){var I=n.graphHandler.start;n.graphHandler.start=function(){null!=ja.hoverIcons&&ja.hoverIcons.reset();I.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(O){var N=
-mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(O)-N.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(O)-N.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var G=!1,Y=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(O,N){return G||Y.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(O){32!=O.which||n.isEditing()?mxEvent.isConsumed(O)||
-27!=O.keyCode||this.hideDialog(null,!0):(G=!0,this.hoverIcons.reset(),n.container.style.cursor="move",n.isEditing()||mxEvent.getSource(O)!=n.container||mxEvent.consume(O))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(O){n.container.style.cursor="";G=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var ba=n.panningHandler.isForcePanningEvent;n.panningHandler.isForcePanningEvent=function(O){return ba.apply(this,arguments)||G||
-mxEvent.isMouseEvent(O.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(O.getEvent()))&&(!mxEvent.isControlDown(O.getEvent())&&mxEvent.isRightMouseButton(O.getEvent())||mxEvent.isMiddleMouseButton(O.getEvent()))};var Z=n.cellEditor.isStopEditingEvent;n.cellEditor.isStopEditingEvent=function(O){return Z.apply(this,arguments)||13==O.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(O)||mxClient.IS_MAC&&mxEvent.isMetaDown(O)||mxClient.IS_SF&&mxEvent.isShiftDown(O))};var X=n.isZoomWheelEvent;
-n.isZoomWheelEvent=function(){return G||X.apply(this,arguments)};var qa=!1,Q=null,W=null,ha=null,la=mxUtils.bind(this,function(){if(null!=this.toolbar&&qa!=n.cellEditor.isContentEditing()){for(var O=this.toolbar.container.firstChild,N=[];null!=O;){var aa=O.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,O)&&(O.parentNode.removeChild(O),N.push(O));O=aa}O=this.toolbar.fontMenu;aa=this.toolbar.sizeMenu;if(null==ha)this.toolbar.createTextToolbar();else{for(var ma=0;ma<ha.length;ma++)this.toolbar.container.appendChild(ha[ma]);
-this.toolbar.fontMenu=Q;this.toolbar.sizeMenu=W}qa=n.cellEditor.isContentEditing();Q=O;W=aa;ha=N}}),ja=this,U=n.cellEditor.startEditing;n.cellEditor.startEditing=function(){U.apply(this,arguments);la();if(n.cellEditor.isContentEditing()){var O=!1,N=function(){O||(O=!0,window.setTimeout(function(){var aa=n.getSelectedEditingElement();null!=aa&&(aa=mxUtils.getCurrentStyle(aa),null!=aa&&null!=ja.toolbar&&(ja.toolbar.setFontName(Graph.stripQuotes(aa.fontFamily)),ja.toolbar.setFontSize(parseInt(aa.fontSize))));
-O=!1},0))};mxEvent.addListener(n.cellEditor.textarea,"input",N);mxEvent.addListener(n.cellEditor.textarea,"touchend",N);mxEvent.addListener(n.cellEditor.textarea,"mouseup",N);mxEvent.addListener(n.cellEditor.textarea,"keyup",N);N()}};var L=n.cellEditor.stopEditing;n.cellEditor.stopEditing=function(O,N){try{L.apply(this,arguments),la()}catch(aa){ja.handleError(aa)}};n.container.setAttribute("tabindex","0");n.container.style.cursor="default";if(window.self===window.top&&null!=n.container.parentNode)try{n.container.focus()}catch(O){}var da=
-n.fireMouseEvent;n.fireMouseEvent=function(O,N,aa){O==mxEvent.MOUSE_DOWN&&this.container.focus();da.apply(this,arguments)};n.popupMenuHandler.autoExpand=!0;null!=this.menus&&(n.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(O,N,aa){this.menus.createPopupMenu(O,N,aa)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(O){n.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};n.connectionHandler.addListener(mxEvent.CONNECT,
-function(O,N){var aa=[N.getProperty("cell")];N.getProperty("terminalInserted")&&(aa.push(N.getProperty("terminal")),window.setTimeout(function(){null!=ja.hoverIcons&&ja.hoverIcons.update(n.view.getState(aa[aa.length-1]))},0));F(aa)});this.addListener("styleChanged",mxUtils.bind(this,function(O,N){var aa=N.getProperty("cells"),ma=O=!1;if(0<aa.length)for(var u=0;u<aa.length&&(O=n.getModel().isVertex(aa[u])||O,!(ma=n.getModel().isEdge(aa[u])||ma)||!O);u++);else ma=O=!0;O=O&&!f;ma=ma&&!g;aa=N.getProperty("keys");
-N=N.getProperty("values");for(u=0;u<aa.length;u++){var H=0<=mxUtils.indexOf(m,aa[u]);if("strokeColor"!=aa[u]||null!=N[u]&&"none"!=N[u])if(0<=mxUtils.indexOf(E,aa[u]))ma||0<=mxUtils.indexOf(q,aa[u])?null==N[u]?delete n.currentEdgeStyle[aa[u]]:n.currentEdgeStyle[aa[u]]=N[u]:O&&0<=mxUtils.indexOf(t,aa[u])&&(null==N[u]?delete n.currentVertexStyle[aa[u]]:n.currentVertexStyle[aa[u]]=N[u]);else if(0<=mxUtils.indexOf(t,aa[u])){if(O||H)null==N[u]?delete n.currentVertexStyle[aa[u]]:n.currentVertexStyle[aa[u]]=
-N[u];if(ma||H||0<=mxUtils.indexOf(q,aa[u]))null==N[u]?delete n.currentEdgeStyle[aa[u]]:n.currentEdgeStyle[aa[u]]=N[u]}}null!=this.toolbar&&(this.toolbar.setFontName(n.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(n.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==n.currentEdgeStyle.edgeStyle&&"1"==n.currentEdgeStyle.curved?
+["strokeColor","strokeWidth"],["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(e=0;e<y.length;e++)for(k=0;k<y[e].length;k++)t.push(y[e][k]);for(e=0;e<E.length;e++)0>mxUtils.indexOf(t,E[e])&&t.push(E[e]);var F=function(N,O,ba,la,u,H,P){la=null!=la?la:n.currentVertexStyle;u=null!=u?u:n.currentEdgeStyle;H=null!=H?H:!0;ba=null!=ba?ba:n.getModel();if(P){P=[];for(var W=0;W<N.length;W++)P=P.concat(ba.getDescendants(N[W]));N=P}ba.beginUpdate();try{for(W=0;W<N.length;W++){var R=
+N[W];if(O)var da=["fontSize","fontFamily","fontColor"];else{var fa=ba.getStyle(R),ea=null!=fa?fa.split(";"):[];da=t.slice();for(var qa=0;qa<ea.length;qa++){var va=ea[qa],ua=va.indexOf("=");if(0<=ua){var Aa=va.substring(0,ua),za=mxUtils.indexOf(da,Aa);0<=za&&da.splice(za,1);for(P=0;P<y.length;P++){var Ca=y[P];if(0<=mxUtils.indexOf(Ca,Aa))for(var sa=0;sa<Ca.length;sa++){var Va=mxUtils.indexOf(da,Ca[sa]);0<=Va&&da.splice(Va,1)}}}}}var Ua=ba.isEdge(R);P=Ua?u:la;var Ra=ba.getStyle(R);for(qa=0;qa<da.length;qa++){Aa=
+da[qa];var Za=P[Aa];null!=Za&&"edgeStyle"!=Aa&&("shape"!=Aa||Ua)&&(!Ua||H||0>mxUtils.indexOf(d,Aa))&&(Ra=mxUtils.setStyle(Ra,Aa,Za))}Editor.simpleLabels&&(Ra=mxUtils.setStyle(mxUtils.setStyle(Ra,"html",null),"whiteSpace",null));ba.setStyle(R,Ra)}}finally{ba.endUpdate()}return N};n.addListener("cellsInserted",function(N,O){F(O.getProperty("cells"),null,null,null,null,!0,!0)});n.addListener("textInserted",function(N,O){F(O.getProperty("cells"),!0)});this.insertHandler=F;this.createDivs();this.createUi();
+this.refresh();var C=mxUtils.bind(this,function(N){null==N&&(N=window.event);return n.isEditing()||null!=N&&this.isSelectionAllowed(N)});this.container==document.body&&(this.menubarContainer.onselectstart=C,this.menubarContainer.onmousedown=C,this.toolbarContainer.onselectstart=C,this.toolbarContainer.onmousedown=C,this.diagramContainer.onselectstart=C,this.diagramContainer.onmousedown=C,this.sidebarContainer.onselectstart=C,this.sidebarContainer.onmousedown=C,this.formatContainer.onselectstart=C,
+this.formatContainer.onmousedown=C,this.footerContainer.onselectstart=C,this.footerContainer.onmousedown=C,null!=this.tabContainer&&(this.tabContainer.onselectstart=C));!this.editor.chromeless||this.editor.editable?(e=function(N){if(null!=N){var O=mxEvent.getSource(N);if("A"==O.nodeName)for(;null!=O;){if("geHint"==O.className)return!0;O=O.parentNode}}return C(N)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",
+e):this.diagramContainer.oncontextmenu=e):n.panningHandler.usePopupTrigger=!1;n.init(this.diagramContainer);mxClient.IS_SVG&&null!=n.view.getDrawPane()&&(e=n.view.getDrawPane().ownerSVGElement,null!=e&&(e.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=n.graphHandler){var I=n.graphHandler.start;n.graphHandler.start=function(){null!=ma.hoverIcons&&ma.hoverIcons.reset();I.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(N){var O=
+mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(N)-O.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(N)-O.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var G=!1,Z=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(N,O){return G||Z.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(N){32!=N.which||n.isEditing()?mxEvent.isConsumed(N)||
+27!=N.keyCode||this.hideDialog(null,!0):(G=!0,this.hoverIcons.reset(),n.container.style.cursor="move",n.isEditing()||mxEvent.getSource(N)!=n.container||mxEvent.consume(N))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(N){n.container.style.cursor="";G=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var ca=n.panningHandler.isForcePanningEvent;n.panningHandler.isForcePanningEvent=function(N){return ca.apply(this,arguments)||G||
+mxEvent.isMouseEvent(N.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(N.getEvent()))&&(!mxEvent.isControlDown(N.getEvent())&&mxEvent.isRightMouseButton(N.getEvent())||mxEvent.isMiddleMouseButton(N.getEvent()))};var aa=n.cellEditor.isStopEditingEvent;n.cellEditor.isStopEditingEvent=function(N){return aa.apply(this,arguments)||13==N.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(N)||mxClient.IS_MAC&&mxEvent.isMetaDown(N)||mxClient.IS_SF&&mxEvent.isShiftDown(N))};var Y=n.isZoomWheelEvent;
+n.isZoomWheelEvent=function(){return G||Y.apply(this,arguments)};var pa=!1,Q=null,X=null,ha=null,U=mxUtils.bind(this,function(){if(null!=this.toolbar&&pa!=n.cellEditor.isContentEditing()){for(var N=this.toolbar.container.firstChild,O=[];null!=N;){var ba=N.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,N)&&(N.parentNode.removeChild(N),O.push(N));N=ba}N=this.toolbar.fontMenu;ba=this.toolbar.sizeMenu;if(null==ha)this.toolbar.createTextToolbar();else{for(var la=0;la<ha.length;la++)this.toolbar.container.appendChild(ha[la]);
+this.toolbar.fontMenu=Q;this.toolbar.sizeMenu=X}pa=n.cellEditor.isContentEditing();Q=N;X=ba;ha=O}}),ma=this,T=n.cellEditor.startEditing;n.cellEditor.startEditing=function(){T.apply(this,arguments);U();if(n.cellEditor.isContentEditing()){var N=!1,O=function(){N||(N=!0,window.setTimeout(function(){var ba=n.getSelectedEditingElement();null!=ba&&(ba=mxUtils.getCurrentStyle(ba),null!=ba&&null!=ma.toolbar&&(ma.toolbar.setFontName(Graph.stripQuotes(ba.fontFamily)),ma.toolbar.setFontSize(parseInt(ba.fontSize))));
+N=!1},0))};mxEvent.addListener(n.cellEditor.textarea,"input",O);mxEvent.addListener(n.cellEditor.textarea,"touchend",O);mxEvent.addListener(n.cellEditor.textarea,"mouseup",O);mxEvent.addListener(n.cellEditor.textarea,"keyup",O);O()}};var M=n.cellEditor.stopEditing;n.cellEditor.stopEditing=function(N,O){try{M.apply(this,arguments),U()}catch(ba){ma.handleError(ba)}};n.container.setAttribute("tabindex","0");n.container.style.cursor="default";if(window.self===window.top&&null!=n.container.parentNode)try{n.container.focus()}catch(N){}var ia=
+n.fireMouseEvent;n.fireMouseEvent=function(N,O,ba){N==mxEvent.MOUSE_DOWN&&this.container.focus();ia.apply(this,arguments)};n.popupMenuHandler.autoExpand=!0;null!=this.menus&&(n.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(N,O,ba){this.menus.createPopupMenu(N,O,ba)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(N){n.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};n.connectionHandler.addListener(mxEvent.CONNECT,
+function(N,O){var ba=[O.getProperty("cell")];O.getProperty("terminalInserted")&&(ba.push(O.getProperty("terminal")),window.setTimeout(function(){null!=ma.hoverIcons&&ma.hoverIcons.update(n.view.getState(ba[ba.length-1]))},0));F(ba)});this.addListener("styleChanged",mxUtils.bind(this,function(N,O){var ba=O.getProperty("cells"),la=N=!1;if(0<ba.length)for(var u=0;u<ba.length&&(N=n.getModel().isVertex(ba[u])||N,!(la=n.getModel().isEdge(ba[u])||la)||!N);u++);else la=N=!0;N=N&&!f;la=la&&!g;ba=O.getProperty("keys");
+O=O.getProperty("values");for(u=0;u<ba.length;u++){var H=0<=mxUtils.indexOf(m,ba[u]);if("strokeColor"!=ba[u]||null!=O[u]&&"none"!=O[u])if(0<=mxUtils.indexOf(E,ba[u]))la||0<=mxUtils.indexOf(q,ba[u])?null==O[u]?delete n.currentEdgeStyle[ba[u]]:n.currentEdgeStyle[ba[u]]=O[u]:N&&0<=mxUtils.indexOf(t,ba[u])&&(null==O[u]?delete n.currentVertexStyle[ba[u]]:n.currentVertexStyle[ba[u]]=O[u]);else if(0<=mxUtils.indexOf(t,ba[u])){if(N||H)null==O[u]?delete n.currentVertexStyle[ba[u]]:n.currentVertexStyle[ba[u]]=
+O[u];if(la||H||0<=mxUtils.indexOf(q,ba[u]))null==O[u]?delete n.currentEdgeStyle[ba[u]]:n.currentEdgeStyle[ba[u]]=O[u]}}null!=this.toolbar&&(this.toolbar.setFontName(n.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(n.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==n.currentEdgeStyle.edgeStyle&&"1"==n.currentEdgeStyle.curved?
"geSprite geSprite-curved":"straight"==n.currentEdgeStyle.edgeStyle||"none"==n.currentEdgeStyle.edgeStyle||null==n.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==n.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==n.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==n.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==n.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==n.currentEdgeStyle.elbow?
-"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==n.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==n.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==n.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var O=n.currentVertexStyle.fontFamily||"Helvetica",
-N=String(n.currentVertexStyle.fontSize||"12"),aa=n.getView().getState(n.getSelectionCell());null!=aa&&(O=aa.style[mxConstants.STYLE_FONTFAMILY]||O,N=aa.style[mxConstants.STYLE_FONTSIZE]||N,10<O.length&&(O=O.substring(0,8)+"..."));this.toolbar.setFontName(O);this.toolbar.setFontSize(N)}),n.getSelectionModel().addListener(mxEvent.CHANGE,b),n.getModel().addListener(mxEvent.CHANGE,b));n.addListener(mxEvent.CELLS_ADDED,function(O,N){O=N.getProperty("cells");N=N.getProperty("parent");null!=N&&n.getModel().isLayer(N)&&
-!n.isCellVisible(N)&&null!=O&&0<O.length&&n.getModel().setVisible(N,!0)});this.gestureHandler=mxUtils.bind(this,function(O){null!=this.currentMenu&&mxEvent.getSource(O)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=
+"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==n.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==n.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==n.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var N=n.currentVertexStyle.fontFamily||"Helvetica",
+O=String(n.currentVertexStyle.fontSize||"12"),ba=n.getView().getState(n.getSelectionCell());null!=ba&&(N=ba.style[mxConstants.STYLE_FONTFAMILY]||N,O=ba.style[mxConstants.STYLE_FONTSIZE]||O,10<N.length&&(N=N.substring(0,8)+"..."));this.toolbar.setFontName(N);this.toolbar.setFontSize(O)}),n.getSelectionModel().addListener(mxEvent.CHANGE,b),n.getModel().addListener(mxEvent.CHANGE,b));n.addListener(mxEvent.CELLS_ADDED,function(N,O){N=O.getProperty("cells");O=O.getProperty("parent");null!=O&&n.getModel().isLayer(O)&&
+!n.isCellVisible(O)&&null!=N&&0<N.length&&n.getModel().setVisible(O,!0)});this.gestureHandler=mxUtils.bind(this,function(N){null!=this.currentMenu&&mxEvent.getSource(N)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=
mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){n.view.validateBackground()}));
this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){n.view.validateBackground()}));n.addListener("gridSizeChanged",mxUtils.bind(this,function(){n.isGridEnabled()&&n.view.validateBackground()}));this.editor.resetGraph()}this.init();n.standalone||this.open()};EditorUi.compactUi=!0;
EditorUi.parsePng=function(b,e,k){function n(d,f){var g=t;t+=f;return d.substring(g,t)}function D(d){d=n(d,4);return d.charCodeAt(3)+(d.charCodeAt(2)<<8)+(d.charCodeAt(1)<<16)+(d.charCodeAt(0)<<24)}var t=0;if(n(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=k&&k();else if(n(b,4),"IHDR"!=n(b,4))null!=k&&k();else{n(b,17);do{k=D(b);var E=n(b,4);if(null!=e&&e(t-8,E,k))break;value=n(b,k);n(b,4);if("IEND"==E)break}while(k)}};mxUtils.extend(EditorUi,mxEventSource);
@@ -2105,8 +2105,8 @@ EditorUi.prototype.installShapePicker=function(){var b=this.editor.graph,e=this;
b.popupMenuHandler.isMenuShowing=function(){return n.apply(this,arguments)||null!=e.shapePicker};var D=b.dblClick;b.dblClick=function(f,g){if(this.isEnabled())if(null!=g||null==e.sidebar||mxEvent.isShiftDown(f)||b.isCellLocked(b.getDefaultParent()))D.apply(this,arguments);else{var m=mxUtils.convertPoint(this.container,mxEvent.getClientX(f),mxEvent.getClientY(f));mxEvent.consume(f);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(m.x,m.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",
k);var t=this.hoverIcons.drag;this.hoverIcons.drag=function(){e.hideShapePicker();t.apply(this,arguments)};var E=this.hoverIcons.execute;this.hoverIcons.execute=function(f,g,m){var q=m.getEvent();this.graph.isCloneEvent(q)||mxEvent.isShiftDown(q)?E.apply(this,arguments):this.graph.connectVertex(f.cell,g,this.graph.defaultEdgeLength,q,null,null,mxUtils.bind(this,function(y,F,C){var I=b.getCompositeParent(f.cell);y=b.getCellGeometry(I);for(m.consume();null!=I&&b.model.isVertex(I)&&null!=y&&y.relative;)cell=
I,I=b.model.getParent(cell),y=b.getCellGeometry(I);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(m.getGraphX(),m.getGraphY(),I,mxUtils.bind(this,function(G){C(G);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(G))}),g)}),30)}),mxUtils.bind(this,function(y){this.graph.selectCellsForConnectVertex(y,q,this)}))};var d=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(f,g){null!=d&&window.clearTimeout(d);d=window.setTimeout(mxUtils.bind(this,function(){var m=
-g.getProperty("arrow"),q=g.getProperty("direction"),y=g.getProperty("event");m=m.getBoundingClientRect();var F=mxUtils.getOffset(b.container),C=b.container.scrollLeft+m.x-F.x;F=b.container.scrollTop+m.y-F.y;var I=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),G=e.showShapePicker(C,F,I,mxUtils.bind(this,function(Y){null!=Y&&b.connectVertex(I,q,b.defaultEdgeLength,y,!0,!0,function(ba,Z,X){X(Y);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(Y))},
-function(ba){b.selectCellsForConnectVertex(ba)},y,this.hoverIcons)}),q,!0);this.centerShapePicker(G,m,C,F,q);mxUtils.setOpacity(G,30);mxEvent.addListener(G,"mouseenter",function(){mxUtils.setOpacity(G,100)});mxEvent.addListener(G,"mouseleave",function(){e.hideShapePicker()})}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(f,g){null!=d&&window.clearTimeout(d)}))}};
+g.getProperty("arrow"),q=g.getProperty("direction"),y=g.getProperty("event");m=m.getBoundingClientRect();var F=mxUtils.getOffset(b.container),C=b.container.scrollLeft+m.x-F.x;F=b.container.scrollTop+m.y-F.y;var I=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),G=e.showShapePicker(C,F,I,mxUtils.bind(this,function(Z){null!=Z&&b.connectVertex(I,q,b.defaultEdgeLength,y,!0,!0,function(ca,aa,Y){Y(Z);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(Z))},
+function(ca){b.selectCellsForConnectVertex(ca)},y,this.hoverIcons)}),q,!0);this.centerShapePicker(G,m,C,F,q);mxUtils.setOpacity(G,30);mxEvent.addListener(G,"mouseenter",function(){mxUtils.setOpacity(G,100)});mxEvent.addListener(G,"mouseleave",function(){e.hideShapePicker()})}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(f,g){null!=d&&window.clearTimeout(d)}))}};
EditorUi.prototype.centerShapePicker=function(b,e,k,n,D){if(D==mxConstants.DIRECTION_EAST||D==mxConstants.DIRECTION_WEST)b.style.width="40px";var t=b.getBoundingClientRect();D==mxConstants.DIRECTION_NORTH?(k-=t.width/2-10,n-=t.height+6):D==mxConstants.DIRECTION_SOUTH?(k-=t.width/2-10,n+=e.height+6):D==mxConstants.DIRECTION_WEST?(k-=t.width+6,n-=t.height/2-10):D==mxConstants.DIRECTION_EAST&&(k+=e.width+6,n-=t.height/2-10);b.style.left=k+"px";b.style.top=n+"px"};
EditorUi.prototype.showShapePicker=function(b,e,k,n,D,t){b=this.createShapePicker(b,e,k,n,D,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(k,t),t);null!=b&&(null==this.hoverIcons||t||this.hoverIcons.reset(),t=this.editor.graph,t.popupMenuHandler.hideMenu(),t.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=n,this.shapePicker=b);return b};
EditorUi.prototype.createShapePicker=function(b,e,k,n,D,t,E,d){var f=null;if(null!=E&&0<E.length){var g=this,m=this.editor.graph;f=document.createElement("div");D=m.view.getState(k);var q=null==k||null!=D&&m.isTransparentState(D)?null:m.copyStyle(k);k=6>E.length?35*E.length:140;f.className="geToolbarContainer geSidebarContainer";f.style.cssText="position:absolute;left:"+b+"px;top:"+e+"px;width:"+k+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+
@@ -2131,40 +2131,40 @@ EditorUi.prototype.initClipboard=function(){var b=this,e=mxClipboard.cut;mxClipb
0),y=0;y<g.length;y++){m.add(q,g[y]);var F=t.view.getState(E[y]);if(null!=F){var C=t.getCellGeometry(g[y]);null!=C&&C.relative&&!m.isEdge(E[y])&&null==f[mxObjectIdentity.get(m.getParent(E[y]))]&&(C.offset=null,C.relative=!1,C.x=F.x/F.view.scale-F.view.translate.x,C.y=F.y/F.view.scale-F.view.translate.y)}}t.updateCustomLinks(t.createCellMapping(d,f),g);mxClipboard.insertCount=1;mxClipboard.setCells(g)}b.updatePasteActionStates();return E};var k=mxClipboard.paste;mxClipboard.paste=function(t){var E=
null;t.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):E=k.apply(this,arguments);b.updatePasteActionStates();return E};var n=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){n.apply(this,arguments);b.updatePasteActionStates()};var D=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(t,E){D.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 O=this.graph.getPageLayout(),N=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+O.x*N.width),this.scale*(this.translate.y+O.y*N.height),this.scale*O.width*N.width,
-this.scale*O.height*N.height)};b.getPreferredPageSize=function(O,N,aa){O=this.getPageLayout();N=this.getPageSize();return new mxRectangle(0,0,O.width*N.width,O.height*N.height)};var e=null,k=this;if(this.editor.isChromelessView()){this.chromelessResize=e=mxUtils.bind(this,function(O,N,aa,ma){if(null!=b.container&&!b.isViewer()){aa=null!=aa?aa:0;ma=null!=ma?ma:0;var u=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),H=mxUtils.hasScrollbars(b.container),P=b.view.translate,S=b.view.scale,
-R=mxRectangle.fromRectangle(u);R.x=R.x/S-P.x;R.y=R.y/S-P.y;R.width/=S;R.height/=S;P=b.container.scrollTop;var ca=b.container.scrollLeft,ea=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)ea+=3;var fa=b.container.offsetWidth-ea;ea=b.container.offsetHeight-ea;O=O?Math.max(.3,Math.min(N||1,fa/R.width)):S;N=(fa-O*R.width)/2/O;var ra=0==this.lightboxVerticalDivider?0:(ea-O*R.height)/this.lightboxVerticalDivider/O;H&&(N=Math.max(N,0),ra=Math.max(ra,0));if(H||u.width<
-fa||u.height<ea)b.view.scaleAndTranslate(O,Math.floor(N-R.x),Math.floor(ra-R.y)),b.container.scrollTop=P*O/S,b.container.scrollLeft=ca*O/S;else if(0!=aa||0!=ma)u=b.view.translate,b.view.setTranslate(Math.floor(u.x+aa/S),Math.floor(u.y+ma/S))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var n=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",n);this.destroyFunctions.push(function(){mxEvent.removeListener(window,
-"resize",n)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(O){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(O){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var D=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position=
+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 N=this.graph.getPageLayout(),O=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+N.x*O.width),this.scale*(this.translate.y+N.y*O.height),this.scale*N.width*O.width,
+this.scale*N.height*O.height)};b.getPreferredPageSize=function(N,O,ba){N=this.getPageLayout();O=this.getPageSize();return new mxRectangle(0,0,N.width*O.width,N.height*O.height)};var e=null,k=this;if(this.editor.isChromelessView()){this.chromelessResize=e=mxUtils.bind(this,function(N,O,ba,la){if(null!=b.container&&!b.isViewer()){ba=null!=ba?ba:0;la=null!=la?la:0;var u=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),H=mxUtils.hasScrollbars(b.container),P=b.view.translate,W=b.view.scale,
+R=mxRectangle.fromRectangle(u);R.x=R.x/W-P.x;R.y=R.y/W-P.y;R.width/=W;R.height/=W;P=b.container.scrollTop;var da=b.container.scrollLeft,fa=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)fa+=3;var ea=b.container.offsetWidth-fa;fa=b.container.offsetHeight-fa;N=N?Math.max(.3,Math.min(O||1,ea/R.width)):W;O=(ea-N*R.width)/2/N;var qa=0==this.lightboxVerticalDivider?0:(fa-N*R.height)/this.lightboxVerticalDivider/N;H&&(O=Math.max(O,0),qa=Math.max(qa,0));if(H||u.width<
+ea||u.height<fa)b.view.scaleAndTranslate(N,Math.floor(O-R.x),Math.floor(qa-R.y)),b.container.scrollTop=P*N/W,b.container.scrollLeft=da*N/W;else if(0!=ba||0!=la)u=b.view.translate,b.view.setTranslate(Math.floor(u.x+ba/W),Math.floor(u.y+la/W))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var n=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",n);this.destroyFunctions.push(function(){mxEvent.removeListener(window,
+"resize",n)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(N){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(N){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var D=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position=
"fixed";this.chromelessToolbar.style.overflow="hidden";this.chromelessToolbar.style.boxSizing="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 t=mxUtils.bind(this,function(){var O=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=O?parseInt(O["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",t);t();var E=0;t=mxUtils.bind(this,function(O,N,aa){E++;
-var ma=document.createElement("span");ma.style.paddingLeft="8px";ma.style.paddingRight="8px";ma.style.cursor="pointer";mxEvent.addListener(ma,"click",O);null!=aa&&ma.setAttribute("title",aa);O=document.createElement("img");O.setAttribute("border","0");O.setAttribute("src",N);O.style.width="36px";O.style.filter="invert(100%)";ma.appendChild(O);this.chromelessToolbar.appendChild(ma);return ma});null!=D.backBtn&&t(mxUtils.bind(this,function(O){window.location.href=D.backBtn.url;mxEvent.consume(O)}),
-Editor.backImage,mxResources.get("back",null,"Back"));if(this.isPagesEnabled()){var d=t(mxUtils.bind(this,function(O){this.actions.get("previousPage").funct();mxEvent.consume(O)}),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 g=t(mxUtils.bind(this,function(O){this.actions.get("nextPage").funct();mxEvent.consume(O)}),Editor.nextImage,mxResources.get("nextPage")),m=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(f.innerText="",mxUtils.write(f,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});d.style.paddingLeft="0px";d.style.paddingRight="4px";g.style.paddingLeft="4px";g.style.paddingRight="0px";var q=mxUtils.bind(this,
-function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(g.style.display="",d.style.display="",f.style.display="inline-block"):(g.style.display="none",d.style.display="none",f.style.display="none");m()});this.editor.addListener("resetGraphView",q);this.editor.addListener("pageSelected",m)}t(mxUtils.bind(this,function(O){this.actions.get("zoomOut").funct();mxEvent.consume(O)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");t(mxUtils.bind(this,function(O){this.actions.get("zoomIn").funct();
-mxEvent.consume(O)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");t(mxUtils.bind(this,function(O){b.isLightboxView()?(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(O)}),Editor.zoomFitImage,mxResources.get("fit"));var y=null,F=null,C=mxUtils.bind(this,function(O){null!=y&&(window.clearTimeout(y),y=null);null!=F&&(window.clearTimeout(F),F=null);y=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,
-0);y=null;F=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";F=null}),600)}),O||200)}),I=mxUtils.bind(this,function(O){null!=y&&(window.clearTimeout(y),y=null);null!=F&&(window.clearTimeout(F),F=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,O||30)});if("1"==urlParams.layers){this.layersDialog=null;var G=t(mxUtils.bind(this,function(O){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 N=G.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=N.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));N=mxUtils.getCurrentStyle(this.editor.graph.container);
-this.layersDialog.style.zIndex=N.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(O)}),Editor.layersImage,mxResources.get("layers")),Y=b.getModel();Y.addListener(mxEvent.CHANGE,function(){G.style.display=1<Y.getChildCount(Y.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(t);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||t(mxUtils.bind(this,function(O){null!=
-this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(O)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(q=0;q<this.lightboxToolbarActions.length;q++){var ba=this.lightboxToolbarActions[q];ba.elem=t(ba.fn,ba.icon,ba.tooltip)}null!=D.refreshBtn&&t(mxUtils.bind(this,function(O){D.refreshBtn.url?window.location.href=
-D.refreshBtn.url:window.location.reload();mxEvent.consume(O)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"));null!=D.fullscreenBtn&&window.self!==window.top&&t(mxUtils.bind(this,function(O){D.fullscreenBtn.url?b.openLink(D.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(O)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(D.closeBtn&&window.self===window.top||b.lightbox&&("1"==urlParams.close||this.container!=document.body))&&
-t(mxUtils.bind(this,function(O){"1"==urlParams.close||D.closeBtn?window.close():(this.destroy(),mxEvent.consume(O))}),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(O){mxEvent.isTouchEvent(O)||(mxEvent.isShiftDown(O)||
-I(30),C())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(O){mxEvent.consume(O)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(O){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(O)?C():I(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(O){mxEvent.isShiftDown(O)?C():I(100);mxEvent.consume(O)}));mxEvent.addListener(this.chromelessToolbar,
-"mouseleave",mxUtils.bind(this,function(O){mxEvent.isTouchEvent(O)||I(30)}));var Z=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(O,N){this.startX=N.getGraphX();this.startY=N.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(O,N){},mouseUp:function(O,N){mxEvent.isTouchEvent(N.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<Z&&Math.abs(this.scrollTop-b.container.scrollTop)<Z&&
-Math.abs(this.startX-N.getGraphX())<Z&&Math.abs(this.startY-N.getGraphY())<Z&&(0<parseFloat(k.chromelessToolbar.style.opacity||0)?C():I(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var X=b.view.validate;b.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var O=this.graph.getPagePadding(),N=this.graph.getPageSize();this.translate.x=O.x-(this.x0||0)*N.width;this.translate.y=O.y-(this.y0||0)*N.height}X.apply(this,
-arguments)};if(!b.isViewer()){var qa=b.sizeDidChange;b.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var O=this.getPageLayout(),N=this.getPagePadding(),aa=this.getPageSize(),ma=Math.ceil(2*N.x+O.width*aa.width),u=Math.ceil(2*N.y+O.height*aa.height),H=b.minimumGraphSize;if(null==H||H.width!=ma||H.height!=u)b.minimumGraphSize=new mxRectangle(0,0,ma,u);ma=N.x-O.x*aa.width;N=N.y-O.y*aa.height;this.autoTranslate||this.view.translate.x==ma&&this.view.translate.y==
-N?qa.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=O.x,this.view.y0=O.y,O=b.view.translate.x,aa=b.view.translate.y,b.view.setTranslate(ma,N),b.container.scrollLeft+=Math.round((ma-O)*b.view.scale),b.container.scrollTop+=Math.round((N-aa)*b.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var Q=b.view.getBackgroundPane(),W=b.view.getDrawPane();b.cumulativeZoomFactor=1;var ha=null,la=null,ja=null,U=null,L=null,da=function(O){null!=
-ha&&window.clearTimeout(ha);0<=O&&window.setTimeout(function(){if(!b.isMouseDown||U)ha=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),W.style.transformOrigin="",Q.style.transformOrigin="",mxClient.IS_SF?(W.style.transform="scale(1)",
-Q.style.transform="scale(1)",window.setTimeout(function(){W.style.transform="";Q.style.transform=""},0)):(W.style.transform="",Q.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity="");var N=new mxPoint(b.container.scrollLeft,b.container.scrollTop),aa=mxUtils.getOffset(b.container),ma=b.view.scale,u=0,H=0;null!=la&&(u=b.container.offsetWidth/2-la.x+aa.x,H=b.container.offsetHeight/2-la.y+aa.y);b.zoom(b.cumulativeZoomFactor,null,b.isFastZoomEnabled()?
-20:null);b.view.scale!=ma&&(null!=ja&&(u+=N.x-ja.x,H+=N.y-ja.y),null!=e&&k.chromelessResize(!1,null,u*(b.cumulativeZoomFactor-1),H*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==u&&0==H||(b.container.scrollLeft-=u*(b.cumulativeZoomFactor-1),b.container.scrollTop-=H*(b.cumulativeZoomFactor-1)));null!=L&&W.setAttribute("filter",L);b.cumulativeZoomFactor=1;L=U=la=ja=ha=null}),null!=O?O:b.isFastZoomEnabled()?k.wheelZoomDelay:k.lazyZoomDelay)},0)};b.lazyZoom=function(O,N,aa,ma){ma=
-null!=ma?ma:this.zoomFactor;(N=N||!b.scrollbars)&&(la=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));O?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=ma,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-
-.05)/this.view.scale:(this.cumulativeZoomFactor/=ma,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;b.isFastZoomEnabled()&&(null==L&&""!=W.getAttribute("filter")&&(L=W.getAttribute("filter"),W.removeAttribute("filter")),ja=new mxPoint(b.container.scrollLeft,b.container.scrollTop),O=N||null==la?b.container.scrollLeft+b.container.clientWidth/
-2:la.x+b.container.scrollLeft-b.container.offsetLeft,ma=N||null==la?b.container.scrollTop+b.container.clientHeight/2:la.y+b.container.scrollTop-b.container.offsetTop,W.style.transformOrigin=O+"px "+ma+"px",W.style.transform="scale("+this.cumulativeZoomFactor+")",Q.style.transformOrigin=O+"px "+ma+"px",Q.style.transform="scale("+this.cumulativeZoomFactor+")",null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(O=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(O.style,
-"transform-origin",(N||null==la?b.container.clientWidth/2+b.container.scrollLeft-O.offsetLeft+"px":la.x+b.container.scrollLeft-O.offsetLeft-b.container.offsetLeft+"px")+" "+(N||null==la?b.container.clientHeight/2+b.container.scrollTop-O.offsetTop+"px":la.y+b.container.scrollTop-O.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(O.style,"transform","scale("+this.cumulativeZoomFactor+")")),b.view.getDecoratorPane().style.opacity="0",b.view.getOverlayPane().style.opacity="0",null!=k.hoverIcons&&
-k.hoverIcons.reset());da(b.isFastZoomEnabled()?aa:0)};mxEvent.addGestureListeners(b.container,function(O){null!=ha&&window.clearTimeout(ha)},null,function(O){1!=b.cumulativeZoomFactor&&da(0)});mxEvent.addListener(b.container,"scroll",function(O){null==ha||b.isMouseDown||1==b.cumulativeZoomFactor||da(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(O,N,aa,ma,u){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!aa&&b.isScrollWheelEvent(O))aa=
-b.view.getTranslate(),ma=40/b.view.scale,mxEvent.isShiftDown(O)?b.view.setTranslate(aa.x+(N?-ma:ma),aa.y):b.view.setTranslate(aa.x,aa.y+(N?ma:-ma));else if(aa||b.isZoomWheelEvent(O))for(var H=mxEvent.getSource(O);null!=H;){if(H==b.container)return b.tooltipHandler.hideTooltip(),la=null!=ma&&null!=u?new mxPoint(ma,u):new mxPoint(mxEvent.getClientX(O),mxEvent.getClientY(O)),U=aa,aa=b.zoomFactor,ma=null,O.ctrlKey&&null!=O.deltaY&&40>Math.abs(O.deltaY)&&Math.round(O.deltaY)!=O.deltaY?aa=1+Math.abs(O.deltaY)/
-20*(aa-1):null!=O.movementY&&"pointermove"==O.type&&(aa=1+Math.max(1,Math.abs(O.movementY))/20*(aa-1),ma=-1),b.lazyZoom(N,null,ma,aa),mxEvent.consume(O),!1;H=H.parentNode}}),b.container);b.panningHandler.zoomGraph=function(O){b.cumulativeZoomFactor=O.scale;b.lazyZoom(0<O.scale,!0);mxEvent.consume(O)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(e){this.actions.get("print").funct();mxEvent.consume(e)}),Editor.printImage,mxResources.get("print"))};
+"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var t=mxUtils.bind(this,function(){var N=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=N?parseInt(N["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",t);t();var E=0;t=mxUtils.bind(this,function(N,O,ba){E++;
+var la=document.createElement("span");la.style.paddingLeft="8px";la.style.paddingRight="8px";la.style.cursor="pointer";mxEvent.addListener(la,"click",N);null!=ba&&la.setAttribute("title",ba);N=document.createElement("img");N.setAttribute("border","0");N.setAttribute("src",O);N.style.width="36px";N.style.filter="invert(100%)";la.appendChild(N);this.chromelessToolbar.appendChild(la);return la});null!=D.backBtn&&t(mxUtils.bind(this,function(N){window.location.href=D.backBtn.url;mxEvent.consume(N)}),
+Editor.backImage,mxResources.get("back",null,"Back"));if(this.isPagesEnabled()){var d=t(mxUtils.bind(this,function(N){this.actions.get("previousPage").funct();mxEvent.consume(N)}),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 g=t(mxUtils.bind(this,function(N){this.actions.get("nextPage").funct();mxEvent.consume(N)}),Editor.nextImage,mxResources.get("nextPage")),m=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(f.innerText="",mxUtils.write(f,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});d.style.paddingLeft="0px";d.style.paddingRight="4px";g.style.paddingLeft="4px";g.style.paddingRight="0px";var q=mxUtils.bind(this,
+function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(g.style.display="",d.style.display="",f.style.display="inline-block"):(g.style.display="none",d.style.display="none",f.style.display="none");m()});this.editor.addListener("resetGraphView",q);this.editor.addListener("pageSelected",m)}t(mxUtils.bind(this,function(N){this.actions.get("zoomOut").funct();mxEvent.consume(N)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");t(mxUtils.bind(this,function(N){this.actions.get("zoomIn").funct();
+mxEvent.consume(N)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");t(mxUtils.bind(this,function(N){b.isLightboxView()?(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(N)}),Editor.zoomFitImage,mxResources.get("fit"));var y=null,F=null,C=mxUtils.bind(this,function(N){null!=y&&(window.clearTimeout(y),y=null);null!=F&&(window.clearTimeout(F),F=null);y=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,
+0);y=null;F=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";F=null}),600)}),N||200)}),I=mxUtils.bind(this,function(N){null!=y&&(window.clearTimeout(y),y=null);null!=F&&(window.clearTimeout(F),F=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,N||30)});if("1"==urlParams.layers){this.layersDialog=null;var G=t(mxUtils.bind(this,function(N){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 O=G.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=O.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));O=mxUtils.getCurrentStyle(this.editor.graph.container);
+this.layersDialog.style.zIndex=O.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(N)}),Editor.layersImage,mxResources.get("layers")),Z=b.getModel();Z.addListener(mxEvent.CHANGE,function(){G.style.display=1<Z.getChildCount(Z.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(t);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||t(mxUtils.bind(this,function(N){null!=
+this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(N)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(q=0;q<this.lightboxToolbarActions.length;q++){var ca=this.lightboxToolbarActions[q];ca.elem=t(ca.fn,ca.icon,ca.tooltip)}null!=D.refreshBtn&&t(mxUtils.bind(this,function(N){D.refreshBtn.url?window.location.href=
+D.refreshBtn.url:window.location.reload();mxEvent.consume(N)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"));null!=D.fullscreenBtn&&window.self!==window.top&&t(mxUtils.bind(this,function(N){D.fullscreenBtn.url?b.openLink(D.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(N)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(D.closeBtn&&window.self===window.top||b.lightbox&&("1"==urlParams.close||this.container!=document.body))&&
+t(mxUtils.bind(this,function(N){"1"==urlParams.close||D.closeBtn?window.close():(this.destroy(),mxEvent.consume(N))}),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(N){mxEvent.isTouchEvent(N)||(mxEvent.isShiftDown(N)||
+I(30),C())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(N){mxEvent.consume(N)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(N){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(N)?C():I(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(N){mxEvent.isShiftDown(N)?C():I(100);mxEvent.consume(N)}));mxEvent.addListener(this.chromelessToolbar,
+"mouseleave",mxUtils.bind(this,function(N){mxEvent.isTouchEvent(N)||I(30)}));var aa=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(N,O){this.startX=O.getGraphX();this.startY=O.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(N,O){},mouseUp:function(N,O){mxEvent.isTouchEvent(O.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<aa&&Math.abs(this.scrollTop-b.container.scrollTop)<
+aa&&Math.abs(this.startX-O.getGraphX())<aa&&Math.abs(this.startY-O.getGraphY())<aa&&(0<parseFloat(k.chromelessToolbar.style.opacity||0)?C():I(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var Y=b.view.validate;b.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var N=this.graph.getPagePadding(),O=this.graph.getPageSize();this.translate.x=N.x-(this.x0||0)*O.width;this.translate.y=N.y-(this.y0||0)*
+O.height}Y.apply(this,arguments)};if(!b.isViewer()){var pa=b.sizeDidChange;b.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var N=this.getPageLayout(),O=this.getPagePadding(),ba=this.getPageSize(),la=Math.ceil(2*O.x+N.width*ba.width),u=Math.ceil(2*O.y+N.height*ba.height),H=b.minimumGraphSize;if(null==H||H.width!=la||H.height!=u)b.minimumGraphSize=new mxRectangle(0,0,la,u);la=O.x-N.x*ba.width;O=O.y-N.y*ba.height;this.autoTranslate||this.view.translate.x==la&&
+this.view.translate.y==O?pa.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=N.x,this.view.y0=N.y,N=b.view.translate.x,ba=b.view.translate.y,b.view.setTranslate(la,O),b.container.scrollLeft+=Math.round((la-N)*b.view.scale),b.container.scrollTop+=Math.round((O-ba)*b.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var Q=b.view.getBackgroundPane(),X=b.view.getDrawPane();b.cumulativeZoomFactor=1;var ha=null,U=null,ma=null,
+T=null,M=null,ia=function(N){null!=ha&&window.clearTimeout(ha);0<=N&&window.setTimeout(function(){if(!b.isMouseDown||T)ha=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),X.style.transformOrigin="",Q.style.transformOrigin="",mxClient.IS_SF?
+(X.style.transform="scale(1)",Q.style.transform="scale(1)",window.setTimeout(function(){X.style.transform="";Q.style.transform=""},0)):(X.style.transform="",Q.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity="");var O=new mxPoint(b.container.scrollLeft,b.container.scrollTop),ba=mxUtils.getOffset(b.container),la=b.view.scale,u=0,H=0;null!=U&&(u=b.container.offsetWidth/2-U.x+ba.x,H=b.container.offsetHeight/2-U.y+ba.y);b.zoom(b.cumulativeZoomFactor,
+null,b.isFastZoomEnabled()?20:null);b.view.scale!=la&&(null!=ma&&(u+=O.x-ma.x,H+=O.y-ma.y),null!=e&&k.chromelessResize(!1,null,u*(b.cumulativeZoomFactor-1),H*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==u&&0==H||(b.container.scrollLeft-=u*(b.cumulativeZoomFactor-1),b.container.scrollTop-=H*(b.cumulativeZoomFactor-1)));null!=M&&X.setAttribute("filter",M);b.cumulativeZoomFactor=1;M=T=U=ma=ha=null}),null!=N?N:b.isFastZoomEnabled()?k.wheelZoomDelay:k.lazyZoomDelay)},0)};b.lazyZoom=
+function(N,O,ba,la){la=null!=la?la:this.zoomFactor;(O=O||!b.scrollbars)&&(U=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));N?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=la,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=
+(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=la,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;b.isFastZoomEnabled()&&(null==M&&""!=X.getAttribute("filter")&&(M=X.getAttribute("filter"),X.removeAttribute("filter")),ma=new mxPoint(b.container.scrollLeft,b.container.scrollTop),N=O||null==U?b.container.scrollLeft+
+b.container.clientWidth/2:U.x+b.container.scrollLeft-b.container.offsetLeft,la=O||null==U?b.container.scrollTop+b.container.clientHeight/2:U.y+b.container.scrollTop-b.container.offsetTop,X.style.transformOrigin=N+"px "+la+"px",X.style.transform="scale("+this.cumulativeZoomFactor+")",Q.style.transformOrigin=N+"px "+la+"px",Q.style.transform="scale("+this.cumulativeZoomFactor+")",null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(N=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(N.style,
+"transform-origin",(O||null==U?b.container.clientWidth/2+b.container.scrollLeft-N.offsetLeft+"px":U.x+b.container.scrollLeft-N.offsetLeft-b.container.offsetLeft+"px")+" "+(O||null==U?b.container.clientHeight/2+b.container.scrollTop-N.offsetTop+"px":U.y+b.container.scrollTop-N.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(N.style,"transform","scale("+this.cumulativeZoomFactor+")")),b.view.getDecoratorPane().style.opacity="0",b.view.getOverlayPane().style.opacity="0",null!=k.hoverIcons&&
+k.hoverIcons.reset());ia(b.isFastZoomEnabled()?ba:0)};mxEvent.addGestureListeners(b.container,function(N){null!=ha&&window.clearTimeout(ha)},null,function(N){1!=b.cumulativeZoomFactor&&ia(0)});mxEvent.addListener(b.container,"scroll",function(N){null==ha||b.isMouseDown||1==b.cumulativeZoomFactor||ia(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(N,O,ba,la,u){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!ba&&b.isScrollWheelEvent(N))ba=
+b.view.getTranslate(),la=40/b.view.scale,mxEvent.isShiftDown(N)?b.view.setTranslate(ba.x+(O?-la:la),ba.y):b.view.setTranslate(ba.x,ba.y+(O?la:-la));else if(ba||b.isZoomWheelEvent(N))for(var H=mxEvent.getSource(N);null!=H;){if(H==b.container)return b.tooltipHandler.hideTooltip(),U=null!=la&&null!=u?new mxPoint(la,u):new mxPoint(mxEvent.getClientX(N),mxEvent.getClientY(N)),T=ba,ba=b.zoomFactor,la=null,N.ctrlKey&&null!=N.deltaY&&40>Math.abs(N.deltaY)&&Math.round(N.deltaY)!=N.deltaY?ba=1+Math.abs(N.deltaY)/
+20*(ba-1):null!=N.movementY&&"pointermove"==N.type&&(ba=1+Math.max(1,Math.abs(N.movementY))/20*(ba-1),la=-1),b.lazyZoom(O,null,la,ba),mxEvent.consume(N),!1;H=H.parentNode}}),b.container);b.panningHandler.zoomGraph=function(N){b.cumulativeZoomFactor=N.scale;b.lazyZoom(0<N.scale,!0);mxEvent.consume(N)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(e){this.actions.get("print").funct();mxEvent.consume(e)}),Editor.printImage,mxResources.get("print"))};
EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(b){return Graph.createOffscreenGraph(b)};EditorUi.prototype.addChromelessClickHandler=function(){var b=urlParams.highlight;null!=b&&0<b.length&&(b="#"+b);this.editor.graph.addClickHandler(b)};
EditorUi.prototype.toggleFormatPanel=function(b){b=null!=b?b:0==this.formatWidth;null!=this.format&&(this.formatWidth=b?240:0,this.formatContainer.style.display=b?"":"none",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};
EditorUi.prototype.lightboxFit=function(b){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var e=urlParams.border,k=60;null!=e&&(k=parseInt(e));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(k,null,null,null,null,null,b);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var b=this.editor.graph.getModel();return 1==b.getChildCount(b.root)&&0==b.getChildCount(b.getChildAt(b.root,0))};
@@ -2179,7 +2179,10 @@ EditorUi.prototype.resetScrollbars=function(){var b=this.editor.graph;if(!this.e
1;e=b.getGraphBounds();0<e.width&&0<e.height&&(e.x>b.container.scrollLeft+.9*b.container.clientWidth&&(b.container.scrollLeft=Math.min(e.x+e.width-b.container.clientWidth,e.x-10)),e.y>b.container.scrollTop+.9*b.container.clientHeight&&(b.container.scrollTop=Math.min(e.y+e.height-b.container.clientHeight,e.y-10)))}else{e=b.getGraphBounds();var k=Math.max(e.width,b.scrollTileSize.width*b.view.scale);b.container.scrollTop=Math.floor(Math.max(0,e.y-Math.max(20,(b.container.clientHeight-Math.max(e.height,
b.scrollTileSize.height*b.view.scale))/4)));b.container.scrollLeft=Math.floor(Math.max(0,e.x-Math.max(0,(b.container.clientWidth-k)/2)))}else{e=mxRectangle.fromRectangle(b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds());k=b.view.translate;var n=b.view.scale;e.x=e.x/n-k.x;e.y=e.y/n-k.y;e.width/=n;e.height/=n;b.view.setTranslate(Math.floor(Math.max(0,(b.container.clientWidth-e.width)/2)-e.x+2),Math.floor((b.pageVisible?0:Math.max(0,(b.container.clientHeight-e.height)/4))-e.y+1))}};
EditorUi.prototype.setPageVisible=function(b){var e=this.editor.graph,k=mxUtils.hasScrollbars(e.container),n=0,D=0;k&&(n=e.view.translate.x*e.view.scale-e.container.scrollLeft,D=e.view.translate.y*e.view.scale-e.container.scrollTop);e.pageVisible=b;e.pageBreaksVisible=b;e.preferPageSize=b;e.view.validateBackground();if(k){var t=e.getSelectionCells();e.clearSelection();e.setSelectionCells(t)}e.sizeDidChange();k&&(e.container.scrollLeft=e.view.translate.x*e.view.scale-n,e.container.scrollTop=e.view.translate.y*
-e.view.scale-D);e.defaultPageVisible=b;this.fireEvent(new mxEventObject("pageViewChanged"))};function ChangeGridColor(b,e){this.ui=b;this.color=e}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)})();
+e.view.scale-D);e.defaultPageVisible=b;this.fireEvent(new mxEventObject("pageViewChanged"))};
+EditorUi.prototype.installResizeHandler=function(b,e,k){e&&(b.window.setSize=function(D,t){if(!this.minimized){var E=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;D=Math.min(D,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.getX());t=Math.min(t,E-this.getY())}mxWindow.prototype.setSize.apply(this,arguments)});b.window.setLocation=function(D,t){var E=window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth,
+d=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight,f=parseInt(this.div.style.width),g=parseInt(this.div.style.height);D=Math.max(0,Math.min(D,E-f));t=Math.max(0,Math.min(t,d-g));this.getX()==D&&this.getY()==t||mxWindow.prototype.setLocation.apply(this,arguments);e&&!this.minimized&&this.setSize(f,g)};var n=mxUtils.bind(this,function(){var D=b.window.getX(),t=b.window.getY();b.window.setLocation(D,t)});mxEvent.addListener(window,"resize",n);b.destroy=function(){mxEvent.removeListener(window,
+"resize",n);b.window.destroy();null!=k&&k()}};function ChangeGridColor(b,e){this.ui=b;this.color=e}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,e,k,n,D){this.ui=b;this.previousColor=this.color=e;this.previousImage=this.image=k;this.previousFormat=this.format=n;this.previousPageScale=this.pageScale=D;this.ignoreImage=this.ignoreColor=!1}
ChangePageSetup.prototype.execute=function(){var b=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var e=b.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=e}if(!this.ignoreImage){this.image=this.previousImage;e=b.backgroundImage;var k=this.previousImage;null!=k&&null!=k.src&&"data:page/id,"==k.src.substring(0,13)&&(k=this.ui.createImageForPageLink(k.src,this.ui.currentPage));this.ui.setBackgroundImage(k);this.previousImage=e}null!=this.previousFormat&&
(this.format=this.previousFormat,e=b.pageFormat,this.previousFormat.width!=e.width||this.previousFormat.height!=e.height)&&(this.ui.setPageFormat(this.previousFormat),this.previousFormat=e);null!=this.foldingEnabled&&this.foldingEnabled!=this.ui.editor.graph.foldingEnabled&&(this.ui.setFoldingEnabled(this.foldingEnabled),this.foldingEnabled=!this.foldingEnabled);null!=this.previousPageScale&&(b=this.ui.editor.graph.pageScale,this.previousPageScale!=b&&(this.ui.setPageScale(this.previousPageScale),
@@ -2199,8 +2202,8 @@ this.actions.get("selectAll").setEnabled(k);this.actions.get("selectNone").setEn
EditorUi.prototype.refresh=function(b){b=null!=b?b:!0;var e=this.container.clientWidth,k=this.container.clientHeight;this.container==document.body&&(e=document.body.clientWidth||document.documentElement.clientWidth,k=document.documentElement.clientHeight);var n=0;mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&window.innerHeight!=document.documentElement.clientHeight&&(n=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var D=Math.max(0,Math.min(this.hsplitPosition,
e-this.splitSize-20));e=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",e+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",e+=this.toolbarHeight);0<e&&(e+=1);var t=0;if(null!=this.sidebarFooterContainer){var E=this.footerHeight+n;t=Math.max(0,Math.min(k-e-E,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=D+"px";this.sidebarFooterContainer.style.height=
t+"px";this.sidebarFooterContainer.style.bottom=E+"px"}k=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=e+"px";this.sidebarContainer.style.width=D+"px";this.formatContainer.style.top=e+"px";this.formatContainer.style.width=k+"px";this.formatContainer.style.display=null!=this.format?"":"none";E=this.getDiagramContainerOffset();var d=null!=this.hsplit.parentNode?D+this.splitSize:0;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;
-this.hsplit.style.bottom=this.footerHeight+n+"px";this.hsplit.style.left=D+"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=n+"px");D=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+n+"px",this.tabContainer.style.right=this.diagramContainer.style.right,D=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+
-t+n+"px";this.formatContainer.style.bottom=this.footerHeight+n+"px";"1"!=urlParams.embedInline&&(this.diagramContainer.style.left=d+E.x+"px",this.diagramContainer.style.top=e+E.y+"px",this.diagramContainer.style.right=k+"px",this.diagramContainer.style.bottom=this.footerHeight+n+D+"px");b&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
+this.hsplit.style.bottom=this.footerHeight+n+"px";this.hsplit.style.left=D+"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=n+"px");D=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+n+"px",this.tabContainer.style.right=k+"px",D=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+t+n+"px";this.formatContainer.style.bottom=
+this.footerHeight+n+"px";"1"!=urlParams.embedInline&&(this.diagramContainer.style.left=d+E.x+"px",this.diagramContainer.style.top=e+E.y+"px",this.diagramContainer.style.right=k+"px",this.diagramContainer.style.bottom=this.footerHeight+n+D+"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};
@@ -2239,8 +2242,8 @@ EditorUi.prototype.showBackgroundImageDialog=function(b,e){b=null!=b?b:mxUtils.b
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,e,k){mxUtils.confirm(b)?null!=e&&e():null!=k&&k()};EditorUi.prototype.createOutline=function(b){var e=new mxOutline(this.editor.graph);mxEvent.addListener(window,"resize",function(){e.update(!1)});return e};
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 e(q,y,F){if(!n.isSelectionEmpty()&&n.isEnabled()){y=null!=y?y:1;var C=n.getCompositeParents(n.getSelectionCells()),I=0<C.length?C[0]:null;if(null!=I)if(F){n.getModel().beginUpdate();try{for(I=0;I<C.length;I++)if(n.getModel().isVertex(C[I])&&n.isCellResizable(C[I])){var G=n.getCellGeometry(C[I]);null!=G&&(G=G.clone(),37==q?G.width=Math.max(0,G.width-y):38==q?G.height=Math.max(0,G.height-y):39==q?G.width+=y:40==q&&(G.height+=y),n.getModel().setGeometry(C[I],
-G))}}finally{n.getModel().endUpdate()}}else{G=n.model.getParent(I);var Y=n.getView().scale;F=null;1==n.getSelectionCount()&&n.model.isVertex(I)&&null!=n.layoutManager&&!n.isCellLocked(I)&&(F=n.layoutManager.getLayout(G));if(null!=F&&F.constructor==mxStackLayout)y=G.getIndex(I),37==q||38==q?n.model.add(G,I,Math.max(0,y-1)):(39==q||40==q)&&n.model.add(G,I,Math.min(n.model.getChildCount(G),y+1));else{var ba=n.graphHandler;null!=ba&&(null==ba.first&&ba.start(I,0,0,C),null!=ba.first&&(I=C=0,37==q?C=-y:
-38==q?I=-y:39==q?C=y:40==q&&(I=y),ba.currentDx+=C*Y,ba.currentDy+=I*Y,ba.checkPreview(),ba.updatePreview()),null!=E&&window.clearTimeout(E),E=window.setTimeout(function(){if(null!=ba.first){var Z=ba.roundLength(ba.currentDx/Y),X=ba.roundLength(ba.currentDy/Y);ba.moveCells(ba.cells,Z,X);ba.reset()}},400))}}}}var k=this,n=this.editor.graph,D=new mxKeyHandler(n),t=D.isEventIgnored;D.isEventIgnored=function(q){return!(mxEvent.isShiftDown(q)&&9==q.keyCode)&&(!this.isControlDown(q)||mxEvent.isShiftDown(q)||
+G))}}finally{n.getModel().endUpdate()}}else{G=n.model.getParent(I);var Z=n.getView().scale;F=null;1==n.getSelectionCount()&&n.model.isVertex(I)&&null!=n.layoutManager&&!n.isCellLocked(I)&&(F=n.layoutManager.getLayout(G));if(null!=F&&F.constructor==mxStackLayout)y=G.getIndex(I),37==q||38==q?n.model.add(G,I,Math.max(0,y-1)):(39==q||40==q)&&n.model.add(G,I,Math.min(n.model.getChildCount(G),y+1));else{var ca=n.graphHandler;null!=ca&&(null==ca.first&&ca.start(I,0,0,C),null!=ca.first&&(I=C=0,37==q?C=-y:
+38==q?I=-y:39==q?C=y:40==q&&(I=y),ca.currentDx+=C*Z,ca.currentDy+=I*Z,ca.checkPreview(),ca.updatePreview()),null!=E&&window.clearTimeout(E),E=window.setTimeout(function(){if(null!=ca.first){var aa=ca.roundLength(ca.currentDx/Z),Y=ca.roundLength(ca.currentDy/Z);ca.moveCells(ca.cells,aa,Y);ca.reset()}},400))}}}}var k=this,n=this.editor.graph,D=new mxKeyHandler(n),t=D.isEventIgnored;D.isEventIgnored=function(q){return!(mxEvent.isShiftDown(q)&&9==q.keyCode)&&(!this.isControlDown(q)||mxEvent.isShiftDown(q)||
90!=q.keyCode&&89!=q.keyCode&&188!=q.keyCode&&190!=q.keyCode&&85!=q.keyCode)&&(66!=q.keyCode&&73!=q.keyCode||!this.isControlDown(q)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&t.apply(this,arguments)};D.isEnabledForEvent=function(q){return!mxEvent.isConsumed(q)&&this.isGraphEvent(q)&&this.isEnabled()&&(null==k.dialogs||0==k.dialogs.length)};D.isControlDown=function(q){return mxEvent.isControlDown(q)||mxClient.IS_MAC&&q.metaKey};var E=null,d={37:mxConstants.DIRECTION_WEST,
38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},f=D.getFunction;mxKeyHandler.prototype.getFunction=function(q){if(n.isEnabled()){if(mxEvent.isShiftDown(q)&&mxEvent.isAltDown(q)){var y=k.actions.get(k.altShiftActions[q.keyCode]);if(null!=y)return y.funct}if(null!=d[q.keyCode]&&!n.isSelectionEmpty())if(!this.isControlDown(q)&&mxEvent.isShiftDown(q)&&mxEvent.isAltDown(q)){if(n.model.isVertex(n.getSelectionCell()))return function(){var F=n.connectVertex(n.getSelectionCell(),
d[q.keyCode],n.defaultEdgeLength,q,!0);null!=F&&0<F.length&&(1==F.length&&n.model.isEdge(F[0])?n.setSelectionCell(n.model.getTerminal(F[0],!1)):n.setSelectionCell(F[F.length-1]),n.scrollCellToVisible(n.getSelectionCell()),null!=k.hoverIcons&&k.hoverIcons.update(n.view.getState(n.getSelectionCell())))}}else return this.isControlDown(q)?function(){e(q.keyCode,mxEvent.isShiftDown(q)?n.gridSize:null,!0)}:function(){e(q.keyCode,mxEvent.isShiftDown(q)?n.gridSize:null)}}return f.apply(this,arguments)};D.bindAction=
@@ -2261,35 +2264,35 @@ mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxCodec.allowlist="mxStylesheet Array mxGr
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,e,k){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,!0),this.clippedImage=b;b=this.clippedSvg}return b};
-Graph=function(b,e,k,n,D,t){mxGraph.call(this,b,e,k,n);this.themes=D||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=t?t:!1;b=this.baseUrl;e=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<e&&(e=b.indexOf("/",e+2),0<e&&(this.domainUrl=b.substring(0,e)),e=b.lastIndexOf("/"),0<e&&(this.domainPathUrl=b.substring(0,e+1)));this.isHtmlLabel=function(L){L=this.getCurrentCellStyle(L);
-return null!=L?"1"==L.html||"wrap"==L[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var E=null,d=null,f=null,g=null,m=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(L,da){if("mouseDown"==da.getProperty("eventName")&&this.isEnabled()){L=da.getProperty("event");var O=L.getState();da=this.view.scale;if(!mxEvent.isAltDown(L.getEvent())&&null!=O)if(this.model.isEdge(O.cell))if(E=new mxPoint(L.getGraphX(),L.getGraphY()),m=this.isCellSelected(O.cell),f=O,d=L,null!=O.text&&
-null!=O.text.boundingBox&&mxUtils.contains(O.text.boundingBox,L.getGraphX(),L.getGraphY()))g=mxEvent.LABEL_HANDLE;else{var N=this.selectionCellsHandler.getHandler(O.cell);null!=N&&null!=N.bends&&0<N.bends.length&&(g=N.getHandleForEvent(L))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(L.getEvent())&&(N=this.selectionCellsHandler.getHandler(O.cell),null==N||null==N.getHandleForEvent(L))){var aa=new mxRectangle(L.getGraphX()-1,L.getGraphY()-1),ma=mxEvent.isTouchEvent(L.getEvent())?
-mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;N=ma+2;aa.grow(ma);if(this.isTableCell(O.cell)&&!this.isCellSelected(O.cell)&&!(mxUtils.contains(O,L.getGraphX()-N,L.getGraphY()-N)&&mxUtils.contains(O,L.getGraphX()-N,L.getGraphY()+N)&&mxUtils.contains(O,L.getGraphX()+N,L.getGraphY()+N)&&mxUtils.contains(O,L.getGraphX()+N,L.getGraphY()-N))){var u=this.model.getParent(O.cell);N=this.model.getParent(u);if(!this.isCellSelected(N)){ma*=da;var H=2*ma;if(this.model.getChildAt(N,
-0)!=u&&mxUtils.intersects(aa,new mxRectangle(O.x,O.y-ma,O.width,H))||this.model.getChildAt(u,0)!=O.cell&&mxUtils.intersects(aa,new mxRectangle(O.x-ma,O.y,H,O.height))||mxUtils.intersects(aa,new mxRectangle(O.x,O.y+O.height-ma,O.width,H))||mxUtils.intersects(aa,new mxRectangle(O.x+O.width-ma,O.y,H,O.height)))u=this.selectionCellsHandler.isHandled(N),this.selectCellForEvent(N,L.getEvent()),N=this.selectionCellsHandler.getHandler(N),null!=N&&(ma=N.getHandleForEvent(L),null!=ma&&(N.start(L.getGraphX(),
-L.getGraphY(),ma),N.blockDelayedSelection=!u,L.consume()))}}for(;!L.isConsumed()&&null!=O&&(this.isTableCell(O.cell)||this.isTableRow(O.cell)||this.isTable(O.cell));)this.isSwimlane(O.cell)&&(N=this.getActualStartSize(O.cell),(0<N.x||0<N.width)&&mxUtils.intersects(aa,new mxRectangle(O.x+(N.x-N.width-1)*da+(0==N.x?O.width:0),O.y,1,O.height))||(0<N.y||0<N.height)&&mxUtils.intersects(aa,new mxRectangle(O.x,O.y+(N.y-N.height-1)*da+(0==N.y?O.height:0),O.width,1)))&&(this.selectCellForEvent(O.cell,L.getEvent()),
-N=this.selectionCellsHandler.getHandler(O.cell),null!=N&&(ma=mxEvent.CUSTOM_HANDLE-N.customHandles.length+1,N.start(L.getGraphX(),L.getGraphY(),ma),L.consume())),O=this.view.getState(this.model.getParent(O.cell))}}}));this.addMouseListener({mouseDown:function(L,da){},mouseMove:mxUtils.bind(this,function(L,da){L=this.selectionCellsHandler.handlers.map;for(var O in L)if(null!=L[O].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(da.getEvent())){var N=this.tolerance;
-if(null!=E&&null!=f&&null!=d){if(O=f,Math.abs(E.x-da.getGraphX())>N||Math.abs(E.y-da.getGraphY())>N){var aa=this.selectionCellsHandler.getHandler(O.cell);null==aa&&this.model.isEdge(O.cell)&&(aa=this.createHandler(O));if(null!=aa&&null!=aa.bends&&0<aa.bends.length){L=aa.getHandleForEvent(d);var ma=this.view.getEdgeStyle(O);N=ma==mxEdgeStyle.EntityRelation;m||g!=mxEvent.LABEL_HANDLE||(L=g);if(N&&0!=L&&L!=aa.bends.length-1&&L!=mxEvent.LABEL_HANDLE)!N||null==O.visibleSourceState&&null==O.visibleTargetState||
-(this.graphHandler.reset(),da.consume());else if(L==mxEvent.LABEL_HANDLE||0==L||null!=O.visibleSourceState||L==aa.bends.length-1||null!=O.visibleTargetState)N||L==mxEvent.LABEL_HANDLE||(N=O.absolutePoints,null!=N&&(null==ma&&null==L||ma==mxEdgeStyle.OrthConnector)&&(L=g,null==L&&(L=new mxRectangle(E.x,E.y),L.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(L,N[0].x,N[0].y)?L=0:mxUtils.contains(L,N[N.length-1].x,N[N.length-1].y)?L=aa.bends.length-1:null!=ma&&(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)))?L=2:(L=mxUtils.findNearestSegment(O,E.x,E.y),L=null==ma?mxEvent.VIRTUAL_HANDLE-L:L+1))),null==L&&(L=mxEvent.VIRTUAL_HANDLE)),aa.start(da.getGraphX(),da.getGraphX(),L),da.consume(),this.graphHandler.reset()}null!=aa&&(this.selectionCellsHandler.isHandlerActive(aa)?this.isCellSelected(O.cell)||(this.selectionCellsHandler.handlers.put(O.cell,aa),this.selectCellForEvent(O.cell,da.getEvent())):
-this.isCellSelected(O.cell)||aa.destroy());m=!1;E=d=f=g=null}}else if(O=da.getState(),null!=O&&this.isCellEditable(O.cell)){aa=null;if(this.model.isEdge(O.cell)){if(L=new mxRectangle(da.getGraphX(),da.getGraphY()),L.grow(mxEdgeHandler.prototype.handleImage.width/2),N=O.absolutePoints,null!=N)if(null!=O.text&&null!=O.text.boundingBox&&mxUtils.contains(O.text.boundingBox,da.getGraphX(),da.getGraphY()))aa="move";else if(mxUtils.contains(L,N[0].x,N[0].y)||mxUtils.contains(L,N[N.length-1].x,N[N.length-
-1].y))aa="pointer";else if(null!=O.visibleSourceState||null!=O.visibleTargetState)L=this.view.getEdgeStyle(O),aa="crosshair",L!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(O)&&(da=mxUtils.findNearestSegment(O,da.getGraphX(),da.getGraphY()),da<N.length-1&&0<=da&&(aa=0==Math.round(N[da].x-N[da+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(da.getEvent())){N=mxShape.prototype.svgStrokeTolerance/2;L=new mxRectangle(da.getGraphX(),da.getGraphY());L.grow(N);if(this.isTableCell(O.cell)&&
-(da=this.model.getParent(O.cell),N=this.model.getParent(da),!this.isCellSelected(N)))if(mxUtils.intersects(L,new mxRectangle(O.x,O.y-2,O.width,4))&&this.model.getChildAt(N,0)!=da||mxUtils.intersects(L,new mxRectangle(O.x,O.y+O.height-2,O.width,4)))aa="row-resize";else if(mxUtils.intersects(L,new mxRectangle(O.x-2,O.y,4,O.height))&&this.model.getChildAt(da,0)!=O.cell||mxUtils.intersects(L,new mxRectangle(O.x+O.width-2,O.y,4,O.height)))aa="col-resize";for(da=O;null==aa&&null!=da&&(this.isTableCell(da.cell)||
-this.isTableRow(da.cell)||this.isTable(da.cell));)this.isSwimlane(da.cell)&&(N=this.getActualStartSize(da.cell),ma=this.view.scale,(0<N.x||0<N.width)&&mxUtils.intersects(L,new mxRectangle(da.x+(N.x-N.width-1)*ma+(0==N.x?da.width*ma:0),da.y,1,da.height))?aa="col-resize":(0<N.y||0<N.height)&&mxUtils.intersects(L,new mxRectangle(da.x,da.y+(N.y-N.height-1)*ma+(0==N.y?da.height:0),da.width,1))&&(aa="row-resize")),da=this.view.getState(this.model.getParent(da.cell))}null!=aa&&O.setCursor(aa)}}}),mouseUp:mxUtils.bind(this,
-function(L,da){g=E=d=f=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(L){var da=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);L.view.graph.isHtmlLabel(L.cell)&&(da=1!=L.style.html?mxUtils.htmlEntities(da,!1):L.view.graph.sanitizeHtml(da));return da};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(L,da){return!1};this.alternateEdgeStyle="vertical";null==n&&this.loadStylesheet();var q=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var L=q.apply(this,arguments);if(this.graph.pageVisible){var da=[],O=this.graph.pageFormat,
-N=this.graph.pageScale,aa=O.width*N;O=O.height*N;N=this.graph.view.translate;for(var ma=this.graph.view.scale,u=this.graph.getPageLayout(),H=0;H<u.width;H++)da.push(new mxRectangle(((u.x+H)*aa+N.x)*ma,(u.y*O+N.y)*ma,aa*ma,O*ma));for(H=1;H<u.height;H++)da.push(new mxRectangle((u.x*aa+N.x)*ma,((u.y+H)*O+N.y)*ma,aa*ma,O*ma));L=da.concat(L)}return L};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(L,da){return null==L.cell?"#ffa500":mxConstants.GUIDE_COLOR};
-this.graphHandler.createPreviewShape=function(L){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var y=this.graphHandler.getCells;this.graphHandler.getCells=function(L){for(var da=y.apply(this,arguments),O=new mxDictionary,N=[],aa=0;aa<da.length;aa++){var ma=this.graph.isTableCell(L)&&this.graph.isTableCell(da[aa])&&this.graph.isCellSelected(da[aa])?this.graph.model.getParent(da[aa]):
-this.graph.isTableRow(L)&&this.graph.isTableRow(da[aa])&&this.graph.isCellSelected(da[aa])?da[aa]:this.graph.getCompositeParent(da[aa]);null==ma||O.get(ma)||(O.put(ma,!0),N.push(ma))}return N};var F=this.graphHandler.start;this.graphHandler.start=function(L,da,O,N){var aa=!1;this.graph.isTableCell(L)&&(this.graph.isCellSelected(L)?aa=!0:L=this.graph.model.getParent(L));aa||this.graph.isTableRow(L)&&this.graph.isCellSelected(L)||(L=this.graph.getCompositeParent(L));F.apply(this,arguments)};this.connectionHandler.createTargetVertex=
-function(L,da){da=this.graph.getCompositeParent(da);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var C=new mxRubberband(this);this.getRubberband=function(){return C};var I=(new Date).getTime(),G=0,Y=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var L=this.currentState;Y.apply(this,arguments);L!=this.currentState?(I=(new Date).getTime(),G=0):G=(new Date).getTime()-I};var ba=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=
-function(L){return mxEvent.isShiftDown(L.getEvent())&&mxEvent.isAltDown(L.getEvent())?!1:null!=this.currentState&&L.getState()==this.currentState&&2E3<G||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&ba.apply(this,arguments)};var Z=this.isToggleEvent;this.isToggleEvent=function(L){return Z.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(L)};var X=C.isForceRubberbandEvent;C.isForceRubberbandEvent=function(L){return X.apply(this,arguments)||
-mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(L.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==L.getState()&&mxEvent.isTouchEvent(L.getEvent())};var qa=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(qa=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=qa)}));
-this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(L){return mxEvent.isMouseEvent(L.getEvent())};var Q=this.click;this.click=function(L){var da=null==L.state&&null!=L.sourceState&&this.isCellLocked(L.sourceState.cell);if(this.isEnabled()&&!da||L.isConsumed())return Q.apply(this,arguments);var O=da?L.sourceState.cell:L.getCell();null!=O&&(O=this.getClickableLinkForCell(O),null!=O&&(this.isCustomLink(O)?this.customLinkClicked(O):this.openLink(O)));this.isEnabled()&&da&&
-this.clearSelection()};this.tooltipHandler.getStateForEvent=function(L){return L.sourceState};var W=this.tooltipHandler.show;this.tooltipHandler.show=function(){W.apply(this,arguments);if(null!=this.div)for(var L=this.div.getElementsByTagName("a"),da=0;da<L.length;da++)null!=L[da].getAttribute("href")&&null==L[da].getAttribute("target")&&L[da].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(L){return L.sourceState};this.getCursorForMouseEvent=function(L){var da=null==
-L.state&&null!=L.sourceState&&this.isCellLocked(L.sourceState.cell);return this.getCursorForCell(da?L.sourceState.cell:L.getCell())};var ha=this.getCursorForCell;this.getCursorForCell=function(L){if(!this.isEnabled()||this.isCellLocked(L)){if(null!=this.getClickableLinkForCell(L))return"pointer";if(this.isCellLocked(L))return"default"}return ha.apply(this,arguments)};this.selectRegion=function(L,da){var O=mxEvent.isAltDown(da)?L:null;L=this.getCells(L.x,L.y,L.width,L.height,null,null,O,function(N){return"1"==
-mxUtils.getValue(N.style,"locked","0")},!0);if(this.isToggleEvent(da))for(O=0;O<L.length;O++)this.selectCellForEvent(L[O],da);else this.selectCellsForEvent(L,da);return L};var la=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(L,da,O){return this.graph.isCellSelected(L)?!1:la.apply(this,arguments)};this.isCellLocked=function(L){for(;null!=L;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(L),"locked","0"))return!0;L=this.model.getParent(L)}return!1};
-var ja=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(L,da){"mouseDown"==da.getProperty("eventName")&&(L=da.getProperty("event").getState(),ja=null==L||this.isSelectionEmpty()||this.isCellSelected(L.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(L,da){if(!mxEvent.isMultiTouchEvent(da)){L=da.getProperty("event");var O=da.getProperty("cell");null==O?(L=mxUtils.convertPoint(this.container,mxEvent.getClientX(L),mxEvent.getClientY(L)),
-C.start(L.x,L.y)):null!=ja?this.addSelectionCells(ja):1<this.getSelectionCount()&&this.isCellSelected(O)&&this.removeSelectionCell(O);ja=null;da.consume()}}));this.connectionHandler.selectCells=function(L,da){this.graph.setSelectionCell(da||L)};this.connectionHandler.constraintHandler.isStateIgnored=function(L,da){var O=L.view.graph;return da&&(O.isCellSelected(L.cell)||O.isTableRow(L.cell)&&O.selectionCellsHandler.isHandled(O.model.getParent(L.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,
-mxUtils.bind(this,function(){var L=this.connectionHandler.constraintHandler;null!=L.currentFocus&&L.isStateIgnored(L.currentFocus,!0)&&(L.currentFocus=null,L.constraints=null,L.destroyIcons());L.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var U=this.updateMouseEvent;this.updateMouseEvent=function(L){L=U.apply(this,arguments);null!=L.state&&this.isCellLocked(L.getCell())&&(L.state=null);return L}}this.currentTranslate=new mxPoint(0,0)};
+Graph=function(b,e,k,n,D,t){mxGraph.call(this,b,e,k,n);this.themes=D||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=t?t:!1;b=this.baseUrl;e=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<e&&(e=b.indexOf("/",e+2),0<e&&(this.domainUrl=b.substring(0,e)),e=b.lastIndexOf("/"),0<e&&(this.domainPathUrl=b.substring(0,e+1)));this.isHtmlLabel=function(M){M=this.getCurrentCellStyle(M);
+return null!=M?"1"==M.html||"wrap"==M[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var E=null,d=null,f=null,g=null,m=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(M,ia){if("mouseDown"==ia.getProperty("eventName")&&this.isEnabled()){M=ia.getProperty("event");var N=M.getState();ia=this.view.scale;if(!mxEvent.isAltDown(M.getEvent())&&null!=N)if(this.model.isEdge(N.cell))if(E=new mxPoint(M.getGraphX(),M.getGraphY()),m=this.isCellSelected(N.cell),f=N,d=M,null!=N.text&&
+null!=N.text.boundingBox&&mxUtils.contains(N.text.boundingBox,M.getGraphX(),M.getGraphY()))g=mxEvent.LABEL_HANDLE;else{var O=this.selectionCellsHandler.getHandler(N.cell);null!=O&&null!=O.bends&&0<O.bends.length&&(g=O.getHandleForEvent(M))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(M.getEvent())&&(O=this.selectionCellsHandler.getHandler(N.cell),null==O||null==O.getHandleForEvent(M))){var ba=new mxRectangle(M.getGraphX()-1,M.getGraphY()-1),la=mxEvent.isTouchEvent(M.getEvent())?
+mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;O=la+2;ba.grow(la);if(this.isTableCell(N.cell)&&!this.isCellSelected(N.cell)&&!(mxUtils.contains(N,M.getGraphX()-O,M.getGraphY()-O)&&mxUtils.contains(N,M.getGraphX()-O,M.getGraphY()+O)&&mxUtils.contains(N,M.getGraphX()+O,M.getGraphY()+O)&&mxUtils.contains(N,M.getGraphX()+O,M.getGraphY()-O))){var u=this.model.getParent(N.cell);O=this.model.getParent(u);if(!this.isCellSelected(O)){la*=ia;var H=2*la;if(this.model.getChildAt(O,
+0)!=u&&mxUtils.intersects(ba,new mxRectangle(N.x,N.y-la,N.width,H))||this.model.getChildAt(u,0)!=N.cell&&mxUtils.intersects(ba,new mxRectangle(N.x-la,N.y,H,N.height))||mxUtils.intersects(ba,new mxRectangle(N.x,N.y+N.height-la,N.width,H))||mxUtils.intersects(ba,new mxRectangle(N.x+N.width-la,N.y,H,N.height)))u=this.selectionCellsHandler.isHandled(O),this.selectCellForEvent(O,M.getEvent()),O=this.selectionCellsHandler.getHandler(O),null!=O&&(la=O.getHandleForEvent(M),null!=la&&(O.start(M.getGraphX(),
+M.getGraphY(),la),O.blockDelayedSelection=!u,M.consume()))}}for(;!M.isConsumed()&&null!=N&&(this.isTableCell(N.cell)||this.isTableRow(N.cell)||this.isTable(N.cell));)this.isSwimlane(N.cell)&&(O=this.getActualStartSize(N.cell),(0<O.x||0<O.width)&&mxUtils.intersects(ba,new mxRectangle(N.x+(O.x-O.width-1)*ia+(0==O.x?N.width:0),N.y,1,N.height))||(0<O.y||0<O.height)&&mxUtils.intersects(ba,new mxRectangle(N.x,N.y+(O.y-O.height-1)*ia+(0==O.y?N.height:0),N.width,1)))&&(this.selectCellForEvent(N.cell,M.getEvent()),
+O=this.selectionCellsHandler.getHandler(N.cell),null!=O&&(la=mxEvent.CUSTOM_HANDLE-O.customHandles.length+1,O.start(M.getGraphX(),M.getGraphY(),la),M.consume())),N=this.view.getState(this.model.getParent(N.cell))}}}));this.addMouseListener({mouseDown:function(M,ia){},mouseMove:mxUtils.bind(this,function(M,ia){M=this.selectionCellsHandler.handlers.map;for(var N in M)if(null!=M[N].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(ia.getEvent())){var O=this.tolerance;
+if(null!=E&&null!=f&&null!=d){if(N=f,Math.abs(E.x-ia.getGraphX())>O||Math.abs(E.y-ia.getGraphY())>O){var ba=this.selectionCellsHandler.getHandler(N.cell);null==ba&&this.model.isEdge(N.cell)&&(ba=this.createHandler(N));if(null!=ba&&null!=ba.bends&&0<ba.bends.length){M=ba.getHandleForEvent(d);var la=this.view.getEdgeStyle(N);O=la==mxEdgeStyle.EntityRelation;m||g!=mxEvent.LABEL_HANDLE||(M=g);if(O&&0!=M&&M!=ba.bends.length-1&&M!=mxEvent.LABEL_HANDLE)!O||null==N.visibleSourceState&&null==N.visibleTargetState||
+(this.graphHandler.reset(),ia.consume());else if(M==mxEvent.LABEL_HANDLE||0==M||null!=N.visibleSourceState||M==ba.bends.length-1||null!=N.visibleTargetState)O||M==mxEvent.LABEL_HANDLE||(O=N.absolutePoints,null!=O&&(null==la&&null==M||la==mxEdgeStyle.OrthConnector)&&(M=g,null==M&&(M=new mxRectangle(E.x,E.y),M.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(M,O[0].x,O[0].y)?M=0:mxUtils.contains(M,O[O.length-1].x,O[O.length-1].y)?M=ba.bends.length-1:null!=la&&(2==O.length||3==O.length&&
+(0==Math.round(O[0].x-O[1].x)&&0==Math.round(O[1].x-O[2].x)||0==Math.round(O[0].y-O[1].y)&&0==Math.round(O[1].y-O[2].y)))?M=2:(M=mxUtils.findNearestSegment(N,E.x,E.y),M=null==la?mxEvent.VIRTUAL_HANDLE-M:M+1))),null==M&&(M=mxEvent.VIRTUAL_HANDLE)),ba.start(ia.getGraphX(),ia.getGraphX(),M),ia.consume(),this.graphHandler.reset()}null!=ba&&(this.selectionCellsHandler.isHandlerActive(ba)?this.isCellSelected(N.cell)||(this.selectionCellsHandler.handlers.put(N.cell,ba),this.selectCellForEvent(N.cell,ia.getEvent())):
+this.isCellSelected(N.cell)||ba.destroy());m=!1;E=d=f=g=null}}else if(N=ia.getState(),null!=N&&this.isCellEditable(N.cell)){ba=null;if(this.model.isEdge(N.cell)){if(M=new mxRectangle(ia.getGraphX(),ia.getGraphY()),M.grow(mxEdgeHandler.prototype.handleImage.width/2),O=N.absolutePoints,null!=O)if(null!=N.text&&null!=N.text.boundingBox&&mxUtils.contains(N.text.boundingBox,ia.getGraphX(),ia.getGraphY()))ba="move";else if(mxUtils.contains(M,O[0].x,O[0].y)||mxUtils.contains(M,O[O.length-1].x,O[O.length-
+1].y))ba="pointer";else if(null!=N.visibleSourceState||null!=N.visibleTargetState)M=this.view.getEdgeStyle(N),ba="crosshair",M!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(N)&&(ia=mxUtils.findNearestSegment(N,ia.getGraphX(),ia.getGraphY()),ia<O.length-1&&0<=ia&&(ba=0==Math.round(O[ia].x-O[ia+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(ia.getEvent())){O=mxShape.prototype.svgStrokeTolerance/2;M=new mxRectangle(ia.getGraphX(),ia.getGraphY());M.grow(O);if(this.isTableCell(N.cell)&&
+(ia=this.model.getParent(N.cell),O=this.model.getParent(ia),!this.isCellSelected(O)))if(mxUtils.intersects(M,new mxRectangle(N.x,N.y-2,N.width,4))&&this.model.getChildAt(O,0)!=ia||mxUtils.intersects(M,new mxRectangle(N.x,N.y+N.height-2,N.width,4)))ba="row-resize";else if(mxUtils.intersects(M,new mxRectangle(N.x-2,N.y,4,N.height))&&this.model.getChildAt(ia,0)!=N.cell||mxUtils.intersects(M,new mxRectangle(N.x+N.width-2,N.y,4,N.height)))ba="col-resize";for(ia=N;null==ba&&null!=ia&&(this.isTableCell(ia.cell)||
+this.isTableRow(ia.cell)||this.isTable(ia.cell));)this.isSwimlane(ia.cell)&&(O=this.getActualStartSize(ia.cell),la=this.view.scale,(0<O.x||0<O.width)&&mxUtils.intersects(M,new mxRectangle(ia.x+(O.x-O.width-1)*la+(0==O.x?ia.width*la:0),ia.y,1,ia.height))?ba="col-resize":(0<O.y||0<O.height)&&mxUtils.intersects(M,new mxRectangle(ia.x,ia.y+(O.y-O.height-1)*la+(0==O.y?ia.height:0),ia.width,1))&&(ba="row-resize")),ia=this.view.getState(this.model.getParent(ia.cell))}null!=ba&&N.setCursor(ba)}}}),mouseUp:mxUtils.bind(this,
+function(M,ia){g=E=d=f=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(M){var ia=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);M.view.graph.isHtmlLabel(M.cell)&&(ia=1!=M.style.html?mxUtils.htmlEntities(ia,!1):M.view.graph.sanitizeHtml(ia));return ia};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(M,ia){return!1};this.alternateEdgeStyle="vertical";null==n&&this.loadStylesheet();var q=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var M=q.apply(this,arguments);if(this.graph.pageVisible){var ia=[],N=this.graph.pageFormat,
+O=this.graph.pageScale,ba=N.width*O;N=N.height*O;O=this.graph.view.translate;for(var la=this.graph.view.scale,u=this.graph.getPageLayout(),H=0;H<u.width;H++)ia.push(new mxRectangle(((u.x+H)*ba+O.x)*la,(u.y*N+O.y)*la,ba*la,N*la));for(H=1;H<u.height;H++)ia.push(new mxRectangle((u.x*ba+O.x)*la,((u.y+H)*N+O.y)*la,ba*la,N*la));M=ia.concat(M)}return M};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(M,ia){return null==M.cell?"#ffa500":mxConstants.GUIDE_COLOR};
+this.graphHandler.createPreviewShape=function(M){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var y=this.graphHandler.getCells;this.graphHandler.getCells=function(M){for(var ia=y.apply(this,arguments),N=new mxDictionary,O=[],ba=0;ba<ia.length;ba++){var la=this.graph.isTableCell(M)&&this.graph.isTableCell(ia[ba])&&this.graph.isCellSelected(ia[ba])?this.graph.model.getParent(ia[ba]):
+this.graph.isTableRow(M)&&this.graph.isTableRow(ia[ba])&&this.graph.isCellSelected(ia[ba])?ia[ba]:this.graph.getCompositeParent(ia[ba]);null==la||N.get(la)||(N.put(la,!0),O.push(la))}return O};var F=this.graphHandler.start;this.graphHandler.start=function(M,ia,N,O){var ba=!1;this.graph.isTableCell(M)&&(this.graph.isCellSelected(M)?ba=!0:M=this.graph.model.getParent(M));ba||this.graph.isTableRow(M)&&this.graph.isCellSelected(M)||(M=this.graph.getCompositeParent(M));F.apply(this,arguments)};this.connectionHandler.createTargetVertex=
+function(M,ia){ia=this.graph.getCompositeParent(ia);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var C=new mxRubberband(this);this.getRubberband=function(){return C};var I=(new Date).getTime(),G=0,Z=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var M=this.currentState;Z.apply(this,arguments);M!=this.currentState?(I=(new Date).getTime(),G=0):G=(new Date).getTime()-I};var ca=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=
+function(M){return mxEvent.isShiftDown(M.getEvent())&&mxEvent.isAltDown(M.getEvent())?!1:null!=this.currentState&&M.getState()==this.currentState&&2E3<G||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&ca.apply(this,arguments)};var aa=this.isToggleEvent;this.isToggleEvent=function(M){return aa.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(M)};var Y=C.isForceRubberbandEvent;C.isForceRubberbandEvent=function(M){return Y.apply(this,
+arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(M.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==M.getState()&&mxEvent.isTouchEvent(M.getEvent())};var pa=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(pa=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=
+pa)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(M){return mxEvent.isMouseEvent(M.getEvent())};var Q=this.click;this.click=function(M){var ia=null==M.state&&null!=M.sourceState&&this.isCellLocked(M.sourceState.cell);if(this.isEnabled()&&!ia||M.isConsumed())return Q.apply(this,arguments);var N=ia?M.sourceState.cell:M.getCell();null!=N&&(N=this.getClickableLinkForCell(N),null!=N&&(this.isCustomLink(N)?this.customLinkClicked(N):this.openLink(N)));this.isEnabled()&&
+ia&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(M){return M.sourceState};var X=this.tooltipHandler.show;this.tooltipHandler.show=function(){X.apply(this,arguments);if(null!=this.div)for(var M=this.div.getElementsByTagName("a"),ia=0;ia<M.length;ia++)null!=M[ia].getAttribute("href")&&null==M[ia].getAttribute("target")&&M[ia].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(M){return M.sourceState};this.getCursorForMouseEvent=function(M){var ia=
+null==M.state&&null!=M.sourceState&&this.isCellLocked(M.sourceState.cell);return this.getCursorForCell(ia?M.sourceState.cell:M.getCell())};var ha=this.getCursorForCell;this.getCursorForCell=function(M){if(!this.isEnabled()||this.isCellLocked(M)){if(null!=this.getClickableLinkForCell(M))return"pointer";if(this.isCellLocked(M))return"default"}return ha.apply(this,arguments)};this.selectRegion=function(M,ia){var N=mxEvent.isAltDown(ia)?M:null;M=this.getCells(M.x,M.y,M.width,M.height,null,null,N,function(O){return"1"==
+mxUtils.getValue(O.style,"locked","0")},!0);if(this.isToggleEvent(ia))for(N=0;N<M.length;N++)this.selectCellForEvent(M[N],ia);else this.selectCellsForEvent(M,ia);return M};var U=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(M,ia,N){return this.graph.isCellSelected(M)?!1:U.apply(this,arguments)};this.isCellLocked=function(M){for(;null!=M;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(M),"locked","0"))return!0;M=this.model.getParent(M)}return!1};
+var ma=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(M,ia){"mouseDown"==ia.getProperty("eventName")&&(M=ia.getProperty("event").getState(),ma=null==M||this.isSelectionEmpty()||this.isCellSelected(M.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(M,ia){if(!mxEvent.isMultiTouchEvent(ia)){M=ia.getProperty("event");var N=ia.getProperty("cell");null==N?(M=mxUtils.convertPoint(this.container,mxEvent.getClientX(M),mxEvent.getClientY(M)),
+C.start(M.x,M.y)):null!=ma?this.addSelectionCells(ma):1<this.getSelectionCount()&&this.isCellSelected(N)&&this.removeSelectionCell(N);ma=null;ia.consume()}}));this.connectionHandler.selectCells=function(M,ia){this.graph.setSelectionCell(ia||M)};this.connectionHandler.constraintHandler.isStateIgnored=function(M,ia){var N=M.view.graph;return ia&&(N.isCellSelected(M.cell)||N.isTableRow(M.cell)&&N.selectionCellsHandler.isHandled(N.model.getParent(M.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,
+mxUtils.bind(this,function(){var M=this.connectionHandler.constraintHandler;null!=M.currentFocus&&M.isStateIgnored(M.currentFocus,!0)&&(M.currentFocus=null,M.constraints=null,M.destroyIcons());M.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var T=this.updateMouseEvent;this.updateMouseEvent=function(M){M=T.apply(this,arguments);null!=M.state&&this.isCellLocked(M.getCell())&&(M.state=null);return M}}this.currentTranslate=new mxPoint(0,0)};
Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.translateDiagram="1"==urlParams["translate-diagram"];Graph.diagramLanguage=null!=urlParams["diagram-language"]?urlParams["diagram-language"]:mxClient.language;Graph.lineJumpsEnabled=!0;
Graph.defaultJumpSize=6;Graph.zoomWheel=!1;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Text is not SVG - cannot display";Graph.foreignObjectWarningLink="https://www.diagrams.net/doc/faq/svg-export-text-problems";Graph.xmlDeclaration='<?xml version="1.0" encoding="UTF-8"?>';Graph.svgDoctype='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">';Graph.svgFileComment="\x3c!-- Do not edit this file with editors other than diagrams.net --\x3e";
Graph.pasteStyles="rounded shadow dashed dashPattern fontFamily fontSource fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize targetPerimeterSpacing startFill startArrow startSize sourcePerimeterSpacing arcSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle".split(" ");
@@ -2361,10 +2364,10 @@ Graph.prototype.getLabel=function(b){var e=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 e=this.getLinkForCell(b);if(null!=e)return e;b=this.model.getParent(b)}while(null!=b);return null};
Graph.prototype.getGlobalVariable=function(b){var e=null;"date"==b?e=(new Date).toLocaleDateString():"time"==b?e=(new Date).toLocaleTimeString():"timestamp"==b?e=(new Date).toLocaleString():"date{"==b.substring(0,5)&&(b=b.substring(5,b.length-1),e=this.formatDate(new Date,b));return e};
Graph.prototype.formatDate=function(b,e,k){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 n=this.dateFormatCache,D=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,t=/[^-+\dA-Z]/g,E=function(Y,ba){Y=String(Y);for(ba=ba||2;Y.length<ba;)Y="0"+Y;return Y};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||
+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 n=this.dateFormatCache,D=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,t=/[^-+\dA-Z]/g,E=function(Z,ca){Z=String(Z);for(ca=ca||2;Z.length<ca;)Z="0"+Z;return Z};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||
/\d/.test(b)||(e=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");e=String(n.masks[e]||e||n.masks["default"]);"UTC:"==e.slice(0,4)&&(e=e.slice(4),k=!0);var d=k?"getUTC":"get",f=b[d+"Date"](),g=b[d+"Day"](),m=b[d+"Month"](),q=b[d+"FullYear"](),y=b[d+"Hours"](),F=b[d+"Minutes"](),C=b[d+"Seconds"]();d=b[d+"Milliseconds"]();var I=k?0:b.getTimezoneOffset(),G={d:f,dd:E(f),ddd:n.i18n.dayNames[g],dddd:n.i18n.dayNames[g+7],m:m+1,mm:E(m+1),mmm:n.i18n.monthNames[m],mmmm:n.i18n.monthNames[m+
-12],yy:String(q).slice(2),yyyy:q,h:y%12||12,hh:E(y%12||12),H:y,HH:E(y),M:F,MM:E(F),s:C,ss:E(C),l:E(d,3),L:E(99<d?Math.round(d/10):d),t:12>y?"a":"p",tt:12>y?"am":"pm",T:12>y?"A":"P",TT:12>y?"AM":"PM",Z:k?"UTC":(String(b).match(D)||[""]).pop().replace(t,""),o:(0<I?"-":"+")+E(100*Math.floor(Math.abs(I)/60)+Math.abs(I)%60,4),S:["th","st","nd","rd"][3<f%10?0:(10!=f%100-f%10)*f%10]};return e.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(Y){return Y in G?G[Y]:Y.slice(1,
-Y.length-1)})};Graph.prototype.getLayerForCells=function(b){var e=null;if(0<b.length){for(e=b[0];!this.model.isLayer(e);)e=this.model.getParent(e);for(var k=1;k<b.length;k++)if(!this.model.isAncestor(e,b[k])){e=null;break}}return e};
+12],yy:String(q).slice(2),yyyy:q,h:y%12||12,hh:E(y%12||12),H:y,HH:E(y),M:F,MM:E(F),s:C,ss:E(C),l:E(d,3),L:E(99<d?Math.round(d/10):d),t:12>y?"a":"p",tt:12>y?"am":"pm",T:12>y?"A":"P",TT:12>y?"AM":"PM",Z:k?"UTC":(String(b).match(D)||[""]).pop().replace(t,""),o:(0<I?"-":"+")+E(100*Math.floor(Math.abs(I)/60)+Math.abs(I)%60,4),S:["th","st","nd","rd"][3<f%10?0:(10!=f%100-f%10)*f%10]};return e.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(Z){return Z in G?G[Z]:Z.slice(1,
+Z.length-1)})};Graph.prototype.getLayerForCells=function(b){var e=null;if(0<b.length){for(e=b[0];!this.model.isLayer(e);)e=this.model.getParent(e);for(var k=1;k<b.length;k++)if(!this.model.isAncestor(e,b[k])){e=null;break}}return e};
Graph.prototype.createLayersDialog=function(b,e){var k=document.createElement("div");k.style.position="absolute";for(var n=this.getModel(),D=n.getChildCount(n.root),t=0;t<D;t++)mxUtils.bind(this,function(E){function d(){n.isVisible(E)?(m.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(g,75)):(m.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(g,25))}var f=this.convertValueToString(E)||mxResources.get("background")||"Background",g=document.createElement("div");g.style.overflow=
"hidden";g.style.textOverflow="ellipsis";g.style.padding="2px";g.style.whiteSpace="nowrap";g.style.cursor="pointer";g.setAttribute("title",mxResources.get(n.isVisible(E)?"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";e&&(m.style.filter="invert(100%)",m.style.top="-2px");g.appendChild(m);mxUtils.write(g,f);k.appendChild(g);
mxEvent.addListener(g,"click",function(){n.setVisible(E,!n.isVisible(E));d();null!=b&&b(E)});d()})(n.getChildAt(n.root,t));return k};
@@ -2378,11 +2381,11 @@ D)}}}finally{this.getModel().endUpdate()}};Graph.prototype.selectCellsForConnect
Graph.prototype.isCloneConnectSource=function(b){var e=null;null!=this.layoutManager&&(e=this.layoutManager.getLayout(this.model.getParent(b)));return this.isTableRow(b)||this.isTableCell(b)||null!=e&&e.constructor==mxStackLayout};
Graph.prototype.connectVertex=function(b,e,k,n,D,t,E,d){t=t?t:!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),g=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(g.geometry.x,g.geometry.y);e==mxConstants.DIRECTION_NORTH?(m.x+=g.geometry.width/2,m.y-=k):e==
mxConstants.DIRECTION_SOUTH?(m.x+=g.geometry.width/2,m.y+=g.geometry.height+k):(m.x=e==mxConstants.DIRECTION_WEST?m.x-k:m.x+(g.geometry.width+k),m.y+=g.geometry.height/2);var q=this.view.getState(this.model.getParent(b));k=this.view.scale;var y=this.view.translate;g=y.x*k;y=y.y*k;null!=q&&this.model.isVertex(q.cell)&&(g=q.x,y=q.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(m.x+=b.parent.geometry.x,m.y+=b.parent.geometry.y);t=t?null:(new mxRectangle(g+m.x*k,y+m.y*k)).grow(40*k);t=null!=t?
-this.getCells(0,0,0,0,null,null,t,null,!0):null;q=this.view.getState(b);var F=null,C=null;if(null!=t){t=t.reverse();for(var I=0;I<t.length;I++)if(!this.isCellLocked(t[I])&&!this.model.isEdge(t[I])&&t[I]!=b)if(!this.model.isAncestor(b,t[I])&&this.isContainer(t[I])&&(null==F||t[I]==this.model.getParent(b)))F=t[I];else if(null==C&&this.isCellConnectable(t[I])&&!this.model.isAncestor(t[I],b)&&!this.isSwimlane(t[I])){var G=this.view.getState(t[I]);null==q||null==G||mxUtils.intersects(q,G)||(C=t[I])}}var Y=
-!mxEvent.isShiftDown(n)||mxEvent.isControlDown(n)||D;Y&&("1"!=urlParams.sketch||D)&&(e==mxConstants.DIRECTION_NORTH?m.y-=b.geometry.height/2:e==mxConstants.DIRECTION_SOUTH?m.y+=b.geometry.height/2:m.x=e==mxConstants.DIRECTION_WEST?m.x-b.geometry.width/2:m.x+b.geometry.width/2);var ba=[],Z=C;C=F;D=mxUtils.bind(this,function(X){if(null==E||null!=X||null==C&&f){this.model.beginUpdate();try{if(null==Z&&Y){var qa=this.getAbsoluteParent(null!=X?X:b);qa=f?b:this.getCompositeParent(qa);Z=null!=X?X:this.duplicateCells([qa],
-!1)[0];null!=X&&this.addCells([Z],this.model.getParent(b),null,null,null,!0);var Q=this.getCellGeometry(Z);null!=Q&&(null!=X&&"1"==urlParams.sketch&&(e==mxConstants.DIRECTION_NORTH?m.y-=Q.height/2:e==mxConstants.DIRECTION_SOUTH?m.y+=Q.height/2:m.x=e==mxConstants.DIRECTION_WEST?m.x-Q.width/2:m.x+Q.width/2),Q.x=m.x-Q.width/2,Q.y=m.y-Q.height/2);null!=F?(this.addCells([Z],F,null,null,null,!0),C=null):Y&&!f&&this.addCells([Z],this.getDefaultParent(),null,null,null,!0)}var W=mxEvent.isControlDown(n)&&
-mxEvent.isShiftDown(n)&&Y||null==C&&f?null:this.insertEdge(this.model.getParent(b),null,"",b,Z,this.createCurrentEdgeStyle());if(null!=W&&this.connectionHandler.insertBeforeSource){var ha=null;for(X=b;null!=X.parent&&null!=X.geometry&&X.geometry.relative&&X.parent!=W.parent;)X=this.model.getParent(X);null!=X&&null!=X.parent&&X.parent==W.parent&&(ha=X.parent.getIndex(X),this.model.add(X.parent,W,ha))}null==C&&null!=Z&&null!=b.parent&&f&&e==mxConstants.DIRECTION_WEST&&(ha=b.parent.getIndex(b),this.model.add(b.parent,
-Z,ha));null!=W&&ba.push(W);null==C&&null!=Z&&ba.push(Z);null==Z&&null!=W&&W.geometry.setTerminalPoint(m,!1);null!=W&&this.fireEvent(new mxEventObject("cellsInserted","cells",[W]))}finally{this.model.endUpdate()}}if(null!=d)d(ba);else return ba});if(null==E||null!=Z||!Y||null==C&&f)return D(Z);E(g+m.x*k,y+m.y*k,D)};
+this.getCells(0,0,0,0,null,null,t,null,!0):null;q=this.view.getState(b);var F=null,C=null;if(null!=t){t=t.reverse();for(var I=0;I<t.length;I++)if(!this.isCellLocked(t[I])&&!this.model.isEdge(t[I])&&t[I]!=b)if(!this.model.isAncestor(b,t[I])&&this.isContainer(t[I])&&(null==F||t[I]==this.model.getParent(b)))F=t[I];else if(null==C&&this.isCellConnectable(t[I])&&!this.model.isAncestor(t[I],b)&&!this.isSwimlane(t[I])){var G=this.view.getState(t[I]);null==q||null==G||mxUtils.intersects(q,G)||(C=t[I])}}var Z=
+!mxEvent.isShiftDown(n)||mxEvent.isControlDown(n)||D;Z&&("1"!=urlParams.sketch||D)&&(e==mxConstants.DIRECTION_NORTH?m.y-=b.geometry.height/2:e==mxConstants.DIRECTION_SOUTH?m.y+=b.geometry.height/2:m.x=e==mxConstants.DIRECTION_WEST?m.x-b.geometry.width/2:m.x+b.geometry.width/2);var ca=[],aa=C;C=F;D=mxUtils.bind(this,function(Y){if(null==E||null!=Y||null==C&&f){this.model.beginUpdate();try{if(null==aa&&Z){var pa=this.getAbsoluteParent(null!=Y?Y:b);pa=f?b:this.getCompositeParent(pa);aa=null!=Y?Y:this.duplicateCells([pa],
+!1)[0];null!=Y&&this.addCells([aa],this.model.getParent(b),null,null,null,!0);var Q=this.getCellGeometry(aa);null!=Q&&(null!=Y&&"1"==urlParams.sketch&&(e==mxConstants.DIRECTION_NORTH?m.y-=Q.height/2:e==mxConstants.DIRECTION_SOUTH?m.y+=Q.height/2:m.x=e==mxConstants.DIRECTION_WEST?m.x-Q.width/2:m.x+Q.width/2),Q.x=m.x-Q.width/2,Q.y=m.y-Q.height/2);null!=F?(this.addCells([aa],F,null,null,null,!0),C=null):Z&&!f&&this.addCells([aa],this.getDefaultParent(),null,null,null,!0)}var X=mxEvent.isControlDown(n)&&
+mxEvent.isShiftDown(n)&&Z||null==C&&f?null:this.insertEdge(this.model.getParent(b),null,"",b,aa,this.createCurrentEdgeStyle());if(null!=X&&this.connectionHandler.insertBeforeSource){var ha=null;for(Y=b;null!=Y.parent&&null!=Y.geometry&&Y.geometry.relative&&Y.parent!=X.parent;)Y=this.model.getParent(Y);null!=Y&&null!=Y.parent&&Y.parent==X.parent&&(ha=Y.parent.getIndex(Y),this.model.add(Y.parent,X,ha))}null==C&&null!=aa&&null!=b.parent&&f&&e==mxConstants.DIRECTION_WEST&&(ha=b.parent.getIndex(b),this.model.add(b.parent,
+aa,ha));null!=X&&ca.push(X);null==C&&null!=aa&&ca.push(aa);null==aa&&null!=X&&X.geometry.setTerminalPoint(m,!1);null!=X&&this.fireEvent(new mxEventObject("cellsInserted","cells",[X]))}finally{this.model.endUpdate()}}if(null!=d)d(ca);else return ca});if(null==E||null!=aa||!Z||null==C&&f)return D(aa);E(g+m.x*k,y+m.y*k,D)};
Graph.prototype.getIndexableText=function(b){b=null!=b?b:this.model.getDescendants(this.model.root);for(var e=document.createElement("div"),k=[],n,D=0;D<b.length;D++)if(n=b[D],this.model.isVertex(n)||this.model.isEdge(n))this.isHtmlLabel(n)?(e.innerHTML=this.sanitizeHtml(this.getLabel(n)),n=mxUtils.extractTextWithWhitespace([e])):n=this.getLabel(n),n=mxUtils.trim(n.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<n.length&&k.push(n);return k.join(" ")};
Graph.prototype.convertValueToString=function(b){var e=this.model.getValue(b);if(null!=e&&"object"==typeof e){var k=null;if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder")){e=b.getAttribute("placeholder");for(var n=b;null==k&&null!=n;)null!=n.value&&"object"==typeof n.value&&(k=n.hasAttribute(e)?null!=n.getAttribute(e)?n.getAttribute(e):"":null),n=this.model.getParent(n)}else k=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(k=e.getAttribute("label_"+Graph.diagramLanguage)),
null==k&&(k=e.getAttribute("label")||"");return k||""}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};
@@ -2460,23 +2463,23 @@ TableLayout.prototype.layoutRow=function(b,e,k,n){var D=this.graph.getModel(),t=
0,g.width,g.height),D.setGeometry(t[f],g))}return d};
TableLayout.prototype.execute=function(b){if(null!=b){var e=this.graph.getActualStartSize(b,!0),k=this.graph.getCellGeometry(b),n=this.graph.getCellStyle(b),D="1"==mxUtils.getValue(n,"resizeLastRow","0"),t="1"==mxUtils.getValue(n,"resizeLast","0");n="1"==mxUtils.getValue(n,"fixedRows","0");var E=this.graph.getModel(),d=0;E.beginUpdate();try{for(var f=k.height-e.y-e.height,g=k.width-e.x-e.width,m=E.getChildCells(b,!0),q=0;q<m.length;q++)E.setVisible(m[q],!0);var y=this.getSize(m,!1);if(0<f&&0<g&&0<
m.length&&0<y){if(D){var F=this.graph.getCellGeometry(m[m.length-1]);null!=F&&(F=F.clone(),F.height=f-y+F.height,E.setGeometry(m[m.length-1],F))}var C=t?null:this.getRowLayout(m[0],g),I=[],G=e.y;for(q=0;q<m.length;q++)F=this.graph.getCellGeometry(m[q]),null!=F&&(F=F.clone(),F.x=e.x,F.width=g,F.y=Math.round(G),G=D||n?G+F.height:G+F.height/y*f,F.height=Math.round(G)-F.y,E.setGeometry(m[q],F)),d=Math.max(d,this.layoutRow(m[q],C,F.height,g,I));n&&f<y&&(k=k.clone(),k.height=G+e.height,E.setGeometry(b,
-k));t&&g<d+Graph.minTableColumnWidth&&(k=k.clone(),k.width=d+e.width+e.x+Graph.minTableColumnWidth,E.setGeometry(b,k));this.graph.visitTableCells(b,mxUtils.bind(this,function(Y){E.setVisible(Y.cell,Y.actual.cell==Y.cell);if(Y.actual.cell!=Y.cell){if(Y.actual.row==Y.row){var ba=null!=Y.geo.alternateBounds?Y.geo.alternateBounds:Y.geo;Y.actual.geo.width+=ba.width}Y.actual.col==Y.col&&(ba=null!=Y.geo.alternateBounds?Y.geo.alternateBounds:Y.geo,Y.actual.geo.height+=ba.height)}}))}else for(q=0;q<m.length;q++)E.setVisible(m[q],
+k));t&&g<d+Graph.minTableColumnWidth&&(k=k.clone(),k.width=d+e.width+e.x+Graph.minTableColumnWidth,E.setGeometry(b,k));this.graph.visitTableCells(b,mxUtils.bind(this,function(Z){E.setVisible(Z.cell,Z.actual.cell==Z.cell);if(Z.actual.cell!=Z.cell){if(Z.actual.row==Z.row){var ca=null!=Z.geo.alternateBounds?Z.geo.alternateBounds:Z.geo;Z.actual.geo.width+=ca.width}Z.actual.col==Z.col&&(ca=null!=Z.geo.alternateBounds?Z.geo.alternateBounds:Z.geo,Z.actual.geo.height+=ca.height)}}))}else for(q=0;q<m.length;q++)E.setVisible(m[q],
!1)}finally{E.endUpdate()}}};
(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var e=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(m,q){q=null!=q?q:!0;var y=this.getState(m);null!=y&&q&&this.graph.model.isEdge(y.cell)&&null!=y.style&&1!=y.style[mxConstants.STYLE_CURVED]&&!y.invalid&&this.updateLineJumps(y)&&this.graph.cellRenderer.redraw(y,!1,this.isRendering());y=e.apply(this,
arguments);null!=y&&q&&this.graph.model.isEdge(y.cell)&&null!=y.style&&1!=y.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(y);return y};var k=mxShape.prototype.paint;mxShape.prototype.paint=function(){k.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 m=this.node.getElementsByTagName("path");if(1<m.length){"1"!=mxUtils.getValue(this.state.style,
mxConstants.STYLE_DASHED,"0")&&m[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var q=this.state.view.graph.getFlowAnimationStyle();null!=q&&m[1].setAttribute("class",q.getAttribute("id"))}}};var n=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(m,q){return n.apply(this,arguments)||null!=m.routedPoints&&null!=q.routedPoints&&!mxUtils.equalPoints(q.routedPoints,m.routedPoints)};var D=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
-function(m){D.apply(this,arguments);this.graph.model.isEdge(m.cell)&&1!=m.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(m)};mxGraphView.prototype.updateLineJumps=function(m){var q=m.absolutePoints;if(Graph.lineJumpsEnabled){var y=null!=m.routedPoints,F=null;if(null!=q&&null!=this.validEdges&&"none"!==mxUtils.getValue(m.style,"jumpStyle","none")){var C=function(ja,U,L){var da=new mxPoint(U,L);da.type=ja;F.push(da);da=null!=m.routedPoints?m.routedPoints[F.length-1]:null;return null==da||da.type!=
-ja||da.x!=U||da.y!=L},I=.5*this.scale;y=!1;F=[];for(var G=0;G<q.length-1;G++){for(var Y=q[G+1],ba=q[G],Z=[],X=q[G+2];G<q.length-2&&mxUtils.ptSegDistSq(ba.x,ba.y,X.x,X.y,Y.x,Y.y)<1*this.scale*this.scale;)Y=X,G++,X=q[G+2];y=C(0,ba.x,ba.y)||y;for(var qa=0;qa<this.validEdges.length;qa++){var Q=this.validEdges[qa],W=Q.absolutePoints;if(null!=W&&mxUtils.intersects(m,Q)&&"1"!=Q.style.noJump)for(Q=0;Q<W.length-1;Q++){var ha=W[Q+1],la=W[Q];for(X=W[Q+2];Q<W.length-2&&mxUtils.ptSegDistSq(la.x,la.y,X.x,X.y,ha.x,
-ha.y)<1*this.scale*this.scale;)ha=X,Q++,X=W[Q+2];X=mxUtils.intersection(ba.x,ba.y,Y.x,Y.y,la.x,la.y,ha.x,ha.y);if(null!=X&&(Math.abs(X.x-ba.x)>I||Math.abs(X.y-ba.y)>I)&&(Math.abs(X.x-Y.x)>I||Math.abs(X.y-Y.y)>I)&&(Math.abs(X.x-la.x)>I||Math.abs(X.y-la.y)>I)&&(Math.abs(X.x-ha.x)>I||Math.abs(X.y-ha.y)>I)){ha=X.x-ba.x;la=X.y-ba.y;X={distSq:ha*ha+la*la,x:X.x,y:X.y};for(ha=0;ha<Z.length;ha++)if(Z[ha].distSq>X.distSq){Z.splice(ha,0,X);X=null;break}null==X||0!=Z.length&&Z[Z.length-1].x===X.x&&Z[Z.length-
-1].y===X.y||Z.push(X)}}}for(Q=0;Q<Z.length;Q++)y=C(1,Z[Q].x,Z[Q].y)||y}X=q[q.length-1];y=C(0,X.x,X.y)||y}m.routedPoints=F;return y}return!1};var t=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(m,q,y){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)t.apply(this,arguments);else{var F=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
-2,C=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,I=mxUtils.getValue(this.style,"jumpStyle","none"),G=!0,Y=null,ba=null,Z=[],X=null;m.begin();for(var qa=0;qa<this.state.routedPoints.length;qa++){var Q=this.state.routedPoints[qa],W=new mxPoint(Q.x/this.scale,Q.y/this.scale);0==qa?W=q[0]:qa==this.state.routedPoints.length-1&&(W=q[q.length-1]);var ha=!1;if(null!=Y&&1==Q.type){var la=this.state.routedPoints[qa+1];Q=la.x/this.scale-W.x;la=la.y/this.scale-
-W.y;Q=Q*Q+la*la;null==X&&(X=new mxPoint(W.x-Y.x,W.y-Y.y),ba=Math.sqrt(X.x*X.x+X.y*X.y),0<ba?(X.x=X.x*C/ba,X.y=X.y*C/ba):X=null);Q>C*C&&0<ba&&(Q=Y.x-W.x,la=Y.y-W.y,Q=Q*Q+la*la,Q>C*C&&(ha=new mxPoint(W.x-X.x,W.y-X.y),Q=new mxPoint(W.x+X.x,W.y+X.y),Z.push(ha),this.addPoints(m,Z,y,F,!1,null,G),Z=0>Math.round(X.x)||0==Math.round(X.x)&&0>=Math.round(X.y)?1:-1,G=!1,"sharp"==I?(m.lineTo(ha.x-X.y*Z,ha.y+X.x*Z),m.lineTo(Q.x-X.y*Z,Q.y+X.x*Z),m.lineTo(Q.x,Q.y)):"line"==I?(m.moveTo(ha.x+X.y*Z,ha.y-X.x*Z),m.lineTo(ha.x-
-X.y*Z,ha.y+X.x*Z),m.moveTo(Q.x-X.y*Z,Q.y+X.x*Z),m.lineTo(Q.x+X.y*Z,Q.y-X.x*Z),m.moveTo(Q.x,Q.y)):"arc"==I?(Z*=1.3,m.curveTo(ha.x-X.y*Z,ha.y+X.x*Z,Q.x-X.y*Z,Q.y+X.x*Z,Q.x,Q.y)):(m.moveTo(Q.x,Q.y),G=!0),Z=[Q],ha=!0))}else X=null;ha||(Z.push(W),Y=W)}this.addPoints(m,Z,y,F,!1,null,G);m.stroke()}};var E=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(m,q,y,F){return null!=q&&"centerPerimeter"==q.style[mxConstants.STYLE_PERIMETER]?new mxPoint(q.getCenterX(),
-q.getCenterY()):E.apply(this,arguments)};var d=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(m,q,y,F){if(null==q||null==m||"1"!=q.style.snapToPoint&&"1"!=m.style.snapToPoint)d.apply(this,arguments);else{q=this.getTerminalPort(m,q,F);var C=this.getNextPoint(m,y,F),I=this.graph.isOrthogonal(m),G=mxUtils.toRadians(Number(q.style[mxConstants.STYLE_ROTATION]||"0")),Y=new mxPoint(q.getCenterX(),q.getCenterY());if(0!=G){var ba=Math.cos(-G),Z=
-Math.sin(-G);C=mxUtils.getRotatedPoint(C,ba,Z,Y)}ba=parseFloat(m.style[mxConstants.STYLE_PERIMETER_SPACING]||0);ba+=parseFloat(m.style[F?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);C=this.getPerimeterPoint(q,C,0==G&&I,ba);0!=G&&(ba=Math.cos(G),Z=Math.sin(G),C=mxUtils.getRotatedPoint(C,ba,Z,Y));m.setAbsoluteTerminalPoint(this.snapToAnchorPoint(m,q,y,F,C),F)}};mxGraphView.prototype.snapToAnchorPoint=function(m,q,y,F,C){if(null!=q&&null!=m){m=this.graph.getAllConnectionConstraints(q);
-F=y=null;if(null!=m)for(var I=0;I<m.length;I++){var G=this.graph.getConnectionPoint(q,m[I]);if(null!=G){var Y=(G.x-C.x)*(G.x-C.x)+(G.y-C.y)*(G.y-C.y);if(null==F||Y<F)y=G,F=Y}}null!=y&&(C=y)}return C};var f=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(m,q,y){var F=f.apply(this,arguments);"1"==m.getAttribute("placeholders")&&null!=y.state&&(F=y.state.view.graph.replacePlaceholders(y.state.cell,F));return F};var g=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=
-function(m){if(null!=m.style&&"undefined"!==typeof pako){var q=mxUtils.getValue(m.style,mxConstants.STYLE_SHAPE,null);if(null!=q&&"string"===typeof q&&"stencil("==q.substring(0,8))try{var y=q.substring(8,q.length-1),F=mxUtils.parseXml(Graph.decompress(y));return new mxShape(new mxStencil(F.documentElement))}catch(C){null!=window.console&&console.log("Error in shape: "+C)}}return g.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;
-mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];mxStencilRegistry.filesLoaded={};
+function(m){D.apply(this,arguments);this.graph.model.isEdge(m.cell)&&1!=m.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(m)};mxGraphView.prototype.updateLineJumps=function(m){var q=m.absolutePoints;if(Graph.lineJumpsEnabled){var y=null!=m.routedPoints,F=null;if(null!=q&&null!=this.validEdges&&"none"!==mxUtils.getValue(m.style,"jumpStyle","none")){var C=function(ma,T,M){var ia=new mxPoint(T,M);ia.type=ma;F.push(ia);ia=null!=m.routedPoints?m.routedPoints[F.length-1]:null;return null==ia||ia.type!=
+ma||ia.x!=T||ia.y!=M},I=.5*this.scale;y=!1;F=[];for(var G=0;G<q.length-1;G++){for(var Z=q[G+1],ca=q[G],aa=[],Y=q[G+2];G<q.length-2&&mxUtils.ptSegDistSq(ca.x,ca.y,Y.x,Y.y,Z.x,Z.y)<1*this.scale*this.scale;)Z=Y,G++,Y=q[G+2];y=C(0,ca.x,ca.y)||y;for(var pa=0;pa<this.validEdges.length;pa++){var Q=this.validEdges[pa],X=Q.absolutePoints;if(null!=X&&mxUtils.intersects(m,Q)&&"1"!=Q.style.noJump)for(Q=0;Q<X.length-1;Q++){var ha=X[Q+1],U=X[Q];for(Y=X[Q+2];Q<X.length-2&&mxUtils.ptSegDistSq(U.x,U.y,Y.x,Y.y,ha.x,
+ha.y)<1*this.scale*this.scale;)ha=Y,Q++,Y=X[Q+2];Y=mxUtils.intersection(ca.x,ca.y,Z.x,Z.y,U.x,U.y,ha.x,ha.y);if(null!=Y&&(Math.abs(Y.x-ca.x)>I||Math.abs(Y.y-ca.y)>I)&&(Math.abs(Y.x-Z.x)>I||Math.abs(Y.y-Z.y)>I)&&(Math.abs(Y.x-U.x)>I||Math.abs(Y.y-U.y)>I)&&(Math.abs(Y.x-ha.x)>I||Math.abs(Y.y-ha.y)>I)){ha=Y.x-ca.x;U=Y.y-ca.y;Y={distSq:ha*ha+U*U,x:Y.x,y:Y.y};for(ha=0;ha<aa.length;ha++)if(aa[ha].distSq>Y.distSq){aa.splice(ha,0,Y);Y=null;break}null==Y||0!=aa.length&&aa[aa.length-1].x===Y.x&&aa[aa.length-
+1].y===Y.y||aa.push(Y)}}}for(Q=0;Q<aa.length;Q++)y=C(1,aa[Q].x,aa[Q].y)||y}Y=q[q.length-1];y=C(0,Y.x,Y.y)||y}m.routedPoints=F;return y}return!1};var t=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(m,q,y){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)t.apply(this,arguments);else{var F=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
+mxConstants.LINE_ARCSIZE)/2,C=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,I=mxUtils.getValue(this.style,"jumpStyle","none"),G=!0,Z=null,ca=null,aa=[],Y=null;m.begin();for(var pa=0;pa<this.state.routedPoints.length;pa++){var Q=this.state.routedPoints[pa],X=new mxPoint(Q.x/this.scale,Q.y/this.scale);0==pa?X=q[0]:pa==this.state.routedPoints.length-1&&(X=q[q.length-1]);var ha=!1;if(null!=Z&&1==Q.type){var U=this.state.routedPoints[pa+1];Q=U.x/this.scale-
+X.x;U=U.y/this.scale-X.y;Q=Q*Q+U*U;null==Y&&(Y=new mxPoint(X.x-Z.x,X.y-Z.y),ca=Math.sqrt(Y.x*Y.x+Y.y*Y.y),0<ca?(Y.x=Y.x*C/ca,Y.y=Y.y*C/ca):Y=null);Q>C*C&&0<ca&&(Q=Z.x-X.x,U=Z.y-X.y,Q=Q*Q+U*U,Q>C*C&&(ha=new mxPoint(X.x-Y.x,X.y-Y.y),Q=new mxPoint(X.x+Y.x,X.y+Y.y),aa.push(ha),this.addPoints(m,aa,y,F,!1,null,G),aa=0>Math.round(Y.x)||0==Math.round(Y.x)&&0>=Math.round(Y.y)?1:-1,G=!1,"sharp"==I?(m.lineTo(ha.x-Y.y*aa,ha.y+Y.x*aa),m.lineTo(Q.x-Y.y*aa,Q.y+Y.x*aa),m.lineTo(Q.x,Q.y)):"line"==I?(m.moveTo(ha.x+
+Y.y*aa,ha.y-Y.x*aa),m.lineTo(ha.x-Y.y*aa,ha.y+Y.x*aa),m.moveTo(Q.x-Y.y*aa,Q.y+Y.x*aa),m.lineTo(Q.x+Y.y*aa,Q.y-Y.x*aa),m.moveTo(Q.x,Q.y)):"arc"==I?(aa*=1.3,m.curveTo(ha.x-Y.y*aa,ha.y+Y.x*aa,Q.x-Y.y*aa,Q.y+Y.x*aa,Q.x,Q.y)):(m.moveTo(Q.x,Q.y),G=!0),aa=[Q],ha=!0))}else Y=null;ha||(aa.push(X),Z=X)}this.addPoints(m,aa,y,F,!1,null,G);m.stroke()}};var E=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(m,q,y,F){return null!=q&&"centerPerimeter"==q.style[mxConstants.STYLE_PERIMETER]?
+new mxPoint(q.getCenterX(),q.getCenterY()):E.apply(this,arguments)};var d=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(m,q,y,F){if(null==q||null==m||"1"!=q.style.snapToPoint&&"1"!=m.style.snapToPoint)d.apply(this,arguments);else{q=this.getTerminalPort(m,q,F);var C=this.getNextPoint(m,y,F),I=this.graph.isOrthogonal(m),G=mxUtils.toRadians(Number(q.style[mxConstants.STYLE_ROTATION]||"0")),Z=new mxPoint(q.getCenterX(),q.getCenterY());if(0!=
+G){var ca=Math.cos(-G),aa=Math.sin(-G);C=mxUtils.getRotatedPoint(C,ca,aa,Z)}ca=parseFloat(m.style[mxConstants.STYLE_PERIMETER_SPACING]||0);ca+=parseFloat(m.style[F?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);C=this.getPerimeterPoint(q,C,0==G&&I,ca);0!=G&&(ca=Math.cos(G),aa=Math.sin(G),C=mxUtils.getRotatedPoint(C,ca,aa,Z));m.setAbsoluteTerminalPoint(this.snapToAnchorPoint(m,q,y,F,C),F)}};mxGraphView.prototype.snapToAnchorPoint=function(m,q,y,F,C){if(null!=
+q&&null!=m){m=this.graph.getAllConnectionConstraints(q);F=y=null;if(null!=m)for(var I=0;I<m.length;I++){var G=this.graph.getConnectionPoint(q,m[I]);if(null!=G){var Z=(G.x-C.x)*(G.x-C.x)+(G.y-C.y)*(G.y-C.y);if(null==F||Z<F)y=G,F=Z}}null!=y&&(C=y)}return C};var f=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(m,q,y){var F=f.apply(this,arguments);"1"==m.getAttribute("placeholders")&&null!=y.state&&(F=y.state.view.graph.replacePlaceholders(y.state.cell,F));
+return F};var g=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(m){if(null!=m.style&&"undefined"!==typeof pako){var q=mxUtils.getValue(m.style,mxConstants.STYLE_SHAPE,null);if(null!=q&&"string"===typeof q&&"stencil("==q.substring(0,8))try{var y=q.substring(8,q.length-1),F=mxUtils.parseXml(Graph.decompress(y));return new mxShape(new mxStencil(F.documentElement))}catch(C){null!=window.console&&console.log("Error in shape: "+C)}}return g.apply(this,arguments)}})();
+mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];mxStencilRegistry.filesLoaded={};
mxStencilRegistry.getStencil=function(b){var e=mxStencilRegistry.stencils[b];if(null==e&&null==mxCellRenderer.defaultShapes[b]&&mxStencilRegistry.dynamicLoading){var k=mxStencilRegistry.getBasenameForStencil(b);if(null!=k){e=mxStencilRegistry.libraries[k];if(null!=e){if(null==mxStencilRegistry.packages[k]){for(var n=0;n<e.length;n++){var D=e[n];if(!mxStencilRegistry.filesLoaded[D])if(mxStencilRegistry.filesLoaded[D]=!0,".xml"==D.toLowerCase().substring(D.length-4,D.length))mxStencilRegistry.loadStencilSet(D,
null);else if(".js"==D.toLowerCase().substring(D.length-3,D.length))try{if(mxStencilRegistry.allowEval){var t=mxUtils.load(D);null!=t&&200<=t.getStatus()&&299>=t.getStatus()&&eval.call(window,t.getText())}}catch(E){null!=window.console&&console.log("error in getStencil:",b,k,e,D,E)}}mxStencilRegistry.packages[k]=1}}else k=k.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+k+".xml",null);e=mxStencilRegistry.stencils[b]}}return e};
mxStencilRegistry.getBasenameForStencil=function(b){var e=null;if(null!=b&&"string"===typeof b&&(b=b.split("."),0<b.length&&"mxgraph"==b[0])){e=b[1];for(var k=2;k<b.length-1;k++)e+="/"+b[k]}return e};
@@ -2489,140 +2492,140 @@ mxConstants.HANDLE_STROKECOLOR="#0088cf";mxConstants.VERTEX_SELECTION_COLOR="#00
!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents=!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(z){return!mxEvent.isAltDown(z)};var k=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(z){return k.apply(this,arguments)||this.graph.isTableRow(z)||this.graph.isTableCell(z)};var n=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=function(z){return n.apply(this,arguments)||
this.graph.isEdgeIgnored(z)};var D=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(z){return this.graph.isCloneEvent(z)!=D.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var z=new mxEllipse(null,this.highlightColor,this.highlightColor,0);z.opacity=mxConstants.HIGHLIGHT_OPACITY;return z};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor="crosshair";mxConnectionHandler.prototype.createEdgeState=
function(z){z=this.graph.createCurrentEdgeStyle();z=this.graph.createEdge(null,null,null,null,null,z);z=new mxCellState(this.graph.view,z,this.graph.getCellStyle(z));for(var K in this.graph.currentEdgeStyle)z.style[K]=this.graph.currentEdgeStyle[K];z.style=this.graph.postProcessCellStyle(z.cell,z.style);return z};var t=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var z=t.apply(this,arguments);z.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];
-return z};mxConnectionHandler.prototype.updatePreview=function(z){};var E=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var z=E.apply(this,arguments),K=z.getCell;z.getCell=mxUtils.bind(this,function(M){var T=K.apply(this,arguments);this.error=null;return T});return z};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=
-function(){for(var z="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",K="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),M=0;M<K.length;M++)null!=this.currentEdgeStyle[K[M]]&&(z+=K[M]+"="+this.currentEdgeStyle[K[M]]+";");null!=this.currentEdgeStyle.orthogonalLoop?z+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&
+return z};mxConnectionHandler.prototype.updatePreview=function(z){};var E=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var z=E.apply(this,arguments),K=z.getCell;z.getCell=mxUtils.bind(this,function(L){var S=K.apply(this,arguments);this.error=null;return S});return z};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=
+function(){for(var z="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",K="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),L=0;L<K.length;L++)null!=this.currentEdgeStyle[K[L]]&&(z+=K[L]+"="+this.currentEdgeStyle[K[L]]+";");null!=this.currentEdgeStyle.orthogonalLoop?z+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&
(z+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?z+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(z+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(z+="elbow="+this.currentEdgeStyle.elbow+";");return z=null!=this.currentEdgeStyle.html?z+("html="+this.currentEdgeStyle.html+";"):z+"html=1;"};
-Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var z=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=z&&(new mxCodec(z.ownerDocument)).decode(z,this.getStylesheet())};Graph.prototype.createCellLookup=function(z,K){K=null!=K?K:{};for(var M=0;M<z.length;M++){var T=z[M];K[mxObjectIdentity.get(T)]=T.getId();for(var V=this.model.getChildCount(T),
-ia=0;ia<V;ia++)this.createCellLookup([this.model.getChildAt(T,ia)],K)}return K};Graph.prototype.createCellMapping=function(z,K,M){M=null!=M?M:{};for(var T in z){var V=K[T];null==M[V]&&(M[V]=z[T].getId()||"")}return M};Graph.prototype.importGraphModel=function(z,K,M,T){K=null!=K?K:0;M=null!=M?M:0;var V=new mxCodec(z.ownerDocument),ia=new mxGraphModel;V.decode(z,ia);z=[];V={};var na={},va=ia.getChildren(this.cloneCell(ia.root,this.isCloneInvalidEdges(),V));if(null!=va){var pa=this.createCellLookup([ia.root]);
-va=va.slice();this.model.beginUpdate();try{if(1!=va.length||this.isCellLocked(this.getDefaultParent()))for(ia=0;ia<va.length;ia++)za=this.model.getChildren(this.moveCells([va[ia]],K,M,!1,this.model.getRoot())[0]),null!=za&&(z=z.concat(za));else{var za=ia.getChildren(va[0]);null!=za&&(z=this.moveCells(za,K,M,!1,this.getDefaultParent()),na[ia.getChildAt(ia.root,0).getId()]=this.getDefaultParent().getId())}if(null!=z&&(this.createCellMapping(V,pa,na),this.updateCustomLinks(na,z),T)){this.isGridEnabled()&&
-(K=this.snap(K),M=this.snap(M));var Da=this.getBoundingBoxFromGeometry(z,!0);null!=Da&&this.moveCells(z,K-Da.x,M-Da.y)}}finally{this.model.endUpdate()}}return z};Graph.prototype.encodeCells=function(z){for(var K={},M=this.cloneCells(z,null,K),T=new mxDictionary,V=0;V<z.length;V++)T.put(z[V],!0);var ia=new mxCodec,na=new mxGraphModel,va=na.getChildAt(na.getRoot(),0);for(V=0;V<M.length;V++){na.add(va,M[V]);var pa=this.view.getState(z[V]);if(null!=pa){var za=this.getCellGeometry(M[V]);null!=za&&za.relative&&
-!this.model.isEdge(z[V])&&null==T.get(this.model.getParent(z[V]))&&(za.offset=null,za.relative=!1,za.x=pa.x/pa.view.scale-pa.view.translate.x,za.y=pa.y/pa.view.scale-pa.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(K,this.createCellLookup(z)),M);return ia.encode(na)};Graph.prototype.isSwimlane=function(z,K){var M=null;null==z||this.model.isEdge(z)||this.model.getParent(z)==this.model.getRoot()||(M=this.getCurrentCellStyle(z,K)[mxConstants.STYLE_SHAPE]);return M==mxConstants.SHAPE_SWIMLANE||
-"table"==M||"tableRow"==M};var d=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(z){var K=this.model.getParent(z);if(null!=K){var M=this.getCurrentCellStyle(K);if(null!=M.expand)return"0"!=M.expand}return d.apply(this,arguments)&&(null==K||!this.isTable(K))};var f=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(z,K,M,T,V,ia,na,va){null==va&&(va=this.model.getParent(z),this.isTable(va)||this.isTableRow(va))&&(va=this.getCellAt(ia,na,null,!0,!1));M=null;this.model.beginUpdate();
-try{M=f.apply(this,[z,K,M,T,V,ia,na,va]);this.model.setValue(M,"");var pa=this.getChildCells(M,!0);for(K=0;K<pa.length;K++){var za=this.getCellGeometry(pa[K]);null!=za&&za.relative&&0<za.x&&this.model.remove(pa[K])}var Da=this.getChildCells(z,!0);for(K=0;K<Da.length;K++)za=this.getCellGeometry(Da[K]),null!=za&&za.relative&&0>=za.x&&this.model.remove(Da[K]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[M]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[M]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
-null,[z]);this.setCellStyles(mxConstants.STYLE_STARTARROW,mxConstants.NONE,[z]);var Ma=this.model.getTerminal(M,!1);if(null!=Ma){var La=this.getCurrentCellStyle(Ma);null!=La&&"1"==La.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[z]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[z]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[M]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[M]))}}finally{this.model.endUpdate()}return M};var g=Graph.prototype.selectCell;Graph.prototype.selectCell=
-function(z,K,M){if(K||M)g.apply(this,arguments);else{var T=this.getSelectionCell(),V=null,ia=[],na=mxUtils.bind(this,function(va){if(null!=this.view.getState(va)&&(this.model.isVertex(va)||this.model.isEdge(va)))if(ia.push(va),va==T)V=ia.length-1;else if(z&&null==T&&0<ia.length||null!=V&&z&&ia.length>V||!z&&0<V)return;for(var pa=0;pa<this.model.getChildCount(va);pa++)na(this.model.getChildAt(va,pa))});na(this.model.root);0<ia.length&&(V=null!=V?mxUtils.mod(V+(z?1:-1),ia.length):0,this.setSelectionCell(ia[V]))}};
-Graph.prototype.swapShapes=function(z,K,M,T,V,ia,na){K=!1;if(!T&&null!=V&&1==z.length&&(T=this.view.getState(V),M=this.view.getState(z[0]),null!=T&&null!=M&&(null!=ia&&mxEvent.isShiftDown(ia)||"umlLifeline"==T.style.shape&&"umlLifeline"==M.style.shape)&&(T=this.getCellGeometry(V),ia=this.getCellGeometry(z[0]),null!=T&&null!=ia))){K=T.clone();T=ia.clone();T.x=K.x;T.y=K.y;K.x=ia.x;K.y=ia.y;this.model.beginUpdate();try{this.model.setGeometry(V,K),this.model.setGeometry(z[0],T)}finally{this.model.endUpdate()}K=
-!0}return K};var m=Graph.prototype.moveCells;Graph.prototype.moveCells=function(z,K,M,T,V,ia,na){if(this.swapShapes(z,K,M,T,V,ia,na))return z;na=null!=na?na:{};if(this.isTable(V)){for(var va=[],pa=0;pa<z.length;pa++)this.isTable(z[pa])?va=va.concat(this.model.getChildCells(z[pa],!0).reverse()):va.push(z[pa]);z=va}this.model.beginUpdate();try{va=[];for(pa=0;pa<z.length;pa++)if(null!=V&&this.isTableRow(z[pa])){var za=this.model.getParent(z[pa]),Da=this.getCellGeometry(z[pa]);this.isTable(za)&&va.push(za);
-if(null!=za&&null!=Da&&this.isTable(za)&&this.isTable(V)&&(T||za!=V)){if(!T){var Ma=this.getCellGeometry(za);null!=Ma&&(Ma=Ma.clone(),Ma.height-=Da.height,this.model.setGeometry(za,Ma))}Ma=this.getCellGeometry(V);null!=Ma&&(Ma=Ma.clone(),Ma.height+=Da.height,this.model.setGeometry(V,Ma));var La=this.model.getChildCells(V,!0);if(0<La.length){z[pa]=T?this.cloneCell(z[pa]):z[pa];var Ua=this.model.getChildCells(z[pa],!0),Sa=this.model.getChildCells(La[0],!0),Fa=Sa.length-Ua.length;if(0<Fa)for(var wa=
-0;wa<Fa;wa++){var ya=this.cloneCell(Ua[Ua.length-1]);null!=ya&&(ya.value="",this.model.add(z[pa],ya))}else if(0>Fa)for(wa=0;wa>Fa;wa--)this.model.remove(Ua[Ua.length+wa-1]);Ua=this.model.getChildCells(z[pa],!0);for(wa=0;wa<Sa.length;wa++){var Na=this.getCellGeometry(Sa[wa]),Ja=this.getCellGeometry(Ua[wa]);null!=Na&&null!=Ja&&(Ja=Ja.clone(),Ja.width=Na.width,this.model.setGeometry(Ua[wa],Ja))}}}}var Qa=m.apply(this,arguments);for(pa=0;pa<va.length;pa++)!T&&this.model.contains(va[pa])&&0==this.model.getChildCount(va[pa])&&
-this.model.remove(va[pa]);T&&this.updateCustomLinks(this.createCellMapping(na,this.createCellLookup(z)),Qa)}finally{this.model.endUpdate()}return Qa};var q=Graph.prototype.removeCells;Graph.prototype.removeCells=function(z,K){var M=[];this.model.beginUpdate();try{for(var T=0;T<z.length;T++)if(this.isTableCell(z[T])){var V=this.model.getParent(z[T]),ia=this.model.getParent(V);1==this.model.getChildCount(V)&&1==this.model.getChildCount(ia)?0>mxUtils.indexOf(z,ia)&&0>mxUtils.indexOf(M,ia)&&M.push(ia):
-this.labelChanged(z[T],"")}else{if(this.isTableRow(z[T])&&(ia=this.model.getParent(z[T]),0>mxUtils.indexOf(z,ia)&&0>mxUtils.indexOf(M,ia))){for(var na=this.model.getChildCells(ia,!0),va=0,pa=0;pa<na.length;pa++)0<=mxUtils.indexOf(z,na[pa])&&va++;va==na.length&&M.push(ia)}M.push(z[T])}M=q.apply(this,[M,K])}finally{this.model.endUpdate()}return M};Graph.prototype.updateCustomLinks=function(z,K,M){M=null!=M?M:new Graph;for(var T=0;T<K.length;T++)null!=K[T]&&M.updateCustomLinksForCell(z,K[T],M)};Graph.prototype.updateCustomLinksForCell=
-function(z,K){this.doUpdateCustomLinksForCell(z,K);for(var M=this.model.getChildCount(K),T=0;T<M;T++)this.updateCustomLinksForCell(z,this.model.getChildAt(K,T))};Graph.prototype.doUpdateCustomLinksForCell=function(z,K){};Graph.prototype.getAllConnectionConstraints=function(z,K){if(null!=z){K=mxUtils.getValue(z.style,"points",null);if(null!=K){z=[];try{var M=JSON.parse(K);for(K=0;K<M.length;K++){var T=M[K];z.push(new mxConnectionConstraint(new mxPoint(T[0],T[1]),2<T.length?"0"!=T[2]:!0,null,3<T.length?
-T[3]:0,4<T.length?T[4]:0))}}catch(ia){}return z}if(null!=z.shape&&null!=z.shape.bounds){T=z.shape.direction;K=z.shape.bounds;var V=z.shape.scale;M=K.width/V;K=K.height/V;if(T==mxConstants.DIRECTION_NORTH||T==mxConstants.DIRECTION_SOUTH)T=M,M=K,K=T;K=z.shape.getConstraints(z.style,M,K);if(null!=K)return K;if(null!=z.shape.stencil&&null!=z.shape.stencil.constraints)return z.shape.stencil.constraints;if(null!=z.shape.constraints)return z.shape.constraints}}return null};Graph.prototype.flipEdge=function(z){if(null!=
-z){var K=this.getCurrentCellStyle(z);K=mxUtils.getValue(K,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,K,[z])}};Graph.prototype.isValidRoot=function(z){for(var K=this.model.getChildCount(z),M=0,T=0;T<K;T++){var V=this.model.getChildAt(z,T);this.model.isVertex(V)&&(V=this.getCellGeometry(V),null==V||V.relative||M++)}return 0<M||this.isContainer(z)};Graph.prototype.isValidDropTarget=
-function(z,K,M){for(var T=this.getCurrentCellStyle(z),V=!0,ia=!0,na=0;na<K.length&&ia;na++)V=V&&this.isTable(K[na]),ia=ia&&this.isTableRow(K[na]);return(1==K.length&&null!=M&&mxEvent.isShiftDown(M)&&!mxEvent.isControlDown(M)&&!mxEvent.isAltDown(M)||("1"!=mxUtils.getValue(T,"part","0")||this.isContainer(z))&&"0"!=mxUtils.getValue(T,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(z))&&!this.isTableRow(z)&&(!this.isTable(z)||ia||V))&&!this.isCellLocked(z)};
-Graph.prototype.createGroupCell=function(){var z=mxGraph.prototype.createGroupCell.apply(this,arguments);z.setStyle("group");return z};Graph.prototype.isExtendParentsOnAdd=function(z){var K=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(K&&null!=z&&null!=this.layoutManager){var M=this.model.getParent(z);null!=M&&(M=this.layoutManager.getLayout(M),null!=M&&M.constructor==mxStackLayout&&(K=!1))}return K};Graph.prototype.getPreferredSizeForCell=function(z){var K=mxGraph.prototype.getPreferredSizeForCell.apply(this,
-arguments);null!=K&&(K.width+=10,K.height+=4,this.gridEnabled&&(K.width=this.snap(K.width),K.height=this.snap(K.height)));return K};Graph.prototype.turnShapes=function(z,K){var M=this.getModel(),T=[];M.beginUpdate();try{for(var V=0;V<z.length;V++){var ia=z[V];if(M.isEdge(ia)){var na=M.getTerminal(ia,!0),va=M.getTerminal(ia,!1);M.setTerminal(ia,va,!0);M.setTerminal(ia,na,!1);var pa=M.getGeometry(ia);if(null!=pa){pa=pa.clone();null!=pa.points&&pa.points.reverse();var za=pa.getTerminalPoint(!0),Da=pa.getTerminalPoint(!1);
-pa.setTerminalPoint(za,!1);pa.setTerminalPoint(Da,!0);M.setGeometry(ia,pa);var Ma=this.view.getState(ia),La=this.view.getState(na),Ua=this.view.getState(va);if(null!=Ma){var Sa=null!=La?this.getConnectionConstraint(Ma,La,!0):null,Fa=null!=Ua?this.getConnectionConstraint(Ma,Ua,!1):null;this.setConnectionConstraint(ia,na,!0,Fa);this.setConnectionConstraint(ia,va,!1,Sa);var wa=mxUtils.getValue(Ma.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
-mxUtils.getValue(Ma.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[ia]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,wa,[ia])}T.push(ia)}}else if(M.isVertex(ia)&&(pa=this.getCellGeometry(ia),null!=pa)){if(!(this.isTable(ia)||this.isTableRow(ia)||this.isTableCell(ia)||this.isSwimlane(ia))){pa=pa.clone();pa.x+=pa.width/2-pa.height/2;pa.y+=pa.height/2-pa.width/2;var ya=pa.width;pa.width=pa.height;pa.height=ya;M.setGeometry(ia,pa)}var Na=this.view.getState(ia);if(null!=Na){var Ja=
-[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],Qa=mxUtils.getValue(Na.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,Ja[mxUtils.mod(mxUtils.indexOf(Ja,Qa)+(K?-1:1),Ja.length)],[ia])}T.push(ia)}}}finally{M.endUpdate()}return T};Graph.prototype.stencilHasPlaceholders=function(z){if(null!=z&&null!=z.fgNode)for(z=z.fgNode.firstChild;null!=z;){if("text"==z.nodeName&&"1"==z.getAttribute("placeholders"))return!0;
-z=z.nextSibling}return!1};var y=Graph.prototype.processChange;Graph.prototype.processChange=function(z){if(z instanceof mxGeometryChange&&(this.isTableCell(z.cell)||this.isTableRow(z.cell))&&(null==z.previous&&null!=z.geometry||null!=z.previous&&!z.previous.equals(z.geometry))){var K=z.cell;this.isTableCell(K)&&(K=this.model.getParent(K));this.isTableRow(K)&&(K=this.model.getParent(K));var M=this.view.getState(K);null!=M&&null!=M.shape&&(this.view.invalidate(K),M.shape.bounds=null)}y.apply(this,arguments);
-z instanceof mxValueChange&&null!=z.cell&&null!=z.cell.value&&"object"==typeof z.cell.value&&this.invalidateDescendantsWithPlaceholders(z.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(z){z=this.model.getDescendants(z);if(0<z.length)for(var K=0;K<z.length;K++){var M=this.view.getState(z[K]);null!=M&&null!=M.shape&&null!=M.shape.stencil&&this.stencilHasPlaceholders(M.shape.stencil)?this.removeStateForCell(z[K]):this.isReplacePlaceholders(z[K])&&this.view.invalidate(z[K],!1,!1)}};
-Graph.prototype.replaceElement=function(z,K){K=z.ownerDocument.createElement(null!=K?K:"span");for(var M=Array.prototype.slice.call(z.attributes);attr=M.pop();)K.setAttribute(attr.nodeName,attr.nodeValue);K.innerHTML=z.innerHTML;z.parentNode.replaceChild(K,z)};Graph.prototype.processElements=function(z,K){if(null!=z){z=z.getElementsByTagName("*");for(var M=0;M<z.length;M++)K(z[M])}};Graph.prototype.updateLabelElements=function(z,K,M){z=null!=z?z:this.getSelectionCells();for(var T=document.createElement("div"),
-V=0;V<z.length;V++)if(this.isHtmlLabel(z[V])){var ia=this.convertValueToString(z[V]);if(null!=ia&&0<ia.length){T.innerHTML=ia;for(var na=T.getElementsByTagName(null!=M?M:"*"),va=0;va<na.length;va++)K(na[va]);T.innerHTML!=ia&&this.cellLabelChanged(z[V],T.innerHTML)}}};Graph.prototype.cellLabelChanged=function(z,K,M){K=Graph.zapGremlins(K);this.model.beginUpdate();try{if(null!=z.value&&"object"==typeof z.value){if(this.isReplacePlaceholders(z)&&null!=z.getAttribute("placeholder"))for(var T=z.getAttribute("placeholder"),
-V=z;null!=V;){if(V==this.model.getRoot()||null!=V.value&&"object"==typeof V.value&&V.hasAttribute(T)){this.setAttributeForCell(V,T,K);break}V=this.model.getParent(V)}var ia=z.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&ia.hasAttribute("label_"+Graph.diagramLanguage)?ia.setAttribute("label_"+Graph.diagramLanguage,K):ia.setAttribute("label",K);K=ia}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(z){if(null!=
-z){for(var K=new mxDictionary,M=0;M<z.length;M++)K.put(z[M],!0);var T=[];for(M=0;M<z.length;M++){var V=this.model.getParent(z[M]);null==V||K.get(V)||(K.put(V,!0),T.push(V))}for(M=0;M<T.length;M++)if(V=this.view.getState(T[M]),null!=V&&(this.model.isEdge(V.cell)||this.model.isVertex(V.cell))&&this.isCellDeletable(V.cell)&&this.isTransparentState(V)){for(var ia=!0,na=0;na<this.model.getChildCount(V.cell)&&ia;na++)K.get(this.model.getChildAt(V.cell,na))||(ia=!1);ia&&z.push(V.cell)}}mxGraph.prototype.cellsRemoved.apply(this,
-arguments)};Graph.prototype.removeCellsAfterUngroup=function(z){for(var K=[],M=0;M<z.length;M++)this.isCellDeletable(z[M])&&this.isTransparentState(this.view.getState(z[M]))&&K.push(z[M]);z=K;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(z,K){this.setAttributeForCell(z,"link",K)};Graph.prototype.setTooltipForCell=function(z,K){var M="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(z.value)&&z.value.hasAttribute("tooltip_"+
-Graph.diagramLanguage)&&(M="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(z,M,K)};Graph.prototype.getAttributeForCell=function(z,K,M){z=null!=z.value&&"object"===typeof z.value?z.value.getAttribute(K):null;return null!=z?z:M};Graph.prototype.setAttributeForCell=function(z,K,M){if(null!=z.value&&"object"==typeof z.value)var T=z.value.cloneNode(!0);else T=mxUtils.createXmlDocument().createElement("UserObject"),T.setAttribute("label",z.value||"");null!=M?T.setAttribute(K,M):T.removeAttribute(K);
-this.model.setValue(z,T)};var F=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(z,K,M,T){this.getModel();if(mxEvent.isAltDown(K))return null;for(var V=0;V<z.length;V++){var ia=this.model.getParent(z[V]);if(this.model.isEdge(ia)&&0>mxUtils.indexOf(z,ia))return null}ia=F.apply(this,arguments);var na=!0;for(V=0;V<z.length&&na;V++)na=na&&this.isTableRow(z[V]);na&&(this.isTableCell(ia)&&(ia=this.model.getParent(ia)),this.isTableRow(ia)&&(ia=this.model.getParent(ia)),this.isTable(ia)||
-(ia=null));return ia};Graph.prototype.click=function(z){mxGraph.prototype.click.call(this,z);this.firstClickState=z.getState();this.firstClickSource=z.getSource()};Graph.prototype.dblClick=function(z,K){this.isEnabled()&&(K=this.insertTextForEvent(z,K),mxGraph.prototype.dblClick.call(this,z,K))};Graph.prototype.insertTextForEvent=function(z,K){var M=mxUtils.convertPoint(this.container,mxEvent.getClientX(z),mxEvent.getClientY(z));if(null!=z&&!this.model.isVertex(K)){var T=this.model.isEdge(K)?this.view.getState(K):
-null,V=mxEvent.getSource(z);this.firstClickState!=T||this.firstClickSource!=V||null!=T&&null!=T.text&&null!=T.text.node&&null!=T.text.boundingBox&&(mxUtils.contains(T.text.boundingBox,M.x,M.y)||mxUtils.isAncestorNode(T.text.node,mxEvent.getSource(z)))||(null!=T||this.isCellLocked(this.getDefaultParent()))&&(null==T||this.isCellLocked(T.cell))||!(null!=T||mxClient.IS_SVG&&V==this.view.getCanvas().ownerSVGElement)||(null==T&&(T=this.view.getState(this.getCellAt(M.x,M.y))),K=this.addText(M.x,M.y,T))}return K};
-Graph.prototype.getInsertPoint=function(){var z=this.getGridSize(),K=this.container.scrollLeft/this.view.scale-this.view.translate.x,M=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var T=this.getPageLayout(),V=this.getPageSize();K=Math.max(K,T.x*V.width);M=Math.max(M,T.y*V.height)}return new mxPoint(this.snap(K+z),this.snap(M+z))};Graph.prototype.getFreeInsertPoint=function(){var z=this.view,K=this.getGraphBounds(),M=this.getInsertPoint(),T=this.snap(Math.round(Math.max(M.x,
-K.x/z.scale-z.translate.x+(0==K.width?2*this.gridSize:0))));z=this.snap(Math.round(Math.max(M.y,(K.y+K.height)/z.scale-z.translate.y+2*this.gridSize)));return new mxPoint(T,z)};Graph.prototype.getCenterInsertPoint=function(z){z=null!=z?z:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap(Math.round((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-z.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/
-2)/this.view.scale-this.view.translate.y-z.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-z.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-z.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(z,K,M){var T=new mxCell;T.value="Text";T.geometry=new mxGeometry(0,0,0,0);T.vertex=!0;if(null!=M&&this.model.isEdge(M.cell)){T.style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];";
-T.geometry.relative=!0;T.connectable=!1;var V=this.view.getRelativePoint(M,z,K);T.geometry.x=Math.round(1E4*V.x)/1E4;T.geometry.y=Math.round(V.y);T.geometry.offset=new mxPoint(0,0);V=this.view.getPoint(M,T.geometry);var ia=this.view.scale;T.geometry.offset=new mxPoint(Math.round((z-V.x)/ia),Math.round((K-V.y)/ia))}else V=this.view.translate,T.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",T.geometry.width=40,T.geometry.height=20,T.geometry.x=Math.round(z/this.view.scale)-
-V.x-(null!=M?M.origin.x:0),T.geometry.y=Math.round(K/this.view.scale)-V.y-(null!=M?M.origin.y:0),T.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([T],null!=M?M.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[T])),this.autoSizeCell(T)}finally{this.getModel().endUpdate()}return T};Graph.prototype.addClickHandler=function(z,K,M){var T=mxUtils.bind(this,function(){var pa=this.container.getElementsByTagName("a");if(null!=pa)for(var za=0;za<pa.length;za++){var Da=
-this.getAbsoluteUrl(pa[za].getAttribute("href"));null!=Da&&(pa[za].setAttribute("rel",this.linkRelation),pa[za].setAttribute("href",Da),null!=K&&mxEvent.addGestureListeners(pa[za],null,null,K))}});this.model.addListener(mxEvent.CHANGE,T);T();var V=this.container.style.cursor,ia=this.getTolerance(),na=this,va={currentState:null,currentLink:null,currentTarget:null,highlight:null!=z&&""!=z&&z!=mxConstants.NONE?new mxCellHighlight(na,z,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(pa){var za=
-pa.sourceState;if(null==za||null==na.getLinkForCell(za.cell))pa=na.getCellAt(pa.getGraphX(),pa.getGraphY(),null,null,null,function(Da,Ma,La){return null==na.getLinkForCell(Da.cell)}),za=null==za||na.model.isAncestor(pa,za.cell)?na.view.getState(pa):null;za!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=za,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(pa,za){this.startX=za.getGraphX();this.startY=za.getGraphY();this.scrollLeft=na.container.scrollLeft;
-this.scrollTop=na.container.scrollTop;null==this.currentLink&&"auto"==na.container.style.overflow&&(na.container.style.cursor="move");this.updateCurrentState(za)},mouseMove:function(pa,za){if(na.isMouseDown)null!=this.currentLink&&(pa=Math.abs(this.startX-za.getGraphX()),za=Math.abs(this.startY-za.getGraphY()),(pa>ia||za>ia)&&this.clear());else{for(pa=za.getSource();null!=pa&&"a"!=pa.nodeName.toLowerCase();)pa=pa.parentNode;null!=pa?this.clear():(null!=na.tooltipHandler&&null!=this.currentLink&&null!=
-this.currentState&&na.tooltipHandler.reset(za,!0,this.currentState),(null==this.currentState||za.getState()!=this.currentState&&null!=za.sourceState||!na.intersects(this.currentState,za.getGraphX(),za.getGraphY()))&&this.updateCurrentState(za))}},mouseUp:function(pa,za){var Da=za.getSource();for(pa=za.getEvent();null!=Da&&"a"!=Da.nodeName.toLowerCase();)Da=Da.parentNode;null==Da&&Math.abs(this.scrollLeft-na.container.scrollLeft)<ia&&Math.abs(this.scrollTop-na.container.scrollTop)<ia&&(null==za.sourceState||
-!za.isSource(za.sourceState.control))&&((mxEvent.isLeftMouseButton(pa)||mxEvent.isMiddleMouseButton(pa))&&!mxEvent.isPopupTrigger(pa)||mxEvent.isTouchEvent(pa))&&(null!=this.currentLink?(Da=na.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&Da||null==K||K(pa,this.currentLink),mxEvent.isConsumed(pa)||(pa=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(pa)?"_blank":Da?na.linkTarget:"_top",na.openLink(this.currentLink,pa),za.consume())):null!=M&&!za.isConsumed()&&
-Math.abs(this.scrollLeft-na.container.scrollLeft)<ia&&Math.abs(this.scrollTop-na.container.scrollTop)<ia&&Math.abs(this.startX-za.getGraphX())<ia&&Math.abs(this.startY-za.getGraphY())<ia&&M(za.getEvent()));this.clear()},activate:function(pa){this.currentLink=na.getAbsoluteUrl(na.getLinkForCell(pa.cell));null!=this.currentLink&&(this.currentTarget=na.getLinkTargetForCell(pa.cell),na.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(pa))},clear:function(){null!=na.container&&
-(na.container.style.cursor=V);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=na.tooltipHandler&&na.tooltipHandler.hide()}};na.click=function(pa){};na.addMouseListener(va);mxEvent.addListener(document,"mouseleave",function(pa){va.clear()})};Graph.prototype.duplicateCells=function(z,K){z=null!=z?z:this.getSelectionCells();K=null!=K?K:!0;for(var M=0;M<z.length;M++)this.isTableCell(z[M])&&(z[M]=this.model.getParent(z[M]));z=this.model.getTopmostCells(z);
-var T=this.getModel(),V=this.gridSize,ia=[];T.beginUpdate();try{var na={},va=this.createCellLookup(z),pa=this.cloneCells(z,!1,na,!0);for(M=0;M<z.length;M++){var za=T.getParent(z[M]);if(null!=za){var Da=this.moveCells([pa[M]],V,V,!1)[0];ia.push(Da);if(K)T.add(za,pa[M]);else{var Ma=za.getIndex(z[M]);T.add(za,pa[M],Ma+1)}if(this.isTable(za)){var La=this.getCellGeometry(pa[M]),Ua=this.getCellGeometry(za);null!=La&&null!=Ua&&(Ua=Ua.clone(),Ua.height+=La.height,T.setGeometry(za,Ua))}}else ia.push(pa[M])}this.updateCustomLinks(this.createCellMapping(na,
-va),pa,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",pa))}finally{T.endUpdate()}return ia};Graph.prototype.insertImage=function(z,K,M){if(null!=z&&null!=this.cellEditor.textarea){for(var T=this.cellEditor.textarea.getElementsByTagName("img"),V=[],ia=0;ia<T.length;ia++)V.push(T[ia]);document.execCommand("insertimage",!1,z);z=this.cellEditor.textarea.getElementsByTagName("img");if(z.length==V.length+1)for(ia=z.length-1;0<=ia;ia--)if(0==ia||z[ia]!=V[ia-1]){z[ia].setAttribute("width",
-K);z[ia].setAttribute("height",M);break}}};Graph.prototype.insertLink=function(z){if(null!=this.cellEditor.textarea)if(0==z.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var K=this.cellEditor.textarea.getElementsByTagName("a"),M=[],T=0;T<K.length;T++)M.push(K[T]);document.execCommand("createlink",!1,mxUtils.trim(z));K=this.cellEditor.textarea.getElementsByTagName("a");if(K.length==M.length+1)for(T=K.length-1;0<=T;T--)if(K[T]!=M[T-1]){for(K=K[T].getElementsByTagName("a");0<K.length;){for(M=
-K[0].parentNode;null!=K[0].firstChild;)M.insertBefore(K[0].firstChild,K[0]);M.removeChild(K[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(z))};Graph.prototype.isCellResizable=function(z){var K=mxGraph.prototype.isCellResizable.apply(this,arguments),M=this.getCurrentCellStyle(z);return!this.isTableCell(z)&&!this.isTableRow(z)&&(K||"0"!=mxUtils.getValue(M,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==M[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(z,K){null==
-K&&(K=this.getSelectionCells());if(null!=K&&1<K.length){for(var M=[],T=null,V=null,ia=0;ia<K.length;ia++)if(this.getModel().isVertex(K[ia])){var na=this.view.getState(K[ia]);if(null!=na){var va=z?na.getCenterX():na.getCenterY();T=null!=T?Math.max(T,va):va;V=null!=V?Math.min(V,va):va;M.push(na)}}if(2<M.length){M.sort(function(Ma,La){return z?Ma.x-La.x:Ma.y-La.y});na=this.view.translate;va=this.view.scale;V=V/va-(z?na.x:na.y);T=T/va-(z?na.x:na.y);this.getModel().beginUpdate();try{var pa=(T-V)/(M.length-
-1);T=V;for(ia=1;ia<M.length-1;ia++){var za=this.view.getState(this.model.getParent(M[ia].cell)),Da=this.getCellGeometry(M[ia].cell);T+=pa;null!=Da&&null!=za&&(Da=Da.clone(),z?Da.x=Math.round(T-Da.width/2)-za.origin.x:Da.y=Math.round(T-Da.height/2)-za.origin.y,this.getModel().setGeometry(M[ia].cell,Da))}}finally{this.getModel().endUpdate()}}}return K};Graph.prototype.isCloneEvent=function(z){return mxClient.IS_MAC&&mxEvent.isMetaDown(z)||mxEvent.isControlDown(z)};Graph.prototype.createSvgImageExport=
-function(){var z=new mxImageExport;z.getLinkForCellState=mxUtils.bind(this,function(K,M){return this.getLinkForCell(K.cell)});return z};Graph.prototype.parseBackgroundImage=function(z){var K=null;null!=z&&0<z.length&&(z=JSON.parse(z),K=new mxImage(z.src,z.width,z.height));return K};Graph.prototype.getBackgroundImageObject=function(z){return z};Graph.prototype.getSvg=function(z,K,M,T,V,ia,na,va,pa,za,Da,Ma,La,Ua){var Sa=null;if(null!=Ua)for(Sa=new mxDictionary,Da=0;Da<Ua.length;Da++)Sa.put(Ua[Da],
-!0);if(Ua=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{K=null!=K?K:1;M=null!=M?M:0;V=null!=V?V:!0;ia=null!=ia?ia:!0;na=null!=na?na:!0;za=null!=za?za:!1;var Fa="page"==La?this.view.getBackgroundPageBounds():ia&&null==Sa||T||"diagram"==La?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),wa=this.view.scale;"diagram"==La&&null!=this.backgroundImage&&(Fa=mxRectangle.fromRectangle(Fa),Fa.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*
-wa,(this.view.translate.y+this.backgroundImage.y)*wa,this.backgroundImage.width*wa,this.backgroundImage.height*wa)));if(null==Fa)throw Error(mxResources.get("drawingEmpty"));T=K/wa;La=V?-.5:0;var ya=Graph.createSvgNode(La,La,Math.max(1,Math.ceil(Fa.width*T)+2*M)+(za&&0==M?5:0),Math.max(1,Math.ceil(Fa.height*T)+2*M)+(za&&0==M?5:0),z),Na=ya.ownerDocument,Ja=null!=Na.createElementNS?Na.createElementNS(mxConstants.NS_SVG,"g"):Na.createElement("g");ya.appendChild(Ja);var Qa=this.createSvgCanvas(Ja);Qa.foOffset=
-V?-.5:0;Qa.textOffset=V?-.5:0;Qa.imageOffset=V?-.5:0;Qa.translate(Math.floor(M/K-Fa.x/wa),Math.floor(M/K-Fa.y/wa));var Za=document.createElement("div"),cb=Qa.getAlternateText;Qa.getAlternateText=function(db,kb,ib,ob,vb,nb,Bb,yb,mb,pb,gb,rb,tb){if(null!=nb&&0<this.state.fontSize)try{mxUtils.isNode(nb)?nb=nb.innerText:(Za.innerHTML=nb,nb=mxUtils.extractTextWithWhitespace(Za.childNodes));for(var zb=Math.ceil(2*ob/this.state.fontSize),wb=[],Ab=0,lb=0;(0==zb||Ab<zb)&&lb<nb.length;){var xb=nb.charCodeAt(lb);
-if(10==xb||13==xb){if(0<Ab)break}else wb.push(nb.charAt(lb)),255>xb&&Ab++;lb++}wb.length<nb.length&&1<nb.length-wb.length&&(nb=mxUtils.trim(wb.join(""))+"...");return nb}catch(c){return cb.apply(this,arguments)}else return cb.apply(this,arguments)};var fb=this.backgroundImage;if(null!=fb){z=wa/K;var qb=this.view.translate;La=new mxRectangle((fb.x+qb.x)*z,(fb.y+qb.y)*z,fb.width*z,fb.height*z);mxUtils.intersects(Fa,La)&&Qa.image(fb.x+qb.x,fb.y+qb.y,fb.width,fb.height,fb.src,!0)}Qa.scale(T);Qa.textEnabled=
-na;va=null!=va?va:this.createSvgImageExport();var ub=va.drawCellState,ab=va.getLinkForCellState;va.getLinkForCellState=function(db,kb){var ib=ab.apply(this,arguments);return null==ib||db.view.graph.isCustomLink(ib)?null:ib};va.getLinkTargetForCellState=function(db,kb){return db.view.graph.getLinkTargetForCell(db.cell)};va.drawCellState=function(db,kb){for(var ib=db.view.graph,ob=null!=Sa?Sa.get(db.cell):ib.isCellSelected(db.cell),vb=ib.model.getParent(db.cell);!(ia&&null==Sa||ob)&&null!=vb;)ob=null!=
-Sa?Sa.get(vb):ib.isCellSelected(vb),vb=ib.model.getParent(vb);(ia&&null==Sa||ob)&&ub.apply(this,arguments)};va.drawState(this.getView().getState(this.model.root),Qa);this.updateSvgLinks(ya,pa,!0);this.addForeignObjectWarning(Qa,ya);return ya}finally{Ua&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(z,K){if("0"!=urlParams["svg-warning"]&&0<K.getElementsByTagName("foreignObject").length){var M=z.createElement("switch"),T=z.createElement("g");
-T.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var V=z.createElement("a");V.setAttribute("transform","translate(0,-5)");null==V.setAttributeNS||K.ownerDocument!=document&&null==document.documentMode?(V.setAttribute("xlink:href",Graph.foreignObjectWarningLink),V.setAttribute("target","_blank")):(V.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),V.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));z=z.createElement("text");
-z.setAttribute("text-anchor","middle");z.setAttribute("font-size","10px");z.setAttribute("x","50%");z.setAttribute("y","100%");mxUtils.write(z,Graph.foreignObjectWarningText);M.appendChild(T);V.appendChild(z);M.appendChild(V);K.appendChild(M)}};Graph.prototype.updateSvgLinks=function(z,K,M){z=z.getElementsByTagName("a");for(var T=0;T<z.length;T++)if(null==z[T].getAttribute("target")){var V=z[T].getAttribute("href");null==V&&(V=z[T].getAttribute("xlink:href"));null!=V&&(null!=K&&/^https?:\/\//.test(V)?
-z[T].setAttribute("target",K):M&&this.isCustomLink(V)&&z[T].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(z){z=new mxSvgCanvas2D(z);z.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;z.pointerEvents=!0;return z};Graph.prototype.getSelectedElement=function(){var z=null;if(window.getSelection){var K=window.getSelection();K.getRangeAt&&K.rangeCount&&(z=K.getRangeAt(0).commonAncestorContainer)}else document.selection&&(z=document.selection.createRange().parentElement());
-return z};Graph.prototype.getSelectedEditingElement=function(){for(var z=this.getSelectedElement();null!=z&&z.nodeType!=mxConstants.NODETYPE_ELEMENT;)z=z.parentNode;null!=z&&z==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(z=this.cellEditor.textarea.firstChild);return z};Graph.prototype.getParentByName=function(z,K,M){for(;null!=z&&z.nodeName!=K;){if(z==M)return null;z=z.parentNode}return z};Graph.prototype.getParentByNames=
-function(z,K,M){for(;null!=z&&!(0<=mxUtils.indexOf(K,z.nodeName));){if(z==M)return null;z=z.parentNode}return z};Graph.prototype.selectNode=function(z){var K=null;if(window.getSelection){if(K=window.getSelection(),K.getRangeAt&&K.rangeCount){var M=document.createRange();M.selectNode(z);K.removeAllRanges();K.addRange(M)}}else(K=document.selection)&&"Control"!=K.type&&(z=K.createRange(),z.collapse(!0),M=K.createRange(),M.setEndPoint("StartToStart",z),M.select())};Graph.prototype.flipEdgePoints=function(z,
-K,M){var T=this.getCellGeometry(z);if(null!=T){T=T.clone();if(null!=T.points)for(var V=0;V<T.points.length;V++)K?T.points[V].x=M+(M-T.points[V].x):T.points[V].y=M+(M-T.points[V].y);V=function(ia){null!=ia&&(K?ia.x=M+(M-ia.x):ia.y=M+(M-ia.y))};V(T.getTerminalPoint(!0));V(T.getTerminalPoint(!1));this.model.setGeometry(z,T)}};Graph.prototype.flipChildren=function(z,K,M){this.model.beginUpdate();try{for(var T=this.model.getChildCount(z),V=0;V<T;V++){var ia=this.model.getChildAt(z,V);if(this.model.isEdge(ia))this.flipEdgePoints(ia,
-K,M);else{var na=this.getCellGeometry(ia);null!=na&&(na=na.clone(),K?na.x=M+(M-na.x-na.width):na.y=M+(M-na.y-na.height),this.model.setGeometry(ia,na))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(z,K){this.model.beginUpdate();try{z=this.model.getTopmostCells(z);for(var M=[],T=0;T<z.length;T++)if(this.model.isEdge(z[T])){var V=this.view.getState(z[T]);null!=V&&this.flipEdgePoints(z[T],K,(K?V.getCenterX():V.getCenterY())/this.view.scale-(K?V.origin.x:V.origin.y)-(K?this.view.translate.x:
-this.view.translate.y))}else{var ia=this.getCellGeometry(z[T]);null!=ia&&this.flipChildren(z[T],K,K?ia.getCenterX()-ia.x:ia.getCenterY()-ia.y);M.push(z[T])}this.toggleCellStyles(K?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,M)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(z,K){var M=null;if(null!=z&&0<z.length){this.model.beginUpdate();try{for(var T=0;T<z.length;T++){var V=this.model.getParent(z[T]);if(this.isTable(V)){var ia=this.getCellGeometry(z[T]),na=this.getCellGeometry(V);
-null!=ia&&null!=na&&(na=na.clone(),na.height-=ia.height,this.model.setGeometry(V,na))}}var va=this.selectParentAfterDelete?this.model.getParents(z):null;this.removeCells(z,K)}finally{this.model.endUpdate()}if(null!=va)for(M=[],T=0;T<va.length;T++)this.model.contains(va[T])&&(this.model.isVertex(va[T])||this.model.isEdge(va[T]))&&M.push(va[T])}return M};Graph.prototype.insertTableColumn=function(z,K){var M=this.getModel();M.beginUpdate();try{var T=z,V=0;if(this.isTableCell(z)){var ia=M.getParent(z);
-T=M.getParent(ia);V=mxUtils.indexOf(M.getChildCells(ia,!0),z)}else this.isTableRow(z)?T=M.getParent(z):z=M.getChildCells(T,!0)[0],K||(V=M.getChildCells(z,!0).length-1);var na=M.getChildCells(T,!0),va=Graph.minTableColumnWidth;for(z=0;z<na.length;z++){var pa=M.getChildCells(na[z],!0)[V],za=M.cloneCell(pa,!1),Da=this.getCellGeometry(za);za.value=null;za.style=mxUtils.setStyle(mxUtils.setStyle(za.style,"rowspan",null),"colspan",null);if(null!=Da){null!=Da.alternateBounds&&(Da.width=Da.alternateBounds.width,
-Da.height=Da.alternateBounds.height,Da.alternateBounds=null);va=Da.width;var Ma=this.getCellGeometry(na[z]);null!=Ma&&(Da.height=Ma.height)}M.add(na[z],za,V+(K?0:1))}var La=this.getCellGeometry(T);null!=La&&(La=La.clone(),La.width+=va,M.setGeometry(T,La))}finally{M.endUpdate()}};Graph.prototype.deleteLane=function(z){var K=this.getModel();K.beginUpdate();try{var M=null;M="stackLayout"==this.getCurrentCellStyle(z).childLayout?z:K.getParent(z);var T=K.getChildCells(M,!0);0==T.length?K.remove(M):(M==
-z&&(z=T[T.length-1]),K.remove(z))}finally{K.endUpdate()}};Graph.prototype.insertLane=function(z,K){var M=this.getModel();M.beginUpdate();try{var T=null;if("stackLayout"==this.getCurrentCellStyle(z).childLayout){T=z;var V=M.getChildCells(T,!0);z=V[K?0:V.length-1]}else T=M.getParent(z);var ia=T.getIndex(z);z=M.cloneCell(z,!1);z.value=null;M.add(T,z,ia+(K?0:1))}finally{M.endUpdate()}};Graph.prototype.insertTableRow=function(z,K){var M=this.getModel();M.beginUpdate();try{var T=z,V=z;if(this.isTableCell(z))V=
-M.getParent(z),T=M.getParent(V);else if(this.isTableRow(z))T=M.getParent(z);else{var ia=M.getChildCells(T,!0);V=ia[K?0:ia.length-1]}var na=M.getChildCells(V,!0),va=T.getIndex(V);V=M.cloneCell(V,!1);V.value=null;var pa=this.getCellGeometry(V);if(null!=pa){for(ia=0;ia<na.length;ia++){z=M.cloneCell(na[ia],!1);z.value=null;z.style=mxUtils.setStyle(mxUtils.setStyle(z.style,"rowspan",null),"colspan",null);var za=this.getCellGeometry(z);null!=za&&(null!=za.alternateBounds&&(za.width=za.alternateBounds.width,
-za.height=za.alternateBounds.height,za.alternateBounds=null),za.height=pa.height);V.insert(z)}M.add(T,V,va+(K?0:1));var Da=this.getCellGeometry(T);null!=Da&&(Da=Da.clone(),Da.height+=pa.height,M.setGeometry(T,Da))}}finally{M.endUpdate()}};Graph.prototype.deleteTableColumn=function(z){var K=this.getModel();K.beginUpdate();try{var M=z,T=z;this.isTableCell(z)&&(T=K.getParent(z));this.isTableRow(T)&&(M=K.getParent(T));var V=K.getChildCells(M,!0);if(0==V.length)K.remove(M);else{this.isTableRow(T)||(T=
-V[0]);var ia=K.getChildCells(T,!0);if(1>=ia.length)K.remove(M);else{var na=ia.length-1;this.isTableCell(z)&&(na=mxUtils.indexOf(ia,z));for(T=z=0;T<V.length;T++){var va=K.getChildCells(V[T],!0)[na];K.remove(va);var pa=this.getCellGeometry(va);null!=pa&&(z=Math.max(z,pa.width))}var za=this.getCellGeometry(M);null!=za&&(za=za.clone(),za.width-=z,K.setGeometry(M,za))}}}finally{K.endUpdate()}};Graph.prototype.deleteTableRow=function(z){var K=this.getModel();K.beginUpdate();try{var M=z,T=z;this.isTableCell(z)&&
-(z=T=K.getParent(z));this.isTableRow(z)&&(M=K.getParent(T));var V=K.getChildCells(M,!0);if(1>=V.length)K.remove(M);else{this.isTableRow(T)||(T=V[V.length-1]);K.remove(T);z=0;var ia=this.getCellGeometry(T);null!=ia&&(z=ia.height);var na=this.getCellGeometry(M);null!=na&&(na=na.clone(),na.height-=z,K.setGeometry(M,na))}}finally{K.endUpdate()}};Graph.prototype.insertRow=function(z,K){for(var M=z.tBodies[0],T=M.rows[0].cells,V=z=0;V<T.length;V++){var ia=T[V].getAttribute("colspan");z+=null!=ia?parseInt(ia):
-1}K=M.insertRow(K);for(V=0;V<z;V++)mxUtils.br(K.insertCell(-1));return K.cells[0]};Graph.prototype.deleteRow=function(z,K){z.tBodies[0].deleteRow(K)};Graph.prototype.insertColumn=function(z,K){var M=z.tHead;if(null!=M)for(var T=0;T<M.rows.length;T++){var V=document.createElement("th");M.rows[T].appendChild(V);mxUtils.br(V)}z=z.tBodies[0];for(M=0;M<z.rows.length;M++)T=z.rows[M].insertCell(K),mxUtils.br(T);return z.rows[0].cells[0<=K?K:z.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(z,
-K){if(0<=K){z=z.tBodies[0].rows;for(var M=0;M<z.length;M++)z[M].cells.length>K&&z[M].deleteCell(K)}};Graph.prototype.pasteHtmlAtCaret=function(z){if(window.getSelection){var K=window.getSelection();if(K.getRangeAt&&K.rangeCount){K=K.getRangeAt(0);K.deleteContents();var M=document.createElement("div");M.innerHTML=z;z=document.createDocumentFragment();for(var T;T=M.firstChild;)lastNode=z.appendChild(T);K.insertNode(z)}}else(K=document.selection)&&"Control"!=K.type&&K.createRange().pasteHTML(z)};Graph.prototype.createLinkForHint=
-function(z,K){function M(V,ia){V.length>ia&&(V=V.substring(0,Math.round(ia/2))+"..."+V.substring(V.length-Math.round(ia/4)));return V}z=null!=z?z:"javascript:void(0);";if(null==K||0==K.length)K=this.isCustomLink(z)?this.getLinkTitle(z):z;var T=document.createElement("a");T.setAttribute("rel",this.linkRelation);T.setAttribute("href",this.getAbsoluteUrl(z));T.setAttribute("title",M(this.isCustomLink(z)?this.getLinkTitle(z):z,80));null!=this.linkTarget&&T.setAttribute("target",this.linkTarget);mxUtils.write(T,
-M(K,40));this.isCustomLink(z)&&mxEvent.addListener(T,"click",mxUtils.bind(this,function(V){this.customLinkClicked(z);mxEvent.consume(V)}));return T};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(ia,na){this.popupMenuHandler.hideMenu()});var z=this.updateMouseEvent;this.updateMouseEvent=function(ia){ia=z.apply(this,arguments);if(mxEvent.isTouchEvent(ia.getEvent())&&
-null==ia.getState()){var na=this.getCellAt(ia.graphX,ia.graphY);null!=na&&this.isSwimlane(na)&&this.hitsSwimlaneContent(na,ia.graphX,ia.graphY)||(ia.state=this.view.getState(na),null!=ia.state&&null!=ia.state.shape&&(this.container.style.cursor=ia.state.shape.node.style.cursor))}null==ia.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return ia};var K=!1,M=!1,T=!1,V=this.fireMouseEvent;this.fireMouseEvent=function(ia,na,va){ia==mxEvent.MOUSE_DOWN&&(na=this.updateMouseEvent(na),
-K=this.isCellSelected(na.getCell()),M=this.isSelectionEmpty(),T=this.popupMenuHandler.isMenuShowing());V.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(ia,na){var va=mxEvent.isMouseEvent(na.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==na.getState()||!na.isSource(na.getState().control))&&(this.popupMenuHandler.popupTrigger||!T&&!va&&(M&&null==na.getCell()&&this.isSelectionEmpty()||K&&this.isCellSelected(na.getCell())));
-va=!K||va?null:mxUtils.bind(this,function(pa){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var za=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(na.getX()+za.x+1,na.getY()+za.y+1,pa,na.getEvent())}}),500)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[ia,na,va])})};mxCellEditor.prototype.isContentEditing=function(){var z=this.graph.view.getState(this.editingCell);return null!=z&&1==z.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=
-this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var z="";window.getSelection?z=window.getSelection():document.getSelection?z=document.getSelection():document.selection&&(z=document.selection.createRange().text);return""!=z};mxCellEditor.prototype.insertTab=function(z){var K=this.textarea.ownerDocument.defaultView.getSelection(),M=K.getRangeAt(0),T="\t";if(null!=z)for(T="";0<z;)T+=" ",z--;z=document.createElement("span");
-z.style.whiteSpace="pre";z.appendChild(document.createTextNode(T));M.insertNode(z);M.setStartAfter(z);M.setEndAfter(z);K.removeAllRanges();K.addRange(M)};mxCellEditor.prototype.alignText=function(z,K){var M=null!=K&&mxEvent.isShiftDown(K);if(M||null!=window.getSelection&&null!=window.getSelection().containsNode){var T=!0;this.graph.processElements(this.textarea,function(V){M||window.getSelection().containsNode(V,!0)?(V.removeAttribute("align"),V.style.textAlign=null):T=!1});T&&this.graph.cellEditor.setAlign(z)}document.execCommand("justify"+
-z.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var z=window.getSelection();if(z.getRangeAt&&z.rangeCount){for(var K=[],M=0,T=z.rangeCount;M<T;++M)K.push(z.getRangeAt(M));return K}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(z){try{if(z)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var K=0,M=z.length;K<
-M;++K)sel.addRange(z[K])}else document.selection&&z.select&&z.select()}catch(T){}};var C=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(z){null!=z.text&&(z.text.replaceLinefeeds="0"!=mxUtils.getValue(z.style,"nl2Br","1"));C.apply(this,arguments)};var I=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(z,K){this.isKeepFocusEvent(z)||!mxEvent.isAltDown(z.getEvent())?I.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=
-function(z){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var G=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(z,K){z=this.graph.getStartEditingCell(z,K);G.apply(this,arguments);var M=this.graph.view.getState(z);this.textarea.className=null!=M&&1==M.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(z);
-M=this.graph.getModel().getParent(z);var T=this.graph.getCellGeometry(z);if(this.graph.getModel().isEdge(M)&&null!=T&&T.relative||this.graph.getModel().isEdge(z))this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var Y=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(z){function K(V,ia){ia.originalNode=V;V=V.firstChild;for(var na=ia.firstChild;null!=V&&null!=na;)K(V,na),V=V.nextSibling,na=na.nextSibling;
-return ia}function M(V,ia){if(null!=V)if(ia.originalNode!=V)T(V);else for(V=V.firstChild,ia=ia.firstChild;null!=V;){var na=V.nextSibling;null==ia?T(V):(M(V,ia),ia=ia.nextSibling);V=na}}function T(V){for(var ia=V.firstChild;null!=ia;){var na=ia.nextSibling;T(ia);ia=na}1==V.nodeType&&("BR"===V.nodeName||null!=V.firstChild)||3==V.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(V)).length?(3==V.nodeType&&mxUtils.setTextContent(V,mxUtils.getTextContent(V).replace(/\n|\r/g,"")),1==V.nodeType&&(V.removeAttribute("style"),
-V.removeAttribute("class"),V.removeAttribute("width"),V.removeAttribute("cellpadding"),V.removeAttribute("cellspacing"),V.removeAttribute("border"))):V.parentNode.removeChild(V)}Y.apply(this,arguments);7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(V){var ia=K(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||
-0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?M(this.textarea,ia):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var z=this.graph.view.getState(this.editingCell);if(null!=z){var K=null!=z&&"0"!=mxUtils.getValue(z.style,"nl2Br","1"),M=this.saveSelection();if(this.codeViewMode){va=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<va.length&&"\n"==va.charAt(va.length-1)&&(va=va.substring(0,va.length-1));va=this.graph.sanitizeHtml(K?
-va.replace(/\n/g,"<br/>"):va,!0);this.textarea.className="mxCellEditor geContentEditable";pa=mxUtils.getValue(z.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);K=mxUtils.getValue(z.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var T=mxUtils.getValue(z.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),V=(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,ia=(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,
-0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,na=[];(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&na.push("underline");(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&na.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(pa*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=
-Math.round(pa)+"px";this.textarea.style.textDecoration=na.join(" ");this.textarea.style.fontWeight=V?"bold":"normal";this.textarea.style.fontStyle=ia?"italic":"";this.textarea.style.fontFamily=K;this.textarea.style.textAlign=T;this.textarea.style.padding="0px";this.textarea.innerHTML!=va&&(this.textarea.innerHTML=va,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&
-this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerText="");var va=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(va=mxUtils.replaceTrailingNewlines(va,"<div><br></div>"));va=this.graph.sanitizeHtml(K?va.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):va,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var pa=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(pa*
-mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(pa)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=va&&(this.textarea.innerHTML=va);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&
-this.restoreSelection(this.switchSelectionState);this.switchSelectionState=M;this.resize()}};var ba=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(z,K){if(null!=this.textarea)if(z=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=z){var M=z.view.scale;this.bounds=mxRectangle.fromRectangle(z);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*M;this.bounds.height=60*M;var T=null!=z.text?z.text.margin:null;null==T&&(T=mxUtils.getAlignmentAsPoint(mxUtils.getValue(z.style,
-mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(z.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=T.x*this.bounds.width;this.bounds.y+=T.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/M)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/M)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/M)+(this.textarea.offsetHeight-
-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*M);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/M)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*M);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+M+","+
-M+")")}else this.textarea.style.height="",this.textarea.style.overflow="",ba.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(z,K){if("0"==mxUtils.getValue(z.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var M=this.graph.getEditingValue(z.cell,K);"1"==mxUtils.getValue(z.style,"nl2Br","1")&&(M=M.replace(/\n/g,"<br/>"));return M=this.graph.sanitizeHtml(M,!0)};mxCellEditorGetCurrentValue=
-mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(z){if("0"==mxUtils.getValue(z.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var K=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return K="1"==mxUtils.getValue(z.style,"nl2Br","1")?K.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):K.replace(/\r\n/g,"").replace(/\n/g,"")};var Z=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(z){this.codeViewMode&&this.toggleViewMode();
-Z.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(z){}};var X=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(z,K){this.graph.getModel().beginUpdate();try{X.apply(this,arguments),""==K&&this.graph.isCellDeletable(z.cell)&&0==this.graph.model.getChildCount(z.cell)&&this.graph.isTransparentState(z)&&this.graph.removeCells([z.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=
-function(z){var K=mxUtils.getValue(z.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=K&&K!=mxConstants.NONE||!(null!=z.cell.geometry&&0<z.cell.geometry.width)||0==mxUtils.getValue(z.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(z.style,mxConstants.STYLE_HORIZONTAL,1)||(K=mxUtils.getValue(z.style,mxConstants.STYLE_FILLCOLOR,null));K==mxConstants.NONE&&(K=null);return K};mxCellEditor.prototype.getBorderColor=function(z){var K=mxUtils.getValue(z.style,mxConstants.STYLE_LABEL_BORDERCOLOR,
-null);null!=K&&K!=mxConstants.NONE||!(null!=z.cell.geometry&&0<z.cell.geometry.width)||0==mxUtils.getValue(z.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(z.style,mxConstants.STYLE_HORIZONTAL,1)||(K=mxUtils.getValue(z.style,mxConstants.STYLE_STROKECOLOR,null));K==mxConstants.NONE&&(K=null);return K};mxCellEditor.prototype.getMinimumSize=function(z){var K=this.graph.getView().scale;return new mxRectangle(0,0,null==z.text?30:z.text.size*K+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;
-mxGraphHandler.prototype.isValidDropTarget=function(z,K){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(K.getEvent)};mxGraphView.prototype.formatUnitText=function(z){return z?e(z,this.unit):z};mxGraphHandler.prototype.updateHint=function(z){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var K=this.graph.view.translate,M=this.graph.view.scale;z=this.roundLength((this.bounds.x+
-this.currentDx)/M-K.x);K=this.roundLength((this.bounds.y+this.currentDy)/M-K.y);M=this.graph.view.unit;this.hint.innerHTML=e(z,M)+", "+e(K,M);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var qa=mxStackLayout.prototype.resizeCell;
-mxStackLayout.prototype.resizeCell=function(z,K){qa.apply(this,arguments);var M=this.graph.getCellStyle(z);if(null==M.childLayout){var T=this.graph.model.getParent(z),V=null!=T?this.graph.getCellGeometry(T):null;if(null!=V&&(M=this.graph.getCellStyle(T),"stackLayout"==M.childLayout)){var ia=parseFloat(mxUtils.getValue(M,"stackBorder",mxStackLayout.prototype.border));M="1"==mxUtils.getValue(M,"horizontalStack","1");var na=this.graph.getActualStartSize(T);V=V.clone();M?V.height=K.height+na.y+na.height+
-2*ia:V.width=K.width+na.x+na.width+2*ia;this.graph.model.setGeometry(T,V)}}};var Q=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function z(va){M.get(va)||(M.put(va,!0),V.push(va))}for(var K=Q.apply(this,arguments),M=new mxDictionary,T=this.graph.model,V=[],ia=0;ia<K.length;ia++){var na=K[ia];this.graph.isTableCell(na)?z(T.getParent(T.getParent(na))):this.graph.isTableRow(na)&&z(T.getParent(na));z(na)}return V};var W=
-mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(z){var K=W.apply(this,arguments);K.stroke="#C0C0C0";K.strokewidth=1;return K};var ha=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(z){var K=ha.apply(this,arguments);K.stroke="#C0C0C0";K.strokewidth=1;return K};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var z=
-this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+z.x/2,this.bounds.y+this.rotationHandleVSpacing-z.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(z,K){return this.graph.isRecursiveVertexResize(z)&&!mxEvent.isAltDown(K.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(z,K){return mxEvent.isControlDown(K.getEvent())||mxEvent.isMetaDown(K.getEvent())};var la=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=
-function(){return la.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 ja=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return ja.apply(this,
-arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var U=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(z){return z.tableHandle||U.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var z=0;this.graph.isTableRow(this.state.cell)?z=1:this.graph.isTableCell(this.state.cell)&&(z=2);return z};
-var L=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return L.apply(this,arguments).grow(-this.getSelectionBorderInset())};var da=null,O=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==da&&(da=mxCellRenderer.defaultShapes.tableLine);var z=O.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var K=function(Sa,Fa,wa){for(var ya=[],Na=0;Na<Sa.length;Na++){var Ja=Sa[Na];
-ya.push(null==Ja?null:new mxPoint((pa+Ja.x+Fa)*ia,(za+Ja.y+wa)*ia))}return ya},M=this,T=this.graph,V=T.model,ia=T.view.scale,na=this.state,va=this.selectionBorder,pa=this.state.origin.x+T.view.translate.x,za=this.state.origin.y+T.view.translate.y;null==z&&(z=[]);var Da=T.view.getCellStates(V.getChildCells(this.state.cell,!0));if(0<Da.length){var Ma=V.getChildCells(Da[0].cell,!0),La=T.getTableLines(this.state.cell,!1,!0),Ua=T.getTableLines(this.state.cell,!0,!1);for(V=0;V<Da.length;V++)mxUtils.bind(this,
-function(Sa){var Fa=Da[Sa],wa=Sa<Da.length-1?Da[Sa+1]:null;wa=null!=wa?T.getCellGeometry(wa.cell):null;var ya=null!=wa&&null!=wa.alternateBounds?wa.alternateBounds:wa;wa=null!=Ua[Sa]?new da(Ua[Sa],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);wa.isDashed=va.isDashed;wa.svgStrokeTolerance++;Fa=new mxHandle(Fa,"row-resize",null,wa);Fa.tableHandle=!0;var Na=0;Fa.shape.node.parentNode.insertBefore(Fa.shape.node,Fa.shape.node.parentNode.firstChild);Fa.redraw=function(){if(null!=
-this.shape){this.shape.stroke=0==Na?mxConstants.NONE:va.stroke;if(this.shape.constructor==da)this.shape.line=K(Ua[Sa],0,Na),this.shape.updateBoundsFromLine();else{var Qa=T.getActualStartSize(na.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+Na*ia;this.shape.bounds.x=na.x+(Sa==Da.length-1?0:Qa.x*ia);this.shape.bounds.width=na.width-(Sa==Da.length-1?0:Qa.width+Qa.x+ia)}this.shape.redraw()}};var Ja=!1;Fa.setPosition=function(Qa,Za,cb){Na=Math.max(Graph.minTableRowHeight-
-Qa.height,Za.y-Qa.y-Qa.height);Ja=mxEvent.isShiftDown(cb.getEvent());null!=ya&&Ja&&(Na=Math.min(Na,ya.height-Graph.minTableRowHeight))};Fa.execute=function(Qa){if(0!=Na)T.setTableRowHeight(this.state.cell,Na,!Ja);else if(!M.blockDelayedSelection){var Za=T.getCellAt(Qa.getGraphX(),Qa.getGraphY())||na.cell;T.graphHandler.selectCellForEvent(Za,Qa)}Na=0};Fa.reset=function(){Na=0};z.push(Fa)})(V);for(V=0;V<Ma.length;V++)mxUtils.bind(this,function(Sa){var Fa=T.view.getState(Ma[Sa]),wa=T.getCellGeometry(Ma[Sa]),
-ya=null!=wa.alternateBounds?wa.alternateBounds:wa;null==Fa&&(Fa=new mxCellState(T.view,Ma[Sa],T.getCellStyle(Ma[Sa])),Fa.x=na.x+wa.x*ia,Fa.y=na.y+wa.y*ia,Fa.width=ya.width*ia,Fa.height=ya.height*ia,Fa.updateCachedBounds());wa=Sa<Ma.length-1?Ma[Sa+1]:null;wa=null!=wa?T.getCellGeometry(wa):null;var Na=null!=wa&&null!=wa.alternateBounds?wa.alternateBounds:wa;wa=null!=La[Sa]?new da(La[Sa],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);wa.isDashed=va.isDashed;wa.svgStrokeTolerance++;
-Fa=new mxHandle(Fa,"col-resize",null,wa);Fa.tableHandle=!0;var Ja=0;Fa.shape.node.parentNode.insertBefore(Fa.shape.node,Fa.shape.node.parentNode.firstChild);Fa.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Ja?mxConstants.NONE:va.stroke;if(this.shape.constructor==da)this.shape.line=K(La[Sa],Ja,0),this.shape.updateBoundsFromLine();else{var Za=T.getActualStartSize(na.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(ya.width+Ja)*ia;this.shape.bounds.y=na.y+(Sa==Ma.length-
-1?0:Za.y*ia);this.shape.bounds.height=na.height-(Sa==Ma.length-1?0:(Za.height+Za.y)*ia)}this.shape.redraw()}};var Qa=!1;Fa.setPosition=function(Za,cb,fb){Ja=Math.max(Graph.minTableColumnWidth-ya.width,cb.x-Za.x-ya.width);Qa=mxEvent.isShiftDown(fb.getEvent());null==Na||Qa||(Ja=Math.min(Ja,Na.width-Graph.minTableColumnWidth))};Fa.execute=function(Za){if(0!=Ja)T.setTableColumnWidth(this.state.cell,Ja,Qa);else if(!M.blockDelayedSelection){var cb=T.getCellAt(Za.getGraphX(),Za.getGraphY())||na.cell;T.graphHandler.selectCellForEvent(cb,
-Za)}Ja=0};Fa.positionChanged=function(){};Fa.reset=function(){Ja=0};z.push(Fa)})(V)}}return null!=z?z.reverse():null};var N=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(z){N.apply(this,arguments);if(null!=this.moveHandles)for(var K=0;K<this.moveHandles.length;K++)this.moveHandles[K].style.visibility=z?"":"hidden";if(null!=this.cornerHandles)for(K=0;K<this.cornerHandles.length;K++)this.cornerHandles[K].node.style.visibility=z?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=
-function(){var z=this.graph.model;if(null!=this.moveHandles){for(var K=0;K<this.moveHandles.length;K++)this.moveHandles[K].parentNode.removeChild(this.moveHandles[K]);this.moveHandles=null}this.moveHandles=[];for(K=0;K<z.getChildCount(this.state.cell);K++)mxUtils.bind(this,function(M){if(null!=M&&z.isVertex(M.cell)){var T=mxUtils.createImage(Editor.rowMoveImage);T.style.position="absolute";T.style.cursor="pointer";T.style.width="7px";T.style.height="4px";T.style.padding="4px 2px 4px 2px";T.rowState=
-M;mxEvent.addGestureListeners(T,mxUtils.bind(this,function(V){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(V)&&this.graph.isCellSelected(M.cell)||this.graph.selectCellForEvent(M.cell,V);mxEvent.isPopupTrigger(V)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(V),mxEvent.getClientY(V),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(V),this.graph.isMouseDown=!0);
-mxEvent.consume(V)}),null,mxUtils.bind(this,function(V){mxEvent.isPopupTrigger(V)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(V),mxEvent.getClientY(V),M.cell,V),mxEvent.consume(V))}));this.moveHandles.push(T);this.graph.container.appendChild(T)}})(this.graph.view.getState(z.getChildAt(this.state.cell,K)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var z=0;z<this.customHandles.length;z++)this.customHandles[z].destroy();this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&
-this.refreshMoveHandles()};var aa=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var z=new mxPoint(0,0),K=this.tolerance,M=this.state.style.shape;null==mxCellRenderer.defaultShapes[M]&&mxStencilRegistry.getStencil(M);M=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!M&&null!=this.customHandles)for(var T=0;T<this.customHandles.length;T++)if(null!=this.customHandles[T].shape&&null!=this.customHandles[T].shape.bounds){var V=
-this.customHandles[T].shape.bounds,ia=V.getCenterX(),na=V.getCenterY();if(Math.abs(this.state.x-ia)<V.width/2||Math.abs(this.state.y-na)<V.height/2||Math.abs(this.state.x+this.state.width-ia)<V.width/2||Math.abs(this.state.y+this.state.height-na)<V.height/2){M=!0;break}}M&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(K/=2,this.graph.isTable(this.state.cell)&&(K+=7),z.x=this.sizers[0].bounds.width+K,z.y=this.sizers[0].bounds.height+K):z=aa.apply(this,arguments);return z};mxVertexHandler.prototype.updateHint=
+Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var z=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=z&&(new mxCodec(z.ownerDocument)).decode(z,this.getStylesheet())};Graph.prototype.createCellLookup=function(z,K){K=null!=K?K:{};for(var L=0;L<z.length;L++){var S=z[L];K[mxObjectIdentity.get(S)]=S.getId();for(var V=this.model.getChildCount(S),
+ja=0;ja<V;ja++)this.createCellLookup([this.model.getChildAt(S,ja)],K)}return K};Graph.prototype.createCellMapping=function(z,K,L){L=null!=L?L:{};for(var S in z){var V=K[S];null==L[V]&&(L[V]=z[S].getId()||"")}return L};Graph.prototype.importGraphModel=function(z,K,L,S){K=null!=K?K:0;L=null!=L?L:0;var V=new mxCodec(z.ownerDocument),ja=new mxGraphModel;V.decode(z,ja);z=[];V={};var na={},ya=ja.getChildren(this.cloneCell(ja.root,this.isCloneInvalidEdges(),V));if(null!=ya){var ra=this.createCellLookup([ja.root]);
+ya=ya.slice();this.model.beginUpdate();try{if(1!=ya.length||this.isCellLocked(this.getDefaultParent()))for(ja=0;ja<ya.length;ja++)ta=this.model.getChildren(this.moveCells([ya[ja]],K,L,!1,this.model.getRoot())[0]),null!=ta&&(z=z.concat(ta));else{var ta=ja.getChildren(ya[0]);null!=ta&&(z=this.moveCells(ta,K,L,!1,this.getDefaultParent()),na[ja.getChildAt(ja.root,0).getId()]=this.getDefaultParent().getId())}if(null!=z&&(this.createCellMapping(V,ra,na),this.updateCustomLinks(na,z),S)){this.isGridEnabled()&&
+(K=this.snap(K),L=this.snap(L));var Da=this.getBoundingBoxFromGeometry(z,!0);null!=Da&&this.moveCells(z,K-Da.x,L-Da.y)}}finally{this.model.endUpdate()}}return z};Graph.prototype.encodeCells=function(z){for(var K={},L=this.cloneCells(z,null,K),S=new mxDictionary,V=0;V<z.length;V++)S.put(z[V],!0);var ja=new mxCodec,na=new mxGraphModel,ya=na.getChildAt(na.getRoot(),0);for(V=0;V<L.length;V++){na.add(ya,L[V]);var ra=this.view.getState(z[V]);if(null!=ra){var ta=this.getCellGeometry(L[V]);null!=ta&&ta.relative&&
+!this.model.isEdge(z[V])&&null==S.get(this.model.getParent(z[V]))&&(ta.offset=null,ta.relative=!1,ta.x=ra.x/ra.view.scale-ra.view.translate.x,ta.y=ra.y/ra.view.scale-ra.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(K,this.createCellLookup(z)),L);return ja.encode(na)};Graph.prototype.isSwimlane=function(z,K){var L=null;null==z||this.model.isEdge(z)||this.model.getParent(z)==this.model.getRoot()||(L=this.getCurrentCellStyle(z,K)[mxConstants.STYLE_SHAPE]);return L==mxConstants.SHAPE_SWIMLANE||
+"table"==L||"tableRow"==L};var d=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(z){var K=this.model.getParent(z);if(null!=K){var L=this.getCurrentCellStyle(K);if(null!=L.expand)return"0"!=L.expand}return d.apply(this,arguments)&&(null==K||!this.isTable(K))};var f=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(z,K,L,S,V,ja,na,ya){null==ya&&(ya=this.model.getParent(z),this.isTable(ya)||this.isTableRow(ya))&&(ya=this.getCellAt(ja,na,null,!0,!1));L=null;this.model.beginUpdate();
+try{L=f.apply(this,[z,K,L,S,V,ja,na,ya]);this.model.setValue(L,"");var ra=this.getChildCells(L,!0);for(K=0;K<ra.length;K++){var ta=this.getCellGeometry(ra[K]);null!=ta&&ta.relative&&0<ta.x&&this.model.remove(ra[K])}var Da=this.getChildCells(z,!0);for(K=0;K<Da.length;K++)ta=this.getCellGeometry(Da[K]),null!=ta&&ta.relative&&0>=ta.x&&this.model.remove(Da[K]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[L]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[L]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
+null,[z]);this.setCellStyles(mxConstants.STYLE_STARTARROW,mxConstants.NONE,[z]);var Oa=this.model.getTerminal(L,!1);if(null!=Oa){var Ma=this.getCurrentCellStyle(Oa);null!=Ma&&"1"==Ma.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[z]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[z]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[L]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[L]))}}finally{this.model.endUpdate()}return L};var g=Graph.prototype.selectCell;Graph.prototype.selectCell=
+function(z,K,L){if(K||L)g.apply(this,arguments);else{var S=this.getSelectionCell(),V=null,ja=[],na=mxUtils.bind(this,function(ya){if(null!=this.view.getState(ya)&&(this.model.isVertex(ya)||this.model.isEdge(ya)))if(ja.push(ya),ya==S)V=ja.length-1;else if(z&&null==S&&0<ja.length||null!=V&&z&&ja.length>V||!z&&0<V)return;for(var ra=0;ra<this.model.getChildCount(ya);ra++)na(this.model.getChildAt(ya,ra))});na(this.model.root);0<ja.length&&(V=null!=V?mxUtils.mod(V+(z?1:-1),ja.length):0,this.setSelectionCell(ja[V]))}};
+Graph.prototype.swapShapes=function(z,K,L,S,V,ja,na){K=!1;if(!S&&null!=V&&1==z.length&&(S=this.view.getState(V),L=this.view.getState(z[0]),null!=S&&null!=L&&(null!=ja&&mxEvent.isShiftDown(ja)||"umlLifeline"==S.style.shape&&"umlLifeline"==L.style.shape)&&(S=this.getCellGeometry(V),ja=this.getCellGeometry(z[0]),null!=S&&null!=ja))){K=S.clone();S=ja.clone();S.x=K.x;S.y=K.y;K.x=ja.x;K.y=ja.y;this.model.beginUpdate();try{this.model.setGeometry(V,K),this.model.setGeometry(z[0],S)}finally{this.model.endUpdate()}K=
+!0}return K};var m=Graph.prototype.moveCells;Graph.prototype.moveCells=function(z,K,L,S,V,ja,na){if(this.swapShapes(z,K,L,S,V,ja,na))return z;na=null!=na?na:{};if(this.isTable(V)){for(var ya=[],ra=0;ra<z.length;ra++)this.isTable(z[ra])?ya=ya.concat(this.model.getChildCells(z[ra],!0).reverse()):ya.push(z[ra]);z=ya}this.model.beginUpdate();try{ya=[];for(ra=0;ra<z.length;ra++)if(null!=V&&this.isTableRow(z[ra])){var ta=this.model.getParent(z[ra]),Da=this.getCellGeometry(z[ra]);this.isTable(ta)&&ya.push(ta);
+if(null!=ta&&null!=Da&&this.isTable(ta)&&this.isTable(V)&&(S||ta!=V)){if(!S){var Oa=this.getCellGeometry(ta);null!=Oa&&(Oa=Oa.clone(),Oa.height-=Da.height,this.model.setGeometry(ta,Oa))}Oa=this.getCellGeometry(V);null!=Oa&&(Oa=Oa.clone(),Oa.height+=Da.height,this.model.setGeometry(V,Oa));var Ma=this.model.getChildCells(V,!0);if(0<Ma.length){z[ra]=S?this.cloneCell(z[ra]):z[ra];var Wa=this.model.getChildCells(z[ra],!0),Sa=this.model.getChildCells(Ma[0],!0),Fa=Sa.length-Wa.length;if(0<Fa)for(var Ja=
+0;Ja<Fa;Ja++){var xa=this.cloneCell(Wa[Wa.length-1]);null!=xa&&(xa.value="",this.model.add(z[ra],xa))}else if(0>Fa)for(Ja=0;Ja>Fa;Ja--)this.model.remove(Wa[Wa.length+Ja-1]);Wa=this.model.getChildCells(z[ra],!0);for(Ja=0;Ja<Sa.length;Ja++){var Ba=this.getCellGeometry(Sa[Ja]),Pa=this.getCellGeometry(Wa[Ja]);null!=Ba&&null!=Pa&&(Pa=Pa.clone(),Pa.width=Ba.width,this.model.setGeometry(Wa[Ja],Pa))}}}}var Ka=m.apply(this,arguments);for(ra=0;ra<ya.length;ra++)!S&&this.model.contains(ya[ra])&&0==this.model.getChildCount(ya[ra])&&
+this.model.remove(ya[ra]);S&&this.updateCustomLinks(this.createCellMapping(na,this.createCellLookup(z)),Ka)}finally{this.model.endUpdate()}return Ka};var q=Graph.prototype.removeCells;Graph.prototype.removeCells=function(z,K){var L=[];this.model.beginUpdate();try{for(var S=0;S<z.length;S++)if(this.isTableCell(z[S])){var V=this.model.getParent(z[S]),ja=this.model.getParent(V);1==this.model.getChildCount(V)&&1==this.model.getChildCount(ja)?0>mxUtils.indexOf(z,ja)&&0>mxUtils.indexOf(L,ja)&&L.push(ja):
+this.labelChanged(z[S],"")}else{if(this.isTableRow(z[S])&&(ja=this.model.getParent(z[S]),0>mxUtils.indexOf(z,ja)&&0>mxUtils.indexOf(L,ja))){for(var na=this.model.getChildCells(ja,!0),ya=0,ra=0;ra<na.length;ra++)0<=mxUtils.indexOf(z,na[ra])&&ya++;ya==na.length&&L.push(ja)}L.push(z[S])}L=q.apply(this,[L,K])}finally{this.model.endUpdate()}return L};Graph.prototype.updateCustomLinks=function(z,K,L){L=null!=L?L:new Graph;for(var S=0;S<K.length;S++)null!=K[S]&&L.updateCustomLinksForCell(z,K[S],L)};Graph.prototype.updateCustomLinksForCell=
+function(z,K){this.doUpdateCustomLinksForCell(z,K);for(var L=this.model.getChildCount(K),S=0;S<L;S++)this.updateCustomLinksForCell(z,this.model.getChildAt(K,S))};Graph.prototype.doUpdateCustomLinksForCell=function(z,K){};Graph.prototype.getAllConnectionConstraints=function(z,K){if(null!=z){K=mxUtils.getValue(z.style,"points",null);if(null!=K){z=[];try{var L=JSON.parse(K);for(K=0;K<L.length;K++){var S=L[K];z.push(new mxConnectionConstraint(new mxPoint(S[0],S[1]),2<S.length?"0"!=S[2]:!0,null,3<S.length?
+S[3]:0,4<S.length?S[4]:0))}}catch(ja){}return z}if(null!=z.shape&&null!=z.shape.bounds){S=z.shape.direction;K=z.shape.bounds;var V=z.shape.scale;L=K.width/V;K=K.height/V;if(S==mxConstants.DIRECTION_NORTH||S==mxConstants.DIRECTION_SOUTH)S=L,L=K,K=S;K=z.shape.getConstraints(z.style,L,K);if(null!=K)return K;if(null!=z.shape.stencil&&null!=z.shape.stencil.constraints)return z.shape.stencil.constraints;if(null!=z.shape.constraints)return z.shape.constraints}}return null};Graph.prototype.flipEdge=function(z){if(null!=
+z){var K=this.getCurrentCellStyle(z);K=mxUtils.getValue(K,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,K,[z])}};Graph.prototype.isValidRoot=function(z){for(var K=this.model.getChildCount(z),L=0,S=0;S<K;S++){var V=this.model.getChildAt(z,S);this.model.isVertex(V)&&(V=this.getCellGeometry(V),null==V||V.relative||L++)}return 0<L||this.isContainer(z)};Graph.prototype.isValidDropTarget=
+function(z,K,L){for(var S=this.getCurrentCellStyle(z),V=!0,ja=!0,na=0;na<K.length&&ja;na++)V=V&&this.isTable(K[na]),ja=ja&&this.isTableRow(K[na]);return(1==K.length&&null!=L&&mxEvent.isShiftDown(L)&&!mxEvent.isControlDown(L)&&!mxEvent.isAltDown(L)||("1"!=mxUtils.getValue(S,"part","0")||this.isContainer(z))&&"0"!=mxUtils.getValue(S,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(z))&&!this.isTableRow(z)&&(!this.isTable(z)||ja||V))&&!this.isCellLocked(z)};
+Graph.prototype.createGroupCell=function(){var z=mxGraph.prototype.createGroupCell.apply(this,arguments);z.setStyle("group");return z};Graph.prototype.isExtendParentsOnAdd=function(z){var K=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(K&&null!=z&&null!=this.layoutManager){var L=this.model.getParent(z);null!=L&&(L=this.layoutManager.getLayout(L),null!=L&&L.constructor==mxStackLayout&&(K=!1))}return K};Graph.prototype.getPreferredSizeForCell=function(z){var K=mxGraph.prototype.getPreferredSizeForCell.apply(this,
+arguments);null!=K&&(K.width+=10,K.height+=4,this.gridEnabled&&(K.width=this.snap(K.width),K.height=this.snap(K.height)));return K};Graph.prototype.turnShapes=function(z,K){var L=this.getModel(),S=[];L.beginUpdate();try{for(var V=0;V<z.length;V++){var ja=z[V];if(L.isEdge(ja)){var na=L.getTerminal(ja,!0),ya=L.getTerminal(ja,!1);L.setTerminal(ja,ya,!0);L.setTerminal(ja,na,!1);var ra=L.getGeometry(ja);if(null!=ra){ra=ra.clone();null!=ra.points&&ra.points.reverse();var ta=ra.getTerminalPoint(!0),Da=ra.getTerminalPoint(!1);
+ra.setTerminalPoint(ta,!1);ra.setTerminalPoint(Da,!0);L.setGeometry(ja,ra);var Oa=this.view.getState(ja),Ma=this.view.getState(na),Wa=this.view.getState(ya);if(null!=Oa){var Sa=null!=Ma?this.getConnectionConstraint(Oa,Ma,!0):null,Fa=null!=Wa?this.getConnectionConstraint(Oa,Wa,!1):null;this.setConnectionConstraint(ja,na,!0,Fa);this.setConnectionConstraint(ja,ya,!1,Sa);var Ja=mxUtils.getValue(Oa.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
+mxUtils.getValue(Oa.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[ja]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,Ja,[ja])}S.push(ja)}}else if(L.isVertex(ja)&&(ra=this.getCellGeometry(ja),null!=ra)){if(!(this.isTable(ja)||this.isTableRow(ja)||this.isTableCell(ja)||this.isSwimlane(ja))){ra=ra.clone();ra.x+=ra.width/2-ra.height/2;ra.y+=ra.height/2-ra.width/2;var xa=ra.width;ra.width=ra.height;ra.height=xa;L.setGeometry(ja,ra)}var Ba=this.view.getState(ja);if(null!=Ba){var Pa=
+[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],Ka=mxUtils.getValue(Ba.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,Pa[mxUtils.mod(mxUtils.indexOf(Pa,Ka)+(K?-1:1),Pa.length)],[ja])}S.push(ja)}}}finally{L.endUpdate()}return S};Graph.prototype.stencilHasPlaceholders=function(z){if(null!=z&&null!=z.fgNode)for(z=z.fgNode.firstChild;null!=z;){if("text"==z.nodeName&&"1"==z.getAttribute("placeholders"))return!0;
+z=z.nextSibling}return!1};var y=Graph.prototype.processChange;Graph.prototype.processChange=function(z){if(z instanceof mxGeometryChange&&(this.isTableCell(z.cell)||this.isTableRow(z.cell))&&(null==z.previous&&null!=z.geometry||null!=z.previous&&!z.previous.equals(z.geometry))){var K=z.cell;this.isTableCell(K)&&(K=this.model.getParent(K));this.isTableRow(K)&&(K=this.model.getParent(K));var L=this.view.getState(K);null!=L&&null!=L.shape&&(this.view.invalidate(K),L.shape.bounds=null)}y.apply(this,arguments);
+z instanceof mxValueChange&&null!=z.cell&&null!=z.cell.value&&"object"==typeof z.cell.value&&this.invalidateDescendantsWithPlaceholders(z.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(z){z=this.model.getDescendants(z);if(0<z.length)for(var K=0;K<z.length;K++){var L=this.view.getState(z[K]);null!=L&&null!=L.shape&&null!=L.shape.stencil&&this.stencilHasPlaceholders(L.shape.stencil)?this.removeStateForCell(z[K]):this.isReplacePlaceholders(z[K])&&this.view.invalidate(z[K],!1,!1)}};
+Graph.prototype.replaceElement=function(z,K){K=z.ownerDocument.createElement(null!=K?K:"span");for(var L=Array.prototype.slice.call(z.attributes);attr=L.pop();)K.setAttribute(attr.nodeName,attr.nodeValue);K.innerHTML=z.innerHTML;z.parentNode.replaceChild(K,z)};Graph.prototype.processElements=function(z,K){if(null!=z){z=z.getElementsByTagName("*");for(var L=0;L<z.length;L++)K(z[L])}};Graph.prototype.updateLabelElements=function(z,K,L){z=null!=z?z:this.getSelectionCells();for(var S=document.createElement("div"),
+V=0;V<z.length;V++)if(this.isHtmlLabel(z[V])){var ja=this.convertValueToString(z[V]);if(null!=ja&&0<ja.length){S.innerHTML=ja;for(var na=S.getElementsByTagName(null!=L?L:"*"),ya=0;ya<na.length;ya++)K(na[ya]);S.innerHTML!=ja&&this.cellLabelChanged(z[V],S.innerHTML)}}};Graph.prototype.cellLabelChanged=function(z,K,L){K=Graph.zapGremlins(K);this.model.beginUpdate();try{if(null!=z.value&&"object"==typeof z.value){if(this.isReplacePlaceholders(z)&&null!=z.getAttribute("placeholder"))for(var S=z.getAttribute("placeholder"),
+V=z;null!=V;){if(V==this.model.getRoot()||null!=V.value&&"object"==typeof V.value&&V.hasAttribute(S)){this.setAttributeForCell(V,S,K);break}V=this.model.getParent(V)}var ja=z.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&ja.hasAttribute("label_"+Graph.diagramLanguage)?ja.setAttribute("label_"+Graph.diagramLanguage,K):ja.setAttribute("label",K);K=ja}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(z){if(null!=
+z){for(var K=new mxDictionary,L=0;L<z.length;L++)K.put(z[L],!0);var S=[];for(L=0;L<z.length;L++){var V=this.model.getParent(z[L]);null==V||K.get(V)||(K.put(V,!0),S.push(V))}for(L=0;L<S.length;L++)if(V=this.view.getState(S[L]),null!=V&&(this.model.isEdge(V.cell)||this.model.isVertex(V.cell))&&this.isCellDeletable(V.cell)&&this.isTransparentState(V)){for(var ja=!0,na=0;na<this.model.getChildCount(V.cell)&&ja;na++)K.get(this.model.getChildAt(V.cell,na))||(ja=!1);ja&&z.push(V.cell)}}mxGraph.prototype.cellsRemoved.apply(this,
+arguments)};Graph.prototype.removeCellsAfterUngroup=function(z){for(var K=[],L=0;L<z.length;L++)this.isCellDeletable(z[L])&&this.isTransparentState(this.view.getState(z[L]))&&K.push(z[L]);z=K;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(z,K){this.setAttributeForCell(z,"link",K)};Graph.prototype.setTooltipForCell=function(z,K){var L="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(z.value)&&z.value.hasAttribute("tooltip_"+
+Graph.diagramLanguage)&&(L="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(z,L,K)};Graph.prototype.getAttributeForCell=function(z,K,L){z=null!=z.value&&"object"===typeof z.value?z.value.getAttribute(K):null;return null!=z?z:L};Graph.prototype.setAttributeForCell=function(z,K,L){if(null!=z.value&&"object"==typeof z.value)var S=z.value.cloneNode(!0);else S=mxUtils.createXmlDocument().createElement("UserObject"),S.setAttribute("label",z.value||"");null!=L?S.setAttribute(K,L):S.removeAttribute(K);
+this.model.setValue(z,S)};var F=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(z,K,L,S){this.getModel();if(mxEvent.isAltDown(K))return null;for(var V=0;V<z.length;V++){var ja=this.model.getParent(z[V]);if(this.model.isEdge(ja)&&0>mxUtils.indexOf(z,ja))return null}ja=F.apply(this,arguments);var na=!0;for(V=0;V<z.length&&na;V++)na=na&&this.isTableRow(z[V]);na&&(this.isTableCell(ja)&&(ja=this.model.getParent(ja)),this.isTableRow(ja)&&(ja=this.model.getParent(ja)),this.isTable(ja)||
+(ja=null));return ja};Graph.prototype.click=function(z){mxGraph.prototype.click.call(this,z);this.firstClickState=z.getState();this.firstClickSource=z.getSource()};Graph.prototype.dblClick=function(z,K){this.isEnabled()&&(K=this.insertTextForEvent(z,K),mxGraph.prototype.dblClick.call(this,z,K))};Graph.prototype.insertTextForEvent=function(z,K){var L=mxUtils.convertPoint(this.container,mxEvent.getClientX(z),mxEvent.getClientY(z));if(null!=z&&!this.model.isVertex(K)){var S=this.model.isEdge(K)?this.view.getState(K):
+null,V=mxEvent.getSource(z);this.firstClickState!=S||this.firstClickSource!=V||null!=S&&null!=S.text&&null!=S.text.node&&null!=S.text.boundingBox&&(mxUtils.contains(S.text.boundingBox,L.x,L.y)||mxUtils.isAncestorNode(S.text.node,mxEvent.getSource(z)))||(null!=S||this.isCellLocked(this.getDefaultParent()))&&(null==S||this.isCellLocked(S.cell))||!(null!=S||mxClient.IS_SVG&&V==this.view.getCanvas().ownerSVGElement)||(null==S&&(S=this.view.getState(this.getCellAt(L.x,L.y))),K=this.addText(L.x,L.y,S))}return K};
+Graph.prototype.getInsertPoint=function(){var z=this.getGridSize(),K=this.container.scrollLeft/this.view.scale-this.view.translate.x,L=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var S=this.getPageLayout(),V=this.getPageSize();K=Math.max(K,S.x*V.width);L=Math.max(L,S.y*V.height)}return new mxPoint(this.snap(K+z),this.snap(L+z))};Graph.prototype.getFreeInsertPoint=function(){var z=this.view,K=this.getGraphBounds(),L=this.getInsertPoint(),S=this.snap(Math.round(Math.max(L.x,
+K.x/z.scale-z.translate.x+(0==K.width?2*this.gridSize:0))));z=this.snap(Math.round(Math.max(L.y,(K.y+K.height)/z.scale-z.translate.y+2*this.gridSize)));return new mxPoint(S,z)};Graph.prototype.getCenterInsertPoint=function(z){z=null!=z?z:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap(Math.round((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-z.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/
+2)/this.view.scale-this.view.translate.y-z.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-z.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-z.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(z,K,L){var S=new mxCell;S.value="Text";S.geometry=new mxGeometry(0,0,0,0);S.vertex=!0;if(null!=L&&this.model.isEdge(L.cell)){S.style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];";
+S.geometry.relative=!0;S.connectable=!1;var V=this.view.getRelativePoint(L,z,K);S.geometry.x=Math.round(1E4*V.x)/1E4;S.geometry.y=Math.round(V.y);S.geometry.offset=new mxPoint(0,0);V=this.view.getPoint(L,S.geometry);var ja=this.view.scale;S.geometry.offset=new mxPoint(Math.round((z-V.x)/ja),Math.round((K-V.y)/ja))}else V=this.view.translate,S.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",S.geometry.width=40,S.geometry.height=20,S.geometry.x=Math.round(z/this.view.scale)-
+V.x-(null!=L?L.origin.x:0),S.geometry.y=Math.round(K/this.view.scale)-V.y-(null!=L?L.origin.y:0),S.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([S],null!=L?L.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[S])),this.autoSizeCell(S)}finally{this.getModel().endUpdate()}return S};Graph.prototype.addClickHandler=function(z,K,L){var S=mxUtils.bind(this,function(){var ra=this.container.getElementsByTagName("a");if(null!=ra)for(var ta=0;ta<ra.length;ta++){var Da=
+this.getAbsoluteUrl(ra[ta].getAttribute("href"));null!=Da&&(ra[ta].setAttribute("rel",this.linkRelation),ra[ta].setAttribute("href",Da),null!=K&&mxEvent.addGestureListeners(ra[ta],null,null,K))}});this.model.addListener(mxEvent.CHANGE,S);S();var V=this.container.style.cursor,ja=this.getTolerance(),na=this,ya={currentState:null,currentLink:null,currentTarget:null,highlight:null!=z&&""!=z&&z!=mxConstants.NONE?new mxCellHighlight(na,z,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(ra){var ta=
+ra.sourceState;if(null==ta||null==na.getLinkForCell(ta.cell))ra=na.getCellAt(ra.getGraphX(),ra.getGraphY(),null,null,null,function(Da,Oa,Ma){return null==na.getLinkForCell(Da.cell)}),ta=null==ta||na.model.isAncestor(ra,ta.cell)?na.view.getState(ra):null;ta!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=ta,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(ra,ta){this.startX=ta.getGraphX();this.startY=ta.getGraphY();this.scrollLeft=na.container.scrollLeft;
+this.scrollTop=na.container.scrollTop;null==this.currentLink&&"auto"==na.container.style.overflow&&(na.container.style.cursor="move");this.updateCurrentState(ta)},mouseMove:function(ra,ta){if(na.isMouseDown)null!=this.currentLink&&(ra=Math.abs(this.startX-ta.getGraphX()),ta=Math.abs(this.startY-ta.getGraphY()),(ra>ja||ta>ja)&&this.clear());else{for(ra=ta.getSource();null!=ra&&"a"!=ra.nodeName.toLowerCase();)ra=ra.parentNode;null!=ra?this.clear():(null!=na.tooltipHandler&&null!=this.currentLink&&null!=
+this.currentState&&na.tooltipHandler.reset(ta,!0,this.currentState),(null==this.currentState||ta.getState()!=this.currentState&&null!=ta.sourceState||!na.intersects(this.currentState,ta.getGraphX(),ta.getGraphY()))&&this.updateCurrentState(ta))}},mouseUp:function(ra,ta){var Da=ta.getSource();for(ra=ta.getEvent();null!=Da&&"a"!=Da.nodeName.toLowerCase();)Da=Da.parentNode;null==Da&&Math.abs(this.scrollLeft-na.container.scrollLeft)<ja&&Math.abs(this.scrollTop-na.container.scrollTop)<ja&&(null==ta.sourceState||
+!ta.isSource(ta.sourceState.control))&&((mxEvent.isLeftMouseButton(ra)||mxEvent.isMiddleMouseButton(ra))&&!mxEvent.isPopupTrigger(ra)||mxEvent.isTouchEvent(ra))&&(null!=this.currentLink?(Da=na.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&Da||null==K||K(ra,this.currentLink),mxEvent.isConsumed(ra)||(ra=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(ra)?"_blank":Da?na.linkTarget:"_top",na.openLink(this.currentLink,ra),ta.consume())):null!=L&&!ta.isConsumed()&&
+Math.abs(this.scrollLeft-na.container.scrollLeft)<ja&&Math.abs(this.scrollTop-na.container.scrollTop)<ja&&Math.abs(this.startX-ta.getGraphX())<ja&&Math.abs(this.startY-ta.getGraphY())<ja&&L(ta.getEvent()));this.clear()},activate:function(ra){this.currentLink=na.getAbsoluteUrl(na.getLinkForCell(ra.cell));null!=this.currentLink&&(this.currentTarget=na.getLinkTargetForCell(ra.cell),na.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(ra))},clear:function(){null!=na.container&&
+(na.container.style.cursor=V);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=na.tooltipHandler&&na.tooltipHandler.hide()}};na.click=function(ra){};na.addMouseListener(ya);mxEvent.addListener(document,"mouseleave",function(ra){ya.clear()})};Graph.prototype.duplicateCells=function(z,K){z=null!=z?z:this.getSelectionCells();K=null!=K?K:!0;for(var L=0;L<z.length;L++)this.isTableCell(z[L])&&(z[L]=this.model.getParent(z[L]));z=this.model.getTopmostCells(z);
+var S=this.getModel(),V=this.gridSize,ja=[];S.beginUpdate();try{var na={},ya=this.createCellLookup(z),ra=this.cloneCells(z,!1,na,!0);for(L=0;L<z.length;L++){var ta=S.getParent(z[L]);if(null!=ta){var Da=this.moveCells([ra[L]],V,V,!1)[0];ja.push(Da);if(K)S.add(ta,ra[L]);else{var Oa=ta.getIndex(z[L]);S.add(ta,ra[L],Oa+1)}if(this.isTable(ta)){var Ma=this.getCellGeometry(ra[L]),Wa=this.getCellGeometry(ta);null!=Ma&&null!=Wa&&(Wa=Wa.clone(),Wa.height+=Ma.height,S.setGeometry(ta,Wa))}}else ja.push(ra[L])}this.updateCustomLinks(this.createCellMapping(na,
+ya),ra,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",ra))}finally{S.endUpdate()}return ja};Graph.prototype.insertImage=function(z,K,L){if(null!=z&&null!=this.cellEditor.textarea){for(var S=this.cellEditor.textarea.getElementsByTagName("img"),V=[],ja=0;ja<S.length;ja++)V.push(S[ja]);document.execCommand("insertimage",!1,z);z=this.cellEditor.textarea.getElementsByTagName("img");if(z.length==V.length+1)for(ja=z.length-1;0<=ja;ja--)if(0==ja||z[ja]!=V[ja-1]){z[ja].setAttribute("width",
+K);z[ja].setAttribute("height",L);break}}};Graph.prototype.insertLink=function(z){if(null!=this.cellEditor.textarea)if(0==z.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var K=this.cellEditor.textarea.getElementsByTagName("a"),L=[],S=0;S<K.length;S++)L.push(K[S]);document.execCommand("createlink",!1,mxUtils.trim(z));K=this.cellEditor.textarea.getElementsByTagName("a");if(K.length==L.length+1)for(S=K.length-1;0<=S;S--)if(K[S]!=L[S-1]){for(K=K[S].getElementsByTagName("a");0<K.length;){for(L=
+K[0].parentNode;null!=K[0].firstChild;)L.insertBefore(K[0].firstChild,K[0]);L.removeChild(K[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(z))};Graph.prototype.isCellResizable=function(z){var K=mxGraph.prototype.isCellResizable.apply(this,arguments),L=this.getCurrentCellStyle(z);return!this.isTableCell(z)&&!this.isTableRow(z)&&(K||"0"!=mxUtils.getValue(L,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==L[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(z,K){null==
+K&&(K=this.getSelectionCells());if(null!=K&&1<K.length){for(var L=[],S=null,V=null,ja=0;ja<K.length;ja++)if(this.getModel().isVertex(K[ja])){var na=this.view.getState(K[ja]);if(null!=na){var ya=z?na.getCenterX():na.getCenterY();S=null!=S?Math.max(S,ya):ya;V=null!=V?Math.min(V,ya):ya;L.push(na)}}if(2<L.length){L.sort(function(Oa,Ma){return z?Oa.x-Ma.x:Oa.y-Ma.y});na=this.view.translate;ya=this.view.scale;V=V/ya-(z?na.x:na.y);S=S/ya-(z?na.x:na.y);this.getModel().beginUpdate();try{var ra=(S-V)/(L.length-
+1);S=V;for(ja=1;ja<L.length-1;ja++){var ta=this.view.getState(this.model.getParent(L[ja].cell)),Da=this.getCellGeometry(L[ja].cell);S+=ra;null!=Da&&null!=ta&&(Da=Da.clone(),z?Da.x=Math.round(S-Da.width/2)-ta.origin.x:Da.y=Math.round(S-Da.height/2)-ta.origin.y,this.getModel().setGeometry(L[ja].cell,Da))}}finally{this.getModel().endUpdate()}}}return K};Graph.prototype.isCloneEvent=function(z){return mxClient.IS_MAC&&mxEvent.isMetaDown(z)||mxEvent.isControlDown(z)};Graph.prototype.createSvgImageExport=
+function(){var z=new mxImageExport;z.getLinkForCellState=mxUtils.bind(this,function(K,L){return this.getLinkForCell(K.cell)});return z};Graph.prototype.parseBackgroundImage=function(z){var K=null;null!=z&&0<z.length&&(z=JSON.parse(z),K=new mxImage(z.src,z.width,z.height));return K};Graph.prototype.getBackgroundImageObject=function(z){return z};Graph.prototype.getSvg=function(z,K,L,S,V,ja,na,ya,ra,ta,Da,Oa,Ma,Wa){var Sa=null;if(null!=Wa)for(Sa=new mxDictionary,Da=0;Da<Wa.length;Da++)Sa.put(Wa[Da],
+!0);if(Wa=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{K=null!=K?K:1;L=null!=L?L:0;V=null!=V?V:!0;ja=null!=ja?ja:!0;na=null!=na?na:!0;ta=null!=ta?ta:!1;var Fa="page"==Ma?this.view.getBackgroundPageBounds():ja&&null==Sa||S||"diagram"==Ma?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),Ja=this.view.scale;"diagram"==Ma&&null!=this.backgroundImage&&(Fa=mxRectangle.fromRectangle(Fa),Fa.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*
+Ja,(this.view.translate.y+this.backgroundImage.y)*Ja,this.backgroundImage.width*Ja,this.backgroundImage.height*Ja)));if(null==Fa)throw Error(mxResources.get("drawingEmpty"));S=K/Ja;Ma=V?-.5:0;var xa=Graph.createSvgNode(Ma,Ma,Math.max(1,Math.ceil(Fa.width*S)+2*L)+(ta&&0==L?5:0),Math.max(1,Math.ceil(Fa.height*S)+2*L)+(ta&&0==L?5:0),z),Ba=xa.ownerDocument,Pa=null!=Ba.createElementNS?Ba.createElementNS(mxConstants.NS_SVG,"g"):Ba.createElement("g");xa.appendChild(Pa);var Ka=this.createSvgCanvas(Pa);Ka.foOffset=
+V?-.5:0;Ka.textOffset=V?-.5:0;Ka.imageOffset=V?-.5:0;Ka.translate(Math.floor(L/K-Fa.x/Ja),Math.floor(L/K-Fa.y/Ja));var Na=document.createElement("div"),hb=Ka.getAlternateText;Ka.getAlternateText=function(eb,kb,ib,pb,vb,ob,Bb,yb,nb,qb,fb,rb,tb){if(null!=ob&&0<this.state.fontSize)try{mxUtils.isNode(ob)?ob=ob.innerText:(Na.innerHTML=ob,ob=mxUtils.extractTextWithWhitespace(Na.childNodes));for(var zb=Math.ceil(2*pb/this.state.fontSize),wb=[],Ab=0,lb=0;(0==zb||Ab<zb)&&lb<ob.length;){var xb=ob.charCodeAt(lb);
+if(10==xb||13==xb){if(0<Ab)break}else wb.push(ob.charAt(lb)),255>xb&&Ab++;lb++}wb.length<ob.length&&1<ob.length-wb.length&&(ob=mxUtils.trim(wb.join(""))+"...");return ob}catch(c){return hb.apply(this,arguments)}else return hb.apply(this,arguments)};var Qa=this.backgroundImage;if(null!=Qa){z=Ja/K;var mb=this.view.translate;Ma=new mxRectangle((Qa.x+mb.x)*z,(Qa.y+mb.y)*z,Qa.width*z,Qa.height*z);mxUtils.intersects(Fa,Ma)&&Ka.image(Qa.x+mb.x,Qa.y+mb.y,Qa.width,Qa.height,Qa.src,!0)}Ka.scale(S);Ka.textEnabled=
+na;ya=null!=ya?ya:this.createSvgImageExport();var ub=ya.drawCellState,bb=ya.getLinkForCellState;ya.getLinkForCellState=function(eb,kb){var ib=bb.apply(this,arguments);return null==ib||eb.view.graph.isCustomLink(ib)?null:ib};ya.getLinkTargetForCellState=function(eb,kb){return eb.view.graph.getLinkTargetForCell(eb.cell)};ya.drawCellState=function(eb,kb){for(var ib=eb.view.graph,pb=null!=Sa?Sa.get(eb.cell):ib.isCellSelected(eb.cell),vb=ib.model.getParent(eb.cell);!(ja&&null==Sa||pb)&&null!=vb;)pb=null!=
+Sa?Sa.get(vb):ib.isCellSelected(vb),vb=ib.model.getParent(vb);(ja&&null==Sa||pb)&&ub.apply(this,arguments)};ya.drawState(this.getView().getState(this.model.root),Ka);this.updateSvgLinks(xa,ra,!0);this.addForeignObjectWarning(Ka,xa);return xa}finally{Wa&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(z,K){if("0"!=urlParams["svg-warning"]&&0<K.getElementsByTagName("foreignObject").length){var L=z.createElement("switch"),S=z.createElement("g");
+S.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var V=z.createElement("a");V.setAttribute("transform","translate(0,-5)");null==V.setAttributeNS||K.ownerDocument!=document&&null==document.documentMode?(V.setAttribute("xlink:href",Graph.foreignObjectWarningLink),V.setAttribute("target","_blank")):(V.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),V.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));z=z.createElement("text");
+z.setAttribute("text-anchor","middle");z.setAttribute("font-size","10px");z.setAttribute("x","50%");z.setAttribute("y","100%");mxUtils.write(z,Graph.foreignObjectWarningText);L.appendChild(S);V.appendChild(z);L.appendChild(V);K.appendChild(L)}};Graph.prototype.updateSvgLinks=function(z,K,L){z=z.getElementsByTagName("a");for(var S=0;S<z.length;S++)if(null==z[S].getAttribute("target")){var V=z[S].getAttribute("href");null==V&&(V=z[S].getAttribute("xlink:href"));null!=V&&(null!=K&&/^https?:\/\//.test(V)?
+z[S].setAttribute("target",K):L&&this.isCustomLink(V)&&z[S].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(z){z=new mxSvgCanvas2D(z);z.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;z.pointerEvents=!0;return z};Graph.prototype.getSelectedElement=function(){var z=null;if(window.getSelection){var K=window.getSelection();K.getRangeAt&&K.rangeCount&&(z=K.getRangeAt(0).commonAncestorContainer)}else document.selection&&(z=document.selection.createRange().parentElement());
+return z};Graph.prototype.getSelectedEditingElement=function(){for(var z=this.getSelectedElement();null!=z&&z.nodeType!=mxConstants.NODETYPE_ELEMENT;)z=z.parentNode;null!=z&&z==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(z=this.cellEditor.textarea.firstChild);return z};Graph.prototype.getParentByName=function(z,K,L){for(;null!=z&&z.nodeName!=K;){if(z==L)return null;z=z.parentNode}return z};Graph.prototype.getParentByNames=
+function(z,K,L){for(;null!=z&&!(0<=mxUtils.indexOf(K,z.nodeName));){if(z==L)return null;z=z.parentNode}return z};Graph.prototype.selectNode=function(z){var K=null;if(window.getSelection){if(K=window.getSelection(),K.getRangeAt&&K.rangeCount){var L=document.createRange();L.selectNode(z);K.removeAllRanges();K.addRange(L)}}else(K=document.selection)&&"Control"!=K.type&&(z=K.createRange(),z.collapse(!0),L=K.createRange(),L.setEndPoint("StartToStart",z),L.select())};Graph.prototype.flipEdgePoints=function(z,
+K,L){var S=this.getCellGeometry(z);if(null!=S){S=S.clone();if(null!=S.points)for(var V=0;V<S.points.length;V++)K?S.points[V].x=L+(L-S.points[V].x):S.points[V].y=L+(L-S.points[V].y);V=function(ja){null!=ja&&(K?ja.x=L+(L-ja.x):ja.y=L+(L-ja.y))};V(S.getTerminalPoint(!0));V(S.getTerminalPoint(!1));this.model.setGeometry(z,S)}};Graph.prototype.flipChildren=function(z,K,L){this.model.beginUpdate();try{for(var S=this.model.getChildCount(z),V=0;V<S;V++){var ja=this.model.getChildAt(z,V);if(this.model.isEdge(ja))this.flipEdgePoints(ja,
+K,L);else{var na=this.getCellGeometry(ja);null!=na&&(na=na.clone(),K?na.x=L+(L-na.x-na.width):na.y=L+(L-na.y-na.height),this.model.setGeometry(ja,na))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(z,K){this.model.beginUpdate();try{z=this.model.getTopmostCells(z);for(var L=[],S=0;S<z.length;S++)if(this.model.isEdge(z[S])){var V=this.view.getState(z[S]);null!=V&&this.flipEdgePoints(z[S],K,(K?V.getCenterX():V.getCenterY())/this.view.scale-(K?V.origin.x:V.origin.y)-(K?this.view.translate.x:
+this.view.translate.y))}else{var ja=this.getCellGeometry(z[S]);null!=ja&&this.flipChildren(z[S],K,K?ja.getCenterX()-ja.x:ja.getCenterY()-ja.y);L.push(z[S])}this.toggleCellStyles(K?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,L)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(z,K){var L=null;if(null!=z&&0<z.length){this.model.beginUpdate();try{for(var S=0;S<z.length;S++){var V=this.model.getParent(z[S]);if(this.isTable(V)){var ja=this.getCellGeometry(z[S]),na=this.getCellGeometry(V);
+null!=ja&&null!=na&&(na=na.clone(),na.height-=ja.height,this.model.setGeometry(V,na))}}var ya=this.selectParentAfterDelete?this.model.getParents(z):null;this.removeCells(z,K)}finally{this.model.endUpdate()}if(null!=ya)for(L=[],S=0;S<ya.length;S++)this.model.contains(ya[S])&&(this.model.isVertex(ya[S])||this.model.isEdge(ya[S]))&&L.push(ya[S])}return L};Graph.prototype.insertTableColumn=function(z,K){var L=this.getModel();L.beginUpdate();try{var S=z,V=0;if(this.isTableCell(z)){var ja=L.getParent(z);
+S=L.getParent(ja);V=mxUtils.indexOf(L.getChildCells(ja,!0),z)}else this.isTableRow(z)?S=L.getParent(z):z=L.getChildCells(S,!0)[0],K||(V=L.getChildCells(z,!0).length-1);var na=L.getChildCells(S,!0),ya=Graph.minTableColumnWidth;for(z=0;z<na.length;z++){var ra=L.getChildCells(na[z],!0)[V],ta=L.cloneCell(ra,!1),Da=this.getCellGeometry(ta);ta.value=null;ta.style=mxUtils.setStyle(mxUtils.setStyle(ta.style,"rowspan",null),"colspan",null);if(null!=Da){null!=Da.alternateBounds&&(Da.width=Da.alternateBounds.width,
+Da.height=Da.alternateBounds.height,Da.alternateBounds=null);ya=Da.width;var Oa=this.getCellGeometry(na[z]);null!=Oa&&(Da.height=Oa.height)}L.add(na[z],ta,V+(K?0:1))}var Ma=this.getCellGeometry(S);null!=Ma&&(Ma=Ma.clone(),Ma.width+=ya,L.setGeometry(S,Ma))}finally{L.endUpdate()}};Graph.prototype.deleteLane=function(z){var K=this.getModel();K.beginUpdate();try{var L=null;L="stackLayout"==this.getCurrentCellStyle(z).childLayout?z:K.getParent(z);var S=K.getChildCells(L,!0);0==S.length?K.remove(L):(L==
+z&&(z=S[S.length-1]),K.remove(z))}finally{K.endUpdate()}};Graph.prototype.insertLane=function(z,K){var L=this.getModel();L.beginUpdate();try{var S=null;if("stackLayout"==this.getCurrentCellStyle(z).childLayout){S=z;var V=L.getChildCells(S,!0);z=V[K?0:V.length-1]}else S=L.getParent(z);var ja=S.getIndex(z);z=L.cloneCell(z,!1);z.value=null;L.add(S,z,ja+(K?0:1))}finally{L.endUpdate()}};Graph.prototype.insertTableRow=function(z,K){var L=this.getModel();L.beginUpdate();try{var S=z,V=z;if(this.isTableCell(z))V=
+L.getParent(z),S=L.getParent(V);else if(this.isTableRow(z))S=L.getParent(z);else{var ja=L.getChildCells(S,!0);V=ja[K?0:ja.length-1]}var na=L.getChildCells(V,!0),ya=S.getIndex(V);V=L.cloneCell(V,!1);V.value=null;var ra=this.getCellGeometry(V);if(null!=ra){for(ja=0;ja<na.length;ja++){z=L.cloneCell(na[ja],!1);z.value=null;z.style=mxUtils.setStyle(mxUtils.setStyle(z.style,"rowspan",null),"colspan",null);var ta=this.getCellGeometry(z);null!=ta&&(null!=ta.alternateBounds&&(ta.width=ta.alternateBounds.width,
+ta.height=ta.alternateBounds.height,ta.alternateBounds=null),ta.height=ra.height);V.insert(z)}L.add(S,V,ya+(K?0:1));var Da=this.getCellGeometry(S);null!=Da&&(Da=Da.clone(),Da.height+=ra.height,L.setGeometry(S,Da))}}finally{L.endUpdate()}};Graph.prototype.deleteTableColumn=function(z){var K=this.getModel();K.beginUpdate();try{var L=z,S=z;this.isTableCell(z)&&(S=K.getParent(z));this.isTableRow(S)&&(L=K.getParent(S));var V=K.getChildCells(L,!0);if(0==V.length)K.remove(L);else{this.isTableRow(S)||(S=
+V[0]);var ja=K.getChildCells(S,!0);if(1>=ja.length)K.remove(L);else{var na=ja.length-1;this.isTableCell(z)&&(na=mxUtils.indexOf(ja,z));for(S=z=0;S<V.length;S++){var ya=K.getChildCells(V[S],!0)[na];K.remove(ya);var ra=this.getCellGeometry(ya);null!=ra&&(z=Math.max(z,ra.width))}var ta=this.getCellGeometry(L);null!=ta&&(ta=ta.clone(),ta.width-=z,K.setGeometry(L,ta))}}}finally{K.endUpdate()}};Graph.prototype.deleteTableRow=function(z){var K=this.getModel();K.beginUpdate();try{var L=z,S=z;this.isTableCell(z)&&
+(z=S=K.getParent(z));this.isTableRow(z)&&(L=K.getParent(S));var V=K.getChildCells(L,!0);if(1>=V.length)K.remove(L);else{this.isTableRow(S)||(S=V[V.length-1]);K.remove(S);z=0;var ja=this.getCellGeometry(S);null!=ja&&(z=ja.height);var na=this.getCellGeometry(L);null!=na&&(na=na.clone(),na.height-=z,K.setGeometry(L,na))}}finally{K.endUpdate()}};Graph.prototype.insertRow=function(z,K){for(var L=z.tBodies[0],S=L.rows[0].cells,V=z=0;V<S.length;V++){var ja=S[V].getAttribute("colspan");z+=null!=ja?parseInt(ja):
+1}K=L.insertRow(K);for(V=0;V<z;V++)mxUtils.br(K.insertCell(-1));return K.cells[0]};Graph.prototype.deleteRow=function(z,K){z.tBodies[0].deleteRow(K)};Graph.prototype.insertColumn=function(z,K){var L=z.tHead;if(null!=L)for(var S=0;S<L.rows.length;S++){var V=document.createElement("th");L.rows[S].appendChild(V);mxUtils.br(V)}z=z.tBodies[0];for(L=0;L<z.rows.length;L++)S=z.rows[L].insertCell(K),mxUtils.br(S);return z.rows[0].cells[0<=K?K:z.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(z,
+K){if(0<=K){z=z.tBodies[0].rows;for(var L=0;L<z.length;L++)z[L].cells.length>K&&z[L].deleteCell(K)}};Graph.prototype.pasteHtmlAtCaret=function(z){if(window.getSelection){var K=window.getSelection();if(K.getRangeAt&&K.rangeCount){K=K.getRangeAt(0);K.deleteContents();var L=document.createElement("div");L.innerHTML=z;z=document.createDocumentFragment();for(var S;S=L.firstChild;)lastNode=z.appendChild(S);K.insertNode(z)}}else(K=document.selection)&&"Control"!=K.type&&K.createRange().pasteHTML(z)};Graph.prototype.createLinkForHint=
+function(z,K){function L(V,ja){V.length>ja&&(V=V.substring(0,Math.round(ja/2))+"..."+V.substring(V.length-Math.round(ja/4)));return V}z=null!=z?z:"javascript:void(0);";if(null==K||0==K.length)K=this.isCustomLink(z)?this.getLinkTitle(z):z;var S=document.createElement("a");S.setAttribute("rel",this.linkRelation);S.setAttribute("href",this.getAbsoluteUrl(z));S.setAttribute("title",L(this.isCustomLink(z)?this.getLinkTitle(z):z,80));null!=this.linkTarget&&S.setAttribute("target",this.linkTarget);mxUtils.write(S,
+L(K,40));this.isCustomLink(z)&&mxEvent.addListener(S,"click",mxUtils.bind(this,function(V){this.customLinkClicked(z);mxEvent.consume(V)}));return S};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(ja,na){this.popupMenuHandler.hideMenu()});var z=this.updateMouseEvent;this.updateMouseEvent=function(ja){ja=z.apply(this,arguments);if(mxEvent.isTouchEvent(ja.getEvent())&&
+null==ja.getState()){var na=this.getCellAt(ja.graphX,ja.graphY);null!=na&&this.isSwimlane(na)&&this.hitsSwimlaneContent(na,ja.graphX,ja.graphY)||(ja.state=this.view.getState(na),null!=ja.state&&null!=ja.state.shape&&(this.container.style.cursor=ja.state.shape.node.style.cursor))}null==ja.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return ja};var K=!1,L=!1,S=!1,V=this.fireMouseEvent;this.fireMouseEvent=function(ja,na,ya){ja==mxEvent.MOUSE_DOWN&&(na=this.updateMouseEvent(na),
+K=this.isCellSelected(na.getCell()),L=this.isSelectionEmpty(),S=this.popupMenuHandler.isMenuShowing());V.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(ja,na){var ya=mxEvent.isMouseEvent(na.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==na.getState()||!na.isSource(na.getState().control))&&(this.popupMenuHandler.popupTrigger||!S&&!ya&&(L&&null==na.getCell()&&this.isSelectionEmpty()||K&&this.isCellSelected(na.getCell())));
+ya=!K||ya?null:mxUtils.bind(this,function(ra){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var ta=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(na.getX()+ta.x+1,na.getY()+ta.y+1,ra,na.getEvent())}}),500)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[ja,na,ya])})};mxCellEditor.prototype.isContentEditing=function(){var z=this.graph.view.getState(this.editingCell);return null!=z&&1==z.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=
+this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var z="";window.getSelection?z=window.getSelection():document.getSelection?z=document.getSelection():document.selection&&(z=document.selection.createRange().text);return""!=z};mxCellEditor.prototype.insertTab=function(z){var K=this.textarea.ownerDocument.defaultView.getSelection(),L=K.getRangeAt(0),S="\t";if(null!=z)for(S="";0<z;)S+=" ",z--;z=document.createElement("span");
+z.style.whiteSpace="pre";z.appendChild(document.createTextNode(S));L.insertNode(z);L.setStartAfter(z);L.setEndAfter(z);K.removeAllRanges();K.addRange(L)};mxCellEditor.prototype.alignText=function(z,K){var L=null!=K&&mxEvent.isShiftDown(K);if(L||null!=window.getSelection&&null!=window.getSelection().containsNode){var S=!0;this.graph.processElements(this.textarea,function(V){L||window.getSelection().containsNode(V,!0)?(V.removeAttribute("align"),V.style.textAlign=null):S=!1});S&&this.graph.cellEditor.setAlign(z)}document.execCommand("justify"+
+z.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var z=window.getSelection();if(z.getRangeAt&&z.rangeCount){for(var K=[],L=0,S=z.rangeCount;L<S;++L)K.push(z.getRangeAt(L));return K}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(z){try{if(z)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var K=0,L=z.length;K<
+L;++K)sel.addRange(z[K])}else document.selection&&z.select&&z.select()}catch(S){}};var C=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(z){null!=z.text&&(z.text.replaceLinefeeds="0"!=mxUtils.getValue(z.style,"nl2Br","1"));C.apply(this,arguments)};var I=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(z,K){this.isKeepFocusEvent(z)||!mxEvent.isAltDown(z.getEvent())?I.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=
+function(z){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var G=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(z,K){z=this.graph.getStartEditingCell(z,K);G.apply(this,arguments);var L=this.graph.view.getState(z);this.textarea.className=null!=L&&1==L.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(z);
+L=this.graph.getModel().getParent(z);var S=this.graph.getCellGeometry(z);if(this.graph.getModel().isEdge(L)&&null!=S&&S.relative||this.graph.getModel().isEdge(z))this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var Z=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(z){function K(V,ja){ja.originalNode=V;V=V.firstChild;for(var na=ja.firstChild;null!=V&&null!=na;)K(V,na),V=V.nextSibling,na=na.nextSibling;
+return ja}function L(V,ja){if(null!=V)if(ja.originalNode!=V)S(V);else for(V=V.firstChild,ja=ja.firstChild;null!=V;){var na=V.nextSibling;null==ja?S(V):(L(V,ja),ja=ja.nextSibling);V=na}}function S(V){for(var ja=V.firstChild;null!=ja;){var na=ja.nextSibling;S(ja);ja=na}1==V.nodeType&&("BR"===V.nodeName||null!=V.firstChild)||3==V.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(V)).length?(3==V.nodeType&&mxUtils.setTextContent(V,mxUtils.getTextContent(V).replace(/\n|\r/g,"")),1==V.nodeType&&(V.removeAttribute("style"),
+V.removeAttribute("class"),V.removeAttribute("width"),V.removeAttribute("cellpadding"),V.removeAttribute("cellspacing"),V.removeAttribute("border"))):V.parentNode.removeChild(V)}Z.apply(this,arguments);7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(V){var ja=K(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||
+0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?L(this.textarea,ja):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var z=this.graph.view.getState(this.editingCell);if(null!=z){var K=null!=z&&"0"!=mxUtils.getValue(z.style,"nl2Br","1"),L=this.saveSelection();if(this.codeViewMode){ya=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<ya.length&&"\n"==ya.charAt(ya.length-1)&&(ya=ya.substring(0,ya.length-1));ya=this.graph.sanitizeHtml(K?
+ya.replace(/\n/g,"<br/>"):ya,!0);this.textarea.className="mxCellEditor geContentEditable";ra=mxUtils.getValue(z.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);K=mxUtils.getValue(z.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var S=mxUtils.getValue(z.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),V=(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,ja=(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,
+0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,na=[];(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&na.push("underline");(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&na.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ra*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=
+Math.round(ra)+"px";this.textarea.style.textDecoration=na.join(" ");this.textarea.style.fontWeight=V?"bold":"normal";this.textarea.style.fontStyle=ja?"italic":"";this.textarea.style.fontFamily=K;this.textarea.style.textAlign=S;this.textarea.style.padding="0px";this.textarea.innerHTML!=ya&&(this.textarea.innerHTML=ya,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&
+this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerText="");var ya=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(ya=mxUtils.replaceTrailingNewlines(ya,"<div><br></div>"));ya=this.graph.sanitizeHtml(K?ya.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):ya,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var ra=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ra*
+mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ra)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=ya&&(this.textarea.innerHTML=ya);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&
+this.restoreSelection(this.switchSelectionState);this.switchSelectionState=L;this.resize()}};var ca=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(z,K){if(null!=this.textarea)if(z=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=z){var L=z.view.scale;this.bounds=mxRectangle.fromRectangle(z);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*L;this.bounds.height=60*L;var S=null!=z.text?z.text.margin:null;null==S&&(S=mxUtils.getAlignmentAsPoint(mxUtils.getValue(z.style,
+mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(z.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=S.x*this.bounds.width;this.bounds.y+=S.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/L)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/L)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/L)+(this.textarea.offsetHeight-
+this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*L);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/L)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*L);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+L+","+
+L+")")}else this.textarea.style.height="",this.textarea.style.overflow="",ca.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(z,K){if("0"==mxUtils.getValue(z.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var L=this.graph.getEditingValue(z.cell,K);"1"==mxUtils.getValue(z.style,"nl2Br","1")&&(L=L.replace(/\n/g,"<br/>"));return L=this.graph.sanitizeHtml(L,!0)};mxCellEditorGetCurrentValue=
+mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(z){if("0"==mxUtils.getValue(z.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var K=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return K="1"==mxUtils.getValue(z.style,"nl2Br","1")?K.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):K.replace(/\r\n/g,"").replace(/\n/g,"")};var aa=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(z){this.codeViewMode&&
+this.toggleViewMode();aa.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(z){}};var Y=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(z,K){this.graph.getModel().beginUpdate();try{Y.apply(this,arguments),""==K&&this.graph.isCellDeletable(z.cell)&&0==this.graph.model.getChildCount(z.cell)&&this.graph.isTransparentState(z)&&this.graph.removeCells([z.cell],!1)}finally{this.graph.getModel().endUpdate()}};
+mxCellEditor.prototype.getBackgroundColor=function(z){var K=mxUtils.getValue(z.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=K&&K!=mxConstants.NONE||!(null!=z.cell.geometry&&0<z.cell.geometry.width)||0==mxUtils.getValue(z.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(z.style,mxConstants.STYLE_HORIZONTAL,1)||(K=mxUtils.getValue(z.style,mxConstants.STYLE_FILLCOLOR,null));K==mxConstants.NONE&&(K=null);return K};mxCellEditor.prototype.getBorderColor=function(z){var K=mxUtils.getValue(z.style,
+mxConstants.STYLE_LABEL_BORDERCOLOR,null);null!=K&&K!=mxConstants.NONE||!(null!=z.cell.geometry&&0<z.cell.geometry.width)||0==mxUtils.getValue(z.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(z.style,mxConstants.STYLE_HORIZONTAL,1)||(K=mxUtils.getValue(z.style,mxConstants.STYLE_STROKECOLOR,null));K==mxConstants.NONE&&(K=null);return K};mxCellEditor.prototype.getMinimumSize=function(z){var K=this.graph.getView().scale;return new mxRectangle(0,0,null==z.text?30:z.text.size*K+20,30)};mxGraphHandlerIsValidDropTarget=
+mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(z,K){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(K.getEvent)};mxGraphView.prototype.formatUnitText=function(z){return z?e(z,this.unit):z};mxGraphHandler.prototype.updateHint=function(z){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var K=this.graph.view.translate,L=this.graph.view.scale;
+z=this.roundLength((this.bounds.x+this.currentDx)/L-K.x);K=this.roundLength((this.bounds.y+this.currentDy)/L-K.y);L=this.graph.view.unit;this.hint.innerHTML=e(z,L)+", "+e(K,L);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=
+null)};var pa=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(z,K){pa.apply(this,arguments);var L=this.graph.getCellStyle(z);if(null==L.childLayout){var S=this.graph.model.getParent(z),V=null!=S?this.graph.getCellGeometry(S):null;if(null!=V&&(L=this.graph.getCellStyle(S),"stackLayout"==L.childLayout)){var ja=parseFloat(mxUtils.getValue(L,"stackBorder",mxStackLayout.prototype.border));L="1"==mxUtils.getValue(L,"horizontalStack","1");var na=this.graph.getActualStartSize(S);
+V=V.clone();L?V.height=K.height+na.y+na.height+2*ja:V.width=K.width+na.x+na.width+2*ja;this.graph.model.setGeometry(S,V)}}};var Q=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function z(ya){L.get(ya)||(L.put(ya,!0),V.push(ya))}for(var K=Q.apply(this,arguments),L=new mxDictionary,S=this.graph.model,V=[],ja=0;ja<K.length;ja++){var na=K[ja];this.graph.isTableCell(na)?z(S.getParent(S.getParent(na))):this.graph.isTableRow(na)&&
+z(S.getParent(na));z(na)}return V};var X=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(z){var K=X.apply(this,arguments);K.stroke="#C0C0C0";K.strokewidth=1;return K};var ha=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(z){var K=ha.apply(this,arguments);K.stroke="#C0C0C0";K.strokewidth=1;return K};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=
+function(){var z=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+z.x/2,this.bounds.y+this.rotationHandleVSpacing-z.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(z,K){return this.graph.isRecursiveVertexResize(z)&&!mxEvent.isAltDown(K.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(z,K){return mxEvent.isControlDown(K.getEvent())||mxEvent.isMetaDown(K.getEvent())};var U=mxVertexHandler.prototype.isRotationHandleVisible;
+mxVertexHandler.prototype.isRotationHandleVisible=function(){return U.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 ma=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=
+function(){return ma.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var T=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(z){return z.tableHandle||T.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var z=0;this.graph.isTableRow(this.state.cell)?z=1:this.graph.isTableCell(this.state.cell)&&
+(z=2);return z};var M=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return M.apply(this,arguments).grow(-this.getSelectionBorderInset())};var ia=null,N=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==ia&&(ia=mxCellRenderer.defaultShapes.tableLine);var z=N.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var K=function(Sa,Fa,Ja){for(var xa=[],Ba=0;Ba<Sa.length;Ba++){var Pa=
+Sa[Ba];xa.push(null==Pa?null:new mxPoint((ra+Pa.x+Fa)*ja,(ta+Pa.y+Ja)*ja))}return xa},L=this,S=this.graph,V=S.model,ja=S.view.scale,na=this.state,ya=this.selectionBorder,ra=this.state.origin.x+S.view.translate.x,ta=this.state.origin.y+S.view.translate.y;null==z&&(z=[]);var Da=S.view.getCellStates(V.getChildCells(this.state.cell,!0));if(0<Da.length){var Oa=V.getChildCells(Da[0].cell,!0),Ma=S.getTableLines(this.state.cell,!1,!0),Wa=S.getTableLines(this.state.cell,!0,!1);for(V=0;V<Da.length;V++)mxUtils.bind(this,
+function(Sa){var Fa=Da[Sa],Ja=Sa<Da.length-1?Da[Sa+1]:null;Ja=null!=Ja?S.getCellGeometry(Ja.cell):null;var xa=null!=Ja&&null!=Ja.alternateBounds?Ja.alternateBounds:Ja;Ja=null!=Wa[Sa]?new ia(Wa[Sa],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);Ja.isDashed=ya.isDashed;Ja.svgStrokeTolerance++;Fa=new mxHandle(Fa,"row-resize",null,Ja);Fa.tableHandle=!0;var Ba=0;Fa.shape.node.parentNode.insertBefore(Fa.shape.node,Fa.shape.node.parentNode.firstChild);Fa.redraw=function(){if(null!=
+this.shape){this.shape.stroke=0==Ba?mxConstants.NONE:ya.stroke;if(this.shape.constructor==ia)this.shape.line=K(Wa[Sa],0,Ba),this.shape.updateBoundsFromLine();else{var Ka=S.getActualStartSize(na.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+Ba*ja;this.shape.bounds.x=na.x+(Sa==Da.length-1?0:Ka.x*ja);this.shape.bounds.width=na.width-(Sa==Da.length-1?0:Ka.width+Ka.x+ja)}this.shape.redraw()}};var Pa=!1;Fa.setPosition=function(Ka,Na,hb){Ba=Math.max(Graph.minTableRowHeight-
+Ka.height,Na.y-Ka.y-Ka.height);Pa=mxEvent.isShiftDown(hb.getEvent());null!=xa&&Pa&&(Ba=Math.min(Ba,xa.height-Graph.minTableRowHeight))};Fa.execute=function(Ka){if(0!=Ba)S.setTableRowHeight(this.state.cell,Ba,!Pa);else if(!L.blockDelayedSelection){var Na=S.getCellAt(Ka.getGraphX(),Ka.getGraphY())||na.cell;S.graphHandler.selectCellForEvent(Na,Ka)}Ba=0};Fa.reset=function(){Ba=0};z.push(Fa)})(V);for(V=0;V<Oa.length;V++)mxUtils.bind(this,function(Sa){var Fa=S.view.getState(Oa[Sa]),Ja=S.getCellGeometry(Oa[Sa]),
+xa=null!=Ja.alternateBounds?Ja.alternateBounds:Ja;null==Fa&&(Fa=new mxCellState(S.view,Oa[Sa],S.getCellStyle(Oa[Sa])),Fa.x=na.x+Ja.x*ja,Fa.y=na.y+Ja.y*ja,Fa.width=xa.width*ja,Fa.height=xa.height*ja,Fa.updateCachedBounds());Ja=Sa<Oa.length-1?Oa[Sa+1]:null;Ja=null!=Ja?S.getCellGeometry(Ja):null;var Ba=null!=Ja&&null!=Ja.alternateBounds?Ja.alternateBounds:Ja;Ja=null!=Ma[Sa]?new ia(Ma[Sa],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);Ja.isDashed=ya.isDashed;Ja.svgStrokeTolerance++;
+Fa=new mxHandle(Fa,"col-resize",null,Ja);Fa.tableHandle=!0;var Pa=0;Fa.shape.node.parentNode.insertBefore(Fa.shape.node,Fa.shape.node.parentNode.firstChild);Fa.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Pa?mxConstants.NONE:ya.stroke;if(this.shape.constructor==ia)this.shape.line=K(Ma[Sa],Pa,0),this.shape.updateBoundsFromLine();else{var Na=S.getActualStartSize(na.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(xa.width+Pa)*ja;this.shape.bounds.y=na.y+(Sa==Oa.length-
+1?0:Na.y*ja);this.shape.bounds.height=na.height-(Sa==Oa.length-1?0:(Na.height+Na.y)*ja)}this.shape.redraw()}};var Ka=!1;Fa.setPosition=function(Na,hb,Qa){Pa=Math.max(Graph.minTableColumnWidth-xa.width,hb.x-Na.x-xa.width);Ka=mxEvent.isShiftDown(Qa.getEvent());null==Ba||Ka||(Pa=Math.min(Pa,Ba.width-Graph.minTableColumnWidth))};Fa.execute=function(Na){if(0!=Pa)S.setTableColumnWidth(this.state.cell,Pa,Ka);else if(!L.blockDelayedSelection){var hb=S.getCellAt(Na.getGraphX(),Na.getGraphY())||na.cell;S.graphHandler.selectCellForEvent(hb,
+Na)}Pa=0};Fa.positionChanged=function(){};Fa.reset=function(){Pa=0};z.push(Fa)})(V)}}return null!=z?z.reverse():null};var O=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(z){O.apply(this,arguments);if(null!=this.moveHandles)for(var K=0;K<this.moveHandles.length;K++)this.moveHandles[K].style.visibility=z?"":"hidden";if(null!=this.cornerHandles)for(K=0;K<this.cornerHandles.length;K++)this.cornerHandles[K].node.style.visibility=z?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=
+function(){var z=this.graph.model;if(null!=this.moveHandles){for(var K=0;K<this.moveHandles.length;K++)this.moveHandles[K].parentNode.removeChild(this.moveHandles[K]);this.moveHandles=null}this.moveHandles=[];for(K=0;K<z.getChildCount(this.state.cell);K++)mxUtils.bind(this,function(L){if(null!=L&&z.isVertex(L.cell)){var S=mxUtils.createImage(Editor.rowMoveImage);S.style.position="absolute";S.style.cursor="pointer";S.style.width="7px";S.style.height="4px";S.style.padding="4px 2px 4px 2px";S.rowState=
+L;mxEvent.addGestureListeners(S,mxUtils.bind(this,function(V){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(V)&&this.graph.isCellSelected(L.cell)||this.graph.selectCellForEvent(L.cell,V);mxEvent.isPopupTrigger(V)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(V),mxEvent.getClientY(V),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(V),this.graph.isMouseDown=!0);
+mxEvent.consume(V)}),null,mxUtils.bind(this,function(V){mxEvent.isPopupTrigger(V)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(V),mxEvent.getClientY(V),L.cell,V),mxEvent.consume(V))}));this.moveHandles.push(S);this.graph.container.appendChild(S)}})(this.graph.view.getState(z.getChildAt(this.state.cell,K)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var z=0;z<this.customHandles.length;z++)this.customHandles[z].destroy();this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&
+this.refreshMoveHandles()};var ba=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var z=new mxPoint(0,0),K=this.tolerance,L=this.state.style.shape;null==mxCellRenderer.defaultShapes[L]&&mxStencilRegistry.getStencil(L);L=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!L&&null!=this.customHandles)for(var S=0;S<this.customHandles.length;S++)if(null!=this.customHandles[S].shape&&null!=this.customHandles[S].shape.bounds){var V=
+this.customHandles[S].shape.bounds,ja=V.getCenterX(),na=V.getCenterY();if(Math.abs(this.state.x-ja)<V.width/2||Math.abs(this.state.y-na)<V.height/2||Math.abs(this.state.x+this.state.width-ja)<V.width/2||Math.abs(this.state.y+this.state.height-na)<V.height/2){L=!0;break}}L&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(K/=2,this.graph.isTable(this.state.cell)&&(K+=7),z.x=this.sizers[0].bounds.width+K,z.y=this.sizers[0].bounds.height+K):z=ba.apply(this,arguments);return z};mxVertexHandler.prototype.updateHint=
function(z){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{z=this.state.view.scale;var K=this.state.view.unit;this.hint.innerHTML=e(this.roundLength(this.bounds.width/z),K)+" x "+e(this.roundLength(this.bounds.height/z),K)}z=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||
-"0");null==z&&(z=this.bounds);this.hint.style.left=z.x+Math.round((z.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=z.y+z.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var ma=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(z,K){ma.apply(this,arguments);null!=
-this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};var u=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(z,K){u.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(z,K){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var M=
-this.graph.view.translate,T=this.graph.view.scale,V=this.roundLength(K.x/T-M.x);M=this.roundLength(K.y/T-M.y);T=this.graph.view.unit;this.hint.innerHTML=e(V,T)+", "+e(M,T);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(V=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*V.x)+"%, "+Math.round(100*V.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility=
+"0");null==z&&(z=this.bounds);this.hint.style.left=z.x+Math.round((z.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=z.y+z.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var la=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(z,K){la.apply(this,arguments);null!=
+this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};var u=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(z,K){u.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(z,K){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var L=
+this.graph.view.translate,S=this.graph.view.scale,V=this.roundLength(K.x/S-L.x);L=this.roundLength(K.y/S-L.y);S=this.graph.view.unit;this.hint.innerHTML=e(V,S)+", "+e(L,S);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(V=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*V.x)+"%, "+Math.round(100*V.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility=
"hidden");this.hint.style.left=Math.round(z.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(z.getGraphY(),K.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};Graph.prototype.expandedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="50%" y1="0%" x2="50%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 2 4.5 L 7 4.5 z" stroke="#000"/>');
Graph.prototype.collapsedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 4.5 2 L 4.5 7 M 2 4.5 L 7 4.5 z" stroke="#000"/>');mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=
Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.endMainHandle=Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.secondaryHandle=Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>');HoverIcons.prototype.fixedHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="#01bd22"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>');
@@ -2635,56 +2638,56 @@ HoverIcons.prototype.mainHandle;null!=window.Sidebar&&(Sidebar.prototype.triangl
!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(z){return!mxEvent.isShiftDown(z.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(z){return!mxEvent.isShiftDown(z.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=
12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(z){return mxEvent.isMouseEvent(z.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(z){var K=z.getEvent();return null==z.getState()&&!mxEvent.isMouseEvent(K)||mxEvent.isPopupTrigger(K)&&(null==z.getState()||mxEvent.isControlDown(K)||mxEvent.isShiftDown(K))};var H=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=
function(z,K){H.apply(this,arguments);mxEvent.isTouchEvent(K.getEvent())&&this.graph.isCellSelected(K.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(z){var K=z.getEvent();return mxEvent.isLeftMouseButton(K)&&(this.useLeftButtonForPanning&&null==z.getState()||mxEvent.isControlDown(K)&&!mxEvent.isShiftDown(K))||this.usePopupTrigger&&mxEvent.isPopupTrigger(K)};mxRubberband.prototype.isSpaceEvent=function(z){return this.graph.isEnabled()&&
-!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(z.getEvent())||mxEvent.isMetaDown(z.getEvent()))&&mxEvent.isShiftDown(z.getEvent())&&mxEvent.isAltDown(z.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(z,K){if(this.cancelled)this.cancelled=!1,K.consume();else{var M=null!=this.div&&"none"!=this.div.style.display,T=null,V=null,ia=z=null;
-null!=this.first&&null!=this.currentX&&null!=this.currentY&&(T=this.first.x,V=this.first.y,z=(this.currentX-T)/this.graph.view.scale,ia=(this.currentY-V)/this.graph.view.scale,mxEvent.isAltDown(K.getEvent())||(z=this.graph.snap(z),ia=this.graph.snap(ia),this.graph.isGridEnabled()||(Math.abs(z)<this.graph.tolerance&&(z=0),Math.abs(ia)<this.graph.tolerance&&(ia=0))));this.reset();if(M){if(this.isSpaceEvent(K)){this.graph.model.beginUpdate();try{var na=this.graph.getCellsBeyond(T,V,this.graph.getDefaultParent(),
-!0,!0);for(M=0;M<na.length;M++)if(this.graph.isCellMovable(na[M])){var va=this.graph.view.getState(na[M]),pa=this.graph.getCellGeometry(na[M]);null!=va&&null!=pa&&(pa=pa.clone(),pa.translate(z,ia),this.graph.model.setGeometry(na[M],pa))}}finally{this.graph.model.endUpdate()}}else na=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(na,K.getEvent());K.consume()}}};mxRubberband.prototype.mouseMove=function(z,K){if(!K.isConsumed()&&null!=this.first){var M=mxUtils.getScrollOrigin(this.graph.container);
-z=mxUtils.getOffset(this.graph.container);M.x-=z.x;M.y-=z.y;z=K.getX()+M.x;M=K.getY()+M.y;var T=this.first.x-z,V=this.first.y-M,ia=this.graph.tolerance;if(null!=this.div||Math.abs(T)>ia||Math.abs(V)>ia)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(z,M),this.isSpaceEvent(K)?(z=this.x+this.width,M=this.y+this.height,T=this.graph.view.scale,mxEvent.isAltDown(K.getEvent())||(this.width=this.graph.snap(this.width/T)*T,this.height=this.graph.snap(this.height/T)*T,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=z-this.width),this.y<this.first.y&&(this.y=M-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",
+!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(z.getEvent())||mxEvent.isMetaDown(z.getEvent()))&&mxEvent.isShiftDown(z.getEvent())&&mxEvent.isAltDown(z.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(z,K){if(this.cancelled)this.cancelled=!1,K.consume();else{var L=null!=this.div&&"none"!=this.div.style.display,S=null,V=null,ja=z=null;
+null!=this.first&&null!=this.currentX&&null!=this.currentY&&(S=this.first.x,V=this.first.y,z=(this.currentX-S)/this.graph.view.scale,ja=(this.currentY-V)/this.graph.view.scale,mxEvent.isAltDown(K.getEvent())||(z=this.graph.snap(z),ja=this.graph.snap(ja),this.graph.isGridEnabled()||(Math.abs(z)<this.graph.tolerance&&(z=0),Math.abs(ja)<this.graph.tolerance&&(ja=0))));this.reset();if(L){if(this.isSpaceEvent(K)){this.graph.model.beginUpdate();try{var na=this.graph.getCellsBeyond(S,V,this.graph.getDefaultParent(),
+!0,!0);for(L=0;L<na.length;L++)if(this.graph.isCellMovable(na[L])){var ya=this.graph.view.getState(na[L]),ra=this.graph.getCellGeometry(na[L]);null!=ya&&null!=ra&&(ra=ra.clone(),ra.translate(z,ja),this.graph.model.setGeometry(na[L],ra))}}finally{this.graph.model.endUpdate()}}else na=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(na,K.getEvent());K.consume()}}};mxRubberband.prototype.mouseMove=function(z,K){if(!K.isConsumed()&&null!=this.first){var L=mxUtils.getScrollOrigin(this.graph.container);
+z=mxUtils.getOffset(this.graph.container);L.x-=z.x;L.y-=z.y;z=K.getX()+L.x;L=K.getY()+L.y;var S=this.first.x-z,V=this.first.y-L,ja=this.graph.tolerance;if(null!=this.div||Math.abs(S)>ja||Math.abs(V)>ja)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(z,L),this.isSpaceEvent(K)?(z=this.x+this.width,L=this.y+this.height,S=this.graph.view.scale,mxEvent.isAltDown(K.getEvent())||(this.width=this.graph.snap(this.width/S)*S,this.height=this.graph.snap(this.height/S)*S,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=z-this.width),this.y<this.first.y&&(this.y=L-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",
null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&
-(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),K.consume()}};var P=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);P.apply(this,arguments)};var S=(new Date).getTime(),R=0,ca=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(z,K,M,T){ca.apply(this,arguments);M!=this.currentTerminalState?(S=(new Date).getTime(),
-R=0):R=(new Date).getTime()-S;this.currentTerminalState=M};var ea=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(z){return mxEvent.isShiftDown(z.getEvent())&&mxEvent.isAltDown(z.getEvent())?!1:null!=this.currentTerminalState&&z.getState()==this.currentTerminalState&&2E3<R||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&ea.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=
-function(z,K,M){K=null!=z&&0==z;var T=this.state.getVisibleTerminalState(K);z=null!=z&&(0==z||z>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==z)?this.graph.getConnectionConstraint(this.state,T,K):null;M=null!=(null!=z?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(K),z):null)?M?this.endFixedHandleImage:this.fixedHandleImage:null!=z&&null!=T?M?this.endTerminalHandleImage:this.terminalHandleImage:M?this.endHandleImage:this.handleImage;if(null!=M)return M=
-new mxImageShape(new mxRectangle(0,0,M.width,M.height),M.src),M.preserveImageAspect=!1,M;M=mxConstants.HANDLE_SIZE;this.preferHtml&&--M;return new mxRectangleShape(new mxRectangle(0,0,M,M),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var fa=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(z,K,M){this.handleImage=K==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:K==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;
-return fa.apply(this,arguments)};var ra=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(z){if(null!=z&&1==z.length){var K=this.graph.getModel(),M=K.getParent(z[0]),T=this.graph.getCellGeometry(z[0]);if(K.isEdge(M)&&null!=T&&T.relative&&(K=this.graph.view.getState(z[0]),null!=K&&2>K.width&&2>K.height&&null!=K.text&&null!=K.text.boundingBox))return mxRectangle.fromRectangle(K.text.boundingBox)}return ra.apply(this,arguments)};var ua=mxGraphHandler.prototype.getGuideStates;
-mxGraphHandler.prototype.getGuideStates=function(){for(var z=ua.apply(this,arguments),K=[],M=0;M<z.length;M++)"1"!=mxUtils.getValue(z[M].style,"part","0")&&K.push(z[M]);return K};var sa=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(z){var K=this.graph.getModel(),M=K.getParent(z.cell),T=this.graph.getCellGeometry(z.cell);return K.isEdge(M)&&null!=T&&T.relative&&2>z.width&&2>z.height&&null!=z.text&&null!=z.text.boundingBox?(K=z.text.unrotatedBoundingBox||
-z.text.boundingBox,new mxRectangle(Math.round(K.x),Math.round(K.y),Math.round(K.width),Math.round(K.height))):sa.apply(this,arguments)};var Aa=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(z,K){var M=this.graph.getModel(),T=M.getParent(this.state.cell),V=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(K)==mxEvent.ROTATION_HANDLE||!M.isEdge(T)||null==V||!V.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&Aa.apply(this,arguments)};
+(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),K.consume()}};var P=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);P.apply(this,arguments)};var W=(new Date).getTime(),R=0,da=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(z,K,L,S){da.apply(this,arguments);L!=this.currentTerminalState?(W=(new Date).getTime(),
+R=0):R=(new Date).getTime()-W;this.currentTerminalState=L};var fa=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(z){return mxEvent.isShiftDown(z.getEvent())&&mxEvent.isAltDown(z.getEvent())?!1:null!=this.currentTerminalState&&z.getState()==this.currentTerminalState&&2E3<R||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&fa.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=
+function(z,K,L){K=null!=z&&0==z;var S=this.state.getVisibleTerminalState(K);z=null!=z&&(0==z||z>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==z)?this.graph.getConnectionConstraint(this.state,S,K):null;L=null!=(null!=z?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(K),z):null)?L?this.endFixedHandleImage:this.fixedHandleImage:null!=z&&null!=S?L?this.endTerminalHandleImage:this.terminalHandleImage:L?this.endHandleImage:this.handleImage;if(null!=L)return L=
+new mxImageShape(new mxRectangle(0,0,L.width,L.height),L.src),L.preserveImageAspect=!1,L;L=mxConstants.HANDLE_SIZE;this.preferHtml&&--L;return new mxRectangleShape(new mxRectangle(0,0,L,L),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var ea=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(z,K,L){this.handleImage=K==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:K==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;
+return ea.apply(this,arguments)};var qa=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(z){if(null!=z&&1==z.length){var K=this.graph.getModel(),L=K.getParent(z[0]),S=this.graph.getCellGeometry(z[0]);if(K.isEdge(L)&&null!=S&&S.relative&&(K=this.graph.view.getState(z[0]),null!=K&&2>K.width&&2>K.height&&null!=K.text&&null!=K.text.boundingBox))return mxRectangle.fromRectangle(K.text.boundingBox)}return qa.apply(this,arguments)};var va=mxGraphHandler.prototype.getGuideStates;
+mxGraphHandler.prototype.getGuideStates=function(){for(var z=va.apply(this,arguments),K=[],L=0;L<z.length;L++)"1"!=mxUtils.getValue(z[L].style,"part","0")&&K.push(z[L]);return K};var ua=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(z){var K=this.graph.getModel(),L=K.getParent(z.cell),S=this.graph.getCellGeometry(z.cell);return K.isEdge(L)&&null!=S&&S.relative&&2>z.width&&2>z.height&&null!=z.text&&null!=z.text.boundingBox?(K=z.text.unrotatedBoundingBox||
+z.text.boundingBox,new mxRectangle(Math.round(K.x),Math.round(K.y),Math.round(K.width),Math.round(K.height))):ua.apply(this,arguments)};var Aa=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(z,K){var L=this.graph.getModel(),S=L.getParent(this.state.cell),V=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(K)==mxEvent.ROTATION_HANDLE||!L.isEdge(S)||null==V||!V.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&Aa.apply(this,arguments)};
mxVertexHandler.prototype.rotateClick=function(){var z=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),K=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&z==mxConstants.NONE&&K==mxConstants.NONE?(z=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,z,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};
-var Ca=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(z,K){Ca.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var Ba=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(z,K){Ba.apply(this,arguments);null!=this.rotationShape&&null!=
-this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="");this.blockDelayedSelection=null};var ta=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){ta.apply(this,arguments);var z=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));if(this.graph.isTable(this.state.cell))this.refreshMoveHandles();
-else if(1==this.graph.getSelectionCount()&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var K=0;4>K;K++){var M=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);M.dialect=mxConstants.DIALECT_SVG;M.init(this.graph.view.getOverlayPane());this.cornerHandles.push(M)}}var T=mxUtils.bind(this,function(){null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<
-this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.changeHandler=mxUtils.bind(this,function(V,ia){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));T()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(V,ia){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);
-K=this.graph.getLinkForCell(this.state.cell);M=this.graph.getLinksForState(this.state);this.updateLinkHint(K,M);if(null!=K||null!=M&&0<M.length)z=!0;z&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(z,K){try{if(null==z&&(null==K||0==K.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=z||null!=K&&0<K.length){null==this.linkHint&&(this.linkHint=b(),this.linkHint.style.padding=
-"6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerText="";if(null!=z&&(this.linkHint.appendChild(this.graph.createLinkForHint(z)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var M=document.createElement("img");M.setAttribute("src",Editor.editImage);M.setAttribute("title",
-mxResources.get("editLink"));M.setAttribute("width","11");M.setAttribute("height","11");M.style.marginLeft="10px";M.style.marginBottom="-1px";M.style.cursor="pointer";Editor.isDarkMode()&&(M.style.filter="invert(100%)");this.linkHint.appendChild(M);mxEvent.addListener(M,"click",mxUtils.bind(this,function(ia){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(ia)}));var T=M.cloneNode(!0);T.setAttribute("src",Editor.trashImage);T.setAttribute("title",mxResources.get("removeIt",
-[mxResources.get("link")]));T.style.marginLeft="4px";this.linkHint.appendChild(T);mxEvent.addListener(T,"click",mxUtils.bind(this,function(ia){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(ia)}))}if(null!=K)for(M=0;M<K.length;M++){var V=document.createElement("div");V.style.marginTop=null!=z||0<M?"6px":"0px";V.appendChild(this.graph.createLinkForHint(K[M].getAttribute("href"),mxUtils.getTextContent(K[M])));this.linkHint.appendChild(V)}}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(ia){}};
-mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var Pa=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){Pa.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var z=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&
-this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.changeHandler=mxUtils.bind(this,function(T,V){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));z();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var K=this.graph.getLinkForCell(this.state.cell),M=this.graph.getLinksForState(this.state);if(null!=
-K||null!=M&&0<M.length)this.updateLinkHint(K,M),this.redrawHandles()};var Ta=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Ta.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Oa=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var z=0;z<this.moveHandles.length;z++)this.moveHandles[z].style.left=this.moveHandles[z].rowState.x+
-this.moveHandles[z].rowState.width-5+"px",this.moveHandles[z].style.top=this.moveHandles[z].rowState.y+this.moveHandles[z].rowState.height/2-6+"px";if(null!=this.cornerHandles){z=this.getSelectionBorderInset();var K=this.cornerHandles,M=K[0].bounds.height/2;K[0].bounds.x=this.state.x-K[0].bounds.width/2+z;K[0].bounds.y=this.state.y-M+z;K[0].redraw();K[1].bounds.x=K[0].bounds.x+this.state.width-2*z;K[1].bounds.y=K[0].bounds.y;K[1].redraw();K[2].bounds.x=K[0].bounds.x;K[2].bounds.y=this.state.y+this.state.height-
-2*z;K[2].redraw();K[3].bounds.x=K[1].bounds.x;K[3].bounds.y=K[2].bounds.y;K[3].redraw();for(z=0;z<this.cornerHandles.length;z++)this.cornerHandles[z].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Oa.apply(this);null!=this.state&&null!=this.linkHint&&(z=new mxPoint(this.state.getCenterX(),
-this.state.getCenterY()),K=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),M=mxUtils.getBoundingBox(K,this.state.style[mxConstants.STYLE_ROTATION]||"0",z),z=null!=M?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,K=null!=this.state.text?this.state.text.boundingBox:null,null==M&&(M=this.state),M=M.y+M.height,null!=K&&(M=Math.max(M,K.y+K.height)),this.linkHint.style.left=Math.max(0,Math.round(z.x+(z.width-this.linkHint.clientWidth)/
-2))+"px",this.linkHint.style.top=Math.round(M+this.verticalOffset/2+Editor.hintOffset)+"px")};var Xa=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){Xa.apply(this,arguments);if(null!=this.moveHandles){for(var z=0;z<this.moveHandles.length;z++)null!=this.moveHandles[z]&&null!=this.moveHandles[z].parentNode&&this.moveHandles[z].parentNode.removeChild(this.moveHandles[z]);this.moveHandles=null}if(null!=this.cornerHandles){for(z=0;z<this.cornerHandles.length;z++)null!=this.cornerHandles[z]&&
+var za=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(z,K){za.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var Ca=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(z,K){Ca.apply(this,arguments);null!=this.rotationShape&&null!=
+this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="");this.blockDelayedSelection=null};var sa=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){sa.apply(this,arguments);var z=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));if(this.graph.isTable(this.state.cell))this.refreshMoveHandles();
+else if(1==this.graph.getSelectionCount()&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var K=0;4>K;K++){var L=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);L.dialect=mxConstants.DIALECT_SVG;L.init(this.graph.view.getOverlayPane());this.cornerHandles.push(L)}}var S=mxUtils.bind(this,function(){null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<
+this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.changeHandler=mxUtils.bind(this,function(V,ja){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));S()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(V,ja){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);
+K=this.graph.getLinkForCell(this.state.cell);L=this.graph.getLinksForState(this.state);this.updateLinkHint(K,L);if(null!=K||null!=L&&0<L.length)z=!0;z&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(z,K){try{if(null==z&&(null==K||0==K.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=z||null!=K&&0<K.length){null==this.linkHint&&(this.linkHint=b(),this.linkHint.style.padding=
+"6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerText="";if(null!=z&&(this.linkHint.appendChild(this.graph.createLinkForHint(z)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var L=document.createElement("img");L.setAttribute("src",Editor.editImage);L.setAttribute("title",
+mxResources.get("editLink"));L.setAttribute("width","11");L.setAttribute("height","11");L.style.marginLeft="10px";L.style.marginBottom="-1px";L.style.cursor="pointer";Editor.isDarkMode()&&(L.style.filter="invert(100%)");this.linkHint.appendChild(L);mxEvent.addListener(L,"click",mxUtils.bind(this,function(ja){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(ja)}));var S=L.cloneNode(!0);S.setAttribute("src",Editor.trashImage);S.setAttribute("title",mxResources.get("removeIt",
+[mxResources.get("link")]));S.style.marginLeft="4px";this.linkHint.appendChild(S);mxEvent.addListener(S,"click",mxUtils.bind(this,function(ja){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(ja)}))}if(null!=K)for(L=0;L<K.length;L++){var V=document.createElement("div");V.style.marginTop=null!=z||0<L?"6px":"0px";V.appendChild(this.graph.createLinkForHint(K[L].getAttribute("href"),mxUtils.getTextContent(K[L])));this.linkHint.appendChild(V)}}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(ja){}};
+mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var Va=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){Va.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var z=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&
+this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.changeHandler=mxUtils.bind(this,function(S,V){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));z();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var K=this.graph.getLinkForCell(this.state.cell),L=this.graph.getLinksForState(this.state);if(null!=
+K||null!=L&&0<L.length)this.updateLinkHint(K,L),this.redrawHandles()};var Ua=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Ua.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Ra=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var z=0;z<this.moveHandles.length;z++)this.moveHandles[z].style.left=this.moveHandles[z].rowState.x+
+this.moveHandles[z].rowState.width-5+"px",this.moveHandles[z].style.top=this.moveHandles[z].rowState.y+this.moveHandles[z].rowState.height/2-6+"px";if(null!=this.cornerHandles){z=this.getSelectionBorderInset();var K=this.cornerHandles,L=K[0].bounds.height/2;K[0].bounds.x=this.state.x-K[0].bounds.width/2+z;K[0].bounds.y=this.state.y-L+z;K[0].redraw();K[1].bounds.x=K[0].bounds.x+this.state.width-2*z;K[1].bounds.y=K[0].bounds.y;K[1].redraw();K[2].bounds.x=K[0].bounds.x;K[2].bounds.y=this.state.y+this.state.height-
+2*z;K[2].redraw();K[3].bounds.x=K[1].bounds.x;K[3].bounds.y=K[2].bounds.y;K[3].redraw();for(z=0;z<this.cornerHandles.length;z++)this.cornerHandles[z].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Ra.apply(this);null!=this.state&&null!=this.linkHint&&(z=new mxPoint(this.state.getCenterX(),
+this.state.getCenterY()),K=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),L=mxUtils.getBoundingBox(K,this.state.style[mxConstants.STYLE_ROTATION]||"0",z),z=null!=L?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,K=null!=this.state.text?this.state.text.boundingBox:null,null==L&&(L=this.state),L=L.y+L.height,null!=K&&(L=Math.max(L,K.y+K.height)),this.linkHint.style.left=Math.max(0,Math.round(z.x+(z.width-this.linkHint.clientWidth)/
+2))+"px",this.linkHint.style.top=Math.round(L+this.verticalOffset/2+Editor.hintOffset)+"px")};var Za=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){Za.apply(this,arguments);if(null!=this.moveHandles){for(var z=0;z<this.moveHandles.length;z++)null!=this.moveHandles[z]&&null!=this.moveHandles[z].parentNode&&this.moveHandles[z].parentNode.removeChild(this.moveHandles[z]);this.moveHandles=null}if(null!=this.cornerHandles){for(z=0;z<this.cornerHandles.length;z++)null!=this.cornerHandles[z]&&
null!=this.cornerHandles[z].node&&null!=this.cornerHandles[z].node.parentNode&&this.cornerHandles[z].node.parentNode.removeChild(this.cornerHandles[z].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 Ga=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(Ga.apply(this),null!=this.state&&null!=this.linkHint)){var z=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(z=new mxRectangle(z.x,z.y,z.width,z.height),z.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(z.x+(z.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=
-Math.round(z.y+z.height+Editor.hintOffset)+"px"}};var eb=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){eb.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var bb=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){bb.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.graph.removeListener(this.editingHandler),this.editingHandler=null)};var Ha=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(Ha.apply(this),null!=this.state&&null!=this.linkHint)){var z=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(z=new mxRectangle(z.x,z.y,z.width,z.height),z.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(z.x+(z.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=
+Math.round(z.y+z.height+Editor.hintOffset)+"px"}};var db=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){db.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var cb=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){cb.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(c,l,x){mxShape.call(this);this.line=c;this.stroke=l;this.strokewidth=null!=x?x:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function k(){mxSwimlane.call(this)}function n(){mxCylinder.call(this)}function D(){mxCylinder.call(this)}function t(){mxActor.call(this)}function E(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function f(){mxCylinder.call(this)}function g(){mxCylinder.call(this)}function m(){mxShape.call(this)}function q(){mxShape.call(this)}
-function y(c,l,x,p){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=x;this.strokewidth=null!=p?p:1}function F(){mxActor.call(this)}function C(){mxCylinder.call(this)}function I(){mxCylinder.call(this)}function G(){mxActor.call(this)}function Y(){mxActor.call(this)}function ba(){mxActor.call(this)}function Z(){mxActor.call(this)}function X(){mxActor.call(this)}function qa(){mxActor.call(this)}function Q(){mxActor.call(this)}function W(c,l){this.canvas=c;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");
-this.defaultVariation=l;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,W.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,W.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,W.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,W.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,W.prototype.curveTo);
-this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,W.prototype.arcTo)}function ha(){mxRectangleShape.call(this)}function la(){mxRectangleShape.call(this)}function ja(){mxActor.call(this)}function U(){mxActor.call(this)}function L(){mxActor.call(this)}function da(){mxRectangleShape.call(this)}function O(){mxRectangleShape.call(this)}function N(){mxCylinder.call(this)}function aa(){mxShape.call(this)}function ma(){mxShape.call(this)}function u(){mxEllipse.call(this)}function H(){mxShape.call(this)}
-function P(){mxShape.call(this)}function S(){mxRectangleShape.call(this)}function R(){mxShape.call(this)}function ca(){mxShape.call(this)}function ea(){mxShape.call(this)}function fa(){mxShape.call(this)}function ra(){mxShape.call(this)}function ua(){mxCylinder.call(this)}function sa(){mxCylinder.call(this)}function Aa(){mxRectangleShape.call(this)}function Ca(){mxDoubleEllipse.call(this)}function Ba(){mxDoubleEllipse.call(this)}function ta(){mxArrowConnector.call(this);this.spacing=0}function Pa(){mxArrowConnector.call(this);
-this.spacing=0}function Ta(){mxActor.call(this)}function Oa(){mxRectangleShape.call(this)}function Xa(){mxActor.call(this)}function Ga(){mxActor.call(this)}function eb(){mxActor.call(this)}function bb(){mxActor.call(this)}function z(){mxActor.call(this)}function K(){mxActor.call(this)}function M(){mxActor.call(this)}function T(){mxActor.call(this)}function V(){mxActor.call(this)}function ia(){mxActor.call(this)}function na(){mxEllipse.call(this)}function va(){mxEllipse.call(this)}function pa(){mxEllipse.call(this)}
-function za(){mxRhombus.call(this)}function Da(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function La(){mxEllipse.call(this)}function Ua(){mxEllipse.call(this)}function Sa(){mxActor.call(this)}function Fa(){mxActor.call(this)}function wa(){mxActor.call(this)}function ya(c,l,x,p){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=x;this.strokewidth=null!=p?p:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function Na(){mxConnector.call(this)}
-function Ja(c,l,x,p,v,A,B,ka,J,xa){B+=J;var oa=p.clone();p.x-=v*(2*B+J);p.y-=A*(2*B+J);v*=B+J;A*=B+J;return function(){c.ellipse(oa.x-v-B,oa.y-A-B,2*B,2*B);xa?c.fillAndStroke():c.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var c=null;if(null!=this.line)for(var l=0;l<this.line.length;l++){var x=this.line[l];null!=x&&(x=new mxRectangle(x.x,x.y,this.strokewidth,this.strokewidth),null==c?c=x:c.add(x))}this.bounds=null!=c?c:new mxRectangle};b.prototype.paintVertexShape=
+function y(c,l,x,p){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=x;this.strokewidth=null!=p?p:1}function F(){mxActor.call(this)}function C(){mxCylinder.call(this)}function I(){mxCylinder.call(this)}function G(){mxActor.call(this)}function Z(){mxActor.call(this)}function ca(){mxActor.call(this)}function aa(){mxActor.call(this)}function Y(){mxActor.call(this)}function pa(){mxActor.call(this)}function Q(){mxActor.call(this)}function X(c,l){this.canvas=c;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");
+this.defaultVariation=l;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,X.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,X.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,X.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,X.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,X.prototype.curveTo);
+this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,X.prototype.arcTo)}function ha(){mxRectangleShape.call(this)}function U(){mxRectangleShape.call(this)}function ma(){mxActor.call(this)}function T(){mxActor.call(this)}function M(){mxActor.call(this)}function ia(){mxRectangleShape.call(this)}function N(){mxRectangleShape.call(this)}function O(){mxCylinder.call(this)}function ba(){mxShape.call(this)}function la(){mxShape.call(this)}function u(){mxEllipse.call(this)}function H(){mxShape.call(this)}
+function P(){mxShape.call(this)}function W(){mxRectangleShape.call(this)}function R(){mxShape.call(this)}function da(){mxShape.call(this)}function fa(){mxShape.call(this)}function ea(){mxShape.call(this)}function qa(){mxShape.call(this)}function va(){mxCylinder.call(this)}function ua(){mxCylinder.call(this)}function Aa(){mxRectangleShape.call(this)}function za(){mxDoubleEllipse.call(this)}function Ca(){mxDoubleEllipse.call(this)}function sa(){mxArrowConnector.call(this);this.spacing=0}function Va(){mxArrowConnector.call(this);
+this.spacing=0}function Ua(){mxActor.call(this)}function Ra(){mxRectangleShape.call(this)}function Za(){mxActor.call(this)}function Ha(){mxActor.call(this)}function db(){mxActor.call(this)}function cb(){mxActor.call(this)}function z(){mxActor.call(this)}function K(){mxActor.call(this)}function L(){mxActor.call(this)}function S(){mxActor.call(this)}function V(){mxActor.call(this)}function ja(){mxActor.call(this)}function na(){mxEllipse.call(this)}function ya(){mxEllipse.call(this)}function ra(){mxEllipse.call(this)}
+function ta(){mxRhombus.call(this)}function Da(){mxEllipse.call(this)}function Oa(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function Wa(){mxEllipse.call(this)}function Sa(){mxActor.call(this)}function Fa(){mxActor.call(this)}function Ja(){mxActor.call(this)}function xa(c,l,x,p){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=x;this.strokewidth=null!=p?p:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function Ba(){mxConnector.call(this)}
+function Pa(c,l,x,p,v,A,B,ka,J,wa){B+=J;var oa=p.clone();p.x-=v*(2*B+J);p.y-=A*(2*B+J);v*=B+J;A*=B+J;return function(){c.ellipse(oa.x-v-B,oa.y-A-B,2*B,2*B);wa?c.fillAndStroke():c.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var c=null;if(null!=this.line)for(var l=0;l<this.line.length;l++){var x=this.line[l];null!=x&&(x=new mxRectangle(x.x,x.y,this.strokewidth,this.strokewidth),null==c?c=x:c.add(x))}this.bounds=null!=c?c:new mxRectangle};b.prototype.paintVertexShape=
function(c,l,x,p,v){this.paintTableLine(c,this.line,0,0)};b.prototype.paintTableLine=function(c,l,x,p){if(null!=l){var v=null;c.begin();for(var A=0;A<l.length;A++){var B=l[A];null!=B&&(null==v?c.moveTo(B.x+x,B.y+p):null!=v&&c.lineTo(B.x+x,B.y+p));v=B}c.end();c.stroke()}};b.prototype.intersectsRectangle=function(c){var l=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var x=null,p=0;p<this.line.length&&!l;p++){var v=this.line[p];null!=v&&null!=x&&(l=mxUtils.rectangleIntersectsSegment(c,
-x,v));x=v}return l};mxCellRenderer.registerShape("tableLine",b);mxUtils.extend(e,mxSwimlane);e.prototype.getLabelBounds=function(c){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};e.prototype.paintVertexShape=function(c,l,x,p,v){var A=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):!1,B=this.isHorizontal(),ka=this.getTitleSize();0==ka||this.outline?La.prototype.paintVertexShape.apply(this,
+x,v));x=v}return l};mxCellRenderer.registerShape("tableLine",b);mxUtils.extend(e,mxSwimlane);e.prototype.getLabelBounds=function(c){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};e.prototype.paintVertexShape=function(c,l,x,p,v){var A=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):!1,B=this.isHorizontal(),ka=this.getTitleSize();0==ka||this.outline?Ma.prototype.paintVertexShape.apply(this,
arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-l,-x));A||this.outline||!(B&&ka<v||!B&&ka<p)||this.paintForeground(c,l,x,p,v)};e.prototype.paintForeground=function(c,l,x,p,v){if(null!=this.state){var A=this.flipH,B=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var ka=A;A=B;B=ka}c.rotate(-this.getShapeRotation(),A,B,l+p/2,x+v/2);s=this.scale;l=this.bounds.x/s;x=this.bounds.y/s;p=this.bounds.width/s;v=this.bounds.height/
s;this.paintTableForeground(c,l,x,p,v)}};e.prototype.paintTableForeground=function(c,l,x,p,v){p=this.state.view.graph.getTableLines(this.state.cell,"0"!=mxUtils.getValue(this.state.style,"rowLines","1"),"0"!=mxUtils.getValue(this.state.style,"columnLines","1"));for(v=0;v<p.length;v++)b.prototype.paintTableLine(c,p[v],l,x)};e.prototype.configurePointerEvents=function(c){0==this.getTitleSize()?c.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",
e);mxUtils.extend(k,e);k.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",k);mxUtils.extend(n,mxCylinder);n.prototype.size=20;n.prototype.darkOpacity=0;n.prototype.darkOpacity2=0;n.prototype.paintVertexShape=function(c,l,x,p,v){var A=Math.max(0,Math.min(p,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),B=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),ka=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,
"darkOpacity2",this.darkOpacity2))));c.translate(l,x);c.begin();c.moveTo(0,0);c.lineTo(p-A,0);c.lineTo(p,A);c.lineTo(p,v);c.lineTo(A,v);c.lineTo(0,v-A);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=B&&(c.setFillAlpha(Math.abs(B)),c.setFillColor(0>B?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(p-A,0),c.lineTo(p,A),c.lineTo(A,A),c.close(),c.fill()),0!=ka&&(c.setFillAlpha(Math.abs(ka)),c.setFillColor(0>ka?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(A,
-A),c.lineTo(A,v),c.lineTo(0,v-A),c.close(),c.fill()),c.begin(),c.moveTo(A,v),c.lineTo(A,A),c.lineTo(0,0),c.moveTo(A,A),c.lineTo(p,A),c.end(),c.stroke())};n.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?(c=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(c,c,0,0)):null};mxCellRenderer.registerShape("cube",n);var Qa=Math.tan(mxUtils.toRadians(30)),Za=(.5-Qa)/2;mxCellRenderer.registerShape("isoRectangle",t);mxUtils.extend(D,
-mxCylinder);D.prototype.size=6;D.prototype.paintVertexShape=function(c,l,x,p,v){c.setFillColor(this.stroke);var A=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;c.ellipse(l+.5*(p-A),x+.5*(v-A),A,A);c.fill();c.setFillColor(mxConstants.NONE);c.rect(l,x,p,v);c.fill()};mxCellRenderer.registerShape("waypoint",D);mxUtils.extend(t,mxActor);t.prototype.size=20;t.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(p,v/Qa);c.translate((p-l)/2,(v-l)/2+l/4);c.moveTo(0,
-.25*l);c.lineTo(.5*l,l*Za);c.lineTo(l,.25*l);c.lineTo(.5*l,(.5-Za)*l);c.lineTo(0,.25*l);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",t);mxUtils.extend(E,mxCylinder);E.prototype.size=20;E.prototype.redrawPath=function(c,l,x,p,v,A){l=Math.min(p,v/(.5+Qa));A?(c.moveTo(0,.25*l),c.lineTo(.5*l,(.5-Za)*l),c.lineTo(l,.25*l),c.moveTo(.5*l,(.5-Za)*l),c.lineTo(.5*l,(1-Za)*l)):(c.translate((p-l)/2,(v-l)/2),c.moveTo(0,.25*l),c.lineTo(.5*l,l*Za),c.lineTo(l,.25*l),c.lineTo(l,.75*l),c.lineTo(.5*
-l,(1-Za)*l),c.lineTo(0,.75*l),c.close());c.end()};mxCellRenderer.registerShape("isoCube",E);mxUtils.extend(d,mxCylinder);d.prototype.redrawPath=function(c,l,x,p,v,A){l=Math.min(v/2,Math.round(v/8)+this.strokewidth-1);if(A&&null!=this.fill||!A&&null==this.fill)c.moveTo(0,l),c.curveTo(0,2*l,p,2*l,p,l),A||(c.stroke(),c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,p,2*l,p,l),A||(c.stroke(),c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,p,2*l,p,l),A||(c.stroke(),c.begin()),c.translate(0,
+A),c.lineTo(A,v),c.lineTo(0,v-A),c.close(),c.fill()),c.begin(),c.moveTo(A,v),c.lineTo(A,A),c.lineTo(0,0),c.moveTo(A,A),c.lineTo(p,A),c.end(),c.stroke())};n.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?(c=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(c,c,0,0)):null};mxCellRenderer.registerShape("cube",n);var Ka=Math.tan(mxUtils.toRadians(30)),Na=(.5-Ka)/2;mxCellRenderer.registerShape("isoRectangle",t);mxUtils.extend(D,
+mxCylinder);D.prototype.size=6;D.prototype.paintVertexShape=function(c,l,x,p,v){c.setFillColor(this.stroke);var A=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;c.ellipse(l+.5*(p-A),x+.5*(v-A),A,A);c.fill();c.setFillColor(mxConstants.NONE);c.rect(l,x,p,v);c.fill()};mxCellRenderer.registerShape("waypoint",D);mxUtils.extend(t,mxActor);t.prototype.size=20;t.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(p,v/Ka);c.translate((p-l)/2,(v-l)/2+l/4);c.moveTo(0,
+.25*l);c.lineTo(.5*l,l*Na);c.lineTo(l,.25*l);c.lineTo(.5*l,(.5-Na)*l);c.lineTo(0,.25*l);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",t);mxUtils.extend(E,mxCylinder);E.prototype.size=20;E.prototype.redrawPath=function(c,l,x,p,v,A){l=Math.min(p,v/(.5+Ka));A?(c.moveTo(0,.25*l),c.lineTo(.5*l,(.5-Na)*l),c.lineTo(l,.25*l),c.moveTo(.5*l,(.5-Na)*l),c.lineTo(.5*l,(1-Na)*l)):(c.translate((p-l)/2,(v-l)/2),c.moveTo(0,.25*l),c.lineTo(.5*l,l*Na),c.lineTo(l,.25*l),c.lineTo(l,.75*l),c.lineTo(.5*
+l,(1-Na)*l),c.lineTo(0,.75*l),c.close());c.end()};mxCellRenderer.registerShape("isoCube",E);mxUtils.extend(d,mxCylinder);d.prototype.redrawPath=function(c,l,x,p,v,A){l=Math.min(v/2,Math.round(v/8)+this.strokewidth-1);if(A&&null!=this.fill||!A&&null==this.fill)c.moveTo(0,l),c.curveTo(0,2*l,p,2*l,p,l),A||(c.stroke(),c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,p,2*l,p,l),A||(c.stroke(),c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,p,2*l,p,l),A||(c.stroke(),c.begin()),c.translate(0,
-l);A||(c.moveTo(0,l),c.curveTo(0,-l/3,p,-l/3,p,l),c.lineTo(p,v-l),c.curveTo(p,v+l/3,0,v+l/3,0,v-l),c.close())};d.prototype.getLabelMargins=function(c){return new mxRectangle(0,2.5*Math.min(c.height/2,Math.round(c.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",d);mxUtils.extend(f,mxCylinder);f.prototype.size=30;f.prototype.darkOpacity=0;f.prototype.paintVertexShape=function(c,l,x,p,v){var A=Math.max(0,Math.min(p,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",
this.size))))),B=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));c.translate(l,x);c.begin();c.moveTo(0,0);c.lineTo(p-A,0);c.lineTo(p,A);c.lineTo(p,v);c.lineTo(0,v);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=B&&(c.setFillAlpha(Math.abs(B)),c.setFillColor(0>B?"#FFFFFF":"#000000"),c.begin(),c.moveTo(p-A,0),c.lineTo(p-A,A),c.lineTo(p,A),c.close(),c.fill()),c.begin(),c.moveTo(p-A,0),c.lineTo(p-A,A),c.lineTo(p,A),
c.end(),c.stroke())};mxCellRenderer.registerShape("note",f);mxUtils.extend(g,f);mxCellRenderer.registerShape("note2",g);g.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,l*this.scale),0,0)}return null};mxUtils.extend(m,mxShape);m.prototype.isoAngle=15;m.prototype.paintVertexShape=function(c,l,x,p,v){var A=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,
@@ -2699,198 +2702,198 @@ c.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(c
l))}return new mxRectangle(0,Math.min(c.height,l),0,0)}return null};mxUtils.extend(I,mxCylinder);I.prototype.arcSize=.1;I.prototype.paintVertexShape=function(c,l,x,p,v){c.translate(l,x);var A=mxUtils.getValue(this.style,"rounded",!1),B=mxUtils.getValue(this.style,"absoluteArcSize",!1);l=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));x=mxUtils.getValue(this.style,"umlStateConnection",null);B||(l*=Math.min(p,v));l=Math.min(l,.5*p,.5*v);A||(l=0);A=0;null!=x&&(A=10);c.begin();c.moveTo(A,
l);c.arcTo(l,l,0,0,1,A+l,0);c.lineTo(p-l,0);c.arcTo(l,l,0,0,1,p,l);c.lineTo(p,v-l);c.arcTo(l,l,0,0,1,p-l,v);c.lineTo(A+l,v);c.arcTo(l,l,0,0,1,A,v-l);c.close();c.fillAndStroke();c.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(c.roundrect(p-40,v-20,10,10,3,3),c.stroke(),c.roundrect(p-20,v-20,10,10,3,3),c.stroke(),c.begin(),c.moveTo(p-30,v-15),c.lineTo(p-20,v-15),c.stroke());"connPointRefEntry"==x?(c.ellipse(0,.5*v-10,20,20),c.fillAndStroke()):"connPointRefExit"==
x&&(c.ellipse(0,.5*v-10,20,20),c.fillAndStroke(),c.begin(),c.moveTo(5,.5*v-5),c.lineTo(15,.5*v+5),c.moveTo(15,.5*v-5),c.lineTo(5,.5*v+5),c.stroke())};I.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",I);mxUtils.extend(G,mxActor);G.prototype.size=30;G.prototype.isRoundable=function(){return!0};G.prototype.redrawPath=
-function(c,l,x,p,v){l=Math.max(0,Math.min(p,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(p,0),new mxPoint(p,v),new mxPoint(0,v),new mxPoint(0,l)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("card",G);mxUtils.extend(Y,mxActor);Y.prototype.size=.4;Y.prototype.redrawPath=function(c,l,x,p,v){l=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));c.moveTo(0,l/2);c.quadTo(p/4,1.4*l,p/2,l/2);c.quadTo(3*p/4,l*(1-1.4),p,l/2);c.lineTo(p,v-l/2);c.quadTo(3*p/4,v-1.4*l,p/2,v-l/2);c.quadTo(p/4,v-l*(1-1.4),0,v-l/2);c.lineTo(0,l/2);c.close();c.end()};Y.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",this.size),x=c.width,p=c.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return l*=
-p,new mxRectangle(c.x,c.y+l,x,p-2*l);l*=x;return new mxRectangle(c.x+l,c.y,x-2*l,p)}return c};mxCellRenderer.registerShape("tape",Y);mxUtils.extend(ba,mxActor);ba.prototype.size=.3;ba.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*c.height):null};ba.prototype.redrawPath=function(c,l,x,p,v){l=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,
-0);c.lineTo(p,0);c.lineTo(p,v-l/2);c.quadTo(3*p/4,v-1.4*l,p/2,v-l/2);c.quadTo(p/4,v-l*(1-1.4),0,v-l/2);c.lineTo(0,l/2);c.close();c.end()};mxCellRenderer.registerShape("document",ba);var cb=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,l,x,p){var v=mxUtils.getValue(this.style,"size");return null!=v?p*Math.max(0,Math.min(1,v)):cb.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=2*mxUtils.getValue(this.style,
+function(c,l,x,p,v){l=Math.max(0,Math.min(p,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(p,0),new mxPoint(p,v),new mxPoint(0,v),new mxPoint(0,l)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("card",G);mxUtils.extend(Z,mxActor);Z.prototype.size=.4;Z.prototype.redrawPath=function(c,l,x,p,v){l=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));c.moveTo(0,l/2);c.quadTo(p/4,1.4*l,p/2,l/2);c.quadTo(3*p/4,l*(1-1.4),p,l/2);c.lineTo(p,v-l/2);c.quadTo(3*p/4,v-1.4*l,p/2,v-l/2);c.quadTo(p/4,v-l*(1-1.4),0,v-l/2);c.lineTo(0,l/2);c.close();c.end()};Z.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",this.size),x=c.width,p=c.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return l*=
+p,new mxRectangle(c.x,c.y+l,x,p-2*l);l*=x;return new mxRectangle(c.x+l,c.y,x-2*l,p)}return c};mxCellRenderer.registerShape("tape",Z);mxUtils.extend(ca,mxActor);ca.prototype.size=.3;ca.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*c.height):null};ca.prototype.redrawPath=function(c,l,x,p,v){l=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,
+0);c.lineTo(p,0);c.lineTo(p,v-l/2);c.quadTo(3*p/4,v-1.4*l,p/2,v-l/2);c.quadTo(p/4,v-l*(1-1.4),0,v-l/2);c.lineTo(0,l/2);c.close();c.end()};mxCellRenderer.registerShape("document",ca);var hb=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,l,x,p){var v=mxUtils.getValue(this.style,"size");return null!=v?p*Math.max(0,Math.min(1,v)):hb.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=2*mxUtils.getValue(this.style,
"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,c.height*l),0,0)}return null};y.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(l/=2);return new mxRectangle(0,Math.min(c.height*this.scale,2*l*this.scale),0,Math.max(0,.3*l*this.scale))}return null};C.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,
"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var x=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var p=mxUtils.getValue(this.style,"rounded",!1),v=mxUtils.getValue(this.style,"absoluteArcSize",!1),A=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));v||(A*=Math.min(c.width,c.height));A=Math.min(A,.5*c.width,.5*(c.height-l));p||(A=0);return"left"==mxUtils.getValue(this.style,"tabPosition",
this.tabPosition)?new mxRectangle(A,0,Math.min(c.width,c.width-x),Math.min(c.height,c.height-l)):new mxRectangle(Math.min(c.width,c.width-x),0,A,Math.min(c.height,c.height-l))}return new mxRectangle(0,Math.min(c.height,l),0,0)}return null};I.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};g.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,
-"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,l*this.scale),0,Math.max(0,l*this.scale))}return null};mxUtils.extend(Z,mxActor);Z.prototype.size=.2;Z.prototype.fixedSize=20;Z.prototype.isRoundable=function(){return!0};Z.prototype.redrawPath=function(c,l,x,p,v){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(l,0),new mxPoint(p,0),new mxPoint(p-l,v)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("parallelogram",Z);mxUtils.extend(X,mxActor);X.prototype.size=.2;X.prototype.fixedSize=20;X.prototype.isRoundable=function(){return!0};X.prototype.redrawPath=function(c,l,x,p,v){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*
-p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):p*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(l,0),new mxPoint(p-l,0),new mxPoint(p,v)],this.isRounded,x,!0)};mxCellRenderer.registerShape("trapezoid",X);mxUtils.extend(qa,mxActor);qa.prototype.size=.5;qa.prototype.redrawPath=function(c,l,x,p,v){c.setFillColor(null);
-l=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(p,0),new mxPoint(l,0),new mxPoint(l,v/2),new mxPoint(0,v/2),new mxPoint(l,v/2),new mxPoint(l,v),new mxPoint(p,v)],this.isRounded,x,!1);c.end()};mxCellRenderer.registerShape("curlyBracket",qa);mxUtils.extend(Q,mxActor);Q.prototype.redrawPath=function(c,l,x,p,v){c.setStrokeWidth(1);c.setFillColor(this.stroke);
-l=p/5;c.rect(0,0,l,v);c.fillAndStroke();c.rect(2*l,0,l,v);c.fillAndStroke();c.rect(4*l,0,l,v);c.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",Q);W.prototype.moveTo=function(c,l){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;this.firstX=c;this.firstY=l};W.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};
-W.prototype.quadTo=function(c,l,x,p){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=x;this.lastY=p};W.prototype.curveTo=function(c,l,x,p,v,A){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=A};W.prototype.arcTo=function(c,l,x,p,v,A,B){this.originalArcTo.apply(this.canvas,arguments);this.lastX=A;this.lastY=B};W.prototype.lineTo=function(c,l){if(null!=this.lastX&&null!=this.lastY){var x=function(oa){return"number"===typeof oa?oa?0>oa?-1:1:oa===oa?0:NaN:NaN},p=
-Math.abs(c-this.lastX),v=Math.abs(l-this.lastY),A=Math.sqrt(p*p+v*v);if(2>A){this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;return}var B=Math.round(A/10),ka=this.defaultVariation;5>B&&(B=5,ka/=3);var J=x(c-this.lastX)*p/B;x=x(l-this.lastY)*v/B;p/=A;v/=A;for(A=0;A<B;A++){var xa=(Math.random()-.5)*ka;this.originalLineTo.call(this.canvas,J*A+this.lastX-xa*v,x*A+this.lastY-xa*p)}this.originalLineTo.call(this.canvas,c,l)}else this.originalLineTo.apply(this.canvas,arguments);
-this.lastX=c;this.lastY=l};W.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};mxShape.prototype.defaultJiggle=1.5;var fb=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(c){fb.apply(this,arguments);null==c.handJiggle&&(c.handJiggle=this.createHandJiggle(c))};var qb=mxShape.prototype.afterPaint;
-mxShape.prototype.afterPaint=function(c){qb.apply(this,arguments);null!=c.handJiggle&&(c.handJiggle.destroy(),delete c.handJiggle)};mxShape.prototype.createComicCanvas=function(c){return new W(c,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(c){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(c)};mxRhombus.prototype.defaultJiggle=2;var ub=mxRectangleShape.prototype.isHtmlAllowed;
-mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&ub.apply(this,arguments)};var ab=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(c,l,x,p,v){if(null==c.handJiggle||c.handJiggle.constructor!=W)ab.apply(this,arguments);else{var A=!0;null!=this.style&&(A="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,
+"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,l*this.scale),0,Math.max(0,l*this.scale))}return null};mxUtils.extend(aa,mxActor);aa.prototype.size=.2;aa.prototype.fixedSize=20;aa.prototype.isRoundable=function(){return!0};aa.prototype.redrawPath=function(c,l,x,p,v){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(l,0),new mxPoint(p,0),new mxPoint(p-l,v)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("parallelogram",aa);mxUtils.extend(Y,mxActor);Y.prototype.size=.2;Y.prototype.fixedSize=20;Y.prototype.isRoundable=function(){return!0};Y.prototype.redrawPath=function(c,l,x,p,v){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*
+p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):p*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(l,0),new mxPoint(p-l,0),new mxPoint(p,v)],this.isRounded,x,!0)};mxCellRenderer.registerShape("trapezoid",Y);mxUtils.extend(pa,mxActor);pa.prototype.size=.5;pa.prototype.redrawPath=function(c,l,x,p,v){c.setFillColor(null);
+l=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(p,0),new mxPoint(l,0),new mxPoint(l,v/2),new mxPoint(0,v/2),new mxPoint(l,v/2),new mxPoint(l,v),new mxPoint(p,v)],this.isRounded,x,!1);c.end()};mxCellRenderer.registerShape("curlyBracket",pa);mxUtils.extend(Q,mxActor);Q.prototype.redrawPath=function(c,l,x,p,v){c.setStrokeWidth(1);c.setFillColor(this.stroke);
+l=p/5;c.rect(0,0,l,v);c.fillAndStroke();c.rect(2*l,0,l,v);c.fillAndStroke();c.rect(4*l,0,l,v);c.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",Q);X.prototype.moveTo=function(c,l){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;this.firstX=c;this.firstY=l};X.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};
+X.prototype.quadTo=function(c,l,x,p){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=x;this.lastY=p};X.prototype.curveTo=function(c,l,x,p,v,A){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=A};X.prototype.arcTo=function(c,l,x,p,v,A,B){this.originalArcTo.apply(this.canvas,arguments);this.lastX=A;this.lastY=B};X.prototype.lineTo=function(c,l){if(null!=this.lastX&&null!=this.lastY){var x=function(oa){return"number"===typeof oa?oa?0>oa?-1:1:oa===oa?0:NaN:NaN},p=
+Math.abs(c-this.lastX),v=Math.abs(l-this.lastY),A=Math.sqrt(p*p+v*v);if(2>A){this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;return}var B=Math.round(A/10),ka=this.defaultVariation;5>B&&(B=5,ka/=3);var J=x(c-this.lastX)*p/B;x=x(l-this.lastY)*v/B;p/=A;v/=A;for(A=0;A<B;A++){var wa=(Math.random()-.5)*ka;this.originalLineTo.call(this.canvas,J*A+this.lastX-wa*v,x*A+this.lastY-wa*p)}this.originalLineTo.call(this.canvas,c,l)}else this.originalLineTo.apply(this.canvas,arguments);
+this.lastX=c;this.lastY=l};X.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};mxShape.prototype.defaultJiggle=1.5;var Qa=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(c){Qa.apply(this,arguments);null==c.handJiggle&&(c.handJiggle=this.createHandJiggle(c))};var mb=mxShape.prototype.afterPaint;
+mxShape.prototype.afterPaint=function(c){mb.apply(this,arguments);null!=c.handJiggle&&(c.handJiggle.destroy(),delete c.handJiggle)};mxShape.prototype.createComicCanvas=function(c){return new X(c,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(c){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(c)};mxRhombus.prototype.defaultJiggle=2;var ub=mxRectangleShape.prototype.isHtmlAllowed;
+mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&ub.apply(this,arguments)};var bb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(c,l,x,p,v){if(null==c.handJiggle||c.handJiggle.constructor!=X)bb.apply(this,arguments);else{var A=!0;null!=this.style&&(A="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,
"1"));if(A||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)A||null!=this.fill&&this.fill!=mxConstants.NONE||(c.pointerEvents=!1),c.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?A=Math.min(p/2,Math.min(v/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,A=Math.min(p*
A,v*A)),c.moveTo(l+A,x),c.lineTo(l+p-A,x),c.quadTo(l+p,x,l+p,x+A),c.lineTo(l+p,x+v-A),c.quadTo(l+p,x+v,l+p-A,x+v),c.lineTo(l+A,x+v),c.quadTo(l,x+v,l,x+v-A),c.lineTo(l,x+A),c.quadTo(l,x,l+A,x)):(c.moveTo(l,x),c.lineTo(l+p,x),c.lineTo(l+p,x+v),c.lineTo(l,x+v),c.lineTo(l,x)),c.close(),c.end(),c.fillAndStroke()}};mxUtils.extend(ha,mxRectangleShape);ha.prototype.size=.1;ha.prototype.fixedSize=!1;ha.prototype.isHtmlAllowed=function(){return!1};ha.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.state.style,
mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var l=c.width,x=c.height;c=new mxRectangle(c.x,c.y,l,x);var p=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;p=Math.max(p,Math.min(l*v,x*v))}c.x+=Math.round(p);c.width-=Math.round(2*p);return c}return c};
ha.prototype.paintForeground=function(c,l,x,p,v){var A=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),B=parseFloat(mxUtils.getValue(this.style,"size",this.size));B=A?Math.max(0,Math.min(p,B)):p*Math.max(0,Math.min(1,B));this.isRounded&&(A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,B=Math.max(B,Math.min(p*A,v*A)));B=Math.round(B);c.begin();c.moveTo(l+B,x);c.lineTo(l+B,x+v);c.moveTo(l+p-B,x);c.lineTo(l+p-B,x+v);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
-arguments)};mxCellRenderer.registerShape("process",ha);mxCellRenderer.registerShape("process2",ha);mxUtils.extend(la,mxRectangleShape);la.prototype.paintBackground=function(c,l,x,p,v){c.setFillColor(mxConstants.NONE);c.rect(l,x,p,v);c.fill()};la.prototype.paintForeground=function(c,l,x,p,v){};mxCellRenderer.registerShape("transparent",la);mxUtils.extend(ja,mxHexagon);ja.prototype.size=30;ja.prototype.position=.5;ja.prototype.position2=.5;ja.prototype.base=20;ja.prototype.getLabelMargins=function(){return new mxRectangle(0,
-0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};ja.prototype.isRoundable=function(){return!0};ja.prototype.redrawPath=function(c,l,x,p,v){l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var A=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),B=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",
-this.position2)))),ka=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,v-x),new mxPoint(Math.min(p,A+ka),v-x),new mxPoint(B,v),new mxPoint(Math.max(0,A),v-x),new mxPoint(0,v-x)],this.isRounded,l,!0,[4])};mxCellRenderer.registerShape("callout",ja);mxUtils.extend(U,mxActor);U.prototype.size=.2;U.prototype.fixedSize=20;U.prototype.isRoundable=function(){return!0};U.prototype.redrawPath=function(c,l,x,p,
+arguments)};mxCellRenderer.registerShape("process",ha);mxCellRenderer.registerShape("process2",ha);mxUtils.extend(U,mxRectangleShape);U.prototype.paintBackground=function(c,l,x,p,v){c.setFillColor(mxConstants.NONE);c.rect(l,x,p,v);c.fill()};U.prototype.paintForeground=function(c,l,x,p,v){};mxCellRenderer.registerShape("transparent",U);mxUtils.extend(ma,mxHexagon);ma.prototype.size=30;ma.prototype.position=.5;ma.prototype.position2=.5;ma.prototype.base=20;ma.prototype.getLabelMargins=function(){return new mxRectangle(0,
+0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};ma.prototype.isRoundable=function(){return!0};ma.prototype.redrawPath=function(c,l,x,p,v){l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var A=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),B=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",
+this.position2)))),ka=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,v-x),new mxPoint(Math.min(p,A+ka),v-x),new mxPoint(B,v),new mxPoint(Math.max(0,A),v-x),new mxPoint(0,v-x)],this.isRounded,l,!0,[4])};mxCellRenderer.registerShape("callout",ma);mxUtils.extend(T,mxActor);T.prototype.size=.2;T.prototype.fixedSize=20;T.prototype.isRoundable=function(){return!0};T.prototype.redrawPath=function(c,l,x,p,
v){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p-l,0),new mxPoint(p,v/2),new mxPoint(p-l,v),new mxPoint(0,v),new mxPoint(l,v/2)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("step",
-U);mxUtils.extend(L,mxHexagon);L.prototype.size=.25;L.prototype.fixedSize=20;L.prototype.isRoundable=function(){return!0};L.prototype.redrawPath=function(c,l,x,p,v){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,
-0),new mxPoint(p-l,0),new mxPoint(p,.5*v),new mxPoint(p-l,v),new mxPoint(l,v),new mxPoint(0,.5*v)],this.isRounded,x,!0)};mxCellRenderer.registerShape("hexagon",L);mxUtils.extend(da,mxRectangleShape);da.prototype.isHtmlAllowed=function(){return!1};da.prototype.paintForeground=function(c,l,x,p,v){var A=Math.min(p/5,v/5)+1;c.begin();c.moveTo(l+p/2,x+A);c.lineTo(l+p/2,x+v-A);c.moveTo(l+A,x+v/2);c.lineTo(l+p-A,x+v/2);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
-mxCellRenderer.registerShape("plus",da);var db=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};mxRhombus.prototype.paintVertexShape=function(c,l,x,p,v){db.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var A=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
-0);l+=A;x+=A;p-=2*A;v-=2*A;0<p&&0<v&&(c.setShadow(!1),db.apply(this,[c,l,x,p,v]))}};mxUtils.extend(O,mxRectangleShape);O.prototype.isHtmlAllowed=function(){return!1};O.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};O.prototype.paintForeground=function(c,l,x,p,v){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var A=
-Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);l+=A;x+=A;p-=2*A;v-=2*A;0<p&&0<v&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}c.setDashed(!1);A=0;do{var B=mxCellRenderer.defaultShapes[this.style["symbol"+A]];if(null!=B){var ka=this.style["symbol"+A+"Align"],J=this.style["symbol"+A+"VerticalAlign"],xa=this.style["symbol"+A+"Width"],oa=this.style["symbol"+A+"Height"],$a=this.style["symbol"+A+"Spacing"]||0,jb=this.style["symbol"+A+"VSpacing"]||
-$a,hb=this.style["symbol"+A+"ArcSpacing"];null!=hb&&(hb*=this.getArcSize(p+this.strokewidth,v+this.strokewidth),$a+=hb,jb+=hb);hb=l;var Ea=x;hb=ka==mxConstants.ALIGN_CENTER?hb+(p-xa)/2:ka==mxConstants.ALIGN_RIGHT?hb+(p-xa-$a):hb+$a;Ea=J==mxConstants.ALIGN_MIDDLE?Ea+(v-oa)/2:J==mxConstants.ALIGN_BOTTOM?Ea+(v-oa-jb):Ea+jb;c.save();ka=new B;ka.style=this.style;B.prototype.paintVertexShape.call(ka,c,hb,Ea,xa,oa);c.restore()}A++}while(null!=B)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
-mxCellRenderer.registerShape("ext",O);mxUtils.extend(N,mxCylinder);N.prototype.redrawPath=function(c,l,x,p,v,A){A?(c.moveTo(0,0),c.lineTo(p/2,v/2),c.lineTo(p,0),c.end()):(c.moveTo(0,0),c.lineTo(p,0),c.lineTo(p,v),c.lineTo(0,v),c.close())};mxCellRenderer.registerShape("message",N);mxUtils.extend(aa,mxShape);aa.prototype.paintBackground=function(c,l,x,p,v){c.translate(l,x);c.ellipse(p/4,0,p/2,v/4);c.fillAndStroke();c.begin();c.moveTo(p/2,v/4);c.lineTo(p/2,2*v/3);c.moveTo(p/2,v/3);c.lineTo(0,v/3);c.moveTo(p/
-2,v/3);c.lineTo(p,v/3);c.moveTo(p/2,2*v/3);c.lineTo(0,v);c.moveTo(p/2,2*v/3);c.lineTo(p,v);c.end();c.stroke()};mxCellRenderer.registerShape("umlActor",aa);mxUtils.extend(ma,mxShape);ma.prototype.getLabelMargins=function(c){return new mxRectangle(c.width/6,0,0,0)};ma.prototype.paintBackground=function(c,l,x,p,v){c.translate(l,x);c.begin();c.moveTo(0,v/4);c.lineTo(0,3*v/4);c.end();c.stroke();c.begin();c.moveTo(0,v/2);c.lineTo(p/6,v/2);c.end();c.stroke();c.ellipse(p/6,0,5*p/6,v);c.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",
-ma);mxUtils.extend(u,mxEllipse);u.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+p/8,x+v);c.lineTo(l+7*p/8,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("umlEntity",u);mxUtils.extend(H,mxShape);H.prototype.paintVertexShape=function(c,l,x,p,v){c.translate(l,x);c.begin();c.moveTo(p,0);c.lineTo(0,v);c.moveTo(0,0);c.lineTo(p,v);c.end();c.stroke()};mxCellRenderer.registerShape("umlDestroy",H);mxUtils.extend(P,mxShape);
-P.prototype.getLabelBounds=function(c){return new mxRectangle(c.x,c.y+c.height/8,c.width,7*c.height/8)};P.prototype.paintBackground=function(c,l,x,p,v){c.translate(l,x);c.begin();c.moveTo(3*p/8,v/8*1.1);c.lineTo(5*p/8,0);c.end();c.stroke();c.ellipse(0,v/8,p,7*v/8);c.fillAndStroke()};P.prototype.paintForeground=function(c,l,x,p,v){c.begin();c.moveTo(3*p/8,v/8*1.1);c.lineTo(5*p/8,v/4);c.end();c.stroke()};mxCellRenderer.registerShape("umlControl",P);mxUtils.extend(S,mxRectangleShape);S.prototype.size=
-40;S.prototype.isHtmlAllowed=function(){return!1};S.prototype.getLabelBounds=function(c){var l=Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(c.x,c.y,c.width,l)};S.prototype.paintBackground=function(c,l,x,p,v){var A=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),B=mxUtils.getValue(this.style,"participant");null==B||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,c,l,
-x,p,A):(B=this.state.view.graph.cellRenderer.getShape(B),null!=B&&B!=S&&(B=new B,B.apply(this.state),c.save(),B.paintVertexShape(c,l,x,p,A),c.restore()));A<v&&(c.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),c.begin(),c.moveTo(l+p/2,x+A),c.lineTo(l+p/2,x+v),c.end(),c.stroke())};S.prototype.paintForeground=function(c,l,x,p,v){var A=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,c,l,x,p,Math.min(v,
-A))};mxCellRenderer.registerShape("umlLifeline",S);mxUtils.extend(R,mxShape);R.prototype.width=60;R.prototype.height=30;R.prototype.corner=10;R.prototype.getLabelMargins=function(c){return new mxRectangle(0,0,c.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),c.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};R.prototype.paintBackground=function(c,l,x,p,v){var A=this.corner,B=Math.min(p,Math.max(A,parseFloat(mxUtils.getValue(this.style,
+T);mxUtils.extend(M,mxHexagon);M.prototype.size=.25;M.prototype.fixedSize=20;M.prototype.isRoundable=function(){return!0};M.prototype.redrawPath=function(c,l,x,p,v){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,
+0),new mxPoint(p-l,0),new mxPoint(p,.5*v),new mxPoint(p-l,v),new mxPoint(l,v),new mxPoint(0,.5*v)],this.isRounded,x,!0)};mxCellRenderer.registerShape("hexagon",M);mxUtils.extend(ia,mxRectangleShape);ia.prototype.isHtmlAllowed=function(){return!1};ia.prototype.paintForeground=function(c,l,x,p,v){var A=Math.min(p/5,v/5)+1;c.begin();c.moveTo(l+p/2,x+A);c.lineTo(l+p/2,x+v-A);c.moveTo(l+A,x+v/2);c.lineTo(l+p-A,x+v/2);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
+mxCellRenderer.registerShape("plus",ia);var eb=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};mxRhombus.prototype.paintVertexShape=function(c,l,x,p,v){eb.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var A=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
+0);l+=A;x+=A;p-=2*A;v-=2*A;0<p&&0<v&&(c.setShadow(!1),eb.apply(this,[c,l,x,p,v]))}};mxUtils.extend(N,mxRectangleShape);N.prototype.isHtmlAllowed=function(){return!1};N.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};N.prototype.paintForeground=function(c,l,x,p,v){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var A=
+Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);l+=A;x+=A;p-=2*A;v-=2*A;0<p&&0<v&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}c.setDashed(!1);A=0;do{var B=mxCellRenderer.defaultShapes[this.style["symbol"+A]];if(null!=B){var ka=this.style["symbol"+A+"Align"],J=this.style["symbol"+A+"VerticalAlign"],wa=this.style["symbol"+A+"Width"],oa=this.style["symbol"+A+"Height"],ab=this.style["symbol"+A+"Spacing"]||0,jb=this.style["symbol"+A+"VSpacing"]||
+ab,gb=this.style["symbol"+A+"ArcSpacing"];null!=gb&&(gb*=this.getArcSize(p+this.strokewidth,v+this.strokewidth),ab+=gb,jb+=gb);gb=l;var Ea=x;gb=ka==mxConstants.ALIGN_CENTER?gb+(p-wa)/2:ka==mxConstants.ALIGN_RIGHT?gb+(p-wa-ab):gb+ab;Ea=J==mxConstants.ALIGN_MIDDLE?Ea+(v-oa)/2:J==mxConstants.ALIGN_BOTTOM?Ea+(v-oa-jb):Ea+jb;c.save();ka=new B;ka.style=this.style;B.prototype.paintVertexShape.call(ka,c,gb,Ea,wa,oa);c.restore()}A++}while(null!=B)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
+mxCellRenderer.registerShape("ext",N);mxUtils.extend(O,mxCylinder);O.prototype.redrawPath=function(c,l,x,p,v,A){A?(c.moveTo(0,0),c.lineTo(p/2,v/2),c.lineTo(p,0),c.end()):(c.moveTo(0,0),c.lineTo(p,0),c.lineTo(p,v),c.lineTo(0,v),c.close())};mxCellRenderer.registerShape("message",O);mxUtils.extend(ba,mxShape);ba.prototype.paintBackground=function(c,l,x,p,v){c.translate(l,x);c.ellipse(p/4,0,p/2,v/4);c.fillAndStroke();c.begin();c.moveTo(p/2,v/4);c.lineTo(p/2,2*v/3);c.moveTo(p/2,v/3);c.lineTo(0,v/3);c.moveTo(p/
+2,v/3);c.lineTo(p,v/3);c.moveTo(p/2,2*v/3);c.lineTo(0,v);c.moveTo(p/2,2*v/3);c.lineTo(p,v);c.end();c.stroke()};mxCellRenderer.registerShape("umlActor",ba);mxUtils.extend(la,mxShape);la.prototype.getLabelMargins=function(c){return new mxRectangle(c.width/6,0,0,0)};la.prototype.paintBackground=function(c,l,x,p,v){c.translate(l,x);c.begin();c.moveTo(0,v/4);c.lineTo(0,3*v/4);c.end();c.stroke();c.begin();c.moveTo(0,v/2);c.lineTo(p/6,v/2);c.end();c.stroke();c.ellipse(p/6,0,5*p/6,v);c.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",
+la);mxUtils.extend(u,mxEllipse);u.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+p/8,x+v);c.lineTo(l+7*p/8,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("umlEntity",u);mxUtils.extend(H,mxShape);H.prototype.paintVertexShape=function(c,l,x,p,v){c.translate(l,x);c.begin();c.moveTo(p,0);c.lineTo(0,v);c.moveTo(0,0);c.lineTo(p,v);c.end();c.stroke()};mxCellRenderer.registerShape("umlDestroy",H);mxUtils.extend(P,mxShape);
+P.prototype.getLabelBounds=function(c){return new mxRectangle(c.x,c.y+c.height/8,c.width,7*c.height/8)};P.prototype.paintBackground=function(c,l,x,p,v){c.translate(l,x);c.begin();c.moveTo(3*p/8,v/8*1.1);c.lineTo(5*p/8,0);c.end();c.stroke();c.ellipse(0,v/8,p,7*v/8);c.fillAndStroke()};P.prototype.paintForeground=function(c,l,x,p,v){c.begin();c.moveTo(3*p/8,v/8*1.1);c.lineTo(5*p/8,v/4);c.end();c.stroke()};mxCellRenderer.registerShape("umlControl",P);mxUtils.extend(W,mxRectangleShape);W.prototype.size=
+40;W.prototype.isHtmlAllowed=function(){return!1};W.prototype.getLabelBounds=function(c){var l=Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(c.x,c.y,c.width,l)};W.prototype.paintBackground=function(c,l,x,p,v){var A=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),B=mxUtils.getValue(this.style,"participant");null==B||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,c,l,
+x,p,A):(B=this.state.view.graph.cellRenderer.getShape(B),null!=B&&B!=W&&(B=new B,B.apply(this.state),c.save(),B.paintVertexShape(c,l,x,p,A),c.restore()));A<v&&(c.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),c.begin(),c.moveTo(l+p/2,x+A),c.lineTo(l+p/2,x+v),c.end(),c.stroke())};W.prototype.paintForeground=function(c,l,x,p,v){var A=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,c,l,x,p,Math.min(v,
+A))};mxCellRenderer.registerShape("umlLifeline",W);mxUtils.extend(R,mxShape);R.prototype.width=60;R.prototype.height=30;R.prototype.corner=10;R.prototype.getLabelMargins=function(c){return new mxRectangle(0,0,c.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),c.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};R.prototype.paintBackground=function(c,l,x,p,v){var A=this.corner,B=Math.min(p,Math.max(A,parseFloat(mxUtils.getValue(this.style,
"width",this.width)))),ka=Math.min(v,Math.max(1.5*A,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),J=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);J!=mxConstants.NONE&&(c.setFillColor(J),c.rect(l,x,p,v),c.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(c,l,x,p,v),c.setGradient(this.fill,this.gradient,l,x,p,v,this.gradientDirection)):c.setFillColor(this.fill);c.begin();
c.moveTo(l,x);c.lineTo(l+B,x);c.lineTo(l+B,x+Math.max(0,ka-1.5*A));c.lineTo(l+Math.max(0,B-A),x+ka);c.lineTo(l,x+ka);c.close();c.fillAndStroke();c.begin();c.moveTo(l+B,x);c.lineTo(l+p,x);c.lineTo(l+p,x+v);c.lineTo(l,x+v);c.lineTo(l,x+ka);c.stroke()};mxCellRenderer.registerShape("umlFrame",R);mxPerimeter.CenterPerimeter=function(c,l,x,p){return new mxPoint(c.getCenterX(),c.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(c,
-l,x,p){p=S.prototype.size;null!=l&&(p=mxUtils.getValue(l.style,"size",p)*l.view.scale);l=parseFloat(l.style[mxConstants.STYLE_STROKEWIDTH]||1)*l.view.scale/2-1;x.x<c.getCenterX()&&(l=-1*(l+1));return new mxPoint(c.getCenterX()+l,Math.min(c.y+c.height,Math.max(c.y+p,x.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(c,l,x,p){p=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",
+l,x,p){p=W.prototype.size;null!=l&&(p=mxUtils.getValue(l.style,"size",p)*l.view.scale);l=parseFloat(l.style[mxConstants.STYLE_STROKEWIDTH]||1)*l.view.scale/2-1;x.x<c.getCenterX()&&(l=-1*(l+1));return new mxPoint(c.getCenterX()+l,Math.min(c.y+c.height,Math.max(c.y+p,x.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(c,l,x,p){p=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",
mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(c,l,x,p){p=parseFloat(l.style[mxConstants.STYLE_STROKEWIDTH]||1)*l.view.scale/2-1;null!=l.style.backboneSize&&(p+=parseFloat(l.style.backboneSize)*l.view.scale/2-1);if("south"==l.style[mxConstants.STYLE_DIRECTION]||"north"==l.style[mxConstants.STYLE_DIRECTION])return x.x<c.getCenterX()&&(p=-1*(p+1)),new mxPoint(c.getCenterX()+p,Math.min(c.y+c.height,Math.max(c.y,x.y)));x.y<c.getCenterY()&&(p=-1*(p+1));return new mxPoint(Math.min(c.x+
-c.width,Math.max(c.x,x.x)),c.getCenterY()+p)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(c,l,x,p){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(c,new mxRectangle(0,0,0,Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(l.style,"size",ja.prototype.size))*l.view.scale))),l.style),l,x,p)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(c,
-l,x,p){var v="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=v?Z.prototype.fixedSize:Z.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));v&&(A*=l.view.scale);var B=c.x,ka=c.y,J=c.width,xa=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ka=[new mxPoint(B,ka),new mxPoint(B+J,ka+v),new mxPoint(B+
-J,ka+xa),new mxPoint(B,ka+xa-v),new mxPoint(B,ka)]):(v=v?Math.max(0,Math.min(.5*J,A)):J*Math.max(0,Math.min(1,A)),ka=[new mxPoint(B+v,ka),new mxPoint(B+J,ka),new mxPoint(B+J-v,ka+xa),new mxPoint(B,ka+xa),new mxPoint(B+v,ka)]);xa=c.getCenterX();c=c.getCenterY();c=new mxPoint(xa,c);p&&(x.x<B||x.x>B+J?c.y=x.y:c.x=x.x);return mxUtils.getPerimeterPoint(ka,c,x)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(c,l,x,p){var v="0"!=
-mxUtils.getValue(l.style,"fixedSize","0"),A=v?X.prototype.fixedSize:X.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));v&&(A*=l.view.scale);var B=c.x,ka=c.y,J=c.width,xa=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(.5*J,A)):J*Math.max(0,Math.min(1,A)),ka=[new mxPoint(B+v,ka),new mxPoint(B+J-v,ka),new mxPoint(B+J,ka+xa),new mxPoint(B,ka+xa),new mxPoint(B+
-v,ka)]):l==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(J,A)):J*Math.max(0,Math.min(1,A)),ka=[new mxPoint(B,ka),new mxPoint(B+J,ka),new mxPoint(B+J-v,ka+xa),new mxPoint(B+v,ka+xa),new mxPoint(B,ka)]):l==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ka=[new mxPoint(B,ka+v),new mxPoint(B+J,ka),new mxPoint(B+J,ka+xa),new mxPoint(B,ka+xa-v),new mxPoint(B,ka+v)]):(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ka=[new mxPoint(B,ka),new mxPoint(B+
-J,ka+v),new mxPoint(B+J,ka+xa-v),new mxPoint(B,ka+xa),new mxPoint(B,ka)]);xa=c.getCenterX();c=c.getCenterY();c=new mxPoint(xa,c);p&&(x.x<B||x.x>B+J?c.y=x.y:c.x=x.x);return mxUtils.getPerimeterPoint(ka,c,x)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,l,x,p){var v="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=v?U.prototype.fixedSize:U.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));v&&(A*=l.view.scale);var B=c.x,
-ka=c.y,J=c.width,xa=c.height,oa=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(J,A)):J*Math.max(0,Math.min(1,A)),ka=[new mxPoint(B,ka),new mxPoint(B+J-v,ka),new mxPoint(B+J,c),new mxPoint(B+J-v,ka+xa),new mxPoint(B,ka+xa),new mxPoint(B+v,c),new mxPoint(B,ka)]):l==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(J,A)):J*Math.max(0,Math.min(1,
-A)),ka=[new mxPoint(B+v,ka),new mxPoint(B+J,ka),new mxPoint(B+J-v,c),new mxPoint(B+J,ka+xa),new mxPoint(B+v,ka+xa),new mxPoint(B,c),new mxPoint(B+v,ka)]):l==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ka=[new mxPoint(B,ka+v),new mxPoint(oa,ka),new mxPoint(B+J,ka+v),new mxPoint(B+J,ka+xa),new mxPoint(oa,ka+xa-v),new mxPoint(B,ka+xa),new mxPoint(B,ka+v)]):(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ka=[new mxPoint(B,ka),new mxPoint(oa,ka+
-v),new mxPoint(B+J,ka),new mxPoint(B+J,ka+xa-v),new mxPoint(oa,ka+xa),new mxPoint(B,ka+xa-v),new mxPoint(B,ka)]);oa=new mxPoint(oa,c);p&&(x.x<B||x.x>B+J?oa.y=x.y:oa.x=x.x);return mxUtils.getPerimeterPoint(ka,oa,x)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(c,l,x,p){var v="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=v?L.prototype.fixedSize:L.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));v&&(A*=l.view.scale);var B=
-c.x,ka=c.y,J=c.width,xa=c.height,oa=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ka=[new mxPoint(oa,ka),new mxPoint(B+J,ka+v),new mxPoint(B+J,ka+xa-v),new mxPoint(oa,ka+xa),new mxPoint(B,ka+xa-v),new mxPoint(B,ka+v),new mxPoint(oa,ka)]):(v=v?Math.max(0,Math.min(J,A)):J*Math.max(0,
-Math.min(1,A)),ka=[new mxPoint(B+v,ka),new mxPoint(B+J-v,ka),new mxPoint(B+J,c),new mxPoint(B+J-v,ka+xa),new mxPoint(B+v,ka+xa),new mxPoint(B,c),new mxPoint(B+v,ka)]);oa=new mxPoint(oa,c);p&&(x.x<B||x.x>B+J?oa.y=x.y:oa.x=x.x);return mxUtils.getPerimeterPoint(ka,oa,x)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(ca,mxShape);ca.prototype.size=10;ca.prototype.paintBackground=function(c,l,x,p,v){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size));
-c.translate(l,x);c.ellipse((p-A)/2,0,A,A);c.fillAndStroke();c.begin();c.moveTo(p/2,A);c.lineTo(p/2,v);c.end();c.stroke()};mxCellRenderer.registerShape("lollipop",ca);mxUtils.extend(ea,mxShape);ea.prototype.size=10;ea.prototype.inset=2;ea.prototype.paintBackground=function(c,l,x,p,v){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size)),B=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(l,x);c.begin();c.moveTo(p/2,A+B);c.lineTo(p/2,v);c.end();c.stroke();
-c.begin();c.moveTo((p-A)/2-B,A/2);c.quadTo((p-A)/2-B,A+B,p/2,A+B);c.quadTo((p+A)/2+B,A+B,(p+A)/2+B,A/2);c.end();c.stroke()};mxCellRenderer.registerShape("requires",ea);mxUtils.extend(fa,mxShape);fa.prototype.paintBackground=function(c,l,x,p,v){c.translate(l,x);c.begin();c.moveTo(0,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,0,v);c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",fa);mxUtils.extend(ra,mxShape);ra.prototype.inset=2;ra.prototype.paintBackground=function(c,l,x,p,v){var A=parseFloat(mxUtils.getValue(this.style,
-"inset",this.inset))+this.strokewidth;c.translate(l,x);c.ellipse(0,A,p-2*A,v-2*A);c.fillAndStroke();c.begin();c.moveTo(p/2,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p/2,v);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",ra);mxUtils.extend(ua,mxCylinder);ua.prototype.jettyWidth=20;ua.prototype.jettyHeight=10;ua.prototype.redrawPath=function(c,l,x,p,v,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",
-this.jettyHeight));x=B/2;B=x+B/2;var ka=Math.min(l,v-l),J=Math.min(ka+2*l,v-l);A?(c.moveTo(x,ka),c.lineTo(B,ka),c.lineTo(B,ka+l),c.lineTo(x,ka+l),c.moveTo(x,J),c.lineTo(B,J),c.lineTo(B,J+l),c.lineTo(x,J+l)):(c.moveTo(x,0),c.lineTo(p,0),c.lineTo(p,v),c.lineTo(x,v),c.lineTo(x,J+l),c.lineTo(0,J+l),c.lineTo(0,J),c.lineTo(x,J),c.lineTo(x,ka+l),c.lineTo(0,ka+l),c.lineTo(0,ka),c.lineTo(x,ka),c.close());c.end()};mxCellRenderer.registerShape("module",ua);mxUtils.extend(sa,mxCylinder);sa.prototype.jettyWidth=
-32;sa.prototype.jettyHeight=12;sa.prototype.redrawPath=function(c,l,x,p,v,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));x=B/2;B=x+B/2;var ka=.3*v-l/2,J=.7*v-l/2;A?(c.moveTo(x,ka),c.lineTo(B,ka),c.lineTo(B,ka+l),c.lineTo(x,ka+l),c.moveTo(x,J),c.lineTo(B,J),c.lineTo(B,J+l),c.lineTo(x,J+l)):(c.moveTo(x,0),c.lineTo(p,0),c.lineTo(p,v),c.lineTo(x,v),c.lineTo(x,J+l),c.lineTo(0,J+l),c.lineTo(0,J),c.lineTo(x,
-J),c.lineTo(x,ka+l),c.lineTo(0,ka+l),c.lineTo(0,ka),c.lineTo(x,ka),c.close());c.end()};mxCellRenderer.registerShape("component",sa);mxUtils.extend(Aa,mxRectangleShape);Aa.prototype.paintForeground=function(c,l,x,p,v){var A=p/2,B=v/2,ka=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c.begin();this.addPoints(c,[new mxPoint(l+A,x),new mxPoint(l+p,x+B),new mxPoint(l+A,x+v),new mxPoint(l,x+B)],this.isRounded,ka,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
-arguments)};mxCellRenderer.registerShape("associativeEntity",Aa);mxUtils.extend(Ca,mxDoubleEllipse);Ca.prototype.outerStroke=!0;Ca.prototype.paintVertexShape=function(c,l,x,p,v){var A=Math.min(4,Math.min(p/5,v/5));0<p&&0<v&&(c.ellipse(l+A,x+A,p-2*A,v-2*A),c.fillAndStroke());c.setShadow(!1);this.outerStroke&&(c.ellipse(l,x,p,v),c.stroke())};mxCellRenderer.registerShape("endState",Ca);mxUtils.extend(Ba,Ca);Ba.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",Ba);mxUtils.extend(ta,mxArrowConnector);
-ta.prototype.defaultWidth=4;ta.prototype.isOpenEnded=function(){return!0};ta.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};ta.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",ta);mxUtils.extend(Pa,mxArrowConnector);Pa.prototype.defaultWidth=10;Pa.prototype.defaultArrowWidth=20;Pa.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,
-"startWidth",this.defaultArrowWidth)};Pa.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Pa.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Pa);mxUtils.extend(Ta,mxActor);Ta.prototype.size=30;Ta.prototype.isRoundable=function(){return!0};Ta.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(v,parseFloat(mxUtils.getValue(this.style,
-"size",this.size)));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(0,l),new mxPoint(p,0),new mxPoint(p,v)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("manualInput",Ta);mxUtils.extend(Oa,mxRectangleShape);Oa.prototype.dx=20;Oa.prototype.dy=20;Oa.prototype.isHtmlAllowed=function(){return!1};Oa.prototype.paintForeground=function(c,l,x,p,v){mxRectangleShape.prototype.paintForeground.apply(this,arguments);
-var A=0;if(this.isRounded){var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;A=Math.max(A,Math.min(p*B,v*B))}B=Math.max(A,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));A=Math.max(A,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.begin();c.moveTo(l,x+A);c.lineTo(l+p,x+A);c.end();c.stroke();c.begin();c.moveTo(l+B,x);c.lineTo(l+B,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("internalStorage",Oa);
-mxUtils.extend(Xa,mxActor);Xa.prototype.dx=20;Xa.prototype.dy=20;Xa.prototype.redrawPath=function(c,l,x,p,v){l=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,x),new mxPoint(l,x),
-new mxPoint(l,v),new mxPoint(0,v)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("corner",Xa);mxUtils.extend(Ga,mxActor);Ga.prototype.redrawPath=function(c,l,x,p,v){c.moveTo(0,0);c.lineTo(0,v);c.end();c.moveTo(p,0);c.lineTo(p,v);c.end();c.moveTo(0,v/2);c.lineTo(p,v/2);c.end()};mxCellRenderer.registerShape("crossbar",Ga);mxUtils.extend(eb,mxActor);eb.prototype.dx=20;eb.prototype.dy=20;eb.prototype.redrawPath=function(c,l,x,p,v){l=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,
-"dx",this.dx))));x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,x),new mxPoint((p+l)/2,x),new mxPoint((p+l)/2,v),new mxPoint((p-l)/2,v),new mxPoint((p-l)/2,x),new mxPoint(0,x)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("tee",eb);mxUtils.extend(bb,
-mxActor);bb.prototype.arrowWidth=.3;bb.prototype.arrowSize=.2;bb.prototype.redrawPath=function(c,l,x,p,v){var A=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));l=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));x=(v-A)/2;A=x+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,x),new mxPoint(p-l,x),new mxPoint(p-l,0),new mxPoint(p,v/2),new mxPoint(p-
-l,v),new mxPoint(p-l,A),new mxPoint(0,A)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("singleArrow",bb);mxUtils.extend(z,mxActor);z.prototype.redrawPath=function(c,l,x,p,v){var A=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",bb.prototype.arrowWidth))));l=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",bb.prototype.arrowSize))));x=(v-A)/2;A=x+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
+c.width,Math.max(c.x,x.x)),c.getCenterY()+p)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(c,l,x,p){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(c,new mxRectangle(0,0,0,Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(l.style,"size",ma.prototype.size))*l.view.scale))),l.style),l,x,p)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(c,
+l,x,p){var v="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=v?aa.prototype.fixedSize:aa.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));v&&(A*=l.view.scale);var B=c.x,ka=c.y,J=c.width,wa=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(v=v?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ka=[new mxPoint(B,ka),new mxPoint(B+J,ka+v),new mxPoint(B+
+J,ka+wa),new mxPoint(B,ka+wa-v),new mxPoint(B,ka)]):(v=v?Math.max(0,Math.min(.5*J,A)):J*Math.max(0,Math.min(1,A)),ka=[new mxPoint(B+v,ka),new mxPoint(B+J,ka),new mxPoint(B+J-v,ka+wa),new mxPoint(B,ka+wa),new mxPoint(B+v,ka)]);wa=c.getCenterX();c=c.getCenterY();c=new mxPoint(wa,c);p&&(x.x<B||x.x>B+J?c.y=x.y:c.x=x.x);return mxUtils.getPerimeterPoint(ka,c,x)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(c,l,x,p){var v="0"!=
+mxUtils.getValue(l.style,"fixedSize","0"),A=v?Y.prototype.fixedSize:Y.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));v&&(A*=l.view.scale);var B=c.x,ka=c.y,J=c.width,wa=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(.5*J,A)):J*Math.max(0,Math.min(1,A)),ka=[new mxPoint(B+v,ka),new mxPoint(B+J-v,ka),new mxPoint(B+J,ka+wa),new mxPoint(B,ka+wa),new mxPoint(B+
+v,ka)]):l==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(J,A)):J*Math.max(0,Math.min(1,A)),ka=[new mxPoint(B,ka),new mxPoint(B+J,ka),new mxPoint(B+J-v,ka+wa),new mxPoint(B+v,ka+wa),new mxPoint(B,ka)]):l==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ka=[new mxPoint(B,ka+v),new mxPoint(B+J,ka),new mxPoint(B+J,ka+wa),new mxPoint(B,ka+wa-v),new mxPoint(B,ka+v)]):(v=v?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ka=[new mxPoint(B,ka),new mxPoint(B+
+J,ka+v),new mxPoint(B+J,ka+wa-v),new mxPoint(B,ka+wa),new mxPoint(B,ka)]);wa=c.getCenterX();c=c.getCenterY();c=new mxPoint(wa,c);p&&(x.x<B||x.x>B+J?c.y=x.y:c.x=x.x);return mxUtils.getPerimeterPoint(ka,c,x)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,l,x,p){var v="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=v?T.prototype.fixedSize:T.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));v&&(A*=l.view.scale);var B=c.x,
+ka=c.y,J=c.width,wa=c.height,oa=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(J,A)):J*Math.max(0,Math.min(1,A)),ka=[new mxPoint(B,ka),new mxPoint(B+J-v,ka),new mxPoint(B+J,c),new mxPoint(B+J-v,ka+wa),new mxPoint(B,ka+wa),new mxPoint(B+v,c),new mxPoint(B,ka)]):l==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(J,A)):J*Math.max(0,Math.min(1,
+A)),ka=[new mxPoint(B+v,ka),new mxPoint(B+J,ka),new mxPoint(B+J-v,c),new mxPoint(B+J,ka+wa),new mxPoint(B+v,ka+wa),new mxPoint(B,c),new mxPoint(B+v,ka)]):l==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ka=[new mxPoint(B,ka+v),new mxPoint(oa,ka),new mxPoint(B+J,ka+v),new mxPoint(B+J,ka+wa),new mxPoint(oa,ka+wa-v),new mxPoint(B,ka+wa),new mxPoint(B,ka+v)]):(v=v?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ka=[new mxPoint(B,ka),new mxPoint(oa,ka+
+v),new mxPoint(B+J,ka),new mxPoint(B+J,ka+wa-v),new mxPoint(oa,ka+wa),new mxPoint(B,ka+wa-v),new mxPoint(B,ka)]);oa=new mxPoint(oa,c);p&&(x.x<B||x.x>B+J?oa.y=x.y:oa.x=x.x);return mxUtils.getPerimeterPoint(ka,oa,x)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(c,l,x,p){var v="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=v?M.prototype.fixedSize:M.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));v&&(A*=l.view.scale);var B=
+c.x,ka=c.y,J=c.width,wa=c.height,oa=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(v=v?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ka=[new mxPoint(oa,ka),new mxPoint(B+J,ka+v),new mxPoint(B+J,ka+wa-v),new mxPoint(oa,ka+wa),new mxPoint(B,ka+wa-v),new mxPoint(B,ka+v),new mxPoint(oa,ka)]):(v=v?Math.max(0,Math.min(J,A)):J*Math.max(0,
+Math.min(1,A)),ka=[new mxPoint(B+v,ka),new mxPoint(B+J-v,ka),new mxPoint(B+J,c),new mxPoint(B+J-v,ka+wa),new mxPoint(B+v,ka+wa),new mxPoint(B,c),new mxPoint(B+v,ka)]);oa=new mxPoint(oa,c);p&&(x.x<B||x.x>B+J?oa.y=x.y:oa.x=x.x);return mxUtils.getPerimeterPoint(ka,oa,x)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(da,mxShape);da.prototype.size=10;da.prototype.paintBackground=function(c,l,x,p,v){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size));
+c.translate(l,x);c.ellipse((p-A)/2,0,A,A);c.fillAndStroke();c.begin();c.moveTo(p/2,A);c.lineTo(p/2,v);c.end();c.stroke()};mxCellRenderer.registerShape("lollipop",da);mxUtils.extend(fa,mxShape);fa.prototype.size=10;fa.prototype.inset=2;fa.prototype.paintBackground=function(c,l,x,p,v){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size)),B=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(l,x);c.begin();c.moveTo(p/2,A+B);c.lineTo(p/2,v);c.end();c.stroke();
+c.begin();c.moveTo((p-A)/2-B,A/2);c.quadTo((p-A)/2-B,A+B,p/2,A+B);c.quadTo((p+A)/2+B,A+B,(p+A)/2+B,A/2);c.end();c.stroke()};mxCellRenderer.registerShape("requires",fa);mxUtils.extend(ea,mxShape);ea.prototype.paintBackground=function(c,l,x,p,v){c.translate(l,x);c.begin();c.moveTo(0,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,0,v);c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",ea);mxUtils.extend(qa,mxShape);qa.prototype.inset=2;qa.prototype.paintBackground=function(c,l,x,p,v){var A=parseFloat(mxUtils.getValue(this.style,
+"inset",this.inset))+this.strokewidth;c.translate(l,x);c.ellipse(0,A,p-2*A,v-2*A);c.fillAndStroke();c.begin();c.moveTo(p/2,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p/2,v);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",qa);mxUtils.extend(va,mxCylinder);va.prototype.jettyWidth=20;va.prototype.jettyHeight=10;va.prototype.redrawPath=function(c,l,x,p,v,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",
+this.jettyHeight));x=B/2;B=x+B/2;var ka=Math.min(l,v-l),J=Math.min(ka+2*l,v-l);A?(c.moveTo(x,ka),c.lineTo(B,ka),c.lineTo(B,ka+l),c.lineTo(x,ka+l),c.moveTo(x,J),c.lineTo(B,J),c.lineTo(B,J+l),c.lineTo(x,J+l)):(c.moveTo(x,0),c.lineTo(p,0),c.lineTo(p,v),c.lineTo(x,v),c.lineTo(x,J+l),c.lineTo(0,J+l),c.lineTo(0,J),c.lineTo(x,J),c.lineTo(x,ka+l),c.lineTo(0,ka+l),c.lineTo(0,ka),c.lineTo(x,ka),c.close());c.end()};mxCellRenderer.registerShape("module",va);mxUtils.extend(ua,mxCylinder);ua.prototype.jettyWidth=
+32;ua.prototype.jettyHeight=12;ua.prototype.redrawPath=function(c,l,x,p,v,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));x=B/2;B=x+B/2;var ka=.3*v-l/2,J=.7*v-l/2;A?(c.moveTo(x,ka),c.lineTo(B,ka),c.lineTo(B,ka+l),c.lineTo(x,ka+l),c.moveTo(x,J),c.lineTo(B,J),c.lineTo(B,J+l),c.lineTo(x,J+l)):(c.moveTo(x,0),c.lineTo(p,0),c.lineTo(p,v),c.lineTo(x,v),c.lineTo(x,J+l),c.lineTo(0,J+l),c.lineTo(0,J),c.lineTo(x,
+J),c.lineTo(x,ka+l),c.lineTo(0,ka+l),c.lineTo(0,ka),c.lineTo(x,ka),c.close());c.end()};mxCellRenderer.registerShape("component",ua);mxUtils.extend(Aa,mxRectangleShape);Aa.prototype.paintForeground=function(c,l,x,p,v){var A=p/2,B=v/2,ka=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c.begin();this.addPoints(c,[new mxPoint(l+A,x),new mxPoint(l+p,x+B),new mxPoint(l+A,x+v),new mxPoint(l,x+B)],this.isRounded,ka,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
+arguments)};mxCellRenderer.registerShape("associativeEntity",Aa);mxUtils.extend(za,mxDoubleEllipse);za.prototype.outerStroke=!0;za.prototype.paintVertexShape=function(c,l,x,p,v){var A=Math.min(4,Math.min(p/5,v/5));0<p&&0<v&&(c.ellipse(l+A,x+A,p-2*A,v-2*A),c.fillAndStroke());c.setShadow(!1);this.outerStroke&&(c.ellipse(l,x,p,v),c.stroke())};mxCellRenderer.registerShape("endState",za);mxUtils.extend(Ca,za);Ca.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",Ca);mxUtils.extend(sa,mxArrowConnector);
+sa.prototype.defaultWidth=4;sa.prototype.isOpenEnded=function(){return!0};sa.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};sa.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",sa);mxUtils.extend(Va,mxArrowConnector);Va.prototype.defaultWidth=10;Va.prototype.defaultArrowWidth=20;Va.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,
+"startWidth",this.defaultArrowWidth)};Va.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Va.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Va);mxUtils.extend(Ua,mxActor);Ua.prototype.size=30;Ua.prototype.isRoundable=function(){return!0};Ua.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(v,parseFloat(mxUtils.getValue(this.style,
+"size",this.size)));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(0,l),new mxPoint(p,0),new mxPoint(p,v)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("manualInput",Ua);mxUtils.extend(Ra,mxRectangleShape);Ra.prototype.dx=20;Ra.prototype.dy=20;Ra.prototype.isHtmlAllowed=function(){return!1};Ra.prototype.paintForeground=function(c,l,x,p,v){mxRectangleShape.prototype.paintForeground.apply(this,arguments);
+var A=0;if(this.isRounded){var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;A=Math.max(A,Math.min(p*B,v*B))}B=Math.max(A,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));A=Math.max(A,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.begin();c.moveTo(l,x+A);c.lineTo(l+p,x+A);c.end();c.stroke();c.begin();c.moveTo(l+B,x);c.lineTo(l+B,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("internalStorage",Ra);
+mxUtils.extend(Za,mxActor);Za.prototype.dx=20;Za.prototype.dy=20;Za.prototype.redrawPath=function(c,l,x,p,v){l=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,x),new mxPoint(l,x),
+new mxPoint(l,v),new mxPoint(0,v)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("corner",Za);mxUtils.extend(Ha,mxActor);Ha.prototype.redrawPath=function(c,l,x,p,v){c.moveTo(0,0);c.lineTo(0,v);c.end();c.moveTo(p,0);c.lineTo(p,v);c.end();c.moveTo(0,v/2);c.lineTo(p,v/2);c.end()};mxCellRenderer.registerShape("crossbar",Ha);mxUtils.extend(db,mxActor);db.prototype.dx=20;db.prototype.dy=20;db.prototype.redrawPath=function(c,l,x,p,v){l=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,
+"dx",this.dx))));x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,x),new mxPoint((p+l)/2,x),new mxPoint((p+l)/2,v),new mxPoint((p-l)/2,v),new mxPoint((p-l)/2,x),new mxPoint(0,x)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("tee",db);mxUtils.extend(cb,
+mxActor);cb.prototype.arrowWidth=.3;cb.prototype.arrowSize=.2;cb.prototype.redrawPath=function(c,l,x,p,v){var A=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));l=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));x=(v-A)/2;A=x+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,x),new mxPoint(p-l,x),new mxPoint(p-l,0),new mxPoint(p,v/2),new mxPoint(p-
+l,v),new mxPoint(p-l,A),new mxPoint(0,A)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("singleArrow",cb);mxUtils.extend(z,mxActor);z.prototype.redrawPath=function(c,l,x,p,v){var A=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",cb.prototype.arrowWidth))));l=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",cb.prototype.arrowSize))));x=(v-A)/2;A=x+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
2;this.addPoints(c,[new mxPoint(0,v/2),new mxPoint(l,0),new mxPoint(l,x),new mxPoint(p-l,x),new mxPoint(p-l,0),new mxPoint(p,v/2),new mxPoint(p-l,v),new mxPoint(p-l,A),new mxPoint(l,A),new mxPoint(l,v)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("doubleArrow",z);mxUtils.extend(K,mxActor);K.prototype.size=.1;K.prototype.fixedSize=20;K.prototype.redrawPath=function(c,l,x,p,v){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,
-"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(l,0);c.lineTo(p,0);c.quadTo(p-2*l,v/2,p,v);c.lineTo(l,v);c.quadTo(l-2*l,v/2,l,0);c.close();c.end()};mxCellRenderer.registerShape("dataStorage",K);mxUtils.extend(M,mxActor);M.prototype.redrawPath=function(c,l,x,p,v){c.moveTo(0,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,0,v);c.close();c.end()};mxCellRenderer.registerShape("or",M);mxUtils.extend(T,mxActor);T.prototype.redrawPath=function(c,
-l,x,p,v){c.moveTo(0,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,0,v);c.quadTo(p/2,v/2,0,0);c.close();c.end()};mxCellRenderer.registerShape("xor",T);mxUtils.extend(V,mxActor);V.prototype.size=20;V.prototype.isRoundable=function(){return!0};V.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(p/2,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(p-l,0),new mxPoint(p,
-.8*l),new mxPoint(p,v),new mxPoint(0,v),new mxPoint(0,.8*l)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("loopLimit",V);mxUtils.extend(ia,mxActor);ia.prototype.size=.375;ia.prototype.isRoundable=function(){return!0};ia.prototype.redrawPath=function(c,l,x,p,v){l=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,
-v-l),new mxPoint(p/2,v),new mxPoint(0,v-l)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("offPageConnector",ia);mxUtils.extend(na,mxEllipse);na.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+p/2,x+v);c.lineTo(l+p,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",na);mxUtils.extend(va,mxEllipse);va.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,
-arguments);c.setShadow(!1);c.begin();c.moveTo(l,x+v/2);c.lineTo(l+p,x+v/2);c.end();c.stroke();c.begin();c.moveTo(l+p/2,x);c.lineTo(l+p/2,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("orEllipse",va);mxUtils.extend(pa,mxEllipse);pa.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l+.145*p,x+.145*v);c.lineTo(l+.855*p,x+.855*v);c.end();c.stroke();c.begin();c.moveTo(l+.855*p,x+.145*v);c.lineTo(l+.145*p,
-x+.855*v);c.end();c.stroke()};mxCellRenderer.registerShape("sumEllipse",pa);mxUtils.extend(za,mxRhombus);za.prototype.paintVertexShape=function(c,l,x,p,v){mxRhombus.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l,x+v/2);c.lineTo(l+p,x+v/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",za);mxUtils.extend(Da,mxEllipse);Da.prototype.paintVertexShape=function(c,l,x,p,v){c.begin();c.moveTo(l,x);c.lineTo(l+p,x);c.lineTo(l+p/2,x+v/2);c.close();c.fillAndStroke();
-c.begin();c.moveTo(l,x+v);c.lineTo(l+p,x+v);c.lineTo(l+p/2,x+v/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",Da);mxUtils.extend(Ma,mxEllipse);Ma.prototype.paintVertexShape=function(c,l,x,p,v){var A=c.state.strokeWidth/2,B=10+2*A,ka=x+v-B/2;c.begin();c.moveTo(l,x);c.lineTo(l,x+v);c.moveTo(l+A,ka);c.lineTo(l+A+B,ka-B/2);c.moveTo(l+A,ka);c.lineTo(l+A+B,ka+B/2);c.moveTo(l+A,ka);c.lineTo(l+p-A,ka);c.moveTo(l+p,x);c.lineTo(l+p,x+v);c.moveTo(l+p-A,ka);c.lineTo(l+p-B-A,ka-B/2);c.moveTo(l+
-p-A,ka);c.lineTo(l+p-B-A,ka+B/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",Ma);mxUtils.extend(La,mxEllipse);La.prototype.drawHidden=!0;La.prototype.paintVertexShape=function(c,l,x,p,v){this.outline||c.setStrokeColor(null);if(null!=this.style){var A=c.pointerEvents,B=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||B||(c.pointerEvents=!1);var ka="1"==mxUtils.getValue(this.style,"top","1"),J="1"==mxUtils.getValue(this.style,
-"left","1"),xa="1"==mxUtils.getValue(this.style,"right","1"),oa="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||B||this.outline||ka||xa||oa||J?(c.rect(l,x,p,v),c.fill(),c.pointerEvents=A,c.setStrokeColor(this.stroke),c.setLineCap("square"),c.begin(),c.moveTo(l,x),this.outline||ka?c.lineTo(l+p,x):c.moveTo(l+p,x),this.outline||xa?c.lineTo(l+p,x+v):c.moveTo(l+p,x+v),this.outline||oa?c.lineTo(l,x+v):c.moveTo(l,x+v),(this.outline||J)&&c.lineTo(l,x),c.end(),c.stroke(),c.setLineCap("flat")):
-c.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",La);mxUtils.extend(Ua,mxEllipse);Ua.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();"vertical"==mxUtils.getValue(this.style,"line")?(c.moveTo(l+p/2,x),c.lineTo(l+p/2,x+v)):(c.moveTo(l,x+v/2),c.lineTo(l+p,x+v/2));c.end();c.stroke()};mxCellRenderer.registerShape("lineEllipse",Ua);mxUtils.extend(Sa,mxActor);Sa.prototype.redrawPath=function(c,
+"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(l,0);c.lineTo(p,0);c.quadTo(p-2*l,v/2,p,v);c.lineTo(l,v);c.quadTo(l-2*l,v/2,l,0);c.close();c.end()};mxCellRenderer.registerShape("dataStorage",K);mxUtils.extend(L,mxActor);L.prototype.redrawPath=function(c,l,x,p,v){c.moveTo(0,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,0,v);c.close();c.end()};mxCellRenderer.registerShape("or",L);mxUtils.extend(S,mxActor);S.prototype.redrawPath=function(c,
+l,x,p,v){c.moveTo(0,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,0,v);c.quadTo(p/2,v/2,0,0);c.close();c.end()};mxCellRenderer.registerShape("xor",S);mxUtils.extend(V,mxActor);V.prototype.size=20;V.prototype.isRoundable=function(){return!0};V.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(p/2,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(p-l,0),new mxPoint(p,
+.8*l),new mxPoint(p,v),new mxPoint(0,v),new mxPoint(0,.8*l)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("loopLimit",V);mxUtils.extend(ja,mxActor);ja.prototype.size=.375;ja.prototype.isRoundable=function(){return!0};ja.prototype.redrawPath=function(c,l,x,p,v){l=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,
+v-l),new mxPoint(p/2,v),new mxPoint(0,v-l)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("offPageConnector",ja);mxUtils.extend(na,mxEllipse);na.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+p/2,x+v);c.lineTo(l+p,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",na);mxUtils.extend(ya,mxEllipse);ya.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,
+arguments);c.setShadow(!1);c.begin();c.moveTo(l,x+v/2);c.lineTo(l+p,x+v/2);c.end();c.stroke();c.begin();c.moveTo(l+p/2,x);c.lineTo(l+p/2,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("orEllipse",ya);mxUtils.extend(ra,mxEllipse);ra.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l+.145*p,x+.145*v);c.lineTo(l+.855*p,x+.855*v);c.end();c.stroke();c.begin();c.moveTo(l+.855*p,x+.145*v);c.lineTo(l+.145*p,
+x+.855*v);c.end();c.stroke()};mxCellRenderer.registerShape("sumEllipse",ra);mxUtils.extend(ta,mxRhombus);ta.prototype.paintVertexShape=function(c,l,x,p,v){mxRhombus.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l,x+v/2);c.lineTo(l+p,x+v/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",ta);mxUtils.extend(Da,mxEllipse);Da.prototype.paintVertexShape=function(c,l,x,p,v){c.begin();c.moveTo(l,x);c.lineTo(l+p,x);c.lineTo(l+p/2,x+v/2);c.close();c.fillAndStroke();
+c.begin();c.moveTo(l,x+v);c.lineTo(l+p,x+v);c.lineTo(l+p/2,x+v/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",Da);mxUtils.extend(Oa,mxEllipse);Oa.prototype.paintVertexShape=function(c,l,x,p,v){var A=c.state.strokeWidth/2,B=10+2*A,ka=x+v-B/2;c.begin();c.moveTo(l,x);c.lineTo(l,x+v);c.moveTo(l+A,ka);c.lineTo(l+A+B,ka-B/2);c.moveTo(l+A,ka);c.lineTo(l+A+B,ka+B/2);c.moveTo(l+A,ka);c.lineTo(l+p-A,ka);c.moveTo(l+p,x);c.lineTo(l+p,x+v);c.moveTo(l+p-A,ka);c.lineTo(l+p-B-A,ka-B/2);c.moveTo(l+
+p-A,ka);c.lineTo(l+p-B-A,ka+B/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",Oa);mxUtils.extend(Ma,mxEllipse);Ma.prototype.drawHidden=!0;Ma.prototype.paintVertexShape=function(c,l,x,p,v){this.outline||c.setStrokeColor(null);if(null!=this.style){var A=c.pointerEvents,B=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||B||(c.pointerEvents=!1);var ka="1"==mxUtils.getValue(this.style,"top","1"),J="1"==mxUtils.getValue(this.style,
+"left","1"),wa="1"==mxUtils.getValue(this.style,"right","1"),oa="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||B||this.outline||ka||wa||oa||J?(c.rect(l,x,p,v),c.fill(),c.pointerEvents=A,c.setStrokeColor(this.stroke),c.setLineCap("square"),c.begin(),c.moveTo(l,x),this.outline||ka?c.lineTo(l+p,x):c.moveTo(l+p,x),this.outline||wa?c.lineTo(l+p,x+v):c.moveTo(l+p,x+v),this.outline||oa?c.lineTo(l,x+v):c.moveTo(l,x+v),(this.outline||J)&&c.lineTo(l,x),c.end(),c.stroke(),c.setLineCap("flat")):
+c.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Ma);mxUtils.extend(Wa,mxEllipse);Wa.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();"vertical"==mxUtils.getValue(this.style,"line")?(c.moveTo(l+p/2,x),c.lineTo(l+p/2,x+v)):(c.moveTo(l,x+v/2),c.lineTo(l+p,x+v/2));c.end();c.stroke()};mxCellRenderer.registerShape("lineEllipse",Wa);mxUtils.extend(Sa,mxActor);Sa.prototype.redrawPath=function(c,
l,x,p,v){l=Math.min(p,v/2);c.moveTo(0,0);c.lineTo(p-l,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p-l,v);c.lineTo(0,v);c.close();c.end()};mxCellRenderer.registerShape("delay",Sa);mxUtils.extend(Fa,mxActor);Fa.prototype.size=.2;Fa.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(v,p);var A=Math.max(0,Math.min(l,l*parseFloat(mxUtils.getValue(this.style,"size",this.size))));l=(v-A)/2;x=l+A;var B=(p-A)/2;A=B+A;c.moveTo(0,l);c.lineTo(B,l);c.lineTo(B,0);c.lineTo(A,0);c.lineTo(A,l);c.lineTo(p,l);c.lineTo(p,x);
-c.lineTo(A,x);c.lineTo(A,v);c.lineTo(B,v);c.lineTo(B,x);c.lineTo(0,x);c.close();c.end()};mxCellRenderer.registerShape("cross",Fa);mxUtils.extend(wa,mxActor);wa.prototype.size=.25;wa.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(p,v/2);x=Math.min(p-l,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*p);c.moveTo(0,v/2);c.lineTo(x,0);c.lineTo(p-l,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p-l,v);c.lineTo(x,v);c.close();c.end()};mxCellRenderer.registerShape("display",wa);mxUtils.extend(ya,
-mxActor);ya.prototype.cst={RECT2:"mxgraph.basic.rect"};ya.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"size",dispName:"Corner Size",type:"float",defVal:10},{name:"absoluteCornerSize",dispName:"Abs. Corner Size",type:"bool",defVal:!0},{name:"indent",dispName:"Indent",type:"float",
+c.lineTo(A,x);c.lineTo(A,v);c.lineTo(B,v);c.lineTo(B,x);c.lineTo(0,x);c.close();c.end()};mxCellRenderer.registerShape("cross",Fa);mxUtils.extend(Ja,mxActor);Ja.prototype.size=.25;Ja.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(p,v/2);x=Math.min(p-l,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*p);c.moveTo(0,v/2);c.lineTo(x,0);c.lineTo(p-l,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p-l,v);c.lineTo(x,v);c.close();c.end()};mxCellRenderer.registerShape("display",Ja);mxUtils.extend(xa,
+mxActor);xa.prototype.cst={RECT2:"mxgraph.basic.rect"};xa.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"size",dispName:"Corner Size",type:"float",defVal:10},{name:"absoluteCornerSize",dispName:"Abs. Corner Size",type:"bool",defVal:!0},{name:"indent",dispName:"Indent",type:"float",
defVal:2},{name:"rectOutline",dispName:"Outline",type:"enum",defVal:"single",enumList:[{val:"single",dispName:"Single"},{val:"double",dispName:"Double"},{val:"frame",dispName:"Frame"}]},{name:"fillColor2",dispName:"Inside Fill Color",type:"color",defVal:"none"},{name:"gradientColor2",dispName:"Inside Gradient Color",type:"color",defVal:"none"},{name:"gradientDirection2",dispName:"Inside Gradient Direction",type:"enum",defVal:"south",enumList:[{val:"south",dispName:"South"},{val:"west",dispName:"West"},
{val:"north",dispName:"North"},{val:"east",dispName:"East"}]},{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"right",dispName:"Right",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left ",type:"bool",defVal:!0},{name:"topLeftStyle",dispName:"Top Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},
{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"topRightStyle",dispName:"Top Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomRightStyle",dispName:"Bottom Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",
-dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",dispName:"Bottom Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];ya.prototype.paintVertexShape=function(c,l,x,p,v){c.translate(l,
-x);this.strictDrawShape(c,0,0,p,v)};ya.prototype.strictDrawShape=function(c,l,x,p,v,A){var B=A&&A.rectStyle?A.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),ka=A&&A.absoluteCornerSize?A.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),J=A&&A.size?A.size:Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),xa=A&&A.rectOutline?A.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),oa=A&&A.indent?
-A.indent:Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),$a=A&&A.dashed?A.dashed:mxUtils.getValue(this.style,"dashed",!1),jb=A&&A.dashPattern?A.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),hb=A&&A.relIndent?A.relIndent:Math.max(0,Math.min(50,oa)),Ea=A&&A.top?A.top:mxUtils.getValue(this.style,"top",!0),Ka=A&&A.right?A.right:mxUtils.getValue(this.style,"right",!0),Ia=A&&A.bottom?A.bottom:mxUtils.getValue(this.style,"bottom",!0),Ha=A&&A.left?A.left:
-mxUtils.getValue(this.style,"left",!0),Ra=A&&A.topLeftStyle?A.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),Va=A&&A.topRightStyle?A.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),Wa=A&&A.bottomRightStyle?A.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),Ya=A&&A.bottomLeftStyle?A.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Eb=A&&A.fillColor?A.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");
+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"}]}];xa.prototype.paintVertexShape=function(c,l,x,p,v){c.translate(l,
+x);this.strictDrawShape(c,0,0,p,v)};xa.prototype.strictDrawShape=function(c,l,x,p,v,A){var B=A&&A.rectStyle?A.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),ka=A&&A.absoluteCornerSize?A.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),J=A&&A.size?A.size:Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),wa=A&&A.rectOutline?A.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),oa=A&&A.indent?
+A.indent:Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),ab=A&&A.dashed?A.dashed:mxUtils.getValue(this.style,"dashed",!1),jb=A&&A.dashPattern?A.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),gb=A&&A.relIndent?A.relIndent:Math.max(0,Math.min(50,oa)),Ea=A&&A.top?A.top:mxUtils.getValue(this.style,"top",!0),La=A&&A.right?A.right:mxUtils.getValue(this.style,"right",!0),Ia=A&&A.bottom?A.bottom:mxUtils.getValue(this.style,"bottom",!0),Ga=A&&A.left?A.left:
+mxUtils.getValue(this.style,"left",!0),Ta=A&&A.topLeftStyle?A.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),Xa=A&&A.topRightStyle?A.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),Ya=A&&A.bottomRightStyle?A.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),$a=A&&A.bottomLeftStyle?A.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Eb=A&&A.fillColor?A.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");
A&&A.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var Fb=A&&A.strokeWidth?A.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),Cb=A&&A.fillColor2?A.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),Db=A&&A.gradientColor2?A.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),Gb=A&&A.gradientDirection2?A.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Hb=A&&A.opacity?A.opacity:mxUtils.getValue(this.style,"opacity","100"),
-Ib=Math.max(0,Math.min(50,J));A=ya.prototype;c.setDashed($a);jb&&""!=jb&&c.setDashPattern(jb);c.setStrokeWidth(Fb);J=Math.min(.5*v,.5*p,J);ka||(J=Ib*Math.min(p,v)/100);J=Math.min(J,.5*Math.min(p,v));ka||(oa=Math.min(hb*Math.min(p,v)/100));oa=Math.min(oa,.5*Math.min(p,v)-J);(Ea||Ka||Ia||Ha)&&"frame"!=xa&&(c.begin(),Ea?A.moveNW(c,l,x,p,v,B,Ra,J,Ha):c.moveTo(0,0),Ea&&A.paintNW(c,l,x,p,v,B,Ra,J,Ha),A.paintTop(c,l,x,p,v,B,Va,J,Ka),Ka&&A.paintNE(c,l,x,p,v,B,Va,J,Ea),A.paintRight(c,l,x,p,v,B,Wa,J,Ia),Ia&&
-A.paintSE(c,l,x,p,v,B,Wa,J,Ka),A.paintBottom(c,l,x,p,v,B,Ya,J,Ha),Ha&&A.paintSW(c,l,x,p,v,B,Ya,J,Ia),A.paintLeft(c,l,x,p,v,B,Ra,J,Ea),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(Cb),$a=ka=Hb,"none"==Cb&&(ka=0),"none"==Db&&($a=0),c.setGradient(Cb,Db,0,0,p,v,Gb,ka,$a),c.begin(),Ea?A.moveNWInner(c,l,x,p,v,B,Ra,J,oa,Ea,Ha):c.moveTo(oa,0),A.paintLeftInner(c,l,x,p,v,B,Ya,J,oa,Ia,Ha),Ha&&Ia&&A.paintSWInner(c,l,x,p,v,B,Ya,J,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Wa,J,oa,Ka,Ia),Ia&&Ka&&A.paintSEInner(c,
-l,x,p,v,B,Wa,J,oa),A.paintRightInner(c,l,x,p,v,B,Va,J,oa,Ea,Ka),Ka&&Ea&&A.paintNEInner(c,l,x,p,v,B,Va,J,oa),A.paintTopInner(c,l,x,p,v,B,Ra,J,oa,Ha,Ea),Ea&&Ha&&A.paintNWInner(c,l,x,p,v,B,Ra,J,oa),c.fill(),"none"==Eb&&(c.begin(),A.paintFolds(c,l,x,p,v,B,Ra,Va,Wa,Ya,J,Ea,Ka,Ia,Ha),c.stroke()));Ea||Ka||Ia||!Ha?Ea||Ka||!Ia||Ha?!Ea&&!Ka&&Ia&&Ha?"frame"!=xa?(c.begin(),A.moveSE(c,l,x,p,v,B,Wa,J,Ka),A.paintBottom(c,l,x,p,v,B,Ya,J,Ha),A.paintSW(c,l,x,p,v,B,Ya,J,Ia),A.paintLeft(c,l,x,p,v,B,Ra,J,Ea),"double"==
-xa&&(A.moveNWInner(c,l,x,p,v,B,Ra,J,oa,Ea,Ha),A.paintLeftInner(c,l,x,p,v,B,Ya,J,oa,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,Ya,J,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Wa,J,oa,Ka,Ia)),c.stroke()):(c.begin(),A.moveSE(c,l,x,p,v,B,Wa,J,Ka),A.paintBottom(c,l,x,p,v,B,Ya,J,Ha),A.paintSW(c,l,x,p,v,B,Ya,J,Ia),A.paintLeft(c,l,x,p,v,B,Ra,J,Ea),A.lineNWInner(c,l,x,p,v,B,Ra,J,oa,Ea,Ha),A.paintLeftInner(c,l,x,p,v,B,Ya,J,oa,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,Ya,J,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Wa,J,oa,Ka,Ia),c.close(),
-c.fillAndStroke()):Ea||!Ka||Ia||Ha?!Ea&&Ka&&!Ia&&Ha?"frame"!=xa?(c.begin(),A.moveSW(c,l,x,p,v,B,Ra,J,Ia),A.paintLeft(c,l,x,p,v,B,Ra,J,Ea),"double"==xa&&(A.moveNWInner(c,l,x,p,v,B,Ra,J,oa,Ea,Ha),A.paintLeftInner(c,l,x,p,v,B,Ya,J,oa,Ia,Ha)),c.stroke(),c.begin(),A.moveNE(c,l,x,p,v,B,Va,J,Ea),A.paintRight(c,l,x,p,v,B,Wa,J,Ia),"double"==xa&&(A.moveSEInner(c,l,x,p,v,B,Wa,J,oa,Ia),A.paintRightInner(c,l,x,p,v,B,Va,J,oa,Ea,Ka)),c.stroke()):(c.begin(),A.moveSW(c,l,x,p,v,B,Ra,J,Ia),A.paintLeft(c,l,x,p,v,B,Ra,
-J,Ea),A.lineNWInner(c,l,x,p,v,B,Ra,J,oa,Ea,Ha),A.paintLeftInner(c,l,x,p,v,B,Ya,J,oa,Ia,Ha),c.close(),c.fillAndStroke(),c.begin(),A.moveNE(c,l,x,p,v,B,Va,J,Ea),A.paintRight(c,l,x,p,v,B,Wa,J,Ia),A.lineSEInner(c,l,x,p,v,B,Wa,J,oa,Ia),A.paintRightInner(c,l,x,p,v,B,Va,J,oa,Ea,Ka),c.close(),c.fillAndStroke()):!Ea&&Ka&&Ia&&!Ha?"frame"!=xa?(c.begin(),A.moveNE(c,l,x,p,v,B,Va,J,Ea),A.paintRight(c,l,x,p,v,B,Wa,J,Ia),A.paintSE(c,l,x,p,v,B,Wa,J,Ka),A.paintBottom(c,l,x,p,v,B,Ya,J,Ha),"double"==xa&&(A.moveSWInner(c,
-l,x,p,v,B,Ya,J,oa,Ha),A.paintBottomInner(c,l,x,p,v,B,Wa,J,oa,Ka,Ia),A.paintSEInner(c,l,x,p,v,B,Wa,J,oa),A.paintRightInner(c,l,x,p,v,B,Va,J,oa,Ea,Ka)),c.stroke()):(c.begin(),A.moveNE(c,l,x,p,v,B,Va,J,Ea),A.paintRight(c,l,x,p,v,B,Wa,J,Ia),A.paintSE(c,l,x,p,v,B,Wa,J,Ka),A.paintBottom(c,l,x,p,v,B,Ya,J,Ha),A.lineSWInner(c,l,x,p,v,B,Ya,J,oa,Ha),A.paintBottomInner(c,l,x,p,v,B,Wa,J,oa,Ka,Ia),A.paintSEInner(c,l,x,p,v,B,Wa,J,oa),A.paintRightInner(c,l,x,p,v,B,Va,J,oa,Ea,Ka),c.close(),c.fillAndStroke()):!Ea&&
-Ka&&Ia&&Ha?"frame"!=xa?(c.begin(),A.moveNE(c,l,x,p,v,B,Va,J,Ea),A.paintRight(c,l,x,p,v,B,Wa,J,Ia),A.paintSE(c,l,x,p,v,B,Wa,J,Ka),A.paintBottom(c,l,x,p,v,B,Ya,J,Ha),A.paintSW(c,l,x,p,v,B,Ya,J,Ia),A.paintLeft(c,l,x,p,v,B,Ra,J,Ea),"double"==xa&&(A.moveNWInner(c,l,x,p,v,B,Ra,J,oa,Ea,Ha),A.paintLeftInner(c,l,x,p,v,B,Ya,J,oa,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,Ya,J,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Wa,J,oa,Ka,Ia),A.paintSEInner(c,l,x,p,v,B,Wa,J,oa),A.paintRightInner(c,l,x,p,v,B,Va,J,oa,Ea,Ka)),c.stroke()):
-(c.begin(),A.moveNE(c,l,x,p,v,B,Va,J,Ea),A.paintRight(c,l,x,p,v,B,Wa,J,Ia),A.paintSE(c,l,x,p,v,B,Wa,J,Ka),A.paintBottom(c,l,x,p,v,B,Ya,J,Ha),A.paintSW(c,l,x,p,v,B,Ya,J,Ia),A.paintLeft(c,l,x,p,v,B,Ra,J,Ea),A.lineNWInner(c,l,x,p,v,B,Ra,J,oa,Ea,Ha),A.paintLeftInner(c,l,x,p,v,B,Ya,J,oa,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,Ya,J,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Wa,J,oa,Ka,Ia),A.paintSEInner(c,l,x,p,v,B,Wa,J,oa),A.paintRightInner(c,l,x,p,v,B,Va,J,oa,Ea,Ka),c.close(),c.fillAndStroke()):!Ea||Ka||Ia||Ha?
-Ea&&!Ka&&!Ia&&Ha?"frame"!=xa?(c.begin(),A.moveSW(c,l,x,p,v,B,Ya,J,Ia),A.paintLeft(c,l,x,p,v,B,Ra,J,Ea),A.paintNW(c,l,x,p,v,B,Ra,J,Ha),A.paintTop(c,l,x,p,v,B,Va,J,Ka),"double"==xa&&(A.moveNEInner(c,l,x,p,v,B,Va,J,oa,Ka),A.paintTopInner(c,l,x,p,v,B,Ra,J,oa,Ha,Ea),A.paintNWInner(c,l,x,p,v,B,Ra,J,oa),A.paintLeftInner(c,l,x,p,v,B,Ya,J,oa,Ia,Ha)),c.stroke()):(c.begin(),A.moveSW(c,l,x,p,v,B,Ya,J,Ia),A.paintLeft(c,l,x,p,v,B,Ra,J,Ea),A.paintNW(c,l,x,p,v,B,Ra,J,Ha),A.paintTop(c,l,x,p,v,B,Va,J,Ka),A.lineNEInner(c,
-l,x,p,v,B,Va,J,oa,Ka),A.paintTopInner(c,l,x,p,v,B,Ra,J,oa,Ha,Ea),A.paintNWInner(c,l,x,p,v,B,Ra,J,oa),A.paintLeftInner(c,l,x,p,v,B,Ya,J,oa,Ia,Ha),c.close(),c.fillAndStroke()):Ea&&!Ka&&Ia&&!Ha?"frame"!=xa?(c.begin(),A.moveNW(c,l,x,p,v,B,Ra,J,Ha),A.paintTop(c,l,x,p,v,B,Va,J,Ka),"double"==xa&&(A.moveNEInner(c,l,x,p,v,B,Va,J,oa,Ka),A.paintTopInner(c,l,x,p,v,B,Ra,J,oa,Ha,Ea)),c.stroke(),c.begin(),A.moveSE(c,l,x,p,v,B,Wa,J,Ka),A.paintBottom(c,l,x,p,v,B,Ya,J,Ha),"double"==xa&&(A.moveSWInner(c,l,x,p,v,B,Ya,
-J,oa,Ha),A.paintBottomInner(c,l,x,p,v,B,Wa,J,oa,Ka,Ia)),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Ra,J,Ha),A.paintTop(c,l,x,p,v,B,Va,J,Ka),A.lineNEInner(c,l,x,p,v,B,Va,J,oa,Ka),A.paintTopInner(c,l,x,p,v,B,Ra,J,oa,Ha,Ea),c.close(),c.fillAndStroke(),c.begin(),A.moveSE(c,l,x,p,v,B,Wa,J,Ka),A.paintBottom(c,l,x,p,v,B,Ya,J,Ha),A.lineSWInner(c,l,x,p,v,B,Ya,J,oa,Ha),A.paintBottomInner(c,l,x,p,v,B,Wa,J,oa,Ka,Ia),c.close(),c.fillAndStroke()):Ea&&!Ka&&Ia&&Ha?"frame"!=xa?(c.begin(),A.moveSE(c,l,x,p,v,B,Wa,
-J,Ka),A.paintBottom(c,l,x,p,v,B,Ya,J,Ha),A.paintSW(c,l,x,p,v,B,Ya,J,Ia),A.paintLeft(c,l,x,p,v,B,Ra,J,Ea),A.paintNW(c,l,x,p,v,B,Ra,J,Ha),A.paintTop(c,l,x,p,v,B,Va,J,Ka),"double"==xa&&(A.moveNEInner(c,l,x,p,v,B,Va,J,oa,Ka),A.paintTopInner(c,l,x,p,v,B,Ra,J,oa,Ha,Ea),A.paintNWInner(c,l,x,p,v,B,Ra,J,oa),A.paintLeftInner(c,l,x,p,v,B,Ya,J,oa,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,Ya,J,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Wa,J,oa,Ka,Ia)),c.stroke()):(c.begin(),A.moveSE(c,l,x,p,v,B,Wa,J,Ka),A.paintBottom(c,l,
-x,p,v,B,Ya,J,Ha),A.paintSW(c,l,x,p,v,B,Ya,J,Ia),A.paintLeft(c,l,x,p,v,B,Ra,J,Ea),A.paintNW(c,l,x,p,v,B,Ra,J,Ha),A.paintTop(c,l,x,p,v,B,Va,J,Ka),A.lineNEInner(c,l,x,p,v,B,Va,J,oa,Ka),A.paintTopInner(c,l,x,p,v,B,Ra,J,oa,Ha,Ea),A.paintNWInner(c,l,x,p,v,B,Ra,J,oa),A.paintLeftInner(c,l,x,p,v,B,Ya,J,oa,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,Ya,J,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Wa,J,oa,Ka,Ia),c.close(),c.fillAndStroke()):Ea&&Ka&&!Ia&&!Ha?"frame"!=xa?(c.begin(),A.moveNW(c,l,x,p,v,B,Ra,J,Ha),A.paintTop(c,
-l,x,p,v,B,Va,J,Ka),A.paintNE(c,l,x,p,v,B,Va,J,Ea),A.paintRight(c,l,x,p,v,B,Wa,J,Ia),"double"==xa&&(A.moveSEInner(c,l,x,p,v,B,Wa,J,oa,Ia),A.paintRightInner(c,l,x,p,v,B,Va,J,oa,Ea,Ka),A.paintNEInner(c,l,x,p,v,B,Va,J,oa),A.paintTopInner(c,l,x,p,v,B,Ra,J,oa,Ha,Ea)),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Ra,J,Ha),A.paintTop(c,l,x,p,v,B,Va,J,Ka),A.paintNE(c,l,x,p,v,B,Va,J,Ea),A.paintRight(c,l,x,p,v,B,Wa,J,Ia),A.lineSEInner(c,l,x,p,v,B,Wa,J,oa,Ia),A.paintRightInner(c,l,x,p,v,B,Va,J,oa,Ea,Ka),A.paintNEInner(c,
-l,x,p,v,B,Va,J,oa),A.paintTopInner(c,l,x,p,v,B,Ra,J,oa,Ha,Ea),c.close(),c.fillAndStroke()):Ea&&Ka&&!Ia&&Ha?"frame"!=xa?(c.begin(),A.moveSW(c,l,x,p,v,B,Ya,J,Ia),A.paintLeft(c,l,x,p,v,B,Ra,J,Ea),A.paintNW(c,l,x,p,v,B,Ra,J,Ha),A.paintTop(c,l,x,p,v,B,Va,J,Ka),A.paintNE(c,l,x,p,v,B,Va,J,Ea),A.paintRight(c,l,x,p,v,B,Wa,J,Ia),"double"==xa&&(A.moveSEInner(c,l,x,p,v,B,Wa,J,oa,Ia),A.paintRightInner(c,l,x,p,v,B,Va,J,oa,Ea,Ka),A.paintNEInner(c,l,x,p,v,B,Va,J,oa),A.paintTopInner(c,l,x,p,v,B,Ra,J,oa,Ha,Ea),A.paintNWInner(c,
-l,x,p,v,B,Ra,J,oa),A.paintLeftInner(c,l,x,p,v,B,Ya,J,oa,Ia,Ha)),c.stroke()):(c.begin(),A.moveSW(c,l,x,p,v,B,Ya,J,Ia),A.paintLeft(c,l,x,p,v,B,Ra,J,Ea),A.paintNW(c,l,x,p,v,B,Ra,J,Ha),A.paintTop(c,l,x,p,v,B,Va,J,Ka),A.paintNE(c,l,x,p,v,B,Va,J,Ea),A.paintRight(c,l,x,p,v,B,Wa,J,Ia),A.lineSEInner(c,l,x,p,v,B,Wa,J,oa,Ia),A.paintRightInner(c,l,x,p,v,B,Va,J,oa,Ea,Ka),A.paintNEInner(c,l,x,p,v,B,Va,J,oa),A.paintTopInner(c,l,x,p,v,B,Ra,J,oa,Ha,Ea),A.paintNWInner(c,l,x,p,v,B,Ra,J,oa),A.paintLeftInner(c,l,x,p,
-v,B,Ya,J,oa,Ia,Ha),c.close(),c.fillAndStroke()):Ea&&Ka&&Ia&&!Ha?"frame"!=xa?(c.begin(),A.moveNW(c,l,x,p,v,B,Ra,J,Ha),A.paintTop(c,l,x,p,v,B,Va,J,Ka),A.paintNE(c,l,x,p,v,B,Va,J,Ea),A.paintRight(c,l,x,p,v,B,Wa,J,Ia),A.paintSE(c,l,x,p,v,B,Wa,J,Ka),A.paintBottom(c,l,x,p,v,B,Ya,J,Ha),"double"==xa&&(A.moveSWInner(c,l,x,p,v,B,Ya,J,oa,Ha),A.paintBottomInner(c,l,x,p,v,B,Wa,J,oa,Ka,Ia),A.paintSEInner(c,l,x,p,v,B,Wa,J,oa),A.paintRightInner(c,l,x,p,v,B,Va,J,oa,Ea,Ka),A.paintNEInner(c,l,x,p,v,B,Va,J,oa),A.paintTopInner(c,
-l,x,p,v,B,Ra,J,oa,Ha,Ea)),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Ra,J,Ha),A.paintTop(c,l,x,p,v,B,Va,J,Ka),A.paintNE(c,l,x,p,v,B,Va,J,Ea),A.paintRight(c,l,x,p,v,B,Wa,J,Ia),A.paintSE(c,l,x,p,v,B,Wa,J,Ka),A.paintBottom(c,l,x,p,v,B,Ya,J,Ha),A.lineSWInner(c,l,x,p,v,B,Ya,J,oa,Ha),A.paintBottomInner(c,l,x,p,v,B,Wa,J,oa,Ka,Ia),A.paintSEInner(c,l,x,p,v,B,Wa,J,oa),A.paintRightInner(c,l,x,p,v,B,Va,J,oa,Ea,Ka),A.paintNEInner(c,l,x,p,v,B,Va,J,oa),A.paintTopInner(c,l,x,p,v,B,Ra,J,oa,Ha,Ea),c.close(),c.fillAndStroke()):
-Ea&&Ka&&Ia&&Ha&&("frame"!=xa?(c.begin(),A.moveNW(c,l,x,p,v,B,Ra,J,Ha),A.paintNW(c,l,x,p,v,B,Ra,J,Ha),A.paintTop(c,l,x,p,v,B,Va,J,Ka),A.paintNE(c,l,x,p,v,B,Va,J,Ea),A.paintRight(c,l,x,p,v,B,Wa,J,Ia),A.paintSE(c,l,x,p,v,B,Wa,J,Ka),A.paintBottom(c,l,x,p,v,B,Ya,J,Ha),A.paintSW(c,l,x,p,v,B,Ya,J,Ia),A.paintLeft(c,l,x,p,v,B,Ra,J,Ea),c.close(),"double"==xa&&(A.moveSWInner(c,l,x,p,v,B,Ya,J,oa,Ha),A.paintSWInner(c,l,x,p,v,B,Ya,J,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Wa,J,oa,Ka,Ia),A.paintSEInner(c,l,x,p,v,
-B,Wa,J,oa),A.paintRightInner(c,l,x,p,v,B,Va,J,oa,Ea,Ka),A.paintNEInner(c,l,x,p,v,B,Va,J,oa),A.paintTopInner(c,l,x,p,v,B,Ra,J,oa,Ha,Ea),A.paintNWInner(c,l,x,p,v,B,Ra,J,oa),A.paintLeftInner(c,l,x,p,v,B,Ya,J,oa,Ia,Ha),c.close()),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Ra,J,Ha),A.paintNW(c,l,x,p,v,B,Ra,J,Ha),A.paintTop(c,l,x,p,v,B,Va,J,Ka),A.paintNE(c,l,x,p,v,B,Va,J,Ea),A.paintRight(c,l,x,p,v,B,Wa,J,Ia),A.paintSE(c,l,x,p,v,B,Wa,J,Ka),A.paintBottom(c,l,x,p,v,B,Ya,J,Ha),A.paintSW(c,l,x,p,v,B,Ya,J,Ia),
-A.paintLeft(c,l,x,p,v,B,Ra,J,Ea),c.close(),A.moveSWInner(c,l,x,p,v,B,Ya,J,oa,Ha),A.paintSWInner(c,l,x,p,v,B,Ya,J,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Wa,J,oa,Ka,Ia),A.paintSEInner(c,l,x,p,v,B,Wa,J,oa),A.paintRightInner(c,l,x,p,v,B,Va,J,oa,Ea,Ka),A.paintNEInner(c,l,x,p,v,B,Va,J,oa),A.paintTopInner(c,l,x,p,v,B,Ra,J,oa,Ha,Ea),A.paintNWInner(c,l,x,p,v,B,Ra,J,oa),A.paintLeftInner(c,l,x,p,v,B,Ya,J,oa,Ia,Ha),c.close(),c.fillAndStroke())):"frame"!=xa?(c.begin(),A.moveNW(c,l,x,p,v,B,Ra,J,Ha),A.paintTop(c,
-l,x,p,v,B,Va,J,Ka),"double"==xa&&(A.moveNEInner(c,l,x,p,v,B,Va,J,oa,Ka),A.paintTopInner(c,l,x,p,v,B,Ra,J,oa,Ha,Ea)),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Ra,J,Ha),A.paintTop(c,l,x,p,v,B,Va,J,Ka),A.lineNEInner(c,l,x,p,v,B,Va,J,oa,Ka),A.paintTopInner(c,l,x,p,v,B,Ra,J,oa,Ha,Ea),c.close(),c.fillAndStroke()):"frame"!=xa?(c.begin(),A.moveNE(c,l,x,p,v,B,Va,J,Ea),A.paintRight(c,l,x,p,v,B,Wa,J,Ia),"double"==xa&&(A.moveSEInner(c,l,x,p,v,B,Wa,J,oa,Ia),A.paintRightInner(c,l,x,p,v,B,Va,J,oa,Ea,Ka)),c.stroke()):
-(c.begin(),A.moveNE(c,l,x,p,v,B,Va,J,Ea),A.paintRight(c,l,x,p,v,B,Wa,J,Ia),A.lineSEInner(c,l,x,p,v,B,Wa,J,oa,Ia),A.paintRightInner(c,l,x,p,v,B,Va,J,oa,Ea,Ka),c.close(),c.fillAndStroke()):"frame"!=xa?(c.begin(),A.moveSE(c,l,x,p,v,B,Wa,J,Ka),A.paintBottom(c,l,x,p,v,B,Ya,J,Ha),"double"==xa&&(A.moveSWInner(c,l,x,p,v,B,Ya,J,oa,Ha),A.paintBottomInner(c,l,x,p,v,B,Wa,J,oa,Ka,Ia)),c.stroke()):(c.begin(),A.moveSE(c,l,x,p,v,B,Wa,J,Ka),A.paintBottom(c,l,x,p,v,B,Ya,J,Ha),A.lineSWInner(c,l,x,p,v,B,Ya,J,oa,Ha),
-A.paintBottomInner(c,l,x,p,v,B,Wa,J,oa,Ka,Ia),c.close(),c.fillAndStroke()):"frame"!=xa?(c.begin(),A.moveSW(c,l,x,p,v,B,Ra,J,Ia),A.paintLeft(c,l,x,p,v,B,Ra,J,Ea),"double"==xa&&(A.moveNWInner(c,l,x,p,v,B,Ra,J,oa,Ea,Ha),A.paintLeftInner(c,l,x,p,v,B,Ya,J,oa,Ia,Ha)),c.stroke()):(c.begin(),A.moveSW(c,l,x,p,v,B,Ra,J,Ia),A.paintLeft(c,l,x,p,v,B,Ra,J,Ea),A.lineNWInner(c,l,x,p,v,B,Ra,J,oa,Ea,Ha),A.paintLeftInner(c,l,x,p,v,B,Ya,J,oa,Ia,Ha),c.close(),c.fillAndStroke());c.begin();A.paintFolds(c,l,x,p,v,B,Ra,Va,
-Wa,Ya,J,Ea,Ka,Ia,Ha);c.stroke()};ya.prototype.moveNW=function(c,l,x,p,v,A,B,ka,J){"square"==B||"default"==B&&"square"==A||!J?c.moveTo(0,0):c.moveTo(0,ka)};ya.prototype.moveNE=function(c,l,x,p,v,A,B,ka,J){"square"==B||"default"==B&&"square"==A||!J?c.moveTo(p,0):c.moveTo(p-ka,0)};ya.prototype.moveSE=function(c,l,x,p,v,A,B,ka,J){"square"==B||"default"==B&&"square"==A||!J?c.moveTo(p,v):c.moveTo(p,v-ka)};ya.prototype.moveSW=function(c,l,x,p,v,A,B,ka,J){"square"==B||"default"==B&&"square"==A||!J?c.moveTo(0,
-v):c.moveTo(ka,v)};ya.prototype.paintNW=function(c,l,x,p,v,A,B,ka,J){if(J)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ka,ka,0,0,l,ka,0)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(ka,0);else c.lineTo(0,0)};ya.prototype.paintTop=function(c,l,x,p,v,A,B,ka,J){"square"==B||"default"==B&&"square"==A||!J?c.lineTo(p,0):c.lineTo(p-ka,0)};ya.prototype.paintNE=
-function(c,l,x,p,v,A,B,ka,J){if(J)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ka,ka,0,0,l,p,ka)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p,ka);else c.lineTo(p,0)};ya.prototype.paintRight=function(c,l,x,p,v,A,B,ka,J){"square"==B||"default"==B&&"square"==A||!J?c.lineTo(p,v):c.lineTo(p,v-ka)};ya.prototype.paintLeft=function(c,l,x,p,v,A,B,ka,J){"square"==
-B||"default"==B&&"square"==A||!J?c.lineTo(0,0):c.lineTo(0,ka)};ya.prototype.paintSE=function(c,l,x,p,v,A,B,ka,J){if(J)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ka,ka,0,0,l,p-ka,v)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-ka,v);else c.lineTo(p,v)};ya.prototype.paintBottom=function(c,l,x,p,v,A,B,ka,J){"square"==B||"default"==B&&"square"==A||!J?c.lineTo(0,
-v):c.lineTo(ka,v)};ya.prototype.paintSW=function(c,l,x,p,v,A,B,ka,J){if(J)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ka,ka,0,0,l,0,v-ka)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(0,v-ka);else c.lineTo(0,v)};ya.prototype.paintNWInner=function(c,l,x,p,v,A,B,ka,J){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ka-.5*J,ka-.5*J,0,0,0,J,.5*J+ka);else if("invRound"==
-B||"default"==B&&"invRound"==A)c.arcTo(ka+J,ka+J,0,0,1,J,J+ka);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(J,.5*J+ka);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(J+ka,J+ka),c.lineTo(J,J+ka)};ya.prototype.paintTopInner=function(c,l,x,p,v,A,B,ka,J,xa,oa){xa||oa?!xa&&oa?c.lineTo(0,J):xa&&!oa?c.lineTo(J,0):xa?"square"==B||"default"==B&&"square"==A?c.lineTo(J,J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(ka+.5*J,J):c.lineTo(ka+J,J):c.lineTo(0,
-J):c.lineTo(0,0)};ya.prototype.paintNEInner=function(c,l,x,p,v,A,B,ka,J){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ka-.5*J,ka-.5*J,0,0,0,p-ka-.5*J,J);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(ka+J,ka+J,0,0,1,p-ka-J,J);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(p-ka-.5*J,J);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(p-ka-J,ka+J),c.lineTo(p-ka-J,J)};ya.prototype.paintRightInner=function(c,l,x,p,v,A,B,ka,J,xa,oa){xa||oa?!xa&&oa?c.lineTo(p-J,0):xa&&!oa?c.lineTo(p,
-J):xa?"square"==B||"default"==B&&"square"==A?c.lineTo(p-J,J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-J,ka+.5*J):c.lineTo(p-J,ka+J):c.lineTo(p-J,0):c.lineTo(p,0)};ya.prototype.paintLeftInner=function(c,l,x,p,v,A,B,ka,J,xa,oa){xa||oa?!xa&&oa?c.lineTo(J,v):xa&&!oa?c.lineTo(0,v-J):xa?"square"==B||"default"==B&&"square"==A?c.lineTo(J,v-J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(J,v-ka-.5*J):c.lineTo(J,v-ka-J):
-c.lineTo(J,v):c.lineTo(0,v)};ya.prototype.paintSEInner=function(c,l,x,p,v,A,B,ka,J){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ka-.5*J,ka-.5*J,0,0,0,p-J,v-ka-.5*J);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(ka+J,ka+J,0,0,1,p-J,v-ka-J);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(p-J,v-ka-.5*J);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(p-ka-J,v-ka-J),c.lineTo(p-J,v-ka-J)};ya.prototype.paintBottomInner=function(c,l,x,p,v,A,B,ka,J,xa,oa){xa||oa?!xa&&oa?c.lineTo(p,
-v-J):xa&&!oa?c.lineTo(p-J,v):"square"==B||"default"==B&&"square"==A||!xa?c.lineTo(p-J,v-J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-ka-.5*J,v-J):c.lineTo(p-ka-J,v-J):c.lineTo(p,v)};ya.prototype.paintSWInner=function(c,l,x,p,v,A,B,ka,J,xa){if(!xa)c.lineTo(J,v);else if("square"==B||"default"==B&&"square"==A)c.lineTo(J,v-J);else if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ka-.5*J,ka-.5*J,0,0,0,ka+.5*J,v-J);else if("invRound"==B||"default"==B&&"invRound"==
-A)c.arcTo(ka+J,ka+J,0,0,1,ka+J,v-J);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(ka+.5*J,v-J);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(J+ka,v-ka-J),c.lineTo(J+ka,v-J)};ya.prototype.moveSWInner=function(c,l,x,p,v,A,B,ka,J,xa){xa?"square"==B||"default"==B&&"square"==A?c.moveTo(J,v-J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(J,v-ka-.5*J):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(J,v-ka-J):
-c.moveTo(0,v-J)};ya.prototype.lineSWInner=function(c,l,x,p,v,A,B,ka,J,xa){xa?"square"==B||"default"==B&&"square"==A?c.lineTo(J,v-J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(J,v-ka-.5*J):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(J,v-ka-J):c.lineTo(0,v-J)};ya.prototype.moveSEInner=function(c,l,x,p,v,A,B,ka,J,xa){xa?"square"==B||"default"==B&&"square"==A?c.moveTo(p-J,v-J):"rounded"==B||"default"==B&&"rounded"==
-A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(p-J,v-ka-.5*J):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(p-J,v-ka-J):c.moveTo(p-J,v)};ya.prototype.lineSEInner=function(c,l,x,p,v,A,B,ka,J,xa){xa?"square"==B||"default"==B&&"square"==A?c.lineTo(p-J,v-J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-J,v-ka-.5*J):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-J,v-ka-J):
-c.lineTo(p-J,v)};ya.prototype.moveNEInner=function(c,l,x,p,v,A,B,ka,J,xa){xa?"square"==B||"default"==B&&"square"==A||xa?c.moveTo(p-J,J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(p-J,ka+.5*J):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(p-J,ka+J):c.moveTo(p,J)};ya.prototype.lineNEInner=function(c,l,x,p,v,A,B,ka,J,xa){xa?"square"==B||"default"==B&&"square"==A||xa?c.lineTo(p-J,J):"rounded"==B||"default"==B&&"rounded"==
-A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-J,ka+.5*J):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-J,ka+J):c.lineTo(p,J)};ya.prototype.moveNWInner=function(c,l,x,p,v,A,B,ka,J,xa,oa){xa||oa?!xa&&oa?c.moveTo(J,0):xa&&!oa?c.moveTo(0,J):"square"==B||"default"==B&&"square"==A?c.moveTo(J,J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(J,ka+.5*J):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==
-B&&"fold"==A)&&c.moveTo(J,ka+J):c.moveTo(0,0)};ya.prototype.lineNWInner=function(c,l,x,p,v,A,B,ka,J,xa,oa){xa||oa?!xa&&oa?c.lineTo(J,0):xa&&!oa?c.lineTo(0,J):"square"==B||"default"==B&&"square"==A?c.lineTo(J,J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(J,ka+.5*J):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(J,ka+J):c.lineTo(0,0)};ya.prototype.paintFolds=function(c,l,x,p,v,A,B,ka,J,xa,oa,$a,jb,hb,Ea){if("fold"==
-A||"fold"==B||"fold"==ka||"fold"==J||"fold"==xa)("fold"==B||"default"==B&&"fold"==A)&&$a&&Ea&&(c.moveTo(0,oa),c.lineTo(oa,oa),c.lineTo(oa,0)),("fold"==ka||"default"==ka&&"fold"==A)&&$a&&jb&&(c.moveTo(p-oa,0),c.lineTo(p-oa,oa),c.lineTo(p,oa)),("fold"==J||"default"==J&&"fold"==A)&&hb&&jb&&(c.moveTo(p-oa,v),c.lineTo(p-oa,v-oa),c.lineTo(p,v-oa)),("fold"==xa||"default"==xa&&"fold"==A)&&hb&&Ea&&(c.moveTo(0,v-oa),c.lineTo(oa,v-oa),c.lineTo(oa,v))};mxCellRenderer.registerShape(ya.prototype.cst.RECT2,ya);
-ya.prototype.constraints=null;mxUtils.extend(Na,mxConnector);Na.prototype.origPaintEdgeShape=Na.prototype.paintEdgeShape;Na.prototype.paintEdgeShape=function(c,l,x){for(var p=[],v=0;v<l.length;v++)p.push(mxUtils.clone(l[v]));v=c.state.dashed;var A=c.state.fixDash;Na.prototype.origPaintEdgeShape.apply(this,[c,p,x]);3<=c.state.strokeWidth&&(p=mxUtils.getValue(this.style,"fillColor",null),null!=p&&(c.setStrokeColor(p),c.setStrokeWidth(c.state.strokeWidth-2),c.setDashed(v,A),Na.prototype.origPaintEdgeShape.apply(this,
-[c,l,x])))};mxCellRenderer.registerShape("filledEdge",Na);"undefined"!==typeof StyleFormatPanel&&function(){var c=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var l=this.editorUi.getSelectionState(),x=c.apply(this,arguments);"umlFrame"==l.style.shape&&x.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return x}}();mxMarker.addMarker("dash",function(c,l,x,p,v,A,B,ka,J,xa){var oa=v*(B+J+1),$a=A*(B+J+1);return function(){c.begin();
-c.moveTo(p.x-oa/2-$a/2,p.y-$a/2+oa/2);c.lineTo(p.x+$a/2-3*oa/2,p.y-3*$a/2-oa/2);c.stroke()}});mxMarker.addMarker("box",function(c,l,x,p,v,A,B,ka,J,xa){var oa=v*(B+J+1),$a=A*(B+J+1),jb=p.x+oa/2,hb=p.y+$a/2;p.x-=oa;p.y-=$a;return function(){c.begin();c.moveTo(jb-oa/2-$a/2,hb-$a/2+oa/2);c.lineTo(jb-oa/2+$a/2,hb-$a/2-oa/2);c.lineTo(jb+$a/2-3*oa/2,hb-3*$a/2-oa/2);c.lineTo(jb-$a/2-3*oa/2,hb-3*$a/2+oa/2);c.close();xa?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("cross",function(c,l,x,p,v,A,B,ka,J,
-xa){var oa=v*(B+J+1),$a=A*(B+J+1);return function(){c.begin();c.moveTo(p.x-oa/2-$a/2,p.y-$a/2+oa/2);c.lineTo(p.x+$a/2-3*oa/2,p.y-3*$a/2-oa/2);c.moveTo(p.x-oa/2+$a/2,p.y-$a/2-oa/2);c.lineTo(p.x-$a/2-3*oa/2,p.y-3*$a/2+oa/2);c.stroke()}});mxMarker.addMarker("circle",Ja);mxMarker.addMarker("circlePlus",function(c,l,x,p,v,A,B,ka,J,xa){var oa=p.clone(),$a=Ja.apply(this,arguments),jb=v*(B+2*J),hb=A*(B+2*J);return function(){$a.apply(this,arguments);c.begin();c.moveTo(oa.x-v*J,oa.y-A*J);c.lineTo(oa.x-2*jb+
-v*J,oa.y-2*hb+A*J);c.moveTo(oa.x-jb-hb+A*J,oa.y-hb+jb-v*J);c.lineTo(oa.x+hb-jb-A*J,oa.y-hb-jb+v*J);c.stroke()}});mxMarker.addMarker("halfCircle",function(c,l,x,p,v,A,B,ka,J,xa){var oa=v*(B+J+1),$a=A*(B+J+1),jb=p.clone();p.x-=oa;p.y-=$a;return function(){c.begin();c.moveTo(jb.x-$a,jb.y+oa);c.quadTo(p.x-$a,p.y+oa,p.x,p.y);c.quadTo(p.x+$a,p.y-oa,jb.x+$a,jb.y-oa);c.stroke()}});mxMarker.addMarker("async",function(c,l,x,p,v,A,B,ka,J,xa){l=v*J*1.118;x=A*J*1.118;v*=B+J;A*=B+J;var oa=p.clone();oa.x-=l;oa.y-=
-x;p.x+=-v-l;p.y+=-A-x;return function(){c.begin();c.moveTo(oa.x,oa.y);ka?c.lineTo(oa.x-v-A/2,oa.y-A+v/2):c.lineTo(oa.x+A/2-v,oa.y-A-v/2);c.lineTo(oa.x-v,oa.y-A);c.close();xa?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("openAsync",function(c){c=null!=c?c:2;return function(l,x,p,v,A,B,ka,J,xa,oa){A*=ka+xa;B*=ka+xa;var $a=v.clone();return function(){l.begin();l.moveTo($a.x,$a.y);J?l.lineTo($a.x-A-B/c,$a.y-B+A/c):l.lineTo($a.x+B/c-A,$a.y-B-A/c);l.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var kb=
-function(c,l,x){return ib(c,["width"],l,function(p,v,A,B,ka){ka=c.shape.getEdgeWidth()*c.view.scale+x;return new mxPoint(B.x+v*p/4+A*ka/2,B.y+A*p/4-v*ka/2)},function(p,v,A,B,ka,J){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ka.x,ka.y,J.x,J.y));c.style.width=Math.round(2*p)/c.view.scale-x})},ib=function(c,l,x,p,v){return gb(c,l,function(A){var B=c.absolutePoints,ka=B.length-1;A=c.view.translate;var J=c.view.scale,xa=x?B[0]:B[ka];B=x?B[1]:B[ka-1];ka=B.x-xa.x;var oa=B.y-xa.y,$a=Math.sqrt(ka*ka+oa*oa);xa=
-p.call(this,$a,ka/$a,oa/$a,xa,B);return new mxPoint(xa.x/J-A.x,xa.y/J-A.y)},function(A,B,ka){var J=c.absolutePoints,xa=J.length-1;A=c.view.translate;var oa=c.view.scale,$a=x?J[0]:J[xa];J=x?J[1]:J[xa-1];xa=J.x-$a.x;var jb=J.y-$a.y,hb=Math.sqrt(xa*xa+jb*jb);B.x=(B.x+A.x)*oa;B.y=(B.y+A.y)*oa;v.call(this,hb,xa/hb,jb/hb,$a,J,B,ka)})},ob=function(c){return function(l){return[gb(l,["arrowWidth","arrowSize"],function(x){var p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",bb.prototype.arrowWidth))),
-v=Math.max(0,Math.min(c,mxUtils.getValue(this.state.style,"arrowSize",bb.prototype.arrowSize)));return new mxPoint(x.x+(1-v)*x.width,x.y+(1-p)*x.height/2)},function(x,p){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(x.y+x.height/2-p.y)/x.height*2));this.state.style.arrowSize=Math.max(0,Math.min(c,(x.x+x.width-p.x)/x.width))})]}},vb=function(c){return function(l){return[gb(l,["size"],function(x){var p=Math.max(0,Math.min(.5*x.height,parseFloat(mxUtils.getValue(this.state.style,"size",
-c))));return new mxPoint(x.x,x.y+p)},function(x,p){this.state.style.size=Math.max(0,p.y-x.y)},!0)]}},nb=function(c,l,x){return function(p){var v=[gb(p,["size"],function(A){var B=Math.max(0,Math.min(A.width,Math.min(A.height,parseFloat(mxUtils.getValue(this.state.style,"size",l)))))*c;return new mxPoint(A.x+B,A.y+B)},function(A,B){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(A.width,B.x-A.x),Math.min(A.height,B.y-A.y)))/c)},!1)];x&&mxUtils.getValue(p.style,mxConstants.STYLE_ROUNDED,
-!1)&&v.push(pb(p));return v}},Bb=function(c,l,x,p,v){x=null!=x?x:.5;return function(A){var B=[gb(A,["size"],function(ka){var J=null!=v?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,xa=parseFloat(mxUtils.getValue(this.state.style,"size",J?v:c));return new mxPoint(ka.x+Math.max(0,Math.min(.5*ka.width,xa*(J?1:ka.width))),ka.getCenterY())},function(ka,J,xa){ka=null!=v&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?J.x-ka.x:Math.max(0,Math.min(x,(J.x-ka.x)/ka.width));this.state.style.size=
-ka},!1,p)];l&&mxUtils.getValue(A.style,mxConstants.STYLE_ROUNDED,!1)&&B.push(pb(A));return B}},yb=function(c,l,x){c=null!=c?c:.5;return function(p){var v=[gb(p,["size"],function(A){var B=null!=x?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,ka=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",B?x:l)));return new mxPoint(A.x+Math.min(.75*A.width*c,ka*(B?.75:.75*A.width)),A.y+A.height/4)},function(A,B){A=null!=x&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?B.x-
-A.x:Math.max(0,Math.min(c,(B.x-A.x)/A.width*.75));this.state.style.size=A},!1,!0)];mxUtils.getValue(p.style,mxConstants.STYLE_ROUNDED,!1)&&v.push(pb(p));return v}},mb=function(){return function(c){var l=[];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(pb(c));return l}},pb=function(c,l){return gb(c,[mxConstants.STYLE_ARCSIZE],function(x){var p=null!=l?l:x.height/8;if("1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var v=mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,
+Ib=Math.max(0,Math.min(50,J));A=xa.prototype;c.setDashed(ab);jb&&""!=jb&&c.setDashPattern(jb);c.setStrokeWidth(Fb);J=Math.min(.5*v,.5*p,J);ka||(J=Ib*Math.min(p,v)/100);J=Math.min(J,.5*Math.min(p,v));ka||(oa=Math.min(gb*Math.min(p,v)/100));oa=Math.min(oa,.5*Math.min(p,v)-J);(Ea||La||Ia||Ga)&&"frame"!=wa&&(c.begin(),Ea?A.moveNW(c,l,x,p,v,B,Ta,J,Ga):c.moveTo(0,0),Ea&&A.paintNW(c,l,x,p,v,B,Ta,J,Ga),A.paintTop(c,l,x,p,v,B,Xa,J,La),La&&A.paintNE(c,l,x,p,v,B,Xa,J,Ea),A.paintRight(c,l,x,p,v,B,Ya,J,Ia),Ia&&
+A.paintSE(c,l,x,p,v,B,Ya,J,La),A.paintBottom(c,l,x,p,v,B,$a,J,Ga),Ga&&A.paintSW(c,l,x,p,v,B,$a,J,Ia),A.paintLeft(c,l,x,p,v,B,Ta,J,Ea),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(Cb),ab=ka=Hb,"none"==Cb&&(ka=0),"none"==Db&&(ab=0),c.setGradient(Cb,Db,0,0,p,v,Gb,ka,ab),c.begin(),Ea?A.moveNWInner(c,l,x,p,v,B,Ta,J,oa,Ea,Ga):c.moveTo(oa,0),A.paintLeftInner(c,l,x,p,v,B,$a,J,oa,Ia,Ga),Ga&&Ia&&A.paintSWInner(c,l,x,p,v,B,$a,J,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Ya,J,oa,La,Ia),Ia&&La&&A.paintSEInner(c,
+l,x,p,v,B,Ya,J,oa),A.paintRightInner(c,l,x,p,v,B,Xa,J,oa,Ea,La),La&&Ea&&A.paintNEInner(c,l,x,p,v,B,Xa,J,oa),A.paintTopInner(c,l,x,p,v,B,Ta,J,oa,Ga,Ea),Ea&&Ga&&A.paintNWInner(c,l,x,p,v,B,Ta,J,oa),c.fill(),"none"==Eb&&(c.begin(),A.paintFolds(c,l,x,p,v,B,Ta,Xa,Ya,$a,J,Ea,La,Ia,Ga),c.stroke()));Ea||La||Ia||!Ga?Ea||La||!Ia||Ga?!Ea&&!La&&Ia&&Ga?"frame"!=wa?(c.begin(),A.moveSE(c,l,x,p,v,B,Ya,J,La),A.paintBottom(c,l,x,p,v,B,$a,J,Ga),A.paintSW(c,l,x,p,v,B,$a,J,Ia),A.paintLeft(c,l,x,p,v,B,Ta,J,Ea),"double"==
+wa&&(A.moveNWInner(c,l,x,p,v,B,Ta,J,oa,Ea,Ga),A.paintLeftInner(c,l,x,p,v,B,$a,J,oa,Ia,Ga),A.paintSWInner(c,l,x,p,v,B,$a,J,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Ya,J,oa,La,Ia)),c.stroke()):(c.begin(),A.moveSE(c,l,x,p,v,B,Ya,J,La),A.paintBottom(c,l,x,p,v,B,$a,J,Ga),A.paintSW(c,l,x,p,v,B,$a,J,Ia),A.paintLeft(c,l,x,p,v,B,Ta,J,Ea),A.lineNWInner(c,l,x,p,v,B,Ta,J,oa,Ea,Ga),A.paintLeftInner(c,l,x,p,v,B,$a,J,oa,Ia,Ga),A.paintSWInner(c,l,x,p,v,B,$a,J,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Ya,J,oa,La,Ia),c.close(),
+c.fillAndStroke()):Ea||!La||Ia||Ga?!Ea&&La&&!Ia&&Ga?"frame"!=wa?(c.begin(),A.moveSW(c,l,x,p,v,B,Ta,J,Ia),A.paintLeft(c,l,x,p,v,B,Ta,J,Ea),"double"==wa&&(A.moveNWInner(c,l,x,p,v,B,Ta,J,oa,Ea,Ga),A.paintLeftInner(c,l,x,p,v,B,$a,J,oa,Ia,Ga)),c.stroke(),c.begin(),A.moveNE(c,l,x,p,v,B,Xa,J,Ea),A.paintRight(c,l,x,p,v,B,Ya,J,Ia),"double"==wa&&(A.moveSEInner(c,l,x,p,v,B,Ya,J,oa,Ia),A.paintRightInner(c,l,x,p,v,B,Xa,J,oa,Ea,La)),c.stroke()):(c.begin(),A.moveSW(c,l,x,p,v,B,Ta,J,Ia),A.paintLeft(c,l,x,p,v,B,Ta,
+J,Ea),A.lineNWInner(c,l,x,p,v,B,Ta,J,oa,Ea,Ga),A.paintLeftInner(c,l,x,p,v,B,$a,J,oa,Ia,Ga),c.close(),c.fillAndStroke(),c.begin(),A.moveNE(c,l,x,p,v,B,Xa,J,Ea),A.paintRight(c,l,x,p,v,B,Ya,J,Ia),A.lineSEInner(c,l,x,p,v,B,Ya,J,oa,Ia),A.paintRightInner(c,l,x,p,v,B,Xa,J,oa,Ea,La),c.close(),c.fillAndStroke()):!Ea&&La&&Ia&&!Ga?"frame"!=wa?(c.begin(),A.moveNE(c,l,x,p,v,B,Xa,J,Ea),A.paintRight(c,l,x,p,v,B,Ya,J,Ia),A.paintSE(c,l,x,p,v,B,Ya,J,La),A.paintBottom(c,l,x,p,v,B,$a,J,Ga),"double"==wa&&(A.moveSWInner(c,
+l,x,p,v,B,$a,J,oa,Ga),A.paintBottomInner(c,l,x,p,v,B,Ya,J,oa,La,Ia),A.paintSEInner(c,l,x,p,v,B,Ya,J,oa),A.paintRightInner(c,l,x,p,v,B,Xa,J,oa,Ea,La)),c.stroke()):(c.begin(),A.moveNE(c,l,x,p,v,B,Xa,J,Ea),A.paintRight(c,l,x,p,v,B,Ya,J,Ia),A.paintSE(c,l,x,p,v,B,Ya,J,La),A.paintBottom(c,l,x,p,v,B,$a,J,Ga),A.lineSWInner(c,l,x,p,v,B,$a,J,oa,Ga),A.paintBottomInner(c,l,x,p,v,B,Ya,J,oa,La,Ia),A.paintSEInner(c,l,x,p,v,B,Ya,J,oa),A.paintRightInner(c,l,x,p,v,B,Xa,J,oa,Ea,La),c.close(),c.fillAndStroke()):!Ea&&
+La&&Ia&&Ga?"frame"!=wa?(c.begin(),A.moveNE(c,l,x,p,v,B,Xa,J,Ea),A.paintRight(c,l,x,p,v,B,Ya,J,Ia),A.paintSE(c,l,x,p,v,B,Ya,J,La),A.paintBottom(c,l,x,p,v,B,$a,J,Ga),A.paintSW(c,l,x,p,v,B,$a,J,Ia),A.paintLeft(c,l,x,p,v,B,Ta,J,Ea),"double"==wa&&(A.moveNWInner(c,l,x,p,v,B,Ta,J,oa,Ea,Ga),A.paintLeftInner(c,l,x,p,v,B,$a,J,oa,Ia,Ga),A.paintSWInner(c,l,x,p,v,B,$a,J,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Ya,J,oa,La,Ia),A.paintSEInner(c,l,x,p,v,B,Ya,J,oa),A.paintRightInner(c,l,x,p,v,B,Xa,J,oa,Ea,La)),c.stroke()):
+(c.begin(),A.moveNE(c,l,x,p,v,B,Xa,J,Ea),A.paintRight(c,l,x,p,v,B,Ya,J,Ia),A.paintSE(c,l,x,p,v,B,Ya,J,La),A.paintBottom(c,l,x,p,v,B,$a,J,Ga),A.paintSW(c,l,x,p,v,B,$a,J,Ia),A.paintLeft(c,l,x,p,v,B,Ta,J,Ea),A.lineNWInner(c,l,x,p,v,B,Ta,J,oa,Ea,Ga),A.paintLeftInner(c,l,x,p,v,B,$a,J,oa,Ia,Ga),A.paintSWInner(c,l,x,p,v,B,$a,J,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Ya,J,oa,La,Ia),A.paintSEInner(c,l,x,p,v,B,Ya,J,oa),A.paintRightInner(c,l,x,p,v,B,Xa,J,oa,Ea,La),c.close(),c.fillAndStroke()):!Ea||La||Ia||Ga?
+Ea&&!La&&!Ia&&Ga?"frame"!=wa?(c.begin(),A.moveSW(c,l,x,p,v,B,$a,J,Ia),A.paintLeft(c,l,x,p,v,B,Ta,J,Ea),A.paintNW(c,l,x,p,v,B,Ta,J,Ga),A.paintTop(c,l,x,p,v,B,Xa,J,La),"double"==wa&&(A.moveNEInner(c,l,x,p,v,B,Xa,J,oa,La),A.paintTopInner(c,l,x,p,v,B,Ta,J,oa,Ga,Ea),A.paintNWInner(c,l,x,p,v,B,Ta,J,oa),A.paintLeftInner(c,l,x,p,v,B,$a,J,oa,Ia,Ga)),c.stroke()):(c.begin(),A.moveSW(c,l,x,p,v,B,$a,J,Ia),A.paintLeft(c,l,x,p,v,B,Ta,J,Ea),A.paintNW(c,l,x,p,v,B,Ta,J,Ga),A.paintTop(c,l,x,p,v,B,Xa,J,La),A.lineNEInner(c,
+l,x,p,v,B,Xa,J,oa,La),A.paintTopInner(c,l,x,p,v,B,Ta,J,oa,Ga,Ea),A.paintNWInner(c,l,x,p,v,B,Ta,J,oa),A.paintLeftInner(c,l,x,p,v,B,$a,J,oa,Ia,Ga),c.close(),c.fillAndStroke()):Ea&&!La&&Ia&&!Ga?"frame"!=wa?(c.begin(),A.moveNW(c,l,x,p,v,B,Ta,J,Ga),A.paintTop(c,l,x,p,v,B,Xa,J,La),"double"==wa&&(A.moveNEInner(c,l,x,p,v,B,Xa,J,oa,La),A.paintTopInner(c,l,x,p,v,B,Ta,J,oa,Ga,Ea)),c.stroke(),c.begin(),A.moveSE(c,l,x,p,v,B,Ya,J,La),A.paintBottom(c,l,x,p,v,B,$a,J,Ga),"double"==wa&&(A.moveSWInner(c,l,x,p,v,B,$a,
+J,oa,Ga),A.paintBottomInner(c,l,x,p,v,B,Ya,J,oa,La,Ia)),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Ta,J,Ga),A.paintTop(c,l,x,p,v,B,Xa,J,La),A.lineNEInner(c,l,x,p,v,B,Xa,J,oa,La),A.paintTopInner(c,l,x,p,v,B,Ta,J,oa,Ga,Ea),c.close(),c.fillAndStroke(),c.begin(),A.moveSE(c,l,x,p,v,B,Ya,J,La),A.paintBottom(c,l,x,p,v,B,$a,J,Ga),A.lineSWInner(c,l,x,p,v,B,$a,J,oa,Ga),A.paintBottomInner(c,l,x,p,v,B,Ya,J,oa,La,Ia),c.close(),c.fillAndStroke()):Ea&&!La&&Ia&&Ga?"frame"!=wa?(c.begin(),A.moveSE(c,l,x,p,v,B,Ya,
+J,La),A.paintBottom(c,l,x,p,v,B,$a,J,Ga),A.paintSW(c,l,x,p,v,B,$a,J,Ia),A.paintLeft(c,l,x,p,v,B,Ta,J,Ea),A.paintNW(c,l,x,p,v,B,Ta,J,Ga),A.paintTop(c,l,x,p,v,B,Xa,J,La),"double"==wa&&(A.moveNEInner(c,l,x,p,v,B,Xa,J,oa,La),A.paintTopInner(c,l,x,p,v,B,Ta,J,oa,Ga,Ea),A.paintNWInner(c,l,x,p,v,B,Ta,J,oa),A.paintLeftInner(c,l,x,p,v,B,$a,J,oa,Ia,Ga),A.paintSWInner(c,l,x,p,v,B,$a,J,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Ya,J,oa,La,Ia)),c.stroke()):(c.begin(),A.moveSE(c,l,x,p,v,B,Ya,J,La),A.paintBottom(c,l,
+x,p,v,B,$a,J,Ga),A.paintSW(c,l,x,p,v,B,$a,J,Ia),A.paintLeft(c,l,x,p,v,B,Ta,J,Ea),A.paintNW(c,l,x,p,v,B,Ta,J,Ga),A.paintTop(c,l,x,p,v,B,Xa,J,La),A.lineNEInner(c,l,x,p,v,B,Xa,J,oa,La),A.paintTopInner(c,l,x,p,v,B,Ta,J,oa,Ga,Ea),A.paintNWInner(c,l,x,p,v,B,Ta,J,oa),A.paintLeftInner(c,l,x,p,v,B,$a,J,oa,Ia,Ga),A.paintSWInner(c,l,x,p,v,B,$a,J,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Ya,J,oa,La,Ia),c.close(),c.fillAndStroke()):Ea&&La&&!Ia&&!Ga?"frame"!=wa?(c.begin(),A.moveNW(c,l,x,p,v,B,Ta,J,Ga),A.paintTop(c,
+l,x,p,v,B,Xa,J,La),A.paintNE(c,l,x,p,v,B,Xa,J,Ea),A.paintRight(c,l,x,p,v,B,Ya,J,Ia),"double"==wa&&(A.moveSEInner(c,l,x,p,v,B,Ya,J,oa,Ia),A.paintRightInner(c,l,x,p,v,B,Xa,J,oa,Ea,La),A.paintNEInner(c,l,x,p,v,B,Xa,J,oa),A.paintTopInner(c,l,x,p,v,B,Ta,J,oa,Ga,Ea)),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Ta,J,Ga),A.paintTop(c,l,x,p,v,B,Xa,J,La),A.paintNE(c,l,x,p,v,B,Xa,J,Ea),A.paintRight(c,l,x,p,v,B,Ya,J,Ia),A.lineSEInner(c,l,x,p,v,B,Ya,J,oa,Ia),A.paintRightInner(c,l,x,p,v,B,Xa,J,oa,Ea,La),A.paintNEInner(c,
+l,x,p,v,B,Xa,J,oa),A.paintTopInner(c,l,x,p,v,B,Ta,J,oa,Ga,Ea),c.close(),c.fillAndStroke()):Ea&&La&&!Ia&&Ga?"frame"!=wa?(c.begin(),A.moveSW(c,l,x,p,v,B,$a,J,Ia),A.paintLeft(c,l,x,p,v,B,Ta,J,Ea),A.paintNW(c,l,x,p,v,B,Ta,J,Ga),A.paintTop(c,l,x,p,v,B,Xa,J,La),A.paintNE(c,l,x,p,v,B,Xa,J,Ea),A.paintRight(c,l,x,p,v,B,Ya,J,Ia),"double"==wa&&(A.moveSEInner(c,l,x,p,v,B,Ya,J,oa,Ia),A.paintRightInner(c,l,x,p,v,B,Xa,J,oa,Ea,La),A.paintNEInner(c,l,x,p,v,B,Xa,J,oa),A.paintTopInner(c,l,x,p,v,B,Ta,J,oa,Ga,Ea),A.paintNWInner(c,
+l,x,p,v,B,Ta,J,oa),A.paintLeftInner(c,l,x,p,v,B,$a,J,oa,Ia,Ga)),c.stroke()):(c.begin(),A.moveSW(c,l,x,p,v,B,$a,J,Ia),A.paintLeft(c,l,x,p,v,B,Ta,J,Ea),A.paintNW(c,l,x,p,v,B,Ta,J,Ga),A.paintTop(c,l,x,p,v,B,Xa,J,La),A.paintNE(c,l,x,p,v,B,Xa,J,Ea),A.paintRight(c,l,x,p,v,B,Ya,J,Ia),A.lineSEInner(c,l,x,p,v,B,Ya,J,oa,Ia),A.paintRightInner(c,l,x,p,v,B,Xa,J,oa,Ea,La),A.paintNEInner(c,l,x,p,v,B,Xa,J,oa),A.paintTopInner(c,l,x,p,v,B,Ta,J,oa,Ga,Ea),A.paintNWInner(c,l,x,p,v,B,Ta,J,oa),A.paintLeftInner(c,l,x,p,
+v,B,$a,J,oa,Ia,Ga),c.close(),c.fillAndStroke()):Ea&&La&&Ia&&!Ga?"frame"!=wa?(c.begin(),A.moveNW(c,l,x,p,v,B,Ta,J,Ga),A.paintTop(c,l,x,p,v,B,Xa,J,La),A.paintNE(c,l,x,p,v,B,Xa,J,Ea),A.paintRight(c,l,x,p,v,B,Ya,J,Ia),A.paintSE(c,l,x,p,v,B,Ya,J,La),A.paintBottom(c,l,x,p,v,B,$a,J,Ga),"double"==wa&&(A.moveSWInner(c,l,x,p,v,B,$a,J,oa,Ga),A.paintBottomInner(c,l,x,p,v,B,Ya,J,oa,La,Ia),A.paintSEInner(c,l,x,p,v,B,Ya,J,oa),A.paintRightInner(c,l,x,p,v,B,Xa,J,oa,Ea,La),A.paintNEInner(c,l,x,p,v,B,Xa,J,oa),A.paintTopInner(c,
+l,x,p,v,B,Ta,J,oa,Ga,Ea)),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Ta,J,Ga),A.paintTop(c,l,x,p,v,B,Xa,J,La),A.paintNE(c,l,x,p,v,B,Xa,J,Ea),A.paintRight(c,l,x,p,v,B,Ya,J,Ia),A.paintSE(c,l,x,p,v,B,Ya,J,La),A.paintBottom(c,l,x,p,v,B,$a,J,Ga),A.lineSWInner(c,l,x,p,v,B,$a,J,oa,Ga),A.paintBottomInner(c,l,x,p,v,B,Ya,J,oa,La,Ia),A.paintSEInner(c,l,x,p,v,B,Ya,J,oa),A.paintRightInner(c,l,x,p,v,B,Xa,J,oa,Ea,La),A.paintNEInner(c,l,x,p,v,B,Xa,J,oa),A.paintTopInner(c,l,x,p,v,B,Ta,J,oa,Ga,Ea),c.close(),c.fillAndStroke()):
+Ea&&La&&Ia&&Ga&&("frame"!=wa?(c.begin(),A.moveNW(c,l,x,p,v,B,Ta,J,Ga),A.paintNW(c,l,x,p,v,B,Ta,J,Ga),A.paintTop(c,l,x,p,v,B,Xa,J,La),A.paintNE(c,l,x,p,v,B,Xa,J,Ea),A.paintRight(c,l,x,p,v,B,Ya,J,Ia),A.paintSE(c,l,x,p,v,B,Ya,J,La),A.paintBottom(c,l,x,p,v,B,$a,J,Ga),A.paintSW(c,l,x,p,v,B,$a,J,Ia),A.paintLeft(c,l,x,p,v,B,Ta,J,Ea),c.close(),"double"==wa&&(A.moveSWInner(c,l,x,p,v,B,$a,J,oa,Ga),A.paintSWInner(c,l,x,p,v,B,$a,J,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Ya,J,oa,La,Ia),A.paintSEInner(c,l,x,p,v,
+B,Ya,J,oa),A.paintRightInner(c,l,x,p,v,B,Xa,J,oa,Ea,La),A.paintNEInner(c,l,x,p,v,B,Xa,J,oa),A.paintTopInner(c,l,x,p,v,B,Ta,J,oa,Ga,Ea),A.paintNWInner(c,l,x,p,v,B,Ta,J,oa),A.paintLeftInner(c,l,x,p,v,B,$a,J,oa,Ia,Ga),c.close()),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Ta,J,Ga),A.paintNW(c,l,x,p,v,B,Ta,J,Ga),A.paintTop(c,l,x,p,v,B,Xa,J,La),A.paintNE(c,l,x,p,v,B,Xa,J,Ea),A.paintRight(c,l,x,p,v,B,Ya,J,Ia),A.paintSE(c,l,x,p,v,B,Ya,J,La),A.paintBottom(c,l,x,p,v,B,$a,J,Ga),A.paintSW(c,l,x,p,v,B,$a,J,Ia),
+A.paintLeft(c,l,x,p,v,B,Ta,J,Ea),c.close(),A.moveSWInner(c,l,x,p,v,B,$a,J,oa,Ga),A.paintSWInner(c,l,x,p,v,B,$a,J,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Ya,J,oa,La,Ia),A.paintSEInner(c,l,x,p,v,B,Ya,J,oa),A.paintRightInner(c,l,x,p,v,B,Xa,J,oa,Ea,La),A.paintNEInner(c,l,x,p,v,B,Xa,J,oa),A.paintTopInner(c,l,x,p,v,B,Ta,J,oa,Ga,Ea),A.paintNWInner(c,l,x,p,v,B,Ta,J,oa),A.paintLeftInner(c,l,x,p,v,B,$a,J,oa,Ia,Ga),c.close(),c.fillAndStroke())):"frame"!=wa?(c.begin(),A.moveNW(c,l,x,p,v,B,Ta,J,Ga),A.paintTop(c,
+l,x,p,v,B,Xa,J,La),"double"==wa&&(A.moveNEInner(c,l,x,p,v,B,Xa,J,oa,La),A.paintTopInner(c,l,x,p,v,B,Ta,J,oa,Ga,Ea)),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Ta,J,Ga),A.paintTop(c,l,x,p,v,B,Xa,J,La),A.lineNEInner(c,l,x,p,v,B,Xa,J,oa,La),A.paintTopInner(c,l,x,p,v,B,Ta,J,oa,Ga,Ea),c.close(),c.fillAndStroke()):"frame"!=wa?(c.begin(),A.moveNE(c,l,x,p,v,B,Xa,J,Ea),A.paintRight(c,l,x,p,v,B,Ya,J,Ia),"double"==wa&&(A.moveSEInner(c,l,x,p,v,B,Ya,J,oa,Ia),A.paintRightInner(c,l,x,p,v,B,Xa,J,oa,Ea,La)),c.stroke()):
+(c.begin(),A.moveNE(c,l,x,p,v,B,Xa,J,Ea),A.paintRight(c,l,x,p,v,B,Ya,J,Ia),A.lineSEInner(c,l,x,p,v,B,Ya,J,oa,Ia),A.paintRightInner(c,l,x,p,v,B,Xa,J,oa,Ea,La),c.close(),c.fillAndStroke()):"frame"!=wa?(c.begin(),A.moveSE(c,l,x,p,v,B,Ya,J,La),A.paintBottom(c,l,x,p,v,B,$a,J,Ga),"double"==wa&&(A.moveSWInner(c,l,x,p,v,B,$a,J,oa,Ga),A.paintBottomInner(c,l,x,p,v,B,Ya,J,oa,La,Ia)),c.stroke()):(c.begin(),A.moveSE(c,l,x,p,v,B,Ya,J,La),A.paintBottom(c,l,x,p,v,B,$a,J,Ga),A.lineSWInner(c,l,x,p,v,B,$a,J,oa,Ga),
+A.paintBottomInner(c,l,x,p,v,B,Ya,J,oa,La,Ia),c.close(),c.fillAndStroke()):"frame"!=wa?(c.begin(),A.moveSW(c,l,x,p,v,B,Ta,J,Ia),A.paintLeft(c,l,x,p,v,B,Ta,J,Ea),"double"==wa&&(A.moveNWInner(c,l,x,p,v,B,Ta,J,oa,Ea,Ga),A.paintLeftInner(c,l,x,p,v,B,$a,J,oa,Ia,Ga)),c.stroke()):(c.begin(),A.moveSW(c,l,x,p,v,B,Ta,J,Ia),A.paintLeft(c,l,x,p,v,B,Ta,J,Ea),A.lineNWInner(c,l,x,p,v,B,Ta,J,oa,Ea,Ga),A.paintLeftInner(c,l,x,p,v,B,$a,J,oa,Ia,Ga),c.close(),c.fillAndStroke());c.begin();A.paintFolds(c,l,x,p,v,B,Ta,Xa,
+Ya,$a,J,Ea,La,Ia,Ga);c.stroke()};xa.prototype.moveNW=function(c,l,x,p,v,A,B,ka,J){"square"==B||"default"==B&&"square"==A||!J?c.moveTo(0,0):c.moveTo(0,ka)};xa.prototype.moveNE=function(c,l,x,p,v,A,B,ka,J){"square"==B||"default"==B&&"square"==A||!J?c.moveTo(p,0):c.moveTo(p-ka,0)};xa.prototype.moveSE=function(c,l,x,p,v,A,B,ka,J){"square"==B||"default"==B&&"square"==A||!J?c.moveTo(p,v):c.moveTo(p,v-ka)};xa.prototype.moveSW=function(c,l,x,p,v,A,B,ka,J){"square"==B||"default"==B&&"square"==A||!J?c.moveTo(0,
+v):c.moveTo(ka,v)};xa.prototype.paintNW=function(c,l,x,p,v,A,B,ka,J){if(J)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ka,ka,0,0,l,ka,0)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(ka,0);else c.lineTo(0,0)};xa.prototype.paintTop=function(c,l,x,p,v,A,B,ka,J){"square"==B||"default"==B&&"square"==A||!J?c.lineTo(p,0):c.lineTo(p-ka,0)};xa.prototype.paintNE=
+function(c,l,x,p,v,A,B,ka,J){if(J)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ka,ka,0,0,l,p,ka)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p,ka);else c.lineTo(p,0)};xa.prototype.paintRight=function(c,l,x,p,v,A,B,ka,J){"square"==B||"default"==B&&"square"==A||!J?c.lineTo(p,v):c.lineTo(p,v-ka)};xa.prototype.paintLeft=function(c,l,x,p,v,A,B,ka,J){"square"==
+B||"default"==B&&"square"==A||!J?c.lineTo(0,0):c.lineTo(0,ka)};xa.prototype.paintSE=function(c,l,x,p,v,A,B,ka,J){if(J)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ka,ka,0,0,l,p-ka,v)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-ka,v);else c.lineTo(p,v)};xa.prototype.paintBottom=function(c,l,x,p,v,A,B,ka,J){"square"==B||"default"==B&&"square"==A||!J?c.lineTo(0,
+v):c.lineTo(ka,v)};xa.prototype.paintSW=function(c,l,x,p,v,A,B,ka,J){if(J)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ka,ka,0,0,l,0,v-ka)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(0,v-ka);else c.lineTo(0,v)};xa.prototype.paintNWInner=function(c,l,x,p,v,A,B,ka,J){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ka-.5*J,ka-.5*J,0,0,0,J,.5*J+ka);else if("invRound"==
+B||"default"==B&&"invRound"==A)c.arcTo(ka+J,ka+J,0,0,1,J,J+ka);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(J,.5*J+ka);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(J+ka,J+ka),c.lineTo(J,J+ka)};xa.prototype.paintTopInner=function(c,l,x,p,v,A,B,ka,J,wa,oa){wa||oa?!wa&&oa?c.lineTo(0,J):wa&&!oa?c.lineTo(J,0):wa?"square"==B||"default"==B&&"square"==A?c.lineTo(J,J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(ka+.5*J,J):c.lineTo(ka+J,J):c.lineTo(0,
+J):c.lineTo(0,0)};xa.prototype.paintNEInner=function(c,l,x,p,v,A,B,ka,J){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ka-.5*J,ka-.5*J,0,0,0,p-ka-.5*J,J);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(ka+J,ka+J,0,0,1,p-ka-J,J);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(p-ka-.5*J,J);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(p-ka-J,ka+J),c.lineTo(p-ka-J,J)};xa.prototype.paintRightInner=function(c,l,x,p,v,A,B,ka,J,wa,oa){wa||oa?!wa&&oa?c.lineTo(p-J,0):wa&&!oa?c.lineTo(p,
+J):wa?"square"==B||"default"==B&&"square"==A?c.lineTo(p-J,J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-J,ka+.5*J):c.lineTo(p-J,ka+J):c.lineTo(p-J,0):c.lineTo(p,0)};xa.prototype.paintLeftInner=function(c,l,x,p,v,A,B,ka,J,wa,oa){wa||oa?!wa&&oa?c.lineTo(J,v):wa&&!oa?c.lineTo(0,v-J):wa?"square"==B||"default"==B&&"square"==A?c.lineTo(J,v-J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(J,v-ka-.5*J):c.lineTo(J,v-ka-J):
+c.lineTo(J,v):c.lineTo(0,v)};xa.prototype.paintSEInner=function(c,l,x,p,v,A,B,ka,J){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ka-.5*J,ka-.5*J,0,0,0,p-J,v-ka-.5*J);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(ka+J,ka+J,0,0,1,p-J,v-ka-J);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(p-J,v-ka-.5*J);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(p-ka-J,v-ka-J),c.lineTo(p-J,v-ka-J)};xa.prototype.paintBottomInner=function(c,l,x,p,v,A,B,ka,J,wa,oa){wa||oa?!wa&&oa?c.lineTo(p,
+v-J):wa&&!oa?c.lineTo(p-J,v):"square"==B||"default"==B&&"square"==A||!wa?c.lineTo(p-J,v-J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-ka-.5*J,v-J):c.lineTo(p-ka-J,v-J):c.lineTo(p,v)};xa.prototype.paintSWInner=function(c,l,x,p,v,A,B,ka,J,wa){if(!wa)c.lineTo(J,v);else if("square"==B||"default"==B&&"square"==A)c.lineTo(J,v-J);else if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ka-.5*J,ka-.5*J,0,0,0,ka+.5*J,v-J);else if("invRound"==B||"default"==B&&"invRound"==
+A)c.arcTo(ka+J,ka+J,0,0,1,ka+J,v-J);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(ka+.5*J,v-J);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(J+ka,v-ka-J),c.lineTo(J+ka,v-J)};xa.prototype.moveSWInner=function(c,l,x,p,v,A,B,ka,J,wa){wa?"square"==B||"default"==B&&"square"==A?c.moveTo(J,v-J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(J,v-ka-.5*J):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(J,v-ka-J):
+c.moveTo(0,v-J)};xa.prototype.lineSWInner=function(c,l,x,p,v,A,B,ka,J,wa){wa?"square"==B||"default"==B&&"square"==A?c.lineTo(J,v-J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(J,v-ka-.5*J):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(J,v-ka-J):c.lineTo(0,v-J)};xa.prototype.moveSEInner=function(c,l,x,p,v,A,B,ka,J,wa){wa?"square"==B||"default"==B&&"square"==A?c.moveTo(p-J,v-J):"rounded"==B||"default"==B&&"rounded"==
+A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(p-J,v-ka-.5*J):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(p-J,v-ka-J):c.moveTo(p-J,v)};xa.prototype.lineSEInner=function(c,l,x,p,v,A,B,ka,J,wa){wa?"square"==B||"default"==B&&"square"==A?c.lineTo(p-J,v-J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-J,v-ka-.5*J):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-J,v-ka-J):
+c.lineTo(p-J,v)};xa.prototype.moveNEInner=function(c,l,x,p,v,A,B,ka,J,wa){wa?"square"==B||"default"==B&&"square"==A||wa?c.moveTo(p-J,J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(p-J,ka+.5*J):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(p-J,ka+J):c.moveTo(p,J)};xa.prototype.lineNEInner=function(c,l,x,p,v,A,B,ka,J,wa){wa?"square"==B||"default"==B&&"square"==A||wa?c.lineTo(p-J,J):"rounded"==B||"default"==B&&"rounded"==
+A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-J,ka+.5*J):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-J,ka+J):c.lineTo(p,J)};xa.prototype.moveNWInner=function(c,l,x,p,v,A,B,ka,J,wa,oa){wa||oa?!wa&&oa?c.moveTo(J,0):wa&&!oa?c.moveTo(0,J):"square"==B||"default"==B&&"square"==A?c.moveTo(J,J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(J,ka+.5*J):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==
+B&&"fold"==A)&&c.moveTo(J,ka+J):c.moveTo(0,0)};xa.prototype.lineNWInner=function(c,l,x,p,v,A,B,ka,J,wa,oa){wa||oa?!wa&&oa?c.lineTo(J,0):wa&&!oa?c.lineTo(0,J):"square"==B||"default"==B&&"square"==A?c.lineTo(J,J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(J,ka+.5*J):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(J,ka+J):c.lineTo(0,0)};xa.prototype.paintFolds=function(c,l,x,p,v,A,B,ka,J,wa,oa,ab,jb,gb,Ea){if("fold"==
+A||"fold"==B||"fold"==ka||"fold"==J||"fold"==wa)("fold"==B||"default"==B&&"fold"==A)&&ab&&Ea&&(c.moveTo(0,oa),c.lineTo(oa,oa),c.lineTo(oa,0)),("fold"==ka||"default"==ka&&"fold"==A)&&ab&&jb&&(c.moveTo(p-oa,0),c.lineTo(p-oa,oa),c.lineTo(p,oa)),("fold"==J||"default"==J&&"fold"==A)&&gb&&jb&&(c.moveTo(p-oa,v),c.lineTo(p-oa,v-oa),c.lineTo(p,v-oa)),("fold"==wa||"default"==wa&&"fold"==A)&&gb&&Ea&&(c.moveTo(0,v-oa),c.lineTo(oa,v-oa),c.lineTo(oa,v))};mxCellRenderer.registerShape(xa.prototype.cst.RECT2,xa);
+xa.prototype.constraints=null;mxUtils.extend(Ba,mxConnector);Ba.prototype.origPaintEdgeShape=Ba.prototype.paintEdgeShape;Ba.prototype.paintEdgeShape=function(c,l,x){for(var p=[],v=0;v<l.length;v++)p.push(mxUtils.clone(l[v]));v=c.state.dashed;var A=c.state.fixDash;Ba.prototype.origPaintEdgeShape.apply(this,[c,p,x]);3<=c.state.strokeWidth&&(p=mxUtils.getValue(this.style,"fillColor",null),null!=p&&(c.setStrokeColor(p),c.setStrokeWidth(c.state.strokeWidth-2),c.setDashed(v,A),Ba.prototype.origPaintEdgeShape.apply(this,
+[c,l,x])))};mxCellRenderer.registerShape("filledEdge",Ba);"undefined"!==typeof StyleFormatPanel&&function(){var c=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var l=this.editorUi.getSelectionState(),x=c.apply(this,arguments);"umlFrame"==l.style.shape&&x.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return x}}();mxMarker.addMarker("dash",function(c,l,x,p,v,A,B,ka,J,wa){var oa=v*(B+J+1),ab=A*(B+J+1);return function(){c.begin();
+c.moveTo(p.x-oa/2-ab/2,p.y-ab/2+oa/2);c.lineTo(p.x+ab/2-3*oa/2,p.y-3*ab/2-oa/2);c.stroke()}});mxMarker.addMarker("box",function(c,l,x,p,v,A,B,ka,J,wa){var oa=v*(B+J+1),ab=A*(B+J+1),jb=p.x+oa/2,gb=p.y+ab/2;p.x-=oa;p.y-=ab;return function(){c.begin();c.moveTo(jb-oa/2-ab/2,gb-ab/2+oa/2);c.lineTo(jb-oa/2+ab/2,gb-ab/2-oa/2);c.lineTo(jb+ab/2-3*oa/2,gb-3*ab/2-oa/2);c.lineTo(jb-ab/2-3*oa/2,gb-3*ab/2+oa/2);c.close();wa?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("cross",function(c,l,x,p,v,A,B,ka,J,
+wa){var oa=v*(B+J+1),ab=A*(B+J+1);return function(){c.begin();c.moveTo(p.x-oa/2-ab/2,p.y-ab/2+oa/2);c.lineTo(p.x+ab/2-3*oa/2,p.y-3*ab/2-oa/2);c.moveTo(p.x-oa/2+ab/2,p.y-ab/2-oa/2);c.lineTo(p.x-ab/2-3*oa/2,p.y-3*ab/2+oa/2);c.stroke()}});mxMarker.addMarker("circle",Pa);mxMarker.addMarker("circlePlus",function(c,l,x,p,v,A,B,ka,J,wa){var oa=p.clone(),ab=Pa.apply(this,arguments),jb=v*(B+2*J),gb=A*(B+2*J);return function(){ab.apply(this,arguments);c.begin();c.moveTo(oa.x-v*J,oa.y-A*J);c.lineTo(oa.x-2*jb+
+v*J,oa.y-2*gb+A*J);c.moveTo(oa.x-jb-gb+A*J,oa.y-gb+jb-v*J);c.lineTo(oa.x+gb-jb-A*J,oa.y-gb-jb+v*J);c.stroke()}});mxMarker.addMarker("halfCircle",function(c,l,x,p,v,A,B,ka,J,wa){var oa=v*(B+J+1),ab=A*(B+J+1),jb=p.clone();p.x-=oa;p.y-=ab;return function(){c.begin();c.moveTo(jb.x-ab,jb.y+oa);c.quadTo(p.x-ab,p.y+oa,p.x,p.y);c.quadTo(p.x+ab,p.y-oa,jb.x+ab,jb.y-oa);c.stroke()}});mxMarker.addMarker("async",function(c,l,x,p,v,A,B,ka,J,wa){l=v*J*1.118;x=A*J*1.118;v*=B+J;A*=B+J;var oa=p.clone();oa.x-=l;oa.y-=
+x;p.x+=-v-l;p.y+=-A-x;return function(){c.begin();c.moveTo(oa.x,oa.y);ka?c.lineTo(oa.x-v-A/2,oa.y-A+v/2):c.lineTo(oa.x+A/2-v,oa.y-A-v/2);c.lineTo(oa.x-v,oa.y-A);c.close();wa?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("openAsync",function(c){c=null!=c?c:2;return function(l,x,p,v,A,B,ka,J,wa,oa){A*=ka+wa;B*=ka+wa;var ab=v.clone();return function(){l.begin();l.moveTo(ab.x,ab.y);J?l.lineTo(ab.x-A-B/c,ab.y-B+A/c):l.lineTo(ab.x+B/c-A,ab.y-B-A/c);l.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var kb=
+function(c,l,x){return ib(c,["width"],l,function(p,v,A,B,ka){ka=c.shape.getEdgeWidth()*c.view.scale+x;return new mxPoint(B.x+v*p/4+A*ka/2,B.y+A*p/4-v*ka/2)},function(p,v,A,B,ka,J){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ka.x,ka.y,J.x,J.y));c.style.width=Math.round(2*p)/c.view.scale-x})},ib=function(c,l,x,p,v){return fb(c,l,function(A){var B=c.absolutePoints,ka=B.length-1;A=c.view.translate;var J=c.view.scale,wa=x?B[0]:B[ka];B=x?B[1]:B[ka-1];ka=B.x-wa.x;var oa=B.y-wa.y,ab=Math.sqrt(ka*ka+oa*oa);wa=
+p.call(this,ab,ka/ab,oa/ab,wa,B);return new mxPoint(wa.x/J-A.x,wa.y/J-A.y)},function(A,B,ka){var J=c.absolutePoints,wa=J.length-1;A=c.view.translate;var oa=c.view.scale,ab=x?J[0]:J[wa];J=x?J[1]:J[wa-1];wa=J.x-ab.x;var jb=J.y-ab.y,gb=Math.sqrt(wa*wa+jb*jb);B.x=(B.x+A.x)*oa;B.y=(B.y+A.y)*oa;v.call(this,gb,wa/gb,jb/gb,ab,J,B,ka)})},pb=function(c){return function(l){return[fb(l,["arrowWidth","arrowSize"],function(x){var p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",cb.prototype.arrowWidth))),
+v=Math.max(0,Math.min(c,mxUtils.getValue(this.state.style,"arrowSize",cb.prototype.arrowSize)));return new mxPoint(x.x+(1-v)*x.width,x.y+(1-p)*x.height/2)},function(x,p){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(x.y+x.height/2-p.y)/x.height*2));this.state.style.arrowSize=Math.max(0,Math.min(c,(x.x+x.width-p.x)/x.width))})]}},vb=function(c){return function(l){return[fb(l,["size"],function(x){var p=Math.max(0,Math.min(.5*x.height,parseFloat(mxUtils.getValue(this.state.style,"size",
+c))));return new mxPoint(x.x,x.y+p)},function(x,p){this.state.style.size=Math.max(0,p.y-x.y)},!0)]}},ob=function(c,l,x){return function(p){var v=[fb(p,["size"],function(A){var B=Math.max(0,Math.min(A.width,Math.min(A.height,parseFloat(mxUtils.getValue(this.state.style,"size",l)))))*c;return new mxPoint(A.x+B,A.y+B)},function(A,B){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(A.width,B.x-A.x),Math.min(A.height,B.y-A.y)))/c)},!1)];x&&mxUtils.getValue(p.style,mxConstants.STYLE_ROUNDED,
+!1)&&v.push(qb(p));return v}},Bb=function(c,l,x,p,v){x=null!=x?x:.5;return function(A){var B=[fb(A,["size"],function(ka){var J=null!=v?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,wa=parseFloat(mxUtils.getValue(this.state.style,"size",J?v:c));return new mxPoint(ka.x+Math.max(0,Math.min(.5*ka.width,wa*(J?1:ka.width))),ka.getCenterY())},function(ka,J,wa){ka=null!=v&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?J.x-ka.x:Math.max(0,Math.min(x,(J.x-ka.x)/ka.width));this.state.style.size=
+ka},!1,p)];l&&mxUtils.getValue(A.style,mxConstants.STYLE_ROUNDED,!1)&&B.push(qb(A));return B}},yb=function(c,l,x){c=null!=c?c:.5;return function(p){var v=[fb(p,["size"],function(A){var B=null!=x?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,ka=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",B?x:l)));return new mxPoint(A.x+Math.min(.75*A.width*c,ka*(B?.75:.75*A.width)),A.y+A.height/4)},function(A,B){A=null!=x&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?B.x-
+A.x:Math.max(0,Math.min(c,(B.x-A.x)/A.width*.75));this.state.style.size=A},!1,!0)];mxUtils.getValue(p.style,mxConstants.STYLE_ROUNDED,!1)&&v.push(qb(p));return v}},nb=function(){return function(c){var l=[];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(qb(c));return l}},qb=function(c,l){return fb(c,[mxConstants.STYLE_ARCSIZE],function(x){var p=null!=l?l:x.height/8;if("1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var v=mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,
mxConstants.LINE_ARCSIZE)/2;return new mxPoint(x.x+x.width-Math.min(x.width/2,v),x.y+p)}v=Math.max(0,parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(x.x+x.width-Math.min(Math.max(x.width/2,x.height/2),Math.min(x.width,x.height)*v),x.y+p)},function(x,p,v){"1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(x.width,2*(x.x+x.width-
-p.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(x.width-p.x+x.x)/Math.min(x.width,x.height))))})},gb=function(c,l,x,p,v,A,B){var ka=new mxHandle(c,null,mxVertexHandler.prototype.secondaryHandleImage);ka.execute=function(xa){for(var oa=0;oa<l.length;oa++)this.copyStyle(l[oa]);B&&B(xa)};ka.getPosition=x;ka.setPosition=p;ka.ignoreGrid=null!=v?v:!0;if(A){var J=ka.positionChanged;ka.positionChanged=function(){J.apply(this,arguments);c.view.invalidate(this.state.cell);
+p.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(x.width-p.x+x.x)/Math.min(x.width,x.height))))})},fb=function(c,l,x,p,v,A,B){var ka=new mxHandle(c,null,mxVertexHandler.prototype.secondaryHandleImage);ka.execute=function(wa){for(var oa=0;oa<l.length;oa++)this.copyStyle(l[oa]);B&&B(wa)};ka.getPosition=x;ka.setPosition=p;ka.ignoreGrid=null!=v?v:!0;if(A){var J=ka.positionChanged;ka.positionChanged=function(){J.apply(this,arguments);c.view.invalidate(this.state.cell);
c.view.validate()}}return ka},rb={link:function(c){return[kb(c,!0,10),kb(c,!1,10)]},flexArrow:function(c){var l=c.view.graph.gridSize/c.view.scale,x=[];mxUtils.getValue(c.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(x.push(ib(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(p,v,A,B,ka){p=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;ka=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;
-return new mxPoint(B.x+v*(ka+c.shape.strokewidth*c.view.scale)+A*p/2,B.y+A*(ka+c.shape.strokewidth*c.view.scale)-v*p/2)},function(p,v,A,B,ka,J,xa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ka.x,ka.y,J.x,J.y));v=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-v,J.x,J.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*p)/c.view.scale;if(mxEvent.isShiftDown(xa.getEvent())||mxEvent.isControlDown(xa.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=
-c.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(xa.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE])})),x.push(ib(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(p,v,A,B,ka){p=(c.shape.getStartArrowWidth()-c.shape.strokewidth)*c.view.scale;ka=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/
-5)*c.view.scale;return new mxPoint(B.x+v*(ka+c.shape.strokewidth*c.view.scale)+A*p/2,B.y+A*(ka+c.shape.strokewidth*c.view.scale)-v*p/2)},function(p,v,A,B,ka,J,xa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ka.x,ka.y,J.x,J.y));v=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-v,J.x,J.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.startWidth=Math.max(0,Math.round(2*p)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(xa.getEvent())||mxEvent.isControlDown(xa.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=
-c.style[mxConstants.STYLE_STARTSIZE],c.style.endWidth=c.style.startWidth;mxEvent.isAltDown(xa.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(c.style.startWidth)-parseFloat(c.style.endWidth))<l&&(c.style.startWidth=c.style.endWidth))})));mxUtils.getValue(c.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(x.push(ib(c,
-["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(p,v,A,B,ka){p=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;ka=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+v*(ka+c.shape.strokewidth*c.view.scale)-A*p/2,B.y+A*(ka+c.shape.strokewidth*c.view.scale)+v*p/2)},function(p,v,A,B,ka,J,xa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ka.x,ka.y,J.x,J.y));v=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-v,J.x,J.y);
-c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*p)/c.view.scale;if(mxEvent.isShiftDown(xa.getEvent())||mxEvent.isControlDown(xa.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(xa.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE])})),
-x.push(ib(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(p,v,A,B,ka){p=(c.shape.getEndArrowWidth()-c.shape.strokewidth)*c.view.scale;ka=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+v*(ka+c.shape.strokewidth*c.view.scale)-A*p/2,B.y+A*(ka+c.shape.strokewidth*c.view.scale)+v*p/2)},function(p,v,A,B,ka,J,xa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ka.x,ka.y,J.x,J.y));v=mxUtils.ptLineDist(B.x,
-B.y,B.x+A,B.y-v,J.x,J.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.endWidth=Math.max(0,Math.round(2*p)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(xa.getEvent())||mxEvent.isControlDown(xa.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE],c.style.startWidth=c.style.endWidth;mxEvent.isAltDown(xa.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<
-l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(c.style.endWidth)-parseFloat(c.style.startWidth))<l&&(c.style.endWidth=c.style.startWidth))})));return x},swimlane:function(c){var l=[];if(mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED)){var x=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));l.push(pb(c,x/2))}l.push(gb(c,[mxConstants.STYLE_STARTSIZE],function(p){var v=parseFloat(mxUtils.getValue(c.style,
+return new mxPoint(B.x+v*(ka+c.shape.strokewidth*c.view.scale)+A*p/2,B.y+A*(ka+c.shape.strokewidth*c.view.scale)-v*p/2)},function(p,v,A,B,ka,J,wa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ka.x,ka.y,J.x,J.y));v=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-v,J.x,J.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*p)/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=
+c.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(wa.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE])})),x.push(ib(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(p,v,A,B,ka){p=(c.shape.getStartArrowWidth()-c.shape.strokewidth)*c.view.scale;ka=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/
+5)*c.view.scale;return new mxPoint(B.x+v*(ka+c.shape.strokewidth*c.view.scale)+A*p/2,B.y+A*(ka+c.shape.strokewidth*c.view.scale)-v*p/2)},function(p,v,A,B,ka,J,wa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ka.x,ka.y,J.x,J.y));v=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-v,J.x,J.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.startWidth=Math.max(0,Math.round(2*p)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=
+c.style[mxConstants.STYLE_STARTSIZE],c.style.endWidth=c.style.startWidth;mxEvent.isAltDown(wa.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(c.style.startWidth)-parseFloat(c.style.endWidth))<l&&(c.style.startWidth=c.style.endWidth))})));mxUtils.getValue(c.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(x.push(ib(c,
+["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(p,v,A,B,ka){p=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;ka=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+v*(ka+c.shape.strokewidth*c.view.scale)-A*p/2,B.y+A*(ka+c.shape.strokewidth*c.view.scale)+v*p/2)},function(p,v,A,B,ka,J,wa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ka.x,ka.y,J.x,J.y));v=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-v,J.x,J.y);
+c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*p)/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(wa.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE])})),
+x.push(ib(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(p,v,A,B,ka){p=(c.shape.getEndArrowWidth()-c.shape.strokewidth)*c.view.scale;ka=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+v*(ka+c.shape.strokewidth*c.view.scale)-A*p/2,B.y+A*(ka+c.shape.strokewidth*c.view.scale)+v*p/2)},function(p,v,A,B,ka,J,wa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ka.x,ka.y,J.x,J.y));v=mxUtils.ptLineDist(B.x,
+B.y,B.x+A,B.y-v,J.x,J.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.endWidth=Math.max(0,Math.round(2*p)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE],c.style.startWidth=c.style.endWidth;mxEvent.isAltDown(wa.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<
+l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(c.style.endWidth)-parseFloat(c.style.startWidth))<l&&(c.style.endWidth=c.style.startWidth))})));return x},swimlane:function(c){var l=[];if(mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED)){var x=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));l.push(qb(c,x/2))}l.push(fb(c,[mxConstants.STYLE_STARTSIZE],function(p){var v=parseFloat(mxUtils.getValue(c.style,
mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(c.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(p.getCenterX(),p.y+Math.max(0,Math.min(p.height,v))):new mxPoint(p.x+Math.max(0,Math.min(p.width,v)),p.getCenterY())},function(p,v){c.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(p.height,v.y-p.y))):Math.round(Math.max(0,Math.min(p.width,v.x-p.x)))},!1,null,function(p){var v=
-c.view.graph;if(!mxEvent.isShiftDown(p.getEvent())&&!mxEvent.isControlDown(p.getEvent())&&(v.isTableRow(c.cell)||v.isTableCell(c.cell))){p=v.getSwimlaneDirection(c.style);var A=v.model.getParent(c.cell);A=v.model.getChildCells(A,!0);for(var B=[],ka=0;ka<A.length;ka++)A[ka]!=c.cell&&v.isSwimlane(A[ka])&&v.getSwimlaneDirection(v.getCurrentCellStyle(A[ka]))==p&&B.push(A[ka]);v.setCellStyles(mxConstants.STYLE_STARTSIZE,c.style[mxConstants.STYLE_STARTSIZE],B)}}));return l},label:mb(),ext:mb(),rectangle:mb(),
-triangle:mb(),rhombus:mb(),umlLifeline:function(c){return[gb(c,["size"],function(l){var x=Math.max(0,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",S.prototype.size))));return new mxPoint(l.getCenterX(),l.y+x)},function(l,x){this.state.style.size=Math.round(Math.max(0,Math.min(l.height,x.y-l.y)))},!1)]},umlFrame:function(c){return[gb(c,["width","height"],function(l){var x=Math.max(R.prototype.corner,Math.min(l.width,mxUtils.getValue(this.state.style,"width",R.prototype.width))),
-p=Math.max(1.5*R.prototype.corner,Math.min(l.height,mxUtils.getValue(this.state.style,"height",R.prototype.height)));return new mxPoint(l.x+x,l.y+p)},function(l,x){this.state.style.width=Math.round(Math.max(R.prototype.corner,Math.min(l.width,x.x-l.x)));this.state.style.height=Math.round(Math.max(1.5*R.prototype.corner,Math.min(l.height,x.y-l.y)))},!1)]},process:function(c){var l=[gb(c,["size"],function(x){var p="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),v=parseFloat(mxUtils.getValue(this.state.style,
-"size",ha.prototype.size));return p?new mxPoint(x.x+v,x.y+x.height/4):new mxPoint(x.x+x.width*v,x.y+x.height/4)},function(x,p){x="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*x.width,p.x-x.x)):Math.max(0,Math.min(.5,(p.x-x.x)/x.width));this.state.style.size=x},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(pb(c));return l},cross:function(c){return[gb(c,["size"],function(l){var x=Math.min(l.width,l.height);x=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
-"size",Fa.prototype.size)))*x/2;return new mxPoint(l.getCenterX()-x,l.getCenterY()-x)},function(l,x){var p=Math.min(l.width,l.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,l.getCenterY()-x.y)/p*2,Math.max(0,l.getCenterX()-x.x)/p*2)))})]},note:function(c){return[gb(c,["size"],function(l){var x=Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",f.prototype.size)))));return new mxPoint(l.x+l.width-x,l.y+x)},function(l,x){this.state.style.size=
-Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-x.x),Math.min(l.height,x.y-l.y))))})]},note2:function(c){return[gb(c,["size"],function(l){var x=Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",g.prototype.size)))));return new mxPoint(l.x+l.width-x,l.y+x)},function(l,x){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-x.x),Math.min(l.height,x.y-l.y))))})]},manualInput:function(c){var l=[gb(c,["size"],function(x){var p=
-Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,"size",Ta.prototype.size)));return new mxPoint(x.x+x.width/4,x.y+3*p/4)},function(x,p){this.state.style.size=Math.round(Math.max(0,Math.min(x.height,4*(p.y-x.y)/3)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(pb(c));return l},dataStorage:function(c){return[gb(c,["size"],function(l){var x="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),p=parseFloat(mxUtils.getValue(this.state.style,"size",x?K.prototype.fixedSize:
-K.prototype.size));return new mxPoint(l.x+l.width-p*(x?1:l.width),l.getCenterY())},function(l,x){l="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(l.width,l.x+l.width-x.x)):Math.max(0,Math.min(1,(l.x+l.width-x.x)/l.width));this.state.style.size=l},!1)]},callout:function(c){var l=[gb(c,["size","position"],function(x){var p=Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,"size",ja.prototype.size))),v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
-"position",ja.prototype.position)));mxUtils.getValue(this.state.style,"base",ja.prototype.base);return new mxPoint(x.x+v*x.width,x.y+x.height-p)},function(x,p){mxUtils.getValue(this.state.style,"base",ja.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(x.height,x.y+x.height-p.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(p.x-x.x)/x.width)))/100},!1),gb(c,["position2"],function(x){var p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",ja.prototype.position2)));
-return new mxPoint(x.x+p*x.width,x.y+x.height)},function(x,p){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(p.x-x.x)/x.width)))/100},!1),gb(c,["base"],function(x){var p=Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,"size",ja.prototype.size))),v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ja.prototype.position))),A=Math.max(0,Math.min(x.width,mxUtils.getValue(this.state.style,"base",ja.prototype.base)));return new mxPoint(x.x+Math.min(x.width,
-v*x.width+A),x.y+x.height-p)},function(x,p){var v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ja.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(x.width,p.x-x.x-v*x.width)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(pb(c));return l},internalStorage:function(c){var l=[gb(c,["dx","dy"],function(x){var p=Math.max(0,Math.min(x.width,mxUtils.getValue(this.state.style,"dx",Oa.prototype.dx))),v=Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,
-"dy",Oa.prototype.dy)));return new mxPoint(x.x+p,x.y+v)},function(x,p){this.state.style.dx=Math.round(Math.max(0,Math.min(x.width,p.x-x.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(x.height,p.y-x.y)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(pb(c));return l},module:function(c){return[gb(c,["jettyWidth","jettyHeight"],function(l){var x=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"jettyWidth",ua.prototype.jettyWidth))),p=Math.max(0,Math.min(l.height,
-mxUtils.getValue(this.state.style,"jettyHeight",ua.prototype.jettyHeight)));return new mxPoint(l.x+x/2,l.y+2*p)},function(l,x){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(l.width,x.x-l.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(l.height,x.y-l.y))/2)})]},corner:function(c){return[gb(c,["dx","dy"],function(l){var x=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",Xa.prototype.dx))),p=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,
-"dy",Xa.prototype.dy)));return new mxPoint(l.x+x,l.y+p)},function(l,x){this.state.style.dx=Math.round(Math.max(0,Math.min(l.width,x.x-l.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(l.height,x.y-l.y)))},!1)]},tee:function(c){return[gb(c,["dx","dy"],function(l){var x=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",eb.prototype.dx))),p=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",eb.prototype.dy)));return new mxPoint(l.x+(l.width+x)/2,l.y+p)},function(l,
-x){this.state.style.dx=Math.round(Math.max(0,2*Math.min(l.width/2,x.x-l.x-l.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(l.height,x.y-l.y)))},!1)]},singleArrow:ob(1),doubleArrow:ob(.5),folder:function(c){return[gb(c,["tabWidth","tabHeight"],function(l){var x=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"tabWidth",C.prototype.tabWidth))),p=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"tabHeight",C.prototype.tabHeight)));mxUtils.getValue(this.state.style,
-"tabPosition",C.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(x=l.width-x);return new mxPoint(l.x+x,l.y+p)},function(l,x){var p=Math.max(0,Math.min(l.width,x.x-l.x));mxUtils.getValue(this.state.style,"tabPosition",C.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(p=l.width-p);this.state.style.tabWidth=Math.round(p);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(l.height,x.y-l.y)))},!1)]},document:function(c){return[gb(c,["size"],function(l){var x=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,
-"size",ba.prototype.size))));return new mxPoint(l.x+3*l.width/4,l.y+(1-x)*l.height)},function(l,x){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-x.y)/l.height))},!1)]},tape:function(c){return[gb(c,["size"],function(l){var x=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",Y.prototype.size))));return new mxPoint(l.getCenterX(),l.y+x*l.height/2)},function(l,x){this.state.style.size=Math.max(0,Math.min(1,(x.y-l.y)/l.height*2))},!1)]},isoCube2:function(c){return[gb(c,
-["isoAngle"],function(l){var x=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",m.isoAngle))))*Math.PI/200;return new mxPoint(l.x,l.y+Math.min(l.width*Math.tan(x),.5*l.height))},function(l,x){this.state.style.isoAngle=Math.max(0,50*(x.y-l.y)/l.height)},!0)]},cylinder2:vb(q.prototype.size),cylinder3:vb(y.prototype.size),offPageConnector:function(c){return[gb(c,["size"],function(l){var x=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ia.prototype.size))));
+c.view.graph;if(!mxEvent.isShiftDown(p.getEvent())&&!mxEvent.isControlDown(p.getEvent())&&(v.isTableRow(c.cell)||v.isTableCell(c.cell))){p=v.getSwimlaneDirection(c.style);var A=v.model.getParent(c.cell);A=v.model.getChildCells(A,!0);for(var B=[],ka=0;ka<A.length;ka++)A[ka]!=c.cell&&v.isSwimlane(A[ka])&&v.getSwimlaneDirection(v.getCurrentCellStyle(A[ka]))==p&&B.push(A[ka]);v.setCellStyles(mxConstants.STYLE_STARTSIZE,c.style[mxConstants.STYLE_STARTSIZE],B)}}));return l},label:nb(),ext:nb(),rectangle:nb(),
+triangle:nb(),rhombus:nb(),umlLifeline:function(c){return[fb(c,["size"],function(l){var x=Math.max(0,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",W.prototype.size))));return new mxPoint(l.getCenterX(),l.y+x)},function(l,x){this.state.style.size=Math.round(Math.max(0,Math.min(l.height,x.y-l.y)))},!1)]},umlFrame:function(c){return[fb(c,["width","height"],function(l){var x=Math.max(R.prototype.corner,Math.min(l.width,mxUtils.getValue(this.state.style,"width",R.prototype.width))),
+p=Math.max(1.5*R.prototype.corner,Math.min(l.height,mxUtils.getValue(this.state.style,"height",R.prototype.height)));return new mxPoint(l.x+x,l.y+p)},function(l,x){this.state.style.width=Math.round(Math.max(R.prototype.corner,Math.min(l.width,x.x-l.x)));this.state.style.height=Math.round(Math.max(1.5*R.prototype.corner,Math.min(l.height,x.y-l.y)))},!1)]},process:function(c){var l=[fb(c,["size"],function(x){var p="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),v=parseFloat(mxUtils.getValue(this.state.style,
+"size",ha.prototype.size));return p?new mxPoint(x.x+v,x.y+x.height/4):new mxPoint(x.x+x.width*v,x.y+x.height/4)},function(x,p){x="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*x.width,p.x-x.x)):Math.max(0,Math.min(.5,(p.x-x.x)/x.width));this.state.style.size=x},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(qb(c));return l},cross:function(c){return[fb(c,["size"],function(l){var x=Math.min(l.width,l.height);x=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
+"size",Fa.prototype.size)))*x/2;return new mxPoint(l.getCenterX()-x,l.getCenterY()-x)},function(l,x){var p=Math.min(l.width,l.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,l.getCenterY()-x.y)/p*2,Math.max(0,l.getCenterX()-x.x)/p*2)))})]},note:function(c){return[fb(c,["size"],function(l){var x=Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",f.prototype.size)))));return new mxPoint(l.x+l.width-x,l.y+x)},function(l,x){this.state.style.size=
+Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-x.x),Math.min(l.height,x.y-l.y))))})]},note2:function(c){return[fb(c,["size"],function(l){var x=Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",g.prototype.size)))));return new mxPoint(l.x+l.width-x,l.y+x)},function(l,x){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-x.x),Math.min(l.height,x.y-l.y))))})]},manualInput:function(c){var l=[fb(c,["size"],function(x){var p=
+Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,"size",Ua.prototype.size)));return new mxPoint(x.x+x.width/4,x.y+3*p/4)},function(x,p){this.state.style.size=Math.round(Math.max(0,Math.min(x.height,4*(p.y-x.y)/3)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(qb(c));return l},dataStorage:function(c){return[fb(c,["size"],function(l){var x="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),p=parseFloat(mxUtils.getValue(this.state.style,"size",x?K.prototype.fixedSize:
+K.prototype.size));return new mxPoint(l.x+l.width-p*(x?1:l.width),l.getCenterY())},function(l,x){l="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(l.width,l.x+l.width-x.x)):Math.max(0,Math.min(1,(l.x+l.width-x.x)/l.width));this.state.style.size=l},!1)]},callout:function(c){var l=[fb(c,["size","position"],function(x){var p=Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,"size",ma.prototype.size))),v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
+"position",ma.prototype.position)));mxUtils.getValue(this.state.style,"base",ma.prototype.base);return new mxPoint(x.x+v*x.width,x.y+x.height-p)},function(x,p){mxUtils.getValue(this.state.style,"base",ma.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(x.height,x.y+x.height-p.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(p.x-x.x)/x.width)))/100},!1),fb(c,["position2"],function(x){var p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",ma.prototype.position2)));
+return new mxPoint(x.x+p*x.width,x.y+x.height)},function(x,p){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(p.x-x.x)/x.width)))/100},!1),fb(c,["base"],function(x){var p=Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,"size",ma.prototype.size))),v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ma.prototype.position))),A=Math.max(0,Math.min(x.width,mxUtils.getValue(this.state.style,"base",ma.prototype.base)));return new mxPoint(x.x+Math.min(x.width,
+v*x.width+A),x.y+x.height-p)},function(x,p){var v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ma.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(x.width,p.x-x.x-v*x.width)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(qb(c));return l},internalStorage:function(c){var l=[fb(c,["dx","dy"],function(x){var p=Math.max(0,Math.min(x.width,mxUtils.getValue(this.state.style,"dx",Ra.prototype.dx))),v=Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,
+"dy",Ra.prototype.dy)));return new mxPoint(x.x+p,x.y+v)},function(x,p){this.state.style.dx=Math.round(Math.max(0,Math.min(x.width,p.x-x.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(x.height,p.y-x.y)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(qb(c));return l},module:function(c){return[fb(c,["jettyWidth","jettyHeight"],function(l){var x=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"jettyWidth",va.prototype.jettyWidth))),p=Math.max(0,Math.min(l.height,
+mxUtils.getValue(this.state.style,"jettyHeight",va.prototype.jettyHeight)));return new mxPoint(l.x+x/2,l.y+2*p)},function(l,x){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(l.width,x.x-l.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(l.height,x.y-l.y))/2)})]},corner:function(c){return[fb(c,["dx","dy"],function(l){var x=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",Za.prototype.dx))),p=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,
+"dy",Za.prototype.dy)));return new mxPoint(l.x+x,l.y+p)},function(l,x){this.state.style.dx=Math.round(Math.max(0,Math.min(l.width,x.x-l.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(l.height,x.y-l.y)))},!1)]},tee:function(c){return[fb(c,["dx","dy"],function(l){var x=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",db.prototype.dx))),p=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",db.prototype.dy)));return new mxPoint(l.x+(l.width+x)/2,l.y+p)},function(l,
+x){this.state.style.dx=Math.round(Math.max(0,2*Math.min(l.width/2,x.x-l.x-l.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(l.height,x.y-l.y)))},!1)]},singleArrow:pb(1),doubleArrow:pb(.5),folder:function(c){return[fb(c,["tabWidth","tabHeight"],function(l){var x=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"tabWidth",C.prototype.tabWidth))),p=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"tabHeight",C.prototype.tabHeight)));mxUtils.getValue(this.state.style,
+"tabPosition",C.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(x=l.width-x);return new mxPoint(l.x+x,l.y+p)},function(l,x){var p=Math.max(0,Math.min(l.width,x.x-l.x));mxUtils.getValue(this.state.style,"tabPosition",C.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(p=l.width-p);this.state.style.tabWidth=Math.round(p);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(l.height,x.y-l.y)))},!1)]},document:function(c){return[fb(c,["size"],function(l){var x=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,
+"size",ca.prototype.size))));return new mxPoint(l.x+3*l.width/4,l.y+(1-x)*l.height)},function(l,x){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-x.y)/l.height))},!1)]},tape:function(c){return[fb(c,["size"],function(l){var x=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",Z.prototype.size))));return new mxPoint(l.getCenterX(),l.y+x*l.height/2)},function(l,x){this.state.style.size=Math.max(0,Math.min(1,(x.y-l.y)/l.height*2))},!1)]},isoCube2:function(c){return[fb(c,
+["isoAngle"],function(l){var x=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",m.isoAngle))))*Math.PI/200;return new mxPoint(l.x,l.y+Math.min(l.width*Math.tan(x),.5*l.height))},function(l,x){this.state.style.isoAngle=Math.max(0,50*(x.y-l.y)/l.height)},!0)]},cylinder2:vb(q.prototype.size),cylinder3:vb(y.prototype.size),offPageConnector:function(c){return[fb(c,["size"],function(l){var x=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ja.prototype.size))));
return new mxPoint(l.getCenterX(),l.y+(1-x)*l.height)},function(l,x){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-x.y)/l.height))},!1)]},"mxgraph.basic.rect":function(c){var l=[Graph.createHandle(c,["size"],function(x){var p=Math.max(0,Math.min(x.width/2,x.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(x.x+p,x.y+p)},function(x,p){this.state.style.size=Math.round(100*Math.max(0,Math.min(x.height/2,x.width/2,p.x-x.x)))/100})];c=Graph.createHandle(c,
-["indent"],function(x){var p=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(x.x+.75*x.width,x.y+p*x.height/200)},function(x,p){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(p.y-x.y)/x.height)))/100});l.push(c);return l},step:Bb(U.prototype.size,!0,null,!0,U.prototype.fixedSize),hexagon:Bb(L.prototype.size,!0,.5,!0,L.prototype.fixedSize),curlyBracket:Bb(qa.prototype.size,!1),display:Bb(wa.prototype.size,!1),cube:nb(1,
-n.prototype.size,!1),card:nb(.5,G.prototype.size,!0),loopLimit:nb(.5,V.prototype.size,!0),trapezoid:yb(.5,X.prototype.size,X.prototype.fixedSize),parallelogram:yb(1,Z.prototype.size,Z.prototype.fixedSize)};Graph.createHandle=gb;Graph.handleFactory=rb;var tb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=tb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var l=this.state.style.shape;null==mxCellRenderer.defaultShapes[l]&&
+["indent"],function(x){var p=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(x.x+.75*x.width,x.y+p*x.height/200)},function(x,p){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(p.y-x.y)/x.height)))/100});l.push(c);return l},step:Bb(T.prototype.size,!0,null,!0,T.prototype.fixedSize),hexagon:Bb(M.prototype.size,!0,.5,!0,M.prototype.fixedSize),curlyBracket:Bb(pa.prototype.size,!1),display:Bb(Ja.prototype.size,!1),cube:ob(1,
+n.prototype.size,!1),card:ob(.5,G.prototype.size,!0),loopLimit:ob(.5,V.prototype.size,!0),trapezoid:yb(.5,Y.prototype.size,Y.prototype.fixedSize),parallelogram:yb(1,aa.prototype.size,aa.prototype.fixedSize)};Graph.createHandle=fb;Graph.handleFactory=rb;var tb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=tb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var l=this.state.style.shape;null==mxCellRenderer.defaultShapes[l]&&
null==mxStencilRegistry.getStencil(l)?l=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(l=mxConstants.SHAPE_SWIMLANE);l=rb[l];null==l&&null!=this.state.shape&&this.state.shape.isRoundable()&&(l=rb[mxConstants.SHAPE_RECTANGLE]);null!=l&&(l=l(this.state),null!=l&&(c=null==c?l:c.concat(l)))}return c};mxEdgeHandler.prototype.createCustomHandles=function(){var c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&null==mxStencilRegistry.getStencil(c)&&(c=mxConstants.SHAPE_CONNECTOR);
c=rb[c];return null!=c?c(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var zb=new mxPoint(1,0),wb=new mxPoint(1,0),Ab=mxUtils.toRadians(-30);zb=mxUtils.getRotatedPoint(zb,Math.cos(Ab),Math.sin(Ab));var lb=mxUtils.toRadians(-150);wb=mxUtils.getRotatedPoint(wb,Math.cos(lb),Math.sin(lb));mxEdgeStyle.IsometricConnector=function(c,l,x,p,v){var A=c.view;p=null!=p&&0<p.length?p[0]:null;var B=c.absolutePoints,ka=B[0];B=B[B.length-1];null!=p&&(p=A.transformControlPoint(c,p));
-null==ka&&null!=l&&(ka=new mxPoint(l.getCenterX(),l.getCenterY()));null==B&&null!=x&&(B=new mxPoint(x.getCenterX(),x.getCenterY()));var J=zb.x,xa=zb.y,oa=wb.x,$a=wb.y,jb="horizontal"==mxUtils.getValue(c.style,"elbow","horizontal");if(null!=B&&null!=ka){c=function(Ea,Ka,Ia){Ea-=hb.x;var Ha=Ka-hb.y;Ka=($a*Ea-oa*Ha)/(J*$a-xa*oa);Ea=(xa*Ea-J*Ha)/(xa*oa-J*$a);jb?(Ia&&(hb=new mxPoint(hb.x+J*Ka,hb.y+xa*Ka),v.push(hb)),hb=new mxPoint(hb.x+oa*Ea,hb.y+$a*Ea)):(Ia&&(hb=new mxPoint(hb.x+oa*Ea,hb.y+$a*Ea),v.push(hb)),
-hb=new mxPoint(hb.x+J*Ka,hb.y+xa*Ka));v.push(hb)};var hb=ka;null==p&&(p=new mxPoint(ka.x+(B.x-ka.x)/2,ka.y+(B.y-ka.y)/2));c(p.x,p.y,!0);c(B.x,B.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var xb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,l){if(l==mxEdgeStyle.IsometricConnector){var x=new mxElbowEdgeHandler(c);x.snapToTerminals=!1;return x}return xb.apply(this,arguments)};t.prototype.constraints=[];E.prototype.getConstraints=
+null==ka&&null!=l&&(ka=new mxPoint(l.getCenterX(),l.getCenterY()));null==B&&null!=x&&(B=new mxPoint(x.getCenterX(),x.getCenterY()));var J=zb.x,wa=zb.y,oa=wb.x,ab=wb.y,jb="horizontal"==mxUtils.getValue(c.style,"elbow","horizontal");if(null!=B&&null!=ka){c=function(Ea,La,Ia){Ea-=gb.x;var Ga=La-gb.y;La=(ab*Ea-oa*Ga)/(J*ab-wa*oa);Ea=(wa*Ea-J*Ga)/(wa*oa-J*ab);jb?(Ia&&(gb=new mxPoint(gb.x+J*La,gb.y+wa*La),v.push(gb)),gb=new mxPoint(gb.x+oa*Ea,gb.y+ab*Ea)):(Ia&&(gb=new mxPoint(gb.x+oa*Ea,gb.y+ab*Ea),v.push(gb)),
+gb=new mxPoint(gb.x+J*La,gb.y+wa*La));v.push(gb)};var gb=ka;null==p&&(p=new mxPoint(ka.x+(B.x-ka.x)/2,ka.y+(B.y-ka.y)/2));c(p.x,p.y,!0);c(B.x,B.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var xb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,l){if(l==mxEdgeStyle.IsometricConnector){var x=new mxElbowEdgeHandler(c);x.snapToTerminals=!1;return x}return xb.apply(this,arguments)};t.prototype.constraints=[];E.prototype.getConstraints=
function(c,l,x){c=[];var p=Math.tan(mxUtils.toRadians(30)),v=(.5-p)/2;p=Math.min(l,x/(.5+p));l=(l-p)/2;x=(x-p)/2;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,x+.25*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+.5*p,x+p*v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+p,x+.25*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+p,x+.75*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+.5*p,x+(1-v)*p));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,l,x+.75*p));return c};m.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;p=Math.min(l*Math.tan(p),.5*x);c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,p));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,x-p));c.push(new mxConnectionConstraint(new mxPoint(.5,
-1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));return c};ja.prototype.getConstraints=function(c,l,x){c=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var p=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var v=l*Math.max(0,
+1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));return c};ma.prototype.getConstraints=function(c,l,x){c=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var p=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var v=l*Math.max(0,
Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(x-p)));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,l,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(x-p)));l>=2*p&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,
-1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];La.prototype.constraints=mxRectangleShape.prototype.constraints;
-mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;da.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;f.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(0,Math.min(l,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];Ma.prototype.constraints=mxRectangleShape.prototype.constraints;
+mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;ia.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;f.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(0,Math.min(l,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*(l-p),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-p,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*p,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(x+p)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
.5),!1));l>=2*p&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};G.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(0,Math.min(l,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+p),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,0,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(x+p)));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));l>=2*p&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};n.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(0,Math.min(l,Math.min(x,parseFloat(mxUtils.getValue(this.style,
@@ -2901,37 +2904,37 @@ mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwim
function(c,l,x){c=[];var p=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),v=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(c.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,0)),c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,p,v)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+p),v))):(c.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*p,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-p,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-p,v)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-p),v)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,l,.25*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.75*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,.75*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x));c.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return c};Oa.prototype.constraints=mxRectangleShape.prototype.constraints;K.prototype.constraints=mxRectangleShape.prototype.constraints;na.prototype.constraints=mxEllipse.prototype.constraints;va.prototype.constraints=mxEllipse.prototype.constraints;
-pa.prototype.constraints=mxEllipse.prototype.constraints;Ua.prototype.constraints=mxEllipse.prototype.constraints;Ta.prototype.constraints=mxRectangleShape.prototype.constraints;Sa.prototype.constraints=mxRectangleShape.prototype.constraints;wa.prototype.getConstraints=function(c,l,x){c=[];var p=Math.min(l,x/2),v=Math.min(l-p,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*l);c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,v,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(v+l-p),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-p,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-p,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(v+l-p),x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));return c};ua.prototype.getConstraints=function(c,l,x){l=parseFloat(mxUtils.getValue(c,
-"jettyWidth",ua.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c,"jettyHeight",ua.prototype.jettyHeight));var p=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,l),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,
+0),!1,null,0,.75*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x));c.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return c};Ra.prototype.constraints=mxRectangleShape.prototype.constraints;K.prototype.constraints=mxRectangleShape.prototype.constraints;na.prototype.constraints=mxEllipse.prototype.constraints;ya.prototype.constraints=mxEllipse.prototype.constraints;
+ra.prototype.constraints=mxEllipse.prototype.constraints;Wa.prototype.constraints=mxEllipse.prototype.constraints;Ua.prototype.constraints=mxRectangleShape.prototype.constraints;Sa.prototype.constraints=mxRectangleShape.prototype.constraints;Ja.prototype.getConstraints=function(c,l,x){c=[];var p=Math.min(l,x/2),v=Math.min(l-p,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*l);c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,v,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(v+l-p),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-p,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-p,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(v+l-p),x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));return c};va.prototype.getConstraints=function(c,l,x){l=parseFloat(mxUtils.getValue(c,
+"jettyWidth",va.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c,"jettyHeight",va.prototype.jettyHeight));var p=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,l),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,
.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,l),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(x-.5*c,1.5*c)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(x-.5*c,3.5*c))];x>5*c&&p.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,l));x>8*c&&p.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1,null,l));x>15*c&&p.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,l));return p};V.prototype.constraints=mxRectangleShape.prototype.constraints;ia.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
-.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];aa.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)];sa.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,
+.5),!1,null,l));x>15*c&&p.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,l));return p};V.prototype.constraints=mxRectangleShape.prototype.constraints;ja.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
+.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];ba.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)];ua.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)];F.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)];U.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,
-.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ca.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,
+.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];Z.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,
+.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];T.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,
+.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];da.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,
0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,
.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,
1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,
-.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];Z.prototype.constraints=mxRectangleShape.prototype.constraints;X.prototype.constraints=mxRectangleShape.prototype.constraints;ba.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
-0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;eb.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),v=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,
+.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];aa.prototype.constraints=mxRectangleShape.prototype.constraints;Y.prototype.constraints=mxRectangleShape.prototype.constraints;ca.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
+0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;db.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),v=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,
"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*l+.25*p,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+p),v));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*(l+p),.5*(x+v)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+p),x));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-p),x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-p),.5*(x+v)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-p),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*l-.25*p,v));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*v));return c};Xa.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),v=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*v));return c};Za.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),v=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,l,.5*v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+p),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*(x+v)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,x));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-1),!1));return c};Ga.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];bb.prototype.getConstraints=
+1),!1));return c};Ha.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];cb.prototype.getConstraints=
function(c,l,x){c=[];var p=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),v=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));p=(x-p)/2;c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-v),p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-v,0));c.push(new mxConnectionConstraint(new mxPoint(1,
-.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-v),x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-p));return c};z.prototype.getConstraints=function(c,l,x){c=[];var p=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",bb.prototype.arrowWidth)))),v=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",bb.prototype.arrowSize))));p=(x-p)/2;c.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-v),x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-p));return c};z.prototype.getConstraints=function(c,l,x){c=[];var p=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",cb.prototype.arrowWidth)))),v=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",cb.prototype.arrowSize))));p=(x-p)/2;c.push(new mxConnectionConstraint(new mxPoint(0,
.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-v,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));return c};Fa.prototype.getConstraints=
function(c,l,x){c=[];var p=Math.min(x,l),v=Math.max(0,Math.min(p,p*parseFloat(mxUtils.getValue(this.style,"size",this.size))));p=(x-v)/2;var A=p+v,B=(l-v)/2;v=B+v;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,0));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,v,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,x-.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,x));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x-.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+v),p));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,l,p));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+v),A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*B,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*B,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,p));return c};S.prototype.constraints=null;M.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,
-.9),!1)];T.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];fa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ra.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*B,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,p));return c};W.prototype.constraints=null;L.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,
+.9),!1)];S.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];ea.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];qa.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(g){t.escape();g=t.deleteCells(t.getDeletableCells(t.getSelectionCells()),g);null!=g&&t.setSelectionCells(g)}function e(){if(!t.isSelectionEmpty()){t.getModel().beginUpdate();try{for(var g=t.getSelectionCells(),m=0;m<g.length;m++)t.cellLabelChanged(g[m],"")}finally{t.getModel().endUpdate()}}}function k(g,m,q,y,F){F.getModel().beginUpdate();try{var C=F.getCellGeometry(g);null!=C&&q&&y&&(q/=y,C=C.clone(),1<q?C.height=C.width/q:C.width=C.height*q,F.getModel().setGeometry(g,
C));F.setCellStyles(mxConstants.STYLE_CLIP_PATH,m,[g]);F.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[g])}finally{F.getModel().endUpdate()}}var n=this.editorUi,D=n.editor,t=D.graph,E=function(){return Action.prototype.isEnabled.apply(this,arguments)&&t.isEnabled()};this.addAction("new...",function(){t.openLink(n.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";n.openFile()});this.addAction("smartFit",function(){t.popupMenuHandler.hideMenu();var g=t.view.scale,
@@ -2940,7 +2943,7 @@ window.openFile.setConsumer(mxUtils.bind(this,function(g,m){try{var q=mxUtils.pa
null,Editor.ctrlKey+"+Shift+S").isEnabled=E;this.addAction("export...",function(){n.showDialog((new ExportDialog(n)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var g=new EditDiagramDialog(n);n.showDialog(g.container,620,420,!0,!1);g.init()});this.addAction("pageSetup...",function(){n.showDialog((new PageSetupDialog(n)).container,320,240,!0,!0)}).isEnabled=E;this.addAction("print...",function(){n.showDialog((new PrintDialog(n)).container,300,180,!0,!0)},null,"sprite-print",
Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(t,null,10,10)});this.addAction("undo",function(){n.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){n.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var g=null;try{g=n.copyXml(),null!=g&&t.removeCells(g,!1)}catch(m){}null==g&&mxClipboard.cut(t)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{n.copyXml()}catch(g){}try{mxClipboard.copy(t)}catch(g){n.handleError(g)}},
null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())){var g=!1;try{Editor.enableNativeCipboard&&(n.readGraphModelFromClipboard(function(m){if(null!=m){t.getModel().beginUpdate();try{n.pasteXml(m,!0)}finally{t.getModel().endUpdate()}}else mxClipboard.paste(t)}),g=!0)}catch(m){}g||mxClipboard.paste(t)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(g){function m(y){if(null!=y){for(var F=!0,C=0;C<
-y.length&&F;C++)F=F&&t.model.isEdge(y[C]);var I=t.view.translate;C=t.view.scale;var G=I.x,Y=I.y;I=null;if(1==y.length&&F){var ba=t.getCellGeometry(y[0]);null!=ba&&(I=ba.getTerminalPoint(!0))}I=null!=I?I:t.getBoundingBoxFromGeometry(y,F);null!=I&&(F=Math.round(t.snap(t.popupMenuHandler.triggerX/C-G)),C=Math.round(t.snap(t.popupMenuHandler.triggerY/C-Y)),t.cellsMoved(y,F-I.x,C-I.y))}}function q(){t.getModel().beginUpdate();try{m(mxClipboard.paste(t))}finally{t.getModel().endUpdate()}}if(t.isEnabled()&&
+y.length&&F;C++)F=F&&t.model.isEdge(y[C]);var I=t.view.translate;C=t.view.scale;var G=I.x,Z=I.y;I=null;if(1==y.length&&F){var ca=t.getCellGeometry(y[0]);null!=ca&&(I=ca.getTerminalPoint(!0))}I=null!=I?I:t.getBoundingBoxFromGeometry(y,F);null!=I&&(F=Math.round(t.snap(t.popupMenuHandler.triggerX/C-G)),C=Math.round(t.snap(t.popupMenuHandler.triggerY/C-Z)),t.cellsMoved(y,F-I.x,C-I.y))}}function q(){t.getModel().beginUpdate();try{m(mxClipboard.paste(t))}finally{t.getModel().endUpdate()}}if(t.isEnabled()&&
!t.isCellLocked(t.getDefaultParent())){g=!1;try{Editor.enableNativeCipboard&&(n.readGraphModelFromClipboard(function(y){if(null!=y){t.getModel().beginUpdate();try{m(n.pasteXml(y,!0))}finally{t.getModel().endUpdate()}}else q()}),g=!0)}catch(y){}g||q()}});this.addAction("copySize",function(){var g=t.getSelectionCell();t.isEnabled()&&null!=g&&t.getModel().isVertex(g)&&(g=t.getCellGeometry(g),null!=g&&(n.copiedSize=new mxRectangle(g.x,g.y,g.width,g.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",
function(){if(t.isEnabled()&&!t.isSelectionEmpty()&&null!=n.copiedSize){t.getModel().beginUpdate();try{for(var g=t.getResizableCells(t.getSelectionCells()),m=0;m<g.length;m++)if(t.getModel().isVertex(g[m])){var q=t.getCellGeometry(g[m]);null!=q&&(q=q.clone(),q.width=n.copiedSize.width,q.height=n.copiedSize.height,t.getModel().setGeometry(g[m],q))}}finally{t.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",function(){var g=t.getSelectionCell()||t.getModel().getRoot();t.isEnabled()&&
null!=g&&(g=g.cloneValue(),null==g||isNaN(g.nodeType)||(n.copiedValue=g))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(g,m){function q(C,I){var G=y.getValue(C);I=C.cloneValue(I);I.removeAttribute("placeholders");null==G||isNaN(G.nodeType)||I.setAttribute("placeholders",G.getAttribute("placeholders"));null!=g&&mxEvent.isShiftDown(g)||I.setAttribute("label",t.convertValueToString(C));y.setValue(C,I)}g=null!=m?m:g;var y=t.getModel();if(t.isEnabled()&&!t.isSelectionEmpty()&&null!=n.copiedValue){y.beginUpdate();
@@ -2989,9 +2992,9 @@ null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function
t.getModel().getParent(g),C=t.getCellGeometry(g);F=Math.round(t.snap(t.popupMenuHandler.triggerX/y-F));y=Math.round(t.snap(t.popupMenuHandler.triggerY/y-q));m.addPointAt(m.state,F,y)}}});this.addAction("removeWaypoint",function(){var g=n.actions.get("removeWaypoint");null!=g.handler&&g.handler.removePoint(g.handler.state,g.index)});this.addAction("clearWaypoints",function(g,m){g=null!=m?m:g;var q=t.getSelectionCells();if(null!=q){q=t.getEditableCells(t.addAllEdges(q));t.getModel().beginUpdate();try{for(var y=
0;y<q.length;y++){var F=q[y];if(t.getModel().isEdge(F)){var C=t.getCellGeometry(F);null!=m&&mxEvent.isShiftDown(g)?(t.setCellStyles(mxConstants.STYLE_EXIT_X,null,[F]),t.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[F]),t.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[F]),t.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[F])):null!=C&&(C=C.clone(),C.points=null,C.x=0,C.y=0,C.offset=null,t.getModel().setGeometry(F,C))}}}finally{t.getModel().endUpdate()}}},null,null,"Alt+Shift+C");d=this.addAction("subscript",
mxUtils.bind(this,function(){t.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");d=this.addAction("superscript",mxUtils.bind(this,function(){t.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())){var g=mxResources.get("image")+" ("+mxResources.get("url")+"):",m=t.getView().getState(t.getSelectionCell()),
-q="",y=null;null!=m&&(q=m.style[mxConstants.STYLE_IMAGE]||q,y=m.style[mxConstants.STYLE_CLIP_PATH]||y);var F=t.cellEditor.saveSelection();n.showImageDialog(g,q,function(C,I,G,Y,ba,Z){if(t.cellEditor.isContentEditing())t.cellEditor.restoreSelection(F),t.insertImage(C,I,G);else{var X=t.getSelectionCells();if(null!=C&&(0<C.length||0<X.length)){var qa=null;t.getModel().beginUpdate();try{if(0==X.length){X=[t.insertVertex(t.getDefaultParent(),null,"",0,0,I,G,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];
-var Q=t.getCenterInsertPoint(t.getBoundingBoxFromGeometry(X,!0));X[0].geometry.x=Q.x;X[0].geometry.y=Q.y;null!=Y&&k(X[0],Y,ba,Z,t);qa=X;t.fireEvent(new mxEventObject("cellsInserted","cells",qa))}t.setCellStyles(mxConstants.STYLE_IMAGE,0<C.length?C:null,X);var W=t.getCurrentCellStyle(X[0]);"image"!=W[mxConstants.STYLE_SHAPE]&&"label"!=W[mxConstants.STYLE_SHAPE]?t.setCellStyles(mxConstants.STYLE_SHAPE,"image",X):0==C.length&&t.setCellStyles(mxConstants.STYLE_SHAPE,null,X);if(1==t.getSelectionCount()&&
-null!=I&&null!=G){var ha=X[0],la=t.getModel().getGeometry(ha);null!=la&&(la=la.clone(),la.width=I,la.height=G,t.getModel().setGeometry(ha,la));null!=Y?k(ha,Y,ba,Z,t):t.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,X)}}finally{t.getModel().endUpdate()}null!=qa&&(t.setSelectionCells(qa),t.scrollCellToVisible(qa[0]))}}},t.cellEditor.isContentEditing(),!t.cellEditor.isContentEditing(),!0,y)}}).isEnabled=E;this.addAction("crop...",function(){var g=t.getSelectionCell();if(t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&
+q="",y=null;null!=m&&(q=m.style[mxConstants.STYLE_IMAGE]||q,y=m.style[mxConstants.STYLE_CLIP_PATH]||y);var F=t.cellEditor.saveSelection();n.showImageDialog(g,q,function(C,I,G,Z,ca,aa){if(t.cellEditor.isContentEditing())t.cellEditor.restoreSelection(F),t.insertImage(C,I,G);else{var Y=t.getSelectionCells();if(null!=C&&(0<C.length||0<Y.length)){var pa=null;t.getModel().beginUpdate();try{if(0==Y.length){Y=[t.insertVertex(t.getDefaultParent(),null,"",0,0,I,G,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];
+var Q=t.getCenterInsertPoint(t.getBoundingBoxFromGeometry(Y,!0));Y[0].geometry.x=Q.x;Y[0].geometry.y=Q.y;null!=Z&&k(Y[0],Z,ca,aa,t);pa=Y;t.fireEvent(new mxEventObject("cellsInserted","cells",pa))}t.setCellStyles(mxConstants.STYLE_IMAGE,0<C.length?C:null,Y);var X=t.getCurrentCellStyle(Y[0]);"image"!=X[mxConstants.STYLE_SHAPE]&&"label"!=X[mxConstants.STYLE_SHAPE]?t.setCellStyles(mxConstants.STYLE_SHAPE,"image",Y):0==C.length&&t.setCellStyles(mxConstants.STYLE_SHAPE,null,Y);if(1==t.getSelectionCount()&&
+null!=I&&null!=G){var ha=Y[0],U=t.getModel().getGeometry(ha);null!=U&&(U=U.clone(),U.width=I,U.height=G,t.getModel().setGeometry(ha,U));null!=Z?k(ha,Z,ca,aa,t):t.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,Y)}}finally{t.getModel().endUpdate()}null!=pa&&(t.setSelectionCells(pa),t.scrollCellToVisible(pa[0]))}}},t.cellEditor.isContentEditing(),!t.cellEditor.isContentEditing(),!0,y)}}).isEnabled=E;this.addAction("crop...",function(){var g=t.getSelectionCell();if(t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&
null!=g){var m=t.getCurrentCellStyle(g),q=m[mxConstants.STYLE_IMAGE],y=m[mxConstants.STYLE_SHAPE];q&&"image"==y&&(m=new CropImageDialog(n,q,m[mxConstants.STYLE_CLIP_PATH],function(F,C,I){k(g,F,C,I,t)}),n.showDialog(m.container,300,390,!0,!0))}}).isEnabled=E;d=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(n,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",mxUtils.bind(this,function(){n.fireEvent(new mxEventObject("layers"))})),
this.layersWindow.window.addListener("hide",function(){n.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),n.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");d.setToggleAction(!0);d.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));d=this.addAction("formatPanel",mxUtils.bind(this,
function(){n.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");d.setToggleAction(!0);d.setSelectedCallback(mxUtils.bind(this,function(){return 0<n.formatWidth}));d=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(n,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){n.fireEvent(new mxEventObject("outline"))})),this.outlineWindow.window.addListener("hide",function(){n.fireEvent(new mxEventObject("outline"))}),
@@ -3007,7 +3010,7 @@ e))}catch(t){null!=e&&e(t)}}),e))};
DrawioFile.prototype.mergeFile=function(b,e,k,n){var D=!0;try{this.stats.fileMerged++;var t=this.getShadowPages(),E=b.getShadowPages();if(null!=E&&0<E.length){var d=[this.ui.diffPages(null!=n?n:t,E)],f=this.ignorePatches(d);this.setShadowPages(E);if(f)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",f);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(t,this.ui.pages):null;n={};f={};var g=this.ui.patchPages(t,d[0]),m=this.ui.getHashValueForPages(g,
n),q=this.ui.getHashValueForPages(E,f);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",t,"pages",this.ui.pages,"patches",d,"backup",this.backupPatch,"checksum",m,"current",q,"valid",m==q,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=m&&m!=q){var y=this.compressReportData(this.getAnonymizedXmlForPages(E)),F=this.compressReportData(this.getAnonymizedXmlForPages(g)),C=this.ui.hashValue(b.getCurrentEtag()),I=this.ui.hashValue(this.getCurrentEtag());
this.checksumError(k,d,"Shadow Details: "+JSON.stringify(n)+"\nChecksum: "+m+"\nCurrent: "+q+"\nCurrent Details: "+JSON.stringify(f)+"\nFrom: "+C+"\nTo: "+I+"\n\nFile Data:\n"+y+"\nPatched Shadow:\n"+F,null,"mergeFile");return}if(null!=this.sync){var G=this.sync.patchRealtime(d,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==G||mxUtils.isEmptyObject(G)||d.push(G)}this.patch(d,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw D=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=
-this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=e&&e()}catch(Z){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=k&&k(Z);try{if(D)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,Z);else{var Y=this.getCurrentUser(),ba=null!=Y?Y.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),ba,Z)}}catch(X){}}};
+this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=e&&e()}catch(aa){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=k&&k(aa);try{if(D)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,aa);else{var Z=this.getCurrentUser(),ca=null!=Z?Z.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),ca,aa)}}catch(Y){}}};
DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var e=new mxCodec(mxUtils.createXmlDocument()),k=e.document.createElement("mxfile");if(null!=b)for(var n=0;n<b.length;n++){var D=e.encode(new mxGraphModel(b[n].root));"1"!=urlParams.dev&&(D=this.ui.anonymizeNode(D,!0));D.setAttribute("id",b[n].getId());b[n].viewState&&this.ui.editor.graph.saveViewState(b[n].viewState,D,!0);k.appendChild(D)}return mxUtils.getPrettyXml(k)};
DrawioFile.prototype.compressReportData=function(b,e,k){e=null!=e?e:1E4;null!=k&&null!=b&&b.length>k?b=b.substring(0,k)+"[...]":null!=b&&b.length>e&&(b=Graph.compress(b)+"\n");return b};
DrawioFile.prototype.checksumError=function(b,e,k,n,D){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=e)for(b=0;b<e.length;b++)this.ui.anonymizePatch(e[b]);var t=mxUtils.bind(this,function(g){var m=this.compressReportData(JSON.stringify(e,null,2));g=null==g?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(g.data)),
@@ -3130,195 +3133,195 @@ H.isVertex(H.getParent(u.vertices[0])):!1}},{name:"editable",dispName:"Editable"
{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"fixedWidth",dispName:"Fixed Width",type:"bool",defVal:!1},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},
{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(u,H){var P=mxUtils.getValue(u.style,mxConstants.STYLE_FILLCOLOR,null);return H.editorUi.editor.graph.isSwimlane(u.vertices[0])||null==P||P==mxConstants.NONE||0==mxUtils.getValue(u.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(u.style,mxConstants.STYLE_OPACITY,100)||
null!=u.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(u,H){return 0<u.vertices.length&&H.editorUi.editor.graph.isContainer(u.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Collapsed state for vertices. Possible values are true or false. Default is false.\n#\n# collapsed: false\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
-Editor.createRoughCanvas=function(u){var H=rough.canvas({getContext:function(){return u}});H.draw=function(P){var S=P.sets||[];P=P.options||this.getDefaultOptions();for(var R=0;R<S.length;R++){var ca=S[R];switch(ca.type){case "path":null!=P.stroke&&this._drawToContext(u,ca,P);break;case "fillPath":this._drawToContext(u,ca,P);break;case "fillSketch":this.fillSketch(u,ca,P)}}};H.fillSketch=function(P,S,R){var ca=u.state.strokeColor,ea=u.state.strokeWidth,fa=u.state.strokeAlpha,ra=u.state.dashed,ua=
-R.fillWeight;0>ua&&(ua=R.strokeWidth/2);u.setStrokeAlpha(u.state.fillAlpha);u.setStrokeColor(R.fill||"");u.setStrokeWidth(ua);u.setDashed(!1);this._drawToContext(P,S,R);u.setDashed(ra);u.setStrokeWidth(ea);u.setStrokeColor(ca);u.setStrokeAlpha(fa)};H._drawToContext=function(P,S,R){P.begin();for(var ca=0;ca<S.ops.length;ca++){var ea=S.ops[ca],fa=ea.data;switch(ea.op){case "move":P.moveTo(fa[0],fa[1]);break;case "bcurveTo":P.curveTo(fa[0],fa[1],fa[2],fa[3],fa[4],fa[5]);break;case "lineTo":P.lineTo(fa[0],
-fa[1])}}P.end();"fillPath"===S.type&&R.filled?P.fill():P.stroke()};return H};(function(){function u(ca,ea,fa){this.canvas=ca;this.rc=ea;this.shape=fa;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,u.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,u.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,u.prototype.rect);this.originalRoundrect=
+Editor.createRoughCanvas=function(u){var H=rough.canvas({getContext:function(){return u}});H.draw=function(P){var W=P.sets||[];P=P.options||this.getDefaultOptions();for(var R=0;R<W.length;R++){var da=W[R];switch(da.type){case "path":null!=P.stroke&&this._drawToContext(u,da,P);break;case "fillPath":this._drawToContext(u,da,P);break;case "fillSketch":this.fillSketch(u,da,P)}}};H.fillSketch=function(P,W,R){var da=u.state.strokeColor,fa=u.state.strokeWidth,ea=u.state.strokeAlpha,qa=u.state.dashed,va=
+R.fillWeight;0>va&&(va=R.strokeWidth/2);u.setStrokeAlpha(u.state.fillAlpha);u.setStrokeColor(R.fill||"");u.setStrokeWidth(va);u.setDashed(!1);this._drawToContext(P,W,R);u.setDashed(qa);u.setStrokeWidth(fa);u.setStrokeColor(da);u.setStrokeAlpha(ea)};H._drawToContext=function(P,W,R){P.begin();for(var da=0;da<W.ops.length;da++){var fa=W.ops[da],ea=fa.data;switch(fa.op){case "move":P.moveTo(ea[0],ea[1]);break;case "bcurveTo":P.curveTo(ea[0],ea[1],ea[2],ea[3],ea[4],ea[5]);break;case "lineTo":P.lineTo(ea[0],
+ea[1])}}P.end();"fillPath"===W.type&&R.filled?P.fill():P.stroke()};return H};(function(){function u(da,fa,ea){this.canvas=da;this.rc=fa;this.shape=ea;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,u.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,u.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,u.prototype.rect);this.originalRoundrect=
this.canvas.roundrect;this.canvas.roundrect=mxUtils.bind(this,u.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,u.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,u.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,u.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,u.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
this.canvas.curveTo=mxUtils.bind(this,u.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,u.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,u.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,u.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,u.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=
-mxUtils.bind(this,u.prototype.fillAndStroke);this.path=[];this.passThrough=!1}u.prototype.moveOp="M";u.prototype.lineOp="L";u.prototype.quadOp="Q";u.prototype.curveOp="C";u.prototype.closeOp="Z";u.prototype.getStyle=function(ca,ea){var fa=1;if(null!=this.shape.state){var ra=this.shape.state.cell.id;if(null!=ra)for(var ua=0;ua<ra.length;ua++)fa=(fa<<5)-fa+ra.charCodeAt(ua)<<0}fa={strokeWidth:this.canvas.state.strokeWidth,seed:fa,preserveVertices:!0};ra=this.rc.getDefaultOptions();fa.stroke=ca?this.canvas.state.strokeColor===
-mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;ca=null;(fa.filled=ea)?(fa.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,ca=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):fa.fill="";fa.bowing=mxUtils.getValue(this.shape.style,"bowing",ra.bowing);fa.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",ra.hachureAngle);fa.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",
-ra.curveFitting);fa.roughness=mxUtils.getValue(this.shape.style,"jiggle",ra.roughness);fa.simplification=mxUtils.getValue(this.shape.style,"simplification",ra.simplification);fa.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",ra.disableMultiStroke);fa.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",ra.disableMultiStrokeFill);ea=mxUtils.getValue(this.shape.style,"hachureGap",-1);fa.hachureGap="auto"==ea?-1:ea;fa.dashGap=mxUtils.getValue(this.shape.style,
-"dashGap",ea);fa.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",ea);fa.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",ea);ea=mxUtils.getValue(this.shape.style,"fillWeight",-1);fa.fillWeight="auto"==ea?-1:ea;ea=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==ea&&(ea=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),ea=null!=fa.fill&&(null!=ca||null!=ea&&fa.fill==ea)?"solid":
-ra.fillStyle);fa.fillStyle=ea;return fa};u.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};u.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};u.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var ca=2;ca<arguments.length;ca+=2)this.lastX=arguments[ca-1],this.lastY=arguments[ca],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};
-u.prototype.lineTo=function(ca,ea){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,ca,ea),this.lastX=ca,this.lastY=ea)};u.prototype.moveTo=function(ca,ea){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,ca,ea),this.lastX=ca,this.lastY=ea,this.firstX=ca,this.firstY=ea)};u.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};u.prototype.quadTo=function(ca,
-ea,fa,ra){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,ca,ea,fa,ra),this.lastX=fa,this.lastY=ra)};u.prototype.curveTo=function(ca,ea,fa,ra,ua,sa){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,ca,ea,fa,ra,ua,sa),this.lastX=ua,this.lastY=sa)};u.prototype.arcTo=function(ca,ea,fa,ra,ua,sa,Aa){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var Ca=mxUtils.arcToCurves(this.lastX,this.lastY,
-ca,ea,fa,ra,ua,sa,Aa);if(null!=Ca)for(var Ba=0;Ba<Ca.length;Ba+=6)this.curveTo(Ca[Ba],Ca[Ba+1],Ca[Ba+2],Ca[Ba+3],Ca[Ba+4],Ca[Ba+5]);this.lastX=sa;this.lastY=Aa}};u.prototype.rect=function(ca,ea,fa,ra){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(ca,ea,fa,ra,this.getStyle(!0,!0)))};u.prototype.ellipse=function(ca,ea,fa,ra){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(ca+
-fa/2,ea+ra/2,fa,ra,this.getStyle(!0,!0)))};u.prototype.roundrect=function(ca,ea,fa,ra,ua,sa){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(ca+ua,ea),this.lineTo(ca+fa-ua,ea),this.quadTo(ca+fa,ea,ca+fa,ea+sa),this.lineTo(ca+fa,ea+ra-sa),this.quadTo(ca+fa,ea+ra,ca+fa-ua,ea+ra),this.lineTo(ca+ua,ea+ra),this.quadTo(ca,ea+ra,ca,ea+ra-sa),this.lineTo(ca,ea+sa),this.quadTo(ca,ea,ca+ua,ea))};u.prototype.drawPath=function(ca){if(0<this.path.length){this.passThrough=
-!0;try{this.rc.path(this.path.join(" "),ca)}catch(fa){}this.passThrough=!1}else if(null!=this.nextShape){for(var ea in ca)this.nextShape.options[ea]=ca[ea];ca.stroke!=mxConstants.NONE&&null!=ca.stroke||delete this.nextShape.options.stroke;ca.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};u.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};u.prototype.fill=
+mxUtils.bind(this,u.prototype.fillAndStroke);this.path=[];this.passThrough=!1}u.prototype.moveOp="M";u.prototype.lineOp="L";u.prototype.quadOp="Q";u.prototype.curveOp="C";u.prototype.closeOp="Z";u.prototype.getStyle=function(da,fa){var ea=1;if(null!=this.shape.state){var qa=this.shape.state.cell.id;if(null!=qa)for(var va=0;va<qa.length;va++)ea=(ea<<5)-ea+qa.charCodeAt(va)<<0}ea={strokeWidth:this.canvas.state.strokeWidth,seed:ea,preserveVertices:!0};qa=this.rc.getDefaultOptions();ea.stroke=da?this.canvas.state.strokeColor===
+mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;da=null;(ea.filled=fa)?(ea.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,da=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):ea.fill="";ea.bowing=mxUtils.getValue(this.shape.style,"bowing",qa.bowing);ea.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",qa.hachureAngle);ea.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",
+qa.curveFitting);ea.roughness=mxUtils.getValue(this.shape.style,"jiggle",qa.roughness);ea.simplification=mxUtils.getValue(this.shape.style,"simplification",qa.simplification);ea.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",qa.disableMultiStroke);ea.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",qa.disableMultiStrokeFill);fa=mxUtils.getValue(this.shape.style,"hachureGap",-1);ea.hachureGap="auto"==fa?-1:fa;ea.dashGap=mxUtils.getValue(this.shape.style,
+"dashGap",fa);ea.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",fa);ea.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",fa);fa=mxUtils.getValue(this.shape.style,"fillWeight",-1);ea.fillWeight="auto"==fa?-1:fa;fa=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==fa&&(fa=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),fa=null!=ea.fill&&(null!=da||null!=fa&&ea.fill==fa)?"solid":
+qa.fillStyle);ea.fillStyle=fa;return ea};u.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};u.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};u.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var da=2;da<arguments.length;da+=2)this.lastX=arguments[da-1],this.lastY=arguments[da],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};
+u.prototype.lineTo=function(da,fa){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,da,fa),this.lastX=da,this.lastY=fa)};u.prototype.moveTo=function(da,fa){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,da,fa),this.lastX=da,this.lastY=fa,this.firstX=da,this.firstY=fa)};u.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};u.prototype.quadTo=function(da,
+fa,ea,qa){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,da,fa,ea,qa),this.lastX=ea,this.lastY=qa)};u.prototype.curveTo=function(da,fa,ea,qa,va,ua){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,da,fa,ea,qa,va,ua),this.lastX=va,this.lastY=ua)};u.prototype.arcTo=function(da,fa,ea,qa,va,ua,Aa){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var za=mxUtils.arcToCurves(this.lastX,this.lastY,
+da,fa,ea,qa,va,ua,Aa);if(null!=za)for(var Ca=0;Ca<za.length;Ca+=6)this.curveTo(za[Ca],za[Ca+1],za[Ca+2],za[Ca+3],za[Ca+4],za[Ca+5]);this.lastX=ua;this.lastY=Aa}};u.prototype.rect=function(da,fa,ea,qa){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(da,fa,ea,qa,this.getStyle(!0,!0)))};u.prototype.ellipse=function(da,fa,ea,qa){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(da+
+ea/2,fa+qa/2,ea,qa,this.getStyle(!0,!0)))};u.prototype.roundrect=function(da,fa,ea,qa,va,ua){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(da+va,fa),this.lineTo(da+ea-va,fa),this.quadTo(da+ea,fa,da+ea,fa+ua),this.lineTo(da+ea,fa+qa-ua),this.quadTo(da+ea,fa+qa,da+ea-va,fa+qa),this.lineTo(da+va,fa+qa),this.quadTo(da,fa+qa,da,fa+qa-ua),this.lineTo(da,fa+ua),this.quadTo(da,fa,da+va,fa))};u.prototype.drawPath=function(da){if(0<this.path.length){this.passThrough=
+!0;try{this.rc.path(this.path.join(" "),da)}catch(ea){}this.passThrough=!1}else if(null!=this.nextShape){for(var fa in da)this.nextShape.options[fa]=da[fa];da.stroke!=mxConstants.NONE&&null!=da.stroke||delete this.nextShape.options.stroke;da.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};u.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};u.prototype.fill=
function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};u.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};u.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(ca){return new u(ca,Editor.createRoughCanvas(ca),this)};var H=mxShape.prototype.createHandJiggle;
-mxShape.prototype.createHandJiggle=function(ca){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?H.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(ca):this.createRoughCanvas(ca)};var P=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(ca,ea,fa,ra,ua){null!=ca.handJiggle&&ca.handJiggle.passThrough||P.apply(this,arguments)};var S=mxShape.prototype.paint;mxShape.prototype.paint=
-function(ca){var ea=ca.addTolerance,fa=!0;null!=this.style&&(fa="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=ca.handJiggle&&ca.handJiggle.constructor==u&&!this.outline){ca.save();var ra=this.fill,ua=this.stroke;this.stroke=this.fill=null;var sa=this.configurePointerEvents,Aa=ca.setStrokeColor;ca.setStrokeColor=function(){};var Ca=ca.setFillColor;ca.setFillColor=function(){};fa||null==ra||(this.configurePointerEvents=function(){});ca.handJiggle.passThrough=!0;S.apply(this,
-arguments);ca.handJiggle.passThrough=!1;ca.setFillColor=Ca;ca.setStrokeColor=Aa;this.configurePointerEvents=sa;this.stroke=ua;this.fill=ra;ca.restore();fa&&null!=ra&&(ca.addTolerance=function(){})}S.apply(this,arguments);ca.addTolerance=ea};var R=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(ca,ea,fa,ra,ua,sa){null!=ca.handJiggle&&ca.handJiggle.constructor==u?(ca.handJiggle.passThrough=!0,R.apply(this,arguments),ca.handJiggle.passThrough=!1):R.apply(this,arguments)}})();
-Editor.fastCompress=function(u){return null==u||0==u.length||"undefined"===typeof pako?u:Graph.arrayBufferToString(pako.deflateRaw(u))};Editor.fastDecompress=function(u){return null==u||0==u.length||"undefined"===typeof pako?u:pako.inflateRaw(Graph.stringToArrayBuffer(atob(u)),{to:"string"})};Editor.extractGraphModel=function(u,H,P){if(null!=u&&"undefined"!==typeof pako){var S=u.ownerDocument.getElementsByTagName("div"),R=[];if(null!=S&&0<S.length)for(var ca=0;ca<S.length;ca++)if("mxgraph"==S[ca].getAttribute("class")){R.push(S[ca]);
-break}0<R.length&&(S=R[0].getAttribute("data-mxgraph"),null!=S?(R=JSON.parse(S),null!=R&&null!=R.xml&&(u=mxUtils.parseXml(R.xml),u=u.documentElement)):(R=R[0].getElementsByTagName("div"),0<R.length&&(S=mxUtils.getTextContent(R[0]),S=Graph.decompress(S,null,P),0<S.length&&(u=mxUtils.parseXml(S),u=u.documentElement))))}if(null!=u&&"svg"==u.nodeName)if(S=u.getAttribute("content"),null!=S&&"<"!=S.charAt(0)&&"%"!=S.charAt(0)&&(S=unescape(window.atob?atob(S):Base64.decode(cont,S))),null!=S&&"%"==S.charAt(0)&&
-(S=decodeURIComponent(S)),null!=S&&0<S.length)u=mxUtils.parseXml(S).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==u||H||(R=null,"diagram"==u.nodeName?R=u:"mxfile"==u.nodeName&&(S=u.getElementsByTagName("diagram"),0<S.length&&(R=S[Math.max(0,Math.min(S.length-1,urlParams.page||0))])),null!=R&&(u=Editor.parseDiagramNode(R,P)));null==u||"mxGraphModel"==u.nodeName||H&&"mxfile"==u.nodeName||(u=null);return u};Editor.parseDiagramNode=function(u,H){var P=mxUtils.trim(mxUtils.getTextContent(u)),
-S=null;0<P.length?(u=Graph.decompress(P,null,H),null!=u&&0<u.length&&(S=mxUtils.parseXml(u).documentElement)):(u=mxUtils.getChildNodes(u),0<u.length&&(S=mxUtils.createXmlDocument(),S.appendChild(S.importNode(u[0],!0)),S=S.documentElement));return S};Editor.getDiagramNodeXml=function(u){var H=mxUtils.getTextContent(u),P=null;0<H.length?P=Graph.decompress(H):null!=u.firstChild&&(P=mxUtils.getXml(u.firstChild));return P};Editor.extractGraphModelFromPdf=function(u){u=u.substring(u.indexOf(",")+1);u=window.atob&&
-!mxClient.IS_SF?atob(u):Base64.decode(u,!0);if("%PDF-1.7"==u.substring(0,8)){var H=u.indexOf("EmbeddedFile");if(-1<H){var P=u.indexOf("stream",H)+9;if(0<u.substring(H,P).indexOf("application#2Fvnd.jgraph.mxfile"))return H=u.indexOf("endstream",P-1),pako.inflateRaw(Graph.stringToArrayBuffer(u.substring(P,H)),{to:"string"})}return null}P=null;H="";for(var S=0,R=0,ca=[],ea=null;R<u.length;){var fa=u.charCodeAt(R);R+=1;10!=fa&&(H+=String.fromCharCode(fa));fa=="/Subject (%3Cmxfile".charCodeAt(S)?S++:S=
-0;if(19==S){var ra=u.indexOf("%3C%2Fmxfile%3E)",R)+15;R-=9;if(ra>R){P=u.substring(R,ra);break}}10==fa&&("endobj"==H?ea=null:"obj"==H.substring(H.length-3,H.length)||"xref"==H||"trailer"==H?(ea=[],ca[H.split(" ")[0]]=ea):null!=ea&&ea.push(H),H="")}null==P&&(P=Editor.extractGraphModelFromXref(ca));null!=P&&(P=decodeURIComponent(P.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return P};Editor.extractGraphModelFromXref=function(u){var H=u.trailer,P=null;null!=H&&(H=/.* \/Info (\d+) (\d+) R/g.exec(H.join("\n")),
+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(da){return new u(da,Editor.createRoughCanvas(da),this)};var H=mxShape.prototype.createHandJiggle;
+mxShape.prototype.createHandJiggle=function(da){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?H.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(da):this.createRoughCanvas(da)};var P=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(da,fa,ea,qa,va){null!=da.handJiggle&&da.handJiggle.passThrough||P.apply(this,arguments)};var W=mxShape.prototype.paint;mxShape.prototype.paint=
+function(da){var fa=da.addTolerance,ea=!0;null!=this.style&&(ea="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=da.handJiggle&&da.handJiggle.constructor==u&&!this.outline){da.save();var qa=this.fill,va=this.stroke;this.stroke=this.fill=null;var ua=this.configurePointerEvents,Aa=da.setStrokeColor;da.setStrokeColor=function(){};var za=da.setFillColor;da.setFillColor=function(){};ea||null==qa||(this.configurePointerEvents=function(){});da.handJiggle.passThrough=!0;W.apply(this,
+arguments);da.handJiggle.passThrough=!1;da.setFillColor=za;da.setStrokeColor=Aa;this.configurePointerEvents=ua;this.stroke=va;this.fill=qa;da.restore();ea&&null!=qa&&(da.addTolerance=function(){})}W.apply(this,arguments);da.addTolerance=fa};var R=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(da,fa,ea,qa,va,ua){null!=da.handJiggle&&da.handJiggle.constructor==u?(da.handJiggle.passThrough=!0,R.apply(this,arguments),da.handJiggle.passThrough=!1):R.apply(this,arguments)}})();
+Editor.fastCompress=function(u){return null==u||0==u.length||"undefined"===typeof pako?u:Graph.arrayBufferToString(pako.deflateRaw(u))};Editor.fastDecompress=function(u){return null==u||0==u.length||"undefined"===typeof pako?u:pako.inflateRaw(Graph.stringToArrayBuffer(atob(u)),{to:"string"})};Editor.extractGraphModel=function(u,H,P){if(null!=u&&"undefined"!==typeof pako){var W=u.ownerDocument.getElementsByTagName("div"),R=[];if(null!=W&&0<W.length)for(var da=0;da<W.length;da++)if("mxgraph"==W[da].getAttribute("class")){R.push(W[da]);
+break}0<R.length&&(W=R[0].getAttribute("data-mxgraph"),null!=W?(R=JSON.parse(W),null!=R&&null!=R.xml&&(u=mxUtils.parseXml(R.xml),u=u.documentElement)):(R=R[0].getElementsByTagName("div"),0<R.length&&(W=mxUtils.getTextContent(R[0]),W=Graph.decompress(W,null,P),0<W.length&&(u=mxUtils.parseXml(W),u=u.documentElement))))}if(null!=u&&"svg"==u.nodeName)if(W=u.getAttribute("content"),null!=W&&"<"!=W.charAt(0)&&"%"!=W.charAt(0)&&(W=unescape(window.atob?atob(W):Base64.decode(cont,W))),null!=W&&"%"==W.charAt(0)&&
+(W=decodeURIComponent(W)),null!=W&&0<W.length)u=mxUtils.parseXml(W).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==u||H||(R=null,"diagram"==u.nodeName?R=u:"mxfile"==u.nodeName&&(W=u.getElementsByTagName("diagram"),0<W.length&&(R=W[Math.max(0,Math.min(W.length-1,urlParams.page||0))])),null!=R&&(u=Editor.parseDiagramNode(R,P)));null==u||"mxGraphModel"==u.nodeName||H&&"mxfile"==u.nodeName||(u=null);return u};Editor.parseDiagramNode=function(u,H){var P=mxUtils.trim(mxUtils.getTextContent(u)),
+W=null;0<P.length?(u=Graph.decompress(P,null,H),null!=u&&0<u.length&&(W=mxUtils.parseXml(u).documentElement)):(u=mxUtils.getChildNodes(u),0<u.length&&(W=mxUtils.createXmlDocument(),W.appendChild(W.importNode(u[0],!0)),W=W.documentElement));return W};Editor.getDiagramNodeXml=function(u){var H=mxUtils.getTextContent(u),P=null;0<H.length?P=Graph.decompress(H):null!=u.firstChild&&(P=mxUtils.getXml(u.firstChild));return P};Editor.extractGraphModelFromPdf=function(u){u=u.substring(u.indexOf(",")+1);u=window.atob&&
+!mxClient.IS_SF?atob(u):Base64.decode(u,!0);if("%PDF-1.7"==u.substring(0,8)){var H=u.indexOf("EmbeddedFile");if(-1<H){var P=u.indexOf("stream",H)+9;if(0<u.substring(H,P).indexOf("application#2Fvnd.jgraph.mxfile"))return H=u.indexOf("endstream",P-1),pako.inflateRaw(Graph.stringToArrayBuffer(u.substring(P,H)),{to:"string"})}return null}P=null;H="";for(var W=0,R=0,da=[],fa=null;R<u.length;){var ea=u.charCodeAt(R);R+=1;10!=ea&&(H+=String.fromCharCode(ea));ea=="/Subject (%3Cmxfile".charCodeAt(W)?W++:W=
+0;if(19==W){var qa=u.indexOf("%3C%2Fmxfile%3E)",R)+15;R-=9;if(qa>R){P=u.substring(R,qa);break}}10==ea&&("endobj"==H?fa=null:"obj"==H.substring(H.length-3,H.length)||"xref"==H||"trailer"==H?(fa=[],da[H.split(" ")[0]]=fa):null!=fa&&fa.push(H),H="")}null==P&&(P=Editor.extractGraphModelFromXref(da));null!=P&&(P=decodeURIComponent(P.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return P};Editor.extractGraphModelFromXref=function(u){var H=u.trailer,P=null;null!=H&&(H=/.* \/Info (\d+) (\d+) R/g.exec(H.join("\n")),
null!=H&&0<H.length&&(H=u[H[1]],null!=H&&(H=/.* \/Subject (\d+) (\d+) R/g.exec(H.join("\n")),null!=H&&0<H.length&&(u=u[H[1]],null!=u&&(u=u.join("\n"),P=u.substring(1,u.length-1))))));return P};Editor.extractParserError=function(u,H){var P=null;u=null!=u?u.getElementsByTagName("parsererror"):null;null!=u&&0<u.length&&(P=H||mxResources.get("invalidChars"),H=u[0].getElementsByTagName("div"),0<H.length&&(P=mxUtils.getTextContent(H[0])));return null!=P?mxUtils.trim(P):P};Editor.addRetryToError=function(u,
H){null!=u&&(u=null!=u.error?u.error:u,null==u.retry&&(u.retry=H))};Editor.configure=function(u,H){if(null!=u){Editor.config=u;Editor.configVersion=u.version;Menus.prototype.defaultFonts=u.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=u.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=u.defaultColors||ColorDialog.prototype.defaultColors;ColorDialog.prototype.colorNames=u.colorNames||ColorDialog.prototype.colorNames;StyleFormatPanel.prototype.defaultColorSchemes=
u.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=u.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=u.autosaveDelay||DrawioFile.prototype.autosaveDelay;u.debug&&(urlParams.test="1");null!=u.templateFile&&(EditorUi.templateFile=u.templateFile);null!=u.styles&&(Array.isArray(u.styles)?Editor.styles=u.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=u.globalVars&&(Editor.globalVars=
u.globalVars);null!=u.compressXml&&(Editor.compressXml=u.compressXml);null!=u.includeDiagram&&(Editor.defaultIncludeDiagram=u.includeDiagram);null!=u.simpleLabels&&(Editor.simpleLabels=u.simpleLabels);null!=u.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=u.oneDriveInlinePicker);null!=u.darkColor&&(Editor.darkColor=u.darkColor);null!=u.lightColor&&(Editor.lightColor=u.lightColor);null!=u.settingsName&&(Editor.configurationKey="."+u.settingsName+"-configuration",Editor.settingsKey="."+u.settingsName+
"-config",mxSettings.key=Editor.settingsKey);u.customFonts&&(Menus.prototype.defaultFonts=u.customFonts.concat(Menus.prototype.defaultFonts));u.customPresetColors&&(ColorDialog.prototype.presetColors=u.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=u.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=u.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=u.css){var P=document.createElement("style");P.setAttribute("type","text/css");
-P.appendChild(document.createTextNode(u.css));var S=document.getElementsByTagName("script")[0];S.parentNode.insertBefore(P,S)}null!=u.libraries&&(Sidebar.prototype.customEntries=u.libraries);null!=u.enabledLibraries&&(Array.isArray(u.enabledLibraries)?Sidebar.prototype.enabledLibraries=u.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=u.defaultLibraries&&(Sidebar.prototype.defaultEntries=u.defaultLibraries);null!=u.defaultCustomLibraries&&(Editor.defaultCustomLibraries=
+P.appendChild(document.createTextNode(u.css));var W=document.getElementsByTagName("script")[0];W.parentNode.insertBefore(P,W)}null!=u.libraries&&(Sidebar.prototype.customEntries=u.libraries);null!=u.enabledLibraries&&(Array.isArray(u.enabledLibraries)?Sidebar.prototype.enabledLibraries=u.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=u.defaultLibraries&&(Sidebar.prototype.defaultEntries=u.defaultLibraries);null!=u.defaultCustomLibraries&&(Editor.defaultCustomLibraries=
u.defaultCustomLibraries);null!=u.enableCustomLibraries&&(Editor.enableCustomLibraries=u.enableCustomLibraries);null!=u.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=u.defaultVertexStyle);null!=u.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=u.defaultEdgeStyle);null!=u.defaultPageVisible&&(Graph.prototype.defaultPageVisible=u.defaultPageVisible);null!=u.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=u.defaultGridEnabled);null!=u.zoomWheel&&(Graph.zoomWheel=u.zoomWheel);null!=
-u.zoomFactor&&(P=parseFloat(u.zoomFactor),!isNaN(P)&&1<P?Graph.prototype.zoomFactor=P:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=u.gridSteps&&(P=parseInt(u.gridSteps),!isNaN(P)&&0<P?mxGraphView.prototype.gridSteps=P:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));null!=u.pageFormat&&(P=parseInt(u.pageFormat.width),S=parseInt(u.pageFormat.height),!isNaN(P)&&0<P&&!isNaN(S)&&0<S?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,P,S),
+u.zoomFactor&&(P=parseFloat(u.zoomFactor),!isNaN(P)&&1<P?Graph.prototype.zoomFactor=P:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=u.gridSteps&&(P=parseInt(u.gridSteps),!isNaN(P)&&0<P?mxGraphView.prototype.gridSteps=P:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));null!=u.pageFormat&&(P=parseInt(u.pageFormat.width),W=parseInt(u.pageFormat.height),!isNaN(P)&&0<P&&!isNaN(W)&&0<W?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,P,W),
mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));u.thumbWidth&&(Sidebar.prototype.thumbWidth=u.thumbWidth);u.thumbHeight&&(Sidebar.prototype.thumbHeight=u.thumbHeight);u.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=u.emptyLibraryXml);u.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=u.emptyDiagramXml);u.sidebarWidth&&(EditorUi.prototype.hsplitPosition=u.sidebarWidth);u.sidebarTitles&&
(Sidebar.prototype.sidebarTitles=u.sidebarTitles);u.sidebarTitleSize&&(P=parseInt(u.sidebarTitleSize),!isNaN(P)&&0<P?Sidebar.prototype.sidebarTitleSize=P:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));u.fontCss&&("string"===typeof u.fontCss?Editor.configureFontCss(u.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));null!=u.autosaveDelay&&(P=parseInt(u.autosaveDelay),!isNaN(P)&&0<P?DrawioFile.prototype.autosaveDelay=P:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));
if(null!=u.plugins&&!H)for(App.initPluginCallback(),H=0;H<u.plugins.length;H++)mxscript(u.plugins[H]);null!=u.maxImageBytes&&(EditorUi.prototype.maxImageBytes=u.maxImageBytes);null!=u.maxImageSize&&(EditorUi.prototype.maxImageSize=u.maxImageSize);null!=u.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=u.shareCursorPosition);null!=u.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=u.showRemoteCursors)}};Editor.configureFontCss=function(u){if(null!=u){Editor.prototype.fontCss=u;
-var H=document.getElementsByTagName("script")[0];if(null!=H&&null!=H.parentNode){var P=document.createElement("style");P.setAttribute("type","text/css");P.appendChild(document.createTextNode(u));H.parentNode.insertBefore(P,H);u=u.split("url(");for(P=1;P<u.length;P++){var S=u[P].indexOf(")");S=Editor.trimCssUrl(u[P].substring(0,S));var R=document.createElement("link");R.setAttribute("rel","preload");R.setAttribute("href",S);R.setAttribute("as","font");R.setAttribute("crossorigin","");H.parentNode.insertBefore(R,
+var H=document.getElementsByTagName("script")[0];if(null!=H&&null!=H.parentNode){var P=document.createElement("style");P.setAttribute("type","text/css");P.appendChild(document.createTextNode(u));H.parentNode.insertBefore(P,H);u=u.split("url(");for(P=1;P<u.length;P++){var W=u[P].indexOf(")");W=Editor.trimCssUrl(u[P].substring(0,W));var R=document.createElement("link");R.setAttribute("rel","preload");R.setAttribute("href",W);R.setAttribute("as","font");R.setAttribute("crossorigin","");H.parentNode.insertBefore(R,
H)}}}};Editor.trimCssUrl=function(u){return u.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(u){u=null!=u?u:Editor.GUID_LENGTH;for(var H=[],P=0;P<u;P++)H.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return H.join("")};Editor.prototype.timeout=
25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(u){u=null!=u&&"mxlibrary"!=u.nodeName?this.extractGraphModel(u):null;if(null!=u){var H=Editor.extractParserError(u,mxResources.get("invalidOrMissingFile"));if(H)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[u],"cause",[H]),Error(mxResources.get("notADiagramFile")+
-" ("+H+")");if("mxGraphModel"==u.nodeName){H=u.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=H&&""!=H)H!=this.graph.currentStyle&&(P=null!=this.graph.themes?this.graph.themes[H]:mxUtils.load(STYLE_PATH+"/"+H+".xml").getDocumentElement(),null!=P&&(S=new mxCodec(P.ownerDocument),S.decode(P,this.graph.getStylesheet())));else{var P=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=P){var S=new mxCodec(P.ownerDocument);
-S.decode(P,this.graph.getStylesheet())}}this.graph.currentStyle=H;this.graph.mathEnabled="1"==urlParams.math||"1"==u.getAttribute("math");H=u.getAttribute("backgroundImage");null!=H?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(H)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==u.getAttribute("shadow"),!1);if(H=u.getAttribute("extFonts"))try{for(H=
+" ("+H+")");if("mxGraphModel"==u.nodeName){H=u.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=H&&""!=H)H!=this.graph.currentStyle&&(P=null!=this.graph.themes?this.graph.themes[H]:mxUtils.load(STYLE_PATH+"/"+H+".xml").getDocumentElement(),null!=P&&(W=new mxCodec(P.ownerDocument),W.decode(P,this.graph.getStylesheet())));else{var P=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=P){var W=new mxCodec(P.ownerDocument);
+W.decode(P,this.graph.getStylesheet())}}this.graph.currentStyle=H;this.graph.mathEnabled="1"==urlParams.math||"1"==u.getAttribute("math");H=u.getAttribute("backgroundImage");null!=H?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(H)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==u.getAttribute("shadow"),!1);if(H=u.getAttribute("extFonts"))try{for(H=
H.split("|").map(function(R){R=R.split("^");return{name:R[0],url:R[1]}}),P=0;P<H.length;P++)this.graph.addExtFont(H[P].name,H[P].url)}catch(R){console.log("ExtFonts format error: "+R.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var e=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(u,H){u=null!=
-u?u:!0;var P=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&P.setAttribute("style",this.graph.currentStyle);var S=this.graph.getBackgroundImageObject(this.graph.backgroundImage,H);null!=S&&P.setAttribute("backgroundImage",JSON.stringify(S));P.setAttribute("math",this.graph.mathEnabled?"1":"0");P.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(S=this.graph.extFonts.map(function(R){return R.name+
-"^"+R.url}),P.setAttribute("extFonts",S.join("|")));return P};Editor.prototype.isDataSvg=function(u){try{var H=mxUtils.parseXml(u).documentElement.getAttribute("content");if(null!=H&&(null!=H&&"<"!=H.charAt(0)&&"%"!=H.charAt(0)&&(H=unescape(window.atob?atob(H):Base64.decode(cont,H))),null!=H&&"%"==H.charAt(0)&&(H=decodeURIComponent(H)),null!=H&&0<H.length)){var P=mxUtils.parseXml(H).documentElement;return"mxfile"==P.nodeName||"mxGraphModel"==P.nodeName}}catch(S){}return!1};Editor.prototype.extractGraphModel=
+u?u:!0;var P=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&P.setAttribute("style",this.graph.currentStyle);var W=this.graph.getBackgroundImageObject(this.graph.backgroundImage,H);null!=W&&P.setAttribute("backgroundImage",JSON.stringify(W));P.setAttribute("math",this.graph.mathEnabled?"1":"0");P.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(W=this.graph.extFonts.map(function(R){return R.name+
+"^"+R.url}),P.setAttribute("extFonts",W.join("|")));return P};Editor.prototype.isDataSvg=function(u){try{var H=mxUtils.parseXml(u).documentElement.getAttribute("content");if(null!=H&&(null!=H&&"<"!=H.charAt(0)&&"%"!=H.charAt(0)&&(H=unescape(window.atob?atob(H):Base64.decode(cont,H))),null!=H&&"%"==H.charAt(0)&&(H=decodeURIComponent(H)),null!=H&&0<H.length)){var P=mxUtils.parseXml(H).documentElement;return"mxfile"==P.nodeName||"mxGraphModel"==P.nodeName}}catch(W){}return!1};Editor.prototype.extractGraphModel=
function(u,H,P){return Editor.extractGraphModel.apply(this,arguments)};var k=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();k.apply(this,arguments)};var n=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){n.apply(this,
-arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(u,H){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){u=null!=u?u:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(R){try{MathJax.typesetClear([R]),MathJax.typeset([R]),Editor.onMathJaxDone()}catch(ca){MathJax.typesetClear([R]),null!=ca.retry?ca.retry.then(function(){MathJax.typesetPromise([R]).then(Editor.onMathJaxDone)}):
-null!=window.console&&console.log("Error in MathJax: "+ca.toString())}};window.MathJax=null!=H?H:{loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath"]},startup:{pageReady:function(){for(var R=0;R<Editor.mathJaxQueue.length;R++)Editor.doMathJaxRender(Editor.mathJaxQueue[R])}}};Editor.MathJaxRender=function(R){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(R):Editor.mathJaxQueue.push(R)};Editor.MathJaxClear=
-function(){Editor.mathJaxQueue=[]};Editor.onMathJaxDone=function(){};var P=Editor.prototype.init;Editor.prototype.init=function(){P.apply(this,arguments);var R=mxUtils.bind(this,function(ca,ea){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,R);this.graph.addListener(mxEvent.REFRESH,R)};H=document.getElementsByTagName("script");if(null!=H&&0<H.length){var S=document.createElement("script");
-S.setAttribute("type","text/javascript");S.setAttribute("src",u);H[0].parentNode.appendChild(S)}}};Editor.prototype.csvToArray=function(u){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(u))return null;var H=[];u.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,
-function(P,S,R,ca){void 0!==S?H.push(S.replace(/\\'/g,"'")):void 0!==R?H.push(R.replace(/\\"/g,'"')):void 0!==ca&&H.push(ca);return""});/,\s*$/.test(u)&&H.push("");return H};Editor.prototype.isCorsEnabledForUrl=function(u){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||u.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(u)||
-"https://raw.githubusercontent.com/"===u.substring(0,34)||"https://fonts.googleapis.com/"===u.substring(0,29)||"https://fonts.gstatic.com/"===u.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var u=new mxUrlConverter;u.updateBaseUrl();var H=u.convert,P=this;u.convert=function(S){if(null!=S){var R="http://"==S.substring(0,7)||"https://"==S.substring(0,8);R&&!navigator.onLine?S=Editor.svgBrokenImage.src:!R||S.substring(0,u.baseUrl.length)==u.baseUrl||P.crossOriginImages&&P.isCorsEnabledForUrl(S)?
-"chrome-extension://"==S.substring(0,19)||mxClient.IS_CHROMEAPP||(S=H.apply(this,arguments)):S=PROXY_URL+"?url="+encodeURIComponent(S)}return S};return u};Editor.createSvgDataUri=function(u){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(u)))};Editor.prototype.convertImageToDataUri=function(u,H){try{var P=!0,S=window.setTimeout(mxUtils.bind(this,function(){P=!1;H(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(u))mxUtils.get(u,mxUtils.bind(this,function(ca){window.clearTimeout(S);
-P&&H(Editor.createSvgDataUri(ca.getText()))}),function(){window.clearTimeout(S);P&&H(Editor.svgBrokenImage.src)});else{var R=new Image;this.crossOriginImages&&(R.crossOrigin="anonymous");R.onload=function(){window.clearTimeout(S);if(P)try{var ca=document.createElement("canvas"),ea=ca.getContext("2d");ca.height=R.height;ca.width=R.width;ea.drawImage(R,0,0);H(ca.toDataURL())}catch(fa){H(Editor.svgBrokenImage.src)}};R.onerror=function(){window.clearTimeout(S);P&&H(Editor.svgBrokenImage.src)};R.src=u}}catch(ca){H(Editor.svgBrokenImage.src)}};
-Editor.prototype.convertImages=function(u,H,P,S){null==S&&(S=this.createImageUrlConverter());var R=0,ca=P||{};P=mxUtils.bind(this,function(ea,fa){ea=u.getElementsByTagName(ea);for(var ra=0;ra<ea.length;ra++)mxUtils.bind(this,function(ua){try{if(null!=ua){var sa=S.convert(ua.getAttribute(fa));if(null!=sa&&"data:"!=sa.substring(0,5)){var Aa=ca[sa];null==Aa?(R++,this.convertImageToDataUri(sa,function(Ca){null!=Ca&&(ca[sa]=Ca,ua.setAttribute(fa,Ca));R--;0==R&&H(u)})):ua.setAttribute(fa,Aa)}else null!=
-sa&&ua.setAttribute(fa,sa)}}catch(Ca){}})(ea[ra])});P("image","xlink:href");P("img","src");0==R&&H(u)};Editor.base64Encode=function(u){for(var H="",P=0,S=u.length,R,ca,ea;P<S;){R=u.charCodeAt(P++)&255;if(P==S){H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R>>2);H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&3)<<4);H+="==";break}ca=u.charCodeAt(P++);if(P==S){H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R>>
-2);H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&3)<<4|(ca&240)>>4);H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((ca&15)<<2);H+="=";break}ea=u.charCodeAt(P++);H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R>>2);H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&3)<<4|(ca&240)>>4);H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((ca&15)<<2|(ea&192)>>
-6);H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(ea&63)}return H};Editor.prototype.loadUrl=function(u,H,P,S,R,ca,ea,fa){try{var ra=!ea&&(S||/(\.png)($|\?)/i.test(u)||/(\.jpe?g)($|\?)/i.test(u)||/(\.gif)($|\?)/i.test(u)||/(\.pdf)($|\?)/i.test(u));R=null!=R?R:!0;var ua=mxUtils.bind(this,function(){mxUtils.get(u,mxUtils.bind(this,function(sa){if(200<=sa.getStatus()&&299>=sa.getStatus()){if(null!=H){var Aa=sa.getText();if(ra){if((9==document.documentMode||10==document.documentMode)&&
-"undefined"!==typeof window.mxUtilsBinaryToArray){sa=mxUtilsBinaryToArray(sa.request.responseBody).toArray();Aa=Array(sa.length);for(var Ca=0;Ca<sa.length;Ca++)Aa[Ca]=String.fromCharCode(sa[Ca]);Aa=Aa.join("")}ca=null!=ca?ca:"data:image/png;base64,";Aa=ca+Editor.base64Encode(Aa)}H(Aa)}}else null!=P&&(0==sa.getStatus()?P({message:mxResources.get("accessDenied")},sa):P({message:mxResources.get("error")+" "+sa.getStatus()},sa))}),function(sa){null!=P&&P({message:mxResources.get("error")+" "+sa.getStatus()})},
-ra,this.timeout,function(){R&&null!=P&&P({code:App.ERROR_TIMEOUT,retry:ua})},fa)});ua()}catch(sa){null!=P&&P(sa)}};Editor.prototype.absoluteCssFonts=function(u){var H=null;if(null!=u){var P=u.split("url(");if(0<P.length){H=[P[0]];u=window.location.pathname;var S=null!=u?u.lastIndexOf("/"):-1;0<=S&&(u=u.substring(0,S+1));S=document.getElementsByTagName("base");var R=null;null!=S&&0<S.length&&(R=S[0].getAttribute("href"));for(var ca=1;ca<P.length;ca++)if(S=P[ca].indexOf(")"),0<S){var ea=Editor.trimCssUrl(P[ca].substring(0,
-S));this.graph.isRelativeUrl(ea)&&(ea=null!=R?R+ea:window.location.protocol+"//"+window.location.hostname+("/"==ea.charAt(0)?"":u)+ea);H.push('url("'+ea+'"'+P[ca].substring(S))}else H.push(P[ca])}else H=[u]}return null!=H?H.join(""):null};Editor.prototype.mapFontUrl=function(u,H,P){/^https?:\/\//.test(H)&&!this.isCorsEnabledForUrl(H)&&(H=PROXY_URL+"?url="+encodeURIComponent(H));P(u,H)};Editor.prototype.embedCssFonts=function(u,H){var P=u.split("url("),S=0;null==this.cachedFonts&&(this.cachedFonts=
-{});var R=mxUtils.bind(this,function(){if(0==S){for(var ra=[P[0]],ua=1;ua<P.length;ua++){var sa=P[ua].indexOf(")");ra.push('url("');ra.push(this.cachedFonts[Editor.trimCssUrl(P[ua].substring(0,sa))]);ra.push('"'+P[ua].substring(sa))}H(ra.join(""))}});if(0<P.length){for(u=1;u<P.length;u++){var ca=P[u].indexOf(")"),ea=null,fa=P[u].indexOf("format(",ca);0<fa&&(ea=Editor.trimCssUrl(P[u].substring(fa+7,P[u].indexOf(")",fa))));mxUtils.bind(this,function(ra){if(null==this.cachedFonts[ra]){this.cachedFonts[ra]=
-ra;S++;var ua="application/x-font-ttf";if("svg"==ea||/(\.svg)($|\?)/i.test(ra))ua="image/svg+xml";else if("otf"==ea||"embedded-opentype"==ea||/(\.otf)($|\?)/i.test(ra))ua="application/x-font-opentype";else if("woff"==ea||/(\.woff)($|\?)/i.test(ra))ua="application/font-woff";else if("woff2"==ea||/(\.woff2)($|\?)/i.test(ra))ua="application/font-woff2";else if("eot"==ea||/(\.eot)($|\?)/i.test(ra))ua="application/vnd.ms-fontobject";else if("sfnt"==ea||/(\.sfnt)($|\?)/i.test(ra))ua="application/font-sfnt";
-this.mapFontUrl(ua,ra,mxUtils.bind(this,function(sa,Aa){this.loadUrl(Aa,mxUtils.bind(this,function(Ca){this.cachedFonts[ra]=Ca;S--;R()}),mxUtils.bind(this,function(Ca){S--;R()}),!0,null,"data:"+sa+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(P[u].substring(0,ca)),ea)}R()}else H(u)};Editor.prototype.loadFonts=function(u){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(H){this.resolvedFontCss=H;null!=u&&u()})):null!=u&&u()};Editor.prototype.createGoogleFontCache=
-function(){var u={},H;for(H in Graph.fontMapping)Graph.isCssFontUrl(H)&&(u[H]=Graph.fontMapping[H]);return u};Editor.prototype.embedExtFonts=function(u){var H=this.graph.getCustomFonts();if(0<H.length){var P=[],S=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var R=mxUtils.bind(this,function(){0==S&&this.embedCssFonts(P.join(""),u)}),ca=0;ca<H.length;ca++)mxUtils.bind(this,function(ea,fa){Graph.isCssFontUrl(fa)?null==this.cachedGoogleFonts[fa]?(S++,this.loadUrl(fa,
-mxUtils.bind(this,function(ra){this.cachedGoogleFonts[fa]=ra;P.push(ra+"\n");S--;R()}),mxUtils.bind(this,function(ra){S--;P.push("@import url("+fa+");\n");R()}))):P.push(this.cachedGoogleFonts[fa]+"\n"):P.push('@font-face {font-family: "'+ea+'";src: url("'+fa+'")}\n')})(H[ca].name,H[ca].url);R()}else u()};Editor.prototype.addMathCss=function(u){u=u.getElementsByTagName("defs");if(null!=u&&0<u.length)for(var H=document.getElementsByTagName("style"),P=0;P<H.length;P++){var S=mxUtils.getTextContent(H[P]);
-0>S.indexOf("mxPageSelector")&&0<S.indexOf("MathJax")&&u[0].appendChild(H[P].cloneNode(!0))}};Editor.prototype.addFontCss=function(u,H){H=null!=H?H:this.absoluteCssFonts(this.fontCss);if(null!=H){var P=u.getElementsByTagName("defs"),S=u.ownerDocument;0==P.length?(P=null!=S.createElementNS?S.createElementNS(mxConstants.NS_SVG,"defs"):S.createElement("defs"),null!=u.firstChild?u.insertBefore(P,u.firstChild):u.appendChild(P)):P=P[0];u=null!=S.createElementNS?S.createElementNS(mxConstants.NS_SVG,"style"):
-S.createElement("style");u.setAttribute("type","text/css");mxUtils.setTextContent(u,H);P.appendChild(u)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(u,H,P){var S=mxClient.IS_FF?8192:16384;return Math.min(P,Math.min(S/u,S/H))};Editor.prototype.exportToCanvas=function(u,H,P,S,R,ca,ea,fa,ra,ua,sa,Aa,Ca,Ba,ta,Pa,Ta,Oa){try{ca=null!=ca?ca:!0;ea=null!=ea?ea:!0;Aa=null!=Aa?Aa:this.graph;Ca=null!=Ca?Ca:0;
-var Xa=ra?null:Aa.background;Xa==mxConstants.NONE&&(Xa=null);null==Xa&&(Xa=S);null==Xa&&0==ra&&(Xa=Pa?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(Aa.getSvg(null,null,Ca,Ba,null,ea,null,null,null,ua,null,Pa,Ta,Oa),mxUtils.bind(this,function(Ga){try{var eb=new Image;eb.onload=mxUtils.bind(this,function(){try{var z=function(){mxClient.IS_SF?window.setTimeout(function(){V.drawImage(eb,0,0);u(K,Ga)},0):(V.drawImage(eb,0,0),u(K,Ga))},K=document.createElement("canvas"),M=parseInt(Ga.getAttribute("width")),
-T=parseInt(Ga.getAttribute("height"));fa=null!=fa?fa:1;null!=H&&(fa=ca?Math.min(1,Math.min(3*H/(4*T),H/M)):H/M);fa=this.getMaxCanvasScale(M,T,fa);M=Math.ceil(fa*M);T=Math.ceil(fa*T);K.setAttribute("width",M);K.setAttribute("height",T);var V=K.getContext("2d");null!=Xa&&(V.beginPath(),V.rect(0,0,M,T),V.fillStyle=Xa,V.fill());1!=fa&&V.scale(fa,fa);if(ta){var ia=Aa.view,na=ia.scale;ia.scale=1;var va=btoa(unescape(encodeURIComponent(ia.createSvgGrid(ia.gridColor))));ia.scale=na;va="data:image/svg+xml;base64,"+
-va;var pa=Aa.gridSize*ia.gridSteps*fa,za=Aa.getGraphBounds(),Da=ia.translate.x*na,Ma=ia.translate.y*na,La=Da+(za.x-Da)/na-Ca,Ua=Ma+(za.y-Ma)/na-Ca,Sa=new Image;Sa.onload=function(){try{for(var Fa=-Math.round(pa-mxUtils.mod((Da-La)*fa,pa)),wa=-Math.round(pa-mxUtils.mod((Ma-Ua)*fa,pa));Fa<M;Fa+=pa)for(var ya=wa;ya<T;ya+=pa)V.drawImage(Sa,Fa/fa,ya/fa);z()}catch(Na){null!=R&&R(Na)}};Sa.onerror=function(Fa){null!=R&&R(Fa)};Sa.src=va}else z()}catch(Fa){null!=R&&R(Fa)}});eb.onerror=function(z){null!=R&&
-R(z)};ua&&this.graph.addSvgShadow(Ga);this.graph.mathEnabled&&this.addMathCss(Ga);var bb=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(Ga,this.resolvedFontCss),eb.src=Editor.createSvgDataUri(mxUtils.getXml(Ga))}catch(z){null!=R&&R(z)}});this.embedExtFonts(mxUtils.bind(this,function(z){try{null!=z&&this.addFontCss(Ga,z),this.loadFonts(bb)}catch(K){null!=R&&R(K)}}))}catch(z){null!=R&&R(z)}}),P,sa)}catch(Ga){null!=R&&R(Ga)}};Editor.crcTable=[];for(var D=0;256>D;D++)for(var t=
-D,E=0;8>E;E++)t=1==(t&1)?3988292384^t>>>1:t>>>1,Editor.crcTable[D]=t;Editor.updateCRC=function(u,H,P,S){for(var R=0;R<S;R++)u=Editor.crcTable[(u^H.charCodeAt(P+R))&255]^u>>>8;return u};Editor.crc32=function(u){for(var H=-1,P=0;P<u.length;P++)H=H>>>8^Editor.crcTable[(H^u.charCodeAt(P))&255];return(H^-1)>>>0};Editor.writeGraphModelToPng=function(u,H,P,S,R){function ca(sa,Aa){var Ca=ra;ra+=Aa;return sa.substring(Ca,ra)}function ea(sa){sa=ca(sa,4);return sa.charCodeAt(3)+(sa.charCodeAt(2)<<8)+(sa.charCodeAt(1)<<
-16)+(sa.charCodeAt(0)<<24)}function fa(sa){return String.fromCharCode(sa>>24&255,sa>>16&255,sa>>8&255,sa&255)}u=u.substring(u.indexOf(",")+1);u=window.atob?atob(u):Base64.decode(u,!0);var ra=0;if(ca(u,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=R&&R();else if(ca(u,4),"IHDR"!=ca(u,4))null!=R&&R();else{ca(u,17);R=u.substring(0,ra);do{var ua=ea(u);if("IDAT"==ca(u,4)){R=u.substring(0,ra-8);"pHYs"==H&&"dpi"==P?(P=Math.round(S/.0254),P=fa(P)+fa(P)+String.fromCharCode(1)):P=
-P+String.fromCharCode(0)+("zTXt"==H?String.fromCharCode(0):"")+S;S=4294967295;S=Editor.updateCRC(S,H,0,4);S=Editor.updateCRC(S,P,0,P.length);R+=fa(P.length)+H+P+fa(S^4294967295);R+=u.substring(ra-8,u.length);break}R+=u.substring(ra-8,ra-4+ua);ca(u,ua);ca(u,4)}while(ua);return"data:image/png;base64,"+(window.btoa?btoa(R):Base64.encode(R,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var d=ColorDialog.addRecentColor;ColorDialog.addRecentColor=
-function(u,H){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(u,H){var P=null;null!=u.editor.graph.getModel().getParent(H)?P=H.getId():null!=u.currentPage&&(P=u.currentPage.getId());return P});if(null!=window.StyleFormatPanel){var g=
-Format.prototype.init;Format.prototype.init=function(){g.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var 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 u=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=u&&u.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=
-function(u){return!1};var q=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(u){u=q.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var H=this.editorUi,P=H.editor.graph,S=this.createOption(mxResources.get("shadow"),function(){return P.shadowVisible},function(R){var ca=new ChangePageSetup(H);ca.ignoreColor=!0;ca.ignoreImage=!0;ca.shadowVisible=R;P.model.execute(ca)},{install:function(R){this.listener=function(){R(P.shadowVisible)};
-H.addListener("shadowVisibleChanged",this.listener)},destroy:function(){H.removeListener(this.listener)}});Editor.enableShadowOption||(S.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(S,60));u.appendChild(S)}return u};var y=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(u){u=y.apply(this,arguments);var H=this.editorUi,P=H.editor.graph;if(P.isEnabled()){var S=H.getCurrentFile();if(null!=S&&S.isAutosaveOptional()){var R=
-this.createOption(mxResources.get("autosave"),function(){return H.editor.autosave},function(ea){H.editor.setAutosave(ea);H.editor.autosave&&S.isModified()&&S.fileChanged()},{install:function(ea){this.listener=function(){ea(H.editor.autosave)};H.editor.addListener("autosaveChanged",this.listener)},destroy:function(){H.editor.removeListener(this.listener)}});u.appendChild(R)}}if(this.isMathOptionVisible()&&P.isEnabled()&&"undefined"!==typeof MathJax){R=this.createOption(mxResources.get("mathematicalTypesetting"),
-function(){return P.mathEnabled},function(ea){H.actions.get("mathematicalTypesetting").funct()},{install:function(ea){this.listener=function(){ea(P.mathEnabled)};H.addListener("mathEnabledChanged",this.listener)},destroy:function(){H.removeListener(this.listener)}});R.style.paddingTop="5px";u.appendChild(R);var ca=H.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");ca.style.position="relative";ca.style.marginLeft="6px";ca.style.top="2px";R.appendChild(ca)}return u};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=
-[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",
-dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",
-type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",
-dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",defVal:.3,min:0,max:1}];mxCellRenderer.defaultShapes.internalStorage.prototype.customProperties=
-[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"dx",dispName:"Left Line",type:"float",min:0,defVal:20},{name:"dy",dispName:"Top Line",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.cube.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0},{name:"darkOpacity2",dispName:"Dark Opacity 2",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.step.prototype.customProperties=
-[{name:"size",dispName:"Notch Size",type:"float",min:0,defVal:20},{name:"fixedSize",dispName:"Fixed Size",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.trapezoid.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.tape.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.4}];mxCellRenderer.defaultShapes.note.prototype.customProperties=
-[{name:"size",dispName:"Fold Size",type:"float",min:0,defVal:30},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.card.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Cutoff Size",type:"float",min:0,defVal:30}];mxCellRenderer.defaultShapes.callout.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
-{name:"base",dispName:"Callout Width",type:"float",min:0,defVal:20},{name:"size",dispName:"Callout Length",type:"float",min:0,defVal:30},{name:"position",dispName:"Callout Position",type:"float",min:0,max:1,defVal:.5},{name:"position2",dispName:"Callout Tip Position",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.folder.prototype.customProperties=[{name:"tabWidth",dispName:"Tab Width",type:"float"},{name:"tabHeight",dispName:"Tab Height",type:"float"},{name:"tabPosition",dispName:"Tap Position",
-type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"right",dispName:"Right"}]}];mxCellRenderer.defaultShapes.swimlane.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"startSize",dispName:"Header Size",type:"float"},{name:"swimlaneHead",dispName:"Head Border",type:"bool",defVal:!0},{name:"swimlaneBody",dispName:"Body Border",type:"bool",defVal:!0},{name:"horizontal",dispName:"Horizontal",type:"bool",defVal:!0},{name:"separatorColor",dispName:"Separator Color",
-type:"color",defVal:null}];mxCellRenderer.defaultShapes.table.prototype.customProperties=[{name:"rowLines",dispName:"Row Lines",type:"bool",defVal:!0},{name:"columnLines",dispName:"Column Lines",type:"bool",defVal:!0},{name:"fixedRows",dispName:"Fixed Rows",type:"bool",defVal:!1},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",defVal:!1},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",defVal:!1}].concat(mxCellRenderer.defaultShapes.swimlane.prototype.customProperties).concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);
-mxCellRenderer.defaultShapes.tableRow.prototype.customProperties=mxCellRenderer.defaultShapes.swimlane.prototype.customProperties.concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);mxCellRenderer.defaultShapes.doubleEllipse.prototype.customProperties=[{name:"margin",dispName:"Indent",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.ext.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"double",dispName:"Double",
-type:"bool",defVal:!1},{name:"margin",dispName:"Indent",type:"float",min:0,defVal:0}];mxCellRenderer.defaultShapes.curlyBracket.prototype.customProperties=[{name:"rounded",dispName:"Rounded",type:"bool",defVal:!0},{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.image.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.label.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",
-type:"bool",defVal:!0},{name:"imageAlign",dispName:"Image Align",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"center",dispName:"Center"},{val:"right",dispName:"Right"}],defVal:"left"},{name:"imageVerticalAlign",dispName:"Image Vertical Align",type:"enum",enumList:[{val:"top",dispName:"Top"},{val:"middle",dispName:"Middle"},{val:"bottom",dispName:"Bottom"}],defVal:"middle"},{name:"imageWidth",dispName:"Image Width",type:"float",min:0,defVal:24},{name:"imageHeight",dispName:"Image Height",
-type:"float",min:0,defVal:24},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:12},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.dataStorage.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.1}];mxCellRenderer.defaultShapes.manualInput.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:30},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.loopLimit.prototype.customProperties=
-[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.offPageConnector.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:38},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.display.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.singleArrow.prototype.customProperties=
-[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.doubleArrow.prototype.customProperties=[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.cross.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,
-max:1,defVal:.2}];mxCellRenderer.defaultShapes.corner.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.tee.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.umlLifeline.prototype.customProperties=[{name:"participant",dispName:"Participant",type:"enum",
-defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName:"Actor"},{val:"umlBoundary",dispName:"Boundary"},{val:"umlEntity",dispName:"Entity"},{val:"umlControl",dispName:"Control"}]},{name:"size",dispName:"Height",type:"float",defVal:40,min:0}];mxCellRenderer.defaultShapes.umlFrame.prototype.customProperties=[{name:"width",dispName:"Title Width",type:"float",defVal:60,min:0},{name:"height",dispName:"Title Height",type:"float",defVal:30,min:0}];StyleFormatPanel.prototype.defaultColorSchemes=
-[[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",font:"#333333"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[{fill:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",
-stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",
-font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},
-{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=
-function(u,H,P){if(null!=H){var S=function(ca){if(null!=ca)if(P)for(var ea=0;ea<ca.length;ea++)H[ca[ea].name]=ca[ea];else for(var fa in H){var ra=!1;for(ea=0;ea<ca.length;ea++)if(ca[ea].name==fa&&ca[ea].type==H[fa].type){ra=!0;break}ra||delete H[fa]}},R=this.editorUi.editor.graph.view.getState(u);null!=R&&null!=R.shape&&(R.shape.commonCustomPropAdded||(R.shape.commonCustomPropAdded=!0,R.shape.customProperties=R.shape.customProperties||[],R.cell.vertex?Array.prototype.push.apply(R.shape.customProperties,
-Editor.commonVertexProperties):Array.prototype.push.apply(R.shape.customProperties,Editor.commonEdgeProperties)),S(R.shape.customProperties));u=u.getAttribute("customProperties");if(null!=u)try{S(JSON.parse(u))}catch(ca){}}};var F=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var u=this.editorUi.getSelectionState();"image"!=u.style.shape&&!u.containsLabel&&0<u.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));F.apply(this,arguments);if(Editor.enableCustomProperties){for(var H=
-{},P=u.vertices,S=u.edges,R=0;R<P.length;R++)this.findCommonProperties(P[R],H,0==R);for(R=0;R<S.length;R++)this.findCommonProperties(S[R],H,0==P.length&&0==R);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(H).length&&this.container.appendChild(this.addProperties(this.createPanel(),H,u))}};var C=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(u){this.addActions(u,["copyStyle","pasteStyle"]);return C.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=
-!0;StyleFormatPanel.prototype.addProperties=function(u,H,P){function S(V,ia,na,va){Aa.getModel().beginUpdate();try{var pa=[],za=[];if(null!=na.index){for(var Da=[],Ma=na.parentRow.nextSibling;Ma&&Ma.getAttribute("data-pName")==V;)Da.push(Ma.getAttribute("data-pValue")),Ma=Ma.nextSibling;na.index<Da.length?null!=va?Da.splice(va,1):Da[na.index]=ia:Da.push(ia);null!=na.size&&Da.length>na.size&&(Da=Da.slice(0,na.size));ia=Da.join(",");null!=na.countProperty&&(Aa.setCellStyles(na.countProperty,Da.length,
-Aa.getSelectionCells()),pa.push(na.countProperty),za.push(Da.length))}Aa.setCellStyles(V,ia,Aa.getSelectionCells());pa.push(V);za.push(ia);if(null!=na.dependentProps)for(V=0;V<na.dependentProps.length;V++){var La=na.dependentPropsDefVal[V],Ua=na.dependentPropsVals[V];if(Ua.length>ia)Ua=Ua.slice(0,ia);else for(var Sa=Ua.length;Sa<ia;Sa++)Ua.push(La);Ua=Ua.join(",");Aa.setCellStyles(na.dependentProps[V],Ua,Aa.getSelectionCells());pa.push(na.dependentProps[V]);za.push(Ua)}if("function"==typeof na.onChange)na.onChange(Aa,
-ia);sa.editorUi.fireEvent(new mxEventObject("styleChanged","keys",pa,"values",za,"cells",Aa.getSelectionCells()))}finally{Aa.getModel().endUpdate()}}function R(V,ia,na){var va=mxUtils.getOffset(u,!0),pa=mxUtils.getOffset(V,!0);ia.style.position="absolute";ia.style.left=pa.x-va.x+"px";ia.style.top=pa.y-va.y+"px";ia.style.width=V.offsetWidth+"px";ia.style.height=V.offsetHeight-(na?4:0)+"px";ia.style.zIndex=5}function ca(V,ia,na){var va=document.createElement("div");va.style.width="32px";va.style.height=
-"4px";va.style.margin="2px";va.style.border="1px solid black";va.style.background=ia&&"none"!=ia?ia:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(sa,function(pa){this.editorUi.pickColor(ia,function(za){va.style.background="none"==za?"url('"+Dialog.prototype.noColorImage+"')":za;S(V,za,na)});mxEvent.consume(pa)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(va);return btn}function ea(V,ia,na,va,pa,za,Da){null!=ia&&(ia=ia.split(","),
-Ca.push({name:V,values:ia,type:na,defVal:va,countProperty:pa,parentRow:za,isDeletable:!0,flipBkg:Da}));btn=mxUtils.button("+",mxUtils.bind(sa,function(Ma){for(var La=za,Ua=0;null!=La.nextSibling;)if(La.nextSibling.getAttribute("data-pName")==V)La=La.nextSibling,Ua++;else break;var Sa={type:na,parentRow:za,index:Ua,isDeletable:!0,defVal:va,countProperty:pa};Ua=ua(V,"",Sa,0==Ua%2,Da);S(V,va,Sa);La.parentNode.insertBefore(Ua,La.nextSibling);mxEvent.consume(Ma)}));btn.style.height="16px";btn.style.width=
-"25px";btn.className="geColorBtn";return btn}function fa(V,ia,na,va,pa,za,Da){if(0<pa){var Ma=Array(pa);ia=null!=ia?ia.split(","):[];for(var La=0;La<pa;La++)Ma[La]=null!=ia[La]?ia[La]:null!=va?va:"";Ca.push({name:V,values:Ma,type:na,defVal:va,parentRow:za,flipBkg:Da,size:pa})}return document.createElement("div")}function ra(V,ia,na){var va=document.createElement("input");va.type="checkbox";va.checked="1"==ia;mxEvent.addListener(va,"change",function(){S(V,va.checked?"1":"0",na)});return va}function ua(V,
-ia,na,va,pa){var za=na.dispName,Da=na.type,Ma=document.createElement("tr");Ma.className="gePropRow"+(pa?"Dark":"")+(va?"Alt":"")+" gePropNonHeaderRow";Ma.setAttribute("data-pName",V);Ma.setAttribute("data-pValue",ia);va=!1;null!=na.index&&(Ma.setAttribute("data-index",na.index),za=(null!=za?za:"")+"["+na.index+"]",va=!0);var La=document.createElement("td");La.className="gePropRowCell";za=mxResources.get(za,null,za);mxUtils.write(La,za);La.setAttribute("title",za);va&&(La.style.textAlign="right");
-Ma.appendChild(La);La=document.createElement("td");La.className="gePropRowCell";if("color"==Da)La.appendChild(ca(V,ia,na));else if("bool"==Da||"boolean"==Da)La.appendChild(ra(V,ia,na));else if("enum"==Da){var Ua=na.enumList;for(pa=0;pa<Ua.length;pa++)if(za=Ua[pa],za.val==ia){mxUtils.write(La,mxResources.get(za.dispName,null,za.dispName));break}mxEvent.addListener(La,"click",mxUtils.bind(sa,function(){var Sa=document.createElement("select");R(La,Sa);for(var Fa=0;Fa<Ua.length;Fa++){var wa=Ua[Fa],ya=
-document.createElement("option");ya.value=mxUtils.htmlEntities(wa.val);mxUtils.write(ya,mxResources.get(wa.dispName,null,wa.dispName));Sa.appendChild(ya)}Sa.value=ia;u.appendChild(Sa);mxEvent.addListener(Sa,"change",function(){var Na=mxUtils.htmlEntities(Sa.value);S(V,Na,na)});Sa.focus();mxEvent.addListener(Sa,"blur",function(){u.removeChild(Sa)})}))}else"dynamicArr"==Da?La.appendChild(ea(V,ia,na.subType,na.subDefVal,na.countProperty,Ma,pa)):"staticArr"==Da?La.appendChild(fa(V,ia,na.subType,na.subDefVal,
-na.size,Ma,pa)):"readOnly"==Da?(pa=document.createElement("input"),pa.setAttribute("readonly",""),pa.value=ia,pa.style.width="96px",pa.style.borderWidth="0px",La.appendChild(pa)):(La.innerHTML=mxUtils.htmlEntities(decodeURIComponent(ia)),mxEvent.addListener(La,"click",mxUtils.bind(sa,function(){function Sa(){var wa=Fa.value;wa=0==wa.length&&"string"!=Da?0:wa;na.allowAuto&&(null!=wa.trim&&"auto"==wa.trim().toLowerCase()?(wa="auto",Da="string"):(wa=parseFloat(wa),wa=isNaN(wa)?0:wa));null!=na.min&&wa<
-na.min?wa=na.min:null!=na.max&&wa>na.max&&(wa=na.max);wa=encodeURIComponent(("int"==Da?parseInt(wa):wa)+"");S(V,wa,na)}var Fa=document.createElement("input");R(La,Fa,!0);Fa.value=decodeURIComponent(ia);Fa.className="gePropEditor";"int"!=Da&&"float"!=Da||na.allowAuto||(Fa.type="number",Fa.step="int"==Da?"1":"any",null!=na.min&&(Fa.min=parseFloat(na.min)),null!=na.max&&(Fa.max=parseFloat(na.max)));u.appendChild(Fa);mxEvent.addListener(Fa,"keypress",function(wa){13==wa.keyCode&&Sa()});Fa.focus();mxEvent.addListener(Fa,
-"blur",function(){Sa()})})));na.isDeletable&&(pa=mxUtils.button("-",mxUtils.bind(sa,function(Sa){S(V,"",na,na.index);mxEvent.consume(Sa)})),pa.style.height="16px",pa.style.width="25px",pa.style.float="right",pa.className="geColorBtn",La.appendChild(pa));Ma.appendChild(La);return Ma}var sa=this,Aa=this.editorUi.editor.graph,Ca=[];u.style.position="relative";u.style.padding="0";var Ba=document.createElement("table");Ba.className="geProperties";Ba.style.whiteSpace="nowrap";Ba.style.width="100%";var ta=
-document.createElement("tr");ta.className="gePropHeader";var Pa=document.createElement("th");Pa.className="gePropHeaderCell";var Ta=document.createElement("img");Ta.src=Sidebar.prototype.expandedImage;Ta.style.verticalAlign="middle";Pa.appendChild(Ta);mxUtils.write(Pa,mxResources.get("property"));ta.style.cursor="pointer";var Oa=function(){var V=Ba.querySelectorAll(".gePropNonHeaderRow");if(sa.editorUi.propertiesCollapsed){Ta.src=Sidebar.prototype.collapsedImage;var ia="none";for(var na=u.childNodes.length-
-1;0<=na;na--)try{var va=u.childNodes[na],pa=va.nodeName.toUpperCase();"INPUT"!=pa&&"SELECT"!=pa||u.removeChild(va)}catch(za){}}else Ta.src=Sidebar.prototype.expandedImage,ia="";for(na=0;na<V.length;na++)V[na].style.display=ia};mxEvent.addListener(ta,"click",function(){sa.editorUi.propertiesCollapsed=!sa.editorUi.propertiesCollapsed;Oa()});ta.appendChild(Pa);Pa=document.createElement("th");Pa.className="gePropHeaderCell";Pa.innerHTML=mxResources.get("value");ta.appendChild(Pa);Ba.appendChild(ta);var Xa=
-!1,Ga=!1;ta=null;1==P.vertices.length&&0==P.edges.length?ta=P.vertices[0].id:0==P.vertices.length&&1==P.edges.length&&(ta=P.edges[0].id);null!=ta&&Ba.appendChild(ua("id",mxUtils.htmlEntities(ta),{dispName:"ID",type:"readOnly"},!0,!1));for(var eb in H)if(ta=H[eb],"function"!=typeof ta.isVisible||ta.isVisible(P,this)){var bb=null!=P.style[eb]?mxUtils.htmlEntities(P.style[eb]+""):null!=ta.getDefaultValue?ta.getDefaultValue(P,this):ta.defVal;if("separator"==ta.type)Ga=!Ga;else{if("staticArr"==ta.type)ta.size=
-parseInt(P.style[ta.sizeProperty]||H[ta.sizeProperty].defVal)||0;else if(null!=ta.dependentProps){var z=ta.dependentProps,K=[],M=[];for(Pa=0;Pa<z.length;Pa++){var T=P.style[z[Pa]];M.push(H[z[Pa]].subDefVal);K.push(null!=T?T.split(","):[])}ta.dependentPropsDefVal=M;ta.dependentPropsVals=K}Ba.appendChild(ua(eb,bb,ta,Xa,Ga));Xa=!Xa}}for(Pa=0;Pa<Ca.length;Pa++)for(ta=Ca[Pa],H=ta.parentRow,P=0;P<ta.values.length;P++)eb=ua(ta.name,ta.values[P],{type:ta.type,parentRow:ta.parentRow,isDeletable:ta.isDeletable,
-index:P,defVal:ta.defVal,countProperty:ta.countProperty,size:ta.size},0==P%2,ta.flipBkg),H.parentNode.insertBefore(eb,H.nextSibling),H=eb;u.appendChild(Ba);Oa();return u};StyleFormatPanel.prototype.addStyles=function(u){function H(ta){mxEvent.addListener(ta,"mouseenter",function(){ta.style.opacity="1"});mxEvent.addListener(ta,"mouseleave",function(){ta.style.opacity="0.5"})}var P=this.editorUi,S=P.editor.graph,R=document.createElement("div");R.style.whiteSpace="nowrap";R.style.paddingLeft="24px";
-R.style.paddingRight="20px";u.style.paddingLeft="16px";u.style.paddingBottom="6px";u.style.position="relative";u.appendChild(R);var ca="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(" "),ea=document.createElement("div");ea.style.whiteSpace="nowrap";ea.style.position="relative";ea.style.textAlign="center";ea.style.width="210px";for(var fa=[],ra=0;ra<this.defaultColorSchemes.length;ra++){var ua=
-document.createElement("div");ua.style.display="inline-block";ua.style.width="6px";ua.style.height="6px";ua.style.marginLeft="4px";ua.style.marginRight="3px";ua.style.borderRadius="3px";ua.style.cursor="pointer";ua.style.background="transparent";ua.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(ta){mxEvent.addListener(ua,"click",mxUtils.bind(this,function(){sa(ta)}))})(ra);fa.push(ua);ea.appendChild(ua)}var sa=mxUtils.bind(this,function(ta){null!=fa[ta]&&(null!=this.format.currentScheme&&
-null!=fa[this.format.currentScheme]&&(fa[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=ta,Aa(this.defaultColorSchemes[this.format.currentScheme]),fa[this.format.currentScheme].style.background="#84d7ff")}),Aa=mxUtils.bind(this,function(ta){var Pa=mxUtils.bind(this,function(Oa){var Xa=mxUtils.button("",mxUtils.bind(this,function(bb){S.getModel().beginUpdate();try{for(var z=P.getSelectionState().cells,K=0;K<z.length;K++){for(var M=S.getModel().getStyle(z[K]),T=
-0;T<ca.length;T++)M=mxUtils.removeStylename(M,ca[T]);var V=S.getModel().isVertex(z[K])?S.defaultVertexStyle:S.defaultEdgeStyle;null!=Oa?(mxEvent.isShiftDown(bb)||(M=""==Oa.fill?mxUtils.setStyle(M,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(M,mxConstants.STYLE_FILLCOLOR,Oa.fill||mxUtils.getValue(V,mxConstants.STYLE_FILLCOLOR,null)),M=mxUtils.setStyle(M,mxConstants.STYLE_GRADIENTCOLOR,Oa.gradient||mxUtils.getValue(V,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(bb)||mxClient.IS_MAC&&
-mxEvent.isMetaDown(bb)||!S.getModel().isVertex(z[K])||(M=mxUtils.setStyle(M,mxConstants.STYLE_FONTCOLOR,Oa.font||mxUtils.getValue(V,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(bb)||(M=""==Oa.stroke?mxUtils.setStyle(M,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(M,mxConstants.STYLE_STROKECOLOR,Oa.stroke||mxUtils.getValue(V,mxConstants.STYLE_STROKECOLOR,null)))):(M=mxUtils.setStyle(M,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(V,mxConstants.STYLE_FILLCOLOR,"#ffffff")),M=mxUtils.setStyle(M,
-mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(V,mxConstants.STYLE_STROKECOLOR,"#000000")),M=mxUtils.setStyle(M,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(V,mxConstants.STYLE_GRADIENTCOLOR,null)),S.getModel().isVertex(z[K])&&(M=mxUtils.setStyle(M,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(V,mxConstants.STYLE_FONTCOLOR,null))));S.getModel().setStyle(z[K],M)}}finally{S.getModel().endUpdate()}}));Xa.className="geStyleButton";Xa.style.width="36px";Xa.style.height=10>=this.defaultColorSchemes.length?
-"24px":"30px";Xa.style.margin="0px 6px 6px 0px";if(null!=Oa){var Ga="1"==urlParams.sketch?"2px solid":"1px solid";null!=Oa.gradient?mxClient.IS_IE&&10>document.documentMode?Xa.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+Oa.fill+"', EndColorStr='"+Oa.gradient+"', GradientType=0)":Xa.style.backgroundImage="linear-gradient("+Oa.fill+" 0px,"+Oa.gradient+" 100%)":Oa.fill==mxConstants.NONE?Xa.style.background="url('"+Dialog.prototype.noColorImage+"')":Xa.style.backgroundColor=
-""==Oa.fill?mxUtils.getValue(S.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):Oa.fill||mxUtils.getValue(S.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");Xa.style.border=Oa.stroke==mxConstants.NONE?Ga+" transparent":""==Oa.stroke?Ga+" "+mxUtils.getValue(S.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):Ga+" "+(Oa.stroke||mxUtils.getValue(S.defaultVertexStyle,
-mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=Oa.title&&Xa.setAttribute("title",Oa.title)}else{Ga=mxUtils.getValue(S.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var eb=mxUtils.getValue(S.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");Xa.style.backgroundColor=Ga;Xa.style.border="1px solid "+eb}Xa.style.borderRadius="0";R.appendChild(Xa)});R.innerText="";for(var Ta=0;Ta<ta.length;Ta++)0<Ta&&0==mxUtils.mod(Ta,4)&&mxUtils.br(R),Pa(ta[Ta])});
-null==this.format.currentScheme?sa(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):sa(this.format.currentScheme);ra=10>=this.defaultColorSchemes.length?28:8;var Ca=document.createElement("div");Ca.style.cssText="position:absolute;left:10px;top:8px;bottom:"+ra+"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(Ca,"click",mxUtils.bind(this,function(){sa(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var Ba=document.createElement("div");Ba.style.cssText="position:absolute;left:202px;top:8px;bottom:"+ra+"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&&(u.appendChild(Ca),u.appendChild(Ba));mxEvent.addListener(Ba,"click",mxUtils.bind(this,function(){sa(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));H(Ca);H(Ba);Aa(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&u.appendChild(ea);return u};StyleFormatPanel.prototype.addEditOps=function(u){var H=this.editorUi.getSelectionState(),P=this.editorUi.editor.graph,S=null;1==H.cells.length&&(S=mxUtils.button(mxResources.get("editStyle"),
-mxUtils.bind(this,function(R){this.editorUi.actions.get("editStyle").funct()})),S.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),S.style.width="210px",S.style.marginBottom="2px",u.appendChild(S));P=1==H.cells.length?P.view.getState(H.cells[0]):null;null!=P&&null!=P.shape&&null!=P.shape.stencil?(H=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(R){this.editorUi.actions.get("editShape").funct()})),H.setAttribute("title",
-mxResources.get("editShape")),H.style.marginBottom="2px",null==S?H.style.width="210px":(S.style.width="104px",H.style.width="104px",H.style.marginLeft="2px"),u.appendChild(H)):H.image&&0<H.cells.length&&(H=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(R){this.editorUi.actions.get("image").funct()})),H.setAttribute("title",mxResources.get("editImage")),H.style.marginBottom="2px",null==S?H.style.width="210px":(S.style.width="104px",H.style.width="104px",H.style.marginLeft="2px"),
+arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(u,H){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){u=null!=u?u:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(R){try{MathJax.typesetClear([R]),MathJax.typeset([R]),Editor.onMathJaxDone()}catch(da){MathJax.typesetClear([R]),null!=da.retry?da.retry.then(function(){MathJax.typesetPromise([R]).then(Editor.onMathJaxDone)}):
+null!=window.console&&console.log("Error in MathJax: "+da.toString())}};window.MathJax=null!=H?H:{loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath"]},startup:{pageReady:function(){for(var R=0;R<Editor.mathJaxQueue.length;R++)Editor.doMathJaxRender(Editor.mathJaxQueue[R])}}};Editor.MathJaxRender=function(R){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(R):Editor.mathJaxQueue.push(R)};Editor.MathJaxClear=
+function(){Editor.mathJaxQueue=[]};Editor.onMathJaxDone=function(){};var P=Editor.prototype.init;Editor.prototype.init=function(){P.apply(this,arguments);var R=mxUtils.bind(this,function(da,fa){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,R);this.graph.addListener(mxEvent.REFRESH,R)};H=document.getElementsByTagName("script");if(null!=H&&0<H.length){var W=document.createElement("script");
+W.setAttribute("type","text/javascript");W.setAttribute("src",u);H[0].parentNode.appendChild(W)}}};Editor.prototype.csvToArray=function(u){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(u))return null;var H=[];u.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,
+function(P,W,R,da){void 0!==W?H.push(W.replace(/\\'/g,"'")):void 0!==R?H.push(R.replace(/\\"/g,'"')):void 0!==da&&H.push(da);return""});/,\s*$/.test(u)&&H.push("");return H};Editor.prototype.isCorsEnabledForUrl=function(u){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||u.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(u)||
+"https://raw.githubusercontent.com/"===u.substring(0,34)||"https://fonts.googleapis.com/"===u.substring(0,29)||"https://fonts.gstatic.com/"===u.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var u=new mxUrlConverter;u.updateBaseUrl();var H=u.convert,P=this;u.convert=function(W){if(null!=W){var R="http://"==W.substring(0,7)||"https://"==W.substring(0,8);R&&!navigator.onLine?W=Editor.svgBrokenImage.src:!R||W.substring(0,u.baseUrl.length)==u.baseUrl||P.crossOriginImages&&P.isCorsEnabledForUrl(W)?
+"chrome-extension://"==W.substring(0,19)||mxClient.IS_CHROMEAPP||(W=H.apply(this,arguments)):W=PROXY_URL+"?url="+encodeURIComponent(W)}return W};return u};Editor.createSvgDataUri=function(u){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(u)))};Editor.prototype.convertImageToDataUri=function(u,H){try{var P=!0,W=window.setTimeout(mxUtils.bind(this,function(){P=!1;H(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(u))mxUtils.get(u,mxUtils.bind(this,function(da){window.clearTimeout(W);
+P&&H(Editor.createSvgDataUri(da.getText()))}),function(){window.clearTimeout(W);P&&H(Editor.svgBrokenImage.src)});else{var R=new Image;this.crossOriginImages&&(R.crossOrigin="anonymous");R.onload=function(){window.clearTimeout(W);if(P)try{var da=document.createElement("canvas"),fa=da.getContext("2d");da.height=R.height;da.width=R.width;fa.drawImage(R,0,0);H(da.toDataURL())}catch(ea){H(Editor.svgBrokenImage.src)}};R.onerror=function(){window.clearTimeout(W);P&&H(Editor.svgBrokenImage.src)};R.src=u}}catch(da){H(Editor.svgBrokenImage.src)}};
+Editor.prototype.convertImages=function(u,H,P,W){null==W&&(W=this.createImageUrlConverter());var R=0,da=P||{};P=mxUtils.bind(this,function(fa,ea){fa=u.getElementsByTagName(fa);for(var qa=0;qa<fa.length;qa++)mxUtils.bind(this,function(va){try{if(null!=va){var ua=W.convert(va.getAttribute(ea));if(null!=ua&&"data:"!=ua.substring(0,5)){var Aa=da[ua];null==Aa?(R++,this.convertImageToDataUri(ua,function(za){null!=za&&(da[ua]=za,va.setAttribute(ea,za));R--;0==R&&H(u)})):va.setAttribute(ea,Aa)}else null!=
+ua&&va.setAttribute(ea,ua)}}catch(za){}})(fa[qa])});P("image","xlink:href");P("img","src");0==R&&H(u)};Editor.base64Encode=function(u){for(var H="",P=0,W=u.length,R,da,fa;P<W;){R=u.charCodeAt(P++)&255;if(P==W){H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R>>2);H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&3)<<4);H+="==";break}da=u.charCodeAt(P++);if(P==W){H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R>>
+2);H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&3)<<4|(da&240)>>4);H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((da&15)<<2);H+="=";break}fa=u.charCodeAt(P++);H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R>>2);H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&3)<<4|(da&240)>>4);H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((da&15)<<2|(fa&192)>>
+6);H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(fa&63)}return H};Editor.prototype.loadUrl=function(u,H,P,W,R,da,fa,ea){try{var qa=!fa&&(W||/(\.png)($|\?)/i.test(u)||/(\.jpe?g)($|\?)/i.test(u)||/(\.gif)($|\?)/i.test(u)||/(\.pdf)($|\?)/i.test(u));R=null!=R?R:!0;var va=mxUtils.bind(this,function(){mxUtils.get(u,mxUtils.bind(this,function(ua){if(200<=ua.getStatus()&&299>=ua.getStatus()){if(null!=H){var Aa=ua.getText();if(qa){if((9==document.documentMode||10==document.documentMode)&&
+"undefined"!==typeof window.mxUtilsBinaryToArray){ua=mxUtilsBinaryToArray(ua.request.responseBody).toArray();Aa=Array(ua.length);for(var za=0;za<ua.length;za++)Aa[za]=String.fromCharCode(ua[za]);Aa=Aa.join("")}da=null!=da?da:"data:image/png;base64,";Aa=da+Editor.base64Encode(Aa)}H(Aa)}}else null!=P&&(0==ua.getStatus()?P({message:mxResources.get("accessDenied")},ua):404==ua.getStatus()?P({code:ua.getStatus()},ua):P({message:mxResources.get("error")+" "+ua.getStatus()},ua))}),function(ua){null!=P&&
+P({message:mxResources.get("error")+" "+ua.getStatus()})},qa,this.timeout,function(){R&&null!=P&&P({code:App.ERROR_TIMEOUT,retry:va})},ea)});va()}catch(ua){null!=P&&P(ua)}};Editor.prototype.absoluteCssFonts=function(u){var H=null;if(null!=u){var P=u.split("url(");if(0<P.length){H=[P[0]];u=window.location.pathname;var W=null!=u?u.lastIndexOf("/"):-1;0<=W&&(u=u.substring(0,W+1));W=document.getElementsByTagName("base");var R=null;null!=W&&0<W.length&&(R=W[0].getAttribute("href"));for(var da=1;da<P.length;da++)if(W=
+P[da].indexOf(")"),0<W){var fa=Editor.trimCssUrl(P[da].substring(0,W));this.graph.isRelativeUrl(fa)&&(fa=null!=R?R+fa:window.location.protocol+"//"+window.location.hostname+("/"==fa.charAt(0)?"":u)+fa);H.push('url("'+fa+'"'+P[da].substring(W))}else H.push(P[da])}else H=[u]}return null!=H?H.join(""):null};Editor.prototype.mapFontUrl=function(u,H,P){/^https?:\/\//.test(H)&&!this.isCorsEnabledForUrl(H)&&(H=PROXY_URL+"?url="+encodeURIComponent(H));P(u,H)};Editor.prototype.embedCssFonts=function(u,H){var P=
+u.split("url("),W=0;null==this.cachedFonts&&(this.cachedFonts={});var R=mxUtils.bind(this,function(){if(0==W){for(var qa=[P[0]],va=1;va<P.length;va++){var ua=P[va].indexOf(")");qa.push('url("');qa.push(this.cachedFonts[Editor.trimCssUrl(P[va].substring(0,ua))]);qa.push('"'+P[va].substring(ua))}H(qa.join(""))}});if(0<P.length){for(u=1;u<P.length;u++){var da=P[u].indexOf(")"),fa=null,ea=P[u].indexOf("format(",da);0<ea&&(fa=Editor.trimCssUrl(P[u].substring(ea+7,P[u].indexOf(")",ea))));mxUtils.bind(this,
+function(qa){if(null==this.cachedFonts[qa]){this.cachedFonts[qa]=qa;W++;var va="application/x-font-ttf";if("svg"==fa||/(\.svg)($|\?)/i.test(qa))va="image/svg+xml";else if("otf"==fa||"embedded-opentype"==fa||/(\.otf)($|\?)/i.test(qa))va="application/x-font-opentype";else if("woff"==fa||/(\.woff)($|\?)/i.test(qa))va="application/font-woff";else if("woff2"==fa||/(\.woff2)($|\?)/i.test(qa))va="application/font-woff2";else if("eot"==fa||/(\.eot)($|\?)/i.test(qa))va="application/vnd.ms-fontobject";else if("sfnt"==
+fa||/(\.sfnt)($|\?)/i.test(qa))va="application/font-sfnt";this.mapFontUrl(va,qa,mxUtils.bind(this,function(ua,Aa){this.loadUrl(Aa,mxUtils.bind(this,function(za){this.cachedFonts[qa]=za;W--;R()}),mxUtils.bind(this,function(za){W--;R()}),!0,null,"data:"+ua+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(P[u].substring(0,da)),fa)}R()}else H(u)};Editor.prototype.loadFonts=function(u){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(H){this.resolvedFontCss=
+H;null!=u&&u()})):null!=u&&u()};Editor.prototype.createGoogleFontCache=function(){var u={},H;for(H in Graph.fontMapping)Graph.isCssFontUrl(H)&&(u[H]=Graph.fontMapping[H]);return u};Editor.prototype.embedExtFonts=function(u){var H=this.graph.getCustomFonts();if(0<H.length){var P=[],W=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var R=mxUtils.bind(this,function(){0==W&&this.embedCssFonts(P.join(""),u)}),da=0;da<H.length;da++)mxUtils.bind(this,function(fa,
+ea){Graph.isCssFontUrl(ea)?null==this.cachedGoogleFonts[ea]?(W++,this.loadUrl(ea,mxUtils.bind(this,function(qa){this.cachedGoogleFonts[ea]=qa;P.push(qa+"\n");W--;R()}),mxUtils.bind(this,function(qa){W--;P.push("@import url("+ea+");\n");R()}))):P.push(this.cachedGoogleFonts[ea]+"\n"):P.push('@font-face {font-family: "'+fa+'";src: url("'+ea+'")}\n')})(H[da].name,H[da].url);R()}else u()};Editor.prototype.addMathCss=function(u){u=u.getElementsByTagName("defs");if(null!=u&&0<u.length)for(var H=document.getElementsByTagName("style"),
+P=0;P<H.length;P++){var W=mxUtils.getTextContent(H[P]);0>W.indexOf("mxPageSelector")&&0<W.indexOf("MathJax")&&u[0].appendChild(H[P].cloneNode(!0))}};Editor.prototype.addFontCss=function(u,H){H=null!=H?H:this.absoluteCssFonts(this.fontCss);if(null!=H){var P=u.getElementsByTagName("defs"),W=u.ownerDocument;0==P.length?(P=null!=W.createElementNS?W.createElementNS(mxConstants.NS_SVG,"defs"):W.createElement("defs"),null!=u.firstChild?u.insertBefore(P,u.firstChild):u.appendChild(P)):P=P[0];u=null!=W.createElementNS?
+W.createElementNS(mxConstants.NS_SVG,"style"):W.createElement("style");u.setAttribute("type","text/css");mxUtils.setTextContent(u,H);P.appendChild(u)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(u,H,P){var W=mxClient.IS_FF?8192:16384;return Math.min(P,Math.min(W/u,W/H))};Editor.prototype.exportToCanvas=function(u,H,P,W,R,da,fa,ea,qa,va,ua,Aa,za,Ca,sa,Va,Ua,Ra){try{da=null!=da?da:!0;fa=null!=fa?fa:
+!0;Aa=null!=Aa?Aa:this.graph;za=null!=za?za:0;var Za=qa?null:Aa.background;Za==mxConstants.NONE&&(Za=null);null==Za&&(Za=W);null==Za&&0==qa&&(Za=Va?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(Aa.getSvg(null,null,za,Ca,null,fa,null,null,null,va,null,Va,Ua,Ra),mxUtils.bind(this,function(Ha){try{var db=new Image;db.onload=mxUtils.bind(this,function(){try{var z=function(){mxClient.IS_SF?window.setTimeout(function(){V.drawImage(db,0,0);u(K,Ha)},0):(V.drawImage(db,0,0),u(K,Ha))},
+K=document.createElement("canvas"),L=parseInt(Ha.getAttribute("width")),S=parseInt(Ha.getAttribute("height"));ea=null!=ea?ea:1;null!=H&&(ea=da?Math.min(1,Math.min(3*H/(4*S),H/L)):H/L);ea=this.getMaxCanvasScale(L,S,ea);L=Math.ceil(ea*L);S=Math.ceil(ea*S);K.setAttribute("width",L);K.setAttribute("height",S);var V=K.getContext("2d");null!=Za&&(V.beginPath(),V.rect(0,0,L,S),V.fillStyle=Za,V.fill());1!=ea&&V.scale(ea,ea);if(sa){var ja=Aa.view,na=ja.scale;ja.scale=1;var ya=btoa(unescape(encodeURIComponent(ja.createSvgGrid(ja.gridColor))));
+ja.scale=na;ya="data:image/svg+xml;base64,"+ya;var ra=Aa.gridSize*ja.gridSteps*ea,ta=Aa.getGraphBounds(),Da=ja.translate.x*na,Oa=ja.translate.y*na,Ma=Da+(ta.x-Da)/na-za,Wa=Oa+(ta.y-Oa)/na-za,Sa=new Image;Sa.onload=function(){try{for(var Fa=-Math.round(ra-mxUtils.mod((Da-Ma)*ea,ra)),Ja=-Math.round(ra-mxUtils.mod((Oa-Wa)*ea,ra));Fa<L;Fa+=ra)for(var xa=Ja;xa<S;xa+=ra)V.drawImage(Sa,Fa/ea,xa/ea);z()}catch(Ba){null!=R&&R(Ba)}};Sa.onerror=function(Fa){null!=R&&R(Fa)};Sa.src=ya}else z()}catch(Fa){null!=
+R&&R(Fa)}});db.onerror=function(z){null!=R&&R(z)};va&&this.graph.addSvgShadow(Ha);this.graph.mathEnabled&&this.addMathCss(Ha);var cb=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(Ha,this.resolvedFontCss),db.src=Editor.createSvgDataUri(mxUtils.getXml(Ha))}catch(z){null!=R&&R(z)}});this.embedExtFonts(mxUtils.bind(this,function(z){try{null!=z&&this.addFontCss(Ha,z),this.loadFonts(cb)}catch(K){null!=R&&R(K)}}))}catch(z){null!=R&&R(z)}}),P,ua)}catch(Ha){null!=R&&R(Ha)}};
+Editor.crcTable=[];for(var D=0;256>D;D++)for(var t=D,E=0;8>E;E++)t=1==(t&1)?3988292384^t>>>1:t>>>1,Editor.crcTable[D]=t;Editor.updateCRC=function(u,H,P,W){for(var R=0;R<W;R++)u=Editor.crcTable[(u^H.charCodeAt(P+R))&255]^u>>>8;return u};Editor.crc32=function(u){for(var H=-1,P=0;P<u.length;P++)H=H>>>8^Editor.crcTable[(H^u.charCodeAt(P))&255];return(H^-1)>>>0};Editor.writeGraphModelToPng=function(u,H,P,W,R){function da(ua,Aa){var za=qa;qa+=Aa;return ua.substring(za,qa)}function fa(ua){ua=da(ua,4);return ua.charCodeAt(3)+
+(ua.charCodeAt(2)<<8)+(ua.charCodeAt(1)<<16)+(ua.charCodeAt(0)<<24)}function ea(ua){return String.fromCharCode(ua>>24&255,ua>>16&255,ua>>8&255,ua&255)}u=u.substring(u.indexOf(",")+1);u=window.atob?atob(u):Base64.decode(u,!0);var qa=0;if(da(u,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=R&&R();else if(da(u,4),"IHDR"!=da(u,4))null!=R&&R();else{da(u,17);R=u.substring(0,qa);do{var va=fa(u);if("IDAT"==da(u,4)){R=u.substring(0,qa-8);"pHYs"==H&&"dpi"==P?(P=Math.round(W/.0254),
+P=ea(P)+ea(P)+String.fromCharCode(1)):P=P+String.fromCharCode(0)+("zTXt"==H?String.fromCharCode(0):"")+W;W=4294967295;W=Editor.updateCRC(W,H,0,4);W=Editor.updateCRC(W,P,0,P.length);R+=ea(P.length)+H+P+ea(W^4294967295);R+=u.substring(qa-8,u.length);break}R+=u.substring(qa-8,qa-4+va);da(u,va);da(u,4)}while(va);return"data:image/png;base64,"+(window.btoa?btoa(R):Base64.encode(R,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var d=ColorDialog.addRecentColor;
+ColorDialog.addRecentColor=function(u,H){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(u,H){var P=null;null!=u.editor.graph.getModel().getParent(H)?P=H.getId():null!=u.currentPage&&(P=u.currentPage.getId());return P});
+if(null!=window.StyleFormatPanel){var g=Format.prototype.init;Format.prototype.init=function(){g.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var 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 u=this.editorUi.getCurrentFile();return"1"==urlParams.embed||
+null!=u&&u.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(u){return!1};var q=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(u){u=q.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var H=this.editorUi,P=H.editor.graph,W=this.createOption(mxResources.get("shadow"),function(){return P.shadowVisible},function(R){var da=new ChangePageSetup(H);da.ignoreColor=!0;da.ignoreImage=!0;da.shadowVisible=
+R;P.model.execute(da)},{install:function(R){this.listener=function(){R(P.shadowVisible)};H.addListener("shadowVisibleChanged",this.listener)},destroy:function(){H.removeListener(this.listener)}});Editor.enableShadowOption||(W.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(W,60));u.appendChild(W)}return u};var y=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(u){u=y.apply(this,arguments);var H=this.editorUi,P=H.editor.graph;
+if(P.isEnabled()){var W=H.getCurrentFile();if(null!=W&&W.isAutosaveOptional()){var R=this.createOption(mxResources.get("autosave"),function(){return H.editor.autosave},function(fa){H.editor.setAutosave(fa);H.editor.autosave&&W.isModified()&&W.fileChanged()},{install:function(fa){this.listener=function(){fa(H.editor.autosave)};H.editor.addListener("autosaveChanged",this.listener)},destroy:function(){H.editor.removeListener(this.listener)}});u.appendChild(R)}}if(this.isMathOptionVisible()&&P.isEnabled()&&
+"undefined"!==typeof MathJax){R=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return P.mathEnabled},function(fa){H.actions.get("mathematicalTypesetting").funct()},{install:function(fa){this.listener=function(){fa(P.mathEnabled)};H.addListener("mathEnabledChanged",this.listener)},destroy:function(){H.removeListener(this.listener)}});R.style.paddingTop="5px";u.appendChild(R);var da=H.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");da.style.position=
+"relative";da.style.marginLeft="6px";da.style.top="2px";R.appendChild(da)}return u};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=
+[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",
+dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
+{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties=
+[{name:"size",dispName:"Size",type:"float",defVal:.3,min:0,max:1}];mxCellRenderer.defaultShapes.internalStorage.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"dx",dispName:"Left Line",type:"float",min:0,defVal:20},{name:"dy",dispName:"Top Line",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.cube.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"darkOpacity",dispName:"Dark Opacity",
+type:"float",min:-1,max:1,defVal:0},{name:"darkOpacity2",dispName:"Dark Opacity 2",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.step.prototype.customProperties=[{name:"size",dispName:"Notch Size",type:"float",min:0,defVal:20},{name:"fixedSize",dispName:"Fixed Size",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.trapezoid.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",
+type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.tape.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.4}];mxCellRenderer.defaultShapes.note.prototype.customProperties=[{name:"size",dispName:"Fold Size",type:"float",min:0,defVal:30},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.card.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
+{name:"size",dispName:"Cutoff Size",type:"float",min:0,defVal:30}];mxCellRenderer.defaultShapes.callout.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"base",dispName:"Callout Width",type:"float",min:0,defVal:20},{name:"size",dispName:"Callout Length",type:"float",min:0,defVal:30},{name:"position",dispName:"Callout Position",type:"float",min:0,max:1,defVal:.5},{name:"position2",dispName:"Callout Tip Position",type:"float",
+min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.folder.prototype.customProperties=[{name:"tabWidth",dispName:"Tab Width",type:"float"},{name:"tabHeight",dispName:"Tab Height",type:"float"},{name:"tabPosition",dispName:"Tap Position",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"right",dispName:"Right"}]}];mxCellRenderer.defaultShapes.swimlane.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"startSize",dispName:"Header Size",type:"float"},
+{name:"swimlaneHead",dispName:"Head Border",type:"bool",defVal:!0},{name:"swimlaneBody",dispName:"Body Border",type:"bool",defVal:!0},{name:"horizontal",dispName:"Horizontal",type:"bool",defVal:!0},{name:"separatorColor",dispName:"Separator Color",type:"color",defVal:null}];mxCellRenderer.defaultShapes.table.prototype.customProperties=[{name:"rowLines",dispName:"Row Lines",type:"bool",defVal:!0},{name:"columnLines",dispName:"Column Lines",type:"bool",defVal:!0},{name:"fixedRows",dispName:"Fixed Rows",
+type:"bool",defVal:!1},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",defVal:!1},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",defVal:!1}].concat(mxCellRenderer.defaultShapes.swimlane.prototype.customProperties).concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);mxCellRenderer.defaultShapes.tableRow.prototype.customProperties=mxCellRenderer.defaultShapes.swimlane.prototype.customProperties.concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);
+mxCellRenderer.defaultShapes.doubleEllipse.prototype.customProperties=[{name:"margin",dispName:"Indent",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.ext.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"double",dispName:"Double",type:"bool",defVal:!1},{name:"margin",dispName:"Indent",type:"float",min:0,defVal:0}];mxCellRenderer.defaultShapes.curlyBracket.prototype.customProperties=[{name:"rounded",dispName:"Rounded",type:"bool",defVal:!0},
+{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.image.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.label.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0},{name:"imageAlign",dispName:"Image Align",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"center",dispName:"Center"},{val:"right",dispName:"Right"}],defVal:"left"},
+{name:"imageVerticalAlign",dispName:"Image Vertical Align",type:"enum",enumList:[{val:"top",dispName:"Top"},{val:"middle",dispName:"Middle"},{val:"bottom",dispName:"Bottom"}],defVal:"middle"},{name:"imageWidth",dispName:"Image Width",type:"float",min:0,defVal:24},{name:"imageHeight",dispName:"Image Height",type:"float",min:0,defVal:24},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:12},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.dataStorage.prototype.customProperties=
+[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.1}];mxCellRenderer.defaultShapes.manualInput.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:30},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.loopLimit.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.offPageConnector.prototype.customProperties=
+[{name:"size",dispName:"Size",type:"float",min:0,defVal:38},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.display.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.singleArrow.prototype.customProperties=[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.doubleArrow.prototype.customProperties=
+[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.cross.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.corner.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.tee.prototype.customProperties=
+[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.umlLifeline.prototype.customProperties=[{name:"participant",dispName:"Participant",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName:"Actor"},{val:"umlBoundary",dispName:"Boundary"},{val:"umlEntity",dispName:"Entity"},{val:"umlControl",dispName:"Control"}]},{name:"size",dispName:"Height",type:"float",defVal:40,
+min:0}];mxCellRenderer.defaultShapes.umlFrame.prototype.customProperties=[{name:"width",dispName:"Title Width",type:"float",defVal:60,min:0},{name:"height",dispName:"Title Height",type:"float",defVal:30,min:0}];StyleFormatPanel.prototype.defaultColorSchemes=[[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",font:"#333333"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",
+stroke:"#9673a6"}],[{fill:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",
+font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",
+stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},
+{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=function(u,H,P){if(null!=H){var W=function(da){if(null!=da)if(P)for(var fa=0;fa<da.length;fa++)H[da[fa].name]=da[fa];else for(var ea in H){var qa=!1;for(fa=0;fa<da.length;fa++)if(da[fa].name==ea&&da[fa].type==H[ea].type){qa=!0;break}qa||
+delete H[ea]}},R=this.editorUi.editor.graph.view.getState(u);null!=R&&null!=R.shape&&(R.shape.commonCustomPropAdded||(R.shape.commonCustomPropAdded=!0,R.shape.customProperties=R.shape.customProperties||[],R.cell.vertex?Array.prototype.push.apply(R.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(R.shape.customProperties,Editor.commonEdgeProperties)),W(R.shape.customProperties));u=u.getAttribute("customProperties");if(null!=u)try{W(JSON.parse(u))}catch(da){}}};var F=
+StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var u=this.editorUi.getSelectionState();"image"!=u.style.shape&&!u.containsLabel&&0<u.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));F.apply(this,arguments);if(Editor.enableCustomProperties){for(var H={},P=u.vertices,W=u.edges,R=0;R<P.length;R++)this.findCommonProperties(P[R],H,0==R);for(R=0;R<W.length;R++)this.findCommonProperties(W[R],H,0==P.length&&0==R);null!=Object.getOwnPropertyNames&&0<
+Object.getOwnPropertyNames(H).length&&this.container.appendChild(this.addProperties(this.createPanel(),H,u))}};var C=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(u){this.addActions(u,["copyStyle","pasteStyle"]);return C.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(u,H,P){function W(V,ja,na,ya){Aa.getModel().beginUpdate();try{var ra=[],ta=[];if(null!=na.index){for(var Da=[],Oa=na.parentRow.nextSibling;Oa&&
+Oa.getAttribute("data-pName")==V;)Da.push(Oa.getAttribute("data-pValue")),Oa=Oa.nextSibling;na.index<Da.length?null!=ya?Da.splice(ya,1):Da[na.index]=ja:Da.push(ja);null!=na.size&&Da.length>na.size&&(Da=Da.slice(0,na.size));ja=Da.join(",");null!=na.countProperty&&(Aa.setCellStyles(na.countProperty,Da.length,Aa.getSelectionCells()),ra.push(na.countProperty),ta.push(Da.length))}Aa.setCellStyles(V,ja,Aa.getSelectionCells());ra.push(V);ta.push(ja);if(null!=na.dependentProps)for(V=0;V<na.dependentProps.length;V++){var Ma=
+na.dependentPropsDefVal[V],Wa=na.dependentPropsVals[V];if(Wa.length>ja)Wa=Wa.slice(0,ja);else for(var Sa=Wa.length;Sa<ja;Sa++)Wa.push(Ma);Wa=Wa.join(",");Aa.setCellStyles(na.dependentProps[V],Wa,Aa.getSelectionCells());ra.push(na.dependentProps[V]);ta.push(Wa)}if("function"==typeof na.onChange)na.onChange(Aa,ja);ua.editorUi.fireEvent(new mxEventObject("styleChanged","keys",ra,"values",ta,"cells",Aa.getSelectionCells()))}finally{Aa.getModel().endUpdate()}}function R(V,ja,na){var ya=mxUtils.getOffset(u,
+!0),ra=mxUtils.getOffset(V,!0);ja.style.position="absolute";ja.style.left=ra.x-ya.x+"px";ja.style.top=ra.y-ya.y+"px";ja.style.width=V.offsetWidth+"px";ja.style.height=V.offsetHeight-(na?4:0)+"px";ja.style.zIndex=5}function da(V,ja,na){var ya=document.createElement("div");ya.style.width="32px";ya.style.height="4px";ya.style.margin="2px";ya.style.border="1px solid black";ya.style.background=ja&&"none"!=ja?ja:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(ua,function(ra){this.editorUi.pickColor(ja,
+function(ta){ya.style.background="none"==ta?"url('"+Dialog.prototype.noColorImage+"')":ta;W(V,ta,na)});mxEvent.consume(ra)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(ya);return btn}function fa(V,ja,na,ya,ra,ta,Da){null!=ja&&(ja=ja.split(","),za.push({name:V,values:ja,type:na,defVal:ya,countProperty:ra,parentRow:ta,isDeletable:!0,flipBkg:Da}));btn=mxUtils.button("+",mxUtils.bind(ua,function(Oa){for(var Ma=ta,Wa=0;null!=Ma.nextSibling;)if(Ma.nextSibling.getAttribute("data-pName")==
+V)Ma=Ma.nextSibling,Wa++;else break;var Sa={type:na,parentRow:ta,index:Wa,isDeletable:!0,defVal:ya,countProperty:ra};Wa=va(V,"",Sa,0==Wa%2,Da);W(V,ya,Sa);Ma.parentNode.insertBefore(Wa,Ma.nextSibling);mxEvent.consume(Oa)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function ea(V,ja,na,ya,ra,ta,Da){if(0<ra){var Oa=Array(ra);ja=null!=ja?ja.split(","):[];for(var Ma=0;Ma<ra;Ma++)Oa[Ma]=null!=ja[Ma]?ja[Ma]:null!=ya?ya:"";za.push({name:V,values:Oa,type:na,defVal:ya,
+parentRow:ta,flipBkg:Da,size:ra})}return document.createElement("div")}function qa(V,ja,na){var ya=document.createElement("input");ya.type="checkbox";ya.checked="1"==ja;mxEvent.addListener(ya,"change",function(){W(V,ya.checked?"1":"0",na)});return ya}function va(V,ja,na,ya,ra){var ta=na.dispName,Da=na.type,Oa=document.createElement("tr");Oa.className="gePropRow"+(ra?"Dark":"")+(ya?"Alt":"")+" gePropNonHeaderRow";Oa.setAttribute("data-pName",V);Oa.setAttribute("data-pValue",ja);ya=!1;null!=na.index&&
+(Oa.setAttribute("data-index",na.index),ta=(null!=ta?ta:"")+"["+na.index+"]",ya=!0);var Ma=document.createElement("td");Ma.className="gePropRowCell";ta=mxResources.get(ta,null,ta);mxUtils.write(Ma,ta);Ma.setAttribute("title",ta);ya&&(Ma.style.textAlign="right");Oa.appendChild(Ma);Ma=document.createElement("td");Ma.className="gePropRowCell";if("color"==Da)Ma.appendChild(da(V,ja,na));else if("bool"==Da||"boolean"==Da)Ma.appendChild(qa(V,ja,na));else if("enum"==Da){var Wa=na.enumList;for(ra=0;ra<Wa.length;ra++)if(ta=
+Wa[ra],ta.val==ja){mxUtils.write(Ma,mxResources.get(ta.dispName,null,ta.dispName));break}mxEvent.addListener(Ma,"click",mxUtils.bind(ua,function(){var Sa=document.createElement("select");R(Ma,Sa);for(var Fa=0;Fa<Wa.length;Fa++){var Ja=Wa[Fa],xa=document.createElement("option");xa.value=mxUtils.htmlEntities(Ja.val);mxUtils.write(xa,mxResources.get(Ja.dispName,null,Ja.dispName));Sa.appendChild(xa)}Sa.value=ja;u.appendChild(Sa);mxEvent.addListener(Sa,"change",function(){var Ba=mxUtils.htmlEntities(Sa.value);
+W(V,Ba,na)});Sa.focus();mxEvent.addListener(Sa,"blur",function(){u.removeChild(Sa)})}))}else"dynamicArr"==Da?Ma.appendChild(fa(V,ja,na.subType,na.subDefVal,na.countProperty,Oa,ra)):"staticArr"==Da?Ma.appendChild(ea(V,ja,na.subType,na.subDefVal,na.size,Oa,ra)):"readOnly"==Da?(ra=document.createElement("input"),ra.setAttribute("readonly",""),ra.value=ja,ra.style.width="96px",ra.style.borderWidth="0px",Ma.appendChild(ra)):(Ma.innerHTML=mxUtils.htmlEntities(decodeURIComponent(ja)),mxEvent.addListener(Ma,
+"click",mxUtils.bind(ua,function(){function Sa(){var Ja=Fa.value;Ja=0==Ja.length&&"string"!=Da?0:Ja;na.allowAuto&&(null!=Ja.trim&&"auto"==Ja.trim().toLowerCase()?(Ja="auto",Da="string"):(Ja=parseFloat(Ja),Ja=isNaN(Ja)?0:Ja));null!=na.min&&Ja<na.min?Ja=na.min:null!=na.max&&Ja>na.max&&(Ja=na.max);Ja=encodeURIComponent(("int"==Da?parseInt(Ja):Ja)+"");W(V,Ja,na)}var Fa=document.createElement("input");R(Ma,Fa,!0);Fa.value=decodeURIComponent(ja);Fa.className="gePropEditor";"int"!=Da&&"float"!=Da||na.allowAuto||
+(Fa.type="number",Fa.step="int"==Da?"1":"any",null!=na.min&&(Fa.min=parseFloat(na.min)),null!=na.max&&(Fa.max=parseFloat(na.max)));u.appendChild(Fa);mxEvent.addListener(Fa,"keypress",function(Ja){13==Ja.keyCode&&Sa()});Fa.focus();mxEvent.addListener(Fa,"blur",function(){Sa()})})));na.isDeletable&&(ra=mxUtils.button("-",mxUtils.bind(ua,function(Sa){W(V,"",na,na.index);mxEvent.consume(Sa)})),ra.style.height="16px",ra.style.width="25px",ra.style.float="right",ra.className="geColorBtn",Ma.appendChild(ra));
+Oa.appendChild(Ma);return Oa}var ua=this,Aa=this.editorUi.editor.graph,za=[];u.style.position="relative";u.style.padding="0";var Ca=document.createElement("table");Ca.className="geProperties";Ca.style.whiteSpace="nowrap";Ca.style.width="100%";var sa=document.createElement("tr");sa.className="gePropHeader";var Va=document.createElement("th");Va.className="gePropHeaderCell";var Ua=document.createElement("img");Ua.src=Sidebar.prototype.expandedImage;Ua.style.verticalAlign="middle";Va.appendChild(Ua);
+mxUtils.write(Va,mxResources.get("property"));sa.style.cursor="pointer";var Ra=function(){var V=Ca.querySelectorAll(".gePropNonHeaderRow");if(ua.editorUi.propertiesCollapsed){Ua.src=Sidebar.prototype.collapsedImage;var ja="none";for(var na=u.childNodes.length-1;0<=na;na--)try{var ya=u.childNodes[na],ra=ya.nodeName.toUpperCase();"INPUT"!=ra&&"SELECT"!=ra||u.removeChild(ya)}catch(ta){}}else Ua.src=Sidebar.prototype.expandedImage,ja="";for(na=0;na<V.length;na++)V[na].style.display=ja};mxEvent.addListener(sa,
+"click",function(){ua.editorUi.propertiesCollapsed=!ua.editorUi.propertiesCollapsed;Ra()});sa.appendChild(Va);Va=document.createElement("th");Va.className="gePropHeaderCell";Va.innerHTML=mxResources.get("value");sa.appendChild(Va);Ca.appendChild(sa);var Za=!1,Ha=!1;sa=null;1==P.vertices.length&&0==P.edges.length?sa=P.vertices[0].id:0==P.vertices.length&&1==P.edges.length&&(sa=P.edges[0].id);null!=sa&&Ca.appendChild(va("id",mxUtils.htmlEntities(sa),{dispName:"ID",type:"readOnly"},!0,!1));for(var db in H)if(sa=
+H[db],"function"!=typeof sa.isVisible||sa.isVisible(P,this)){var cb=null!=P.style[db]?mxUtils.htmlEntities(P.style[db]+""):null!=sa.getDefaultValue?sa.getDefaultValue(P,this):sa.defVal;if("separator"==sa.type)Ha=!Ha;else{if("staticArr"==sa.type)sa.size=parseInt(P.style[sa.sizeProperty]||H[sa.sizeProperty].defVal)||0;else if(null!=sa.dependentProps){var z=sa.dependentProps,K=[],L=[];for(Va=0;Va<z.length;Va++){var S=P.style[z[Va]];L.push(H[z[Va]].subDefVal);K.push(null!=S?S.split(","):[])}sa.dependentPropsDefVal=
+L;sa.dependentPropsVals=K}Ca.appendChild(va(db,cb,sa,Za,Ha));Za=!Za}}for(Va=0;Va<za.length;Va++)for(sa=za[Va],H=sa.parentRow,P=0;P<sa.values.length;P++)db=va(sa.name,sa.values[P],{type:sa.type,parentRow:sa.parentRow,isDeletable:sa.isDeletable,index:P,defVal:sa.defVal,countProperty:sa.countProperty,size:sa.size},0==P%2,sa.flipBkg),H.parentNode.insertBefore(db,H.nextSibling),H=db;u.appendChild(Ca);Ra();return u};StyleFormatPanel.prototype.addStyles=function(u){function H(sa){mxEvent.addListener(sa,
+"mouseenter",function(){sa.style.opacity="1"});mxEvent.addListener(sa,"mouseleave",function(){sa.style.opacity="0.5"})}var P=this.editorUi,W=P.editor.graph,R=document.createElement("div");R.style.whiteSpace="nowrap";R.style.paddingLeft="24px";R.style.paddingRight="20px";u.style.paddingLeft="16px";u.style.paddingBottom="6px";u.style.position="relative";u.appendChild(R);var da="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(" "),
+fa=document.createElement("div");fa.style.whiteSpace="nowrap";fa.style.position="relative";fa.style.textAlign="center";fa.style.width="210px";for(var ea=[],qa=0;qa<this.defaultColorSchemes.length;qa++){var va=document.createElement("div");va.style.display="inline-block";va.style.width="6px";va.style.height="6px";va.style.marginLeft="4px";va.style.marginRight="3px";va.style.borderRadius="3px";va.style.cursor="pointer";va.style.background="transparent";va.style.border="1px solid #b5b6b7";mxUtils.bind(this,
+function(sa){mxEvent.addListener(va,"click",mxUtils.bind(this,function(){ua(sa)}))})(qa);ea.push(va);fa.appendChild(va)}var ua=mxUtils.bind(this,function(sa){null!=ea[sa]&&(null!=this.format.currentScheme&&null!=ea[this.format.currentScheme]&&(ea[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=sa,Aa(this.defaultColorSchemes[this.format.currentScheme]),ea[this.format.currentScheme].style.background="#84d7ff")}),Aa=mxUtils.bind(this,function(sa){var Va=mxUtils.bind(this,
+function(Ra){var Za=mxUtils.button("",mxUtils.bind(this,function(cb){W.getModel().beginUpdate();try{for(var z=P.getSelectionState().cells,K=0;K<z.length;K++){for(var L=W.getModel().getStyle(z[K]),S=0;S<da.length;S++)L=mxUtils.removeStylename(L,da[S]);var V=W.getModel().isVertex(z[K])?W.defaultVertexStyle:W.defaultEdgeStyle;null!=Ra?(mxEvent.isShiftDown(cb)||(L=""==Ra.fill?mxUtils.setStyle(L,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(L,mxConstants.STYLE_FILLCOLOR,Ra.fill||mxUtils.getValue(V,
+mxConstants.STYLE_FILLCOLOR,null)),L=mxUtils.setStyle(L,mxConstants.STYLE_GRADIENTCOLOR,Ra.gradient||mxUtils.getValue(V,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(cb)||mxClient.IS_MAC&&mxEvent.isMetaDown(cb)||!W.getModel().isVertex(z[K])||(L=mxUtils.setStyle(L,mxConstants.STYLE_FONTCOLOR,Ra.font||mxUtils.getValue(V,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(cb)||(L=""==Ra.stroke?mxUtils.setStyle(L,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(L,mxConstants.STYLE_STROKECOLOR,
+Ra.stroke||mxUtils.getValue(V,mxConstants.STYLE_STROKECOLOR,null)))):(L=mxUtils.setStyle(L,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(V,mxConstants.STYLE_FILLCOLOR,"#ffffff")),L=mxUtils.setStyle(L,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(V,mxConstants.STYLE_STROKECOLOR,"#000000")),L=mxUtils.setStyle(L,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(V,mxConstants.STYLE_GRADIENTCOLOR,null)),W.getModel().isVertex(z[K])&&(L=mxUtils.setStyle(L,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(V,mxConstants.STYLE_FONTCOLOR,
+null))));W.getModel().setStyle(z[K],L)}}finally{W.getModel().endUpdate()}}));Za.className="geStyleButton";Za.style.width="36px";Za.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";Za.style.margin="0px 6px 6px 0px";if(null!=Ra){var Ha="1"==urlParams.sketch?"2px solid":"1px solid";null!=Ra.gradient?mxClient.IS_IE&&10>document.documentMode?Za.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+Ra.fill+"', EndColorStr='"+Ra.gradient+"', GradientType=0)":Za.style.backgroundImage=
+"linear-gradient("+Ra.fill+" 0px,"+Ra.gradient+" 100%)":Ra.fill==mxConstants.NONE?Za.style.background="url('"+Dialog.prototype.noColorImage+"')":Za.style.backgroundColor=""==Ra.fill?mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):Ra.fill||mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");Za.style.border=Ra.stroke==mxConstants.NONE?Ha+" transparent":""==Ra.stroke?Ha+" "+
+mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):Ha+" "+(Ra.stroke||mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=Ra.title&&Za.setAttribute("title",Ra.title)}else{Ha=mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var db=mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");Za.style.backgroundColor=Ha;
+Za.style.border="1px solid "+db}Za.style.borderRadius="0";R.appendChild(Za)});R.innerText="";for(var Ua=0;Ua<sa.length;Ua++)0<Ua&&0==mxUtils.mod(Ua,4)&&mxUtils.br(R),Va(sa[Ua])});null==this.format.currentScheme?ua(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):ua(this.format.currentScheme);qa=10>=this.defaultColorSchemes.length?28:8;var za=document.createElement("div");za.style.cssText="position:absolute;left:10px;top:8px;bottom:"+qa+"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(za,"click",mxUtils.bind(this,function(){ua(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var Ca=document.createElement("div");Ca.style.cssText="position:absolute;left:202px;top:8px;bottom:"+qa+"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&&(u.appendChild(za),u.appendChild(Ca));mxEvent.addListener(Ca,"click",mxUtils.bind(this,function(){ua(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));H(za);H(Ca);Aa(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&u.appendChild(fa);return u};StyleFormatPanel.prototype.addEditOps=function(u){var H=this.editorUi.getSelectionState(),P=this.editorUi.editor.graph,W=null;1==H.cells.length&&(W=mxUtils.button(mxResources.get("editStyle"),
+mxUtils.bind(this,function(R){this.editorUi.actions.get("editStyle").funct()})),W.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),W.style.width="210px",W.style.marginBottom="2px",u.appendChild(W));P=1==H.cells.length?P.view.getState(H.cells[0]):null;null!=P&&null!=P.shape&&null!=P.shape.stencil?(H=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(R){this.editorUi.actions.get("editShape").funct()})),H.setAttribute("title",
+mxResources.get("editShape")),H.style.marginBottom="2px",null==W?H.style.width="210px":(W.style.width="104px",H.style.width="104px",H.style.marginLeft="2px"),u.appendChild(H)):H.image&&0<H.cells.length&&(H=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(R){this.editorUi.actions.get("image").funct()})),H.setAttribute("title",mxResources.get("editImage")),H.style.marginBottom="2px",null==W?H.style.width="210px":(W.style.width="104px",H.style.width="104px",H.style.marginLeft="2px"),
u.appendChild(H));return u}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(u){return u.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(u){return Graph.isGoogleFontUrl(u)};Graph.createFontElement=function(u,
-H){var P=Graph.fontMapping[H];null==P&&Graph.isCssFontUrl(H)?(u=document.createElement("link"),u.setAttribute("rel","stylesheet"),u.setAttribute("type","text/css"),u.setAttribute("charset","UTF-8"),u.setAttribute("href",H)):(null==P&&(P='@font-face {\nfont-family: "'+u+'";\nsrc: url("'+H+'");\n}'),u=document.createElement("style"),mxUtils.write(u,P));return u};Graph.addFont=function(u,H,P){if(null!=u&&0<u.length&&null!=H&&0<H.length){var S=u.toLowerCase();if("helvetica"!=S&&"arial"!=u&&"sans-serif"!=
-S){var R=Graph.customFontElements[S];null!=R&&R.url!=H&&(R.elt.parentNode.removeChild(R.elt),R=null);null==R?(R=H,"http:"==H.substring(0,5)&&(R=PROXY_URL+"?url="+encodeURIComponent(H)),R={name:u,url:H,elt:Graph.createFontElement(u,R)},Graph.customFontElements[S]=R,Graph.recentCustomFonts[S]=R,H=document.getElementsByTagName("head")[0],null!=P&&("link"==R.elt.nodeName.toLowerCase()?(R.elt.onload=P,R.elt.onerror=P):P()),null!=H&&H.appendChild(R.elt)):null!=P&&P()}else null!=P&&P()}else null!=P&&P();
-return u};Graph.getFontUrl=function(u,H){u=Graph.customFontElements[u.toLowerCase()];null!=u&&(H=u.url);return H};Graph.processFontAttributes=function(u){u=u.getElementsByTagName("*");for(var H=0;H<u.length;H++){var P=u[H].getAttribute("data-font-src");if(null!=P){var S="FONT"==u[H].nodeName?u[H].getAttribute("face"):u[H].style.fontFamily;null!=S&&Graph.addFont(S,P)}}};Graph.processFontStyle=function(u){if(null!=u){var H=mxUtils.getValue(u,"fontSource",null);if(null!=H){var P=mxUtils.getValue(u,mxConstants.STYLE_FONTFAMILY,
+H){var P=Graph.fontMapping[H];null==P&&Graph.isCssFontUrl(H)?(u=document.createElement("link"),u.setAttribute("rel","stylesheet"),u.setAttribute("type","text/css"),u.setAttribute("charset","UTF-8"),u.setAttribute("href",H)):(null==P&&(P='@font-face {\nfont-family: "'+u+'";\nsrc: url("'+H+'");\n}'),u=document.createElement("style"),mxUtils.write(u,P));return u};Graph.addFont=function(u,H,P){if(null!=u&&0<u.length&&null!=H&&0<H.length){var W=u.toLowerCase();if("helvetica"!=W&&"arial"!=u&&"sans-serif"!=
+W){var R=Graph.customFontElements[W];null!=R&&R.url!=H&&(R.elt.parentNode.removeChild(R.elt),R=null);null==R?(R=H,"http:"==H.substring(0,5)&&(R=PROXY_URL+"?url="+encodeURIComponent(H)),R={name:u,url:H,elt:Graph.createFontElement(u,R)},Graph.customFontElements[W]=R,Graph.recentCustomFonts[W]=R,H=document.getElementsByTagName("head")[0],null!=P&&("link"==R.elt.nodeName.toLowerCase()?(R.elt.onload=P,R.elt.onerror=P):P()),null!=H&&H.appendChild(R.elt)):null!=P&&P()}else null!=P&&P()}else null!=P&&P();
+return u};Graph.getFontUrl=function(u,H){u=Graph.customFontElements[u.toLowerCase()];null!=u&&(H=u.url);return H};Graph.processFontAttributes=function(u){u=u.getElementsByTagName("*");for(var H=0;H<u.length;H++){var P=u[H].getAttribute("data-font-src");if(null!=P){var W="FONT"==u[H].nodeName?u[H].getAttribute("face"):u[H].style.fontFamily;null!=W&&Graph.addFont(W,P)}}};Graph.processFontStyle=function(u){if(null!=u){var H=mxUtils.getValue(u,"fontSource",null);if(null!=H){var P=mxUtils.getValue(u,mxConstants.STYLE_FONTFAMILY,
null);null!=P&&Graph.addFont(P,decodeURIComponent(H))}}return u};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!=
urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var I=Graph.prototype.init;Graph.prototype.init=function(){function u(R){H=R}I.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var H=null;mxEvent.addListener(this.container,"mouseenter",u);mxEvent.addListener(this.container,"mousemove",u);mxEvent.addListener(this.container,"mouseleave",function(R){H=null});this.isMouseInsertPoint=function(){return null!=H};var P=this.getInsertPoint;
-this.getInsertPoint=function(){return null!=H?this.getPointForEvent(H):P.apply(this,arguments)};var S=this.layoutManager.getLayout;this.layoutManager.getLayout=function(R){var ca=this.graph.getCellStyle(R);if(null!=ca&&"rack"==ca.childLayout){var ea=new mxStackLayout(this.graph,!1);ea.gridSize=null!=ca.rackUnitSize?parseFloat(ca.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;ea.marginLeft=ca.marginLeft||0;ea.marginRight=ca.marginRight||0;ea.marginTop=ca.marginTop||
-0;ea.marginBottom=ca.marginBottom||0;ea.allowGaps=ca.allowGaps||0;ea.horizontal="1"==mxUtils.getValue(ca,"horizontalRack","0");ea.resizeParent=!1;ea.fill=!0;return ea}return S.apply(this,arguments)};this.updateGlobalUrlVariables()};var G=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(u,H){return Graph.processFontStyle(G.apply(this,arguments))};var Y=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(u,H,P,S,R,ca,ea,fa,ra,ua,
-sa){Y.apply(this,arguments);Graph.processFontAttributes(sa)};var ba=mxText.prototype.redraw;mxText.prototype.redraw=function(){ba.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(u,H,P){function S(){for(var ta=ea.getSelectionCells(),Pa=[],Ta=0;Ta<ta.length;Ta++)ea.isCellVisible(ta[Ta])&&Pa.push(ta[Ta]);ea.setSelectionCells(Pa)}function R(ta){ea.setHiddenTags(ta?[]:fa.slice());S();ea.refresh()}function ca(ta,
-Pa){ua.innerText="";if(0<ta.length){var Ta=document.createElement("table");Ta.setAttribute("cellpadding","2");Ta.style.boxSizing="border-box";Ta.style.tableLayout="fixed";Ta.style.width="100%";var Oa=document.createElement("tbody");if(null!=ta&&0<ta.length)for(var Xa=0;Xa<ta.length;Xa++)(function(Ga){var eb=0>mxUtils.indexOf(ea.hiddenTags,Ga),bb=document.createElement("tr"),z=document.createElement("td");z.style.align="center";z.style.width="16px";var K=document.createElement("img");K.setAttribute("src",
-eb?Editor.visibleImage:Editor.hiddenImage);K.setAttribute("title",mxResources.get(eb?"hideIt":"show",[Ga]));mxUtils.setOpacity(K,eb?75:25);K.style.verticalAlign="middle";K.style.cursor="pointer";K.style.width="16px";if(H||Editor.isDarkMode())K.style.filter="invert(100%)";z.appendChild(K);mxEvent.addListener(K,"click",function(T){mxEvent.isShiftDown(T)?R(0<=mxUtils.indexOf(ea.hiddenTags,Ga)):(ea.toggleHiddenTag(Ga),S(),ea.refresh());mxEvent.consume(T)});bb.appendChild(z);z=document.createElement("td");
-z.style.overflow="hidden";z.style.whiteSpace="nowrap";z.style.textOverflow="ellipsis";z.style.verticalAlign="middle";z.style.cursor="pointer";z.setAttribute("title",Ga);a=document.createElement("a");mxUtils.write(a,Ga);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,eb?100:40);z.appendChild(a);mxEvent.addListener(z,"click",function(T){if(mxEvent.isShiftDown(T)){R(!0);var V=ea.getCellsForTags([Ga],null,null,!0);ea.isEnabled()?ea.setSelectionCells(V):ea.highlightCells(V)}else if(eb&&
-0<ea.hiddenTags.length)R(!0);else{V=fa.slice();var ia=mxUtils.indexOf(V,Ga);V.splice(ia,1);ea.setHiddenTags(V);S();ea.refresh()}mxEvent.consume(T)});bb.appendChild(z);if(ea.isEnabled()){z=document.createElement("td");z.style.verticalAlign="middle";z.style.textAlign="center";z.style.width="18px";if(null==Pa){z.style.align="center";z.style.width="16px";K=document.createElement("img");K.setAttribute("src",Editor.crossImage);K.setAttribute("title",mxResources.get("removeIt",[Ga]));mxUtils.setOpacity(K,
-eb?75:25);K.style.verticalAlign="middle";K.style.cursor="pointer";K.style.width="16px";if(H||Editor.isDarkMode())K.style.filter="invert(100%)";mxEvent.addListener(K,"click",function(T){var V=mxUtils.indexOf(fa,Ga);0<=V&&fa.splice(V,1);ea.removeTagsForCells(ea.model.getDescendants(ea.model.getRoot()),[Ga]);ea.refresh();mxEvent.consume(T)});z.appendChild(K)}else{var M=document.createElement("input");M.setAttribute("type","checkbox");M.style.margin="0px";M.defaultChecked=null!=Pa&&0<=mxUtils.indexOf(Pa,
-Ga);M.checked=M.defaultChecked;M.style.background="transparent";M.setAttribute("title",mxResources.get(M.defaultChecked?"removeIt":"add",[Ga]));mxEvent.addListener(M,"change",function(T){M.checked?ea.addTagsForCells(ea.getSelectionCells(),[Ga]):ea.removeTagsForCells(ea.getSelectionCells(),[Ga]);mxEvent.consume(T)});z.appendChild(M)}bb.appendChild(z)}Oa.appendChild(bb)})(ta[Xa]);Ta.appendChild(Oa);ua.appendChild(Ta)}}var ea=this,fa=ea.hiddenTags.slice(),ra=document.createElement("div");ra.style.userSelect=
-"none";ra.style.overflow="hidden";ra.style.padding="10px";ra.style.height="100%";var ua=document.createElement("div");ua.style.boxSizing="border-box";ua.style.borderRadius="4px";ua.style.userSelect="none";ua.style.overflow="auto";ua.style.position="absolute";ua.style.left="10px";ua.style.right="10px";ua.style.top="10px";ua.style.border=ea.isEnabled()?"1px solid #808080":"none";ua.style.bottom=ea.isEnabled()?"48px":"10px";ra.appendChild(ua);var sa=mxUtils.button(mxResources.get("reset"),function(ta){ea.setHiddenTags([]);
-mxEvent.isShiftDown(ta)||(fa=ea.hiddenTags.slice());S();ea.refresh()});sa.setAttribute("title",mxResources.get("reset"));sa.className="geBtn";sa.style.margin="0 4px 0 0";var Aa=mxUtils.button(mxResources.get("add"),function(){null!=P&&P(fa,function(ta){fa=ta;Ca()})});Aa.setAttribute("title",mxResources.get("add"));Aa.className="geBtn";Aa.style.margin="0";ea.addListener(mxEvent.ROOT,function(){fa=ea.hiddenTags.slice()});var Ca=mxUtils.bind(this,function(ta,Pa){if(u()){ta=ea.getAllTags();for(Pa=0;Pa<
-ta.length;Pa++)0>mxUtils.indexOf(fa,ta[Pa])&&fa.push(ta[Pa]);fa.sort();ea.isSelectionEmpty()?ca(fa):ca(fa,ea.getCommonTagsForCells(ea.getSelectionCells()))}});ea.selectionModel.addListener(mxEvent.CHANGE,Ca);ea.model.addListener(mxEvent.CHANGE,Ca);ea.addListener(mxEvent.REFRESH,Ca);var Ba=document.createElement("div");Ba.style.boxSizing="border-box";Ba.style.whiteSpace="nowrap";Ba.style.position="absolute";Ba.style.overflow="hidden";Ba.style.bottom="0px";Ba.style.height="42px";Ba.style.right="10px";
-Ba.style.left="10px";ea.isEnabled()&&(Ba.appendChild(sa),Ba.appendChild(Aa),ra.appendChild(Ba));return{div:ra,refresh:Ca}};Graph.prototype.getCustomFonts=function(){var u=this.extFonts;u=null!=u?u.slice():[];for(var H in Graph.customFontElements){var P=Graph.customFontElements[H];u.push({name:P.name,url:P.url})}return u};Graph.prototype.setFont=function(u,H){Graph.addFont(u,H);document.execCommand("fontname",!1,u);if(null!=H){var P=this.cellEditor.textarea.getElementsByTagName("font");H=Graph.getFontUrl(u,
-H);for(var S=0;S<P.length;S++)P[S].getAttribute("face")==u&&P[S].getAttribute("data-font-src")!=H&&P[S].setAttribute("data-font-src",H)}};var Z=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return Z.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 u=JSON.parse(decodeURIComponent(urlParams.vars));
-if(null!=u)for(var H in u)this.globalVars[H]=u[H]}catch(P){null!=window.console&&console.log("Error in vars URL parameter: "+P)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var X=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(u){var H=X.apply(this,arguments);null==H&&null!=this.globalVars&&(H=this.globalVars[u]);return H};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var u=
-this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(u.ownerDocument)).decode(u)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var qa=Graph.prototype.getSvg;Graph.prototype.getSvg=function(u,H,P,S,R,ca,ea,fa,ra,ua,sa,Aa,Ca,Ba){var ta=null,Pa=null,Ta=null;Aa||null==this.themes||"darkTheme"!=this.defaultThemeName||(ta=this.stylesheet,Pa=this.shapeForegroundColor,Ta=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?
-"#000000":Editor.lightColor,this.shapeBackgroundColor="darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var Oa=qa.apply(this,arguments),Xa=this.getCustomFonts();if(sa&&0<Xa.length){var Ga=Oa.ownerDocument,eb=null!=Ga.createElementNS?Ga.createElementNS(mxConstants.NS_SVG,"style"):Ga.createElement("style");null!=Ga.setAttributeNS?eb.setAttributeNS("type","text/css"):eb.setAttribute("type","text/css");for(var bb="",z="",K=0;K<Xa.length;K++){var M=
-Xa[K].name,T=Xa[K].url;Graph.isCssFontUrl(T)?bb+="@import url("+T+");\n":z+='@font-face {\nfont-family: "'+M+'";\nsrc: url("'+T+'");\n}\n'}eb.appendChild(Ga.createTextNode(bb+z));Oa.getElementsByTagName("defs")[0].appendChild(eb)}this.mathEnabled&&(document.body.appendChild(Oa),Editor.MathJaxRender(Oa),Oa.parentNode.removeChild(Oa));null!=ta&&(this.shapeBackgroundColor=Ta,this.shapeForegroundColor=Pa,this.stylesheet=ta,this.refresh());return Oa};var Q=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=
-function(u){Q.apply(this,arguments);null!=u.secondLabel&&(u.secondLabel.destroy(),u.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(u){return[u.shape,u.text,u.secondLabel,u.control]};var W=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){W.apply(this,arguments);this.enumerationState=0};var ha=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(u){null!=u.shape&&this.redrawEnumerationState(u);return ha.apply(this,
+this.getInsertPoint=function(){return null!=H?this.getPointForEvent(H):P.apply(this,arguments)};var W=this.layoutManager.getLayout;this.layoutManager.getLayout=function(R){var da=this.graph.getCellStyle(R);if(null!=da&&"rack"==da.childLayout){var fa=new mxStackLayout(this.graph,!1);fa.gridSize=null!=da.rackUnitSize?parseFloat(da.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;fa.marginLeft=da.marginLeft||0;fa.marginRight=da.marginRight||0;fa.marginTop=da.marginTop||
+0;fa.marginBottom=da.marginBottom||0;fa.allowGaps=da.allowGaps||0;fa.horizontal="1"==mxUtils.getValue(da,"horizontalRack","0");fa.resizeParent=!1;fa.fill=!0;return fa}return W.apply(this,arguments)};this.updateGlobalUrlVariables()};var G=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(u,H){return Graph.processFontStyle(G.apply(this,arguments))};var Z=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(u,H,P,W,R,da,fa,ea,qa,va,
+ua){Z.apply(this,arguments);Graph.processFontAttributes(ua)};var ca=mxText.prototype.redraw;mxText.prototype.redraw=function(){ca.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(u,H,P){function W(){for(var sa=fa.getSelectionCells(),Va=[],Ua=0;Ua<sa.length;Ua++)fa.isCellVisible(sa[Ua])&&Va.push(sa[Ua]);fa.setSelectionCells(Va)}function R(sa){fa.setHiddenTags(sa?[]:ea.slice());W();fa.refresh()}function da(sa,
+Va){va.innerText="";if(0<sa.length){var Ua=document.createElement("table");Ua.setAttribute("cellpadding","2");Ua.style.boxSizing="border-box";Ua.style.tableLayout="fixed";Ua.style.width="100%";var Ra=document.createElement("tbody");if(null!=sa&&0<sa.length)for(var Za=0;Za<sa.length;Za++)(function(Ha){var db=0>mxUtils.indexOf(fa.hiddenTags,Ha),cb=document.createElement("tr"),z=document.createElement("td");z.style.align="center";z.style.width="16px";var K=document.createElement("img");K.setAttribute("src",
+db?Editor.visibleImage:Editor.hiddenImage);K.setAttribute("title",mxResources.get(db?"hideIt":"show",[Ha]));mxUtils.setOpacity(K,db?75:25);K.style.verticalAlign="middle";K.style.cursor="pointer";K.style.width="16px";if(H||Editor.isDarkMode())K.style.filter="invert(100%)";z.appendChild(K);mxEvent.addListener(K,"click",function(S){mxEvent.isShiftDown(S)?R(0<=mxUtils.indexOf(fa.hiddenTags,Ha)):(fa.toggleHiddenTag(Ha),W(),fa.refresh());mxEvent.consume(S)});cb.appendChild(z);z=document.createElement("td");
+z.style.overflow="hidden";z.style.whiteSpace="nowrap";z.style.textOverflow="ellipsis";z.style.verticalAlign="middle";z.style.cursor="pointer";z.setAttribute("title",Ha);a=document.createElement("a");mxUtils.write(a,Ha);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,db?100:40);z.appendChild(a);mxEvent.addListener(z,"click",function(S){if(mxEvent.isShiftDown(S)){R(!0);var V=fa.getCellsForTags([Ha],null,null,!0);fa.isEnabled()?fa.setSelectionCells(V):fa.highlightCells(V)}else if(db&&
+0<fa.hiddenTags.length)R(!0);else{V=ea.slice();var ja=mxUtils.indexOf(V,Ha);V.splice(ja,1);fa.setHiddenTags(V);W();fa.refresh()}mxEvent.consume(S)});cb.appendChild(z);if(fa.isEnabled()){z=document.createElement("td");z.style.verticalAlign="middle";z.style.textAlign="center";z.style.width="18px";if(null==Va){z.style.align="center";z.style.width="16px";K=document.createElement("img");K.setAttribute("src",Editor.crossImage);K.setAttribute("title",mxResources.get("removeIt",[Ha]));mxUtils.setOpacity(K,
+db?75:25);K.style.verticalAlign="middle";K.style.cursor="pointer";K.style.width="16px";if(H||Editor.isDarkMode())K.style.filter="invert(100%)";mxEvent.addListener(K,"click",function(S){var V=mxUtils.indexOf(ea,Ha);0<=V&&ea.splice(V,1);fa.removeTagsForCells(fa.model.getDescendants(fa.model.getRoot()),[Ha]);fa.refresh();mxEvent.consume(S)});z.appendChild(K)}else{var L=document.createElement("input");L.setAttribute("type","checkbox");L.style.margin="0px";L.defaultChecked=null!=Va&&0<=mxUtils.indexOf(Va,
+Ha);L.checked=L.defaultChecked;L.style.background="transparent";L.setAttribute("title",mxResources.get(L.defaultChecked?"removeIt":"add",[Ha]));mxEvent.addListener(L,"change",function(S){L.checked?fa.addTagsForCells(fa.getSelectionCells(),[Ha]):fa.removeTagsForCells(fa.getSelectionCells(),[Ha]);mxEvent.consume(S)});z.appendChild(L)}cb.appendChild(z)}Ra.appendChild(cb)})(sa[Za]);Ua.appendChild(Ra);va.appendChild(Ua)}}var fa=this,ea=fa.hiddenTags.slice(),qa=document.createElement("div");qa.style.userSelect=
+"none";qa.style.overflow="hidden";qa.style.padding="10px";qa.style.height="100%";var va=document.createElement("div");va.style.boxSizing="border-box";va.style.borderRadius="4px";va.style.userSelect="none";va.style.overflow="auto";va.style.position="absolute";va.style.left="10px";va.style.right="10px";va.style.top="10px";va.style.border=fa.isEnabled()?"1px solid #808080":"none";va.style.bottom=fa.isEnabled()?"48px":"10px";qa.appendChild(va);var ua=mxUtils.button(mxResources.get("reset"),function(sa){fa.setHiddenTags([]);
+mxEvent.isShiftDown(sa)||(ea=fa.hiddenTags.slice());W();fa.refresh()});ua.setAttribute("title",mxResources.get("reset"));ua.className="geBtn";ua.style.margin="0 4px 0 0";var Aa=mxUtils.button(mxResources.get("add"),function(){null!=P&&P(ea,function(sa){ea=sa;za()})});Aa.setAttribute("title",mxResources.get("add"));Aa.className="geBtn";Aa.style.margin="0";fa.addListener(mxEvent.ROOT,function(){ea=fa.hiddenTags.slice()});var za=mxUtils.bind(this,function(sa,Va){if(u()){sa=fa.getAllTags();for(Va=0;Va<
+sa.length;Va++)0>mxUtils.indexOf(ea,sa[Va])&&ea.push(sa[Va]);ea.sort();fa.isSelectionEmpty()?da(ea):da(ea,fa.getCommonTagsForCells(fa.getSelectionCells()))}});fa.selectionModel.addListener(mxEvent.CHANGE,za);fa.model.addListener(mxEvent.CHANGE,za);fa.addListener(mxEvent.REFRESH,za);var Ca=document.createElement("div");Ca.style.boxSizing="border-box";Ca.style.whiteSpace="nowrap";Ca.style.position="absolute";Ca.style.overflow="hidden";Ca.style.bottom="0px";Ca.style.height="42px";Ca.style.right="10px";
+Ca.style.left="10px";fa.isEnabled()&&(Ca.appendChild(ua),Ca.appendChild(Aa),qa.appendChild(Ca));return{div:qa,refresh:za}};Graph.prototype.getCustomFonts=function(){var u=this.extFonts;u=null!=u?u.slice():[];for(var H in Graph.customFontElements){var P=Graph.customFontElements[H];u.push({name:P.name,url:P.url})}return u};Graph.prototype.setFont=function(u,H){Graph.addFont(u,H);document.execCommand("fontname",!1,u);if(null!=H){var P=this.cellEditor.textarea.getElementsByTagName("font");H=Graph.getFontUrl(u,
+H);for(var W=0;W<P.length;W++)P[W].getAttribute("face")==u&&P[W].getAttribute("data-font-src")!=H&&P[W].setAttribute("data-font-src",H)}};var aa=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return aa.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 u=JSON.parse(decodeURIComponent(urlParams.vars));
+if(null!=u)for(var H in u)this.globalVars[H]=u[H]}catch(P){null!=window.console&&console.log("Error in vars URL parameter: "+P)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var Y=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(u){var H=Y.apply(this,arguments);null==H&&null!=this.globalVars&&(H=this.globalVars[u]);return H};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var u=
+this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(u.ownerDocument)).decode(u)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var pa=Graph.prototype.getSvg;Graph.prototype.getSvg=function(u,H,P,W,R,da,fa,ea,qa,va,ua,Aa,za,Ca){var sa=null,Va=null,Ua=null;Aa||null==this.themes||"darkTheme"!=this.defaultThemeName||(sa=this.stylesheet,Va=this.shapeForegroundColor,Ua=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?
+"#000000":Editor.lightColor,this.shapeBackgroundColor="darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var Ra=pa.apply(this,arguments),Za=this.getCustomFonts();if(ua&&0<Za.length){var Ha=Ra.ownerDocument,db=null!=Ha.createElementNS?Ha.createElementNS(mxConstants.NS_SVG,"style"):Ha.createElement("style");null!=Ha.setAttributeNS?db.setAttributeNS("type","text/css"):db.setAttribute("type","text/css");for(var cb="",z="",K=0;K<Za.length;K++){var L=
+Za[K].name,S=Za[K].url;Graph.isCssFontUrl(S)?cb+="@import url("+S+");\n":z+='@font-face {\nfont-family: "'+L+'";\nsrc: url("'+S+'");\n}\n'}db.appendChild(Ha.createTextNode(cb+z));Ra.getElementsByTagName("defs")[0].appendChild(db)}this.mathEnabled&&(document.body.appendChild(Ra),Editor.MathJaxRender(Ra),Ra.parentNode.removeChild(Ra));null!=sa&&(this.shapeBackgroundColor=Ua,this.shapeForegroundColor=Va,this.stylesheet=sa,this.refresh());return Ra};var Q=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=
+function(u){Q.apply(this,arguments);null!=u.secondLabel&&(u.secondLabel.destroy(),u.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(u){return[u.shape,u.text,u.secondLabel,u.control]};var X=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){X.apply(this,arguments);this.enumerationState=0};var ha=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(u){null!=u.shape&&this.redrawEnumerationState(u);return ha.apply(this,
arguments)};mxGraphView.prototype.createEnumerationValue=function(u){u=decodeURIComponent(mxUtils.getValue(u.style,"enumerateValue",""));""==u&&(u=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(u)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(u){var H="1"==mxUtils.getValue(u.style,"enumerate",0);H&&null==u.secondLabel?(u.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),
-u.secondLabel.size=12,u.secondLabel.state=u,u.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(u,u.secondLabel)):H||null==u.secondLabel||(u.secondLabel.destroy(),u.secondLabel=null);H=u.secondLabel;if(null!=H){var P=u.view.scale,S=this.createEnumerationValue(u);u=this.graph.model.isVertex(u.cell)?new mxRectangle(u.x+u.width-4*P,u.y+4*P,0,0):mxRectangle.fromPoint(u.view.getPoint(u));H.bounds.equals(u)&&H.value==S&&H.scale==P||(H.bounds=u,H.value=S,H.scale=
-P,H.redraw())}};var la=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){la.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var u=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;",u.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,u.ownerSVGElement))}};var ja=Graph.prototype.refresh;Graph.prototype.refresh=function(){ja.apply(this,
-arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var U=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){U.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(u){"data:action/json,"==u.substring(0,17)&&(u=JSON.parse(u.substring(17)),null!=
-u.actions&&this.executeCustomActions(u.actions))};Graph.prototype.executeCustomActions=function(u,H){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 P=!1,S=0,R=0,ca=mxUtils.bind(this,function(){P||(P=!0,this.model.beginUpdate())}),ea=mxUtils.bind(this,
-function(){P&&(P=!1,this.model.endUpdate())}),fa=mxUtils.bind(this,function(){0<S&&S--;0==S&&ra()}),ra=mxUtils.bind(this,function(){if(R<u.length){var ua=this.stoppingCustomActions,sa=u[R++],Aa=[];if(null!=sa.open)if(ea(),this.isCustomLink(sa.open)){if(!this.customLinkClicked(sa.open))return}else this.openLink(sa.open);null==sa.wait||ua||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;fa()}),S++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,
-""!=sa.wait?parseInt(sa.wait):1E3),ea());null!=sa.opacity&&null!=sa.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(sa.opacity,!0)),sa.opacity.value);null!=sa.fadeIn&&(S++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(sa.fadeIn,!0)),0,1,fa,ua?0:sa.fadeIn.delay));null!=sa.fadeOut&&(S++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(sa.fadeOut,!0)),1,0,fa,ua?0:sa.fadeOut.delay));null!=sa.wipeIn&&(Aa=Aa.concat(this.createWipeAnimations(this.getCellsForAction(sa.wipeIn,
-!0),!0)));null!=sa.wipeOut&&(Aa=Aa.concat(this.createWipeAnimations(this.getCellsForAction(sa.wipeOut,!0),!1)));null!=sa.toggle&&(ca(),this.toggleCells(this.getCellsForAction(sa.toggle,!0)));if(null!=sa.show){ca();var Ca=this.getCellsForAction(sa.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(Ca),1);this.setCellsVisible(Ca,!0)}null!=sa.hide&&(ca(),Ca=this.getCellsForAction(sa.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(Ca),0),this.setCellsVisible(Ca,!1));null!=sa.toggleStyle&&
-null!=sa.toggleStyle.key&&(ca(),this.toggleCellStyles(sa.toggleStyle.key,null!=sa.toggleStyle.defaultValue?sa.toggleStyle.defaultValue:"0",this.getCellsForAction(sa.toggleStyle,!0)));null!=sa.style&&null!=sa.style.key&&(ca(),this.setCellStyles(sa.style.key,sa.style.value,this.getCellsForAction(sa.style,!0)));Ca=[];null!=sa.select&&this.isEnabled()&&(Ca=this.getCellsForAction(sa.select),this.setSelectionCells(Ca));null!=sa.highlight&&(Ca=this.getCellsForAction(sa.highlight),this.highlightCells(Ca,
-sa.highlight.color,sa.highlight.duration,sa.highlight.opacity));null!=sa.scroll&&(Ca=this.getCellsForAction(sa.scroll));null!=sa.viewbox&&this.fitWindow(sa.viewbox,sa.viewbox.border);0<Ca.length&&this.scrollCellToVisible(Ca[0]);if(null!=sa.tags){Ca=[];null!=sa.tags.hidden&&(Ca=Ca.concat(sa.tags.hidden));if(null!=sa.tags.visible)for(var Ba=this.getAllTags(),ta=0;ta<Ba.length;ta++)0>mxUtils.indexOf(sa.tags.visible,Ba[ta])&&0>mxUtils.indexOf(Ca,Ba[ta])&&Ca.push(Ba[ta]);this.setHiddenTags(Ca);this.refresh()}0<
-Aa.length&&(S++,this.executeAnimations(Aa,fa,ua?1:sa.steps,ua?0:sa.delay));0==S?ra():ea()}else this.stoppingCustomActions=this.executingCustomActions=!1,ea(),null!=H&&H()});ra()}};Graph.prototype.doUpdateCustomLinksForCell=function(u,H){var P=this.getLinkForCell(H);null!=P&&"data:action/json,"==P.substring(0,17)&&this.setLinkForCell(H,this.updateCustomLink(u,P));if(this.isHtmlLabel(H)){var S=document.createElement("div");S.innerHTML=this.sanitizeHtml(this.getLabel(H));for(var R=S.getElementsByTagName("a"),
-ca=!1,ea=0;ea<R.length;ea++)P=R[ea].getAttribute("href"),null!=P&&"data:action/json,"==P.substring(0,17)&&(R[ea].setAttribute("href",this.updateCustomLink(u,P)),ca=!0);ca&&this.labelChanged(H,S.innerHTML)}};Graph.prototype.updateCustomLink=function(u,H){if("data:action/json,"==H.substring(0,17))try{var P=JSON.parse(H.substring(17));null!=P.actions&&(this.updateCustomLinkActions(u,P.actions),H="data:action/json,"+JSON.stringify(P))}catch(S){}return H};Graph.prototype.updateCustomLinkActions=function(u,
-H){for(var P=0;P<H.length;P++){var S=H[P],R;for(R in S)this.updateCustomLinkAction(u,S[R],"cells"),this.updateCustomLinkAction(u,S[R],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(u,H,P){if(null!=H&&null!=H[P]){for(var S=[],R=0;R<H[P].length;R++)if("*"==H[P][R])S.push(H[P][R]);else{var ca=u[H[P][R]];null!=ca?""!=ca&&S.push(ca):S.push(H[P][R])}H[P]=S}};Graph.prototype.getCellsForAction=function(u,H){H=this.getCellsById(u.cells).concat(this.getCellsForTags(u.tags,null,H));if(null!=
-u.excludeCells){for(var P=[],S=0;S<H.length;S++)0>u.excludeCells.indexOf(H[S].id)&&P.push(H[S]);H=P}return H};Graph.prototype.getCellsById=function(u){var H=[];if(null!=u)for(var P=0;P<u.length;P++)if("*"==u[P]){var S=this.model.getRoot();H=H.concat(this.model.filterDescendants(function(ca){return ca!=S},S))}else{var R=this.model.getCell(u[P]);null!=R&&H.push(R)}return H};var L=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(u){return L.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(u))};
+u.secondLabel.size=12,u.secondLabel.state=u,u.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(u,u.secondLabel)):H||null==u.secondLabel||(u.secondLabel.destroy(),u.secondLabel=null);H=u.secondLabel;if(null!=H){var P=u.view.scale,W=this.createEnumerationValue(u);u=this.graph.model.isVertex(u.cell)?new mxRectangle(u.x+u.width-4*P,u.y+4*P,0,0):mxRectangle.fromPoint(u.view.getPoint(u));H.bounds.equals(u)&&H.value==W&&H.scale==P||(H.bounds=u,H.value=W,H.scale=
+P,H.redraw())}};var U=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){U.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var u=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;",u.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,u.ownerSVGElement))}};var ma=Graph.prototype.refresh;Graph.prototype.refresh=function(){ma.apply(this,
+arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var T=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){T.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(u){"data:action/json,"==u.substring(0,17)&&(u=JSON.parse(u.substring(17)),null!=
+u.actions&&this.executeCustomActions(u.actions))};Graph.prototype.executeCustomActions=function(u,H){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 P=!1,W=0,R=0,da=mxUtils.bind(this,function(){P||(P=!0,this.model.beginUpdate())}),fa=mxUtils.bind(this,
+function(){P&&(P=!1,this.model.endUpdate())}),ea=mxUtils.bind(this,function(){0<W&&W--;0==W&&qa()}),qa=mxUtils.bind(this,function(){if(R<u.length){var va=this.stoppingCustomActions,ua=u[R++],Aa=[];if(null!=ua.open)if(fa(),this.isCustomLink(ua.open)){if(!this.customLinkClicked(ua.open))return}else this.openLink(ua.open);null==ua.wait||va||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;ea()}),W++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,
+""!=ua.wait?parseInt(ua.wait):1E3),fa());null!=ua.opacity&&null!=ua.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(ua.opacity,!0)),ua.opacity.value);null!=ua.fadeIn&&(W++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(ua.fadeIn,!0)),0,1,ea,va?0:ua.fadeIn.delay));null!=ua.fadeOut&&(W++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(ua.fadeOut,!0)),1,0,ea,va?0:ua.fadeOut.delay));null!=ua.wipeIn&&(Aa=Aa.concat(this.createWipeAnimations(this.getCellsForAction(ua.wipeIn,
+!0),!0)));null!=ua.wipeOut&&(Aa=Aa.concat(this.createWipeAnimations(this.getCellsForAction(ua.wipeOut,!0),!1)));null!=ua.toggle&&(da(),this.toggleCells(this.getCellsForAction(ua.toggle,!0)));if(null!=ua.show){da();var za=this.getCellsForAction(ua.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(za),1);this.setCellsVisible(za,!0)}null!=ua.hide&&(da(),za=this.getCellsForAction(ua.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(za),0),this.setCellsVisible(za,!1));null!=ua.toggleStyle&&
+null!=ua.toggleStyle.key&&(da(),this.toggleCellStyles(ua.toggleStyle.key,null!=ua.toggleStyle.defaultValue?ua.toggleStyle.defaultValue:"0",this.getCellsForAction(ua.toggleStyle,!0)));null!=ua.style&&null!=ua.style.key&&(da(),this.setCellStyles(ua.style.key,ua.style.value,this.getCellsForAction(ua.style,!0)));za=[];null!=ua.select&&this.isEnabled()&&(za=this.getCellsForAction(ua.select),this.setSelectionCells(za));null!=ua.highlight&&(za=this.getCellsForAction(ua.highlight),this.highlightCells(za,
+ua.highlight.color,ua.highlight.duration,ua.highlight.opacity));null!=ua.scroll&&(za=this.getCellsForAction(ua.scroll));null!=ua.viewbox&&this.fitWindow(ua.viewbox,ua.viewbox.border);0<za.length&&this.scrollCellToVisible(za[0]);if(null!=ua.tags){za=[];null!=ua.tags.hidden&&(za=za.concat(ua.tags.hidden));if(null!=ua.tags.visible)for(var Ca=this.getAllTags(),sa=0;sa<Ca.length;sa++)0>mxUtils.indexOf(ua.tags.visible,Ca[sa])&&0>mxUtils.indexOf(za,Ca[sa])&&za.push(Ca[sa]);this.setHiddenTags(za);this.refresh()}0<
+Aa.length&&(W++,this.executeAnimations(Aa,ea,va?1:ua.steps,va?0:ua.delay));0==W?qa():fa()}else this.stoppingCustomActions=this.executingCustomActions=!1,fa(),null!=H&&H()});qa()}};Graph.prototype.doUpdateCustomLinksForCell=function(u,H){var P=this.getLinkForCell(H);null!=P&&"data:action/json,"==P.substring(0,17)&&this.setLinkForCell(H,this.updateCustomLink(u,P));if(this.isHtmlLabel(H)){var W=document.createElement("div");W.innerHTML=this.sanitizeHtml(this.getLabel(H));for(var R=W.getElementsByTagName("a"),
+da=!1,fa=0;fa<R.length;fa++)P=R[fa].getAttribute("href"),null!=P&&"data:action/json,"==P.substring(0,17)&&(R[fa].setAttribute("href",this.updateCustomLink(u,P)),da=!0);da&&this.labelChanged(H,W.innerHTML)}};Graph.prototype.updateCustomLink=function(u,H){if("data:action/json,"==H.substring(0,17))try{var P=JSON.parse(H.substring(17));null!=P.actions&&(this.updateCustomLinkActions(u,P.actions),H="data:action/json,"+JSON.stringify(P))}catch(W){}return H};Graph.prototype.updateCustomLinkActions=function(u,
+H){for(var P=0;P<H.length;P++){var W=H[P],R;for(R in W)this.updateCustomLinkAction(u,W[R],"cells"),this.updateCustomLinkAction(u,W[R],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(u,H,P){if(null!=H&&null!=H[P]){for(var W=[],R=0;R<H[P].length;R++)if("*"==H[P][R])W.push(H[P][R]);else{var da=u[H[P][R]];null!=da?""!=da&&W.push(da):W.push(H[P][R])}H[P]=W}};Graph.prototype.getCellsForAction=function(u,H){H=this.getCellsById(u.cells).concat(this.getCellsForTags(u.tags,null,H));if(null!=
+u.excludeCells){for(var P=[],W=0;W<H.length;W++)0>u.excludeCells.indexOf(H[W].id)&&P.push(H[W]);H=P}return H};Graph.prototype.getCellsById=function(u){var H=[];if(null!=u)for(var P=0;P<u.length;P++)if("*"==u[P]){var W=this.model.getRoot();H=H.concat(this.model.filterDescendants(function(da){return da!=W},W))}else{var R=this.model.getCell(u[P]);null!=R&&H.push(R)}return H};var M=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(u){return M.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(u))};
Graph.prototype.setHiddenTags=function(u){this.hiddenTags=u;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(u){var H=mxUtils.indexOf(this.hiddenTags,u);0>H?this.hiddenTags.push(u):0<=H&&this.hiddenTags.splice(H,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(u){if(null==u||0==u.length||0==this.hiddenTags.length)return!1;u=u.split(" ");if(u.length>this.hiddenTags.length)return!1;for(var H=0;H<u.length;H++)if(0>
-mxUtils.indexOf(this.hiddenTags,u[H]))return!1;return!0};Graph.prototype.getCellsForTags=function(u,H,P,S){var R=[];if(null!=u){H=null!=H?H:this.model.getDescendants(this.model.getRoot());for(var ca=0,ea={},fa=0;fa<u.length;fa++)0<u[fa].length&&(ea[u[fa]]=!0,ca++);for(fa=0;fa<H.length;fa++)if(P&&this.model.getParent(H[fa])==this.model.root||this.model.isVertex(H[fa])||this.model.isEdge(H[fa])){var ra=this.getTagsForCell(H[fa]),ua=!1;if(0<ra.length&&(ra=ra.split(" "),ra.length>=u.length)){for(var sa=
-ua=0;sa<ra.length&&ua<ca;sa++)null!=ea[ra[sa]]&&ua++;ua=ua==ca}ua&&(1!=S||this.isCellVisible(H[fa]))&&R.push(H[fa])}}return R};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(u){for(var H=null,P=[],S=0;S<u.length;S++){var R=this.getTagsForCell(u[S]);P=[];if(0<R.length){R=R.split(" ");for(var ca={},ea=0;ea<R.length;ea++)if(null==H||null!=H[R[ea]])ca[R[ea]]=!0,P.push(R[ea]);H=ca}else return[]}return P};
-Graph.prototype.getTagsForCells=function(u){for(var H=[],P={},S=0;S<u.length;S++){var R=this.getTagsForCell(u[S]);if(0<R.length){R=R.split(" ");for(var ca=0;ca<R.length;ca++)null==P[R[ca]]&&(P[R[ca]]=!0,H.push(R[ca]))}}return H};Graph.prototype.getTagsForCell=function(u){return this.getAttributeForCell(u,"tags","")};Graph.prototype.addTagsForCells=function(u,H){if(0<u.length&&0<H.length){this.model.beginUpdate();try{for(var P=0;P<u.length;P++){for(var S=this.getTagsForCell(u[P]),R=S.split(" "),ca=
-!1,ea=0;ea<H.length;ea++){var fa=mxUtils.trim(H[ea]);""!=fa&&0>mxUtils.indexOf(R,fa)&&(S=0<S.length?S+" "+fa:fa,ca=!0)}ca&&this.setAttributeForCell(u[P],"tags",S)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(u,H){if(0<u.length&&0<H.length){this.model.beginUpdate();try{for(var P=0;P<u.length;P++){var S=this.getTagsForCell(u[P]);if(0<S.length){for(var R=S.split(" "),ca=!1,ea=0;ea<H.length;ea++){var fa=mxUtils.indexOf(R,H[ea]);0<=fa&&(R.splice(fa,1),ca=!0)}ca&&this.setAttributeForCell(u[P],
-"tags",R.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(u){this.model.beginUpdate();try{for(var H=0;H<u.length;H++)this.model.setVisible(u[H],!this.model.isVisible(u[H]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(u,H){this.model.beginUpdate();try{for(var P=0;P<u.length;P++)this.model.setVisible(u[P],H)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(u,H,P,S){for(var R=0;R<u.length;R++)this.highlightCell(u[R],
-H,P,S)};Graph.prototype.highlightCell=function(u,H,P,S,R){H=null!=H?H:mxConstants.DEFAULT_VALID_COLOR;P=null!=P?P:1E3;u=this.view.getState(u);var ca=null;null!=u&&(R=null!=R?R:4,R=Math.max(R+1,mxUtils.getValue(u.style,mxConstants.STYLE_STROKEWIDTH,1)+R),ca=new mxCellHighlight(this,H,R,!1),null!=S&&(ca.opacity=S),ca.highlight(u),window.setTimeout(function(){null!=ca.shape&&(mxUtils.setPrefixedStyle(ca.shape.node.style,"transition","all 1200ms ease-in-out"),ca.shape.node.style.opacity=0);window.setTimeout(function(){ca.destroy()},
-1200)},P));return ca};Graph.prototype.addSvgShadow=function(u,H,P,S){P=null!=P?P:!1;S=null!=S?S:!0;var R=u.ownerDocument,ca=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"filter"):R.createElement("filter");ca.setAttribute("id",this.shadowId);var ea=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):R.createElement("feGaussianBlur");ea.setAttribute("in","SourceAlpha");ea.setAttribute("stdDeviation",this.svgShadowBlur);ea.setAttribute("result","blur");ca.appendChild(ea);
-ea=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feOffset"):R.createElement("feOffset");ea.setAttribute("in","blur");ea.setAttribute("dx",this.svgShadowSize);ea.setAttribute("dy",this.svgShadowSize);ea.setAttribute("result","offsetBlur");ca.appendChild(ea);ea=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feFlood"):R.createElement("feFlood");ea.setAttribute("flood-color",this.svgShadowColor);ea.setAttribute("flood-opacity",this.svgShadowOpacity);ea.setAttribute("result",
-"offsetColor");ca.appendChild(ea);ea=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feComposite"):R.createElement("feComposite");ea.setAttribute("in","offsetColor");ea.setAttribute("in2","offsetBlur");ea.setAttribute("operator","in");ea.setAttribute("result","offsetBlur");ca.appendChild(ea);ea=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feBlend"):R.createElement("feBlend");ea.setAttribute("in","SourceGraphic");ea.setAttribute("in2","offsetBlur");ca.appendChild(ea);
-ea=u.getElementsByTagName("defs");0==ea.length?(R=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"defs"):R.createElement("defs"),null!=u.firstChild?u.insertBefore(R,u.firstChild):u.appendChild(R)):R=ea[0];R.appendChild(ca);P||(H=null!=H?H:u.getElementsByTagName("g")[0],null!=H&&(H.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(u.getAttribute("width")))&&S&&(u.setAttribute("width",parseInt(u.getAttribute("width"))+6),u.setAttribute("height",parseInt(u.getAttribute("height"))+
-6),H=u.getAttribute("viewBox"),null!=H&&0<H.length&&(H=H.split(" "),3<H.length&&(w=parseFloat(H[2])+6,h=parseFloat(H[3])+6,u.setAttribute("viewBox",H[0]+" "+H[1]+" "+w+" "+h))))));return ca};Graph.prototype.setShadowVisible=function(u,H){mxClient.IS_SVG&&!mxClient.IS_SF&&(H=null!=H?H:!0,(this.shadowVisible=u)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),H&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=
+mxUtils.indexOf(this.hiddenTags,u[H]))return!1;return!0};Graph.prototype.getCellsForTags=function(u,H,P,W){var R=[];if(null!=u){H=null!=H?H:this.model.getDescendants(this.model.getRoot());for(var da=0,fa={},ea=0;ea<u.length;ea++)0<u[ea].length&&(fa[u[ea]]=!0,da++);for(ea=0;ea<H.length;ea++)if(P&&this.model.getParent(H[ea])==this.model.root||this.model.isVertex(H[ea])||this.model.isEdge(H[ea])){var qa=this.getTagsForCell(H[ea]),va=!1;if(0<qa.length&&(qa=qa.split(" "),qa.length>=u.length)){for(var ua=
+va=0;ua<qa.length&&va<da;ua++)null!=fa[qa[ua]]&&va++;va=va==da}va&&(1!=W||this.isCellVisible(H[ea]))&&R.push(H[ea])}}return R};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(u){for(var H=null,P=[],W=0;W<u.length;W++){var R=this.getTagsForCell(u[W]);P=[];if(0<R.length){R=R.split(" ");for(var da={},fa=0;fa<R.length;fa++)if(null==H||null!=H[R[fa]])da[R[fa]]=!0,P.push(R[fa]);H=da}else return[]}return P};
+Graph.prototype.getTagsForCells=function(u){for(var H=[],P={},W=0;W<u.length;W++){var R=this.getTagsForCell(u[W]);if(0<R.length){R=R.split(" ");for(var da=0;da<R.length;da++)null==P[R[da]]&&(P[R[da]]=!0,H.push(R[da]))}}return H};Graph.prototype.getTagsForCell=function(u){return this.getAttributeForCell(u,"tags","")};Graph.prototype.addTagsForCells=function(u,H){if(0<u.length&&0<H.length){this.model.beginUpdate();try{for(var P=0;P<u.length;P++){for(var W=this.getTagsForCell(u[P]),R=W.split(" "),da=
+!1,fa=0;fa<H.length;fa++){var ea=mxUtils.trim(H[fa]);""!=ea&&0>mxUtils.indexOf(R,ea)&&(W=0<W.length?W+" "+ea:ea,da=!0)}da&&this.setAttributeForCell(u[P],"tags",W)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(u,H){if(0<u.length&&0<H.length){this.model.beginUpdate();try{for(var P=0;P<u.length;P++){var W=this.getTagsForCell(u[P]);if(0<W.length){for(var R=W.split(" "),da=!1,fa=0;fa<H.length;fa++){var ea=mxUtils.indexOf(R,H[fa]);0<=ea&&(R.splice(ea,1),da=!0)}da&&this.setAttributeForCell(u[P],
+"tags",R.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(u){this.model.beginUpdate();try{for(var H=0;H<u.length;H++)this.model.setVisible(u[H],!this.model.isVisible(u[H]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(u,H){this.model.beginUpdate();try{for(var P=0;P<u.length;P++)this.model.setVisible(u[P],H)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(u,H,P,W){for(var R=0;R<u.length;R++)this.highlightCell(u[R],
+H,P,W)};Graph.prototype.highlightCell=function(u,H,P,W,R){H=null!=H?H:mxConstants.DEFAULT_VALID_COLOR;P=null!=P?P:1E3;u=this.view.getState(u);var da=null;null!=u&&(R=null!=R?R:4,R=Math.max(R+1,mxUtils.getValue(u.style,mxConstants.STYLE_STROKEWIDTH,1)+R),da=new mxCellHighlight(this,H,R,!1),null!=W&&(da.opacity=W),da.highlight(u),window.setTimeout(function(){null!=da.shape&&(mxUtils.setPrefixedStyle(da.shape.node.style,"transition","all 1200ms ease-in-out"),da.shape.node.style.opacity=0);window.setTimeout(function(){da.destroy()},
+1200)},P));return da};Graph.prototype.addSvgShadow=function(u,H,P,W){P=null!=P?P:!1;W=null!=W?W:!0;var R=u.ownerDocument,da=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"filter"):R.createElement("filter");da.setAttribute("id",this.shadowId);var fa=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):R.createElement("feGaussianBlur");fa.setAttribute("in","SourceAlpha");fa.setAttribute("stdDeviation",this.svgShadowBlur);fa.setAttribute("result","blur");da.appendChild(fa);
+fa=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feOffset"):R.createElement("feOffset");fa.setAttribute("in","blur");fa.setAttribute("dx",this.svgShadowSize);fa.setAttribute("dy",this.svgShadowSize);fa.setAttribute("result","offsetBlur");da.appendChild(fa);fa=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feFlood"):R.createElement("feFlood");fa.setAttribute("flood-color",this.svgShadowColor);fa.setAttribute("flood-opacity",this.svgShadowOpacity);fa.setAttribute("result",
+"offsetColor");da.appendChild(fa);fa=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feComposite"):R.createElement("feComposite");fa.setAttribute("in","offsetColor");fa.setAttribute("in2","offsetBlur");fa.setAttribute("operator","in");fa.setAttribute("result","offsetBlur");da.appendChild(fa);fa=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feBlend"):R.createElement("feBlend");fa.setAttribute("in","SourceGraphic");fa.setAttribute("in2","offsetBlur");da.appendChild(fa);
+fa=u.getElementsByTagName("defs");0==fa.length?(R=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"defs"):R.createElement("defs"),null!=u.firstChild?u.insertBefore(R,u.firstChild):u.appendChild(R)):R=fa[0];R.appendChild(da);P||(H=null!=H?H:u.getElementsByTagName("g")[0],null!=H&&(H.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(u.getAttribute("width")))&&W&&(u.setAttribute("width",parseInt(u.getAttribute("width"))+6),u.setAttribute("height",parseInt(u.getAttribute("height"))+
+6),H=u.getAttribute("viewBox"),null!=H&&0<H.length&&(H=H.split(" "),3<H.length&&(w=parseFloat(H[2])+6,h=parseFloat(H[3])+6,u.setAttribute("viewBox",H[0]+" "+H[1]+" "+w+" "+h))))));return da};Graph.prototype.setShadowVisible=function(u,H){mxClient.IS_SVG&&!mxClient.IS_SF&&(H=null!=H?H:!0,(this.shadowVisible=u)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),H&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=
function(){if(null==this.defaultParent){var u=this.model.getChildCount(this.model.root),H=0;do var P=this.model.getChildAt(this.model.root,H);while(H++<u&&"1"==mxUtils.getValue(this.getCellStyle(P),"locked","0"));null!=P&&this.setDefaultParent(P)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=
[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.bpmn2=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.c4=[SHAPES_PATH+"/mxC4.js"];mxStencilRegistry.libraries.cisco19=[SHAPES_PATH+"/mxCisco19.js",STENCIL_PATH+"/cisco19.xml"];mxStencilRegistry.libraries.cisco_safe=[SHAPES_PATH+"/mxCiscoSafe.js",STENCIL_PATH+"/cisco_safe/architecture.xml",STENCIL_PATH+"/cisco_safe/business_icons.xml",
STENCIL_PATH+"/cisco_safe/capability.xml",STENCIL_PATH+"/cisco_safe/design.xml",STENCIL_PATH+"/cisco_safe/iot_things_icons.xml",STENCIL_PATH+"/cisco_safe/people_places_things_icons.xml",STENCIL_PATH+"/cisco_safe/security_icons.xml",STENCIL_PATH+"/cisco_safe/technology_icons.xml",STENCIL_PATH+"/cisco_safe/threat.xml"];mxStencilRegistry.libraries.dfd=[SHAPES_PATH+"/mxDFD.js"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.kubernetes=[SHAPES_PATH+"/mxKubernetes.js",
@@ -3330,36 +3333,36 @@ STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[S
STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.ibm=[SHAPES_PATH+"/mxIBM.js",STENCIL_PATH+"/ibm.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];
mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=
[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.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(u){var H=null;null!=u&&0<u.length&&("ER"==u.substring(0,2)?H="mxgraph.er":"sysML"==u.substring(0,5)&&(H="mxgraph.sysml"));return H};var da=mxMarker.createMarker;mxMarker.createMarker=
-function(u,H,P,S,R,ca,ea,fa,ra,ua){if(null!=P&&null==mxMarker.markers[P]){var sa=this.getPackageForType(P);null!=sa&&mxStencilRegistry.getStencil(sa)}return da.apply(this,arguments)};var O=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(u,H,P,S,R,ca){"1"==mxUtils.getValue(H.style,"lineShape",null)&&u.setFillColor(mxUtils.getValue(H.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return O.apply(this,arguments)};PrintDialog.prototype.create=function(u,H){function P(){Ca.value=
-Math.max(1,Math.min(fa,Math.max(parseInt(Ca.value),parseInt(Aa.value))));Aa.value=Math.max(1,Math.min(fa,Math.min(parseInt(Ca.value),parseInt(Aa.value))))}function S(za){function Da(ab,db,kb){var ib=ab.useCssTransforms,ob=ab.currentTranslate,vb=ab.currentScale,nb=ab.view.translate,Bb=ab.view.scale;ab.useCssTransforms&&(ab.useCssTransforms=!1,ab.currentTranslate=new mxPoint(0,0),ab.currentScale=1,ab.view.translate=new mxPoint(0,0),ab.view.scale=1);var yb=ab.getGraphBounds(),mb=0,pb=0,gb=va.get(),rb=
-1/ab.pageScale,tb=Oa.checked;if(tb){rb=parseInt(ia.value);var zb=parseInt(na.value);rb=Math.min(gb.height*zb/(yb.height/ab.view.scale),gb.width*rb/(yb.width/ab.view.scale))}else rb=parseInt(Ta.value)/(100*ab.pageScale),isNaN(rb)&&(Ma=1/ab.pageScale,Ta.value="100 %");gb=mxRectangle.fromRectangle(gb);gb.width=Math.ceil(gb.width*Ma);gb.height=Math.ceil(gb.height*Ma);rb*=Ma;!tb&&ab.pageVisible?(yb=ab.getPageLayout(),mb-=yb.x*gb.width,pb-=yb.y*gb.height):tb=!0;if(null==db){db=PrintDialog.createPrintPreview(ab,
-rb,gb,0,mb,pb,tb);db.pageSelector=!1;db.mathEnabled=!1;Ba.checked&&(db.isCellVisible=function(lb){return ab.isCellSelected(lb)});mb=u.getCurrentFile();null!=mb&&(db.title=mb.getTitle());var wb=db.writeHead;db.writeHead=function(lb){wb.apply(this,arguments);mxClient.IS_GC&&(lb.writeln('<style type="text/css">'),lb.writeln("@media print {"),lb.writeln(".MathJax svg { shape-rendering: crispEdges; }"),lb.writeln("}"),lb.writeln("</style>"));null!=u.editor.fontCss&&(lb.writeln('<style type="text/css">'),
-lb.writeln(u.editor.fontCss),lb.writeln("</style>"));for(var xb=ab.getCustomFonts(),c=0;c<xb.length;c++){var l=xb[c].name,x=xb[c].url;Graph.isCssFontUrl(x)?lb.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(x)+'" charset="UTF-8" type="text/css">'):(lb.writeln('<style type="text/css">'),lb.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(l)+'";\nsrc: url("'+mxUtils.htmlEntities(x)+'");\n}'),lb.writeln("</style>"))}};if("undefined"!==typeof MathJax){var Ab=db.renderPage;db.renderPage=
-function(lb,xb,c,l,x,p){var v=mxClient.NO_FO,A=Ab.apply(this,arguments);mxClient.NO_FO=v;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:A.className="geDisableMathJax";return A}}mb=null;pb=R.shapeForegroundColor;tb=R.shapeBackgroundColor;gb=R.enableFlowAnimation;R.enableFlowAnimation=!1;null!=R.themes&&"darkTheme"==R.defaultThemeName&&(mb=R.stylesheet,R.stylesheet=R.getDefaultStylesheet(),R.shapeForegroundColor="#000000",R.shapeBackgroundColor="#ffffff",R.refresh());db.open(null,null,
-kb,!0);R.enableFlowAnimation=gb;null!=mb&&(R.shapeForegroundColor=pb,R.shapeBackgroundColor=tb,R.stylesheet=mb,R.refresh())}else{gb=ab.background;if(null==gb||""==gb||gb==mxConstants.NONE)gb="#ffffff";db.backgroundColor=gb;db.autoOrigin=tb;db.appendGraph(ab,rb,mb,pb,kb,!0);kb=ab.getCustomFonts();if(null!=db.wnd)for(mb=0;mb<kb.length;mb++)pb=kb[mb].name,tb=kb[mb].url,Graph.isCssFontUrl(tb)?db.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(tb)+'" charset="UTF-8" type="text/css">'):
-(db.wnd.document.writeln('<style type="text/css">'),db.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(pb)+'";\nsrc: url("'+mxUtils.htmlEntities(tb)+'");\n}'),db.wnd.document.writeln("</style>"))}ib&&(ab.useCssTransforms=ib,ab.currentTranslate=ob,ab.currentScale=vb,ab.view.translate=nb,ab.view.scale=Bb);return db}var Ma=parseInt(pa.value)/100;isNaN(Ma)&&(Ma=1,pa.value="100 %");Ma*=.75;var La=null,Ua=R.shapeForegroundColor,Sa=R.shapeBackgroundColor;null!=R.themes&&"darkTheme"==
-R.defaultThemeName&&(La=R.stylesheet,R.stylesheet=R.getDefaultStylesheet(),R.shapeForegroundColor="#000000",R.shapeBackgroundColor="#ffffff",R.refresh());var Fa=Aa.value,wa=Ca.value,ya=!ua.checked,Na=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(u,ua.checked,Fa,wa,Oa.checked,ia.value,na.value,parseInt(Ta.value)/100,parseInt(pa.value)/100,va.get());else{ya&&(ya=Ba.checked||Fa==ra&&wa==ra);if(!ya&&null!=u.pages&&u.pages.length){var Ja=0;ya=u.pages.length-1;ua.checked||(Ja=parseInt(Fa)-1,
-ya=parseInt(wa)-1);for(var Qa=Ja;Qa<=ya;Qa++){var Za=u.pages[Qa];Fa=Za==u.currentPage?R:null;if(null==Fa){Fa=u.createTemporaryGraph(R.stylesheet);Fa.shapeForegroundColor=R.shapeForegroundColor;Fa.shapeBackgroundColor=R.shapeBackgroundColor;wa=!0;Ja=!1;var cb=null,fb=null;null==Za.viewState&&null==Za.root&&u.updatePageRoot(Za);null!=Za.viewState&&(wa=Za.viewState.pageVisible,Ja=Za.viewState.mathEnabled,cb=Za.viewState.background,fb=Za.viewState.backgroundImage,Fa.extFonts=Za.viewState.extFonts);null!=
-fb&&null!=fb.originalSrc&&(fb=u.createImageForPageLink(fb.originalSrc,Za));Fa.background=cb;Fa.backgroundImage=null!=fb?new mxImage(fb.src,fb.width,fb.height,fb.x,fb.y):null;Fa.pageVisible=wa;Fa.mathEnabled=Ja;var qb=Fa.getGraphBounds;Fa.getGraphBounds=function(){var ab=qb.apply(this,arguments),db=this.backgroundImage;if(null!=db&&null!=db.width&&null!=db.height){var kb=this.view.translate,ib=this.view.scale;ab=mxRectangle.fromRectangle(ab);ab.add(new mxRectangle((kb.x+db.x)*ib,(kb.y+db.y)*ib,db.width*
-ib,db.height*ib))}return ab};var ub=Fa.getGlobalVariable;Fa.getGlobalVariable=function(ab){return"page"==ab?Za.getName():"pagenumber"==ab?Qa+1:"pagecount"==ab?null!=u.pages?u.pages.length:1:ub.apply(this,arguments)};document.body.appendChild(Fa.container);u.updatePageRoot(Za);Fa.model.setRoot(Za.root)}Na=Da(Fa,Na,Qa!=ya);Fa!=R&&Fa.container.parentNode.removeChild(Fa.container)}}else Na=Da(R);null==Na?u.handleError({message:mxResources.get("errorUpdatingPreview")}):(Na.mathEnabled&&(ya=Na.wnd.document,
-za&&(Na.wnd.IMMEDIATE_PRINT=!0),ya.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),Na.closeDocument(),!Na.mathEnabled&&za&&PrintDialog.printPreview(Na));null!=La&&(R.shapeForegroundColor=Ua,R.shapeBackgroundColor=Sa,R.stylesheet=La,R.refresh())}}var R=u.editor.graph,ca=document.createElement("div"),ea=document.createElement("h3");ea.style.width="100%";ea.style.textAlign="center";ea.style.marginTop="0px";mxUtils.write(ea,H||mxResources.get("print"));
-ca.appendChild(ea);var fa=1,ra=1;ea=document.createElement("div");ea.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var ua=document.createElement("input");ua.style.cssText="margin-right:8px;margin-bottom:8px;";ua.setAttribute("value","all");ua.setAttribute("type","radio");ua.setAttribute("name","pages-printdialog");ea.appendChild(ua);H=document.createElement("span");mxUtils.write(H,mxResources.get("printAllPages"));ea.appendChild(H);mxUtils.br(ea);var sa=
-ua.cloneNode(!0);ua.setAttribute("checked","checked");sa.setAttribute("value","range");ea.appendChild(sa);H=document.createElement("span");mxUtils.write(H,mxResources.get("pages")+":");ea.appendChild(H);var Aa=document.createElement("input");Aa.style.cssText="margin:0 8px 0 8px;";Aa.setAttribute("value","1");Aa.setAttribute("type","number");Aa.setAttribute("min","1");Aa.style.width="50px";ea.appendChild(Aa);H=document.createElement("span");mxUtils.write(H,mxResources.get("to"));ea.appendChild(H);
-var Ca=Aa.cloneNode(!0);ea.appendChild(Ca);mxEvent.addListener(Aa,"focus",function(){sa.checked=!0});mxEvent.addListener(Ca,"focus",function(){sa.checked=!0});mxEvent.addListener(Aa,"change",P);mxEvent.addListener(Ca,"change",P);if(null!=u.pages&&(fa=u.pages.length,null!=u.currentPage))for(H=0;H<u.pages.length;H++)if(u.currentPage==u.pages[H]){ra=H+1;Aa.value=ra;Ca.value=ra;break}Aa.setAttribute("max",fa);Ca.setAttribute("max",fa);u.isPagesEnabled()?1<fa&&(ca.appendChild(ea),sa.checked=!0):sa.checked=
-!0;mxUtils.br(ea);var Ba=document.createElement("input");Ba.setAttribute("value","all");Ba.setAttribute("type","radio");Ba.style.marginRight="8px";R.isSelectionEmpty()&&Ba.setAttribute("disabled","disabled");var ta=document.createElement("div");ta.style.marginBottom="10px";1==fa?(Ba.setAttribute("type","checkbox"),Ba.style.marginBottom="12px",ta.appendChild(Ba)):(Ba.setAttribute("name","pages-printdialog"),Ba.style.marginBottom="8px",ea.appendChild(Ba));H=document.createElement("span");mxUtils.write(H,
-mxResources.get("selectionOnly"));Ba.parentNode.appendChild(H);1==fa&&mxUtils.br(Ba.parentNode);var Pa=document.createElement("input");Pa.style.marginRight="8px";Pa.setAttribute("value","adjust");Pa.setAttribute("type","radio");Pa.setAttribute("name","printZoom");ta.appendChild(Pa);H=document.createElement("span");mxUtils.write(H,mxResources.get("adjustTo"));ta.appendChild(H);var Ta=document.createElement("input");Ta.style.cssText="margin:0 8px 0 8px;";Ta.setAttribute("value","100 %");Ta.style.width=
-"50px";ta.appendChild(Ta);mxEvent.addListener(Ta,"focus",function(){Pa.checked=!0});ca.appendChild(ta);ea=ea.cloneNode(!1);var Oa=Pa.cloneNode(!0);Oa.setAttribute("value","fit");Pa.setAttribute("checked","checked");H=document.createElement("div");H.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";H.appendChild(Oa);ea.appendChild(H);ta=document.createElement("table");ta.style.display="inline-block";var Xa=document.createElement("tbody"),Ga=document.createElement("tr"),eb=Ga.cloneNode(!0),
-bb=document.createElement("td"),z=bb.cloneNode(!0),K=bb.cloneNode(!0),M=bb.cloneNode(!0),T=bb.cloneNode(!0),V=bb.cloneNode(!0);bb.style.textAlign="right";M.style.textAlign="right";mxUtils.write(bb,mxResources.get("fitTo"));var ia=document.createElement("input");ia.style.cssText="margin:0 8px 0 8px;";ia.setAttribute("value","1");ia.setAttribute("min","1");ia.setAttribute("type","number");ia.style.width="40px";z.appendChild(ia);H=document.createElement("span");mxUtils.write(H,mxResources.get("fitToSheetsAcross"));
-K.appendChild(H);mxUtils.write(M,mxResources.get("fitToBy"));var na=ia.cloneNode(!0);T.appendChild(na);mxEvent.addListener(ia,"focus",function(){Oa.checked=!0});mxEvent.addListener(na,"focus",function(){Oa.checked=!0});H=document.createElement("span");mxUtils.write(H,mxResources.get("fitToSheetsDown"));V.appendChild(H);Ga.appendChild(bb);Ga.appendChild(z);Ga.appendChild(K);eb.appendChild(M);eb.appendChild(T);eb.appendChild(V);Xa.appendChild(Ga);Xa.appendChild(eb);ta.appendChild(Xa);ea.appendChild(ta);
-ca.appendChild(ea);ea=document.createElement("div");H=document.createElement("div");H.style.fontWeight="bold";H.style.marginBottom="12px";mxUtils.write(H,mxResources.get("paperSize"));ea.appendChild(H);H=document.createElement("div");H.style.marginBottom="12px";var va=PageSetupDialog.addPageFormatPanel(H,"printdialog",u.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);ea.appendChild(H);H=document.createElement("span");mxUtils.write(H,mxResources.get("pageScale"));ea.appendChild(H);var pa=
-document.createElement("input");pa.style.cssText="margin:0 8px 0 8px;";pa.setAttribute("value","100 %");pa.style.width="60px";ea.appendChild(pa);ca.appendChild(ea);H=document.createElement("div");H.style.cssText="text-align:right;margin:48px 0 0 0;";ea=mxUtils.button(mxResources.get("cancel"),function(){u.hideDialog()});ea.className="geBtn";u.editor.cancelFirst&&H.appendChild(ea);u.isOffline()||(ta=mxUtils.button(mxResources.get("help"),function(){R.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),
-ta.className="geBtn",H.appendChild(ta));PrintDialog.previewEnabled&&(ta=mxUtils.button(mxResources.get("preview"),function(){u.hideDialog();S(!1)}),ta.className="geBtn",H.appendChild(ta));ta=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){u.hideDialog();S(!0)});ta.className="geBtn gePrimaryBtn";H.appendChild(ta);u.editor.cancelFirst||H.appendChild(ea);ca.appendChild(H);this.container=ca};var N=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==
+"/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(u){var H=null;null!=u&&0<u.length&&("ER"==u.substring(0,2)?H="mxgraph.er":"sysML"==u.substring(0,5)&&(H="mxgraph.sysml"));return H};var ia=mxMarker.createMarker;mxMarker.createMarker=
+function(u,H,P,W,R,da,fa,ea,qa,va){if(null!=P&&null==mxMarker.markers[P]){var ua=this.getPackageForType(P);null!=ua&&mxStencilRegistry.getStencil(ua)}return ia.apply(this,arguments)};var N=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(u,H,P,W,R,da){"1"==mxUtils.getValue(H.style,"lineShape",null)&&u.setFillColor(mxUtils.getValue(H.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return N.apply(this,arguments)};PrintDialog.prototype.create=function(u,H){function P(){za.value=
+Math.max(1,Math.min(ea,Math.max(parseInt(za.value),parseInt(Aa.value))));Aa.value=Math.max(1,Math.min(ea,Math.min(parseInt(za.value),parseInt(Aa.value))))}function W(ta){function Da(bb,eb,kb){var ib=bb.useCssTransforms,pb=bb.currentTranslate,vb=bb.currentScale,ob=bb.view.translate,Bb=bb.view.scale;bb.useCssTransforms&&(bb.useCssTransforms=!1,bb.currentTranslate=new mxPoint(0,0),bb.currentScale=1,bb.view.translate=new mxPoint(0,0),bb.view.scale=1);var yb=bb.getGraphBounds(),nb=0,qb=0,fb=ya.get(),rb=
+1/bb.pageScale,tb=Ra.checked;if(tb){rb=parseInt(ja.value);var zb=parseInt(na.value);rb=Math.min(fb.height*zb/(yb.height/bb.view.scale),fb.width*rb/(yb.width/bb.view.scale))}else rb=parseInt(Ua.value)/(100*bb.pageScale),isNaN(rb)&&(Oa=1/bb.pageScale,Ua.value="100 %");fb=mxRectangle.fromRectangle(fb);fb.width=Math.ceil(fb.width*Oa);fb.height=Math.ceil(fb.height*Oa);rb*=Oa;!tb&&bb.pageVisible?(yb=bb.getPageLayout(),nb-=yb.x*fb.width,qb-=yb.y*fb.height):tb=!0;if(null==eb){eb=PrintDialog.createPrintPreview(bb,
+rb,fb,0,nb,qb,tb);eb.pageSelector=!1;eb.mathEnabled=!1;Ca.checked&&(eb.isCellVisible=function(lb){return bb.isCellSelected(lb)});nb=u.getCurrentFile();null!=nb&&(eb.title=nb.getTitle());var wb=eb.writeHead;eb.writeHead=function(lb){wb.apply(this,arguments);mxClient.IS_GC&&(lb.writeln('<style type="text/css">'),lb.writeln("@media print {"),lb.writeln(".MathJax svg { shape-rendering: crispEdges; }"),lb.writeln("}"),lb.writeln("</style>"));null!=u.editor.fontCss&&(lb.writeln('<style type="text/css">'),
+lb.writeln(u.editor.fontCss),lb.writeln("</style>"));for(var xb=bb.getCustomFonts(),c=0;c<xb.length;c++){var l=xb[c].name,x=xb[c].url;Graph.isCssFontUrl(x)?lb.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(x)+'" charset="UTF-8" type="text/css">'):(lb.writeln('<style type="text/css">'),lb.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(l)+'";\nsrc: url("'+mxUtils.htmlEntities(x)+'");\n}'),lb.writeln("</style>"))}};if("undefined"!==typeof MathJax){var Ab=eb.renderPage;eb.renderPage=
+function(lb,xb,c,l,x,p){var v=mxClient.NO_FO,A=Ab.apply(this,arguments);mxClient.NO_FO=v;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:A.className="geDisableMathJax";return A}}nb=null;qb=R.shapeForegroundColor;tb=R.shapeBackgroundColor;fb=R.enableFlowAnimation;R.enableFlowAnimation=!1;null!=R.themes&&"darkTheme"==R.defaultThemeName&&(nb=R.stylesheet,R.stylesheet=R.getDefaultStylesheet(),R.shapeForegroundColor="#000000",R.shapeBackgroundColor="#ffffff",R.refresh());eb.open(null,null,
+kb,!0);R.enableFlowAnimation=fb;null!=nb&&(R.shapeForegroundColor=qb,R.shapeBackgroundColor=tb,R.stylesheet=nb,R.refresh())}else{fb=bb.background;if(null==fb||""==fb||fb==mxConstants.NONE)fb="#ffffff";eb.backgroundColor=fb;eb.autoOrigin=tb;eb.appendGraph(bb,rb,nb,qb,kb,!0);kb=bb.getCustomFonts();if(null!=eb.wnd)for(nb=0;nb<kb.length;nb++)qb=kb[nb].name,tb=kb[nb].url,Graph.isCssFontUrl(tb)?eb.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(tb)+'" charset="UTF-8" type="text/css">'):
+(eb.wnd.document.writeln('<style type="text/css">'),eb.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(qb)+'";\nsrc: url("'+mxUtils.htmlEntities(tb)+'");\n}'),eb.wnd.document.writeln("</style>"))}ib&&(bb.useCssTransforms=ib,bb.currentTranslate=pb,bb.currentScale=vb,bb.view.translate=ob,bb.view.scale=Bb);return eb}var Oa=parseInt(ra.value)/100;isNaN(Oa)&&(Oa=1,ra.value="100 %");Oa*=.75;var Ma=null,Wa=R.shapeForegroundColor,Sa=R.shapeBackgroundColor;null!=R.themes&&"darkTheme"==
+R.defaultThemeName&&(Ma=R.stylesheet,R.stylesheet=R.getDefaultStylesheet(),R.shapeForegroundColor="#000000",R.shapeBackgroundColor="#ffffff",R.refresh());var Fa=Aa.value,Ja=za.value,xa=!va.checked,Ba=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(u,va.checked,Fa,Ja,Ra.checked,ja.value,na.value,parseInt(Ua.value)/100,parseInt(ra.value)/100,ya.get());else{xa&&(xa=Ca.checked||Fa==qa&&Ja==qa);if(!xa&&null!=u.pages&&u.pages.length){var Pa=0;xa=u.pages.length-1;va.checked||(Pa=parseInt(Fa)-1,
+xa=parseInt(Ja)-1);for(var Ka=Pa;Ka<=xa;Ka++){var Na=u.pages[Ka];Fa=Na==u.currentPage?R:null;if(null==Fa){Fa=u.createTemporaryGraph(R.stylesheet);Fa.shapeForegroundColor=R.shapeForegroundColor;Fa.shapeBackgroundColor=R.shapeBackgroundColor;Ja=!0;Pa=!1;var hb=null,Qa=null;null==Na.viewState&&null==Na.root&&u.updatePageRoot(Na);null!=Na.viewState&&(Ja=Na.viewState.pageVisible,Pa=Na.viewState.mathEnabled,hb=Na.viewState.background,Qa=Na.viewState.backgroundImage,Fa.extFonts=Na.viewState.extFonts);null!=
+Qa&&null!=Qa.originalSrc&&(Qa=u.createImageForPageLink(Qa.originalSrc,Na));Fa.background=hb;Fa.backgroundImage=null!=Qa?new mxImage(Qa.src,Qa.width,Qa.height,Qa.x,Qa.y):null;Fa.pageVisible=Ja;Fa.mathEnabled=Pa;var mb=Fa.getGraphBounds;Fa.getGraphBounds=function(){var bb=mb.apply(this,arguments),eb=this.backgroundImage;if(null!=eb&&null!=eb.width&&null!=eb.height){var kb=this.view.translate,ib=this.view.scale;bb=mxRectangle.fromRectangle(bb);bb.add(new mxRectangle((kb.x+eb.x)*ib,(kb.y+eb.y)*ib,eb.width*
+ib,eb.height*ib))}return bb};var ub=Fa.getGlobalVariable;Fa.getGlobalVariable=function(bb){return"page"==bb?Na.getName():"pagenumber"==bb?Ka+1:"pagecount"==bb?null!=u.pages?u.pages.length:1:ub.apply(this,arguments)};document.body.appendChild(Fa.container);u.updatePageRoot(Na);Fa.model.setRoot(Na.root)}Ba=Da(Fa,Ba,Ka!=xa);Fa!=R&&Fa.container.parentNode.removeChild(Fa.container)}}else Ba=Da(R);null==Ba?u.handleError({message:mxResources.get("errorUpdatingPreview")}):(Ba.mathEnabled&&(xa=Ba.wnd.document,
+ta&&(Ba.wnd.IMMEDIATE_PRINT=!0),xa.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),Ba.closeDocument(),!Ba.mathEnabled&&ta&&PrintDialog.printPreview(Ba));null!=Ma&&(R.shapeForegroundColor=Wa,R.shapeBackgroundColor=Sa,R.stylesheet=Ma,R.refresh())}}var R=u.editor.graph,da=document.createElement("div"),fa=document.createElement("h3");fa.style.width="100%";fa.style.textAlign="center";fa.style.marginTop="0px";mxUtils.write(fa,H||mxResources.get("print"));
+da.appendChild(fa);var ea=1,qa=1;fa=document.createElement("div");fa.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var va=document.createElement("input");va.style.cssText="margin-right:8px;margin-bottom:8px;";va.setAttribute("value","all");va.setAttribute("type","radio");va.setAttribute("name","pages-printdialog");fa.appendChild(va);H=document.createElement("span");mxUtils.write(H,mxResources.get("printAllPages"));fa.appendChild(H);mxUtils.br(fa);var ua=
+va.cloneNode(!0);va.setAttribute("checked","checked");ua.setAttribute("value","range");fa.appendChild(ua);H=document.createElement("span");mxUtils.write(H,mxResources.get("pages")+":");fa.appendChild(H);var Aa=document.createElement("input");Aa.style.cssText="margin:0 8px 0 8px;";Aa.setAttribute("value","1");Aa.setAttribute("type","number");Aa.setAttribute("min","1");Aa.style.width="50px";fa.appendChild(Aa);H=document.createElement("span");mxUtils.write(H,mxResources.get("to"));fa.appendChild(H);
+var za=Aa.cloneNode(!0);fa.appendChild(za);mxEvent.addListener(Aa,"focus",function(){ua.checked=!0});mxEvent.addListener(za,"focus",function(){ua.checked=!0});mxEvent.addListener(Aa,"change",P);mxEvent.addListener(za,"change",P);if(null!=u.pages&&(ea=u.pages.length,null!=u.currentPage))for(H=0;H<u.pages.length;H++)if(u.currentPage==u.pages[H]){qa=H+1;Aa.value=qa;za.value=qa;break}Aa.setAttribute("max",ea);za.setAttribute("max",ea);u.isPagesEnabled()?1<ea&&(da.appendChild(fa),ua.checked=!0):ua.checked=
+!0;mxUtils.br(fa);var Ca=document.createElement("input");Ca.setAttribute("value","all");Ca.setAttribute("type","radio");Ca.style.marginRight="8px";R.isSelectionEmpty()&&Ca.setAttribute("disabled","disabled");var sa=document.createElement("div");sa.style.marginBottom="10px";1==ea?(Ca.setAttribute("type","checkbox"),Ca.style.marginBottom="12px",sa.appendChild(Ca)):(Ca.setAttribute("name","pages-printdialog"),Ca.style.marginBottom="8px",fa.appendChild(Ca));H=document.createElement("span");mxUtils.write(H,
+mxResources.get("selectionOnly"));Ca.parentNode.appendChild(H);1==ea&&mxUtils.br(Ca.parentNode);var Va=document.createElement("input");Va.style.marginRight="8px";Va.setAttribute("value","adjust");Va.setAttribute("type","radio");Va.setAttribute("name","printZoom");sa.appendChild(Va);H=document.createElement("span");mxUtils.write(H,mxResources.get("adjustTo"));sa.appendChild(H);var Ua=document.createElement("input");Ua.style.cssText="margin:0 8px 0 8px;";Ua.setAttribute("value","100 %");Ua.style.width=
+"50px";sa.appendChild(Ua);mxEvent.addListener(Ua,"focus",function(){Va.checked=!0});da.appendChild(sa);fa=fa.cloneNode(!1);var Ra=Va.cloneNode(!0);Ra.setAttribute("value","fit");Va.setAttribute("checked","checked");H=document.createElement("div");H.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";H.appendChild(Ra);fa.appendChild(H);sa=document.createElement("table");sa.style.display="inline-block";var Za=document.createElement("tbody"),Ha=document.createElement("tr"),db=Ha.cloneNode(!0),
+cb=document.createElement("td"),z=cb.cloneNode(!0),K=cb.cloneNode(!0),L=cb.cloneNode(!0),S=cb.cloneNode(!0),V=cb.cloneNode(!0);cb.style.textAlign="right";L.style.textAlign="right";mxUtils.write(cb,mxResources.get("fitTo"));var ja=document.createElement("input");ja.style.cssText="margin:0 8px 0 8px;";ja.setAttribute("value","1");ja.setAttribute("min","1");ja.setAttribute("type","number");ja.style.width="40px";z.appendChild(ja);H=document.createElement("span");mxUtils.write(H,mxResources.get("fitToSheetsAcross"));
+K.appendChild(H);mxUtils.write(L,mxResources.get("fitToBy"));var na=ja.cloneNode(!0);S.appendChild(na);mxEvent.addListener(ja,"focus",function(){Ra.checked=!0});mxEvent.addListener(na,"focus",function(){Ra.checked=!0});H=document.createElement("span");mxUtils.write(H,mxResources.get("fitToSheetsDown"));V.appendChild(H);Ha.appendChild(cb);Ha.appendChild(z);Ha.appendChild(K);db.appendChild(L);db.appendChild(S);db.appendChild(V);Za.appendChild(Ha);Za.appendChild(db);sa.appendChild(Za);fa.appendChild(sa);
+da.appendChild(fa);fa=document.createElement("div");H=document.createElement("div");H.style.fontWeight="bold";H.style.marginBottom="12px";mxUtils.write(H,mxResources.get("paperSize"));fa.appendChild(H);H=document.createElement("div");H.style.marginBottom="12px";var ya=PageSetupDialog.addPageFormatPanel(H,"printdialog",u.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);fa.appendChild(H);H=document.createElement("span");mxUtils.write(H,mxResources.get("pageScale"));fa.appendChild(H);var ra=
+document.createElement("input");ra.style.cssText="margin:0 8px 0 8px;";ra.setAttribute("value","100 %");ra.style.width="60px";fa.appendChild(ra);da.appendChild(fa);H=document.createElement("div");H.style.cssText="text-align:right;margin:48px 0 0 0;";fa=mxUtils.button(mxResources.get("cancel"),function(){u.hideDialog()});fa.className="geBtn";u.editor.cancelFirst&&H.appendChild(fa);u.isOffline()||(sa=mxUtils.button(mxResources.get("help"),function(){R.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),
+sa.className="geBtn",H.appendChild(sa));PrintDialog.previewEnabled&&(sa=mxUtils.button(mxResources.get("preview"),function(){u.hideDialog();W(!1)}),sa.className="geBtn",H.appendChild(sa));sa=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){u.hideDialog();W(!0)});sa.className="geBtn gePrimaryBtn";H.appendChild(sa);u.editor.cancelFirst||H.appendChild(fa);da.appendChild(H);this.container=da};var O=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 u=this.image;null!=u&&null!=u.src&&Graph.isPageLink(u.src)&&(u={originalSrc:u.src});this.page.viewState.backgroundImage=u}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 aa=document.createElement("canvas"),ma=new Image;ma.onload=function(){try{aa.getContext("2d").drawImage(ma,
-0,0);var u=aa.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=u&&6<u.length}catch(H){}};ma.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(u){}})();
+this.shadowVisible)}}else O.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 ba=document.createElement("canvas"),la=new Image;la.onload=function(){try{ba.getContext("2d").drawImage(la,
+0,0);var u=ba.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=u&&6<u.length}catch(H){}};la.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(u){}})();
(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(e,k,n){n.ui=e.ui;return k};b.afterDecode=function(e,k,n){n.previousColor=n.color;n.previousImage=n.image;n.previousFormat=n.format;null!=n.foldingEnabled&&(n.foldingEnabled=!n.foldingEnabled);null!=n.mathEnabled&&(n.mathEnabled=!n.mathEnabled);null!=n.shadowVisible&&(n.shadowVisible=!n.shadowVisible);return n};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,k,n){n.ui=e.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.0.2";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(e,k,n){n.ui=e.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.0.3";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=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&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;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(d,f,g,m,q,y,F){y=null!=y?y:0<=d.indexOf("NetworkError")||0<=d.indexOf("SecurityError")||0<=d.indexOf("NS_ERROR_FAILURE")||0<=d.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
@@ -3375,7 +3378,7 @@ d;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prot
this.editor.graph.defaultMathEnabled=d;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(d){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(d){return this.isOfflineApp()||!navigator.onLine||!d&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};
EditorUi.prototype.createSpinner=function(d,f,g){var m=null==d||null==f;g=null!=g?g:24;var q=new Spinner({lines:12,length:g,width:Math.round(g/3),radius:Math.round(g/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),y=q.spin;q.spin=function(C,I){var G=!1;this.active||(y.call(this,C),this.active=!0,null!=I&&(m&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/2-2),G=document.createElement("div"),
G.style.position="absolute",G.style.whiteSpace="nowrap",G.style.background="#4B4243",G.style.color="white",G.style.fontFamily=Editor.defaultHtmlFont,G.style.fontSize="9pt",G.style.padding="6px",G.style.paddingLeft="10px",G.style.paddingRight="10px",G.style.zIndex=2E9,G.style.left=Math.max(0,d)+"px",G.style.top=Math.max(0,f+70)+"px",mxUtils.setPrefixedStyle(G.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(G.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(G.style,
-"boxShadow","2px 2px 3px 0px #ddd"),"..."!=I.substring(I.length-3,I.length)&&"!"!=I.charAt(I.length-1)&&(I+="..."),G.innerHTML=I,C.appendChild(G),q.status=G),this.pause=mxUtils.bind(this,function(){var Y=function(){};this.active&&(Y=mxUtils.bind(this,function(){this.spin(C,I)}));this.stop();return Y}),G=!0);return G};var F=q.stop;q.stop=function(){F.call(this);this.active=!1;null!=q.status&&null!=q.status.parentNode&&q.status.parentNode.removeChild(q.status);q.status=null};q.pause=function(){return function(){}};
+"boxShadow","2px 2px 3px 0px #ddd"),"..."!=I.substring(I.length-3,I.length)&&"!"!=I.charAt(I.length-1)&&(I+="..."),G.innerHTML=I,C.appendChild(G),q.status=G),this.pause=mxUtils.bind(this,function(){var Z=function(){};this.active&&(Z=mxUtils.bind(this,function(){this.spin(C,I)}));this.stop();return Z}),G=!0);return G};var F=q.stop;q.stop=function(){F.call(this);this.active=!1;null!=q.status&&null!=q.status.parentNode&&q.status.parentNode.removeChild(q.status);q.status=null};q.pause=function(){return function(){}};
return q};EditorUi.prototype.isCompatibleString=function(d){try{var f=mxUtils.parseXml(d),g=this.editor.extractGraphModel(f.documentElement,!0);return null!=g&&0==g.getElementsByTagName("parsererror").length}catch(m){}return!1};EditorUi.prototype.isVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&
3==d.charCodeAt(2)&&4==d.charCodeAt(3)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&3==d.charCodeAt(2)&&6==d.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||60==d.charCodeAt(0)&&63==d.charCodeAt(1)&&120==d.charCodeAt(2)&&109==d.charCodeAt(3)&&108==d.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;
EditorUi.prototype.createKeyHandler=function(d){var f=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var g=f.getFunction,m=this.editor.graph,q=this;f.getFunction=function(y){if(m.isSelectionEmpty()&&null!=q.pages&&0<q.pages.length){var F=q.getSelectedPageIndex();if(mxEvent.isShiftDown(y)){if(37==y.keyCode)return function(){0<F&&q.movePage(F,F-1)};if(38==y.keyCode)return function(){0<F&&q.movePage(F,0)};if(39==y.keyCode)return function(){F<q.pages.length-1&&q.movePage(F,
@@ -3384,10 +3387,10 @@ var e=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGra
y?mxUtils.getXml(y):""}}catch(F){}return f};EditorUi.prototype.validateFileData=function(d){if(null!=d&&0<d.length){var f=d.indexOf('<meta charset="utf-8">');0<=f&&(d=d.slice(0,f)+'<meta charset="utf-8"/>'+d.slice(f+23-1,d.length));d=Graph.zapGremlins(d)}return d};EditorUi.prototype.replaceFileData=function(d){d=this.validateFileData(d);d=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:null;var f=null!=d?this.editor.extractGraphModel(d,!0):null;null!=f&&(d=f);if(null!=d){f=this.editor.graph;
f.model.beginUpdate();try{var g=null!=this.pages?this.pages.slice():null,m=d.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<m.length||1==m.length&&m[0].hasAttribute("name")){this.fileNode=d;this.pages=null!=this.pages?this.pages:[];for(var q=m.length-1;0<=q;q--){var y=this.updatePageRoot(new DiagramPage(m[q]));null==y.getName()&&y.setName(mxResources.get("pageWithNumber",[q+1]));f.model.execute(new ChangePage(this,y,0==q?y:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=
d.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(d.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),f.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(d),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=g)for(q=0;q<g.length;q++)f.model.execute(new ChangePage(this,g[q],null))}finally{f.model.endUpdate()}}};EditorUi.prototype.createFileData=
-function(d,f,g,m,q,y,F,C,I,G,Y){f=null!=f?f:this.editor.graph;q=null!=q?q:!1;I=null!=I?I:!0;var ba=null;if(null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER)var Z="_blank";else ba=Z=m;if(null==d)return"";var X=d;if("mxfile"!=X.nodeName.toLowerCase()){if(Y){var qa=d.ownerDocument.createElement("diagram");qa.setAttribute("id",Editor.guid());qa.appendChild(d)}else{qa=Graph.zapGremlins(mxUtils.getXml(d));X=Graph.compress(qa);if(Graph.decompress(X)!=qa)return qa;qa=d.ownerDocument.createElement("diagram");
-qa.setAttribute("id",Editor.guid());mxUtils.setTextContent(qa,X)}X=d.ownerDocument.createElement("mxfile");X.appendChild(qa)}G?(X=X.cloneNode(!0),X.removeAttribute("modified"),X.removeAttribute("host"),X.removeAttribute("agent"),X.removeAttribute("etag"),X.removeAttribute("userAgent"),X.removeAttribute("version"),X.removeAttribute("editor"),X.removeAttribute("type")):(X.removeAttribute("userAgent"),X.removeAttribute("version"),X.removeAttribute("editor"),X.removeAttribute("pages"),X.removeAttribute("type"),
-mxClient.IS_CHROMEAPP?X.setAttribute("host","Chrome"):EditorUi.isElectronApp?X.setAttribute("host","Electron"):X.setAttribute("host",window.location.hostname),X.setAttribute("modified",(new Date).toISOString()),X.setAttribute("agent",navigator.appVersion),X.setAttribute("version",EditorUi.VERSION),X.setAttribute("etag",Editor.guid()),d=null!=g?g.getMode():this.mode,null!=d&&X.setAttribute("type",d),1<X.getElementsByTagName("diagram").length&&null!=this.pages&&X.setAttribute("pages",this.pages.length));
-Y=Y?mxUtils.getPrettyXml(X):mxUtils.getXml(X);if(!y&&!q&&(F||null!=g&&/(\.html)$/i.test(g.getTitle())))Y=this.getHtml2(mxUtils.getXml(X),f,null!=g?g.getTitle():null,Z,ba);else if(y||!q&&null!=g&&/(\.svg)$/i.test(g.getTitle()))null==g||g.getMode()!=App.MODE_DEVICE&&g.getMode()!=App.MODE_BROWSER||(m=null),Y=this.getEmbeddedSvg(Y,f,m,null,C,I,ba);return Y};EditorUi.prototype.getXmlFileData=function(d,f,g,m){d=null!=d?d:!0;f=null!=f?f:!1;g=null!=g?g:!Editor.compressXml;var q=this.editor.getGraphXml(d,
+function(d,f,g,m,q,y,F,C,I,G,Z){f=null!=f?f:this.editor.graph;q=null!=q?q:!1;I=null!=I?I:!0;var ca=null;if(null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER)var aa="_blank";else ca=aa=m;if(null==d)return"";var Y=d;if("mxfile"!=Y.nodeName.toLowerCase()){if(Z){var pa=d.ownerDocument.createElement("diagram");pa.setAttribute("id",Editor.guid());pa.appendChild(d)}else{pa=Graph.zapGremlins(mxUtils.getXml(d));Y=Graph.compress(pa);if(Graph.decompress(Y)!=pa)return pa;pa=d.ownerDocument.createElement("diagram");
+pa.setAttribute("id",Editor.guid());mxUtils.setTextContent(pa,Y)}Y=d.ownerDocument.createElement("mxfile");Y.appendChild(pa)}G?(Y=Y.cloneNode(!0),Y.removeAttribute("modified"),Y.removeAttribute("host"),Y.removeAttribute("agent"),Y.removeAttribute("etag"),Y.removeAttribute("userAgent"),Y.removeAttribute("version"),Y.removeAttribute("editor"),Y.removeAttribute("type")):(Y.removeAttribute("userAgent"),Y.removeAttribute("version"),Y.removeAttribute("editor"),Y.removeAttribute("pages"),Y.removeAttribute("type"),
+mxClient.IS_CHROMEAPP?Y.setAttribute("host","Chrome"):EditorUi.isElectronApp?Y.setAttribute("host","Electron"):Y.setAttribute("host",window.location.hostname),Y.setAttribute("modified",(new Date).toISOString()),Y.setAttribute("agent",navigator.appVersion),Y.setAttribute("version",EditorUi.VERSION),Y.setAttribute("etag",Editor.guid()),d=null!=g?g.getMode():this.mode,null!=d&&Y.setAttribute("type",d),1<Y.getElementsByTagName("diagram").length&&null!=this.pages&&Y.setAttribute("pages",this.pages.length));
+Z=Z?mxUtils.getPrettyXml(Y):mxUtils.getXml(Y);if(!y&&!q&&(F||null!=g&&/(\.html)$/i.test(g.getTitle())))Z=this.getHtml2(mxUtils.getXml(Y),f,null!=g?g.getTitle():null,aa,ca);else if(y||!q&&null!=g&&/(\.svg)$/i.test(g.getTitle()))null==g||g.getMode()!=App.MODE_DEVICE&&g.getMode()!=App.MODE_BROWSER||(m=null),Z=this.getEmbeddedSvg(Z,f,m,null,C,I,ca);return Z};EditorUi.prototype.getXmlFileData=function(d,f,g,m){d=null!=d?d:!0;f=null!=f?f:!1;g=null!=g?g:!Editor.compressXml;var q=this.editor.getGraphXml(d,
m);if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(I){var G=I.getElementsByTagName("mxGraphModel");G=0<G.length?G[0]:null;null==G&&g?(G=mxUtils.trim(mxUtils.getTextContent(I)),I=I.cloneNode(!1),0<G.length&&(G=Graph.decompress(G),null!=G&&0<G.length&&I.appendChild(mxUtils.parseXml(G).documentElement))):null==G||g?I=I.cloneNode(!0):(I=I.cloneNode(!1),mxUtils.setTextContent(I,Graph.compressNode(G)));q.appendChild(I)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,
Graph.compressNode(q)),q=this.fileNode.cloneNode(!1),f)d(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var y=this.pages[f],F=y.node;if(y!=this.currentPage)if(y.needsUpdate){var C=new mxCodec(mxUtils.createXmlDocument());C=C.encode(new mxGraphModel(y.root));this.editor.graph.saveViewState(y.viewState,C,null,m);EditorUi.removeChildNodes(F);mxUtils.setTextContent(F,Graph.compressNode(C));delete y.needsUpdate}else m&&(this.updatePageRoot(y),null!=y.viewState.backgroundImage&&(null!=y.viewState.backgroundImage.originalSrc?
y.viewState.backgroundImage=this.createImageForPageLink(y.viewState.backgroundImage.originalSrc,y):Graph.isPageLink(y.viewState.backgroundImage.src)&&(y.viewState.backgroundImage=this.createImageForPageLink(y.viewState.backgroundImage.src,y))),null!=y.viewState.backgroundImage&&null!=y.viewState.backgroundImage.originalSrc&&(C=new mxCodec(mxUtils.createXmlDocument()),C=C.encode(new mxGraphModel(y.root)),this.editor.graph.saveViewState(y.viewState,C,null,m),F=F.cloneNode(!1),mxUtils.setTextContent(F,
@@ -3397,9 +3400,9 @@ function(d){if(null!=d[EditorUi.DIFF_INSERT])for(var f=0;f<d[EditorUi.DIFF_INSER
delete d[EditorUi.DIFF_UPDATE][m]}mxUtils.isEmptyObject(d[EditorUi.DIFF_UPDATE])&&delete d[EditorUi.DIFF_UPDATE]}return d};EditorUi.prototype.anonymizeAttributes=function(d,f){if(null!=d.attributes)for(var g=0;g<d.attributes.length;g++)"as"!=d.attributes[g].name&&d.setAttribute(d.attributes[g].name,this.anonymizeString(d.attributes[g].value,f));if(null!=d.childNodes)for(g=0;g<d.childNodes.length;g++)this.anonymizeAttributes(d.childNodes[g],f)};EditorUi.prototype.anonymizeNode=function(d,f){f=d.getElementsByTagName("mxCell");
for(var g=0;g<f.length;g++)null!=f[g].getAttribute("value")&&f[g].setAttribute("value","["+f[g].getAttribute("value").length+"]"),null!=f[g].getAttribute("xmlValue")&&f[g].setAttribute("xmlValue","["+f[g].getAttribute("xmlValue").length+"]"),null!=f[g].getAttribute("style")&&f[g].setAttribute("style","["+f[g].getAttribute("style").length+"]"),null!=f[g].parentNode&&"root"!=f[g].parentNode.nodeName&&null!=f[g].parentNode.parentNode&&(f[g].setAttribute("id",f[g].parentNode.getAttribute("id")),f[g].parentNode.parentNode.replaceChild(f[g],
f[g].parentNode));return d};EditorUi.prototype.synchronizeCurrentFile=function(d){var f=this.getCurrentFile();null!=f&&(f.savingFile?this.handleError({message:mxResources.get("busy")}):!d&&f.invalidChecksum?f.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(f.clearAutosave(),this.editor.setStatus(""),d?f.reloadFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)})):f.synchronizeFile(mxUtils.bind(this,
-function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)}))))};EditorUi.prototype.getFileData=function(d,f,g,m,q,y,F,C,I,G,Y){q=null!=q?q:!0;y=null!=y?y:!1;var ba=this.editor.graph;if(f||!d&&null!=I&&/(\.svg)$/i.test(I.getTitle())){var Z=null!=ba.themes&&"darkTheme"==ba.defaultThemeName;G=!1;if(Z||null!=this.pages&&this.currentPage!=this.pages[0]){var X=ba.getGlobalVariable;ba=this.createTemporaryGraph(Z?ba.getDefaultStylesheet():ba.getStylesheet());
-ba.setBackgroundImage=this.editor.graph.setBackgroundImage;ba.background=this.editor.graph.background;var qa=this.pages[0];this.currentPage==qa?ba.setBackgroundImage(this.editor.graph.backgroundImage):null!=qa.viewState&&null!=qa.viewState&&ba.setBackgroundImage(qa.viewState.backgroundImage);ba.getGlobalVariable=function(Q){return"page"==Q?qa.getName():"pagenumber"==Q?1:X.apply(this,arguments)};document.body.appendChild(ba.container);ba.model.setRoot(qa.root)}}F=null!=F?F:this.getXmlFileData(q,y,
-G,Y);I=null!=I?I:this.getCurrentFile();d=this.createFileData(F,ba,I,window.location.href,d,f,g,m,q,C,G);ba!=this.editor.graph&&ba.container.parentNode.removeChild(ba.container);return d};EditorUi.prototype.getHtml=function(d,f,g,m,q,y){y=null!=y?y:!0;var F=null,C=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){F=y?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var I=f.view.scale;y=Math.floor(F.x/I-f.view.translate.x);I=Math.floor(F.y/I-f.view.translate.y);F=f.background;null==
+function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)}))))};EditorUi.prototype.getFileData=function(d,f,g,m,q,y,F,C,I,G,Z){q=null!=q?q:!0;y=null!=y?y:!1;var ca=this.editor.graph;if(f||!d&&null!=I&&/(\.svg)$/i.test(I.getTitle())){var aa=null!=ca.themes&&"darkTheme"==ca.defaultThemeName;G=!1;if(aa||null!=this.pages&&this.currentPage!=this.pages[0]){var Y=ca.getGlobalVariable;ca=this.createTemporaryGraph(aa?ca.getDefaultStylesheet():ca.getStylesheet());
+ca.setBackgroundImage=this.editor.graph.setBackgroundImage;ca.background=this.editor.graph.background;var pa=this.pages[0];this.currentPage==pa?ca.setBackgroundImage(this.editor.graph.backgroundImage):null!=pa.viewState&&null!=pa.viewState&&ca.setBackgroundImage(pa.viewState.backgroundImage);ca.getGlobalVariable=function(Q){return"page"==Q?pa.getName():"pagenumber"==Q?1:Y.apply(this,arguments)};document.body.appendChild(ca.container);ca.model.setRoot(pa.root)}}F=null!=F?F:this.getXmlFileData(q,y,
+G,Z);I=null!=I?I:this.getCurrentFile();d=this.createFileData(F,ca,I,window.location.href,d,f,g,m,q,C,G);ca!=this.editor.graph&&ca.container.parentNode.removeChild(ca.container);return d};EditorUi.prototype.getHtml=function(d,f,g,m,q,y){y=null!=y?y:!0;var F=null,C=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){F=y?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var I=f.view.scale;y=Math.floor(F.x/I-f.view.translate.x);I=Math.floor(F.y/I-f.view.translate.y);F=f.background;null==
q&&(f=this.getBasenames().join(";"),0<f.length&&(C=EditorUi.drawHost+"/embed.js?s="+f));d.setAttribute("x0",y);d.setAttribute("y0",I)}null!=d&&(d.setAttribute("pan","1"),d.setAttribute("zoom","1"),d.setAttribute("resize","0"),d.setAttribute("fit","0"),d.setAttribute("border","20"),d.setAttribute("links","1"),null!=m&&d.setAttribute("edit",m));null!=q&&(q=q.replace(/&/g,"&amp;"));d=null!=d?Graph.zapGremlins(mxUtils.getXml(d)):"";m=Graph.compress(d);Graph.decompress(m)!=d&&(m=encodeURIComponent(d));
return(null==q?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=q?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==q?null!=g?"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=q?'<meta http-equiv="refresh" content="0;URL=\''+q+"'\"/>\n":"")+"</head>\n<body"+(null==q&&null!=F&&F!=mxConstants.NONE?' style="background-color:'+F+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+
m+"</div>\n</div>\n"+(null==q?'<script type="text/javascript" src="'+C+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+q+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(d,f,g,m,q){f=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=q&&(q=q.replace(/&/g,"&amp;"));d={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,
@@ -3409,50 +3412,50 @@ function(d){d=this.validateFileData(d);this.pages=this.fileNode=this.currentPage
"0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name"))){g=null;this.fileNode=f;this.pages=[];for(var m=0;m<d.length;m++)null==d[m].getAttribute("id")&&d[m].setAttribute("id",m),f=new DiagramPage(d[m]),null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[m+1])),this.pages.push(f),null!=urlParams["page-id"]&&f.getId()==urlParams["page-id"]&&(g=f);this.currentPage=null!=g?g:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];f=this.currentPage.node}"0"!=
urlParams.pages&&null==this.fileNode&&null!=f&&(this.fileNode=f.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(f.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(f);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var q=urlParams["layer-ids"].split(" ");f={};for(m=0;m<q.length;m++)f[q[m]]=!0;var y=this.editor.graph.getModel(),
F=y.getChildren(y.root);for(m=0;m<F.length;m++){var C=F[m];y.setVisible(C,f[C.id]||!1)}}catch(I){}};EditorUi.prototype.getBaseFilename=function(d){var f=this.getCurrentFile();f=null!=f&&null!=f.getTitle()?f.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(f)||/(\.html)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.png)$/i.test(f))f=f.substring(0,f.lastIndexOf("."));/(\.drawio)$/i.test(f)&&(f=f.substring(0,f.lastIndexOf(".")));!d&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&
-0<this.currentPage.getName().length&&(f=f+"-"+this.currentPage.getName());return f};EditorUi.prototype.downloadFile=function(d,f,g,m,q,y,F,C,I,G,Y,ba){try{m=null!=m?m:this.editor.graph.isSelectionEmpty();var Z=this.getBaseFilename("remoteSvg"==d?!1:!q),X=Z+("xml"==d||"pdf"==d&&Y?".drawio":"")+"."+d;if("xml"==d){var qa=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,m,q,null,null,null,f);this.saveData(X,d,qa,"text/xml")}else if("html"==d)qa=this.getHtml2(this.getFileData(!0),this.editor.graph,
-Z),this.saveData(X,d,qa,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==d)X=Z+".png";else if("jpeg"==d)X=Z+".jpg";else if("remoteSvg"==d){X=Z+".svg";d="svg";var Q=parseInt(I);"string"===typeof C&&0<C.indexOf("%")&&(C=parseInt(C)/100);if(0<Q){var W=this.editor.graph,ha=W.getGraphBounds();var la=Math.ceil(ha.width*C/W.view.scale+2*Q);var ja=Math.ceil(ha.height*C/W.view.scale+2*Q)}}this.saveRequest(X,d,mxUtils.bind(this,function(N,
-aa){try{var ma=this.editor.graph.pageVisible;0==y&&(this.editor.graph.pageVisible=y);var u=this.createDownloadRequest(N,d,m,aa,F,q,C,I,G,Y,ba,la,ja);this.editor.graph.pageVisible=ma;return u}catch(H){this.handleError(H)}}))}else{var U=null,L=mxUtils.bind(this,function(N){N.length<=MAX_REQUEST_SIZE?this.saveData(X,"svg",N,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(U)}))});if("svg"==d){var da=this.editor.graph.background;
-if(F||da==mxConstants.NONE)da=null;var O=this.editor.graph.getSvg(da,null,null,null,null,m);g&&this.editor.graph.addSvgShadow(O);this.editor.convertImages(O,mxUtils.bind(this,mxUtils.bind(this,function(N){this.spinner.stop();L(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(N))})))}else X=Z+".svg",U=this.getFileData(!1,!0,null,mxUtils.bind(this,function(N){this.spinner.stop();L(N)}),m)}}catch(N){this.handleError(N)}};EditorUi.prototype.createDownloadRequest=function(d,f,g,m,q,y,F,C,
-I,G,Y,ba,Z){var X=this.editor.graph,qa=X.getGraphBounds();g=this.getFileData(!0,null,null,null,g,0==y?!1:"xmlpng"!=f,null,null,null,!1,"pdf"==f);var Q="",W="";if(qa.width*qa.height>MAX_AREA||g.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};G=G?"1":"0";"pdf"==f&&(null!=Y?W="&from="+Y.from+"&to="+Y.to:0==y&&(W="&allPages=1"));"xmlpng"==f&&(G="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(y=0;y<this.pages.length;y++)if(this.pages[y]==
-this.currentPage){Q="&from="+y;break}y=X.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!q?q||null!=y&&y!=mxConstants.NONE||(y="#ffffff"):y=mxConstants.NONE;q={globalVars:X.getExportVariables()};I&&(q.grid={size:X.gridSize,steps:X.view.gridSteps,color:X.view.gridColor});Graph.translateDiagram&&(q.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+f+Q+W+"&bg="+(null!=y?y:mxConstants.NONE)+"&base64="+m+"&embedXml="+G+"&xml="+encodeURIComponent(g)+(null!=d?"&filename="+encodeURIComponent(d):
-"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(null!=F?"&scale="+F:"")+(null!=C?"&border="+C:"")+(ba&&isFinite(ba)?"&w="+ba:"")+(Z&&isFinite(Z)?"&h="+Z:""))};EditorUi.prototype.setMode=function(d,f){this.mode=d};EditorUi.prototype.loadDescriptor=function(d,f,g){var m=window.location.hash,q=mxUtils.bind(this,function(y){var F=null!=d.data?d.data:"";null!=y&&0<y.length&&(0<F.length&&(F+="\n"),F+=y);y=new LocalFile(this,"csv"!=d.format&&0<F.length?F:this.emptyDiagramXml,null!=urlParams.title?
-decodeURIComponent(urlParams.title):this.defaultFilename,!0);y.getHash=function(){return m};this.fileLoaded(y);"csv"==d.format&&this.importCsv(F,mxUtils.bind(this,function(ba){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=d.update){var C=null!=d.interval?parseInt(d.interval):6E4,I=null,G=mxUtils.bind(this,function(){var ba=this.currentPage;mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,
-function(Z){ba===this.currentPage&&(200<=Z.getStatus()&&300>=Z.getStatus()?(this.updateDiagram(Z.getText()),Y()):this.handleError({message:mxResources.get("error")+" "+Z.getStatus()}))}),mxUtils.bind(this,function(Z){this.handleError(Z)}))}),Y=mxUtils.bind(this,function(){window.clearTimeout(I);I=window.setTimeout(G,C)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){Y();G()}));Y();G()}null!=f&&f()});null!=d.url&&0<d.url.length?this.editor.loadUrl(d.url,mxUtils.bind(this,function(y){q(y)}),
-mxUtils.bind(this,function(y){null!=g&&g(y)})):q("")};EditorUi.prototype.updateDiagram=function(d){function f(ja){var U=new mxCellOverlay(ja.image||q.warningImage,ja.tooltip,ja.align,ja.valign,ja.offset);U.addListener(mxEvent.CLICK,function(L,da){m.alert(ja.tooltip)});return U}var g=null,m=this;if(null!=d&&0<d.length&&(g=mxUtils.parseXml(d),d=null!=g?g.documentElement:null,null!=d&&"updates"==d.nodeName)){var q=this.editor.graph,y=q.getModel();y.beginUpdate();var F=null;try{for(d=d.firstChild;null!=
-d;){if("update"==d.nodeName){var C=y.getCell(d.getAttribute("id"));if(null!=C){try{var I=d.getAttribute("value");if(null!=I){var G=mxUtils.parseXml(I).documentElement;if(null!=G)if("1"==G.getAttribute("replace-value"))y.setValue(C,G);else for(var Y=G.attributes,ba=0;ba<Y.length;ba++)q.setAttributeForCell(C,Y[ba].nodeName,0<Y[ba].nodeValue.length?Y[ba].nodeValue:null)}}catch(ja){null!=window.console&&console.log("Error in value for "+C.id+": "+ja)}try{var Z=d.getAttribute("style");null!=Z&&q.model.setStyle(C,
-Z)}catch(ja){null!=window.console&&console.log("Error in style for "+C.id+": "+ja)}try{var X=d.getAttribute("icon");if(null!=X){var qa=0<X.length?JSON.parse(X):null;null!=qa&&qa.append||q.removeCellOverlays(C);null!=qa&&q.addCellOverlay(C,f(qa))}}catch(ja){null!=window.console&&console.log("Error in icon for "+C.id+": "+ja)}try{var Q=d.getAttribute("geometry");if(null!=Q){Q=JSON.parse(Q);var W=q.getCellGeometry(C);if(null!=W){W=W.clone();for(key in Q){var ha=parseFloat(Q[key]);"dx"==key?W.x+=ha:"dy"==
-key?W.y+=ha:"dw"==key?W.width+=ha:"dh"==key?W.height+=ha:W[key]=parseFloat(Q[key])}q.model.setGeometry(C,W)}}}catch(ja){null!=window.console&&console.log("Error in icon for "+C.id+": "+ja)}}}else if("model"==d.nodeName){for(var la=d.firstChild;null!=la&&la.nodeType!=mxConstants.NODETYPE_ELEMENT;)la=la.nextSibling;null!=la&&(new mxCodec(d.firstChild)).decode(la,y)}else if("view"==d.nodeName){if(d.hasAttribute("scale")&&(q.view.scale=parseFloat(d.getAttribute("scale"))),d.hasAttribute("dx")||d.hasAttribute("dy"))q.view.translate=
-new mxPoint(parseFloat(d.getAttribute("dx")||0),parseFloat(d.getAttribute("dy")||0))}else"fit"==d.nodeName&&(F=d.hasAttribute("max-scale")?parseFloat(d.getAttribute("max-scale")):1);d=d.nextSibling}}finally{y.endUpdate()}null!=F&&this.chromelessResize&&this.chromelessResize(!0,F)}return g};EditorUi.prototype.getCopyFilename=function(d,f){var g=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;d="";var m=g.lastIndexOf(".");0<=m&&(d=g.substring(m),g=g.substring(0,m));if(f){f=g;var q=new Date;
-g=q.getFullYear();m=q.getMonth()+1;var y=q.getDate(),F=q.getHours(),C=q.getMinutes();q=q.getSeconds();g=f+(" "+(g+"-"+m+"-"+y+"-"+F+"-"+C+"-"+q))}return g=mxResources.get("copyOf",[g])+d};EditorUi.prototype.fileLoaded=function(d,f){var g=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var m=!1;this.hideDialog();null!=g&&(EditorUi.debug("File.closed",[g]),g.removeListener(this.descriptorChangedListener),g.close());this.editor.graph.model.clear();this.editor.undoManager.clear();
-var q=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=g&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!f&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerText="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();f||this.showSplash()});
-if(null!=d)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(d);d.addListener("descriptorChanged",this.descriptorChangedListener);d.addListener("contentChanged",this.descriptorChangedListener);d.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(d.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();d.isEditable()?d.isModified()?(d.addUnsavedStatus(),
-null!=d.backupPatch&&d.patch([d.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"));
-m=!0;if(!this.isOffline()&&null!=d.getMode()){var y="1"==urlParams.sketch?"sketch":uiTheme;if(null==y)y="default";else if("sketch"==y||"min"==y)y+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:d.getMode().toUpperCase()+"-OPEN-FILE-"+d.getHash(),action:"size_"+d.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+y})}EditorUi.debug("File.opened",[d]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==
-d.getMode()&&d.getMode()!=App.MODE_DEVICE&&null!=d.getMode())try{this.addRecent({id:d.getHash(),title:d.getTitle(),mode:d.getMode()})}catch(F){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(F){}}catch(F){this.fileLoadedError=F;if(null!=d)try{d.close()}catch(C){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=d?d.getHash():"none"),action:"message_"+F.message,label:"stack_"+F.stack})}catch(C){}d=mxUtils.bind(this,
-function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=g?this.fileLoaded(g)||q():q()});f?d():this.handleError(F,mxResources.get("errorLoadingFile"),d,!0,null,null,!0)}else q();return m};EditorUi.prototype.getHashValueForPages=function(d,f){var g=0,m=new mxGraphModel,q=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var y=0;y<d.length;y++){this.updatePageRoot(d[y]);var F=
-d[y].node.cloneNode(!1);F.removeAttribute("name");m.root=d[y].root;var C=q.encode(m);this.editor.graph.saveViewState(d[y].viewState,C,!0);C.removeAttribute("pageWidth");C.removeAttribute("pageHeight");F.appendChild(C);null!=f&&(f.eltCount+=F.getElementsByTagName("*").length,f.nodeCount+=F.getElementsByTagName("mxCell").length);g=(g<<5)-g+this.hashValue(F,function(I,G,Y,ba){return!ba||"mxGeometry"!=I.nodeName&&"mxPoint"!=I.nodeName||"x"!=G&&"y"!=G&&"width"!=G&&"height"!=G?ba&&"mxCell"==I.nodeName&&
-"previous"==G?null:Y:Math.round(Y)},f)<<0}return g};EditorUi.prototype.hashValue=function(d,f,g){var m=0;if(null!=d&&"object"===typeof d&&"number"===typeof d.nodeType&&"string"===typeof d.nodeName&&"function"===typeof d.getAttribute){null!=d.nodeName&&(m^=this.hashValue(d.nodeName,f,g));if(null!=d.attributes){null!=g&&(g.attrCount+=d.attributes.length);for(var q=0;q<d.attributes.length;q++){var y=d.attributes[q].name,F=null!=f?f(d,y,d.attributes[q].value,!0):d.attributes[q].value;null!=F&&(m^=this.hashValue(y,
+0<this.currentPage.getName().length&&(f=f+"-"+this.currentPage.getName());return f};EditorUi.prototype.downloadFile=function(d,f,g,m,q,y,F,C,I,G,Z,ca){try{m=null!=m?m:this.editor.graph.isSelectionEmpty();var aa=this.getBaseFilename("remoteSvg"==d?!1:!q),Y=aa+("xml"==d||"pdf"==d&&Z?".drawio":"")+"."+d;if("xml"==d){var pa=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,m,q,null,null,null,f);this.saveData(Y,d,pa,"text/xml")}else if("html"==d)pa=this.getHtml2(this.getFileData(!0),this.editor.graph,
+aa),this.saveData(Y,d,pa,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==d)Y=aa+".png";else if("jpeg"==d)Y=aa+".jpg";else if("remoteSvg"==d){Y=aa+".svg";d="svg";var Q=parseInt(I);"string"===typeof C&&0<C.indexOf("%")&&(C=parseInt(C)/100);if(0<Q){var X=this.editor.graph,ha=X.getGraphBounds();var U=Math.ceil(ha.width*C/X.view.scale+2*Q);var ma=Math.ceil(ha.height*C/X.view.scale+2*Q)}}this.saveRequest(Y,d,mxUtils.bind(this,function(O,
+ba){try{var la=this.editor.graph.pageVisible;0==y&&(this.editor.graph.pageVisible=y);var u=this.createDownloadRequest(O,d,m,ba,F,q,C,I,G,Z,ca,U,ma);this.editor.graph.pageVisible=la;return u}catch(H){this.handleError(H)}}))}else{var T=null,M=mxUtils.bind(this,function(O){O.length<=MAX_REQUEST_SIZE?this.saveData(Y,"svg",O,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(T)}))});if("svg"==d){var ia=this.editor.graph.background;
+if(F||ia==mxConstants.NONE)ia=null;var N=this.editor.graph.getSvg(ia,null,null,null,null,m);g&&this.editor.graph.addSvgShadow(N);this.editor.convertImages(N,mxUtils.bind(this,mxUtils.bind(this,function(O){this.spinner.stop();M(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(O))})))}else Y=aa+".svg",T=this.getFileData(!1,!0,null,mxUtils.bind(this,function(O){this.spinner.stop();M(O)}),m)}}catch(O){this.handleError(O)}};EditorUi.prototype.createDownloadRequest=function(d,f,g,m,q,y,F,
+C,I,G,Z,ca,aa){var Y=this.editor.graph,pa=Y.getGraphBounds();g=this.getFileData(!0,null,null,null,g,0==y?!1:"xmlpng"!=f,null,null,null,!1,"pdf"==f);var Q="",X="";if(pa.width*pa.height>MAX_AREA||g.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};G=G?"1":"0";"pdf"==f&&(null!=Z?X="&from="+Z.from+"&to="+Z.to:0==y&&(X="&allPages=1"));"xmlpng"==f&&(G="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(y=0;y<this.pages.length;y++)if(this.pages[y]==
+this.currentPage){Q="&from="+y;break}y=Y.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!q?q||null!=y&&y!=mxConstants.NONE||(y="#ffffff"):y=mxConstants.NONE;q={globalVars:Y.getExportVariables()};I&&(q.grid={size:Y.gridSize,steps:Y.view.gridSteps,color:Y.view.gridColor});Graph.translateDiagram&&(q.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+f+Q+X+"&bg="+(null!=y?y:mxConstants.NONE)+"&base64="+m+"&embedXml="+G+"&xml="+encodeURIComponent(g)+(null!=d?"&filename="+encodeURIComponent(d):
+"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(null!=F?"&scale="+F:"")+(null!=C?"&border="+C:"")+(ca&&isFinite(ca)?"&w="+ca:"")+(aa&&isFinite(aa)?"&h="+aa:""))};EditorUi.prototype.setMode=function(d,f){this.mode=d};EditorUi.prototype.loadDescriptor=function(d,f,g){var m=window.location.hash,q=mxUtils.bind(this,function(y){var F=null!=d.data?d.data:"";null!=y&&0<y.length&&(0<F.length&&(F+="\n"),F+=y);y=new LocalFile(this,"csv"!=d.format&&0<F.length?F:this.emptyDiagramXml,null!=urlParams.title?
+decodeURIComponent(urlParams.title):this.defaultFilename,!0);y.getHash=function(){return m};this.fileLoaded(y);"csv"==d.format&&this.importCsv(F,mxUtils.bind(this,function(ca){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=d.update){var C=null!=d.interval?parseInt(d.interval):6E4,I=null,G=mxUtils.bind(this,function(){var ca=this.currentPage;mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,
+function(aa){ca===this.currentPage&&(200<=aa.getStatus()&&300>=aa.getStatus()?(this.updateDiagram(aa.getText()),Z()):this.handleError({message:mxResources.get("error")+" "+aa.getStatus()}))}),mxUtils.bind(this,function(aa){this.handleError(aa)}))}),Z=mxUtils.bind(this,function(){window.clearTimeout(I);I=window.setTimeout(G,C)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){Z();G()}));Z();G()}null!=f&&f()});null!=d.url&&0<d.url.length?this.editor.loadUrl(d.url,mxUtils.bind(this,
+function(y){q(y)}),mxUtils.bind(this,function(y){null!=g&&g(y)})):q("")};EditorUi.prototype.updateDiagram=function(d){function f(ma){var T=new mxCellOverlay(ma.image||q.warningImage,ma.tooltip,ma.align,ma.valign,ma.offset);T.addListener(mxEvent.CLICK,function(M,ia){m.alert(ma.tooltip)});return T}var g=null,m=this;if(null!=d&&0<d.length&&(g=mxUtils.parseXml(d),d=null!=g?g.documentElement:null,null!=d&&"updates"==d.nodeName)){var q=this.editor.graph,y=q.getModel();y.beginUpdate();var F=null;try{for(d=
+d.firstChild;null!=d;){if("update"==d.nodeName){var C=y.getCell(d.getAttribute("id"));if(null!=C){try{var I=d.getAttribute("value");if(null!=I){var G=mxUtils.parseXml(I).documentElement;if(null!=G)if("1"==G.getAttribute("replace-value"))y.setValue(C,G);else for(var Z=G.attributes,ca=0;ca<Z.length;ca++)q.setAttributeForCell(C,Z[ca].nodeName,0<Z[ca].nodeValue.length?Z[ca].nodeValue:null)}}catch(ma){null!=window.console&&console.log("Error in value for "+C.id+": "+ma)}try{var aa=d.getAttribute("style");
+null!=aa&&q.model.setStyle(C,aa)}catch(ma){null!=window.console&&console.log("Error in style for "+C.id+": "+ma)}try{var Y=d.getAttribute("icon");if(null!=Y){var pa=0<Y.length?JSON.parse(Y):null;null!=pa&&pa.append||q.removeCellOverlays(C);null!=pa&&q.addCellOverlay(C,f(pa))}}catch(ma){null!=window.console&&console.log("Error in icon for "+C.id+": "+ma)}try{var Q=d.getAttribute("geometry");if(null!=Q){Q=JSON.parse(Q);var X=q.getCellGeometry(C);if(null!=X){X=X.clone();for(key in Q){var ha=parseFloat(Q[key]);
+"dx"==key?X.x+=ha:"dy"==key?X.y+=ha:"dw"==key?X.width+=ha:"dh"==key?X.height+=ha:X[key]=parseFloat(Q[key])}q.model.setGeometry(C,X)}}}catch(ma){null!=window.console&&console.log("Error in icon for "+C.id+": "+ma)}}}else if("model"==d.nodeName){for(var U=d.firstChild;null!=U&&U.nodeType!=mxConstants.NODETYPE_ELEMENT;)U=U.nextSibling;null!=U&&(new mxCodec(d.firstChild)).decode(U,y)}else if("view"==d.nodeName){if(d.hasAttribute("scale")&&(q.view.scale=parseFloat(d.getAttribute("scale"))),d.hasAttribute("dx")||
+d.hasAttribute("dy"))q.view.translate=new mxPoint(parseFloat(d.getAttribute("dx")||0),parseFloat(d.getAttribute("dy")||0))}else"fit"==d.nodeName&&(F=d.hasAttribute("max-scale")?parseFloat(d.getAttribute("max-scale")):1);d=d.nextSibling}}finally{y.endUpdate()}null!=F&&this.chromelessResize&&this.chromelessResize(!0,F)}return g};EditorUi.prototype.getCopyFilename=function(d,f){var g=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;d="";var m=g.lastIndexOf(".");0<=m&&(d=g.substring(m),g=
+g.substring(0,m));if(f){f=g;var q=new Date;g=q.getFullYear();m=q.getMonth()+1;var y=q.getDate(),F=q.getHours(),C=q.getMinutes();q=q.getSeconds();g=f+(" "+(g+"-"+m+"-"+y+"-"+F+"-"+C+"-"+q))}return g=mxResources.get("copyOf",[g])+d};EditorUi.prototype.fileLoaded=function(d,f){var g=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var m=!1;this.hideDialog();null!=g&&(EditorUi.debug("File.closed",[g]),g.removeListener(this.descriptorChangedListener),g.close());
+this.editor.graph.model.clear();this.editor.undoManager.clear();var q=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=g&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!f&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerText="",this.fname.setAttribute("title",mxResources.get("rename")));
+this.editor.setStatus("");this.updateUi();f||this.showSplash()});if(null!=d)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(d);d.addListener("descriptorChanged",this.descriptorChangedListener);d.addListener("contentChanged",this.descriptorChangedListener);d.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(d.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();
+this.updateUi();d.isEditable()?d.isModified()?(d.addUnsavedStatus(),null!=d.backupPatch&&d.patch([d.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"));m=!0;if(!this.isOffline()&&null!=d.getMode()){var y="1"==urlParams.sketch?"sketch":uiTheme;if(null==y)y="default";else if("sketch"==y||"min"==y)y+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:d.getMode().toUpperCase()+"-OPEN-FILE-"+d.getHash(),action:"size_"+d.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+y})}EditorUi.debug("File.opened",[d]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));
+if(this.editor.editable&&this.mode==d.getMode()&&d.getMode()!=App.MODE_DEVICE&&null!=d.getMode())try{this.addRecent({id:d.getHash(),title:d.getTitle(),mode:d.getMode()})}catch(F){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(F){}}catch(F){this.fileLoadedError=F;if(null!=d)try{d.close()}catch(C){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=d?d.getHash():"none"),action:"message_"+F.message,label:"stack_"+
+F.stack})}catch(C){}d=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=g?this.fileLoaded(g)||q():q()});f?d():this.handleError(F,mxResources.get("errorLoadingFile"),d,!0,null,null,!0)}else q();return m};EditorUi.prototype.getHashValueForPages=function(d,f){var g=0,m=new mxGraphModel,q=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var y=0;y<d.length;y++){this.updatePageRoot(d[y]);
+var F=d[y].node.cloneNode(!1);F.removeAttribute("name");m.root=d[y].root;var C=q.encode(m);this.editor.graph.saveViewState(d[y].viewState,C,!0);C.removeAttribute("pageWidth");C.removeAttribute("pageHeight");F.appendChild(C);null!=f&&(f.eltCount+=F.getElementsByTagName("*").length,f.nodeCount+=F.getElementsByTagName("mxCell").length);g=(g<<5)-g+this.hashValue(F,function(I,G,Z,ca){return!ca||"mxGeometry"!=I.nodeName&&"mxPoint"!=I.nodeName||"x"!=G&&"y"!=G&&"width"!=G&&"height"!=G?ca&&"mxCell"==I.nodeName&&
+"previous"==G?null:Z:Math.round(Z)},f)<<0}return g};EditorUi.prototype.hashValue=function(d,f,g){var m=0;if(null!=d&&"object"===typeof d&&"number"===typeof d.nodeType&&"string"===typeof d.nodeName&&"function"===typeof d.getAttribute){null!=d.nodeName&&(m^=this.hashValue(d.nodeName,f,g));if(null!=d.attributes){null!=g&&(g.attrCount+=d.attributes.length);for(var q=0;q<d.attributes.length;q++){var y=d.attributes[q].name,F=null!=f?f(d,y,d.attributes[q].value,!0):d.attributes[q].value;null!=F&&(m^=this.hashValue(y,
f,g)+this.hashValue(F,f,g))}}if(null!=d.childNodes)for(q=0;q<d.childNodes.length;q++)m=(m<<5)-m+this.hashValue(d.childNodes[q],f,g)<<0}else if(null!=d&&"function"!==typeof d){d=String(d);f=0;null!=g&&(g.byteCount+=d.length);for(q=0;q<d.length;q++)f=(f<<5)-f+d.charCodeAt(q)<<0;m^=f}return m};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(d,f,g,m,q,y,F){};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(d){null==d&&(d=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,d,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(d){var f=mxUtils.createXmlDocument(),g=f.createElement("mxlibrary");mxUtils.setTextContent(g,JSON.stringify(d));f.appendChild(g);
return mxUtils.getXml(f)};EditorUi.prototype.closeLibrary=function(d){null!=d&&(this.removeLibrarySidebar(d.getHash()),d.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(d.getHash()),".scratchpad"==d.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(d){var f=this.sidebar.palettes[d];if(null!=f){for(var g=0;g<f.length;g++)f[g].parentNode.removeChild(f[g]);delete this.sidebar.palettes[d]}};EditorUi.prototype.repositionLibrary=function(d){var f=this.sidebar.container;
if(null==d){var g=this.sidebar.palettes["L.scratchpad"];null==g&&(g=this.sidebar.palettes.search);null!=g&&(d=g[g.length-1].nextSibling)}d=null!=d?d:f.firstChild.nextSibling.nextSibling;g=f.lastChild;var m=g.previousSibling;f.insertBefore(g,d);f.insertBefore(m,g)};EditorUi.prototype.loadLibrary=function(d,f){var g=mxUtils.parseXml(d.getData());if("mxlibrary"==g.documentElement.nodeName){var m=JSON.parse(mxUtils.getTextContent(g.documentElement));this.libraryLoaded(d,m,g.documentElement.getAttribute("title"),
-f)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(d){return""};EditorUi.prototype.libraryLoaded=function(d,f,g,m){if(null!=this.sidebar){d.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(d.getHash());".scratchpad"==d.title&&(this.scratchpad=d);var q=this.sidebar.palettes[d.getHash()];q=null!=q?q[q.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var y=null,F=mxUtils.bind(this,function(la,ja){0==la.length&&d.isEditable()?
-(null==y&&(y=document.createElement("div"),y.className="geDropTarget",mxUtils.write(y,mxResources.get("dragElementsHere"))),ja.appendChild(y)):this.addLibraryEntries(la,ja)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==g&&(g=d.getTitle(),null!=g&&/(\.xml)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf("."))));var C=this.sidebar.addPalette(d.getHash(),g,null!=m?m:!0,mxUtils.bind(this,function(la){F(f,la)}));this.repositionLibrary(q);var I=C.parentNode.previousSibling;m=I.getAttribute("title");
-null!=m&&0<m.length&&".scratchpad"!=d.title&&I.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+m);var G=document.createElement("div");G.style.position="absolute";G.style.right="0px";G.style.top="0px";G.style.padding="8px";G.style.backgroundColor="inherit";I.style.position="relative";var Y=document.createElement("img");Y.setAttribute("src",Editor.crossImage);Y.setAttribute("title",mxResources.get("close"));Y.setAttribute("valign","absmiddle");Y.setAttribute("border","0");Y.style.position="relative";
-Y.style.top="2px";Y.style.width="14px";Y.style.cursor="pointer";Y.style.margin="0 3px";Editor.isDarkMode()&&(Y.style.filter="invert(100%)");var ba=null;if(".scratchpad"!=d.title||this.closableScratchpad)G.appendChild(Y),mxEvent.addListener(Y,"click",mxUtils.bind(this,function(la){if(!mxEvent.isConsumed(la)){var ja=mxUtils.bind(this,function(){this.closeLibrary(d)});null!=ba?this.confirm(mxResources.get("allChangesLost"),null,ja,mxResources.get("cancel"),mxResources.get("discardChanges")):ja();mxEvent.consume(la)}}));
-if(d.isEditable()){var Z=this.editor.graph,X=null,qa=mxUtils.bind(this,function(la){this.showLibraryDialog(d.getTitle(),C,f,d,d.getMode());mxEvent.consume(la)}),Q=mxUtils.bind(this,function(la){d.setModified(!0);d.isAutosave()?(null!=X&&null!=X.parentNode&&X.parentNode.removeChild(X),X=Y.cloneNode(!1),X.setAttribute("src",Editor.spinImage),X.setAttribute("title",mxResources.get("saving")),X.style.cursor="default",X.style.marginRight="2px",X.style.marginTop="-2px",G.insertBefore(X,G.firstChild),I.style.paddingRight=
-18*G.childNodes.length+"px",this.saveLibrary(d.getTitle(),f,d,d.getMode(),!0,!0,function(){null!=X&&null!=X.parentNode&&(X.parentNode.removeChild(X),I.style.paddingRight=18*G.childNodes.length+"px")})):null==ba&&(ba=Y.cloneNode(!1),ba.setAttribute("src",Editor.saveImage),ba.setAttribute("title",mxResources.get("save")),G.insertBefore(ba,G.firstChild),mxEvent.addListener(ba,"click",mxUtils.bind(this,function(ja){this.saveLibrary(d.getTitle(),f,d,d.getMode(),d.constructor==LocalLibrary,!0,function(){null==
-ba||d.isModified()||(I.style.paddingRight=18*G.childNodes.length+"px",ba.parentNode.removeChild(ba),ba=null)});mxEvent.consume(ja)})),I.style.paddingRight=18*G.childNodes.length+"px")}),W=mxUtils.bind(this,function(la,ja,U,L){la=Z.cloneCells(mxUtils.sortCells(Z.model.getTopmostCells(la)));for(var da=0;da<la.length;da++){var O=Z.getCellGeometry(la[da]);null!=O&&O.translate(-ja.x,-ja.y)}C.appendChild(this.sidebar.createVertexTemplateFromCells(la,ja.width,ja.height,L||"",!0,null,!1));la={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(la))),
-w:ja.width,h:ja.height};null!=L&&(la.title=L);f.push(la);Q(U);null!=y&&null!=y.parentNode&&0<f.length&&(y.parentNode.removeChild(y),y=null)}),ha=mxUtils.bind(this,function(la){if(Z.isSelectionEmpty())Z.getRubberband().isActive()?(Z.getRubberband().execute(la),Z.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var ja=Z.getSelectionCells(),U=Z.view.getBounds(ja),L=Z.view.scale;U.x/=L;U.y/=L;U.width/=L;U.height/=L;U.x-=
-Z.view.translate.x;U.y-=Z.view.translate.y;W(ja,U)}mxEvent.consume(la)});mxEvent.addGestureListeners(C,function(){},mxUtils.bind(this,function(la){Z.isMouseDown&&null!=Z.panningManager&&null!=Z.graphHandler.first&&(Z.graphHandler.suspend(),null!=Z.graphHandler.hint&&(Z.graphHandler.hint.style.visibility="hidden"),C.style.backgroundColor="#f1f3f4",C.style.cursor="copy",Z.panningManager.stop(),Z.autoScroll=!1,mxEvent.consume(la))}),mxUtils.bind(this,function(la){Z.isMouseDown&&null!=Z.panningManager&&
-null!=Z.graphHandler&&(C.style.backgroundColor="",C.style.cursor="default",this.sidebar.showTooltips=!0,Z.panningManager.stop(),Z.graphHandler.reset(),Z.isMouseDown=!1,Z.autoScroll=!0,ha(la),mxEvent.consume(la))}));mxEvent.addListener(C,"mouseleave",mxUtils.bind(this,function(la){Z.isMouseDown&&null!=Z.graphHandler.first&&(Z.graphHandler.resume(),null!=Z.graphHandler.hint&&(Z.graphHandler.hint.style.visibility="visible"),C.style.backgroundColor="",C.style.cursor="",Z.autoScroll=!0)}));Graph.fileSupport&&
-(mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(la){C.style.backgroundColor="#f1f3f4";la.dataTransfer.dropEffect="copy";C.style.cursor="copy";this.sidebar.hideTooltip();la.stopPropagation();la.preventDefault()})),mxEvent.addListener(C,"drop",mxUtils.bind(this,function(la){C.style.cursor="";C.style.backgroundColor="";0<la.dataTransfer.files.length&&this.importFiles(la.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(ja,U,L,da,O,N,aa,ma,u){if(null!=ja&&"image/"==U.substring(0,
-6))ja="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(ja),ja=[new mxCell("",new mxGeometry(0,0,O,N),ja)],ja[0].vertex=!0,W(ja,new mxRectangle(0,0,O,N),la,mxEvent.isAltDown(la)?null:aa.substring(0,aa.lastIndexOf(".")).replace(/_/g," ")),null!=y&&null!=y.parentNode&&0<f.length&&(y.parentNode.removeChild(y),y=null);else{var H=!1,P=mxUtils.bind(this,function(S,R){null!=S&&"application/pdf"==R&&(R=Editor.extractGraphModelFromPdf(S),null!=
-R&&0<R.length&&(S=R));if(null!=S)if(S=mxUtils.parseXml(S),"mxlibrary"==S.documentElement.nodeName)try{var ca=JSON.parse(mxUtils.getTextContent(S.documentElement));F(ca,C);f=f.concat(ca);Q(la);this.spinner.stop();H=!0}catch(ua){}else if("mxfile"==S.documentElement.nodeName)try{var ea=S.documentElement.getElementsByTagName("diagram");for(ca=0;ca<ea.length;ca++){var fa=this.stringToCells(Editor.getDiagramNodeXml(ea[ca])),ra=this.editor.graph.getBoundingBoxFromGeometry(fa);W(fa,new mxRectangle(0,0,ra.width,
-ra.height),la)}H=!0}catch(ua){null!=window.console&&console.log("error in drop handler:",ua)}H||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=y&&null!=y.parentNode&&0<f.length&&(y.parentNode.removeChild(y),y=null)});null!=u&&null!=aa&&(/(\.v(dx|sdx?))($|\?)/i.test(aa)||/(\.vs(x|sx?))($|\?)/i.test(aa))?this.importVisio(u,function(S){P(S,"text/xml")},null,aa):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(ja,aa)&&null!=u?this.isExternalDataComms()?
-this.parseFile(u,mxUtils.bind(this,function(S){4==S.readyState&&(this.spinner.stop(),200<=S.status&&299>=S.status?P(S.responseText,"text/xml"):this.handleError({message:mxResources.get(413==S.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):P(ja,U)}}));la.stopPropagation();la.preventDefault()})),mxEvent.addListener(C,"dragleave",function(la){C.style.cursor="";C.style.backgroundColor=
-"";la.stopPropagation();la.preventDefault()}));Y=Y.cloneNode(!1);Y.setAttribute("src",Editor.editImage);Y.setAttribute("title",mxResources.get("edit"));G.insertBefore(Y,G.firstChild);mxEvent.addListener(Y,"click",qa);mxEvent.addListener(C,"dblclick",function(la){mxEvent.getSource(la)==C&&qa(la)});m=Y.cloneNode(!1);m.setAttribute("src",Editor.plusImage);m.setAttribute("title",mxResources.get("add"));G.insertBefore(m,G.firstChild);mxEvent.addListener(m,"click",ha);this.isOffline()||".scratchpad"!=d.title||
-null==EditorUi.scratchpadHelpLink||(m=document.createElement("span"),m.setAttribute("title",mxResources.get("help")),m.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(m,"?"),mxEvent.addGestureListeners(m,mxUtils.bind(this,function(la){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(la)})),G.insertBefore(m,G.firstChild))}I.appendChild(G);I.style.paddingRight=18*G.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(d,f){for(var g=
+f)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(d){return""};EditorUi.prototype.libraryLoaded=function(d,f,g,m){if(null!=this.sidebar){d.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(d.getHash());".scratchpad"==d.title&&(this.scratchpad=d);var q=this.sidebar.palettes[d.getHash()];q=null!=q?q[q.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var y=null,F=mxUtils.bind(this,function(U,ma){0==U.length&&d.isEditable()?
+(null==y&&(y=document.createElement("div"),y.className="geDropTarget",mxUtils.write(y,mxResources.get("dragElementsHere"))),ma.appendChild(y)):this.addLibraryEntries(U,ma)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==g&&(g=d.getTitle(),null!=g&&/(\.xml)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf("."))));var C=this.sidebar.addPalette(d.getHash(),g,null!=m?m:!0,mxUtils.bind(this,function(U){F(f,U)}));this.repositionLibrary(q);var I=C.parentNode.previousSibling;m=I.getAttribute("title");
+null!=m&&0<m.length&&".scratchpad"!=d.title&&I.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+m);var G=document.createElement("div");G.style.position="absolute";G.style.right="0px";G.style.top="0px";G.style.padding="8px";G.style.backgroundColor="inherit";I.style.position="relative";var Z=document.createElement("img");Z.setAttribute("src",Editor.crossImage);Z.setAttribute("title",mxResources.get("close"));Z.setAttribute("valign","absmiddle");Z.setAttribute("border","0");Z.style.position="relative";
+Z.style.top="2px";Z.style.width="14px";Z.style.cursor="pointer";Z.style.margin="0 3px";Editor.isDarkMode()&&(Z.style.filter="invert(100%)");var ca=null;if(".scratchpad"!=d.title||this.closableScratchpad)G.appendChild(Z),mxEvent.addListener(Z,"click",mxUtils.bind(this,function(U){if(!mxEvent.isConsumed(U)){var ma=mxUtils.bind(this,function(){this.closeLibrary(d)});null!=ca?this.confirm(mxResources.get("allChangesLost"),null,ma,mxResources.get("cancel"),mxResources.get("discardChanges")):ma();mxEvent.consume(U)}}));
+if(d.isEditable()){var aa=this.editor.graph,Y=null,pa=mxUtils.bind(this,function(U){this.showLibraryDialog(d.getTitle(),C,f,d,d.getMode());mxEvent.consume(U)}),Q=mxUtils.bind(this,function(U){d.setModified(!0);d.isAutosave()?(null!=Y&&null!=Y.parentNode&&Y.parentNode.removeChild(Y),Y=Z.cloneNode(!1),Y.setAttribute("src",Editor.spinImage),Y.setAttribute("title",mxResources.get("saving")),Y.style.cursor="default",Y.style.marginRight="2px",Y.style.marginTop="-2px",G.insertBefore(Y,G.firstChild),I.style.paddingRight=
+18*G.childNodes.length+"px",this.saveLibrary(d.getTitle(),f,d,d.getMode(),!0,!0,function(){null!=Y&&null!=Y.parentNode&&(Y.parentNode.removeChild(Y),I.style.paddingRight=18*G.childNodes.length+"px")})):null==ca&&(ca=Z.cloneNode(!1),ca.setAttribute("src",Editor.saveImage),ca.setAttribute("title",mxResources.get("save")),G.insertBefore(ca,G.firstChild),mxEvent.addListener(ca,"click",mxUtils.bind(this,function(ma){this.saveLibrary(d.getTitle(),f,d,d.getMode(),d.constructor==LocalLibrary,!0,function(){null==
+ca||d.isModified()||(I.style.paddingRight=18*G.childNodes.length+"px",ca.parentNode.removeChild(ca),ca=null)});mxEvent.consume(ma)})),I.style.paddingRight=18*G.childNodes.length+"px")}),X=mxUtils.bind(this,function(U,ma,T,M){U=aa.cloneCells(mxUtils.sortCells(aa.model.getTopmostCells(U)));for(var ia=0;ia<U.length;ia++){var N=aa.getCellGeometry(U[ia]);null!=N&&N.translate(-ma.x,-ma.y)}C.appendChild(this.sidebar.createVertexTemplateFromCells(U,ma.width,ma.height,M||"",!0,null,!1));U={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(U))),
+w:ma.width,h:ma.height};null!=M&&(U.title=M);f.push(U);Q(T);null!=y&&null!=y.parentNode&&0<f.length&&(y.parentNode.removeChild(y),y=null)}),ha=mxUtils.bind(this,function(U){if(aa.isSelectionEmpty())aa.getRubberband().isActive()?(aa.getRubberband().execute(U),aa.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var ma=aa.getSelectionCells(),T=aa.view.getBounds(ma),M=aa.view.scale;T.x/=M;T.y/=M;T.width/=M;T.height/=M;T.x-=
+aa.view.translate.x;T.y-=aa.view.translate.y;X(ma,T)}mxEvent.consume(U)});mxEvent.addGestureListeners(C,function(){},mxUtils.bind(this,function(U){aa.isMouseDown&&null!=aa.panningManager&&null!=aa.graphHandler.first&&(aa.graphHandler.suspend(),null!=aa.graphHandler.hint&&(aa.graphHandler.hint.style.visibility="hidden"),C.style.backgroundColor="#f1f3f4",C.style.cursor="copy",aa.panningManager.stop(),aa.autoScroll=!1,mxEvent.consume(U))}),mxUtils.bind(this,function(U){aa.isMouseDown&&null!=aa.panningManager&&
+null!=aa.graphHandler&&(C.style.backgroundColor="",C.style.cursor="default",this.sidebar.showTooltips=!0,aa.panningManager.stop(),aa.graphHandler.reset(),aa.isMouseDown=!1,aa.autoScroll=!0,ha(U),mxEvent.consume(U))}));mxEvent.addListener(C,"mouseleave",mxUtils.bind(this,function(U){aa.isMouseDown&&null!=aa.graphHandler.first&&(aa.graphHandler.resume(),null!=aa.graphHandler.hint&&(aa.graphHandler.hint.style.visibility="visible"),C.style.backgroundColor="",C.style.cursor="",aa.autoScroll=!0)}));Graph.fileSupport&&
+(mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(U){C.style.backgroundColor="#f1f3f4";U.dataTransfer.dropEffect="copy";C.style.cursor="copy";this.sidebar.hideTooltip();U.stopPropagation();U.preventDefault()})),mxEvent.addListener(C,"drop",mxUtils.bind(this,function(U){C.style.cursor="";C.style.backgroundColor="";0<U.dataTransfer.files.length&&this.importFiles(U.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(ma,T,M,ia,N,O,ba,la,u){if(null!=ma&&"image/"==T.substring(0,
+6))ma="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(ma),ma=[new mxCell("",new mxGeometry(0,0,N,O),ma)],ma[0].vertex=!0,X(ma,new mxRectangle(0,0,N,O),U,mxEvent.isAltDown(U)?null:ba.substring(0,ba.lastIndexOf(".")).replace(/_/g," ")),null!=y&&null!=y.parentNode&&0<f.length&&(y.parentNode.removeChild(y),y=null);else{var H=!1,P=mxUtils.bind(this,function(W,R){null!=W&&"application/pdf"==R&&(R=Editor.extractGraphModelFromPdf(W),null!=
+R&&0<R.length&&(W=R));if(null!=W)if(W=mxUtils.parseXml(W),"mxlibrary"==W.documentElement.nodeName)try{var da=JSON.parse(mxUtils.getTextContent(W.documentElement));F(da,C);f=f.concat(da);Q(U);this.spinner.stop();H=!0}catch(va){}else if("mxfile"==W.documentElement.nodeName)try{var fa=W.documentElement.getElementsByTagName("diagram");for(da=0;da<fa.length;da++){var ea=this.stringToCells(Editor.getDiagramNodeXml(fa[da])),qa=this.editor.graph.getBoundingBoxFromGeometry(ea);X(ea,new mxRectangle(0,0,qa.width,
+qa.height),U)}H=!0}catch(va){null!=window.console&&console.log("error in drop handler:",va)}H||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=y&&null!=y.parentNode&&0<f.length&&(y.parentNode.removeChild(y),y=null)});null!=u&&null!=ba&&(/(\.v(dx|sdx?))($|\?)/i.test(ba)||/(\.vs(x|sx?))($|\?)/i.test(ba))?this.importVisio(u,function(W){P(W,"text/xml")},null,ba):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(ma,ba)&&null!=u?this.isExternalDataComms()?
+this.parseFile(u,mxUtils.bind(this,function(W){4==W.readyState&&(this.spinner.stop(),200<=W.status&&299>=W.status?P(W.responseText,"text/xml"):this.handleError({message:mxResources.get(413==W.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):P(ma,T)}}));U.stopPropagation();U.preventDefault()})),mxEvent.addListener(C,"dragleave",function(U){C.style.cursor="";C.style.backgroundColor=
+"";U.stopPropagation();U.preventDefault()}));Z=Z.cloneNode(!1);Z.setAttribute("src",Editor.editImage);Z.setAttribute("title",mxResources.get("edit"));G.insertBefore(Z,G.firstChild);mxEvent.addListener(Z,"click",pa);mxEvent.addListener(C,"dblclick",function(U){mxEvent.getSource(U)==C&&pa(U)});m=Z.cloneNode(!1);m.setAttribute("src",Editor.plusImage);m.setAttribute("title",mxResources.get("add"));G.insertBefore(m,G.firstChild);mxEvent.addListener(m,"click",ha);this.isOffline()||".scratchpad"!=d.title||
+null==EditorUi.scratchpadHelpLink||(m=document.createElement("span"),m.setAttribute("title",mxResources.get("help")),m.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(m,"?"),mxEvent.addGestureListeners(m,mxUtils.bind(this,function(U){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(U)})),G.insertBefore(m,G.firstChild))}I.appendChild(G);I.style.paddingRight=18*G.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(d,f){for(var g=
0;g<d.length;g++){var m=d[g],q=m.data;if(null!=q){q=this.convertDataUri(q);var y="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==m.aspect&&(y+="aspect=fixed;");f.appendChild(this.sidebar.createVertexTemplate(y+"image="+q,m.w,m.h,"",m.title||"",!1,null,!0))}else null!=m.xml&&(q=this.stringToCells(Graph.decompress(m.xml)),0<q.length&&f.appendChild(this.sidebar.createVertexTemplateFromCells(q,m.w,m.h,m.title||"",!0,null,!0)))}};EditorUi.prototype.getResource=function(d){return null!=
d?d[mxLanguage]||d.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.shapeBackgroundColor=Editor.darkColor,Graph.prototype.shapeForegroundColor=Editor.lightColor,Graph.prototype.defaultPageBackgroundColor=Editor.darkColor,Graph.prototype.defaultPageBorderColor="#505759",BaseFormatPanel.prototype.buttonBackgroundColor=
@@ -3462,27 +3465,27 @@ new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImage
400,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(d,f,g,m,q){d=new LibraryDialog(this,d,f,g,m,q);this.showDialog(d.container,640,440,!0,!1,mxUtils.bind(this,function(y){y&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));d.init()};var k=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(d){var f=k.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(g){this.editor.graph.isSelectionEmpty()&&
f.refresh()}));return f};EditorUi.prototype.createSidebarFooterContainer=function(){var d=this.createDiv("geSidebarContainer geSidebarFooter");d.style.position="absolute";d.style.overflow="hidden";var f=document.createElement("a");f.className="geTitle";f.style.color="#DF6C0C";f.style.fontWeight="bold";f.style.height="100%";f.style.paddingTop="9px";f.innerHTML="<span>+</span>";var g=f.getElementsByTagName("span")[0];g.style.fontSize="18px";g.style.marginRight="5px";mxUtils.write(f,mxResources.get("moreShapes")+
"...");mxEvent.addListener(f,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(m){m.preventDefault()}));mxEvent.addListener(f,"click",mxUtils.bind(this,function(m){this.actions.get("shapes").funct();mxEvent.consume(m)}));d.appendChild(f);return d};EditorUi.prototype.handleError=function(d,f,g,m,q,y,F){var C=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},I=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!=
-d.message)try{F?null!=window.console&&console.error("EditorUi.handleError:",d):EditorUi.logError("Caught: "+(""==d.message&&null!=d.name)?d.name:d.message,d.filename,d.lineNumber,d.columnNumber,d,"INFO")}catch(X){}if(null!=I||null!=f){F=mxUtils.htmlEntities(mxResources.get("unknownError"));var G=mxResources.get("ok"),Y=null;f=null!=f?f:mxResources.get("error");if(null!=I){null!=I.retry&&(G=mxResources.get("cancel"),Y=function(){C();I.retry()});if(404==I.code||404==I.status||403==I.code){F=403==I.code?
-null!=I.message?mxUtils.htmlEntities(I.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=q?q:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var ba=null!=q?null:null!=y?y:window.location.hash;if(null!=ba&&("#G"==ba.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==ba.substring(0,45))&&(null!=d&&null!=d.error&&(null!=d.error.errors&&0<d.error.errors.length&&
-"fileAccess"==d.error.errors[0].reason||null!=d.error.data&&0<d.error.data.length&&"fileAccess"==d.error.data[0].reason)||404==I.code||404==I.status)){ba="#U"==ba.substring(0,2)?ba.substring(45,ba.lastIndexOf("%26ex")):ba.substring(2);this.showError(f,F,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+ba);this.handleError(d,f,g,m,q)}),Y,mxResources.get("changeUser"),mxUtils.bind(this,function(){function X(){ha.innerText=
-"";for(var la=0;la<qa.length;la++){var ja=document.createElement("option");mxUtils.write(ja,qa[la].displayName);ja.value=la;ha.appendChild(ja);ja=document.createElement("option");ja.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(ja,"<"+qa[la].email+">");ja.setAttribute("disabled","disabled");ha.appendChild(ja)}ja=document.createElement("option");mxUtils.write(ja,mxResources.get("addAccount"));ja.value=qa.length;ha.appendChild(ja)}var qa=this.drive.getUsersList(),Q=document.createElement("div"),W=document.createElement("span");
-W.style.marginTop="6px";mxUtils.write(W,mxResources.get("changeUser")+": ");Q.appendChild(W);var ha=document.createElement("select");ha.style.width="200px";X();mxEvent.addListener(ha,"change",mxUtils.bind(this,function(){var la=ha.value,ja=qa.length!=la;ja&&this.drive.setUser(qa[la]);this.drive.authorize(ja,mxUtils.bind(this,function(){ja||(qa=this.drive.getUsersList(),X())}),mxUtils.bind(this,function(U){this.handleError(U)}),!0)}));Q.appendChild(ha);Q=new CustomDialog(this,Q,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),
+d.message)try{F?null!=window.console&&console.error("EditorUi.handleError:",d):EditorUi.logError("Caught: "+(""==d.message&&null!=d.name)?d.name:d.message,d.filename,d.lineNumber,d.columnNumber,d,"INFO")}catch(Y){}if(null!=I||null!=f){F=mxUtils.htmlEntities(mxResources.get("unknownError"));var G=mxResources.get("ok"),Z=null;f=null!=f?f:mxResources.get("error");if(null!=I){null!=I.retry&&(G=mxResources.get("cancel"),Z=function(){C();I.retry()});if(404==I.code||404==I.status||403==I.code){F=403==I.code?
+null!=I.message?mxUtils.htmlEntities(I.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=q?q:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var ca=null!=q?null:null!=y?y:window.location.hash;if(null!=ca&&("#G"==ca.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==ca.substring(0,45))&&(null!=d&&null!=d.error&&(null!=d.error.errors&&0<d.error.errors.length&&
+"fileAccess"==d.error.errors[0].reason||null!=d.error.data&&0<d.error.data.length&&"fileAccess"==d.error.data[0].reason)||404==I.code||404==I.status)){ca="#U"==ca.substring(0,2)?ca.substring(45,ca.lastIndexOf("%26ex")):ca.substring(2);this.showError(f,F,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+ca);this.handleError(d,f,g,m,q)}),Z,mxResources.get("changeUser"),mxUtils.bind(this,function(){function Y(){ha.innerText=
+"";for(var U=0;U<pa.length;U++){var ma=document.createElement("option");mxUtils.write(ma,pa[U].displayName);ma.value=U;ha.appendChild(ma);ma=document.createElement("option");ma.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(ma,"<"+pa[U].email+">");ma.setAttribute("disabled","disabled");ha.appendChild(ma)}ma=document.createElement("option");mxUtils.write(ma,mxResources.get("addAccount"));ma.value=pa.length;ha.appendChild(ma)}var pa=this.drive.getUsersList(),Q=document.createElement("div"),X=document.createElement("span");
+X.style.marginTop="6px";mxUtils.write(X,mxResources.get("changeUser")+": ");Q.appendChild(X);var ha=document.createElement("select");ha.style.width="200px";Y();mxEvent.addListener(ha,"change",mxUtils.bind(this,function(){var U=ha.value,ma=pa.length!=U;ma&&this.drive.setUser(pa[U]);this.drive.authorize(ma,mxUtils.bind(this,function(){ma||(pa=this.drive.getUsersList(),Y())}),mxUtils.bind(this,function(T){this.handleError(T)}),!0)}));Q.appendChild(ha);Q=new CustomDialog(this,Q,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),
!0)}));this.showDialog(Q.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=g&&g()}),480,150);return}}null!=I.message?F=""==I.message&&null!=I.name?mxUtils.htmlEntities(I.name):mxUtils.htmlEntities(I.message):null!=I.response&&null!=I.response.error?F=mxUtils.htmlEntities(I.response.error):"undefined"!==typeof window.App&&(I.code==App.ERROR_TIMEOUT?F=mxUtils.htmlEntities(mxResources.get("timeout")):I.code==App.ERROR_BUSY?F=mxUtils.htmlEntities(mxResources.get("busy")):
-"string"===typeof I&&0<I.length&&(F=mxUtils.htmlEntities(I)))}var Z=y=null;null!=I&&null!=I.helpLink?(y=mxResources.get("help"),Z=mxUtils.bind(this,function(){return this.editor.graph.openLink(I.helpLink)})):null!=I&&null!=I.ownerEmail&&(y=mxResources.get("contactOwner"),F+=mxUtils.htmlEntities(" ("+y+": "+I.ownerEmail+")"),Z=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(I.ownerEmail))}));this.showError(f,F,G,g,Y,null,null,y,Z,null,null,null,m?g:null)}else null!=
+"string"===typeof I&&0<I.length&&(F=mxUtils.htmlEntities(I)))}var aa=y=null;null!=I&&null!=I.helpLink?(y=mxResources.get("help"),aa=mxUtils.bind(this,function(){return this.editor.graph.openLink(I.helpLink)})):null!=I&&null!=I.ownerEmail&&(y=mxResources.get("contactOwner"),F+=mxUtils.htmlEntities(" ("+y+": "+I.ownerEmail+")"),aa=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(I.ownerEmail))}));this.showError(f,F,G,g,Z,null,null,y,aa,null,null,null,m?g:null)}else null!=
g&&g()};EditorUi.prototype.alert=function(d,f,g){d=new ErrorDialog(this,null,d,mxResources.get("ok"),f);this.showDialog(d.container,g||340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(d,f,g,m,q,y){var F=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},C=Math.min(200,28*Math.ceil(d.length/50));d=new ConfirmDialog(this,d,function(){F();null!=f&&f()},function(){F();null!=g&&g()},m,q,null,null,null,null,C);this.showDialog(d.container,340,46+C,!0,y);d.init()};
EditorUi.prototype.showBanner=function(d,f,g,m){var q=!1;if(!(this.bannerShowing||this["hideBanner"+d]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+d])){var y=document.createElement("div");y.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(y.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(y.style,
"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(y.style,"transition","all 1s ease");y.className="geBtn gePrimaryBtn";q=document.createElement("img");q.setAttribute("src",IMAGE_PATH+"/logo.png");q.setAttribute("border","0");q.setAttribute("align","absmiddle");q.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";y.appendChild(q);q=document.createElement("img");q.setAttribute("src",Dialog.prototype.closeImage);q.setAttribute("title",mxResources.get(m?
"doNotShowAgain":"close"));q.setAttribute("border","0");q.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";y.appendChild(q);mxUtils.write(y,f);document.body.appendChild(y);this.bannerShowing=!0;f=document.createElement("div");f.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var F=document.createElement("input");F.setAttribute("type","checkbox");F.setAttribute("id","geDoNotShowAgainCheckbox");F.style.marginRight="6px";
if(!m){f.appendChild(F);var C=document.createElement("label");C.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(C,mxResources.get("doNotShowAgain"));f.appendChild(C);y.style.paddingBottom="30px";y.appendChild(f)}var I=mxUtils.bind(this,function(){null!=y.parentNode&&(y.parentNode.removeChild(y),this.bannerShowing=!1,F.checked||m)&&(this["hideBanner"+d]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+d]=Date.now(),mxSettings.save()))});mxEvent.addListener(q,
-"click",mxUtils.bind(this,function(Y){mxEvent.consume(Y);I()}));var G=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(y.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){I()}),1E3)});mxEvent.addListener(y,"click",mxUtils.bind(this,function(Y){var ba=mxEvent.getSource(Y);ba!=F&&ba!=C?(null!=g&&g(),I(),mxEvent.consume(Y)):G()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(y.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(G,
+"click",mxUtils.bind(this,function(Z){mxEvent.consume(Z);I()}));var G=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(y.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){I()}),1E3)});mxEvent.addListener(y,"click",mxUtils.bind(this,function(Z){var ca=mxEvent.getSource(Z);ca!=F&&ca!=C?(null!=g&&g(),I(),mxEvent.consume(Z)):G()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(y.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(G,
3E4);q=!0}return q};EditorUi.prototype.setCurrentFile=function(d){null!=d&&(d.opened=new Date);this.currentFile=d};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(d,f,g,m){d=d.toDataURL("image/"+g);if(null!=d&&6<d.length)null!=f&&(d=Editor.writeGraphModelToPng(d,"tEXt","mxfile",encodeURIComponent(f))),0<m&&(d=Editor.writeGraphModelToPng(d,"pHYs",
"dpi",m));else throw{message:mxResources.get("unknownError")};return d};EditorUi.prototype.saveCanvas=function(d,f,g,m,q){var y="jpeg"==g?"jpg":g;m=this.getBaseFilename(m)+(null!=f?".drawio":"")+"."+y;d=this.createImageDataUri(d,f,g,q);this.saveData(m,y,d.substring(d.lastIndexOf(",")+1),"image/"+g,!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(d,f){d=new TextareaDialog(this,d,f,null,null,mxResources.get("close"));this.showDialog(d.container,620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(d,f,g,m,q,y){"text/xml"!=g||/(\.drawio)$/i.test(f)||/(\.xml)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.html)$/i.test(f)||(f=f+"."+(null!=y?y:"drawio"));if(window.Blob&&
navigator.msSaveOrOpenBlob)d=m?this.base64ToBlob(d,g):new Blob([d],{type:g}),navigator.msSaveOrOpenBlob(d,f);else if(mxClient.IS_IE)g=window.open("about:blank","_blank"),null==g?mxUtils.popup(d,!0):(g.document.write(d),g.document.close(),g.document.execCommand("SaveAs",!0,f),g.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==g||"image/"!=g.substring(0,6)?this.showTextDialog(f+":",d):this.openInNewWindow(d,g,m);else{var F=document.createElement("a");y=(null==navigator.userAgent||
0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof F.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var C=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);y=65==(C?parseInt(C[2],10):!1)?!1:y}if(y||this.isOffline()){F.href=URL.createObjectURL(m?this.base64ToBlob(d,g):new Blob([d],{type:g}));y?F.download=f:F.setAttribute("target","_blank");document.body.appendChild(F);try{window.setTimeout(function(){URL.revokeObjectURL(F.href)},2E4),F.click(),F.parentNode.removeChild(F)}catch(I){}}else this.createEchoRequest(d,
f,g,m,q).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(d,f,g,m,q,y){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,d+(null!=g?"&mime="+g:"")+(null!=q?"&format="+q:"")+(null!=y?"&base64="+y:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(m?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(d,f){f=f||"";d=atob(d);for(var g=d.length,m=Math.ceil(g/1024),q=Array(m),y=0;y<m;++y){for(var F=1024*y,C=Math.min(F+1024,g),I=Array(C-F),G=0;F<C;++G,++F)I[G]=
-d[F].charCodeAt(0);q[y]=new Uint8Array(I)}return new Blob(q,{type:f})};EditorUi.prototype.saveLocalFile=function(d,f,g,m,q,y,F,C){y=null!=y?y:!1;F=null!=F?F:"vsdx"!=q&&(!mxClient.IS_IOS||!navigator.standalone);q=this.getServiceCount(y);isLocalStorage&&q++;var I=4>=q?2:6<q?4:3;f=new CreateDialog(this,f,mxUtils.bind(this,function(G,Y){try{if("_blank"==Y)if(null!=g&&"image/"==g.substring(0,6))this.openInNewWindow(d,g,m);else if(null!=g&&"text/html"==g.substring(0,9)){var ba=new EmbedDialog(this,d);this.showDialog(ba.container,
-450,240,!0,!0);ba.init()}else{var Z=window.open("about:blank");null==Z?mxUtils.popup(d,!0):(Z.document.write("<pre>"+mxUtils.htmlEntities(d,!1)+"</pre>"),Z.document.close())}else Y==App.MODE_DEVICE||"download"==Y?this.doSaveLocalFile(d,G,g,m,null,C):null!=G&&0<G.length&&this.pickFolder(Y,mxUtils.bind(this,function(X){try{this.exportFile(d,G,g,m,Y,X)}catch(qa){this.handleError(qa)}}))}catch(X){this.handleError(X)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),
+d[F].charCodeAt(0);q[y]=new Uint8Array(I)}return new Blob(q,{type:f})};EditorUi.prototype.saveLocalFile=function(d,f,g,m,q,y,F,C){y=null!=y?y:!1;F=null!=F?F:"vsdx"!=q&&(!mxClient.IS_IOS||!navigator.standalone);q=this.getServiceCount(y);isLocalStorage&&q++;var I=4>=q?2:6<q?4:3;f=new CreateDialog(this,f,mxUtils.bind(this,function(G,Z){try{if("_blank"==Z)if(null!=g&&"image/"==g.substring(0,6))this.openInNewWindow(d,g,m);else if(null!=g&&"text/html"==g.substring(0,9)){var ca=new EmbedDialog(this,d);this.showDialog(ca.container,
+450,240,!0,!0);ca.init()}else{var aa=window.open("about:blank");null==aa?mxUtils.popup(d,!0):(aa.document.write("<pre>"+mxUtils.htmlEntities(d,!1)+"</pre>"),aa.document.close())}else Z==App.MODE_DEVICE||"download"==Z?this.doSaveLocalFile(d,G,g,m,null,C):null!=G&&0<G.length&&this.pickFolder(Z,mxUtils.bind(this,function(Y){try{this.exportFile(d,G,g,m,Z,Y)}catch(pa){this.handleError(pa)}}))}catch(Y){this.handleError(Y)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),
!1,y,F,null,1<q,I,d,g,m);y=this.isServices(q)?q>I?390:280:160;this.showDialog(f.container,420,y,!0,!0);f.init()};EditorUi.prototype.openInNewWindow=function(d,f,g){var m=window.open("about:blank");null==m||null==m.document?mxUtils.popup(d,!0):("image/svg+xml"!=f||mxClient.IS_SVG?"image/svg+xml"!=f||this.editor.graph.mathEnabled?(d=g?d:btoa(unescape(encodeURIComponent(d))),m.document.write('<html><img style="max-width:100%;" src="data:'+f+";base64,"+d+'"/></html>')):m.document.write("<html>"+d+"</html>"):
m.document.write("<html><pre>"+mxUtils.htmlEntities(d,!1)+"</pre></html>"),m.document.close())};var n=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(d){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var f=d(mxUtils.bind(this,function(m){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=
@@ -3496,13 +3499,13 @@ this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.styl
this.exportDialog.style.zIndex=y.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(C){F.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var I=this.createImageDataUri(C,null,"png");C=document.createElement("img");C.style.maxWidth="140px";C.style.maxHeight=
"140px";C.style.cursor="pointer";C.style.backgroundColor="white";C.setAttribute("title",mxResources.get("openInNewWindow"));C.setAttribute("border","0");C.setAttribute("src",I);this.exportDialog.appendChild(C);mxEvent.addListener(C,"click",mxUtils.bind(this,function(){this.openInNewWindow(I.substring(I.indexOf(",")+1),"image/png",!0);q.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}),null,null,null,null,null,null,null,
Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",q);document.body.appendChild(this.exportDialog)}mxEvent.consume(m)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(d,f,g,m,q){this.isLocalFileSave()?this.saveLocalFile(g,d,m,q,f):this.saveRequest(d,f,mxUtils.bind(this,function(y,F){return this.createEchoRequest(g,y,m,q,f,F)}),g,q,m)};EditorUi.prototype.saveRequest=function(d,f,g,m,q,y,F){F=null!=F?F:!mxClient.IS_IOS||!navigator.standalone;
-var C=this.getServiceCount(!1);isLocalStorage&&C++;var I=4>=C?2:6<C?4:3;d=new CreateDialog(this,d,mxUtils.bind(this,function(G,Y){if("_blank"==Y||null!=G&&0<G.length){var ba=g("_blank"==Y?null:G,Y==App.MODE_DEVICE||"download"==Y||null==Y||"_blank"==Y?"0":"1");null!=ba&&(Y==App.MODE_DEVICE||"download"==Y||"_blank"==Y?ba.simulate(document,"_blank"):this.pickFolder(Y,mxUtils.bind(this,function(Z){y=null!=y?y:"pdf"==f?"application/pdf":"image/"+f;if(null!=m)try{this.exportFile(m,G,y,!0,Y,Z)}catch(X){this.handleError(X)}else this.spinner.spin(document.body,
-mxResources.get("saving"))&&ba.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=ba.getStatus()&&299>=ba.getStatus())try{this.exportFile(ba.getText(),G,y,!0,Y,Z)}catch(X){this.handleError(X)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(X){this.spinner.stop();this.handleError(X)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,F,null,1<C,I,m,y,q);C=this.isServices(C)?4<C?390:280:160;this.showDialog(d.container,
-420,C,!0,!0);d.init()};EditorUi.prototype.isServices=function(d){return 1!=d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,f,g,m,q,y){};EditorUi.prototype.pickFolder=function(d,f,g){f(null)};EditorUi.prototype.exportSvg=function(d,f,g,m,q,y,F,C,I,G,Y,ba,Z,X){if(this.spinner.spin(document.body,mxResources.get("export")))try{var qa=this.editor.graph.isSelectionEmpty();g=null!=g?g:qa;var Q=f?null:this.editor.graph.background;Q==mxConstants.NONE&&
-(Q=null);null==Q&&0==f&&(Q=Y?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var W=this.editor.graph.getSvg(Q,d,F,C,null,g,null,null,"blank"==G?"_blank":"self"==G?"_top":null,null,!Z,Y,ba);m&&this.editor.graph.addSvgShadow(W);var ha=this.getBaseFilename()+(q?".drawio":"")+".svg";X=null!=X?X:mxUtils.bind(this,function(U){this.isLocalFileSave()||U.length<=MAX_REQUEST_SIZE?this.saveData(ha,"svg",U,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),
-mxUtils.bind(this,function(){mxUtils.popup(U)}))});var la=mxUtils.bind(this,function(U){this.spinner.stop();q&&U.setAttribute("content",this.getFileData(!0,null,null,null,g,I,null,null,null,!1));X(Graph.xmlDeclaration+"\n"+(q?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(U))});this.editor.graph.mathEnabled&&this.editor.addMathCss(W);var ja=mxUtils.bind(this,function(U){y?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(U,la,this.thumbImageCache)):
-la(U)});Z?this.embedFonts(W,ja):(this.editor.addFontCss(W),ja(W))}catch(U){this.handleError(U)}};EditorUi.prototype.addRadiobox=function(d,f,g,m,q,y,F){return this.addCheckbox(d,g,m,q,y,F,!0,f)};EditorUi.prototype.addCheckbox=function(d,f,g,m,q,y,F,C){y=null!=y?y:!0;var I=document.createElement("input");I.style.marginRight="8px";I.style.marginTop="16px";I.setAttribute("type",F?"radio":"checkbox");F="geCheckbox-"+Editor.guid();I.id=F;null!=C&&I.setAttribute("name",C);g&&(I.setAttribute("checked","checked"),
-I.defaultChecked=!0);m&&I.setAttribute("disabled","disabled");y&&(d.appendChild(I),g=document.createElement("label"),mxUtils.write(g,f),g.setAttribute("for",F),d.appendChild(g),q||mxUtils.br(d));return I};EditorUi.prototype.addEditButton=function(d,f){var g=this.addCheckbox(d,mxResources.get("edit")+":",!0,null,!0);g.style.marginLeft="24px";var m=this.getCurrentFile(),q="";null!=m&&m.getMode()!=App.MODE_DEVICE&&m.getMode()!=App.MODE_BROWSER&&(q=window.location.href);var y=document.createElement("select");
+var C=this.getServiceCount(!1);isLocalStorage&&C++;var I=4>=C?2:6<C?4:3;d=new CreateDialog(this,d,mxUtils.bind(this,function(G,Z){if("_blank"==Z||null!=G&&0<G.length){var ca=g("_blank"==Z?null:G,Z==App.MODE_DEVICE||"download"==Z||null==Z||"_blank"==Z?"0":"1");null!=ca&&(Z==App.MODE_DEVICE||"download"==Z||"_blank"==Z?ca.simulate(document,"_blank"):this.pickFolder(Z,mxUtils.bind(this,function(aa){y=null!=y?y:"pdf"==f?"application/pdf":"image/"+f;if(null!=m)try{this.exportFile(m,G,y,!0,Z,aa)}catch(Y){this.handleError(Y)}else this.spinner.spin(document.body,
+mxResources.get("saving"))&&ca.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=ca.getStatus()&&299>=ca.getStatus())try{this.exportFile(ca.getText(),G,y,!0,Z,aa)}catch(Y){this.handleError(Y)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(Y){this.spinner.stop();this.handleError(Y)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,F,null,1<C,I,m,y,q);C=this.isServices(C)?4<C?390:280:160;
+this.showDialog(d.container,420,C,!0,!0);d.init()};EditorUi.prototype.isServices=function(d){return 1!=d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,f,g,m,q,y){};EditorUi.prototype.pickFolder=function(d,f,g){f(null)};EditorUi.prototype.exportSvg=function(d,f,g,m,q,y,F,C,I,G,Z,ca,aa,Y){if(this.spinner.spin(document.body,mxResources.get("export")))try{var pa=this.editor.graph.isSelectionEmpty();g=null!=g?g:pa;var Q=f?null:this.editor.graph.background;
+Q==mxConstants.NONE&&(Q=null);null==Q&&0==f&&(Q=Z?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var X=this.editor.graph.getSvg(Q,d,F,C,null,g,null,null,"blank"==G?"_blank":"self"==G?"_top":null,null,!aa,Z,ca);m&&this.editor.graph.addSvgShadow(X);var ha=this.getBaseFilename()+(q?".drawio":"")+".svg";Y=null!=Y?Y:mxUtils.bind(this,function(T){this.isLocalFileSave()||T.length<=MAX_REQUEST_SIZE?this.saveData(ha,"svg",T,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},
+mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(T)}))});var U=mxUtils.bind(this,function(T){this.spinner.stop();q&&T.setAttribute("content",this.getFileData(!0,null,null,null,g,I,null,null,null,!1));Y(Graph.xmlDeclaration+"\n"+(q?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(T))});this.editor.graph.mathEnabled&&this.editor.addMathCss(X);var ma=mxUtils.bind(this,function(T){y?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(T,
+U,this.thumbImageCache)):U(T)});aa?this.embedFonts(X,ma):(this.editor.addFontCss(X),ma(X))}catch(T){this.handleError(T)}};EditorUi.prototype.addRadiobox=function(d,f,g,m,q,y,F){return this.addCheckbox(d,g,m,q,y,F,!0,f)};EditorUi.prototype.addCheckbox=function(d,f,g,m,q,y,F,C){y=null!=y?y:!0;var I=document.createElement("input");I.style.marginRight="8px";I.style.marginTop="16px";I.setAttribute("type",F?"radio":"checkbox");F="geCheckbox-"+Editor.guid();I.id=F;null!=C&&I.setAttribute("name",C);g&&(I.setAttribute("checked",
+"checked"),I.defaultChecked=!0);m&&I.setAttribute("disabled","disabled");y&&(d.appendChild(I),g=document.createElement("label"),mxUtils.write(g,f),g.setAttribute("for",F),d.appendChild(g),q||mxUtils.br(d));return I};EditorUi.prototype.addEditButton=function(d,f){var g=this.addCheckbox(d,mxResources.get("edit")+":",!0,null,!0);g.style.marginLeft="24px";var m=this.getCurrentFile(),q="";null!=m&&m.getMode()!=App.MODE_DEVICE&&m.getMode()!=App.MODE_BROWSER&&(q=window.location.href);var y=document.createElement("select");
y.style.maxWidth="200px";y.style.width="auto";y.style.marginLeft="8px";y.style.marginRight="10px";y.className="geBtn";m=document.createElement("option");m.setAttribute("value","blank");mxUtils.write(m,mxResources.get("makeCopy"));y.appendChild(m);m=document.createElement("option");m.setAttribute("value","custom");mxUtils.write(m,mxResources.get("custom")+"...");y.appendChild(m);d.appendChild(y);mxEvent.addListener(y,"change",mxUtils.bind(this,function(){if("custom"==y.value){var F=new FilenameDialog(this,
q,mxResources.get("ok"),function(C){null!=C?q=C:y.value="blank"},mxResources.get("url"),null,null,null,null,function(){y.value="blank"});this.showDialog(F.container,300,80,!0,!1);F.init()}}));mxEvent.addListener(g,"change",mxUtils.bind(this,function(){g.checked&&(null==f||f.checked)?y.removeAttribute("disabled"):y.setAttribute("disabled","disabled")}));mxUtils.br(d);return{getLink:function(){return g.checked?"blank"===y.value?"_blank":q:null},getEditInput:function(){return g},getEditSelect:function(){return y}}};
EditorUi.prototype.addLinkSection=function(d,f){function g(){var C=document.createElement("div");C.style.width="100%";C.style.height="100%";C.style.boxSizing="border-box";null!=y&&y!=mxConstants.NONE?(C.style.border="1px solid black",C.style.backgroundColor=y):(C.style.backgroundPosition="center center",C.style.backgroundRepeat="no-repeat",C.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");F.innerText="";F.appendChild(C)}mxUtils.write(d,mxResources.get("links")+":");var m=document.createElement("select");
@@ -3511,297 +3514,296 @@ m.appendChild(q);f&&(f=document.createElement("option"),f.setAttribute("value","
"22px";F.style.width="22px";F.style.position="relative";F.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";F.className="geColorBtn";d.appendChild(F);mxUtils.br(d);return{getColor:function(){return y},getTarget:function(){return m.value},focus:function(){m.focus()}}};EditorUi.prototype.createUrlParameters=function(d,f,g,m,q,y,F){F=null!=F?F:[];m&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||F.push("lightbox=1"),"auto"!=d&&F.push("target="+d),null!=
f&&f!=mxConstants.NONE&&F.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=q&&0<q.length&&F.push("edit="+encodeURIComponent(q)),y&&F.push("layers=1"),this.editor.graph.foldingEnabled&&F.push("nav=1"));g&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&F.push("page-id="+this.currentPage.getId());return F};EditorUi.prototype.createLink=function(d,f,g,m,q,y,F,C,I,G){I=this.createUrlParameters(d,f,g,m,q,y,I);d=this.getCurrentFile();f=!0;null!=F?g="#U"+encodeURIComponent(F):
(d=this.getCurrentFile(),C||null==d||d.constructor!=window.DriveFile?g="#R"+encodeURIComponent(g?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(g="#"+d.getHash(),f=!1));f&&null!=d&&null!=d.getTitle()&&d.getTitle()!=this.defaultFilename&&I.push("title="+encodeURIComponent(d.getTitle()));G&&1<g.length&&(I.push("open="+g.substring(1)),g="");return(m&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||
-!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<I.length?"?"+I.join("&"):"")+g};EditorUi.prototype.createHtml=function(d,f,g,m,q,y,F,C,I,G,Y,ba){this.getBasenames();var Z={};""!=q&&q!=mxConstants.NONE&&(Z.highlight=q);"auto"!==m&&(Z.target=m);G||(Z.lightbox=!1);Z.nav=this.editor.graph.foldingEnabled;g=parseInt(g);isNaN(g)||100==g||(Z.zoom=g/100);g=[];F&&(g.push("pages"),Z.resize=!0,null!=this.pages&&null!=this.currentPage&&(Z.page=mxUtils.indexOf(this.pages,
-this.currentPage)));f&&(g.push("zoom"),Z.resize=!0);C&&g.push("layers");I&&g.push("tags");0<g.length&&(G&&g.push("lightbox"),Z.toolbar=g.join(" "));null!=Y&&0<Y.length&&(Z.edit=Y);null!=d?Z.url=d:Z.xml=this.getFileData(!0,null,null,null,null,!F);f='<div class="mxgraph" style="'+(y?"max-width:100%;":"")+(""!=g?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(Z))+'"></div>';d=null!=d?"&fetch="+encodeURIComponent(d):"";ba(f,'<script type="text/javascript" src="'+
+!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<I.length?"?"+I.join("&"):"")+g};EditorUi.prototype.createHtml=function(d,f,g,m,q,y,F,C,I,G,Z,ca){this.getBasenames();var aa={};""!=q&&q!=mxConstants.NONE&&(aa.highlight=q);"auto"!==m&&(aa.target=m);G||(aa.lightbox=!1);aa.nav=this.editor.graph.foldingEnabled;g=parseInt(g);isNaN(g)||100==g||(aa.zoom=g/100);g=[];F&&(g.push("pages"),aa.resize=!0,null!=this.pages&&null!=this.currentPage&&(aa.page=
+mxUtils.indexOf(this.pages,this.currentPage)));f&&(g.push("zoom"),aa.resize=!0);C&&g.push("layers");I&&g.push("tags");0<g.length&&(G&&g.push("lightbox"),aa.toolbar=g.join(" "));null!=Z&&0<Z.length&&(aa.edit=Z);null!=d?aa.url=d:aa.xml=this.getFileData(!0,null,null,null,null,!F);f='<div class="mxgraph" style="'+(y?"max-width:100%;":"")+(""!=g?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(aa))+'"></div>';d=null!=d?"&fetch="+encodeURIComponent(d):"";ca(f,'<script type="text/javascript" src="'+
(0<d.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+d:"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(d,f,g,m){var q=document.createElement("div");q.style.whiteSpace="nowrap";var y=document.createElement("h3");mxUtils.write(y,mxResources.get("html"));y.style.cssText=
"width:100%;text-align:center;margin-top:0px;margin-bottom:12px";q.appendChild(y);var F=document.createElement("div");F.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var C=document.createElement("input");C.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";C.setAttribute("value","url");C.setAttribute("type","radio");C.setAttribute("name","type-embedhtmldialog");y=C.cloneNode(!0);y.setAttribute("value","copy");F.appendChild(y);var I=document.createElement("span");
mxUtils.write(I,mxResources.get("includeCopyOfMyDiagram"));F.appendChild(I);mxUtils.br(F);F.appendChild(C);I=document.createElement("span");mxUtils.write(I,mxResources.get("publicDiagramUrl"));F.appendChild(I);var G=this.getCurrentFile();null==g&&null!=G&&G.constructor==window.DriveFile&&(I=document.createElement("a"),I.style.paddingLeft="12px",I.style.color="gray",I.style.cursor="pointer",mxUtils.write(I,mxResources.get("share")),F.appendChild(I),mxEvent.addListener(I,"click",mxUtils.bind(this,function(){this.hideDialog();
-this.drive.showPermissions(G.getId())})));y.setAttribute("checked","checked");null==g&&C.setAttribute("disabled","disabled");q.appendChild(F);var Y=this.addLinkSection(q),ba=this.addCheckbox(q,mxResources.get("zoom"),!0,null,!0);mxUtils.write(q,":");var Z=document.createElement("input");Z.setAttribute("type","text");Z.style.marginRight="16px";Z.style.width="60px";Z.style.marginLeft="4px";Z.style.marginRight="12px";Z.value="100%";q.appendChild(Z);var X=this.addCheckbox(q,mxResources.get("fit"),!0);
-F=null!=this.pages&&1<this.pages.length;var qa=qa=this.addCheckbox(q,mxResources.get("allPages"),F,!F),Q=this.addCheckbox(q,mxResources.get("layers"),!0),W=this.addCheckbox(q,mxResources.get("tags"),!0),ha=this.addCheckbox(q,mxResources.get("lightbox"),!0),la=null;F=380;if(EditorUi.enableHtmlEditOption){la=this.addEditButton(q,ha);var ja=la.getEditInput();ja.style.marginBottom="16px";F+=50;mxEvent.addListener(ha,"change",function(){ha.checked?ja.removeAttribute("disabled"):ja.setAttribute("disabled",
-"disabled");ja.checked&&ha.checked?la.getEditSelect().removeAttribute("disabled"):la.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,q,mxUtils.bind(this,function(){m(C.checked?g:null,ba.checked,Z.value,Y.getTarget(),Y.getColor(),X.checked,qa.checked,Q.checked,W.checked,ha.checked,null!=la?la.getLink():null)}),null,d,f);this.showDialog(d.container,340,F,!0,!0);y.focus()};EditorUi.prototype.showPublishLinkDialog=function(d,f,g,m,q,y,F,C){var I=document.createElement("div");
-I.style.whiteSpace="nowrap";var G=document.createElement("h3");mxUtils.write(G,d||mxResources.get("link"));G.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";I.appendChild(G);var Y=this.getCurrentFile();d=0;if(null==Y||Y.constructor!=window.DriveFile||f)F=null!=F?F:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{d=80;F=null!=F?F:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";G=document.createElement("div");G.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";
-var ba=document.createElement("div");ba.style.whiteSpace="normal";mxUtils.write(ba,mxResources.get("linkAccountRequired"));G.appendChild(ba);ba=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(Y.getId())}));ba.style.marginTop="12px";ba.className="geBtn";G.appendChild(ba);I.appendChild(G);ba=document.createElement("a");ba.style.paddingLeft="12px";ba.style.color="gray";ba.style.fontSize="11px";ba.style.cursor="pointer";mxUtils.write(ba,mxResources.get("check"));
-G.appendChild(ba);mxEvent.addListener(ba,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(L){this.spinner.stop();L=new ErrorDialog(this,null,mxResources.get(null!=L?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(L.container,300,80,!0,!1);L.init()}))}))}var Z=null,X=null;if(null!=g||null!=m)d+=30,mxUtils.write(I,mxResources.get("width")+":"),Z=document.createElement("input"),
-Z.setAttribute("type","text"),Z.style.marginRight="16px",Z.style.width="50px",Z.style.marginLeft="6px",Z.style.marginRight="16px",Z.style.marginBottom="10px",Z.value="100%",I.appendChild(Z),mxUtils.write(I,mxResources.get("height")+":"),X=document.createElement("input"),X.setAttribute("type","text"),X.style.width="50px",X.style.marginLeft="6px",X.style.marginBottom="10px",X.value=m+"px",I.appendChild(X),mxUtils.br(I);var qa=this.addLinkSection(I,y);g=null!=this.pages&&1<this.pages.length;var Q=null;
-if(null==Y||Y.constructor!=window.DriveFile||f)Q=this.addCheckbox(I,mxResources.get("allPages"),g,!g);var W=this.addCheckbox(I,mxResources.get("lightbox"),!0,null,null,!y),ha=this.addEditButton(I,W),la=ha.getEditInput();y&&(la.style.marginLeft=W.style.marginLeft,W.style.display="none",d-=20);var ja=this.addCheckbox(I,mxResources.get("layers"),!0);ja.style.marginLeft=la.style.marginLeft;ja.style.marginTop="8px";var U=this.addCheckbox(I,mxResources.get("tags"),!0);U.style.marginLeft=la.style.marginLeft;
-U.style.marginBottom="16px";U.style.marginTop="16px";mxEvent.addListener(W,"change",function(){W.checked?(ja.removeAttribute("disabled"),la.removeAttribute("disabled")):(ja.setAttribute("disabled","disabled"),la.setAttribute("disabled","disabled"));la.checked&&W.checked?ha.getEditSelect().removeAttribute("disabled"):ha.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,I,mxUtils.bind(this,function(){q(qa.getTarget(),qa.getColor(),null==Q?!0:Q.checked,W.checked,ha.getLink(),
-ja.checked,null!=Z?Z.value:null,null!=X?X.value:null,U.checked)}),null,mxResources.get("create"),F,C);this.showDialog(f.container,340,300+d,!0,!0);null!=Z?(Z.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?Z.select():document.execCommand("selectAll",!1,null)):qa.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,f,g,m,q){var y=document.createElement("div");y.style.whiteSpace="nowrap";var F=document.createElement("h3");mxUtils.write(F,mxResources.get("image"));F.style.cssText=
+this.drive.showPermissions(G.getId())})));y.setAttribute("checked","checked");null==g&&C.setAttribute("disabled","disabled");q.appendChild(F);var Z=this.addLinkSection(q),ca=this.addCheckbox(q,mxResources.get("zoom"),!0,null,!0);mxUtils.write(q,":");var aa=document.createElement("input");aa.setAttribute("type","text");aa.style.marginRight="16px";aa.style.width="60px";aa.style.marginLeft="4px";aa.style.marginRight="12px";aa.value="100%";q.appendChild(aa);var Y=this.addCheckbox(q,mxResources.get("fit"),
+!0);F=null!=this.pages&&1<this.pages.length;var pa=pa=this.addCheckbox(q,mxResources.get("allPages"),F,!F),Q=this.addCheckbox(q,mxResources.get("layers"),!0),X=this.addCheckbox(q,mxResources.get("tags"),!0),ha=this.addCheckbox(q,mxResources.get("lightbox"),!0),U=null;F=380;if(EditorUi.enableHtmlEditOption){U=this.addEditButton(q,ha);var ma=U.getEditInput();ma.style.marginBottom="16px";F+=50;mxEvent.addListener(ha,"change",function(){ha.checked?ma.removeAttribute("disabled"):ma.setAttribute("disabled",
+"disabled");ma.checked&&ha.checked?U.getEditSelect().removeAttribute("disabled"):U.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,q,mxUtils.bind(this,function(){m(C.checked?g:null,ca.checked,aa.value,Z.getTarget(),Z.getColor(),Y.checked,pa.checked,Q.checked,X.checked,ha.checked,null!=U?U.getLink():null)}),null,d,f);this.showDialog(d.container,340,F,!0,!0);y.focus()};EditorUi.prototype.showPublishLinkDialog=function(d,f,g,m,q,y,F,C){var I=document.createElement("div");
+I.style.whiteSpace="nowrap";var G=document.createElement("h3");mxUtils.write(G,d||mxResources.get("link"));G.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";I.appendChild(G);var Z=this.getCurrentFile();d=0;if(null==Z||Z.constructor!=window.DriveFile||f)F=null!=F?F:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{d=80;F=null!=F?F:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";G=document.createElement("div");G.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";
+var ca=document.createElement("div");ca.style.whiteSpace="normal";mxUtils.write(ca,mxResources.get("linkAccountRequired"));G.appendChild(ca);ca=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(Z.getId())}));ca.style.marginTop="12px";ca.className="geBtn";G.appendChild(ca);I.appendChild(G);ca=document.createElement("a");ca.style.paddingLeft="12px";ca.style.color="gray";ca.style.fontSize="11px";ca.style.cursor="pointer";mxUtils.write(ca,mxResources.get("check"));
+G.appendChild(ca);mxEvent.addListener(ca,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(M){this.spinner.stop();M=new ErrorDialog(this,null,mxResources.get(null!=M?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(M.container,300,80,!0,!1);M.init()}))}))}var aa=null,Y=null;if(null!=g||null!=m)d+=30,mxUtils.write(I,mxResources.get("width")+":"),aa=document.createElement("input"),
+aa.setAttribute("type","text"),aa.style.marginRight="16px",aa.style.width="50px",aa.style.marginLeft="6px",aa.style.marginRight="16px",aa.style.marginBottom="10px",aa.value="100%",I.appendChild(aa),mxUtils.write(I,mxResources.get("height")+":"),Y=document.createElement("input"),Y.setAttribute("type","text"),Y.style.width="50px",Y.style.marginLeft="6px",Y.style.marginBottom="10px",Y.value=m+"px",I.appendChild(Y),mxUtils.br(I);var pa=this.addLinkSection(I,y);g=null!=this.pages&&1<this.pages.length;
+var Q=null;if(null==Z||Z.constructor!=window.DriveFile||f)Q=this.addCheckbox(I,mxResources.get("allPages"),g,!g);var X=this.addCheckbox(I,mxResources.get("lightbox"),!0,null,null,!y),ha=this.addEditButton(I,X),U=ha.getEditInput();y&&(U.style.marginLeft=X.style.marginLeft,X.style.display="none",d-=20);var ma=this.addCheckbox(I,mxResources.get("layers"),!0);ma.style.marginLeft=U.style.marginLeft;ma.style.marginTop="8px";var T=this.addCheckbox(I,mxResources.get("tags"),!0);T.style.marginLeft=U.style.marginLeft;
+T.style.marginBottom="16px";T.style.marginTop="16px";mxEvent.addListener(X,"change",function(){X.checked?(ma.removeAttribute("disabled"),U.removeAttribute("disabled")):(ma.setAttribute("disabled","disabled"),U.setAttribute("disabled","disabled"));U.checked&&X.checked?ha.getEditSelect().removeAttribute("disabled"):ha.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,I,mxUtils.bind(this,function(){q(pa.getTarget(),pa.getColor(),null==Q?!0:Q.checked,X.checked,ha.getLink(),
+ma.checked,null!=aa?aa.value:null,null!=Y?Y.value:null,T.checked)}),null,mxResources.get("create"),F,C);this.showDialog(f.container,340,300+d,!0,!0);null!=aa?(aa.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?aa.select():document.execCommand("selectAll",!1,null)):pa.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,f,g,m,q){var y=document.createElement("div");y.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:"+(q?"10":"4")+"px";y.appendChild(F);if(q){mxUtils.write(y,mxResources.get("zoom")+":");var C=document.createElement("input");C.setAttribute("type","text");C.style.marginRight="16px";C.style.width="60px";C.style.marginLeft="4px";C.style.marginRight="12px";C.value=this.lastExportZoom||"100%";y.appendChild(C);mxUtils.write(y,mxResources.get("borderWidth")+":");var I=document.createElement("input");I.setAttribute("type","text");I.style.marginRight=
-"16px";I.style.width="60px";I.style.marginLeft="4px";I.value=this.lastExportBorder||"0";y.appendChild(I);mxUtils.br(y)}var G=this.addCheckbox(y,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),Y=m?null:this.addCheckbox(y,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);F=this.editor.graph;var ba=m?null:this.addCheckbox(y,mxResources.get("transparentBackground"),F.background==mxConstants.NONE||null==F.background);null!=ba&&(ba.style.marginBottom="16px");
-d=new CustomDialog(this,y,mxUtils.bind(this,function(){var Z=parseInt(C.value)/100||1,X=parseInt(I.value)||0;g(!G.checked,null!=Y?Y.checked:!1,null!=ba?ba.checked:!1,Z,X)}),null,d,f);this.showDialog(d.container,300,(q?25:0)+(m?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,f,g,m,q,y,F,C,I){F=null!=F?F:Editor.defaultIncludeDiagram;var G=document.createElement("div");G.style.whiteSpace="nowrap";var Y=this.editor.graph,ba="jpeg"==C?220:300,Z=document.createElement("h3");mxUtils.write(Z,
-d);Z.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";G.appendChild(Z);mxUtils.write(G,mxResources.get("zoom")+":");var X=document.createElement("input");X.setAttribute("type","text");X.style.marginRight="16px";X.style.width="60px";X.style.marginLeft="4px";X.style.marginRight="12px";X.value=this.lastExportZoom||"100%";G.appendChild(X);mxUtils.write(G,mxResources.get("borderWidth")+":");var qa=document.createElement("input");qa.setAttribute("type","text");qa.style.marginRight=
-"16px";qa.style.width="60px";qa.style.marginLeft="4px";qa.value=this.lastExportBorder||"0";G.appendChild(qa);mxUtils.br(G);var Q=this.addCheckbox(G,mxResources.get("selectionOnly"),!1,Y.isSelectionEmpty()),W=document.createElement("input");W.style.marginTop="16px";W.style.marginRight="8px";W.style.marginLeft="24px";W.setAttribute("disabled","disabled");W.setAttribute("type","checkbox");var ha=document.createElement("select");ha.style.marginTop="16px";ha.style.marginLeft="8px";d=["selectionOnly","diagram",
-"page"];var la={};for(Z=0;Z<d.length;Z++)if(!Y.isSelectionEmpty()||"selectionOnly"!=d[Z]){var ja=document.createElement("option");mxUtils.write(ja,mxResources.get(d[Z]));ja.setAttribute("value",d[Z]);ha.appendChild(ja);la[d[Z]]=ja}I?(mxUtils.write(G,mxResources.get("size")+":"),G.appendChild(ha),mxUtils.br(G),ba+=26,mxEvent.addListener(ha,"change",function(){"selectionOnly"==ha.value&&(Q.checked=!0)})):y&&(G.appendChild(W),mxUtils.write(G,mxResources.get("crop")),mxUtils.br(G),ba+=30,mxEvent.addListener(Q,
-"change",function(){Q.checked?W.removeAttribute("disabled"):W.setAttribute("disabled","disabled")}));Y.isSelectionEmpty()?I&&(Q.style.display="none",Q.nextSibling.style.display="none",Q.nextSibling.nextSibling.style.display="none",ba-=30):(ha.value="diagram",W.setAttribute("checked","checked"),W.defaultChecked=!0,mxEvent.addListener(Q,"change",function(){ha.value=Q.checked?"selectionOnly":"diagram"}));var U=this.addCheckbox(G,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=C),L=null;
-Editor.isDarkMode()&&(L=this.addCheckbox(G,mxResources.get("dark"),!0),ba+=26);var da=this.addCheckbox(G,mxResources.get("shadow"),Y.shadowVisible),O=null;if("png"==C||"jpeg"==C)O=this.addCheckbox(G,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),ba+=30;var N=this.addCheckbox(G,mxResources.get("includeCopyOfMyDiagram"),F,null,null,"jpeg"!=C);N.style.marginBottom="16px";var aa=document.createElement("input");aa.style.marginBottom="16px";aa.style.marginRight="8px";aa.setAttribute("type",
-"checkbox");!this.isOffline()&&this.canvasSupported||aa.setAttribute("disabled","disabled");var ma=document.createElement("select");ma.style.maxWidth="260px";ma.style.marginLeft="8px";ma.style.marginRight="10px";ma.style.marginBottom="16px";ma.className="geBtn";y=document.createElement("option");y.setAttribute("value","none");mxUtils.write(y,mxResources.get("noChange"));ma.appendChild(y);y=document.createElement("option");y.setAttribute("value","embedFonts");mxUtils.write(y,mxResources.get("embedFonts"));
-ma.appendChild(y);y=document.createElement("option");y.setAttribute("value","lblToSvg");mxUtils.write(y,mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||ma.appendChild(y);mxEvent.addListener(ma,"change",mxUtils.bind(this,function(){"lblToSvg"==ma.value?(aa.checked=!0,aa.setAttribute("disabled","disabled"),la.page.style.display="none","page"==ha.value&&(ha.value="diagram"),da.checked=!1,da.setAttribute("disabled","disabled"),H.style.display="inline-block",u.style.display="none"):
-"disabled"==aa.getAttribute("disabled")&&(aa.checked=!1,aa.removeAttribute("disabled"),da.removeAttribute("disabled"),la.page.style.display="",H.style.display="none",u.style.display="")}));f&&(G.appendChild(aa),mxUtils.write(G,mxResources.get("embedImages")),mxUtils.br(G),mxUtils.write(G,mxResources.get("txtSettings")+":"),G.appendChild(ma),mxUtils.br(G),ba+=60);var u=document.createElement("select");u.style.maxWidth="260px";u.style.marginLeft="8px";u.style.marginRight="10px";u.className="geBtn";
-f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));u.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));u.appendChild(f);f=document.createElement("option");f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));u.appendChild(f);var H=document.createElement("div");mxUtils.write(H,mxResources.get("LinksLost"));H.style.margin="7px";
-H.style.display="none";"svg"==C&&(mxUtils.write(G,mxResources.get("links")+":"),G.appendChild(u),G.appendChild(H),mxUtils.br(G),mxUtils.br(G),ba+=50);g=new CustomDialog(this,G,mxUtils.bind(this,function(){this.lastExportBorder=qa.value;this.lastExportZoom=X.value;q(X.value,U.checked,!Q.checked,da.checked,N.checked,aa.checked,qa.value,W.checked,!1,u.value,null!=O?O.checked:null,null!=L?L.checked:null,ha.value,"embedFonts"==ma.value,"lblToSvg"==ma.value)}),null,g,m);this.showDialog(g.container,340,
-ba,!0,!0,null,null,null,null,!0);X.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?X.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,f,g,m,q){var y=document.createElement("div");y.style.whiteSpace="nowrap";var F=this.editor.graph;if(null!=f){var C=document.createElement("h3");mxUtils.write(C,f);C.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";y.appendChild(C)}var I=this.addCheckbox(y,mxResources.get("fit"),
-!0),G=this.addCheckbox(y,mxResources.get("shadow"),F.shadowVisible&&m,!m),Y=this.addCheckbox(y,g),ba=this.addCheckbox(y,mxResources.get("lightbox"),!0),Z=this.addEditButton(y,ba),X=Z.getEditInput(),qa=1<F.model.getChildCount(F.model.getRoot()),Q=this.addCheckbox(y,mxResources.get("layers"),qa,!qa);Q.style.marginLeft=X.style.marginLeft;Q.style.marginBottom="12px";Q.style.marginTop="8px";mxEvent.addListener(ba,"change",function(){ba.checked?(qa&&Q.removeAttribute("disabled"),X.removeAttribute("disabled")):
-(Q.setAttribute("disabled","disabled"),X.setAttribute("disabled","disabled"));X.checked&&ba.checked?Z.getEditSelect().removeAttribute("disabled"):Z.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,y,mxUtils.bind(this,function(){d(I.checked,G.checked,Y.checked,ba.checked,Z.getLink(),Q.checked)}),null,mxResources.get("embed"),q);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,f,g,m,q,y,F,C){function I(X){var qa=" ",Q="";m&&(qa=
-" 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!=Y?"&page="+Y:"")+(q?"&edit=_blank":"")+(y?"&layers=1":"")+"');}})(this);\"",Q+="cursor:pointer;");d&&(Q+="max-width:100%;");var W="";g&&(W=' width="'+
-Math.round(G.width)+'" height="'+Math.round(G.height)+'"');F('<img src="'+X+'"'+W+(""!=Q?' style="'+Q+'"':"")+qa+"/>")}var G=this.editor.graph.getGraphBounds(),Y=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(X){var qa=m?this.getFileData(!0):null;X=this.createImageDataUri(X,qa,"png");I(X)}),null,null,null,mxUtils.bind(this,function(X){C({message:mxResources.get("unknownError")})}),null,!0,g?2:1,null,f,null,null,Editor.defaultBorder);else if(f=
-this.getFileData(!0),G.width*G.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var ba="";g&&(ba="&w="+Math.round(2*G.width)+"&h="+Math.round(2*G.height));var Z=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(m?"1":"0")+ba+"&xml="+encodeURIComponent(f));Z.send(mxUtils.bind(this,function(){200<=Z.getStatus()&&299>=Z.getStatus()?I("data:image/png;base64,"+Z.getText()):C({message:mxResources.get("unknownError")})}))}else C({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=
-function(d,f,g,m,q,y,F){var C=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!g),I=C.getElementsByTagName("a");if(null!=I)for(var G=0;G<I.length;G++){var Y=I[G].getAttribute("href");null!=Y&&"#"==Y.charAt(0)&&"_blank"==I[G].getAttribute("target")&&I[G].removeAttribute("target")}m&&C.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(C);if(g){var ba=" ",Z="";m&&(ba="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"+(q?"&edit=_blank":"")+(y?"&layers=1":"")+"');}})(this);\"",Z+="cursor:pointer;");d&&(Z+="max-width:100%;");this.editor.convertImages(C,mxUtils.bind(this,function(X){F('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(X))+'"'+(""!=Z?' style="'+Z+'"':"")+ba+"/>")}))}else Z="",m&&(f=this.getSelectedPageIndex(),C.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(null!=f?"&page="+f:"")+(q?"&edit=_blank":"")+(y?"&layers=1":"")+"');}}})(this);"),Z+="cursor:pointer;"),d&&(d=parseInt(C.getAttribute("width")),q=parseInt(C.getAttribute("height")),C.setAttribute("viewBox","-0.5 -0.5 "+d+" "+q),Z+="max-width:100%;max-height:"+q+"px;",C.removeAttribute("height")),""!=Z&&C.setAttribute("style",Z),this.editor.addFontCss(C),this.editor.graph.mathEnabled&&this.editor.addMathCss(C),F(mxUtils.getXml(C))};EditorUi.prototype.timeSince=function(d){d=
-Math.floor((new Date-d)/1E3);var f=Math.floor(d/31536E3);if(1<f)return f+" "+mxResources.get("years");f=Math.floor(d/2592E3);if(1<f)return f+" "+mxResources.get("months");f=Math.floor(d/86400);if(1<f)return f+" "+mxResources.get("days");f=Math.floor(d/3600);if(1<f)return f+" "+mxResources.get("hours");f=Math.floor(d/60);return 1<f?f+" "+mxResources.get("minutes"):1==f?f+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(d,f){if(null!=d){var g=null;if("diagram"==d.nodeName)g=
-d;else if("mxfile"==d.nodeName){var m=d.getElementsByTagName("diagram");if(0<m.length){g=m[0];var q=f.getGlobalVariable;f.getGlobalVariable=function(y){return"page"==y?g.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==y?1:q.apply(this,arguments)}}}null!=g&&(d=Editor.parseDiagramNode(g))}m=this.editor.graph;try{this.editor.graph=f,this.editor.setGraphXml(d)}catch(y){}finally{this.editor.graph=m}return d};EditorUi.prototype.getPngFileProperties=function(d){var f=1,g=0;if(null!=
-d){if(d.hasAttribute("scale")){var m=parseFloat(d.getAttribute("scale"));!isNaN(m)&&0<m&&(f=m)}d.hasAttribute("border")&&(m=parseInt(d.getAttribute("border")),!isNaN(m)&&0<m&&(g=m))}return{scale:f,border:g}};EditorUi.prototype.getEmbeddedPng=function(d,f,g,m,q){try{var y=this.editor.graph,F=null!=y.themes&&"darkTheme"==y.defaultThemeName,C=null;if(null!=g&&0<g.length)y=this.createTemporaryGraph(F?y.getDefaultStylesheet():y.getStylesheet()),document.body.appendChild(y.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(g).documentElement,
-!0),y),C=g;else if(F||null!=this.pages&&this.currentPage!=this.pages[0]){y=this.createTemporaryGraph(F?y.getDefaultStylesheet():y.getStylesheet());var I=y.getGlobalVariable;y.setBackgroundImage=this.editor.graph.setBackgroundImage;var G=this.pages[0];this.currentPage==G?y.setBackgroundImage(this.editor.graph.backgroundImage):null!=G.viewState&&null!=G.viewState&&y.setBackgroundImage(G.viewState.backgroundImage);y.getGlobalVariable=function(Y){return"page"==Y?G.getName():"pagenumber"==Y?1:I.apply(this,
-arguments)};document.body.appendChild(y.container);y.model.setRoot(G.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(Y){try{null==C&&(C=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var ba=Y.toDataURL("image/png");ba=Editor.writeGraphModelToPng(ba,"tEXt","mxfile",encodeURIComponent(C));d(ba.substring(ba.lastIndexOf(",")+1));y!=this.editor.graph&&y.container.parentNode.removeChild(y.container)}catch(Z){null!=f&&f(Z)}}),null,null,null,mxUtils.bind(this,function(Y){null!=
-f&&f(Y)}),null,null,m,null,y.shadowVisible,null,y,q,null,null,null,"diagram",null)}catch(Y){null!=f&&f(Y)}};EditorUi.prototype.getEmbeddedSvg=function(d,f,g,m,q,y,F,C,I,G,Y,ba,Z){C=null!=C?C:!0;Y=null!=Y?Y:0;F=null!=I?I:f.background;F==mxConstants.NONE&&(F=null);y=f.getSvg(F,G,Y,null,null,y,null,null,null,f.shadowVisible||ba,null,Z,"diagram");(f.shadowVisible||ba)&&f.addSvgShadow(y,null,null,0==Y);null!=d&&y.setAttribute("content",d);null!=g&&y.setAttribute("resource",g);var X=mxUtils.bind(this,function(qa){qa=
-(m?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(qa);null!=q&&q(qa);return qa});f.mathEnabled&&this.editor.addMathCss(y);if(null!=q)this.embedFonts(y,mxUtils.bind(this,function(qa){C?this.editor.convertImages(qa,mxUtils.bind(this,function(Q){X(Q)})):X(qa)}));else return X(y)};EditorUi.prototype.embedFonts=function(d,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(d,this.editor.resolvedFontCss),
-this.editor.embedExtFonts(mxUtils.bind(this,function(g){try{null!=g&&this.editor.addFontCss(d,g),f(d)}catch(m){f(d)}}))}catch(g){f(d)}}))};EditorUi.prototype.exportImage=function(d,f,g,m,q,y,F,C,I,G,Y,ba,Z){I=null!=I?I:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var X=this.editor.graph.isSelectionEmpty();g=null!=g?g:X;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(qa){this.spinner.stop();try{this.saveCanvas(qa,
-q?this.getFileData(!0,null,null,null,g,C):null,I,null==this.pages||0==this.pages.length,Y)}catch(Q){this.handleError(Q)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(qa){this.spinner.stop();this.handleError(qa)}),null,g,d||1,f,m,null,null,y,F,G,ba,Z)}catch(qa){this.spinner.stop(),this.handleError(qa)}}};EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.importXml=function(d,f,g,m,q,y,F){f=null!=f?f:0;g=null!=g?g:0;var C=
-[];try{var I=this.editor.graph;if(null!=d&&0<d.length){I.model.beginUpdate();try{var G=mxUtils.parseXml(d);d={};var Y=this.editor.extractGraphModel(G.documentElement,null!=this.pages);if(null!=Y&&"mxfile"==Y.nodeName&&null!=this.pages){var ba=Y.getElementsByTagName("diagram");if(1==ba.length&&!y){if(Y=Editor.parseDiagramNode(ba[0]),null!=this.currentPage&&(d[ba[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var Z=ba[0].getAttribute("name");null!=Z&&""!=Z&&this.editor.graph.model.execute(new RenamePage(this,
-this.currentPage,Z))}}else if(0<ba.length){y=[];var X=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(d[ba[0].getAttribute("id")]=this.pages[0].getId(),Y=Editor.parseDiagramNode(ba[0]),m=!1,X=1);for(;X<ba.length;X++){var qa=ba[X].getAttribute("id");ba[X].removeAttribute("id");var Q=this.updatePageRoot(new DiagramPage(ba[X]));d[qa]=ba[X].getAttribute("id");var W=this.pages.length;null==Q.getName()&&Q.setName(mxResources.get("pageWithNumber",[W+1]));I.model.execute(new ChangePage(this,
-Q,Q,W,!0));y.push(Q)}this.updatePageLinks(d,y)}}if(null!=Y&&"mxGraphModel"===Y.nodeName){C=I.importGraphModel(Y,f,g,m);if(null!=C)for(X=0;X<C.length;X++)this.updatePageLinksForCell(d,C[X]);var ha=I.parseBackgroundImage(Y.getAttribute("backgroundImage"));if(null!=ha&&null!=ha.originalSrc){this.updateBackgroundPageLink(d,ha);var la=new ChangePageSetup(this,null,ha);la.ignoreColor=!0;I.model.execute(la)}}F&&this.insertHandler(C,null,null,I.defaultVertexStyle,I.defaultEdgeStyle,!1,!0)}finally{I.model.endUpdate()}}}catch(ja){if(q)throw ja;
-this.handleError(ja)}return C};EditorUi.prototype.updatePageLinks=function(d,f){for(var g=0;g<f.length;g++)this.updatePageLinksForCell(d,f[g].root),null!=f[g].viewState&&this.updateBackgroundPageLink(d,f[g].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var g=d[f.originalSrc.substring(f.originalSrc.indexOf(",")+1)];null!=g&&(f.originalSrc="data:page/id,"+g)}}catch(m){}};EditorUi.prototype.updatePageLinksForCell=
+"16px";I.style.width="60px";I.style.marginLeft="4px";I.value=this.lastExportBorder||"0";y.appendChild(I);mxUtils.br(y)}var G=this.addCheckbox(y,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),Z=m?null:this.addCheckbox(y,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);F=this.editor.graph;var ca=m?null:this.addCheckbox(y,mxResources.get("transparentBackground"),F.background==mxConstants.NONE||null==F.background);null!=ca&&(ca.style.marginBottom="16px");
+d=new CustomDialog(this,y,mxUtils.bind(this,function(){var aa=parseInt(C.value)/100||1,Y=parseInt(I.value)||0;g(!G.checked,null!=Z?Z.checked:!1,null!=ca?ca.checked:!1,aa,Y)}),null,d,f);this.showDialog(d.container,300,(q?25:0)+(m?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,f,g,m,q,y,F,C,I){F=null!=F?F:Editor.defaultIncludeDiagram;var G=document.createElement("div");G.style.whiteSpace="nowrap";var Z=this.editor.graph,ca="jpeg"==C?220:300,aa=document.createElement("h3");mxUtils.write(aa,
+d);aa.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";G.appendChild(aa);mxUtils.write(G,mxResources.get("zoom")+":");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=this.lastExportZoom||"100%";G.appendChild(Y);mxUtils.write(G,mxResources.get("borderWidth")+":");var pa=document.createElement("input");pa.setAttribute("type","text");pa.style.marginRight=
+"16px";pa.style.width="60px";pa.style.marginLeft="4px";pa.value=this.lastExportBorder||"0";G.appendChild(pa);mxUtils.br(G);var Q=this.addCheckbox(G,mxResources.get("selectionOnly"),!1,Z.isSelectionEmpty()),X=document.createElement("input");X.style.marginTop="16px";X.style.marginRight="8px";X.style.marginLeft="24px";X.setAttribute("disabled","disabled");X.setAttribute("type","checkbox");var ha=document.createElement("select");ha.style.marginTop="16px";ha.style.marginLeft="8px";d=["selectionOnly","diagram",
+"page"];var U={};for(aa=0;aa<d.length;aa++)if(!Z.isSelectionEmpty()||"selectionOnly"!=d[aa]){var ma=document.createElement("option");mxUtils.write(ma,mxResources.get(d[aa]));ma.setAttribute("value",d[aa]);ha.appendChild(ma);U[d[aa]]=ma}I?(mxUtils.write(G,mxResources.get("size")+":"),G.appendChild(ha),mxUtils.br(G),ca+=26,mxEvent.addListener(ha,"change",function(){"selectionOnly"==ha.value&&(Q.checked=!0)})):y&&(G.appendChild(X),mxUtils.write(G,mxResources.get("crop")),mxUtils.br(G),ca+=30,mxEvent.addListener(Q,
+"change",function(){Q.checked?X.removeAttribute("disabled"):X.setAttribute("disabled","disabled")}));Z.isSelectionEmpty()?I&&(Q.style.display="none",Q.nextSibling.style.display="none",Q.nextSibling.nextSibling.style.display="none",ca-=30):(ha.value="diagram",X.setAttribute("checked","checked"),X.defaultChecked=!0,mxEvent.addListener(Q,"change",function(){ha.value=Q.checked?"selectionOnly":"diagram"}));var T=this.addCheckbox(G,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=C),M=null;
+Editor.isDarkMode()&&(M=this.addCheckbox(G,mxResources.get("dark"),!0),ca+=26);var ia=this.addCheckbox(G,mxResources.get("shadow"),Z.shadowVisible),N=null;if("png"==C||"jpeg"==C)N=this.addCheckbox(G,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),ca+=30;var O=this.addCheckbox(G,mxResources.get("includeCopyOfMyDiagram"),F,null,null,"jpeg"!=C);O.style.marginBottom="16px";var ba=document.createElement("input");ba.style.marginBottom="16px";ba.style.marginRight="8px";ba.setAttribute("type",
+"checkbox");!this.isOffline()&&this.canvasSupported||ba.setAttribute("disabled","disabled");var la=document.createElement("select");la.style.maxWidth="260px";la.style.marginLeft="8px";la.style.marginRight="10px";la.style.marginBottom="16px";la.className="geBtn";y=document.createElement("option");y.setAttribute("value","none");mxUtils.write(y,mxResources.get("noChange"));la.appendChild(y);y=document.createElement("option");y.setAttribute("value","embedFonts");mxUtils.write(y,mxResources.get("embedFonts"));
+la.appendChild(y);y=document.createElement("option");y.setAttribute("value","lblToSvg");mxUtils.write(y,mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||la.appendChild(y);mxEvent.addListener(la,"change",mxUtils.bind(this,function(){"lblToSvg"==la.value?(ba.checked=!0,ba.setAttribute("disabled","disabled"),U.page.style.display="none","page"==ha.value&&(ha.value="diagram"),ia.checked=!1,ia.setAttribute("disabled","disabled"),H.style.display="inline-block",u.style.display="none"):
+"disabled"==ba.getAttribute("disabled")&&(ba.checked=!1,ba.removeAttribute("disabled"),ia.removeAttribute("disabled"),U.page.style.display="",H.style.display="none",u.style.display="")}));f&&(G.appendChild(ba),mxUtils.write(G,mxResources.get("embedImages")),mxUtils.br(G),mxUtils.write(G,mxResources.get("txtSettings")+":"),G.appendChild(la),mxUtils.br(G),ca+=60);var u=document.createElement("select");u.style.maxWidth="260px";u.style.marginLeft="8px";u.style.marginRight="10px";u.className="geBtn";f=
+document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));u.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));u.appendChild(f);f=document.createElement("option");f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));u.appendChild(f);var H=document.createElement("div");mxUtils.write(H,mxResources.get("LinksLost"));H.style.margin="7px";
+H.style.display="none";"svg"==C&&(mxUtils.write(G,mxResources.get("links")+":"),G.appendChild(u),G.appendChild(H),mxUtils.br(G),mxUtils.br(G),ca+=50);g=new CustomDialog(this,G,mxUtils.bind(this,function(){this.lastExportBorder=pa.value;this.lastExportZoom=Y.value;q(Y.value,T.checked,!Q.checked,ia.checked,O.checked,ba.checked,pa.value,X.checked,!1,u.value,null!=N?N.checked:null,null!=M?M.checked:null,ha.value,"embedFonts"==la.value,"lblToSvg"==la.value)}),null,g,m);this.showDialog(g.container,340,
+ca,!0,!0,null,null,null,null,!0);Y.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?Y.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,f,g,m,q){var y=document.createElement("div");y.style.whiteSpace="nowrap";var F=this.editor.graph;if(null!=f){var C=document.createElement("h3");mxUtils.write(C,f);C.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";y.appendChild(C)}var I=this.addCheckbox(y,mxResources.get("fit"),
+!0),G=this.addCheckbox(y,mxResources.get("shadow"),F.shadowVisible&&m,!m),Z=this.addCheckbox(y,g),ca=this.addCheckbox(y,mxResources.get("lightbox"),!0),aa=this.addEditButton(y,ca),Y=aa.getEditInput(),pa=1<F.model.getChildCount(F.model.getRoot()),Q=this.addCheckbox(y,mxResources.get("layers"),pa,!pa);Q.style.marginLeft=Y.style.marginLeft;Q.style.marginBottom="12px";Q.style.marginTop="8px";mxEvent.addListener(ca,"change",function(){ca.checked?(pa&&Q.removeAttribute("disabled"),Y.removeAttribute("disabled")):
+(Q.setAttribute("disabled","disabled"),Y.setAttribute("disabled","disabled"));Y.checked&&ca.checked?aa.getEditSelect().removeAttribute("disabled"):aa.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,y,mxUtils.bind(this,function(){d(I.checked,G.checked,Z.checked,ca.checked,aa.getLink(),Q.checked)}),null,mxResources.get("embed"),q);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,f,g,m,q,y,F,C){function I(Y){var pa=" ",Q="";m&&(pa=
+" 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!=Z?"&page="+Z:"")+(q?"&edit=_blank":"")+(y?"&layers=1":"")+"');}})(this);\"",Q+="cursor:pointer;");d&&(Q+="max-width:100%;");var X="";g&&(X=' width="'+
+Math.round(G.width)+'" height="'+Math.round(G.height)+'"');F('<img src="'+Y+'"'+X+(""!=Q?' style="'+Q+'"':"")+pa+"/>")}var G=this.editor.graph.getGraphBounds(),Z=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(Y){var pa=m?this.getFileData(!0):null;Y=this.createImageDataUri(Y,pa,"png");I(Y)}),null,null,null,mxUtils.bind(this,function(Y){C({message:mxResources.get("unknownError")})}),null,!0,g?2:1,null,f,null,null,Editor.defaultBorder);else if(f=
+this.getFileData(!0),G.width*G.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var ca="";g&&(ca="&w="+Math.round(2*G.width)+"&h="+Math.round(2*G.height));var aa=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(m?"1":"0")+ca+"&xml="+encodeURIComponent(f));aa.send(mxUtils.bind(this,function(){200<=aa.getStatus()&&299>=aa.getStatus()?I("data:image/png;base64,"+aa.getText()):C({message:mxResources.get("unknownError")})}))}else C({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=
+function(d,f,g,m,q,y,F){var C=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!g),I=C.getElementsByTagName("a");if(null!=I)for(var G=0;G<I.length;G++){var Z=I[G].getAttribute("href");null!=Z&&"#"==Z.charAt(0)&&"_blank"==I[G].getAttribute("target")&&I[G].removeAttribute("target")}m&&C.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(C);if(g){var ca=" ",aa="";m&&(ca="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"+(q?"&edit=_blank":"")+(y?"&layers=1":"")+"');}})(this);\"",aa+="cursor:pointer;");d&&(aa+="max-width:100%;");this.editor.convertImages(C,mxUtils.bind(this,function(Y){F('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(Y))+'"'+(""!=aa?' style="'+aa+'"':"")+ca+"/>")}))}else aa="",m&&(f=this.getSelectedPageIndex(),C.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(null!=f?"&page="+f:"")+(q?"&edit=_blank":"")+(y?"&layers=1":"")+"');}}})(this);"),aa+="cursor:pointer;"),d&&(d=parseInt(C.getAttribute("width")),q=parseInt(C.getAttribute("height")),C.setAttribute("viewBox","-0.5 -0.5 "+d+" "+q),aa+="max-width:100%;max-height:"+q+"px;",C.removeAttribute("height")),""!=aa&&C.setAttribute("style",aa),this.editor.addFontCss(C),this.editor.graph.mathEnabled&&this.editor.addMathCss(C),F(mxUtils.getXml(C))};EditorUi.prototype.timeSince=
+function(d){d=Math.floor((new Date-d)/1E3);var f=Math.floor(d/31536E3);if(1<f)return f+" "+mxResources.get("years");f=Math.floor(d/2592E3);if(1<f)return f+" "+mxResources.get("months");f=Math.floor(d/86400);if(1<f)return f+" "+mxResources.get("days");f=Math.floor(d/3600);if(1<f)return f+" "+mxResources.get("hours");f=Math.floor(d/60);return 1<f?f+" "+mxResources.get("minutes"):1==f?f+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(d,f){if(null!=d){var g=null;if("diagram"==
+d.nodeName)g=d;else if("mxfile"==d.nodeName){var m=d.getElementsByTagName("diagram");if(0<m.length){g=m[0];var q=f.getGlobalVariable;f.getGlobalVariable=function(y){return"page"==y?g.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==y?1:q.apply(this,arguments)}}}null!=g&&(d=Editor.parseDiagramNode(g))}m=this.editor.graph;try{this.editor.graph=f,this.editor.setGraphXml(d)}catch(y){}finally{this.editor.graph=m}return d};EditorUi.prototype.getPngFileProperties=function(d){var f=
+1,g=0;if(null!=d){if(d.hasAttribute("scale")){var m=parseFloat(d.getAttribute("scale"));!isNaN(m)&&0<m&&(f=m)}d.hasAttribute("border")&&(m=parseInt(d.getAttribute("border")),!isNaN(m)&&0<m&&(g=m))}return{scale:f,border:g}};EditorUi.prototype.getEmbeddedPng=function(d,f,g,m,q){try{var y=this.editor.graph,F=null!=y.themes&&"darkTheme"==y.defaultThemeName,C=null;if(null!=g&&0<g.length)y=this.createTemporaryGraph(F?y.getDefaultStylesheet():y.getStylesheet()),document.body.appendChild(y.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(g).documentElement,
+!0),y),C=g;else if(F||null!=this.pages&&this.currentPage!=this.pages[0]){y=this.createTemporaryGraph(F?y.getDefaultStylesheet():y.getStylesheet());var I=y.getGlobalVariable;y.setBackgroundImage=this.editor.graph.setBackgroundImage;var G=this.pages[0];this.currentPage==G?y.setBackgroundImage(this.editor.graph.backgroundImage):null!=G.viewState&&null!=G.viewState&&y.setBackgroundImage(G.viewState.backgroundImage);y.getGlobalVariable=function(Z){return"page"==Z?G.getName():"pagenumber"==Z?1:I.apply(this,
+arguments)};document.body.appendChild(y.container);y.model.setRoot(G.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(Z){try{null==C&&(C=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var ca=Z.toDataURL("image/png");ca=Editor.writeGraphModelToPng(ca,"tEXt","mxfile",encodeURIComponent(C));d(ca.substring(ca.lastIndexOf(",")+1));y!=this.editor.graph&&y.container.parentNode.removeChild(y.container)}catch(aa){null!=f&&f(aa)}}),null,null,null,mxUtils.bind(this,function(Z){null!=
+f&&f(Z)}),null,null,m,null,y.shadowVisible,null,y,q,null,null,null,"diagram",null)}catch(Z){null!=f&&f(Z)}};EditorUi.prototype.getEmbeddedSvg=function(d,f,g,m,q,y,F,C,I,G,Z,ca,aa){C=null!=C?C:!0;Z=null!=Z?Z:0;F=null!=I?I:f.background;F==mxConstants.NONE&&(F=null);y=f.getSvg(F,G,Z,null,null,y,null,null,null,f.shadowVisible||ca,null,aa,"diagram");(f.shadowVisible||ca)&&f.addSvgShadow(y,null,null,0==Z);null!=d&&y.setAttribute("content",d);null!=g&&y.setAttribute("resource",g);var Y=mxUtils.bind(this,
+function(pa){pa=(m?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(pa);null!=q&&q(pa);return pa});f.mathEnabled&&this.editor.addMathCss(y);if(null!=q)this.embedFonts(y,mxUtils.bind(this,function(pa){C?this.editor.convertImages(pa,mxUtils.bind(this,function(Q){Y(Q)})):Y(pa)}));else return Y(y)};EditorUi.prototype.embedFonts=function(d,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(d,this.editor.resolvedFontCss),
+this.editor.embedExtFonts(mxUtils.bind(this,function(g){try{null!=g&&this.editor.addFontCss(d,g),f(d)}catch(m){f(d)}}))}catch(g){f(d)}}))};EditorUi.prototype.exportImage=function(d,f,g,m,q,y,F,C,I,G,Z,ca,aa){I=null!=I?I:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var Y=this.editor.graph.isSelectionEmpty();g=null!=g?g:Y;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(pa){this.spinner.stop();try{this.saveCanvas(pa,
+q?this.getFileData(!0,null,null,null,g,C):null,I,null==this.pages||0==this.pages.length,Z)}catch(Q){this.handleError(Q)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(pa){this.spinner.stop();this.handleError(pa)}),null,g,d||1,f,m,null,null,y,F,G,ca,aa)}catch(pa){this.spinner.stop(),this.handleError(pa)}}};EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.importXml=function(d,f,g,m,q,y,F){f=null!=f?f:0;g=null!=g?g:0;var C=
+[];try{var I=this.editor.graph;if(null!=d&&0<d.length){I.model.beginUpdate();try{var G=mxUtils.parseXml(d);d={};var Z=this.editor.extractGraphModel(G.documentElement,null!=this.pages);if(null!=Z&&"mxfile"==Z.nodeName&&null!=this.pages){var ca=Z.getElementsByTagName("diagram");if(1==ca.length&&!y){if(Z=Editor.parseDiagramNode(ca[0]),null!=this.currentPage&&(d[ca[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var aa=ca[0].getAttribute("name");null!=aa&&""!=aa&&this.editor.graph.model.execute(new RenamePage(this,
+this.currentPage,aa))}}else if(0<ca.length){y=[];var Y=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(d[ca[0].getAttribute("id")]=this.pages[0].getId(),Z=Editor.parseDiagramNode(ca[0]),m=!1,Y=1);for(;Y<ca.length;Y++){var pa=ca[Y].getAttribute("id");ca[Y].removeAttribute("id");var Q=this.updatePageRoot(new DiagramPage(ca[Y]));d[pa]=ca[Y].getAttribute("id");var X=this.pages.length;null==Q.getName()&&Q.setName(mxResources.get("pageWithNumber",[X+1]));I.model.execute(new ChangePage(this,
+Q,Q,X,!0));y.push(Q)}this.updatePageLinks(d,y)}}if(null!=Z&&"mxGraphModel"===Z.nodeName){C=I.importGraphModel(Z,f,g,m);if(null!=C)for(Y=0;Y<C.length;Y++)this.updatePageLinksForCell(d,C[Y]);var ha=I.parseBackgroundImage(Z.getAttribute("backgroundImage"));if(null!=ha&&null!=ha.originalSrc){this.updateBackgroundPageLink(d,ha);var U=new ChangePageSetup(this,null,ha);U.ignoreColor=!0;I.model.execute(U)}}F&&this.insertHandler(C,null,null,I.defaultVertexStyle,I.defaultEdgeStyle,!1,!0)}finally{I.model.endUpdate()}}}catch(ma){if(q)throw ma;
+this.handleError(ma)}return C};EditorUi.prototype.updatePageLinks=function(d,f){for(var g=0;g<f.length;g++)this.updatePageLinksForCell(d,f[g].root),null!=f[g].viewState&&this.updateBackgroundPageLink(d,f[g].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var g=d[f.originalSrc.substring(f.originalSrc.indexOf(",")+1)];null!=g&&(f.originalSrc="data:page/id,"+g)}}catch(m){}};EditorUi.prototype.updatePageLinksForCell=
function(d,f){var g=document.createElement("div"),m=this.editor.graph,q=m.getLinkForCell(f);null!=q&&m.setLinkForCell(f,this.updatePageLink(d,q));if(m.isHtmlLabel(f)){g.innerHTML=m.sanitizeHtml(m.getLabel(f));for(var y=g.getElementsByTagName("a"),F=!1,C=0;C<y.length;C++)q=y[C].getAttribute("href"),null!=q&&(y[C].setAttribute("href",this.updatePageLink(d,q)),F=!0);F&&m.labelChanged(f,g.innerHTML)}for(C=0;C<m.model.getChildCount(f);C++)this.updatePageLinksForCell(d,m.model.getChildAt(f,C))};EditorUi.prototype.updatePageLink=
function(d,f){if(Graph.isPageLink(f)){var g=d[f.substring(f.indexOf(",")+1)];f=null!=g?"data:page/id,"+g:null}else if("data:action/json,"==f.substring(0,17))try{var m=JSON.parse(f.substring(17));if(null!=m.actions){for(var q=0;q<m.actions.length;q++){var y=m.actions[q];if(null!=y.open&&Graph.isPageLink(y.open)){var F=y.open.substring(y.open.indexOf(",")+1);g=d[F];null!=g?y.open="data:page/id,"+g:null==this.getPageById(F)&&delete y.open}}f="data:action/json,"+JSON.stringify(m)}}catch(C){}return f};
EditorUi.prototype.isRemoteVisioFormat=function(d){return/(\.v(sd|dx))($|\?)/i.test(d)||/(\.vs(s|x))($|\?)/i.test(d)};EditorUi.prototype.importVisio=function(d,f,g,m,q){m=null!=m?m:d.name;g=null!=g?g:mxUtils.bind(this,function(F){this.handleError(F)});var y=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var F=this.isRemoteVisioFormat(m);try{var C="UNKNOWN-VISIO",I=m.lastIndexOf(".");if(0<=I&&I<m.length)C=m.substring(I+1).toUpperCase();else{var G=m.lastIndexOf("/");0<=
-G&&G<m.length&&(m=m.substring(G+1))}EditorUi.logEvent({category:C+"-MS-IMPORT-FILE",action:"filename_"+m,label:F?"remote":"local"})}catch(ba){}if(F)if(null==VSD_CONVERT_URL||this.isOffline())g({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{F=new FormData;F.append("file1",d,m);var Y=new XMLHttpRequest;Y.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(m)?"?stencil=1":""));Y.responseType="blob";this.addRemoteServiceSecurityCheck(Y);
-null!=q&&Y.setRequestHeader("x-convert-custom",q);Y.onreadystatechange=mxUtils.bind(this,function(){if(4==Y.readyState)if(200<=Y.status&&299>=Y.status)try{var ba=Y.response;if("text/xml"==ba.type){var Z=new FileReader;Z.onload=mxUtils.bind(this,function(X){try{f(X.target.result)}catch(qa){g({message:mxResources.get("errorLoadingFile")})}});Z.readAsText(ba)}else this.doImportVisio(ba,f,g,m)}catch(X){g(X)}else try{""==Y.responseType||"text"==Y.responseType?g({message:Y.responseText}):(Z=new FileReader,
-Z.onload=function(){g({message:JSON.parse(Z.result).Message})},Z.readAsText(Y.response))}catch(X){g({})}});Y.send(F)}else try{this.doImportVisio(d,f,g,m)}catch(ba){g(ba)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?y():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",y))};EditorUi.prototype.importGraphML=function(d,f,g){g=null!=g?g:mxUtils.bind(this,function(q){this.handleError(q)});
+G&&G<m.length&&(m=m.substring(G+1))}EditorUi.logEvent({category:C+"-MS-IMPORT-FILE",action:"filename_"+m,label:F?"remote":"local"})}catch(ca){}if(F)if(null==VSD_CONVERT_URL||this.isOffline())g({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{F=new FormData;F.append("file1",d,m);var Z=new XMLHttpRequest;Z.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(m)?"?stencil=1":""));Z.responseType="blob";this.addRemoteServiceSecurityCheck(Z);
+null!=q&&Z.setRequestHeader("x-convert-custom",q);Z.onreadystatechange=mxUtils.bind(this,function(){if(4==Z.readyState)if(200<=Z.status&&299>=Z.status)try{var ca=Z.response;if("text/xml"==ca.type){var aa=new FileReader;aa.onload=mxUtils.bind(this,function(Y){try{f(Y.target.result)}catch(pa){g({message:mxResources.get("errorLoadingFile")})}});aa.readAsText(ca)}else this.doImportVisio(ca,f,g,m)}catch(Y){g(Y)}else try{""==Z.responseType||"text"==Z.responseType?g({message:Z.responseText}):(aa=new FileReader,
+aa.onload=function(){g({message:JSON.parse(aa.result).Message})},aa.readAsText(Z.response))}catch(Y){g({})}});Z.send(F)}else try{this.doImportVisio(d,f,g,m)}catch(ca){g(ca)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?y():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",y))};EditorUi.prototype.importGraphML=function(d,f,g){g=null!=g?g:mxUtils.bind(this,function(q){this.handleError(q)});
var m=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(d,f,g)}catch(q){g(q)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?m():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",m))};EditorUi.prototype.exportVisio=function(d){var f=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(d)||
this.handleError({message:mxResources.get("unknownError")})}catch(g){this.handleError(g)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.convertLucidChart=function(d,f,g){var m=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{var q=
JSON.parse(d);f(LucidImporter.importState(q));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+d.length}),null!=window.console&&"1"==urlParams.test){var y=[(new Date).toISOString(),"convertLucidChart",q];null!=q.state&&y.push(JSON.parse(q.state));if(null!=q.svgThumbs)for(var F=0;F<q.svgThumbs.length;F++)y.push(Editor.createSvgDataUri(q.svgThumbs[F]));null!=q.thumb&&y.push(q.thumb);console.log.apply(console,y)}}catch(C){}}catch(C){null!=window.console&&console.error(C),g(C)}else g({message:mxResources.get("serviceUnavailableOrBlocked")})});
"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(m,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",m)})})})}):mxscript("js/extensions.min.js",m))};EditorUi.prototype.generateMermaidImage=function(d,
f,g,m){var q=this,y=function(){try{this.loadingMermaid=!1,f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig),f.securityLevel="strict",f.startOnLoad=!1,Editor.isDarkMode()&&(f.theme="dark"),mermaid.mermaidAPI.initialize(f),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),d,function(F){try{if(mxClient.IS_IE||mxClient.IS_IE11)F=F.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(F).getElementsByTagName("svg");
-if(0<C.length){var I=parseFloat(C[0].getAttribute("width")),G=parseFloat(C[0].getAttribute("height"));if(isNaN(I)||isNaN(G))try{var Y=C[0].getAttribute("viewBox").split(/\s+/);I=parseFloat(Y[2]);G=parseFloat(Y[3])}catch(ba){I=I||100,G=G||100}g(q.convertDataUri(Editor.createSvgDataUri(F)),I,G)}else m({message:mxResources.get("invalidInput")})}catch(ba){m(ba)}})}catch(F){m(F)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?y():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",
+if(0<C.length){var I=parseFloat(C[0].getAttribute("width")),G=parseFloat(C[0].getAttribute("height"));if(isNaN(I)||isNaN(G))try{var Z=C[0].getAttribute("viewBox").split(/\s+/);I=parseFloat(Z[2]);G=parseFloat(Z[3])}catch(ca){I=I||100,G=G||100}g(q.convertDataUri(Editor.createSvgDataUri(F)),I,G)}else m({message:mxResources.get("invalidInput")})}catch(ca){m(ca)}})}catch(F){m(F)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?y():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",
y):mxscript("js/extensions.min.js",y))};EditorUi.prototype.generatePlantUmlImage=function(d,f,g,m){function q(C,I,G){c1=C>>2;c2=(C&3)<<4|I>>4;c3=(I&15)<<2|G>>6;c4=G&63;r="";r+=y(c1&63);r+=y(c2&63);r+=y(c3&63);return r+=y(c4&63)}function y(C){if(10>C)return String.fromCharCode(48+C);C-=10;if(26>C)return String.fromCharCode(65+C);C-=26;if(26>C)return String.fromCharCode(97+C);C-=26;return 0==C?"-":1==C?"_":"?"}var F=new XMLHttpRequest;F.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/":
-PLANT_URL+"/svg/")+function(C){r="";for(i=0;i<C.length;i+=3)r=i+2==C.length?r+q(C.charCodeAt(i),C.charCodeAt(i+1),0):i+1==C.length?r+q(C.charCodeAt(i),0,0):r+q(C.charCodeAt(i),C.charCodeAt(i+1),C.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=f&&(F.responseType="blob");F.onload=function(C){if(200<=this.status&&300>this.status)if("txt"==f)g(this.response);else{var I=new FileReader;I.readAsDataURL(this.response);I.onloadend=function(G){var Y=new Image;Y.onload=
-function(){try{var ba=Y.width,Z=Y.height;if(0==ba&&0==Z){var X=I.result,qa=X.indexOf(","),Q=decodeURIComponent(escape(atob(X.substring(qa+1)))),W=mxUtils.parseXml(Q).getElementsByTagName("svg");0<W.length&&(ba=parseFloat(W[0].getAttribute("width")),Z=parseFloat(W[0].getAttribute("height")))}g(I.result,ba,Z)}catch(ha){m(ha)}};Y.src=I.result};I.onerror=function(G){m(G)}}else m(C)};F.onerror=function(C){m(C)};F.send()};EditorUi.prototype.insertAsPreText=function(d,f,g){var m=this.editor.graph,q=null;
-m.getModel().beginUpdate();try{q=m.insertVertex(null,null,"<pre>"+d+"</pre>",f,g,1,1,"text;html=1;align=left;verticalAlign=top;"),m.updateCellSize(q,!0)}finally{m.getModel().endUpdate()}return q};EditorUi.prototype.insertTextAt=function(d,f,g,m,q,y,F,C){y=null!=y?y:!0;F=null!=F?F:!0;if(null!=d)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(d.replace(/\s+/g," "),
-mxUtils.bind(this,function(Z){4==Z.readyState&&200<=Z.status&&299>=Z.status&&this.editor.graph.setSelectionCells(this.insertTextAt(Z.responseText,f,g,!0))}));else if("data:"==d.substring(0,5)||!this.isOffline()&&(q||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d))){var I=this.editor.graph;if("data:application/pdf;base64,"==d.substring(0,28)){var G=Editor.extractGraphModelFromPdf(d);if(null!=G&&0<G.length)return this.importXml(G,f,g,y,!0,C)}if(Editor.isPngDataUrl(d)&&(G=Editor.extractGraphModelFromPng(d),
-null!=G&&0<G.length))return this.importXml(G,f,g,y,!0,C);if("data:image/svg+xml;"==d.substring(0,19))try{G=null;"data:image/svg+xml;base64,"==d.substring(0,26)?(G=d.substring(d.indexOf(",")+1),G=window.atob&&!mxClient.IS_SF?atob(G):Base64.decode(G,!0)):G=decodeURIComponent(d.substring(d.indexOf(",")+1));var Y=this.importXml(G,f,g,y,!0,C);if(0<Y.length)return Y}catch(Z){}this.loadImage(d,mxUtils.bind(this,function(Z){if("data:"==d.substring(0,5))this.resizeImage(Z,d,mxUtils.bind(this,function(Q,W,
-ha){I.setSelectionCell(I.insertVertex(null,null,"",I.snap(f),I.snap(g),W,ha,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(Q)+";"))}),F,this.maxImageSize);else{var X=Math.min(1,Math.min(this.maxImageSize/Z.width,this.maxImageSize/Z.height)),qa=Math.round(Z.width*X);Z=Math.round(Z.height*X);I.setSelectionCell(I.insertVertex(null,null,"",I.snap(f),I.snap(g),qa,Z,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-d+";"))}}),mxUtils.bind(this,function(){var Z=null;I.getModel().beginUpdate();try{Z=I.insertVertex(I.getDefaultParent(),null,d,I.snap(f),I.snap(g),1,1,"text;"+(m?"html=1;":"")),I.updateCellSize(Z),I.fireEvent(new mxEventObject("textInserted","cells",[Z]))}finally{I.getModel().endUpdate()}I.setSelectionCell(Z)}))}else{d=Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,f,g,y,null,C);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this,
-function(Z){this.editor.graph.setSelectionCells(this.importXml(Z,f,g,y,null,C))}),mxUtils.bind(this,function(Z){this.handleError(Z)}));else{I=this.editor.graph;q=null;I.getModel().beginUpdate();try{q=I.insertVertex(I.getDefaultParent(),null,"",I.snap(f),I.snap(g),1,1,"text;whiteSpace=wrap;"+(m?"html=1;":""));I.fireEvent(new mxEventObject("textInserted","cells",[q]));"<"==d.charAt(0)&&d.indexOf(">")==d.length-1&&(d=mxUtils.htmlEntities(d));d.length>this.maxTextBytes&&(d=d.substring(0,this.maxTextBytes)+
-"...");q.value=d;I.updateCellSize(q);if(0<this.maxTextWidth&&q.geometry.width>this.maxTextWidth){var ba=I.getPreferredSizeForCell(q,this.maxTextWidth);q.geometry.width=ba.width;q.geometry.height=ba.height}Graph.isLink(q.value)&&I.setLinkForCell(q,q.value);q.geometry.width+=I.gridSize;q.geometry.height+=I.gridSize}finally{I.getModel().endUpdate()}return[q]}}return[]};EditorUi.prototype.formatFileSize=function(d){var f=-1;do d/=1024,f++;while(1024<d);return Math.max(d,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[f]};
+PLANT_URL+"/svg/")+function(C){r="";for(i=0;i<C.length;i+=3)r=i+2==C.length?r+q(C.charCodeAt(i),C.charCodeAt(i+1),0):i+1==C.length?r+q(C.charCodeAt(i),0,0):r+q(C.charCodeAt(i),C.charCodeAt(i+1),C.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=f&&(F.responseType="blob");F.onload=function(C){if(200<=this.status&&300>this.status)if("txt"==f)g(this.response);else{var I=new FileReader;I.readAsDataURL(this.response);I.onloadend=function(G){var Z=new Image;Z.onload=
+function(){try{var ca=Z.width,aa=Z.height;if(0==ca&&0==aa){var Y=I.result,pa=Y.indexOf(","),Q=decodeURIComponent(escape(atob(Y.substring(pa+1)))),X=mxUtils.parseXml(Q).getElementsByTagName("svg");0<X.length&&(ca=parseFloat(X[0].getAttribute("width")),aa=parseFloat(X[0].getAttribute("height")))}g(I.result,ca,aa)}catch(ha){m(ha)}};Z.src=I.result};I.onerror=function(G){m(G)}}else m(C)};F.onerror=function(C){m(C)};F.send()};EditorUi.prototype.insertAsPreText=function(d,f,g){var m=this.editor.graph,q=
+null;m.getModel().beginUpdate();try{q=m.insertVertex(null,null,"<pre>"+d+"</pre>",f,g,1,1,"text;html=1;align=left;verticalAlign=top;"),m.updateCellSize(q,!0)}finally{m.getModel().endUpdate()}return q};EditorUi.prototype.insertTextAt=function(d,f,g,m,q,y,F,C){y=null!=y?y:!0;F=null!=F?F:!0;if(null!=d)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(d.replace(/\s+/g,
+" "),mxUtils.bind(this,function(aa){4==aa.readyState&&200<=aa.status&&299>=aa.status&&this.editor.graph.setSelectionCells(this.insertTextAt(aa.responseText,f,g,!0))}));else if("data:"==d.substring(0,5)||!this.isOffline()&&(q||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d))){var I=this.editor.graph;if("data:application/pdf;base64,"==d.substring(0,28)){var G=Editor.extractGraphModelFromPdf(d);if(null!=G&&0<G.length)return this.importXml(G,f,g,y,!0,C)}if(Editor.isPngDataUrl(d)&&(G=Editor.extractGraphModelFromPng(d),
+null!=G&&0<G.length))return this.importXml(G,f,g,y,!0,C);if("data:image/svg+xml;"==d.substring(0,19))try{G=null;"data:image/svg+xml;base64,"==d.substring(0,26)?(G=d.substring(d.indexOf(",")+1),G=window.atob&&!mxClient.IS_SF?atob(G):Base64.decode(G,!0)):G=decodeURIComponent(d.substring(d.indexOf(",")+1));var Z=this.importXml(G,f,g,y,!0,C);if(0<Z.length)return Z}catch(aa){}this.loadImage(d,mxUtils.bind(this,function(aa){if("data:"==d.substring(0,5))this.resizeImage(aa,d,mxUtils.bind(this,function(Q,
+X,ha){I.setSelectionCell(I.insertVertex(null,null,"",I.snap(f),I.snap(g),X,ha,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(Q)+";"))}),F,this.maxImageSize);else{var Y=Math.min(1,Math.min(this.maxImageSize/aa.width,this.maxImageSize/aa.height)),pa=Math.round(aa.width*Y);aa=Math.round(aa.height*Y);I.setSelectionCell(I.insertVertex(null,null,"",I.snap(f),I.snap(g),pa,aa,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+d+";"))}}),mxUtils.bind(this,function(){var aa=null;I.getModel().beginUpdate();try{aa=I.insertVertex(I.getDefaultParent(),null,d,I.snap(f),I.snap(g),1,1,"text;"+(m?"html=1;":"")),I.updateCellSize(aa),I.fireEvent(new mxEventObject("textInserted","cells",[aa]))}finally{I.getModel().endUpdate()}I.setSelectionCell(aa)}))}else{d=Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,f,g,y,null,C);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this,
+function(aa){this.editor.graph.setSelectionCells(this.importXml(aa,f,g,y,null,C))}),mxUtils.bind(this,function(aa){this.handleError(aa)}));else{I=this.editor.graph;q=null;I.getModel().beginUpdate();try{q=I.insertVertex(I.getDefaultParent(),null,"",I.snap(f),I.snap(g),1,1,"text;whiteSpace=wrap;"+(m?"html=1;":""));I.fireEvent(new mxEventObject("textInserted","cells",[q]));"<"==d.charAt(0)&&d.indexOf(">")==d.length-1&&(d=mxUtils.htmlEntities(d));d.length>this.maxTextBytes&&(d=d.substring(0,this.maxTextBytes)+
+"...");q.value=d;I.updateCellSize(q);if(0<this.maxTextWidth&&q.geometry.width>this.maxTextWidth){var ca=I.getPreferredSizeForCell(q,this.maxTextWidth);q.geometry.width=ca.width;q.geometry.height=ca.height}Graph.isLink(q.value)&&I.setLinkForCell(q,q.value);q.geometry.width+=I.gridSize;q.geometry.height+=I.gridSize}finally{I.getModel().endUpdate()}return[q]}}return[]};EditorUi.prototype.formatFileSize=function(d){var f=-1;do d/=1024,f++;while(1024<d);return Math.max(d,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[f]};
EditorUi.prototype.convertDataUri=function(d){if("data:"==d.substring(0,5)){var f=d.indexOf(";");0<f&&(d=d.substring(0,f)+d.substring(d.indexOf(",",f+1)))}return d};EditorUi.prototype.isRemoteFileFormat=function(d,f){return/("contentType":\s*"application\/gliffy\+json")/.test(d)};EditorUi.prototype.isLucidChartData=function(d){return null!=d&&('{"state":"{\\"Properties\\":'==d.substring(0,26)||'{"Properties":'==d.substring(0,14))};EditorUi.prototype.importLocalFile=function(d,f){if(d&&Graph.fileSupport){if(null==
this.importFileInputElt){var g=document.createElement("input");g.setAttribute("type","file");mxEvent.addListener(g,"change",mxUtils.bind(this,function(){null!=g.files&&(this.importFiles(g.files,null,null,this.maxImageSize),g.type="",g.type="file",g.value="")}));g.style.display="none";document.body.appendChild(g);this.importFileInputElt=g}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(F,C){StorageFile.listFiles(this,
"F",F,C)});window.openBrowserFile=mxUtils.bind(this,function(F,C,I){StorageFile.getFileContent(this,F,C,I)});window.deleteBrowserFile=mxUtils.bind(this,function(F,C,I){StorageFile.deleteFile(this,F,C,I)});if(!f){var m=Editor.useLocalStorage;Editor.useLocalStorage=!d}window.openFile=new OpenFile(mxUtils.bind(this,function(F){this.hideDialog(F)}));window.openFile.setConsumer(mxUtils.bind(this,function(F,C){null!=C&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(C)?(F=new Blob([F],{type:"application/octet-stream"}),
this.importVisio(F,mxUtils.bind(this,function(I){this.importXml(I,0,0,!0)}),null,C)):this.editor.graph.setSelectionCells(this.importXml(F,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!f){var q=this.dialog,y=q.close;this.dialog.close=mxUtils.bind(this,function(F){Editor.useLocalStorage=m;y.apply(q,arguments);F&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};
-EditorUi.prototype.importZipFile=function(d,f,g){var m=this,q=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(y){if(mxUtils.isEmptyObject(y.files))g();else{var F=0,C,I=!1;y.forEach(function(G,Y){G=Y.name.toLowerCase();"diagram/diagram.xml"==G?(I=!0,Y.async("string").then(function(ba){0==ba.indexOf("<mxfile ")?f(ba):g()})):0==G.indexOf("versions/")&&(G=parseInt(G.substr(9)),G>F&&(F=G,C=Y))});0<F?C.async("string").then(function(G){(new XMLHttpRequest).upload&&
-m.isRemoteFileFormat(G,d.name)?m.isOffline()?m.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g):m.parseFileData(G,mxUtils.bind(this,function(Y){4==Y.readyState&&(200<=Y.status&&299>=Y.status?f(Y.responseText):g())}),d.name):g()}):I||g()}},function(y){g(y)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?q():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",q))};EditorUi.prototype.importFile=function(d,f,g,m,q,y,F,C,I,G,Y,ba){G=null!=
-G?G:!0;var Z=!1,X=null,qa=mxUtils.bind(this,function(Q){var W=null;null!=Q&&"<mxlibrary"==Q.substring(0,10)?this.loadLibrary(new LocalLibrary(this,Q,F)):W=this.importXml(Q,g,m,G,null,null!=ba?mxEvent.isControlDown(ba):null);null!=C&&C(W)});"image"==f.substring(0,5)?(I=!1,"image/png"==f.substring(0,9)&&(f=Y?null:this.extractGraphModelFromPng(d),null!=f&&0<f.length&&(X=this.importXml(f,g,m,G,null,null!=ba?mxEvent.isControlDown(ba):null),I=!0)),I||(f=this.editor.graph,I=d.indexOf(";"),0<I&&(d=d.substring(0,
-I)+d.substring(d.indexOf(",",I+1))),G&&f.isGridEnabled()&&(g=f.snap(g),m=f.snap(m)),X=[f.insertVertex(null,null,"",g,m,q,y,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+d+";")])):/(\.*<graphml )/.test(d)?(Z=!0,this.importGraphML(d,qa)):null!=I&&null!=F&&(/(\.v(dx|sdx?))($|\?)/i.test(F)||/(\.vs(x|sx?))($|\?)/i.test(F))?(Z=!0,this.importVisio(I,qa)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,F)?this.isOffline()?
-this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(Z=!0,q=mxUtils.bind(this,function(Q){4==Q.readyState&&(200<=Q.status&&299>=Q.status?qa(Q.responseText):null!=C&&C(null))}),null!=d?this.parseFileData(d,q,F):this.parseFile(I,q,F)):0==d.indexOf("PK")&&null!=I?(Z=!0,this.importZipFile(I,qa,mxUtils.bind(this,function(){X=this.insertTextAt(this.validateFileData(d),g,m,!0,null,G);C(X)}))):/(\.v(sd|dx))($|\?)/i.test(F)||/(\.vs(s|x))($|\?)/i.test(F)||(X=this.insertTextAt(this.validateFileData(d),
-g,m,!0,null,G,null,null!=ba?mxEvent.isControlDown(ba):null));Z||null==C||C(X);return X};EditorUi.prototype.importFiles=function(d,f,g,m,q,y,F,C,I,G,Y,ba,Z){m=null!=m?m:this.maxImageSize;G=null!=G?G:this.maxImageBytes;var X=null!=f&&null!=g,qa=!0;f=null!=f?f:0;g=null!=g?g:0;var Q=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var W=Y||this.resampleThreshold,ha=0;ha<d.length;ha++)if("image/svg"!==d[ha].type.substring(0,9)&&"image/"===d[ha].type.substring(0,6)&&d[ha].size>W){Q=!0;break}var la=mxUtils.bind(this,
-function(){var ja=this.editor.graph,U=ja.gridSize;q=null!=q?q:mxUtils.bind(this,function(ma,u,H,P,S,R,ca,ea,fa){try{return null!=ma&&"<mxlibrary"==ma.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,ma,ca)),null):this.importFile(ma,u,H,P,S,R,ca,ea,fa,X,ba,Z)}catch(ra){return this.handleError(ra),null}});y=null!=y?y:mxUtils.bind(this,function(ma){ja.setSelectionCells(ma)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var L=d.length,da=L,O=[],N=mxUtils.bind(this,
-function(ma,u){O[ma]=u;if(0==--da){this.spinner.stop();if(null!=C)C(O);else{var H=[];ja.getModel().beginUpdate();try{for(ma=0;ma<O.length;ma++){var P=O[ma]();null!=P&&(H=H.concat(P))}}finally{ja.getModel().endUpdate()}}y(H)}}),aa=0;aa<L;aa++)mxUtils.bind(this,function(ma){var u=d[ma];if(null!=u){var H=new FileReader;H.onload=mxUtils.bind(this,function(P){if(null==F||F(u))if("image/"==u.type.substring(0,6))if("image/svg"==u.type.substring(0,9)){var S=Graph.clipSvgDataUri(P.target.result),R=S.indexOf(",");
-R=decodeURIComponent(escape(atob(S.substring(R+1))));var ca=mxUtils.parseXml(R);R=ca.getElementsByTagName("svg");if(0<R.length){R=R[0];var ea=ba?null:R.getAttribute("content");null!=ea&&"<"!=ea.charAt(0)&&"%"!=ea.charAt(0)&&(ea=unescape(window.atob?atob(ea):Base64.decode(ea,!0)));null!=ea&&"%"==ea.charAt(0)&&(ea=decodeURIComponent(ea));null==ea||"<mxfile "!==ea.substring(0,8)&&"<mxGraphModel "!==ea.substring(0,14)?N(ma,mxUtils.bind(this,function(){try{if(null!=ca){var ua=ca.getElementsByTagName("svg");
-if(0<ua.length){var sa=ua[0],Aa=sa.getAttribute("width"),Ca=sa.getAttribute("height");Aa=null!=Aa&&"%"!=Aa.charAt(Aa.length-1)?parseFloat(Aa):NaN;Ca=null!=Ca&&"%"!=Ca.charAt(Ca.length-1)?parseFloat(Ca):NaN;var Ba=sa.getAttribute("viewBox");if(null==Ba||0==Ba.length)sa.setAttribute("viewBox","0 0 "+Aa+" "+Ca);else if(isNaN(Aa)||isNaN(Ca)){var ta=Ba.split(" ");3<ta.length&&(Aa=parseFloat(ta[2]),Ca=parseFloat(ta[3]))}S=Editor.createSvgDataUri(mxUtils.getXml(sa));var Pa=Math.min(1,Math.min(m/Math.max(1,
-Aa)),m/Math.max(1,Ca)),Ta=q(S,u.type,f+ma*U,g+ma*U,Math.max(1,Math.round(Aa*Pa)),Math.max(1,Math.round(Ca*Pa)),u.name);if(isNaN(Aa)||isNaN(Ca)){var Oa=new Image;Oa.onload=mxUtils.bind(this,function(){Aa=Math.max(1,Oa.width);Ca=Math.max(1,Oa.height);Ta[0].geometry.width=Aa;Ta[0].geometry.height=Ca;sa.setAttribute("viewBox","0 0 "+Aa+" "+Ca);S=Editor.createSvgDataUri(mxUtils.getXml(sa));var Xa=S.indexOf(";");0<Xa&&(S=S.substring(0,Xa)+S.substring(S.indexOf(",",Xa+1)));ja.setCellStyles("image",S,[Ta[0]])});
-Oa.src=Editor.createSvgDataUri(mxUtils.getXml(sa))}return Ta}}}catch(Xa){}return null})):N(ma,mxUtils.bind(this,function(){return q(ea,"text/xml",f+ma*U,g+ma*U,0,0,u.name)}))}else N(ma,mxUtils.bind(this,function(){return null}))}else{R=!1;if("image/png"==u.type){var fa=ba?null:this.extractGraphModelFromPng(P.target.result);if(null!=fa&&0<fa.length){var ra=new Image;ra.src=P.target.result;N(ma,mxUtils.bind(this,function(){return q(fa,"text/xml",f+ma*U,g+ma*U,ra.width,ra.height,u.name)}));R=!0}}R||
-(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(P.target.result,mxUtils.bind(this,function(ua){this.resizeImage(ua,P.target.result,mxUtils.bind(this,function(sa,Aa,Ca){N(ma,mxUtils.bind(this,function(){if(null!=sa&&sa.length<G){var Ba=qa&&this.isResampleImageSize(u.size,
-Y)?Math.min(1,Math.min(m/Aa,m/Ca)):1;return q(sa,u.type,f+ma*U,g+ma*U,Math.round(Aa*Ba),Math.round(Ca*Ba),u.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),qa,m,Y,u.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else S=P.target.result,q(S,u.type,f+ma*U,g+ma*U,240,160,u.name,function(ua){N(ma,function(){return ua})},u)});/(\.v(dx|sdx?))($|\?)/i.test(u.name)||/(\.vs(x|sx?))($|\?)/i.test(u.name)?q(null,u.type,
-f+ma*U,g+ma*U,240,160,u.name,function(P){N(ma,function(){return P})},u):"image"==u.type.substring(0,5)||"application/pdf"==u.type?H.readAsDataURL(u):H.readAsText(u)}})(aa)});if(Q){Q=[];for(ha=0;ha<d.length;ha++)Q.push(d[ha]);d=Q;this.confirmImageResize(function(ja){qa=ja;la()},I)}else la()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=
+EditorUi.prototype.importZipFile=function(d,f,g){var m=this,q=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(y){if(mxUtils.isEmptyObject(y.files))g();else{var F=0,C,I=!1;y.forEach(function(G,Z){G=Z.name.toLowerCase();"diagram/diagram.xml"==G?(I=!0,Z.async("string").then(function(ca){0==ca.indexOf("<mxfile ")?f(ca):g()})):0==G.indexOf("versions/")&&(G=parseInt(G.substr(9)),G>F&&(F=G,C=Z))});0<F?C.async("string").then(function(G){(new XMLHttpRequest).upload&&
+m.isRemoteFileFormat(G,d.name)?m.isOffline()?m.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g):m.parseFileData(G,mxUtils.bind(this,function(Z){4==Z.readyState&&(200<=Z.status&&299>=Z.status?f(Z.responseText):g())}),d.name):g()}):I||g()}},function(y){g(y)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?q():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",q))};EditorUi.prototype.importFile=function(d,f,g,m,q,y,F,C,I,G,Z,ca){G=null!=
+G?G:!0;var aa=!1,Y=null,pa=mxUtils.bind(this,function(Q){var X=null;null!=Q&&"<mxlibrary"==Q.substring(0,10)?this.loadLibrary(new LocalLibrary(this,Q,F)):X=this.importXml(Q,g,m,G,null,null!=ca?mxEvent.isControlDown(ca):null);null!=C&&C(X)});"image"==f.substring(0,5)?(I=!1,"image/png"==f.substring(0,9)&&(f=Z?null:this.extractGraphModelFromPng(d),null!=f&&0<f.length&&(Y=this.importXml(f,g,m,G,null,null!=ca?mxEvent.isControlDown(ca):null),I=!0)),I||(f=this.editor.graph,I=d.indexOf(";"),0<I&&(d=d.substring(0,
+I)+d.substring(d.indexOf(",",I+1))),G&&f.isGridEnabled()&&(g=f.snap(g),m=f.snap(m)),Y=[f.insertVertex(null,null,"",g,m,q,y,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+d+";")])):/(\.*<graphml )/.test(d)?(aa=!0,this.importGraphML(d,pa)):null!=I&&null!=F&&(/(\.v(dx|sdx?))($|\?)/i.test(F)||/(\.vs(x|sx?))($|\?)/i.test(F))?(aa=!0,this.importVisio(I,pa)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,F)?this.isOffline()?
+this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(aa=!0,q=mxUtils.bind(this,function(Q){4==Q.readyState&&(200<=Q.status&&299>=Q.status?pa(Q.responseText):null!=C&&C(null))}),null!=d?this.parseFileData(d,q,F):this.parseFile(I,q,F)):0==d.indexOf("PK")&&null!=I?(aa=!0,this.importZipFile(I,pa,mxUtils.bind(this,function(){Y=this.insertTextAt(this.validateFileData(d),g,m,!0,null,G);C(Y)}))):/(\.v(sd|dx))($|\?)/i.test(F)||/(\.vs(s|x))($|\?)/i.test(F)||(Y=this.insertTextAt(this.validateFileData(d),
+g,m,!0,null,G,null,null!=ca?mxEvent.isControlDown(ca):null));aa||null==C||C(Y);return Y};EditorUi.prototype.importFiles=function(d,f,g,m,q,y,F,C,I,G,Z,ca,aa){m=null!=m?m:this.maxImageSize;G=null!=G?G:this.maxImageBytes;var Y=null!=f&&null!=g,pa=!0;f=null!=f?f:0;g=null!=g?g:0;var Q=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var X=Z||this.resampleThreshold,ha=0;ha<d.length;ha++)if("image/svg"!==d[ha].type.substring(0,9)&&"image/"===d[ha].type.substring(0,6)&&d[ha].size>X){Q=!0;break}var U=mxUtils.bind(this,
+function(){var ma=this.editor.graph,T=ma.gridSize;q=null!=q?q:mxUtils.bind(this,function(la,u,H,P,W,R,da,fa,ea){try{return null!=la&&"<mxlibrary"==la.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,la,da)),null):this.importFile(la,u,H,P,W,R,da,fa,ea,Y,ca,aa)}catch(qa){return this.handleError(qa),null}});y=null!=y?y:mxUtils.bind(this,function(la){ma.setSelectionCells(la)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var M=d.length,ia=M,N=[],O=mxUtils.bind(this,
+function(la,u){N[la]=u;if(0==--ia){this.spinner.stop();if(null!=C)C(N);else{var H=[];ma.getModel().beginUpdate();try{for(la=0;la<N.length;la++){var P=N[la]();null!=P&&(H=H.concat(P))}}finally{ma.getModel().endUpdate()}}y(H)}}),ba=0;ba<M;ba++)mxUtils.bind(this,function(la){var u=d[la];if(null!=u){var H=new FileReader;H.onload=mxUtils.bind(this,function(P){if(null==F||F(u))if("image/"==u.type.substring(0,6))if("image/svg"==u.type.substring(0,9)){var W=Graph.clipSvgDataUri(P.target.result),R=W.indexOf(",");
+R=decodeURIComponent(escape(atob(W.substring(R+1))));var da=mxUtils.parseXml(R);R=da.getElementsByTagName("svg");if(0<R.length){R=R[0];var fa=ca?null:R.getAttribute("content");null!=fa&&"<"!=fa.charAt(0)&&"%"!=fa.charAt(0)&&(fa=unescape(window.atob?atob(fa):Base64.decode(fa,!0)));null!=fa&&"%"==fa.charAt(0)&&(fa=decodeURIComponent(fa));null==fa||"<mxfile "!==fa.substring(0,8)&&"<mxGraphModel "!==fa.substring(0,14)?O(la,mxUtils.bind(this,function(){try{if(null!=da){var va=da.getElementsByTagName("svg");
+if(0<va.length){var ua=va[0],Aa=ua.getAttribute("width"),za=ua.getAttribute("height");Aa=null!=Aa&&"%"!=Aa.charAt(Aa.length-1)?parseFloat(Aa):NaN;za=null!=za&&"%"!=za.charAt(za.length-1)?parseFloat(za):NaN;var Ca=ua.getAttribute("viewBox");if(null==Ca||0==Ca.length)ua.setAttribute("viewBox","0 0 "+Aa+" "+za);else if(isNaN(Aa)||isNaN(za)){var sa=Ca.split(" ");3<sa.length&&(Aa=parseFloat(sa[2]),za=parseFloat(sa[3]))}W=Editor.createSvgDataUri(mxUtils.getXml(ua));var Va=Math.min(1,Math.min(m/Math.max(1,
+Aa)),m/Math.max(1,za)),Ua=q(W,u.type,f+la*T,g+la*T,Math.max(1,Math.round(Aa*Va)),Math.max(1,Math.round(za*Va)),u.name);if(isNaN(Aa)||isNaN(za)){var Ra=new Image;Ra.onload=mxUtils.bind(this,function(){Aa=Math.max(1,Ra.width);za=Math.max(1,Ra.height);Ua[0].geometry.width=Aa;Ua[0].geometry.height=za;ua.setAttribute("viewBox","0 0 "+Aa+" "+za);W=Editor.createSvgDataUri(mxUtils.getXml(ua));var Za=W.indexOf(";");0<Za&&(W=W.substring(0,Za)+W.substring(W.indexOf(",",Za+1)));ma.setCellStyles("image",W,[Ua[0]])});
+Ra.src=Editor.createSvgDataUri(mxUtils.getXml(ua))}return Ua}}}catch(Za){}return null})):O(la,mxUtils.bind(this,function(){return q(fa,"text/xml",f+la*T,g+la*T,0,0,u.name)}))}else O(la,mxUtils.bind(this,function(){return null}))}else{R=!1;if("image/png"==u.type){var ea=ca?null:this.extractGraphModelFromPng(P.target.result);if(null!=ea&&0<ea.length){var qa=new Image;qa.src=P.target.result;O(la,mxUtils.bind(this,function(){return q(ea,"text/xml",f+la*T,g+la*T,qa.width,qa.height,u.name)}));R=!0}}R||
+(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(P.target.result,mxUtils.bind(this,function(va){this.resizeImage(va,P.target.result,mxUtils.bind(this,function(ua,Aa,za){O(la,mxUtils.bind(this,function(){if(null!=ua&&ua.length<G){var Ca=pa&&this.isResampleImageSize(u.size,
+Z)?Math.min(1,Math.min(m/Aa,m/za)):1;return q(ua,u.type,f+la*T,g+la*T,Math.round(Aa*Ca),Math.round(za*Ca),u.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),pa,m,Z,u.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else W=P.target.result,q(W,u.type,f+la*T,g+la*T,240,160,u.name,function(va){O(la,function(){return va})},u)});/(\.v(dx|sdx?))($|\?)/i.test(u.name)||/(\.vs(x|sx?))($|\?)/i.test(u.name)?q(null,u.type,
+f+la*T,g+la*T,240,160,u.name,function(P){O(la,function(){return P})},u):"image"==u.type.substring(0,5)||"application/pdf"==u.type?H.readAsDataURL(u):H.readAsText(u)}})(ba)});if(Q){Q=[];for(ha=0;ha<d.length;ha++)Q.push(d[ha]);d=Q;this.confirmImageResize(function(ma){pa=ma;U()},I)}else U()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=
function(d,f){f=null!=f?f:!1;var g=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},m=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,q=function(y,F){if(y||f)mxSettings.setResizeImages(y?F:null),mxSettings.save();g();d(F)};null==m||f?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(y){q(y,!0)},function(y){q(y,!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):q(!1,m)};EditorUi.prototype.parseFile=function(d,f,g){g=null!=g?g:d.name;var m=new FileReader;m.onload=mxUtils.bind(this,function(){this.parseFileData(m.result,f,g)});m.readAsText(d)};EditorUi.prototype.parseFileData=function(d,f,g){var m=new XMLHttpRequest;m.open("POST",OPEN_URL);m.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
m.onreadystatechange=function(){f(m)};m.send("format=xml&filename="+encodeURIComponent(g)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(q){}};EditorUi.prototype.isResampleImageSize=function(d,f){f=null!=f?f:this.resampleThreshold;return d>f};EditorUi.prototype.resizeImage=function(d,f,g,m,q,y,F){q=null!=q?q:this.maxImageSize;var C=Math.max(1,d.width),I=Math.max(1,d.height);if(m&&this.isResampleImageSize(null!=F?F:f.length,y))try{var G=
-Math.max(C/q,I/q);if(1<G){var Y=Math.round(C/G),ba=Math.round(I/G),Z=document.createElement("canvas");Z.width=Y;Z.height=ba;Z.getContext("2d").drawImage(d,0,0,Y,ba);var X=Z.toDataURL();if(X.length<f.length){var qa=document.createElement("canvas");qa.width=Y;qa.height=ba;var Q=qa.toDataURL();X!==Q&&(f=X,C=Y,I=ba)}}}catch(W){}g(f,C,I)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,f,g){try{var m=new Image;m.onload=
-function(){m.width=0<m.width?m.width:120;m.height=0<m.height?m.height:120;f(m)};null!=g&&(m.onerror=g);m.src=d}catch(q){if(null!=g)g(q);else throw q;}};EditorUi.prototype.getDefaultSketchMode=function(){var d="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?urlParams.rough:d)};var D=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:this.getDefaultSketchMode()),null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());var d=this,f=this.editor.graph;Editor.isDarkMode()&&(f.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);Graph.touchStyle&&(f.panningHandler.isPanningTrigger=function(W){var ha=W.getEvent();return null==W.getState()&&
-!mxEvent.isMouseEvent(ha)&&!f.freehand.isDrawing()||mxEvent.isPopupTrigger(ha)&&(null==W.getState()||mxEvent.isControlDown(ha)||mxEvent.isShiftDown(ha))});f.cellEditor.editPlantUmlData=function(W,ha,la){var ja=JSON.parse(la);ha=new TextareaDialog(d,mxResources.get("plantUml")+":",ja.data,function(U){null!=U&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(U,ja.format,function(L,da,O){d.spinner.stop();f.getModel().beginUpdate();try{if("txt"==ja.format)f.labelChanged(W,
-"<pre>"+L+"</pre>"),f.updateCellSize(W,!0);else{f.setCellStyles("image",d.convertDataUri(L),[W]);var N=f.model.getGeometry(W);null!=N&&(N=N.clone(),N.width=da,N.height=O,f.cellsResized([W],[N],!1))}f.setAttributeForCell(W,"plantUmlData",JSON.stringify({data:U,format:ja.format}))}finally{f.getModel().endUpdate()}},function(L){d.handleError(L)})},null,null,400,220);d.showDialog(ha.container,420,300,!0,!0);ha.init()};f.cellEditor.editMermaidData=function(W,ha,la){var ja=JSON.parse(la);ha=new TextareaDialog(d,
-mxResources.get("mermaid")+":",ja.data,function(U){null!=U&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(U,ja.config,function(L,da,O){d.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",L,[W]);var N=f.model.getGeometry(W);null!=N&&(N=N.clone(),N.width=Math.max(N.width,da),N.height=Math.max(N.height,O),f.cellsResized([W],[N],!1));f.setAttributeForCell(W,"mermaidData",JSON.stringify({data:U,config:ja.config},null,2))}finally{f.getModel().endUpdate()}},
-function(L){d.handleError(L)})},null,null,400,220);d.showDialog(ha.container,420,300,!0,!0);ha.init()};var g=f.cellEditor.startEditing;f.cellEditor.startEditing=function(W,ha){try{var la=this.graph.getAttributeForCell(W,"plantUmlData");if(null!=la)this.editPlantUmlData(W,ha,la);else if(la=this.graph.getAttributeForCell(W,"mermaidData"),null!=la)this.editMermaidData(W,ha,la);else{var ja=f.getCellStyle(W);"1"==mxUtils.getValue(ja,"metaEdit","0")?d.showDataDialog(W):g.apply(this,arguments)}}catch(U){d.handleError(U)}};
-f.getLinkTitle=function(W){return d.getLinkTitle(W)};f.customLinkClicked=function(W){var ha=!1;try{d.handleCustomLink(W),ha=!0}catch(la){d.handleError(la)}return ha};var m=f.parseBackgroundImage;f.parseBackgroundImage=function(W){var ha=m.apply(this,arguments);null!=ha&&null!=ha.src&&Graph.isPageLink(ha.src)&&(ha={originalSrc:ha.src});return ha};var q=f.setBackgroundImage;f.setBackgroundImage=function(W){null!=W&&null!=W.originalSrc&&(W=d.createImageForPageLink(W.originalSrc,d.currentPage,this));
-q.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(W,ha){W=null!=f.backgroundImage?f.backgroundImage.originalSrc:null;if(null!=W){var la=W.indexOf(",");if(0<la)for(W=W.substring(la+1),ha=ha.getProperty("patches"),la=0;la<ha.length;la++)if(null!=ha[la][EditorUi.DIFF_UPDATE]&&
-null!=ha[la][EditorUi.DIFF_UPDATE][W]||null!=ha[la][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(ha[la][EditorUi.DIFF_REMOVE],W)){f.refreshBackgroundImage();break}}}));var y=f.getBackgroundImageObject;f.getBackgroundImageObject=function(W,ha){var la=y.apply(this,arguments);if(null!=la&&null!=la.originalSrc)if(!ha)la={src:la.originalSrc};else if(ha&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var ja=this.stylesheet,U=this.shapeForegroundColor,L=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();
-this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";la=d.createImageForPageLink(la.originalSrc);this.shapeBackgroundColor=L;this.shapeForegroundColor=U;this.stylesheet=ja}return la};var F=this.clearDefaultStyle;this.clearDefaultStyle=function(){F.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 C=d.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(W){W=null!=W?W:"";"1"==urlParams.dev&&(W+=(0<W.length?"&":"?")+"dev=1");return C.apply(this,arguments)};var I=f.addClickHandler;f.addClickHandler=function(W,ha,la){var ja=ha;ha=function(U,L){if(null==L){var da=mxEvent.getSource(U);"a"==da.nodeName.toLowerCase()&&(L=da.getAttribute("href"))}null!=L&&f.isCustomLink(L)&&(mxEvent.isTouchEvent(U)||
-!mxEvent.isPopupTrigger(U))&&f.customLinkClicked(L)&&mxEvent.consume(U);null!=ja&&ja(U,L)};I.call(this,W,ha,la)};D.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var G=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(W,ha,la){d.editor.graph.isSelectionEmpty()?G.apply(this,arguments):d.menus.addMenuItems(W,"delete - cut copy copyAsImage - duplicate".split(" "),null,la)}}d.actions.get("print").funct=
-function(){d.showDialog((new PrintDialog(d)).container,360,null!=d.pages&&1<d.pages.length?470:390,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var Y=f.getExportVariables;f.getExportVariables=function(){var W=Y.apply(this,arguments),ha=d.getCurrentFile();null!=ha&&(W.filename=ha.getTitle());W.pagecount=null!=d.pages?d.pages.length:1;W.page=null!=d.currentPage?d.currentPage.getName():"";W.pagenumber=null!=d.pages&&null!=d.currentPage?mxUtils.indexOf(d.pages,d.currentPage)+1:1;return W};
-var ba=f.getGlobalVariable;f.getGlobalVariable=function(W){var ha=d.getCurrentFile();return"filename"==W&&null!=ha?ha.getTitle():"page"==W&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==W?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+1:1:"pagecount"==W?null!=d.pages?d.pages.length:1:ba.apply(this,arguments)};var Z=f.labelLinkClicked;f.labelLinkClicked=function(W,ha,la){var ja=ha.getAttribute("href");if(null==ja||!f.isCustomLink(ja)||!mxEvent.isTouchEvent(la)&&
-mxEvent.isPopupTrigger(la))Z.apply(this,arguments);else{if(!f.isEnabled()||null!=W&&f.isCellLocked(W.cell))f.customLinkClicked(ja),f.getRubberband().reset();mxEvent.consume(la)}};this.editor.getOrCreateFilename=function(){var W=d.defaultFilename,ha=d.getCurrentFile();null!=ha&&(W=null!=ha.getTitle()?ha.getTitle():W);return W};var X=this.actions.get("print");X.setEnabled(!mxClient.IS_IOS||!navigator.standalone);X.visible=X.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,
-!0,"findReplace"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"insertRectangle"),this.keyHandler.bindAction(75,!0,"insertEllipse",!0),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));
-this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&f.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(W){var ha=f.cellEditor.text2,la=null;null!=ha&&(mxEvent.addListener(ha,"dragleave",function(ja){null!=la&&(la.parentNode.removeChild(la),la=null);ja.stopPropagation();ja.preventDefault()}),mxEvent.addListener(ha,"dragover",mxUtils.bind(this,function(ja){null==la&&(!mxClient.IS_IE||10<document.documentMode)&&(la=this.highlightElement(ha));ja.stopPropagation();ja.preventDefault()})),
-mxEvent.addListener(ha,"drop",mxUtils.bind(this,function(ja){null!=la&&(la.parentNode.removeChild(la),la=null);if(0<ja.dataTransfer.files.length)this.importFiles(ja.dataTransfer.files,0,0,this.maxImageSize,function(L,da,O,N,aa,ma){f.insertImage(L,aa,ma)},function(){},function(L){return"image/"==L.type.substring(0,6)},function(L){for(var da=0;da<L.length;da++)L[da]()},mxEvent.isControlDown(ja));else if(0<=mxUtils.indexOf(ja.dataTransfer.types,"text/uri-list")){var U=ja.dataTransfer.getData("text/uri-list");
-/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(U)?this.loadImage(decodeURIComponent(U),mxUtils.bind(this,function(L){var da=Math.max(1,L.width);L=Math.max(1,L.height);var O=this.maxImageSize;O=Math.min(1,Math.min(O/Math.max(1,da)),O/Math.max(1,L));f.insertImage(decodeURIComponent(U),da*O,L*O)})):document.execCommand("insertHTML",!1,ja.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(ja.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,ja.dataTransfer.getData("text/html")):0<=
-mxUtils.indexOf(ja.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,ja.dataTransfer.getData("text/plain"));ja.stopPropagation();ja.preventDefault()})))}));this.isSettingsEnabled()&&(X=this.editor.graph.view,X.setUnit(mxSettings.getUnit()),X.addListener("unitChanged",function(W,ha){mxSettings.setUnit(ha.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&
-!this.editor.editable?null:new mxDualRuler(this,X.unit),this.refresh());if("1"==urlParams.styledev){X=document.getElementById("geFooter");null!=X&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",
-mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),X.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(W,ha){0<this.editor.graph.getSelectionCount()?(W=this.editor.graph.getSelectionCell(),W=this.editor.graph.getModel().getStyle(W),this.styleInput.value=W||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var qa=
-this.isSelectionAllowed;this.isSelectionAllowed=function(W){return mxEvent.getSource(W)==this.styleInput?!0:qa.apply(this,arguments)}}X=document.getElementById("geInfo");null!=X&&X.parentNode.removeChild(X);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var Q=null;mxEvent.addListener(f.container,"dragleave",function(W){f.isEnabled()&&(null!=Q&&(Q.parentNode.removeChild(Q),Q=null),W.stopPropagation(),W.preventDefault())});mxEvent.addListener(f.container,"dragover",mxUtils.bind(this,
-function(W){null==Q&&(!mxClient.IS_IE||10<document.documentMode)&&(Q=this.highlightElement(f.container));null!=this.sidebar&&this.sidebar.hideTooltip();W.stopPropagation();W.preventDefault()}));mxEvent.addListener(f.container,"drop",mxUtils.bind(this,function(W){null!=Q&&(Q.parentNode.removeChild(Q),Q=null);if(f.isEnabled()){var ha=mxUtils.convertPoint(f.container,mxEvent.getClientX(W),mxEvent.getClientY(W)),la=W.dataTransfer.files,ja=f.view.translate,U=f.view.scale,L=ha.x/U-ja.x,da=ha.y/U-ja.y;if(0<
-la.length)ha=1==la.length&&this.isBlankFile()&&!this.canUndo()&&("image/svg"===la[0].type.substring(0,9)||"image/"!==la[0].type.substring(0,6)||/(\.drawio.png)$/i.test(la[0].name)),"1"!=urlParams.embed&&(mxEvent.isShiftDown(W)||ha)?(!mxEvent.isShiftDown(W)&&ha&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(la,!0)):(mxEvent.isAltDown(W)&&(da=L=null),this.importFiles(la,L,da,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(W),null,null,mxEvent.isShiftDown(W),W));else{mxEvent.isAltDown(W)&&
-(da=L=0);var O=0<=mxUtils.indexOf(W.dataTransfer.types,"text/uri-list")?W.dataTransfer.getData("text/uri-list"):null;la=this.extractGraphModelFromEvent(W,null!=this.pages);if(null!=la)f.setSelectionCells(this.importXml(la,L,da,!0));else if(0<=mxUtils.indexOf(W.dataTransfer.types,"text/html")){var N=W.dataTransfer.getData("text/html");la=document.createElement("div");la.innerHTML=f.sanitizeHtml(N);var aa=null;ha=la.getElementsByTagName("img");null!=ha&&1==ha.length?(N=ha[0].getAttribute("src"),null==
-N&&(N=ha[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(N)||(aa=!0)):(ha=la.getElementsByTagName("a"),null!=ha&&1==ha.length?N=ha[0].getAttribute("href"):(la=la.getElementsByTagName("pre"),null!=la&&1==la.length&&(N=mxUtils.getTextContent(la[0]))));var ma=!0,u=mxUtils.bind(this,function(){f.setSelectionCells(this.insertTextAt(N,L,da,!0,aa,null,ma,mxEvent.isControlDown(W)))});aa&&null!=N&&N.length>this.resampleThreshold?this.confirmImageResize(function(H){ma=H;u()},mxEvent.isControlDown(W)):
-u()}else null!=O&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(O)?this.loadImage(decodeURIComponent(O),mxUtils.bind(this,function(H){var P=Math.max(1,H.width);H=Math.max(1,H.height);var S=this.maxImageSize;S=Math.min(1,Math.min(S/Math.max(1,P)),S/Math.max(1,H));f.setSelectionCell(f.insertVertex(null,null,"",L,da,P*S,H*S,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+O+";"))}),mxUtils.bind(this,function(H){f.setSelectionCells(this.insertTextAt(O,
-L,da,!0))})):0<=mxUtils.indexOf(W.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(W.dataTransfer.getData("text/plain"),L,da,!0))}}W.stopPropagation();W.preventDefault()}),!1)}f.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var d=this.editor.graph;d.container.addEventListener("paste",mxUtils.bind(this,function(f){if(!mxEvent.isConsumed(f))try{for(var g=
-f.clipboardData||f.originalEvent.clipboardData,m=!1,q=0;q<g.types.length;q++)if("text/"===g.types[q].substring(0,5)){m=!0;break}if(!m){var y=g.items;for(index in y){var F=y[index];if("file"===F.kind){if(d.isEditing())this.importFiles([F.getAsFile()],0,0,this.maxImageSize,function(I,G,Y,ba,Z,X){d.insertImage(I,Z,X)},function(){},function(I){return"image/"==I.type.substring(0,6)},function(I){for(var G=0;G<I.length;G++)I[G]()});else{var C=this.editor.graph.getInsertPoint();this.importFiles([F.getAsFile()],
-C.x,C.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(I){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function d(){window.setTimeout(function(){g.innerHTML="&nbsp;";g.focus();document.execCommand("selectAll",!1,null)},0)}var f=this.editor.graph,g=document.createElement("div");g.setAttribute("autocomplete","off");g.setAttribute("autocorrect","off");g.setAttribute("autocapitalize","off");g.setAttribute("spellcheck","false");g.style.textRendering="optimizeSpeed";g.style.fontFamily=
-"monospace";g.style.wordBreak="break-all";g.style.background="transparent";g.style.color="transparent";g.style.position="absolute";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.display="block";g.style.fontSize="1";g.style.zIndex="-1";g.style.resize="none";g.style.outline="none";g.style.width="1px";g.style.height="1px";mxUtils.setOpacity(g,0);g.contentEditable=!0;g.innerHTML="&nbsp;";var m=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,
-null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(y){var F=mxEvent.getSource(y);null==f.container||!f.isEnabled()||f.isMouseDown||f.isEditing()||null!=this.dialog||"INPUT"==F.nodeName||"TEXTAREA"==F.nodeName||224!=y.keyCode&&(mxClient.IS_MAC||17!=y.keyCode)&&(!mxClient.IS_MAC||91!=y.keyCode&&93!=y.keyCode)||m||(g.style.left=f.container.scrollLeft+10+"px",g.style.top=f.container.scrollTop+10+"px",f.container.appendChild(g),m=!0,g.focus(),document.execCommand("selectAll",!1,null))}));
-mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(y){var F=y.keyCode;window.setTimeout(mxUtils.bind(this,function(){!m||224!=F&&17!=F&&91!=F&&93!=F||(m=!1,f.isEditing()||null!=this.dialog||null==f.container||f.container.focus(),g.parentNode.removeChild(g),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(g,"copy",mxUtils.bind(this,function(y){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(g),d()}catch(F){this.handleError(F)}}));mxEvent.addListener(g,"cut",
-mxUtils.bind(this,function(y){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(g,!0),d()}catch(F){this.handleError(F)}}));mxEvent.addListener(g,"paste",mxUtils.bind(this,function(y){f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&(g.innerHTML="&nbsp;",g.focus(),null!=y.clipboardData&&this.pasteCells(y,g,!0,!0),mxEvent.isConsumed(y)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(y,g,!1,!0)}),0))}),!0);var q=this.isSelectionAllowed;this.isSelectionAllowed=function(y){return mxEvent.getSource(y)==
-g?!0:q.apply(this,arguments)}};EditorUi.prototype.setSketchMode=function(d){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(d);null==urlParams.rough&&(mxSettings.settings.sketchMode=d,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};EditorUi.prototype.setPagesVisible=function(d){Editor.pagesVisible!=d&&(Editor.pagesVisible=d,mxSettings.settings.pagesVisible=d,mxSettings.save(),
-this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(d,f){this.sidebar.sidebarTitles!=d&&(this.sidebar.sidebarTitles=d,this.sidebar.refresh(),this.isSettingsEnabled()&&f&&(mxSettings.settings.sidebarTitles=d,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};EditorUi.prototype.setInlineFullscreen=function(d){Editor.inlineFullscreen!=d&&(Editor.inlineFullscreen=d,this.fireEvent(new mxEventObject("inlineFullscreenChanged")),
-(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),window.setTimeout(mxUtils.bind(this,function(){this.refresh();this.actions.get("resetView").funct()}),10))};EditorUi.prototype.doSetSketchMode=function(d){if(Editor.sketchMode!=d){var f=function(m,q,y){null==m[q]&&(m[q]=y)},g=this.editor.graph;Editor.sketchMode=d;this.menus.defaultFontSize=d?20:16;g.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);
-f(g.defaultVertexStyle,"fontSize",this.menus.defaultFontSize);g.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);f(g.defaultEdgeStyle,"fontSize",this.menus.defaultFontSize-4);f(g.defaultEdgeStyle,"edgeStyle","none");f(g.defaultEdgeStyle,"rounded","0");f(g.defaultEdgeStyle,"curved","1");f(g.defaultEdgeStyle,"jettySize","auto");f(g.defaultEdgeStyle,"orthogonalLoop","1");f(g.defaultEdgeStyle,"endArrow","open");f(g.defaultEdgeStyle,"endSize","14");f(g.defaultEdgeStyle,"startSize","14");
-d&&(f(g.defaultVertexStyle,"fontFamily",Editor.sketchFontFamily),f(g.defaultVertexStyle,"fontSource",Editor.sketchFontSource),f(g.defaultVertexStyle,"hachureGap","4"),f(g.defaultVertexStyle,"sketch","1"),f(g.defaultEdgeStyle,"fontFamily",Editor.sketchFontFamily),f(g.defaultEdgeStyle,"fontSource",Editor.sketchFontSource),f(g.defaultEdgeStyle,"sketch","1"),f(g.defaultEdgeStyle,"hachureGap","4"),f(g.defaultEdgeStyle,"sourcePerimeterSpacing","8"),f(g.defaultEdgeStyle,"targetPerimeterSpacing","8"));g.currentVertexStyle=
-mxUtils.clone(g.defaultVertexStyle);g.currentEdgeStyle=mxUtils.clone(g.defaultEdgeStyle);this.clearDefaultStyle()}};EditorUi.prototype.getLinkTitle=function(d){var f=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(d)){var g=d.indexOf(",");0<g&&(f=this.getPageById(d.substring(g+1)),f=null!=f?f.getName():mxResources.get("pageNotFound"))}else"data:"==d.substring(0,5)&&(f=mxResources.get("action"));return f};EditorUi.prototype.handleCustomLink=function(d){if(Graph.isPageLink(d)){var f=
-d.indexOf(",");if(d=this.getPageById(d.substring(f+1)))this.selectPage(d);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(d)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){Editor.pagesVisible=mxSettings.settings.pagesVisible;ColorDialog.recentColors=mxSettings.getRecentColors();
-if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(d){d.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(d){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(d,f){"1"!=urlParams["ext-fonts"]?mxSettings.setCustomFonts(this.menus.customFonts):
-(d=f.getProperty("customFonts"),this.menus.customFonts=d,mxSettings.setCustomFonts(d));mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(d,f){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:
-mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(d,f){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor=mxSettings.getGridColor(!0);this.editor.graph.view.defaultGridColor=mxSettings.getGridColor(!1);this.addListener("gridColorChanged",mxUtils.bind(this,function(d,f){mxSettings.setGridColor(this.editor.graph.view.gridColor,
-Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(d,f){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",
-mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(d,f,g){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(m,
-q){try{this.spinner.stop();var y=this.createImageDataUri(m,f,"png"),F=parseInt(q.getAttribute("width")),C=parseInt(q.getAttribute("height"));this.writeImageToClipboard(y,F,C,mxUtils.bind(this,function(I){this.handleError(I)}))}catch(I){this.handleError(I)}}),null,null,null,mxUtils.bind(this,function(m){this.spinner.stop();this.handleError(m)}),null,null,null!=g?g:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<d.length?d:null)}catch(m){this.handleError(m)}};
-EditorUi.prototype.writeImageToClipboard=function(d,f,g,m){var q=this.base64ToBlob(d.substring(d.indexOf(",")+1),"image/png");d=new ClipboardItem({"image/png":q,"text/html":new Blob(['<img src="'+d+'" width="'+f+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([d])["catch"](m)};EditorUi.prototype.copyCells=function(d,f){var g=this.editor.graph;if(g.isSelectionEmpty())d.innerText="";else{var m=mxUtils.sortCells(g.model.getTopmostCells(g.getSelectionCells())),q=mxUtils.getXml(g.encodeCells(m));
-mxUtils.setTextContent(d,encodeURIComponent(q));f?(g.removeCells(m,!1),g.lastPasteXml=null):(g.lastPasteXml=q,g.pasteCounter=0);d.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var d=null;if(Editor.enableNativeCipboard){var f=this.editor.graph;f.isSelectionEmpty()||(d=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),f=mxUtils.getXml(f.encodeCells(d)),navigator.clipboard.writeText(f))}return d};EditorUi.prototype.pasteXml=
-function(d,f,g,m){var q=this.editor.graph,y=null;q.lastPasteXml==d?q.pasteCounter++:(q.lastPasteXml=d,q.pasteCounter=0);var F=q.pasteCounter*q.gridSize;if(g||this.isCompatibleString(d))y=this.importXml(d,F,F),q.setSelectionCells(y);else if(f&&1==q.getSelectionCount()){F=q.getStartEditingCell(q.getSelectionCell(),m);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&"image"==q.getCurrentCellStyle(F)[mxConstants.STYLE_SHAPE])q.setCellStyles(mxConstants.STYLE_IMAGE,d,[F]);else{q.model.beginUpdate();try{q.labelChanged(F,
-d),Graph.isLink(d)&&q.setLinkForCell(F,d)}finally{q.model.endUpdate()}}q.setSelectionCell(F)}else y=q.getInsertPoint(),q.isMouseInsertPoint()&&(F=0,q.lastPasteXml==d&&0<q.pasteCounter&&q.pasteCounter--),y=this.insertTextAt(d,y.x+F,y.y+F,!0),q.setSelectionCells(y);q.isSelectionEmpty()||(q.scrollCellToVisible(q.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(q.view.getState(q.getSelectionCell())));return y};EditorUi.prototype.pasteCells=function(d,f,g,m){if(!mxEvent.isConsumed(d)){var q=
-f,y=!1;if(g&&null!=d.clipboardData&&d.clipboardData.getData){var F=d.clipboardData.getData("text/plain"),C=!1;if(null!=F&&0<F.length&&"%3CmxGraphModel%3E"==F.substring(0,18))try{var I=decodeURIComponent(F);this.isCompatibleString(I)&&(C=!0,F=I)}catch(ba){}C=C?null:d.clipboardData.getData("text/html");null!=C&&0<C.length?(q=this.parseHtmlData(C),y="text/plain"!=q.getAttribute("data-type")):null!=F&&0<F.length&&(q=document.createElement("div"),mxUtils.setTextContent(q,C))}F=q.getElementsByTagName("span");
-if(null!=F&&0<F.length&&"application/vnd.lucid.chart.objects"===F[0].getAttribute("data-lucid-type"))g=F[0].getAttribute("data-lucid-content"),null!=g&&0<g.length&&(this.convertLucidChart(g,mxUtils.bind(this,function(ba){var Z=this.editor.graph;Z.lastPasteXml==ba?Z.pasteCounter++:(Z.lastPasteXml=ba,Z.pasteCounter=0);var X=Z.pasteCounter*Z.gridSize;Z.setSelectionCells(this.importXml(ba,X,X));Z.scrollCellToVisible(Z.getSelectionCell())}),mxUtils.bind(this,function(ba){this.handleError(ba)})),mxEvent.consume(d));
-else{y=y?q.innerHTML:mxUtils.trim(null==q.innerText?mxUtils.getTextContent(q):q.innerText);C=!1;try{var G=y.lastIndexOf("%3E");0<=G&&G<y.length-3&&(y=y.substring(0,G+3))}catch(ba){}try{F=q.getElementsByTagName("span"),(I=null!=F&&0<F.length?mxUtils.trim(decodeURIComponent(F[0].textContent)):decodeURIComponent(y))&&(this.isCompatibleString(I)||0==I.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(C=!0,y=I)}catch(ba){}try{if(null!=y&&0<y.length){if(0==y.substring(0,20).replace(/\s/g,
-"").indexOf('{"isProtected":'))try{"undefined"!==typeof MiroImporter&&(y=(new MiroImporter).importMiroJson(JSON.parse(y)))}catch(ba){console.log("Miro import error:",ba)}this.pasteXml(y,m,C,d);try{mxEvent.consume(d)}catch(ba){}}else if(!g){var Y=this.editor.graph;Y.lastPasteXml=null;Y.pasteCounter=0}}catch(ba){this.handleError(ba)}}}f.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(d){if(Graph.fileSupport)for(var f=null,g=0;g<d.length;g++)mxEvent.addListener(d[g],"dragleave",function(m){null!=
-f&&(f.parentNode.removeChild(f),f=null);m.stopPropagation();m.preventDefault()}),mxEvent.addListener(d[g],"dragover",mxUtils.bind(this,function(m){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==f&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(f=this.highlightElement());m.stopPropagation();m.preventDefault()})),mxEvent.addListener(d[g],"drop",mxUtils.bind(this,function(m){null!=f&&(f.parentNode.removeChild(f),f=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<
-m.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(m.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(m)&&!mxEvent.isShiftDown(m)):this.openFiles(m.dataTransfer.files,!0);else{var q=this.extractGraphModelFromEvent(m);if(null==q){var y=null!=m.dataTransfer?m.dataTransfer:m.clipboardData;null!=y&&(10==document.documentMode||11==document.documentMode?q=y.getData("Text"):(q=null,q=0<=mxUtils.indexOf(y.types,"text/uri-list")?m.dataTransfer.getData("text/uri-list"):
-0<=mxUtils.indexOf(y.types,"text/html")?y.getData("text/html"):null,null!=q&&0<q.length?(y=document.createElement("div"),y.innerHTML=this.editor.graph.sanitizeHtml(q),y=y.getElementsByTagName("img"),0<y.length&&(q=y[0].getAttribute("src"))):0<=mxUtils.indexOf(y.types,"text/plain")&&(q=y.getData("text/plain"))),null!=q&&(Editor.isPngDataUrl(q)?(q=Editor.extractGraphModelFromPng(q),null!=q&&0<q.length&&this.openLocalFile(q,null,!0)):this.isRemoteFileFormat(q)?this.isOffline()?this.showError(mxResources.get("error"),
-mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(q))).send(mxUtils.bind(this,function(F){200<=F.getStatus()&&299>=F.getStatus()&&this.openLocalFile(F.getText(),null,!0)})):/^https?:\/\//.test(q)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(q):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(q)))))}else this.openLocalFile(q,null,!0)}m.stopPropagation();
-m.preventDefault()}))};EditorUi.prototype.highlightElement=function(d){var f=0,g=0;if(null==d){var m=document.body;var q=document.documentElement;var y=(m.clientWidth||q.clientWidth)-3;m=Math.max(m.clientHeight||0,q.clientHeight)-3}else f=d.offsetTop,g=d.offsetLeft,y=d.clientWidth,m=d.clientHeight;q=document.createElement("div");q.style.zIndex=mxPopupMenu.prototype.zIndex+2;q.style.border="3px dotted rgb(254, 137, 12)";q.style.pointerEvents="none";q.style.position="absolute";q.style.top=f+"px";q.style.left=
-g+"px";q.style.width=Math.max(0,y-3)+"px";q.style.height=Math.max(0,m-3)+"px";null!=d&&d.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(q):document.body.appendChild(q);return q};EditorUi.prototype.stringToCells=function(d){d=mxUtils.parseXml(d);var f=this.editor.extractGraphModel(d.documentElement);d=[];if(null!=f){var g=new mxCodec(f.ownerDocument),m=new mxGraphModel;g.decode(f,m);f=m.getChildAt(m.getRoot(),0);for(g=0;g<m.getChildCount(f);g++)d.push(m.getChildAt(f,
-g))}return d};EditorUi.prototype.openFileHandle=function(d,f,g,m,q){if(null!=f&&0<f.length){!this.useCanvasForExport&&/(\.png)$/i.test(f)?f=f.substring(0,f.length-4)+".drawio":/(\.pdf)$/i.test(f)&&(f=f.substring(0,f.length-4)+".drawio");var y=mxUtils.bind(this,function(C){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==C.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,
-m);try{this.loadLibrary(new LocalLibrary(this,C,f))}catch(I){this.handleError(I,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(C,f,m)});if(/(\.v(dx|sdx?))($|\?)/i.test(f)||/(\.vs(x|sx?))($|\?)/i.test(f))this.importVisio(g,mxUtils.bind(this,function(C){this.spinner.stop();y(C)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(C){this.spinner.stop();y(C)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,f))this.isOffline()?
-(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(g,mxUtils.bind(this,function(C){4==C.readyState&&(this.spinner.stop(),200<=C.status&&299>=C.status?y(C.responseText):this.handleError({message:mxResources.get(413==C.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,
-function(C){this.spinner.stop();this.openLocalFile(C,f,m)}),mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}));else if("<mxlibrary"==d.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,m);try{this.loadLibrary(new LocalLibrary(this,d,g.name))}catch(C){this.handleError(C,mxResources.get("errorLoadingFile"))}}else if(0==d.indexOf("PK"))this.importZipFile(g,mxUtils.bind(this,function(C){this.spinner.stop();
-y(C)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,f,m)}));else{if("image/png"==g.type.substring(0,9))d=this.extractGraphModelFromPng(d);else if("application/pdf"==g.type){var F=Editor.extractGraphModelFromPdf(d);null!=F&&(q=null,m=!0,d=F)}this.spinner.stop();this.openLocalFile(d,f,m,q,null!=q?g:null)}}};EditorUi.prototype.openFiles=function(d,f){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var g=0;g<d.length;g++)mxUtils.bind(this,function(m){var q=
-new FileReader;q.onload=mxUtils.bind(this,function(y){try{this.openFileHandle(y.target.result,m.name,m,f)}catch(F){this.handleError(F)}});q.onerror=mxUtils.bind(this,function(y){this.spinner.stop();this.handleError(y);window.openFile=null});"image"!==m.type.substring(0,5)&&"application/pdf"!==m.type||"image/svg"===m.type.substring(0,9)?q.readAsText(m):q.readAsDataURL(m)})(d[g])};EditorUi.prototype.openLocalFile=function(d,f,g,m,q){var y=this.getCurrentFile(),F=mxUtils.bind(this,function(){window.openFile=
-null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var C=mxUtils.parseXml(d);null!=C&&(this.editor.setGraphXml(C.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,d,f||this.defaultFilename,g,m,q))});if(null!=d&&0<d.length)null==y||!y.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=m)?F():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=m)&&null!=y&&y.isModified()?this.confirm(mxResources.get("allChangesLost"),null,F,
-mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(d,f),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=y&&y.isModified()?this.confirm(mxResources.get("allChangesLost"),null,F,mxResources.get("cancel"),mxResources.get("discardChanges")):F()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var d={};if(null!=this.pages)for(var f=
-0;f<this.pages.length;f++)this.updatePageRoot(this.pages[f]),this.addBasenamesForCell(this.pages[f].root,d);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),d);f=[];for(var g in d)f.push(g);return f};EditorUi.prototype.addBasenamesForCell=function(d,f){function g(F){if(null!=F){var C=F.lastIndexOf(".");0<C&&(F=F.substring(C+1,F.length));null==f[F]&&(f[F]=!0)}}var m=this.editor.graph,q=m.getCellStyle(d);g(mxStencilRegistry.getBasenameForStencil(q[mxConstants.STYLE_SHAPE]));m.model.isEdge(d)&&
-(g(mxMarker.getPackageForType(q[mxConstants.STYLE_STARTARROW])),g(mxMarker.getPackageForType(q[mxConstants.STYLE_ENDARROW])));q=m.model.getChildCount(d);for(var y=0;y<q;y++)this.addBasenamesForCell(m.model.getChildAt(d,y),f)};EditorUi.prototype.setGraphEnabled=function(d){this.diagramContainer.style.visibility=d?"":"hidden";this.formatContainer.style.visibility=d?"":"hidden";this.sidebarFooterContainer.style.display=d?"":"none";this.sidebarContainer.style.display=d?"":"none";this.hsplit.style.display=
-d?"":"none";this.editor.graph.setEnabled(d);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=d?"":"hidden",this.ruler.vRuler.container.style.visibility=d?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=d?"":"hidden");d||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=
-this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var d=!1;this.installMessageHandler(mxUtils.bind(this,function(f,g,m,q){d||(d=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));
-if(null==f||0==f.length)f=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,f,{}));this.mode=App.MODE_EMBED;this.setFileData(f);if(q)try{var y=this.editor.graph;y.setGridEnabled(!1);y.pageVisible=!1;var F=y.model.cells,C;for(C in F){var I=F[C];null!=I&&null!=I.style&&(I.style+=";sketch=1;"+(-1==I.style.indexOf("fontFamily=")||-1<I.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":
-""))}}catch(G){console.log(G)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=m?m:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?
-this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(d,f){null!=d?d.getPublicUrl(f):f(null)};EditorUi.prototype.createLoadMessage=function(d){var f=this.editor.graph;return{event:d,pageVisible:f.pageVisible,translate:f.view.translate,bounds:f.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:f.view.scale,page:f.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(d){var f=this.editor.graph;
-f.isEditing()&&f.stopEditing(!f.isInvokesStopCellEditing());var g=window.opener||window.parent;if(this.editor.modified){var m=f.background;if(null==m||m==mxConstants.NONE)m=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),f,null,!0,mxUtils.bind(this,function(q){g.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=d?!d:!0,data:Editor.createSvgDataUri(q)}),"*")}),null,null,!0,m,1,this.embedExportBorder)}else d||
-g.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");d||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,f.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler=function(d){var f=null,g=!1,m=!1,q=null,y=mxUtils.bind(this,function(I,G){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,y);mxEvent.addListener(window,"message",mxUtils.bind(this,function(I){if(I.source==(window.opener||window.parent)){var G=I.data,Y=null,ba=mxUtils.bind(this,function(fa){if(null!=fa&&"function"===typeof fa.charAt&&"<"!=fa.charAt(0))try{Editor.isPngDataUrl(fa)?fa=Editor.extractGraphModelFromPng(fa):"data:image/svg+xml;base64,"==
-fa.substring(0,26)?fa=atob(fa.substring(26)):"data:image/svg+xml;utf8,"==fa.substring(0,24)&&(fa=fa.substring(24)),null!=fa&&("%"==fa.charAt(0)?fa=decodeURIComponent(fa):"<"!=fa.charAt(0)&&(fa=Graph.decompress(fa)))}catch(ra){}return fa});if("json"==urlParams.proto){var Z=!1;try{G=JSON.parse(G),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[I],"data",[G])}catch(fa){G=null}try{if(null==G)return;if("dialog"==G.action){this.showError(null!=G.titleKey?mxResources.get(G.titleKey):G.title,
-null!=G.messageKey?mxResources.get(G.messageKey):G.message,null!=G.buttonKey?mxResources.get(G.buttonKey):G.button);null!=G.modified&&(this.editor.modified=G.modified);return}if("layout"==G.action){this.executeLayouts(this.editor.graph.createLayouts(G.layouts));return}if("prompt"==G.action){this.spinner.stop();var X=new FilenameDialog(this,G.defaultValue||"",null!=G.okKey?mxResources.get(G.okKey):G.ok,function(fa){null!=fa?F.postMessage(JSON.stringify({event:"prompt",value:fa,message:G}),"*"):F.postMessage(JSON.stringify({event:"prompt-cancel",
-message:G}),"*")},null!=G.titleKey?mxResources.get(G.titleKey):G.title);this.showDialog(X.container,300,80,!0,!1);X.init();return}if("draft"==G.action){var qa=ba(G.xml);this.spinner.stop();X=new DraftDialog(this,mxResources.get("draftFound",[G.name||this.defaultFilename]),qa,mxUtils.bind(this,function(){this.hideDialog();F.postMessage(JSON.stringify({event:"draft",result:"edit",message:G}),"*")}),mxUtils.bind(this,function(){this.hideDialog();F.postMessage(JSON.stringify({event:"draft",result:"discard",
-message:G}),"*")}),G.editKey?mxResources.get(G.editKey):null,G.discardKey?mxResources.get(G.discardKey):null,G.ignore?mxUtils.bind(this,function(){this.hideDialog();F.postMessage(JSON.stringify({event:"draft",result:"ignore",message:G}),"*")}):null);this.showDialog(X.container,640,480,!0,!1,mxUtils.bind(this,function(fa){fa&&this.actions.get("exit").funct()}));try{X.init()}catch(fa){F.postMessage(JSON.stringify({event:"draft",error:fa.toString(),message:G}),"*")}return}if("template"==G.action){this.spinner.stop();
-var Q=1==G.enableRecent,W=1==G.enableSearch,ha=1==G.enableCustomTemp;if("1"==urlParams.newTempDlg&&!G.templatesOnly&&null!=G.callback){var la=this.getCurrentUser(),ja=new TemplatesDialog(this,function(fa,ra,ua){fa=fa||this.emptyDiagramXml;F.postMessage(JSON.stringify({event:"template",xml:fa,blank:fa==this.emptyDiagramXml,name:ra,tempUrl:ua.url,libs:ua.libs,builtIn:null!=ua.info&&null!=ua.info.custContentId,message:G}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,
-null!=la?la.id:null,Q?mxUtils.bind(this,function(fa,ra,ua){this.remoteInvoke("getRecentDiagrams",[ua],null,fa,ra)}):null,W?mxUtils.bind(this,function(fa,ra,ua,sa){this.remoteInvoke("searchDiagrams",[fa,sa],null,ra,ua)}):null,mxUtils.bind(this,function(fa,ra,ua){this.remoteInvoke("getFileContent",[fa.url],null,ra,ua)}),null,ha?mxUtils.bind(this,function(fa){this.remoteInvoke("getCustomTemplates",null,null,fa,function(){fa({},0)})}):null,!1,!1,!0,!0);this.showDialog(ja.container,window.innerWidth,window.innerHeight,
-!0,!1,null,!1,!0);return}X=new NewDialog(this,!1,G.templatesOnly?!1:null!=G.callback,mxUtils.bind(this,function(fa,ra,ua,sa){fa=fa||this.emptyDiagramXml;null!=G.callback?F.postMessage(JSON.stringify({event:"template",xml:fa,blank:fa==this.emptyDiagramXml,name:ra,tempUrl:ua,libs:sa,builtIn:!0,message:G}),"*"):(d(fa,I,fa!=this.emptyDiagramXml,G.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,Q?mxUtils.bind(this,function(fa){this.remoteInvoke("getRecentDiagrams",
-[null],null,fa,function(){fa(null,"Network Error!")})}):null,W?mxUtils.bind(this,function(fa,ra){this.remoteInvoke("searchDiagrams",[fa,null],null,ra,function(){ra(null,"Network Error!")})}):null,mxUtils.bind(this,function(fa,ra,ua){F.postMessage(JSON.stringify({event:"template",docUrl:fa,info:ra,name:ua}),"*")}),null,null,ha?mxUtils.bind(this,function(fa){this.remoteInvoke("getCustomTemplates",null,null,fa,function(){fa({},0)})}):null,1==G.withoutType);this.showDialog(X.container,620,460,!0,!1,mxUtils.bind(this,
-function(fa){this.sidebar.hideTooltip();fa&&this.actions.get("exit").funct()}));X.init();return}if("textContent"==G.action){var U=this.getDiagramTextContent();F.postMessage(JSON.stringify({event:"textContent",data:U,message:G}),"*");return}if("status"==G.action){null!=G.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(G.messageKey))):null!=G.message&&this.editor.setStatus(mxUtils.htmlEntities(G.message));null!=G.modified&&(this.editor.modified=G.modified);return}if("spinner"==
-G.action){var L=null!=G.messageKey?mxResources.get(G.messageKey):G.message;null==G.show||G.show?this.spinner.spin(document.body,L):this.spinner.stop();return}if("exit"==G.action){this.actions.get("exit").funct();return}if("viewport"==G.action){null!=G.viewport&&(this.embedViewport=G.viewport);return}if("snapshot"==G.action){this.sendEmbeddedSvgExport(!0);return}if("export"==G.action){if("png"==G.format||"xmlpng"==G.format){if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?
-mxResources.get(G.spinKey):G.spin)){var da=null!=G.xml?G.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var O=this.editor.graph,N=mxUtils.bind(this,function(fa){this.editor.graph.setEnabled(!0);this.spinner.stop();var ra=this.createLoadMessage("export");ra.format=G.format;ra.message=G;ra.data=fa;ra.xml=da;F.postMessage(JSON.stringify(ra),"*")}),aa=mxUtils.bind(this,function(fa){null==fa&&(fa=Editor.blankImage);"xmlpng"==G.format&&(fa=Editor.writeGraphModelToPng(fa,"tEXt","mxfile",encodeURIComponent(da)));
-O!=this.editor.graph&&O.container.parentNode.removeChild(O.container);N(fa)}),ma=G.pageId||(null!=this.pages?G.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var u=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=ma){var fa=O.getGlobalVariable;O=this.createTemporaryGraph(O.getStylesheet());for(var ra,ua=0;ua<this.pages.length;ua++)if(this.pages[ua].getId()==ma){ra=this.updatePageRoot(this.pages[ua]);break}null==ra&&(ra=this.currentPage);
-O.getGlobalVariable=function(Ba){return"page"==Ba?ra.getName():"pagenumber"==Ba?1:fa.apply(this,arguments)};document.body.appendChild(O.container);O.model.setRoot(ra.root)}if(null!=G.layerIds){var sa=O.model,Aa=sa.getChildCells(sa.getRoot()),Ca={};for(ua=0;ua<G.layerIds.length;ua++)Ca[G.layerIds[ua]]=!0;for(ua=0;ua<Aa.length;ua++)sa.setVisible(Aa[ua],Ca[Aa[ua].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(Ba){aa(Ba.toDataURL("image/png"))}),G.width,null,G.background,mxUtils.bind(this,
-function(){aa(null)}),null,null,G.scale,G.transparent,G.shadow,null,O,G.border,null,G.grid,G.keepTheme)});null!=G.xml&&0<G.xml.length&&(g=!0,this.setFileData(da),g=!1);u()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==G.format?"1":"0")+(null!=ma?"&pageId="+ma:"")+(null!=G.layerIds&&0<G.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:G.layerIds})):"")+(null!=G.scale?"&scale="+G.scale:"")+"&base64=1&xml="+encodeURIComponent(da))).send(mxUtils.bind(this,function(fa){200<=
-fa.getStatus()&&299>=fa.getStatus()?N("data:image/png;base64,"+fa.getText()):aa(null)}),mxUtils.bind(this,function(){aa(null)}))}}else if(u=mxUtils.bind(this,function(){var fa=this.createLoadMessage("export");fa.message=G;if("html2"==G.format||"html"==G.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ra=this.getXmlFileData();fa.xml=mxUtils.getXml(ra);fa.data=this.getFileData(null,null,!0,null,null,null,ra);fa.format=G.format}else if("html"==G.format)ra=this.editor.getGraphXml(),
-fa.data=this.getHtml(ra,this.editor.graph),fa.xml=mxUtils.getXml(ra),fa.format=G.format;else{mxSvgCanvas2D.prototype.foAltText=null;ra=null!=G.background?G.background:this.editor.graph.background;ra==mxConstants.NONE&&(ra=null);fa.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);fa.format="svg";var ua=mxUtils.bind(this,function(sa){this.editor.graph.setEnabled(!0);this.spinner.stop();fa.data=Editor.createSvgDataUri(sa);F.postMessage(JSON.stringify(fa),"*")});if("xmlsvg"==G.format)(null==
-G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin))&&this.getEmbeddedSvg(fa.xml,this.editor.graph,null,!0,ua,null,null,G.embedImages,ra,G.scale,G.border,G.shadow,G.keepTheme);else if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin))this.editor.graph.setEnabled(!1),ra=this.editor.graph.getSvg(ra,G.scale,G.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||G.shadow,
-null,G.keepTheme),(this.editor.graph.shadowVisible||G.shadow)&&this.editor.graph.addSvgShadow(ra),this.embedFonts(ra,mxUtils.bind(this,function(sa){G.embedImages||null==G.embedImages?this.editor.convertImages(sa,mxUtils.bind(this,function(Aa){ua(mxUtils.getXml(Aa))})):ua(mxUtils.getXml(sa))}));return}F.postMessage(JSON.stringify(fa),"*")}),null!=G.xml&&0<G.xml.length){if(this.editor.graph.mathEnabled){var H=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){H.apply(this,arguments);u()}}g=!0;this.setFileData(G.xml);
-g=!1;this.editor.graph.mathEnabled||u()}else u();return}if("load"==G.action){Z=G.toSketch;m=1==G.autosave;this.hideDialog();null!=G.modified&&null==urlParams.modified&&(urlParams.modified=G.modified);null!=G.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=G.saveAndExit);null!=G.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=G.noSaveBtn);if(null!=G.rough){var P=Editor.sketchMode;this.doSetSketchMode(G.rough);P!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=
-G.dark&&(P=Editor.darkMode,this.doSetDarkMode(G.dark),P!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));null!=G.border&&(this.embedExportBorder=G.border);null!=G.background&&(this.embedExportBackground=G.background);null!=G.viewport&&(this.embedViewport=G.viewport);this.embedExitPoint=null;if(null!=G.rect){var S=this.embedExportBorder;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.top=G.rect.top+"px";this.diagramContainer.style.left=G.rect.left+
-"px";this.diagramContainer.style.height=G.rect.height+"px";this.diagramContainer.style.width=G.rect.width+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";Y=mxUtils.bind(this,function(){var fa=this.editor.graph,ra=fa.maxFitScale;fa.maxFitScale=G.maxFitScale;fa.fit(2*S);fa.maxFitScale=ra;fa.container.scrollTop-=2*S;fa.container.scrollLeft-=2*S;this.fireEvent(new mxEventObject("editInlineStart","data",[G]))})}null!=G.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=
-G.noExitBtn);null!=G.title&&null!=this.buttonContainer&&(qa=document.createElement("span"),mxUtils.write(qa,G.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(qa),this.embedFilenameSpan=qa);try{G.libs&&this.sidebar.showEntries(G.libs)}catch(fa){}G=null!=G.xmlpng?this.extractGraphModelFromPng(G.xmlpng):null!=G.descriptor?G.descriptor:G.xml}else{if("merge"==G.action){var R=this.getCurrentFile();null!=R&&(qa=ba(G.xml),
-null!=qa&&""!=qa&&R.mergeFile(new LocalFile(this,qa),function(){F.postMessage(JSON.stringify({event:"merge",message:G}),"*")},function(fa){F.postMessage(JSON.stringify({event:"merge",message:G,error:fa}),"*")}))}else"remoteInvokeReady"==G.action?this.handleRemoteInvokeReady(F):"remoteInvoke"==G.action?this.handleRemoteInvoke(G,I.origin):"remoteInvokeResponse"==G.action?this.handleRemoteInvokeResponse(G):F.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(G)}),"*");return}}catch(fa){this.handleError(fa)}}var ca=
-mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),ea=mxUtils.bind(this,function(fa,ra){g=!0;try{d(fa,ra,null,Z)}catch(ua){this.handleError(ua)}g=!1;null!=urlParams.modified&&this.editor.setStatus("");q=ca();m&&null==f&&(f=mxUtils.bind(this,function(ua,sa){ua=ca();ua==q||g||(sa=this.createLoadMessage("autosave"),sa.xml=ua,(window.opener||window.parent).postMessage(JSON.stringify(sa),"*"));
-q=ua}),this.editor.graph.model.addListener(mxEvent.CHANGE,f),this.editor.graph.addListener("gridSizeChanged",f),this.editor.graph.addListener("shadowVisibleChanged",f),this.addListener("pageFormatChanged",f),this.addListener("pageScaleChanged",f),this.addListener("backgroundColorChanged",f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",
-f),this.addListener("pageViewChanged",f));if("1"==urlParams.returnbounds||"json"==urlParams.proto)ra=this.createLoadMessage("load"),ra.xml=fa,F.postMessage(JSON.stringify(ra),"*");null!=Y&&Y()});null!=G&&"function"===typeof G.substring&&"data:application/vnd.visio;base64,"==G.substring(0,34)?(ba="0M8R4KGxGuE"==G.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(G.substring(G.indexOf(",")+1)),function(fa){ea(fa,I)},mxUtils.bind(this,function(fa){this.handleError(fa)}),ba)):null!=
-G&&"function"===typeof G.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(G,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(G,mxUtils.bind(this,function(fa){4==fa.readyState&&200<=fa.status&&299>=fa.status&&"<mxGraphModel"==fa.responseText.substring(0,13)&&ea(fa.responseText,I)}),""):null!=G&&"function"===typeof G.substring&&this.isLucidChartData(G)?this.convertLucidChart(G,mxUtils.bind(this,function(fa){ea(fa)}),mxUtils.bind(this,
-function(fa){this.handleError(fa)})):null==G||"object"!==typeof G||null==G.format||null==G.data&&null==G.url?(G=ba(G),ea(G,I)):this.loadDescriptor(G,mxUtils.bind(this,function(fa){ea(ca(),I)}),mxUtils.bind(this,function(fa){this.handleError(fa,mxResources.get("errorLoadingFile"))}))}}));var F=window.opener||window.parent;y="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";F.postMessage(y,"*");if("json"==urlParams.proto){var C=this.editor.graph.openLink;this.editor.graph.openLink=
-function(I,G,Y){C.apply(this,arguments);F.postMessage(JSON.stringify({event:"openLink",href:I,target:G,allowOpener:Y}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar&&"1"!=urlParams.embedInline){var d=document.createElement("div");d.style.display="inline-block";d.style.position="absolute";d.style.paddingTop="atlas"==uiTheme||"1"==urlParams.atlas?"2px":"0px";d.style.paddingLeft="8px";d.style.paddingBottom="2px";var f=document.createElement("button");f.className="geBigButton";
-var g=f;if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var m="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(f,m);f.setAttribute("title",m);mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));d.appendChild(f)}}else mxUtils.write(f,mxResources.get("save")),f.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),
-d.appendChild(f),"1"==urlParams.saveAndExit&&(f=document.createElement("a"),mxUtils.write(f,mxResources.get("saveAndExit")),f.setAttribute("title",mxResources.get("saveAndExit")),f.className="geBigButton geBigStandardButton",f.style.marginLeft="6px",mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),d.appendChild(f),g=f);"1"!=urlParams.noExitBtn&&(f=document.createElement("a"),g="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),
-mxUtils.write(f,g),f.setAttribute("title",g),f.className="geBigButton geBigStandardButton",f.style.marginLeft="6px",mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),d.appendChild(f),g=f);g.style.marginRight="20px";this.toolbar.container.appendChild(d);this.toolbar.staticElements.push(d);d.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(d){this.importCsv(d)}),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.loadOrgChartLayouts=function(d){var f=mxUtils.bind(this,function(){this.loadingOrgChart=!1;this.spinner.stop();d()});
-"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?f():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.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",f)})})}):mxscript(DRAWIO_BASE_URL+"/js/orgchart.min.js",f))};EditorUi.prototype.importCsv=function(d,f){this.loadOrgChartLayouts(mxUtils.bind(this,
-function(){this.doImportCsv(d,f)}))};EditorUi.prototype.doImportCsv=function(d,f){try{var g=d.split("\n"),m=[],q=[],y=[],F={};if(0<g.length){var C={},I=this.editor.graph,G=null,Y=null,ba=null,Z=null,X=null,qa=null,Q=null,W="whiteSpace=wrap;html=1;",ha=null,la=null,ja="",U="auto",L="auto",da=!1,O=null,N=null,aa=40,ma=40,u=100,H=0,P=function(){null!=f?f(va):(I.setSelectionCells(va),I.scrollCellToVisible(I.getSelectionCell()))},S=I.getFreeInsertPoint(),R=S.x,ca=S.y;S=ca;var ea=null,fa="auto";la=null;
-for(var ra=[],ua=null,sa=null,Aa=0;Aa<g.length&&"#"==g[Aa].charAt(0);){d=g[Aa].replace(/\r$/,"");for(Aa++;Aa<g.length&&"\\"==d.charAt(d.length-1)&&"#"==g[Aa].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(g[Aa].substring(1)),Aa++;if("#"!=d.charAt(1)){var Ca=d.indexOf(":");if(0<Ca){var Ba=mxUtils.trim(d.substring(1,Ca)),ta=mxUtils.trim(d.substring(Ca+1));"label"==Ba?ea=I.sanitizeHtml(ta):"labelname"==Ba&&0<ta.length&&"-"!=ta?X=ta:"labels"==Ba&&0<ta.length&&"-"!=ta?Q=JSON.parse(ta):"style"==Ba?
-Y=ta:"parentstyle"==Ba?W=ta:"unknownStyle"==Ba&&"-"!=ta?qa=ta:"stylename"==Ba&&0<ta.length&&"-"!=ta?Z=ta:"styles"==Ba&&0<ta.length&&"-"!=ta?ba=JSON.parse(ta):"vars"==Ba&&0<ta.length&&"-"!=ta?G=JSON.parse(ta):"identity"==Ba&&0<ta.length&&"-"!=ta?ha=ta:"parent"==Ba&&0<ta.length&&"-"!=ta?la=ta:"namespace"==Ba&&0<ta.length&&"-"!=ta?ja=ta:"width"==Ba?U=ta:"height"==Ba?L=ta:"collapsed"==Ba&&"-"!=ta?da="true"==ta:"left"==Ba&&0<ta.length?O=ta:"top"==Ba&&0<ta.length?N=ta:"ignore"==Ba?sa=ta.split(","):"connect"==
-Ba?ra.push(JSON.parse(ta)):"link"==Ba?ua=ta:"padding"==Ba?H=parseFloat(ta):"edgespacing"==Ba?aa=parseFloat(ta):"nodespacing"==Ba?ma=parseFloat(ta):"levelspacing"==Ba?u=parseFloat(ta):"layout"==Ba&&(fa=ta)}}}if(null==g[Aa])throw Error(mxResources.get("invalidOrMissingFile"));var Pa=this.editor.csvToArray(g[Aa].replace(/\r$/,""));Ca=d=null;Ba=[];for(ta=0;ta<Pa.length;ta++)ha==Pa[ta]&&(d=ta),la==Pa[ta]&&(Ca=ta),Ba.push(mxUtils.trim(Pa[ta]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,
-""));null==ea&&(ea="%"+Ba[0]+"%");if(null!=ra)for(var Ta=0;Ta<ra.length;Ta++)null==C[ra[Ta].to]&&(C[ra[Ta].to]={});ha=[];for(ta=Aa+1;ta<g.length;ta++){var Oa=this.editor.csvToArray(g[ta].replace(/\r$/,""));if(null==Oa){var Xa=40<g[ta].length?g[ta].substring(0,40)+"...":g[ta];throw Error(Xa+" ("+ta+"):\n"+mxResources.get("containsValidationErrors"));}0<Oa.length&&ha.push(Oa)}I.model.beginUpdate();try{for(ta=0;ta<ha.length;ta++){Oa=ha[ta];var Ga=null,eb=null!=d?ja+Oa[d]:null;g=!1;null!=eb&&(Ga=I.model.getCell(eb),
-g=null==Ga||0<=mxUtils.indexOf(m,Ga));var bb=new mxCell(ea,new mxGeometry(R,S,0,0),Y||"whiteSpace=wrap;html=1;");bb.collapsed=da;bb.vertex=!0;bb.id=eb;null==Ga||g||I.model.setCollapsed(Ga,da);for(var z=0;z<Oa.length;z++)I.setAttributeForCell(bb,Ba[z],Oa[z]),null==Ga||g||I.setAttributeForCell(Ga,Ba[z],Oa[z]);if(null!=X&&null!=Q){var K=Q[bb.getAttribute(X)];null!=K&&(I.labelChanged(bb,K),null==Ga||g||I.cellLabelChanged(Ga,K))}if(null!=Z&&null!=ba){var M=ba[bb.getAttribute(Z)];null!=M&&(bb.style=M)}I.setAttributeForCell(bb,
-"placeholders","1");bb.style=I.replacePlaceholders(bb,bb.style,G);null==Ga||g?I.fireEvent(new mxEventObject("cellsInserted","cells",[bb])):(I.model.setStyle(Ga,bb.style),0>mxUtils.indexOf(y,Ga)&&y.push(Ga),I.fireEvent(new mxEventObject("cellsInserted","cells",[Ga])));g=null!=Ga;Ga=bb;if(!g)for(Ta=0;Ta<ra.length;Ta++)C[ra[Ta].to][Ga.getAttribute(ra[Ta].to)]=Ga;null!=ua&&"link"!=ua&&(I.setLinkForCell(Ga,Ga.getAttribute(ua)),I.setAttributeForCell(Ga,ua,null));var T=this.editor.graph.getPreferredSizeForCell(Ga);
-la=null!=Ca?I.model.getCell(ja+Oa[Ca]):null;if(Ga.vertex){Xa=null!=la?0:R;Aa=null!=la?0:ca;null!=O&&null!=Ga.getAttribute(O)&&(Ga.geometry.x=Xa+parseFloat(Ga.getAttribute(O)));null!=N&&null!=Ga.getAttribute(N)&&(Ga.geometry.y=Aa+parseFloat(Ga.getAttribute(N)));var V="@"==U.charAt(0)?Ga.getAttribute(U.substring(1)):null;Ga.geometry.width=null!=V&&"auto"!=V?parseFloat(Ga.getAttribute(U.substring(1))):"auto"==U||"auto"==V?T.width+H:parseFloat(U);var ia="@"==L.charAt(0)?Ga.getAttribute(L.substring(1)):
-null;Ga.geometry.height=null!=ia&&"auto"!=ia?parseFloat(ia):"auto"==L||"auto"==ia?T.height+H:parseFloat(L);S+=Ga.geometry.height+ma}g?(null==F[eb]&&(F[eb]=[]),F[eb].push(Ga)):(m.push(Ga),null!=la?(la.style=I.replacePlaceholders(la,W,G),I.addCell(Ga,la),q.push(la)):y.push(I.addCell(Ga)))}for(ta=0;ta<q.length;ta++)V="@"==U.charAt(0)?q[ta].getAttribute(U.substring(1)):null,ia="@"==L.charAt(0)?q[ta].getAttribute(L.substring(1)):null,"auto"!=U&&"auto"!=V||"auto"!=L&&"auto"!=ia||I.updateGroupBounds([q[ta]],
-H,!0);var na=y.slice(),va=y.slice();for(Ta=0;Ta<ra.length;Ta++){var pa=ra[Ta];for(ta=0;ta<m.length;ta++){Ga=m[ta];var za=mxUtils.bind(this,function(Za,cb,fb){var qb=cb.getAttribute(fb.from);if(null!=qb&&""!=qb){qb=qb.split(",");for(var ub=0;ub<qb.length;ub++){var ab=C[fb.to][qb[ub]];if(null==ab&&null!=qa){ab=new mxCell(qb[ub],new mxGeometry(R,ca,0,0),qa);ab.style=I.replacePlaceholders(cb,ab.style,G);var db=this.editor.graph.getPreferredSizeForCell(ab);ab.geometry.width=db.width+H;ab.geometry.height=
-db.height+H;C[fb.to][qb[ub]]=ab;ab.vertex=!0;ab.id=qb[ub];y.push(I.addCell(ab))}if(null!=ab){db=fb.label;null!=fb.fromlabel&&(db=(cb.getAttribute(fb.fromlabel)||"")+(db||""));null!=fb.sourcelabel&&(db=I.replacePlaceholders(cb,fb.sourcelabel,G)+(db||""));null!=fb.tolabel&&(db=(db||"")+(ab.getAttribute(fb.tolabel)||""));null!=fb.targetlabel&&(db=(db||"")+I.replacePlaceholders(ab,fb.targetlabel,G));var kb="target"==fb.placeholders==!fb.invert?ab:Za;kb=null!=fb.style?I.replacePlaceholders(kb,fb.style,
-G):I.createCurrentEdgeStyle();db=I.insertEdge(null,null,db||"",fb.invert?ab:Za,fb.invert?Za:ab,kb);if(null!=fb.labels)for(kb=0;kb<fb.labels.length;kb++){var ib=fb.labels[kb],ob=new mxCell(ib.label||kb,new mxGeometry(null!=ib.x?ib.x:0,null!=ib.y?ib.y:0,0,0),"resizable=0;html=1;");ob.vertex=!0;ob.connectable=!1;ob.geometry.relative=!0;null!=ib.placeholders&&(ob.value=I.replacePlaceholders("target"==ib.placeholders==!fb.invert?ab:Za,ob.value,G));if(null!=ib.dx||null!=ib.dy)ob.geometry.offset=new mxPoint(null!=
-ib.dx?ib.dx:0,null!=ib.dy?ib.dy:0);db.insert(ob)}va.push(db);mxUtils.remove(fb.invert?Za:ab,na)}}}});za(Ga,Ga,pa);if(null!=F[Ga.id])for(z=0;z<F[Ga.id].length;z++)za(Ga,F[Ga.id][z],pa)}}if(null!=sa)for(ta=0;ta<m.length;ta++)for(Ga=m[ta],z=0;z<sa.length;z++)I.setAttributeForCell(Ga,mxUtils.trim(sa[z]),null);if(0<y.length){var Da=new mxParallelEdgeLayout(I);Da.spacing=aa;Da.checkOverlap=!0;var Ma=function(){0<Da.spacing&&Da.execute(I.getDefaultParent());for(var Za=0;Za<y.length;Za++){var cb=I.getCellGeometry(y[Za]);
-cb.x=Math.round(I.snap(cb.x));cb.y=Math.round(I.snap(cb.y));"auto"==U&&(cb.width=Math.round(I.snap(cb.width)));"auto"==L&&(cb.height=Math.round(I.snap(cb.height)))}};if("["==fa.charAt(0)){var La=P;I.view.validate();this.executeLayouts(I.createLayouts(JSON.parse(fa)),function(){Ma();La()});P=null}else if("circle"==fa){var Ua=new mxCircleLayout(I);Ua.disableEdgeStyle=!1;Ua.resetEdges=!1;var Sa=Ua.isVertexIgnored;Ua.isVertexIgnored=function(Za){return Sa.apply(this,arguments)||0>mxUtils.indexOf(y,Za)};
-this.executeLayout(function(){Ua.execute(I.getDefaultParent());Ma()},!0,P);P=null}else if("horizontaltree"==fa||"verticaltree"==fa||"auto"==fa&&va.length==2*y.length-1&&1==na.length){I.view.validate();var Fa=new mxCompactTreeLayout(I,"horizontaltree"==fa);Fa.levelDistance=ma;Fa.edgeRouting=!1;Fa.resetEdges=!1;this.executeLayout(function(){Fa.execute(I.getDefaultParent(),0<na.length?na[0]:null)},!0,P);P=null}else if("horizontalflow"==fa||"verticalflow"==fa||"auto"==fa&&1==na.length){I.view.validate();
-var wa=new mxHierarchicalLayout(I,"horizontalflow"==fa?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);wa.intraCellSpacing=ma;wa.parallelEdgeSpacing=aa;wa.interRankCellSpacing=u;wa.disableEdgeStyle=!1;this.executeLayout(function(){wa.execute(I.getDefaultParent(),va);I.moveCells(va,R,ca)},!0,P);P=null}else if("orgchart"==fa){I.view.validate();var ya=new mxOrgChartLayout(I,2,u,ma),Na=ya.isVertexIgnored;ya.isVertexIgnored=function(Za){return Na.apply(this,arguments)||0>mxUtils.indexOf(y,Za)};
-this.executeLayout(function(){ya.execute(I.getDefaultParent());Ma()},!0,P);P=null}else if("organic"==fa||"auto"==fa&&va.length>y.length){I.view.validate();var Ja=new mxFastOrganicLayout(I);Ja.forceConstant=3*ma;Ja.disableEdgeStyle=!1;Ja.resetEdges=!1;var Qa=Ja.isVertexIgnored;Ja.isVertexIgnored=function(Za){return Qa.apply(this,arguments)||0>mxUtils.indexOf(y,Za)};this.executeLayout(function(){Ja.execute(I.getDefaultParent());Ma()},!0,P);P=null}}this.hideDialog()}finally{I.model.endUpdate()}null!=
-P&&P()}}catch(Za){this.handleError(Za)}};EditorUi.prototype.getSearch=function(d){var f="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=d&&0<window.location.search.length){var g="?",m;for(m in urlParams)0>mxUtils.indexOf(d,m)&&null!=urlParams[m]&&(f+=g+m+"="+urlParams[m],g="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(d){d=null!=d?d:window.location.pathname;var f=0<d.indexOf("?")?1:0;if("1"==urlParams.offline)d+=window.location.search;else{var g="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
-m;for(m in urlParams)0>mxUtils.indexOf(g,m)&&(d=0==f?d+"?":d+"&",null!=urlParams[m]&&(d+=m+"="+urlParams[m],f++))}return d};EditorUi.prototype.showLinkDialog=function(d,f,g,m,q){d=new LinkDialog(this,d,f,g,!0,m,q);this.showDialog(d.container,560,130,!0,!0);d.init()};EditorUi.prototype.getServiceCount=function(d){var f=1;null==this.drive&&"function"!==typeof window.DriveClient||f++;null==this.dropbox&&"function"!==typeof window.DropboxClient||f++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||
-f++;null!=this.gitHub&&f++;null!=this.gitLab&&f++;d&&isLocalStorage&&"1"==urlParams.browser&&f++;return f};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var d=this.getCurrentFile(),f=null!=d||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(f);this.menus.get("viewZoom").setEnabled(f);var g=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==d||d.isRestricted());this.actions.get("makeCopy").setEnabled(!g);
-this.actions.get("print").setEnabled(!g);this.menus.get("exportAs").setEnabled(!g);this.menus.get("embed").setEnabled(!g);g="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(g);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(g),this.menus.get("newLibrary").setEnabled(g));d="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=d&&d.isEditable();this.actions.get("image").setEnabled(f);this.actions.get("zoomIn").setEnabled(f);this.actions.get("zoomOut").setEnabled(f);
-this.actions.get("resetView").setEnabled(f);this.actions.get("undo").setEnabled(this.canUndo()&&d);this.actions.get("redo").setEnabled(this.canRedo()&&d);this.menus.get("edit").setEnabled(f);this.menus.get("view").setEnabled(f);this.menus.get("importFrom").setEnabled(d);this.menus.get("arrange").setEnabled(d);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(d),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(d));this.updateUserElement()};
-EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var d=this.getCurrentFile();return null!=d&&d.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var t=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){t.apply(this,arguments);var d=this.editor.graph,
-f=this.getCurrentFile(),g=this.getSelectionState(),m=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(m);this.actions.get("autosave").setEnabled(null!=f&&f.isEditable()&&f.isAutosaveOptional());this.actions.get("guides").setEnabled(m);this.actions.get("editData").setEnabled(d.isEnabled());this.actions.get("shadowVisible").setEnabled(m);this.actions.get("connectionArrows").setEnabled(m);this.actions.get("connectionPoints").setEnabled(m);this.actions.get("copyStyle").setEnabled(m&&!d.isSelectionEmpty());
-this.actions.get("pasteStyle").setEnabled(m&&0<g.cells.length);this.actions.get("editGeometry").setEnabled(0<g.vertices.length);this.actions.get("createShape").setEnabled(m);this.actions.get("createRevision").setEnabled(m);this.actions.get("moveToFolder").setEnabled(null!=f);this.actions.get("makeCopy").setEnabled(null!=f&&!f.isRestricted());this.actions.get("editDiagram").setEnabled(m&&(null==f||!f.isRestricted()));this.actions.get("publishLink").setEnabled(null!=f&&!f.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!=f&&f.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=f);this.menus.get("publish").setEnabled(null!=f&&!f.isRestricted());f=this.actions.get("findReplace");f.setEnabled("hidden"!=this.diagramContainer.style.visibility);
-f.label=mxResources.get("find")+(d.isEnabled()?"/"+mxResources.get("replace"):"")+"...";d=d.view.getState(d.getSelectionCell());this.actions.get("editShape").setEnabled(m&&null!=d&&null!=d.shape&&null!=d.shape.stencil)};var E=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);E.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=
-!1,ExportDialog.exportFile=function(d,f,g,m,q,y,F,C){var I=d.editor.graph;if("xml"==g)d.hideDialog(),d.saveData(f,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");else if("svg"==g)d.hideDialog(),d.saveData(f,"svg",mxUtils.getXml(I.getSvg(m,q,y)),"image/svg+xml");else{var G=d.getFileData(!0,null,null,null,null,!0),Y=I.getGraphBounds(),ba=Math.floor(Y.width*q/I.view.scale),Z=Math.floor(Y.height*q/I.view.scale);if(G.length<=MAX_REQUEST_SIZE&&ba*Z<MAX_AREA)if(d.hideDialog(),"png"!=g&&"jpg"!=g&&
-"jpeg"!=g||!d.isExportToCanvas()){var X={globalVars:I.getExportVariables()};C&&(X.grid={size:I.gridSize,steps:I.view.gridSteps,color:I.view.gridColor});d.saveRequest(f,g,function(qa,Q){return new mxXmlRequest(EXPORT_URL,"format="+g+"&base64="+(Q||"0")+(null!=qa?"&filename="+encodeURIComponent(qa):"")+"&extras="+encodeURIComponent(JSON.stringify(X))+(0<F?"&dpi="+F:"")+"&bg="+(null!=m?m:"none")+"&w="+ba+"&h="+Z+"&border="+y+"&xml="+encodeURIComponent(G))})}else"png"==g?d.exportImage(q,null==m||"none"==
-m,!0,!1,!1,y,!0,!1,null,C,F):d.exportImage(q,!1,!0,!1,!1,y,!0,!1,"jpeg",C);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var d=this.editor.graph,f="";if(null!=this.pages)for(var g=0;g<this.pages.length;g++){var m=d;this.currentPage!=this.pages[g]&&(m=this.createTemporaryGraph(d.getStylesheet()),this.updatePageRoot(this.pages[g]),m.model.setRoot(this.pages[g].root));f+=this.pages[g].getName()+" "+m.getIndexableText()+
-" "}else f=d.getIndexableText();this.editor.graph.setEnabled(!0);return f};EditorUi.prototype.showRemotelyStoredLibrary=function(d){var f={},g=document.createElement("div");g.style.whiteSpace="nowrap";var m=document.createElement("h3");mxUtils.write(m,mxUtils.htmlEntities(d));m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(m);var q=document.createElement("div");q.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";q.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+
-IMAGE_PATH+'/spin.gif"></div>';var y={};try{var F=mxSettings.getCustomLibraries();for(d=0;d<F.length;d++){var C=F[d];if("R"==C.substring(0,1)){var I=JSON.parse(decodeURIComponent(C.substring(1)));y[I[0]]={id:I[0],title:I[1],downloadUrl:I[2]}}}}catch(G){}this.remoteInvoke("getCustomLibraries",null,null,function(G){q.innerText="";if(0==G.length)q.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var Y=0;Y<
-G.length;Y++){var ba=G[Y];y[ba.id]&&(f[ba.id]=ba);var Z=this.addCheckbox(q,ba.title,y[ba.id]);(function(X,qa){mxEvent.addListener(qa,"change",function(){this.checked?f[X.id]=X:delete f[X.id]})})(ba,Z)}},mxUtils.bind(this,function(G){q.innerText="";var Y=document.createElement("div");Y.style.padding="8px";Y.style.textAlign="center";mxUtils.write(Y,mxResources.get("error")+": ");mxUtils.write(Y,null!=G&&null!=G.message?G.message:mxResources.get("unknownError"));q.appendChild(Y)}));g.appendChild(q);
-g=new CustomDialog(this,g,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var G=0,Y;for(Y in f)null==y[Y]&&(G++,mxUtils.bind(this,function(ba){this.remoteInvoke("getFileContent",[ba.downloadUrl],null,mxUtils.bind(this,function(Z){G--;0==G&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,Z,ba))}catch(X){this.handleError(X,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){G--;0==G&&this.spinner.stop();this.handleError(null,
-mxResources.get("errorLoadingFile"))}))})(f[Y]));for(Y in y)f[Y]||this.closeLibrary(new RemoteLibrary(this,null,y[Y]));0==G&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(g.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(d){this.remoteWin=d;for(var f=0;f<this.remoteInvokeQueue.length;f++)d.postMessage(this.remoteInvokeQueue[f],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(d){var f=d.msgMarkers,g=this.remoteInvokeCallbacks[f.callbackId];if(null==g)throw Error("No callback for "+
-(null!=f?f.callbackId:"null"));d.error?g.error&&g.error(d.error.errResp):g.callback&&g.callback.apply(this,d.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,f,g,m,q){var y=!0,F=window.setTimeout(mxUtils.bind(this,function(){y=!1;q({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),C=mxUtils.bind(this,function(){window.clearTimeout(F);y&&m.apply(this,arguments)}),I=mxUtils.bind(this,function(){window.clearTimeout(F);y&&q.apply(this,
-arguments)});g=g||{};g.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:C,error:I});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:f,msgMarkers:g});null!=this.remoteWin?this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,f){var g=mxUtils.bind(this,function(G,Y){var ba={event:"remoteInvokeResponse",msgMarkers:d.msgMarkers};null!=Y?ba.error={errResp:Y}:null!=G&&(ba.resp=G);this.remoteWin.postMessage(JSON.stringify(ba),
-"*")});try{var m=d.funtionName,q=this.remoteInvokableFns[m];if(null!=q&&"function"===typeof this[m]){if(q.allowedDomains){for(var y=!1,F=0;F<q.allowedDomains.length;F++)if(f=="https://"+q.allowedDomains[F]){y=!0;break}if(!y){g(null,"Invalid Call: "+m+" is not allowed.");return}}var C=d.functionArgs;Array.isArray(C)||(C=[]);if(q.isAsync)C.push(function(){g(Array.prototype.slice.apply(arguments))}),C.push(function(G){g(null,G||"Unkown Error")}),this[m].apply(this,C);else{var I=this[m].apply(this,C);
-g([I])}}else g(null,"Invalid Call: "+m+" is not found.")}catch(G){g(null,"Invalid Call: An error occurred, "+G.message)}};EditorUi.prototype.openDatabase=function(d,f){if(null==this.database){var g=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=g)try{var m=g.open("database",2);m.onupgradeneeded=function(q){try{var y=m.result;1>q.oldVersion&&y.createObjectStore("objects",{keyPath:"key"});2>q.oldVersion&&(y.createObjectStore("files",{keyPath:"title"}),y.createObjectStore("filesInfo",
-{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(F){null!=f&&f(F)}};m.onsuccess=mxUtils.bind(this,function(q){var y=m.result;this.database=y;EditorUi.migrateStorageFiles&&(StorageFile.migrate(y),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(F){if(!F||"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 I=!0,G=!1,Y,ba=0,Z=mxUtils.bind(this,function(){G=!0;this.setDatabaseItem(".drawioMigrated3",!0);C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),X=mxUtils.bind(this,function(){ba++;qa()}),qa=mxUtils.bind(this,function(){try{if(ba>=Y.length)Z();else{var W=Y[ba];StorageFile.getFileContent(this,W,mxUtils.bind(this,
-function(ha){null==ha||".scratchpad"==W&&ha==this.emptyLibraryXml?C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[W]}),"*"):X()}),X)}}catch(ha){console.log(ha)}}),Q=mxUtils.bind(this,function(W){try{this.setDatabaseItem(null,[{title:W.title,size:W.data.length,lastModified:Date.now(),type:W.isLib?"L":"F"},{title:W.title,data:W.data}],X,X,["filesInfo","files"])}catch(ha){console.log(ha)}});F=mxUtils.bind(this,function(W){try{if(W.source==
-C.contentWindow){var ha={};try{ha=JSON.parse(W.data)}catch(la){}"init"==ha.event?(C.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=ha.event||G||(I?null!=ha.resp&&0<ha.resp.length&&null!=ha.resp[0]?(Y=ha.resp[0],I=!1,qa()):Z():null!=ha.resp&&0<ha.resp.length&&null!=ha.resp[0]?Q(ha.resp[0]):X())}}catch(la){console.log(la)}});window.addEventListener("message",
-F)}})));d(y);y.onversionchange=function(){y.close()}});m.onerror=f;m.onblocked=function(){}}catch(q){null!=f&&f(q)}else null!=f&&f()}else d(this.database)};EditorUi.prototype.setDatabaseItem=function(d,f,g,m,q){this.openDatabase(mxUtils.bind(this,function(y){try{q=q||"objects";Array.isArray(q)||(q=[q],d=[d],f=[f]);var F=y.transaction(q,"readwrite");F.oncomplete=g;F.onerror=m;for(y=0;y<q.length;y++)F.objectStore(q[y]).put(null!=d&&null!=d[y]?{key:d[y],data:f[y]}:f[y])}catch(C){null!=m&&m(C)}}),m)};
-EditorUi.prototype.removeDatabaseItem=function(d,f,g,m){this.openDatabase(mxUtils.bind(this,function(q){m=m||"objects";Array.isArray(m)||(m=[m],d=[d]);q=q.transaction(m,"readwrite");q.oncomplete=f;q.onerror=g;for(var y=0;y<m.length;y++)q.objectStore(m[y]).delete(d[y])}),g)};EditorUi.prototype.getDatabaseItem=function(d,f,g,m){this.openDatabase(mxUtils.bind(this,function(q){try{m=m||"objects";var y=q.transaction([m],"readonly").objectStore(m).get(d);y.onsuccess=function(){f(y.result)};y.onerror=g}catch(F){null!=
-g&&g(F)}}),g)};EditorUi.prototype.getDatabaseItems=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(m){try{g=g||"objects";var q=m.transaction([g],"readonly").objectStore(g).openCursor(IDBKeyRange.lowerBound(0)),y=[];q.onsuccess=function(F){null==F.target.result?d(y):(y.push(F.target.result.value),F.target.result.continue())};q.onerror=f}catch(F){null!=f&&f(F)}}),f)};EditorUi.prototype.getDatabaseItemKeys=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(m){try{g=g||"objects";
-var q=m.transaction([g],"readonly").objectStore(g).getAllKeys();q.onsuccess=function(){d(q.result)};q.onerror=f}catch(y){null!=f&&f(y)}}),f)};EditorUi.prototype.commentsSupported=function(){var d=this.getCurrentFile();return null!=d?d.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsSaveNeeded():!1};
-EditorUi.prototype.getComments=function(d,f){var g=this.getCurrentFile();null!=g?g.getComments(d,f):d([])};EditorUi.prototype.addComment=function(d,f,g){var m=this.getCurrentFile();null!=m?m.addComment(d,f,g):f(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var d=this.getCurrentFile();return null!=d?d.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var d=this.getCurrentFile();return null!=d?d.canComment():!0};EditorUi.prototype.newComment=function(d,f){var g=this.getCurrentFile();
-return null!=g?g.newComment(d,f):new DrawioComment(this,null,d,Date.now(),Date.now(),!1,f)};EditorUi.prototype.isRevisionHistorySupported=function(){var d=this.getCurrentFile();return null!=d&&d.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(d,f){var g=this.getCurrentFile();null!=g&&g.getRevisions?g.getRevisions(d,f):f({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var d=this.getCurrentFile();return null!=d&&(d.constructor==
-DriveFile&&d.isEditable()||d.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(d){d.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(d,f,g,m,q,y,F,C){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(d,f,g,m,q,y,F,C)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(d)};
-EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(d,f)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,f,g,m,q,y,F,C,I,G,Y,ba,Z,X,qa,Q){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");
-return this.editor.exportToCanvas(d,f,g,m,q,y,F,C,I,G,Y,ba,Z,X,qa,Q)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(d,f,g,m){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(d,f,g,m)};EditorUi.prototype.convertImageToDataUri=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");
-return this.editor.convertImageToDataUri(d,f)};EditorUi.prototype.base64Encode=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(d)};EditorUi.prototype.updateCRC=function(d,f,g,m){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(d,f,g,m)};EditorUi.prototype.crc32=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(d)};EditorUi.prototype.writeGraphModelToPng=function(d,f,g,m,q){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");
-return Editor.writeGraphModelToPng(d,f,g,m,q)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var d=[],f=0;f<localStorage.length;f++){var g=localStorage.key(f),m=localStorage.getItem(g);if(0<g.length&&(".scratchpad"==g||"."!=g.charAt(0))&&0<m.length){var q="<mxfile "===m.substring(0,8)||"<?xml"===m.substring(0,5)||"\x3c!--[if IE]>"===m.substring(0,12);m="<mxlibrary>"===m.substring(0,11);(q||
-m)&&d.push(g)}}return d};EditorUi.prototype.getLocalStorageFile=function(d){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var f=localStorage.getItem(d);return{title:d,data:f,isLib:"<mxlibrary>"===f.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(b,e,k,n,D,t){function E(){for(var ja=ba.getElementsByTagName("div"),U=0,L=0;L<ja.length;L++)"none"!=ja[L].style.display&&ja[L].parentNode==ba&&U++;Z.style.display=0==U?"block":"none"}function d(ja,U,L,da){function O(){U.removeChild(ma);U.removeChild(u);aa.style.display="block";N.style.display="block"}I={div:U,comment:ja,saveCallback:L,deleteOnCancel:da};var N=U.querySelector(".geCommentTxt"),aa=U.querySelector(".geCommentActionsList"),ma=document.createElement("textarea");
-ma.className="geCommentEditTxtArea";ma.style.minHeight=N.offsetHeight+"px";ma.value=ja.content;U.insertBefore(ma,N);var u=document.createElement("div");u.className="geCommentEditBtns";var H=mxUtils.button(mxResources.get("cancel"),function(){da?(U.parentNode.removeChild(U),E()):O();I=null});H.className="geCommentEditBtn";u.appendChild(H);var P=mxUtils.button(mxResources.get("save"),function(){N.innerText="";ja.content=ma.value;mxUtils.write(N,ja.content);O();L(ja);I=null});mxEvent.addListener(ma,
-"keydown",mxUtils.bind(this,function(S){mxEvent.isConsumed(S)||((mxEvent.isControlDown(S)||mxClient.IS_MAC&&mxEvent.isMetaDown(S))&&13==S.keyCode?(P.click(),mxEvent.consume(S)):27==S.keyCode&&(H.click(),mxEvent.consume(S)))}));P.focus();P.className="geCommentEditBtn gePrimaryBtn";u.appendChild(P);U.insertBefore(u,N);aa.style.display="none";N.style.display="none";ma.focus()}function f(ja,U){U.innerText="";ja=new Date(ja.modifiedDate);var L=b.timeSince(ja);null==L&&(L=mxResources.get("lessThanAMinute"));
-mxUtils.write(U,mxResources.get("timeAgo",[L],"{1} ago"));U.setAttribute("title",ja.toLocaleDateString()+" "+ja.toLocaleTimeString())}function g(ja){var U=document.createElement("img");U.className="geCommentBusyImg";U.src=IMAGE_PATH+"/spin.gif";ja.appendChild(U);ja.busyImg=U}function m(ja){ja.style.border="1px solid red";ja.removeChild(ja.busyImg)}function q(ja){ja.style.border="";ja.removeChild(ja.busyImg)}function y(ja,U,L,da,O){function N(ca,ea,fa){var ra=document.createElement("li");ra.className=
-"geCommentAction";var ua=document.createElement("a");ua.className="geCommentActionLnk";mxUtils.write(ua,ca);ra.appendChild(ua);mxEvent.addListener(ua,"click",function(sa){ea(sa,ja);sa.preventDefault();mxEvent.consume(sa)});R.appendChild(ra);fa&&(ra.style.display="none")}function aa(){function ca(ra){ea.push(fa);if(null!=ra.replies)for(var ua=0;ua<ra.replies.length;ua++)fa=fa.nextSibling,ca(ra.replies[ua])}var ea=[],fa=u;ca(ja);return{pdiv:fa,replies:ea}}function ma(ca,ea,fa,ra,ua){function sa(){g(ta);
-ja.addReply(Ba,function(Pa){Ba.id=Pa;ja.replies.push(Ba);q(ta);fa&&fa()},function(Pa){Aa();m(ta);b.handleError(Pa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},ra,ua)}function Aa(){d(Ba,ta,function(Pa){sa()},!0)}var Ca=aa().pdiv,Ba=b.newComment(ca,b.getCurrentUser());Ba.pCommentId=ja.id;null==ja.replies&&(ja.replies=[]);var ta=y(Ba,ja.replies,Ca,da+1);ea?Aa():sa()}if(O||!ja.isResolved){Z.style.display="none";var u=document.createElement("div");u.className="geCommentContainer";
-u.setAttribute("data-commentId",ja.id);u.style.marginLeft=20*da+5+"px";ja.isResolved&&!Editor.isDarkMode()&&(u.style.backgroundColor="ghostWhite");var H=document.createElement("div");H.className="geCommentHeader";var P=document.createElement("img");P.className="geCommentUserImg";P.src=ja.user.pictureUrl||Editor.userImage;H.appendChild(P);P=document.createElement("div");P.className="geCommentHeaderTxt";H.appendChild(P);var S=document.createElement("div");S.className="geCommentUsername";mxUtils.write(S,
-ja.user.displayName||"");P.appendChild(S);S=document.createElement("div");S.className="geCommentDate";S.setAttribute("data-commentId",ja.id);f(ja,S);P.appendChild(S);u.appendChild(H);H=document.createElement("div");H.className="geCommentTxt";mxUtils.write(H,ja.content||"");u.appendChild(H);ja.isLocked&&(u.style.opacity="0.5");H=document.createElement("div");H.className="geCommentActions";var R=document.createElement("ul");R.className="geCommentActionsList";H.appendChild(R);F||ja.isLocked||0!=da&&
-!C||N(mxResources.get("reply"),function(){ma("",!0)},ja.isResolved);P=b.getCurrentUser();null==P||P.id!=ja.user.id||F||ja.isLocked||(N(mxResources.get("edit"),function(){function ca(){d(ja,u,function(){g(u);ja.editComment(ja.content,function(){q(u)},function(ea){m(u);ca();b.handleError(ea,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}ca()},ja.isResolved),N(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){g(u);ja.deleteComment(function(ca){if(!0===
-ca){ca=u.querySelector(".geCommentTxt");ca.innerText="";mxUtils.write(ca,mxResources.get("msgDeleted"));var ea=u.querySelectorAll(".geCommentAction");for(ca=0;ca<ea.length;ca++)ea[ca].parentNode.removeChild(ea[ca]);q(u);u.style.opacity="0.5"}else{ea=aa(ja).replies;for(ca=0;ca<ea.length;ca++)ba.removeChild(ea[ca]);for(ca=0;ca<U.length;ca++)if(U[ca]==ja){U.splice(ca,1);break}Z.style.display=0==ba.getElementsByTagName("div").length?"block":"none"}},function(ca){m(u);b.handleError(ca,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},
-ja.isResolved));F||ja.isLocked||0!=da||N(ja.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(ca){function ea(){var fa=ca.target;fa.innerText="";ja.isResolved=!ja.isResolved;mxUtils.write(fa,ja.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var ra=ja.isResolved?"none":"",ua=aa(ja).replies,sa=Editor.isDarkMode()?"transparent":ja.isResolved?"ghostWhite":"white",Aa=0;Aa<ua.length;Aa++){ua[Aa].style.backgroundColor=sa;for(var Ca=ua[Aa].querySelectorAll(".geCommentAction"),
-Ba=0;Ba<Ca.length;Ba++)Ca[Ba]!=fa.parentNode&&(Ca[Ba].style.display=ra);Q||(ua[Aa].style.display="none")}E()}ja.isResolved?ma(mxResources.get("reOpened")+": ",!0,ea,!1,!0):ma(mxResources.get("markedAsResolved"),!1,ea,!0)});u.appendChild(H);null!=L?ba.insertBefore(u,L.nextSibling):ba.appendChild(u);for(L=0;null!=ja.replies&&L<ja.replies.length;L++)H=ja.replies[L],H.isResolved=ja.isResolved,y(H,ja.replies,null,da+1,O);null!=I&&(I.comment.id==ja.id?(O=ja.content,ja.content=I.comment.content,d(ja,u,I.saveCallback,
-I.deleteOnCancel),ja.content=O):null==I.comment.id&&I.comment.pCommentId==ja.id&&(ba.appendChild(I.div),d(I.comment,I.div,I.saveCallback,I.deleteOnCancel)));return u}}var F=!b.canComment(),C=b.canReplyToReplies(),I=null,G=document.createElement("div");G.className="geCommentsWin";G.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var Y=EditorUi.compactUi?"26px":"30px",ba=document.createElement("div");ba.className="geCommentsList";ba.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:
-"whiteSmoke";ba.style.bottom=parseInt(Y)+7+"px";G.appendChild(ba);var Z=document.createElement("span");Z.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(Z,mxResources.get("noCommentsFound"));var X=document.createElement("div");X.className="geToolbarContainer geCommentsToolbar";X.style.height=Y;X.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";X.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";Y=document.createElement("a");Y.className=
-"geButton";if(!F){var qa=Y.cloneNode();qa.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';qa.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(qa,"click",function(ja){function U(){d(L,da,function(O){g(da);b.addComment(O,function(N){O.id=N;W.push(O);q(da)},function(N){m(da);U();b.handleError(N,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var L=b.newComment("",b.getCurrentUser()),da=y(L,W,null,0);U();ja.preventDefault();
-mxEvent.consume(ja)});X.appendChild(qa)}qa=Y.cloneNode();qa.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';qa.setAttribute("title",mxResources.get("showResolved"));var Q=!1;Editor.isDarkMode()&&(qa.style.filter="invert(100%)");mxEvent.addListener(qa,"click",function(ja){this.className=(Q=!Q)?"geButton geCheckedBtn":"geButton";ha();ja.preventDefault();mxEvent.consume(ja)});X.appendChild(qa);b.commentsRefreshNeeded()&&(qa=Y.cloneNode(),qa.innerHTML='<img src="'+
-IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',qa.setAttribute("title",mxResources.get("refresh")),Editor.isDarkMode()&&(qa.style.filter="invert(100%)"),mxEvent.addListener(qa,"click",function(ja){ha();ja.preventDefault();mxEvent.consume(ja)}),X.appendChild(qa));b.commentsSaveNeeded()&&(Y=Y.cloneNode(),Y.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',Y.setAttribute("title",mxResources.get("save")),Editor.isDarkMode()&&(Y.style.filter="invert(100%)"),
-mxEvent.addListener(Y,"click",function(ja){t();ja.preventDefault();mxEvent.consume(ja)}),X.appendChild(Y));G.appendChild(X);var W=[],ha=mxUtils.bind(this,function(){this.hasError=!1;if(null!=I)try{I.div=I.div.cloneNode(!0);var ja=I.div.querySelector(".geCommentEditTxtArea"),U=I.div.querySelector(".geCommentEditBtns");I.comment.content=ja.value;ja.parentNode.removeChild(ja);U.parentNode.removeChild(U)}catch(L){b.handleError(L)}ba.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+
-IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";C=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(L){function da(O){if(null!=O){O.sort(function(aa,ma){return new Date(aa.modifiedDate)-new Date(ma.modifiedDate)});for(var N=0;N<O.length;N++)da(O[N].replies)}}L.sort(function(O,N){return new Date(O.modifiedDate)-new Date(N.modifiedDate)});ba.innerText="";ba.appendChild(Z);Z.style.display="block";W=L;for(L=0;L<W.length;L++)da(W[L].replies),
-y(W[L],W,null,0,Q);null!=I&&null==I.comment.id&&null==I.comment.pCommentId&&(ba.appendChild(I.div),d(I.comment,I.div,I.saveCallback,I.deleteOnCancel))},mxUtils.bind(this,function(L){ba.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(L&&L.message?": "+L.message:""));this.hasError=!0})):ba.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});ha();this.refreshComments=ha;X=mxUtils.bind(this,function(){function ja(N){var aa=L[N.id];if(null!=aa)for(f(N,aa),aa=0;null!=N.replies&&aa<N.replies.length;aa++)ja(N.replies[aa])}
-if(this.window.isVisible()){for(var U=ba.querySelectorAll(".geCommentDate"),L={},da=0;da<U.length;da++){var O=U[da];L[O.getAttribute("data-commentId")]=O}for(da=0;da<W.length;da++)ja(W[da])}});setInterval(X,6E4);this.refreshCommentsTime=X;this.window=new mxWindow(mxResources.get("comments"),G,e,k,n,D,!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(ja,U){var L=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;ja=Math.max(0,Math.min(ja,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));U=Math.max(0,Math.min(U,L-this.table.clientHeight-48));this.getX()==ja&&this.getY()==U||mxWindow.prototype.setLocation.apply(this,arguments)};var la=
-mxUtils.bind(this,function(){var ja=this.window.getX(),U=this.window.getY();this.window.setLocation(ja,U)});mxEvent.addListener(window,"resize",la);this.destroy=function(){mxEvent.removeListener(window,"resize",la);this.window.destroy()}},ConfirmDialog=function(b,e,k,n,D,t,E,d,f,g,m){var q=document.createElement("div");q.style.textAlign="center";m=null!=m?m:44;var y=document.createElement("div");y.style.padding="6px";y.style.overflow="auto";y.style.maxHeight=m+"px";y.style.lineHeight="1.2em";mxUtils.write(y,
-e);q.appendChild(y);null!=g&&(y=document.createElement("div"),y.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",g),y.appendChild(e),q.appendChild(y));g=document.createElement("div");g.style.textAlign="center";g.style.whiteSpace="nowrap";var F=document.createElement("input");F.setAttribute("type","checkbox");t=mxUtils.button(t||mxResources.get("cancel"),function(){b.hideDialog();null!=n&&n(F.checked)});t.className="geBtn";null!=d&&(t.innerHTML=d+"<br>"+t.innerHTML,
-t.style.paddingBottom="8px",t.style.paddingTop="8px",t.style.height="auto",t.style.width="40%");b.editor.cancelFirst&&g.appendChild(t);var C=mxUtils.button(D||mxResources.get("ok"),function(){b.hideDialog();null!=k&&k(F.checked)});g.appendChild(C);null!=E?(C.innerHTML=E+"<br>"+C.innerHTML+"<br>",C.style.paddingBottom="8px",C.style.paddingTop="8px",C.style.height="auto",C.className="geBtn",C.style.width="40%"):C.className="geBtn gePrimaryBtn";b.editor.cancelFirst||g.appendChild(t);q.appendChild(g);
-f?(g.style.marginTop="10px",y=document.createElement("p"),y.style.marginTop="20px",y.style.marginBottom="0px",y.appendChild(F),D=document.createElement("span"),mxUtils.write(D," "+mxResources.get("rememberThisSetting")),y.appendChild(D),q.appendChild(y),mxEvent.addListener(D,"click",function(I){F.checked=!F.checked;mxEvent.consume(I)})):g.style.marginTop="12px";this.init=function(){C.focus()};this.container=q};function DiagramPage(b,e){this.node=b;null!=e?this.node.setAttribute("id",e):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
+Math.max(C/q,I/q);if(1<G){var Z=Math.round(C/G),ca=Math.round(I/G),aa=document.createElement("canvas");aa.width=Z;aa.height=ca;aa.getContext("2d").drawImage(d,0,0,Z,ca);var Y=aa.toDataURL();if(Y.length<f.length){var pa=document.createElement("canvas");pa.width=Z;pa.height=ca;var Q=pa.toDataURL();Y!==Q&&(f=Y,C=Z,I=ca)}}}catch(X){}g(f,C,I)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,f,g){try{var m=new Image;
+m.onload=function(){m.width=0<m.width?m.width:120;m.height=0<m.height?m.height:120;f(m)};null!=g&&(m.onerror=g);m.src=d}catch(q){if(null!=g)g(q);else throw q;}};EditorUi.prototype.getDefaultSketchMode=function(){var d="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?urlParams.rough:d)};var D=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:this.getDefaultSketchMode()),null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());var d=this,f=this.editor.graph;Editor.isDarkMode()&&(f.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);Graph.touchStyle&&(f.panningHandler.isPanningTrigger=function(X){var ha=X.getEvent();
+return null==X.getState()&&!mxEvent.isMouseEvent(ha)&&!f.freehand.isDrawing()||mxEvent.isPopupTrigger(ha)&&(null==X.getState()||mxEvent.isControlDown(ha)||mxEvent.isShiftDown(ha))});f.cellEditor.editPlantUmlData=function(X,ha,U){var ma=JSON.parse(U);ha=new TextareaDialog(d,mxResources.get("plantUml")+":",ma.data,function(T){null!=T&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(T,ma.format,function(M,ia,N){d.spinner.stop();f.getModel().beginUpdate();try{if("txt"==
+ma.format)f.labelChanged(X,"<pre>"+M+"</pre>"),f.updateCellSize(X,!0);else{f.setCellStyles("image",d.convertDataUri(M),[X]);var O=f.model.getGeometry(X);null!=O&&(O=O.clone(),O.width=ia,O.height=N,f.cellsResized([X],[O],!1))}f.setAttributeForCell(X,"plantUmlData",JSON.stringify({data:T,format:ma.format}))}finally{f.getModel().endUpdate()}},function(M){d.handleError(M)})},null,null,400,220);d.showDialog(ha.container,420,300,!0,!0);ha.init()};f.cellEditor.editMermaidData=function(X,ha,U){var ma=JSON.parse(U);
+ha=new TextareaDialog(d,mxResources.get("mermaid")+":",ma.data,function(T){null!=T&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(T,ma.config,function(M,ia,N){d.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",M,[X]);var O=f.model.getGeometry(X);null!=O&&(O=O.clone(),O.width=Math.max(O.width,ia),O.height=Math.max(O.height,N),f.cellsResized([X],[O],!1));f.setAttributeForCell(X,"mermaidData",JSON.stringify({data:T,config:ma.config},null,2))}finally{f.getModel().endUpdate()}},
+function(M){d.handleError(M)})},null,null,400,220);d.showDialog(ha.container,420,300,!0,!0);ha.init()};var g=f.cellEditor.startEditing;f.cellEditor.startEditing=function(X,ha){try{var U=this.graph.getAttributeForCell(X,"plantUmlData");if(null!=U)this.editPlantUmlData(X,ha,U);else if(U=this.graph.getAttributeForCell(X,"mermaidData"),null!=U)this.editMermaidData(X,ha,U);else{var ma=f.getCellStyle(X);"1"==mxUtils.getValue(ma,"metaEdit","0")?d.showDataDialog(X):g.apply(this,arguments)}}catch(T){d.handleError(T)}};
+f.getLinkTitle=function(X){return d.getLinkTitle(X)};f.customLinkClicked=function(X){var ha=!1;try{d.handleCustomLink(X),ha=!0}catch(U){d.handleError(U)}return ha};var m=f.parseBackgroundImage;f.parseBackgroundImage=function(X){var ha=m.apply(this,arguments);null!=ha&&null!=ha.src&&Graph.isPageLink(ha.src)&&(ha={originalSrc:ha.src});return ha};var q=f.setBackgroundImage;f.setBackgroundImage=function(X){null!=X&&null!=X.originalSrc&&(X=d.createImageForPageLink(X.originalSrc,d.currentPage,this));q.apply(this,
+arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(X,ha){X=null!=f.backgroundImage?f.backgroundImage.originalSrc:null;if(null!=X){var U=X.indexOf(",");if(0<U)for(X=X.substring(U+1),ha=ha.getProperty("patches"),U=0;U<ha.length;U++)if(null!=ha[U][EditorUi.DIFF_UPDATE]&&null!=ha[U][EditorUi.DIFF_UPDATE][X]||
+null!=ha[U][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(ha[U][EditorUi.DIFF_REMOVE],X)){f.refreshBackgroundImage();break}}}));var y=f.getBackgroundImageObject;f.getBackgroundImageObject=function(X,ha){var U=y.apply(this,arguments);if(null!=U&&null!=U.originalSrc)if(!ha)U={src:U.originalSrc};else if(ha&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var ma=this.stylesheet,T=this.shapeForegroundColor,M=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor=
+"#ffffff";this.shapeForegroundColor="#000000";U=d.createImageForPageLink(U.originalSrc);this.shapeBackgroundColor=M;this.shapeForegroundColor=T;this.stylesheet=ma}return U};var F=this.clearDefaultStyle;this.clearDefaultStyle=function(){F.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 C=d.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(X){X=null!=X?X:"";"1"==urlParams.dev&&(X+=(0<X.length?"&":"?")+"dev=1");return C.apply(this,arguments)};var I=f.addClickHandler;f.addClickHandler=function(X,ha,U){var ma=ha;ha=function(T,M){if(null==M){var ia=mxEvent.getSource(T);"a"==ia.nodeName.toLowerCase()&&(M=ia.getAttribute("href"))}null!=M&&f.isCustomLink(M)&&(mxEvent.isTouchEvent(T)||!mxEvent.isPopupTrigger(T))&&f.customLinkClicked(M)&&mxEvent.consume(T);
+null!=ma&&ma(T,M)};I.call(this,X,ha,U)};D.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var G=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(X,ha,U){d.editor.graph.isSelectionEmpty()?G.apply(this,arguments):d.menus.addMenuItems(X,"delete - cut copy copyAsImage - duplicate".split(" "),null,U)}}d.actions.get("print").funct=function(){d.showDialog((new PrintDialog(d)).container,360,null!=
+d.pages&&1<d.pages.length?470:390,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var Z=f.getExportVariables;f.getExportVariables=function(){var X=Z.apply(this,arguments),ha=d.getCurrentFile();null!=ha&&(X.filename=ha.getTitle());X.pagecount=null!=d.pages?d.pages.length:1;X.page=null!=d.currentPage?d.currentPage.getName():"";X.pagenumber=null!=d.pages&&null!=d.currentPage?mxUtils.indexOf(d.pages,d.currentPage)+1:1;return X};var ca=f.getGlobalVariable;f.getGlobalVariable=function(X){var ha=
+d.getCurrentFile();return"filename"==X&&null!=ha?ha.getTitle():"page"==X&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==X?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+1:1:"pagecount"==X?null!=d.pages?d.pages.length:1:ca.apply(this,arguments)};var aa=f.labelLinkClicked;f.labelLinkClicked=function(X,ha,U){var ma=ha.getAttribute("href");if(null==ma||!f.isCustomLink(ma)||!mxEvent.isTouchEvent(U)&&mxEvent.isPopupTrigger(U))aa.apply(this,arguments);else{if(!f.isEnabled()||
+null!=X&&f.isCellLocked(X.cell))f.customLinkClicked(ma),f.getRubberband().reset();mxEvent.consume(U)}};this.editor.getOrCreateFilename=function(){var X=d.defaultFilename,ha=d.getCurrentFile();null!=ha&&(X=null!=ha.getTitle()?ha.getTitle():X);return X};var Y=this.actions.get("print");Y.setEnabled(!mxClient.IS_IOS||!navigator.standalone);Y.visible=Y.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(67,!0,"copyStyle",
+!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"insertRectangle"),this.keyHandler.bindAction(75,!0,"insertEllipse",!0),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,
+null,24);Graph.fileSupport&&f.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(X){var ha=f.cellEditor.text2,U=null;null!=ha&&(mxEvent.addListener(ha,"dragleave",function(ma){null!=U&&(U.parentNode.removeChild(U),U=null);ma.stopPropagation();ma.preventDefault()}),mxEvent.addListener(ha,"dragover",mxUtils.bind(this,function(ma){null==U&&(!mxClient.IS_IE||10<document.documentMode)&&(U=this.highlightElement(ha));ma.stopPropagation();ma.preventDefault()})),mxEvent.addListener(ha,"drop",mxUtils.bind(this,
+function(ma){null!=U&&(U.parentNode.removeChild(U),U=null);if(0<ma.dataTransfer.files.length)this.importFiles(ma.dataTransfer.files,0,0,this.maxImageSize,function(M,ia,N,O,ba,la){f.insertImage(M,ba,la)},function(){},function(M){return"image/"==M.type.substring(0,6)},function(M){for(var ia=0;ia<M.length;ia++)M[ia]()},mxEvent.isControlDown(ma));else if(0<=mxUtils.indexOf(ma.dataTransfer.types,"text/uri-list")){var T=ma.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(T)?
+this.loadImage(decodeURIComponent(T),mxUtils.bind(this,function(M){var ia=Math.max(1,M.width);M=Math.max(1,M.height);var N=this.maxImageSize;N=Math.min(1,Math.min(N/Math.max(1,ia)),N/Math.max(1,M));f.insertImage(decodeURIComponent(T),ia*N,M*N)})):document.execCommand("insertHTML",!1,ma.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(ma.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,ma.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(ma.dataTransfer.types,"text/plain")&&
+document.execCommand("insertHTML",!1,ma.dataTransfer.getData("text/plain"));ma.stopPropagation();ma.preventDefault()})))}));this.isSettingsEnabled()&&(Y=this.editor.graph.view,Y.setUnit(mxSettings.getUnit()),Y.addListener("unitChanged",function(X,ha){mxSettings.setUnit(ha.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,
+Y.unit),this.refresh());if("1"==urlParams.styledev){Y=document.getElementById("geFooter");null!=Y&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),
+this.styleInput.value)})),Y.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(X,ha){0<this.editor.graph.getSelectionCount()?(X=this.editor.graph.getSelectionCell(),X=this.editor.graph.getModel().getStyle(X),this.styleInput.value=X||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var pa=this.isSelectionAllowed;this.isSelectionAllowed=function(X){return mxEvent.getSource(X)==this.styleInput?
+!0:pa.apply(this,arguments)}}Y=document.getElementById("geInfo");null!=Y&&Y.parentNode.removeChild(Y);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var Q=null;mxEvent.addListener(f.container,"dragleave",function(X){f.isEnabled()&&(null!=Q&&(Q.parentNode.removeChild(Q),Q=null),X.stopPropagation(),X.preventDefault())});mxEvent.addListener(f.container,"dragover",mxUtils.bind(this,function(X){null==Q&&(!mxClient.IS_IE||10<document.documentMode)&&(Q=this.highlightElement(f.container));
+null!=this.sidebar&&this.sidebar.hideTooltip();X.stopPropagation();X.preventDefault()}));mxEvent.addListener(f.container,"drop",mxUtils.bind(this,function(X){null!=Q&&(Q.parentNode.removeChild(Q),Q=null);if(f.isEnabled()){var ha=mxUtils.convertPoint(f.container,mxEvent.getClientX(X),mxEvent.getClientY(X)),U=X.dataTransfer.files,ma=f.view.translate,T=f.view.scale,M=ha.x/T-ma.x,ia=ha.y/T-ma.y;if(0<U.length)ha=1==U.length&&this.isBlankFile()&&!this.canUndo()&&("image/svg"===U[0].type.substring(0,9)||
+"image/"!==U[0].type.substring(0,6)||/(\.drawio.png)$/i.test(U[0].name)),"1"!=urlParams.embed&&(mxEvent.isShiftDown(X)||ha)?(!mxEvent.isShiftDown(X)&&ha&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(U,!0)):(mxEvent.isAltDown(X)&&(ia=M=null),this.importFiles(U,M,ia,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(X),null,null,mxEvent.isShiftDown(X),X));else{mxEvent.isAltDown(X)&&(ia=M=0);var N=0<=mxUtils.indexOf(X.dataTransfer.types,"text/uri-list")?X.dataTransfer.getData("text/uri-list"):
+null;U=this.extractGraphModelFromEvent(X,null!=this.pages);if(null!=U)f.setSelectionCells(this.importXml(U,M,ia,!0));else if(0<=mxUtils.indexOf(X.dataTransfer.types,"text/html")){var O=X.dataTransfer.getData("text/html");U=document.createElement("div");U.innerHTML=f.sanitizeHtml(O);var ba=null;ha=U.getElementsByTagName("img");null!=ha&&1==ha.length?(O=ha[0].getAttribute("src"),null==O&&(O=ha[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(O)||(ba=!0)):(ha=U.getElementsByTagName("a"),
+null!=ha&&1==ha.length?O=ha[0].getAttribute("href"):(U=U.getElementsByTagName("pre"),null!=U&&1==U.length&&(O=mxUtils.getTextContent(U[0]))));var la=!0,u=mxUtils.bind(this,function(){f.setSelectionCells(this.insertTextAt(O,M,ia,!0,ba,null,la,mxEvent.isControlDown(X)))});ba&&null!=O&&O.length>this.resampleThreshold?this.confirmImageResize(function(H){la=H;u()},mxEvent.isControlDown(X)):u()}else null!=N&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(N)?this.loadImage(decodeURIComponent(N),mxUtils.bind(this,
+function(H){var P=Math.max(1,H.width);H=Math.max(1,H.height);var W=this.maxImageSize;W=Math.min(1,Math.min(W/Math.max(1,P)),W/Math.max(1,H));f.setSelectionCell(f.insertVertex(null,null,"",M,ia,P*W,H*W,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+N+";"))}),mxUtils.bind(this,function(H){f.setSelectionCells(this.insertTextAt(N,M,ia,!0))})):0<=mxUtils.indexOf(X.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(X.dataTransfer.getData("text/plain"),
+M,ia,!0))}}X.stopPropagation();X.preventDefault()}),!1)}f.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var d=this.editor.graph;d.container.addEventListener("paste",mxUtils.bind(this,function(f){if(!mxEvent.isConsumed(f))try{for(var g=f.clipboardData||f.originalEvent.clipboardData,m=!1,q=0;q<g.types.length;q++)if("text/"===g.types[q].substring(0,5)){m=!0;break}if(!m){var y=
+g.items;for(index in y){var F=y[index];if("file"===F.kind){if(d.isEditing())this.importFiles([F.getAsFile()],0,0,this.maxImageSize,function(I,G,Z,ca,aa,Y){d.insertImage(I,aa,Y)},function(){},function(I){return"image/"==I.type.substring(0,6)},function(I){for(var G=0;G<I.length;G++)I[G]()});else{var C=this.editor.graph.getInsertPoint();this.importFiles([F.getAsFile()],C.x,C.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(I){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function d(){window.setTimeout(function(){g.innerHTML=
+"&nbsp;";g.focus();document.execCommand("selectAll",!1,null)},0)}var f=this.editor.graph,g=document.createElement("div");g.setAttribute("autocomplete","off");g.setAttribute("autocorrect","off");g.setAttribute("autocapitalize","off");g.setAttribute("spellcheck","false");g.style.textRendering="optimizeSpeed";g.style.fontFamily="monospace";g.style.wordBreak="break-all";g.style.background="transparent";g.style.color="transparent";g.style.position="absolute";g.style.whiteSpace="nowrap";g.style.overflow=
+"hidden";g.style.display="block";g.style.fontSize="1";g.style.zIndex="-1";g.style.resize="none";g.style.outline="none";g.style.width="1px";g.style.height="1px";mxUtils.setOpacity(g,0);g.contentEditable=!0;g.innerHTML="&nbsp;";var m=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(y){var F=mxEvent.getSource(y);null==f.container||!f.isEnabled()||f.isMouseDown||
+f.isEditing()||null!=this.dialog||"INPUT"==F.nodeName||"TEXTAREA"==F.nodeName||224!=y.keyCode&&(mxClient.IS_MAC||17!=y.keyCode)&&(!mxClient.IS_MAC||91!=y.keyCode&&93!=y.keyCode)||m||(g.style.left=f.container.scrollLeft+10+"px",g.style.top=f.container.scrollTop+10+"px",f.container.appendChild(g),m=!0,g.focus(),document.execCommand("selectAll",!1,null))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(y){var F=y.keyCode;window.setTimeout(mxUtils.bind(this,function(){!m||224!=F&&17!=
+F&&91!=F&&93!=F||(m=!1,f.isEditing()||null!=this.dialog||null==f.container||f.container.focus(),g.parentNode.removeChild(g),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(g,"copy",mxUtils.bind(this,function(y){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(g),d()}catch(F){this.handleError(F)}}));mxEvent.addListener(g,"cut",mxUtils.bind(this,function(y){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(g,!0),d()}catch(F){this.handleError(F)}}));mxEvent.addListener(g,
+"paste",mxUtils.bind(this,function(y){f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&(g.innerHTML="&nbsp;",g.focus(),null!=y.clipboardData&&this.pasteCells(y,g,!0,!0),mxEvent.isConsumed(y)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(y,g,!1,!0)}),0))}),!0);var q=this.isSelectionAllowed;this.isSelectionAllowed=function(y){return mxEvent.getSource(y)==g?!0:q.apply(this,arguments)}};EditorUi.prototype.setSketchMode=function(d){this.spinner.spin(document.body,mxResources.get("working")+
+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(d);null==urlParams.rough&&(mxSettings.settings.sketchMode=d,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};EditorUi.prototype.setPagesVisible=function(d){Editor.pagesVisible!=d&&(Editor.pagesVisible=d,mxSettings.settings.pagesVisible=d,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(d,f){this.sidebar.sidebarTitles!=
+d&&(this.sidebar.sidebarTitles=d,this.sidebar.refresh(),this.isSettingsEnabled()&&f&&(mxSettings.settings.sidebarTitles=d,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};EditorUi.prototype.setInlineFullscreen=function(d){Editor.inlineFullscreen!=d&&(Editor.inlineFullscreen=d,this.fireEvent(new mxEventObject("inlineFullscreenChanged")),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),
+"*"),window.setTimeout(mxUtils.bind(this,function(){this.refresh();this.actions.get("resetView").funct()}),10))};EditorUi.prototype.doSetSketchMode=function(d){if(Editor.sketchMode!=d){var f=function(m,q,y){null==m[q]&&(m[q]=y)},g=this.editor.graph;Editor.sketchMode=d;this.menus.defaultFontSize=d?20:16;g.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);f(g.defaultVertexStyle,"fontSize",this.menus.defaultFontSize);g.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);
+f(g.defaultEdgeStyle,"fontSize",this.menus.defaultFontSize-4);f(g.defaultEdgeStyle,"edgeStyle","none");f(g.defaultEdgeStyle,"rounded","0");f(g.defaultEdgeStyle,"curved","1");f(g.defaultEdgeStyle,"jettySize","auto");f(g.defaultEdgeStyle,"orthogonalLoop","1");f(g.defaultEdgeStyle,"endArrow","open");f(g.defaultEdgeStyle,"endSize","14");f(g.defaultEdgeStyle,"startSize","14");d&&(f(g.defaultVertexStyle,"fontFamily",Editor.sketchFontFamily),f(g.defaultVertexStyle,"fontSource",Editor.sketchFontSource),f(g.defaultVertexStyle,
+"hachureGap","4"),f(g.defaultVertexStyle,"sketch","1"),f(g.defaultEdgeStyle,"fontFamily",Editor.sketchFontFamily),f(g.defaultEdgeStyle,"fontSource",Editor.sketchFontSource),f(g.defaultEdgeStyle,"sketch","1"),f(g.defaultEdgeStyle,"hachureGap","4"),f(g.defaultEdgeStyle,"sourcePerimeterSpacing","8"),f(g.defaultEdgeStyle,"targetPerimeterSpacing","8"));g.currentVertexStyle=mxUtils.clone(g.defaultVertexStyle);g.currentEdgeStyle=mxUtils.clone(g.defaultEdgeStyle);this.clearDefaultStyle()}};EditorUi.prototype.getLinkTitle=
+function(d){var f=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(d)){var g=d.indexOf(",");0<g&&(f=this.getPageById(d.substring(g+1)),f=null!=f?f.getName():mxResources.get("pageNotFound"))}else"data:"==d.substring(0,5)&&(f=mxResources.get("action"));return f};EditorUi.prototype.handleCustomLink=function(d){if(Graph.isPageLink(d)){var f=d.indexOf(",");if(d=this.getPageById(d.substring(f+1)))this.selectPage(d);else throw Error(mxResources.get("pageNotFound")||"Page not found");
+}else this.editor.graph.handleCustomLink(d)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){Editor.pagesVisible=mxSettings.settings.pagesVisible;ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(d){d.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=
+mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(d){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(d,f){"1"!=urlParams["ext-fonts"]?mxSettings.setCustomFonts(this.menus.customFonts):(d=f.getProperty("customFonts"),this.menus.customFonts=d,mxSettings.setCustomFonts(d));mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());
+this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(d,f){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(d,f){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));
+this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor=mxSettings.getGridColor(!0);this.editor.graph.view.defaultGridColor=mxSettings.getGridColor(!1);this.addListener("gridColorChanged",mxUtils.bind(this,function(d,f){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(d,
+f){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),
+mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(d,f,g){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(m,q){try{this.spinner.stop();var y=this.createImageDataUri(m,f,"png"),F=parseInt(q.getAttribute("width")),C=parseInt(q.getAttribute("height"));this.writeImageToClipboard(y,
+F,C,mxUtils.bind(this,function(I){this.handleError(I)}))}catch(I){this.handleError(I)}}),null,null,null,mxUtils.bind(this,function(m){this.spinner.stop();this.handleError(m)}),null,null,null!=g?g:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<d.length?d:null)}catch(m){this.handleError(m)}};EditorUi.prototype.writeImageToClipboard=function(d,f,g,m){var q=this.base64ToBlob(d.substring(d.indexOf(",")+1),"image/png");d=new ClipboardItem({"image/png":q,
+"text/html":new Blob(['<img src="'+d+'" width="'+f+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([d])["catch"](m)};EditorUi.prototype.copyCells=function(d,f){var g=this.editor.graph;if(g.isSelectionEmpty())d.innerText="";else{var m=mxUtils.sortCells(g.model.getTopmostCells(g.getSelectionCells())),q=mxUtils.getXml(g.encodeCells(m));mxUtils.setTextContent(d,encodeURIComponent(q));f?(g.removeCells(m,!1),g.lastPasteXml=null):(g.lastPasteXml=q,g.pasteCounter=0);d.focus();document.execCommand("selectAll",
+!1,null)}};EditorUi.prototype.copyXml=function(){var d=null;if(Editor.enableNativeCipboard){var f=this.editor.graph;f.isSelectionEmpty()||(d=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),f=mxUtils.getXml(f.encodeCells(d)),navigator.clipboard.writeText(f))}return d};EditorUi.prototype.pasteXml=function(d,f,g,m){var q=this.editor.graph,y=null;q.lastPasteXml==d?q.pasteCounter++:(q.lastPasteXml=d,q.pasteCounter=0);var F=q.pasteCounter*q.gridSize;if(g||this.isCompatibleString(d))y=
+this.importXml(d,F,F),q.setSelectionCells(y);else if(f&&1==q.getSelectionCount()){F=q.getStartEditingCell(q.getSelectionCell(),m);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&"image"==q.getCurrentCellStyle(F)[mxConstants.STYLE_SHAPE])q.setCellStyles(mxConstants.STYLE_IMAGE,d,[F]);else{q.model.beginUpdate();try{q.labelChanged(F,d),Graph.isLink(d)&&q.setLinkForCell(F,d)}finally{q.model.endUpdate()}}q.setSelectionCell(F)}else y=q.getInsertPoint(),q.isMouseInsertPoint()&&(F=0,q.lastPasteXml==d&&0<q.pasteCounter&&
+q.pasteCounter--),y=this.insertTextAt(d,y.x+F,y.y+F,!0),q.setSelectionCells(y);q.isSelectionEmpty()||(q.scrollCellToVisible(q.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(q.view.getState(q.getSelectionCell())));return y};EditorUi.prototype.pasteCells=function(d,f,g,m){if(!mxEvent.isConsumed(d)){var q=f,y=!1;if(g&&null!=d.clipboardData&&d.clipboardData.getData){var F=d.clipboardData.getData("text/plain"),C=!1;if(null!=F&&0<F.length&&"%3CmxGraphModel%3E"==F.substring(0,18))try{var I=
+decodeURIComponent(F);this.isCompatibleString(I)&&(C=!0,F=I)}catch(ca){}C=C?null:d.clipboardData.getData("text/html");null!=C&&0<C.length?(q=this.parseHtmlData(C),y="text/plain"!=q.getAttribute("data-type")):null!=F&&0<F.length&&(q=document.createElement("div"),mxUtils.setTextContent(q,C))}F=q.getElementsByTagName("span");if(null!=F&&0<F.length&&"application/vnd.lucid.chart.objects"===F[0].getAttribute("data-lucid-type"))g=F[0].getAttribute("data-lucid-content"),null!=g&&0<g.length&&(this.convertLucidChart(g,
+mxUtils.bind(this,function(ca){var aa=this.editor.graph;aa.lastPasteXml==ca?aa.pasteCounter++:(aa.lastPasteXml=ca,aa.pasteCounter=0);var Y=aa.pasteCounter*aa.gridSize;aa.setSelectionCells(this.importXml(ca,Y,Y));aa.scrollCellToVisible(aa.getSelectionCell())}),mxUtils.bind(this,function(ca){this.handleError(ca)})),mxEvent.consume(d));else{y=y?q.innerHTML:mxUtils.trim(null==q.innerText?mxUtils.getTextContent(q):q.innerText);C=!1;try{var G=y.lastIndexOf("%3E");0<=G&&G<y.length-3&&(y=y.substring(0,G+
+3))}catch(ca){}try{F=q.getElementsByTagName("span"),(I=null!=F&&0<F.length?mxUtils.trim(decodeURIComponent(F[0].textContent)):decodeURIComponent(y))&&(this.isCompatibleString(I)||0==I.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(C=!0,y=I)}catch(ca){}try{if(null!=y&&0<y.length){if(0==y.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))try{"undefined"!==typeof MiroImporter&&(y=(new MiroImporter).importMiroJson(JSON.parse(y)))}catch(ca){console.log("Miro import error:",
+ca)}this.pasteXml(y,m,C,d);try{mxEvent.consume(d)}catch(ca){}}else if(!g){var Z=this.editor.graph;Z.lastPasteXml=null;Z.pasteCounter=0}}catch(ca){this.handleError(ca)}}}f.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(d){if(Graph.fileSupport)for(var f=null,g=0;g<d.length;g++)mxEvent.addListener(d[g],"dragleave",function(m){null!=f&&(f.parentNode.removeChild(f),f=null);m.stopPropagation();m.preventDefault()}),mxEvent.addListener(d[g],"dragover",mxUtils.bind(this,function(m){(this.editor.graph.isEnabled()||
+"1"!=urlParams.embed)&&null==f&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(f=this.highlightElement());m.stopPropagation();m.preventDefault()})),mxEvent.addListener(d[g],"drop",mxUtils.bind(this,function(m){null!=f&&(f.parentNode.removeChild(f),f=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<m.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(m.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(m)&&
+!mxEvent.isShiftDown(m)):this.openFiles(m.dataTransfer.files,!0);else{var q=this.extractGraphModelFromEvent(m);if(null==q){var y=null!=m.dataTransfer?m.dataTransfer:m.clipboardData;null!=y&&(10==document.documentMode||11==document.documentMode?q=y.getData("Text"):(q=null,q=0<=mxUtils.indexOf(y.types,"text/uri-list")?m.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(y.types,"text/html")?y.getData("text/html"):null,null!=q&&0<q.length?(y=document.createElement("div"),y.innerHTML=this.editor.graph.sanitizeHtml(q),
+y=y.getElementsByTagName("img"),0<y.length&&(q=y[0].getAttribute("src"))):0<=mxUtils.indexOf(y.types,"text/plain")&&(q=y.getData("text/plain"))),null!=q&&(Editor.isPngDataUrl(q)?(q=Editor.extractGraphModelFromPng(q),null!=q&&0<q.length&&this.openLocalFile(q,null,!0)):this.isRemoteFileFormat(q)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(q))).send(mxUtils.bind(this,function(F){200<=F.getStatus()&&
+299>=F.getStatus()&&this.openLocalFile(F.getText(),null,!0)})):/^https?:\/\//.test(q)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(q):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(q)))))}else this.openLocalFile(q,null,!0)}m.stopPropagation();m.preventDefault()}))};EditorUi.prototype.highlightElement=function(d){var f=0,g=0;if(null==d){var m=document.body;var q=document.documentElement;
+var y=(m.clientWidth||q.clientWidth)-3;m=Math.max(m.clientHeight||0,q.clientHeight)-3}else f=d.offsetTop,g=d.offsetLeft,y=d.clientWidth,m=d.clientHeight;q=document.createElement("div");q.style.zIndex=mxPopupMenu.prototype.zIndex+2;q.style.border="3px dotted rgb(254, 137, 12)";q.style.pointerEvents="none";q.style.position="absolute";q.style.top=f+"px";q.style.left=g+"px";q.style.width=Math.max(0,y-3)+"px";q.style.height=Math.max(0,m-3)+"px";null!=d&&d.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(q):
+document.body.appendChild(q);return q};EditorUi.prototype.stringToCells=function(d){d=mxUtils.parseXml(d);var f=this.editor.extractGraphModel(d.documentElement);d=[];if(null!=f){var g=new mxCodec(f.ownerDocument),m=new mxGraphModel;g.decode(f,m);f=m.getChildAt(m.getRoot(),0);for(g=0;g<m.getChildCount(f);g++)d.push(m.getChildAt(f,g))}return d};EditorUi.prototype.openFileHandle=function(d,f,g,m,q){if(null!=f&&0<f.length){!this.useCanvasForExport&&/(\.png)$/i.test(f)?f=f.substring(0,f.length-4)+".drawio":
+/(\.pdf)$/i.test(f)&&(f=f.substring(0,f.length-4)+".drawio");var y=mxUtils.bind(this,function(C){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==C.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,m);try{this.loadLibrary(new LocalLibrary(this,C,f))}catch(I){this.handleError(I,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(C,f,m)});if(/(\.v(dx|sdx?))($|\?)/i.test(f)||
+/(\.vs(x|sx?))($|\?)/i.test(f))this.importVisio(g,mxUtils.bind(this,function(C){this.spinner.stop();y(C)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(C){this.spinner.stop();y(C)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,f))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(g,mxUtils.bind(this,function(C){4==C.readyState&&(this.spinner.stop(),
+200<=C.status&&299>=C.status?y(C.responseText):this.handleError({message:mxResources.get(413==C.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,function(C){this.spinner.stop();this.openLocalFile(C,f,m)}),mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}));else if("<mxlibrary"==d.substring(0,10)){this.spinner.stop();
+null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,m);try{this.loadLibrary(new LocalLibrary(this,d,g.name))}catch(C){this.handleError(C,mxResources.get("errorLoadingFile"))}}else if(0==d.indexOf("PK"))this.importZipFile(g,mxUtils.bind(this,function(C){this.spinner.stop();y(C)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,f,m)}));else{if("image/png"==g.type.substring(0,9))d=this.extractGraphModelFromPng(d);else if("application/pdf"==
+g.type){var F=Editor.extractGraphModelFromPdf(d);null!=F&&(q=null,m=!0,d=F)}this.spinner.stop();this.openLocalFile(d,f,m,q,null!=q?g:null)}}};EditorUi.prototype.openFiles=function(d,f){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var g=0;g<d.length;g++)mxUtils.bind(this,function(m){var q=new FileReader;q.onload=mxUtils.bind(this,function(y){try{this.openFileHandle(y.target.result,m.name,m,f)}catch(F){this.handleError(F)}});q.onerror=mxUtils.bind(this,function(y){this.spinner.stop();
+this.handleError(y);window.openFile=null});"image"!==m.type.substring(0,5)&&"application/pdf"!==m.type||"image/svg"===m.type.substring(0,9)?q.readAsText(m):q.readAsDataURL(m)})(d[g])};EditorUi.prototype.openLocalFile=function(d,f,g,m,q){var y=this.getCurrentFile(),F=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var C=mxUtils.parseXml(d);null!=C&&(this.editor.setGraphXml(C.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,
+d,f||this.defaultFilename,g,m,q))});if(null!=d&&0<d.length)null==y||!y.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=m)?F():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=m)&&null!=y&&y.isModified()?this.confirm(mxResources.get("allChangesLost"),null,F,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(d,f),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=
+y&&y.isModified()?this.confirm(mxResources.get("allChangesLost"),null,F,mxResources.get("cancel"),mxResources.get("discardChanges")):F()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var d={};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)this.updatePageRoot(this.pages[f]),this.addBasenamesForCell(this.pages[f].root,d);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),d);f=[];for(var g in d)f.push(g);return f};EditorUi.prototype.addBasenamesForCell=
+function(d,f){function g(F){if(null!=F){var C=F.lastIndexOf(".");0<C&&(F=F.substring(C+1,F.length));null==f[F]&&(f[F]=!0)}}var m=this.editor.graph,q=m.getCellStyle(d);g(mxStencilRegistry.getBasenameForStencil(q[mxConstants.STYLE_SHAPE]));m.model.isEdge(d)&&(g(mxMarker.getPackageForType(q[mxConstants.STYLE_STARTARROW])),g(mxMarker.getPackageForType(q[mxConstants.STYLE_ENDARROW])));q=m.model.getChildCount(d);for(var y=0;y<q;y++)this.addBasenamesForCell(m.model.getChildAt(d,y),f)};EditorUi.prototype.setGraphEnabled=
+function(d){this.diagramContainer.style.visibility=d?"":"hidden";this.formatContainer.style.visibility=d?"":"hidden";this.sidebarFooterContainer.style.display=d?"":"none";this.sidebarContainer.style.display=d?"":"none";this.hsplit.style.display=d?"":"none";this.editor.graph.setEnabled(d);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=d?"":"hidden",this.ruler.vRuler.container.style.visibility=d?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=d?"":"hidden");
+d||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=
+window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var d=!1;this.installMessageHandler(mxUtils.bind(this,function(f,g,m,q){d||(d=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==f||0==f.length)f=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,f,{}));this.mode=App.MODE_EMBED;this.setFileData(f);if(q)try{var y=this.editor.graph;y.setGridEnabled(!1);y.pageVisible=!1;var F=y.model.cells,C;for(C in F){var I=F[C];null!=
+I&&null!=I.style&&(I.style+=";sketch=1;"+(-1==I.style.indexOf("fontFamily=")||-1<I.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(G){console.log(G)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=m?m:!1;this.updateUi();
+window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(d,f){null!=d?d.getPublicUrl(f):f(null)};EditorUi.prototype.createLoadMessage=function(d){var f=this.editor.graph;return{event:d,
+pageVisible:f.pageVisible,translate:f.view.translate,bounds:f.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:f.view.scale,page:f.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(d){var f=this.editor.graph;f.isEditing()&&f.stopEditing(!f.isInvokesStopCellEditing());var g=window.opener||window.parent;if(this.editor.modified){var m=f.background;if(null==m||m==mxConstants.NONE)m=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,
+null,null,null,null,null,null,!1),f,null,!0,mxUtils.bind(this,function(q){g.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=d?!d:!0,data:Editor.createSvgDataUri(q)}),"*")}),null,null,!0,m,1,this.embedExportBorder)}else d||g.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");d||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,f.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=
+!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler=function(d){var f=null,g=!1,m=!1,q=null,y=mxUtils.bind(this,function(I,G){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,y);mxEvent.addListener(window,"message",mxUtils.bind(this,function(I){if(I.source==
+(window.opener||window.parent)){var G=I.data,Z=null,ca=mxUtils.bind(this,function(ea){if(null!=ea&&"function"===typeof ea.charAt&&"<"!=ea.charAt(0))try{Editor.isPngDataUrl(ea)?ea=Editor.extractGraphModelFromPng(ea):"data:image/svg+xml;base64,"==ea.substring(0,26)?ea=atob(ea.substring(26)):"data:image/svg+xml;utf8,"==ea.substring(0,24)&&(ea=ea.substring(24)),null!=ea&&("%"==ea.charAt(0)?ea=decodeURIComponent(ea):"<"!=ea.charAt(0)&&(ea=Graph.decompress(ea)))}catch(qa){}return ea});if("json"==urlParams.proto){var aa=
+!1;try{G=JSON.parse(G),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[I],"data",[G])}catch(ea){G=null}try{if(null==G)return;if("dialog"==G.action){this.showError(null!=G.titleKey?mxResources.get(G.titleKey):G.title,null!=G.messageKey?mxResources.get(G.messageKey):G.message,null!=G.buttonKey?mxResources.get(G.buttonKey):G.button);null!=G.modified&&(this.editor.modified=G.modified);return}if("layout"==G.action){this.executeLayouts(this.editor.graph.createLayouts(G.layouts));return}if("prompt"==
+G.action){this.spinner.stop();var Y=new FilenameDialog(this,G.defaultValue||"",null!=G.okKey?mxResources.get(G.okKey):G.ok,function(ea){null!=ea?F.postMessage(JSON.stringify({event:"prompt",value:ea,message:G}),"*"):F.postMessage(JSON.stringify({event:"prompt-cancel",message:G}),"*")},null!=G.titleKey?mxResources.get(G.titleKey):G.title);this.showDialog(Y.container,300,80,!0,!1);Y.init();return}if("draft"==G.action){var pa=ca(G.xml);this.spinner.stop();Y=new DraftDialog(this,mxResources.get("draftFound",
+[G.name||this.defaultFilename]),pa,mxUtils.bind(this,function(){this.hideDialog();F.postMessage(JSON.stringify({event:"draft",result:"edit",message:G}),"*")}),mxUtils.bind(this,function(){this.hideDialog();F.postMessage(JSON.stringify({event:"draft",result:"discard",message:G}),"*")}),G.editKey?mxResources.get(G.editKey):null,G.discardKey?mxResources.get(G.discardKey):null,G.ignore?mxUtils.bind(this,function(){this.hideDialog();F.postMessage(JSON.stringify({event:"draft",result:"ignore",message:G}),
+"*")}):null);this.showDialog(Y.container,640,480,!0,!1,mxUtils.bind(this,function(ea){ea&&this.actions.get("exit").funct()}));try{Y.init()}catch(ea){F.postMessage(JSON.stringify({event:"draft",error:ea.toString(),message:G}),"*")}return}if("template"==G.action){this.spinner.stop();var Q=1==G.enableRecent,X=1==G.enableSearch,ha=1==G.enableCustomTemp;if("1"==urlParams.newTempDlg&&!G.templatesOnly&&null!=G.callback){var U=this.getCurrentUser(),ma=new TemplatesDialog(this,function(ea,qa,va){ea=ea||this.emptyDiagramXml;
+F.postMessage(JSON.stringify({event:"template",xml:ea,blank:ea==this.emptyDiagramXml,name:qa,tempUrl:va.url,libs:va.libs,builtIn:null!=va.info&&null!=va.info.custContentId,message:G}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=U?U.id:null,Q?mxUtils.bind(this,function(ea,qa,va){this.remoteInvoke("getRecentDiagrams",[va],null,ea,qa)}):null,X?mxUtils.bind(this,function(ea,qa,va,ua){this.remoteInvoke("searchDiagrams",[ea,ua],null,qa,va)}):null,mxUtils.bind(this,
+function(ea,qa,va){this.remoteInvoke("getFileContent",[ea.url],null,qa,va)}),null,ha?mxUtils.bind(this,function(ea){this.remoteInvoke("getCustomTemplates",null,null,ea,function(){ea({},0)})}):null,!1,!1,!0,!0);this.showDialog(ma.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}Y=new NewDialog(this,!1,G.templatesOnly?!1:null!=G.callback,mxUtils.bind(this,function(ea,qa,va,ua){ea=ea||this.emptyDiagramXml;null!=G.callback?F.postMessage(JSON.stringify({event:"template",xml:ea,blank:ea==
+this.emptyDiagramXml,name:qa,tempUrl:va,libs:ua,builtIn:!0,message:G}),"*"):(d(ea,I,ea!=this.emptyDiagramXml,G.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,Q?mxUtils.bind(this,function(ea){this.remoteInvoke("getRecentDiagrams",[null],null,ea,function(){ea(null,"Network Error!")})}):null,X?mxUtils.bind(this,function(ea,qa){this.remoteInvoke("searchDiagrams",[ea,null],null,qa,function(){qa(null,"Network Error!")})}):null,mxUtils.bind(this,function(ea,
+qa,va){F.postMessage(JSON.stringify({event:"template",docUrl:ea,info:qa,name:va}),"*")}),null,null,ha?mxUtils.bind(this,function(ea){this.remoteInvoke("getCustomTemplates",null,null,ea,function(){ea({},0)})}):null,1==G.withoutType);this.showDialog(Y.container,620,460,!0,!1,mxUtils.bind(this,function(ea){this.sidebar.hideTooltip();ea&&this.actions.get("exit").funct()}));Y.init();return}if("textContent"==G.action){var T=this.getDiagramTextContent();F.postMessage(JSON.stringify({event:"textContent",
+data:T,message:G}),"*");return}if("status"==G.action){null!=G.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(G.messageKey))):null!=G.message&&this.editor.setStatus(mxUtils.htmlEntities(G.message));null!=G.modified&&(this.editor.modified=G.modified);return}if("spinner"==G.action){var M=null!=G.messageKey?mxResources.get(G.messageKey):G.message;null==G.show||G.show?this.spinner.spin(document.body,M):this.spinner.stop();return}if("exit"==G.action){this.actions.get("exit").funct();
+return}if("viewport"==G.action){null!=G.viewport&&(this.embedViewport=G.viewport);return}if("snapshot"==G.action){this.sendEmbeddedSvgExport(!0);return}if("export"==G.action){if("png"==G.format||"xmlpng"==G.format){if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin)){var ia=null!=G.xml?G.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var N=this.editor.graph,O=mxUtils.bind(this,function(ea){this.editor.graph.setEnabled(!0);
+this.spinner.stop();var qa=this.createLoadMessage("export");qa.format=G.format;qa.message=G;qa.data=ea;qa.xml=ia;F.postMessage(JSON.stringify(qa),"*")}),ba=mxUtils.bind(this,function(ea){null==ea&&(ea=Editor.blankImage);"xmlpng"==G.format&&(ea=Editor.writeGraphModelToPng(ea,"tEXt","mxfile",encodeURIComponent(ia)));N!=this.editor.graph&&N.container.parentNode.removeChild(N.container);O(ea)}),la=G.pageId||(null!=this.pages?G.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var u=
+mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=la){var ea=N.getGlobalVariable;N=this.createTemporaryGraph(N.getStylesheet());for(var qa,va=0;va<this.pages.length;va++)if(this.pages[va].getId()==la){qa=this.updatePageRoot(this.pages[va]);break}null==qa&&(qa=this.currentPage);N.getGlobalVariable=function(Ca){return"page"==Ca?qa.getName():"pagenumber"==Ca?1:ea.apply(this,arguments)};document.body.appendChild(N.container);N.model.setRoot(qa.root)}if(null!=G.layerIds){var ua=
+N.model,Aa=ua.getChildCells(ua.getRoot()),za={};for(va=0;va<G.layerIds.length;va++)za[G.layerIds[va]]=!0;for(va=0;va<Aa.length;va++)ua.setVisible(Aa[va],za[Aa[va].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(Ca){ba(Ca.toDataURL("image/png"))}),G.width,null,G.background,mxUtils.bind(this,function(){ba(null)}),null,null,G.scale,G.transparent,G.shadow,null,N,G.border,null,G.grid,G.keepTheme)});null!=G.xml&&0<G.xml.length&&(g=!0,this.setFileData(ia),g=!1);u()}else(new mxXmlRequest(EXPORT_URL,
+"format=png&embedXml="+("xmlpng"==G.format?"1":"0")+(null!=la?"&pageId="+la:"")+(null!=G.layerIds&&0<G.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:G.layerIds})):"")+(null!=G.scale?"&scale="+G.scale:"")+"&base64=1&xml="+encodeURIComponent(ia))).send(mxUtils.bind(this,function(ea){200<=ea.getStatus()&&299>=ea.getStatus()?O("data:image/png;base64,"+ea.getText()):ba(null)}),mxUtils.bind(this,function(){ba(null)}))}}else if(u=mxUtils.bind(this,function(){var ea=this.createLoadMessage("export");
+ea.message=G;if("html2"==G.format||"html"==G.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var qa=this.getXmlFileData();ea.xml=mxUtils.getXml(qa);ea.data=this.getFileData(null,null,!0,null,null,null,qa);ea.format=G.format}else if("html"==G.format)qa=this.editor.getGraphXml(),ea.data=this.getHtml(qa,this.editor.graph),ea.xml=mxUtils.getXml(qa),ea.format=G.format;else{mxSvgCanvas2D.prototype.foAltText=null;qa=null!=G.background?G.background:this.editor.graph.background;qa==
+mxConstants.NONE&&(qa=null);ea.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);ea.format="svg";var va=mxUtils.bind(this,function(ua){this.editor.graph.setEnabled(!0);this.spinner.stop();ea.data=Editor.createSvgDataUri(ua);F.postMessage(JSON.stringify(ea),"*")});if("xmlsvg"==G.format)(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin))&&this.getEmbeddedSvg(ea.xml,this.editor.graph,null,!0,va,null,null,G.embedImages,
+qa,G.scale,G.border,G.shadow,G.keepTheme);else if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin))this.editor.graph.setEnabled(!1),qa=this.editor.graph.getSvg(qa,G.scale,G.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||G.shadow,null,G.keepTheme),(this.editor.graph.shadowVisible||G.shadow)&&this.editor.graph.addSvgShadow(qa),this.embedFonts(qa,mxUtils.bind(this,function(ua){G.embedImages||null==G.embedImages?this.editor.convertImages(ua,
+mxUtils.bind(this,function(Aa){va(mxUtils.getXml(Aa))})):va(mxUtils.getXml(ua))}));return}F.postMessage(JSON.stringify(ea),"*")}),null!=G.xml&&0<G.xml.length){if(this.editor.graph.mathEnabled){var H=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){H.apply(this,arguments);u()}}g=!0;this.setFileData(G.xml);g=!1;this.editor.graph.mathEnabled||u()}else u();return}if("load"==G.action){aa=G.toSketch;m=1==G.autosave;this.hideDialog();null!=G.modified&&null==urlParams.modified&&(urlParams.modified=G.modified);
+null!=G.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=G.saveAndExit);null!=G.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=G.noSaveBtn);if(null!=G.rough){var P=Editor.sketchMode;this.doSetSketchMode(G.rough);P!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=G.dark&&(P=Editor.darkMode,this.doSetDarkMode(G.dark),P!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));null!=G.border&&(this.embedExportBorder=G.border);
+null!=G.background&&(this.embedExportBackground=G.background);null!=G.viewport&&(this.embedViewport=G.viewport);this.embedExitPoint=null;if(null!=G.rect){var W=this.embedExportBorder;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.top=G.rect.top+"px";this.diagramContainer.style.left=G.rect.left+"px";this.diagramContainer.style.height=G.rect.height+"px";this.diagramContainer.style.width=G.rect.width+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right=
+"";Z=mxUtils.bind(this,function(){var ea=this.editor.graph,qa=ea.maxFitScale;ea.maxFitScale=G.maxFitScale;ea.fit(2*W);ea.maxFitScale=qa;ea.container.scrollTop-=2*W;ea.container.scrollLeft-=2*W;this.fireEvent(new mxEventObject("editInlineStart","data",[G]))})}null!=G.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=G.noExitBtn);null!=G.title&&null!=this.buttonContainer&&(pa=document.createElement("span"),mxUtils.write(pa,G.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),
+this.buttonContainer.appendChild(pa),this.embedFilenameSpan=pa);try{G.libs&&this.sidebar.showEntries(G.libs)}catch(ea){}G=null!=G.xmlpng?this.extractGraphModelFromPng(G.xmlpng):null!=G.descriptor?G.descriptor:G.xml}else{if("merge"==G.action){var R=this.getCurrentFile();null!=R&&(pa=ca(G.xml),null!=pa&&""!=pa&&R.mergeFile(new LocalFile(this,pa),function(){F.postMessage(JSON.stringify({event:"merge",message:G}),"*")},function(ea){F.postMessage(JSON.stringify({event:"merge",message:G,error:ea}),"*")}))}else"remoteInvokeReady"==
+G.action?this.handleRemoteInvokeReady(F):"remoteInvoke"==G.action?this.handleRemoteInvoke(G,I.origin):"remoteInvokeResponse"==G.action?this.handleRemoteInvokeResponse(G):F.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(G)}),"*");return}}catch(ea){this.handleError(ea)}}var da=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(ea,qa){g=!0;
+try{d(ea,qa,null,aa)}catch(va){this.handleError(va)}g=!1;null!=urlParams.modified&&this.editor.setStatus("");q=da();m&&null==f&&(f=mxUtils.bind(this,function(va,ua){va=da();va==q||g||(ua=this.createLoadMessage("autosave"),ua.xml=va,(window.opener||window.parent).postMessage(JSON.stringify(ua),"*"));q=va}),this.editor.graph.model.addListener(mxEvent.CHANGE,f),this.editor.graph.addListener("gridSizeChanged",f),this.editor.graph.addListener("shadowVisibleChanged",f),this.addListener("pageFormatChanged",
+f),this.addListener("pageScaleChanged",f),this.addListener("backgroundColorChanged",f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",f),this.addListener("pageViewChanged",f));if("1"==urlParams.returnbounds||"json"==urlParams.proto)qa=this.createLoadMessage("load"),qa.xml=ea,F.postMessage(JSON.stringify(qa),"*");null!=Z&&Z()});null!=G&&
+"function"===typeof G.substring&&"data:application/vnd.visio;base64,"==G.substring(0,34)?(ca="0M8R4KGxGuE"==G.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(G.substring(G.indexOf(",")+1)),function(ea){fa(ea,I)},mxUtils.bind(this,function(ea){this.handleError(ea)}),ca)):null!=G&&"function"===typeof G.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(G,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(G,
+mxUtils.bind(this,function(ea){4==ea.readyState&&200<=ea.status&&299>=ea.status&&"<mxGraphModel"==ea.responseText.substring(0,13)&&fa(ea.responseText,I)}),""):null!=G&&"function"===typeof G.substring&&this.isLucidChartData(G)?this.convertLucidChart(G,mxUtils.bind(this,function(ea){fa(ea)}),mxUtils.bind(this,function(ea){this.handleError(ea)})):null==G||"object"!==typeof G||null==G.format||null==G.data&&null==G.url?(G=ca(G),fa(G,I)):this.loadDescriptor(G,mxUtils.bind(this,function(ea){fa(da(),I)}),
+mxUtils.bind(this,function(ea){this.handleError(ea,mxResources.get("errorLoadingFile"))}))}}));var F=window.opener||window.parent;y="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";F.postMessage(y,"*");if("json"==urlParams.proto){var C=this.editor.graph.openLink;this.editor.graph.openLink=function(I,G,Z){C.apply(this,arguments);F.postMessage(JSON.stringify({event:"openLink",href:I,target:G,allowOpener:Z}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=
+this.menubar&&"1"!=urlParams.embedInline){var d=document.createElement("div");d.style.display="inline-block";d.style.position="absolute";d.style.paddingTop="atlas"==uiTheme||"1"==urlParams.atlas?"2px":"0px";d.style.paddingLeft="8px";d.style.paddingBottom="2px";var f=document.createElement("button");f.className="geBigButton";var g=f;if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var m="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(f,
+m);f.setAttribute("title",m);mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));d.appendChild(f)}}else mxUtils.write(f,mxResources.get("save")),f.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),d.appendChild(f),"1"==urlParams.saveAndExit&&(f=document.createElement("a"),mxUtils.write(f,mxResources.get("saveAndExit")),f.setAttribute("title",
+mxResources.get("saveAndExit")),f.className="geBigButton geBigStandardButton",f.style.marginLeft="6px",mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),d.appendChild(f),g=f);"1"!=urlParams.noExitBtn&&(f=document.createElement("a"),g="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(f,g),f.setAttribute("title",g),f.className="geBigButton geBigStandardButton",f.style.marginLeft="6px",mxEvent.addListener(f,
+"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),d.appendChild(f),g=f);g.style.marginRight="20px";this.toolbar.container.appendChild(d);this.toolbar.staticElements.push(d);d.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(d){this.importCsv(d)}),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.loadOrgChartLayouts=function(d){var f=mxUtils.bind(this,function(){this.loadingOrgChart=!1;this.spinner.stop();d()});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?f():this.spinner.spin(document.body,mxResources.get("loading"))&&
+(this.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",f)})})}):mxscript(DRAWIO_BASE_URL+"/js/orgchart.min.js",f))};EditorUi.prototype.importCsv=function(d,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(d,f)}))};EditorUi.prototype.doImportCsv=function(d,f){try{var g=d.split("\n"),
+m=[],q=[],y=[],F={};if(0<g.length){var C={},I=this.editor.graph,G=null,Z=null,ca=null,aa=null,Y=null,pa=null,Q=null,X="whiteSpace=wrap;html=1;",ha=null,U=null,ma="",T="auto",M="auto",ia=!1,N=null,O=null,ba=40,la=40,u=100,H=0,P=function(){null!=f?f(ya):(I.setSelectionCells(ya),I.scrollCellToVisible(I.getSelectionCell()))},W=I.getFreeInsertPoint(),R=W.x,da=W.y;W=da;var fa=null,ea="auto";U=null;for(var qa=[],va=null,ua=null,Aa=0;Aa<g.length&&"#"==g[Aa].charAt(0);){d=g[Aa].replace(/\r$/,"");for(Aa++;Aa<
+g.length&&"\\"==d.charAt(d.length-1)&&"#"==g[Aa].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(g[Aa].substring(1)),Aa++;if("#"!=d.charAt(1)){var za=d.indexOf(":");if(0<za){var Ca=mxUtils.trim(d.substring(1,za)),sa=mxUtils.trim(d.substring(za+1));"label"==Ca?fa=I.sanitizeHtml(sa):"labelname"==Ca&&0<sa.length&&"-"!=sa?Y=sa:"labels"==Ca&&0<sa.length&&"-"!=sa?Q=JSON.parse(sa):"style"==Ca?Z=sa:"parentstyle"==Ca?X=sa:"unknownStyle"==Ca&&"-"!=sa?pa=sa:"stylename"==Ca&&0<sa.length&&"-"!=sa?aa=sa:"styles"==
+Ca&&0<sa.length&&"-"!=sa?ca=JSON.parse(sa):"vars"==Ca&&0<sa.length&&"-"!=sa?G=JSON.parse(sa):"identity"==Ca&&0<sa.length&&"-"!=sa?ha=sa:"parent"==Ca&&0<sa.length&&"-"!=sa?U=sa:"namespace"==Ca&&0<sa.length&&"-"!=sa?ma=sa:"width"==Ca?T=sa:"height"==Ca?M=sa:"collapsed"==Ca&&"-"!=sa?ia="true"==sa:"left"==Ca&&0<sa.length?N=sa:"top"==Ca&&0<sa.length?O=sa:"ignore"==Ca?ua=sa.split(","):"connect"==Ca?qa.push(JSON.parse(sa)):"link"==Ca?va=sa:"padding"==Ca?H=parseFloat(sa):"edgespacing"==Ca?ba=parseFloat(sa):
+"nodespacing"==Ca?la=parseFloat(sa):"levelspacing"==Ca?u=parseFloat(sa):"layout"==Ca&&(ea=sa)}}}if(null==g[Aa])throw Error(mxResources.get("invalidOrMissingFile"));var Va=this.editor.csvToArray(g[Aa].replace(/\r$/,""));za=d=null;Ca=[];for(sa=0;sa<Va.length;sa++)ha==Va[sa]&&(d=sa),U==Va[sa]&&(za=sa),Ca.push(mxUtils.trim(Va[sa]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==fa&&(fa="%"+Ca[0]+"%");if(null!=qa)for(var Ua=0;Ua<qa.length;Ua++)null==C[qa[Ua].to]&&(C[qa[Ua].to]=
+{});ha=[];for(sa=Aa+1;sa<g.length;sa++){var Ra=this.editor.csvToArray(g[sa].replace(/\r$/,""));if(null==Ra){var Za=40<g[sa].length?g[sa].substring(0,40)+"...":g[sa];throw Error(Za+" ("+sa+"):\n"+mxResources.get("containsValidationErrors"));}0<Ra.length&&ha.push(Ra)}I.model.beginUpdate();try{for(sa=0;sa<ha.length;sa++){Ra=ha[sa];var Ha=null,db=null!=d?ma+Ra[d]:null;g=!1;null!=db&&(Ha=I.model.getCell(db),g=null==Ha||0<=mxUtils.indexOf(m,Ha));var cb=new mxCell(fa,new mxGeometry(R,W,0,0),Z||"whiteSpace=wrap;html=1;");
+cb.collapsed=ia;cb.vertex=!0;cb.id=db;null==Ha||g||I.model.setCollapsed(Ha,ia);for(var z=0;z<Ra.length;z++)I.setAttributeForCell(cb,Ca[z],Ra[z]),null==Ha||g||I.setAttributeForCell(Ha,Ca[z],Ra[z]);if(null!=Y&&null!=Q){var K=Q[cb.getAttribute(Y)];null!=K&&(I.labelChanged(cb,K),null==Ha||g||I.cellLabelChanged(Ha,K))}if(null!=aa&&null!=ca){var L=ca[cb.getAttribute(aa)];null!=L&&(cb.style=L)}I.setAttributeForCell(cb,"placeholders","1");cb.style=I.replacePlaceholders(cb,cb.style,G);null==Ha||g?I.fireEvent(new mxEventObject("cellsInserted",
+"cells",[cb])):(I.model.setStyle(Ha,cb.style),0>mxUtils.indexOf(y,Ha)&&y.push(Ha),I.fireEvent(new mxEventObject("cellsInserted","cells",[Ha])));g=null!=Ha;Ha=cb;if(!g)for(Ua=0;Ua<qa.length;Ua++)C[qa[Ua].to][Ha.getAttribute(qa[Ua].to)]=Ha;null!=va&&"link"!=va&&(I.setLinkForCell(Ha,Ha.getAttribute(va)),I.setAttributeForCell(Ha,va,null));var S=this.editor.graph.getPreferredSizeForCell(Ha);U=null!=za?I.model.getCell(ma+Ra[za]):null;if(Ha.vertex){Za=null!=U?0:R;Aa=null!=U?0:da;null!=N&&null!=Ha.getAttribute(N)&&
+(Ha.geometry.x=Za+parseFloat(Ha.getAttribute(N)));null!=O&&null!=Ha.getAttribute(O)&&(Ha.geometry.y=Aa+parseFloat(Ha.getAttribute(O)));var V="@"==T.charAt(0)?Ha.getAttribute(T.substring(1)):null;Ha.geometry.width=null!=V&&"auto"!=V?parseFloat(Ha.getAttribute(T.substring(1))):"auto"==T||"auto"==V?S.width+H:parseFloat(T);var ja="@"==M.charAt(0)?Ha.getAttribute(M.substring(1)):null;Ha.geometry.height=null!=ja&&"auto"!=ja?parseFloat(ja):"auto"==M||"auto"==ja?S.height+H:parseFloat(M);W+=Ha.geometry.height+
+la}g?(null==F[db]&&(F[db]=[]),F[db].push(Ha)):(m.push(Ha),null!=U?(U.style=I.replacePlaceholders(U,X,G),I.addCell(Ha,U),q.push(U)):y.push(I.addCell(Ha)))}for(sa=0;sa<q.length;sa++)V="@"==T.charAt(0)?q[sa].getAttribute(T.substring(1)):null,ja="@"==M.charAt(0)?q[sa].getAttribute(M.substring(1)):null,"auto"!=T&&"auto"!=V||"auto"!=M&&"auto"!=ja||I.updateGroupBounds([q[sa]],H,!0);var na=y.slice(),ya=y.slice();for(Ua=0;Ua<qa.length;Ua++){var ra=qa[Ua];for(sa=0;sa<m.length;sa++){Ha=m[sa];var ta=mxUtils.bind(this,
+function(Na,hb,Qa){var mb=hb.getAttribute(Qa.from);if(null!=mb&&""!=mb){mb=mb.split(",");for(var ub=0;ub<mb.length;ub++){var bb=C[Qa.to][mb[ub]];if(null==bb&&null!=pa){bb=new mxCell(mb[ub],new mxGeometry(R,da,0,0),pa);bb.style=I.replacePlaceholders(hb,bb.style,G);var eb=this.editor.graph.getPreferredSizeForCell(bb);bb.geometry.width=eb.width+H;bb.geometry.height=eb.height+H;C[Qa.to][mb[ub]]=bb;bb.vertex=!0;bb.id=mb[ub];y.push(I.addCell(bb))}if(null!=bb){eb=Qa.label;null!=Qa.fromlabel&&(eb=(hb.getAttribute(Qa.fromlabel)||
+"")+(eb||""));null!=Qa.sourcelabel&&(eb=I.replacePlaceholders(hb,Qa.sourcelabel,G)+(eb||""));null!=Qa.tolabel&&(eb=(eb||"")+(bb.getAttribute(Qa.tolabel)||""));null!=Qa.targetlabel&&(eb=(eb||"")+I.replacePlaceholders(bb,Qa.targetlabel,G));var kb="target"==Qa.placeholders==!Qa.invert?bb:Na;kb=null!=Qa.style?I.replacePlaceholders(kb,Qa.style,G):I.createCurrentEdgeStyle();eb=I.insertEdge(null,null,eb||"",Qa.invert?bb:Na,Qa.invert?Na:bb,kb);if(null!=Qa.labels)for(kb=0;kb<Qa.labels.length;kb++){var ib=
+Qa.labels[kb],pb=new mxCell(ib.label||kb,new mxGeometry(null!=ib.x?ib.x:0,null!=ib.y?ib.y:0,0,0),"resizable=0;html=1;");pb.vertex=!0;pb.connectable=!1;pb.geometry.relative=!0;null!=ib.placeholders&&(pb.value=I.replacePlaceholders("target"==ib.placeholders==!Qa.invert?bb:Na,pb.value,G));if(null!=ib.dx||null!=ib.dy)pb.geometry.offset=new mxPoint(null!=ib.dx?ib.dx:0,null!=ib.dy?ib.dy:0);eb.insert(pb)}ya.push(eb);mxUtils.remove(Qa.invert?Na:bb,na)}}}});ta(Ha,Ha,ra);if(null!=F[Ha.id])for(z=0;z<F[Ha.id].length;z++)ta(Ha,
+F[Ha.id][z],ra)}}if(null!=ua)for(sa=0;sa<m.length;sa++)for(Ha=m[sa],z=0;z<ua.length;z++)I.setAttributeForCell(Ha,mxUtils.trim(ua[z]),null);if(0<y.length){var Da=new mxParallelEdgeLayout(I);Da.spacing=ba;Da.checkOverlap=!0;var Oa=function(){0<Da.spacing&&Da.execute(I.getDefaultParent());for(var Na=0;Na<y.length;Na++){var hb=I.getCellGeometry(y[Na]);hb.x=Math.round(I.snap(hb.x));hb.y=Math.round(I.snap(hb.y));"auto"==T&&(hb.width=Math.round(I.snap(hb.width)));"auto"==M&&(hb.height=Math.round(I.snap(hb.height)))}};
+if("["==ea.charAt(0)){var Ma=P;I.view.validate();this.executeLayouts(I.createLayouts(JSON.parse(ea)),function(){Oa();Ma()});P=null}else if("circle"==ea){var Wa=new mxCircleLayout(I);Wa.disableEdgeStyle=!1;Wa.resetEdges=!1;var Sa=Wa.isVertexIgnored;Wa.isVertexIgnored=function(Na){return Sa.apply(this,arguments)||0>mxUtils.indexOf(y,Na)};this.executeLayout(function(){Wa.execute(I.getDefaultParent());Oa()},!0,P);P=null}else if("horizontaltree"==ea||"verticaltree"==ea||"auto"==ea&&ya.length==2*y.length-
+1&&1==na.length){I.view.validate();var Fa=new mxCompactTreeLayout(I,"horizontaltree"==ea);Fa.levelDistance=la;Fa.edgeRouting=!1;Fa.resetEdges=!1;this.executeLayout(function(){Fa.execute(I.getDefaultParent(),0<na.length?na[0]:null)},!0,P);P=null}else if("horizontalflow"==ea||"verticalflow"==ea||"auto"==ea&&1==na.length){I.view.validate();var Ja=new mxHierarchicalLayout(I,"horizontalflow"==ea?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);Ja.intraCellSpacing=la;Ja.parallelEdgeSpacing=ba;Ja.interRankCellSpacing=
+u;Ja.disableEdgeStyle=!1;this.executeLayout(function(){Ja.execute(I.getDefaultParent(),ya);I.moveCells(ya,R,da)},!0,P);P=null}else if("orgchart"==ea){I.view.validate();var xa=new mxOrgChartLayout(I,2,u,la),Ba=xa.isVertexIgnored;xa.isVertexIgnored=function(Na){return Ba.apply(this,arguments)||0>mxUtils.indexOf(y,Na)};this.executeLayout(function(){xa.execute(I.getDefaultParent());Oa()},!0,P);P=null}else if("organic"==ea||"auto"==ea&&ya.length>y.length){I.view.validate();var Pa=new mxFastOrganicLayout(I);
+Pa.forceConstant=3*la;Pa.disableEdgeStyle=!1;Pa.resetEdges=!1;var Ka=Pa.isVertexIgnored;Pa.isVertexIgnored=function(Na){return Ka.apply(this,arguments)||0>mxUtils.indexOf(y,Na)};this.executeLayout(function(){Pa.execute(I.getDefaultParent());Oa()},!0,P);P=null}}this.hideDialog()}finally{I.model.endUpdate()}null!=P&&P()}}catch(Na){this.handleError(Na)}};EditorUi.prototype.getSearch=function(d){var f="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=d&&0<window.location.search.length){var g="?",
+m;for(m in urlParams)0>mxUtils.indexOf(d,m)&&null!=urlParams[m]&&(f+=g+m+"="+urlParams[m],g="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(d){d=null!=d?d:window.location.pathname;var f=0<d.indexOf("?")?1:0;if("1"==urlParams.offline)d+=window.location.search;else{var g="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),m;for(m in urlParams)0>mxUtils.indexOf(g,m)&&(d=0==f?d+"?":d+"&",null!=urlParams[m]&&(d+=m+"="+urlParams[m],
+f++))}return d};EditorUi.prototype.showLinkDialog=function(d,f,g,m,q){d=new LinkDialog(this,d,f,g,!0,m,q);this.showDialog(d.container,560,130,!0,!0);d.init()};EditorUi.prototype.getServiceCount=function(d){var f=1;null==this.drive&&"function"!==typeof window.DriveClient||f++;null==this.dropbox&&"function"!==typeof window.DropboxClient||f++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||f++;null!=this.gitHub&&f++;null!=this.gitLab&&f++;d&&isLocalStorage&&"1"==urlParams.browser&&f++;
+return f};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var d=this.getCurrentFile(),f=null!=d||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(f);this.menus.get("viewZoom").setEnabled(f);var g=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==d||d.isRestricted());this.actions.get("makeCopy").setEnabled(!g);this.actions.get("print").setEnabled(!g);this.menus.get("exportAs").setEnabled(!g);this.menus.get("embed").setEnabled(!g);
+g="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(g);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(g),this.menus.get("newLibrary").setEnabled(g));d="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=d&&d.isEditable();this.actions.get("image").setEnabled(f);this.actions.get("zoomIn").setEnabled(f);this.actions.get("zoomOut").setEnabled(f);this.actions.get("resetView").setEnabled(f);this.actions.get("undo").setEnabled(this.canUndo()&&
+d);this.actions.get("redo").setEnabled(this.canRedo()&&d);this.menus.get("edit").setEnabled(f);this.menus.get("view").setEnabled(f);this.menus.get("importFrom").setEnabled(d);this.menus.get("arrange").setEnabled(d);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(d),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(d));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=
+function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var d=this.getCurrentFile();return null!=d&&d.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var t=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){t.apply(this,arguments);var d=this.editor.graph,f=this.getCurrentFile(),g=this.getSelectionState(),m=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(m);
+this.actions.get("autosave").setEnabled(null!=f&&f.isEditable()&&f.isAutosaveOptional());this.actions.get("guides").setEnabled(m);this.actions.get("editData").setEnabled(d.isEnabled());this.actions.get("shadowVisible").setEnabled(m);this.actions.get("connectionArrows").setEnabled(m);this.actions.get("connectionPoints").setEnabled(m);this.actions.get("copyStyle").setEnabled(m&&!d.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(m&&0<g.cells.length);this.actions.get("editGeometry").setEnabled(0<
+g.vertices.length);this.actions.get("createShape").setEnabled(m);this.actions.get("createRevision").setEnabled(m);this.actions.get("moveToFolder").setEnabled(null!=f);this.actions.get("makeCopy").setEnabled(null!=f&&!f.isRestricted());this.actions.get("editDiagram").setEnabled(m&&(null==f||!f.isRestricted()));this.actions.get("publishLink").setEnabled(null!=f&&!f.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!=f&&f.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=f);this.menus.get("publish").setEnabled(null!=f&&!f.isRestricted());f=this.actions.get("findReplace");f.setEnabled("hidden"!=this.diagramContainer.style.visibility);f.label=mxResources.get("find")+(d.isEnabled()?"/"+mxResources.get("replace"):
+"")+"...";d=d.view.getState(d.getSelectionCell());this.actions.get("editShape").setEnabled(m&&null!=d&&null!=d.shape&&null!=d.shape.stencil)};var E=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);E.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(d,f,g,m,q,y,F,C){var I=d.editor.graph;
+if("xml"==g)d.hideDialog(),d.saveData(f,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");else if("svg"==g)d.hideDialog(),d.saveData(f,"svg",mxUtils.getXml(I.getSvg(m,q,y)),"image/svg+xml");else{var G=d.getFileData(!0,null,null,null,null,!0),Z=I.getGraphBounds(),ca=Math.floor(Z.width*q/I.view.scale),aa=Math.floor(Z.height*q/I.view.scale);if(G.length<=MAX_REQUEST_SIZE&&ca*aa<MAX_AREA)if(d.hideDialog(),"png"!=g&&"jpg"!=g&&"jpeg"!=g||!d.isExportToCanvas()){var Y={globalVars:I.getExportVariables()};
+C&&(Y.grid={size:I.gridSize,steps:I.view.gridSteps,color:I.view.gridColor});d.saveRequest(f,g,function(pa,Q){return new mxXmlRequest(EXPORT_URL,"format="+g+"&base64="+(Q||"0")+(null!=pa?"&filename="+encodeURIComponent(pa):"")+"&extras="+encodeURIComponent(JSON.stringify(Y))+(0<F?"&dpi="+F:"")+"&bg="+(null!=m?m:"none")+"&w="+ca+"&h="+aa+"&border="+y+"&xml="+encodeURIComponent(G))})}else"png"==g?d.exportImage(q,null==m||"none"==m,!0,!1,!1,y,!0,!1,null,C,F):d.exportImage(q,!1,!0,!1,!1,y,!0,!1,"jpeg",
+C);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var d=this.editor.graph,f="";if(null!=this.pages)for(var g=0;g<this.pages.length;g++){var m=d;this.currentPage!=this.pages[g]&&(m=this.createTemporaryGraph(d.getStylesheet()),this.updatePageRoot(this.pages[g]),m.model.setRoot(this.pages[g].root));f+=this.pages[g].getName()+" "+m.getIndexableText()+" "}else f=d.getIndexableText();this.editor.graph.setEnabled(!0);
+return f};EditorUi.prototype.showRemotelyStoredLibrary=function(d){var f={},g=document.createElement("div");g.style.whiteSpace="nowrap";var m=document.createElement("h3");mxUtils.write(m,mxUtils.htmlEntities(d));m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(m);var q=document.createElement("div");q.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";q.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';
+var y={};try{var F=mxSettings.getCustomLibraries();for(d=0;d<F.length;d++){var C=F[d];if("R"==C.substring(0,1)){var I=JSON.parse(decodeURIComponent(C.substring(1)));y[I[0]]={id:I[0],title:I[1],downloadUrl:I[2]}}}}catch(G){}this.remoteInvoke("getCustomLibraries",null,null,function(G){q.innerText="";if(0==G.length)q.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var Z=0;Z<G.length;Z++){var ca=G[Z];y[ca.id]&&
+(f[ca.id]=ca);var aa=this.addCheckbox(q,ca.title,y[ca.id]);(function(Y,pa){mxEvent.addListener(pa,"change",function(){this.checked?f[Y.id]=Y:delete f[Y.id]})})(ca,aa)}},mxUtils.bind(this,function(G){q.innerText="";var Z=document.createElement("div");Z.style.padding="8px";Z.style.textAlign="center";mxUtils.write(Z,mxResources.get("error")+": ");mxUtils.write(Z,null!=G&&null!=G.message?G.message:mxResources.get("unknownError"));q.appendChild(Z)}));g.appendChild(q);g=new CustomDialog(this,g,mxUtils.bind(this,
+function(){this.spinner.spin(document.body,mxResources.get("loading"));var G=0,Z;for(Z in f)null==y[Z]&&(G++,mxUtils.bind(this,function(ca){this.remoteInvoke("getFileContent",[ca.downloadUrl],null,mxUtils.bind(this,function(aa){G--;0==G&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,aa,ca))}catch(Y){this.handleError(Y,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){G--;0==G&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(f[Z]));
+for(Z in y)f[Z]||this.closeLibrary(new RemoteLibrary(this,null,y[Z]));0==G&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(g.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(d){this.remoteWin=d;for(var f=0;f<this.remoteInvokeQueue.length;f++)d.postMessage(this.remoteInvokeQueue[f],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(d){var f=d.msgMarkers,g=this.remoteInvokeCallbacks[f.callbackId];if(null==g)throw Error("No callback for "+(null!=f?f.callbackId:"null"));d.error?g.error&&g.error(d.error.errResp):
+g.callback&&g.callback.apply(this,d.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,f,g,m,q){var y=!0,F=window.setTimeout(mxUtils.bind(this,function(){y=!1;q({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),C=mxUtils.bind(this,function(){window.clearTimeout(F);y&&m.apply(this,arguments)}),I=mxUtils.bind(this,function(){window.clearTimeout(F);y&&q.apply(this,arguments)});g=g||{};g.callbackId=this.remoteInvokeCallbacks.length;
+this.remoteInvokeCallbacks.push({callback:C,error:I});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:f,msgMarkers:g});null!=this.remoteWin?this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,f){var g=mxUtils.bind(this,function(G,Z){var ca={event:"remoteInvokeResponse",msgMarkers:d.msgMarkers};null!=Z?ca.error={errResp:Z}:null!=G&&(ca.resp=G);this.remoteWin.postMessage(JSON.stringify(ca),"*")});try{var m=d.funtionName,
+q=this.remoteInvokableFns[m];if(null!=q&&"function"===typeof this[m]){if(q.allowedDomains){for(var y=!1,F=0;F<q.allowedDomains.length;F++)if(f=="https://"+q.allowedDomains[F]){y=!0;break}if(!y){g(null,"Invalid Call: "+m+" is not allowed.");return}}var C=d.functionArgs;Array.isArray(C)||(C=[]);if(q.isAsync)C.push(function(){g(Array.prototype.slice.apply(arguments))}),C.push(function(G){g(null,G||"Unkown Error")}),this[m].apply(this,C);else{var I=this[m].apply(this,C);g([I])}}else g(null,"Invalid Call: "+
+m+" is not found.")}catch(G){g(null,"Invalid Call: An error occurred, "+G.message)}};EditorUi.prototype.openDatabase=function(d,f){if(null==this.database){var g=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=g)try{var m=g.open("database",2);m.onupgradeneeded=function(q){try{var y=m.result;1>q.oldVersion&&y.createObjectStore("objects",{keyPath:"key"});2>q.oldVersion&&(y.createObjectStore("files",{keyPath:"title"}),y.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=
+isLocalStorage)}catch(F){null!=f&&f(F)}};m.onsuccess=mxUtils.bind(this,function(q){var y=m.result;this.database=y;EditorUi.migrateStorageFiles&&(StorageFile.migrate(y),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(F){if(!F||"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 I=!0,G=!1,Z,ca=0,aa=mxUtils.bind(this,function(){G=!0;this.setDatabaseItem(".drawioMigrated3",!0);C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),Y=mxUtils.bind(this,function(){ca++;pa()}),pa=mxUtils.bind(this,function(){try{if(ca>=Z.length)aa();else{var X=Z[ca];StorageFile.getFileContent(this,X,mxUtils.bind(this,function(ha){null==ha||".scratchpad"==X&&ha==this.emptyLibraryXml?C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
+funtionName:"getLocalStorageFile",functionArgs:[X]}),"*"):Y()}),Y)}}catch(ha){console.log(ha)}}),Q=mxUtils.bind(this,function(X){try{this.setDatabaseItem(null,[{title:X.title,size:X.data.length,lastModified:Date.now(),type:X.isLib?"L":"F"},{title:X.title,data:X.data}],Y,Y,["filesInfo","files"])}catch(ha){console.log(ha)}});F=mxUtils.bind(this,function(X){try{if(X.source==C.contentWindow){var ha={};try{ha=JSON.parse(X.data)}catch(U){}"init"==ha.event?(C.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),
+"*"),C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=ha.event||G||(I?null!=ha.resp&&0<ha.resp.length&&null!=ha.resp[0]?(Z=ha.resp[0],I=!1,pa()):aa():null!=ha.resp&&0<ha.resp.length&&null!=ha.resp[0]?Q(ha.resp[0]):Y())}}catch(U){console.log(U)}});window.addEventListener("message",F)}})));d(y);y.onversionchange=function(){y.close()}});m.onerror=f;m.onblocked=function(){}}catch(q){null!=f&&f(q)}else null!=f&&f()}else d(this.database)};
+EditorUi.prototype.setDatabaseItem=function(d,f,g,m,q){this.openDatabase(mxUtils.bind(this,function(y){try{q=q||"objects";Array.isArray(q)||(q=[q],d=[d],f=[f]);var F=y.transaction(q,"readwrite");F.oncomplete=g;F.onerror=m;for(y=0;y<q.length;y++)F.objectStore(q[y]).put(null!=d&&null!=d[y]?{key:d[y],data:f[y]}:f[y])}catch(C){null!=m&&m(C)}}),m)};EditorUi.prototype.removeDatabaseItem=function(d,f,g,m){this.openDatabase(mxUtils.bind(this,function(q){m=m||"objects";Array.isArray(m)||(m=[m],d=[d]);q=q.transaction(m,
+"readwrite");q.oncomplete=f;q.onerror=g;for(var y=0;y<m.length;y++)q.objectStore(m[y]).delete(d[y])}),g)};EditorUi.prototype.getDatabaseItem=function(d,f,g,m){this.openDatabase(mxUtils.bind(this,function(q){try{m=m||"objects";var y=q.transaction([m],"readonly").objectStore(m).get(d);y.onsuccess=function(){f(y.result)};y.onerror=g}catch(F){null!=g&&g(F)}}),g)};EditorUi.prototype.getDatabaseItems=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(m){try{g=g||"objects";var q=m.transaction([g],
+"readonly").objectStore(g).openCursor(IDBKeyRange.lowerBound(0)),y=[];q.onsuccess=function(F){null==F.target.result?d(y):(y.push(F.target.result.value),F.target.result.continue())};q.onerror=f}catch(F){null!=f&&f(F)}}),f)};EditorUi.prototype.getDatabaseItemKeys=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(m){try{g=g||"objects";var q=m.transaction([g],"readonly").objectStore(g).getAllKeys();q.onsuccess=function(){d(q.result)};q.onerror=f}catch(y){null!=f&&f(y)}}),f)};EditorUi.prototype.commentsSupported=
+function(){var d=this.getCurrentFile();return null!=d?d.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(d,f){var g=this.getCurrentFile();null!=g?g.getComments(d,f):d([])};EditorUi.prototype.addComment=function(d,f,g){var m=this.getCurrentFile();
+null!=m?m.addComment(d,f,g):f(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var d=this.getCurrentFile();return null!=d?d.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var d=this.getCurrentFile();return null!=d?d.canComment():!0};EditorUi.prototype.newComment=function(d,f){var g=this.getCurrentFile();return null!=g?g.newComment(d,f):new DrawioComment(this,null,d,Date.now(),Date.now(),!1,f)};EditorUi.prototype.isRevisionHistorySupported=function(){var d=this.getCurrentFile();
+return null!=d&&d.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(d,f){var g=this.getCurrentFile();null!=g&&g.getRevisions?g.getRevisions(d,f):f({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var d=this.getCurrentFile();return null!=d&&(d.constructor==DriveFile&&d.isEditable()||d.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(d){d.setRequestHeader("Content-Language",
+"da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(d,f,g,m,q,y,F,C){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(d,f,g,m,q,y,F,C)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(d)};EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");
+return this.editor.embedCssFonts(d,f)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,f,g,m,q,y,F,C,I,G,Z,ca,aa,Y,pa,Q){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(d,f,g,m,q,y,F,C,I,G,Z,ca,aa,Y,pa,Q)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");
+return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(d,f,g,m){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(d,f,g,m)};EditorUi.prototype.convertImageToDataUri=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(d,f)};EditorUi.prototype.base64Encode=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(d)};EditorUi.prototype.updateCRC=
+function(d,f,g,m){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(d,f,g,m)};EditorUi.prototype.crc32=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(d)};EditorUi.prototype.writeGraphModelToPng=function(d,f,g,m,q){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(d,f,g,m,q)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=
+urlParams.forceMigration)return null;for(var d=[],f=0;f<localStorage.length;f++){var g=localStorage.key(f),m=localStorage.getItem(g);if(0<g.length&&(".scratchpad"==g||"."!=g.charAt(0))&&0<m.length){var q="<mxfile "===m.substring(0,8)||"<?xml"===m.substring(0,5)||"\x3c!--[if IE]>"===m.substring(0,12);m="<mxlibrary>"===m.substring(0,11);(q||m)&&d.push(g)}}return d};EditorUi.prototype.getLocalStorageFile=function(d){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;
+var f=localStorage.getItem(d);return{title:d,data:f,isLib:"<mxlibrary>"===f.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
+var CommentsWindow=function(b,e,k,n,D,t){function E(){for(var U=ca.getElementsByTagName("div"),ma=0,T=0;T<U.length;T++)"none"!=U[T].style.display&&U[T].parentNode==ca&&ma++;aa.style.display=0==ma?"block":"none"}function d(U,ma,T,M){function ia(){ma.removeChild(ba);ma.removeChild(la);O.style.display="block";N.style.display="block"}I={div:ma,comment:U,saveCallback:T,deleteOnCancel:M};var N=ma.querySelector(".geCommentTxt"),O=ma.querySelector(".geCommentActionsList"),ba=document.createElement("textarea");
+ba.className="geCommentEditTxtArea";ba.style.minHeight=N.offsetHeight+"px";ba.value=U.content;ma.insertBefore(ba,N);var la=document.createElement("div");la.className="geCommentEditBtns";var u=mxUtils.button(mxResources.get("cancel"),function(){M?(ma.parentNode.removeChild(ma),E()):ia();I=null});u.className="geCommentEditBtn";la.appendChild(u);var H=mxUtils.button(mxResources.get("save"),function(){N.innerText="";U.content=ba.value;mxUtils.write(N,U.content);ia();T(U);I=null});mxEvent.addListener(ba,
+"keydown",mxUtils.bind(this,function(P){mxEvent.isConsumed(P)||((mxEvent.isControlDown(P)||mxClient.IS_MAC&&mxEvent.isMetaDown(P))&&13==P.keyCode?(H.click(),mxEvent.consume(P)):27==P.keyCode&&(u.click(),mxEvent.consume(P)))}));H.focus();H.className="geCommentEditBtn gePrimaryBtn";la.appendChild(H);ma.insertBefore(la,N);O.style.display="none";N.style.display="none";ba.focus()}function f(U,ma){ma.innerText="";U=new Date(U.modifiedDate);var T=b.timeSince(U);null==T&&(T=mxResources.get("lessThanAMinute"));
+mxUtils.write(ma,mxResources.get("timeAgo",[T],"{1} ago"));ma.setAttribute("title",U.toLocaleDateString()+" "+U.toLocaleTimeString())}function g(U){var ma=document.createElement("img");ma.className="geCommentBusyImg";ma.src=IMAGE_PATH+"/spin.gif";U.appendChild(ma);U.busyImg=ma}function m(U){U.style.border="1px solid red";U.removeChild(U.busyImg)}function q(U){U.style.border="";U.removeChild(U.busyImg)}function y(U,ma,T,M,ia){function N(R,da,fa){var ea=document.createElement("li");ea.className="geCommentAction";
+var qa=document.createElement("a");qa.className="geCommentActionLnk";mxUtils.write(qa,R);ea.appendChild(qa);mxEvent.addListener(qa,"click",function(va){da(va,U);va.preventDefault();mxEvent.consume(va)});W.appendChild(ea);fa&&(ea.style.display="none")}function O(){function R(ea){da.push(fa);if(null!=ea.replies)for(var qa=0;qa<ea.replies.length;qa++)fa=fa.nextSibling,R(ea.replies[qa])}var da=[],fa=la;R(U);return{pdiv:fa,replies:da}}function ba(R,da,fa,ea,qa){function va(){g(Ca);U.addReply(za,function(sa){za.id=
+sa;U.replies.push(za);q(Ca);fa&&fa()},function(sa){ua();m(Ca);b.handleError(sa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},ea,qa)}function ua(){d(za,Ca,function(sa){va()},!0)}var Aa=O().pdiv,za=b.newComment(R,b.getCurrentUser());za.pCommentId=U.id;null==U.replies&&(U.replies=[]);var Ca=y(za,U.replies,Aa,M+1);da?ua():va()}if(ia||!U.isResolved){aa.style.display="none";var la=document.createElement("div");la.className="geCommentContainer";la.setAttribute("data-commentId",
+U.id);la.style.marginLeft=20*M+5+"px";U.isResolved&&!Editor.isDarkMode()&&(la.style.backgroundColor="ghostWhite");var u=document.createElement("div");u.className="geCommentHeader";var H=document.createElement("img");H.className="geCommentUserImg";H.src=U.user.pictureUrl||Editor.userImage;u.appendChild(H);H=document.createElement("div");H.className="geCommentHeaderTxt";u.appendChild(H);var P=document.createElement("div");P.className="geCommentUsername";mxUtils.write(P,U.user.displayName||"");H.appendChild(P);
+P=document.createElement("div");P.className="geCommentDate";P.setAttribute("data-commentId",U.id);f(U,P);H.appendChild(P);la.appendChild(u);u=document.createElement("div");u.className="geCommentTxt";mxUtils.write(u,U.content||"");la.appendChild(u);U.isLocked&&(la.style.opacity="0.5");u=document.createElement("div");u.className="geCommentActions";var W=document.createElement("ul");W.className="geCommentActionsList";u.appendChild(W);F||U.isLocked||0!=M&&!C||N(mxResources.get("reply"),function(){ba("",
+!0)},U.isResolved);H=b.getCurrentUser();null==H||H.id!=U.user.id||F||U.isLocked||(N(mxResources.get("edit"),function(){function R(){d(U,la,function(){g(la);U.editComment(U.content,function(){q(la)},function(da){m(la);R();b.handleError(da,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}R()},U.isResolved),N(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){g(la);U.deleteComment(function(R){if(!0===R){R=la.querySelector(".geCommentTxt");
+R.innerText="";mxUtils.write(R,mxResources.get("msgDeleted"));var da=la.querySelectorAll(".geCommentAction");for(R=0;R<da.length;R++)da[R].parentNode.removeChild(da[R]);q(la);la.style.opacity="0.5"}else{da=O(U).replies;for(R=0;R<da.length;R++)ca.removeChild(da[R]);for(R=0;R<ma.length;R++)if(ma[R]==U){ma.splice(R,1);break}aa.style.display=0==ca.getElementsByTagName("div").length?"block":"none"}},function(R){m(la);b.handleError(R,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},
+U.isResolved));F||U.isLocked||0!=M||N(U.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(R){function da(){var fa=R.target;fa.innerText="";U.isResolved=!U.isResolved;mxUtils.write(fa,U.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var ea=U.isResolved?"none":"",qa=O(U).replies,va=Editor.isDarkMode()?"transparent":U.isResolved?"ghostWhite":"white",ua=0;ua<qa.length;ua++){qa[ua].style.backgroundColor=va;for(var Aa=qa[ua].querySelectorAll(".geCommentAction"),
+za=0;za<Aa.length;za++)Aa[za]!=fa.parentNode&&(Aa[za].style.display=ea);Q||(qa[ua].style.display="none")}E()}U.isResolved?ba(mxResources.get("reOpened")+": ",!0,da,!1,!0):ba(mxResources.get("markedAsResolved"),!1,da,!0)});la.appendChild(u);null!=T?ca.insertBefore(la,T.nextSibling):ca.appendChild(la);for(T=0;null!=U.replies&&T<U.replies.length;T++)u=U.replies[T],u.isResolved=U.isResolved,y(u,U.replies,null,M+1,ia);null!=I&&(I.comment.id==U.id?(ia=U.content,U.content=I.comment.content,d(U,la,I.saveCallback,
+I.deleteOnCancel),U.content=ia):null==I.comment.id&&I.comment.pCommentId==U.id&&(ca.appendChild(I.div),d(I.comment,I.div,I.saveCallback,I.deleteOnCancel)));return la}}var F=!b.canComment(),C=b.canReplyToReplies(),I=null,G=document.createElement("div");G.className="geCommentsWin";G.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var Z=EditorUi.compactUi?"26px":"30px",ca=document.createElement("div");ca.className="geCommentsList";ca.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:
+"whiteSmoke";ca.style.bottom=parseInt(Z)+7+"px";G.appendChild(ca);var aa=document.createElement("span");aa.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(aa,mxResources.get("noCommentsFound"));var Y=document.createElement("div");Y.className="geToolbarContainer geCommentsToolbar";Y.style.height=Z;Y.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";Y.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";Z=document.createElement("a");Z.className=
+"geButton";if(!F){var pa=Z.cloneNode();pa.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';pa.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(pa,"click",function(U){function ma(){d(T,M,function(ia){g(M);b.addComment(ia,function(N){ia.id=N;X.push(ia);q(M)},function(N){m(M);ma();b.handleError(N,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var T=b.newComment("",b.getCurrentUser()),M=y(T,X,null,0);ma();U.preventDefault();
+mxEvent.consume(U)});Y.appendChild(pa)}pa=Z.cloneNode();pa.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';pa.setAttribute("title",mxResources.get("showResolved"));var Q=!1;Editor.isDarkMode()&&(pa.style.filter="invert(100%)");mxEvent.addListener(pa,"click",function(U){this.className=(Q=!Q)?"geButton geCheckedBtn":"geButton";ha();U.preventDefault();mxEvent.consume(U)});Y.appendChild(pa);b.commentsRefreshNeeded()&&(pa=Z.cloneNode(),pa.innerHTML='<img src="'+IMAGE_PATH+
+'/update16.png" style="width: 16px; padding: 2px;">',pa.setAttribute("title",mxResources.get("refresh")),Editor.isDarkMode()&&(pa.style.filter="invert(100%)"),mxEvent.addListener(pa,"click",function(U){ha();U.preventDefault();mxEvent.consume(U)}),Y.appendChild(pa));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(U){t();U.preventDefault();mxEvent.consume(U)}),Y.appendChild(Z));G.appendChild(Y);var X=[],ha=mxUtils.bind(this,function(){this.hasError=!1;if(null!=I)try{I.div=I.div.cloneNode(!0);var U=I.div.querySelector(".geCommentEditTxtArea"),ma=I.div.querySelector(".geCommentEditBtns");I.comment.content=U.value;U.parentNode.removeChild(U);ma.parentNode.removeChild(ma)}catch(T){b.handleError(T)}ca.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+
+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";C=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(T){function M(ia){if(null!=ia){ia.sort(function(O,ba){return new Date(O.modifiedDate)-new Date(ba.modifiedDate)});for(var N=0;N<ia.length;N++)M(ia[N].replies)}}T.sort(function(ia,N){return new Date(ia.modifiedDate)-new Date(N.modifiedDate)});ca.innerText="";ca.appendChild(aa);aa.style.display="block";X=T;for(T=0;T<X.length;T++)M(X[T].replies),y(X[T],X,null,0,Q);null!=I&&
+null==I.comment.id&&null==I.comment.pCommentId&&(ca.appendChild(I.div),d(I.comment,I.div,I.saveCallback,I.deleteOnCancel))},mxUtils.bind(this,function(T){ca.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(T&&T.message?": "+T.message:""));this.hasError=!0})):ca.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});ha();this.refreshComments=ha;Y=mxUtils.bind(this,function(){function U(N){var O=T[N.id];if(null!=O)for(f(N,O),O=0;null!=N.replies&&O<N.replies.length;O++)U(N.replies[O])}if(this.window.isVisible()){for(var ma=
+ca.querySelectorAll(".geCommentDate"),T={},M=0;M<ma.length;M++){var ia=ma[M];T[ia.getAttribute("data-commentId")]=ia}for(M=0;M<X.length;M++)U(X[M])}});setInterval(Y,6E4);this.refreshCommentsTime=Y;this.window=new mxWindow(mxResources.get("comments"),G,e,k,n,D,!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()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,e,k,n,D,t,E,d,f,g,m){var q=document.createElement("div");q.style.textAlign="center";m=null!=m?m:44;var y=document.createElement("div");y.style.padding="6px";y.style.overflow="auto";y.style.maxHeight=m+"px";y.style.lineHeight="1.2em";mxUtils.write(y,e);q.appendChild(y);null!=g&&(y=document.createElement("div"),y.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",
+g),y.appendChild(e),q.appendChild(y));g=document.createElement("div");g.style.textAlign="center";g.style.whiteSpace="nowrap";var F=document.createElement("input");F.setAttribute("type","checkbox");t=mxUtils.button(t||mxResources.get("cancel"),function(){b.hideDialog();null!=n&&n(F.checked)});t.className="geBtn";null!=d&&(t.innerHTML=d+"<br>"+t.innerHTML,t.style.paddingBottom="8px",t.style.paddingTop="8px",t.style.height="auto",t.style.width="40%");b.editor.cancelFirst&&g.appendChild(t);var C=mxUtils.button(D||
+mxResources.get("ok"),function(){b.hideDialog();null!=k&&k(F.checked)});g.appendChild(C);null!=E?(C.innerHTML=E+"<br>"+C.innerHTML+"<br>",C.style.paddingBottom="8px",C.style.paddingTop="8px",C.style.height="auto",C.className="geBtn",C.style.width="40%"):C.className="geBtn gePrimaryBtn";b.editor.cancelFirst||g.appendChild(t);q.appendChild(g);f?(g.style.marginTop="10px",y=document.createElement("p"),y.style.marginTop="20px",y.style.marginBottom="0px",y.appendChild(F),D=document.createElement("span"),
+mxUtils.write(D," "+mxResources.get("rememberThisSetting")),y.appendChild(D),q.appendChild(y),mxEvent.addListener(D,"click",function(I){F.checked=!F.checked;mxEvent.consume(I)})):g.style.marginTop="12px";this.init=function(){C.focus()};this.container=q};function DiagramPage(b,e){this.node=b;null!=e?this.node.setAttribute("id",e):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
DiagramPage.prototype.setName=function(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};function RenamePage(b,e,k){this.ui=b;this.page=e;this.previous=this.name=k}RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
function MovePage(b,e,k){this.ui=b;this.oldIndex=e;this.newIndex=k}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var b=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
function SelectPage(b,e,k){this.ui=b;this.previousPage=this.page=e;this.neverShown=!0;null!=e&&(this.neverShown=null==e.viewState,this.ui.updatePageRoot(e),null!=k&&(e.viewState=k,this.neverShown=!1))}
@@ -3867,42 +3869,42 @@ EditorUi.drawHost:"https://"+window.location.host)+"/"+D+"#"+n.getHash()}}return
EditorUi.prototype.createPageMenu=function(b,e){return mxUtils.bind(this,function(k,n){var D=this.editor.graph;k.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,b)+1)}),n);k.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),n);k.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(b,e)}),n);null!=this.getLinkForPage(b)&&(k.addSeparator(n),k.addItem(mxResources.get("link"),
null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(t,E,d,f,g,m){t=this.createUrlParameters(t,E,d,f,g,m);d||t.push("hide-pages=1");D.isSelectionEmpty()||(d=D.getBoundingBox(D.getSelectionCells()),E=D.view.translate,g=D.view.scale,d.width/=g,d.height/=g,d.x=d.x/g-E.x,d.y=d.y/g-E.y,t.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(d.x),y:Math.round(d.y),width:Math.round(d.width),height:Math.round(d.height),border:100}))));
f=new EmbedDialog(this,this.getLinkForPage(b,t,f));this.showDialog(f.container,450,240,!0,!0);f.init()}))})));k.addSeparator(n);k.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),n);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(k.addSeparator(n),k.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,
-!0,!0))}),n))})};(function(){var b=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(e){b.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(e,k,n){n.ui=e.ui;return k};b.afterDecode=function(e,k,n){e=n.oldIndex;n.oldIndex=n.newIndex;n.newIndex=e;return n};mxCodecRegistry.register(b)})();
+!0,!0))}),n))})};(function(){var b=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(){b.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(e,k,n){n.ui=e.ui;return k};b.afterDecode=function(e,k,n){e=n.oldIndex;n.oldIndex=n.newIndex;n.newIndex=e;return n};mxCodecRegistry.register(b)})();
(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(e,k,n){n.ui=e.ui;return k};b.afterDecode=function(e,k,n){e=n.previous;n.previous=n.name;n.name=e;return n};mxCodecRegistry.register(b)})();
(function(){var b=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" "));b.afterEncode=function(e,k,n){n.setAttribute("relatedPage",k.relatedPage.getId());null==k.index&&(n.setAttribute("name",k.relatedPage.getName()),null!=k.relatedPage.viewState&&n.setAttribute("viewState",JSON.stringify(k.relatedPage.viewState,function(D,t){return 0>mxUtils.indexOf(EditorUi.transientViewStateProperties,D)?t:void 0})),null!=k.relatedPage.root&&e.encodeCell(k.relatedPage.root,
n));return n};b.beforeDecode=function(e,k,n){n.ui=e.ui;n.relatedPage=n.ui.getPageById(k.getAttribute("relatedPage"));if(null==n.relatedPage){var D=k.ownerDocument.createElement("diagram");D.setAttribute("id",k.getAttribute("relatedPage"));D.setAttribute("name",k.getAttribute("name"));n.relatedPage=new DiagramPage(D);D=k.getAttribute("viewState");null!=D&&(n.relatedPage.viewState=JSON.parse(D),k.removeAttribute("viewState"));k=k.cloneNode(!0);D=k.firstChild;if(null!=D)for(n.relatedPage.root=e.decodeCell(D,
!1),n=D.nextSibling,D.parentNode.removeChild(D),D=n;null!=D;){n=D.nextSibling;if(D.nodeType==mxConstants.NODETYPE_ELEMENT){var t=D.getAttribute("id");null==e.lookup(t)&&e.decodeCell(D)}D.parentNode.removeChild(D);D=n}}return k};b.afterDecode=function(e,k,n){n.index=n.previousIndex;return n};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(n,D,t,E,d){D=null!=D?D:!1;null==t&&(t=this.getFoldableCells(this.getSelectionCells(),n));this.stopEditing();this.model.beginUpdate();try{for(var f=t.slice(),g=0;g<t.length;g++)"1"==mxUtils.getValue(this.getCurrentCellStyle(t[g]),"treeFolding","0")&&this.foldTreeCell(n,t[g]);t=f;t=b.apply(this,arguments)}finally{this.model.endUpdate()}return t};Graph.prototype.foldTreeCell=
function(n,D){this.model.beginUpdate();try{var t=[];this.traverse(D,!0,mxUtils.bind(this,function(d,f){var g=null!=f&&this.isTreeEdge(f);g&&t.push(f);d==D||null!=f&&!g||t.push(d);return(null==f||g)&&(d==D||!this.model.isCollapsed(d))}));this.model.setCollapsed(D,n);for(var E=0;E<t.length;E++)this.model.setVisible(t[E],!n)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(n){return!this.isEdgeIgnored(n)};Graph.prototype.getTreeEdges=function(n,D,t,E,d,f){return this.model.filterCells(this.getEdges(n,
-D,t,E,d,f),mxUtils.bind(this,function(g){return this.isTreeEdge(g)}))};Graph.prototype.getIncomingTreeEdges=function(n,D){return this.getTreeEdges(n,D,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(n,D){return this.getTreeEdges(n,D,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function n(L){return I.isVertex(L)&&t(L)}function D(L){var da=
-!1;null!=L&&(da="1"==C.getCurrentCellStyle(L).treeMoving);return da}function t(L){var da=!1;null!=L&&(L=I.getParent(L),da=C.view.getState(L),da="tree"==(null!=da?da.style:C.getCellStyle(L)).containerType);return da}function E(L){var da=!1;null!=L&&(L=I.getParent(L),da=C.view.getState(L),C.view.getState(L),da=null!=(null!=da?da.style:C.getCellStyle(L)).childLayout);return da}function d(L){L=C.view.getState(L);if(null!=L){var da=C.getIncomingTreeEdges(L.cell);if(0<da.length&&(da=C.view.getState(da[0]),
-null!=da&&(da=da.absolutePoints,null!=da&&0<da.length&&(da=da[da.length-1],null!=da)))){if(da.y==L.y&&Math.abs(da.x-L.getCenterX())<L.width/2)return mxConstants.DIRECTION_SOUTH;if(da.y==L.y+L.height&&Math.abs(da.x-L.getCenterX())<L.width/2)return mxConstants.DIRECTION_NORTH;if(da.x>L.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function f(L,da){da=null!=da?da:!0;C.model.beginUpdate();try{var O=C.model.getParent(L),N=C.getIncomingTreeEdges(L),aa=C.cloneCells([N[0],
-L]);C.model.setTerminal(aa[0],C.model.getTerminal(N[0],!0),!0);var ma=d(L),u=O.geometry;ma==mxConstants.DIRECTION_SOUTH||ma==mxConstants.DIRECTION_NORTH?aa[1].geometry.x+=da?L.geometry.width+10:-aa[1].geometry.width-10:aa[1].geometry.y+=da?L.geometry.height+10:-aa[1].geometry.height-10;C.view.currentRoot!=O&&(aa[1].geometry.x-=u.x,aa[1].geometry.y-=u.y);var H=C.view.getState(L),P=C.view.scale;if(null!=H){var S=mxRectangle.fromRectangle(H);ma==mxConstants.DIRECTION_SOUTH||ma==mxConstants.DIRECTION_NORTH?
-S.x+=(da?L.geometry.width+10:-aa[1].geometry.width-10)*P:S.y+=(da?L.geometry.height+10:-aa[1].geometry.height-10)*P;var R=C.getOutgoingTreeEdges(C.model.getTerminal(N[0],!0));if(null!=R){for(var ca=ma==mxConstants.DIRECTION_SOUTH||ma==mxConstants.DIRECTION_NORTH,ea=u=N=0;ea<R.length;ea++){var fa=C.model.getTerminal(R[ea],!1);if(ma==d(fa)){var ra=C.view.getState(fa);fa!=L&&null!=ra&&(ca&&da!=ra.getCenterX()<H.getCenterX()||!ca&&da!=ra.getCenterY()<H.getCenterY())&&mxUtils.intersects(S,ra)&&(N=10+Math.max(N,
-(Math.min(S.x+S.width,ra.x+ra.width)-Math.max(S.x,ra.x))/P),u=10+Math.max(u,(Math.min(S.y+S.height,ra.y+ra.height)-Math.max(S.y,ra.y))/P))}}ca?u=0:N=0;for(ea=0;ea<R.length;ea++)if(fa=C.model.getTerminal(R[ea],!1),ma==d(fa)&&(ra=C.view.getState(fa),fa!=L&&null!=ra&&(ca&&da!=ra.getCenterX()<H.getCenterX()||!ca&&da!=ra.getCenterY()<H.getCenterY()))){var ua=[];C.traverse(ra.cell,!0,function(sa,Aa){var Ca=null!=Aa&&C.isTreeEdge(Aa);Ca&&ua.push(Aa);(null==Aa||Ca)&&ua.push(sa);return null==Aa||Ca});C.moveCells(ua,
-(da?1:-1)*N,(da?1:-1)*u)}}}return C.addCells(aa,O)}finally{C.model.endUpdate()}}function g(L){C.model.beginUpdate();try{var da=d(L),O=C.getIncomingTreeEdges(L),N=C.cloneCells([O[0],L]);C.model.setTerminal(O[0],N[1],!1);C.model.setTerminal(N[0],N[1],!0);C.model.setTerminal(N[0],L,!1);var aa=C.model.getParent(L),ma=aa.geometry,u=[];C.view.currentRoot!=aa&&(N[1].geometry.x-=ma.x,N[1].geometry.y-=ma.y);C.traverse(L,!0,function(S,R){var ca=null!=R&&C.isTreeEdge(R);ca&&u.push(R);(null==R||ca)&&u.push(S);
-return null==R||ca});var H=L.geometry.width+40,P=L.geometry.height+40;da==mxConstants.DIRECTION_SOUTH?H=0:da==mxConstants.DIRECTION_NORTH?(H=0,P=-P):da==mxConstants.DIRECTION_WEST?(H=-H,P=0):da==mxConstants.DIRECTION_EAST&&(P=0);C.moveCells(u,H,P);return C.addCells(N,aa)}finally{C.model.endUpdate()}}function m(L,da){C.model.beginUpdate();try{var O=C.model.getParent(L),N=C.getIncomingTreeEdges(L),aa=d(L);0==N.length&&(N=[C.createEdge(O,null,"",null,null,C.createCurrentEdgeStyle())],aa=da);var ma=C.cloneCells([N[0],
-L]);C.model.setTerminal(ma[0],L,!0);if(null==C.model.getTerminal(ma[0],!1)){C.model.setTerminal(ma[0],ma[1],!1);var u=C.getCellStyle(ma[1]).newEdgeStyle;if(null!=u)try{var H=JSON.parse(u),P;for(P in H)C.setCellStyles(P,H[P],[ma[0]]),"edgeStyle"==P&&"elbowEdgeStyle"==H[P]&&C.setCellStyles("elbow",aa==mxConstants.DIRECTION_SOUTH||aa==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[ma[0]])}catch(ra){}}N=C.getOutgoingTreeEdges(L);var S=O.geometry;da=[];C.view.currentRoot==O&&(S=new mxRectangle);for(u=
-0;u<N.length;u++){var R=C.model.getTerminal(N[u],!1);null!=R&&da.push(R)}var ca=C.view.getBounds(da),ea=C.view.translate,fa=C.view.scale;aa==mxConstants.DIRECTION_SOUTH?(ma[1].geometry.x=null==ca?L.geometry.x+(L.geometry.width-ma[1].geometry.width)/2:(ca.x+ca.width)/fa-ea.x-S.x+10,ma[1].geometry.y+=ma[1].geometry.height-S.y+40):aa==mxConstants.DIRECTION_NORTH?(ma[1].geometry.x=null==ca?L.geometry.x+(L.geometry.width-ma[1].geometry.width)/2:(ca.x+ca.width)/fa-ea.x+-S.x+10,ma[1].geometry.y-=ma[1].geometry.height+
-S.y+40):(ma[1].geometry.x=aa==mxConstants.DIRECTION_WEST?ma[1].geometry.x-(ma[1].geometry.width+S.x+40):ma[1].geometry.x+(ma[1].geometry.width-S.x+40),ma[1].geometry.y=null==ca?L.geometry.y+(L.geometry.height-ma[1].geometry.height)/2:(ca.y+ca.height)/fa-ea.y+-S.y+10);return C.addCells(ma,O)}finally{C.model.endUpdate()}}function q(L,da,O){L=C.getOutgoingTreeEdges(L);O=C.view.getState(O);var N=[];if(null!=O&&null!=L){for(var aa=0;aa<L.length;aa++){var ma=C.view.getState(C.model.getTerminal(L[aa],!1));
-null!=ma&&(!da&&Math.min(ma.x+ma.width,O.x+O.width)>=Math.max(ma.x,O.x)||da&&Math.min(ma.y+ma.height,O.y+O.height)>=Math.max(ma.y,O.y))&&N.push(ma)}N.sort(function(u,H){return da?u.x+u.width-H.x-H.width:u.y+u.height-H.y-H.height})}return N}function y(L,da){var O=d(L),N=da==mxConstants.DIRECTION_EAST||da==mxConstants.DIRECTION_WEST;(O==mxConstants.DIRECTION_EAST||O==mxConstants.DIRECTION_WEST)==N&&O!=da?F.actions.get("selectParent").funct():O==da?(da=C.getOutgoingTreeEdges(L),null!=da&&0<da.length&&
-C.setSelectionCell(C.model.getTerminal(da[0],!1))):(O=C.getIncomingTreeEdges(L),null!=O&&0<O.length&&(N=q(C.model.getTerminal(O[0],!0),N,L),L=C.view.getState(L),null!=L&&(L=mxUtils.indexOf(N,L),0<=L&&(L+=da==mxConstants.DIRECTION_NORTH||da==mxConstants.DIRECTION_WEST?-1:1,0<=L&&L<=N.length-1&&C.setSelectionCell(N[L].cell)))))}var F=this,C=F.editor.graph,I=C.getModel(),G=F.menus.createPopupMenu;F.menus.createPopupMenu=function(L,da,O){G.apply(this,arguments);if(1==C.getSelectionCount()){da=C.getSelectionCell();
-var N=C.getOutgoingTreeEdges(da);L.addSeparator();0<N.length&&(n(C.getSelectionCell())&&this.addMenuItems(L,["selectChildren"],null,O),this.addMenuItems(L,["selectDescendants"],null,O));n(C.getSelectionCell())?(L.addSeparator(),0<C.getIncomingTreeEdges(da).length&&this.addMenuItems(L,["selectSiblings","selectParent"],null,O)):0<C.model.getEdgeCount(da)&&this.addMenuItems(L,["selectConnections"],null,O)}};F.actions.addAction("selectChildren",function(){if(C.isEnabled()&&1==C.getSelectionCount()){var L=
-C.getSelectionCell();L=C.getOutgoingTreeEdges(L);if(null!=L){for(var da=[],O=0;O<L.length;O++)da.push(C.model.getTerminal(L[O],!1));C.setSelectionCells(da)}}},null,null,"Alt+Shift+X");F.actions.addAction("selectSiblings",function(){if(C.isEnabled()&&1==C.getSelectionCount()){var L=C.getSelectionCell();L=C.getIncomingTreeEdges(L);if(null!=L&&0<L.length&&(L=C.getOutgoingTreeEdges(C.model.getTerminal(L[0],!0)),null!=L)){for(var da=[],O=0;O<L.length;O++)da.push(C.model.getTerminal(L[O],!1));C.setSelectionCells(da)}}},
-null,null,"Alt+Shift+S");F.actions.addAction("selectParent",function(){if(C.isEnabled()&&1==C.getSelectionCount()){var L=C.getSelectionCell();L=C.getIncomingTreeEdges(L);null!=L&&0<L.length&&C.setSelectionCell(C.model.getTerminal(L[0],!0))}},null,null,"Alt+Shift+P");F.actions.addAction("selectDescendants",function(L,da){L=C.getSelectionCell();if(C.isEnabled()&&C.model.isVertex(L)){if(null!=da&&mxEvent.isAltDown(da))C.setSelectionCells(C.model.getTreeEdges(L,null==da||!mxEvent.isShiftDown(da),null==
-da||!mxEvent.isControlDown(da)));else{var O=[];C.traverse(L,!0,function(N,aa){var ma=null!=aa&&C.isTreeEdge(aa);ma&&O.push(aa);null!=aa&&!ma||null!=da&&mxEvent.isShiftDown(da)||O.push(N);return null==aa||ma})}C.setSelectionCells(O)}},null,null,"Alt+Shift+D");var Y=C.removeCells;C.removeCells=function(L,da){da=null!=da?da:!0;null==L&&(L=this.getDeletableCells(this.getSelectionCells()));da&&(L=this.getDeletableCells(this.addAllEdges(L)));for(var O=[],N=0;N<L.length;N++){var aa=L[N];I.isEdge(aa)&&t(aa)&&
-(O.push(aa),aa=I.getTerminal(aa,!1));if(n(aa)){var ma=[];C.traverse(aa,!0,function(u,H){var P=null!=H&&C.isTreeEdge(H);P&&ma.push(H);(null==H||P)&&ma.push(u);return null==H||P});0<ma.length&&(O=O.concat(ma),aa=C.getIncomingTreeEdges(L[N]),L=L.concat(aa))}else null!=aa&&O.push(L[N])}L=O;return Y.apply(this,arguments)};F.hoverIcons.getStateAt=function(L,da,O){return n(L.cell)?null:this.graph.view.getState(this.graph.getCellAt(da,O))};var ba=C.duplicateCells;C.duplicateCells=function(L,da){L=null!=L?
-L:this.getSelectionCells();for(var O=L.slice(0),N=0;N<O.length;N++){var aa=C.view.getState(O[N]);if(null!=aa&&n(aa.cell)){var ma=C.getIncomingTreeEdges(aa.cell);for(aa=0;aa<ma.length;aa++)mxUtils.remove(ma[aa],L)}}this.model.beginUpdate();try{var u=ba.call(this,L,da);if(u.length==L.length)for(N=0;N<L.length;N++)if(n(L[N])){var H=C.getIncomingTreeEdges(u[N]);ma=C.getIncomingTreeEdges(L[N]);if(0==H.length&&0<ma.length){var P=this.cloneCell(ma[0]);this.addEdge(P,C.getDefaultParent(),this.model.getTerminal(ma[0],
-!0),u[N])}}}finally{this.model.endUpdate()}return u};var Z=C.moveCells;C.moveCells=function(L,da,O,N,aa,ma,u){var H=null;this.model.beginUpdate();try{var P=aa,S=this.getCurrentCellStyle(aa);if(null!=L&&n(aa)&&"1"==mxUtils.getValue(S,"treeFolding","0")){for(var R=0;R<L.length;R++)if(n(L[R])||C.model.isEdge(L[R])&&null==C.model.getTerminal(L[R],!0)){aa=C.model.getParent(L[R]);break}if(null!=P&&aa!=P&&null!=this.view.getState(L[0])){var ca=C.getIncomingTreeEdges(L[0]);if(0<ca.length){var ea=C.view.getState(C.model.getTerminal(ca[0],
-!0));if(null!=ea){var fa=C.view.getState(P);null!=fa&&(da=(fa.getCenterX()-ea.getCenterX())/C.view.scale,O=(fa.getCenterY()-ea.getCenterY())/C.view.scale)}}}}H=Z.apply(this,arguments);if(null!=H&&null!=L&&H.length==L.length)for(R=0;R<H.length;R++)if(this.model.isEdge(H[R]))n(P)&&0>mxUtils.indexOf(H,this.model.getTerminal(H[R],!0))&&this.model.setTerminal(H[R],P,!0);else if(n(L[R])&&(ca=C.getIncomingTreeEdges(L[R]),0<ca.length))if(!N)n(P)&&0>mxUtils.indexOf(L,this.model.getTerminal(ca[0],!0))&&this.model.setTerminal(ca[0],
-P,!0);else if(0==C.getIncomingTreeEdges(H[R]).length){S=P;if(null==S||S==C.model.getParent(L[R]))S=C.model.getTerminal(ca[0],!0);N=this.cloneCell(ca[0]);this.addEdge(N,C.getDefaultParent(),S,H[R])}}finally{this.model.endUpdate()}return H};if(null!=F.sidebar){var X=F.sidebar.dropAndConnect;F.sidebar.dropAndConnect=function(L,da,O,N){var aa=C.model,ma=null;aa.beginUpdate();try{if(ma=X.apply(this,arguments),n(L))for(var u=0;u<ma.length;u++)if(aa.isEdge(ma[u])&&null==aa.getTerminal(ma[u],!0)){aa.setTerminal(ma[u],
-L,!0);var H=C.getCellGeometry(ma[u]);H.points=null;null!=H.getTerminalPoint(!0)&&H.setTerminalPoint(null,!0)}}finally{aa.endUpdate()}return ma}}var qa={88:F.actions.get("selectChildren"),84:F.actions.get("selectSubtree"),80:F.actions.get("selectParent"),83:F.actions.get("selectSiblings")},Q=F.onKeyDown;F.onKeyDown=function(L){try{if(C.isEnabled()&&!C.isEditing()&&n(C.getSelectionCell())&&1==C.getSelectionCount()){var da=null;0<C.getIncomingTreeEdges(C.getSelectionCell()).length&&(9==L.which?da=mxEvent.isShiftDown(L)?
-g(C.getSelectionCell()):m(C.getSelectionCell()):13==L.which&&(da=f(C.getSelectionCell(),!mxEvent.isShiftDown(L))));if(null!=da&&0<da.length)1==da.length&&C.model.isEdge(da[0])?C.setSelectionCell(C.model.getTerminal(da[0],!1)):C.setSelectionCell(da[da.length-1]),null!=F.hoverIcons&&F.hoverIcons.update(C.view.getState(C.getSelectionCell())),C.startEditingAtCell(C.getSelectionCell()),mxEvent.consume(L);else if(mxEvent.isAltDown(L)&&mxEvent.isShiftDown(L)){var O=qa[L.keyCode];null!=O&&(O.funct(L),mxEvent.consume(L))}else 37==
-L.keyCode?(y(C.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(L)):38==L.keyCode?(y(C.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(L)):39==L.keyCode?(y(C.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(L)):40==L.keyCode&&(y(C.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(L))}}catch(N){F.handleError(N)}mxEvent.isConsumed(L)||Q.apply(this,arguments)};var W=C.connectVertex;C.connectVertex=function(L,da,O,N,aa,ma,u){var H=C.getIncomingTreeEdges(L);
-if(n(L)){var P=d(L),S=P==mxConstants.DIRECTION_EAST||P==mxConstants.DIRECTION_WEST,R=da==mxConstants.DIRECTION_EAST||da==mxConstants.DIRECTION_WEST;return P==da||0==H.length?m(L,da):S==R?g(L):f(L,da!=mxConstants.DIRECTION_NORTH&&da!=mxConstants.DIRECTION_WEST)}return W.apply(this,arguments)};C.getSubtree=function(L){var da=[L];!D(L)&&!n(L)||E(L)||C.traverse(L,!0,function(O,N){var aa=null!=N&&C.isTreeEdge(N);aa&&0>mxUtils.indexOf(da,N)&&da.push(N);(null==N||aa)&&0>mxUtils.indexOf(da,O)&&da.push(O);
-return null==N||aa});return da};var ha=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){ha.apply(this,arguments);(D(this.state.cell)||n(this.state.cell))&&!E(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(L){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(L),mxEvent.getClientY(L),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(L);this.graph.isMouseDown=!0;F.hoverIcons.reset();mxEvent.consume(L)})))};var la=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=
-function(){la.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 ja=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(L){ja.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=L?"":"none")};var U=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=
-function(L,da){U.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var k=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var n=k.apply(this,arguments),D=this.graph;return n.concat([this.addEntry("tree container",function(){var t=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");t.vertex=
+D,t,E,d,f),mxUtils.bind(this,function(g){return this.isTreeEdge(g)}))};Graph.prototype.getIncomingTreeEdges=function(n,D){return this.getTreeEdges(n,D,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(n,D){return this.getTreeEdges(n,D,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function n(M){return I.isVertex(M)&&t(M)}function D(M){var ia=
+!1;null!=M&&(ia="1"==C.getCurrentCellStyle(M).treeMoving);return ia}function t(M){var ia=!1;null!=M&&(M=I.getParent(M),ia=C.view.getState(M),ia="tree"==(null!=ia?ia.style:C.getCellStyle(M)).containerType);return ia}function E(M){var ia=!1;null!=M&&(M=I.getParent(M),ia=C.view.getState(M),C.view.getState(M),ia=null!=(null!=ia?ia.style:C.getCellStyle(M)).childLayout);return ia}function d(M){M=C.view.getState(M);if(null!=M){var ia=C.getIncomingTreeEdges(M.cell);if(0<ia.length&&(ia=C.view.getState(ia[0]),
+null!=ia&&(ia=ia.absolutePoints,null!=ia&&0<ia.length&&(ia=ia[ia.length-1],null!=ia)))){if(ia.y==M.y&&Math.abs(ia.x-M.getCenterX())<M.width/2)return mxConstants.DIRECTION_SOUTH;if(ia.y==M.y+M.height&&Math.abs(ia.x-M.getCenterX())<M.width/2)return mxConstants.DIRECTION_NORTH;if(ia.x>M.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function f(M,ia){ia=null!=ia?ia:!0;C.model.beginUpdate();try{var N=C.model.getParent(M),O=C.getIncomingTreeEdges(M),ba=C.cloneCells([O[0],
+M]);C.model.setTerminal(ba[0],C.model.getTerminal(O[0],!0),!0);var la=d(M),u=N.geometry;la==mxConstants.DIRECTION_SOUTH||la==mxConstants.DIRECTION_NORTH?ba[1].geometry.x+=ia?M.geometry.width+10:-ba[1].geometry.width-10:ba[1].geometry.y+=ia?M.geometry.height+10:-ba[1].geometry.height-10;C.view.currentRoot!=N&&(ba[1].geometry.x-=u.x,ba[1].geometry.y-=u.y);var H=C.view.getState(M),P=C.view.scale;if(null!=H){var W=mxRectangle.fromRectangle(H);la==mxConstants.DIRECTION_SOUTH||la==mxConstants.DIRECTION_NORTH?
+W.x+=(ia?M.geometry.width+10:-ba[1].geometry.width-10)*P:W.y+=(ia?M.geometry.height+10:-ba[1].geometry.height-10)*P;var R=C.getOutgoingTreeEdges(C.model.getTerminal(O[0],!0));if(null!=R){for(var da=la==mxConstants.DIRECTION_SOUTH||la==mxConstants.DIRECTION_NORTH,fa=u=O=0;fa<R.length;fa++){var ea=C.model.getTerminal(R[fa],!1);if(la==d(ea)){var qa=C.view.getState(ea);ea!=M&&null!=qa&&(da&&ia!=qa.getCenterX()<H.getCenterX()||!da&&ia!=qa.getCenterY()<H.getCenterY())&&mxUtils.intersects(W,qa)&&(O=10+Math.max(O,
+(Math.min(W.x+W.width,qa.x+qa.width)-Math.max(W.x,qa.x))/P),u=10+Math.max(u,(Math.min(W.y+W.height,qa.y+qa.height)-Math.max(W.y,qa.y))/P))}}da?u=0:O=0;for(fa=0;fa<R.length;fa++)if(ea=C.model.getTerminal(R[fa],!1),la==d(ea)&&(qa=C.view.getState(ea),ea!=M&&null!=qa&&(da&&ia!=qa.getCenterX()<H.getCenterX()||!da&&ia!=qa.getCenterY()<H.getCenterY()))){var va=[];C.traverse(qa.cell,!0,function(ua,Aa){var za=null!=Aa&&C.isTreeEdge(Aa);za&&va.push(Aa);(null==Aa||za)&&va.push(ua);return null==Aa||za});C.moveCells(va,
+(ia?1:-1)*O,(ia?1:-1)*u)}}}return C.addCells(ba,N)}finally{C.model.endUpdate()}}function g(M){C.model.beginUpdate();try{var ia=d(M),N=C.getIncomingTreeEdges(M),O=C.cloneCells([N[0],M]);C.model.setTerminal(N[0],O[1],!1);C.model.setTerminal(O[0],O[1],!0);C.model.setTerminal(O[0],M,!1);var ba=C.model.getParent(M),la=ba.geometry,u=[];C.view.currentRoot!=ba&&(O[1].geometry.x-=la.x,O[1].geometry.y-=la.y);C.traverse(M,!0,function(W,R){var da=null!=R&&C.isTreeEdge(R);da&&u.push(R);(null==R||da)&&u.push(W);
+return null==R||da});var H=M.geometry.width+40,P=M.geometry.height+40;ia==mxConstants.DIRECTION_SOUTH?H=0:ia==mxConstants.DIRECTION_NORTH?(H=0,P=-P):ia==mxConstants.DIRECTION_WEST?(H=-H,P=0):ia==mxConstants.DIRECTION_EAST&&(P=0);C.moveCells(u,H,P);return C.addCells(O,ba)}finally{C.model.endUpdate()}}function m(M,ia){C.model.beginUpdate();try{var N=C.model.getParent(M),O=C.getIncomingTreeEdges(M),ba=d(M);0==O.length&&(O=[C.createEdge(N,null,"",null,null,C.createCurrentEdgeStyle())],ba=ia);var la=C.cloneCells([O[0],
+M]);C.model.setTerminal(la[0],M,!0);if(null==C.model.getTerminal(la[0],!1)){C.model.setTerminal(la[0],la[1],!1);var u=C.getCellStyle(la[1]).newEdgeStyle;if(null!=u)try{var H=JSON.parse(u),P;for(P in H)C.setCellStyles(P,H[P],[la[0]]),"edgeStyle"==P&&"elbowEdgeStyle"==H[P]&&C.setCellStyles("elbow",ba==mxConstants.DIRECTION_SOUTH||ba==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[la[0]])}catch(qa){}}O=C.getOutgoingTreeEdges(M);var W=N.geometry;ia=[];C.view.currentRoot==N&&(W=new mxRectangle);for(u=
+0;u<O.length;u++){var R=C.model.getTerminal(O[u],!1);null!=R&&ia.push(R)}var da=C.view.getBounds(ia),fa=C.view.translate,ea=C.view.scale;ba==mxConstants.DIRECTION_SOUTH?(la[1].geometry.x=null==da?M.geometry.x+(M.geometry.width-la[1].geometry.width)/2:(da.x+da.width)/ea-fa.x-W.x+10,la[1].geometry.y+=la[1].geometry.height-W.y+40):ba==mxConstants.DIRECTION_NORTH?(la[1].geometry.x=null==da?M.geometry.x+(M.geometry.width-la[1].geometry.width)/2:(da.x+da.width)/ea-fa.x+-W.x+10,la[1].geometry.y-=la[1].geometry.height+
+W.y+40):(la[1].geometry.x=ba==mxConstants.DIRECTION_WEST?la[1].geometry.x-(la[1].geometry.width+W.x+40):la[1].geometry.x+(la[1].geometry.width-W.x+40),la[1].geometry.y=null==da?M.geometry.y+(M.geometry.height-la[1].geometry.height)/2:(da.y+da.height)/ea-fa.y+-W.y+10);return C.addCells(la,N)}finally{C.model.endUpdate()}}function q(M,ia,N){M=C.getOutgoingTreeEdges(M);N=C.view.getState(N);var O=[];if(null!=N&&null!=M){for(var ba=0;ba<M.length;ba++){var la=C.view.getState(C.model.getTerminal(M[ba],!1));
+null!=la&&(!ia&&Math.min(la.x+la.width,N.x+N.width)>=Math.max(la.x,N.x)||ia&&Math.min(la.y+la.height,N.y+N.height)>=Math.max(la.y,N.y))&&O.push(la)}O.sort(function(u,H){return ia?u.x+u.width-H.x-H.width:u.y+u.height-H.y-H.height})}return O}function y(M,ia){var N=d(M),O=ia==mxConstants.DIRECTION_EAST||ia==mxConstants.DIRECTION_WEST;(N==mxConstants.DIRECTION_EAST||N==mxConstants.DIRECTION_WEST)==O&&N!=ia?F.actions.get("selectParent").funct():N==ia?(ia=C.getOutgoingTreeEdges(M),null!=ia&&0<ia.length&&
+C.setSelectionCell(C.model.getTerminal(ia[0],!1))):(N=C.getIncomingTreeEdges(M),null!=N&&0<N.length&&(O=q(C.model.getTerminal(N[0],!0),O,M),M=C.view.getState(M),null!=M&&(M=mxUtils.indexOf(O,M),0<=M&&(M+=ia==mxConstants.DIRECTION_NORTH||ia==mxConstants.DIRECTION_WEST?-1:1,0<=M&&M<=O.length-1&&C.setSelectionCell(O[M].cell)))))}var F=this,C=F.editor.graph,I=C.getModel(),G=F.menus.createPopupMenu;F.menus.createPopupMenu=function(M,ia,N){G.apply(this,arguments);if(1==C.getSelectionCount()){ia=C.getSelectionCell();
+var O=C.getOutgoingTreeEdges(ia);M.addSeparator();0<O.length&&(n(C.getSelectionCell())&&this.addMenuItems(M,["selectChildren"],null,N),this.addMenuItems(M,["selectDescendants"],null,N));n(C.getSelectionCell())?(M.addSeparator(),0<C.getIncomingTreeEdges(ia).length&&this.addMenuItems(M,["selectSiblings","selectParent"],null,N)):0<C.model.getEdgeCount(ia)&&this.addMenuItems(M,["selectConnections"],null,N)}};F.actions.addAction("selectChildren",function(){if(C.isEnabled()&&1==C.getSelectionCount()){var M=
+C.getSelectionCell();M=C.getOutgoingTreeEdges(M);if(null!=M){for(var ia=[],N=0;N<M.length;N++)ia.push(C.model.getTerminal(M[N],!1));C.setSelectionCells(ia)}}},null,null,"Alt+Shift+X");F.actions.addAction("selectSiblings",function(){if(C.isEnabled()&&1==C.getSelectionCount()){var M=C.getSelectionCell();M=C.getIncomingTreeEdges(M);if(null!=M&&0<M.length&&(M=C.getOutgoingTreeEdges(C.model.getTerminal(M[0],!0)),null!=M)){for(var ia=[],N=0;N<M.length;N++)ia.push(C.model.getTerminal(M[N],!1));C.setSelectionCells(ia)}}},
+null,null,"Alt+Shift+S");F.actions.addAction("selectParent",function(){if(C.isEnabled()&&1==C.getSelectionCount()){var M=C.getSelectionCell();M=C.getIncomingTreeEdges(M);null!=M&&0<M.length&&C.setSelectionCell(C.model.getTerminal(M[0],!0))}},null,null,"Alt+Shift+P");F.actions.addAction("selectDescendants",function(M,ia){M=C.getSelectionCell();if(C.isEnabled()&&C.model.isVertex(M)){if(null!=ia&&mxEvent.isAltDown(ia))C.setSelectionCells(C.model.getTreeEdges(M,null==ia||!mxEvent.isShiftDown(ia),null==
+ia||!mxEvent.isControlDown(ia)));else{var N=[];C.traverse(M,!0,function(O,ba){var la=null!=ba&&C.isTreeEdge(ba);la&&N.push(ba);null!=ba&&!la||null!=ia&&mxEvent.isShiftDown(ia)||N.push(O);return null==ba||la})}C.setSelectionCells(N)}},null,null,"Alt+Shift+D");var Z=C.removeCells;C.removeCells=function(M,ia){ia=null!=ia?ia:!0;null==M&&(M=this.getDeletableCells(this.getSelectionCells()));ia&&(M=this.getDeletableCells(this.addAllEdges(M)));for(var N=[],O=0;O<M.length;O++){var ba=M[O];I.isEdge(ba)&&t(ba)&&
+(N.push(ba),ba=I.getTerminal(ba,!1));if(n(ba)){var la=[];C.traverse(ba,!0,function(u,H){var P=null!=H&&C.isTreeEdge(H);P&&la.push(H);(null==H||P)&&la.push(u);return null==H||P});0<la.length&&(N=N.concat(la),ba=C.getIncomingTreeEdges(M[O]),M=M.concat(ba))}else null!=ba&&N.push(M[O])}M=N;return Z.apply(this,arguments)};F.hoverIcons.getStateAt=function(M,ia,N){return n(M.cell)?null:this.graph.view.getState(this.graph.getCellAt(ia,N))};var ca=C.duplicateCells;C.duplicateCells=function(M,ia){M=null!=M?
+M:this.getSelectionCells();for(var N=M.slice(0),O=0;O<N.length;O++){var ba=C.view.getState(N[O]);if(null!=ba&&n(ba.cell)){var la=C.getIncomingTreeEdges(ba.cell);for(ba=0;ba<la.length;ba++)mxUtils.remove(la[ba],M)}}this.model.beginUpdate();try{var u=ca.call(this,M,ia);if(u.length==M.length)for(O=0;O<M.length;O++)if(n(M[O])){var H=C.getIncomingTreeEdges(u[O]);la=C.getIncomingTreeEdges(M[O]);if(0==H.length&&0<la.length){var P=this.cloneCell(la[0]);this.addEdge(P,C.getDefaultParent(),this.model.getTerminal(la[0],
+!0),u[O])}}}finally{this.model.endUpdate()}return u};var aa=C.moveCells;C.moveCells=function(M,ia,N,O,ba,la,u){var H=null;this.model.beginUpdate();try{var P=ba,W=this.getCurrentCellStyle(ba);if(null!=M&&n(ba)&&"1"==mxUtils.getValue(W,"treeFolding","0")){for(var R=0;R<M.length;R++)if(n(M[R])||C.model.isEdge(M[R])&&null==C.model.getTerminal(M[R],!0)){ba=C.model.getParent(M[R]);break}if(null!=P&&ba!=P&&null!=this.view.getState(M[0])){var da=C.getIncomingTreeEdges(M[0]);if(0<da.length){var fa=C.view.getState(C.model.getTerminal(da[0],
+!0));if(null!=fa){var ea=C.view.getState(P);null!=ea&&(ia=(ea.getCenterX()-fa.getCenterX())/C.view.scale,N=(ea.getCenterY()-fa.getCenterY())/C.view.scale)}}}}H=aa.apply(this,arguments);if(null!=H&&null!=M&&H.length==M.length)for(R=0;R<H.length;R++)if(this.model.isEdge(H[R]))n(P)&&0>mxUtils.indexOf(H,this.model.getTerminal(H[R],!0))&&this.model.setTerminal(H[R],P,!0);else if(n(M[R])&&(da=C.getIncomingTreeEdges(M[R]),0<da.length))if(!O)n(P)&&0>mxUtils.indexOf(M,this.model.getTerminal(da[0],!0))&&this.model.setTerminal(da[0],
+P,!0);else if(0==C.getIncomingTreeEdges(H[R]).length){W=P;if(null==W||W==C.model.getParent(M[R]))W=C.model.getTerminal(da[0],!0);O=this.cloneCell(da[0]);this.addEdge(O,C.getDefaultParent(),W,H[R])}}finally{this.model.endUpdate()}return H};if(null!=F.sidebar){var Y=F.sidebar.dropAndConnect;F.sidebar.dropAndConnect=function(M,ia,N,O){var ba=C.model,la=null;ba.beginUpdate();try{if(la=Y.apply(this,arguments),n(M))for(var u=0;u<la.length;u++)if(ba.isEdge(la[u])&&null==ba.getTerminal(la[u],!0)){ba.setTerminal(la[u],
+M,!0);var H=C.getCellGeometry(la[u]);H.points=null;null!=H.getTerminalPoint(!0)&&H.setTerminalPoint(null,!0)}}finally{ba.endUpdate()}return la}}var pa={88:F.actions.get("selectChildren"),84:F.actions.get("selectSubtree"),80:F.actions.get("selectParent"),83:F.actions.get("selectSiblings")},Q=F.onKeyDown;F.onKeyDown=function(M){try{if(C.isEnabled()&&!C.isEditing()&&n(C.getSelectionCell())&&1==C.getSelectionCount()){var ia=null;0<C.getIncomingTreeEdges(C.getSelectionCell()).length&&(9==M.which?ia=mxEvent.isShiftDown(M)?
+g(C.getSelectionCell()):m(C.getSelectionCell()):13==M.which&&(ia=f(C.getSelectionCell(),!mxEvent.isShiftDown(M))));if(null!=ia&&0<ia.length)1==ia.length&&C.model.isEdge(ia[0])?C.setSelectionCell(C.model.getTerminal(ia[0],!1)):C.setSelectionCell(ia[ia.length-1]),null!=F.hoverIcons&&F.hoverIcons.update(C.view.getState(C.getSelectionCell())),C.startEditingAtCell(C.getSelectionCell()),mxEvent.consume(M);else if(mxEvent.isAltDown(M)&&mxEvent.isShiftDown(M)){var N=pa[M.keyCode];null!=N&&(N.funct(M),mxEvent.consume(M))}else 37==
+M.keyCode?(y(C.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(M)):38==M.keyCode?(y(C.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(M)):39==M.keyCode?(y(C.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(M)):40==M.keyCode&&(y(C.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(M))}}catch(O){F.handleError(O)}mxEvent.isConsumed(M)||Q.apply(this,arguments)};var X=C.connectVertex;C.connectVertex=function(M,ia,N,O,ba,la,u){var H=C.getIncomingTreeEdges(M);
+if(n(M)){var P=d(M),W=P==mxConstants.DIRECTION_EAST||P==mxConstants.DIRECTION_WEST,R=ia==mxConstants.DIRECTION_EAST||ia==mxConstants.DIRECTION_WEST;return P==ia||0==H.length?m(M,ia):W==R?g(M):f(M,ia!=mxConstants.DIRECTION_NORTH&&ia!=mxConstants.DIRECTION_WEST)}return X.apply(this,arguments)};C.getSubtree=function(M){var ia=[M];!D(M)&&!n(M)||E(M)||C.traverse(M,!0,function(N,O){var ba=null!=O&&C.isTreeEdge(O);ba&&0>mxUtils.indexOf(ia,O)&&ia.push(O);(null==O||ba)&&0>mxUtils.indexOf(ia,N)&&ia.push(N);
+return null==O||ba});return ia};var ha=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){ha.apply(this,arguments);(D(this.state.cell)||n(this.state.cell))&&!E(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(M){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(M),mxEvent.getClientY(M),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(M);this.graph.isMouseDown=!0;F.hoverIcons.reset();mxEvent.consume(M)})))};var U=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=
+function(){U.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 ma=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(M){ma.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=M?"":"none")};var T=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=
+function(M,ia){T.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var k=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var n=k.apply(this,arguments),D=this.graph;return n.concat([this.addEntry("tree container",function(){var t=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");t.vertex=
!0;var E=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');E.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 f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
f.geometry.relative=!0;f.edge=!0;E.insertEdge(f,!0);d.insertEdge(f,!1);t.insert(f);t.insert(E);t.insert(d);return sb.createVertexTemplateFromCells([t],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var t=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");t.vertex=!0;var E=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};');
E.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 f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");f.geometry.relative=!0;f.edge=!0;
@@ -3920,27 +3922,26 @@ m.geometry.relative=!0;m.edge=!0;E.insertEdge(m,!0);g.insertEdge(m,!1);t.insert(
E.geometry.setTerminalPoint(new mxPoint(0,0),!0);E.geometry.relative=!0;E.edge=!0;t.insertEdge(E,!1);return sb.createVertexTemplateFromCells([t,E],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree sub sections",function(){var t=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");t.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");
E.geometry.setTerminalPoint(new mxPoint(110,-40),!0);E.geometry.relative=!0;E.edge=!0;t.insertEdge(E,!1);var d=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");f.geometry.setTerminalPoint(new mxPoint(110,-40),!0);f.geometry.relative=
!0;f.edge=!0;d.insertEdge(f,!1);return sb.createVertexTemplateFromCells([E,f,t,d],220,60,"Sub Sections")})])}}})();EditorUi.windowed="0"!=urlParams.windows;
-EditorUi.initMinimalTheme=function(){function b(Q,W){if(EditorUi.windowed){var ha=Q.editor.graph;ha.popupMenuHandler.hideMenu();if(null==Q.formatWindow){W="1"==urlParams.sketch?Math.max(10,Q.diagramContainer.clientWidth-241):Math.max(10,Q.diagramContainer.clientWidth-248);var la="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;ha="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,ha.container.clientHeight-10);Q.formatWindow=new t(Q,mxResources.get("format"),W,la,240,ha,function(U){var L=
-Q.createFormat(U);L.init();Q.addListener("darkModeChanged",mxUtils.bind(this,function(){L.refresh()}));return L});Q.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){Q.formatWindow.window.fit()}));Q.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else Q.formatWindow.window.setVisible(null!=W?W:!Q.formatWindow.window.isVisible())}else{if(null==Q.formatElt){Q.formatElt=D();var ja=Q.createFormat(Q.formatElt);ja.init();Q.formatElt.style.border="none";Q.formatElt.style.width=
-"240px";Q.formatElt.style.borderLeft="1px solid gray";Q.formatElt.style.right="0px";Q.addListener("darkModeChanged",mxUtils.bind(this,function(){ja.refresh()}))}ha=Q.diagramContainer.parentNode;null!=Q.formatElt.parentNode?(Q.formatElt.parentNode.removeChild(Q.formatElt),ha.style.right="0px"):(ha.parentNode.appendChild(Q.formatElt),ha.style.right=Q.formatElt.style.width)}}function e(Q,W){function ha(L,da){var O=Q.menus.get(L);L=U.addMenu(da,mxUtils.bind(this,function(){O.funct.apply(this,arguments)}));
-L.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;";L.className="geTitle";W.appendChild(L);return L}var la=document.createElement("div");la.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";la.className="geTitle";var ja=document.createElement("span");ja.style.fontSize="18px";ja.style.marginRight=
-"5px";ja.innerHTML="+";la.appendChild(ja);mxUtils.write(la,mxResources.get("moreShapes"));W.appendChild(la);mxEvent.addListener(la,"click",function(){Q.actions.get("shapes").funct()});var U=new Menubar(Q,W);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?la.style.bottom="0":null!=Q.actions.get("newLibrary")?(la=document.createElement("div"),la.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",
-la.className="geTitle",ja=document.createElement("span"),ja.style.cssText="position:relative;top:6px;",mxUtils.write(ja,mxResources.get("newLibrary")),la.appendChild(ja),W.appendChild(la),mxEvent.addListener(la,"click",Q.actions.get("newLibrary").funct),la=document.createElement("div"),la.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;",la.className="geTitle",ja=
-document.createElement("span"),ja.style.cssText="position:relative;top:6px;",mxUtils.write(ja,mxResources.get("openLibrary")),la.appendChild(ja),W.appendChild(la),mxEvent.addListener(la,"click",Q.actions.get("openLibrary").funct)):(la=ha("newLibrary",mxResources.get("newLibrary")),la.style.boxSizing="border-box",la.style.paddingRight="6px",la.style.paddingLeft="6px",la.style.height="32px",la.style.left="0",la=ha("openLibraryFrom",mxResources.get("openLibraryFrom")),la.style.borderLeft="1px solid lightgray",
-la.style.boxSizing="border-box",la.style.paddingRight="6px",la.style.paddingLeft="6px",la.style.height="32px",la.style.left="50%");W.appendChild(Q.sidebar.container);W.style.overflow="hidden"}function k(Q,W){if(EditorUi.windowed){var ha=Q.editor.graph;ha.popupMenuHandler.hideMenu();if(null==Q.sidebarWindow){W=Math.min(ha.container.clientWidth-10,218);var la="1"==urlParams.embedInline?650:Math.min(ha.container.clientHeight-40,650);Q.sidebarWindow=new t(Q,mxResources.get("shapes"),"1"==urlParams.sketch&&
-"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&"1"!=urlParams.embedInline?Math.max(30,(ha.container.clientHeight-la)/2):56,W-6,la-6,function(ja){e(Q,ja)});Q.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){Q.sidebarWindow.window.fit()}));Q.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);Q.sidebarWindow.window.setVisible(!0);isLocalStorage&&Q.getLocalData("sidebar",function(ja){Q.sidebar.showEntries(ja,null,!0)});Q.restoreLibraries()}else Q.sidebarWindow.window.setVisible(null!=
-W?W:!Q.sidebarWindow.window.isVisible())}else null==Q.sidebarElt&&(Q.sidebarElt=D(),e(Q,Q.sidebarElt),Q.sidebarElt.style.border="none",Q.sidebarElt.style.width="210px",Q.sidebarElt.style.borderRight="1px solid gray"),ha=Q.diagramContainer.parentNode,null!=Q.sidebarElt.parentNode?(Q.sidebarElt.parentNode.removeChild(Q.sidebarElt),ha.style.left="0px"):(ha.parentNode.appendChild(Q.sidebarElt),ha.style.left=Q.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||
-"undefined"===typeof window.Menus)window.uiTheme=null;else{var n=0;try{n=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(Q){}var D=function(){var Q=document.createElement("div");Q.className="geSidebarContainer";Q.style.position="absolute";Q.style.width="100%";Q.style.height="100%";Q.style.border="1px solid whiteSmoke";Q.style.overflowX="hidden";Q.style.overflowY="auto";return Q},t=function(Q,W,ha,la,ja,U,L){var da=D();L(da);this.window=new mxWindow(W,da,ha,
-la,ja,U,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.setLocation=function(O,N){var aa=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,ma=this.table.firstChild.firstChild.firstChild;O=Math.max(0,Math.min(O,(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-ma.clientWidth-2));N=Math.max(0,Math.min(N,aa-ma.clientHeight-
-2));this.getX()==O&&this.getY()==N||mxWindow.prototype.setLocation.apply(this,arguments)};mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(O){null==O&&(O=window.event);return null!=O&&Q.isSelectionAllowed(O)}))};Editor.checkmarkImage=Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;mxWindow.prototype.closeImage=
-Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');
+EditorUi.initMinimalTheme=function(){function b(Q,X){if(EditorUi.windowed){var ha=Q.editor.graph;ha.popupMenuHandler.hideMenu();if(null==Q.formatWindow){X="1"==urlParams.sketch?Math.max(10,Q.diagramContainer.clientWidth-241):Math.max(10,Q.diagramContainer.clientWidth-248);var U="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;ha="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,ha.container.clientHeight-10);Q.formatWindow=new t(Q,mxResources.get("format"),X,U,240,ha,function(T){var M=
+Q.createFormat(T);M.init();Q.addListener("darkModeChanged",mxUtils.bind(this,function(){M.refresh()}));return M});Q.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){Q.formatWindow.window.fit()}));Q.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else Q.formatWindow.window.setVisible(null!=X?X:!Q.formatWindow.window.isVisible())}else{if(null==Q.formatElt){Q.formatElt=D();var ma=Q.createFormat(Q.formatElt);ma.init();Q.formatElt.style.border="none";Q.formatElt.style.width=
+"240px";Q.formatElt.style.borderLeft="1px solid gray";Q.formatElt.style.right="0px";Q.addListener("darkModeChanged",mxUtils.bind(this,function(){ma.refresh()}))}ha=Q.diagramContainer.parentNode;null!=Q.formatElt.parentNode?(Q.formatElt.parentNode.removeChild(Q.formatElt),ha.style.right="0px"):(ha.parentNode.appendChild(Q.formatElt),ha.style.right=Q.formatElt.style.width)}}function e(Q,X){function ha(M,ia){var N=Q.menus.get(M);M=T.addMenu(ia,mxUtils.bind(this,function(){N.funct.apply(this,arguments)}));
+M.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;";M.className="geTitle";X.appendChild(M);return M}var U=document.createElement("div");U.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";U.className="geTitle";var ma=document.createElement("span");ma.style.fontSize="18px";ma.style.marginRight=
+"5px";ma.innerHTML="+";U.appendChild(ma);mxUtils.write(U,mxResources.get("moreShapes"));X.appendChild(U);mxEvent.addListener(U,"click",function(){Q.actions.get("shapes").funct()});var T=new Menubar(Q,X);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?U.style.bottom="0":null!=Q.actions.get("newLibrary")?(U=document.createElement("div"),U.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",
+U.className="geTitle",ma=document.createElement("span"),ma.style.cssText="position:relative;top:6px;",mxUtils.write(ma,mxResources.get("newLibrary")),U.appendChild(ma),X.appendChild(U),mxEvent.addListener(U,"click",Q.actions.get("newLibrary").funct),U=document.createElement("div"),U.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;",U.className="geTitle",ma=document.createElement("span"),
+ma.style.cssText="position:relative;top:6px;",mxUtils.write(ma,mxResources.get("openLibrary")),U.appendChild(ma),X.appendChild(U),mxEvent.addListener(U,"click",Q.actions.get("openLibrary").funct)):(U=ha("newLibrary",mxResources.get("newLibrary")),U.style.boxSizing="border-box",U.style.paddingRight="6px",U.style.paddingLeft="6px",U.style.height="32px",U.style.left="0",U=ha("openLibraryFrom",mxResources.get("openLibraryFrom")),U.style.borderLeft="1px solid lightgray",U.style.boxSizing="border-box",
+U.style.paddingRight="6px",U.style.paddingLeft="6px",U.style.height="32px",U.style.left="50%");X.appendChild(Q.sidebar.container);X.style.overflow="hidden"}function k(Q,X){if(EditorUi.windowed){var ha=Q.editor.graph;ha.popupMenuHandler.hideMenu();if(null==Q.sidebarWindow){X=Math.min(ha.container.clientWidth-10,218);var U="1"==urlParams.embedInline?650:Math.min(ha.container.clientHeight-40,650);Q.sidebarWindow=new t(Q,mxResources.get("shapes"),"1"==urlParams.sketch&&"1"!=urlParams.embedInline?66:10,
+"1"==urlParams.sketch&&"1"!=urlParams.embedInline?Math.max(30,(ha.container.clientHeight-U)/2):56,X-6,U-6,function(ma){e(Q,ma)});Q.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){Q.sidebarWindow.window.fit()}));Q.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);Q.sidebarWindow.window.setVisible(!0);isLocalStorage&&Q.getLocalData("sidebar",function(ma){Q.sidebar.showEntries(ma,null,!0)});Q.restoreLibraries()}else Q.sidebarWindow.window.setVisible(null!=X?X:!Q.sidebarWindow.window.isVisible())}else null==
+Q.sidebarElt&&(Q.sidebarElt=D(),e(Q,Q.sidebarElt),Q.sidebarElt.style.border="none",Q.sidebarElt.style.width="210px",Q.sidebarElt.style.borderRight="1px solid gray"),ha=Q.diagramContainer.parentNode,null!=Q.sidebarElt.parentNode?(Q.sidebarElt.parentNode.removeChild(Q.sidebarElt),ha.style.left="0px"):(ha.parentNode.appendChild(Q.sidebarElt),ha.style.left=Q.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=
+null;else{var n=0;try{n=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(Q){}var D=function(){var Q=document.createElement("div");Q.className="geSidebarContainer";Q.style.position="absolute";Q.style.width="100%";Q.style.height="100%";Q.style.border="1px solid whiteSmoke";Q.style.overflowX="hidden";Q.style.overflowY="auto";return Q},t=function(Q,X,ha,U,ma,T,M){var ia=D();M(ia);this.window=new mxWindow(X,ia,ha,U,ma,T,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);
+this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);Q.installResizeHandler(this,!0);mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(N){null==N&&(N=window.event);return null!=N&&Q.isSelectionAllowed(N)}))};Editor.checkmarkImage=Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;
+mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');
mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR="#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR="#C0C0C0";mxConstants.HIGHLIGHT_STROKEWIDTH=5;mxConstants.HIGHLIGHT_OPACITY=35;mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity=
"0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur="1.2";Format.inactiveTabBackgroundColor="#f0f0f0";mxGraphHandler.prototype.previewColor="#C0C0C0";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight="1"==urlParams.sketch?1:46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert="1"!=urlParams.sketch&&!mxClient.IS_IOS&&!mxClient.IS_ANDROID;
EditorUi.prototype.setDarkMode=function(Q){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetDarkMode(Q);null==urlParams.dark&&(mxSettings.settings.darkMode=Q,mxSettings.save());this.fireEvent(new mxEventObject("darkModeChanged"))}),0)};var E=document.createElement("link");E.setAttribute("rel","stylesheet");E.setAttribute("href",STYLE_PATH+"/dark.css");E.setAttribute("charset","UTF-8");E.setAttribute("type",
-"text/css");EditorUi.prototype.doSetDarkMode=function(Q){if(Editor.darkMode!=Q){var W=this.editor.graph;Editor.darkMode=Q;this.spinner.opts.color=Editor.isDarkMode()?"#c0c0c0":"#000";W.view.gridColor=Editor.isDarkMode()?W.view.defaultDarkGridColor:W.view.defaultGridColor;W.defaultPageBackgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";W.defaultPageBorderColor=Editor.isDarkMode()?"#505759":"#ffffff";W.shapeBackgroundColor=Editor.isDarkMode()?Editor.darkColor:
-"#ffffff";W.shapeForegroundColor=Editor.isDarkMode()?Editor.lightColor:"#000000";W.defaultThemeName=Editor.isDarkMode()?"darkTheme":"default-style2";W.graphHandler.previewColor=Editor.isDarkMode()?"#cccccc":"black";document.body.style.backgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";W.loadStylesheet();null!=this.actions.layersWindow&&(Q=this.actions.layersWindow.window.isVisible(),this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),
-this.actions.layersWindow=null,Q&&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();Graph.prototype.defaultPageBackgroundColor=W.defaultPageBackgroundColor;Graph.prototype.defaultPageBorderColor=W.defaultPageBorderColor;Graph.prototype.shapeBackgroundColor=W.shapeBackgroundColor;Graph.prototype.shapeForegroundColor=
-W.shapeForegroundColor;Graph.prototype.defaultThemeName=W.defaultThemeName;StyleFormatPanel.prototype.defaultStrokeColor=Editor.isDarkMode()?"#cccccc":"black";BaseFormatPanel.prototype.buttonBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"white";Format.inactiveTabBackgroundColor=Editor.isDarkMode()?"black":"#f0f0f0";Dialog.backdropColor=Editor.isDarkMode()?Editor.darkColor:"white";mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000FF";Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?
+"text/css");EditorUi.prototype.doSetDarkMode=function(Q){if(Editor.darkMode!=Q){var X=this.editor.graph;Editor.darkMode=Q;this.spinner.opts.color=Editor.isDarkMode()?"#c0c0c0":"#000";X.view.gridColor=Editor.isDarkMode()?X.view.defaultDarkGridColor:X.view.defaultGridColor;X.defaultPageBackgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";X.defaultPageBorderColor=Editor.isDarkMode()?"#505759":"#ffffff";X.shapeBackgroundColor=Editor.isDarkMode()?Editor.darkColor:
+"#ffffff";X.shapeForegroundColor=Editor.isDarkMode()?Editor.lightColor:"#000000";X.defaultThemeName=Editor.isDarkMode()?"darkTheme":"default-style2";X.graphHandler.previewColor=Editor.isDarkMode()?"#cccccc":"black";document.body.style.backgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";X.loadStylesheet();null!=this.actions.layersWindow&&(Q=this.actions.layersWindow.window.isVisible(),this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),
+this.actions.layersWindow=null,Q&&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();Graph.prototype.defaultPageBackgroundColor=X.defaultPageBackgroundColor;Graph.prototype.defaultPageBorderColor=X.defaultPageBorderColor;Graph.prototype.shapeBackgroundColor=X.shapeBackgroundColor;Graph.prototype.shapeForegroundColor=
+X.shapeForegroundColor;Graph.prototype.defaultThemeName=X.defaultThemeName;StyleFormatPanel.prototype.defaultStrokeColor=Editor.isDarkMode()?"#cccccc":"black";BaseFormatPanel.prototype.buttonBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"white";Format.inactiveTabBackgroundColor=Editor.isDarkMode()?"black":"#f0f0f0";Dialog.backdropColor=Editor.isDarkMode()?Editor.darkColor:"white";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;d.innerHTML=Editor.createMinimalCss();Editor.darkMode?null==E.parentNode&&document.getElementsByTagName("head")[0].appendChild(E):null!=E.parentNode&&E.parentNode.removeChild(E)}};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 .geSidebarContainer *:not(svg *) { font-size:9pt; }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; }.geStatus > div { box-sizing: border-box; max-width: 100%; text-overflow: ellipsis; }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: '+
@@ -3951,101 +3952,102 @@ Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMo
(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 d=document.createElement("style");d.type="text/css";d.innerHTML=Editor.createMinimalCss();document.getElementsByTagName("head")[0].appendChild(d);Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var f=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");f.apply(this,arguments)};var g=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){g.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var m=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(Q,
-W){null!=W.shortcut&&900>n&&!mxClient.IS_IOS?Q.firstChild.nextSibling.setAttribute("title",W.shortcut):m.apply(this,arguments)};var q=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){q.apply(this,arguments);if(null!=this.userElement){var Q=this.userElement;Q.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+Q.style.display;Q.className="geToolbarButton";Q.innerText="";Q.style.backgroundImage="url("+Editor.userImage+")";Q.style.backgroundPosition="center center";
-Q.style.backgroundRepeat="no-repeat";Q.style.backgroundSize="24px 24px";Q.style.height="24px";Q.style.width="24px";Q.style.cssFloat="right";Q.setAttribute("title",mxResources.get("changeUser"));if("none"!=Q.style.display){Q.style.display="inline-block";var W=this.getCurrentFile();if(null!=W&&W.isRealtimeEnabled()&&W.isRealtimeSupported()){var ha=document.createElement("img");ha.setAttribute("border","0");ha.style.position="absolute";ha.style.left="18px";ha.style.top="2px";ha.style.width="12px";ha.style.height=
-"12px";var la=W.getRealtimeError();W=W.getRealtimeState();var ja=mxResources.get("realtimeCollaboration");1==W?(ha.src=Editor.syncImage,ja+=" ("+mxResources.get("online")+")"):(ha.src=Editor.syncProblemImage,ja=null!=la&&null!=la.message?ja+(" ("+la.message+")"):ja+(" ("+mxResources.get("disconnected")+")"));ha.setAttribute("title",ja);Q.style.paddingRight="4px";Q.appendChild(ha)}}}};var y=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){y.apply(this,arguments);if(null!=
+X){null!=X.shortcut&&900>n&&!mxClient.IS_IOS?Q.firstChild.nextSibling.setAttribute("title",X.shortcut):m.apply(this,arguments)};var q=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){q.apply(this,arguments);if(null!=this.userElement){var Q=this.userElement;Q.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+Q.style.display;Q.className="geToolbarButton";Q.innerText="";Q.style.backgroundImage="url("+Editor.userImage+")";Q.style.backgroundPosition="center center";
+Q.style.backgroundRepeat="no-repeat";Q.style.backgroundSize="24px 24px";Q.style.height="24px";Q.style.width="24px";Q.style.cssFloat="right";Q.setAttribute("title",mxResources.get("changeUser"));if("none"!=Q.style.display){Q.style.display="inline-block";var X=this.getCurrentFile();if(null!=X&&X.isRealtimeEnabled()&&X.isRealtimeSupported()){var ha=document.createElement("img");ha.setAttribute("border","0");ha.style.position="absolute";ha.style.left="18px";ha.style.top="2px";ha.style.width="12px";ha.style.height=
+"12px";var U=X.getRealtimeError();X=X.getRealtimeState();var ma=mxResources.get("realtimeCollaboration");1==X?(ha.src=Editor.syncImage,ma+=" ("+mxResources.get("online")+")"):(ha.src=Editor.syncProblemImage,ma=null!=U&&null!=U.message?ma+(" ("+U.message+")"):ma+(" ("+mxResources.get("disconnected")+")"));ha.setAttribute("title",ma);Q.style.paddingRight="4px";Q.appendChild(ha)}}}};var y=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){y.apply(this,arguments);if(null!=
this.shareButton){var Q=this.shareButton;Q.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";Q.className="geToolbarButton";Q.innerText="";Q.style.backgroundImage="url("+Editor.shareImage+")";Q.style.backgroundPosition="center center";Q.style.backgroundRepeat="no-repeat";Q.style.backgroundSize="24px 24px";Q.style.height="24px";Q.style.width="24px";"1"==urlParams.sketch&&(this.shareButton.style.display="none")}null!=this.buttonContainer&&(this.buttonContainer.style.marginTop=
-"-2px",this.buttonContainer.style.paddingTop="4px")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer&&"1"!=urlParams.embedInline){var Q=document.createElement("div");Q.style.display="inline-block";Q.style.position="relative";Q.style.marginTop="6px";Q.style.marginRight="4px";var W=document.createElement("a");W.className="geMenuItem gePrimaryBtn";W.style.marginLeft="8px";W.style.padding="6px";if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var ha="1"==urlParams.publishClose?
-mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(W,ha);W.setAttribute("title",ha);mxEvent.addListener(W,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));Q.appendChild(W)}}else mxUtils.write(W,mxResources.get("save")),W.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(W,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),Q.appendChild(W),"1"==urlParams.saveAndExit&&(W=document.createElement("a"),
-mxUtils.write(W,mxResources.get("saveAndExit")),W.setAttribute("title",mxResources.get("saveAndExit")),W.className="geMenuItem",W.style.marginLeft="6px",W.style.padding="6px",mxEvent.addListener(W,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),Q.appendChild(W));"1"!=urlParams.noExitBtn&&(W=document.createElement("a"),ha="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(W,ha),W.setAttribute("title",ha),W.className="geMenuItem",
-W.style.marginLeft="6px",W.style.padding="6px",mxEvent.addListener(W,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),Q.appendChild(W));this.buttonContainer.appendChild(Q);this.buttonContainer.style.top="6px";this.editor.fireEvent(new mxEventObject("statusChanged"))}};var F=Sidebar.prototype.getTooltipOffset;Sidebar.prototype.getTooltipOffset=function(Q,W){if(null==this.editorUi.sidebarWindow||mxUtils.isAncestorNode(this.editorUi.picker,Q)){var ha=mxUtils.getOffset(this.editorUi.picker);
-ha.x+=this.editorUi.picker.offsetWidth+4;ha.y+=Q.offsetTop-W.height/2+16;return ha}var la=F.apply(this,arguments);ha=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);la.x+=ha.x-16;la.y+=ha.y;return la};var C=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(Q,W,ha){var la=this.editorUi.editor.graph;Q.smartSeparators=!0;C.apply(this,arguments);"1"==urlParams.sketch?la.isEnabled()&&(Q.addSeparator(),1==la.getSelectionCount()&&this.addMenuItems(Q,["-","lockUnlock"],null,
-ha)):1==la.getSelectionCount()?(la.isCellFoldable(la.getSelectionCell())&&this.addMenuItems(Q,la.isCellCollapsed(W)?["expand"]:["collapse"],null,ha),this.addMenuItems(Q,["collapsible","-","lockUnlock","enterGroup"],null,ha),Q.addSeparator(),this.addSubmenu("layout",Q)):la.isSelectionEmpty()&&la.isEnabled()?(Q.addSeparator(),this.addMenuItems(Q,["editData"],null,ha),Q.addSeparator(),this.addSubmenu("layout",Q),this.addSubmenu("insert",Q),this.addMenuItems(Q,["-","exitGroup"],null,ha)):la.isEnabled()&&
-this.addMenuItems(Q,["-","lockUnlock"],null,ha)};var I=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(Q,W,ha){I.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(Q,["copyAsImage"],null,ha)};EditorUi.prototype.toggleFormatPanel=function(Q){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=Q?Q:!this.formatWindow.window.isVisible()):b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};
-var G=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.window.setVisible(!1),this.actions.outlineWindow.window.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&
-(this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.window.setVisible(!1),this.menus.tagsWindow.window.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.window.setVisible(!1),this.menus.findWindow.window.destroy(),this.menus.findWindow=null);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.window.setVisible(!1),this.menus.findReplaceWindow.window.destroy(),
-this.menus.findReplaceWindow=null);G.apply(this,arguments)};var Y=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(Q){Y.apply(this,arguments);if(Q){var W=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=W&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=W||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),
-null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var ba=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(Q){Q=ba.apply(this,arguments);var W=this.editorUi,ha=W.editor.graph;if(ha.isEnabled()&&"1"==urlParams.sketch){var la=this.createOption(mxResources.get("sketch"),function(){return Editor.sketchMode},function(ja,U){W.setSketchMode(!Editor.sketchMode);null!=U&&mxEvent.isShiftDown(U)||ha.updateCellStyles({sketch:ja?
-"1":null},ha.getVerticesAndEdges())},{install:function(ja){this.listener=function(){ja(Editor.sketchMode)};W.addListener("sketchModeChanged",this.listener)},destroy:function(){W.removeListener(this.listener)}});Q.appendChild(la)}return Q};var Z=Menus.prototype.init;Menus.prototype.init=function(){Z.apply(this,arguments);var Q=this.editorUi,W=Q.editor.graph;Q.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";Q.actions.get("createShape").label=mxResources.get("shape")+"...";Q.actions.get("outline").label=
-mxResources.get("outline")+"...";Q.actions.get("layers").label=mxResources.get("layers")+"...";Q.actions.get("tags").label=mxResources.get("tags")+"...";Q.actions.get("comments").label=mxResources.get("comments")+"...";var ha=Q.actions.put("toggleDarkMode",new Action(mxResources.get("dark"),function(N){Q.setDarkMode(!Editor.darkMode)}));ha.setToggleAction(!0);ha.setSelectedCallback(function(){return Editor.isDarkMode()});ha=Q.actions.put("toggleSketchMode",new Action(mxResources.get("sketch"),function(N){Q.setSketchMode(!Editor.sketchMode)}));
-ha.setToggleAction(!0);ha.setSelectedCallback(function(){return Editor.sketchMode});ha=Q.actions.put("togglePagesVisible",new Action(mxResources.get("pages"),function(N){Q.setPagesVisible(!Editor.pagesVisible)}));ha.setToggleAction(!0);ha.setSelectedCallback(function(){return Editor.pagesVisible});Q.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){W.popupMenuHandler.hideMenu();Q.showImportCsvDialog()}));Q.actions.put("importText",new Action(mxResources.get("text")+"...",
-function(){var N=new ParseDialog(Q,"Insert from Text");Q.showDialog(N.container,620,420,!0,!1);N.init()}));Q.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var N=new ParseDialog(Q,"Insert from Text","formatSql");Q.showDialog(N.container,620,420,!0,!1);N.init()}));Q.actions.put("toggleShapes",new Action(mxResources.get("1"==urlParams.sketch?"moreShapes":"shapes")+"...",function(){k(Q)},null,null,Editor.ctrlKey+"+Shift+K"));Q.actions.put("toggleFormat",new Action(mxResources.get("format")+
-"...",function(){b(Q)})).shortcut=Q.actions.get("formatPanel").shortcut;EditorUi.enablePlantUml&&!Q.isOffline()&&Q.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var N=new ParseDialog(Q,mxResources.get("plantUml")+"...","plantUml");Q.showDialog(N.container,620,420,!0,!1);N.init()}));Q.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var N=new ParseDialog(Q,mxResources.get("mermaid")+"...","mermaid");Q.showDialog(N.container,620,420,!0,!1);
-N.init()}));var la=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,function(N,aa){var ma=this.editorUi.editor.graph,u=ma.getSelectionCell();la.call(this,N,u,null,aa);this.addMenuItems(N,["editTooltip"],aa);ma.model.isVertex(u)&&this.addMenuItems(N,["editGeometry"],aa);this.addMenuItems(N,["-","edit"],aa)})));this.addPopupMenuCellEditItems=function(N,aa,ma,u){N.addSeparator();this.addSubmenu("editCell",N,u,mxResources.get("edit"))};this.put("file",new Menu(mxUtils.bind(this,
-function(N,aa){var ma=Q.getCurrentFile();Q.menus.addMenuItems(N,["new"],aa);Q.menus.addSubmenu("openFrom",N,aa);isLocalStorage&&this.addSubmenu("openRecent",N,aa);N.addSeparator(aa);null!=ma&&ma.constructor==DriveFile?Q.menus.addMenuItems(N,["save","rename","makeCopy","moveToFolder"],aa):(Q.menus.addMenuItems(N,["save","saveAs","-","rename"],aa),Q.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(N,["upload"],aa):Q.menus.addMenuItems(N,["makeCopy"],
-aa));N.addSeparator(aa);null!=ma&&(ma.isRevisionHistorySupported()&&Q.menus.addMenuItems(N,["revisionHistory"],aa),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||ma.constructor==LocalFile&&null==ma.fileHandle||Q.menus.addMenuItems(N,["synchronize"],aa));Q.menus.addMenuItems(N,["autosave"],aa);if(null!=ma&&(N.addSeparator(aa),ma.constructor==DriveFile&&Q.menus.addMenuItems(N,["share"],aa),null!=Q.fileNode&&"1"!=urlParams.embedInline)){var u=null!=ma.getTitle()?ma.getTitle():Q.defaultFilename;(ma.constructor==
-DriveFile&&null!=ma.sync&&ma.sync.isConnected()||!/(\.html)$/i.test(u)&&!/(\.svg)$/i.test(u))&&this.addMenuItems(N,["-","properties"],aa)}})));this.put("diagram",new Menu(mxUtils.bind(this,function(N,aa){var ma=Q.getCurrentFile();Q.menus.addSubmenu("extras",N,aa,mxResources.get("preferences"));N.addSeparator(aa);if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)Q.menus.addMenuItems(N,"new open - synchronize - save saveAs -".split(" "),aa);else if("1"==urlParams.embed||Q.mode==App.MODE_ATLAS){"1"!=
-urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&Q.menus.addMenuItems(N,["-","save"],aa);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||Q.mode==App.MODE_ATLAS)Q.menus.addMenuItems(N,["saveAndExit"],aa),null!=ma&&ma.isRevisionHistorySupported()&&Q.menus.addMenuItems(N,["revisionHistory"],aa);N.addSeparator(aa)}else Q.mode==App.MODE_ATLAS?Q.menus.addMenuItems(N,["save","synchronize","-"],aa):"1"!=urlParams.noFileMenu&&("1"!=urlParams.sketch?(Q.menus.addMenuItems(N,
-["new"],aa),Q.menus.addSubmenu("openFrom",N,aa),isLocalStorage&&this.addSubmenu("openRecent",N,aa),N.addSeparator(aa),null!=ma&&(ma.constructor==DriveFile&&Q.menus.addMenuItems(N,["share"],aa),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||ma.constructor==LocalFile||Q.menus.addMenuItems(N,["synchronize"],aa)),N.addSeparator(aa),Q.menus.addSubmenu("save",N,aa)):Q.menus.addSubmenu("file",N,aa));Q.menus.addSubmenu("exportAs",N,aa);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?Q.menus.addMenuItems(N,
-["import"],aa):"1"!=urlParams.noFileMenu&&Q.menus.addSubmenu("importFrom",N,aa);Q.commentsSupported()&&Q.menus.addMenuItems(N,["-","comments"],aa);Q.menus.addMenuItems(N,"- findReplace outline layers tags - pageSetup".split(" "),aa);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||Q.menus.addMenuItems(N,["print"],aa);"1"!=urlParams.sketch&&null!=ma&&null!=Q.fileNode&&"1"!=urlParams.embedInline&&(ma=null!=ma.getTitle()?ma.getTitle():Q.defaultFilename,/(\.html)$/i.test(ma)||/(\.svg)$/i.test(ma)||
-this.addMenuItems(N,["-","properties"]));N.addSeparator(aa);Q.menus.addSubmenu("help",N,aa);"1"==urlParams.embed||Q.mode==App.MODE_ATLAS?("1"!=urlParams.noExitBtn||Q.mode==App.MODE_ATLAS)&&Q.menus.addMenuItems(N,["-","exit"],aa):"1"!=urlParams.noFileMenu&&Q.menus.addMenuItems(N,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(N,aa){var ma=Q.getCurrentFile();null!=ma&&ma.constructor==DriveFile?Q.menus.addMenuItems(N,["save","makeCopy","-","rename","moveToFolder"],aa):(Q.menus.addMenuItems(N,
-["save","saveAs","-","rename"],aa),Q.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(N,["upload"],aa):Q.menus.addMenuItems(N,["makeCopy"],aa));Q.menus.addMenuItems(N,["-","autosave"],aa);null!=ma&&ma.isRevisionHistorySupported()&&Q.menus.addMenuItems(N,["-","revisionHistory"],aa)})));var ja=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(N,aa){ja.funct(N,aa);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||Q.menus.addMenuItems(N,
-["publishLink"],aa);Q.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(N.addSeparator(aa),Q.menus.addSubmenu("embed",N,aa))})));var U=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(N,aa){Q.menus.addInsertTableCellItem(N,aa)})));if("1"==urlParams.sketch){var L=this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(N,aa){L.funct(N,aa);this.addMenuItems(N,["-","pageScale","-","ruler"],aa)})))}this.put("extras",new Menu(mxUtils.bind(this,function(N,aa){null!=U&&
-Q.menus.addSubmenu("language",N,aa);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&Q.mode!=App.MODE_ATLAS&&Q.menus.addSubmenu("theme",N,aa);Q.menus.addSubmenu("units",N,aa);N.addSeparator(aa);"1"!=urlParams.sketch&&Q.menus.addMenuItems(N,"pageScale ruler scrollbars - tooltips copyConnect collapseExpand".split(" "),aa);"1"!=urlParams.embedInline&&"1"!=urlParams.sketch&&"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&Q.mode!=App.MODE_ATLAS&&Q.menus.addMenuItems(N,["-","showStartScreen",
-"search","scratchpad"],aa);N.addSeparator(aa);"1"==urlParams.sketch?Q.menus.addMenuItems(N,"configuration - copyConnect collapseExpand tooltips -".split(" "),aa):(Q.mode!=App.MODE_ATLAS&&Q.menus.addMenuItem(N,"configuration",aa),!Q.isOfflineApp()&&isLocalStorage&&Q.mode!=App.MODE_ATLAS&&Q.menus.addMenuItem(N,"plugins",aa));EditorUi.isElectronApp&&Q.menus.addMenuItems(N,["-","spellCheck","autoBkp","drafts","-"],aa);var ma=Q.getCurrentFile();null!=ma&&ma.isRealtimeEnabled()&&ma.isRealtimeSupported()&&
-this.addMenuItems(N,["-","showRemoteCursors","shareCursor","-"],aa);N.addSeparator(aa);Q.mode!=App.MODE_ATLAS&&this.addMenuItems(N,["fullscreen"],aa);("1"!=urlParams.embedInline&&Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(N,["toggleDarkMode"],aa);N.addSeparator(aa)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(N,aa){Q.menus.addMenuItems(N,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),aa)})));mxUtils.bind(this,
-function(){var N=this.get("insert"),aa=N.funct;N.funct=function(ma,u){"1"==urlParams.sketch?(Q.insertTemplateEnabled&&!Q.isOffline()&&Q.menus.addMenuItems(ma,["insertTemplate"],u),Q.menus.addMenuItems(ma,["insertImage","insertLink","-"],u),Q.menus.addSubmenu("insertAdvanced",ma,u,mxResources.get("advanced")),Q.menus.addSubmenu("layout",ma,u)):(aa.apply(this,arguments),Q.menus.addSubmenu("table",ma,u))}})();var da="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),
-O=function(N,aa,ma,u){N.addItem(ma,null,mxUtils.bind(this,function(){var H=new CreateGraphDialog(Q,ma,u);Q.showDialog(H.container,620,420,!0,!1);H.init()}),aa)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(N,aa){for(var ma=0;ma<da.length;ma++)"-"==da[ma]?N.addSeparator(aa):O(N,aa,mxResources.get(da[ma])+"...",da[ma])})))};EditorUi.prototype.installFormatToolbar=function(Q){var W=this.editor.graph,ha=document.createElement("div");ha.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%;";
-W.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(la,ja){0<W.getSelectionCount()?(Q.appendChild(ha),ha.innerHTML="Selected: "+W.getSelectionCount()):null!=ha.parentNode&&ha.parentNode.removeChild(ha)}))};var X=!1;EditorUi.prototype.initFormatWindow=function(){if(!X&&null!=this.formatWindow){X=!0;this.formatWindow.window.setClosable(!1);var Q=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){Q.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(W){mxEvent.getSource(W)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var qa=EditorUi.prototype.init;EditorUi.prototype.init=
-function(){function Q(wa,ya,Na){var Ja=U.menus.get(wa),Qa=N.addMenu(mxResources.get(wa),mxUtils.bind(this,function(){Ja.funct.apply(this,arguments)}),O);Qa.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";Qa.style.display="inline-block";Qa.style.boxSizing="border-box";Qa.style.top="6px";Qa.style.marginRight="6px";Qa.style.height="30px";Qa.style.paddingTop="6px";Qa.style.paddingBottom="6px";Qa.style.cursor="pointer";Qa.setAttribute("title",mxResources.get(wa));U.menus.menuCreated(Ja,
-Qa,"geMenuItem");null!=Na?(Qa.style.backgroundImage="url("+Na+")",Qa.style.backgroundPosition="center center",Qa.style.backgroundRepeat="no-repeat",Qa.style.backgroundSize="24px 24px",Qa.style.width="34px",Qa.innerText=""):ya||(Qa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",Qa.style.backgroundPosition="right 6px center",Qa.style.backgroundRepeat="no-repeat",Qa.style.paddingRight="22px");return Qa}function W(wa,ya,Na,Ja,Qa,Za){var cb=document.createElement("a");cb.className=
-"1"==urlParams.sketch?"geToolbarButton":"geMenuItem";cb.style.display="inline-block";cb.style.boxSizing="border-box";cb.style.height="30px";cb.style.padding="6px";cb.style.position="relative";cb.style.verticalAlign="top";cb.style.top="0px";"1"==urlParams.sketch&&(cb.style.borderStyle="none",cb.style.boxShadow="none",cb.style.padding="6px",cb.style.margin="0px");null!=U.statusContainer?da.insertBefore(cb,U.statusContainer):da.appendChild(cb);null!=Za?(cb.style.backgroundImage="url("+Za+")",cb.style.backgroundPosition=
-"center center",cb.style.backgroundRepeat="no-repeat",cb.style.backgroundSize="24px 24px",cb.style.width="34px"):mxUtils.write(cb,wa);mxEvent.addListener(cb,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(fb){fb.preventDefault()}));mxEvent.addListener(cb,"click",function(fb){"disabled"!=cb.getAttribute("disabled")&&ya(fb);mxEvent.consume(fb)});null==Na&&(cb.style.marginRight="4px");null!=Ja&&cb.setAttribute("title",Ja);null!=Qa&&(wa=function(){Qa.isEnabled()?(cb.removeAttribute("disabled"),
-cb.style.cursor="pointer"):(cb.setAttribute("disabled","disabled"),cb.style.cursor="default")},Qa.addListener("stateChanged",wa),L.addListener("enabledChanged",wa),wa());return cb}function ha(wa,ya,Na){Na=document.createElement("div");Na.className="geMenuItem";Na.style.display="inline-block";Na.style.verticalAlign="top";Na.style.marginRight="6px";Na.style.padding="0 4px 0 4px";Na.style.height="30px";Na.style.position="relative";Na.style.top="0px";"1"==urlParams.sketch&&(Na.style.boxShadow="none");
-for(var Ja=0;Ja<wa.length;Ja++)null!=wa[Ja]&&("1"==urlParams.sketch&&(wa[Ja].style.padding="10px 8px",wa[Ja].style.width="30px"),wa[Ja].style.margin="0px",wa[Ja].style.boxShadow="none",Na.appendChild(wa[Ja]));null!=ya&&mxUtils.setOpacity(Na,ya);null!=U.statusContainer&&"1"!=urlParams.sketch?da.insertBefore(Na,U.statusContainer):da.appendChild(Na);return Na}function la(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(ca.style.left=58>R.offsetTop-R.offsetHeight/2?"70px":"10px");else{for(var wa=
-da.firstChild;null!=wa;){var ya=wa.nextSibling;"geMenuItem"!=wa.className&&"geItem"!=wa.className||wa.parentNode.removeChild(wa);wa=ya}O=da.firstChild;n=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;wa=1E3>n||"1"==urlParams.sketch;var Na=null;wa||(Na=Q("diagram"));ya=wa?Q("diagram",null,Editor.drawLogoImage):null;null!=ya&&(Na=ya);ha([Na,W(mxResources.get("shapes"),U.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),U.actions.get("image"),wa?Editor.shapesImage:
-null),W(mxResources.get("format"),U.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+U.actions.get("formatPanel").shortcut+")",U.actions.get("image"),wa?Editor.formatImage:null)],wa?60:null);ya=Q("insert",!0,wa?P:null);ha([ya,W(mxResources.get("delete"),U.actions.get("delete").funct,null,mxResources.get("delete"),U.actions.get("delete"),wa?Editor.trashImage:null)],wa?60:null);411<=n&&(ha([z,K],60),520<=n&&ha([za,640<=n?W("",Oa.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+
-" +)",Oa,Editor.zoomInImage):null,640<=n?W("",Xa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",Xa,Editor.zoomOutImage):null],60))}null!=Na&&(mxEvent.disableContextMenu(Na),mxEvent.addGestureListeners(Na,mxUtils.bind(this,function(Ja){(mxEvent.isShiftDown(Ja)||mxEvent.isAltDown(Ja)||mxEvent.isMetaDown(Ja)||mxEvent.isControlDown(Ja)||mxEvent.isPopupTrigger(Ja))&&U.appIconClicked(Ja)}),null,null));ya=U.menus.get("language");null!=ya&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=
-n&&"1"!=urlParams.sketch?(null==Ma&&(ya=N.addMenu("",ya.funct),ya.setAttribute("title",mxResources.get("language")),ya.className="geToolbarButton",ya.style.backgroundImage="url("+Editor.globeImage+")",ya.style.backgroundPosition="center center",ya.style.backgroundRepeat="no-repeat",ya.style.backgroundSize="24px 24px",ya.style.position="absolute",ya.style.height="24px",ya.style.width="24px",ya.style.zIndex="1",ya.style.right="8px",ya.style.cursor="pointer",ya.style.top="1"==urlParams.embed?"12px":
-"11px",da.appendChild(ya),Ma=ya),U.buttonContainer.style.paddingRight="34px"):(U.buttonContainer.style.paddingRight="4px",null!=Ma&&(Ma.parentNode.removeChild(Ma),Ma=null))}qa.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 ja=document.createElement("div");ja.style.cssText=
-"position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";ja.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(ja);"1"==urlParams.sketch&&null!=this.sidebar&&this.isSettingsEnabled()&&(this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save()),this.sidebar.showPalette("search",mxSettings.settings.search));if("1"!=
-urlParams.sketch&&1E3<=n||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])k(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));var U=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==U.embedViewport)mxUtils.fit(this.div);else{var wa=parseInt(this.div.offsetLeft),ya=parseInt(this.div.offsetWidth),Na=U.embedViewport.x+
-U.embedViewport.width,Ja=parseInt(this.div.offsetTop),Qa=parseInt(this.div.offsetHeight),Za=U.embedViewport.y+U.embedViewport.height;this.div.style.left=Math.max(U.embedViewport.x,Math.min(wa,Na-ya))+"px";this.div.style.top=Math.max(U.embedViewport.y,Math.min(Ja,Za-Qa))+"px";this.div.style.height=Math.min(U.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(U.embedViewport.width,parseInt(this.div.style.width))+"px"}};this.keyHandler.bindAction(75,!0,"toggleShapes",
-!0);EditorUi.windowed&&("1"==urlParams.sketch||1E3<=n)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?(this.initFormatWindow(),ja=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>n||708>ja)?this.formatWindow.window.toggleMinimized():this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));U=this;var L=U.editor.graph;U.toolbar=this.createToolbar(U.createDiv("geToolbar"));U.defaultLibraryName=
-mxResources.get("untitledLibrary");var da=document.createElement("div");da.className="geMenubarContainer";var O=null,N=new Menubar(U,da);U.statusContainer=U.createStatusContainer();U.statusContainer.style.position="relative";U.statusContainer.style.maxWidth="";U.statusContainer.style.marginTop="7px";U.statusContainer.style.marginLeft="6px";U.statusContainer.style.color="gray";U.statusContainer.style.cursor="default";var aa=U.hideCurrentMenu;U.hideCurrentMenu=function(){aa.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};
-var ma=U.descriptorChanged;U.descriptorChanged=function(){ma.apply(this,arguments);var wa=U.getCurrentFile();if(null!=wa&&null!=wa.getTitle()){var ya=wa.getMode();"google"==ya?ya="googleDrive":"github"==ya?ya="gitHub":"gitlab"==ya?ya="gitLab":"onedrive"==ya&&(ya="oneDrive");ya=mxResources.get(ya);da.setAttribute("title",wa.getTitle()+(null!=ya?" ("+ya+")":""))}else da.removeAttribute("title")};U.setStatusText(U.editor.getStatus());da.appendChild(U.statusContainer);U.buttonContainer=document.createElement("div");
-U.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";da.appendChild(U.buttonContainer);U.menubarContainer=U.buttonContainer;U.tabContainer=document.createElement("div");U.tabContainer.className="geTabContainer";U.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";ja=U.diagramContainer.parentNode;var u=document.createElement("div");
-u.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";U.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){u.style.top="20px";U.titlebar=document.createElement("div");U.titlebar.style.cssText="position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var H=document.createElement("div");H.style.cssText="max-width: calc(100% - 100px);text-overflow: ellipsis;user-select:none;height:20px;margin: 2px 10px;font-size: 12px;white-space: nowrap;overflow: hidden;";
-U.titlebar.appendChild(H);ja.appendChild(U.titlebar)}H=U.menus.get("viewZoom");var P="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,S="1"==urlParams.sketch?document.createElement("div"):null,R="1"==urlParams.sketch?document.createElement("div"):null,ca="1"==urlParams.sketch?document.createElement("div"):null,ea=mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.refresh();L.refresh();L.view.validateBackground()});U.addListener("darkModeChanged",ea);U.addListener("sketchModeChanged",
-ea);var fa=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)ca.style.left="10px",ca.style.top="10px",R.style.left="10px",R.style.top="60px",S.style.top="10px",S.style.right="12px",S.style.left="",U.diagramContainer.setAttribute("data-bounds",U.diagramContainer.style.top+" "+U.diagramContainer.style.left+" "+U.diagramContainer.style.width+" "+U.diagramContainer.style.height),U.diagramContainer.style.top="0px",U.diagramContainer.style.left="0px",U.diagramContainer.style.bottom="0px",U.diagramContainer.style.right=
-"0px",U.diagramContainer.style.width="",U.diagramContainer.style.height="";else{var wa=U.diagramContainer.getAttribute("data-bounds");if(null!=wa){U.diagramContainer.style.background="transparent";U.diagramContainer.removeAttribute("data-bounds");var ya=L.getGraphBounds();wa=wa.split(" ");U.diagramContainer.style.top=wa[0];U.diagramContainer.style.left=wa[1];U.diagramContainer.style.width=ya.width+50+"px";U.diagramContainer.style.height=ya.height+46+"px";U.diagramContainer.style.bottom="";U.diagramContainer.style.right=
-"";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:U.diagramContainer.getBoundingClientRect()}),"*");U.refresh()}ca.style.left=U.diagramContainer.offsetLeft+"px";ca.style.top=U.diagramContainer.offsetTop-ca.offsetHeight-4+"px";R.style.display="";R.style.left=U.diagramContainer.offsetLeft-R.offsetWidth-4+"px";R.style.top=U.diagramContainer.offsetTop+"px";S.style.left=U.diagramContainer.offsetLeft+U.diagramContainer.offsetWidth-S.offsetWidth+"px";S.style.top=ca.style.top;
-S.style.right="";U.bottomResizer.style.left=U.diagramContainer.offsetLeft+(U.diagramContainer.offsetWidth-U.bottomResizer.offsetWidth)/2+"px";U.bottomResizer.style.top=U.diagramContainer.offsetTop+U.diagramContainer.offsetHeight-U.bottomResizer.offsetHeight/2-1+"px";U.rightResizer.style.left=U.diagramContainer.offsetLeft+U.diagramContainer.offsetWidth-U.rightResizer.offsetWidth/2-1+"px";U.rightResizer.style.top=U.diagramContainer.offsetTop+(U.diagramContainer.offsetHeight-U.bottomResizer.offsetHeight)/
-2+"px"}U.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";U.rightResizer.style.visibility=U.bottomResizer.style.visibility;da.style.display="none";ca.style.visibility="";S.style.visibility=""}),ra=mxUtils.bind(this,function(){M.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";fa()});ea=mxUtils.bind(this,
-function(){ra();b(U,!0);U.initFormatWindow();var wa=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(wa.x+wa.width+4,wa.y)});U.addListener("inlineFullscreenChanged",ra);U.addListener("editInlineStart",ea);"1"==urlParams.embedInline&&U.addListener("darkModeChanged",ea);U.addListener("editInlineStop",mxUtils.bind(this,function(wa){U.diagramContainer.style.width="10px";U.diagramContainer.style.height="10px";U.diagramContainer.style.border="";U.bottomResizer.style.visibility=
-"hidden";U.rightResizer.style.visibility="hidden";ca.style.visibility="hidden";S.style.visibility="hidden";R.style.display="none"}));if(null!=U.hoverIcons){var ua=U.hoverIcons.update;U.hoverIcons.update=function(){L.freehand.isDrawing()||ua.apply(this,arguments)}}if(null!=L.freehand){var sa=L.freehand.createStyle;L.freehand.createStyle=function(wa){return sa.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){R.className="geToolbarContainer";S.className="geToolbarContainer";ca.className=
-"geToolbarContainer";da.className="geToolbarContainer";U.picker=R;var Aa=!1;"1"!=urlParams.embed&&"atlassian"!=U.getServiceName()&&(mxEvent.addListener(da,"mouseenter",function(){U.statusContainer.style.display="inline-block"}),mxEvent.addListener(da,"mouseleave",function(){Aa||(U.statusContainer.style.display="none")}));var Ca=mxUtils.bind(this,function(wa){null!=U.notificationBtn&&(null!=wa?U.notificationBtn.setAttribute("title",wa):U.notificationBtn.removeAttribute("title"))});da.style.visibility=
-20>da.clientWidth?"hidden":"";U.editor.addListener("statusChanged",mxUtils.bind(this,function(){U.setStatusText(U.editor.getStatus());if("1"!=urlParams.embed&&"atlassian"!=U.getServiceName())if(U.statusContainer.style.display="inline-block",Aa=!0,1==U.statusContainer.children.length&&""==U.editor.getStatus())da.style.visibility="hidden";else{if(0==U.statusContainer.children.length||1==U.statusContainer.children.length&&"function"===typeof U.statusContainer.firstChild.getAttribute&&null==U.statusContainer.firstChild.getAttribute("class")){var wa=
-null!=U.statusContainer.firstChild&&"function"===typeof U.statusContainer.firstChild.getAttribute?U.statusContainer.firstChild.getAttribute("title"):U.editor.getStatus();Ca(wa);var ya=U.getCurrentFile();ya=null!=ya?ya.savingStatusKey:DrawioFile.prototype.savingStatusKey;wa==mxResources.get(ya)+"..."?(U.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(ya))+'..."src="'+Editor.tailSpin+'">',U.statusContainer.style.display="inline-block",Aa=!0):6<U.buttonContainer.clientWidth&&
-(U.statusContainer.style.display="none",Aa=!1)}else U.statusContainer.style.display="inline-block",Ca(null),Aa=!0;da.style.visibility=20>da.clientWidth&&!Aa?"hidden":""}}));pa=Q("diagram",null,Editor.menuImage);pa.style.boxShadow="none";pa.style.padding="6px";pa.style.margin="0px";ca.appendChild(pa);mxEvent.disableContextMenu(pa);mxEvent.addGestureListeners(pa,mxUtils.bind(this,function(wa){(mxEvent.isShiftDown(wa)||mxEvent.isAltDown(wa)||mxEvent.isMetaDown(wa)||mxEvent.isControlDown(wa)||mxEvent.isPopupTrigger(wa))&&
-this.appIconClicked(wa)}),null,null);U.statusContainer.style.position="";U.statusContainer.style.display="none";U.statusContainer.style.margin="0px";U.statusContainer.style.padding="6px 0px";U.statusContainer.style.maxWidth=Math.min(n-240,280)+"px";U.statusContainer.style.display="inline-block";U.statusContainer.style.textOverflow="ellipsis";U.buttonContainer.style.position="";U.buttonContainer.style.paddingRight="0px";U.buttonContainer.style.display="inline-block";var Ba=document.createElement("a");
-Ba.style.padding="0px";Ba.style.boxShadow="none";Ba.className="geMenuItem";Ba.style.display="inline-block";Ba.style.width="40px";Ba.style.height="12px";Ba.style.marginBottom="-2px";Ba.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";Ba.style.backgroundPosition="top center";Ba.style.backgroundRepeat="no-repeat";Ba.setAttribute("title","Minimize");var ta=!1,Pa=mxUtils.bind(this,function(){R.innerText="";if(!ta){var wa=function(Ja,Qa,Za){Ja=W("",Ja.funct,null,Qa,Ja,Za);Ja.style.width=
-"40px";Ja.style.opacity="0.7";return ya(Ja,null,"pointer")},ya=function(Ja,Qa,Za){null!=Qa&&Ja.setAttribute("title",Qa);Ja.style.cursor=null!=Za?Za:"default";Ja.style.margin="2px 0px";R.appendChild(Ja);mxUtils.br(R);return Ja};ya(U.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text"),!0,!1,null,!0,!0),mxResources.get("text")+" ("+Editor.ctrlKey+"+Shift+X)");ya(U.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,!1,null,!0),mxResources.get("note"));ya(U.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle"),!0,!1,null,!0),mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");ya(U.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse"),!0,!1,null,!0),mxResources.get("ellipse"));(function(){var Ja=new mxCell("",new mxGeometry(0,0,L.defaultEdgeLength,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");
-Ja.geometry.setTerminalPoint(new mxPoint(0,0),!0);Ja.geometry.setTerminalPoint(new mxPoint(Ja.geometry.width,0),!1);Ja.geometry.points=[];Ja.geometry.relative=!0;Ja.edge=!0;ya(U.sidebar.createEdgeTemplateFromCells([Ja],Ja.geometry.width,Ja.geometry.height,mxResources.get("line"),!0,null,!0,!1),mxResources.get("line"));Ja=Ja.clone();Ja.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";Ja.geometry.width=L.defaultEdgeLength+20;Ja.geometry.setTerminalPoint(new mxPoint(0,
-20),!0);Ja.geometry.setTerminalPoint(new mxPoint(Ja.geometry.width,20),!1);Ja=ya(U.sidebar.createEdgeTemplateFromCells([Ja],Ja.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"));Ja.style.borderBottom="1px solid "+(Editor.isDarkMode()?"#505050":"lightgray");Ja.style.paddingBottom="14px";Ja.style.marginBottom="14px"})();wa(U.actions.get("insertFreehand"),mxResources.get("freehand"),Editor.freehandImage);var Na=U.actions.get("toggleShapes");wa(Na,mxResources.get("shapes")+
-" ("+Na.shortcut+")",P);pa=Q("table",null,Editor.calendarImage);pa.style.boxShadow="none";pa.style.opacity="0.7";pa.style.padding="6px";pa.style.margin="0px";pa.style.width="37px";ya(pa,null,"pointer");pa=Q("insert",null,Editor.plusImage);pa.style.boxShadow="none";pa.style.opacity="0.7";pa.style.padding="6px";pa.style.margin="0px";pa.style.width="37px";ya(pa,null,"pointer")}"1"!=urlParams.embedInline&&R.appendChild(Ba)});mxEvent.addListener(Ba,"click",mxUtils.bind(this,function(){ta?(mxUtils.setPrefixedStyle(R.style,
-"transform","translate(0, -50%)"),R.style.padding="8px 6px 4px",R.style.top="50%",R.style.bottom="",R.style.height="",Ba.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",Ba.style.width="40px",Ba.style.height="12px",Ba.setAttribute("title","Minimize"),ta=!1,Pa()):(R.innerText="",R.appendChild(Ba),mxUtils.setPrefixedStyle(R.style,"transform","translate(0, 0)"),R.style.top="",R.style.bottom="12px",R.style.padding="0px",R.style.height="24px",Ba.style.height="24px",Ba.style.backgroundImage=
-"url("+Editor.plusImage+")",Ba.setAttribute("title",mxResources.get("insert")),Ba.style.width="24px",ta=!0)}));Pa();U.addListener("darkModeChanged",Pa);U.addListener("sketchModeChanged",Pa)}else U.editor.addListener("statusChanged",mxUtils.bind(this,function(){U.setStatusText(U.editor.getStatus())}));if(null!=H){var Ta=function(wa){mxEvent.isShiftDown(wa)?(U.hideCurrentMenu(),U.actions.get("smartFit").funct(),mxEvent.consume(wa)):mxEvent.isAltDown(wa)&&(U.hideCurrentMenu(),U.actions.get("customZoom").funct(),
-mxEvent.consume(wa))},Oa=U.actions.get("zoomIn"),Xa=U.actions.get("zoomOut"),Ga=U.actions.get("resetView");ea=U.actions.get("fullscreen");var eb=U.actions.get("undo"),bb=U.actions.get("redo"),z=W("",eb.funct,null,mxResources.get("undo")+" ("+eb.shortcut+")",eb,Editor.undoImage),K=W("",bb.funct,null,mxResources.get("redo")+" ("+bb.shortcut+")",bb,Editor.redoImage),M=W("",ea.funct,null,mxResources.get("fullscreen"),ea,Editor.fullscreenImage);if(null!=S){Ga=function(){va.style.display=null!=U.pages&&
-("0"!=urlParams.pages||1<U.pages.length||Editor.pagesVisible)?"inline-block":"none"};var T=function(){va.innerText="";if(null!=U.currentPage){mxUtils.write(va,U.currentPage.getName());var wa=null!=U.pages?U.pages.length:1,ya=U.getPageIndex(U.currentPage);ya=null!=ya?ya+1:1;var Na=U.currentPage.getId();va.setAttribute("title",U.currentPage.getName()+" ("+ya+"/"+wa+")"+(null!=Na?" ["+Na+"]":""))}};M.parentNode.removeChild(M);var V=U.actions.get("delete"),ia=W("",V.funct,null,mxResources.get("delete"),
-V,Editor.trashImage);ia.style.opacity="0.1";ca.appendChild(ia);V.addListener("stateChanged",function(){ia.style.opacity=V.enabled?"":"0.1"});var na=function(){z.style.display=0<U.editor.undoManager.history.length||L.isEditing()?"inline-block":"none";K.style.display=z.style.display;z.style.opacity=eb.enabled?"":"0.1";K.style.opacity=bb.enabled?"":"0.1"};ca.appendChild(z);ca.appendChild(K);eb.addListener("stateChanged",na);bb.addListener("stateChanged",na);na();var va=this.createPageMenuTab(!1,!0);
-va.style.display="none";va.style.position="";va.style.marginLeft="";va.style.top="";va.style.left="";va.style.height="100%";va.style.lineHeight="";va.style.borderStyle="none";va.style.padding="3px 0";va.style.margin="0px";va.style.background="";va.style.border="";va.style.boxShadow="none";va.style.verticalAlign="top";va.style.width="auto";va.style.maxWidth="160px";va.style.position="relative";va.style.padding="6px";va.style.textOverflow="ellipsis";va.style.opacity="0.8";S.appendChild(va);U.editor.addListener("pagesPatched",
-T);U.editor.addListener("pageSelected",T);U.editor.addListener("pageRenamed",T);U.editor.addListener("fileLoaded",T);T();U.addListener("fileDescriptorChanged",Ga);U.addListener("pagesVisibleChanged",Ga);U.editor.addListener("pagesPatched",Ga);Ga();Ga=W("",Xa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",Xa,Editor.zoomOutImage);S.appendChild(Ga);var pa=N.addMenu("100%",H.funct);pa.setAttribute("title",mxResources.get("zoom"));pa.innerHTML="100%";pa.style.display="inline-block";
-pa.style.color="inherit";pa.style.cursor="pointer";pa.style.textAlign="center";pa.style.whiteSpace="nowrap";pa.style.paddingRight="10px";pa.style.textDecoration="none";pa.style.verticalAlign="top";pa.style.padding="6px 0";pa.style.fontSize="14px";pa.style.width="40px";pa.style.opacity="0.4";S.appendChild(pa);H=W("",Oa.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",Oa,Editor.zoomInImage);S.appendChild(H);ea.visible&&(S.appendChild(M),mxEvent.addListener(document,"fullscreenchange",
-function(){M.style.backgroundImage="url("+(null!=document.fullscreenElement?Editor.fullscreenExitImage:Editor.fullscreenImage)+")"}));"1"==urlParams.embedInline&&(H=U.actions.get("exit"),S.appendChild(W("",H.funct,null,mxResources.get("exit"),H,Editor.closeImage)));U.tabContainer.style.visibility="hidden";da.style.cssText="position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px 0px 6px 6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
-ca.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";S.style.cssText="position:absolute;right:14px;bottom:14px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";u.appendChild(ca);u.appendChild(S);R.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";
-mxClient.IS_POINTER&&(R.style.touchAction="none");u.appendChild(R);window.setTimeout(function(){mxUtils.setPrefixedStyle(R.style,"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(u)}else{var za=W("",Ta,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",Ga,Editor.zoomFitImage);da.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";pa=N.addMenu("100%",
-H.funct);pa.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");pa.style.whiteSpace="nowrap";pa.style.paddingRight="10px";pa.style.textDecoration="none";pa.style.textDecoration="none";pa.style.overflow="hidden";pa.style.visibility="hidden";pa.style.textAlign="center";pa.style.cursor="pointer";pa.style.height=parseInt(U.tabContainerHeight)-1+"px";pa.style.lineHeight=parseInt(U.tabContainerHeight)+1+"px";pa.style.position="absolute";pa.style.display="block";pa.style.fontSize="12px";pa.style.width=
-"59px";pa.style.right="0px";pa.style.bottom="0px";pa.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";pa.style.backgroundPosition="right 6px center";pa.style.backgroundRepeat="no-repeat";u.appendChild(pa)}(function(wa){mxEvent.addListener(wa,"click",Ta);var ya=mxUtils.bind(this,function(){wa.innerText="";mxUtils.write(wa,Math.round(100*U.editor.graph.view.scale)+"%")});U.editor.graph.view.addListener(mxEvent.EVENT_SCALE,ya);U.editor.addListener("resetGraphView",ya);U.editor.addListener("pageSelected",
-ya)})(pa);var Da=U.setGraphEnabled;U.setGraphEnabled=function(){Da.apply(this,arguments);null!=this.tabContainer&&(pa.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==S?this.tabContainerHeight+"px":"0px")}}u.appendChild(da);u.appendChild(U.diagramContainer);ja.appendChild(u);U.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=n)&&"1"!=urlParams.embedInline&&b(this,!0);null==S&&u.appendChild(U.tabContainer);
-var Ma=null;la();mxEvent.addListener(window,"resize",function(){la();null!=U.sidebarWindow&&U.sidebarWindow.window.fit();null!=U.formatWindow&&U.formatWindow.window.fit();null!=U.actions.outlineWindow&&U.actions.outlineWindow.window.fit();null!=U.actions.layersWindow&&U.actions.layersWindow.window.fit();null!=U.menus.tagsWindow&&U.menus.tagsWindow.window.fit();null!=U.menus.findWindow&&U.menus.findWindow.window.fit();null!=U.menus.findReplaceWindow&&U.menus.findReplaceWindow.window.fit()});if("1"==
-urlParams.embedInline){document.body.style.cursor="text";R.style.transform="";mxEvent.addGestureListeners(U.diagramContainer.parentNode,function(wa){mxEvent.getSource(wa)==U.diagramContainer.parentNode&&(U.embedExitPoint=new mxPoint(mxEvent.getClientX(wa),mxEvent.getClientY(wa)),U.sendEmbeddedSvgExport())});ja=document.createElement("div");ja.style.position="absolute";ja.style.width="10px";ja.style.height="10px";ja.style.borderRadius="5px";ja.style.border="1px solid gray";ja.style.background="#ffffff";
-ja.style.cursor="row-resize";U.diagramContainer.parentNode.appendChild(ja);U.bottomResizer=ja;var La=null,Ua=null,Sa=null,Fa=null;mxEvent.addGestureListeners(ja,function(wa){Fa=parseInt(U.diagramContainer.style.height);Ua=mxEvent.getClientY(wa);L.popupMenuHandler.hideMenu();mxEvent.consume(wa)});ja=ja.cloneNode(!1);ja.style.cursor="col-resize";U.diagramContainer.parentNode.appendChild(ja);U.rightResizer=ja;mxEvent.addGestureListeners(ja,function(wa){Sa=parseInt(U.diagramContainer.style.width);La=
-mxEvent.getClientX(wa);L.popupMenuHandler.hideMenu();mxEvent.consume(wa)});mxEvent.addGestureListeners(document.body,null,function(wa){var ya=!1;null!=La&&(U.diagramContainer.style.width=Math.max(20,Sa+mxEvent.getClientX(wa)-La)+"px",ya=!0);null!=Ua&&(U.diagramContainer.style.height=Math.max(20,Fa+mxEvent.getClientY(wa)-Ua)+"px",ya=!0);ya&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:U.diagramContainer.getBoundingClientRect()}),
-"*"),fa(),U.refresh())},function(wa){null==La&&null==Ua||mxEvent.consume(wa);Ua=La=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";U.bottomResizer.style.visibility="hidden";U.rightResizer.style.visibility="hidden";ca.style.visibility="hidden";S.style.visibility="hidden";R.style.display="none"}"1"==urlParams.prefetchFonts&&U.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)}})();DrawioComment=function(b,e,k,n,D,t,E){this.file=b;this.id=e;this.content=k;this.modifiedDate=n;this.createdDate=D;this.isResolved=t;this.user=E;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,k,n,D){e()};DrawioComment.prototype.editComment=function(b,e,k){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DrawioUser=function(b,e,k,n,D){this.id=b;this.email=e;this.displayName=k;this.pictureUrl=n;this.locale=D};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\nbeta=beta\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\nrealtimeCollaboration=Real-Time Collaboration\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.\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\ngetNotionChromeExtension=Get the Notion Chrome Extension\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\nlabels=Labels\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\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\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\nsnapToGrid=Snap to Grid\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\nunmerge=Unmerge\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\ncreateODFile=Create OneDrive File\npickGDriveFile=Pick Google Drive File\ncreateGDriveFile=Create 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\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\nautoBkp=Automatic Backup\nconfAIgnoreCollectErr=Ignore collecting current pages errors\ndrafts=Drafts\ndraftSaveInt=Draft save interval [sec] (0 to disable)\npluginsDisabled=External plugins disabled.\nextExpNotConfigured=External image service is not configured\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="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="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><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="default"/></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;
+"-2px",this.buttonContainer.style.paddingTop="4px")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer&&"1"!=urlParams.embedInline){var Q=document.createElement("div");Q.style.display="inline-block";Q.style.position="relative";Q.style.marginTop="6px";Q.style.marginRight="4px";var X=document.createElement("a");X.className="geMenuItem gePrimaryBtn";X.style.marginLeft="8px";X.style.padding="6px";if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var ha="1"==urlParams.publishClose?
+mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(X,ha);X.setAttribute("title",ha);mxEvent.addListener(X,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));Q.appendChild(X)}}else mxUtils.write(X,mxResources.get("save")),X.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(X,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),Q.appendChild(X),"1"==urlParams.saveAndExit&&(X=document.createElement("a"),
+mxUtils.write(X,mxResources.get("saveAndExit")),X.setAttribute("title",mxResources.get("saveAndExit")),X.className="geMenuItem",X.style.marginLeft="6px",X.style.padding="6px",mxEvent.addListener(X,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),Q.appendChild(X));"1"!=urlParams.noExitBtn&&(X=document.createElement("a"),ha="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(X,ha),X.setAttribute("title",ha),X.className="geMenuItem",
+X.style.marginLeft="6px",X.style.padding="6px",mxEvent.addListener(X,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),Q.appendChild(X));this.buttonContainer.appendChild(Q);this.buttonContainer.style.top="6px";this.editor.fireEvent(new mxEventObject("statusChanged"))}};var F=Sidebar.prototype.getTooltipOffset;Sidebar.prototype.getTooltipOffset=function(Q,X){if(null==this.editorUi.sidebarWindow||mxUtils.isAncestorNode(this.editorUi.picker,Q)){var ha=mxUtils.getOffset(this.editorUi.picker);
+ha.x+=this.editorUi.picker.offsetWidth+4;ha.y+=Q.offsetTop-X.height/2+16;return ha}var U=F.apply(this,arguments);ha=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);U.x+=ha.x-16;U.y+=ha.y;return U};var C=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(Q,X,ha){var U=this.editorUi.editor.graph;Q.smartSeparators=!0;C.apply(this,arguments);"1"==urlParams.sketch?U.isEnabled()&&(Q.addSeparator(),1==U.getSelectionCount()&&this.addMenuItems(Q,["-","lockUnlock"],null,ha)):
+1==U.getSelectionCount()?(U.isCellFoldable(U.getSelectionCell())&&this.addMenuItems(Q,U.isCellCollapsed(X)?["expand"]:["collapse"],null,ha),this.addMenuItems(Q,["collapsible","-","lockUnlock","enterGroup"],null,ha),Q.addSeparator(),this.addSubmenu("layout",Q)):U.isSelectionEmpty()&&U.isEnabled()?(Q.addSeparator(),this.addMenuItems(Q,["editData"],null,ha),Q.addSeparator(),this.addSubmenu("layout",Q),this.addSubmenu("insert",Q),this.addMenuItems(Q,["-","exitGroup"],null,ha)):U.isEnabled()&&this.addMenuItems(Q,
+["-","lockUnlock"],null,ha)};var I=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(Q,X,ha){I.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(Q,["copyAsImage"],null,ha)};EditorUi.prototype.toggleFormatPanel=function(Q){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=Q?Q:!this.formatWindow.window.isVisible()):b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var G=EditorUi.prototype.destroy;
+EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.window.setVisible(!1),this.actions.outlineWindow.window.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.window.setVisible(!1),
+this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.window.setVisible(!1),this.menus.tagsWindow.window.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.window.setVisible(!1),this.menus.findWindow.window.destroy(),this.menus.findWindow=null);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.window.setVisible(!1),this.menus.findReplaceWindow.window.destroy(),this.menus.findReplaceWindow=
+null);G.apply(this,arguments)};var Z=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(Q){Z.apply(this,arguments);if(Q){var X=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=X&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=X||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),
+null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var ca=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(Q){Q=ca.apply(this,arguments);var X=this.editorUi,ha=X.editor.graph;if(ha.isEnabled()&&"1"==urlParams.sketch){var U=this.createOption(mxResources.get("sketch"),function(){return Editor.sketchMode},function(ma,T){X.setSketchMode(!Editor.sketchMode);null!=T&&mxEvent.isShiftDown(T)||ha.updateCellStyles({sketch:ma?
+"1":null},ha.getVerticesAndEdges())},{install:function(ma){this.listener=function(){ma(Editor.sketchMode)};X.addListener("sketchModeChanged",this.listener)},destroy:function(){X.removeListener(this.listener)}});Q.appendChild(U)}return Q};var aa=Menus.prototype.init;Menus.prototype.init=function(){aa.apply(this,arguments);var Q=this.editorUi,X=Q.editor.graph;Q.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";Q.actions.get("createShape").label=mxResources.get("shape")+"...";Q.actions.get("outline").label=
+mxResources.get("outline")+"...";Q.actions.get("layers").label=mxResources.get("layers")+"...";Q.actions.get("tags").label=mxResources.get("tags")+"...";Q.actions.get("comments").label=mxResources.get("comments")+"...";var ha=Q.actions.put("toggleDarkMode",new Action(mxResources.get("dark"),function(O){Q.setDarkMode(!Editor.darkMode)}));ha.setToggleAction(!0);ha.setSelectedCallback(function(){return Editor.isDarkMode()});ha=Q.actions.put("toggleSketchMode",new Action(mxResources.get("sketch"),function(O){Q.setSketchMode(!Editor.sketchMode)}));
+ha.setToggleAction(!0);ha.setSelectedCallback(function(){return Editor.sketchMode});ha=Q.actions.put("togglePagesVisible",new Action(mxResources.get("pages"),function(O){Q.setPagesVisible(!Editor.pagesVisible)}));ha.setToggleAction(!0);ha.setSelectedCallback(function(){return Editor.pagesVisible});Q.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){X.popupMenuHandler.hideMenu();Q.showImportCsvDialog()}));Q.actions.put("importText",new Action(mxResources.get("text")+"...",
+function(){var O=new ParseDialog(Q,"Insert from Text");Q.showDialog(O.container,620,420,!0,!1);O.init()}));Q.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var O=new ParseDialog(Q,"Insert from Text","formatSql");Q.showDialog(O.container,620,420,!0,!1);O.init()}));Q.actions.put("toggleShapes",new Action(mxResources.get("1"==urlParams.sketch?"moreShapes":"shapes")+"...",function(){k(Q)},null,null,Editor.ctrlKey+"+Shift+K"));Q.actions.put("toggleFormat",new Action(mxResources.get("format")+
+"...",function(){b(Q)})).shortcut=Q.actions.get("formatPanel").shortcut;EditorUi.enablePlantUml&&!Q.isOffline()&&Q.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var O=new ParseDialog(Q,mxResources.get("plantUml")+"...","plantUml");Q.showDialog(O.container,620,420,!0,!1);O.init()}));Q.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var O=new ParseDialog(Q,mxResources.get("mermaid")+"...","mermaid");Q.showDialog(O.container,620,420,!0,!1);
+O.init()}));var U=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,function(O,ba){var la=this.editorUi.editor.graph,u=la.getSelectionCell();U.call(this,O,u,null,ba);this.addMenuItems(O,["editTooltip"],ba);la.model.isVertex(u)&&this.addMenuItems(O,["editGeometry"],ba);this.addMenuItems(O,["-","edit"],ba)})));this.addPopupMenuCellEditItems=function(O,ba,la,u){O.addSeparator();this.addSubmenu("editCell",O,u,mxResources.get("edit"))};this.put("file",new Menu(mxUtils.bind(this,
+function(O,ba){var la=Q.getCurrentFile();Q.menus.addMenuItems(O,["new"],ba);Q.menus.addSubmenu("openFrom",O,ba);isLocalStorage&&this.addSubmenu("openRecent",O,ba);O.addSeparator(ba);null!=la&&la.constructor==DriveFile?Q.menus.addMenuItems(O,["save","rename","makeCopy","moveToFolder"],ba):(Q.menus.addMenuItems(O,["save","saveAs","-","rename"],ba),Q.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(O,["upload"],ba):Q.menus.addMenuItems(O,["makeCopy"],
+ba));O.addSeparator(ba);null!=la&&(la.isRevisionHistorySupported()&&Q.menus.addMenuItems(O,["revisionHistory"],ba),la.constructor==DriveFile&&Q.menus.addMenuItems(O,["openFolder"],ba),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||la.constructor==LocalFile&&null==la.fileHandle||Q.menus.addMenuItems(O,["synchronize"],ba));Q.menus.addMenuItems(O,["autosave"],ba);if(null!=la){O.addSeparator(ba);"1"==urlParams.sketch&&Q.commentsSupported()&&Q.menus.addMenuItems(O,["comments"],ba);if(null!=Q.fileNode&&
+"1"!=urlParams.embedInline){var u=null!=la.getTitle()?la.getTitle():Q.defaultFilename;(la.constructor==DriveFile&&null!=la.sync&&la.sync.isConnected()||!/(\.html)$/i.test(u)&&!/(\.svg)$/i.test(u))&&this.addMenuItems(O,["properties"],ba)}la.constructor==DriveFile&&Q.menus.addMenuItems(O,["share"],ba)}})));this.put("diagram",new Menu(mxUtils.bind(this,function(O,ba){var la=Q.getCurrentFile();Q.menus.addSubmenu("extras",O,ba,mxResources.get("preferences"));O.addSeparator(ba);if(mxClient.IS_CHROMEAPP||
+EditorUi.isElectronApp)Q.menus.addMenuItems(O,"new open - synchronize - save saveAs -".split(" "),ba);else if("1"==urlParams.embed||Q.mode==App.MODE_ATLAS){"1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&Q.menus.addMenuItems(O,["-","save"],ba);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||Q.mode==App.MODE_ATLAS)Q.menus.addMenuItems(O,["saveAndExit"],ba),null!=la&&la.isRevisionHistorySupported()&&Q.menus.addMenuItems(O,["revisionHistory"],ba);O.addSeparator(ba)}else Q.mode==
+App.MODE_ATLAS?Q.menus.addMenuItems(O,["save","synchronize","-"],ba):"1"!=urlParams.noFileMenu&&("1"!=urlParams.sketch?(Q.menus.addMenuItems(O,["new"],ba),Q.menus.addSubmenu("openFrom",O,ba),isLocalStorage&&this.addSubmenu("openRecent",O,ba),O.addSeparator(ba),null!=la&&(la.constructor==DriveFile&&Q.menus.addMenuItems(O,["share"],ba),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||la.constructor==LocalFile||Q.menus.addMenuItems(O,["synchronize"],ba)),O.addSeparator(ba),Q.menus.addSubmenu("save",O,
+ba)):Q.menus.addSubmenu("file",O,ba));Q.menus.addSubmenu("exportAs",O,ba);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?Q.menus.addMenuItems(O,["import"],ba):"1"!=urlParams.noFileMenu&&Q.menus.addSubmenu("importFrom",O,ba);"1"!=urlParams.embed&&"1"==urlParams.sketch&&"1"!=urlParams.noFileMenu||!Q.commentsSupported()||Q.menus.addMenuItems(O,["-","comments"],ba);Q.menus.addMenuItems(O,"- findReplace layers tags - pageSetup".split(" "),ba);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||
+Q.menus.addMenuItems(O,["print"],ba);"1"!=urlParams.sketch&&null!=la&&null!=Q.fileNode&&"1"!=urlParams.embedInline&&(la=null!=la.getTitle()?la.getTitle():Q.defaultFilename,/(\.html)$/i.test(la)||/(\.svg)$/i.test(la)||this.addMenuItems(O,["-","properties"]));O.addSeparator(ba);Q.menus.addSubmenu("help",O,ba);"1"==urlParams.embed||Q.mode==App.MODE_ATLAS?("1"!=urlParams.noExitBtn||Q.mode==App.MODE_ATLAS)&&Q.menus.addMenuItems(O,["-","exit"],ba):"1"!=urlParams.noFileMenu&&Q.menus.addMenuItems(O,["-",
+"close"])})));this.put("save",new Menu(mxUtils.bind(this,function(O,ba){var la=Q.getCurrentFile();null!=la&&la.constructor==DriveFile?Q.menus.addMenuItems(O,["save","makeCopy","-","rename","moveToFolder"],ba):(Q.menus.addMenuItems(O,["save","saveAs","-","rename"],ba),Q.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(O,["upload"],ba):Q.menus.addMenuItems(O,["makeCopy"],ba));Q.menus.addMenuItems(O,["-","autosave"],ba);null!=la&&la.isRevisionHistorySupported()&&
+Q.menus.addMenuItems(O,["-","revisionHistory"],ba)})));var ma=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(O,ba){ma.funct(O,ba);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||Q.menus.addMenuItems(O,["publishLink"],ba);Q.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(O.addSeparator(ba),Q.menus.addSubmenu("embed",O,ba))})));var T=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(O,ba){Q.menus.addInsertTableCellItem(O,ba)})));if("1"==urlParams.sketch){var M=
+this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(O,ba){M.funct(O,ba);this.addMenuItems(O,["-","pageScale","-","ruler"],ba)})))}this.put("extras",new Menu(mxUtils.bind(this,function(O,ba){null!=T&&Q.menus.addSubmenu("language",O,ba);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&Q.mode!=App.MODE_ATLAS&&Q.menus.addSubmenu("theme",O,ba);Q.menus.addSubmenu("units",O,ba);O.addSeparator(ba);"1"!=urlParams.sketch&&Q.menus.addMenuItems(O,"pageScale ruler scrollbars - tooltips copyConnect collapseExpand".split(" "),
+ba);"1"!=urlParams.embedInline&&"1"!=urlParams.sketch&&"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&Q.mode!=App.MODE_ATLAS&&Q.menus.addMenuItems(O,["-","showStartScreen","search","scratchpad"],ba);O.addSeparator(ba);"1"==urlParams.sketch?Q.menus.addMenuItems(O,"configuration - copyConnect collapseExpand tooltips -".split(" "),ba):(Q.mode!=App.MODE_ATLAS&&Q.menus.addMenuItem(O,"configuration",ba),!Q.isOfflineApp()&&isLocalStorage&&Q.mode!=App.MODE_ATLAS&&Q.menus.addMenuItem(O,"plugins",
+ba));EditorUi.isElectronApp&&Q.menus.addMenuItems(O,["-","spellCheck","autoBkp","drafts","-"],ba);var la=Q.getCurrentFile();null!=la&&la.isRealtimeEnabled()&&la.isRealtimeSupported()&&this.addMenuItems(O,["-","showRemoteCursors","shareCursor","-"],ba);O.addSeparator(ba);Q.mode!=App.MODE_ATLAS&&this.addMenuItems(O,["fullscreen"],ba);("1"!=urlParams.embedInline&&Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(O,["toggleDarkMode"],ba);O.addSeparator(ba)})));this.put("insertAdvanced",
+new Menu(mxUtils.bind(this,function(O,ba){Q.menus.addMenuItems(O,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),ba)})));mxUtils.bind(this,function(){var O=this.get("insert"),ba=O.funct;O.funct=function(la,u){"1"==urlParams.sketch?(Q.insertTemplateEnabled&&!Q.isOffline()&&Q.menus.addMenuItems(la,["insertTemplate"],u),Q.menus.addMenuItems(la,["insertImage","insertLink","-"],u),Q.menus.addSubmenu("insertAdvanced",la,u,mxResources.get("advanced")),Q.menus.addSubmenu("layout",
+la,u)):(ba.apply(this,arguments),Q.menus.addSubmenu("table",la,u))}})();var ia="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),N=function(O,ba,la,u){O.addItem(la,null,mxUtils.bind(this,function(){var H=new CreateGraphDialog(Q,la,u);Q.showDialog(H.container,620,420,!0,!1);H.init()}),ba)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(O,ba){for(var la=0;la<ia.length;la++)"-"==ia[la]?O.addSeparator(ba):N(O,ba,mxResources.get(ia[la])+"...",
+ia[la])})))};EditorUi.prototype.installFormatToolbar=function(Q){var X=this.editor.graph,ha=document.createElement("div");ha.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%;";X.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(U,ma){0<X.getSelectionCount()?(Q.appendChild(ha),ha.innerHTML="Selected: "+X.getSelectionCount()):null!=
+ha.parentNode&&ha.parentNode.removeChild(ha)}))};var Y=!1;EditorUi.prototype.initFormatWindow=function(){if(!Y&&null!=this.formatWindow){Y=!0;this.formatWindow.window.setClosable(!1);var Q=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){Q.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(X){mxEvent.getSource(X)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var pa=EditorUi.prototype.init;EditorUi.prototype.init=function(){function Q(xa,Ba,Pa){var Ka=T.menus.get(xa),Na=O.addMenu(mxResources.get(xa),mxUtils.bind(this,function(){Ka.funct.apply(this,arguments)}),N);Na.className="1"==
+urlParams.sketch?"geToolbarButton":"geMenuItem";Na.style.display="inline-block";Na.style.boxSizing="border-box";Na.style.top="6px";Na.style.marginRight="6px";Na.style.height="30px";Na.style.paddingTop="6px";Na.style.paddingBottom="6px";Na.style.cursor="pointer";Na.setAttribute("title",mxResources.get(xa));T.menus.menuCreated(Ka,Na,"geMenuItem");null!=Pa?(Na.style.backgroundImage="url("+Pa+")",Na.style.backgroundPosition="center center",Na.style.backgroundRepeat="no-repeat",Na.style.backgroundSize=
+"24px 24px",Na.style.width="34px",Na.innerText=""):Ba||(Na.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",Na.style.backgroundPosition="right 6px center",Na.style.backgroundRepeat="no-repeat",Na.style.paddingRight="22px");return Na}function X(xa,Ba,Pa,Ka,Na,hb){var Qa=document.createElement("a");Qa.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";Qa.style.display="inline-block";Qa.style.boxSizing="border-box";Qa.style.height="30px";Qa.style.padding="6px";Qa.style.position=
+"relative";Qa.style.verticalAlign="top";Qa.style.top="0px";"1"==urlParams.sketch&&(Qa.style.borderStyle="none",Qa.style.boxShadow="none",Qa.style.padding="6px",Qa.style.margin="0px");null!=T.statusContainer?ia.insertBefore(Qa,T.statusContainer):ia.appendChild(Qa);null!=hb?(Qa.style.backgroundImage="url("+hb+")",Qa.style.backgroundPosition="center center",Qa.style.backgroundRepeat="no-repeat",Qa.style.backgroundSize="24px 24px",Qa.style.width="34px"):mxUtils.write(Qa,xa);mxEvent.addListener(Qa,mxClient.IS_POINTER?
+"pointerdown":"mousedown",mxUtils.bind(this,function(mb){mb.preventDefault()}));mxEvent.addListener(Qa,"click",function(mb){"disabled"!=Qa.getAttribute("disabled")&&Ba(mb);mxEvent.consume(mb)});null==Pa&&(Qa.style.marginRight="4px");null!=Ka&&Qa.setAttribute("title",Ka);null!=Na&&(xa=function(){Na.isEnabled()?(Qa.removeAttribute("disabled"),Qa.style.cursor="pointer"):(Qa.setAttribute("disabled","disabled"),Qa.style.cursor="default")},Na.addListener("stateChanged",xa),M.addListener("enabledChanged",
+xa),xa());return Qa}function ha(xa,Ba,Pa){Pa=document.createElement("div");Pa.className="geMenuItem";Pa.style.display="inline-block";Pa.style.verticalAlign="top";Pa.style.marginRight="6px";Pa.style.padding="0 4px 0 4px";Pa.style.height="30px";Pa.style.position="relative";Pa.style.top="0px";"1"==urlParams.sketch&&(Pa.style.boxShadow="none");for(var Ka=0;Ka<xa.length;Ka++)null!=xa[Ka]&&("1"==urlParams.sketch&&(xa[Ka].style.padding="10px 8px",xa[Ka].style.width="30px"),xa[Ka].style.margin="0px",xa[Ka].style.boxShadow=
+"none",Pa.appendChild(xa[Ka]));null!=Ba&&mxUtils.setOpacity(Pa,Ba);null!=T.statusContainer&&"1"!=urlParams.sketch?ia.insertBefore(Pa,T.statusContainer):ia.appendChild(Pa);return Pa}function U(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(fa.style.left=58>da.offsetTop-da.offsetHeight/2?"70px":"10px");else{for(var xa=ia.firstChild;null!=xa;){var Ba=xa.nextSibling;"geMenuItem"!=xa.className&&"geItem"!=xa.className||xa.parentNode.removeChild(xa);xa=Ba}N=ia.firstChild;n=window.innerWidth||document.documentElement.clientWidth||
+document.body.clientWidth;xa=1E3>n||"1"==urlParams.sketch;var Pa=null;xa||(Pa=Q("diagram"));Ba=xa?Q("diagram",null,Editor.drawLogoImage):null;null!=Ba&&(Pa=Ba);ha([Pa,X(mxResources.get("shapes"),T.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),T.actions.get("image"),xa?Editor.shapesImage:null),X(mxResources.get("format"),T.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+T.actions.get("formatPanel").shortcut+")",T.actions.get("image"),xa?Editor.formatImage:null)],
+xa?60:null);Ba=Q("insert",!0,xa?W:null);ha([Ba,X(mxResources.get("delete"),T.actions.get("delete").funct,null,mxResources.get("delete"),T.actions.get("delete"),xa?Editor.trashImage:null)],xa?60:null);411<=n&&(ha([K,L],60),520<=n&&ha([Da,640<=n?X("",Za.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",Za,Editor.zoomInImage):null,640<=n?X("",Ha.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",Ha,Editor.zoomOutImage):null],60))}null!=Pa&&(mxEvent.disableContextMenu(Pa),mxEvent.addGestureListeners(Pa,
+mxUtils.bind(this,function(Ka){(mxEvent.isShiftDown(Ka)||mxEvent.isAltDown(Ka)||mxEvent.isMetaDown(Ka)||mxEvent.isControlDown(Ka)||mxEvent.isPopupTrigger(Ka))&&T.appIconClicked(Ka)}),null,null));Ba=T.menus.get("language");null!=Ba&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=n&&"1"!=urlParams.sketch?(null==Ma&&(Ba=O.addMenu("",Ba.funct),Ba.setAttribute("title",mxResources.get("language")),Ba.className="geToolbarButton",Ba.style.backgroundImage="url("+Editor.globeImage+")",Ba.style.backgroundPosition=
+"center center",Ba.style.backgroundRepeat="no-repeat",Ba.style.backgroundSize="24px 24px",Ba.style.position="absolute",Ba.style.height="24px",Ba.style.width="24px",Ba.style.zIndex="1",Ba.style.right="8px",Ba.style.cursor="pointer",Ba.style.top="1"==urlParams.embed?"12px":"11px",ia.appendChild(Ba),Ma=Ba),T.buttonContainer.style.paddingRight="34px"):(T.buttonContainer.style.paddingRight="4px",null!=Ma&&(Ma.parentNode.removeChild(Ma),Ma=null))}pa.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 ma=document.createElement("div");ma.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";ma.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(ma);"1"==urlParams.sketch&&null!=this.sidebar&&
+this.isSettingsEnabled()&&(this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save()),this.sidebar.showPalette("search",mxSettings.settings.search));if("1"!=urlParams.sketch&&1E3<=n||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])k(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),
+this.sidebar.showEntries("search"));var T=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==T.embedViewport)mxUtils.fit(this.div);else{var xa=parseInt(this.div.offsetLeft),Ba=parseInt(this.div.offsetWidth),Pa=T.embedViewport.x+T.embedViewport.width,Ka=parseInt(this.div.offsetTop),Na=parseInt(this.div.offsetHeight),hb=T.embedViewport.y+T.embedViewport.height;this.div.style.left=Math.max(T.embedViewport.x,Math.min(xa,Pa-Ba))+"px";this.div.style.top=Math.max(T.embedViewport.y,
+Math.min(Ka,hb-Na))+"px";this.div.style.height=Math.min(T.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(T.embedViewport.width,parseInt(this.div.style.width))+"px"}};this.keyHandler.bindAction(75,!0,"toggleShapes",!0);EditorUi.windowed&&("1"==urlParams.sketch||1E3<=n)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?(this.initFormatWindow(),ma=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&
+(1200>n||708>ma)?this.formatWindow.window.toggleMinimized():this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));T=this;var M=T.editor.graph;T.toolbar=this.createToolbar(T.createDiv("geToolbar"));T.defaultLibraryName=mxResources.get("untitledLibrary");var ia=document.createElement("div");ia.className="geMenubarContainer";var N=null,O=new Menubar(T,ia);T.statusContainer=T.createStatusContainer();T.statusContainer.style.position="relative";T.statusContainer.style.maxWidth=
+"";T.statusContainer.style.marginTop="7px";T.statusContainer.style.marginLeft="6px";T.statusContainer.style.color="gray";T.statusContainer.style.cursor="default";var ba=T.hideCurrentMenu;T.hideCurrentMenu=function(){ba.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var la=T.descriptorChanged;T.descriptorChanged=function(){la.apply(this,arguments);var xa=T.getCurrentFile();if(null!=xa&&null!=xa.getTitle()){var Ba=xa.getMode();"google"==Ba?Ba="googleDrive":"github"==Ba?Ba="gitHub":
+"gitlab"==Ba?Ba="gitLab":"onedrive"==Ba&&(Ba="oneDrive");Ba=mxResources.get(Ba);ia.setAttribute("title",xa.getTitle()+(null!=Ba?" ("+Ba+")":""))}else ia.removeAttribute("title")};T.setStatusText(T.editor.getStatus());ia.appendChild(T.statusContainer);T.buttonContainer=document.createElement("div");T.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";ia.appendChild(T.buttonContainer);T.menubarContainer=
+T.buttonContainer;T.tabContainer=document.createElement("div");T.tabContainer.className="geTabContainer";T.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";ma=T.diagramContainer.parentNode;var u=document.createElement("div");u.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";T.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";if("1"==urlParams.winCtrls&&
+"1"==urlParams.sketch){u.style.top="20px";T.titlebar=document.createElement("div");T.titlebar.style.cssText="position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var H=document.createElement("div");H.style.cssText="max-width: calc(100% - 100px);text-overflow: ellipsis;user-select:none;height:20px;margin: 2px 10px;font-size: 12px;white-space: nowrap;overflow: hidden;";T.titlebar.appendChild(H);ma.appendChild(T.titlebar)}H=T.menus.get("viewZoom");
+var P=H.funct;H.funct=function(xa,Ba){P.apply(this,arguments);T.menus.addMenuItems(xa,["-","outline"],Ba)};var W="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,R="1"==urlParams.sketch?document.createElement("div"):null,da="1"==urlParams.sketch?document.createElement("div"):null,fa="1"==urlParams.sketch?document.createElement("div"):null,ea=mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.refresh();M.refresh();M.view.validateBackground()});T.addListener("darkModeChanged",ea);
+T.addListener("sketchModeChanged",ea);var qa=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)fa.style.left="10px",fa.style.top="10px",da.style.left="10px",da.style.top="60px",R.style.top="10px",R.style.right="12px",R.style.left="",T.diagramContainer.setAttribute("data-bounds",T.diagramContainer.style.top+" "+T.diagramContainer.style.left+" "+T.diagramContainer.style.width+" "+T.diagramContainer.style.height),T.diagramContainer.style.top="0px",T.diagramContainer.style.left="0px",T.diagramContainer.style.bottom=
+"0px",T.diagramContainer.style.right="0px",T.diagramContainer.style.width="",T.diagramContainer.style.height="";else{var xa=T.diagramContainer.getAttribute("data-bounds");if(null!=xa){T.diagramContainer.style.background="transparent";T.diagramContainer.removeAttribute("data-bounds");var Ba=M.getGraphBounds();xa=xa.split(" ");T.diagramContainer.style.top=xa[0];T.diagramContainer.style.left=xa[1];T.diagramContainer.style.width=Ba.width+50+"px";T.diagramContainer.style.height=Ba.height+46+"px";T.diagramContainer.style.bottom=
+"";T.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:T.diagramContainer.getBoundingClientRect()}),"*");T.refresh()}fa.style.left=T.diagramContainer.offsetLeft+"px";fa.style.top=T.diagramContainer.offsetTop-fa.offsetHeight-4+"px";da.style.display="";da.style.left=T.diagramContainer.offsetLeft-da.offsetWidth-4+"px";da.style.top=T.diagramContainer.offsetTop+"px";R.style.left=T.diagramContainer.offsetLeft+T.diagramContainer.offsetWidth-R.offsetWidth+
+"px";R.style.top=fa.style.top;R.style.right="";T.bottomResizer.style.left=T.diagramContainer.offsetLeft+(T.diagramContainer.offsetWidth-T.bottomResizer.offsetWidth)/2+"px";T.bottomResizer.style.top=T.diagramContainer.offsetTop+T.diagramContainer.offsetHeight-T.bottomResizer.offsetHeight/2-1+"px";T.rightResizer.style.left=T.diagramContainer.offsetLeft+T.diagramContainer.offsetWidth-T.rightResizer.offsetWidth/2-1+"px";T.rightResizer.style.top=T.diagramContainer.offsetTop+(T.diagramContainer.offsetHeight-
+T.bottomResizer.offsetHeight)/2+"px"}T.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";T.rightResizer.style.visibility=T.bottomResizer.style.visibility;ia.style.display="none";fa.style.visibility="";R.style.visibility=""}),va=mxUtils.bind(this,function(){S.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";
+qa()});ea=mxUtils.bind(this,function(){va();b(T,!0);T.initFormatWindow();var xa=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(xa.x+xa.width+4,xa.y)});T.addListener("inlineFullscreenChanged",va);T.addListener("editInlineStart",ea);"1"==urlParams.embedInline&&T.addListener("darkModeChanged",ea);T.addListener("editInlineStop",mxUtils.bind(this,function(xa){T.diagramContainer.style.width="10px";T.diagramContainer.style.height="10px";T.diagramContainer.style.border=
+"";T.bottomResizer.style.visibility="hidden";T.rightResizer.style.visibility="hidden";fa.style.visibility="hidden";R.style.visibility="hidden";da.style.display="none"}));if(null!=T.hoverIcons){var ua=T.hoverIcons.update;T.hoverIcons.update=function(){M.freehand.isDrawing()||ua.apply(this,arguments)}}if(null!=M.freehand){var Aa=M.freehand.createStyle;M.freehand.createStyle=function(xa){return Aa.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){da.className="geToolbarContainer";R.className=
+"geToolbarContainer";fa.className="geToolbarContainer";ia.className="geToolbarContainer";T.picker=da;var za=!1;"1"!=urlParams.embed&&"atlassian"!=T.getServiceName()&&(mxEvent.addListener(ia,"mouseenter",function(){T.statusContainer.style.display="inline-block"}),mxEvent.addListener(ia,"mouseleave",function(){za||(T.statusContainer.style.display="none")}));var Ca=mxUtils.bind(this,function(xa){null!=T.notificationBtn&&(null!=xa?T.notificationBtn.setAttribute("title",xa):T.notificationBtn.removeAttribute("title"))});
+ia.style.visibility=20>ia.clientWidth?"hidden":"";T.editor.addListener("statusChanged",mxUtils.bind(this,function(){T.setStatusText(T.editor.getStatus());if("1"!=urlParams.embed&&"atlassian"!=T.getServiceName())if(T.statusContainer.style.display="inline-block",za=!0,1==T.statusContainer.children.length&&""==T.editor.getStatus())ia.style.visibility="hidden";else{if(0==T.statusContainer.children.length||1==T.statusContainer.children.length&&"function"===typeof T.statusContainer.firstChild.getAttribute&&
+null==T.statusContainer.firstChild.getAttribute("class")){var xa=null!=T.statusContainer.firstChild&&"function"===typeof T.statusContainer.firstChild.getAttribute?T.statusContainer.firstChild.getAttribute("title"):T.editor.getStatus();Ca(xa);var Ba=T.getCurrentFile();Ba=null!=Ba?Ba.savingStatusKey:DrawioFile.prototype.savingStatusKey;xa==mxResources.get(Ba)+"..."?(T.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(Ba))+'..."src="'+Editor.tailSpin+'">',T.statusContainer.style.display=
+"inline-block",za=!0):6<T.buttonContainer.clientWidth&&(T.statusContainer.style.display="none",za=!1)}else T.statusContainer.style.display="inline-block",Ca(null),za=!0;ia.style.visibility=20>ia.clientWidth&&!za?"hidden":""}}));ta=Q("diagram",null,Editor.menuImage);ta.style.boxShadow="none";ta.style.padding="6px";ta.style.margin="0px";fa.appendChild(ta);mxEvent.disableContextMenu(ta);mxEvent.addGestureListeners(ta,mxUtils.bind(this,function(xa){(mxEvent.isShiftDown(xa)||mxEvent.isAltDown(xa)||mxEvent.isMetaDown(xa)||
+mxEvent.isControlDown(xa)||mxEvent.isPopupTrigger(xa))&&this.appIconClicked(xa)}),null,null);T.statusContainer.style.position="";T.statusContainer.style.display="none";T.statusContainer.style.margin="0px";T.statusContainer.style.padding="6px 0px";T.statusContainer.style.maxWidth=Math.min(n-240,280)+"px";T.statusContainer.style.display="inline-block";T.statusContainer.style.textOverflow="ellipsis";T.buttonContainer.style.position="";T.buttonContainer.style.paddingRight="0px";T.buttonContainer.style.display=
+"inline-block";var sa=document.createElement("a");sa.style.padding="0px";sa.style.boxShadow="none";sa.className="geMenuItem";sa.style.display="inline-block";sa.style.width="40px";sa.style.height="12px";sa.style.marginBottom="-2px";sa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";sa.style.backgroundPosition="top center";sa.style.backgroundRepeat="no-repeat";sa.setAttribute("title","Minimize");var Va=!1,Ua=mxUtils.bind(this,function(){da.innerText="";if(!Va){var xa=function(Ka,
+Na,hb){Ka=X("",Ka.funct,null,Na,Ka,hb);Ka.style.width="40px";Ka.style.opacity="0.7";return Ba(Ka,null,"pointer")},Ba=function(Ka,Na,hb){null!=Na&&Ka.setAttribute("title",Na);Ka.style.cursor=null!=hb?hb:"default";Ka.style.margin="2px 0px";da.appendChild(Ka);mxUtils.br(da);return Ka};Ba(T.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text"),!0,!1,null,!0,!0),mxResources.get("text")+
+" ("+Editor.ctrlKey+"+Shift+X)");Ba(T.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,!1,null,!0),mxResources.get("note"));Ba(T.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle"),!0,!1,null,!0),
+mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");Ba(T.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse"),!0,!1,null,!0),mxResources.get("ellipse"));(function(){var Ka=new mxCell("",new mxGeometry(0,0,M.defaultEdgeLength,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");Ka.geometry.setTerminalPoint(new mxPoint(0,0),!0);Ka.geometry.setTerminalPoint(new mxPoint(Ka.geometry.width,0),!1);Ka.geometry.points=[];Ka.geometry.relative=!0;Ka.edge=
+!0;Ba(T.sidebar.createEdgeTemplateFromCells([Ka],Ka.geometry.width,Ka.geometry.height,mxResources.get("line"),!0,null,!0,!1),mxResources.get("line"));Ka=Ka.clone();Ka.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";Ka.geometry.width=M.defaultEdgeLength+20;Ka.geometry.setTerminalPoint(new mxPoint(0,20),!0);Ka.geometry.setTerminalPoint(new mxPoint(Ka.geometry.width,20),!1);Ka=Ba(T.sidebar.createEdgeTemplateFromCells([Ka],Ka.geometry.width,
+40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"));Ka.style.borderBottom="1px solid "+(Editor.isDarkMode()?"#505050":"lightgray");Ka.style.paddingBottom="14px";Ka.style.marginBottom="14px"})();xa(T.actions.get("insertFreehand"),mxResources.get("freehand"),Editor.freehandImage);var Pa=T.actions.get("toggleShapes");xa(Pa,mxResources.get("shapes")+" ("+Pa.shortcut+")",W);ta=Q("table",null,Editor.calendarImage);ta.style.boxShadow="none";ta.style.opacity="0.7";ta.style.padding="6px";
+ta.style.margin="0px";ta.style.width="37px";Ba(ta,null,"pointer");ta=Q("insert",null,Editor.plusImage);ta.style.boxShadow="none";ta.style.opacity="0.7";ta.style.padding="6px";ta.style.margin="0px";ta.style.width="37px";Ba(ta,null,"pointer")}"1"!=urlParams.embedInline&&da.appendChild(sa)});mxEvent.addListener(sa,"click",mxUtils.bind(this,function(){Va?(mxUtils.setPrefixedStyle(da.style,"transform","translate(0, -50%)"),da.style.padding="8px 6px 4px",da.style.top="50%",da.style.bottom="",da.style.height=
+"",sa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",sa.style.width="40px",sa.style.height="12px",sa.setAttribute("title","Minimize"),Va=!1,Ua()):(da.innerText="",da.appendChild(sa),mxUtils.setPrefixedStyle(da.style,"transform","translate(0, 0)"),da.style.top="",da.style.bottom="12px",da.style.padding="0px",da.style.height="24px",sa.style.height="24px",sa.style.backgroundImage="url("+Editor.plusImage+")",sa.setAttribute("title",mxResources.get("insert")),sa.style.width="24px",
+Va=!0)}));Ua();T.addListener("darkModeChanged",Ua);T.addListener("sketchModeChanged",Ua)}else T.editor.addListener("statusChanged",mxUtils.bind(this,function(){T.setStatusText(T.editor.getStatus())}));if(null!=H){var Ra=function(xa){mxEvent.isShiftDown(xa)?(T.hideCurrentMenu(),T.actions.get("smartFit").funct(),mxEvent.consume(xa)):mxEvent.isAltDown(xa)&&(T.hideCurrentMenu(),T.actions.get("customZoom").funct(),mxEvent.consume(xa))},Za=T.actions.get("zoomIn"),Ha=T.actions.get("zoomOut"),db=T.actions.get("resetView");
+ea=T.actions.get("fullscreen");var cb=T.actions.get("undo"),z=T.actions.get("redo"),K=X("",cb.funct,null,mxResources.get("undo")+" ("+cb.shortcut+")",cb,Editor.undoImage),L=X("",z.funct,null,mxResources.get("redo")+" ("+z.shortcut+")",z,Editor.redoImage),S=X("",ea.funct,null,mxResources.get("fullscreen"),ea,Editor.fullscreenImage);if(null!=R){db=function(){ra.style.display=null!=T.pages&&("0"!=urlParams.pages||1<T.pages.length||Editor.pagesVisible)?"inline-block":"none"};var V=function(){ra.innerText=
+"";if(null!=T.currentPage){mxUtils.write(ra,T.currentPage.getName());var xa=null!=T.pages?T.pages.length:1,Ba=T.getPageIndex(T.currentPage);Ba=null!=Ba?Ba+1:1;var Pa=T.currentPage.getId();ra.setAttribute("title",T.currentPage.getName()+" ("+Ba+"/"+xa+")"+(null!=Pa?" ["+Pa+"]":""))}};S.parentNode.removeChild(S);var ja=T.actions.get("delete"),na=X("",ja.funct,null,mxResources.get("delete"),ja,Editor.trashImage);na.style.opacity="0.1";fa.appendChild(na);ja.addListener("stateChanged",function(){na.style.opacity=
+ja.enabled?"":"0.1"});var ya=function(){K.style.display=0<T.editor.undoManager.history.length||M.isEditing()?"inline-block":"none";L.style.display=K.style.display;K.style.opacity=cb.enabled?"":"0.1";L.style.opacity=z.enabled?"":"0.1"};fa.appendChild(K);fa.appendChild(L);cb.addListener("stateChanged",ya);z.addListener("stateChanged",ya);ya();var ra=this.createPageMenuTab(!1,!0);ra.style.display="none";ra.style.position="";ra.style.marginLeft="";ra.style.top="";ra.style.left="";ra.style.height="100%";
+ra.style.lineHeight="";ra.style.borderStyle="none";ra.style.padding="3px 0";ra.style.margin="0px";ra.style.background="";ra.style.border="";ra.style.boxShadow="none";ra.style.verticalAlign="top";ra.style.width="auto";ra.style.maxWidth="160px";ra.style.position="relative";ra.style.padding="6px";ra.style.textOverflow="ellipsis";ra.style.opacity="0.8";R.appendChild(ra);T.editor.addListener("pagesPatched",V);T.editor.addListener("pageSelected",V);T.editor.addListener("pageRenamed",V);T.editor.addListener("fileLoaded",
+V);V();T.addListener("fileDescriptorChanged",db);T.addListener("pagesVisibleChanged",db);T.editor.addListener("pagesPatched",db);db();db=X("",Ha.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",Ha,Editor.zoomOutImage);R.appendChild(db);var ta=O.addMenu("100%",H.funct);ta.setAttribute("title",mxResources.get("zoom"));ta.innerHTML="100%";ta.style.display="inline-block";ta.style.color="inherit";ta.style.cursor="pointer";ta.style.textAlign="center";ta.style.whiteSpace="nowrap";
+ta.style.paddingRight="10px";ta.style.textDecoration="none";ta.style.verticalAlign="top";ta.style.padding="6px 0";ta.style.fontSize="14px";ta.style.width="40px";ta.style.opacity="0.4";R.appendChild(ta);H=X("",Za.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",Za,Editor.zoomInImage);R.appendChild(H);ea.visible&&(R.appendChild(S),mxEvent.addListener(document,"fullscreenchange",function(){S.style.backgroundImage="url("+(null!=document.fullscreenElement?Editor.fullscreenExitImage:
+Editor.fullscreenImage)+")"}));"1"==urlParams.embedInline&&(H=T.actions.get("exit"),R.appendChild(X("",H.funct,null,mxResources.get("exit"),H,Editor.closeImage)));T.tabContainer.style.visibility="hidden";ia.style.cssText="position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px 0px 6px 6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";fa.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
+R.style.cssText="position:absolute;right:14px;bottom:14px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";u.appendChild(fa);u.appendChild(R);da.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";mxClient.IS_POINTER&&(da.style.touchAction="none");u.appendChild(da);window.setTimeout(function(){mxUtils.setPrefixedStyle(da.style,
+"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(u)}else{var Da=X("",Ra,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",db,Editor.zoomFitImage);ia.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";ta=O.addMenu("100%",H.funct);ta.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");ta.style.whiteSpace="nowrap";ta.style.paddingRight=
+"10px";ta.style.textDecoration="none";ta.style.textDecoration="none";ta.style.overflow="hidden";ta.style.visibility="hidden";ta.style.textAlign="center";ta.style.cursor="pointer";ta.style.height=parseInt(T.tabContainerHeight)-1+"px";ta.style.lineHeight=parseInt(T.tabContainerHeight)+1+"px";ta.style.position="absolute";ta.style.display="block";ta.style.fontSize="12px";ta.style.width="59px";ta.style.right="0px";ta.style.bottom="0px";ta.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";
+ta.style.backgroundPosition="right 6px center";ta.style.backgroundRepeat="no-repeat";u.appendChild(ta)}(function(xa){mxEvent.addListener(xa,"click",Ra);var Ba=mxUtils.bind(this,function(){xa.innerText="";mxUtils.write(xa,Math.round(100*T.editor.graph.view.scale)+"%")});T.editor.graph.view.addListener(mxEvent.EVENT_SCALE,Ba);T.editor.addListener("resetGraphView",Ba);T.editor.addListener("pageSelected",Ba)})(ta);var Oa=T.setGraphEnabled;T.setGraphEnabled=function(){Oa.apply(this,arguments);null!=this.tabContainer&&
+(ta.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==R?this.tabContainerHeight+"px":"0px")}}u.appendChild(ia);u.appendChild(T.diagramContainer);ma.appendChild(u);T.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=n)&&"1"!=urlParams.embedInline&&b(this,!0);null==R&&u.appendChild(T.tabContainer);var Ma=null;U();mxEvent.addListener(window,"resize",function(){U();null!=T.sidebarWindow&&T.sidebarWindow.window.fit();
+null!=T.formatWindow&&T.formatWindow.window.fit();null!=T.actions.outlineWindow&&T.actions.outlineWindow.window.fit();null!=T.actions.layersWindow&&T.actions.layersWindow.window.fit();null!=T.menus.tagsWindow&&T.menus.tagsWindow.window.fit();null!=T.menus.findWindow&&T.menus.findWindow.window.fit();null!=T.menus.findReplaceWindow&&T.menus.findReplaceWindow.window.fit()});if("1"==urlParams.embedInline){document.body.style.cursor="text";da.style.transform="";mxEvent.addGestureListeners(T.diagramContainer.parentNode,
+function(xa){mxEvent.getSource(xa)==T.diagramContainer.parentNode&&(T.embedExitPoint=new mxPoint(mxEvent.getClientX(xa),mxEvent.getClientY(xa)),T.sendEmbeddedSvgExport())});ma=document.createElement("div");ma.style.position="absolute";ma.style.width="10px";ma.style.height="10px";ma.style.borderRadius="5px";ma.style.border="1px solid gray";ma.style.background="#ffffff";ma.style.cursor="row-resize";T.diagramContainer.parentNode.appendChild(ma);T.bottomResizer=ma;var Wa=null,Sa=null,Fa=null,Ja=null;
+mxEvent.addGestureListeners(ma,function(xa){Ja=parseInt(T.diagramContainer.style.height);Sa=mxEvent.getClientY(xa);M.popupMenuHandler.hideMenu();mxEvent.consume(xa)});ma=ma.cloneNode(!1);ma.style.cursor="col-resize";T.diagramContainer.parentNode.appendChild(ma);T.rightResizer=ma;mxEvent.addGestureListeners(ma,function(xa){Fa=parseInt(T.diagramContainer.style.width);Wa=mxEvent.getClientX(xa);M.popupMenuHandler.hideMenu();mxEvent.consume(xa)});mxEvent.addGestureListeners(document.body,null,function(xa){var Ba=
+!1;null!=Wa&&(T.diagramContainer.style.width=Math.max(20,Fa+mxEvent.getClientX(xa)-Wa)+"px",Ba=!0);null!=Sa&&(T.diagramContainer.style.height=Math.max(20,Ja+mxEvent.getClientY(xa)-Sa)+"px",Ba=!0);Ba&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:T.diagramContainer.getBoundingClientRect()}),"*"),qa(),T.refresh())},function(xa){null==Wa&&null==Sa||mxEvent.consume(xa);Sa=Wa=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor=
+"transparent";T.bottomResizer.style.visibility="hidden";T.rightResizer.style.visibility="hidden";fa.style.visibility="hidden";R.style.visibility="hidden";da.style.display="none"}"1"==urlParams.prefetchFonts&&T.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)}})();DrawioComment=function(b,e,k,n,D,t,E){this.file=b;this.id=e;this.content=k;this.modifiedDate=n;this.createdDate=D;this.isResolved=t;this.user=E;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,k,n,D){e()};DrawioComment.prototype.editComment=function(b,e,k){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DrawioUser=function(b,e,k,n,D){this.id=b;this.email=e;this.displayName=k;this.pictureUrl=n;this.locale=D};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\nbeta=beta\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\nrealtimeCollaboration=Real-Time Collaboration\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.\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\ngetNotionChromeExtension=Get the Notion Chrome Extension\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\nlabels=Labels\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\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\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\nsnapToGrid=Snap to Grid\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\nunmerge=Unmerge\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\ncreateODFile=Create OneDrive File\npickGDriveFile=Pick Google Drive File\ncreateGDriveFile=Create 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\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\nautoBkp=Automatic Backup\nconfAIgnoreCollectErr=Ignore collecting current pages errors\ndrafts=Drafts\ndraftSaveInt=Draft save interval [sec] (0 to disable)\npluginsDisabled=External plugins disabled.\nextExpNotConfigured=External image service is not configured\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="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="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><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="default"/></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=Graph.prototype.defaultThemes["default-style2"];GraphViewer=function(b,e,k){this.init(b,e,k)};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,e,k){this.graphConfig=null!=k?k:{};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"]?
@@ -4057,7 +4059,7 @@ this.graphConfig.responsive:this.responsive)&&!this.zoomEnabled&&!mxClient.NO_FO
this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");this.xmlNode=this.editor.extractGraphModel(this.xmlNode,!0);this.xmlNode!=e&&(this.xml=mxUtils.getXml(this.xmlNode),this.xmlDocument=this.xmlNode.ownerDocument);var d=this;this.graph.getImageFromBundles=function(I){return d.getImageUrl(I)};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 m=this.graph.getGlobalVariable;d=this;this.graph.getGlobalVariable=function(I){var G=f[d.currentPage];return"page"==I?G.getAttribute("name")||"Page-"+(d.currentPage+1):"pagenumber"==I?d.currentPage+1:"pagecount"==I?f.length:m.apply(this,arguments)}}}this.diagrams=[];var q=null;this.selectPage=function(I){this.handlingResize||(this.currentPage=mxUtils.mod(I,this.diagrams.length),
this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(I){I=this.getIndexById(I);var G=0<=I;G&&this.selectPage(I);return G};g=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=q&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),q=this.xmlNode)});var y=this.graph.setBackgroundImage;this.graph.setBackgroundImage=function(I){if(null!=I&&Graph.isPageLink(I.src)){var G=I.src,
-Y=G.indexOf(",");0<Y&&(Y=d.getIndexById(G.substring(Y+1)),0<=Y&&(I=d.getImageForGraphModel(Editor.parseDiagramNode(d.diagrams[Y])),I.originalSrc=G))}y.apply(this,arguments)};var F=this.graph.getGraphBounds;this.graph.getGraphBounds=function(I){var G=F.apply(this,arguments);I=this.backgroundImage;if(null!=I){var Y=this.view.translate,ba=this.view.scale;G=mxRectangle.fromRectangle(G);G.add(new mxRectangle((Y.x+I.x)*ba,(Y.y+I.y)*ba,I.width*ba,I.height*ba))}return G};this.addListener("xmlNodeChanged",
+Z=G.indexOf(",");0<Z&&(Z=d.getIndexById(G.substring(Z+1)),0<=Z&&(I=d.getImageForGraphModel(Editor.parseDiagramNode(d.diagrams[Z])),I.originalSrc=G))}y.apply(this,arguments)};var F=this.graph.getGraphBounds;this.graph.getGraphBounds=function(I){var G=F.apply(this,arguments);I=this.backgroundImage;if(null!=I){var Z=this.view.translate,ca=this.view.scale;G=mxRectangle.fromRectangle(G);G.add(new mxRectangle((Z.x+I.x)*ca,(Z.y+I.y)*ca,I.width*ca,I.height*ca))}return G};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(I){return!mxEvent.isPopupTrigger(I.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(I){if(Graph.isPageLink(I)){var G=I.indexOf(",");d.selectPageById(I.substring(G+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else this.handleCustomLink(I);return!0};var C=this.graph.foldTreeCell;this.graph.foldTreeCell=
@@ -4080,26 +4082,26 @@ null!=d||0!=this.graphConfig.resize||""==b.style.height?(d=null!=d?d:new mxPoint
GraphViewer.prototype.crop=function(){var b=this.graph,e=b.getGraphBounds(),k=b.border,n=b.view.scale;b.view.setTranslate(null!=e.x?Math.floor(b.view.translate.x-e.x/n+k):k,null!=e.y?Math.floor(b.view.translate.y-e.y/n+k):k)};GraphViewer.prototype.updateContainerWidth=function(b,e){b.style.width=e+"px"};GraphViewer.prototype.updateContainerHeight=function(b,e){if(this.forceCenter||this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||8==document.documentMode)b.style.height=e+"px"};
GraphViewer.prototype.showLayers=function(b,e){var k=this.graphConfig.layers;k=null!=k&&0<k.length?k.split(" "):[];var n=this.graphConfig.layerIds,D=null!=n&&0<n.length,t=!1;if(0<k.length||D||null!=e){e=null!=e?e.getModel():null;b=b.getModel();b.beginUpdate();try{var E=b.getChildCount(b.root);if(null==e){e=!1;t={};if(D)for(var d=0;d<n.length;d++){var f=b.getCell(n[d]);null!=f&&(e=!0,t[f.id]=!0)}else for(d=0;d<k.length;d++)f=b.getChildAt(b.root,parseInt(k[d])),null!=f&&(e=!0,t[f.id]=!0);for(d=0;e&&
d<E;d++)f=b.getChildAt(b.root,d),b.setVisible(f,t[f.id]||!1)}else for(d=0;d<E;d++)b.setVisible(b.getChildAt(b.root,d),e.isVisible(e.getChildAt(e.root,d)))}finally{b.endUpdate()}t=!0}return t};
-GraphViewer.prototype.addToolbar=function(){function b(ha,la,ja,U){var L=document.createElement("div");L.style.borderRight="1px solid #d0d0d0";L.style.padding="3px 6px 3px 6px";mxEvent.addListener(L,"click",ha);null!=ja&&L.setAttribute("title",ja);L.style.display="inline-block";ha=document.createElement("img");ha.setAttribute("border","0");ha.setAttribute("src",la);ha.style.width="18px";null==U||U?(mxEvent.addListener(L,"mouseenter",function(){L.style.backgroundColor="#ddd"}),mxEvent.addListener(L,
-"mouseleave",function(){L.style.backgroundColor="#eee"}),mxUtils.setOpacity(ha,60),L.style.cursor="pointer"):mxUtils.setOpacity(L,30);L.appendChild(ha);k.appendChild(L);m++;return L}var e=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?e.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(e.style.marginTop=this.toolbarHeight+"px");var k=e.ownerDocument.createElement("div");k.style.position="absolute";k.style.overflow="hidden";k.style.boxSizing=
+GraphViewer.prototype.addToolbar=function(){function b(ha,U,ma,T){var M=document.createElement("div");M.style.borderRight="1px solid #d0d0d0";M.style.padding="3px 6px 3px 6px";mxEvent.addListener(M,"click",ha);null!=ma&&M.setAttribute("title",ma);M.style.display="inline-block";ha=document.createElement("img");ha.setAttribute("border","0");ha.setAttribute("src",U);ha.style.width="18px";null==T||T?(mxEvent.addListener(M,"mouseenter",function(){M.style.backgroundColor="#ddd"}),mxEvent.addListener(M,
+"mouseleave",function(){M.style.backgroundColor="#eee"}),mxUtils.setOpacity(ha,60),M.style.cursor="pointer"):mxUtils.setOpacity(M,30);M.appendChild(ha);k.appendChild(M);m++;return M}var e=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?e.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(e.style.marginTop=this.toolbarHeight+"px");var k=e.ownerDocument.createElement("div");k.style.position="absolute";k.style.overflow="hidden";k.style.boxSizing=
"border-box";k.style.whiteSpace="nowrap";k.style.textAlign="left";k.style.zIndex=this.toolbarZIndex;k.style.backgroundColor="#eee";k.style.height=this.toolbarHeight+"px";this.toolbar=k;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(k.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(k,30);var n=null,D=null,t=mxUtils.bind(this,function(ha){null!=n&&(window.clearTimeout(n),fadeThead=null);null!=D&&(window.clearTimeout(D),fadeThead2=null);n=window.setTimeout(mxUtils.bind(this,
function(){mxUtils.setOpacity(k,0);n=null;D=window.setTimeout(mxUtils.bind(this,function(){k.style.display="none";D=null}),100)}),ha||200)}),E=mxUtils.bind(this,function(ha){null!=n&&(window.clearTimeout(n),fadeThead=null);null!=D&&(window.clearTimeout(D),fadeThead2=null);k.style.display="";mxUtils.setOpacity(k,ha||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(ha){mxEvent.isTouchEvent(ha)||(E(30),t())}));mxEvent.addListener(k,
-mxClient.IS_POINTER?"pointermove":"mousemove",function(ha){mxEvent.consume(ha)});mxEvent.addListener(k,"mouseenter",mxUtils.bind(this,function(ha){E(100)}));mxEvent.addListener(k,"mousemove",mxUtils.bind(this,function(ha){E(100);mxEvent.consume(ha)}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(ha){mxEvent.isTouchEvent(ha)||E(30)}));var d=this.graph,f=d.getTolerance();d.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ha,la){this.startX=la.getGraphX();
-this.startY=la.getGraphY();this.scrollLeft=d.container.scrollLeft;this.scrollTop=d.container.scrollTop},mouseMove:function(ha,la){},mouseUp:function(ha,la){mxEvent.isTouchEvent(la.getEvent())&&Math.abs(this.scrollLeft-d.container.scrollLeft)<f&&Math.abs(this.scrollTop-d.container.scrollTop)<f&&Math.abs(this.startX-la.getGraphX())<f&&Math.abs(this.startY-la.getGraphY())<f&&(0<parseFloat(k.style.opacity||0)?t():E(30))}})}for(var g=this.toolbarItems,m=0,q=null,y=null,F=null,C=null,I=0;I<g.length;I++){var G=
-g[I];if("pages"==G){C=e.ownerDocument.createElement("div");C.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(C,70);var Y=b(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");Y.style.borderRightStyle="none";Y.style.paddingLeft="0px";Y.style.paddingRight="0px";k.appendChild(C);var ba=
-b(mxUtils.bind(this,function(){this.selectPage(this.currentPage+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");ba.style.paddingLeft="0px";ba.style.paddingRight="0px";G=mxUtils.bind(this,function(){C.innerText="";mxUtils.write(C,this.currentPage+1+" / "+this.diagrams.length);C.style.display=1<this.diagrams.length?"inline-block":"none";Y.style.display=C.style.display;ba.style.display=C.style.display});this.addListener("graphChanged",G);G()}else if("zoom"==G)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"==G){if(this.layersEnabled){var Z=this.graph.getModel(),
-X=b(mxUtils.bind(this,function(ha){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 ja=this.graph.getGraphBounds(),U=this.graph.view;0>ja.x||0>ja.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:U.translate.clone(),scale:U.scale}):null!=this.graph.originalViewState&&0<ja.x/U.scale+this.graph.originalViewState.translate.x-
-U.translate.x&&0<ja.y/U.scale+this.graph.originalViewState.translate.y-U.translate.y&&(U.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:U.translate.clone(),scale:U.scale})}}));mxEvent.addListener(q,"mouseleave",function(){q.parentNode.removeChild(q);q=null});ha=X.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.overflowY="auto";q.style.maxHeight=this.graph.container.clientHeight-this.toolbarHeight-10+"px";q.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(q,80);var la=mxUtils.getDocumentScrollOrigin(document);q.style.left=la.x+ha.left-1+"px";q.style.top=la.y+ha.bottom-2+"px";document.body.appendChild(q)}}),Editor.layersImage,mxResources.get("layers")||"Layers");Z.addListener(mxEvent.CHANGE,function(){X.style.display=
-1<Z.getChildCount(Z.root)?"inline-block":"none"});X.style.display=1<Z.getChildCount(Z.root)?"inline-block":"none"}}else if("tags"==G){if(this.tagsEnabled){var qa=b(mxUtils.bind(this,function(ha){null==y&&(y=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),y.div.getElementsByTagName("div")[0].style.position="",y.div.style.maxHeight="160px",y.div.style.maxWidth="120px",y.div.style.padding="2px",y.div.style.overflow="auto",y.div.style.height="auto",y.div.style.position="fixed",y.div.style.fontFamily=
-Editor.defaultHtmlFont,y.div.style.fontSize="11px",y.div.style.backgroundColor="#eee",y.div.style.color="#000",y.div.style.border="1px solid #d0d0d0",y.div.style.zIndex=this.toolbarZIndex+1,mxUtils.setOpacity(y.div,80));if(null!=F)F.parentNode.removeChild(F),F=null;else{F=y.div;mxEvent.addListener(F,"mouseleave",function(){F.parentNode.removeChild(F);F=null});ha=qa.getBoundingClientRect();var la=mxUtils.getDocumentScrollOrigin(document);F.style.left=la.x+ha.left-1+"px";F.style.top=la.y+ha.bottom-
-2+"px";document.body.appendChild(F);y.refresh()}}),Editor.tagsImage,mxResources.get("tags")||"Tags");Z.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){qa.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}));qa.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}}else"lightbox"==G?this.lightboxEnabled&&b(mxUtils.bind(this,function(){this.showLightbox()}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&
+mxClient.IS_POINTER?"pointermove":"mousemove",function(ha){mxEvent.consume(ha)});mxEvent.addListener(k,"mouseenter",mxUtils.bind(this,function(ha){E(100)}));mxEvent.addListener(k,"mousemove",mxUtils.bind(this,function(ha){E(100);mxEvent.consume(ha)}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(ha){mxEvent.isTouchEvent(ha)||E(30)}));var d=this.graph,f=d.getTolerance();d.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ha,U){this.startX=U.getGraphX();
+this.startY=U.getGraphY();this.scrollLeft=d.container.scrollLeft;this.scrollTop=d.container.scrollTop},mouseMove:function(ha,U){},mouseUp:function(ha,U){mxEvent.isTouchEvent(U.getEvent())&&Math.abs(this.scrollLeft-d.container.scrollLeft)<f&&Math.abs(this.scrollTop-d.container.scrollTop)<f&&Math.abs(this.startX-U.getGraphX())<f&&Math.abs(this.startY-U.getGraphY())<f&&(0<parseFloat(k.style.opacity||0)?t():E(30))}})}for(var g=this.toolbarItems,m=0,q=null,y=null,F=null,C=null,I=0;I<g.length;I++){var G=
+g[I];if("pages"==G){C=e.ownerDocument.createElement("div");C.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(C,70);var Z=b(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");Z.style.borderRightStyle="none";Z.style.paddingLeft="0px";Z.style.paddingRight="0px";k.appendChild(C);var ca=
+b(mxUtils.bind(this,function(){this.selectPage(this.currentPage+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");ca.style.paddingLeft="0px";ca.style.paddingRight="0px";G=mxUtils.bind(this,function(){C.innerText="";mxUtils.write(C,this.currentPage+1+" / "+this.diagrams.length);C.style.display=1<this.diagrams.length?"inline-block":"none";Z.style.display=C.style.display;ca.style.display=C.style.display});this.addListener("graphChanged",G);G()}else if("zoom"==G)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"==G){if(this.layersEnabled){var aa=this.graph.getModel(),
+Y=b(mxUtils.bind(this,function(ha){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 ma=this.graph.getGraphBounds(),T=this.graph.view;0>ma.x||0>ma.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:T.translate.clone(),scale:T.scale}):null!=this.graph.originalViewState&&0<ma.x/T.scale+this.graph.originalViewState.translate.x-
+T.translate.x&&0<ma.y/T.scale+this.graph.originalViewState.translate.y-T.translate.y&&(T.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:T.translate.clone(),scale:T.scale})}}));mxEvent.addListener(q,"mouseleave",function(){q.parentNode.removeChild(q);q=null});ha=Y.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.overflowY="auto";q.style.maxHeight=this.graph.container.clientHeight-this.toolbarHeight-10+"px";q.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(q,80);var U=mxUtils.getDocumentScrollOrigin(document);q.style.left=U.x+ha.left-1+"px";q.style.top=U.y+ha.bottom-2+"px";document.body.appendChild(q)}}),Editor.layersImage,mxResources.get("layers")||"Layers");aa.addListener(mxEvent.CHANGE,function(){Y.style.display=
+1<aa.getChildCount(aa.root)?"inline-block":"none"});Y.style.display=1<aa.getChildCount(aa.root)?"inline-block":"none"}}else if("tags"==G){if(this.tagsEnabled){var pa=b(mxUtils.bind(this,function(ha){null==y&&(y=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),y.div.getElementsByTagName("div")[0].style.position="",y.div.style.maxHeight="160px",y.div.style.maxWidth="120px",y.div.style.padding="2px",y.div.style.overflow="auto",y.div.style.height="auto",y.div.style.position="fixed",
+y.div.style.fontFamily=Editor.defaultHtmlFont,y.div.style.fontSize="11px",y.div.style.backgroundColor="#eee",y.div.style.color="#000",y.div.style.border="1px solid #d0d0d0",y.div.style.zIndex=this.toolbarZIndex+1,mxUtils.setOpacity(y.div,80));if(null!=F)F.parentNode.removeChild(F),F=null;else{F=y.div;mxEvent.addListener(F,"mouseleave",function(){F.parentNode.removeChild(F);F=null});ha=pa.getBoundingClientRect();var U=mxUtils.getDocumentScrollOrigin(document);F.style.left=U.x+ha.left-1+"px";F.style.top=
+U.y+ha.bottom-2+"px";document.body.appendChild(F);y.refresh()}}),Editor.tagsImage,mxResources.get("tags")||"Tags");aa.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){pa.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}));pa.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}}else"lightbox"==G?this.lightboxEnabled&&b(mxUtils.bind(this,function(){this.showLightbox()}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&
(G=this.graphConfig["toolbar-buttons"][G],null!=G&&(G.elem=b(null==G.enabled||G.enabled?G.handler:function(){},G.image,G.title,G.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*m);null!=this.graphConfig.title&&(g=e.ownerDocument.createElement("div"),g.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",g.setAttribute("title",this.graphConfig.title),
-mxUtils.write(g,this.graphConfig.title),mxUtils.setOpacity(g,70),k.appendChild(g),this.filename=g);this.minToolbarWidth=34*m;var Q=e.style.border,W=mxUtils.bind(this,function(){k.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,e.offsetWidth)+"px";k.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var ha=e.getBoundingClientRect(),la=mxUtils.getScrollOrigin(document.body);la="relative"===document.body.style.position?document.body.getBoundingClientRect():
-{left:-la.x,top:-la.y};ha={left:ha.left-la.left,top:ha.top-la.top,bottom:ha.bottom-la.top,right:ha.right-la.left};k.style.left=ha.left+"px";"bottom"==this.graphConfig["toolbar-position"]?k.style.top=ha.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(k.style.marginTop=-this.toolbarHeight+"px",k.style.top=ha.top+1+"px"):k.style.top=ha.top+"px";"1px solid transparent"==Q&&(e.style.border="1px solid #d0d0d0");document.body.appendChild(k);var ja=mxUtils.bind(this,function(){null!=k.parentNode&&
-k.parentNode.removeChild(k);null!=q&&(q.parentNode.removeChild(q),q=null);e.style.border=Q});mxEvent.addListener(document,"mousemove",function(U){for(U=mxEvent.getSource(U);null!=U;){if(U==e||U==k||U==q)return;U=U.parentNode}ja()});mxEvent.addListener(document.body,"mouseleave",function(U){ja()})}else k.style.top=-this.toolbarHeight+"px",e.appendChild(k)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(e,"mouseenter",W):W();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=
-k.parentNode&&W()})).observe(e)};GraphViewer.prototype.disableButton=function(b){var e=this.graphConfig["toolbar-buttons"]?this.graphConfig["toolbar-buttons"][b]:null;null!=e&&(mxUtils.setOpacity(e.elem,30),mxEvent.removeListener(e.elem,"click",e.handler),mxEvent.addListener(e.elem,"mouseenter",function(){e.elem.style.backgroundColor="#eee"}))};
+mxUtils.write(g,this.graphConfig.title),mxUtils.setOpacity(g,70),k.appendChild(g),this.filename=g);this.minToolbarWidth=34*m;var Q=e.style.border,X=mxUtils.bind(this,function(){k.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,e.offsetWidth)+"px";k.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var ha=e.getBoundingClientRect(),U=mxUtils.getScrollOrigin(document.body);U="relative"===document.body.style.position?document.body.getBoundingClientRect():
+{left:-U.x,top:-U.y};ha={left:ha.left-U.left,top:ha.top-U.top,bottom:ha.bottom-U.top,right:ha.right-U.left};k.style.left=ha.left+"px";"bottom"==this.graphConfig["toolbar-position"]?k.style.top=ha.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(k.style.marginTop=-this.toolbarHeight+"px",k.style.top=ha.top+1+"px"):k.style.top=ha.top+"px";"1px solid transparent"==Q&&(e.style.border="1px solid #d0d0d0");document.body.appendChild(k);var ma=mxUtils.bind(this,function(){null!=k.parentNode&&
+k.parentNode.removeChild(k);null!=q&&(q.parentNode.removeChild(q),q=null);e.style.border=Q});mxEvent.addListener(document,"mousemove",function(T){for(T=mxEvent.getSource(T);null!=T;){if(T==e||T==k||T==q)return;T=T.parentNode}ma()});mxEvent.addListener(document.body,"mouseleave",function(T){ma()})}else k.style.top=-this.toolbarHeight+"px",e.appendChild(k)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(e,"mouseenter",X):X();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=
+k.parentNode&&X()})).observe(e)};GraphViewer.prototype.disableButton=function(b){var e=this.graphConfig["toolbar-buttons"]?this.graphConfig["toolbar-buttons"][b]:null;null!=e&&(mxUtils.setOpacity(e.elem,30),mxEvent.removeListener(e.elem,"click",e.handler),mxEvent.addListener(e.elem,"mouseenter",function(){e.elem.style.backgroundColor="#eee"}))};
GraphViewer.prototype.addClickHandler=function(b,e){b.linkPolicy=this.graphConfig.target||b.linkPolicy;b.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(k,n){if(null==n)for(var D=mxEvent.getSource(k);D!=b.container&&null!=D&&null==n;)"a"==D.nodeName.toLowerCase()&&(n=D.getAttribute("href")),D=D.parentNode;null!=e?null==n||b.isCustomLink(n)?mxEvent.consume(k):b.isExternalProtocol(n)||b.isBlankLink(n)||window.setTimeout(function(){e.destroy()},0):null!=n&&null==e&&b.isCustomLink(n)&&
(mxEvent.isTouchEvent(k)||!mxEvent.isPopupTrigger(k))&&b.customLinkClicked(n)&&(mxUtils.clearSelection(),mxEvent.consume(k))}),mxUtils.bind(this,function(k){null!=e||!this.lightboxClickEnabled||mxEvent.isTouchEvent(k)&&0!=this.toolbarItems.length||this.showLightbox()}))};
GraphViewer.prototype.showLightbox=function(b,e,k){if("open"==this.graphConfig.lightbox||window.self!==window.top)if(null==this.lightboxWindow||this.lightboxWindow.closed){b=null!=b?b:null!=this.graphConfig.editable?this.graphConfig.editable:!0;k={client:1,target:null!=k?k:"blank"};b&&(k.edit=this.graphConfig.edit||"_blank");if(null!=e?e:1)k.close=1;this.layersEnabled&&(k.layers=1);this.tagsEnabled&&(k.tags={});null!=this.graphConfig&&0!=this.graphConfig.nav&&(k.nav=1);null!=this.graphConfig&&null!=
@@ -4120,8 +4122,8 @@ GraphViewer.initCss=function(){try{var b=document.createElement("style");b.type=
GraphViewer.cachedUrls={};GraphViewer.getUrl=function(b,e,k){if(null!=GraphViewer.cachedUrls[b])e(GraphViewer.cachedUrls[b]);else{var n=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;n.open("GET",b);n.onload=function(){e(null!=n.getText?n.getText():n.responseText)};n.onerror=k;n.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0;
(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(k){return window.setTimeout(k,20)},e=function(k,n){function D(){this.q=[];this.add=function(F){this.q.push(F)};var q,y;this.call=function(){q=0;for(y=this.q.length;q<y;q++)this.q[q].call()}}function t(q,y){return q.currentStyle?q.currentStyle[y]:window.getComputedStyle?window.getComputedStyle(q,null).getPropertyValue(y):q.style[y]}function E(q,y){if(!q.resizedAttached)q.resizedAttached=
new D,q.resizedAttached.add(y);else if(q.resizedAttached){q.resizedAttached.add(y);return}q.resizeSensor=document.createElement("div");q.resizeSensor.className="resize-sensor";q.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";q.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>';
-q.appendChild(q.resizeSensor);"static"==t(q,"position")&&(q.style.position="relative");var F=q.resizeSensor.childNodes[0],C=F.childNodes[0],I=q.resizeSensor.childNodes[1],G=function(){C.style.width="100000px";C.style.height="100000px";F.scrollLeft=1E5;F.scrollTop=1E5;I.scrollLeft=1E5;I.scrollTop=1E5};G();var Y=!1,ba=function(){q.resizedAttached&&(Y&&(q.resizedAttached.call(),Y=!1),b(ba))};b(ba);var Z,X,qa,Q;y=function(){if((qa=q.offsetWidth)!=Z||(Q=q.offsetHeight)!=X)Y=!0,Z=qa,X=Q;G()};var W=function(ha,
-la,ja){ha.attachEvent?ha.attachEvent("on"+la,ja):ha.addEventListener(la,ja)};W(F,"scroll",y);W(I,"scroll",y)}var d=function(){GraphViewer.resizeSensorEnabled&&n()},f=Object.prototype.toString.call(k),g="[object Array]"===f||"[object NodeList]"===f||"[object HTMLCollection]"===f||"undefined"!==typeof jQuery&&k instanceof jQuery||"undefined"!==typeof Elements&&k instanceof Elements;if(g){f=0;for(var m=k.length;f<m;f++)E(k[f],d)}else E(k,d);this.detach=function(){if(g)for(var q=0,y=k.length;q<y;q++)e.detach(k[q]);
+q.appendChild(q.resizeSensor);"static"==t(q,"position")&&(q.style.position="relative");var F=q.resizeSensor.childNodes[0],C=F.childNodes[0],I=q.resizeSensor.childNodes[1],G=function(){C.style.width="100000px";C.style.height="100000px";F.scrollLeft=1E5;F.scrollTop=1E5;I.scrollLeft=1E5;I.scrollTop=1E5};G();var Z=!1,ca=function(){q.resizedAttached&&(Z&&(q.resizedAttached.call(),Z=!1),b(ca))};b(ca);var aa,Y,pa,Q;y=function(){if((pa=q.offsetWidth)!=aa||(Q=q.offsetHeight)!=Y)Z=!0,aa=pa,Y=Q;G()};var X=function(ha,
+U,ma){ha.attachEvent?ha.attachEvent("on"+U,ma):ha.addEventListener(U,ma)};X(F,"scroll",y);X(I,"scroll",y)}var d=function(){GraphViewer.resizeSensorEnabled&&n()},f=Object.prototype.toString.call(k),g="[object Array]"===f||"[object NodeList]"===f||"[object HTMLCollection]"===f||"undefined"!==typeof jQuery&&k instanceof jQuery||"undefined"!==typeof Elements&&k instanceof Elements;if(g){f=0;for(var m=k.length;f<m;f++)E(k[f],d)}else E(k,d);this.detach=function(){if(g)for(var q=0,y=k.length;q<y;q++)e.detach(k[q]);
else e.detach(k)}};e.detach=function(k){k.resizeSensor&&(k.removeChild(k.resizeSensor),delete k.resizeSensor,delete k.resizedAttached)};window.ResizeSensor=e})();
function mxBpmnShape(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxBpmnShape,mxShape);
mxBpmnShape.prototype.customProperties=[{name:"symbol",dispName:"Event",type:"enum",defVal:"general",enumList:[{val:"general",dispName:"General"},{val:"message",dispName:"Message"},{val:"timer",dispName:"Timer"},{val:"escalation",dispName:"Escalation"},{val:"conditional",dispName:"Conditional"},{val:"link",dispName:"Link"},{val:"error",dispName:"Error"},{val:"cancel",dispName:"Cancel"},{val:"compensation",dispName:"Compensation"},{val:"signal",dispName:"Signal"},{val:"multiple",dispName:"Multiple"},
diff --git a/src/main/webapp/js/viewer.min.js b/src/main/webapp/js/viewer.min.js
index 12e91afd..2111fc5a 100644
--- a/src/main/webapp/js/viewer.min.js
+++ b/src/main/webapp/js/viewer.min.js
@@ -98,8 +98,8 @@ window.DRAWIO_GITHUB_ID=window.DRAWIO_GITHUB_ID||"Iv1.98d62f0431e40543";window.D
window.RT_WEBSOCKET_URL=window.RT_WEBSOCKET_URL||"wss://"+("test.draw.io"==window.location.hostname?"app.diagrams.net":window.location.hostname)+"/rt";window.SHAPES_PATH=window.SHAPES_PATH||"shapes";window.GRAPH_IMAGE_PATH=window.GRAPH_IMAGE_PATH||"img";window.ICONSEARCH_PATH=window.ICONSEARCH_PATH||((null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE")||urlParams.dev)&&"file:"!=window.location.protocol?"iconSearch":window.DRAWIO_BASE_URL+"/iconSearch");
window.TEMPLATE_PATH=window.TEMPLATE_PATH||"templates";window.NEW_DIAGRAM_CATS_PATH=window.NEW_DIAGRAM_CATS_PATH||"newDiagramCats";window.PLUGINS_BASE_PATH=window.PLUGINS_BASE_PATH||"";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||RESOURCES_PATH+"/dia";window.DRAWIO_CONFIG=window.DRAWIO_CONFIG||null;window.mxLoadResources=window.mxLoadResources||!1;
window.mxLanguage=window.mxLanguage||function(){var a=urlParams.lang;if(null==a&&"undefined"!=typeof JSON&&isLocalStorage)try{var b=localStorage.getItem(".drawio-config");null!=b&&(a=JSON.parse(b).language||null);if(!a&&window.mxIsElectron&&(a=urlParams.appLang,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.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",lt:"Lietuvių",lv:"Latviešu",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)}
"1"==urlParams.extAuth&&/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent)&&(urlParams.gapi="0",urlParams.noDevice="1","1"!=urlParams.lightbox&&(urlParams.lightbox="1",urlParams.layers="1",urlParams.viewerOnlyMsg="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");function setCurrentXml(a,b){null!=window.parent&&null!=window.parent.openFile&&window.parent.openFile.setData(a,b)}
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");
@@ -110,7 +110,7 @@ if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==url
"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");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,ADD_ATTR:["target","content"]};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:"20.0.2",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.0.3",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)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints,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]"!==
@@ -1992,12 +1992,12 @@ Editor.prototype.setFilename=function(b){this.filename=b};
Editor.prototype.createUndoManager=function(){var b=this.graph,e=new mxUndoManager;this.undoListener=function(n,D){e.undoableEditHappened(D.getProperty("edit"))};var k=mxUtils.bind(this,function(n,D){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,k);b.getView().addListener(mxEvent.UNDO,k);k=function(n,D){n=b.getSelectionCellsForChanges(D.getProperty("edit").changes,function(E){return!(E instanceof mxChildChange)});if(0<n.length){b.getModel();D=[];for(var t=0;t<n.length;t++)null!=
b.view.getState(n[t])&&D.push(n[t]);b.setSelectionCells(D)}};e.addListener(mxEvent.UNDO,k);e.addListener(mxEvent.REDO,k);return e};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,e,k,n,D,t,E,d,f,g,m){var q=f?57:0,y=k,F=n,C=f?0:64,I=Editor.inlineFullscreen||null==b.embedViewport?mxUtils.getDocumentSize():mxUtils.clone(b.embedViewport);null==b.embedViewport&&null!=window.innerHeight&&(I.height=window.innerHeight);var G=I.height,Y=Math.max(1,Math.round((I.width-k-C)/2)),ba=Math.max(1,Math.round((G-n-b.footerHeight)/3));e.style.maxHeight="100%";k=null!=document.body?Math.min(k,document.body.scrollWidth-C):k;n=Math.min(n,G-C);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=G+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));I=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=I.x+"px";this.bg.style.top=I.y+"px";Y+=I.x;ba+=I.y;Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px",
-ba+=b.embedViewport.y,Y+=b.embedViewport.x);D&&document.body.appendChild(this.bg);var Z=b.createDiv(f?"geTransDialog":"geDialog");D=this.getPosition(Y,ba,k,n);Y=D.x;ba=D.y;Z.style.width=k+"px";Z.style.height=n+"px";Z.style.left=Y+"px";Z.style.top=ba+"px";Z.style.zIndex=this.zIndex;Z.appendChild(e);document.body.appendChild(Z);!d&&e.clientHeight>Z.clientHeight-C&&(e.style.overflowY="auto");e.style.overflowX="hidden";if(t&&(t=document.createElement("img"),t.setAttribute("src",Dialog.prototype.closeImage),
-t.setAttribute("title",mxResources.get("close")),t.className="geDialogClose",t.style.top=ba+14+"px",t.style.left=Y+k+38-q+"px",t.style.zIndex=this.zIndex,mxEvent.addListener(t,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(t),this.dialogImg=t,!m)){var X=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(qa){X=!0}),null,mxUtils.bind(this,function(qa){X&&(b.hideDialog(!0),X=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=g){var qa=
-g();null!=qa&&(y=k=qa.w,F=n=qa.h)}qa=mxUtils.getDocumentSize();G=qa.height;this.bg.style.height=G+"px";Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");Y=Math.max(1,Math.round((qa.width-k-C)/2));ba=Math.max(1,Math.round((G-n-b.footerHeight)/3));k=null!=document.body?Math.min(y,document.body.scrollWidth-C):y;n=Math.min(F,G-C);qa=this.getPosition(Y,ba,k,n);Y=qa.x;ba=qa.y;Z.style.left=Y+"px";Z.style.top=ba+"px";Z.style.width=k+"px";Z.style.height=
-n+"px";!d&&e.clientHeight>Z.clientHeight-C&&(e.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=ba+14+"px",this.dialogImg.style.left=Y+k+38-q+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=E;this.container=Z;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
+function Dialog(b,e,k,n,D,t,E,d,f,g,m){var q=f?57:0,y=k,F=n,C=f?0:64,I=Editor.inlineFullscreen||null==b.embedViewport?mxUtils.getDocumentSize():mxUtils.clone(b.embedViewport);null==b.embedViewport&&null!=window.innerHeight&&(I.height=window.innerHeight);var G=I.height,Z=Math.max(1,Math.round((I.width-k-C)/2)),ca=Math.max(1,Math.round((G-n-b.footerHeight)/3));e.style.maxHeight="100%";k=null!=document.body?Math.min(k,document.body.scrollWidth-C):k;n=Math.min(n,G-C);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=G+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));I=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=I.x+"px";this.bg.style.top=I.y+"px";Z+=I.x;ca+=I.y;Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px",
+ca+=b.embedViewport.y,Z+=b.embedViewport.x);D&&document.body.appendChild(this.bg);var aa=b.createDiv(f?"geTransDialog":"geDialog");D=this.getPosition(Z,ca,k,n);Z=D.x;ca=D.y;aa.style.width=k+"px";aa.style.height=n+"px";aa.style.left=Z+"px";aa.style.top=ca+"px";aa.style.zIndex=this.zIndex;aa.appendChild(e);document.body.appendChild(aa);!d&&e.clientHeight>aa.clientHeight-C&&(e.style.overflowY="auto");e.style.overflowX="hidden";if(t&&(t=document.createElement("img"),t.setAttribute("src",Dialog.prototype.closeImage),
+t.setAttribute("title",mxResources.get("close")),t.className="geDialogClose",t.style.top=ca+14+"px",t.style.left=Z+k+38-q+"px",t.style.zIndex=this.zIndex,mxEvent.addListener(t,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(t),this.dialogImg=t,!m)){var Y=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(pa){Y=!0}),null,mxUtils.bind(this,function(pa){Y&&(b.hideDialog(!0),Y=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=g){var pa=
+g();null!=pa&&(y=k=pa.w,F=n=pa.h)}pa=mxUtils.getDocumentSize();G=pa.height;this.bg.style.height=G+"px";Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");Z=Math.max(1,Math.round((pa.width-k-C)/2));ca=Math.max(1,Math.round((G-n-b.footerHeight)/3));k=null!=document.body?Math.min(y,document.body.scrollWidth-C):y;n=Math.min(F,G-C);pa=this.getPosition(Z,ca,k,n);Z=pa.x;ca=pa.y;aa.style.left=Z+"px";aa.style.top=ca+"px";aa.style.width=k+"px";aa.style.height=
+n+"px";!d&&e.clientHeight>aa.clientHeight-C&&(e.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=ca+14+"px",this.dialogImg.style.left=Z+k+38-q+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=E;this.container=aa;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+
@@ -2005,40 +2005,40 @@ Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKA
var ErrorDialog=function(b,e,k,n,D,t,E,d,f,g,m){f=null!=f?f:!0;var q=document.createElement("div");q.style.textAlign="center";if(null!=e){var y=document.createElement("div");y.style.padding="0px";y.style.margin="0px";y.style.fontSize="18px";y.style.paddingBottom="16px";y.style.marginBottom="10px";y.style.borderBottom="1px solid #c0c0c0";y.style.color="gray";y.style.whiteSpace="nowrap";y.style.textOverflow="ellipsis";y.style.overflow="hidden";mxUtils.write(y,e);y.setAttribute("title",e);q.appendChild(y)}e=
document.createElement("div");e.style.lineHeight="1.2em";e.style.padding="6px";e.innerHTML=k;q.appendChild(e);k=document.createElement("div");k.style.marginTop="12px";k.style.textAlign="center";null!=t&&(e=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();t()}),e.className="geBtn",k.appendChild(e),k.style.textAlign="center");null!=g&&(g=mxUtils.button(g,function(){null!=m&&m()}),g.className="geBtn",k.appendChild(g));var F=mxUtils.button(n,function(){f&&b.hideDialog();null!=D&&D()});
F.className="geBtn";k.appendChild(F);null!=E&&(n=mxUtils.button(E,function(){f&&b.hideDialog();null!=d&&d()}),n.className="geBtn gePrimaryBtn",k.appendChild(n));this.init=function(){F.focus()};q.appendChild(k);this.container=q},PrintDialog=function(b,e){this.create(b,e)};
-PrintDialog.prototype.create=function(b){function e(F){var C=E.checked||g.checked,I=parseInt(q.value)/100;isNaN(I)&&(I=1,q.value="100%");I*=.75;var G=k.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,Y=1/k.pageScale;if(C){var ba=E.checked?1:parseInt(m.value);isNaN(ba)||(Y=mxUtils.getScaleForPageCount(ba,k,G))}k.getGraphBounds();var Z=ba=0;G=mxRectangle.fromRectangle(G);G.width=Math.ceil(G.width*I);G.height=Math.ceil(G.height*I);Y*=I;!C&&k.pageVisible?(I=k.getPageLayout(),ba-=I.x*G.width,Z-=I.y*G.height):
-C=!0;C=PrintDialog.createPrintPreview(k,Y,G,0,ba,Z,C);C.open();F&&PrintDialog.printPreview(C)}var k=b.editor.graph,n=document.createElement("table");n.style.width="100%";n.style.height="100%";var D=document.createElement("tbody");var t=document.createElement("tr");var E=document.createElement("input");E.setAttribute("type","checkbox");var d=document.createElement("td");d.setAttribute("colspan","2");d.style.fontSize="10pt";d.appendChild(E);var f=document.createElement("span");mxUtils.write(f," "+mxResources.get("fitPage"));
-d.appendChild(f);mxEvent.addListener(f,"click",function(F){E.checked=!E.checked;g.checked=!E.checked;mxEvent.consume(F)});mxEvent.addListener(E,"change",function(){g.checked=!E.checked});t.appendChild(d);D.appendChild(t);t=t.cloneNode(!1);var g=document.createElement("input");g.setAttribute("type","checkbox");d=document.createElement("td");d.style.fontSize="10pt";d.appendChild(g);f=document.createElement("span");mxUtils.write(f," "+mxResources.get("posterPrint")+":");d.appendChild(f);mxEvent.addListener(f,
-"click",function(F){g.checked=!g.checked;E.checked=!g.checked;mxEvent.consume(F)});t.appendChild(d);var m=document.createElement("input");m.setAttribute("value","1");m.setAttribute("type","number");m.setAttribute("min","1");m.setAttribute("size","4");m.setAttribute("disabled","disabled");m.style.width="50px";d=document.createElement("td");d.style.fontSize="10pt";d.appendChild(m);mxUtils.write(d," "+mxResources.get("pages")+" (max)");t.appendChild(d);D.appendChild(t);mxEvent.addListener(g,"change",
-function(){g.checked?m.removeAttribute("disabled"):m.setAttribute("disabled","disabled");E.checked=!g.checked});t=t.cloneNode(!1);d=document.createElement("td");mxUtils.write(d,mxResources.get("pageScale")+":");t.appendChild(d);d=document.createElement("td");var q=document.createElement("input");q.setAttribute("value","100 %");q.setAttribute("size","5");q.style.width="50px";d.appendChild(q);t.appendChild(d);D.appendChild(t);t=document.createElement("tr");d=document.createElement("td");d.colSpan=2;
-d.style.paddingTop="20px";d.setAttribute("align","right");f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});f.className="geBtn";b.editor.cancelFirst&&d.appendChild(f);if(PrintDialog.previewEnabled){var y=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();e(!1)});y.className="geBtn";d.appendChild(y)}y=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();e(!0)});y.className="geBtn gePrimaryBtn";d.appendChild(y);b.editor.cancelFirst||
-d.appendChild(f);t.appendChild(d);D.appendChild(t);n.appendChild(D);this.container=n};PrintDialog.printPreview=function(b){try{if(null!=b.wnd){var e=function(){b.wnd.focus();b.wnd.print();b.wnd.close()};mxClient.IS_GC?window.setTimeout(e,500):e()}}catch(k){}};
+PrintDialog.prototype.create=function(b){function e(F){var C=E.checked||g.checked,I=parseInt(q.value)/100;isNaN(I)&&(I=1,q.value="100%");I*=.75;var G=k.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,Z=1/k.pageScale;if(C){var ca=E.checked?1:parseInt(m.value);isNaN(ca)||(Z=mxUtils.getScaleForPageCount(ca,k,G))}k.getGraphBounds();var aa=ca=0;G=mxRectangle.fromRectangle(G);G.width=Math.ceil(G.width*I);G.height=Math.ceil(G.height*I);Z*=I;!C&&k.pageVisible?(I=k.getPageLayout(),ca-=I.x*G.width,aa-=I.y*
+G.height):C=!0;C=PrintDialog.createPrintPreview(k,Z,G,0,ca,aa,C);C.open();F&&PrintDialog.printPreview(C)}var k=b.editor.graph,n=document.createElement("table");n.style.width="100%";n.style.height="100%";var D=document.createElement("tbody");var t=document.createElement("tr");var E=document.createElement("input");E.setAttribute("type","checkbox");var d=document.createElement("td");d.setAttribute("colspan","2");d.style.fontSize="10pt";d.appendChild(E);var f=document.createElement("span");mxUtils.write(f,
+" "+mxResources.get("fitPage"));d.appendChild(f);mxEvent.addListener(f,"click",function(F){E.checked=!E.checked;g.checked=!E.checked;mxEvent.consume(F)});mxEvent.addListener(E,"change",function(){g.checked=!E.checked});t.appendChild(d);D.appendChild(t);t=t.cloneNode(!1);var g=document.createElement("input");g.setAttribute("type","checkbox");d=document.createElement("td");d.style.fontSize="10pt";d.appendChild(g);f=document.createElement("span");mxUtils.write(f," "+mxResources.get("posterPrint")+":");
+d.appendChild(f);mxEvent.addListener(f,"click",function(F){g.checked=!g.checked;E.checked=!g.checked;mxEvent.consume(F)});t.appendChild(d);var m=document.createElement("input");m.setAttribute("value","1");m.setAttribute("type","number");m.setAttribute("min","1");m.setAttribute("size","4");m.setAttribute("disabled","disabled");m.style.width="50px";d=document.createElement("td");d.style.fontSize="10pt";d.appendChild(m);mxUtils.write(d," "+mxResources.get("pages")+" (max)");t.appendChild(d);D.appendChild(t);
+mxEvent.addListener(g,"change",function(){g.checked?m.removeAttribute("disabled"):m.setAttribute("disabled","disabled");E.checked=!g.checked});t=t.cloneNode(!1);d=document.createElement("td");mxUtils.write(d,mxResources.get("pageScale")+":");t.appendChild(d);d=document.createElement("td");var q=document.createElement("input");q.setAttribute("value","100 %");q.setAttribute("size","5");q.style.width="50px";d.appendChild(q);t.appendChild(d);D.appendChild(t);t=document.createElement("tr");d=document.createElement("td");
+d.colSpan=2;d.style.paddingTop="20px";d.setAttribute("align","right");f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});f.className="geBtn";b.editor.cancelFirst&&d.appendChild(f);if(PrintDialog.previewEnabled){var y=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();e(!1)});y.className="geBtn";d.appendChild(y)}y=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();e(!0)});y.className="geBtn gePrimaryBtn";d.appendChild(y);
+b.editor.cancelFirst||d.appendChild(f);t.appendChild(d);D.appendChild(t);n.appendChild(D);this.container=n};PrintDialog.printPreview=function(b){try{if(null!=b.wnd){var e=function(){b.wnd.focus();b.wnd.print();b.wnd.close()};mxClient.IS_GC?window.setTimeout(e,500):e()}}catch(k){}};
PrintDialog.createPrintPreview=function(b,e,k,n,D,t,E){e=new mxPrintPreview(b,e,k,n,D,t);e.title=mxResources.get("preview");e.printBackgroundImage=!0;e.autoOrigin=E;b=b.background;if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";e.backgroundColor=b;var d=e.writeHead;e.writeHead=function(f){d.apply(this,arguments);f.writeln('<style type="text/css">');f.writeln("@media screen {");f.writeln(" body > div { padding:30px;box-sizing:content-box; }");f.writeln("}");f.writeln("</style>")};return e};
PrintDialog.previewEnabled=!0;
var PageSetupDialog=function(b){function e(){null==m||m==mxConstants.NONE?(g.style.backgroundColor="",g.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(g.style.backgroundColor=m,g.style.backgroundImage="")}function k(){var G=C;null!=G&&Graph.isPageLink(G.src)&&(G=b.createImageForPageLink(G.src,null));null!=G&&null!=G.src?(F.setAttribute("src",G.src),F.style.display=""):(F.removeAttribute("src"),F.style.display="none")}var n=b.editor.graph,D=document.createElement("table");D.style.width=
"100%";D.style.height="100%";var t=document.createElement("tbody");var E=document.createElement("tr");var d=document.createElement("td");d.style.verticalAlign="top";d.style.fontSize="10pt";mxUtils.write(d,mxResources.get("paperSize")+":");E.appendChild(d);d=document.createElement("td");d.style.verticalAlign="top";d.style.fontSize="10pt";var f=PageSetupDialog.addPageFormatPanel(d,"pagesetupdialog",n.pageFormat);E.appendChild(d);t.appendChild(E);E=document.createElement("tr");d=document.createElement("td");
mxUtils.write(d,mxResources.get("background")+":");E.appendChild(d);d=document.createElement("td");d.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var g=document.createElement("button");g.style.width="22px";g.style.height="22px";g.style.cursor="pointer";g.style.marginRight="20px";g.style.backgroundPosition="center center";g.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(g.style.position="relative",g.style.top="-6px");var m=n.background;e();mxEvent.addListener(g,
-"click",function(G){b.pickColor(m||"none",function(Y){m=Y;e()});mxEvent.consume(G)});d.appendChild(g);mxUtils.write(d,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=n.getGridSize();d.appendChild(q);mxEvent.addListener(q,"change",function(){var G=parseInt(q.value);q.value=Math.max(1,isNaN(G)?n.getGridSize():G)});E.appendChild(d);t.appendChild(E);E=document.createElement("tr");
+"click",function(G){b.pickColor(m||"none",function(Z){m=Z;e()});mxEvent.consume(G)});d.appendChild(g);mxUtils.write(d,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=n.getGridSize();d.appendChild(q);mxEvent.addListener(q,"change",function(){var G=parseInt(q.value);q.value=Math.max(1,isNaN(G)?n.getGridSize():G)});E.appendChild(d);t.appendChild(E);E=document.createElement("tr");
d=document.createElement("td");mxUtils.write(d,mxResources.get("image")+":");E.appendChild(d);d=document.createElement("td");var y=document.createElement("button");y.className="geBtn";y.style.margin="0px";mxUtils.write(y,mxResources.get("change")+"...");var F=document.createElement("img");F.setAttribute("valign","middle");F.style.verticalAlign="middle";F.style.border="1px solid lightGray";F.style.borderRadius="4px";F.style.marginRight="14px";F.style.maxWidth="100px";F.style.cursor="pointer";F.style.height=
-"60px";F.style.padding="4px";var C=n.backgroundImage,I=function(G){b.showBackgroundImageDialog(function(Y,ba){ba||(C=Y,k())},C);mxEvent.consume(G)};mxEvent.addListener(y,"click",I);mxEvent.addListener(F,"click",I);k();d.appendChild(F);d.appendChild(y);E.appendChild(d);t.appendChild(E);E=document.createElement("tr");d=document.createElement("td");d.colSpan=2;d.style.paddingTop="16px";d.setAttribute("align","right");y=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});y.className=
+"60px";F.style.padding="4px";var C=n.backgroundImage,I=function(G){b.showBackgroundImageDialog(function(Z,ca){ca||(C=Z,k())},C);mxEvent.consume(G)};mxEvent.addListener(y,"click",I);mxEvent.addListener(F,"click",I);k();d.appendChild(F);d.appendChild(y);E.appendChild(d);t.appendChild(E);E=document.createElement("tr");d=document.createElement("td");d.colSpan=2;d.style.paddingTop="16px";d.setAttribute("align","right");y=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});y.className=
"geBtn";b.editor.cancelFirst&&d.appendChild(y);I=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var G=parseInt(q.value);isNaN(G)||n.gridSize===G||n.setGridSize(G);G=new ChangePageSetup(b,m,C,f.get());G.ignoreColor=n.background==m;G.ignoreImage=(null!=n.backgroundImage?n.backgroundImage.src:null)===(null!=C?C.src:null);n.pageFormat.width==G.previousFormat.width&&n.pageFormat.height==G.previousFormat.height&&G.ignoreColor&&G.ignoreImage||n.model.execute(G)});I.className="geBtn gePrimaryBtn";
d.appendChild(I);b.editor.cancelFirst||d.appendChild(y);E.appendChild(d);t.appendChild(E);D.appendChild(t);this.container=D};
-PageSetupDialog.addPageFormatPanel=function(b,e,k,n){function D(qa,Q,W){if(W||q!=document.activeElement&&y!=document.activeElement){qa=!1;for(Q=0;Q<C.length;Q++)W=C[Q],ba?"custom"==W.key&&(d.value=W.key,ba=!1):null!=W.format&&("a4"==W.key?826==k.width?(k=mxRectangle.fromRectangle(k),k.width=827):826==k.height&&(k=mxRectangle.fromRectangle(k),k.height=827):"a5"==W.key&&(584==k.width?(k=mxRectangle.fromRectangle(k),k.width=583):584==k.height&&(k=mxRectangle.fromRectangle(k),k.height=583)),k.width==
-W.format.width&&k.height==W.format.height?(d.value=W.key,t.setAttribute("checked","checked"),t.defaultChecked=!0,t.checked=!0,E.removeAttribute("checked"),E.defaultChecked=!1,E.checked=!1,qa=!0):k.width==W.format.height&&k.height==W.format.width&&(d.value=W.key,t.removeAttribute("checked"),t.defaultChecked=!1,t.checked=!1,E.setAttribute("checked","checked"),E.defaultChecked=!0,qa=E.checked=!0));qa?(f.style.display="",m.style.display="none"):(q.value=k.width/100,y.value=k.height/100,t.setAttribute("checked",
+PageSetupDialog.addPageFormatPanel=function(b,e,k,n){function D(pa,Q,X){if(X||q!=document.activeElement&&y!=document.activeElement){pa=!1;for(Q=0;Q<C.length;Q++)X=C[Q],ca?"custom"==X.key&&(d.value=X.key,ca=!1):null!=X.format&&("a4"==X.key?826==k.width?(k=mxRectangle.fromRectangle(k),k.width=827):826==k.height&&(k=mxRectangle.fromRectangle(k),k.height=827):"a5"==X.key&&(584==k.width?(k=mxRectangle.fromRectangle(k),k.width=583):584==k.height&&(k=mxRectangle.fromRectangle(k),k.height=583)),k.width==
+X.format.width&&k.height==X.format.height?(d.value=X.key,t.setAttribute("checked","checked"),t.defaultChecked=!0,t.checked=!0,E.removeAttribute("checked"),E.defaultChecked=!1,E.checked=!1,pa=!0):k.width==X.format.height&&k.height==X.format.width&&(d.value=X.key,t.removeAttribute("checked"),t.defaultChecked=!1,t.checked=!1,E.setAttribute("checked","checked"),E.defaultChecked=!0,pa=E.checked=!0));pa?(f.style.display="",m.style.display="none"):(q.value=k.width/100,y.value=k.height/100,t.setAttribute("checked",
"checked"),d.value="custom",f.style.display="none",m.style.display="")}}e="format-"+e;var t=document.createElement("input");t.setAttribute("name",e);t.setAttribute("type","radio");t.setAttribute("value","portrait");var E=document.createElement("input");E.setAttribute("name",e);E.setAttribute("type","radio");E.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";t.style.marginRight="6px";f.appendChild(t);e=document.createElement("span");e.style.maxWidth="100px";mxUtils.write(e,mxResources.get("portrait"));f.appendChild(e);E.style.marginLeft="10px";E.style.marginRight="6px";f.appendChild(E);var g=document.createElement("span");g.style.width="100px";mxUtils.write(g,mxResources.get("landscape"));f.appendChild(g);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 y=document.createElement("input");y.setAttribute("size","7");y.style.textAlign="right";m.appendChild(y);mxUtils.write(m," in");f.style.display="none";m.style.display="none";for(var F={},C=PageSetupDialog.getFormats(),I=0;I<C.length;I++){var G=C[I];F[G.key]=G;var Y=document.createElement("option");Y.setAttribute("value",
-G.key);mxUtils.write(Y,G.title);d.appendChild(Y)}var ba=!1;D();b.appendChild(d);mxUtils.br(b);b.appendChild(f);b.appendChild(m);var Z=k,X=function(qa,Q){qa=F[d.value];null!=qa.format?(q.value=qa.format.width/100,y.value=qa.format.height/100,m.style.display="none",f.style.display=""):(f.style.display="none",m.style.display="");qa=parseFloat(q.value);if(isNaN(qa)||0>=qa)q.value=k.width/100;qa=parseFloat(y.value);if(isNaN(qa)||0>=qa)y.value=k.height/100;qa=new mxRectangle(0,0,Math.floor(100*parseFloat(q.value)),
-Math.floor(100*parseFloat(y.value)));"custom"!=d.value&&E.checked&&(qa=new mxRectangle(0,0,qa.height,qa.width));Q&&ba||qa.width==Z.width&&qa.height==Z.height||(Z=qa,null!=n&&n(Z))};mxEvent.addListener(e,"click",function(qa){t.checked=!0;X(qa);mxEvent.consume(qa)});mxEvent.addListener(g,"click",function(qa){E.checked=!0;X(qa);mxEvent.consume(qa)});mxEvent.addListener(q,"blur",X);mxEvent.addListener(q,"click",X);mxEvent.addListener(y,"blur",X);mxEvent.addListener(y,"click",X);mxEvent.addListener(E,
-"change",X);mxEvent.addListener(t,"change",X);mxEvent.addListener(d,"change",function(qa){ba="custom"==d.value;X(qa,!0)});X();return{set:function(qa){k=qa;D(null,null,!0)},get:function(){return Z},widthInput:q,heightInput:y}};
+"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 y=document.createElement("input");y.setAttribute("size","7");y.style.textAlign="right";m.appendChild(y);mxUtils.write(m," in");f.style.display="none";m.style.display="none";for(var F={},C=PageSetupDialog.getFormats(),I=0;I<C.length;I++){var G=C[I];F[G.key]=G;var Z=document.createElement("option");Z.setAttribute("value",
+G.key);mxUtils.write(Z,G.title);d.appendChild(Z)}var ca=!1;D();b.appendChild(d);mxUtils.br(b);b.appendChild(f);b.appendChild(m);var aa=k,Y=function(pa,Q){pa=F[d.value];null!=pa.format?(q.value=pa.format.width/100,y.value=pa.format.height/100,m.style.display="none",f.style.display=""):(f.style.display="none",m.style.display="");pa=parseFloat(q.value);if(isNaN(pa)||0>=pa)q.value=k.width/100;pa=parseFloat(y.value);if(isNaN(pa)||0>=pa)y.value=k.height/100;pa=new mxRectangle(0,0,Math.floor(100*parseFloat(q.value)),
+Math.floor(100*parseFloat(y.value)));"custom"!=d.value&&E.checked&&(pa=new mxRectangle(0,0,pa.height,pa.width));Q&&ca||pa.width==aa.width&&pa.height==aa.height||(aa=pa,null!=n&&n(aa))};mxEvent.addListener(e,"click",function(pa){t.checked=!0;Y(pa);mxEvent.consume(pa)});mxEvent.addListener(g,"click",function(pa){E.checked=!0;Y(pa);mxEvent.consume(pa)});mxEvent.addListener(q,"blur",Y);mxEvent.addListener(q,"click",Y);mxEvent.addListener(y,"blur",Y);mxEvent.addListener(y,"click",Y);mxEvent.addListener(E,
+"change",Y);mxEvent.addListener(t,"change",Y);mxEvent.addListener(d,"change",function(pa){ca="custom"==d.value;Y(pa,!0)});Y();return{set:function(pa){k=pa;D(null,null,!0)},get:function(){return aa},widthInput:q,heightInput:y}};
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,e,k,n,D,t,E,d,f,g,m,q,y){f=null!=f?f:!0;var F=document.createElement("table"),C=document.createElement("tbody");F.style.position="absolute";F.style.top="30px";F.style.left="20px";var I=document.createElement("tr");var G=document.createElement("td");G.style.textOverflow="ellipsis";G.style.textAlign="right";G.style.maxWidth=(y?y+15:100)+"px";G.style.fontSize="10pt";G.style.width=(y?y:84)+"px";mxUtils.write(G,(D||mxResources.get("filename"))+":");I.appendChild(G);var Y=
-document.createElement("input");Y.setAttribute("value",e||"");Y.style.marginLeft="4px";Y.style.width=null!=q?q+"px":"180px";var ba=mxUtils.button(k,function(){if(null==t||t(Y.value))f&&b.hideDialog(),n(Y.value)});ba.className="geBtn gePrimaryBtn";this.init=function(){if(null!=D||null==E)if(Y.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?Y.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var Z=F.parentNode;if(null!=Z){var X=null;mxEvent.addListener(Z,"dragleave",
-function(qa){null!=X&&(X.style.backgroundColor="",X=null);qa.stopPropagation();qa.preventDefault()});mxEvent.addListener(Z,"dragover",mxUtils.bind(this,function(qa){null==X&&(!mxClient.IS_IE||10<document.documentMode)&&(X=Y,X.style.backgroundColor="#ebf2f9");qa.stopPropagation();qa.preventDefault()}));mxEvent.addListener(Z,"drop",mxUtils.bind(this,function(qa){null!=X&&(X.style.backgroundColor="",X=null);0<=mxUtils.indexOf(qa.dataTransfer.types,"text/uri-list")&&(Y.value=decodeURIComponent(qa.dataTransfer.getData("text/uri-list")),
-ba.click());qa.stopPropagation();qa.preventDefault()}))}}};G=document.createElement("td");G.style.whiteSpace="nowrap";G.appendChild(Y);I.appendChild(G);if(null!=D||null==E)C.appendChild(I),null!=m&&(G.appendChild(FilenameDialog.createTypeHint(b,Y,m)),null!=b.editor.diagramFileTypes&&(I=document.createElement("tr"),G=document.createElement("td"),G.style.textOverflow="ellipsis",G.style.textAlign="right",G.style.maxWidth="100px",G.style.fontSize="10pt",G.style.width="84px",mxUtils.write(G,mxResources.get("type")+
-":"),I.appendChild(G),G=document.createElement("td"),G.style.whiteSpace="nowrap",I.appendChild(G),e=FilenameDialog.createFileTypes(b,Y,b.editor.diagramFileTypes),e.style.marginLeft="4px",e.style.width="198px",G.appendChild(e),Y.style.width=null!=q?q-40+"px":"190px",I.appendChild(G),C.appendChild(I)));null!=E&&(I=document.createElement("tr"),G=document.createElement("td"),G.colSpan=2,G.appendChild(E),I.appendChild(G),C.appendChild(I));I=document.createElement("tr");G=document.createElement("td");G.colSpan=
-2;G.style.paddingTop=null!=m?"12px":"20px";G.style.whiteSpace="nowrap";G.setAttribute("align","right");m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=g&&g()});m.className="geBtn";b.editor.cancelFirst&&G.appendChild(m);null!=d&&(q=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(d)}),q.className="geBtn",G.appendChild(q));mxEvent.addListener(Y,"keypress",function(Z){13==Z.keyCode&&ba.click()});G.appendChild(ba);b.editor.cancelFirst||G.appendChild(m);
+var FilenameDialog=function(b,e,k,n,D,t,E,d,f,g,m,q,y){f=null!=f?f:!0;var F=document.createElement("table"),C=document.createElement("tbody");F.style.position="absolute";F.style.top="30px";F.style.left="20px";var I=document.createElement("tr");var G=document.createElement("td");G.style.textOverflow="ellipsis";G.style.textAlign="right";G.style.maxWidth=(y?y+15:100)+"px";G.style.fontSize="10pt";G.style.width=(y?y:84)+"px";mxUtils.write(G,(D||mxResources.get("filename"))+":");I.appendChild(G);var Z=
+document.createElement("input");Z.setAttribute("value",e||"");Z.style.marginLeft="4px";Z.style.width=null!=q?q+"px":"180px";var ca=mxUtils.button(k,function(){if(null==t||t(Z.value))f&&b.hideDialog(),n(Z.value)});ca.className="geBtn gePrimaryBtn";this.init=function(){if(null!=D||null==E)if(Z.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?Z.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var aa=F.parentNode;if(null!=aa){var Y=null;mxEvent.addListener(aa,"dragleave",
+function(pa){null!=Y&&(Y.style.backgroundColor="",Y=null);pa.stopPropagation();pa.preventDefault()});mxEvent.addListener(aa,"dragover",mxUtils.bind(this,function(pa){null==Y&&(!mxClient.IS_IE||10<document.documentMode)&&(Y=Z,Y.style.backgroundColor="#ebf2f9");pa.stopPropagation();pa.preventDefault()}));mxEvent.addListener(aa,"drop",mxUtils.bind(this,function(pa){null!=Y&&(Y.style.backgroundColor="",Y=null);0<=mxUtils.indexOf(pa.dataTransfer.types,"text/uri-list")&&(Z.value=decodeURIComponent(pa.dataTransfer.getData("text/uri-list")),
+ca.click());pa.stopPropagation();pa.preventDefault()}))}}};G=document.createElement("td");G.style.whiteSpace="nowrap";G.appendChild(Z);I.appendChild(G);if(null!=D||null==E)C.appendChild(I),null!=m&&(G.appendChild(FilenameDialog.createTypeHint(b,Z,m)),null!=b.editor.diagramFileTypes&&(I=document.createElement("tr"),G=document.createElement("td"),G.style.textOverflow="ellipsis",G.style.textAlign="right",G.style.maxWidth="100px",G.style.fontSize="10pt",G.style.width="84px",mxUtils.write(G,mxResources.get("type")+
+":"),I.appendChild(G),G=document.createElement("td"),G.style.whiteSpace="nowrap",I.appendChild(G),e=FilenameDialog.createFileTypes(b,Z,b.editor.diagramFileTypes),e.style.marginLeft="4px",e.style.width="198px",G.appendChild(e),Z.style.width=null!=q?q-40+"px":"190px",I.appendChild(G),C.appendChild(I)));null!=E&&(I=document.createElement("tr"),G=document.createElement("td"),G.colSpan=2,G.appendChild(E),I.appendChild(G),C.appendChild(I));I=document.createElement("tr");G=document.createElement("td");G.colSpan=
+2;G.style.paddingTop=null!=m?"12px":"20px";G.style.whiteSpace="nowrap";G.setAttribute("align","right");m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=g&&g()});m.className="geBtn";b.editor.cancelFirst&&G.appendChild(m);null!=d&&(q=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(d)}),q.className="geBtn",G.appendChild(q));mxEvent.addListener(Z,"keypress",function(aa){13==aa.keyCode&&ca.click()});G.appendChild(ca);b.editor.cancelFirst||G.appendChild(m);
I.appendChild(G);C.appendChild(I);F.appendChild(C);this.container=F};FilenameDialog.filenameHelpLink=null;
FilenameDialog.createTypeHint=function(b,e,k){var n=document.createElement("img");n.style.backgroundPosition="center bottom";n.style.backgroundRepeat="no-repeat";n.style.margin="2px 0 0 4px";n.style.verticalAlign="top";n.style.cursor="pointer";n.style.height="16px";n.style.width="16px";mxUtils.setOpacity(n,70);var D=function(){n.setAttribute("src",Editor.helpImage);n.setAttribute("title",mxResources.get("help"));for(var t=0;t<k.length;t++)if(0<k[t].ext.length&&e.value.toLowerCase().substring(e.value.length-
k[t].ext.length-1)=="."+k[t].ext){n.setAttribute("title",mxResources.get(k[t].title));break}};mxEvent.addListener(e,"keyup",D);mxEvent.addListener(e,"change",D);mxEvent.addListener(n,"click",function(t){var E=n.getAttribute("title");n.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(t)});
@@ -2053,39 +2053,39 @@ mxGraphView.prototype.validateBackgroundStyles=function(){var E=this.graph,d=nul
E.defaultPageBorderColor,E.container.className="geDiagramContainer geDiagramBackdrop",f.style.backgroundImage="none",f.style.backgroundColor=""):(E.container.className="geDiagramContainer",f.style.backgroundPosition=m,f.style.backgroundColor=d,f.style.backgroundImage=g)};mxGraphView.prototype.createSvgGrid=function(E){for(var d=this.graph.gridSize*this.scale;d<this.minGridSize;)d*=2;for(var f=this.gridSteps*d,g=[],m=1;m<this.gridSteps;m++){var q=m*d;g.push("M 0 "+q+" L "+f+" "+q+" M "+q+" 0 L "+q+
" "+f)}return'<svg width="'+f+'" height="'+f+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+f+'" height="'+f+'" patternUnits="userSpaceOnUse"><path d="'+g.join(" ")+'" fill="none" stroke="'+E+'" opacity="0.2" stroke-width="1"/><path d="M '+f+" 0 L 0 0 0 "+f+'" fill="none" stroke="'+E+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(E,d){b.apply(this,arguments);
if(null!=this.shiftPreview1){var f=this.view.canvas;null!=f.ownerSVGElement&&(f=f.ownerSVGElement);var g=this.gridSize*this.view.scale*this.view.gridSteps;g=-Math.round(g-mxUtils.mod(this.view.translate.x*this.view.scale+E,g))+"px "+-Math.round(g-mxUtils.mod(this.view.translate.y*this.view.scale+d,g))+"px";f.style.backgroundPosition=g}};mxGraph.prototype.updatePageBreaks=function(E,d,f){var g=this.view.scale,m=this.view.translate,q=this.pageFormat,y=g*this.pageScale,F=this.view.getBackgroundPageBounds();
-d=F.width;f=F.height;var C=new mxRectangle(g*m.x,g*m.y,q.width*y,q.height*y),I=(E=E&&Math.min(C.width,C.height)>this.minPageBreakDist)?Math.ceil(f/C.height)-1:0,G=E?Math.ceil(d/C.width)-1:0,Y=F.x+d,ba=F.y+f;null==this.horizontalPageBreaks&&0<I&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<G&&(this.verticalPageBreaks=[]);E=mxUtils.bind(this,function(Z){if(null!=Z){for(var X=Z==this.horizontalPageBreaks?I:G,qa=0;qa<=X;qa++){var Q=Z==this.horizontalPageBreaks?[new mxPoint(Math.round(F.x),
-Math.round(F.y+(qa+1)*C.height)),new mxPoint(Math.round(Y),Math.round(F.y+(qa+1)*C.height))]:[new mxPoint(Math.round(F.x+(qa+1)*C.width),Math.round(F.y)),new mxPoint(Math.round(F.x+(qa+1)*C.width),Math.round(ba))];null!=Z[qa]?(Z[qa].points=Q,Z[qa].redraw()):(Q=new mxPolyline(Q,this.pageBreakColor),Q.dialect=this.dialect,Q.isDashed=this.pageBreakDashed,Q.pointerEvents=!1,Q.init(this.view.backgroundPane),Q.redraw(),Z[qa]=Q)}for(qa=X;qa<Z.length;qa++)Z[qa].destroy();Z.splice(X,Z.length-X)}});E(this.horizontalPageBreaks);
-E(this.verticalPageBreaks)};var e=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(E,d,f){for(var g=0;g<d.length;g++){if(this.graph.isTableCell(d[g])||this.graph.isTableRow(d[g]))return!1;if(this.graph.getModel().isVertex(d[g])){var m=this.graph.getCellGeometry(d[g]);if(null!=m&&m.relative)return!1}}return e.apply(this,arguments)};var k=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var E=
-k.apply(this,arguments);E.intersects=mxUtils.bind(this,function(d,f){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(E,arguments)});return E};mxGraphView.prototype.createBackgroundPageShape=function(E){return new mxRectangleShape(E,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var E=this.getGraphBounds(),d=0<E.width?E.x/this.scale-this.translate.x:0,f=0<E.height?E.y/this.scale-this.translate.y:0,g=this.graph.pageFormat,
+d=F.width;f=F.height;var C=new mxRectangle(g*m.x,g*m.y,q.width*y,q.height*y),I=(E=E&&Math.min(C.width,C.height)>this.minPageBreakDist)?Math.ceil(f/C.height)-1:0,G=E?Math.ceil(d/C.width)-1:0,Z=F.x+d,ca=F.y+f;null==this.horizontalPageBreaks&&0<I&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<G&&(this.verticalPageBreaks=[]);E=mxUtils.bind(this,function(aa){if(null!=aa){for(var Y=aa==this.horizontalPageBreaks?I:G,pa=0;pa<=Y;pa++){var Q=aa==this.horizontalPageBreaks?[new mxPoint(Math.round(F.x),
+Math.round(F.y+(pa+1)*C.height)),new mxPoint(Math.round(Z),Math.round(F.y+(pa+1)*C.height))]:[new mxPoint(Math.round(F.x+(pa+1)*C.width),Math.round(F.y)),new mxPoint(Math.round(F.x+(pa+1)*C.width),Math.round(ca))];null!=aa[pa]?(aa[pa].points=Q,aa[pa].redraw()):(Q=new mxPolyline(Q,this.pageBreakColor),Q.dialect=this.dialect,Q.isDashed=this.pageBreakDashed,Q.pointerEvents=!1,Q.init(this.view.backgroundPane),Q.redraw(),aa[pa]=Q)}for(pa=Y;pa<aa.length;pa++)aa[pa].destroy();aa.splice(Y,aa.length-Y)}});
+E(this.horizontalPageBreaks);E(this.verticalPageBreaks)};var e=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(E,d,f){for(var g=0;g<d.length;g++){if(this.graph.isTableCell(d[g])||this.graph.isTableRow(d[g]))return!1;if(this.graph.getModel().isVertex(d[g])){var m=this.graph.getCellGeometry(d[g]);if(null!=m&&m.relative)return!1}}return e.apply(this,arguments)};var k=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=
+function(){var E=k.apply(this,arguments);E.intersects=mxUtils.bind(this,function(d,f){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(E,arguments)});return E};mxGraphView.prototype.createBackgroundPageShape=function(E){return new mxRectangleShape(E,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var E=this.getGraphBounds(),d=0<E.width?E.x/this.scale-this.translate.x:0,f=0<E.height?E.y/this.scale-this.translate.y:0,g=this.graph.pageFormat,
m=this.graph.pageScale,q=g.width*m;g=g.height*m;m=Math.floor(Math.min(0,d)/q);var y=Math.floor(Math.min(0,f)/g);return new mxRectangle(this.scale*(this.translate.x+m*q),this.scale*(this.translate.y+y*g),this.scale*(Math.ceil(Math.max(1,d+E.width/this.scale)/q)-m)*q,this.scale*(Math.ceil(Math.max(1,f+E.height/this.scale)/g)-y)*g)};var n=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(E,d){n.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=E+"px",this.view.backgroundPageShape.node.style.marginTop=d+"px")};var D=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(E,d,f,g,m,q){var y=D.apply(this,arguments);null==q||q||mxEvent.addListener(y,"mousedown",function(F){mxEvent.consume(F)});return y};var t=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
function(E,d,f){var g=this.graph.model.getParent(E);if(d){var m=this.graph.model.isEdge(E)?null:this.graph.getCellGeometry(E);m=!this.graph.model.isEdge(g)&&!this.graph.isSiblingSelected(E)&&(null!=m&&m.relative||!this.graph.isContainer(g)||this.graph.isPart(E))}else if(m=t.apply(this,arguments),this.graph.isTableCell(E)||this.graph.isTableRow(E))m=g,this.graph.isTable(m)||(m=this.graph.model.getParent(m)),m=!this.graph.selectionCellsHandler.isHandled(m)||this.graph.isCellSelected(m)&&this.graph.isToggleEvent(f.getEvent())||
-this.graph.isCellSelected(E)&&!this.graph.isToggleEvent(f.getEvent())||this.graph.isTableCell(E)&&this.graph.isCellSelected(g);return m};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(E){E=E.getCell();for(var d=this.graph.getModel(),f=d.getParent(E),g=this.graph.view.getState(f),m=this.graph.isCellSelected(E);null!=g&&(d.isVertex(f)||d.isEdge(f));){var q=this.graph.isCellSelected(f);m=m||q;if(q||!m&&(this.graph.isTableCell(E)||this.graph.isTableRow(E)))E=f;f=d.getParent(f)}return E}})();EditorUi=function(b,e,k){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var n=this.editor.graph;n.lightbox=k;var D=n.getGraphBounds;n.getGraphBounds=function(){var O=D.apply(this,arguments),N=this.backgroundImage;if(null!=N&&null!=N.width&&null!=N.height){var aa=this.view.translate,ma=this.view.scale;O=mxRectangle.fromRectangle(O);O.add(new mxRectangle((aa.x+N.x)*ma,(aa.y+N.y)*ma,N.width*ma,N.height*ma))}return O};n.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.selectionStateListener=mxUtils.bind(this,function(O,N){this.clearSelectionState()});n.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);
-n.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);n.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);n.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);n.getView().addListener("unitChanged",this.selectionStateListener);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,n.isEnabled=function(){return!1},n.panningHandler.isForcePanningEvent=function(O){return!mxEvent.isPopupTrigger(O.getEvent())});this.actions=new Actions(this);this.menus=
+this.graph.isCellSelected(E)&&!this.graph.isToggleEvent(f.getEvent())||this.graph.isTableCell(E)&&this.graph.isCellSelected(g);return m};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(E){E=E.getCell();for(var d=this.graph.getModel(),f=d.getParent(E),g=this.graph.view.getState(f),m=this.graph.isCellSelected(E);null!=g&&(d.isVertex(f)||d.isEdge(f));){var q=this.graph.isCellSelected(f);m=m||q;if(q||!m&&(this.graph.isTableCell(E)||this.graph.isTableRow(E)))E=f;f=d.getParent(f)}return E}})();EditorUi=function(b,e,k){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var n=this.editor.graph;n.lightbox=k;var D=n.getGraphBounds;n.getGraphBounds=function(){var N=D.apply(this,arguments),O=this.backgroundImage;if(null!=O&&null!=O.width&&null!=O.height){var ba=this.view.translate,la=this.view.scale;N=mxRectangle.fromRectangle(N);N.add(new mxRectangle((ba.x+O.x)*la,(ba.y+O.y)*la,O.width*la,O.height*la))}return N};n.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.selectionStateListener=mxUtils.bind(this,function(N,O){this.clearSelectionState()});n.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);
+n.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);n.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);n.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);n.getView().addListener("unitChanged",this.selectionStateListener);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,n.isEnabled=function(){return!1},n.panningHandler.isForcePanningEvent=function(N){return!mxEvent.isPopupTrigger(N.getEvent())});this.actions=new Actions(this);this.menus=
this.createMenus();if(!n.standalone){var t="rounded shadow glass dashed dashPattern labelBackgroundColor labelBorderColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents".split(" "),E="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" "),
-d="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" "),f=!1,g=!1;this.setDefaultStyle=function(O){try{var N=n.getCellStyle(O,!1),aa=[],ma=[],u;for(u in N)aa.push(N[u]),ma.push(u);n.getModel().isEdge(O)?n.currentEdgeStyle={}:n.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",ma,"values",aa,"cells",[O]));n.getModel().isEdge(O)?g=!0:f=!0}catch(H){this.handleError(H)}};this.clearDefaultStyle=function(){n.currentEdgeStyle=
+d="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" "),f=!1,g=!1;this.setDefaultStyle=function(N){try{var O=n.getCellStyle(N,!1),ba=[],la=[],u;for(u in O)ba.push(O[u]),la.push(u);n.getModel().isEdge(N)?n.currentEdgeStyle={}:n.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",la,"values",ba,"cells",[N]));n.getModel().isEdge(N)?g=!0:f=!0}catch(H){this.handleError(H)}};this.clearDefaultStyle=function(){n.currentEdgeStyle=
mxUtils.clone(n.defaultEdgeStyle);n.currentVertexStyle=mxUtils.clone(n.defaultVertexStyle);f=g=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var m=["fontFamily","fontSource","fontSize","fontColor"];for(e=0;e<m.length;e++)0>mxUtils.indexOf(t,m[e])&&t.push(m[e]);var q="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),y=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],
-["strokeColor","strokeWidth"],["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(e=0;e<y.length;e++)for(k=0;k<y[e].length;k++)t.push(y[e][k]);for(e=0;e<E.length;e++)0>mxUtils.indexOf(t,E[e])&&t.push(E[e]);var F=function(O,N,aa,ma,u,H,P){ma=null!=ma?ma:n.currentVertexStyle;u=null!=u?u:n.currentEdgeStyle;H=null!=H?H:!0;aa=null!=aa?aa:n.getModel();if(P){P=[];for(var S=0;S<O.length;S++)P=P.concat(aa.getDescendants(O[S]));O=P}aa.beginUpdate();try{for(S=0;S<O.length;S++){var R=
-O[S];if(N)var ca=["fontSize","fontFamily","fontColor"];else{var ea=aa.getStyle(R),fa=null!=ea?ea.split(";"):[];ca=t.slice();for(var ra=0;ra<fa.length;ra++){var ua=fa[ra],sa=ua.indexOf("=");if(0<=sa){var Aa=ua.substring(0,sa),Ca=mxUtils.indexOf(ca,Aa);0<=Ca&&ca.splice(Ca,1);for(P=0;P<y.length;P++){var Ba=y[P];if(0<=mxUtils.indexOf(Ba,Aa))for(var ta=0;ta<Ba.length;ta++){var Pa=mxUtils.indexOf(ca,Ba[ta]);0<=Pa&&ca.splice(Pa,1)}}}}}var Ta=aa.isEdge(R);P=Ta?u:ma;var Oa=aa.getStyle(R);for(ra=0;ra<ca.length;ra++){Aa=
-ca[ra];var Xa=P[Aa];null!=Xa&&"edgeStyle"!=Aa&&("shape"!=Aa||Ta)&&(!Ta||H||0>mxUtils.indexOf(d,Aa))&&(Oa=mxUtils.setStyle(Oa,Aa,Xa))}Editor.simpleLabels&&(Oa=mxUtils.setStyle(mxUtils.setStyle(Oa,"html",null),"whiteSpace",null));aa.setStyle(R,Oa)}}finally{aa.endUpdate()}return O};n.addListener("cellsInserted",function(O,N){F(N.getProperty("cells"),null,null,null,null,!0,!0)});n.addListener("textInserted",function(O,N){F(N.getProperty("cells"),!0)});this.insertHandler=F;this.createDivs();this.createUi();
-this.refresh();var C=mxUtils.bind(this,function(O){null==O&&(O=window.event);return n.isEditing()||null!=O&&this.isSelectionAllowed(O)});this.container==document.body&&(this.menubarContainer.onselectstart=C,this.menubarContainer.onmousedown=C,this.toolbarContainer.onselectstart=C,this.toolbarContainer.onmousedown=C,this.diagramContainer.onselectstart=C,this.diagramContainer.onmousedown=C,this.sidebarContainer.onselectstart=C,this.sidebarContainer.onmousedown=C,this.formatContainer.onselectstart=C,
-this.formatContainer.onmousedown=C,this.footerContainer.onselectstart=C,this.footerContainer.onmousedown=C,null!=this.tabContainer&&(this.tabContainer.onselectstart=C));!this.editor.chromeless||this.editor.editable?(e=function(O){if(null!=O){var N=mxEvent.getSource(O);if("A"==N.nodeName)for(;null!=N;){if("geHint"==N.className)return!0;N=N.parentNode}}return C(O)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",
-e):this.diagramContainer.oncontextmenu=e):n.panningHandler.usePopupTrigger=!1;n.init(this.diagramContainer);mxClient.IS_SVG&&null!=n.view.getDrawPane()&&(e=n.view.getDrawPane().ownerSVGElement,null!=e&&(e.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=n.graphHandler){var I=n.graphHandler.start;n.graphHandler.start=function(){null!=ja.hoverIcons&&ja.hoverIcons.reset();I.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(O){var N=
-mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(O)-N.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(O)-N.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var G=!1,Y=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(O,N){return G||Y.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(O){32!=O.which||n.isEditing()?mxEvent.isConsumed(O)||
-27!=O.keyCode||this.hideDialog(null,!0):(G=!0,this.hoverIcons.reset(),n.container.style.cursor="move",n.isEditing()||mxEvent.getSource(O)!=n.container||mxEvent.consume(O))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(O){n.container.style.cursor="";G=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var ba=n.panningHandler.isForcePanningEvent;n.panningHandler.isForcePanningEvent=function(O){return ba.apply(this,arguments)||G||
-mxEvent.isMouseEvent(O.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(O.getEvent()))&&(!mxEvent.isControlDown(O.getEvent())&&mxEvent.isRightMouseButton(O.getEvent())||mxEvent.isMiddleMouseButton(O.getEvent()))};var Z=n.cellEditor.isStopEditingEvent;n.cellEditor.isStopEditingEvent=function(O){return Z.apply(this,arguments)||13==O.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(O)||mxClient.IS_MAC&&mxEvent.isMetaDown(O)||mxClient.IS_SF&&mxEvent.isShiftDown(O))};var X=n.isZoomWheelEvent;
-n.isZoomWheelEvent=function(){return G||X.apply(this,arguments)};var qa=!1,Q=null,W=null,ha=null,la=mxUtils.bind(this,function(){if(null!=this.toolbar&&qa!=n.cellEditor.isContentEditing()){for(var O=this.toolbar.container.firstChild,N=[];null!=O;){var aa=O.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,O)&&(O.parentNode.removeChild(O),N.push(O));O=aa}O=this.toolbar.fontMenu;aa=this.toolbar.sizeMenu;if(null==ha)this.toolbar.createTextToolbar();else{for(var ma=0;ma<ha.length;ma++)this.toolbar.container.appendChild(ha[ma]);
-this.toolbar.fontMenu=Q;this.toolbar.sizeMenu=W}qa=n.cellEditor.isContentEditing();Q=O;W=aa;ha=N}}),ja=this,U=n.cellEditor.startEditing;n.cellEditor.startEditing=function(){U.apply(this,arguments);la();if(n.cellEditor.isContentEditing()){var O=!1,N=function(){O||(O=!0,window.setTimeout(function(){var aa=n.getSelectedEditingElement();null!=aa&&(aa=mxUtils.getCurrentStyle(aa),null!=aa&&null!=ja.toolbar&&(ja.toolbar.setFontName(Graph.stripQuotes(aa.fontFamily)),ja.toolbar.setFontSize(parseInt(aa.fontSize))));
-O=!1},0))};mxEvent.addListener(n.cellEditor.textarea,"input",N);mxEvent.addListener(n.cellEditor.textarea,"touchend",N);mxEvent.addListener(n.cellEditor.textarea,"mouseup",N);mxEvent.addListener(n.cellEditor.textarea,"keyup",N);N()}};var L=n.cellEditor.stopEditing;n.cellEditor.stopEditing=function(O,N){try{L.apply(this,arguments),la()}catch(aa){ja.handleError(aa)}};n.container.setAttribute("tabindex","0");n.container.style.cursor="default";if(window.self===window.top&&null!=n.container.parentNode)try{n.container.focus()}catch(O){}var da=
-n.fireMouseEvent;n.fireMouseEvent=function(O,N,aa){O==mxEvent.MOUSE_DOWN&&this.container.focus();da.apply(this,arguments)};n.popupMenuHandler.autoExpand=!0;null!=this.menus&&(n.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(O,N,aa){this.menus.createPopupMenu(O,N,aa)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(O){n.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};n.connectionHandler.addListener(mxEvent.CONNECT,
-function(O,N){var aa=[N.getProperty("cell")];N.getProperty("terminalInserted")&&(aa.push(N.getProperty("terminal")),window.setTimeout(function(){null!=ja.hoverIcons&&ja.hoverIcons.update(n.view.getState(aa[aa.length-1]))},0));F(aa)});this.addListener("styleChanged",mxUtils.bind(this,function(O,N){var aa=N.getProperty("cells"),ma=O=!1;if(0<aa.length)for(var u=0;u<aa.length&&(O=n.getModel().isVertex(aa[u])||O,!(ma=n.getModel().isEdge(aa[u])||ma)||!O);u++);else ma=O=!0;O=O&&!f;ma=ma&&!g;aa=N.getProperty("keys");
-N=N.getProperty("values");for(u=0;u<aa.length;u++){var H=0<=mxUtils.indexOf(m,aa[u]);if("strokeColor"!=aa[u]||null!=N[u]&&"none"!=N[u])if(0<=mxUtils.indexOf(E,aa[u]))ma||0<=mxUtils.indexOf(q,aa[u])?null==N[u]?delete n.currentEdgeStyle[aa[u]]:n.currentEdgeStyle[aa[u]]=N[u]:O&&0<=mxUtils.indexOf(t,aa[u])&&(null==N[u]?delete n.currentVertexStyle[aa[u]]:n.currentVertexStyle[aa[u]]=N[u]);else if(0<=mxUtils.indexOf(t,aa[u])){if(O||H)null==N[u]?delete n.currentVertexStyle[aa[u]]:n.currentVertexStyle[aa[u]]=
-N[u];if(ma||H||0<=mxUtils.indexOf(q,aa[u]))null==N[u]?delete n.currentEdgeStyle[aa[u]]:n.currentEdgeStyle[aa[u]]=N[u]}}null!=this.toolbar&&(this.toolbar.setFontName(n.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(n.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==n.currentEdgeStyle.edgeStyle&&"1"==n.currentEdgeStyle.curved?
+["strokeColor","strokeWidth"],["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(e=0;e<y.length;e++)for(k=0;k<y[e].length;k++)t.push(y[e][k]);for(e=0;e<E.length;e++)0>mxUtils.indexOf(t,E[e])&&t.push(E[e]);var F=function(N,O,ba,la,u,H,P){la=null!=la?la:n.currentVertexStyle;u=null!=u?u:n.currentEdgeStyle;H=null!=H?H:!0;ba=null!=ba?ba:n.getModel();if(P){P=[];for(var W=0;W<N.length;W++)P=P.concat(ba.getDescendants(N[W]));N=P}ba.beginUpdate();try{for(W=0;W<N.length;W++){var R=
+N[W];if(O)var da=["fontSize","fontFamily","fontColor"];else{var fa=ba.getStyle(R),ea=null!=fa?fa.split(";"):[];da=t.slice();for(var qa=0;qa<ea.length;qa++){var va=ea[qa],ua=va.indexOf("=");if(0<=ua){var Aa=va.substring(0,ua),za=mxUtils.indexOf(da,Aa);0<=za&&da.splice(za,1);for(P=0;P<y.length;P++){var Ca=y[P];if(0<=mxUtils.indexOf(Ca,Aa))for(var sa=0;sa<Ca.length;sa++){var Va=mxUtils.indexOf(da,Ca[sa]);0<=Va&&da.splice(Va,1)}}}}}var Ua=ba.isEdge(R);P=Ua?u:la;var Ra=ba.getStyle(R);for(qa=0;qa<da.length;qa++){Aa=
+da[qa];var Za=P[Aa];null!=Za&&"edgeStyle"!=Aa&&("shape"!=Aa||Ua)&&(!Ua||H||0>mxUtils.indexOf(d,Aa))&&(Ra=mxUtils.setStyle(Ra,Aa,Za))}Editor.simpleLabels&&(Ra=mxUtils.setStyle(mxUtils.setStyle(Ra,"html",null),"whiteSpace",null));ba.setStyle(R,Ra)}}finally{ba.endUpdate()}return N};n.addListener("cellsInserted",function(N,O){F(O.getProperty("cells"),null,null,null,null,!0,!0)});n.addListener("textInserted",function(N,O){F(O.getProperty("cells"),!0)});this.insertHandler=F;this.createDivs();this.createUi();
+this.refresh();var C=mxUtils.bind(this,function(N){null==N&&(N=window.event);return n.isEditing()||null!=N&&this.isSelectionAllowed(N)});this.container==document.body&&(this.menubarContainer.onselectstart=C,this.menubarContainer.onmousedown=C,this.toolbarContainer.onselectstart=C,this.toolbarContainer.onmousedown=C,this.diagramContainer.onselectstart=C,this.diagramContainer.onmousedown=C,this.sidebarContainer.onselectstart=C,this.sidebarContainer.onmousedown=C,this.formatContainer.onselectstart=C,
+this.formatContainer.onmousedown=C,this.footerContainer.onselectstart=C,this.footerContainer.onmousedown=C,null!=this.tabContainer&&(this.tabContainer.onselectstart=C));!this.editor.chromeless||this.editor.editable?(e=function(N){if(null!=N){var O=mxEvent.getSource(N);if("A"==O.nodeName)for(;null!=O;){if("geHint"==O.className)return!0;O=O.parentNode}}return C(N)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",
+e):this.diagramContainer.oncontextmenu=e):n.panningHandler.usePopupTrigger=!1;n.init(this.diagramContainer);mxClient.IS_SVG&&null!=n.view.getDrawPane()&&(e=n.view.getDrawPane().ownerSVGElement,null!=e&&(e.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=n.graphHandler){var I=n.graphHandler.start;n.graphHandler.start=function(){null!=ma.hoverIcons&&ma.hoverIcons.reset();I.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(N){var O=
+mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(N)-O.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(N)-O.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var G=!1,Z=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(N,O){return G||Z.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(N){32!=N.which||n.isEditing()?mxEvent.isConsumed(N)||
+27!=N.keyCode||this.hideDialog(null,!0):(G=!0,this.hoverIcons.reset(),n.container.style.cursor="move",n.isEditing()||mxEvent.getSource(N)!=n.container||mxEvent.consume(N))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(N){n.container.style.cursor="";G=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var ca=n.panningHandler.isForcePanningEvent;n.panningHandler.isForcePanningEvent=function(N){return ca.apply(this,arguments)||G||
+mxEvent.isMouseEvent(N.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(N.getEvent()))&&(!mxEvent.isControlDown(N.getEvent())&&mxEvent.isRightMouseButton(N.getEvent())||mxEvent.isMiddleMouseButton(N.getEvent()))};var aa=n.cellEditor.isStopEditingEvent;n.cellEditor.isStopEditingEvent=function(N){return aa.apply(this,arguments)||13==N.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(N)||mxClient.IS_MAC&&mxEvent.isMetaDown(N)||mxClient.IS_SF&&mxEvent.isShiftDown(N))};var Y=n.isZoomWheelEvent;
+n.isZoomWheelEvent=function(){return G||Y.apply(this,arguments)};var pa=!1,Q=null,X=null,ha=null,U=mxUtils.bind(this,function(){if(null!=this.toolbar&&pa!=n.cellEditor.isContentEditing()){for(var N=this.toolbar.container.firstChild,O=[];null!=N;){var ba=N.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,N)&&(N.parentNode.removeChild(N),O.push(N));N=ba}N=this.toolbar.fontMenu;ba=this.toolbar.sizeMenu;if(null==ha)this.toolbar.createTextToolbar();else{for(var la=0;la<ha.length;la++)this.toolbar.container.appendChild(ha[la]);
+this.toolbar.fontMenu=Q;this.toolbar.sizeMenu=X}pa=n.cellEditor.isContentEditing();Q=N;X=ba;ha=O}}),ma=this,T=n.cellEditor.startEditing;n.cellEditor.startEditing=function(){T.apply(this,arguments);U();if(n.cellEditor.isContentEditing()){var N=!1,O=function(){N||(N=!0,window.setTimeout(function(){var ba=n.getSelectedEditingElement();null!=ba&&(ba=mxUtils.getCurrentStyle(ba),null!=ba&&null!=ma.toolbar&&(ma.toolbar.setFontName(Graph.stripQuotes(ba.fontFamily)),ma.toolbar.setFontSize(parseInt(ba.fontSize))));
+N=!1},0))};mxEvent.addListener(n.cellEditor.textarea,"input",O);mxEvent.addListener(n.cellEditor.textarea,"touchend",O);mxEvent.addListener(n.cellEditor.textarea,"mouseup",O);mxEvent.addListener(n.cellEditor.textarea,"keyup",O);O()}};var M=n.cellEditor.stopEditing;n.cellEditor.stopEditing=function(N,O){try{M.apply(this,arguments),U()}catch(ba){ma.handleError(ba)}};n.container.setAttribute("tabindex","0");n.container.style.cursor="default";if(window.self===window.top&&null!=n.container.parentNode)try{n.container.focus()}catch(N){}var ia=
+n.fireMouseEvent;n.fireMouseEvent=function(N,O,ba){N==mxEvent.MOUSE_DOWN&&this.container.focus();ia.apply(this,arguments)};n.popupMenuHandler.autoExpand=!0;null!=this.menus&&(n.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(N,O,ba){this.menus.createPopupMenu(N,O,ba)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(N){n.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};n.connectionHandler.addListener(mxEvent.CONNECT,
+function(N,O){var ba=[O.getProperty("cell")];O.getProperty("terminalInserted")&&(ba.push(O.getProperty("terminal")),window.setTimeout(function(){null!=ma.hoverIcons&&ma.hoverIcons.update(n.view.getState(ba[ba.length-1]))},0));F(ba)});this.addListener("styleChanged",mxUtils.bind(this,function(N,O){var ba=O.getProperty("cells"),la=N=!1;if(0<ba.length)for(var u=0;u<ba.length&&(N=n.getModel().isVertex(ba[u])||N,!(la=n.getModel().isEdge(ba[u])||la)||!N);u++);else la=N=!0;N=N&&!f;la=la&&!g;ba=O.getProperty("keys");
+O=O.getProperty("values");for(u=0;u<ba.length;u++){var H=0<=mxUtils.indexOf(m,ba[u]);if("strokeColor"!=ba[u]||null!=O[u]&&"none"!=O[u])if(0<=mxUtils.indexOf(E,ba[u]))la||0<=mxUtils.indexOf(q,ba[u])?null==O[u]?delete n.currentEdgeStyle[ba[u]]:n.currentEdgeStyle[ba[u]]=O[u]:N&&0<=mxUtils.indexOf(t,ba[u])&&(null==O[u]?delete n.currentVertexStyle[ba[u]]:n.currentVertexStyle[ba[u]]=O[u]);else if(0<=mxUtils.indexOf(t,ba[u])){if(N||H)null==O[u]?delete n.currentVertexStyle[ba[u]]:n.currentVertexStyle[ba[u]]=
+O[u];if(la||H||0<=mxUtils.indexOf(q,ba[u]))null==O[u]?delete n.currentEdgeStyle[ba[u]]:n.currentEdgeStyle[ba[u]]=O[u]}}null!=this.toolbar&&(this.toolbar.setFontName(n.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(n.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==n.currentEdgeStyle.edgeStyle&&"1"==n.currentEdgeStyle.curved?
"geSprite geSprite-curved":"straight"==n.currentEdgeStyle.edgeStyle||"none"==n.currentEdgeStyle.edgeStyle||null==n.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==n.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==n.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==n.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==n.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==n.currentEdgeStyle.elbow?
-"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==n.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==n.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==n.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var O=n.currentVertexStyle.fontFamily||"Helvetica",
-N=String(n.currentVertexStyle.fontSize||"12"),aa=n.getView().getState(n.getSelectionCell());null!=aa&&(O=aa.style[mxConstants.STYLE_FONTFAMILY]||O,N=aa.style[mxConstants.STYLE_FONTSIZE]||N,10<O.length&&(O=O.substring(0,8)+"..."));this.toolbar.setFontName(O);this.toolbar.setFontSize(N)}),n.getSelectionModel().addListener(mxEvent.CHANGE,b),n.getModel().addListener(mxEvent.CHANGE,b));n.addListener(mxEvent.CELLS_ADDED,function(O,N){O=N.getProperty("cells");N=N.getProperty("parent");null!=N&&n.getModel().isLayer(N)&&
-!n.isCellVisible(N)&&null!=O&&0<O.length&&n.getModel().setVisible(N,!0)});this.gestureHandler=mxUtils.bind(this,function(O){null!=this.currentMenu&&mxEvent.getSource(O)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=
+"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==n.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==n.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==n.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var N=n.currentVertexStyle.fontFamily||"Helvetica",
+O=String(n.currentVertexStyle.fontSize||"12"),ba=n.getView().getState(n.getSelectionCell());null!=ba&&(N=ba.style[mxConstants.STYLE_FONTFAMILY]||N,O=ba.style[mxConstants.STYLE_FONTSIZE]||O,10<N.length&&(N=N.substring(0,8)+"..."));this.toolbar.setFontName(N);this.toolbar.setFontSize(O)}),n.getSelectionModel().addListener(mxEvent.CHANGE,b),n.getModel().addListener(mxEvent.CHANGE,b));n.addListener(mxEvent.CELLS_ADDED,function(N,O){N=O.getProperty("cells");O=O.getProperty("parent");null!=O&&n.getModel().isLayer(O)&&
+!n.isCellVisible(O)&&null!=N&&0<N.length&&n.getModel().setVisible(O,!0)});this.gestureHandler=mxUtils.bind(this,function(N){null!=this.currentMenu&&mxEvent.getSource(N)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=
mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){n.view.validateBackground()}));
this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){n.view.validateBackground()}));n.addListener("gridSizeChanged",mxUtils.bind(this,function(){n.isGridEnabled()&&n.view.validateBackground()}));this.editor.resetGraph()}this.init();n.standalone||this.open()};EditorUi.compactUi=!0;
EditorUi.parsePng=function(b,e,k){function n(d,f){var g=t;t+=f;return d.substring(g,t)}function D(d){d=n(d,4);return d.charCodeAt(3)+(d.charCodeAt(2)<<8)+(d.charCodeAt(1)<<16)+(d.charCodeAt(0)<<24)}var t=0;if(n(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=k&&k();else if(n(b,4),"IHDR"!=n(b,4))null!=k&&k();else{n(b,17);do{k=D(b);var E=n(b,4);if(null!=e&&e(t-8,E,k))break;value=n(b,k);n(b,4);if("IEND"==E)break}while(k)}};mxUtils.extend(EditorUi,mxEventSource);
@@ -2105,8 +2105,8 @@ EditorUi.prototype.installShapePicker=function(){var b=this.editor.graph,e=this;
b.popupMenuHandler.isMenuShowing=function(){return n.apply(this,arguments)||null!=e.shapePicker};var D=b.dblClick;b.dblClick=function(f,g){if(this.isEnabled())if(null!=g||null==e.sidebar||mxEvent.isShiftDown(f)||b.isCellLocked(b.getDefaultParent()))D.apply(this,arguments);else{var m=mxUtils.convertPoint(this.container,mxEvent.getClientX(f),mxEvent.getClientY(f));mxEvent.consume(f);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(m.x,m.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",
k);var t=this.hoverIcons.drag;this.hoverIcons.drag=function(){e.hideShapePicker();t.apply(this,arguments)};var E=this.hoverIcons.execute;this.hoverIcons.execute=function(f,g,m){var q=m.getEvent();this.graph.isCloneEvent(q)||mxEvent.isShiftDown(q)?E.apply(this,arguments):this.graph.connectVertex(f.cell,g,this.graph.defaultEdgeLength,q,null,null,mxUtils.bind(this,function(y,F,C){var I=b.getCompositeParent(f.cell);y=b.getCellGeometry(I);for(m.consume();null!=I&&b.model.isVertex(I)&&null!=y&&y.relative;)cell=
I,I=b.model.getParent(cell),y=b.getCellGeometry(I);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(m.getGraphX(),m.getGraphY(),I,mxUtils.bind(this,function(G){C(G);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(G))}),g)}),30)}),mxUtils.bind(this,function(y){this.graph.selectCellsForConnectVertex(y,q,this)}))};var d=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(f,g){null!=d&&window.clearTimeout(d);d=window.setTimeout(mxUtils.bind(this,function(){var m=
-g.getProperty("arrow"),q=g.getProperty("direction"),y=g.getProperty("event");m=m.getBoundingClientRect();var F=mxUtils.getOffset(b.container),C=b.container.scrollLeft+m.x-F.x;F=b.container.scrollTop+m.y-F.y;var I=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),G=e.showShapePicker(C,F,I,mxUtils.bind(this,function(Y){null!=Y&&b.connectVertex(I,q,b.defaultEdgeLength,y,!0,!0,function(ba,Z,X){X(Y);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(Y))},
-function(ba){b.selectCellsForConnectVertex(ba)},y,this.hoverIcons)}),q,!0);this.centerShapePicker(G,m,C,F,q);mxUtils.setOpacity(G,30);mxEvent.addListener(G,"mouseenter",function(){mxUtils.setOpacity(G,100)});mxEvent.addListener(G,"mouseleave",function(){e.hideShapePicker()})}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(f,g){null!=d&&window.clearTimeout(d)}))}};
+g.getProperty("arrow"),q=g.getProperty("direction"),y=g.getProperty("event");m=m.getBoundingClientRect();var F=mxUtils.getOffset(b.container),C=b.container.scrollLeft+m.x-F.x;F=b.container.scrollTop+m.y-F.y;var I=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),G=e.showShapePicker(C,F,I,mxUtils.bind(this,function(Z){null!=Z&&b.connectVertex(I,q,b.defaultEdgeLength,y,!0,!0,function(ca,aa,Y){Y(Z);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(Z))},
+function(ca){b.selectCellsForConnectVertex(ca)},y,this.hoverIcons)}),q,!0);this.centerShapePicker(G,m,C,F,q);mxUtils.setOpacity(G,30);mxEvent.addListener(G,"mouseenter",function(){mxUtils.setOpacity(G,100)});mxEvent.addListener(G,"mouseleave",function(){e.hideShapePicker()})}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(f,g){null!=d&&window.clearTimeout(d)}))}};
EditorUi.prototype.centerShapePicker=function(b,e,k,n,D){if(D==mxConstants.DIRECTION_EAST||D==mxConstants.DIRECTION_WEST)b.style.width="40px";var t=b.getBoundingClientRect();D==mxConstants.DIRECTION_NORTH?(k-=t.width/2-10,n-=t.height+6):D==mxConstants.DIRECTION_SOUTH?(k-=t.width/2-10,n+=e.height+6):D==mxConstants.DIRECTION_WEST?(k-=t.width+6,n-=t.height/2-10):D==mxConstants.DIRECTION_EAST&&(k+=e.width+6,n-=t.height/2-10);b.style.left=k+"px";b.style.top=n+"px"};
EditorUi.prototype.showShapePicker=function(b,e,k,n,D,t){b=this.createShapePicker(b,e,k,n,D,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(k,t),t);null!=b&&(null==this.hoverIcons||t||this.hoverIcons.reset(),t=this.editor.graph,t.popupMenuHandler.hideMenu(),t.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=n,this.shapePicker=b);return b};
EditorUi.prototype.createShapePicker=function(b,e,k,n,D,t,E,d){var f=null;if(null!=E&&0<E.length){var g=this,m=this.editor.graph;f=document.createElement("div");D=m.view.getState(k);var q=null==k||null!=D&&m.isTransparentState(D)?null:m.copyStyle(k);k=6>E.length?35*E.length:140;f.className="geToolbarContainer geSidebarContainer";f.style.cssText="position:absolute;left:"+b+"px;top:"+e+"px;width:"+k+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+
@@ -2131,40 +2131,40 @@ EditorUi.prototype.initClipboard=function(){var b=this,e=mxClipboard.cut;mxClipb
0),y=0;y<g.length;y++){m.add(q,g[y]);var F=t.view.getState(E[y]);if(null!=F){var C=t.getCellGeometry(g[y]);null!=C&&C.relative&&!m.isEdge(E[y])&&null==f[mxObjectIdentity.get(m.getParent(E[y]))]&&(C.offset=null,C.relative=!1,C.x=F.x/F.view.scale-F.view.translate.x,C.y=F.y/F.view.scale-F.view.translate.y)}}t.updateCustomLinks(t.createCellMapping(d,f),g);mxClipboard.insertCount=1;mxClipboard.setCells(g)}b.updatePasteActionStates();return E};var k=mxClipboard.paste;mxClipboard.paste=function(t){var E=
null;t.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):E=k.apply(this,arguments);b.updatePasteActionStates();return E};var n=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){n.apply(this,arguments);b.updatePasteActionStates()};var D=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(t,E){D.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 O=this.graph.getPageLayout(),N=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+O.x*N.width),this.scale*(this.translate.y+O.y*N.height),this.scale*O.width*N.width,
-this.scale*O.height*N.height)};b.getPreferredPageSize=function(O,N,aa){O=this.getPageLayout();N=this.getPageSize();return new mxRectangle(0,0,O.width*N.width,O.height*N.height)};var e=null,k=this;if(this.editor.isChromelessView()){this.chromelessResize=e=mxUtils.bind(this,function(O,N,aa,ma){if(null!=b.container&&!b.isViewer()){aa=null!=aa?aa:0;ma=null!=ma?ma:0;var u=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),H=mxUtils.hasScrollbars(b.container),P=b.view.translate,S=b.view.scale,
-R=mxRectangle.fromRectangle(u);R.x=R.x/S-P.x;R.y=R.y/S-P.y;R.width/=S;R.height/=S;P=b.container.scrollTop;var ca=b.container.scrollLeft,ea=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)ea+=3;var fa=b.container.offsetWidth-ea;ea=b.container.offsetHeight-ea;O=O?Math.max(.3,Math.min(N||1,fa/R.width)):S;N=(fa-O*R.width)/2/O;var ra=0==this.lightboxVerticalDivider?0:(ea-O*R.height)/this.lightboxVerticalDivider/O;H&&(N=Math.max(N,0),ra=Math.max(ra,0));if(H||u.width<
-fa||u.height<ea)b.view.scaleAndTranslate(O,Math.floor(N-R.x),Math.floor(ra-R.y)),b.container.scrollTop=P*O/S,b.container.scrollLeft=ca*O/S;else if(0!=aa||0!=ma)u=b.view.translate,b.view.setTranslate(Math.floor(u.x+aa/S),Math.floor(u.y+ma/S))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var n=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",n);this.destroyFunctions.push(function(){mxEvent.removeListener(window,
-"resize",n)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(O){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(O){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var D=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position=
+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 N=this.graph.getPageLayout(),O=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+N.x*O.width),this.scale*(this.translate.y+N.y*O.height),this.scale*N.width*O.width,
+this.scale*N.height*O.height)};b.getPreferredPageSize=function(N,O,ba){N=this.getPageLayout();O=this.getPageSize();return new mxRectangle(0,0,N.width*O.width,N.height*O.height)};var e=null,k=this;if(this.editor.isChromelessView()){this.chromelessResize=e=mxUtils.bind(this,function(N,O,ba,la){if(null!=b.container&&!b.isViewer()){ba=null!=ba?ba:0;la=null!=la?la:0;var u=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),H=mxUtils.hasScrollbars(b.container),P=b.view.translate,W=b.view.scale,
+R=mxRectangle.fromRectangle(u);R.x=R.x/W-P.x;R.y=R.y/W-P.y;R.width/=W;R.height/=W;P=b.container.scrollTop;var da=b.container.scrollLeft,fa=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)fa+=3;var ea=b.container.offsetWidth-fa;fa=b.container.offsetHeight-fa;N=N?Math.max(.3,Math.min(O||1,ea/R.width)):W;O=(ea-N*R.width)/2/N;var qa=0==this.lightboxVerticalDivider?0:(fa-N*R.height)/this.lightboxVerticalDivider/N;H&&(O=Math.max(O,0),qa=Math.max(qa,0));if(H||u.width<
+ea||u.height<fa)b.view.scaleAndTranslate(N,Math.floor(O-R.x),Math.floor(qa-R.y)),b.container.scrollTop=P*N/W,b.container.scrollLeft=da*N/W;else if(0!=ba||0!=la)u=b.view.translate,b.view.setTranslate(Math.floor(u.x+ba/W),Math.floor(u.y+la/W))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var n=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",n);this.destroyFunctions.push(function(){mxEvent.removeListener(window,
+"resize",n)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(N){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(N){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var D=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position=
"fixed";this.chromelessToolbar.style.overflow="hidden";this.chromelessToolbar.style.boxSizing="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 t=mxUtils.bind(this,function(){var O=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=O?parseInt(O["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",t);t();var E=0;t=mxUtils.bind(this,function(O,N,aa){E++;
-var ma=document.createElement("span");ma.style.paddingLeft="8px";ma.style.paddingRight="8px";ma.style.cursor="pointer";mxEvent.addListener(ma,"click",O);null!=aa&&ma.setAttribute("title",aa);O=document.createElement("img");O.setAttribute("border","0");O.setAttribute("src",N);O.style.width="36px";O.style.filter="invert(100%)";ma.appendChild(O);this.chromelessToolbar.appendChild(ma);return ma});null!=D.backBtn&&t(mxUtils.bind(this,function(O){window.location.href=D.backBtn.url;mxEvent.consume(O)}),
-Editor.backImage,mxResources.get("back",null,"Back"));if(this.isPagesEnabled()){var d=t(mxUtils.bind(this,function(O){this.actions.get("previousPage").funct();mxEvent.consume(O)}),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 g=t(mxUtils.bind(this,function(O){this.actions.get("nextPage").funct();mxEvent.consume(O)}),Editor.nextImage,mxResources.get("nextPage")),m=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(f.innerText="",mxUtils.write(f,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});d.style.paddingLeft="0px";d.style.paddingRight="4px";g.style.paddingLeft="4px";g.style.paddingRight="0px";var q=mxUtils.bind(this,
-function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(g.style.display="",d.style.display="",f.style.display="inline-block"):(g.style.display="none",d.style.display="none",f.style.display="none");m()});this.editor.addListener("resetGraphView",q);this.editor.addListener("pageSelected",m)}t(mxUtils.bind(this,function(O){this.actions.get("zoomOut").funct();mxEvent.consume(O)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");t(mxUtils.bind(this,function(O){this.actions.get("zoomIn").funct();
-mxEvent.consume(O)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");t(mxUtils.bind(this,function(O){b.isLightboxView()?(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(O)}),Editor.zoomFitImage,mxResources.get("fit"));var y=null,F=null,C=mxUtils.bind(this,function(O){null!=y&&(window.clearTimeout(y),y=null);null!=F&&(window.clearTimeout(F),F=null);y=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,
-0);y=null;F=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";F=null}),600)}),O||200)}),I=mxUtils.bind(this,function(O){null!=y&&(window.clearTimeout(y),y=null);null!=F&&(window.clearTimeout(F),F=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,O||30)});if("1"==urlParams.layers){this.layersDialog=null;var G=t(mxUtils.bind(this,function(O){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 N=G.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=N.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));N=mxUtils.getCurrentStyle(this.editor.graph.container);
-this.layersDialog.style.zIndex=N.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(O)}),Editor.layersImage,mxResources.get("layers")),Y=b.getModel();Y.addListener(mxEvent.CHANGE,function(){G.style.display=1<Y.getChildCount(Y.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(t);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||t(mxUtils.bind(this,function(O){null!=
-this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(O)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(q=0;q<this.lightboxToolbarActions.length;q++){var ba=this.lightboxToolbarActions[q];ba.elem=t(ba.fn,ba.icon,ba.tooltip)}null!=D.refreshBtn&&t(mxUtils.bind(this,function(O){D.refreshBtn.url?window.location.href=
-D.refreshBtn.url:window.location.reload();mxEvent.consume(O)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"));null!=D.fullscreenBtn&&window.self!==window.top&&t(mxUtils.bind(this,function(O){D.fullscreenBtn.url?b.openLink(D.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(O)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(D.closeBtn&&window.self===window.top||b.lightbox&&("1"==urlParams.close||this.container!=document.body))&&
-t(mxUtils.bind(this,function(O){"1"==urlParams.close||D.closeBtn?window.close():(this.destroy(),mxEvent.consume(O))}),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(O){mxEvent.isTouchEvent(O)||(mxEvent.isShiftDown(O)||
-I(30),C())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(O){mxEvent.consume(O)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(O){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(O)?C():I(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(O){mxEvent.isShiftDown(O)?C():I(100);mxEvent.consume(O)}));mxEvent.addListener(this.chromelessToolbar,
-"mouseleave",mxUtils.bind(this,function(O){mxEvent.isTouchEvent(O)||I(30)}));var Z=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(O,N){this.startX=N.getGraphX();this.startY=N.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(O,N){},mouseUp:function(O,N){mxEvent.isTouchEvent(N.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<Z&&Math.abs(this.scrollTop-b.container.scrollTop)<Z&&
-Math.abs(this.startX-N.getGraphX())<Z&&Math.abs(this.startY-N.getGraphY())<Z&&(0<parseFloat(k.chromelessToolbar.style.opacity||0)?C():I(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var X=b.view.validate;b.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var O=this.graph.getPagePadding(),N=this.graph.getPageSize();this.translate.x=O.x-(this.x0||0)*N.width;this.translate.y=O.y-(this.y0||0)*N.height}X.apply(this,
-arguments)};if(!b.isViewer()){var qa=b.sizeDidChange;b.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var O=this.getPageLayout(),N=this.getPagePadding(),aa=this.getPageSize(),ma=Math.ceil(2*N.x+O.width*aa.width),u=Math.ceil(2*N.y+O.height*aa.height),H=b.minimumGraphSize;if(null==H||H.width!=ma||H.height!=u)b.minimumGraphSize=new mxRectangle(0,0,ma,u);ma=N.x-O.x*aa.width;N=N.y-O.y*aa.height;this.autoTranslate||this.view.translate.x==ma&&this.view.translate.y==
-N?qa.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=O.x,this.view.y0=O.y,O=b.view.translate.x,aa=b.view.translate.y,b.view.setTranslate(ma,N),b.container.scrollLeft+=Math.round((ma-O)*b.view.scale),b.container.scrollTop+=Math.round((N-aa)*b.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var Q=b.view.getBackgroundPane(),W=b.view.getDrawPane();b.cumulativeZoomFactor=1;var ha=null,la=null,ja=null,U=null,L=null,da=function(O){null!=
-ha&&window.clearTimeout(ha);0<=O&&window.setTimeout(function(){if(!b.isMouseDown||U)ha=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),W.style.transformOrigin="",Q.style.transformOrigin="",mxClient.IS_SF?(W.style.transform="scale(1)",
-Q.style.transform="scale(1)",window.setTimeout(function(){W.style.transform="";Q.style.transform=""},0)):(W.style.transform="",Q.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity="");var N=new mxPoint(b.container.scrollLeft,b.container.scrollTop),aa=mxUtils.getOffset(b.container),ma=b.view.scale,u=0,H=0;null!=la&&(u=b.container.offsetWidth/2-la.x+aa.x,H=b.container.offsetHeight/2-la.y+aa.y);b.zoom(b.cumulativeZoomFactor,null,b.isFastZoomEnabled()?
-20:null);b.view.scale!=ma&&(null!=ja&&(u+=N.x-ja.x,H+=N.y-ja.y),null!=e&&k.chromelessResize(!1,null,u*(b.cumulativeZoomFactor-1),H*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==u&&0==H||(b.container.scrollLeft-=u*(b.cumulativeZoomFactor-1),b.container.scrollTop-=H*(b.cumulativeZoomFactor-1)));null!=L&&W.setAttribute("filter",L);b.cumulativeZoomFactor=1;L=U=la=ja=ha=null}),null!=O?O:b.isFastZoomEnabled()?k.wheelZoomDelay:k.lazyZoomDelay)},0)};b.lazyZoom=function(O,N,aa,ma){ma=
-null!=ma?ma:this.zoomFactor;(N=N||!b.scrollbars)&&(la=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));O?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=ma,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-
-.05)/this.view.scale:(this.cumulativeZoomFactor/=ma,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;b.isFastZoomEnabled()&&(null==L&&""!=W.getAttribute("filter")&&(L=W.getAttribute("filter"),W.removeAttribute("filter")),ja=new mxPoint(b.container.scrollLeft,b.container.scrollTop),O=N||null==la?b.container.scrollLeft+b.container.clientWidth/
-2:la.x+b.container.scrollLeft-b.container.offsetLeft,ma=N||null==la?b.container.scrollTop+b.container.clientHeight/2:la.y+b.container.scrollTop-b.container.offsetTop,W.style.transformOrigin=O+"px "+ma+"px",W.style.transform="scale("+this.cumulativeZoomFactor+")",Q.style.transformOrigin=O+"px "+ma+"px",Q.style.transform="scale("+this.cumulativeZoomFactor+")",null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(O=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(O.style,
-"transform-origin",(N||null==la?b.container.clientWidth/2+b.container.scrollLeft-O.offsetLeft+"px":la.x+b.container.scrollLeft-O.offsetLeft-b.container.offsetLeft+"px")+" "+(N||null==la?b.container.clientHeight/2+b.container.scrollTop-O.offsetTop+"px":la.y+b.container.scrollTop-O.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(O.style,"transform","scale("+this.cumulativeZoomFactor+")")),b.view.getDecoratorPane().style.opacity="0",b.view.getOverlayPane().style.opacity="0",null!=k.hoverIcons&&
-k.hoverIcons.reset());da(b.isFastZoomEnabled()?aa:0)};mxEvent.addGestureListeners(b.container,function(O){null!=ha&&window.clearTimeout(ha)},null,function(O){1!=b.cumulativeZoomFactor&&da(0)});mxEvent.addListener(b.container,"scroll",function(O){null==ha||b.isMouseDown||1==b.cumulativeZoomFactor||da(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(O,N,aa,ma,u){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!aa&&b.isScrollWheelEvent(O))aa=
-b.view.getTranslate(),ma=40/b.view.scale,mxEvent.isShiftDown(O)?b.view.setTranslate(aa.x+(N?-ma:ma),aa.y):b.view.setTranslate(aa.x,aa.y+(N?ma:-ma));else if(aa||b.isZoomWheelEvent(O))for(var H=mxEvent.getSource(O);null!=H;){if(H==b.container)return b.tooltipHandler.hideTooltip(),la=null!=ma&&null!=u?new mxPoint(ma,u):new mxPoint(mxEvent.getClientX(O),mxEvent.getClientY(O)),U=aa,aa=b.zoomFactor,ma=null,O.ctrlKey&&null!=O.deltaY&&40>Math.abs(O.deltaY)&&Math.round(O.deltaY)!=O.deltaY?aa=1+Math.abs(O.deltaY)/
-20*(aa-1):null!=O.movementY&&"pointermove"==O.type&&(aa=1+Math.max(1,Math.abs(O.movementY))/20*(aa-1),ma=-1),b.lazyZoom(N,null,ma,aa),mxEvent.consume(O),!1;H=H.parentNode}}),b.container);b.panningHandler.zoomGraph=function(O){b.cumulativeZoomFactor=O.scale;b.lazyZoom(0<O.scale,!0);mxEvent.consume(O)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(e){this.actions.get("print").funct();mxEvent.consume(e)}),Editor.printImage,mxResources.get("print"))};
+"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var t=mxUtils.bind(this,function(){var N=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=N?parseInt(N["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",t);t();var E=0;t=mxUtils.bind(this,function(N,O,ba){E++;
+var la=document.createElement("span");la.style.paddingLeft="8px";la.style.paddingRight="8px";la.style.cursor="pointer";mxEvent.addListener(la,"click",N);null!=ba&&la.setAttribute("title",ba);N=document.createElement("img");N.setAttribute("border","0");N.setAttribute("src",O);N.style.width="36px";N.style.filter="invert(100%)";la.appendChild(N);this.chromelessToolbar.appendChild(la);return la});null!=D.backBtn&&t(mxUtils.bind(this,function(N){window.location.href=D.backBtn.url;mxEvent.consume(N)}),
+Editor.backImage,mxResources.get("back",null,"Back"));if(this.isPagesEnabled()){var d=t(mxUtils.bind(this,function(N){this.actions.get("previousPage").funct();mxEvent.consume(N)}),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 g=t(mxUtils.bind(this,function(N){this.actions.get("nextPage").funct();mxEvent.consume(N)}),Editor.nextImage,mxResources.get("nextPage")),m=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(f.innerText="",mxUtils.write(f,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});d.style.paddingLeft="0px";d.style.paddingRight="4px";g.style.paddingLeft="4px";g.style.paddingRight="0px";var q=mxUtils.bind(this,
+function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(g.style.display="",d.style.display="",f.style.display="inline-block"):(g.style.display="none",d.style.display="none",f.style.display="none");m()});this.editor.addListener("resetGraphView",q);this.editor.addListener("pageSelected",m)}t(mxUtils.bind(this,function(N){this.actions.get("zoomOut").funct();mxEvent.consume(N)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");t(mxUtils.bind(this,function(N){this.actions.get("zoomIn").funct();
+mxEvent.consume(N)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");t(mxUtils.bind(this,function(N){b.isLightboxView()?(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(N)}),Editor.zoomFitImage,mxResources.get("fit"));var y=null,F=null,C=mxUtils.bind(this,function(N){null!=y&&(window.clearTimeout(y),y=null);null!=F&&(window.clearTimeout(F),F=null);y=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,
+0);y=null;F=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";F=null}),600)}),N||200)}),I=mxUtils.bind(this,function(N){null!=y&&(window.clearTimeout(y),y=null);null!=F&&(window.clearTimeout(F),F=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,N||30)});if("1"==urlParams.layers){this.layersDialog=null;var G=t(mxUtils.bind(this,function(N){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 O=G.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=O.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));O=mxUtils.getCurrentStyle(this.editor.graph.container);
+this.layersDialog.style.zIndex=O.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(N)}),Editor.layersImage,mxResources.get("layers")),Z=b.getModel();Z.addListener(mxEvent.CHANGE,function(){G.style.display=1<Z.getChildCount(Z.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(t);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||t(mxUtils.bind(this,function(N){null!=
+this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(N)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(q=0;q<this.lightboxToolbarActions.length;q++){var ca=this.lightboxToolbarActions[q];ca.elem=t(ca.fn,ca.icon,ca.tooltip)}null!=D.refreshBtn&&t(mxUtils.bind(this,function(N){D.refreshBtn.url?window.location.href=
+D.refreshBtn.url:window.location.reload();mxEvent.consume(N)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"));null!=D.fullscreenBtn&&window.self!==window.top&&t(mxUtils.bind(this,function(N){D.fullscreenBtn.url?b.openLink(D.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(N)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(D.closeBtn&&window.self===window.top||b.lightbox&&("1"==urlParams.close||this.container!=document.body))&&
+t(mxUtils.bind(this,function(N){"1"==urlParams.close||D.closeBtn?window.close():(this.destroy(),mxEvent.consume(N))}),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(N){mxEvent.isTouchEvent(N)||(mxEvent.isShiftDown(N)||
+I(30),C())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(N){mxEvent.consume(N)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(N){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(N)?C():I(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(N){mxEvent.isShiftDown(N)?C():I(100);mxEvent.consume(N)}));mxEvent.addListener(this.chromelessToolbar,
+"mouseleave",mxUtils.bind(this,function(N){mxEvent.isTouchEvent(N)||I(30)}));var aa=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(N,O){this.startX=O.getGraphX();this.startY=O.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(N,O){},mouseUp:function(N,O){mxEvent.isTouchEvent(O.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<aa&&Math.abs(this.scrollTop-b.container.scrollTop)<
+aa&&Math.abs(this.startX-O.getGraphX())<aa&&Math.abs(this.startY-O.getGraphY())<aa&&(0<parseFloat(k.chromelessToolbar.style.opacity||0)?C():I(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var Y=b.view.validate;b.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var N=this.graph.getPagePadding(),O=this.graph.getPageSize();this.translate.x=N.x-(this.x0||0)*O.width;this.translate.y=N.y-(this.y0||0)*
+O.height}Y.apply(this,arguments)};if(!b.isViewer()){var pa=b.sizeDidChange;b.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var N=this.getPageLayout(),O=this.getPagePadding(),ba=this.getPageSize(),la=Math.ceil(2*O.x+N.width*ba.width),u=Math.ceil(2*O.y+N.height*ba.height),H=b.minimumGraphSize;if(null==H||H.width!=la||H.height!=u)b.minimumGraphSize=new mxRectangle(0,0,la,u);la=O.x-N.x*ba.width;O=O.y-N.y*ba.height;this.autoTranslate||this.view.translate.x==la&&
+this.view.translate.y==O?pa.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=N.x,this.view.y0=N.y,N=b.view.translate.x,ba=b.view.translate.y,b.view.setTranslate(la,O),b.container.scrollLeft+=Math.round((la-N)*b.view.scale),b.container.scrollTop+=Math.round((O-ba)*b.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var Q=b.view.getBackgroundPane(),X=b.view.getDrawPane();b.cumulativeZoomFactor=1;var ha=null,U=null,ma=null,
+T=null,M=null,ia=function(N){null!=ha&&window.clearTimeout(ha);0<=N&&window.setTimeout(function(){if(!b.isMouseDown||T)ha=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),X.style.transformOrigin="",Q.style.transformOrigin="",mxClient.IS_SF?
+(X.style.transform="scale(1)",Q.style.transform="scale(1)",window.setTimeout(function(){X.style.transform="";Q.style.transform=""},0)):(X.style.transform="",Q.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity="");var O=new mxPoint(b.container.scrollLeft,b.container.scrollTop),ba=mxUtils.getOffset(b.container),la=b.view.scale,u=0,H=0;null!=U&&(u=b.container.offsetWidth/2-U.x+ba.x,H=b.container.offsetHeight/2-U.y+ba.y);b.zoom(b.cumulativeZoomFactor,
+null,b.isFastZoomEnabled()?20:null);b.view.scale!=la&&(null!=ma&&(u+=O.x-ma.x,H+=O.y-ma.y),null!=e&&k.chromelessResize(!1,null,u*(b.cumulativeZoomFactor-1),H*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==u&&0==H||(b.container.scrollLeft-=u*(b.cumulativeZoomFactor-1),b.container.scrollTop-=H*(b.cumulativeZoomFactor-1)));null!=M&&X.setAttribute("filter",M);b.cumulativeZoomFactor=1;M=T=U=ma=ha=null}),null!=N?N:b.isFastZoomEnabled()?k.wheelZoomDelay:k.lazyZoomDelay)},0)};b.lazyZoom=
+function(N,O,ba,la){la=null!=la?la:this.zoomFactor;(O=O||!b.scrollbars)&&(U=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));N?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=la,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=
+(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=la,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;b.isFastZoomEnabled()&&(null==M&&""!=X.getAttribute("filter")&&(M=X.getAttribute("filter"),X.removeAttribute("filter")),ma=new mxPoint(b.container.scrollLeft,b.container.scrollTop),N=O||null==U?b.container.scrollLeft+
+b.container.clientWidth/2:U.x+b.container.scrollLeft-b.container.offsetLeft,la=O||null==U?b.container.scrollTop+b.container.clientHeight/2:U.y+b.container.scrollTop-b.container.offsetTop,X.style.transformOrigin=N+"px "+la+"px",X.style.transform="scale("+this.cumulativeZoomFactor+")",Q.style.transformOrigin=N+"px "+la+"px",Q.style.transform="scale("+this.cumulativeZoomFactor+")",null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(N=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(N.style,
+"transform-origin",(O||null==U?b.container.clientWidth/2+b.container.scrollLeft-N.offsetLeft+"px":U.x+b.container.scrollLeft-N.offsetLeft-b.container.offsetLeft+"px")+" "+(O||null==U?b.container.clientHeight/2+b.container.scrollTop-N.offsetTop+"px":U.y+b.container.scrollTop-N.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(N.style,"transform","scale("+this.cumulativeZoomFactor+")")),b.view.getDecoratorPane().style.opacity="0",b.view.getOverlayPane().style.opacity="0",null!=k.hoverIcons&&
+k.hoverIcons.reset());ia(b.isFastZoomEnabled()?ba:0)};mxEvent.addGestureListeners(b.container,function(N){null!=ha&&window.clearTimeout(ha)},null,function(N){1!=b.cumulativeZoomFactor&&ia(0)});mxEvent.addListener(b.container,"scroll",function(N){null==ha||b.isMouseDown||1==b.cumulativeZoomFactor||ia(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(N,O,ba,la,u){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!ba&&b.isScrollWheelEvent(N))ba=
+b.view.getTranslate(),la=40/b.view.scale,mxEvent.isShiftDown(N)?b.view.setTranslate(ba.x+(O?-la:la),ba.y):b.view.setTranslate(ba.x,ba.y+(O?la:-la));else if(ba||b.isZoomWheelEvent(N))for(var H=mxEvent.getSource(N);null!=H;){if(H==b.container)return b.tooltipHandler.hideTooltip(),U=null!=la&&null!=u?new mxPoint(la,u):new mxPoint(mxEvent.getClientX(N),mxEvent.getClientY(N)),T=ba,ba=b.zoomFactor,la=null,N.ctrlKey&&null!=N.deltaY&&40>Math.abs(N.deltaY)&&Math.round(N.deltaY)!=N.deltaY?ba=1+Math.abs(N.deltaY)/
+20*(ba-1):null!=N.movementY&&"pointermove"==N.type&&(ba=1+Math.max(1,Math.abs(N.movementY))/20*(ba-1),la=-1),b.lazyZoom(O,null,la,ba),mxEvent.consume(N),!1;H=H.parentNode}}),b.container);b.panningHandler.zoomGraph=function(N){b.cumulativeZoomFactor=N.scale;b.lazyZoom(0<N.scale,!0);mxEvent.consume(N)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(e){this.actions.get("print").funct();mxEvent.consume(e)}),Editor.printImage,mxResources.get("print"))};
EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(b){return Graph.createOffscreenGraph(b)};EditorUi.prototype.addChromelessClickHandler=function(){var b=urlParams.highlight;null!=b&&0<b.length&&(b="#"+b);this.editor.graph.addClickHandler(b)};
EditorUi.prototype.toggleFormatPanel=function(b){b=null!=b?b:0==this.formatWidth;null!=this.format&&(this.formatWidth=b?240:0,this.formatContainer.style.display=b?"":"none",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};
EditorUi.prototype.lightboxFit=function(b){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var e=urlParams.border,k=60;null!=e&&(k=parseInt(e));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(k,null,null,null,null,null,b);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var b=this.editor.graph.getModel();return 1==b.getChildCount(b.root)&&0==b.getChildCount(b.getChildAt(b.root,0))};
@@ -2179,7 +2179,10 @@ EditorUi.prototype.resetScrollbars=function(){var b=this.editor.graph;if(!this.e
1;e=b.getGraphBounds();0<e.width&&0<e.height&&(e.x>b.container.scrollLeft+.9*b.container.clientWidth&&(b.container.scrollLeft=Math.min(e.x+e.width-b.container.clientWidth,e.x-10)),e.y>b.container.scrollTop+.9*b.container.clientHeight&&(b.container.scrollTop=Math.min(e.y+e.height-b.container.clientHeight,e.y-10)))}else{e=b.getGraphBounds();var k=Math.max(e.width,b.scrollTileSize.width*b.view.scale);b.container.scrollTop=Math.floor(Math.max(0,e.y-Math.max(20,(b.container.clientHeight-Math.max(e.height,
b.scrollTileSize.height*b.view.scale))/4)));b.container.scrollLeft=Math.floor(Math.max(0,e.x-Math.max(0,(b.container.clientWidth-k)/2)))}else{e=mxRectangle.fromRectangle(b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds());k=b.view.translate;var n=b.view.scale;e.x=e.x/n-k.x;e.y=e.y/n-k.y;e.width/=n;e.height/=n;b.view.setTranslate(Math.floor(Math.max(0,(b.container.clientWidth-e.width)/2)-e.x+2),Math.floor((b.pageVisible?0:Math.max(0,(b.container.clientHeight-e.height)/4))-e.y+1))}};
EditorUi.prototype.setPageVisible=function(b){var e=this.editor.graph,k=mxUtils.hasScrollbars(e.container),n=0,D=0;k&&(n=e.view.translate.x*e.view.scale-e.container.scrollLeft,D=e.view.translate.y*e.view.scale-e.container.scrollTop);e.pageVisible=b;e.pageBreaksVisible=b;e.preferPageSize=b;e.view.validateBackground();if(k){var t=e.getSelectionCells();e.clearSelection();e.setSelectionCells(t)}e.sizeDidChange();k&&(e.container.scrollLeft=e.view.translate.x*e.view.scale-n,e.container.scrollTop=e.view.translate.y*
-e.view.scale-D);e.defaultPageVisible=b;this.fireEvent(new mxEventObject("pageViewChanged"))};function ChangeGridColor(b,e){this.ui=b;this.color=e}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)})();
+e.view.scale-D);e.defaultPageVisible=b;this.fireEvent(new mxEventObject("pageViewChanged"))};
+EditorUi.prototype.installResizeHandler=function(b,e,k){e&&(b.window.setSize=function(D,t){if(!this.minimized){var E=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;D=Math.min(D,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.getX());t=Math.min(t,E-this.getY())}mxWindow.prototype.setSize.apply(this,arguments)});b.window.setLocation=function(D,t){var E=window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth,
+d=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight,f=parseInt(this.div.style.width),g=parseInt(this.div.style.height);D=Math.max(0,Math.min(D,E-f));t=Math.max(0,Math.min(t,d-g));this.getX()==D&&this.getY()==t||mxWindow.prototype.setLocation.apply(this,arguments);e&&!this.minimized&&this.setSize(f,g)};var n=mxUtils.bind(this,function(){var D=b.window.getX(),t=b.window.getY();b.window.setLocation(D,t)});mxEvent.addListener(window,"resize",n);b.destroy=function(){mxEvent.removeListener(window,
+"resize",n);b.window.destroy();null!=k&&k()}};function ChangeGridColor(b,e){this.ui=b;this.color=e}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,e,k,n,D){this.ui=b;this.previousColor=this.color=e;this.previousImage=this.image=k;this.previousFormat=this.format=n;this.previousPageScale=this.pageScale=D;this.ignoreImage=this.ignoreColor=!1}
ChangePageSetup.prototype.execute=function(){var b=this.ui.editor.graph;if(!this.ignoreColor){this.color=this.previousColor;var e=b.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=e}if(!this.ignoreImage){this.image=this.previousImage;e=b.backgroundImage;var k=this.previousImage;null!=k&&null!=k.src&&"data:page/id,"==k.src.substring(0,13)&&(k=this.ui.createImageForPageLink(k.src,this.ui.currentPage));this.ui.setBackgroundImage(k);this.previousImage=e}null!=this.previousFormat&&
(this.format=this.previousFormat,e=b.pageFormat,this.previousFormat.width!=e.width||this.previousFormat.height!=e.height)&&(this.ui.setPageFormat(this.previousFormat),this.previousFormat=e);null!=this.foldingEnabled&&this.foldingEnabled!=this.ui.editor.graph.foldingEnabled&&(this.ui.setFoldingEnabled(this.foldingEnabled),this.foldingEnabled=!this.foldingEnabled);null!=this.previousPageScale&&(b=this.ui.editor.graph.pageScale,this.previousPageScale!=b&&(this.ui.setPageScale(this.previousPageScale),
@@ -2199,8 +2202,8 @@ this.actions.get("selectAll").setEnabled(k);this.actions.get("selectNone").setEn
EditorUi.prototype.refresh=function(b){b=null!=b?b:!0;var e=this.container.clientWidth,k=this.container.clientHeight;this.container==document.body&&(e=document.body.clientWidth||document.documentElement.clientWidth,k=document.documentElement.clientHeight);var n=0;mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&window.innerHeight!=document.documentElement.clientHeight&&(n=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var D=Math.max(0,Math.min(this.hsplitPosition,
e-this.splitSize-20));e=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",e+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",e+=this.toolbarHeight);0<e&&(e+=1);var t=0;if(null!=this.sidebarFooterContainer){var E=this.footerHeight+n;t=Math.max(0,Math.min(k-e-E,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=D+"px";this.sidebarFooterContainer.style.height=
t+"px";this.sidebarFooterContainer.style.bottom=E+"px"}k=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=e+"px";this.sidebarContainer.style.width=D+"px";this.formatContainer.style.top=e+"px";this.formatContainer.style.width=k+"px";this.formatContainer.style.display=null!=this.format?"":"none";E=this.getDiagramContainerOffset();var d=null!=this.hsplit.parentNode?D+this.splitSize:0;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;
-this.hsplit.style.bottom=this.footerHeight+n+"px";this.hsplit.style.left=D+"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=n+"px");D=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+n+"px",this.tabContainer.style.right=this.diagramContainer.style.right,D=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+
-t+n+"px";this.formatContainer.style.bottom=this.footerHeight+n+"px";"1"!=urlParams.embedInline&&(this.diagramContainer.style.left=d+E.x+"px",this.diagramContainer.style.top=e+E.y+"px",this.diagramContainer.style.right=k+"px",this.diagramContainer.style.bottom=this.footerHeight+n+D+"px");b&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
+this.hsplit.style.bottom=this.footerHeight+n+"px";this.hsplit.style.left=D+"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=n+"px");D=0;null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+n+"px",this.tabContainer.style.right=k+"px",D=this.tabContainer.clientHeight);this.sidebarContainer.style.bottom=this.footerHeight+t+n+"px";this.formatContainer.style.bottom=
+this.footerHeight+n+"px";"1"!=urlParams.embedInline&&(this.diagramContainer.style.left=d+E.x+"px",this.diagramContainer.style.top=e+E.y+"px",this.diagramContainer.style.right=k+"px",this.diagramContainer.style.bottom=this.footerHeight+n+D+"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};
@@ -2239,8 +2242,8 @@ EditorUi.prototype.showBackgroundImageDialog=function(b,e){b=null!=b?b:mxUtils.b
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,e,k){mxUtils.confirm(b)?null!=e&&e():null!=k&&k()};EditorUi.prototype.createOutline=function(b){var e=new mxOutline(this.editor.graph);mxEvent.addListener(window,"resize",function(){e.update(!1)});return e};
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 e(q,y,F){if(!n.isSelectionEmpty()&&n.isEnabled()){y=null!=y?y:1;var C=n.getCompositeParents(n.getSelectionCells()),I=0<C.length?C[0]:null;if(null!=I)if(F){n.getModel().beginUpdate();try{for(I=0;I<C.length;I++)if(n.getModel().isVertex(C[I])&&n.isCellResizable(C[I])){var G=n.getCellGeometry(C[I]);null!=G&&(G=G.clone(),37==q?G.width=Math.max(0,G.width-y):38==q?G.height=Math.max(0,G.height-y):39==q?G.width+=y:40==q&&(G.height+=y),n.getModel().setGeometry(C[I],
-G))}}finally{n.getModel().endUpdate()}}else{G=n.model.getParent(I);var Y=n.getView().scale;F=null;1==n.getSelectionCount()&&n.model.isVertex(I)&&null!=n.layoutManager&&!n.isCellLocked(I)&&(F=n.layoutManager.getLayout(G));if(null!=F&&F.constructor==mxStackLayout)y=G.getIndex(I),37==q||38==q?n.model.add(G,I,Math.max(0,y-1)):(39==q||40==q)&&n.model.add(G,I,Math.min(n.model.getChildCount(G),y+1));else{var ba=n.graphHandler;null!=ba&&(null==ba.first&&ba.start(I,0,0,C),null!=ba.first&&(I=C=0,37==q?C=-y:
-38==q?I=-y:39==q?C=y:40==q&&(I=y),ba.currentDx+=C*Y,ba.currentDy+=I*Y,ba.checkPreview(),ba.updatePreview()),null!=E&&window.clearTimeout(E),E=window.setTimeout(function(){if(null!=ba.first){var Z=ba.roundLength(ba.currentDx/Y),X=ba.roundLength(ba.currentDy/Y);ba.moveCells(ba.cells,Z,X);ba.reset()}},400))}}}}var k=this,n=this.editor.graph,D=new mxKeyHandler(n),t=D.isEventIgnored;D.isEventIgnored=function(q){return!(mxEvent.isShiftDown(q)&&9==q.keyCode)&&(!this.isControlDown(q)||mxEvent.isShiftDown(q)||
+G))}}finally{n.getModel().endUpdate()}}else{G=n.model.getParent(I);var Z=n.getView().scale;F=null;1==n.getSelectionCount()&&n.model.isVertex(I)&&null!=n.layoutManager&&!n.isCellLocked(I)&&(F=n.layoutManager.getLayout(G));if(null!=F&&F.constructor==mxStackLayout)y=G.getIndex(I),37==q||38==q?n.model.add(G,I,Math.max(0,y-1)):(39==q||40==q)&&n.model.add(G,I,Math.min(n.model.getChildCount(G),y+1));else{var ca=n.graphHandler;null!=ca&&(null==ca.first&&ca.start(I,0,0,C),null!=ca.first&&(I=C=0,37==q?C=-y:
+38==q?I=-y:39==q?C=y:40==q&&(I=y),ca.currentDx+=C*Z,ca.currentDy+=I*Z,ca.checkPreview(),ca.updatePreview()),null!=E&&window.clearTimeout(E),E=window.setTimeout(function(){if(null!=ca.first){var aa=ca.roundLength(ca.currentDx/Z),Y=ca.roundLength(ca.currentDy/Z);ca.moveCells(ca.cells,aa,Y);ca.reset()}},400))}}}}var k=this,n=this.editor.graph,D=new mxKeyHandler(n),t=D.isEventIgnored;D.isEventIgnored=function(q){return!(mxEvent.isShiftDown(q)&&9==q.keyCode)&&(!this.isControlDown(q)||mxEvent.isShiftDown(q)||
90!=q.keyCode&&89!=q.keyCode&&188!=q.keyCode&&190!=q.keyCode&&85!=q.keyCode)&&(66!=q.keyCode&&73!=q.keyCode||!this.isControlDown(q)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&t.apply(this,arguments)};D.isEnabledForEvent=function(q){return!mxEvent.isConsumed(q)&&this.isGraphEvent(q)&&this.isEnabled()&&(null==k.dialogs||0==k.dialogs.length)};D.isControlDown=function(q){return mxEvent.isControlDown(q)||mxClient.IS_MAC&&q.metaKey};var E=null,d={37:mxConstants.DIRECTION_WEST,
38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},f=D.getFunction;mxKeyHandler.prototype.getFunction=function(q){if(n.isEnabled()){if(mxEvent.isShiftDown(q)&&mxEvent.isAltDown(q)){var y=k.actions.get(k.altShiftActions[q.keyCode]);if(null!=y)return y.funct}if(null!=d[q.keyCode]&&!n.isSelectionEmpty())if(!this.isControlDown(q)&&mxEvent.isShiftDown(q)&&mxEvent.isAltDown(q)){if(n.model.isVertex(n.getSelectionCell()))return function(){var F=n.connectVertex(n.getSelectionCell(),
d[q.keyCode],n.defaultEdgeLength,q,!0);null!=F&&0<F.length&&(1==F.length&&n.model.isEdge(F[0])?n.setSelectionCell(n.model.getTerminal(F[0],!1)):n.setSelectionCell(F[F.length-1]),n.scrollCellToVisible(n.getSelectionCell()),null!=k.hoverIcons&&k.hoverIcons.update(n.view.getState(n.getSelectionCell())))}}else return this.isControlDown(q)?function(){e(q.keyCode,mxEvent.isShiftDown(q)?n.gridSize:null,!0)}:function(){e(q.keyCode,mxEvent.isShiftDown(q)?n.gridSize:null)}}return f.apply(this,arguments)};D.bindAction=
@@ -2261,35 +2264,35 @@ mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxCodec.allowlist="mxStylesheet Array mxGr
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,e,k){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,!0),this.clippedImage=b;b=this.clippedSvg}return b};
-Graph=function(b,e,k,n,D,t){mxGraph.call(this,b,e,k,n);this.themes=D||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=t?t:!1;b=this.baseUrl;e=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<e&&(e=b.indexOf("/",e+2),0<e&&(this.domainUrl=b.substring(0,e)),e=b.lastIndexOf("/"),0<e&&(this.domainPathUrl=b.substring(0,e+1)));this.isHtmlLabel=function(L){L=this.getCurrentCellStyle(L);
-return null!=L?"1"==L.html||"wrap"==L[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var E=null,d=null,f=null,g=null,m=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(L,da){if("mouseDown"==da.getProperty("eventName")&&this.isEnabled()){L=da.getProperty("event");var O=L.getState();da=this.view.scale;if(!mxEvent.isAltDown(L.getEvent())&&null!=O)if(this.model.isEdge(O.cell))if(E=new mxPoint(L.getGraphX(),L.getGraphY()),m=this.isCellSelected(O.cell),f=O,d=L,null!=O.text&&
-null!=O.text.boundingBox&&mxUtils.contains(O.text.boundingBox,L.getGraphX(),L.getGraphY()))g=mxEvent.LABEL_HANDLE;else{var N=this.selectionCellsHandler.getHandler(O.cell);null!=N&&null!=N.bends&&0<N.bends.length&&(g=N.getHandleForEvent(L))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(L.getEvent())&&(N=this.selectionCellsHandler.getHandler(O.cell),null==N||null==N.getHandleForEvent(L))){var aa=new mxRectangle(L.getGraphX()-1,L.getGraphY()-1),ma=mxEvent.isTouchEvent(L.getEvent())?
-mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;N=ma+2;aa.grow(ma);if(this.isTableCell(O.cell)&&!this.isCellSelected(O.cell)&&!(mxUtils.contains(O,L.getGraphX()-N,L.getGraphY()-N)&&mxUtils.contains(O,L.getGraphX()-N,L.getGraphY()+N)&&mxUtils.contains(O,L.getGraphX()+N,L.getGraphY()+N)&&mxUtils.contains(O,L.getGraphX()+N,L.getGraphY()-N))){var u=this.model.getParent(O.cell);N=this.model.getParent(u);if(!this.isCellSelected(N)){ma*=da;var H=2*ma;if(this.model.getChildAt(N,
-0)!=u&&mxUtils.intersects(aa,new mxRectangle(O.x,O.y-ma,O.width,H))||this.model.getChildAt(u,0)!=O.cell&&mxUtils.intersects(aa,new mxRectangle(O.x-ma,O.y,H,O.height))||mxUtils.intersects(aa,new mxRectangle(O.x,O.y+O.height-ma,O.width,H))||mxUtils.intersects(aa,new mxRectangle(O.x+O.width-ma,O.y,H,O.height)))u=this.selectionCellsHandler.isHandled(N),this.selectCellForEvent(N,L.getEvent()),N=this.selectionCellsHandler.getHandler(N),null!=N&&(ma=N.getHandleForEvent(L),null!=ma&&(N.start(L.getGraphX(),
-L.getGraphY(),ma),N.blockDelayedSelection=!u,L.consume()))}}for(;!L.isConsumed()&&null!=O&&(this.isTableCell(O.cell)||this.isTableRow(O.cell)||this.isTable(O.cell));)this.isSwimlane(O.cell)&&(N=this.getActualStartSize(O.cell),(0<N.x||0<N.width)&&mxUtils.intersects(aa,new mxRectangle(O.x+(N.x-N.width-1)*da+(0==N.x?O.width:0),O.y,1,O.height))||(0<N.y||0<N.height)&&mxUtils.intersects(aa,new mxRectangle(O.x,O.y+(N.y-N.height-1)*da+(0==N.y?O.height:0),O.width,1)))&&(this.selectCellForEvent(O.cell,L.getEvent()),
-N=this.selectionCellsHandler.getHandler(O.cell),null!=N&&(ma=mxEvent.CUSTOM_HANDLE-N.customHandles.length+1,N.start(L.getGraphX(),L.getGraphY(),ma),L.consume())),O=this.view.getState(this.model.getParent(O.cell))}}}));this.addMouseListener({mouseDown:function(L,da){},mouseMove:mxUtils.bind(this,function(L,da){L=this.selectionCellsHandler.handlers.map;for(var O in L)if(null!=L[O].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(da.getEvent())){var N=this.tolerance;
-if(null!=E&&null!=f&&null!=d){if(O=f,Math.abs(E.x-da.getGraphX())>N||Math.abs(E.y-da.getGraphY())>N){var aa=this.selectionCellsHandler.getHandler(O.cell);null==aa&&this.model.isEdge(O.cell)&&(aa=this.createHandler(O));if(null!=aa&&null!=aa.bends&&0<aa.bends.length){L=aa.getHandleForEvent(d);var ma=this.view.getEdgeStyle(O);N=ma==mxEdgeStyle.EntityRelation;m||g!=mxEvent.LABEL_HANDLE||(L=g);if(N&&0!=L&&L!=aa.bends.length-1&&L!=mxEvent.LABEL_HANDLE)!N||null==O.visibleSourceState&&null==O.visibleTargetState||
-(this.graphHandler.reset(),da.consume());else if(L==mxEvent.LABEL_HANDLE||0==L||null!=O.visibleSourceState||L==aa.bends.length-1||null!=O.visibleTargetState)N||L==mxEvent.LABEL_HANDLE||(N=O.absolutePoints,null!=N&&(null==ma&&null==L||ma==mxEdgeStyle.OrthConnector)&&(L=g,null==L&&(L=new mxRectangle(E.x,E.y),L.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(L,N[0].x,N[0].y)?L=0:mxUtils.contains(L,N[N.length-1].x,N[N.length-1].y)?L=aa.bends.length-1:null!=ma&&(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)))?L=2:(L=mxUtils.findNearestSegment(O,E.x,E.y),L=null==ma?mxEvent.VIRTUAL_HANDLE-L:L+1))),null==L&&(L=mxEvent.VIRTUAL_HANDLE)),aa.start(da.getGraphX(),da.getGraphX(),L),da.consume(),this.graphHandler.reset()}null!=aa&&(this.selectionCellsHandler.isHandlerActive(aa)?this.isCellSelected(O.cell)||(this.selectionCellsHandler.handlers.put(O.cell,aa),this.selectCellForEvent(O.cell,da.getEvent())):
-this.isCellSelected(O.cell)||aa.destroy());m=!1;E=d=f=g=null}}else if(O=da.getState(),null!=O&&this.isCellEditable(O.cell)){aa=null;if(this.model.isEdge(O.cell)){if(L=new mxRectangle(da.getGraphX(),da.getGraphY()),L.grow(mxEdgeHandler.prototype.handleImage.width/2),N=O.absolutePoints,null!=N)if(null!=O.text&&null!=O.text.boundingBox&&mxUtils.contains(O.text.boundingBox,da.getGraphX(),da.getGraphY()))aa="move";else if(mxUtils.contains(L,N[0].x,N[0].y)||mxUtils.contains(L,N[N.length-1].x,N[N.length-
-1].y))aa="pointer";else if(null!=O.visibleSourceState||null!=O.visibleTargetState)L=this.view.getEdgeStyle(O),aa="crosshair",L!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(O)&&(da=mxUtils.findNearestSegment(O,da.getGraphX(),da.getGraphY()),da<N.length-1&&0<=da&&(aa=0==Math.round(N[da].x-N[da+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(da.getEvent())){N=mxShape.prototype.svgStrokeTolerance/2;L=new mxRectangle(da.getGraphX(),da.getGraphY());L.grow(N);if(this.isTableCell(O.cell)&&
-(da=this.model.getParent(O.cell),N=this.model.getParent(da),!this.isCellSelected(N)))if(mxUtils.intersects(L,new mxRectangle(O.x,O.y-2,O.width,4))&&this.model.getChildAt(N,0)!=da||mxUtils.intersects(L,new mxRectangle(O.x,O.y+O.height-2,O.width,4)))aa="row-resize";else if(mxUtils.intersects(L,new mxRectangle(O.x-2,O.y,4,O.height))&&this.model.getChildAt(da,0)!=O.cell||mxUtils.intersects(L,new mxRectangle(O.x+O.width-2,O.y,4,O.height)))aa="col-resize";for(da=O;null==aa&&null!=da&&(this.isTableCell(da.cell)||
-this.isTableRow(da.cell)||this.isTable(da.cell));)this.isSwimlane(da.cell)&&(N=this.getActualStartSize(da.cell),ma=this.view.scale,(0<N.x||0<N.width)&&mxUtils.intersects(L,new mxRectangle(da.x+(N.x-N.width-1)*ma+(0==N.x?da.width*ma:0),da.y,1,da.height))?aa="col-resize":(0<N.y||0<N.height)&&mxUtils.intersects(L,new mxRectangle(da.x,da.y+(N.y-N.height-1)*ma+(0==N.y?da.height:0),da.width,1))&&(aa="row-resize")),da=this.view.getState(this.model.getParent(da.cell))}null!=aa&&O.setCursor(aa)}}}),mouseUp:mxUtils.bind(this,
-function(L,da){g=E=d=f=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(L){var da=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);L.view.graph.isHtmlLabel(L.cell)&&(da=1!=L.style.html?mxUtils.htmlEntities(da,!1):L.view.graph.sanitizeHtml(da));return da};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(L,da){return!1};this.alternateEdgeStyle="vertical";null==n&&this.loadStylesheet();var q=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var L=q.apply(this,arguments);if(this.graph.pageVisible){var da=[],O=this.graph.pageFormat,
-N=this.graph.pageScale,aa=O.width*N;O=O.height*N;N=this.graph.view.translate;for(var ma=this.graph.view.scale,u=this.graph.getPageLayout(),H=0;H<u.width;H++)da.push(new mxRectangle(((u.x+H)*aa+N.x)*ma,(u.y*O+N.y)*ma,aa*ma,O*ma));for(H=1;H<u.height;H++)da.push(new mxRectangle((u.x*aa+N.x)*ma,((u.y+H)*O+N.y)*ma,aa*ma,O*ma));L=da.concat(L)}return L};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(L,da){return null==L.cell?"#ffa500":mxConstants.GUIDE_COLOR};
-this.graphHandler.createPreviewShape=function(L){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var y=this.graphHandler.getCells;this.graphHandler.getCells=function(L){for(var da=y.apply(this,arguments),O=new mxDictionary,N=[],aa=0;aa<da.length;aa++){var ma=this.graph.isTableCell(L)&&this.graph.isTableCell(da[aa])&&this.graph.isCellSelected(da[aa])?this.graph.model.getParent(da[aa]):
-this.graph.isTableRow(L)&&this.graph.isTableRow(da[aa])&&this.graph.isCellSelected(da[aa])?da[aa]:this.graph.getCompositeParent(da[aa]);null==ma||O.get(ma)||(O.put(ma,!0),N.push(ma))}return N};var F=this.graphHandler.start;this.graphHandler.start=function(L,da,O,N){var aa=!1;this.graph.isTableCell(L)&&(this.graph.isCellSelected(L)?aa=!0:L=this.graph.model.getParent(L));aa||this.graph.isTableRow(L)&&this.graph.isCellSelected(L)||(L=this.graph.getCompositeParent(L));F.apply(this,arguments)};this.connectionHandler.createTargetVertex=
-function(L,da){da=this.graph.getCompositeParent(da);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var C=new mxRubberband(this);this.getRubberband=function(){return C};var I=(new Date).getTime(),G=0,Y=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var L=this.currentState;Y.apply(this,arguments);L!=this.currentState?(I=(new Date).getTime(),G=0):G=(new Date).getTime()-I};var ba=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=
-function(L){return mxEvent.isShiftDown(L.getEvent())&&mxEvent.isAltDown(L.getEvent())?!1:null!=this.currentState&&L.getState()==this.currentState&&2E3<G||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&ba.apply(this,arguments)};var Z=this.isToggleEvent;this.isToggleEvent=function(L){return Z.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(L)};var X=C.isForceRubberbandEvent;C.isForceRubberbandEvent=function(L){return X.apply(this,arguments)||
-mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(L.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==L.getState()&&mxEvent.isTouchEvent(L.getEvent())};var qa=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(qa=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=qa)}));
-this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(L){return mxEvent.isMouseEvent(L.getEvent())};var Q=this.click;this.click=function(L){var da=null==L.state&&null!=L.sourceState&&this.isCellLocked(L.sourceState.cell);if(this.isEnabled()&&!da||L.isConsumed())return Q.apply(this,arguments);var O=da?L.sourceState.cell:L.getCell();null!=O&&(O=this.getClickableLinkForCell(O),null!=O&&(this.isCustomLink(O)?this.customLinkClicked(O):this.openLink(O)));this.isEnabled()&&da&&
-this.clearSelection()};this.tooltipHandler.getStateForEvent=function(L){return L.sourceState};var W=this.tooltipHandler.show;this.tooltipHandler.show=function(){W.apply(this,arguments);if(null!=this.div)for(var L=this.div.getElementsByTagName("a"),da=0;da<L.length;da++)null!=L[da].getAttribute("href")&&null==L[da].getAttribute("target")&&L[da].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(L){return L.sourceState};this.getCursorForMouseEvent=function(L){var da=null==
-L.state&&null!=L.sourceState&&this.isCellLocked(L.sourceState.cell);return this.getCursorForCell(da?L.sourceState.cell:L.getCell())};var ha=this.getCursorForCell;this.getCursorForCell=function(L){if(!this.isEnabled()||this.isCellLocked(L)){if(null!=this.getClickableLinkForCell(L))return"pointer";if(this.isCellLocked(L))return"default"}return ha.apply(this,arguments)};this.selectRegion=function(L,da){var O=mxEvent.isAltDown(da)?L:null;L=this.getCells(L.x,L.y,L.width,L.height,null,null,O,function(N){return"1"==
-mxUtils.getValue(N.style,"locked","0")},!0);if(this.isToggleEvent(da))for(O=0;O<L.length;O++)this.selectCellForEvent(L[O],da);else this.selectCellsForEvent(L,da);return L};var la=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(L,da,O){return this.graph.isCellSelected(L)?!1:la.apply(this,arguments)};this.isCellLocked=function(L){for(;null!=L;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(L),"locked","0"))return!0;L=this.model.getParent(L)}return!1};
-var ja=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(L,da){"mouseDown"==da.getProperty("eventName")&&(L=da.getProperty("event").getState(),ja=null==L||this.isSelectionEmpty()||this.isCellSelected(L.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(L,da){if(!mxEvent.isMultiTouchEvent(da)){L=da.getProperty("event");var O=da.getProperty("cell");null==O?(L=mxUtils.convertPoint(this.container,mxEvent.getClientX(L),mxEvent.getClientY(L)),
-C.start(L.x,L.y)):null!=ja?this.addSelectionCells(ja):1<this.getSelectionCount()&&this.isCellSelected(O)&&this.removeSelectionCell(O);ja=null;da.consume()}}));this.connectionHandler.selectCells=function(L,da){this.graph.setSelectionCell(da||L)};this.connectionHandler.constraintHandler.isStateIgnored=function(L,da){var O=L.view.graph;return da&&(O.isCellSelected(L.cell)||O.isTableRow(L.cell)&&O.selectionCellsHandler.isHandled(O.model.getParent(L.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,
-mxUtils.bind(this,function(){var L=this.connectionHandler.constraintHandler;null!=L.currentFocus&&L.isStateIgnored(L.currentFocus,!0)&&(L.currentFocus=null,L.constraints=null,L.destroyIcons());L.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var U=this.updateMouseEvent;this.updateMouseEvent=function(L){L=U.apply(this,arguments);null!=L.state&&this.isCellLocked(L.getCell())&&(L.state=null);return L}}this.currentTranslate=new mxPoint(0,0)};
+Graph=function(b,e,k,n,D,t){mxGraph.call(this,b,e,k,n);this.themes=D||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=t?t:!1;b=this.baseUrl;e=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<e&&(e=b.indexOf("/",e+2),0<e&&(this.domainUrl=b.substring(0,e)),e=b.lastIndexOf("/"),0<e&&(this.domainPathUrl=b.substring(0,e+1)));this.isHtmlLabel=function(M){M=this.getCurrentCellStyle(M);
+return null!=M?"1"==M.html||"wrap"==M[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var E=null,d=null,f=null,g=null,m=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(M,ia){if("mouseDown"==ia.getProperty("eventName")&&this.isEnabled()){M=ia.getProperty("event");var N=M.getState();ia=this.view.scale;if(!mxEvent.isAltDown(M.getEvent())&&null!=N)if(this.model.isEdge(N.cell))if(E=new mxPoint(M.getGraphX(),M.getGraphY()),m=this.isCellSelected(N.cell),f=N,d=M,null!=N.text&&
+null!=N.text.boundingBox&&mxUtils.contains(N.text.boundingBox,M.getGraphX(),M.getGraphY()))g=mxEvent.LABEL_HANDLE;else{var O=this.selectionCellsHandler.getHandler(N.cell);null!=O&&null!=O.bends&&0<O.bends.length&&(g=O.getHandleForEvent(M))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(M.getEvent())&&(O=this.selectionCellsHandler.getHandler(N.cell),null==O||null==O.getHandleForEvent(M))){var ba=new mxRectangle(M.getGraphX()-1,M.getGraphY()-1),la=mxEvent.isTouchEvent(M.getEvent())?
+mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;O=la+2;ba.grow(la);if(this.isTableCell(N.cell)&&!this.isCellSelected(N.cell)&&!(mxUtils.contains(N,M.getGraphX()-O,M.getGraphY()-O)&&mxUtils.contains(N,M.getGraphX()-O,M.getGraphY()+O)&&mxUtils.contains(N,M.getGraphX()+O,M.getGraphY()+O)&&mxUtils.contains(N,M.getGraphX()+O,M.getGraphY()-O))){var u=this.model.getParent(N.cell);O=this.model.getParent(u);if(!this.isCellSelected(O)){la*=ia;var H=2*la;if(this.model.getChildAt(O,
+0)!=u&&mxUtils.intersects(ba,new mxRectangle(N.x,N.y-la,N.width,H))||this.model.getChildAt(u,0)!=N.cell&&mxUtils.intersects(ba,new mxRectangle(N.x-la,N.y,H,N.height))||mxUtils.intersects(ba,new mxRectangle(N.x,N.y+N.height-la,N.width,H))||mxUtils.intersects(ba,new mxRectangle(N.x+N.width-la,N.y,H,N.height)))u=this.selectionCellsHandler.isHandled(O),this.selectCellForEvent(O,M.getEvent()),O=this.selectionCellsHandler.getHandler(O),null!=O&&(la=O.getHandleForEvent(M),null!=la&&(O.start(M.getGraphX(),
+M.getGraphY(),la),O.blockDelayedSelection=!u,M.consume()))}}for(;!M.isConsumed()&&null!=N&&(this.isTableCell(N.cell)||this.isTableRow(N.cell)||this.isTable(N.cell));)this.isSwimlane(N.cell)&&(O=this.getActualStartSize(N.cell),(0<O.x||0<O.width)&&mxUtils.intersects(ba,new mxRectangle(N.x+(O.x-O.width-1)*ia+(0==O.x?N.width:0),N.y,1,N.height))||(0<O.y||0<O.height)&&mxUtils.intersects(ba,new mxRectangle(N.x,N.y+(O.y-O.height-1)*ia+(0==O.y?N.height:0),N.width,1)))&&(this.selectCellForEvent(N.cell,M.getEvent()),
+O=this.selectionCellsHandler.getHandler(N.cell),null!=O&&(la=mxEvent.CUSTOM_HANDLE-O.customHandles.length+1,O.start(M.getGraphX(),M.getGraphY(),la),M.consume())),N=this.view.getState(this.model.getParent(N.cell))}}}));this.addMouseListener({mouseDown:function(M,ia){},mouseMove:mxUtils.bind(this,function(M,ia){M=this.selectionCellsHandler.handlers.map;for(var N in M)if(null!=M[N].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(ia.getEvent())){var O=this.tolerance;
+if(null!=E&&null!=f&&null!=d){if(N=f,Math.abs(E.x-ia.getGraphX())>O||Math.abs(E.y-ia.getGraphY())>O){var ba=this.selectionCellsHandler.getHandler(N.cell);null==ba&&this.model.isEdge(N.cell)&&(ba=this.createHandler(N));if(null!=ba&&null!=ba.bends&&0<ba.bends.length){M=ba.getHandleForEvent(d);var la=this.view.getEdgeStyle(N);O=la==mxEdgeStyle.EntityRelation;m||g!=mxEvent.LABEL_HANDLE||(M=g);if(O&&0!=M&&M!=ba.bends.length-1&&M!=mxEvent.LABEL_HANDLE)!O||null==N.visibleSourceState&&null==N.visibleTargetState||
+(this.graphHandler.reset(),ia.consume());else if(M==mxEvent.LABEL_HANDLE||0==M||null!=N.visibleSourceState||M==ba.bends.length-1||null!=N.visibleTargetState)O||M==mxEvent.LABEL_HANDLE||(O=N.absolutePoints,null!=O&&(null==la&&null==M||la==mxEdgeStyle.OrthConnector)&&(M=g,null==M&&(M=new mxRectangle(E.x,E.y),M.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(M,O[0].x,O[0].y)?M=0:mxUtils.contains(M,O[O.length-1].x,O[O.length-1].y)?M=ba.bends.length-1:null!=la&&(2==O.length||3==O.length&&
+(0==Math.round(O[0].x-O[1].x)&&0==Math.round(O[1].x-O[2].x)||0==Math.round(O[0].y-O[1].y)&&0==Math.round(O[1].y-O[2].y)))?M=2:(M=mxUtils.findNearestSegment(N,E.x,E.y),M=null==la?mxEvent.VIRTUAL_HANDLE-M:M+1))),null==M&&(M=mxEvent.VIRTUAL_HANDLE)),ba.start(ia.getGraphX(),ia.getGraphX(),M),ia.consume(),this.graphHandler.reset()}null!=ba&&(this.selectionCellsHandler.isHandlerActive(ba)?this.isCellSelected(N.cell)||(this.selectionCellsHandler.handlers.put(N.cell,ba),this.selectCellForEvent(N.cell,ia.getEvent())):
+this.isCellSelected(N.cell)||ba.destroy());m=!1;E=d=f=g=null}}else if(N=ia.getState(),null!=N&&this.isCellEditable(N.cell)){ba=null;if(this.model.isEdge(N.cell)){if(M=new mxRectangle(ia.getGraphX(),ia.getGraphY()),M.grow(mxEdgeHandler.prototype.handleImage.width/2),O=N.absolutePoints,null!=O)if(null!=N.text&&null!=N.text.boundingBox&&mxUtils.contains(N.text.boundingBox,ia.getGraphX(),ia.getGraphY()))ba="move";else if(mxUtils.contains(M,O[0].x,O[0].y)||mxUtils.contains(M,O[O.length-1].x,O[O.length-
+1].y))ba="pointer";else if(null!=N.visibleSourceState||null!=N.visibleTargetState)M=this.view.getEdgeStyle(N),ba="crosshair",M!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(N)&&(ia=mxUtils.findNearestSegment(N,ia.getGraphX(),ia.getGraphY()),ia<O.length-1&&0<=ia&&(ba=0==Math.round(O[ia].x-O[ia+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(ia.getEvent())){O=mxShape.prototype.svgStrokeTolerance/2;M=new mxRectangle(ia.getGraphX(),ia.getGraphY());M.grow(O);if(this.isTableCell(N.cell)&&
+(ia=this.model.getParent(N.cell),O=this.model.getParent(ia),!this.isCellSelected(O)))if(mxUtils.intersects(M,new mxRectangle(N.x,N.y-2,N.width,4))&&this.model.getChildAt(O,0)!=ia||mxUtils.intersects(M,new mxRectangle(N.x,N.y+N.height-2,N.width,4)))ba="row-resize";else if(mxUtils.intersects(M,new mxRectangle(N.x-2,N.y,4,N.height))&&this.model.getChildAt(ia,0)!=N.cell||mxUtils.intersects(M,new mxRectangle(N.x+N.width-2,N.y,4,N.height)))ba="col-resize";for(ia=N;null==ba&&null!=ia&&(this.isTableCell(ia.cell)||
+this.isTableRow(ia.cell)||this.isTable(ia.cell));)this.isSwimlane(ia.cell)&&(O=this.getActualStartSize(ia.cell),la=this.view.scale,(0<O.x||0<O.width)&&mxUtils.intersects(M,new mxRectangle(ia.x+(O.x-O.width-1)*la+(0==O.x?ia.width*la:0),ia.y,1,ia.height))?ba="col-resize":(0<O.y||0<O.height)&&mxUtils.intersects(M,new mxRectangle(ia.x,ia.y+(O.y-O.height-1)*la+(0==O.y?ia.height:0),ia.width,1))&&(ba="row-resize")),ia=this.view.getState(this.model.getParent(ia.cell))}null!=ba&&N.setCursor(ba)}}}),mouseUp:mxUtils.bind(this,
+function(M,ia){g=E=d=f=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(M){var ia=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);M.view.graph.isHtmlLabel(M.cell)&&(ia=1!=M.style.html?mxUtils.htmlEntities(ia,!1):M.view.graph.sanitizeHtml(ia));return ia};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(M,ia){return!1};this.alternateEdgeStyle="vertical";null==n&&this.loadStylesheet();var q=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var M=q.apply(this,arguments);if(this.graph.pageVisible){var ia=[],N=this.graph.pageFormat,
+O=this.graph.pageScale,ba=N.width*O;N=N.height*O;O=this.graph.view.translate;for(var la=this.graph.view.scale,u=this.graph.getPageLayout(),H=0;H<u.width;H++)ia.push(new mxRectangle(((u.x+H)*ba+O.x)*la,(u.y*N+O.y)*la,ba*la,N*la));for(H=1;H<u.height;H++)ia.push(new mxRectangle((u.x*ba+O.x)*la,((u.y+H)*N+O.y)*la,ba*la,N*la));M=ia.concat(M)}return M};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(M,ia){return null==M.cell?"#ffa500":mxConstants.GUIDE_COLOR};
+this.graphHandler.createPreviewShape=function(M){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var y=this.graphHandler.getCells;this.graphHandler.getCells=function(M){for(var ia=y.apply(this,arguments),N=new mxDictionary,O=[],ba=0;ba<ia.length;ba++){var la=this.graph.isTableCell(M)&&this.graph.isTableCell(ia[ba])&&this.graph.isCellSelected(ia[ba])?this.graph.model.getParent(ia[ba]):
+this.graph.isTableRow(M)&&this.graph.isTableRow(ia[ba])&&this.graph.isCellSelected(ia[ba])?ia[ba]:this.graph.getCompositeParent(ia[ba]);null==la||N.get(la)||(N.put(la,!0),O.push(la))}return O};var F=this.graphHandler.start;this.graphHandler.start=function(M,ia,N,O){var ba=!1;this.graph.isTableCell(M)&&(this.graph.isCellSelected(M)?ba=!0:M=this.graph.model.getParent(M));ba||this.graph.isTableRow(M)&&this.graph.isCellSelected(M)||(M=this.graph.getCompositeParent(M));F.apply(this,arguments)};this.connectionHandler.createTargetVertex=
+function(M,ia){ia=this.graph.getCompositeParent(ia);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var C=new mxRubberband(this);this.getRubberband=function(){return C};var I=(new Date).getTime(),G=0,Z=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var M=this.currentState;Z.apply(this,arguments);M!=this.currentState?(I=(new Date).getTime(),G=0):G=(new Date).getTime()-I};var ca=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=
+function(M){return mxEvent.isShiftDown(M.getEvent())&&mxEvent.isAltDown(M.getEvent())?!1:null!=this.currentState&&M.getState()==this.currentState&&2E3<G||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&ca.apply(this,arguments)};var aa=this.isToggleEvent;this.isToggleEvent=function(M){return aa.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(M)};var Y=C.isForceRubberbandEvent;C.isForceRubberbandEvent=function(M){return Y.apply(this,
+arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(M.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==M.getState()&&mxEvent.isTouchEvent(M.getEvent())};var pa=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(pa=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=
+pa)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(M){return mxEvent.isMouseEvent(M.getEvent())};var Q=this.click;this.click=function(M){var ia=null==M.state&&null!=M.sourceState&&this.isCellLocked(M.sourceState.cell);if(this.isEnabled()&&!ia||M.isConsumed())return Q.apply(this,arguments);var N=ia?M.sourceState.cell:M.getCell();null!=N&&(N=this.getClickableLinkForCell(N),null!=N&&(this.isCustomLink(N)?this.customLinkClicked(N):this.openLink(N)));this.isEnabled()&&
+ia&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(M){return M.sourceState};var X=this.tooltipHandler.show;this.tooltipHandler.show=function(){X.apply(this,arguments);if(null!=this.div)for(var M=this.div.getElementsByTagName("a"),ia=0;ia<M.length;ia++)null!=M[ia].getAttribute("href")&&null==M[ia].getAttribute("target")&&M[ia].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(M){return M.sourceState};this.getCursorForMouseEvent=function(M){var ia=
+null==M.state&&null!=M.sourceState&&this.isCellLocked(M.sourceState.cell);return this.getCursorForCell(ia?M.sourceState.cell:M.getCell())};var ha=this.getCursorForCell;this.getCursorForCell=function(M){if(!this.isEnabled()||this.isCellLocked(M)){if(null!=this.getClickableLinkForCell(M))return"pointer";if(this.isCellLocked(M))return"default"}return ha.apply(this,arguments)};this.selectRegion=function(M,ia){var N=mxEvent.isAltDown(ia)?M:null;M=this.getCells(M.x,M.y,M.width,M.height,null,null,N,function(O){return"1"==
+mxUtils.getValue(O.style,"locked","0")},!0);if(this.isToggleEvent(ia))for(N=0;N<M.length;N++)this.selectCellForEvent(M[N],ia);else this.selectCellsForEvent(M,ia);return M};var U=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(M,ia,N){return this.graph.isCellSelected(M)?!1:U.apply(this,arguments)};this.isCellLocked=function(M){for(;null!=M;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(M),"locked","0"))return!0;M=this.model.getParent(M)}return!1};
+var ma=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(M,ia){"mouseDown"==ia.getProperty("eventName")&&(M=ia.getProperty("event").getState(),ma=null==M||this.isSelectionEmpty()||this.isCellSelected(M.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(M,ia){if(!mxEvent.isMultiTouchEvent(ia)){M=ia.getProperty("event");var N=ia.getProperty("cell");null==N?(M=mxUtils.convertPoint(this.container,mxEvent.getClientX(M),mxEvent.getClientY(M)),
+C.start(M.x,M.y)):null!=ma?this.addSelectionCells(ma):1<this.getSelectionCount()&&this.isCellSelected(N)&&this.removeSelectionCell(N);ma=null;ia.consume()}}));this.connectionHandler.selectCells=function(M,ia){this.graph.setSelectionCell(ia||M)};this.connectionHandler.constraintHandler.isStateIgnored=function(M,ia){var N=M.view.graph;return ia&&(N.isCellSelected(M.cell)||N.isTableRow(M.cell)&&N.selectionCellsHandler.isHandled(N.model.getParent(M.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,
+mxUtils.bind(this,function(){var M=this.connectionHandler.constraintHandler;null!=M.currentFocus&&M.isStateIgnored(M.currentFocus,!0)&&(M.currentFocus=null,M.constraints=null,M.destroyIcons());M.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var T=this.updateMouseEvent;this.updateMouseEvent=function(M){M=T.apply(this,arguments);null!=M.state&&this.isCellLocked(M.getCell())&&(M.state=null);return M}}this.currentTranslate=new mxPoint(0,0)};
Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.translateDiagram="1"==urlParams["translate-diagram"];Graph.diagramLanguage=null!=urlParams["diagram-language"]?urlParams["diagram-language"]:mxClient.language;Graph.lineJumpsEnabled=!0;
Graph.defaultJumpSize=6;Graph.zoomWheel=!1;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Text is not SVG - cannot display";Graph.foreignObjectWarningLink="https://www.diagrams.net/doc/faq/svg-export-text-problems";Graph.xmlDeclaration='<?xml version="1.0" encoding="UTF-8"?>';Graph.svgDoctype='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">';Graph.svgFileComment="\x3c!-- Do not edit this file with editors other than diagrams.net --\x3e";
Graph.pasteStyles="rounded shadow dashed dashPattern fontFamily fontSource fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize targetPerimeterSpacing startFill startArrow startSize sourcePerimeterSpacing arcSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle".split(" ");
@@ -2361,10 +2364,10 @@ Graph.prototype.getLabel=function(b){var e=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 e=this.getLinkForCell(b);if(null!=e)return e;b=this.model.getParent(b)}while(null!=b);return null};
Graph.prototype.getGlobalVariable=function(b){var e=null;"date"==b?e=(new Date).toLocaleDateString():"time"==b?e=(new Date).toLocaleTimeString():"timestamp"==b?e=(new Date).toLocaleString():"date{"==b.substring(0,5)&&(b=b.substring(5,b.length-1),e=this.formatDate(new Date,b));return e};
Graph.prototype.formatDate=function(b,e,k){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 n=this.dateFormatCache,D=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,t=/[^-+\dA-Z]/g,E=function(Y,ba){Y=String(Y);for(ba=ba||2;Y.length<ba;)Y="0"+Y;return Y};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||
+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 n=this.dateFormatCache,D=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,t=/[^-+\dA-Z]/g,E=function(Z,ca){Z=String(Z);for(ca=ca||2;Z.length<ca;)Z="0"+Z;return Z};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||
/\d/.test(b)||(e=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");e=String(n.masks[e]||e||n.masks["default"]);"UTC:"==e.slice(0,4)&&(e=e.slice(4),k=!0);var d=k?"getUTC":"get",f=b[d+"Date"](),g=b[d+"Day"](),m=b[d+"Month"](),q=b[d+"FullYear"](),y=b[d+"Hours"](),F=b[d+"Minutes"](),C=b[d+"Seconds"]();d=b[d+"Milliseconds"]();var I=k?0:b.getTimezoneOffset(),G={d:f,dd:E(f),ddd:n.i18n.dayNames[g],dddd:n.i18n.dayNames[g+7],m:m+1,mm:E(m+1),mmm:n.i18n.monthNames[m],mmmm:n.i18n.monthNames[m+
-12],yy:String(q).slice(2),yyyy:q,h:y%12||12,hh:E(y%12||12),H:y,HH:E(y),M:F,MM:E(F),s:C,ss:E(C),l:E(d,3),L:E(99<d?Math.round(d/10):d),t:12>y?"a":"p",tt:12>y?"am":"pm",T:12>y?"A":"P",TT:12>y?"AM":"PM",Z:k?"UTC":(String(b).match(D)||[""]).pop().replace(t,""),o:(0<I?"-":"+")+E(100*Math.floor(Math.abs(I)/60)+Math.abs(I)%60,4),S:["th","st","nd","rd"][3<f%10?0:(10!=f%100-f%10)*f%10]};return e.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(Y){return Y in G?G[Y]:Y.slice(1,
-Y.length-1)})};Graph.prototype.getLayerForCells=function(b){var e=null;if(0<b.length){for(e=b[0];!this.model.isLayer(e);)e=this.model.getParent(e);for(var k=1;k<b.length;k++)if(!this.model.isAncestor(e,b[k])){e=null;break}}return e};
+12],yy:String(q).slice(2),yyyy:q,h:y%12||12,hh:E(y%12||12),H:y,HH:E(y),M:F,MM:E(F),s:C,ss:E(C),l:E(d,3),L:E(99<d?Math.round(d/10):d),t:12>y?"a":"p",tt:12>y?"am":"pm",T:12>y?"A":"P",TT:12>y?"AM":"PM",Z:k?"UTC":(String(b).match(D)||[""]).pop().replace(t,""),o:(0<I?"-":"+")+E(100*Math.floor(Math.abs(I)/60)+Math.abs(I)%60,4),S:["th","st","nd","rd"][3<f%10?0:(10!=f%100-f%10)*f%10]};return e.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(Z){return Z in G?G[Z]:Z.slice(1,
+Z.length-1)})};Graph.prototype.getLayerForCells=function(b){var e=null;if(0<b.length){for(e=b[0];!this.model.isLayer(e);)e=this.model.getParent(e);for(var k=1;k<b.length;k++)if(!this.model.isAncestor(e,b[k])){e=null;break}}return e};
Graph.prototype.createLayersDialog=function(b,e){var k=document.createElement("div");k.style.position="absolute";for(var n=this.getModel(),D=n.getChildCount(n.root),t=0;t<D;t++)mxUtils.bind(this,function(E){function d(){n.isVisible(E)?(m.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(g,75)):(m.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(g,25))}var f=this.convertValueToString(E)||mxResources.get("background")||"Background",g=document.createElement("div");g.style.overflow=
"hidden";g.style.textOverflow="ellipsis";g.style.padding="2px";g.style.whiteSpace="nowrap";g.style.cursor="pointer";g.setAttribute("title",mxResources.get(n.isVisible(E)?"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";e&&(m.style.filter="invert(100%)",m.style.top="-2px");g.appendChild(m);mxUtils.write(g,f);k.appendChild(g);
mxEvent.addListener(g,"click",function(){n.setVisible(E,!n.isVisible(E));d();null!=b&&b(E)});d()})(n.getChildAt(n.root,t));return k};
@@ -2378,11 +2381,11 @@ D)}}}finally{this.getModel().endUpdate()}};Graph.prototype.selectCellsForConnect
Graph.prototype.isCloneConnectSource=function(b){var e=null;null!=this.layoutManager&&(e=this.layoutManager.getLayout(this.model.getParent(b)));return this.isTableRow(b)||this.isTableCell(b)||null!=e&&e.constructor==mxStackLayout};
Graph.prototype.connectVertex=function(b,e,k,n,D,t,E,d){t=t?t:!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),g=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(g.geometry.x,g.geometry.y);e==mxConstants.DIRECTION_NORTH?(m.x+=g.geometry.width/2,m.y-=k):e==
mxConstants.DIRECTION_SOUTH?(m.x+=g.geometry.width/2,m.y+=g.geometry.height+k):(m.x=e==mxConstants.DIRECTION_WEST?m.x-k:m.x+(g.geometry.width+k),m.y+=g.geometry.height/2);var q=this.view.getState(this.model.getParent(b));k=this.view.scale;var y=this.view.translate;g=y.x*k;y=y.y*k;null!=q&&this.model.isVertex(q.cell)&&(g=q.x,y=q.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(m.x+=b.parent.geometry.x,m.y+=b.parent.geometry.y);t=t?null:(new mxRectangle(g+m.x*k,y+m.y*k)).grow(40*k);t=null!=t?
-this.getCells(0,0,0,0,null,null,t,null,!0):null;q=this.view.getState(b);var F=null,C=null;if(null!=t){t=t.reverse();for(var I=0;I<t.length;I++)if(!this.isCellLocked(t[I])&&!this.model.isEdge(t[I])&&t[I]!=b)if(!this.model.isAncestor(b,t[I])&&this.isContainer(t[I])&&(null==F||t[I]==this.model.getParent(b)))F=t[I];else if(null==C&&this.isCellConnectable(t[I])&&!this.model.isAncestor(t[I],b)&&!this.isSwimlane(t[I])){var G=this.view.getState(t[I]);null==q||null==G||mxUtils.intersects(q,G)||(C=t[I])}}var Y=
-!mxEvent.isShiftDown(n)||mxEvent.isControlDown(n)||D;Y&&("1"!=urlParams.sketch||D)&&(e==mxConstants.DIRECTION_NORTH?m.y-=b.geometry.height/2:e==mxConstants.DIRECTION_SOUTH?m.y+=b.geometry.height/2:m.x=e==mxConstants.DIRECTION_WEST?m.x-b.geometry.width/2:m.x+b.geometry.width/2);var ba=[],Z=C;C=F;D=mxUtils.bind(this,function(X){if(null==E||null!=X||null==C&&f){this.model.beginUpdate();try{if(null==Z&&Y){var qa=this.getAbsoluteParent(null!=X?X:b);qa=f?b:this.getCompositeParent(qa);Z=null!=X?X:this.duplicateCells([qa],
-!1)[0];null!=X&&this.addCells([Z],this.model.getParent(b),null,null,null,!0);var Q=this.getCellGeometry(Z);null!=Q&&(null!=X&&"1"==urlParams.sketch&&(e==mxConstants.DIRECTION_NORTH?m.y-=Q.height/2:e==mxConstants.DIRECTION_SOUTH?m.y+=Q.height/2:m.x=e==mxConstants.DIRECTION_WEST?m.x-Q.width/2:m.x+Q.width/2),Q.x=m.x-Q.width/2,Q.y=m.y-Q.height/2);null!=F?(this.addCells([Z],F,null,null,null,!0),C=null):Y&&!f&&this.addCells([Z],this.getDefaultParent(),null,null,null,!0)}var W=mxEvent.isControlDown(n)&&
-mxEvent.isShiftDown(n)&&Y||null==C&&f?null:this.insertEdge(this.model.getParent(b),null,"",b,Z,this.createCurrentEdgeStyle());if(null!=W&&this.connectionHandler.insertBeforeSource){var ha=null;for(X=b;null!=X.parent&&null!=X.geometry&&X.geometry.relative&&X.parent!=W.parent;)X=this.model.getParent(X);null!=X&&null!=X.parent&&X.parent==W.parent&&(ha=X.parent.getIndex(X),this.model.add(X.parent,W,ha))}null==C&&null!=Z&&null!=b.parent&&f&&e==mxConstants.DIRECTION_WEST&&(ha=b.parent.getIndex(b),this.model.add(b.parent,
-Z,ha));null!=W&&ba.push(W);null==C&&null!=Z&&ba.push(Z);null==Z&&null!=W&&W.geometry.setTerminalPoint(m,!1);null!=W&&this.fireEvent(new mxEventObject("cellsInserted","cells",[W]))}finally{this.model.endUpdate()}}if(null!=d)d(ba);else return ba});if(null==E||null!=Z||!Y||null==C&&f)return D(Z);E(g+m.x*k,y+m.y*k,D)};
+this.getCells(0,0,0,0,null,null,t,null,!0):null;q=this.view.getState(b);var F=null,C=null;if(null!=t){t=t.reverse();for(var I=0;I<t.length;I++)if(!this.isCellLocked(t[I])&&!this.model.isEdge(t[I])&&t[I]!=b)if(!this.model.isAncestor(b,t[I])&&this.isContainer(t[I])&&(null==F||t[I]==this.model.getParent(b)))F=t[I];else if(null==C&&this.isCellConnectable(t[I])&&!this.model.isAncestor(t[I],b)&&!this.isSwimlane(t[I])){var G=this.view.getState(t[I]);null==q||null==G||mxUtils.intersects(q,G)||(C=t[I])}}var Z=
+!mxEvent.isShiftDown(n)||mxEvent.isControlDown(n)||D;Z&&("1"!=urlParams.sketch||D)&&(e==mxConstants.DIRECTION_NORTH?m.y-=b.geometry.height/2:e==mxConstants.DIRECTION_SOUTH?m.y+=b.geometry.height/2:m.x=e==mxConstants.DIRECTION_WEST?m.x-b.geometry.width/2:m.x+b.geometry.width/2);var ca=[],aa=C;C=F;D=mxUtils.bind(this,function(Y){if(null==E||null!=Y||null==C&&f){this.model.beginUpdate();try{if(null==aa&&Z){var pa=this.getAbsoluteParent(null!=Y?Y:b);pa=f?b:this.getCompositeParent(pa);aa=null!=Y?Y:this.duplicateCells([pa],
+!1)[0];null!=Y&&this.addCells([aa],this.model.getParent(b),null,null,null,!0);var Q=this.getCellGeometry(aa);null!=Q&&(null!=Y&&"1"==urlParams.sketch&&(e==mxConstants.DIRECTION_NORTH?m.y-=Q.height/2:e==mxConstants.DIRECTION_SOUTH?m.y+=Q.height/2:m.x=e==mxConstants.DIRECTION_WEST?m.x-Q.width/2:m.x+Q.width/2),Q.x=m.x-Q.width/2,Q.y=m.y-Q.height/2);null!=F?(this.addCells([aa],F,null,null,null,!0),C=null):Z&&!f&&this.addCells([aa],this.getDefaultParent(),null,null,null,!0)}var X=mxEvent.isControlDown(n)&&
+mxEvent.isShiftDown(n)&&Z||null==C&&f?null:this.insertEdge(this.model.getParent(b),null,"",b,aa,this.createCurrentEdgeStyle());if(null!=X&&this.connectionHandler.insertBeforeSource){var ha=null;for(Y=b;null!=Y.parent&&null!=Y.geometry&&Y.geometry.relative&&Y.parent!=X.parent;)Y=this.model.getParent(Y);null!=Y&&null!=Y.parent&&Y.parent==X.parent&&(ha=Y.parent.getIndex(Y),this.model.add(Y.parent,X,ha))}null==C&&null!=aa&&null!=b.parent&&f&&e==mxConstants.DIRECTION_WEST&&(ha=b.parent.getIndex(b),this.model.add(b.parent,
+aa,ha));null!=X&&ca.push(X);null==C&&null!=aa&&ca.push(aa);null==aa&&null!=X&&X.geometry.setTerminalPoint(m,!1);null!=X&&this.fireEvent(new mxEventObject("cellsInserted","cells",[X]))}finally{this.model.endUpdate()}}if(null!=d)d(ca);else return ca});if(null==E||null!=aa||!Z||null==C&&f)return D(aa);E(g+m.x*k,y+m.y*k,D)};
Graph.prototype.getIndexableText=function(b){b=null!=b?b:this.model.getDescendants(this.model.root);for(var e=document.createElement("div"),k=[],n,D=0;D<b.length;D++)if(n=b[D],this.model.isVertex(n)||this.model.isEdge(n))this.isHtmlLabel(n)?(e.innerHTML=this.sanitizeHtml(this.getLabel(n)),n=mxUtils.extractTextWithWhitespace([e])):n=this.getLabel(n),n=mxUtils.trim(n.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<n.length&&k.push(n);return k.join(" ")};
Graph.prototype.convertValueToString=function(b){var e=this.model.getValue(b);if(null!=e&&"object"==typeof e){var k=null;if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder")){e=b.getAttribute("placeholder");for(var n=b;null==k&&null!=n;)null!=n.value&&"object"==typeof n.value&&(k=n.hasAttribute(e)?null!=n.getAttribute(e)?n.getAttribute(e):"":null),n=this.model.getParent(n)}else k=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(k=e.getAttribute("label_"+Graph.diagramLanguage)),
null==k&&(k=e.getAttribute("label")||"");return k||""}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};
@@ -2460,23 +2463,23 @@ TableLayout.prototype.layoutRow=function(b,e,k,n){var D=this.graph.getModel(),t=
0,g.width,g.height),D.setGeometry(t[f],g))}return d};
TableLayout.prototype.execute=function(b){if(null!=b){var e=this.graph.getActualStartSize(b,!0),k=this.graph.getCellGeometry(b),n=this.graph.getCellStyle(b),D="1"==mxUtils.getValue(n,"resizeLastRow","0"),t="1"==mxUtils.getValue(n,"resizeLast","0");n="1"==mxUtils.getValue(n,"fixedRows","0");var E=this.graph.getModel(),d=0;E.beginUpdate();try{for(var f=k.height-e.y-e.height,g=k.width-e.x-e.width,m=E.getChildCells(b,!0),q=0;q<m.length;q++)E.setVisible(m[q],!0);var y=this.getSize(m,!1);if(0<f&&0<g&&0<
m.length&&0<y){if(D){var F=this.graph.getCellGeometry(m[m.length-1]);null!=F&&(F=F.clone(),F.height=f-y+F.height,E.setGeometry(m[m.length-1],F))}var C=t?null:this.getRowLayout(m[0],g),I=[],G=e.y;for(q=0;q<m.length;q++)F=this.graph.getCellGeometry(m[q]),null!=F&&(F=F.clone(),F.x=e.x,F.width=g,F.y=Math.round(G),G=D||n?G+F.height:G+F.height/y*f,F.height=Math.round(G)-F.y,E.setGeometry(m[q],F)),d=Math.max(d,this.layoutRow(m[q],C,F.height,g,I));n&&f<y&&(k=k.clone(),k.height=G+e.height,E.setGeometry(b,
-k));t&&g<d+Graph.minTableColumnWidth&&(k=k.clone(),k.width=d+e.width+e.x+Graph.minTableColumnWidth,E.setGeometry(b,k));this.graph.visitTableCells(b,mxUtils.bind(this,function(Y){E.setVisible(Y.cell,Y.actual.cell==Y.cell);if(Y.actual.cell!=Y.cell){if(Y.actual.row==Y.row){var ba=null!=Y.geo.alternateBounds?Y.geo.alternateBounds:Y.geo;Y.actual.geo.width+=ba.width}Y.actual.col==Y.col&&(ba=null!=Y.geo.alternateBounds?Y.geo.alternateBounds:Y.geo,Y.actual.geo.height+=ba.height)}}))}else for(q=0;q<m.length;q++)E.setVisible(m[q],
+k));t&&g<d+Graph.minTableColumnWidth&&(k=k.clone(),k.width=d+e.width+e.x+Graph.minTableColumnWidth,E.setGeometry(b,k));this.graph.visitTableCells(b,mxUtils.bind(this,function(Z){E.setVisible(Z.cell,Z.actual.cell==Z.cell);if(Z.actual.cell!=Z.cell){if(Z.actual.row==Z.row){var ca=null!=Z.geo.alternateBounds?Z.geo.alternateBounds:Z.geo;Z.actual.geo.width+=ca.width}Z.actual.col==Z.col&&(ca=null!=Z.geo.alternateBounds?Z.geo.alternateBounds:Z.geo,Z.actual.geo.height+=ca.height)}}))}else for(q=0;q<m.length;q++)E.setVisible(m[q],
!1)}finally{E.endUpdate()}}};
(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var e=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(m,q){q=null!=q?q:!0;var y=this.getState(m);null!=y&&q&&this.graph.model.isEdge(y.cell)&&null!=y.style&&1!=y.style[mxConstants.STYLE_CURVED]&&!y.invalid&&this.updateLineJumps(y)&&this.graph.cellRenderer.redraw(y,!1,this.isRendering());y=e.apply(this,
arguments);null!=y&&q&&this.graph.model.isEdge(y.cell)&&null!=y.style&&1!=y.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(y);return y};var k=mxShape.prototype.paint;mxShape.prototype.paint=function(){k.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 m=this.node.getElementsByTagName("path");if(1<m.length){"1"!=mxUtils.getValue(this.state.style,
mxConstants.STYLE_DASHED,"0")&&m[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var q=this.state.view.graph.getFlowAnimationStyle();null!=q&&m[1].setAttribute("class",q.getAttribute("id"))}}};var n=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(m,q){return n.apply(this,arguments)||null!=m.routedPoints&&null!=q.routedPoints&&!mxUtils.equalPoints(q.routedPoints,m.routedPoints)};var D=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
-function(m){D.apply(this,arguments);this.graph.model.isEdge(m.cell)&&1!=m.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(m)};mxGraphView.prototype.updateLineJumps=function(m){var q=m.absolutePoints;if(Graph.lineJumpsEnabled){var y=null!=m.routedPoints,F=null;if(null!=q&&null!=this.validEdges&&"none"!==mxUtils.getValue(m.style,"jumpStyle","none")){var C=function(ja,U,L){var da=new mxPoint(U,L);da.type=ja;F.push(da);da=null!=m.routedPoints?m.routedPoints[F.length-1]:null;return null==da||da.type!=
-ja||da.x!=U||da.y!=L},I=.5*this.scale;y=!1;F=[];for(var G=0;G<q.length-1;G++){for(var Y=q[G+1],ba=q[G],Z=[],X=q[G+2];G<q.length-2&&mxUtils.ptSegDistSq(ba.x,ba.y,X.x,X.y,Y.x,Y.y)<1*this.scale*this.scale;)Y=X,G++,X=q[G+2];y=C(0,ba.x,ba.y)||y;for(var qa=0;qa<this.validEdges.length;qa++){var Q=this.validEdges[qa],W=Q.absolutePoints;if(null!=W&&mxUtils.intersects(m,Q)&&"1"!=Q.style.noJump)for(Q=0;Q<W.length-1;Q++){var ha=W[Q+1],la=W[Q];for(X=W[Q+2];Q<W.length-2&&mxUtils.ptSegDistSq(la.x,la.y,X.x,X.y,ha.x,
-ha.y)<1*this.scale*this.scale;)ha=X,Q++,X=W[Q+2];X=mxUtils.intersection(ba.x,ba.y,Y.x,Y.y,la.x,la.y,ha.x,ha.y);if(null!=X&&(Math.abs(X.x-ba.x)>I||Math.abs(X.y-ba.y)>I)&&(Math.abs(X.x-Y.x)>I||Math.abs(X.y-Y.y)>I)&&(Math.abs(X.x-la.x)>I||Math.abs(X.y-la.y)>I)&&(Math.abs(X.x-ha.x)>I||Math.abs(X.y-ha.y)>I)){ha=X.x-ba.x;la=X.y-ba.y;X={distSq:ha*ha+la*la,x:X.x,y:X.y};for(ha=0;ha<Z.length;ha++)if(Z[ha].distSq>X.distSq){Z.splice(ha,0,X);X=null;break}null==X||0!=Z.length&&Z[Z.length-1].x===X.x&&Z[Z.length-
-1].y===X.y||Z.push(X)}}}for(Q=0;Q<Z.length;Q++)y=C(1,Z[Q].x,Z[Q].y)||y}X=q[q.length-1];y=C(0,X.x,X.y)||y}m.routedPoints=F;return y}return!1};var t=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(m,q,y){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)t.apply(this,arguments);else{var F=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
-2,C=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,I=mxUtils.getValue(this.style,"jumpStyle","none"),G=!0,Y=null,ba=null,Z=[],X=null;m.begin();for(var qa=0;qa<this.state.routedPoints.length;qa++){var Q=this.state.routedPoints[qa],W=new mxPoint(Q.x/this.scale,Q.y/this.scale);0==qa?W=q[0]:qa==this.state.routedPoints.length-1&&(W=q[q.length-1]);var ha=!1;if(null!=Y&&1==Q.type){var la=this.state.routedPoints[qa+1];Q=la.x/this.scale-W.x;la=la.y/this.scale-
-W.y;Q=Q*Q+la*la;null==X&&(X=new mxPoint(W.x-Y.x,W.y-Y.y),ba=Math.sqrt(X.x*X.x+X.y*X.y),0<ba?(X.x=X.x*C/ba,X.y=X.y*C/ba):X=null);Q>C*C&&0<ba&&(Q=Y.x-W.x,la=Y.y-W.y,Q=Q*Q+la*la,Q>C*C&&(ha=new mxPoint(W.x-X.x,W.y-X.y),Q=new mxPoint(W.x+X.x,W.y+X.y),Z.push(ha),this.addPoints(m,Z,y,F,!1,null,G),Z=0>Math.round(X.x)||0==Math.round(X.x)&&0>=Math.round(X.y)?1:-1,G=!1,"sharp"==I?(m.lineTo(ha.x-X.y*Z,ha.y+X.x*Z),m.lineTo(Q.x-X.y*Z,Q.y+X.x*Z),m.lineTo(Q.x,Q.y)):"line"==I?(m.moveTo(ha.x+X.y*Z,ha.y-X.x*Z),m.lineTo(ha.x-
-X.y*Z,ha.y+X.x*Z),m.moveTo(Q.x-X.y*Z,Q.y+X.x*Z),m.lineTo(Q.x+X.y*Z,Q.y-X.x*Z),m.moveTo(Q.x,Q.y)):"arc"==I?(Z*=1.3,m.curveTo(ha.x-X.y*Z,ha.y+X.x*Z,Q.x-X.y*Z,Q.y+X.x*Z,Q.x,Q.y)):(m.moveTo(Q.x,Q.y),G=!0),Z=[Q],ha=!0))}else X=null;ha||(Z.push(W),Y=W)}this.addPoints(m,Z,y,F,!1,null,G);m.stroke()}};var E=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(m,q,y,F){return null!=q&&"centerPerimeter"==q.style[mxConstants.STYLE_PERIMETER]?new mxPoint(q.getCenterX(),
-q.getCenterY()):E.apply(this,arguments)};var d=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(m,q,y,F){if(null==q||null==m||"1"!=q.style.snapToPoint&&"1"!=m.style.snapToPoint)d.apply(this,arguments);else{q=this.getTerminalPort(m,q,F);var C=this.getNextPoint(m,y,F),I=this.graph.isOrthogonal(m),G=mxUtils.toRadians(Number(q.style[mxConstants.STYLE_ROTATION]||"0")),Y=new mxPoint(q.getCenterX(),q.getCenterY());if(0!=G){var ba=Math.cos(-G),Z=
-Math.sin(-G);C=mxUtils.getRotatedPoint(C,ba,Z,Y)}ba=parseFloat(m.style[mxConstants.STYLE_PERIMETER_SPACING]||0);ba+=parseFloat(m.style[F?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);C=this.getPerimeterPoint(q,C,0==G&&I,ba);0!=G&&(ba=Math.cos(G),Z=Math.sin(G),C=mxUtils.getRotatedPoint(C,ba,Z,Y));m.setAbsoluteTerminalPoint(this.snapToAnchorPoint(m,q,y,F,C),F)}};mxGraphView.prototype.snapToAnchorPoint=function(m,q,y,F,C){if(null!=q&&null!=m){m=this.graph.getAllConnectionConstraints(q);
-F=y=null;if(null!=m)for(var I=0;I<m.length;I++){var G=this.graph.getConnectionPoint(q,m[I]);if(null!=G){var Y=(G.x-C.x)*(G.x-C.x)+(G.y-C.y)*(G.y-C.y);if(null==F||Y<F)y=G,F=Y}}null!=y&&(C=y)}return C};var f=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(m,q,y){var F=f.apply(this,arguments);"1"==m.getAttribute("placeholders")&&null!=y.state&&(F=y.state.view.graph.replacePlaceholders(y.state.cell,F));return F};var g=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=
-function(m){if(null!=m.style&&"undefined"!==typeof pako){var q=mxUtils.getValue(m.style,mxConstants.STYLE_SHAPE,null);if(null!=q&&"string"===typeof q&&"stencil("==q.substring(0,8))try{var y=q.substring(8,q.length-1),F=mxUtils.parseXml(Graph.decompress(y));return new mxShape(new mxStencil(F.documentElement))}catch(C){null!=window.console&&console.log("Error in shape: "+C)}}return g.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;
-mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];mxStencilRegistry.filesLoaded={};
+function(m){D.apply(this,arguments);this.graph.model.isEdge(m.cell)&&1!=m.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(m)};mxGraphView.prototype.updateLineJumps=function(m){var q=m.absolutePoints;if(Graph.lineJumpsEnabled){var y=null!=m.routedPoints,F=null;if(null!=q&&null!=this.validEdges&&"none"!==mxUtils.getValue(m.style,"jumpStyle","none")){var C=function(ma,T,M){var ia=new mxPoint(T,M);ia.type=ma;F.push(ia);ia=null!=m.routedPoints?m.routedPoints[F.length-1]:null;return null==ia||ia.type!=
+ma||ia.x!=T||ia.y!=M},I=.5*this.scale;y=!1;F=[];for(var G=0;G<q.length-1;G++){for(var Z=q[G+1],ca=q[G],aa=[],Y=q[G+2];G<q.length-2&&mxUtils.ptSegDistSq(ca.x,ca.y,Y.x,Y.y,Z.x,Z.y)<1*this.scale*this.scale;)Z=Y,G++,Y=q[G+2];y=C(0,ca.x,ca.y)||y;for(var pa=0;pa<this.validEdges.length;pa++){var Q=this.validEdges[pa],X=Q.absolutePoints;if(null!=X&&mxUtils.intersects(m,Q)&&"1"!=Q.style.noJump)for(Q=0;Q<X.length-1;Q++){var ha=X[Q+1],U=X[Q];for(Y=X[Q+2];Q<X.length-2&&mxUtils.ptSegDistSq(U.x,U.y,Y.x,Y.y,ha.x,
+ha.y)<1*this.scale*this.scale;)ha=Y,Q++,Y=X[Q+2];Y=mxUtils.intersection(ca.x,ca.y,Z.x,Z.y,U.x,U.y,ha.x,ha.y);if(null!=Y&&(Math.abs(Y.x-ca.x)>I||Math.abs(Y.y-ca.y)>I)&&(Math.abs(Y.x-Z.x)>I||Math.abs(Y.y-Z.y)>I)&&(Math.abs(Y.x-U.x)>I||Math.abs(Y.y-U.y)>I)&&(Math.abs(Y.x-ha.x)>I||Math.abs(Y.y-ha.y)>I)){ha=Y.x-ca.x;U=Y.y-ca.y;Y={distSq:ha*ha+U*U,x:Y.x,y:Y.y};for(ha=0;ha<aa.length;ha++)if(aa[ha].distSq>Y.distSq){aa.splice(ha,0,Y);Y=null;break}null==Y||0!=aa.length&&aa[aa.length-1].x===Y.x&&aa[aa.length-
+1].y===Y.y||aa.push(Y)}}}for(Q=0;Q<aa.length;Q++)y=C(1,aa[Q].x,aa[Q].y)||y}Y=q[q.length-1];y=C(0,Y.x,Y.y)||y}m.routedPoints=F;return y}return!1};var t=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(m,q,y){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)t.apply(this,arguments);else{var F=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
+mxConstants.LINE_ARCSIZE)/2,C=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,I=mxUtils.getValue(this.style,"jumpStyle","none"),G=!0,Z=null,ca=null,aa=[],Y=null;m.begin();for(var pa=0;pa<this.state.routedPoints.length;pa++){var Q=this.state.routedPoints[pa],X=new mxPoint(Q.x/this.scale,Q.y/this.scale);0==pa?X=q[0]:pa==this.state.routedPoints.length-1&&(X=q[q.length-1]);var ha=!1;if(null!=Z&&1==Q.type){var U=this.state.routedPoints[pa+1];Q=U.x/this.scale-
+X.x;U=U.y/this.scale-X.y;Q=Q*Q+U*U;null==Y&&(Y=new mxPoint(X.x-Z.x,X.y-Z.y),ca=Math.sqrt(Y.x*Y.x+Y.y*Y.y),0<ca?(Y.x=Y.x*C/ca,Y.y=Y.y*C/ca):Y=null);Q>C*C&&0<ca&&(Q=Z.x-X.x,U=Z.y-X.y,Q=Q*Q+U*U,Q>C*C&&(ha=new mxPoint(X.x-Y.x,X.y-Y.y),Q=new mxPoint(X.x+Y.x,X.y+Y.y),aa.push(ha),this.addPoints(m,aa,y,F,!1,null,G),aa=0>Math.round(Y.x)||0==Math.round(Y.x)&&0>=Math.round(Y.y)?1:-1,G=!1,"sharp"==I?(m.lineTo(ha.x-Y.y*aa,ha.y+Y.x*aa),m.lineTo(Q.x-Y.y*aa,Q.y+Y.x*aa),m.lineTo(Q.x,Q.y)):"line"==I?(m.moveTo(ha.x+
+Y.y*aa,ha.y-Y.x*aa),m.lineTo(ha.x-Y.y*aa,ha.y+Y.x*aa),m.moveTo(Q.x-Y.y*aa,Q.y+Y.x*aa),m.lineTo(Q.x+Y.y*aa,Q.y-Y.x*aa),m.moveTo(Q.x,Q.y)):"arc"==I?(aa*=1.3,m.curveTo(ha.x-Y.y*aa,ha.y+Y.x*aa,Q.x-Y.y*aa,Q.y+Y.x*aa,Q.x,Q.y)):(m.moveTo(Q.x,Q.y),G=!0),aa=[Q],ha=!0))}else Y=null;ha||(aa.push(X),Z=X)}this.addPoints(m,aa,y,F,!1,null,G);m.stroke()}};var E=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(m,q,y,F){return null!=q&&"centerPerimeter"==q.style[mxConstants.STYLE_PERIMETER]?
+new mxPoint(q.getCenterX(),q.getCenterY()):E.apply(this,arguments)};var d=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(m,q,y,F){if(null==q||null==m||"1"!=q.style.snapToPoint&&"1"!=m.style.snapToPoint)d.apply(this,arguments);else{q=this.getTerminalPort(m,q,F);var C=this.getNextPoint(m,y,F),I=this.graph.isOrthogonal(m),G=mxUtils.toRadians(Number(q.style[mxConstants.STYLE_ROTATION]||"0")),Z=new mxPoint(q.getCenterX(),q.getCenterY());if(0!=
+G){var ca=Math.cos(-G),aa=Math.sin(-G);C=mxUtils.getRotatedPoint(C,ca,aa,Z)}ca=parseFloat(m.style[mxConstants.STYLE_PERIMETER_SPACING]||0);ca+=parseFloat(m.style[F?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);C=this.getPerimeterPoint(q,C,0==G&&I,ca);0!=G&&(ca=Math.cos(G),aa=Math.sin(G),C=mxUtils.getRotatedPoint(C,ca,aa,Z));m.setAbsoluteTerminalPoint(this.snapToAnchorPoint(m,q,y,F,C),F)}};mxGraphView.prototype.snapToAnchorPoint=function(m,q,y,F,C){if(null!=
+q&&null!=m){m=this.graph.getAllConnectionConstraints(q);F=y=null;if(null!=m)for(var I=0;I<m.length;I++){var G=this.graph.getConnectionPoint(q,m[I]);if(null!=G){var Z=(G.x-C.x)*(G.x-C.x)+(G.y-C.y)*(G.y-C.y);if(null==F||Z<F)y=G,F=Z}}null!=y&&(C=y)}return C};var f=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(m,q,y){var F=f.apply(this,arguments);"1"==m.getAttribute("placeholders")&&null!=y.state&&(F=y.state.view.graph.replacePlaceholders(y.state.cell,F));
+return F};var g=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(m){if(null!=m.style&&"undefined"!==typeof pako){var q=mxUtils.getValue(m.style,mxConstants.STYLE_SHAPE,null);if(null!=q&&"string"===typeof q&&"stencil("==q.substring(0,8))try{var y=q.substring(8,q.length-1),F=mxUtils.parseXml(Graph.decompress(y));return new mxShape(new mxStencil(F.documentElement))}catch(C){null!=window.console&&console.log("Error in shape: "+C)}}return g.apply(this,arguments)}})();
+mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];mxStencilRegistry.filesLoaded={};
mxStencilRegistry.getStencil=function(b){var e=mxStencilRegistry.stencils[b];if(null==e&&null==mxCellRenderer.defaultShapes[b]&&mxStencilRegistry.dynamicLoading){var k=mxStencilRegistry.getBasenameForStencil(b);if(null!=k){e=mxStencilRegistry.libraries[k];if(null!=e){if(null==mxStencilRegistry.packages[k]){for(var n=0;n<e.length;n++){var D=e[n];if(!mxStencilRegistry.filesLoaded[D])if(mxStencilRegistry.filesLoaded[D]=!0,".xml"==D.toLowerCase().substring(D.length-4,D.length))mxStencilRegistry.loadStencilSet(D,
null);else if(".js"==D.toLowerCase().substring(D.length-3,D.length))try{if(mxStencilRegistry.allowEval){var t=mxUtils.load(D);null!=t&&200<=t.getStatus()&&299>=t.getStatus()&&eval.call(window,t.getText())}}catch(E){null!=window.console&&console.log("error in getStencil:",b,k,e,D,E)}}mxStencilRegistry.packages[k]=1}}else k=k.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+k+".xml",null);e=mxStencilRegistry.stencils[b]}}return e};
mxStencilRegistry.getBasenameForStencil=function(b){var e=null;if(null!=b&&"string"===typeof b&&(b=b.split("."),0<b.length&&"mxgraph"==b[0])){e=b[1];for(var k=2;k<b.length-1;k++)e+="/"+b[k]}return e};
@@ -2489,140 +2492,140 @@ mxConstants.HANDLE_STROKECOLOR="#0088cf";mxConstants.VERTEX_SELECTION_COLOR="#00
!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents=!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(z){return!mxEvent.isAltDown(z)};var k=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(z){return k.apply(this,arguments)||this.graph.isTableRow(z)||this.graph.isTableCell(z)};var n=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=function(z){return n.apply(this,arguments)||
this.graph.isEdgeIgnored(z)};var D=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(z){return this.graph.isCloneEvent(z)!=D.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var z=new mxEllipse(null,this.highlightColor,this.highlightColor,0);z.opacity=mxConstants.HIGHLIGHT_OPACITY;return z};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor="crosshair";mxConnectionHandler.prototype.createEdgeState=
function(z){z=this.graph.createCurrentEdgeStyle();z=this.graph.createEdge(null,null,null,null,null,z);z=new mxCellState(this.graph.view,z,this.graph.getCellStyle(z));for(var K in this.graph.currentEdgeStyle)z.style[K]=this.graph.currentEdgeStyle[K];z.style=this.graph.postProcessCellStyle(z.cell,z.style);return z};var t=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var z=t.apply(this,arguments);z.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];
-return z};mxConnectionHandler.prototype.updatePreview=function(z){};var E=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var z=E.apply(this,arguments),K=z.getCell;z.getCell=mxUtils.bind(this,function(M){var T=K.apply(this,arguments);this.error=null;return T});return z};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=
-function(){for(var z="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",K="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),M=0;M<K.length;M++)null!=this.currentEdgeStyle[K[M]]&&(z+=K[M]+"="+this.currentEdgeStyle[K[M]]+";");null!=this.currentEdgeStyle.orthogonalLoop?z+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&
+return z};mxConnectionHandler.prototype.updatePreview=function(z){};var E=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var z=E.apply(this,arguments),K=z.getCell;z.getCell=mxUtils.bind(this,function(L){var S=K.apply(this,arguments);this.error=null;return S});return z};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=
+function(){for(var z="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",K="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),L=0;L<K.length;L++)null!=this.currentEdgeStyle[K[L]]&&(z+=K[L]+"="+this.currentEdgeStyle[K[L]]+";");null!=this.currentEdgeStyle.orthogonalLoop?z+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&
(z+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?z+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(z+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(z+="elbow="+this.currentEdgeStyle.elbow+";");return z=null!=this.currentEdgeStyle.html?z+("html="+this.currentEdgeStyle.html+";"):z+"html=1;"};
-Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var z=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=z&&(new mxCodec(z.ownerDocument)).decode(z,this.getStylesheet())};Graph.prototype.createCellLookup=function(z,K){K=null!=K?K:{};for(var M=0;M<z.length;M++){var T=z[M];K[mxObjectIdentity.get(T)]=T.getId();for(var V=this.model.getChildCount(T),
-ia=0;ia<V;ia++)this.createCellLookup([this.model.getChildAt(T,ia)],K)}return K};Graph.prototype.createCellMapping=function(z,K,M){M=null!=M?M:{};for(var T in z){var V=K[T];null==M[V]&&(M[V]=z[T].getId()||"")}return M};Graph.prototype.importGraphModel=function(z,K,M,T){K=null!=K?K:0;M=null!=M?M:0;var V=new mxCodec(z.ownerDocument),ia=new mxGraphModel;V.decode(z,ia);z=[];V={};var na={},va=ia.getChildren(this.cloneCell(ia.root,this.isCloneInvalidEdges(),V));if(null!=va){var pa=this.createCellLookup([ia.root]);
-va=va.slice();this.model.beginUpdate();try{if(1!=va.length||this.isCellLocked(this.getDefaultParent()))for(ia=0;ia<va.length;ia++)za=this.model.getChildren(this.moveCells([va[ia]],K,M,!1,this.model.getRoot())[0]),null!=za&&(z=z.concat(za));else{var za=ia.getChildren(va[0]);null!=za&&(z=this.moveCells(za,K,M,!1,this.getDefaultParent()),na[ia.getChildAt(ia.root,0).getId()]=this.getDefaultParent().getId())}if(null!=z&&(this.createCellMapping(V,pa,na),this.updateCustomLinks(na,z),T)){this.isGridEnabled()&&
-(K=this.snap(K),M=this.snap(M));var Da=this.getBoundingBoxFromGeometry(z,!0);null!=Da&&this.moveCells(z,K-Da.x,M-Da.y)}}finally{this.model.endUpdate()}}return z};Graph.prototype.encodeCells=function(z){for(var K={},M=this.cloneCells(z,null,K),T=new mxDictionary,V=0;V<z.length;V++)T.put(z[V],!0);var ia=new mxCodec,na=new mxGraphModel,va=na.getChildAt(na.getRoot(),0);for(V=0;V<M.length;V++){na.add(va,M[V]);var pa=this.view.getState(z[V]);if(null!=pa){var za=this.getCellGeometry(M[V]);null!=za&&za.relative&&
-!this.model.isEdge(z[V])&&null==T.get(this.model.getParent(z[V]))&&(za.offset=null,za.relative=!1,za.x=pa.x/pa.view.scale-pa.view.translate.x,za.y=pa.y/pa.view.scale-pa.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(K,this.createCellLookup(z)),M);return ia.encode(na)};Graph.prototype.isSwimlane=function(z,K){var M=null;null==z||this.model.isEdge(z)||this.model.getParent(z)==this.model.getRoot()||(M=this.getCurrentCellStyle(z,K)[mxConstants.STYLE_SHAPE]);return M==mxConstants.SHAPE_SWIMLANE||
-"table"==M||"tableRow"==M};var d=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(z){var K=this.model.getParent(z);if(null!=K){var M=this.getCurrentCellStyle(K);if(null!=M.expand)return"0"!=M.expand}return d.apply(this,arguments)&&(null==K||!this.isTable(K))};var f=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(z,K,M,T,V,ia,na,va){null==va&&(va=this.model.getParent(z),this.isTable(va)||this.isTableRow(va))&&(va=this.getCellAt(ia,na,null,!0,!1));M=null;this.model.beginUpdate();
-try{M=f.apply(this,[z,K,M,T,V,ia,na,va]);this.model.setValue(M,"");var pa=this.getChildCells(M,!0);for(K=0;K<pa.length;K++){var za=this.getCellGeometry(pa[K]);null!=za&&za.relative&&0<za.x&&this.model.remove(pa[K])}var Da=this.getChildCells(z,!0);for(K=0;K<Da.length;K++)za=this.getCellGeometry(Da[K]),null!=za&&za.relative&&0>=za.x&&this.model.remove(Da[K]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[M]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[M]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
-null,[z]);this.setCellStyles(mxConstants.STYLE_STARTARROW,mxConstants.NONE,[z]);var Ma=this.model.getTerminal(M,!1);if(null!=Ma){var La=this.getCurrentCellStyle(Ma);null!=La&&"1"==La.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[z]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[z]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[M]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[M]))}}finally{this.model.endUpdate()}return M};var g=Graph.prototype.selectCell;Graph.prototype.selectCell=
-function(z,K,M){if(K||M)g.apply(this,arguments);else{var T=this.getSelectionCell(),V=null,ia=[],na=mxUtils.bind(this,function(va){if(null!=this.view.getState(va)&&(this.model.isVertex(va)||this.model.isEdge(va)))if(ia.push(va),va==T)V=ia.length-1;else if(z&&null==T&&0<ia.length||null!=V&&z&&ia.length>V||!z&&0<V)return;for(var pa=0;pa<this.model.getChildCount(va);pa++)na(this.model.getChildAt(va,pa))});na(this.model.root);0<ia.length&&(V=null!=V?mxUtils.mod(V+(z?1:-1),ia.length):0,this.setSelectionCell(ia[V]))}};
-Graph.prototype.swapShapes=function(z,K,M,T,V,ia,na){K=!1;if(!T&&null!=V&&1==z.length&&(T=this.view.getState(V),M=this.view.getState(z[0]),null!=T&&null!=M&&(null!=ia&&mxEvent.isShiftDown(ia)||"umlLifeline"==T.style.shape&&"umlLifeline"==M.style.shape)&&(T=this.getCellGeometry(V),ia=this.getCellGeometry(z[0]),null!=T&&null!=ia))){K=T.clone();T=ia.clone();T.x=K.x;T.y=K.y;K.x=ia.x;K.y=ia.y;this.model.beginUpdate();try{this.model.setGeometry(V,K),this.model.setGeometry(z[0],T)}finally{this.model.endUpdate()}K=
-!0}return K};var m=Graph.prototype.moveCells;Graph.prototype.moveCells=function(z,K,M,T,V,ia,na){if(this.swapShapes(z,K,M,T,V,ia,na))return z;na=null!=na?na:{};if(this.isTable(V)){for(var va=[],pa=0;pa<z.length;pa++)this.isTable(z[pa])?va=va.concat(this.model.getChildCells(z[pa],!0).reverse()):va.push(z[pa]);z=va}this.model.beginUpdate();try{va=[];for(pa=0;pa<z.length;pa++)if(null!=V&&this.isTableRow(z[pa])){var za=this.model.getParent(z[pa]),Da=this.getCellGeometry(z[pa]);this.isTable(za)&&va.push(za);
-if(null!=za&&null!=Da&&this.isTable(za)&&this.isTable(V)&&(T||za!=V)){if(!T){var Ma=this.getCellGeometry(za);null!=Ma&&(Ma=Ma.clone(),Ma.height-=Da.height,this.model.setGeometry(za,Ma))}Ma=this.getCellGeometry(V);null!=Ma&&(Ma=Ma.clone(),Ma.height+=Da.height,this.model.setGeometry(V,Ma));var La=this.model.getChildCells(V,!0);if(0<La.length){z[pa]=T?this.cloneCell(z[pa]):z[pa];var Ua=this.model.getChildCells(z[pa],!0),Sa=this.model.getChildCells(La[0],!0),Fa=Sa.length-Ua.length;if(0<Fa)for(var wa=
-0;wa<Fa;wa++){var ya=this.cloneCell(Ua[Ua.length-1]);null!=ya&&(ya.value="",this.model.add(z[pa],ya))}else if(0>Fa)for(wa=0;wa>Fa;wa--)this.model.remove(Ua[Ua.length+wa-1]);Ua=this.model.getChildCells(z[pa],!0);for(wa=0;wa<Sa.length;wa++){var Na=this.getCellGeometry(Sa[wa]),Ja=this.getCellGeometry(Ua[wa]);null!=Na&&null!=Ja&&(Ja=Ja.clone(),Ja.width=Na.width,this.model.setGeometry(Ua[wa],Ja))}}}}var Qa=m.apply(this,arguments);for(pa=0;pa<va.length;pa++)!T&&this.model.contains(va[pa])&&0==this.model.getChildCount(va[pa])&&
-this.model.remove(va[pa]);T&&this.updateCustomLinks(this.createCellMapping(na,this.createCellLookup(z)),Qa)}finally{this.model.endUpdate()}return Qa};var q=Graph.prototype.removeCells;Graph.prototype.removeCells=function(z,K){var M=[];this.model.beginUpdate();try{for(var T=0;T<z.length;T++)if(this.isTableCell(z[T])){var V=this.model.getParent(z[T]),ia=this.model.getParent(V);1==this.model.getChildCount(V)&&1==this.model.getChildCount(ia)?0>mxUtils.indexOf(z,ia)&&0>mxUtils.indexOf(M,ia)&&M.push(ia):
-this.labelChanged(z[T],"")}else{if(this.isTableRow(z[T])&&(ia=this.model.getParent(z[T]),0>mxUtils.indexOf(z,ia)&&0>mxUtils.indexOf(M,ia))){for(var na=this.model.getChildCells(ia,!0),va=0,pa=0;pa<na.length;pa++)0<=mxUtils.indexOf(z,na[pa])&&va++;va==na.length&&M.push(ia)}M.push(z[T])}M=q.apply(this,[M,K])}finally{this.model.endUpdate()}return M};Graph.prototype.updateCustomLinks=function(z,K,M){M=null!=M?M:new Graph;for(var T=0;T<K.length;T++)null!=K[T]&&M.updateCustomLinksForCell(z,K[T],M)};Graph.prototype.updateCustomLinksForCell=
-function(z,K){this.doUpdateCustomLinksForCell(z,K);for(var M=this.model.getChildCount(K),T=0;T<M;T++)this.updateCustomLinksForCell(z,this.model.getChildAt(K,T))};Graph.prototype.doUpdateCustomLinksForCell=function(z,K){};Graph.prototype.getAllConnectionConstraints=function(z,K){if(null!=z){K=mxUtils.getValue(z.style,"points",null);if(null!=K){z=[];try{var M=JSON.parse(K);for(K=0;K<M.length;K++){var T=M[K];z.push(new mxConnectionConstraint(new mxPoint(T[0],T[1]),2<T.length?"0"!=T[2]:!0,null,3<T.length?
-T[3]:0,4<T.length?T[4]:0))}}catch(ia){}return z}if(null!=z.shape&&null!=z.shape.bounds){T=z.shape.direction;K=z.shape.bounds;var V=z.shape.scale;M=K.width/V;K=K.height/V;if(T==mxConstants.DIRECTION_NORTH||T==mxConstants.DIRECTION_SOUTH)T=M,M=K,K=T;K=z.shape.getConstraints(z.style,M,K);if(null!=K)return K;if(null!=z.shape.stencil&&null!=z.shape.stencil.constraints)return z.shape.stencil.constraints;if(null!=z.shape.constraints)return z.shape.constraints}}return null};Graph.prototype.flipEdge=function(z){if(null!=
-z){var K=this.getCurrentCellStyle(z);K=mxUtils.getValue(K,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,K,[z])}};Graph.prototype.isValidRoot=function(z){for(var K=this.model.getChildCount(z),M=0,T=0;T<K;T++){var V=this.model.getChildAt(z,T);this.model.isVertex(V)&&(V=this.getCellGeometry(V),null==V||V.relative||M++)}return 0<M||this.isContainer(z)};Graph.prototype.isValidDropTarget=
-function(z,K,M){for(var T=this.getCurrentCellStyle(z),V=!0,ia=!0,na=0;na<K.length&&ia;na++)V=V&&this.isTable(K[na]),ia=ia&&this.isTableRow(K[na]);return(1==K.length&&null!=M&&mxEvent.isShiftDown(M)&&!mxEvent.isControlDown(M)&&!mxEvent.isAltDown(M)||("1"!=mxUtils.getValue(T,"part","0")||this.isContainer(z))&&"0"!=mxUtils.getValue(T,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(z))&&!this.isTableRow(z)&&(!this.isTable(z)||ia||V))&&!this.isCellLocked(z)};
-Graph.prototype.createGroupCell=function(){var z=mxGraph.prototype.createGroupCell.apply(this,arguments);z.setStyle("group");return z};Graph.prototype.isExtendParentsOnAdd=function(z){var K=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(K&&null!=z&&null!=this.layoutManager){var M=this.model.getParent(z);null!=M&&(M=this.layoutManager.getLayout(M),null!=M&&M.constructor==mxStackLayout&&(K=!1))}return K};Graph.prototype.getPreferredSizeForCell=function(z){var K=mxGraph.prototype.getPreferredSizeForCell.apply(this,
-arguments);null!=K&&(K.width+=10,K.height+=4,this.gridEnabled&&(K.width=this.snap(K.width),K.height=this.snap(K.height)));return K};Graph.prototype.turnShapes=function(z,K){var M=this.getModel(),T=[];M.beginUpdate();try{for(var V=0;V<z.length;V++){var ia=z[V];if(M.isEdge(ia)){var na=M.getTerminal(ia,!0),va=M.getTerminal(ia,!1);M.setTerminal(ia,va,!0);M.setTerminal(ia,na,!1);var pa=M.getGeometry(ia);if(null!=pa){pa=pa.clone();null!=pa.points&&pa.points.reverse();var za=pa.getTerminalPoint(!0),Da=pa.getTerminalPoint(!1);
-pa.setTerminalPoint(za,!1);pa.setTerminalPoint(Da,!0);M.setGeometry(ia,pa);var Ma=this.view.getState(ia),La=this.view.getState(na),Ua=this.view.getState(va);if(null!=Ma){var Sa=null!=La?this.getConnectionConstraint(Ma,La,!0):null,Fa=null!=Ua?this.getConnectionConstraint(Ma,Ua,!1):null;this.setConnectionConstraint(ia,na,!0,Fa);this.setConnectionConstraint(ia,va,!1,Sa);var wa=mxUtils.getValue(Ma.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
-mxUtils.getValue(Ma.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[ia]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,wa,[ia])}T.push(ia)}}else if(M.isVertex(ia)&&(pa=this.getCellGeometry(ia),null!=pa)){if(!(this.isTable(ia)||this.isTableRow(ia)||this.isTableCell(ia)||this.isSwimlane(ia))){pa=pa.clone();pa.x+=pa.width/2-pa.height/2;pa.y+=pa.height/2-pa.width/2;var ya=pa.width;pa.width=pa.height;pa.height=ya;M.setGeometry(ia,pa)}var Na=this.view.getState(ia);if(null!=Na){var Ja=
-[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],Qa=mxUtils.getValue(Na.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,Ja[mxUtils.mod(mxUtils.indexOf(Ja,Qa)+(K?-1:1),Ja.length)],[ia])}T.push(ia)}}}finally{M.endUpdate()}return T};Graph.prototype.stencilHasPlaceholders=function(z){if(null!=z&&null!=z.fgNode)for(z=z.fgNode.firstChild;null!=z;){if("text"==z.nodeName&&"1"==z.getAttribute("placeholders"))return!0;
-z=z.nextSibling}return!1};var y=Graph.prototype.processChange;Graph.prototype.processChange=function(z){if(z instanceof mxGeometryChange&&(this.isTableCell(z.cell)||this.isTableRow(z.cell))&&(null==z.previous&&null!=z.geometry||null!=z.previous&&!z.previous.equals(z.geometry))){var K=z.cell;this.isTableCell(K)&&(K=this.model.getParent(K));this.isTableRow(K)&&(K=this.model.getParent(K));var M=this.view.getState(K);null!=M&&null!=M.shape&&(this.view.invalidate(K),M.shape.bounds=null)}y.apply(this,arguments);
-z instanceof mxValueChange&&null!=z.cell&&null!=z.cell.value&&"object"==typeof z.cell.value&&this.invalidateDescendantsWithPlaceholders(z.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(z){z=this.model.getDescendants(z);if(0<z.length)for(var K=0;K<z.length;K++){var M=this.view.getState(z[K]);null!=M&&null!=M.shape&&null!=M.shape.stencil&&this.stencilHasPlaceholders(M.shape.stencil)?this.removeStateForCell(z[K]):this.isReplacePlaceholders(z[K])&&this.view.invalidate(z[K],!1,!1)}};
-Graph.prototype.replaceElement=function(z,K){K=z.ownerDocument.createElement(null!=K?K:"span");for(var M=Array.prototype.slice.call(z.attributes);attr=M.pop();)K.setAttribute(attr.nodeName,attr.nodeValue);K.innerHTML=z.innerHTML;z.parentNode.replaceChild(K,z)};Graph.prototype.processElements=function(z,K){if(null!=z){z=z.getElementsByTagName("*");for(var M=0;M<z.length;M++)K(z[M])}};Graph.prototype.updateLabelElements=function(z,K,M){z=null!=z?z:this.getSelectionCells();for(var T=document.createElement("div"),
-V=0;V<z.length;V++)if(this.isHtmlLabel(z[V])){var ia=this.convertValueToString(z[V]);if(null!=ia&&0<ia.length){T.innerHTML=ia;for(var na=T.getElementsByTagName(null!=M?M:"*"),va=0;va<na.length;va++)K(na[va]);T.innerHTML!=ia&&this.cellLabelChanged(z[V],T.innerHTML)}}};Graph.prototype.cellLabelChanged=function(z,K,M){K=Graph.zapGremlins(K);this.model.beginUpdate();try{if(null!=z.value&&"object"==typeof z.value){if(this.isReplacePlaceholders(z)&&null!=z.getAttribute("placeholder"))for(var T=z.getAttribute("placeholder"),
-V=z;null!=V;){if(V==this.model.getRoot()||null!=V.value&&"object"==typeof V.value&&V.hasAttribute(T)){this.setAttributeForCell(V,T,K);break}V=this.model.getParent(V)}var ia=z.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&ia.hasAttribute("label_"+Graph.diagramLanguage)?ia.setAttribute("label_"+Graph.diagramLanguage,K):ia.setAttribute("label",K);K=ia}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(z){if(null!=
-z){for(var K=new mxDictionary,M=0;M<z.length;M++)K.put(z[M],!0);var T=[];for(M=0;M<z.length;M++){var V=this.model.getParent(z[M]);null==V||K.get(V)||(K.put(V,!0),T.push(V))}for(M=0;M<T.length;M++)if(V=this.view.getState(T[M]),null!=V&&(this.model.isEdge(V.cell)||this.model.isVertex(V.cell))&&this.isCellDeletable(V.cell)&&this.isTransparentState(V)){for(var ia=!0,na=0;na<this.model.getChildCount(V.cell)&&ia;na++)K.get(this.model.getChildAt(V.cell,na))||(ia=!1);ia&&z.push(V.cell)}}mxGraph.prototype.cellsRemoved.apply(this,
-arguments)};Graph.prototype.removeCellsAfterUngroup=function(z){for(var K=[],M=0;M<z.length;M++)this.isCellDeletable(z[M])&&this.isTransparentState(this.view.getState(z[M]))&&K.push(z[M]);z=K;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(z,K){this.setAttributeForCell(z,"link",K)};Graph.prototype.setTooltipForCell=function(z,K){var M="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(z.value)&&z.value.hasAttribute("tooltip_"+
-Graph.diagramLanguage)&&(M="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(z,M,K)};Graph.prototype.getAttributeForCell=function(z,K,M){z=null!=z.value&&"object"===typeof z.value?z.value.getAttribute(K):null;return null!=z?z:M};Graph.prototype.setAttributeForCell=function(z,K,M){if(null!=z.value&&"object"==typeof z.value)var T=z.value.cloneNode(!0);else T=mxUtils.createXmlDocument().createElement("UserObject"),T.setAttribute("label",z.value||"");null!=M?T.setAttribute(K,M):T.removeAttribute(K);
-this.model.setValue(z,T)};var F=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(z,K,M,T){this.getModel();if(mxEvent.isAltDown(K))return null;for(var V=0;V<z.length;V++){var ia=this.model.getParent(z[V]);if(this.model.isEdge(ia)&&0>mxUtils.indexOf(z,ia))return null}ia=F.apply(this,arguments);var na=!0;for(V=0;V<z.length&&na;V++)na=na&&this.isTableRow(z[V]);na&&(this.isTableCell(ia)&&(ia=this.model.getParent(ia)),this.isTableRow(ia)&&(ia=this.model.getParent(ia)),this.isTable(ia)||
-(ia=null));return ia};Graph.prototype.click=function(z){mxGraph.prototype.click.call(this,z);this.firstClickState=z.getState();this.firstClickSource=z.getSource()};Graph.prototype.dblClick=function(z,K){this.isEnabled()&&(K=this.insertTextForEvent(z,K),mxGraph.prototype.dblClick.call(this,z,K))};Graph.prototype.insertTextForEvent=function(z,K){var M=mxUtils.convertPoint(this.container,mxEvent.getClientX(z),mxEvent.getClientY(z));if(null!=z&&!this.model.isVertex(K)){var T=this.model.isEdge(K)?this.view.getState(K):
-null,V=mxEvent.getSource(z);this.firstClickState!=T||this.firstClickSource!=V||null!=T&&null!=T.text&&null!=T.text.node&&null!=T.text.boundingBox&&(mxUtils.contains(T.text.boundingBox,M.x,M.y)||mxUtils.isAncestorNode(T.text.node,mxEvent.getSource(z)))||(null!=T||this.isCellLocked(this.getDefaultParent()))&&(null==T||this.isCellLocked(T.cell))||!(null!=T||mxClient.IS_SVG&&V==this.view.getCanvas().ownerSVGElement)||(null==T&&(T=this.view.getState(this.getCellAt(M.x,M.y))),K=this.addText(M.x,M.y,T))}return K};
-Graph.prototype.getInsertPoint=function(){var z=this.getGridSize(),K=this.container.scrollLeft/this.view.scale-this.view.translate.x,M=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var T=this.getPageLayout(),V=this.getPageSize();K=Math.max(K,T.x*V.width);M=Math.max(M,T.y*V.height)}return new mxPoint(this.snap(K+z),this.snap(M+z))};Graph.prototype.getFreeInsertPoint=function(){var z=this.view,K=this.getGraphBounds(),M=this.getInsertPoint(),T=this.snap(Math.round(Math.max(M.x,
-K.x/z.scale-z.translate.x+(0==K.width?2*this.gridSize:0))));z=this.snap(Math.round(Math.max(M.y,(K.y+K.height)/z.scale-z.translate.y+2*this.gridSize)));return new mxPoint(T,z)};Graph.prototype.getCenterInsertPoint=function(z){z=null!=z?z:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap(Math.round((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-z.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/
-2)/this.view.scale-this.view.translate.y-z.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-z.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-z.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(z,K,M){var T=new mxCell;T.value="Text";T.geometry=new mxGeometry(0,0,0,0);T.vertex=!0;if(null!=M&&this.model.isEdge(M.cell)){T.style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];";
-T.geometry.relative=!0;T.connectable=!1;var V=this.view.getRelativePoint(M,z,K);T.geometry.x=Math.round(1E4*V.x)/1E4;T.geometry.y=Math.round(V.y);T.geometry.offset=new mxPoint(0,0);V=this.view.getPoint(M,T.geometry);var ia=this.view.scale;T.geometry.offset=new mxPoint(Math.round((z-V.x)/ia),Math.round((K-V.y)/ia))}else V=this.view.translate,T.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",T.geometry.width=40,T.geometry.height=20,T.geometry.x=Math.round(z/this.view.scale)-
-V.x-(null!=M?M.origin.x:0),T.geometry.y=Math.round(K/this.view.scale)-V.y-(null!=M?M.origin.y:0),T.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([T],null!=M?M.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[T])),this.autoSizeCell(T)}finally{this.getModel().endUpdate()}return T};Graph.prototype.addClickHandler=function(z,K,M){var T=mxUtils.bind(this,function(){var pa=this.container.getElementsByTagName("a");if(null!=pa)for(var za=0;za<pa.length;za++){var Da=
-this.getAbsoluteUrl(pa[za].getAttribute("href"));null!=Da&&(pa[za].setAttribute("rel",this.linkRelation),pa[za].setAttribute("href",Da),null!=K&&mxEvent.addGestureListeners(pa[za],null,null,K))}});this.model.addListener(mxEvent.CHANGE,T);T();var V=this.container.style.cursor,ia=this.getTolerance(),na=this,va={currentState:null,currentLink:null,currentTarget:null,highlight:null!=z&&""!=z&&z!=mxConstants.NONE?new mxCellHighlight(na,z,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(pa){var za=
-pa.sourceState;if(null==za||null==na.getLinkForCell(za.cell))pa=na.getCellAt(pa.getGraphX(),pa.getGraphY(),null,null,null,function(Da,Ma,La){return null==na.getLinkForCell(Da.cell)}),za=null==za||na.model.isAncestor(pa,za.cell)?na.view.getState(pa):null;za!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=za,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(pa,za){this.startX=za.getGraphX();this.startY=za.getGraphY();this.scrollLeft=na.container.scrollLeft;
-this.scrollTop=na.container.scrollTop;null==this.currentLink&&"auto"==na.container.style.overflow&&(na.container.style.cursor="move");this.updateCurrentState(za)},mouseMove:function(pa,za){if(na.isMouseDown)null!=this.currentLink&&(pa=Math.abs(this.startX-za.getGraphX()),za=Math.abs(this.startY-za.getGraphY()),(pa>ia||za>ia)&&this.clear());else{for(pa=za.getSource();null!=pa&&"a"!=pa.nodeName.toLowerCase();)pa=pa.parentNode;null!=pa?this.clear():(null!=na.tooltipHandler&&null!=this.currentLink&&null!=
-this.currentState&&na.tooltipHandler.reset(za,!0,this.currentState),(null==this.currentState||za.getState()!=this.currentState&&null!=za.sourceState||!na.intersects(this.currentState,za.getGraphX(),za.getGraphY()))&&this.updateCurrentState(za))}},mouseUp:function(pa,za){var Da=za.getSource();for(pa=za.getEvent();null!=Da&&"a"!=Da.nodeName.toLowerCase();)Da=Da.parentNode;null==Da&&Math.abs(this.scrollLeft-na.container.scrollLeft)<ia&&Math.abs(this.scrollTop-na.container.scrollTop)<ia&&(null==za.sourceState||
-!za.isSource(za.sourceState.control))&&((mxEvent.isLeftMouseButton(pa)||mxEvent.isMiddleMouseButton(pa))&&!mxEvent.isPopupTrigger(pa)||mxEvent.isTouchEvent(pa))&&(null!=this.currentLink?(Da=na.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&Da||null==K||K(pa,this.currentLink),mxEvent.isConsumed(pa)||(pa=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(pa)?"_blank":Da?na.linkTarget:"_top",na.openLink(this.currentLink,pa),za.consume())):null!=M&&!za.isConsumed()&&
-Math.abs(this.scrollLeft-na.container.scrollLeft)<ia&&Math.abs(this.scrollTop-na.container.scrollTop)<ia&&Math.abs(this.startX-za.getGraphX())<ia&&Math.abs(this.startY-za.getGraphY())<ia&&M(za.getEvent()));this.clear()},activate:function(pa){this.currentLink=na.getAbsoluteUrl(na.getLinkForCell(pa.cell));null!=this.currentLink&&(this.currentTarget=na.getLinkTargetForCell(pa.cell),na.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(pa))},clear:function(){null!=na.container&&
-(na.container.style.cursor=V);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=na.tooltipHandler&&na.tooltipHandler.hide()}};na.click=function(pa){};na.addMouseListener(va);mxEvent.addListener(document,"mouseleave",function(pa){va.clear()})};Graph.prototype.duplicateCells=function(z,K){z=null!=z?z:this.getSelectionCells();K=null!=K?K:!0;for(var M=0;M<z.length;M++)this.isTableCell(z[M])&&(z[M]=this.model.getParent(z[M]));z=this.model.getTopmostCells(z);
-var T=this.getModel(),V=this.gridSize,ia=[];T.beginUpdate();try{var na={},va=this.createCellLookup(z),pa=this.cloneCells(z,!1,na,!0);for(M=0;M<z.length;M++){var za=T.getParent(z[M]);if(null!=za){var Da=this.moveCells([pa[M]],V,V,!1)[0];ia.push(Da);if(K)T.add(za,pa[M]);else{var Ma=za.getIndex(z[M]);T.add(za,pa[M],Ma+1)}if(this.isTable(za)){var La=this.getCellGeometry(pa[M]),Ua=this.getCellGeometry(za);null!=La&&null!=Ua&&(Ua=Ua.clone(),Ua.height+=La.height,T.setGeometry(za,Ua))}}else ia.push(pa[M])}this.updateCustomLinks(this.createCellMapping(na,
-va),pa,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",pa))}finally{T.endUpdate()}return ia};Graph.prototype.insertImage=function(z,K,M){if(null!=z&&null!=this.cellEditor.textarea){for(var T=this.cellEditor.textarea.getElementsByTagName("img"),V=[],ia=0;ia<T.length;ia++)V.push(T[ia]);document.execCommand("insertimage",!1,z);z=this.cellEditor.textarea.getElementsByTagName("img");if(z.length==V.length+1)for(ia=z.length-1;0<=ia;ia--)if(0==ia||z[ia]!=V[ia-1]){z[ia].setAttribute("width",
-K);z[ia].setAttribute("height",M);break}}};Graph.prototype.insertLink=function(z){if(null!=this.cellEditor.textarea)if(0==z.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var K=this.cellEditor.textarea.getElementsByTagName("a"),M=[],T=0;T<K.length;T++)M.push(K[T]);document.execCommand("createlink",!1,mxUtils.trim(z));K=this.cellEditor.textarea.getElementsByTagName("a");if(K.length==M.length+1)for(T=K.length-1;0<=T;T--)if(K[T]!=M[T-1]){for(K=K[T].getElementsByTagName("a");0<K.length;){for(M=
-K[0].parentNode;null!=K[0].firstChild;)M.insertBefore(K[0].firstChild,K[0]);M.removeChild(K[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(z))};Graph.prototype.isCellResizable=function(z){var K=mxGraph.prototype.isCellResizable.apply(this,arguments),M=this.getCurrentCellStyle(z);return!this.isTableCell(z)&&!this.isTableRow(z)&&(K||"0"!=mxUtils.getValue(M,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==M[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(z,K){null==
-K&&(K=this.getSelectionCells());if(null!=K&&1<K.length){for(var M=[],T=null,V=null,ia=0;ia<K.length;ia++)if(this.getModel().isVertex(K[ia])){var na=this.view.getState(K[ia]);if(null!=na){var va=z?na.getCenterX():na.getCenterY();T=null!=T?Math.max(T,va):va;V=null!=V?Math.min(V,va):va;M.push(na)}}if(2<M.length){M.sort(function(Ma,La){return z?Ma.x-La.x:Ma.y-La.y});na=this.view.translate;va=this.view.scale;V=V/va-(z?na.x:na.y);T=T/va-(z?na.x:na.y);this.getModel().beginUpdate();try{var pa=(T-V)/(M.length-
-1);T=V;for(ia=1;ia<M.length-1;ia++){var za=this.view.getState(this.model.getParent(M[ia].cell)),Da=this.getCellGeometry(M[ia].cell);T+=pa;null!=Da&&null!=za&&(Da=Da.clone(),z?Da.x=Math.round(T-Da.width/2)-za.origin.x:Da.y=Math.round(T-Da.height/2)-za.origin.y,this.getModel().setGeometry(M[ia].cell,Da))}}finally{this.getModel().endUpdate()}}}return K};Graph.prototype.isCloneEvent=function(z){return mxClient.IS_MAC&&mxEvent.isMetaDown(z)||mxEvent.isControlDown(z)};Graph.prototype.createSvgImageExport=
-function(){var z=new mxImageExport;z.getLinkForCellState=mxUtils.bind(this,function(K,M){return this.getLinkForCell(K.cell)});return z};Graph.prototype.parseBackgroundImage=function(z){var K=null;null!=z&&0<z.length&&(z=JSON.parse(z),K=new mxImage(z.src,z.width,z.height));return K};Graph.prototype.getBackgroundImageObject=function(z){return z};Graph.prototype.getSvg=function(z,K,M,T,V,ia,na,va,pa,za,Da,Ma,La,Ua){var Sa=null;if(null!=Ua)for(Sa=new mxDictionary,Da=0;Da<Ua.length;Da++)Sa.put(Ua[Da],
-!0);if(Ua=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{K=null!=K?K:1;M=null!=M?M:0;V=null!=V?V:!0;ia=null!=ia?ia:!0;na=null!=na?na:!0;za=null!=za?za:!1;var Fa="page"==La?this.view.getBackgroundPageBounds():ia&&null==Sa||T||"diagram"==La?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),wa=this.view.scale;"diagram"==La&&null!=this.backgroundImage&&(Fa=mxRectangle.fromRectangle(Fa),Fa.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*
-wa,(this.view.translate.y+this.backgroundImage.y)*wa,this.backgroundImage.width*wa,this.backgroundImage.height*wa)));if(null==Fa)throw Error(mxResources.get("drawingEmpty"));T=K/wa;La=V?-.5:0;var ya=Graph.createSvgNode(La,La,Math.max(1,Math.ceil(Fa.width*T)+2*M)+(za&&0==M?5:0),Math.max(1,Math.ceil(Fa.height*T)+2*M)+(za&&0==M?5:0),z),Na=ya.ownerDocument,Ja=null!=Na.createElementNS?Na.createElementNS(mxConstants.NS_SVG,"g"):Na.createElement("g");ya.appendChild(Ja);var Qa=this.createSvgCanvas(Ja);Qa.foOffset=
-V?-.5:0;Qa.textOffset=V?-.5:0;Qa.imageOffset=V?-.5:0;Qa.translate(Math.floor(M/K-Fa.x/wa),Math.floor(M/K-Fa.y/wa));var Za=document.createElement("div"),cb=Qa.getAlternateText;Qa.getAlternateText=function(db,kb,ib,ob,vb,nb,Bb,yb,mb,pb,gb,rb,tb){if(null!=nb&&0<this.state.fontSize)try{mxUtils.isNode(nb)?nb=nb.innerText:(Za.innerHTML=nb,nb=mxUtils.extractTextWithWhitespace(Za.childNodes));for(var zb=Math.ceil(2*ob/this.state.fontSize),wb=[],Ab=0,lb=0;(0==zb||Ab<zb)&&lb<nb.length;){var xb=nb.charCodeAt(lb);
-if(10==xb||13==xb){if(0<Ab)break}else wb.push(nb.charAt(lb)),255>xb&&Ab++;lb++}wb.length<nb.length&&1<nb.length-wb.length&&(nb=mxUtils.trim(wb.join(""))+"...");return nb}catch(c){return cb.apply(this,arguments)}else return cb.apply(this,arguments)};var fb=this.backgroundImage;if(null!=fb){z=wa/K;var qb=this.view.translate;La=new mxRectangle((fb.x+qb.x)*z,(fb.y+qb.y)*z,fb.width*z,fb.height*z);mxUtils.intersects(Fa,La)&&Qa.image(fb.x+qb.x,fb.y+qb.y,fb.width,fb.height,fb.src,!0)}Qa.scale(T);Qa.textEnabled=
-na;va=null!=va?va:this.createSvgImageExport();var ub=va.drawCellState,ab=va.getLinkForCellState;va.getLinkForCellState=function(db,kb){var ib=ab.apply(this,arguments);return null==ib||db.view.graph.isCustomLink(ib)?null:ib};va.getLinkTargetForCellState=function(db,kb){return db.view.graph.getLinkTargetForCell(db.cell)};va.drawCellState=function(db,kb){for(var ib=db.view.graph,ob=null!=Sa?Sa.get(db.cell):ib.isCellSelected(db.cell),vb=ib.model.getParent(db.cell);!(ia&&null==Sa||ob)&&null!=vb;)ob=null!=
-Sa?Sa.get(vb):ib.isCellSelected(vb),vb=ib.model.getParent(vb);(ia&&null==Sa||ob)&&ub.apply(this,arguments)};va.drawState(this.getView().getState(this.model.root),Qa);this.updateSvgLinks(ya,pa,!0);this.addForeignObjectWarning(Qa,ya);return ya}finally{Ua&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(z,K){if("0"!=urlParams["svg-warning"]&&0<K.getElementsByTagName("foreignObject").length){var M=z.createElement("switch"),T=z.createElement("g");
-T.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var V=z.createElement("a");V.setAttribute("transform","translate(0,-5)");null==V.setAttributeNS||K.ownerDocument!=document&&null==document.documentMode?(V.setAttribute("xlink:href",Graph.foreignObjectWarningLink),V.setAttribute("target","_blank")):(V.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),V.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));z=z.createElement("text");
-z.setAttribute("text-anchor","middle");z.setAttribute("font-size","10px");z.setAttribute("x","50%");z.setAttribute("y","100%");mxUtils.write(z,Graph.foreignObjectWarningText);M.appendChild(T);V.appendChild(z);M.appendChild(V);K.appendChild(M)}};Graph.prototype.updateSvgLinks=function(z,K,M){z=z.getElementsByTagName("a");for(var T=0;T<z.length;T++)if(null==z[T].getAttribute("target")){var V=z[T].getAttribute("href");null==V&&(V=z[T].getAttribute("xlink:href"));null!=V&&(null!=K&&/^https?:\/\//.test(V)?
-z[T].setAttribute("target",K):M&&this.isCustomLink(V)&&z[T].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(z){z=new mxSvgCanvas2D(z);z.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;z.pointerEvents=!0;return z};Graph.prototype.getSelectedElement=function(){var z=null;if(window.getSelection){var K=window.getSelection();K.getRangeAt&&K.rangeCount&&(z=K.getRangeAt(0).commonAncestorContainer)}else document.selection&&(z=document.selection.createRange().parentElement());
-return z};Graph.prototype.getSelectedEditingElement=function(){for(var z=this.getSelectedElement();null!=z&&z.nodeType!=mxConstants.NODETYPE_ELEMENT;)z=z.parentNode;null!=z&&z==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(z=this.cellEditor.textarea.firstChild);return z};Graph.prototype.getParentByName=function(z,K,M){for(;null!=z&&z.nodeName!=K;){if(z==M)return null;z=z.parentNode}return z};Graph.prototype.getParentByNames=
-function(z,K,M){for(;null!=z&&!(0<=mxUtils.indexOf(K,z.nodeName));){if(z==M)return null;z=z.parentNode}return z};Graph.prototype.selectNode=function(z){var K=null;if(window.getSelection){if(K=window.getSelection(),K.getRangeAt&&K.rangeCount){var M=document.createRange();M.selectNode(z);K.removeAllRanges();K.addRange(M)}}else(K=document.selection)&&"Control"!=K.type&&(z=K.createRange(),z.collapse(!0),M=K.createRange(),M.setEndPoint("StartToStart",z),M.select())};Graph.prototype.flipEdgePoints=function(z,
-K,M){var T=this.getCellGeometry(z);if(null!=T){T=T.clone();if(null!=T.points)for(var V=0;V<T.points.length;V++)K?T.points[V].x=M+(M-T.points[V].x):T.points[V].y=M+(M-T.points[V].y);V=function(ia){null!=ia&&(K?ia.x=M+(M-ia.x):ia.y=M+(M-ia.y))};V(T.getTerminalPoint(!0));V(T.getTerminalPoint(!1));this.model.setGeometry(z,T)}};Graph.prototype.flipChildren=function(z,K,M){this.model.beginUpdate();try{for(var T=this.model.getChildCount(z),V=0;V<T;V++){var ia=this.model.getChildAt(z,V);if(this.model.isEdge(ia))this.flipEdgePoints(ia,
-K,M);else{var na=this.getCellGeometry(ia);null!=na&&(na=na.clone(),K?na.x=M+(M-na.x-na.width):na.y=M+(M-na.y-na.height),this.model.setGeometry(ia,na))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(z,K){this.model.beginUpdate();try{z=this.model.getTopmostCells(z);for(var M=[],T=0;T<z.length;T++)if(this.model.isEdge(z[T])){var V=this.view.getState(z[T]);null!=V&&this.flipEdgePoints(z[T],K,(K?V.getCenterX():V.getCenterY())/this.view.scale-(K?V.origin.x:V.origin.y)-(K?this.view.translate.x:
-this.view.translate.y))}else{var ia=this.getCellGeometry(z[T]);null!=ia&&this.flipChildren(z[T],K,K?ia.getCenterX()-ia.x:ia.getCenterY()-ia.y);M.push(z[T])}this.toggleCellStyles(K?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,M)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(z,K){var M=null;if(null!=z&&0<z.length){this.model.beginUpdate();try{for(var T=0;T<z.length;T++){var V=this.model.getParent(z[T]);if(this.isTable(V)){var ia=this.getCellGeometry(z[T]),na=this.getCellGeometry(V);
-null!=ia&&null!=na&&(na=na.clone(),na.height-=ia.height,this.model.setGeometry(V,na))}}var va=this.selectParentAfterDelete?this.model.getParents(z):null;this.removeCells(z,K)}finally{this.model.endUpdate()}if(null!=va)for(M=[],T=0;T<va.length;T++)this.model.contains(va[T])&&(this.model.isVertex(va[T])||this.model.isEdge(va[T]))&&M.push(va[T])}return M};Graph.prototype.insertTableColumn=function(z,K){var M=this.getModel();M.beginUpdate();try{var T=z,V=0;if(this.isTableCell(z)){var ia=M.getParent(z);
-T=M.getParent(ia);V=mxUtils.indexOf(M.getChildCells(ia,!0),z)}else this.isTableRow(z)?T=M.getParent(z):z=M.getChildCells(T,!0)[0],K||(V=M.getChildCells(z,!0).length-1);var na=M.getChildCells(T,!0),va=Graph.minTableColumnWidth;for(z=0;z<na.length;z++){var pa=M.getChildCells(na[z],!0)[V],za=M.cloneCell(pa,!1),Da=this.getCellGeometry(za);za.value=null;za.style=mxUtils.setStyle(mxUtils.setStyle(za.style,"rowspan",null),"colspan",null);if(null!=Da){null!=Da.alternateBounds&&(Da.width=Da.alternateBounds.width,
-Da.height=Da.alternateBounds.height,Da.alternateBounds=null);va=Da.width;var Ma=this.getCellGeometry(na[z]);null!=Ma&&(Da.height=Ma.height)}M.add(na[z],za,V+(K?0:1))}var La=this.getCellGeometry(T);null!=La&&(La=La.clone(),La.width+=va,M.setGeometry(T,La))}finally{M.endUpdate()}};Graph.prototype.deleteLane=function(z){var K=this.getModel();K.beginUpdate();try{var M=null;M="stackLayout"==this.getCurrentCellStyle(z).childLayout?z:K.getParent(z);var T=K.getChildCells(M,!0);0==T.length?K.remove(M):(M==
-z&&(z=T[T.length-1]),K.remove(z))}finally{K.endUpdate()}};Graph.prototype.insertLane=function(z,K){var M=this.getModel();M.beginUpdate();try{var T=null;if("stackLayout"==this.getCurrentCellStyle(z).childLayout){T=z;var V=M.getChildCells(T,!0);z=V[K?0:V.length-1]}else T=M.getParent(z);var ia=T.getIndex(z);z=M.cloneCell(z,!1);z.value=null;M.add(T,z,ia+(K?0:1))}finally{M.endUpdate()}};Graph.prototype.insertTableRow=function(z,K){var M=this.getModel();M.beginUpdate();try{var T=z,V=z;if(this.isTableCell(z))V=
-M.getParent(z),T=M.getParent(V);else if(this.isTableRow(z))T=M.getParent(z);else{var ia=M.getChildCells(T,!0);V=ia[K?0:ia.length-1]}var na=M.getChildCells(V,!0),va=T.getIndex(V);V=M.cloneCell(V,!1);V.value=null;var pa=this.getCellGeometry(V);if(null!=pa){for(ia=0;ia<na.length;ia++){z=M.cloneCell(na[ia],!1);z.value=null;z.style=mxUtils.setStyle(mxUtils.setStyle(z.style,"rowspan",null),"colspan",null);var za=this.getCellGeometry(z);null!=za&&(null!=za.alternateBounds&&(za.width=za.alternateBounds.width,
-za.height=za.alternateBounds.height,za.alternateBounds=null),za.height=pa.height);V.insert(z)}M.add(T,V,va+(K?0:1));var Da=this.getCellGeometry(T);null!=Da&&(Da=Da.clone(),Da.height+=pa.height,M.setGeometry(T,Da))}}finally{M.endUpdate()}};Graph.prototype.deleteTableColumn=function(z){var K=this.getModel();K.beginUpdate();try{var M=z,T=z;this.isTableCell(z)&&(T=K.getParent(z));this.isTableRow(T)&&(M=K.getParent(T));var V=K.getChildCells(M,!0);if(0==V.length)K.remove(M);else{this.isTableRow(T)||(T=
-V[0]);var ia=K.getChildCells(T,!0);if(1>=ia.length)K.remove(M);else{var na=ia.length-1;this.isTableCell(z)&&(na=mxUtils.indexOf(ia,z));for(T=z=0;T<V.length;T++){var va=K.getChildCells(V[T],!0)[na];K.remove(va);var pa=this.getCellGeometry(va);null!=pa&&(z=Math.max(z,pa.width))}var za=this.getCellGeometry(M);null!=za&&(za=za.clone(),za.width-=z,K.setGeometry(M,za))}}}finally{K.endUpdate()}};Graph.prototype.deleteTableRow=function(z){var K=this.getModel();K.beginUpdate();try{var M=z,T=z;this.isTableCell(z)&&
-(z=T=K.getParent(z));this.isTableRow(z)&&(M=K.getParent(T));var V=K.getChildCells(M,!0);if(1>=V.length)K.remove(M);else{this.isTableRow(T)||(T=V[V.length-1]);K.remove(T);z=0;var ia=this.getCellGeometry(T);null!=ia&&(z=ia.height);var na=this.getCellGeometry(M);null!=na&&(na=na.clone(),na.height-=z,K.setGeometry(M,na))}}finally{K.endUpdate()}};Graph.prototype.insertRow=function(z,K){for(var M=z.tBodies[0],T=M.rows[0].cells,V=z=0;V<T.length;V++){var ia=T[V].getAttribute("colspan");z+=null!=ia?parseInt(ia):
-1}K=M.insertRow(K);for(V=0;V<z;V++)mxUtils.br(K.insertCell(-1));return K.cells[0]};Graph.prototype.deleteRow=function(z,K){z.tBodies[0].deleteRow(K)};Graph.prototype.insertColumn=function(z,K){var M=z.tHead;if(null!=M)for(var T=0;T<M.rows.length;T++){var V=document.createElement("th");M.rows[T].appendChild(V);mxUtils.br(V)}z=z.tBodies[0];for(M=0;M<z.rows.length;M++)T=z.rows[M].insertCell(K),mxUtils.br(T);return z.rows[0].cells[0<=K?K:z.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(z,
-K){if(0<=K){z=z.tBodies[0].rows;for(var M=0;M<z.length;M++)z[M].cells.length>K&&z[M].deleteCell(K)}};Graph.prototype.pasteHtmlAtCaret=function(z){if(window.getSelection){var K=window.getSelection();if(K.getRangeAt&&K.rangeCount){K=K.getRangeAt(0);K.deleteContents();var M=document.createElement("div");M.innerHTML=z;z=document.createDocumentFragment();for(var T;T=M.firstChild;)lastNode=z.appendChild(T);K.insertNode(z)}}else(K=document.selection)&&"Control"!=K.type&&K.createRange().pasteHTML(z)};Graph.prototype.createLinkForHint=
-function(z,K){function M(V,ia){V.length>ia&&(V=V.substring(0,Math.round(ia/2))+"..."+V.substring(V.length-Math.round(ia/4)));return V}z=null!=z?z:"javascript:void(0);";if(null==K||0==K.length)K=this.isCustomLink(z)?this.getLinkTitle(z):z;var T=document.createElement("a");T.setAttribute("rel",this.linkRelation);T.setAttribute("href",this.getAbsoluteUrl(z));T.setAttribute("title",M(this.isCustomLink(z)?this.getLinkTitle(z):z,80));null!=this.linkTarget&&T.setAttribute("target",this.linkTarget);mxUtils.write(T,
-M(K,40));this.isCustomLink(z)&&mxEvent.addListener(T,"click",mxUtils.bind(this,function(V){this.customLinkClicked(z);mxEvent.consume(V)}));return T};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(ia,na){this.popupMenuHandler.hideMenu()});var z=this.updateMouseEvent;this.updateMouseEvent=function(ia){ia=z.apply(this,arguments);if(mxEvent.isTouchEvent(ia.getEvent())&&
-null==ia.getState()){var na=this.getCellAt(ia.graphX,ia.graphY);null!=na&&this.isSwimlane(na)&&this.hitsSwimlaneContent(na,ia.graphX,ia.graphY)||(ia.state=this.view.getState(na),null!=ia.state&&null!=ia.state.shape&&(this.container.style.cursor=ia.state.shape.node.style.cursor))}null==ia.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return ia};var K=!1,M=!1,T=!1,V=this.fireMouseEvent;this.fireMouseEvent=function(ia,na,va){ia==mxEvent.MOUSE_DOWN&&(na=this.updateMouseEvent(na),
-K=this.isCellSelected(na.getCell()),M=this.isSelectionEmpty(),T=this.popupMenuHandler.isMenuShowing());V.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(ia,na){var va=mxEvent.isMouseEvent(na.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==na.getState()||!na.isSource(na.getState().control))&&(this.popupMenuHandler.popupTrigger||!T&&!va&&(M&&null==na.getCell()&&this.isSelectionEmpty()||K&&this.isCellSelected(na.getCell())));
-va=!K||va?null:mxUtils.bind(this,function(pa){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var za=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(na.getX()+za.x+1,na.getY()+za.y+1,pa,na.getEvent())}}),500)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[ia,na,va])})};mxCellEditor.prototype.isContentEditing=function(){var z=this.graph.view.getState(this.editingCell);return null!=z&&1==z.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=
-this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var z="";window.getSelection?z=window.getSelection():document.getSelection?z=document.getSelection():document.selection&&(z=document.selection.createRange().text);return""!=z};mxCellEditor.prototype.insertTab=function(z){var K=this.textarea.ownerDocument.defaultView.getSelection(),M=K.getRangeAt(0),T="\t";if(null!=z)for(T="";0<z;)T+=" ",z--;z=document.createElement("span");
-z.style.whiteSpace="pre";z.appendChild(document.createTextNode(T));M.insertNode(z);M.setStartAfter(z);M.setEndAfter(z);K.removeAllRanges();K.addRange(M)};mxCellEditor.prototype.alignText=function(z,K){var M=null!=K&&mxEvent.isShiftDown(K);if(M||null!=window.getSelection&&null!=window.getSelection().containsNode){var T=!0;this.graph.processElements(this.textarea,function(V){M||window.getSelection().containsNode(V,!0)?(V.removeAttribute("align"),V.style.textAlign=null):T=!1});T&&this.graph.cellEditor.setAlign(z)}document.execCommand("justify"+
-z.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var z=window.getSelection();if(z.getRangeAt&&z.rangeCount){for(var K=[],M=0,T=z.rangeCount;M<T;++M)K.push(z.getRangeAt(M));return K}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(z){try{if(z)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var K=0,M=z.length;K<
-M;++K)sel.addRange(z[K])}else document.selection&&z.select&&z.select()}catch(T){}};var C=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(z){null!=z.text&&(z.text.replaceLinefeeds="0"!=mxUtils.getValue(z.style,"nl2Br","1"));C.apply(this,arguments)};var I=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(z,K){this.isKeepFocusEvent(z)||!mxEvent.isAltDown(z.getEvent())?I.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=
-function(z){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var G=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(z,K){z=this.graph.getStartEditingCell(z,K);G.apply(this,arguments);var M=this.graph.view.getState(z);this.textarea.className=null!=M&&1==M.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(z);
-M=this.graph.getModel().getParent(z);var T=this.graph.getCellGeometry(z);if(this.graph.getModel().isEdge(M)&&null!=T&&T.relative||this.graph.getModel().isEdge(z))this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var Y=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(z){function K(V,ia){ia.originalNode=V;V=V.firstChild;for(var na=ia.firstChild;null!=V&&null!=na;)K(V,na),V=V.nextSibling,na=na.nextSibling;
-return ia}function M(V,ia){if(null!=V)if(ia.originalNode!=V)T(V);else for(V=V.firstChild,ia=ia.firstChild;null!=V;){var na=V.nextSibling;null==ia?T(V):(M(V,ia),ia=ia.nextSibling);V=na}}function T(V){for(var ia=V.firstChild;null!=ia;){var na=ia.nextSibling;T(ia);ia=na}1==V.nodeType&&("BR"===V.nodeName||null!=V.firstChild)||3==V.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(V)).length?(3==V.nodeType&&mxUtils.setTextContent(V,mxUtils.getTextContent(V).replace(/\n|\r/g,"")),1==V.nodeType&&(V.removeAttribute("style"),
-V.removeAttribute("class"),V.removeAttribute("width"),V.removeAttribute("cellpadding"),V.removeAttribute("cellspacing"),V.removeAttribute("border"))):V.parentNode.removeChild(V)}Y.apply(this,arguments);7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(V){var ia=K(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||
-0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?M(this.textarea,ia):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var z=this.graph.view.getState(this.editingCell);if(null!=z){var K=null!=z&&"0"!=mxUtils.getValue(z.style,"nl2Br","1"),M=this.saveSelection();if(this.codeViewMode){va=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<va.length&&"\n"==va.charAt(va.length-1)&&(va=va.substring(0,va.length-1));va=this.graph.sanitizeHtml(K?
-va.replace(/\n/g,"<br/>"):va,!0);this.textarea.className="mxCellEditor geContentEditable";pa=mxUtils.getValue(z.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);K=mxUtils.getValue(z.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var T=mxUtils.getValue(z.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),V=(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,ia=(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,
-0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,na=[];(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&na.push("underline");(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&na.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(pa*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=
-Math.round(pa)+"px";this.textarea.style.textDecoration=na.join(" ");this.textarea.style.fontWeight=V?"bold":"normal";this.textarea.style.fontStyle=ia?"italic":"";this.textarea.style.fontFamily=K;this.textarea.style.textAlign=T;this.textarea.style.padding="0px";this.textarea.innerHTML!=va&&(this.textarea.innerHTML=va,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&
-this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerText="");var va=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(va=mxUtils.replaceTrailingNewlines(va,"<div><br></div>"));va=this.graph.sanitizeHtml(K?va.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):va,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var pa=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(pa*
-mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(pa)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=va&&(this.textarea.innerHTML=va);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&
-this.restoreSelection(this.switchSelectionState);this.switchSelectionState=M;this.resize()}};var ba=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(z,K){if(null!=this.textarea)if(z=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=z){var M=z.view.scale;this.bounds=mxRectangle.fromRectangle(z);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*M;this.bounds.height=60*M;var T=null!=z.text?z.text.margin:null;null==T&&(T=mxUtils.getAlignmentAsPoint(mxUtils.getValue(z.style,
-mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(z.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=T.x*this.bounds.width;this.bounds.y+=T.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/M)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/M)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/M)+(this.textarea.offsetHeight-
-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*M);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/M)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*M);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+M+","+
-M+")")}else this.textarea.style.height="",this.textarea.style.overflow="",ba.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(z,K){if("0"==mxUtils.getValue(z.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var M=this.graph.getEditingValue(z.cell,K);"1"==mxUtils.getValue(z.style,"nl2Br","1")&&(M=M.replace(/\n/g,"<br/>"));return M=this.graph.sanitizeHtml(M,!0)};mxCellEditorGetCurrentValue=
-mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(z){if("0"==mxUtils.getValue(z.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var K=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return K="1"==mxUtils.getValue(z.style,"nl2Br","1")?K.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):K.replace(/\r\n/g,"").replace(/\n/g,"")};var Z=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(z){this.codeViewMode&&this.toggleViewMode();
-Z.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(z){}};var X=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(z,K){this.graph.getModel().beginUpdate();try{X.apply(this,arguments),""==K&&this.graph.isCellDeletable(z.cell)&&0==this.graph.model.getChildCount(z.cell)&&this.graph.isTransparentState(z)&&this.graph.removeCells([z.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=
-function(z){var K=mxUtils.getValue(z.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=K&&K!=mxConstants.NONE||!(null!=z.cell.geometry&&0<z.cell.geometry.width)||0==mxUtils.getValue(z.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(z.style,mxConstants.STYLE_HORIZONTAL,1)||(K=mxUtils.getValue(z.style,mxConstants.STYLE_FILLCOLOR,null));K==mxConstants.NONE&&(K=null);return K};mxCellEditor.prototype.getBorderColor=function(z){var K=mxUtils.getValue(z.style,mxConstants.STYLE_LABEL_BORDERCOLOR,
-null);null!=K&&K!=mxConstants.NONE||!(null!=z.cell.geometry&&0<z.cell.geometry.width)||0==mxUtils.getValue(z.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(z.style,mxConstants.STYLE_HORIZONTAL,1)||(K=mxUtils.getValue(z.style,mxConstants.STYLE_STROKECOLOR,null));K==mxConstants.NONE&&(K=null);return K};mxCellEditor.prototype.getMinimumSize=function(z){var K=this.graph.getView().scale;return new mxRectangle(0,0,null==z.text?30:z.text.size*K+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;
-mxGraphHandler.prototype.isValidDropTarget=function(z,K){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(K.getEvent)};mxGraphView.prototype.formatUnitText=function(z){return z?e(z,this.unit):z};mxGraphHandler.prototype.updateHint=function(z){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var K=this.graph.view.translate,M=this.graph.view.scale;z=this.roundLength((this.bounds.x+
-this.currentDx)/M-K.x);K=this.roundLength((this.bounds.y+this.currentDy)/M-K.y);M=this.graph.view.unit;this.hint.innerHTML=e(z,M)+", "+e(K,M);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var qa=mxStackLayout.prototype.resizeCell;
-mxStackLayout.prototype.resizeCell=function(z,K){qa.apply(this,arguments);var M=this.graph.getCellStyle(z);if(null==M.childLayout){var T=this.graph.model.getParent(z),V=null!=T?this.graph.getCellGeometry(T):null;if(null!=V&&(M=this.graph.getCellStyle(T),"stackLayout"==M.childLayout)){var ia=parseFloat(mxUtils.getValue(M,"stackBorder",mxStackLayout.prototype.border));M="1"==mxUtils.getValue(M,"horizontalStack","1");var na=this.graph.getActualStartSize(T);V=V.clone();M?V.height=K.height+na.y+na.height+
-2*ia:V.width=K.width+na.x+na.width+2*ia;this.graph.model.setGeometry(T,V)}}};var Q=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function z(va){M.get(va)||(M.put(va,!0),V.push(va))}for(var K=Q.apply(this,arguments),M=new mxDictionary,T=this.graph.model,V=[],ia=0;ia<K.length;ia++){var na=K[ia];this.graph.isTableCell(na)?z(T.getParent(T.getParent(na))):this.graph.isTableRow(na)&&z(T.getParent(na));z(na)}return V};var W=
-mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(z){var K=W.apply(this,arguments);K.stroke="#C0C0C0";K.strokewidth=1;return K};var ha=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(z){var K=ha.apply(this,arguments);K.stroke="#C0C0C0";K.strokewidth=1;return K};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var z=
-this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+z.x/2,this.bounds.y+this.rotationHandleVSpacing-z.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(z,K){return this.graph.isRecursiveVertexResize(z)&&!mxEvent.isAltDown(K.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(z,K){return mxEvent.isControlDown(K.getEvent())||mxEvent.isMetaDown(K.getEvent())};var la=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=
-function(){return la.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 ja=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return ja.apply(this,
-arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var U=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(z){return z.tableHandle||U.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var z=0;this.graph.isTableRow(this.state.cell)?z=1:this.graph.isTableCell(this.state.cell)&&(z=2);return z};
-var L=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return L.apply(this,arguments).grow(-this.getSelectionBorderInset())};var da=null,O=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==da&&(da=mxCellRenderer.defaultShapes.tableLine);var z=O.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var K=function(Sa,Fa,wa){for(var ya=[],Na=0;Na<Sa.length;Na++){var Ja=Sa[Na];
-ya.push(null==Ja?null:new mxPoint((pa+Ja.x+Fa)*ia,(za+Ja.y+wa)*ia))}return ya},M=this,T=this.graph,V=T.model,ia=T.view.scale,na=this.state,va=this.selectionBorder,pa=this.state.origin.x+T.view.translate.x,za=this.state.origin.y+T.view.translate.y;null==z&&(z=[]);var Da=T.view.getCellStates(V.getChildCells(this.state.cell,!0));if(0<Da.length){var Ma=V.getChildCells(Da[0].cell,!0),La=T.getTableLines(this.state.cell,!1,!0),Ua=T.getTableLines(this.state.cell,!0,!1);for(V=0;V<Da.length;V++)mxUtils.bind(this,
-function(Sa){var Fa=Da[Sa],wa=Sa<Da.length-1?Da[Sa+1]:null;wa=null!=wa?T.getCellGeometry(wa.cell):null;var ya=null!=wa&&null!=wa.alternateBounds?wa.alternateBounds:wa;wa=null!=Ua[Sa]?new da(Ua[Sa],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);wa.isDashed=va.isDashed;wa.svgStrokeTolerance++;Fa=new mxHandle(Fa,"row-resize",null,wa);Fa.tableHandle=!0;var Na=0;Fa.shape.node.parentNode.insertBefore(Fa.shape.node,Fa.shape.node.parentNode.firstChild);Fa.redraw=function(){if(null!=
-this.shape){this.shape.stroke=0==Na?mxConstants.NONE:va.stroke;if(this.shape.constructor==da)this.shape.line=K(Ua[Sa],0,Na),this.shape.updateBoundsFromLine();else{var Qa=T.getActualStartSize(na.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+Na*ia;this.shape.bounds.x=na.x+(Sa==Da.length-1?0:Qa.x*ia);this.shape.bounds.width=na.width-(Sa==Da.length-1?0:Qa.width+Qa.x+ia)}this.shape.redraw()}};var Ja=!1;Fa.setPosition=function(Qa,Za,cb){Na=Math.max(Graph.minTableRowHeight-
-Qa.height,Za.y-Qa.y-Qa.height);Ja=mxEvent.isShiftDown(cb.getEvent());null!=ya&&Ja&&(Na=Math.min(Na,ya.height-Graph.minTableRowHeight))};Fa.execute=function(Qa){if(0!=Na)T.setTableRowHeight(this.state.cell,Na,!Ja);else if(!M.blockDelayedSelection){var Za=T.getCellAt(Qa.getGraphX(),Qa.getGraphY())||na.cell;T.graphHandler.selectCellForEvent(Za,Qa)}Na=0};Fa.reset=function(){Na=0};z.push(Fa)})(V);for(V=0;V<Ma.length;V++)mxUtils.bind(this,function(Sa){var Fa=T.view.getState(Ma[Sa]),wa=T.getCellGeometry(Ma[Sa]),
-ya=null!=wa.alternateBounds?wa.alternateBounds:wa;null==Fa&&(Fa=new mxCellState(T.view,Ma[Sa],T.getCellStyle(Ma[Sa])),Fa.x=na.x+wa.x*ia,Fa.y=na.y+wa.y*ia,Fa.width=ya.width*ia,Fa.height=ya.height*ia,Fa.updateCachedBounds());wa=Sa<Ma.length-1?Ma[Sa+1]:null;wa=null!=wa?T.getCellGeometry(wa):null;var Na=null!=wa&&null!=wa.alternateBounds?wa.alternateBounds:wa;wa=null!=La[Sa]?new da(La[Sa],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);wa.isDashed=va.isDashed;wa.svgStrokeTolerance++;
-Fa=new mxHandle(Fa,"col-resize",null,wa);Fa.tableHandle=!0;var Ja=0;Fa.shape.node.parentNode.insertBefore(Fa.shape.node,Fa.shape.node.parentNode.firstChild);Fa.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Ja?mxConstants.NONE:va.stroke;if(this.shape.constructor==da)this.shape.line=K(La[Sa],Ja,0),this.shape.updateBoundsFromLine();else{var Za=T.getActualStartSize(na.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(ya.width+Ja)*ia;this.shape.bounds.y=na.y+(Sa==Ma.length-
-1?0:Za.y*ia);this.shape.bounds.height=na.height-(Sa==Ma.length-1?0:(Za.height+Za.y)*ia)}this.shape.redraw()}};var Qa=!1;Fa.setPosition=function(Za,cb,fb){Ja=Math.max(Graph.minTableColumnWidth-ya.width,cb.x-Za.x-ya.width);Qa=mxEvent.isShiftDown(fb.getEvent());null==Na||Qa||(Ja=Math.min(Ja,Na.width-Graph.minTableColumnWidth))};Fa.execute=function(Za){if(0!=Ja)T.setTableColumnWidth(this.state.cell,Ja,Qa);else if(!M.blockDelayedSelection){var cb=T.getCellAt(Za.getGraphX(),Za.getGraphY())||na.cell;T.graphHandler.selectCellForEvent(cb,
-Za)}Ja=0};Fa.positionChanged=function(){};Fa.reset=function(){Ja=0};z.push(Fa)})(V)}}return null!=z?z.reverse():null};var N=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(z){N.apply(this,arguments);if(null!=this.moveHandles)for(var K=0;K<this.moveHandles.length;K++)this.moveHandles[K].style.visibility=z?"":"hidden";if(null!=this.cornerHandles)for(K=0;K<this.cornerHandles.length;K++)this.cornerHandles[K].node.style.visibility=z?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=
-function(){var z=this.graph.model;if(null!=this.moveHandles){for(var K=0;K<this.moveHandles.length;K++)this.moveHandles[K].parentNode.removeChild(this.moveHandles[K]);this.moveHandles=null}this.moveHandles=[];for(K=0;K<z.getChildCount(this.state.cell);K++)mxUtils.bind(this,function(M){if(null!=M&&z.isVertex(M.cell)){var T=mxUtils.createImage(Editor.rowMoveImage);T.style.position="absolute";T.style.cursor="pointer";T.style.width="7px";T.style.height="4px";T.style.padding="4px 2px 4px 2px";T.rowState=
-M;mxEvent.addGestureListeners(T,mxUtils.bind(this,function(V){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(V)&&this.graph.isCellSelected(M.cell)||this.graph.selectCellForEvent(M.cell,V);mxEvent.isPopupTrigger(V)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(V),mxEvent.getClientY(V),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(V),this.graph.isMouseDown=!0);
-mxEvent.consume(V)}),null,mxUtils.bind(this,function(V){mxEvent.isPopupTrigger(V)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(V),mxEvent.getClientY(V),M.cell,V),mxEvent.consume(V))}));this.moveHandles.push(T);this.graph.container.appendChild(T)}})(this.graph.view.getState(z.getChildAt(this.state.cell,K)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var z=0;z<this.customHandles.length;z++)this.customHandles[z].destroy();this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&
-this.refreshMoveHandles()};var aa=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var z=new mxPoint(0,0),K=this.tolerance,M=this.state.style.shape;null==mxCellRenderer.defaultShapes[M]&&mxStencilRegistry.getStencil(M);M=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!M&&null!=this.customHandles)for(var T=0;T<this.customHandles.length;T++)if(null!=this.customHandles[T].shape&&null!=this.customHandles[T].shape.bounds){var V=
-this.customHandles[T].shape.bounds,ia=V.getCenterX(),na=V.getCenterY();if(Math.abs(this.state.x-ia)<V.width/2||Math.abs(this.state.y-na)<V.height/2||Math.abs(this.state.x+this.state.width-ia)<V.width/2||Math.abs(this.state.y+this.state.height-na)<V.height/2){M=!0;break}}M&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(K/=2,this.graph.isTable(this.state.cell)&&(K+=7),z.x=this.sizers[0].bounds.width+K,z.y=this.sizers[0].bounds.height+K):z=aa.apply(this,arguments);return z};mxVertexHandler.prototype.updateHint=
+Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var z=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=z&&(new mxCodec(z.ownerDocument)).decode(z,this.getStylesheet())};Graph.prototype.createCellLookup=function(z,K){K=null!=K?K:{};for(var L=0;L<z.length;L++){var S=z[L];K[mxObjectIdentity.get(S)]=S.getId();for(var V=this.model.getChildCount(S),
+ja=0;ja<V;ja++)this.createCellLookup([this.model.getChildAt(S,ja)],K)}return K};Graph.prototype.createCellMapping=function(z,K,L){L=null!=L?L:{};for(var S in z){var V=K[S];null==L[V]&&(L[V]=z[S].getId()||"")}return L};Graph.prototype.importGraphModel=function(z,K,L,S){K=null!=K?K:0;L=null!=L?L:0;var V=new mxCodec(z.ownerDocument),ja=new mxGraphModel;V.decode(z,ja);z=[];V={};var na={},ya=ja.getChildren(this.cloneCell(ja.root,this.isCloneInvalidEdges(),V));if(null!=ya){var ra=this.createCellLookup([ja.root]);
+ya=ya.slice();this.model.beginUpdate();try{if(1!=ya.length||this.isCellLocked(this.getDefaultParent()))for(ja=0;ja<ya.length;ja++)ta=this.model.getChildren(this.moveCells([ya[ja]],K,L,!1,this.model.getRoot())[0]),null!=ta&&(z=z.concat(ta));else{var ta=ja.getChildren(ya[0]);null!=ta&&(z=this.moveCells(ta,K,L,!1,this.getDefaultParent()),na[ja.getChildAt(ja.root,0).getId()]=this.getDefaultParent().getId())}if(null!=z&&(this.createCellMapping(V,ra,na),this.updateCustomLinks(na,z),S)){this.isGridEnabled()&&
+(K=this.snap(K),L=this.snap(L));var Da=this.getBoundingBoxFromGeometry(z,!0);null!=Da&&this.moveCells(z,K-Da.x,L-Da.y)}}finally{this.model.endUpdate()}}return z};Graph.prototype.encodeCells=function(z){for(var K={},L=this.cloneCells(z,null,K),S=new mxDictionary,V=0;V<z.length;V++)S.put(z[V],!0);var ja=new mxCodec,na=new mxGraphModel,ya=na.getChildAt(na.getRoot(),0);for(V=0;V<L.length;V++){na.add(ya,L[V]);var ra=this.view.getState(z[V]);if(null!=ra){var ta=this.getCellGeometry(L[V]);null!=ta&&ta.relative&&
+!this.model.isEdge(z[V])&&null==S.get(this.model.getParent(z[V]))&&(ta.offset=null,ta.relative=!1,ta.x=ra.x/ra.view.scale-ra.view.translate.x,ta.y=ra.y/ra.view.scale-ra.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(K,this.createCellLookup(z)),L);return ja.encode(na)};Graph.prototype.isSwimlane=function(z,K){var L=null;null==z||this.model.isEdge(z)||this.model.getParent(z)==this.model.getRoot()||(L=this.getCurrentCellStyle(z,K)[mxConstants.STYLE_SHAPE]);return L==mxConstants.SHAPE_SWIMLANE||
+"table"==L||"tableRow"==L};var d=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(z){var K=this.model.getParent(z);if(null!=K){var L=this.getCurrentCellStyle(K);if(null!=L.expand)return"0"!=L.expand}return d.apply(this,arguments)&&(null==K||!this.isTable(K))};var f=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(z,K,L,S,V,ja,na,ya){null==ya&&(ya=this.model.getParent(z),this.isTable(ya)||this.isTableRow(ya))&&(ya=this.getCellAt(ja,na,null,!0,!1));L=null;this.model.beginUpdate();
+try{L=f.apply(this,[z,K,L,S,V,ja,na,ya]);this.model.setValue(L,"");var ra=this.getChildCells(L,!0);for(K=0;K<ra.length;K++){var ta=this.getCellGeometry(ra[K]);null!=ta&&ta.relative&&0<ta.x&&this.model.remove(ra[K])}var Da=this.getChildCells(z,!0);for(K=0;K<Da.length;K++)ta=this.getCellGeometry(Da[K]),null!=ta&&ta.relative&&0>=ta.x&&this.model.remove(Da[K]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[L]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[L]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
+null,[z]);this.setCellStyles(mxConstants.STYLE_STARTARROW,mxConstants.NONE,[z]);var Oa=this.model.getTerminal(L,!1);if(null!=Oa){var Ma=this.getCurrentCellStyle(Oa);null!=Ma&&"1"==Ma.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[z]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[z]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[L]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[L]))}}finally{this.model.endUpdate()}return L};var g=Graph.prototype.selectCell;Graph.prototype.selectCell=
+function(z,K,L){if(K||L)g.apply(this,arguments);else{var S=this.getSelectionCell(),V=null,ja=[],na=mxUtils.bind(this,function(ya){if(null!=this.view.getState(ya)&&(this.model.isVertex(ya)||this.model.isEdge(ya)))if(ja.push(ya),ya==S)V=ja.length-1;else if(z&&null==S&&0<ja.length||null!=V&&z&&ja.length>V||!z&&0<V)return;for(var ra=0;ra<this.model.getChildCount(ya);ra++)na(this.model.getChildAt(ya,ra))});na(this.model.root);0<ja.length&&(V=null!=V?mxUtils.mod(V+(z?1:-1),ja.length):0,this.setSelectionCell(ja[V]))}};
+Graph.prototype.swapShapes=function(z,K,L,S,V,ja,na){K=!1;if(!S&&null!=V&&1==z.length&&(S=this.view.getState(V),L=this.view.getState(z[0]),null!=S&&null!=L&&(null!=ja&&mxEvent.isShiftDown(ja)||"umlLifeline"==S.style.shape&&"umlLifeline"==L.style.shape)&&(S=this.getCellGeometry(V),ja=this.getCellGeometry(z[0]),null!=S&&null!=ja))){K=S.clone();S=ja.clone();S.x=K.x;S.y=K.y;K.x=ja.x;K.y=ja.y;this.model.beginUpdate();try{this.model.setGeometry(V,K),this.model.setGeometry(z[0],S)}finally{this.model.endUpdate()}K=
+!0}return K};var m=Graph.prototype.moveCells;Graph.prototype.moveCells=function(z,K,L,S,V,ja,na){if(this.swapShapes(z,K,L,S,V,ja,na))return z;na=null!=na?na:{};if(this.isTable(V)){for(var ya=[],ra=0;ra<z.length;ra++)this.isTable(z[ra])?ya=ya.concat(this.model.getChildCells(z[ra],!0).reverse()):ya.push(z[ra]);z=ya}this.model.beginUpdate();try{ya=[];for(ra=0;ra<z.length;ra++)if(null!=V&&this.isTableRow(z[ra])){var ta=this.model.getParent(z[ra]),Da=this.getCellGeometry(z[ra]);this.isTable(ta)&&ya.push(ta);
+if(null!=ta&&null!=Da&&this.isTable(ta)&&this.isTable(V)&&(S||ta!=V)){if(!S){var Oa=this.getCellGeometry(ta);null!=Oa&&(Oa=Oa.clone(),Oa.height-=Da.height,this.model.setGeometry(ta,Oa))}Oa=this.getCellGeometry(V);null!=Oa&&(Oa=Oa.clone(),Oa.height+=Da.height,this.model.setGeometry(V,Oa));var Ma=this.model.getChildCells(V,!0);if(0<Ma.length){z[ra]=S?this.cloneCell(z[ra]):z[ra];var Wa=this.model.getChildCells(z[ra],!0),Sa=this.model.getChildCells(Ma[0],!0),Fa=Sa.length-Wa.length;if(0<Fa)for(var Ja=
+0;Ja<Fa;Ja++){var xa=this.cloneCell(Wa[Wa.length-1]);null!=xa&&(xa.value="",this.model.add(z[ra],xa))}else if(0>Fa)for(Ja=0;Ja>Fa;Ja--)this.model.remove(Wa[Wa.length+Ja-1]);Wa=this.model.getChildCells(z[ra],!0);for(Ja=0;Ja<Sa.length;Ja++){var Ba=this.getCellGeometry(Sa[Ja]),Pa=this.getCellGeometry(Wa[Ja]);null!=Ba&&null!=Pa&&(Pa=Pa.clone(),Pa.width=Ba.width,this.model.setGeometry(Wa[Ja],Pa))}}}}var Ka=m.apply(this,arguments);for(ra=0;ra<ya.length;ra++)!S&&this.model.contains(ya[ra])&&0==this.model.getChildCount(ya[ra])&&
+this.model.remove(ya[ra]);S&&this.updateCustomLinks(this.createCellMapping(na,this.createCellLookup(z)),Ka)}finally{this.model.endUpdate()}return Ka};var q=Graph.prototype.removeCells;Graph.prototype.removeCells=function(z,K){var L=[];this.model.beginUpdate();try{for(var S=0;S<z.length;S++)if(this.isTableCell(z[S])){var V=this.model.getParent(z[S]),ja=this.model.getParent(V);1==this.model.getChildCount(V)&&1==this.model.getChildCount(ja)?0>mxUtils.indexOf(z,ja)&&0>mxUtils.indexOf(L,ja)&&L.push(ja):
+this.labelChanged(z[S],"")}else{if(this.isTableRow(z[S])&&(ja=this.model.getParent(z[S]),0>mxUtils.indexOf(z,ja)&&0>mxUtils.indexOf(L,ja))){for(var na=this.model.getChildCells(ja,!0),ya=0,ra=0;ra<na.length;ra++)0<=mxUtils.indexOf(z,na[ra])&&ya++;ya==na.length&&L.push(ja)}L.push(z[S])}L=q.apply(this,[L,K])}finally{this.model.endUpdate()}return L};Graph.prototype.updateCustomLinks=function(z,K,L){L=null!=L?L:new Graph;for(var S=0;S<K.length;S++)null!=K[S]&&L.updateCustomLinksForCell(z,K[S],L)};Graph.prototype.updateCustomLinksForCell=
+function(z,K){this.doUpdateCustomLinksForCell(z,K);for(var L=this.model.getChildCount(K),S=0;S<L;S++)this.updateCustomLinksForCell(z,this.model.getChildAt(K,S))};Graph.prototype.doUpdateCustomLinksForCell=function(z,K){};Graph.prototype.getAllConnectionConstraints=function(z,K){if(null!=z){K=mxUtils.getValue(z.style,"points",null);if(null!=K){z=[];try{var L=JSON.parse(K);for(K=0;K<L.length;K++){var S=L[K];z.push(new mxConnectionConstraint(new mxPoint(S[0],S[1]),2<S.length?"0"!=S[2]:!0,null,3<S.length?
+S[3]:0,4<S.length?S[4]:0))}}catch(ja){}return z}if(null!=z.shape&&null!=z.shape.bounds){S=z.shape.direction;K=z.shape.bounds;var V=z.shape.scale;L=K.width/V;K=K.height/V;if(S==mxConstants.DIRECTION_NORTH||S==mxConstants.DIRECTION_SOUTH)S=L,L=K,K=S;K=z.shape.getConstraints(z.style,L,K);if(null!=K)return K;if(null!=z.shape.stencil&&null!=z.shape.stencil.constraints)return z.shape.stencil.constraints;if(null!=z.shape.constraints)return z.shape.constraints}}return null};Graph.prototype.flipEdge=function(z){if(null!=
+z){var K=this.getCurrentCellStyle(z);K=mxUtils.getValue(K,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,K,[z])}};Graph.prototype.isValidRoot=function(z){for(var K=this.model.getChildCount(z),L=0,S=0;S<K;S++){var V=this.model.getChildAt(z,S);this.model.isVertex(V)&&(V=this.getCellGeometry(V),null==V||V.relative||L++)}return 0<L||this.isContainer(z)};Graph.prototype.isValidDropTarget=
+function(z,K,L){for(var S=this.getCurrentCellStyle(z),V=!0,ja=!0,na=0;na<K.length&&ja;na++)V=V&&this.isTable(K[na]),ja=ja&&this.isTableRow(K[na]);return(1==K.length&&null!=L&&mxEvent.isShiftDown(L)&&!mxEvent.isControlDown(L)&&!mxEvent.isAltDown(L)||("1"!=mxUtils.getValue(S,"part","0")||this.isContainer(z))&&"0"!=mxUtils.getValue(S,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(z))&&!this.isTableRow(z)&&(!this.isTable(z)||ja||V))&&!this.isCellLocked(z)};
+Graph.prototype.createGroupCell=function(){var z=mxGraph.prototype.createGroupCell.apply(this,arguments);z.setStyle("group");return z};Graph.prototype.isExtendParentsOnAdd=function(z){var K=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(K&&null!=z&&null!=this.layoutManager){var L=this.model.getParent(z);null!=L&&(L=this.layoutManager.getLayout(L),null!=L&&L.constructor==mxStackLayout&&(K=!1))}return K};Graph.prototype.getPreferredSizeForCell=function(z){var K=mxGraph.prototype.getPreferredSizeForCell.apply(this,
+arguments);null!=K&&(K.width+=10,K.height+=4,this.gridEnabled&&(K.width=this.snap(K.width),K.height=this.snap(K.height)));return K};Graph.prototype.turnShapes=function(z,K){var L=this.getModel(),S=[];L.beginUpdate();try{for(var V=0;V<z.length;V++){var ja=z[V];if(L.isEdge(ja)){var na=L.getTerminal(ja,!0),ya=L.getTerminal(ja,!1);L.setTerminal(ja,ya,!0);L.setTerminal(ja,na,!1);var ra=L.getGeometry(ja);if(null!=ra){ra=ra.clone();null!=ra.points&&ra.points.reverse();var ta=ra.getTerminalPoint(!0),Da=ra.getTerminalPoint(!1);
+ra.setTerminalPoint(ta,!1);ra.setTerminalPoint(Da,!0);L.setGeometry(ja,ra);var Oa=this.view.getState(ja),Ma=this.view.getState(na),Wa=this.view.getState(ya);if(null!=Oa){var Sa=null!=Ma?this.getConnectionConstraint(Oa,Ma,!0):null,Fa=null!=Wa?this.getConnectionConstraint(Oa,Wa,!1):null;this.setConnectionConstraint(ja,na,!0,Fa);this.setConnectionConstraint(ja,ya,!1,Sa);var Ja=mxUtils.getValue(Oa.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
+mxUtils.getValue(Oa.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[ja]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,Ja,[ja])}S.push(ja)}}else if(L.isVertex(ja)&&(ra=this.getCellGeometry(ja),null!=ra)){if(!(this.isTable(ja)||this.isTableRow(ja)||this.isTableCell(ja)||this.isSwimlane(ja))){ra=ra.clone();ra.x+=ra.width/2-ra.height/2;ra.y+=ra.height/2-ra.width/2;var xa=ra.width;ra.width=ra.height;ra.height=xa;L.setGeometry(ja,ra)}var Ba=this.view.getState(ja);if(null!=Ba){var Pa=
+[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],Ka=mxUtils.getValue(Ba.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,Pa[mxUtils.mod(mxUtils.indexOf(Pa,Ka)+(K?-1:1),Pa.length)],[ja])}S.push(ja)}}}finally{L.endUpdate()}return S};Graph.prototype.stencilHasPlaceholders=function(z){if(null!=z&&null!=z.fgNode)for(z=z.fgNode.firstChild;null!=z;){if("text"==z.nodeName&&"1"==z.getAttribute("placeholders"))return!0;
+z=z.nextSibling}return!1};var y=Graph.prototype.processChange;Graph.prototype.processChange=function(z){if(z instanceof mxGeometryChange&&(this.isTableCell(z.cell)||this.isTableRow(z.cell))&&(null==z.previous&&null!=z.geometry||null!=z.previous&&!z.previous.equals(z.geometry))){var K=z.cell;this.isTableCell(K)&&(K=this.model.getParent(K));this.isTableRow(K)&&(K=this.model.getParent(K));var L=this.view.getState(K);null!=L&&null!=L.shape&&(this.view.invalidate(K),L.shape.bounds=null)}y.apply(this,arguments);
+z instanceof mxValueChange&&null!=z.cell&&null!=z.cell.value&&"object"==typeof z.cell.value&&this.invalidateDescendantsWithPlaceholders(z.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(z){z=this.model.getDescendants(z);if(0<z.length)for(var K=0;K<z.length;K++){var L=this.view.getState(z[K]);null!=L&&null!=L.shape&&null!=L.shape.stencil&&this.stencilHasPlaceholders(L.shape.stencil)?this.removeStateForCell(z[K]):this.isReplacePlaceholders(z[K])&&this.view.invalidate(z[K],!1,!1)}};
+Graph.prototype.replaceElement=function(z,K){K=z.ownerDocument.createElement(null!=K?K:"span");for(var L=Array.prototype.slice.call(z.attributes);attr=L.pop();)K.setAttribute(attr.nodeName,attr.nodeValue);K.innerHTML=z.innerHTML;z.parentNode.replaceChild(K,z)};Graph.prototype.processElements=function(z,K){if(null!=z){z=z.getElementsByTagName("*");for(var L=0;L<z.length;L++)K(z[L])}};Graph.prototype.updateLabelElements=function(z,K,L){z=null!=z?z:this.getSelectionCells();for(var S=document.createElement("div"),
+V=0;V<z.length;V++)if(this.isHtmlLabel(z[V])){var ja=this.convertValueToString(z[V]);if(null!=ja&&0<ja.length){S.innerHTML=ja;for(var na=S.getElementsByTagName(null!=L?L:"*"),ya=0;ya<na.length;ya++)K(na[ya]);S.innerHTML!=ja&&this.cellLabelChanged(z[V],S.innerHTML)}}};Graph.prototype.cellLabelChanged=function(z,K,L){K=Graph.zapGremlins(K);this.model.beginUpdate();try{if(null!=z.value&&"object"==typeof z.value){if(this.isReplacePlaceholders(z)&&null!=z.getAttribute("placeholder"))for(var S=z.getAttribute("placeholder"),
+V=z;null!=V;){if(V==this.model.getRoot()||null!=V.value&&"object"==typeof V.value&&V.hasAttribute(S)){this.setAttributeForCell(V,S,K);break}V=this.model.getParent(V)}var ja=z.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&ja.hasAttribute("label_"+Graph.diagramLanguage)?ja.setAttribute("label_"+Graph.diagramLanguage,K):ja.setAttribute("label",K);K=ja}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(z){if(null!=
+z){for(var K=new mxDictionary,L=0;L<z.length;L++)K.put(z[L],!0);var S=[];for(L=0;L<z.length;L++){var V=this.model.getParent(z[L]);null==V||K.get(V)||(K.put(V,!0),S.push(V))}for(L=0;L<S.length;L++)if(V=this.view.getState(S[L]),null!=V&&(this.model.isEdge(V.cell)||this.model.isVertex(V.cell))&&this.isCellDeletable(V.cell)&&this.isTransparentState(V)){for(var ja=!0,na=0;na<this.model.getChildCount(V.cell)&&ja;na++)K.get(this.model.getChildAt(V.cell,na))||(ja=!1);ja&&z.push(V.cell)}}mxGraph.prototype.cellsRemoved.apply(this,
+arguments)};Graph.prototype.removeCellsAfterUngroup=function(z){for(var K=[],L=0;L<z.length;L++)this.isCellDeletable(z[L])&&this.isTransparentState(this.view.getState(z[L]))&&K.push(z[L]);z=K;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(z,K){this.setAttributeForCell(z,"link",K)};Graph.prototype.setTooltipForCell=function(z,K){var L="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(z.value)&&z.value.hasAttribute("tooltip_"+
+Graph.diagramLanguage)&&(L="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(z,L,K)};Graph.prototype.getAttributeForCell=function(z,K,L){z=null!=z.value&&"object"===typeof z.value?z.value.getAttribute(K):null;return null!=z?z:L};Graph.prototype.setAttributeForCell=function(z,K,L){if(null!=z.value&&"object"==typeof z.value)var S=z.value.cloneNode(!0);else S=mxUtils.createXmlDocument().createElement("UserObject"),S.setAttribute("label",z.value||"");null!=L?S.setAttribute(K,L):S.removeAttribute(K);
+this.model.setValue(z,S)};var F=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(z,K,L,S){this.getModel();if(mxEvent.isAltDown(K))return null;for(var V=0;V<z.length;V++){var ja=this.model.getParent(z[V]);if(this.model.isEdge(ja)&&0>mxUtils.indexOf(z,ja))return null}ja=F.apply(this,arguments);var na=!0;for(V=0;V<z.length&&na;V++)na=na&&this.isTableRow(z[V]);na&&(this.isTableCell(ja)&&(ja=this.model.getParent(ja)),this.isTableRow(ja)&&(ja=this.model.getParent(ja)),this.isTable(ja)||
+(ja=null));return ja};Graph.prototype.click=function(z){mxGraph.prototype.click.call(this,z);this.firstClickState=z.getState();this.firstClickSource=z.getSource()};Graph.prototype.dblClick=function(z,K){this.isEnabled()&&(K=this.insertTextForEvent(z,K),mxGraph.prototype.dblClick.call(this,z,K))};Graph.prototype.insertTextForEvent=function(z,K){var L=mxUtils.convertPoint(this.container,mxEvent.getClientX(z),mxEvent.getClientY(z));if(null!=z&&!this.model.isVertex(K)){var S=this.model.isEdge(K)?this.view.getState(K):
+null,V=mxEvent.getSource(z);this.firstClickState!=S||this.firstClickSource!=V||null!=S&&null!=S.text&&null!=S.text.node&&null!=S.text.boundingBox&&(mxUtils.contains(S.text.boundingBox,L.x,L.y)||mxUtils.isAncestorNode(S.text.node,mxEvent.getSource(z)))||(null!=S||this.isCellLocked(this.getDefaultParent()))&&(null==S||this.isCellLocked(S.cell))||!(null!=S||mxClient.IS_SVG&&V==this.view.getCanvas().ownerSVGElement)||(null==S&&(S=this.view.getState(this.getCellAt(L.x,L.y))),K=this.addText(L.x,L.y,S))}return K};
+Graph.prototype.getInsertPoint=function(){var z=this.getGridSize(),K=this.container.scrollLeft/this.view.scale-this.view.translate.x,L=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var S=this.getPageLayout(),V=this.getPageSize();K=Math.max(K,S.x*V.width);L=Math.max(L,S.y*V.height)}return new mxPoint(this.snap(K+z),this.snap(L+z))};Graph.prototype.getFreeInsertPoint=function(){var z=this.view,K=this.getGraphBounds(),L=this.getInsertPoint(),S=this.snap(Math.round(Math.max(L.x,
+K.x/z.scale-z.translate.x+(0==K.width?2*this.gridSize:0))));z=this.snap(Math.round(Math.max(L.y,(K.y+K.height)/z.scale-z.translate.y+2*this.gridSize)));return new mxPoint(S,z)};Graph.prototype.getCenterInsertPoint=function(z){z=null!=z?z:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap(Math.round((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-z.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/
+2)/this.view.scale-this.view.translate.y-z.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-z.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-z.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(z,K,L){var S=new mxCell;S.value="Text";S.geometry=new mxGeometry(0,0,0,0);S.vertex=!0;if(null!=L&&this.model.isEdge(L.cell)){S.style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];";
+S.geometry.relative=!0;S.connectable=!1;var V=this.view.getRelativePoint(L,z,K);S.geometry.x=Math.round(1E4*V.x)/1E4;S.geometry.y=Math.round(V.y);S.geometry.offset=new mxPoint(0,0);V=this.view.getPoint(L,S.geometry);var ja=this.view.scale;S.geometry.offset=new mxPoint(Math.round((z-V.x)/ja),Math.round((K-V.y)/ja))}else V=this.view.translate,S.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",S.geometry.width=40,S.geometry.height=20,S.geometry.x=Math.round(z/this.view.scale)-
+V.x-(null!=L?L.origin.x:0),S.geometry.y=Math.round(K/this.view.scale)-V.y-(null!=L?L.origin.y:0),S.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([S],null!=L?L.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[S])),this.autoSizeCell(S)}finally{this.getModel().endUpdate()}return S};Graph.prototype.addClickHandler=function(z,K,L){var S=mxUtils.bind(this,function(){var ra=this.container.getElementsByTagName("a");if(null!=ra)for(var ta=0;ta<ra.length;ta++){var Da=
+this.getAbsoluteUrl(ra[ta].getAttribute("href"));null!=Da&&(ra[ta].setAttribute("rel",this.linkRelation),ra[ta].setAttribute("href",Da),null!=K&&mxEvent.addGestureListeners(ra[ta],null,null,K))}});this.model.addListener(mxEvent.CHANGE,S);S();var V=this.container.style.cursor,ja=this.getTolerance(),na=this,ya={currentState:null,currentLink:null,currentTarget:null,highlight:null!=z&&""!=z&&z!=mxConstants.NONE?new mxCellHighlight(na,z,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(ra){var ta=
+ra.sourceState;if(null==ta||null==na.getLinkForCell(ta.cell))ra=na.getCellAt(ra.getGraphX(),ra.getGraphY(),null,null,null,function(Da,Oa,Ma){return null==na.getLinkForCell(Da.cell)}),ta=null==ta||na.model.isAncestor(ra,ta.cell)?na.view.getState(ra):null;ta!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=ta,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(ra,ta){this.startX=ta.getGraphX();this.startY=ta.getGraphY();this.scrollLeft=na.container.scrollLeft;
+this.scrollTop=na.container.scrollTop;null==this.currentLink&&"auto"==na.container.style.overflow&&(na.container.style.cursor="move");this.updateCurrentState(ta)},mouseMove:function(ra,ta){if(na.isMouseDown)null!=this.currentLink&&(ra=Math.abs(this.startX-ta.getGraphX()),ta=Math.abs(this.startY-ta.getGraphY()),(ra>ja||ta>ja)&&this.clear());else{for(ra=ta.getSource();null!=ra&&"a"!=ra.nodeName.toLowerCase();)ra=ra.parentNode;null!=ra?this.clear():(null!=na.tooltipHandler&&null!=this.currentLink&&null!=
+this.currentState&&na.tooltipHandler.reset(ta,!0,this.currentState),(null==this.currentState||ta.getState()!=this.currentState&&null!=ta.sourceState||!na.intersects(this.currentState,ta.getGraphX(),ta.getGraphY()))&&this.updateCurrentState(ta))}},mouseUp:function(ra,ta){var Da=ta.getSource();for(ra=ta.getEvent();null!=Da&&"a"!=Da.nodeName.toLowerCase();)Da=Da.parentNode;null==Da&&Math.abs(this.scrollLeft-na.container.scrollLeft)<ja&&Math.abs(this.scrollTop-na.container.scrollTop)<ja&&(null==ta.sourceState||
+!ta.isSource(ta.sourceState.control))&&((mxEvent.isLeftMouseButton(ra)||mxEvent.isMiddleMouseButton(ra))&&!mxEvent.isPopupTrigger(ra)||mxEvent.isTouchEvent(ra))&&(null!=this.currentLink?(Da=na.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&Da||null==K||K(ra,this.currentLink),mxEvent.isConsumed(ra)||(ra=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(ra)?"_blank":Da?na.linkTarget:"_top",na.openLink(this.currentLink,ra),ta.consume())):null!=L&&!ta.isConsumed()&&
+Math.abs(this.scrollLeft-na.container.scrollLeft)<ja&&Math.abs(this.scrollTop-na.container.scrollTop)<ja&&Math.abs(this.startX-ta.getGraphX())<ja&&Math.abs(this.startY-ta.getGraphY())<ja&&L(ta.getEvent()));this.clear()},activate:function(ra){this.currentLink=na.getAbsoluteUrl(na.getLinkForCell(ra.cell));null!=this.currentLink&&(this.currentTarget=na.getLinkTargetForCell(ra.cell),na.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(ra))},clear:function(){null!=na.container&&
+(na.container.style.cursor=V);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=na.tooltipHandler&&na.tooltipHandler.hide()}};na.click=function(ra){};na.addMouseListener(ya);mxEvent.addListener(document,"mouseleave",function(ra){ya.clear()})};Graph.prototype.duplicateCells=function(z,K){z=null!=z?z:this.getSelectionCells();K=null!=K?K:!0;for(var L=0;L<z.length;L++)this.isTableCell(z[L])&&(z[L]=this.model.getParent(z[L]));z=this.model.getTopmostCells(z);
+var S=this.getModel(),V=this.gridSize,ja=[];S.beginUpdate();try{var na={},ya=this.createCellLookup(z),ra=this.cloneCells(z,!1,na,!0);for(L=0;L<z.length;L++){var ta=S.getParent(z[L]);if(null!=ta){var Da=this.moveCells([ra[L]],V,V,!1)[0];ja.push(Da);if(K)S.add(ta,ra[L]);else{var Oa=ta.getIndex(z[L]);S.add(ta,ra[L],Oa+1)}if(this.isTable(ta)){var Ma=this.getCellGeometry(ra[L]),Wa=this.getCellGeometry(ta);null!=Ma&&null!=Wa&&(Wa=Wa.clone(),Wa.height+=Ma.height,S.setGeometry(ta,Wa))}}else ja.push(ra[L])}this.updateCustomLinks(this.createCellMapping(na,
+ya),ra,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",ra))}finally{S.endUpdate()}return ja};Graph.prototype.insertImage=function(z,K,L){if(null!=z&&null!=this.cellEditor.textarea){for(var S=this.cellEditor.textarea.getElementsByTagName("img"),V=[],ja=0;ja<S.length;ja++)V.push(S[ja]);document.execCommand("insertimage",!1,z);z=this.cellEditor.textarea.getElementsByTagName("img");if(z.length==V.length+1)for(ja=z.length-1;0<=ja;ja--)if(0==ja||z[ja]!=V[ja-1]){z[ja].setAttribute("width",
+K);z[ja].setAttribute("height",L);break}}};Graph.prototype.insertLink=function(z){if(null!=this.cellEditor.textarea)if(0==z.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var K=this.cellEditor.textarea.getElementsByTagName("a"),L=[],S=0;S<K.length;S++)L.push(K[S]);document.execCommand("createlink",!1,mxUtils.trim(z));K=this.cellEditor.textarea.getElementsByTagName("a");if(K.length==L.length+1)for(S=K.length-1;0<=S;S--)if(K[S]!=L[S-1]){for(K=K[S].getElementsByTagName("a");0<K.length;){for(L=
+K[0].parentNode;null!=K[0].firstChild;)L.insertBefore(K[0].firstChild,K[0]);L.removeChild(K[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(z))};Graph.prototype.isCellResizable=function(z){var K=mxGraph.prototype.isCellResizable.apply(this,arguments),L=this.getCurrentCellStyle(z);return!this.isTableCell(z)&&!this.isTableRow(z)&&(K||"0"!=mxUtils.getValue(L,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==L[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(z,K){null==
+K&&(K=this.getSelectionCells());if(null!=K&&1<K.length){for(var L=[],S=null,V=null,ja=0;ja<K.length;ja++)if(this.getModel().isVertex(K[ja])){var na=this.view.getState(K[ja]);if(null!=na){var ya=z?na.getCenterX():na.getCenterY();S=null!=S?Math.max(S,ya):ya;V=null!=V?Math.min(V,ya):ya;L.push(na)}}if(2<L.length){L.sort(function(Oa,Ma){return z?Oa.x-Ma.x:Oa.y-Ma.y});na=this.view.translate;ya=this.view.scale;V=V/ya-(z?na.x:na.y);S=S/ya-(z?na.x:na.y);this.getModel().beginUpdate();try{var ra=(S-V)/(L.length-
+1);S=V;for(ja=1;ja<L.length-1;ja++){var ta=this.view.getState(this.model.getParent(L[ja].cell)),Da=this.getCellGeometry(L[ja].cell);S+=ra;null!=Da&&null!=ta&&(Da=Da.clone(),z?Da.x=Math.round(S-Da.width/2)-ta.origin.x:Da.y=Math.round(S-Da.height/2)-ta.origin.y,this.getModel().setGeometry(L[ja].cell,Da))}}finally{this.getModel().endUpdate()}}}return K};Graph.prototype.isCloneEvent=function(z){return mxClient.IS_MAC&&mxEvent.isMetaDown(z)||mxEvent.isControlDown(z)};Graph.prototype.createSvgImageExport=
+function(){var z=new mxImageExport;z.getLinkForCellState=mxUtils.bind(this,function(K,L){return this.getLinkForCell(K.cell)});return z};Graph.prototype.parseBackgroundImage=function(z){var K=null;null!=z&&0<z.length&&(z=JSON.parse(z),K=new mxImage(z.src,z.width,z.height));return K};Graph.prototype.getBackgroundImageObject=function(z){return z};Graph.prototype.getSvg=function(z,K,L,S,V,ja,na,ya,ra,ta,Da,Oa,Ma,Wa){var Sa=null;if(null!=Wa)for(Sa=new mxDictionary,Da=0;Da<Wa.length;Da++)Sa.put(Wa[Da],
+!0);if(Wa=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{K=null!=K?K:1;L=null!=L?L:0;V=null!=V?V:!0;ja=null!=ja?ja:!0;na=null!=na?na:!0;ta=null!=ta?ta:!1;var Fa="page"==Ma?this.view.getBackgroundPageBounds():ja&&null==Sa||S||"diagram"==Ma?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),Ja=this.view.scale;"diagram"==Ma&&null!=this.backgroundImage&&(Fa=mxRectangle.fromRectangle(Fa),Fa.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*
+Ja,(this.view.translate.y+this.backgroundImage.y)*Ja,this.backgroundImage.width*Ja,this.backgroundImage.height*Ja)));if(null==Fa)throw Error(mxResources.get("drawingEmpty"));S=K/Ja;Ma=V?-.5:0;var xa=Graph.createSvgNode(Ma,Ma,Math.max(1,Math.ceil(Fa.width*S)+2*L)+(ta&&0==L?5:0),Math.max(1,Math.ceil(Fa.height*S)+2*L)+(ta&&0==L?5:0),z),Ba=xa.ownerDocument,Pa=null!=Ba.createElementNS?Ba.createElementNS(mxConstants.NS_SVG,"g"):Ba.createElement("g");xa.appendChild(Pa);var Ka=this.createSvgCanvas(Pa);Ka.foOffset=
+V?-.5:0;Ka.textOffset=V?-.5:0;Ka.imageOffset=V?-.5:0;Ka.translate(Math.floor(L/K-Fa.x/Ja),Math.floor(L/K-Fa.y/Ja));var Na=document.createElement("div"),hb=Ka.getAlternateText;Ka.getAlternateText=function(eb,kb,ib,pb,vb,ob,Bb,yb,nb,qb,fb,rb,tb){if(null!=ob&&0<this.state.fontSize)try{mxUtils.isNode(ob)?ob=ob.innerText:(Na.innerHTML=ob,ob=mxUtils.extractTextWithWhitespace(Na.childNodes));for(var zb=Math.ceil(2*pb/this.state.fontSize),wb=[],Ab=0,lb=0;(0==zb||Ab<zb)&&lb<ob.length;){var xb=ob.charCodeAt(lb);
+if(10==xb||13==xb){if(0<Ab)break}else wb.push(ob.charAt(lb)),255>xb&&Ab++;lb++}wb.length<ob.length&&1<ob.length-wb.length&&(ob=mxUtils.trim(wb.join(""))+"...");return ob}catch(c){return hb.apply(this,arguments)}else return hb.apply(this,arguments)};var Qa=this.backgroundImage;if(null!=Qa){z=Ja/K;var mb=this.view.translate;Ma=new mxRectangle((Qa.x+mb.x)*z,(Qa.y+mb.y)*z,Qa.width*z,Qa.height*z);mxUtils.intersects(Fa,Ma)&&Ka.image(Qa.x+mb.x,Qa.y+mb.y,Qa.width,Qa.height,Qa.src,!0)}Ka.scale(S);Ka.textEnabled=
+na;ya=null!=ya?ya:this.createSvgImageExport();var ub=ya.drawCellState,bb=ya.getLinkForCellState;ya.getLinkForCellState=function(eb,kb){var ib=bb.apply(this,arguments);return null==ib||eb.view.graph.isCustomLink(ib)?null:ib};ya.getLinkTargetForCellState=function(eb,kb){return eb.view.graph.getLinkTargetForCell(eb.cell)};ya.drawCellState=function(eb,kb){for(var ib=eb.view.graph,pb=null!=Sa?Sa.get(eb.cell):ib.isCellSelected(eb.cell),vb=ib.model.getParent(eb.cell);!(ja&&null==Sa||pb)&&null!=vb;)pb=null!=
+Sa?Sa.get(vb):ib.isCellSelected(vb),vb=ib.model.getParent(vb);(ja&&null==Sa||pb)&&ub.apply(this,arguments)};ya.drawState(this.getView().getState(this.model.root),Ka);this.updateSvgLinks(xa,ra,!0);this.addForeignObjectWarning(Ka,xa);return xa}finally{Wa&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(z,K){if("0"!=urlParams["svg-warning"]&&0<K.getElementsByTagName("foreignObject").length){var L=z.createElement("switch"),S=z.createElement("g");
+S.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var V=z.createElement("a");V.setAttribute("transform","translate(0,-5)");null==V.setAttributeNS||K.ownerDocument!=document&&null==document.documentMode?(V.setAttribute("xlink:href",Graph.foreignObjectWarningLink),V.setAttribute("target","_blank")):(V.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),V.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));z=z.createElement("text");
+z.setAttribute("text-anchor","middle");z.setAttribute("font-size","10px");z.setAttribute("x","50%");z.setAttribute("y","100%");mxUtils.write(z,Graph.foreignObjectWarningText);L.appendChild(S);V.appendChild(z);L.appendChild(V);K.appendChild(L)}};Graph.prototype.updateSvgLinks=function(z,K,L){z=z.getElementsByTagName("a");for(var S=0;S<z.length;S++)if(null==z[S].getAttribute("target")){var V=z[S].getAttribute("href");null==V&&(V=z[S].getAttribute("xlink:href"));null!=V&&(null!=K&&/^https?:\/\//.test(V)?
+z[S].setAttribute("target",K):L&&this.isCustomLink(V)&&z[S].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(z){z=new mxSvgCanvas2D(z);z.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;z.pointerEvents=!0;return z};Graph.prototype.getSelectedElement=function(){var z=null;if(window.getSelection){var K=window.getSelection();K.getRangeAt&&K.rangeCount&&(z=K.getRangeAt(0).commonAncestorContainer)}else document.selection&&(z=document.selection.createRange().parentElement());
+return z};Graph.prototype.getSelectedEditingElement=function(){for(var z=this.getSelectedElement();null!=z&&z.nodeType!=mxConstants.NODETYPE_ELEMENT;)z=z.parentNode;null!=z&&z==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(z=this.cellEditor.textarea.firstChild);return z};Graph.prototype.getParentByName=function(z,K,L){for(;null!=z&&z.nodeName!=K;){if(z==L)return null;z=z.parentNode}return z};Graph.prototype.getParentByNames=
+function(z,K,L){for(;null!=z&&!(0<=mxUtils.indexOf(K,z.nodeName));){if(z==L)return null;z=z.parentNode}return z};Graph.prototype.selectNode=function(z){var K=null;if(window.getSelection){if(K=window.getSelection(),K.getRangeAt&&K.rangeCount){var L=document.createRange();L.selectNode(z);K.removeAllRanges();K.addRange(L)}}else(K=document.selection)&&"Control"!=K.type&&(z=K.createRange(),z.collapse(!0),L=K.createRange(),L.setEndPoint("StartToStart",z),L.select())};Graph.prototype.flipEdgePoints=function(z,
+K,L){var S=this.getCellGeometry(z);if(null!=S){S=S.clone();if(null!=S.points)for(var V=0;V<S.points.length;V++)K?S.points[V].x=L+(L-S.points[V].x):S.points[V].y=L+(L-S.points[V].y);V=function(ja){null!=ja&&(K?ja.x=L+(L-ja.x):ja.y=L+(L-ja.y))};V(S.getTerminalPoint(!0));V(S.getTerminalPoint(!1));this.model.setGeometry(z,S)}};Graph.prototype.flipChildren=function(z,K,L){this.model.beginUpdate();try{for(var S=this.model.getChildCount(z),V=0;V<S;V++){var ja=this.model.getChildAt(z,V);if(this.model.isEdge(ja))this.flipEdgePoints(ja,
+K,L);else{var na=this.getCellGeometry(ja);null!=na&&(na=na.clone(),K?na.x=L+(L-na.x-na.width):na.y=L+(L-na.y-na.height),this.model.setGeometry(ja,na))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(z,K){this.model.beginUpdate();try{z=this.model.getTopmostCells(z);for(var L=[],S=0;S<z.length;S++)if(this.model.isEdge(z[S])){var V=this.view.getState(z[S]);null!=V&&this.flipEdgePoints(z[S],K,(K?V.getCenterX():V.getCenterY())/this.view.scale-(K?V.origin.x:V.origin.y)-(K?this.view.translate.x:
+this.view.translate.y))}else{var ja=this.getCellGeometry(z[S]);null!=ja&&this.flipChildren(z[S],K,K?ja.getCenterX()-ja.x:ja.getCenterY()-ja.y);L.push(z[S])}this.toggleCellStyles(K?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,L)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(z,K){var L=null;if(null!=z&&0<z.length){this.model.beginUpdate();try{for(var S=0;S<z.length;S++){var V=this.model.getParent(z[S]);if(this.isTable(V)){var ja=this.getCellGeometry(z[S]),na=this.getCellGeometry(V);
+null!=ja&&null!=na&&(na=na.clone(),na.height-=ja.height,this.model.setGeometry(V,na))}}var ya=this.selectParentAfterDelete?this.model.getParents(z):null;this.removeCells(z,K)}finally{this.model.endUpdate()}if(null!=ya)for(L=[],S=0;S<ya.length;S++)this.model.contains(ya[S])&&(this.model.isVertex(ya[S])||this.model.isEdge(ya[S]))&&L.push(ya[S])}return L};Graph.prototype.insertTableColumn=function(z,K){var L=this.getModel();L.beginUpdate();try{var S=z,V=0;if(this.isTableCell(z)){var ja=L.getParent(z);
+S=L.getParent(ja);V=mxUtils.indexOf(L.getChildCells(ja,!0),z)}else this.isTableRow(z)?S=L.getParent(z):z=L.getChildCells(S,!0)[0],K||(V=L.getChildCells(z,!0).length-1);var na=L.getChildCells(S,!0),ya=Graph.minTableColumnWidth;for(z=0;z<na.length;z++){var ra=L.getChildCells(na[z],!0)[V],ta=L.cloneCell(ra,!1),Da=this.getCellGeometry(ta);ta.value=null;ta.style=mxUtils.setStyle(mxUtils.setStyle(ta.style,"rowspan",null),"colspan",null);if(null!=Da){null!=Da.alternateBounds&&(Da.width=Da.alternateBounds.width,
+Da.height=Da.alternateBounds.height,Da.alternateBounds=null);ya=Da.width;var Oa=this.getCellGeometry(na[z]);null!=Oa&&(Da.height=Oa.height)}L.add(na[z],ta,V+(K?0:1))}var Ma=this.getCellGeometry(S);null!=Ma&&(Ma=Ma.clone(),Ma.width+=ya,L.setGeometry(S,Ma))}finally{L.endUpdate()}};Graph.prototype.deleteLane=function(z){var K=this.getModel();K.beginUpdate();try{var L=null;L="stackLayout"==this.getCurrentCellStyle(z).childLayout?z:K.getParent(z);var S=K.getChildCells(L,!0);0==S.length?K.remove(L):(L==
+z&&(z=S[S.length-1]),K.remove(z))}finally{K.endUpdate()}};Graph.prototype.insertLane=function(z,K){var L=this.getModel();L.beginUpdate();try{var S=null;if("stackLayout"==this.getCurrentCellStyle(z).childLayout){S=z;var V=L.getChildCells(S,!0);z=V[K?0:V.length-1]}else S=L.getParent(z);var ja=S.getIndex(z);z=L.cloneCell(z,!1);z.value=null;L.add(S,z,ja+(K?0:1))}finally{L.endUpdate()}};Graph.prototype.insertTableRow=function(z,K){var L=this.getModel();L.beginUpdate();try{var S=z,V=z;if(this.isTableCell(z))V=
+L.getParent(z),S=L.getParent(V);else if(this.isTableRow(z))S=L.getParent(z);else{var ja=L.getChildCells(S,!0);V=ja[K?0:ja.length-1]}var na=L.getChildCells(V,!0),ya=S.getIndex(V);V=L.cloneCell(V,!1);V.value=null;var ra=this.getCellGeometry(V);if(null!=ra){for(ja=0;ja<na.length;ja++){z=L.cloneCell(na[ja],!1);z.value=null;z.style=mxUtils.setStyle(mxUtils.setStyle(z.style,"rowspan",null),"colspan",null);var ta=this.getCellGeometry(z);null!=ta&&(null!=ta.alternateBounds&&(ta.width=ta.alternateBounds.width,
+ta.height=ta.alternateBounds.height,ta.alternateBounds=null),ta.height=ra.height);V.insert(z)}L.add(S,V,ya+(K?0:1));var Da=this.getCellGeometry(S);null!=Da&&(Da=Da.clone(),Da.height+=ra.height,L.setGeometry(S,Da))}}finally{L.endUpdate()}};Graph.prototype.deleteTableColumn=function(z){var K=this.getModel();K.beginUpdate();try{var L=z,S=z;this.isTableCell(z)&&(S=K.getParent(z));this.isTableRow(S)&&(L=K.getParent(S));var V=K.getChildCells(L,!0);if(0==V.length)K.remove(L);else{this.isTableRow(S)||(S=
+V[0]);var ja=K.getChildCells(S,!0);if(1>=ja.length)K.remove(L);else{var na=ja.length-1;this.isTableCell(z)&&(na=mxUtils.indexOf(ja,z));for(S=z=0;S<V.length;S++){var ya=K.getChildCells(V[S],!0)[na];K.remove(ya);var ra=this.getCellGeometry(ya);null!=ra&&(z=Math.max(z,ra.width))}var ta=this.getCellGeometry(L);null!=ta&&(ta=ta.clone(),ta.width-=z,K.setGeometry(L,ta))}}}finally{K.endUpdate()}};Graph.prototype.deleteTableRow=function(z){var K=this.getModel();K.beginUpdate();try{var L=z,S=z;this.isTableCell(z)&&
+(z=S=K.getParent(z));this.isTableRow(z)&&(L=K.getParent(S));var V=K.getChildCells(L,!0);if(1>=V.length)K.remove(L);else{this.isTableRow(S)||(S=V[V.length-1]);K.remove(S);z=0;var ja=this.getCellGeometry(S);null!=ja&&(z=ja.height);var na=this.getCellGeometry(L);null!=na&&(na=na.clone(),na.height-=z,K.setGeometry(L,na))}}finally{K.endUpdate()}};Graph.prototype.insertRow=function(z,K){for(var L=z.tBodies[0],S=L.rows[0].cells,V=z=0;V<S.length;V++){var ja=S[V].getAttribute("colspan");z+=null!=ja?parseInt(ja):
+1}K=L.insertRow(K);for(V=0;V<z;V++)mxUtils.br(K.insertCell(-1));return K.cells[0]};Graph.prototype.deleteRow=function(z,K){z.tBodies[0].deleteRow(K)};Graph.prototype.insertColumn=function(z,K){var L=z.tHead;if(null!=L)for(var S=0;S<L.rows.length;S++){var V=document.createElement("th");L.rows[S].appendChild(V);mxUtils.br(V)}z=z.tBodies[0];for(L=0;L<z.rows.length;L++)S=z.rows[L].insertCell(K),mxUtils.br(S);return z.rows[0].cells[0<=K?K:z.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(z,
+K){if(0<=K){z=z.tBodies[0].rows;for(var L=0;L<z.length;L++)z[L].cells.length>K&&z[L].deleteCell(K)}};Graph.prototype.pasteHtmlAtCaret=function(z){if(window.getSelection){var K=window.getSelection();if(K.getRangeAt&&K.rangeCount){K=K.getRangeAt(0);K.deleteContents();var L=document.createElement("div");L.innerHTML=z;z=document.createDocumentFragment();for(var S;S=L.firstChild;)lastNode=z.appendChild(S);K.insertNode(z)}}else(K=document.selection)&&"Control"!=K.type&&K.createRange().pasteHTML(z)};Graph.prototype.createLinkForHint=
+function(z,K){function L(V,ja){V.length>ja&&(V=V.substring(0,Math.round(ja/2))+"..."+V.substring(V.length-Math.round(ja/4)));return V}z=null!=z?z:"javascript:void(0);";if(null==K||0==K.length)K=this.isCustomLink(z)?this.getLinkTitle(z):z;var S=document.createElement("a");S.setAttribute("rel",this.linkRelation);S.setAttribute("href",this.getAbsoluteUrl(z));S.setAttribute("title",L(this.isCustomLink(z)?this.getLinkTitle(z):z,80));null!=this.linkTarget&&S.setAttribute("target",this.linkTarget);mxUtils.write(S,
+L(K,40));this.isCustomLink(z)&&mxEvent.addListener(S,"click",mxUtils.bind(this,function(V){this.customLinkClicked(z);mxEvent.consume(V)}));return S};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(ja,na){this.popupMenuHandler.hideMenu()});var z=this.updateMouseEvent;this.updateMouseEvent=function(ja){ja=z.apply(this,arguments);if(mxEvent.isTouchEvent(ja.getEvent())&&
+null==ja.getState()){var na=this.getCellAt(ja.graphX,ja.graphY);null!=na&&this.isSwimlane(na)&&this.hitsSwimlaneContent(na,ja.graphX,ja.graphY)||(ja.state=this.view.getState(na),null!=ja.state&&null!=ja.state.shape&&(this.container.style.cursor=ja.state.shape.node.style.cursor))}null==ja.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return ja};var K=!1,L=!1,S=!1,V=this.fireMouseEvent;this.fireMouseEvent=function(ja,na,ya){ja==mxEvent.MOUSE_DOWN&&(na=this.updateMouseEvent(na),
+K=this.isCellSelected(na.getCell()),L=this.isSelectionEmpty(),S=this.popupMenuHandler.isMenuShowing());V.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(ja,na){var ya=mxEvent.isMouseEvent(na.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==na.getState()||!na.isSource(na.getState().control))&&(this.popupMenuHandler.popupTrigger||!S&&!ya&&(L&&null==na.getCell()&&this.isSelectionEmpty()||K&&this.isCellSelected(na.getCell())));
+ya=!K||ya?null:mxUtils.bind(this,function(ra){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var ta=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(na.getX()+ta.x+1,na.getY()+ta.y+1,ra,na.getEvent())}}),500)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[ja,na,ya])})};mxCellEditor.prototype.isContentEditing=function(){var z=this.graph.view.getState(this.editingCell);return null!=z&&1==z.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=
+this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var z="";window.getSelection?z=window.getSelection():document.getSelection?z=document.getSelection():document.selection&&(z=document.selection.createRange().text);return""!=z};mxCellEditor.prototype.insertTab=function(z){var K=this.textarea.ownerDocument.defaultView.getSelection(),L=K.getRangeAt(0),S="\t";if(null!=z)for(S="";0<z;)S+=" ",z--;z=document.createElement("span");
+z.style.whiteSpace="pre";z.appendChild(document.createTextNode(S));L.insertNode(z);L.setStartAfter(z);L.setEndAfter(z);K.removeAllRanges();K.addRange(L)};mxCellEditor.prototype.alignText=function(z,K){var L=null!=K&&mxEvent.isShiftDown(K);if(L||null!=window.getSelection&&null!=window.getSelection().containsNode){var S=!0;this.graph.processElements(this.textarea,function(V){L||window.getSelection().containsNode(V,!0)?(V.removeAttribute("align"),V.style.textAlign=null):S=!1});S&&this.graph.cellEditor.setAlign(z)}document.execCommand("justify"+
+z.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var z=window.getSelection();if(z.getRangeAt&&z.rangeCount){for(var K=[],L=0,S=z.rangeCount;L<S;++L)K.push(z.getRangeAt(L));return K}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(z){try{if(z)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var K=0,L=z.length;K<
+L;++K)sel.addRange(z[K])}else document.selection&&z.select&&z.select()}catch(S){}};var C=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(z){null!=z.text&&(z.text.replaceLinefeeds="0"!=mxUtils.getValue(z.style,"nl2Br","1"));C.apply(this,arguments)};var I=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(z,K){this.isKeepFocusEvent(z)||!mxEvent.isAltDown(z.getEvent())?I.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=
+function(z){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var G=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(z,K){z=this.graph.getStartEditingCell(z,K);G.apply(this,arguments);var L=this.graph.view.getState(z);this.textarea.className=null!=L&&1==L.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(z);
+L=this.graph.getModel().getParent(z);var S=this.graph.getCellGeometry(z);if(this.graph.getModel().isEdge(L)&&null!=S&&S.relative||this.graph.getModel().isEdge(z))this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var Z=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(z){function K(V,ja){ja.originalNode=V;V=V.firstChild;for(var na=ja.firstChild;null!=V&&null!=na;)K(V,na),V=V.nextSibling,na=na.nextSibling;
+return ja}function L(V,ja){if(null!=V)if(ja.originalNode!=V)S(V);else for(V=V.firstChild,ja=ja.firstChild;null!=V;){var na=V.nextSibling;null==ja?S(V):(L(V,ja),ja=ja.nextSibling);V=na}}function S(V){for(var ja=V.firstChild;null!=ja;){var na=ja.nextSibling;S(ja);ja=na}1==V.nodeType&&("BR"===V.nodeName||null!=V.firstChild)||3==V.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(V)).length?(3==V.nodeType&&mxUtils.setTextContent(V,mxUtils.getTextContent(V).replace(/\n|\r/g,"")),1==V.nodeType&&(V.removeAttribute("style"),
+V.removeAttribute("class"),V.removeAttribute("width"),V.removeAttribute("cellpadding"),V.removeAttribute("cellspacing"),V.removeAttribute("border"))):V.parentNode.removeChild(V)}Z.apply(this,arguments);7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(V){var ja=K(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||
+0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?L(this.textarea,ja):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var z=this.graph.view.getState(this.editingCell);if(null!=z){var K=null!=z&&"0"!=mxUtils.getValue(z.style,"nl2Br","1"),L=this.saveSelection();if(this.codeViewMode){ya=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<ya.length&&"\n"==ya.charAt(ya.length-1)&&(ya=ya.substring(0,ya.length-1));ya=this.graph.sanitizeHtml(K?
+ya.replace(/\n/g,"<br/>"):ya,!0);this.textarea.className="mxCellEditor geContentEditable";ra=mxUtils.getValue(z.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);K=mxUtils.getValue(z.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var S=mxUtils.getValue(z.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),V=(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,ja=(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,
+0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,na=[];(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&na.push("underline");(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&na.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ra*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=
+Math.round(ra)+"px";this.textarea.style.textDecoration=na.join(" ");this.textarea.style.fontWeight=V?"bold":"normal";this.textarea.style.fontStyle=ja?"italic":"";this.textarea.style.fontFamily=K;this.textarea.style.textAlign=S;this.textarea.style.padding="0px";this.textarea.innerHTML!=ya&&(this.textarea.innerHTML=ya,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&
+this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerText="");var ya=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(ya=mxUtils.replaceTrailingNewlines(ya,"<div><br></div>"));ya=this.graph.sanitizeHtml(K?ya.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):ya,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var ra=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ra*
+mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ra)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=ya&&(this.textarea.innerHTML=ya);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&
+this.restoreSelection(this.switchSelectionState);this.switchSelectionState=L;this.resize()}};var ca=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(z,K){if(null!=this.textarea)if(z=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=z){var L=z.view.scale;this.bounds=mxRectangle.fromRectangle(z);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*L;this.bounds.height=60*L;var S=null!=z.text?z.text.margin:null;null==S&&(S=mxUtils.getAlignmentAsPoint(mxUtils.getValue(z.style,
+mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(z.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=S.x*this.bounds.width;this.bounds.y+=S.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/L)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/L)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/L)+(this.textarea.offsetHeight-
+this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*L);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/L)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*L);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+L+","+
+L+")")}else this.textarea.style.height="",this.textarea.style.overflow="",ca.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(z,K){if("0"==mxUtils.getValue(z.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var L=this.graph.getEditingValue(z.cell,K);"1"==mxUtils.getValue(z.style,"nl2Br","1")&&(L=L.replace(/\n/g,"<br/>"));return L=this.graph.sanitizeHtml(L,!0)};mxCellEditorGetCurrentValue=
+mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(z){if("0"==mxUtils.getValue(z.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var K=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return K="1"==mxUtils.getValue(z.style,"nl2Br","1")?K.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):K.replace(/\r\n/g,"").replace(/\n/g,"")};var aa=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(z){this.codeViewMode&&
+this.toggleViewMode();aa.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(z){}};var Y=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(z,K){this.graph.getModel().beginUpdate();try{Y.apply(this,arguments),""==K&&this.graph.isCellDeletable(z.cell)&&0==this.graph.model.getChildCount(z.cell)&&this.graph.isTransparentState(z)&&this.graph.removeCells([z.cell],!1)}finally{this.graph.getModel().endUpdate()}};
+mxCellEditor.prototype.getBackgroundColor=function(z){var K=mxUtils.getValue(z.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=K&&K!=mxConstants.NONE||!(null!=z.cell.geometry&&0<z.cell.geometry.width)||0==mxUtils.getValue(z.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(z.style,mxConstants.STYLE_HORIZONTAL,1)||(K=mxUtils.getValue(z.style,mxConstants.STYLE_FILLCOLOR,null));K==mxConstants.NONE&&(K=null);return K};mxCellEditor.prototype.getBorderColor=function(z){var K=mxUtils.getValue(z.style,
+mxConstants.STYLE_LABEL_BORDERCOLOR,null);null!=K&&K!=mxConstants.NONE||!(null!=z.cell.geometry&&0<z.cell.geometry.width)||0==mxUtils.getValue(z.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(z.style,mxConstants.STYLE_HORIZONTAL,1)||(K=mxUtils.getValue(z.style,mxConstants.STYLE_STROKECOLOR,null));K==mxConstants.NONE&&(K=null);return K};mxCellEditor.prototype.getMinimumSize=function(z){var K=this.graph.getView().scale;return new mxRectangle(0,0,null==z.text?30:z.text.size*K+20,30)};mxGraphHandlerIsValidDropTarget=
+mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(z,K){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(K.getEvent)};mxGraphView.prototype.formatUnitText=function(z){return z?e(z,this.unit):z};mxGraphHandler.prototype.updateHint=function(z){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var K=this.graph.view.translate,L=this.graph.view.scale;
+z=this.roundLength((this.bounds.x+this.currentDx)/L-K.x);K=this.roundLength((this.bounds.y+this.currentDy)/L-K.y);L=this.graph.view.unit;this.hint.innerHTML=e(z,L)+", "+e(K,L);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=
+null)};var pa=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(z,K){pa.apply(this,arguments);var L=this.graph.getCellStyle(z);if(null==L.childLayout){var S=this.graph.model.getParent(z),V=null!=S?this.graph.getCellGeometry(S):null;if(null!=V&&(L=this.graph.getCellStyle(S),"stackLayout"==L.childLayout)){var ja=parseFloat(mxUtils.getValue(L,"stackBorder",mxStackLayout.prototype.border));L="1"==mxUtils.getValue(L,"horizontalStack","1");var na=this.graph.getActualStartSize(S);
+V=V.clone();L?V.height=K.height+na.y+na.height+2*ja:V.width=K.width+na.x+na.width+2*ja;this.graph.model.setGeometry(S,V)}}};var Q=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function z(ya){L.get(ya)||(L.put(ya,!0),V.push(ya))}for(var K=Q.apply(this,arguments),L=new mxDictionary,S=this.graph.model,V=[],ja=0;ja<K.length;ja++){var na=K[ja];this.graph.isTableCell(na)?z(S.getParent(S.getParent(na))):this.graph.isTableRow(na)&&
+z(S.getParent(na));z(na)}return V};var X=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(z){var K=X.apply(this,arguments);K.stroke="#C0C0C0";K.strokewidth=1;return K};var ha=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(z){var K=ha.apply(this,arguments);K.stroke="#C0C0C0";K.strokewidth=1;return K};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=
+function(){var z=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+z.x/2,this.bounds.y+this.rotationHandleVSpacing-z.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(z,K){return this.graph.isRecursiveVertexResize(z)&&!mxEvent.isAltDown(K.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(z,K){return mxEvent.isControlDown(K.getEvent())||mxEvent.isMetaDown(K.getEvent())};var U=mxVertexHandler.prototype.isRotationHandleVisible;
+mxVertexHandler.prototype.isRotationHandleVisible=function(){return U.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 ma=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=
+function(){return ma.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var T=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(z){return z.tableHandle||T.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var z=0;this.graph.isTableRow(this.state.cell)?z=1:this.graph.isTableCell(this.state.cell)&&
+(z=2);return z};var M=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return M.apply(this,arguments).grow(-this.getSelectionBorderInset())};var ia=null,N=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==ia&&(ia=mxCellRenderer.defaultShapes.tableLine);var z=N.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var K=function(Sa,Fa,Ja){for(var xa=[],Ba=0;Ba<Sa.length;Ba++){var Pa=
+Sa[Ba];xa.push(null==Pa?null:new mxPoint((ra+Pa.x+Fa)*ja,(ta+Pa.y+Ja)*ja))}return xa},L=this,S=this.graph,V=S.model,ja=S.view.scale,na=this.state,ya=this.selectionBorder,ra=this.state.origin.x+S.view.translate.x,ta=this.state.origin.y+S.view.translate.y;null==z&&(z=[]);var Da=S.view.getCellStates(V.getChildCells(this.state.cell,!0));if(0<Da.length){var Oa=V.getChildCells(Da[0].cell,!0),Ma=S.getTableLines(this.state.cell,!1,!0),Wa=S.getTableLines(this.state.cell,!0,!1);for(V=0;V<Da.length;V++)mxUtils.bind(this,
+function(Sa){var Fa=Da[Sa],Ja=Sa<Da.length-1?Da[Sa+1]:null;Ja=null!=Ja?S.getCellGeometry(Ja.cell):null;var xa=null!=Ja&&null!=Ja.alternateBounds?Ja.alternateBounds:Ja;Ja=null!=Wa[Sa]?new ia(Wa[Sa],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);Ja.isDashed=ya.isDashed;Ja.svgStrokeTolerance++;Fa=new mxHandle(Fa,"row-resize",null,Ja);Fa.tableHandle=!0;var Ba=0;Fa.shape.node.parentNode.insertBefore(Fa.shape.node,Fa.shape.node.parentNode.firstChild);Fa.redraw=function(){if(null!=
+this.shape){this.shape.stroke=0==Ba?mxConstants.NONE:ya.stroke;if(this.shape.constructor==ia)this.shape.line=K(Wa[Sa],0,Ba),this.shape.updateBoundsFromLine();else{var Ka=S.getActualStartSize(na.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+Ba*ja;this.shape.bounds.x=na.x+(Sa==Da.length-1?0:Ka.x*ja);this.shape.bounds.width=na.width-(Sa==Da.length-1?0:Ka.width+Ka.x+ja)}this.shape.redraw()}};var Pa=!1;Fa.setPosition=function(Ka,Na,hb){Ba=Math.max(Graph.minTableRowHeight-
+Ka.height,Na.y-Ka.y-Ka.height);Pa=mxEvent.isShiftDown(hb.getEvent());null!=xa&&Pa&&(Ba=Math.min(Ba,xa.height-Graph.minTableRowHeight))};Fa.execute=function(Ka){if(0!=Ba)S.setTableRowHeight(this.state.cell,Ba,!Pa);else if(!L.blockDelayedSelection){var Na=S.getCellAt(Ka.getGraphX(),Ka.getGraphY())||na.cell;S.graphHandler.selectCellForEvent(Na,Ka)}Ba=0};Fa.reset=function(){Ba=0};z.push(Fa)})(V);for(V=0;V<Oa.length;V++)mxUtils.bind(this,function(Sa){var Fa=S.view.getState(Oa[Sa]),Ja=S.getCellGeometry(Oa[Sa]),
+xa=null!=Ja.alternateBounds?Ja.alternateBounds:Ja;null==Fa&&(Fa=new mxCellState(S.view,Oa[Sa],S.getCellStyle(Oa[Sa])),Fa.x=na.x+Ja.x*ja,Fa.y=na.y+Ja.y*ja,Fa.width=xa.width*ja,Fa.height=xa.height*ja,Fa.updateCachedBounds());Ja=Sa<Oa.length-1?Oa[Sa+1]:null;Ja=null!=Ja?S.getCellGeometry(Ja):null;var Ba=null!=Ja&&null!=Ja.alternateBounds?Ja.alternateBounds:Ja;Ja=null!=Ma[Sa]?new ia(Ma[Sa],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);Ja.isDashed=ya.isDashed;Ja.svgStrokeTolerance++;
+Fa=new mxHandle(Fa,"col-resize",null,Ja);Fa.tableHandle=!0;var Pa=0;Fa.shape.node.parentNode.insertBefore(Fa.shape.node,Fa.shape.node.parentNode.firstChild);Fa.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Pa?mxConstants.NONE:ya.stroke;if(this.shape.constructor==ia)this.shape.line=K(Ma[Sa],Pa,0),this.shape.updateBoundsFromLine();else{var Na=S.getActualStartSize(na.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(xa.width+Pa)*ja;this.shape.bounds.y=na.y+(Sa==Oa.length-
+1?0:Na.y*ja);this.shape.bounds.height=na.height-(Sa==Oa.length-1?0:(Na.height+Na.y)*ja)}this.shape.redraw()}};var Ka=!1;Fa.setPosition=function(Na,hb,Qa){Pa=Math.max(Graph.minTableColumnWidth-xa.width,hb.x-Na.x-xa.width);Ka=mxEvent.isShiftDown(Qa.getEvent());null==Ba||Ka||(Pa=Math.min(Pa,Ba.width-Graph.minTableColumnWidth))};Fa.execute=function(Na){if(0!=Pa)S.setTableColumnWidth(this.state.cell,Pa,Ka);else if(!L.blockDelayedSelection){var hb=S.getCellAt(Na.getGraphX(),Na.getGraphY())||na.cell;S.graphHandler.selectCellForEvent(hb,
+Na)}Pa=0};Fa.positionChanged=function(){};Fa.reset=function(){Pa=0};z.push(Fa)})(V)}}return null!=z?z.reverse():null};var O=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(z){O.apply(this,arguments);if(null!=this.moveHandles)for(var K=0;K<this.moveHandles.length;K++)this.moveHandles[K].style.visibility=z?"":"hidden";if(null!=this.cornerHandles)for(K=0;K<this.cornerHandles.length;K++)this.cornerHandles[K].node.style.visibility=z?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=
+function(){var z=this.graph.model;if(null!=this.moveHandles){for(var K=0;K<this.moveHandles.length;K++)this.moveHandles[K].parentNode.removeChild(this.moveHandles[K]);this.moveHandles=null}this.moveHandles=[];for(K=0;K<z.getChildCount(this.state.cell);K++)mxUtils.bind(this,function(L){if(null!=L&&z.isVertex(L.cell)){var S=mxUtils.createImage(Editor.rowMoveImage);S.style.position="absolute";S.style.cursor="pointer";S.style.width="7px";S.style.height="4px";S.style.padding="4px 2px 4px 2px";S.rowState=
+L;mxEvent.addGestureListeners(S,mxUtils.bind(this,function(V){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(V)&&this.graph.isCellSelected(L.cell)||this.graph.selectCellForEvent(L.cell,V);mxEvent.isPopupTrigger(V)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(V),mxEvent.getClientY(V),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(V),this.graph.isMouseDown=!0);
+mxEvent.consume(V)}),null,mxUtils.bind(this,function(V){mxEvent.isPopupTrigger(V)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(V),mxEvent.getClientY(V),L.cell,V),mxEvent.consume(V))}));this.moveHandles.push(S);this.graph.container.appendChild(S)}})(this.graph.view.getState(z.getChildAt(this.state.cell,K)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var z=0;z<this.customHandles.length;z++)this.customHandles[z].destroy();this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&
+this.refreshMoveHandles()};var ba=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var z=new mxPoint(0,0),K=this.tolerance,L=this.state.style.shape;null==mxCellRenderer.defaultShapes[L]&&mxStencilRegistry.getStencil(L);L=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!L&&null!=this.customHandles)for(var S=0;S<this.customHandles.length;S++)if(null!=this.customHandles[S].shape&&null!=this.customHandles[S].shape.bounds){var V=
+this.customHandles[S].shape.bounds,ja=V.getCenterX(),na=V.getCenterY();if(Math.abs(this.state.x-ja)<V.width/2||Math.abs(this.state.y-na)<V.height/2||Math.abs(this.state.x+this.state.width-ja)<V.width/2||Math.abs(this.state.y+this.state.height-na)<V.height/2){L=!0;break}}L&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(K/=2,this.graph.isTable(this.state.cell)&&(K+=7),z.x=this.sizers[0].bounds.width+K,z.y=this.sizers[0].bounds.height+K):z=ba.apply(this,arguments);return z};mxVertexHandler.prototype.updateHint=
function(z){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{z=this.state.view.scale;var K=this.state.view.unit;this.hint.innerHTML=e(this.roundLength(this.bounds.width/z),K)+" x "+e(this.roundLength(this.bounds.height/z),K)}z=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||
-"0");null==z&&(z=this.bounds);this.hint.style.left=z.x+Math.round((z.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=z.y+z.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var ma=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(z,K){ma.apply(this,arguments);null!=
-this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};var u=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(z,K){u.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(z,K){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var M=
-this.graph.view.translate,T=this.graph.view.scale,V=this.roundLength(K.x/T-M.x);M=this.roundLength(K.y/T-M.y);T=this.graph.view.unit;this.hint.innerHTML=e(V,T)+", "+e(M,T);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(V=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*V.x)+"%, "+Math.round(100*V.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility=
+"0");null==z&&(z=this.bounds);this.hint.style.left=z.x+Math.round((z.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=z.y+z.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var la=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(z,K){la.apply(this,arguments);null!=
+this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};var u=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(z,K){u.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(z,K){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var L=
+this.graph.view.translate,S=this.graph.view.scale,V=this.roundLength(K.x/S-L.x);L=this.roundLength(K.y/S-L.y);S=this.graph.view.unit;this.hint.innerHTML=e(V,S)+", "+e(L,S);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(V=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*V.x)+"%, "+Math.round(100*V.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility=
"hidden");this.hint.style.left=Math.round(z.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(z.getGraphY(),K.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};Graph.prototype.expandedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="50%" y1="0%" x2="50%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 2 4.5 L 7 4.5 z" stroke="#000"/>');
Graph.prototype.collapsedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 4.5 2 L 4.5 7 M 2 4.5 L 7 4.5 z" stroke="#000"/>');mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=
Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.endMainHandle=Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.secondaryHandle=Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>');HoverIcons.prototype.fixedHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="#01bd22"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>');
@@ -2635,56 +2638,56 @@ HoverIcons.prototype.mainHandle;null!=window.Sidebar&&(Sidebar.prototype.triangl
!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(z){return!mxEvent.isShiftDown(z.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(z){return!mxEvent.isShiftDown(z.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=
12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(z){return mxEvent.isMouseEvent(z.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(z){var K=z.getEvent();return null==z.getState()&&!mxEvent.isMouseEvent(K)||mxEvent.isPopupTrigger(K)&&(null==z.getState()||mxEvent.isControlDown(K)||mxEvent.isShiftDown(K))};var H=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=
function(z,K){H.apply(this,arguments);mxEvent.isTouchEvent(K.getEvent())&&this.graph.isCellSelected(K.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(z){var K=z.getEvent();return mxEvent.isLeftMouseButton(K)&&(this.useLeftButtonForPanning&&null==z.getState()||mxEvent.isControlDown(K)&&!mxEvent.isShiftDown(K))||this.usePopupTrigger&&mxEvent.isPopupTrigger(K)};mxRubberband.prototype.isSpaceEvent=function(z){return this.graph.isEnabled()&&
-!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(z.getEvent())||mxEvent.isMetaDown(z.getEvent()))&&mxEvent.isShiftDown(z.getEvent())&&mxEvent.isAltDown(z.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(z,K){if(this.cancelled)this.cancelled=!1,K.consume();else{var M=null!=this.div&&"none"!=this.div.style.display,T=null,V=null,ia=z=null;
-null!=this.first&&null!=this.currentX&&null!=this.currentY&&(T=this.first.x,V=this.first.y,z=(this.currentX-T)/this.graph.view.scale,ia=(this.currentY-V)/this.graph.view.scale,mxEvent.isAltDown(K.getEvent())||(z=this.graph.snap(z),ia=this.graph.snap(ia),this.graph.isGridEnabled()||(Math.abs(z)<this.graph.tolerance&&(z=0),Math.abs(ia)<this.graph.tolerance&&(ia=0))));this.reset();if(M){if(this.isSpaceEvent(K)){this.graph.model.beginUpdate();try{var na=this.graph.getCellsBeyond(T,V,this.graph.getDefaultParent(),
-!0,!0);for(M=0;M<na.length;M++)if(this.graph.isCellMovable(na[M])){var va=this.graph.view.getState(na[M]),pa=this.graph.getCellGeometry(na[M]);null!=va&&null!=pa&&(pa=pa.clone(),pa.translate(z,ia),this.graph.model.setGeometry(na[M],pa))}}finally{this.graph.model.endUpdate()}}else na=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(na,K.getEvent());K.consume()}}};mxRubberband.prototype.mouseMove=function(z,K){if(!K.isConsumed()&&null!=this.first){var M=mxUtils.getScrollOrigin(this.graph.container);
-z=mxUtils.getOffset(this.graph.container);M.x-=z.x;M.y-=z.y;z=K.getX()+M.x;M=K.getY()+M.y;var T=this.first.x-z,V=this.first.y-M,ia=this.graph.tolerance;if(null!=this.div||Math.abs(T)>ia||Math.abs(V)>ia)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(z,M),this.isSpaceEvent(K)?(z=this.x+this.width,M=this.y+this.height,T=this.graph.view.scale,mxEvent.isAltDown(K.getEvent())||(this.width=this.graph.snap(this.width/T)*T,this.height=this.graph.snap(this.height/T)*T,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=z-this.width),this.y<this.first.y&&(this.y=M-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",
+!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(z.getEvent())||mxEvent.isMetaDown(z.getEvent()))&&mxEvent.isShiftDown(z.getEvent())&&mxEvent.isAltDown(z.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(z,K){if(this.cancelled)this.cancelled=!1,K.consume();else{var L=null!=this.div&&"none"!=this.div.style.display,S=null,V=null,ja=z=null;
+null!=this.first&&null!=this.currentX&&null!=this.currentY&&(S=this.first.x,V=this.first.y,z=(this.currentX-S)/this.graph.view.scale,ja=(this.currentY-V)/this.graph.view.scale,mxEvent.isAltDown(K.getEvent())||(z=this.graph.snap(z),ja=this.graph.snap(ja),this.graph.isGridEnabled()||(Math.abs(z)<this.graph.tolerance&&(z=0),Math.abs(ja)<this.graph.tolerance&&(ja=0))));this.reset();if(L){if(this.isSpaceEvent(K)){this.graph.model.beginUpdate();try{var na=this.graph.getCellsBeyond(S,V,this.graph.getDefaultParent(),
+!0,!0);for(L=0;L<na.length;L++)if(this.graph.isCellMovable(na[L])){var ya=this.graph.view.getState(na[L]),ra=this.graph.getCellGeometry(na[L]);null!=ya&&null!=ra&&(ra=ra.clone(),ra.translate(z,ja),this.graph.model.setGeometry(na[L],ra))}}finally{this.graph.model.endUpdate()}}else na=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(na,K.getEvent());K.consume()}}};mxRubberband.prototype.mouseMove=function(z,K){if(!K.isConsumed()&&null!=this.first){var L=mxUtils.getScrollOrigin(this.graph.container);
+z=mxUtils.getOffset(this.graph.container);L.x-=z.x;L.y-=z.y;z=K.getX()+L.x;L=K.getY()+L.y;var S=this.first.x-z,V=this.first.y-L,ja=this.graph.tolerance;if(null!=this.div||Math.abs(S)>ja||Math.abs(V)>ja)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(z,L),this.isSpaceEvent(K)?(z=this.x+this.width,L=this.y+this.height,S=this.graph.view.scale,mxEvent.isAltDown(K.getEvent())||(this.width=this.graph.snap(this.width/S)*S,this.height=this.graph.snap(this.height/S)*S,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=z-this.width),this.y<this.first.y&&(this.y=L-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",
null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&
-(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),K.consume()}};var P=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);P.apply(this,arguments)};var S=(new Date).getTime(),R=0,ca=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(z,K,M,T){ca.apply(this,arguments);M!=this.currentTerminalState?(S=(new Date).getTime(),
-R=0):R=(new Date).getTime()-S;this.currentTerminalState=M};var ea=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(z){return mxEvent.isShiftDown(z.getEvent())&&mxEvent.isAltDown(z.getEvent())?!1:null!=this.currentTerminalState&&z.getState()==this.currentTerminalState&&2E3<R||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&ea.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=
-function(z,K,M){K=null!=z&&0==z;var T=this.state.getVisibleTerminalState(K);z=null!=z&&(0==z||z>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==z)?this.graph.getConnectionConstraint(this.state,T,K):null;M=null!=(null!=z?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(K),z):null)?M?this.endFixedHandleImage:this.fixedHandleImage:null!=z&&null!=T?M?this.endTerminalHandleImage:this.terminalHandleImage:M?this.endHandleImage:this.handleImage;if(null!=M)return M=
-new mxImageShape(new mxRectangle(0,0,M.width,M.height),M.src),M.preserveImageAspect=!1,M;M=mxConstants.HANDLE_SIZE;this.preferHtml&&--M;return new mxRectangleShape(new mxRectangle(0,0,M,M),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var fa=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(z,K,M){this.handleImage=K==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:K==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;
-return fa.apply(this,arguments)};var ra=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(z){if(null!=z&&1==z.length){var K=this.graph.getModel(),M=K.getParent(z[0]),T=this.graph.getCellGeometry(z[0]);if(K.isEdge(M)&&null!=T&&T.relative&&(K=this.graph.view.getState(z[0]),null!=K&&2>K.width&&2>K.height&&null!=K.text&&null!=K.text.boundingBox))return mxRectangle.fromRectangle(K.text.boundingBox)}return ra.apply(this,arguments)};var ua=mxGraphHandler.prototype.getGuideStates;
-mxGraphHandler.prototype.getGuideStates=function(){for(var z=ua.apply(this,arguments),K=[],M=0;M<z.length;M++)"1"!=mxUtils.getValue(z[M].style,"part","0")&&K.push(z[M]);return K};var sa=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(z){var K=this.graph.getModel(),M=K.getParent(z.cell),T=this.graph.getCellGeometry(z.cell);return K.isEdge(M)&&null!=T&&T.relative&&2>z.width&&2>z.height&&null!=z.text&&null!=z.text.boundingBox?(K=z.text.unrotatedBoundingBox||
-z.text.boundingBox,new mxRectangle(Math.round(K.x),Math.round(K.y),Math.round(K.width),Math.round(K.height))):sa.apply(this,arguments)};var Aa=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(z,K){var M=this.graph.getModel(),T=M.getParent(this.state.cell),V=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(K)==mxEvent.ROTATION_HANDLE||!M.isEdge(T)||null==V||!V.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&Aa.apply(this,arguments)};
+(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),K.consume()}};var P=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);P.apply(this,arguments)};var W=(new Date).getTime(),R=0,da=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(z,K,L,S){da.apply(this,arguments);L!=this.currentTerminalState?(W=(new Date).getTime(),
+R=0):R=(new Date).getTime()-W;this.currentTerminalState=L};var fa=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(z){return mxEvent.isShiftDown(z.getEvent())&&mxEvent.isAltDown(z.getEvent())?!1:null!=this.currentTerminalState&&z.getState()==this.currentTerminalState&&2E3<R||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&fa.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=
+function(z,K,L){K=null!=z&&0==z;var S=this.state.getVisibleTerminalState(K);z=null!=z&&(0==z||z>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==z)?this.graph.getConnectionConstraint(this.state,S,K):null;L=null!=(null!=z?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(K),z):null)?L?this.endFixedHandleImage:this.fixedHandleImage:null!=z&&null!=S?L?this.endTerminalHandleImage:this.terminalHandleImage:L?this.endHandleImage:this.handleImage;if(null!=L)return L=
+new mxImageShape(new mxRectangle(0,0,L.width,L.height),L.src),L.preserveImageAspect=!1,L;L=mxConstants.HANDLE_SIZE;this.preferHtml&&--L;return new mxRectangleShape(new mxRectangle(0,0,L,L),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var ea=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(z,K,L){this.handleImage=K==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:K==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;
+return ea.apply(this,arguments)};var qa=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(z){if(null!=z&&1==z.length){var K=this.graph.getModel(),L=K.getParent(z[0]),S=this.graph.getCellGeometry(z[0]);if(K.isEdge(L)&&null!=S&&S.relative&&(K=this.graph.view.getState(z[0]),null!=K&&2>K.width&&2>K.height&&null!=K.text&&null!=K.text.boundingBox))return mxRectangle.fromRectangle(K.text.boundingBox)}return qa.apply(this,arguments)};var va=mxGraphHandler.prototype.getGuideStates;
+mxGraphHandler.prototype.getGuideStates=function(){for(var z=va.apply(this,arguments),K=[],L=0;L<z.length;L++)"1"!=mxUtils.getValue(z[L].style,"part","0")&&K.push(z[L]);return K};var ua=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(z){var K=this.graph.getModel(),L=K.getParent(z.cell),S=this.graph.getCellGeometry(z.cell);return K.isEdge(L)&&null!=S&&S.relative&&2>z.width&&2>z.height&&null!=z.text&&null!=z.text.boundingBox?(K=z.text.unrotatedBoundingBox||
+z.text.boundingBox,new mxRectangle(Math.round(K.x),Math.round(K.y),Math.round(K.width),Math.round(K.height))):ua.apply(this,arguments)};var Aa=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(z,K){var L=this.graph.getModel(),S=L.getParent(this.state.cell),V=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(K)==mxEvent.ROTATION_HANDLE||!L.isEdge(S)||null==V||!V.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&Aa.apply(this,arguments)};
mxVertexHandler.prototype.rotateClick=function(){var z=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),K=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&z==mxConstants.NONE&&K==mxConstants.NONE?(z=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,z,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};
-var Ca=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(z,K){Ca.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var Ba=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(z,K){Ba.apply(this,arguments);null!=this.rotationShape&&null!=
-this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="");this.blockDelayedSelection=null};var ta=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){ta.apply(this,arguments);var z=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));if(this.graph.isTable(this.state.cell))this.refreshMoveHandles();
-else if(1==this.graph.getSelectionCount()&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var K=0;4>K;K++){var M=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);M.dialect=mxConstants.DIALECT_SVG;M.init(this.graph.view.getOverlayPane());this.cornerHandles.push(M)}}var T=mxUtils.bind(this,function(){null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<
-this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.changeHandler=mxUtils.bind(this,function(V,ia){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));T()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(V,ia){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);
-K=this.graph.getLinkForCell(this.state.cell);M=this.graph.getLinksForState(this.state);this.updateLinkHint(K,M);if(null!=K||null!=M&&0<M.length)z=!0;z&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(z,K){try{if(null==z&&(null==K||0==K.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=z||null!=K&&0<K.length){null==this.linkHint&&(this.linkHint=b(),this.linkHint.style.padding=
-"6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerText="";if(null!=z&&(this.linkHint.appendChild(this.graph.createLinkForHint(z)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var M=document.createElement("img");M.setAttribute("src",Editor.editImage);M.setAttribute("title",
-mxResources.get("editLink"));M.setAttribute("width","11");M.setAttribute("height","11");M.style.marginLeft="10px";M.style.marginBottom="-1px";M.style.cursor="pointer";Editor.isDarkMode()&&(M.style.filter="invert(100%)");this.linkHint.appendChild(M);mxEvent.addListener(M,"click",mxUtils.bind(this,function(ia){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(ia)}));var T=M.cloneNode(!0);T.setAttribute("src",Editor.trashImage);T.setAttribute("title",mxResources.get("removeIt",
-[mxResources.get("link")]));T.style.marginLeft="4px";this.linkHint.appendChild(T);mxEvent.addListener(T,"click",mxUtils.bind(this,function(ia){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(ia)}))}if(null!=K)for(M=0;M<K.length;M++){var V=document.createElement("div");V.style.marginTop=null!=z||0<M?"6px":"0px";V.appendChild(this.graph.createLinkForHint(K[M].getAttribute("href"),mxUtils.getTextContent(K[M])));this.linkHint.appendChild(V)}}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(ia){}};
-mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var Pa=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){Pa.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var z=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&
-this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.changeHandler=mxUtils.bind(this,function(T,V){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));z();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var K=this.graph.getLinkForCell(this.state.cell),M=this.graph.getLinksForState(this.state);if(null!=
-K||null!=M&&0<M.length)this.updateLinkHint(K,M),this.redrawHandles()};var Ta=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Ta.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Oa=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var z=0;z<this.moveHandles.length;z++)this.moveHandles[z].style.left=this.moveHandles[z].rowState.x+
-this.moveHandles[z].rowState.width-5+"px",this.moveHandles[z].style.top=this.moveHandles[z].rowState.y+this.moveHandles[z].rowState.height/2-6+"px";if(null!=this.cornerHandles){z=this.getSelectionBorderInset();var K=this.cornerHandles,M=K[0].bounds.height/2;K[0].bounds.x=this.state.x-K[0].bounds.width/2+z;K[0].bounds.y=this.state.y-M+z;K[0].redraw();K[1].bounds.x=K[0].bounds.x+this.state.width-2*z;K[1].bounds.y=K[0].bounds.y;K[1].redraw();K[2].bounds.x=K[0].bounds.x;K[2].bounds.y=this.state.y+this.state.height-
-2*z;K[2].redraw();K[3].bounds.x=K[1].bounds.x;K[3].bounds.y=K[2].bounds.y;K[3].redraw();for(z=0;z<this.cornerHandles.length;z++)this.cornerHandles[z].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Oa.apply(this);null!=this.state&&null!=this.linkHint&&(z=new mxPoint(this.state.getCenterX(),
-this.state.getCenterY()),K=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),M=mxUtils.getBoundingBox(K,this.state.style[mxConstants.STYLE_ROTATION]||"0",z),z=null!=M?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,K=null!=this.state.text?this.state.text.boundingBox:null,null==M&&(M=this.state),M=M.y+M.height,null!=K&&(M=Math.max(M,K.y+K.height)),this.linkHint.style.left=Math.max(0,Math.round(z.x+(z.width-this.linkHint.clientWidth)/
-2))+"px",this.linkHint.style.top=Math.round(M+this.verticalOffset/2+Editor.hintOffset)+"px")};var Xa=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){Xa.apply(this,arguments);if(null!=this.moveHandles){for(var z=0;z<this.moveHandles.length;z++)null!=this.moveHandles[z]&&null!=this.moveHandles[z].parentNode&&this.moveHandles[z].parentNode.removeChild(this.moveHandles[z]);this.moveHandles=null}if(null!=this.cornerHandles){for(z=0;z<this.cornerHandles.length;z++)null!=this.cornerHandles[z]&&
+var za=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(z,K){za.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var Ca=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(z,K){Ca.apply(this,arguments);null!=this.rotationShape&&null!=
+this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="");this.blockDelayedSelection=null};var sa=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){sa.apply(this,arguments);var z=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));if(this.graph.isTable(this.state.cell))this.refreshMoveHandles();
+else if(1==this.graph.getSelectionCount()&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var K=0;4>K;K++){var L=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);L.dialect=mxConstants.DIALECT_SVG;L.init(this.graph.view.getOverlayPane());this.cornerHandles.push(L)}}var S=mxUtils.bind(this,function(){null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<
+this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.changeHandler=mxUtils.bind(this,function(V,ja){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));S()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(V,ja){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);
+K=this.graph.getLinkForCell(this.state.cell);L=this.graph.getLinksForState(this.state);this.updateLinkHint(K,L);if(null!=K||null!=L&&0<L.length)z=!0;z&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(z,K){try{if(null==z&&(null==K||0==K.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=z||null!=K&&0<K.length){null==this.linkHint&&(this.linkHint=b(),this.linkHint.style.padding=
+"6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerText="";if(null!=z&&(this.linkHint.appendChild(this.graph.createLinkForHint(z)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var L=document.createElement("img");L.setAttribute("src",Editor.editImage);L.setAttribute("title",
+mxResources.get("editLink"));L.setAttribute("width","11");L.setAttribute("height","11");L.style.marginLeft="10px";L.style.marginBottom="-1px";L.style.cursor="pointer";Editor.isDarkMode()&&(L.style.filter="invert(100%)");this.linkHint.appendChild(L);mxEvent.addListener(L,"click",mxUtils.bind(this,function(ja){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(ja)}));var S=L.cloneNode(!0);S.setAttribute("src",Editor.trashImage);S.setAttribute("title",mxResources.get("removeIt",
+[mxResources.get("link")]));S.style.marginLeft="4px";this.linkHint.appendChild(S);mxEvent.addListener(S,"click",mxUtils.bind(this,function(ja){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(ja)}))}if(null!=K)for(L=0;L<K.length;L++){var V=document.createElement("div");V.style.marginTop=null!=z||0<L?"6px":"0px";V.appendChild(this.graph.createLinkForHint(K[L].getAttribute("href"),mxUtils.getTextContent(K[L])));this.linkHint.appendChild(V)}}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(ja){}};
+mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var Va=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){Va.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var z=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&
+this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.changeHandler=mxUtils.bind(this,function(S,V){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));z();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var K=this.graph.getLinkForCell(this.state.cell),L=this.graph.getLinksForState(this.state);if(null!=
+K||null!=L&&0<L.length)this.updateLinkHint(K,L),this.redrawHandles()};var Ua=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Ua.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Ra=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var z=0;z<this.moveHandles.length;z++)this.moveHandles[z].style.left=this.moveHandles[z].rowState.x+
+this.moveHandles[z].rowState.width-5+"px",this.moveHandles[z].style.top=this.moveHandles[z].rowState.y+this.moveHandles[z].rowState.height/2-6+"px";if(null!=this.cornerHandles){z=this.getSelectionBorderInset();var K=this.cornerHandles,L=K[0].bounds.height/2;K[0].bounds.x=this.state.x-K[0].bounds.width/2+z;K[0].bounds.y=this.state.y-L+z;K[0].redraw();K[1].bounds.x=K[0].bounds.x+this.state.width-2*z;K[1].bounds.y=K[0].bounds.y;K[1].redraw();K[2].bounds.x=K[0].bounds.x;K[2].bounds.y=this.state.y+this.state.height-
+2*z;K[2].redraw();K[3].bounds.x=K[1].bounds.x;K[3].bounds.y=K[2].bounds.y;K[3].redraw();for(z=0;z<this.cornerHandles.length;z++)this.cornerHandles[z].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Ra.apply(this);null!=this.state&&null!=this.linkHint&&(z=new mxPoint(this.state.getCenterX(),
+this.state.getCenterY()),K=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),L=mxUtils.getBoundingBox(K,this.state.style[mxConstants.STYLE_ROTATION]||"0",z),z=null!=L?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,K=null!=this.state.text?this.state.text.boundingBox:null,null==L&&(L=this.state),L=L.y+L.height,null!=K&&(L=Math.max(L,K.y+K.height)),this.linkHint.style.left=Math.max(0,Math.round(z.x+(z.width-this.linkHint.clientWidth)/
+2))+"px",this.linkHint.style.top=Math.round(L+this.verticalOffset/2+Editor.hintOffset)+"px")};var Za=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){Za.apply(this,arguments);if(null!=this.moveHandles){for(var z=0;z<this.moveHandles.length;z++)null!=this.moveHandles[z]&&null!=this.moveHandles[z].parentNode&&this.moveHandles[z].parentNode.removeChild(this.moveHandles[z]);this.moveHandles=null}if(null!=this.cornerHandles){for(z=0;z<this.cornerHandles.length;z++)null!=this.cornerHandles[z]&&
null!=this.cornerHandles[z].node&&null!=this.cornerHandles[z].node.parentNode&&this.cornerHandles[z].node.parentNode.removeChild(this.cornerHandles[z].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 Ga=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(Ga.apply(this),null!=this.state&&null!=this.linkHint)){var z=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(z=new mxRectangle(z.x,z.y,z.width,z.height),z.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(z.x+(z.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=
-Math.round(z.y+z.height+Editor.hintOffset)+"px"}};var eb=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){eb.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var bb=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){bb.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.graph.removeListener(this.editingHandler),this.editingHandler=null)};var Ha=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(Ha.apply(this),null!=this.state&&null!=this.linkHint)){var z=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(z=new mxRectangle(z.x,z.y,z.width,z.height),z.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(z.x+(z.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=
+Math.round(z.y+z.height+Editor.hintOffset)+"px"}};var db=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){db.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var cb=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){cb.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(c,l,x){mxShape.call(this);this.line=c;this.stroke=l;this.strokewidth=null!=x?x:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function k(){mxSwimlane.call(this)}function n(){mxCylinder.call(this)}function D(){mxCylinder.call(this)}function t(){mxActor.call(this)}function E(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function f(){mxCylinder.call(this)}function g(){mxCylinder.call(this)}function m(){mxShape.call(this)}function q(){mxShape.call(this)}
-function y(c,l,x,p){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=x;this.strokewidth=null!=p?p:1}function F(){mxActor.call(this)}function C(){mxCylinder.call(this)}function I(){mxCylinder.call(this)}function G(){mxActor.call(this)}function Y(){mxActor.call(this)}function ba(){mxActor.call(this)}function Z(){mxActor.call(this)}function X(){mxActor.call(this)}function qa(){mxActor.call(this)}function Q(){mxActor.call(this)}function W(c,l){this.canvas=c;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");
-this.defaultVariation=l;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,W.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,W.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,W.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,W.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,W.prototype.curveTo);
-this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,W.prototype.arcTo)}function ha(){mxRectangleShape.call(this)}function la(){mxRectangleShape.call(this)}function ja(){mxActor.call(this)}function U(){mxActor.call(this)}function L(){mxActor.call(this)}function da(){mxRectangleShape.call(this)}function O(){mxRectangleShape.call(this)}function N(){mxCylinder.call(this)}function aa(){mxShape.call(this)}function ma(){mxShape.call(this)}function u(){mxEllipse.call(this)}function H(){mxShape.call(this)}
-function P(){mxShape.call(this)}function S(){mxRectangleShape.call(this)}function R(){mxShape.call(this)}function ca(){mxShape.call(this)}function ea(){mxShape.call(this)}function fa(){mxShape.call(this)}function ra(){mxShape.call(this)}function ua(){mxCylinder.call(this)}function sa(){mxCylinder.call(this)}function Aa(){mxRectangleShape.call(this)}function Ca(){mxDoubleEllipse.call(this)}function Ba(){mxDoubleEllipse.call(this)}function ta(){mxArrowConnector.call(this);this.spacing=0}function Pa(){mxArrowConnector.call(this);
-this.spacing=0}function Ta(){mxActor.call(this)}function Oa(){mxRectangleShape.call(this)}function Xa(){mxActor.call(this)}function Ga(){mxActor.call(this)}function eb(){mxActor.call(this)}function bb(){mxActor.call(this)}function z(){mxActor.call(this)}function K(){mxActor.call(this)}function M(){mxActor.call(this)}function T(){mxActor.call(this)}function V(){mxActor.call(this)}function ia(){mxActor.call(this)}function na(){mxEllipse.call(this)}function va(){mxEllipse.call(this)}function pa(){mxEllipse.call(this)}
-function za(){mxRhombus.call(this)}function Da(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function La(){mxEllipse.call(this)}function Ua(){mxEllipse.call(this)}function Sa(){mxActor.call(this)}function Fa(){mxActor.call(this)}function wa(){mxActor.call(this)}function ya(c,l,x,p){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=x;this.strokewidth=null!=p?p:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function Na(){mxConnector.call(this)}
-function Ja(c,l,x,p,v,A,B,ka,J,xa){B+=J;var oa=p.clone();p.x-=v*(2*B+J);p.y-=A*(2*B+J);v*=B+J;A*=B+J;return function(){c.ellipse(oa.x-v-B,oa.y-A-B,2*B,2*B);xa?c.fillAndStroke():c.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var c=null;if(null!=this.line)for(var l=0;l<this.line.length;l++){var x=this.line[l];null!=x&&(x=new mxRectangle(x.x,x.y,this.strokewidth,this.strokewidth),null==c?c=x:c.add(x))}this.bounds=null!=c?c:new mxRectangle};b.prototype.paintVertexShape=
+function y(c,l,x,p){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=x;this.strokewidth=null!=p?p:1}function F(){mxActor.call(this)}function C(){mxCylinder.call(this)}function I(){mxCylinder.call(this)}function G(){mxActor.call(this)}function Z(){mxActor.call(this)}function ca(){mxActor.call(this)}function aa(){mxActor.call(this)}function Y(){mxActor.call(this)}function pa(){mxActor.call(this)}function Q(){mxActor.call(this)}function X(c,l){this.canvas=c;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");
+this.defaultVariation=l;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,X.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,X.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,X.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,X.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,X.prototype.curveTo);
+this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,X.prototype.arcTo)}function ha(){mxRectangleShape.call(this)}function U(){mxRectangleShape.call(this)}function ma(){mxActor.call(this)}function T(){mxActor.call(this)}function M(){mxActor.call(this)}function ia(){mxRectangleShape.call(this)}function N(){mxRectangleShape.call(this)}function O(){mxCylinder.call(this)}function ba(){mxShape.call(this)}function la(){mxShape.call(this)}function u(){mxEllipse.call(this)}function H(){mxShape.call(this)}
+function P(){mxShape.call(this)}function W(){mxRectangleShape.call(this)}function R(){mxShape.call(this)}function da(){mxShape.call(this)}function fa(){mxShape.call(this)}function ea(){mxShape.call(this)}function qa(){mxShape.call(this)}function va(){mxCylinder.call(this)}function ua(){mxCylinder.call(this)}function Aa(){mxRectangleShape.call(this)}function za(){mxDoubleEllipse.call(this)}function Ca(){mxDoubleEllipse.call(this)}function sa(){mxArrowConnector.call(this);this.spacing=0}function Va(){mxArrowConnector.call(this);
+this.spacing=0}function Ua(){mxActor.call(this)}function Ra(){mxRectangleShape.call(this)}function Za(){mxActor.call(this)}function Ha(){mxActor.call(this)}function db(){mxActor.call(this)}function cb(){mxActor.call(this)}function z(){mxActor.call(this)}function K(){mxActor.call(this)}function L(){mxActor.call(this)}function S(){mxActor.call(this)}function V(){mxActor.call(this)}function ja(){mxActor.call(this)}function na(){mxEllipse.call(this)}function ya(){mxEllipse.call(this)}function ra(){mxEllipse.call(this)}
+function ta(){mxRhombus.call(this)}function Da(){mxEllipse.call(this)}function Oa(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function Wa(){mxEllipse.call(this)}function Sa(){mxActor.call(this)}function Fa(){mxActor.call(this)}function Ja(){mxActor.call(this)}function xa(c,l,x,p){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=x;this.strokewidth=null!=p?p:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function Ba(){mxConnector.call(this)}
+function Pa(c,l,x,p,v,A,B,ka,J,wa){B+=J;var oa=p.clone();p.x-=v*(2*B+J);p.y-=A*(2*B+J);v*=B+J;A*=B+J;return function(){c.ellipse(oa.x-v-B,oa.y-A-B,2*B,2*B);wa?c.fillAndStroke():c.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var c=null;if(null!=this.line)for(var l=0;l<this.line.length;l++){var x=this.line[l];null!=x&&(x=new mxRectangle(x.x,x.y,this.strokewidth,this.strokewidth),null==c?c=x:c.add(x))}this.bounds=null!=c?c:new mxRectangle};b.prototype.paintVertexShape=
function(c,l,x,p,v){this.paintTableLine(c,this.line,0,0)};b.prototype.paintTableLine=function(c,l,x,p){if(null!=l){var v=null;c.begin();for(var A=0;A<l.length;A++){var B=l[A];null!=B&&(null==v?c.moveTo(B.x+x,B.y+p):null!=v&&c.lineTo(B.x+x,B.y+p));v=B}c.end();c.stroke()}};b.prototype.intersectsRectangle=function(c){var l=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var x=null,p=0;p<this.line.length&&!l;p++){var v=this.line[p];null!=v&&null!=x&&(l=mxUtils.rectangleIntersectsSegment(c,
-x,v));x=v}return l};mxCellRenderer.registerShape("tableLine",b);mxUtils.extend(e,mxSwimlane);e.prototype.getLabelBounds=function(c){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};e.prototype.paintVertexShape=function(c,l,x,p,v){var A=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):!1,B=this.isHorizontal(),ka=this.getTitleSize();0==ka||this.outline?La.prototype.paintVertexShape.apply(this,
+x,v));x=v}return l};mxCellRenderer.registerShape("tableLine",b);mxUtils.extend(e,mxSwimlane);e.prototype.getLabelBounds=function(c){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};e.prototype.paintVertexShape=function(c,l,x,p,v){var A=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):!1,B=this.isHorizontal(),ka=this.getTitleSize();0==ka||this.outline?Ma.prototype.paintVertexShape.apply(this,
arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-l,-x));A||this.outline||!(B&&ka<v||!B&&ka<p)||this.paintForeground(c,l,x,p,v)};e.prototype.paintForeground=function(c,l,x,p,v){if(null!=this.state){var A=this.flipH,B=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var ka=A;A=B;B=ka}c.rotate(-this.getShapeRotation(),A,B,l+p/2,x+v/2);s=this.scale;l=this.bounds.x/s;x=this.bounds.y/s;p=this.bounds.width/s;v=this.bounds.height/
s;this.paintTableForeground(c,l,x,p,v)}};e.prototype.paintTableForeground=function(c,l,x,p,v){p=this.state.view.graph.getTableLines(this.state.cell,"0"!=mxUtils.getValue(this.state.style,"rowLines","1"),"0"!=mxUtils.getValue(this.state.style,"columnLines","1"));for(v=0;v<p.length;v++)b.prototype.paintTableLine(c,p[v],l,x)};e.prototype.configurePointerEvents=function(c){0==this.getTitleSize()?c.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",
e);mxUtils.extend(k,e);k.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",k);mxUtils.extend(n,mxCylinder);n.prototype.size=20;n.prototype.darkOpacity=0;n.prototype.darkOpacity2=0;n.prototype.paintVertexShape=function(c,l,x,p,v){var A=Math.max(0,Math.min(p,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),B=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),ka=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,
"darkOpacity2",this.darkOpacity2))));c.translate(l,x);c.begin();c.moveTo(0,0);c.lineTo(p-A,0);c.lineTo(p,A);c.lineTo(p,v);c.lineTo(A,v);c.lineTo(0,v-A);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=B&&(c.setFillAlpha(Math.abs(B)),c.setFillColor(0>B?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(p-A,0),c.lineTo(p,A),c.lineTo(A,A),c.close(),c.fill()),0!=ka&&(c.setFillAlpha(Math.abs(ka)),c.setFillColor(0>ka?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(A,
-A),c.lineTo(A,v),c.lineTo(0,v-A),c.close(),c.fill()),c.begin(),c.moveTo(A,v),c.lineTo(A,A),c.lineTo(0,0),c.moveTo(A,A),c.lineTo(p,A),c.end(),c.stroke())};n.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?(c=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(c,c,0,0)):null};mxCellRenderer.registerShape("cube",n);var Qa=Math.tan(mxUtils.toRadians(30)),Za=(.5-Qa)/2;mxCellRenderer.registerShape("isoRectangle",t);mxUtils.extend(D,
-mxCylinder);D.prototype.size=6;D.prototype.paintVertexShape=function(c,l,x,p,v){c.setFillColor(this.stroke);var A=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;c.ellipse(l+.5*(p-A),x+.5*(v-A),A,A);c.fill();c.setFillColor(mxConstants.NONE);c.rect(l,x,p,v);c.fill()};mxCellRenderer.registerShape("waypoint",D);mxUtils.extend(t,mxActor);t.prototype.size=20;t.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(p,v/Qa);c.translate((p-l)/2,(v-l)/2+l/4);c.moveTo(0,
-.25*l);c.lineTo(.5*l,l*Za);c.lineTo(l,.25*l);c.lineTo(.5*l,(.5-Za)*l);c.lineTo(0,.25*l);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",t);mxUtils.extend(E,mxCylinder);E.prototype.size=20;E.prototype.redrawPath=function(c,l,x,p,v,A){l=Math.min(p,v/(.5+Qa));A?(c.moveTo(0,.25*l),c.lineTo(.5*l,(.5-Za)*l),c.lineTo(l,.25*l),c.moveTo(.5*l,(.5-Za)*l),c.lineTo(.5*l,(1-Za)*l)):(c.translate((p-l)/2,(v-l)/2),c.moveTo(0,.25*l),c.lineTo(.5*l,l*Za),c.lineTo(l,.25*l),c.lineTo(l,.75*l),c.lineTo(.5*
-l,(1-Za)*l),c.lineTo(0,.75*l),c.close());c.end()};mxCellRenderer.registerShape("isoCube",E);mxUtils.extend(d,mxCylinder);d.prototype.redrawPath=function(c,l,x,p,v,A){l=Math.min(v/2,Math.round(v/8)+this.strokewidth-1);if(A&&null!=this.fill||!A&&null==this.fill)c.moveTo(0,l),c.curveTo(0,2*l,p,2*l,p,l),A||(c.stroke(),c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,p,2*l,p,l),A||(c.stroke(),c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,p,2*l,p,l),A||(c.stroke(),c.begin()),c.translate(0,
+A),c.lineTo(A,v),c.lineTo(0,v-A),c.close(),c.fill()),c.begin(),c.moveTo(A,v),c.lineTo(A,A),c.lineTo(0,0),c.moveTo(A,A),c.lineTo(p,A),c.end(),c.stroke())};n.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?(c=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(c,c,0,0)):null};mxCellRenderer.registerShape("cube",n);var Ka=Math.tan(mxUtils.toRadians(30)),Na=(.5-Ka)/2;mxCellRenderer.registerShape("isoRectangle",t);mxUtils.extend(D,
+mxCylinder);D.prototype.size=6;D.prototype.paintVertexShape=function(c,l,x,p,v){c.setFillColor(this.stroke);var A=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;c.ellipse(l+.5*(p-A),x+.5*(v-A),A,A);c.fill();c.setFillColor(mxConstants.NONE);c.rect(l,x,p,v);c.fill()};mxCellRenderer.registerShape("waypoint",D);mxUtils.extend(t,mxActor);t.prototype.size=20;t.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(p,v/Ka);c.translate((p-l)/2,(v-l)/2+l/4);c.moveTo(0,
+.25*l);c.lineTo(.5*l,l*Na);c.lineTo(l,.25*l);c.lineTo(.5*l,(.5-Na)*l);c.lineTo(0,.25*l);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",t);mxUtils.extend(E,mxCylinder);E.prototype.size=20;E.prototype.redrawPath=function(c,l,x,p,v,A){l=Math.min(p,v/(.5+Ka));A?(c.moveTo(0,.25*l),c.lineTo(.5*l,(.5-Na)*l),c.lineTo(l,.25*l),c.moveTo(.5*l,(.5-Na)*l),c.lineTo(.5*l,(1-Na)*l)):(c.translate((p-l)/2,(v-l)/2),c.moveTo(0,.25*l),c.lineTo(.5*l,l*Na),c.lineTo(l,.25*l),c.lineTo(l,.75*l),c.lineTo(.5*
+l,(1-Na)*l),c.lineTo(0,.75*l),c.close());c.end()};mxCellRenderer.registerShape("isoCube",E);mxUtils.extend(d,mxCylinder);d.prototype.redrawPath=function(c,l,x,p,v,A){l=Math.min(v/2,Math.round(v/8)+this.strokewidth-1);if(A&&null!=this.fill||!A&&null==this.fill)c.moveTo(0,l),c.curveTo(0,2*l,p,2*l,p,l),A||(c.stroke(),c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,p,2*l,p,l),A||(c.stroke(),c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,p,2*l,p,l),A||(c.stroke(),c.begin()),c.translate(0,
-l);A||(c.moveTo(0,l),c.curveTo(0,-l/3,p,-l/3,p,l),c.lineTo(p,v-l),c.curveTo(p,v+l/3,0,v+l/3,0,v-l),c.close())};d.prototype.getLabelMargins=function(c){return new mxRectangle(0,2.5*Math.min(c.height/2,Math.round(c.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",d);mxUtils.extend(f,mxCylinder);f.prototype.size=30;f.prototype.darkOpacity=0;f.prototype.paintVertexShape=function(c,l,x,p,v){var A=Math.max(0,Math.min(p,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",
this.size))))),B=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));c.translate(l,x);c.begin();c.moveTo(0,0);c.lineTo(p-A,0);c.lineTo(p,A);c.lineTo(p,v);c.lineTo(0,v);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=B&&(c.setFillAlpha(Math.abs(B)),c.setFillColor(0>B?"#FFFFFF":"#000000"),c.begin(),c.moveTo(p-A,0),c.lineTo(p-A,A),c.lineTo(p,A),c.close(),c.fill()),c.begin(),c.moveTo(p-A,0),c.lineTo(p-A,A),c.lineTo(p,A),
c.end(),c.stroke())};mxCellRenderer.registerShape("note",f);mxUtils.extend(g,f);mxCellRenderer.registerShape("note2",g);g.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,l*this.scale),0,0)}return null};mxUtils.extend(m,mxShape);m.prototype.isoAngle=15;m.prototype.paintVertexShape=function(c,l,x,p,v){var A=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,
@@ -2699,198 +2702,198 @@ c.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(c
l))}return new mxRectangle(0,Math.min(c.height,l),0,0)}return null};mxUtils.extend(I,mxCylinder);I.prototype.arcSize=.1;I.prototype.paintVertexShape=function(c,l,x,p,v){c.translate(l,x);var A=mxUtils.getValue(this.style,"rounded",!1),B=mxUtils.getValue(this.style,"absoluteArcSize",!1);l=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));x=mxUtils.getValue(this.style,"umlStateConnection",null);B||(l*=Math.min(p,v));l=Math.min(l,.5*p,.5*v);A||(l=0);A=0;null!=x&&(A=10);c.begin();c.moveTo(A,
l);c.arcTo(l,l,0,0,1,A+l,0);c.lineTo(p-l,0);c.arcTo(l,l,0,0,1,p,l);c.lineTo(p,v-l);c.arcTo(l,l,0,0,1,p-l,v);c.lineTo(A+l,v);c.arcTo(l,l,0,0,1,A,v-l);c.close();c.fillAndStroke();c.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(c.roundrect(p-40,v-20,10,10,3,3),c.stroke(),c.roundrect(p-20,v-20,10,10,3,3),c.stroke(),c.begin(),c.moveTo(p-30,v-15),c.lineTo(p-20,v-15),c.stroke());"connPointRefEntry"==x?(c.ellipse(0,.5*v-10,20,20),c.fillAndStroke()):"connPointRefExit"==
x&&(c.ellipse(0,.5*v-10,20,20),c.fillAndStroke(),c.begin(),c.moveTo(5,.5*v-5),c.lineTo(15,.5*v+5),c.moveTo(15,.5*v-5),c.lineTo(5,.5*v+5),c.stroke())};I.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",I);mxUtils.extend(G,mxActor);G.prototype.size=30;G.prototype.isRoundable=function(){return!0};G.prototype.redrawPath=
-function(c,l,x,p,v){l=Math.max(0,Math.min(p,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(p,0),new mxPoint(p,v),new mxPoint(0,v),new mxPoint(0,l)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("card",G);mxUtils.extend(Y,mxActor);Y.prototype.size=.4;Y.prototype.redrawPath=function(c,l,x,p,v){l=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));c.moveTo(0,l/2);c.quadTo(p/4,1.4*l,p/2,l/2);c.quadTo(3*p/4,l*(1-1.4),p,l/2);c.lineTo(p,v-l/2);c.quadTo(3*p/4,v-1.4*l,p/2,v-l/2);c.quadTo(p/4,v-l*(1-1.4),0,v-l/2);c.lineTo(0,l/2);c.close();c.end()};Y.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",this.size),x=c.width,p=c.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return l*=
-p,new mxRectangle(c.x,c.y+l,x,p-2*l);l*=x;return new mxRectangle(c.x+l,c.y,x-2*l,p)}return c};mxCellRenderer.registerShape("tape",Y);mxUtils.extend(ba,mxActor);ba.prototype.size=.3;ba.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*c.height):null};ba.prototype.redrawPath=function(c,l,x,p,v){l=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,
-0);c.lineTo(p,0);c.lineTo(p,v-l/2);c.quadTo(3*p/4,v-1.4*l,p/2,v-l/2);c.quadTo(p/4,v-l*(1-1.4),0,v-l/2);c.lineTo(0,l/2);c.close();c.end()};mxCellRenderer.registerShape("document",ba);var cb=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,l,x,p){var v=mxUtils.getValue(this.style,"size");return null!=v?p*Math.max(0,Math.min(1,v)):cb.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=2*mxUtils.getValue(this.style,
+function(c,l,x,p,v){l=Math.max(0,Math.min(p,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(p,0),new mxPoint(p,v),new mxPoint(0,v),new mxPoint(0,l)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("card",G);mxUtils.extend(Z,mxActor);Z.prototype.size=.4;Z.prototype.redrawPath=function(c,l,x,p,v){l=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));c.moveTo(0,l/2);c.quadTo(p/4,1.4*l,p/2,l/2);c.quadTo(3*p/4,l*(1-1.4),p,l/2);c.lineTo(p,v-l/2);c.quadTo(3*p/4,v-1.4*l,p/2,v-l/2);c.quadTo(p/4,v-l*(1-1.4),0,v-l/2);c.lineTo(0,l/2);c.close();c.end()};Z.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",this.size),x=c.width,p=c.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return l*=
+p,new mxRectangle(c.x,c.y+l,x,p-2*l);l*=x;return new mxRectangle(c.x+l,c.y,x-2*l,p)}return c};mxCellRenderer.registerShape("tape",Z);mxUtils.extend(ca,mxActor);ca.prototype.size=.3;ca.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*c.height):null};ca.prototype.redrawPath=function(c,l,x,p,v){l=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,
+0);c.lineTo(p,0);c.lineTo(p,v-l/2);c.quadTo(3*p/4,v-1.4*l,p/2,v-l/2);c.quadTo(p/4,v-l*(1-1.4),0,v-l/2);c.lineTo(0,l/2);c.close();c.end()};mxCellRenderer.registerShape("document",ca);var hb=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,l,x,p){var v=mxUtils.getValue(this.style,"size");return null!=v?p*Math.max(0,Math.min(1,v)):hb.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=2*mxUtils.getValue(this.style,
"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,c.height*l),0,0)}return null};y.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(l/=2);return new mxRectangle(0,Math.min(c.height*this.scale,2*l*this.scale),0,Math.max(0,.3*l*this.scale))}return null};C.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,
"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var x=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var p=mxUtils.getValue(this.style,"rounded",!1),v=mxUtils.getValue(this.style,"absoluteArcSize",!1),A=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));v||(A*=Math.min(c.width,c.height));A=Math.min(A,.5*c.width,.5*(c.height-l));p||(A=0);return"left"==mxUtils.getValue(this.style,"tabPosition",
this.tabPosition)?new mxRectangle(A,0,Math.min(c.width,c.width-x),Math.min(c.height,c.height-l)):new mxRectangle(Math.min(c.width,c.width-x),0,A,Math.min(c.height,c.height-l))}return new mxRectangle(0,Math.min(c.height,l),0,0)}return null};I.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};g.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,
-"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,l*this.scale),0,Math.max(0,l*this.scale))}return null};mxUtils.extend(Z,mxActor);Z.prototype.size=.2;Z.prototype.fixedSize=20;Z.prototype.isRoundable=function(){return!0};Z.prototype.redrawPath=function(c,l,x,p,v){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(l,0),new mxPoint(p,0),new mxPoint(p-l,v)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("parallelogram",Z);mxUtils.extend(X,mxActor);X.prototype.size=.2;X.prototype.fixedSize=20;X.prototype.isRoundable=function(){return!0};X.prototype.redrawPath=function(c,l,x,p,v){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*
-p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):p*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(l,0),new mxPoint(p-l,0),new mxPoint(p,v)],this.isRounded,x,!0)};mxCellRenderer.registerShape("trapezoid",X);mxUtils.extend(qa,mxActor);qa.prototype.size=.5;qa.prototype.redrawPath=function(c,l,x,p,v){c.setFillColor(null);
-l=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(p,0),new mxPoint(l,0),new mxPoint(l,v/2),new mxPoint(0,v/2),new mxPoint(l,v/2),new mxPoint(l,v),new mxPoint(p,v)],this.isRounded,x,!1);c.end()};mxCellRenderer.registerShape("curlyBracket",qa);mxUtils.extend(Q,mxActor);Q.prototype.redrawPath=function(c,l,x,p,v){c.setStrokeWidth(1);c.setFillColor(this.stroke);
-l=p/5;c.rect(0,0,l,v);c.fillAndStroke();c.rect(2*l,0,l,v);c.fillAndStroke();c.rect(4*l,0,l,v);c.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",Q);W.prototype.moveTo=function(c,l){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;this.firstX=c;this.firstY=l};W.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};
-W.prototype.quadTo=function(c,l,x,p){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=x;this.lastY=p};W.prototype.curveTo=function(c,l,x,p,v,A){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=A};W.prototype.arcTo=function(c,l,x,p,v,A,B){this.originalArcTo.apply(this.canvas,arguments);this.lastX=A;this.lastY=B};W.prototype.lineTo=function(c,l){if(null!=this.lastX&&null!=this.lastY){var x=function(oa){return"number"===typeof oa?oa?0>oa?-1:1:oa===oa?0:NaN:NaN},p=
-Math.abs(c-this.lastX),v=Math.abs(l-this.lastY),A=Math.sqrt(p*p+v*v);if(2>A){this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;return}var B=Math.round(A/10),ka=this.defaultVariation;5>B&&(B=5,ka/=3);var J=x(c-this.lastX)*p/B;x=x(l-this.lastY)*v/B;p/=A;v/=A;for(A=0;A<B;A++){var xa=(Math.random()-.5)*ka;this.originalLineTo.call(this.canvas,J*A+this.lastX-xa*v,x*A+this.lastY-xa*p)}this.originalLineTo.call(this.canvas,c,l)}else this.originalLineTo.apply(this.canvas,arguments);
-this.lastX=c;this.lastY=l};W.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};mxShape.prototype.defaultJiggle=1.5;var fb=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(c){fb.apply(this,arguments);null==c.handJiggle&&(c.handJiggle=this.createHandJiggle(c))};var qb=mxShape.prototype.afterPaint;
-mxShape.prototype.afterPaint=function(c){qb.apply(this,arguments);null!=c.handJiggle&&(c.handJiggle.destroy(),delete c.handJiggle)};mxShape.prototype.createComicCanvas=function(c){return new W(c,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(c){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(c)};mxRhombus.prototype.defaultJiggle=2;var ub=mxRectangleShape.prototype.isHtmlAllowed;
-mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&ub.apply(this,arguments)};var ab=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(c,l,x,p,v){if(null==c.handJiggle||c.handJiggle.constructor!=W)ab.apply(this,arguments);else{var A=!0;null!=this.style&&(A="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,
+"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,l*this.scale),0,Math.max(0,l*this.scale))}return null};mxUtils.extend(aa,mxActor);aa.prototype.size=.2;aa.prototype.fixedSize=20;aa.prototype.isRoundable=function(){return!0};aa.prototype.redrawPath=function(c,l,x,p,v){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(l,0),new mxPoint(p,0),new mxPoint(p-l,v)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("parallelogram",aa);mxUtils.extend(Y,mxActor);Y.prototype.size=.2;Y.prototype.fixedSize=20;Y.prototype.isRoundable=function(){return!0};Y.prototype.redrawPath=function(c,l,x,p,v){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*
+p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):p*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(l,0),new mxPoint(p-l,0),new mxPoint(p,v)],this.isRounded,x,!0)};mxCellRenderer.registerShape("trapezoid",Y);mxUtils.extend(pa,mxActor);pa.prototype.size=.5;pa.prototype.redrawPath=function(c,l,x,p,v){c.setFillColor(null);
+l=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(p,0),new mxPoint(l,0),new mxPoint(l,v/2),new mxPoint(0,v/2),new mxPoint(l,v/2),new mxPoint(l,v),new mxPoint(p,v)],this.isRounded,x,!1);c.end()};mxCellRenderer.registerShape("curlyBracket",pa);mxUtils.extend(Q,mxActor);Q.prototype.redrawPath=function(c,l,x,p,v){c.setStrokeWidth(1);c.setFillColor(this.stroke);
+l=p/5;c.rect(0,0,l,v);c.fillAndStroke();c.rect(2*l,0,l,v);c.fillAndStroke();c.rect(4*l,0,l,v);c.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",Q);X.prototype.moveTo=function(c,l){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;this.firstX=c;this.firstY=l};X.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};
+X.prototype.quadTo=function(c,l,x,p){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=x;this.lastY=p};X.prototype.curveTo=function(c,l,x,p,v,A){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=A};X.prototype.arcTo=function(c,l,x,p,v,A,B){this.originalArcTo.apply(this.canvas,arguments);this.lastX=A;this.lastY=B};X.prototype.lineTo=function(c,l){if(null!=this.lastX&&null!=this.lastY){var x=function(oa){return"number"===typeof oa?oa?0>oa?-1:1:oa===oa?0:NaN:NaN},p=
+Math.abs(c-this.lastX),v=Math.abs(l-this.lastY),A=Math.sqrt(p*p+v*v);if(2>A){this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;return}var B=Math.round(A/10),ka=this.defaultVariation;5>B&&(B=5,ka/=3);var J=x(c-this.lastX)*p/B;x=x(l-this.lastY)*v/B;p/=A;v/=A;for(A=0;A<B;A++){var wa=(Math.random()-.5)*ka;this.originalLineTo.call(this.canvas,J*A+this.lastX-wa*v,x*A+this.lastY-wa*p)}this.originalLineTo.call(this.canvas,c,l)}else this.originalLineTo.apply(this.canvas,arguments);
+this.lastX=c;this.lastY=l};X.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};mxShape.prototype.defaultJiggle=1.5;var Qa=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(c){Qa.apply(this,arguments);null==c.handJiggle&&(c.handJiggle=this.createHandJiggle(c))};var mb=mxShape.prototype.afterPaint;
+mxShape.prototype.afterPaint=function(c){mb.apply(this,arguments);null!=c.handJiggle&&(c.handJiggle.destroy(),delete c.handJiggle)};mxShape.prototype.createComicCanvas=function(c){return new X(c,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(c){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(c)};mxRhombus.prototype.defaultJiggle=2;var ub=mxRectangleShape.prototype.isHtmlAllowed;
+mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&ub.apply(this,arguments)};var bb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(c,l,x,p,v){if(null==c.handJiggle||c.handJiggle.constructor!=X)bb.apply(this,arguments);else{var A=!0;null!=this.style&&(A="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,
"1"));if(A||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)A||null!=this.fill&&this.fill!=mxConstants.NONE||(c.pointerEvents=!1),c.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?A=Math.min(p/2,Math.min(v/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,A=Math.min(p*
A,v*A)),c.moveTo(l+A,x),c.lineTo(l+p-A,x),c.quadTo(l+p,x,l+p,x+A),c.lineTo(l+p,x+v-A),c.quadTo(l+p,x+v,l+p-A,x+v),c.lineTo(l+A,x+v),c.quadTo(l,x+v,l,x+v-A),c.lineTo(l,x+A),c.quadTo(l,x,l+A,x)):(c.moveTo(l,x),c.lineTo(l+p,x),c.lineTo(l+p,x+v),c.lineTo(l,x+v),c.lineTo(l,x)),c.close(),c.end(),c.fillAndStroke()}};mxUtils.extend(ha,mxRectangleShape);ha.prototype.size=.1;ha.prototype.fixedSize=!1;ha.prototype.isHtmlAllowed=function(){return!1};ha.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.state.style,
mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var l=c.width,x=c.height;c=new mxRectangle(c.x,c.y,l,x);var p=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;p=Math.max(p,Math.min(l*v,x*v))}c.x+=Math.round(p);c.width-=Math.round(2*p);return c}return c};
ha.prototype.paintForeground=function(c,l,x,p,v){var A=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),B=parseFloat(mxUtils.getValue(this.style,"size",this.size));B=A?Math.max(0,Math.min(p,B)):p*Math.max(0,Math.min(1,B));this.isRounded&&(A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,B=Math.max(B,Math.min(p*A,v*A)));B=Math.round(B);c.begin();c.moveTo(l+B,x);c.lineTo(l+B,x+v);c.moveTo(l+p-B,x);c.lineTo(l+p-B,x+v);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
-arguments)};mxCellRenderer.registerShape("process",ha);mxCellRenderer.registerShape("process2",ha);mxUtils.extend(la,mxRectangleShape);la.prototype.paintBackground=function(c,l,x,p,v){c.setFillColor(mxConstants.NONE);c.rect(l,x,p,v);c.fill()};la.prototype.paintForeground=function(c,l,x,p,v){};mxCellRenderer.registerShape("transparent",la);mxUtils.extend(ja,mxHexagon);ja.prototype.size=30;ja.prototype.position=.5;ja.prototype.position2=.5;ja.prototype.base=20;ja.prototype.getLabelMargins=function(){return new mxRectangle(0,
-0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};ja.prototype.isRoundable=function(){return!0};ja.prototype.redrawPath=function(c,l,x,p,v){l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var A=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),B=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",
-this.position2)))),ka=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,v-x),new mxPoint(Math.min(p,A+ka),v-x),new mxPoint(B,v),new mxPoint(Math.max(0,A),v-x),new mxPoint(0,v-x)],this.isRounded,l,!0,[4])};mxCellRenderer.registerShape("callout",ja);mxUtils.extend(U,mxActor);U.prototype.size=.2;U.prototype.fixedSize=20;U.prototype.isRoundable=function(){return!0};U.prototype.redrawPath=function(c,l,x,p,
+arguments)};mxCellRenderer.registerShape("process",ha);mxCellRenderer.registerShape("process2",ha);mxUtils.extend(U,mxRectangleShape);U.prototype.paintBackground=function(c,l,x,p,v){c.setFillColor(mxConstants.NONE);c.rect(l,x,p,v);c.fill()};U.prototype.paintForeground=function(c,l,x,p,v){};mxCellRenderer.registerShape("transparent",U);mxUtils.extend(ma,mxHexagon);ma.prototype.size=30;ma.prototype.position=.5;ma.prototype.position2=.5;ma.prototype.base=20;ma.prototype.getLabelMargins=function(){return new mxRectangle(0,
+0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};ma.prototype.isRoundable=function(){return!0};ma.prototype.redrawPath=function(c,l,x,p,v){l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var A=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),B=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",
+this.position2)))),ka=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,v-x),new mxPoint(Math.min(p,A+ka),v-x),new mxPoint(B,v),new mxPoint(Math.max(0,A),v-x),new mxPoint(0,v-x)],this.isRounded,l,!0,[4])};mxCellRenderer.registerShape("callout",ma);mxUtils.extend(T,mxActor);T.prototype.size=.2;T.prototype.fixedSize=20;T.prototype.isRoundable=function(){return!0};T.prototype.redrawPath=function(c,l,x,p,
v){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p-l,0),new mxPoint(p,v/2),new mxPoint(p-l,v),new mxPoint(0,v),new mxPoint(l,v/2)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("step",
-U);mxUtils.extend(L,mxHexagon);L.prototype.size=.25;L.prototype.fixedSize=20;L.prototype.isRoundable=function(){return!0};L.prototype.redrawPath=function(c,l,x,p,v){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,
-0),new mxPoint(p-l,0),new mxPoint(p,.5*v),new mxPoint(p-l,v),new mxPoint(l,v),new mxPoint(0,.5*v)],this.isRounded,x,!0)};mxCellRenderer.registerShape("hexagon",L);mxUtils.extend(da,mxRectangleShape);da.prototype.isHtmlAllowed=function(){return!1};da.prototype.paintForeground=function(c,l,x,p,v){var A=Math.min(p/5,v/5)+1;c.begin();c.moveTo(l+p/2,x+A);c.lineTo(l+p/2,x+v-A);c.moveTo(l+A,x+v/2);c.lineTo(l+p-A,x+v/2);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
-mxCellRenderer.registerShape("plus",da);var db=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};mxRhombus.prototype.paintVertexShape=function(c,l,x,p,v){db.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var A=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
-0);l+=A;x+=A;p-=2*A;v-=2*A;0<p&&0<v&&(c.setShadow(!1),db.apply(this,[c,l,x,p,v]))}};mxUtils.extend(O,mxRectangleShape);O.prototype.isHtmlAllowed=function(){return!1};O.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};O.prototype.paintForeground=function(c,l,x,p,v){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var A=
-Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);l+=A;x+=A;p-=2*A;v-=2*A;0<p&&0<v&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}c.setDashed(!1);A=0;do{var B=mxCellRenderer.defaultShapes[this.style["symbol"+A]];if(null!=B){var ka=this.style["symbol"+A+"Align"],J=this.style["symbol"+A+"VerticalAlign"],xa=this.style["symbol"+A+"Width"],oa=this.style["symbol"+A+"Height"],$a=this.style["symbol"+A+"Spacing"]||0,jb=this.style["symbol"+A+"VSpacing"]||
-$a,hb=this.style["symbol"+A+"ArcSpacing"];null!=hb&&(hb*=this.getArcSize(p+this.strokewidth,v+this.strokewidth),$a+=hb,jb+=hb);hb=l;var Ea=x;hb=ka==mxConstants.ALIGN_CENTER?hb+(p-xa)/2:ka==mxConstants.ALIGN_RIGHT?hb+(p-xa-$a):hb+$a;Ea=J==mxConstants.ALIGN_MIDDLE?Ea+(v-oa)/2:J==mxConstants.ALIGN_BOTTOM?Ea+(v-oa-jb):Ea+jb;c.save();ka=new B;ka.style=this.style;B.prototype.paintVertexShape.call(ka,c,hb,Ea,xa,oa);c.restore()}A++}while(null!=B)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
-mxCellRenderer.registerShape("ext",O);mxUtils.extend(N,mxCylinder);N.prototype.redrawPath=function(c,l,x,p,v,A){A?(c.moveTo(0,0),c.lineTo(p/2,v/2),c.lineTo(p,0),c.end()):(c.moveTo(0,0),c.lineTo(p,0),c.lineTo(p,v),c.lineTo(0,v),c.close())};mxCellRenderer.registerShape("message",N);mxUtils.extend(aa,mxShape);aa.prototype.paintBackground=function(c,l,x,p,v){c.translate(l,x);c.ellipse(p/4,0,p/2,v/4);c.fillAndStroke();c.begin();c.moveTo(p/2,v/4);c.lineTo(p/2,2*v/3);c.moveTo(p/2,v/3);c.lineTo(0,v/3);c.moveTo(p/
-2,v/3);c.lineTo(p,v/3);c.moveTo(p/2,2*v/3);c.lineTo(0,v);c.moveTo(p/2,2*v/3);c.lineTo(p,v);c.end();c.stroke()};mxCellRenderer.registerShape("umlActor",aa);mxUtils.extend(ma,mxShape);ma.prototype.getLabelMargins=function(c){return new mxRectangle(c.width/6,0,0,0)};ma.prototype.paintBackground=function(c,l,x,p,v){c.translate(l,x);c.begin();c.moveTo(0,v/4);c.lineTo(0,3*v/4);c.end();c.stroke();c.begin();c.moveTo(0,v/2);c.lineTo(p/6,v/2);c.end();c.stroke();c.ellipse(p/6,0,5*p/6,v);c.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",
-ma);mxUtils.extend(u,mxEllipse);u.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+p/8,x+v);c.lineTo(l+7*p/8,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("umlEntity",u);mxUtils.extend(H,mxShape);H.prototype.paintVertexShape=function(c,l,x,p,v){c.translate(l,x);c.begin();c.moveTo(p,0);c.lineTo(0,v);c.moveTo(0,0);c.lineTo(p,v);c.end();c.stroke()};mxCellRenderer.registerShape("umlDestroy",H);mxUtils.extend(P,mxShape);
-P.prototype.getLabelBounds=function(c){return new mxRectangle(c.x,c.y+c.height/8,c.width,7*c.height/8)};P.prototype.paintBackground=function(c,l,x,p,v){c.translate(l,x);c.begin();c.moveTo(3*p/8,v/8*1.1);c.lineTo(5*p/8,0);c.end();c.stroke();c.ellipse(0,v/8,p,7*v/8);c.fillAndStroke()};P.prototype.paintForeground=function(c,l,x,p,v){c.begin();c.moveTo(3*p/8,v/8*1.1);c.lineTo(5*p/8,v/4);c.end();c.stroke()};mxCellRenderer.registerShape("umlControl",P);mxUtils.extend(S,mxRectangleShape);S.prototype.size=
-40;S.prototype.isHtmlAllowed=function(){return!1};S.prototype.getLabelBounds=function(c){var l=Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(c.x,c.y,c.width,l)};S.prototype.paintBackground=function(c,l,x,p,v){var A=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),B=mxUtils.getValue(this.style,"participant");null==B||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,c,l,
-x,p,A):(B=this.state.view.graph.cellRenderer.getShape(B),null!=B&&B!=S&&(B=new B,B.apply(this.state),c.save(),B.paintVertexShape(c,l,x,p,A),c.restore()));A<v&&(c.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),c.begin(),c.moveTo(l+p/2,x+A),c.lineTo(l+p/2,x+v),c.end(),c.stroke())};S.prototype.paintForeground=function(c,l,x,p,v){var A=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,c,l,x,p,Math.min(v,
-A))};mxCellRenderer.registerShape("umlLifeline",S);mxUtils.extend(R,mxShape);R.prototype.width=60;R.prototype.height=30;R.prototype.corner=10;R.prototype.getLabelMargins=function(c){return new mxRectangle(0,0,c.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),c.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};R.prototype.paintBackground=function(c,l,x,p,v){var A=this.corner,B=Math.min(p,Math.max(A,parseFloat(mxUtils.getValue(this.style,
+T);mxUtils.extend(M,mxHexagon);M.prototype.size=.25;M.prototype.fixedSize=20;M.prototype.isRoundable=function(){return!0};M.prototype.redrawPath=function(c,l,x,p,v){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,
+0),new mxPoint(p-l,0),new mxPoint(p,.5*v),new mxPoint(p-l,v),new mxPoint(l,v),new mxPoint(0,.5*v)],this.isRounded,x,!0)};mxCellRenderer.registerShape("hexagon",M);mxUtils.extend(ia,mxRectangleShape);ia.prototype.isHtmlAllowed=function(){return!1};ia.prototype.paintForeground=function(c,l,x,p,v){var A=Math.min(p/5,v/5)+1;c.begin();c.moveTo(l+p/2,x+A);c.lineTo(l+p/2,x+v-A);c.moveTo(l+A,x+v/2);c.lineTo(l+p-A,x+v/2);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
+mxCellRenderer.registerShape("plus",ia);var eb=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};mxRhombus.prototype.paintVertexShape=function(c,l,x,p,v){eb.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var A=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
+0);l+=A;x+=A;p-=2*A;v-=2*A;0<p&&0<v&&(c.setShadow(!1),eb.apply(this,[c,l,x,p,v]))}};mxUtils.extend(N,mxRectangleShape);N.prototype.isHtmlAllowed=function(){return!1};N.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};N.prototype.paintForeground=function(c,l,x,p,v){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var A=
+Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);l+=A;x+=A;p-=2*A;v-=2*A;0<p&&0<v&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}c.setDashed(!1);A=0;do{var B=mxCellRenderer.defaultShapes[this.style["symbol"+A]];if(null!=B){var ka=this.style["symbol"+A+"Align"],J=this.style["symbol"+A+"VerticalAlign"],wa=this.style["symbol"+A+"Width"],oa=this.style["symbol"+A+"Height"],ab=this.style["symbol"+A+"Spacing"]||0,jb=this.style["symbol"+A+"VSpacing"]||
+ab,gb=this.style["symbol"+A+"ArcSpacing"];null!=gb&&(gb*=this.getArcSize(p+this.strokewidth,v+this.strokewidth),ab+=gb,jb+=gb);gb=l;var Ea=x;gb=ka==mxConstants.ALIGN_CENTER?gb+(p-wa)/2:ka==mxConstants.ALIGN_RIGHT?gb+(p-wa-ab):gb+ab;Ea=J==mxConstants.ALIGN_MIDDLE?Ea+(v-oa)/2:J==mxConstants.ALIGN_BOTTOM?Ea+(v-oa-jb):Ea+jb;c.save();ka=new B;ka.style=this.style;B.prototype.paintVertexShape.call(ka,c,gb,Ea,wa,oa);c.restore()}A++}while(null!=B)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
+mxCellRenderer.registerShape("ext",N);mxUtils.extend(O,mxCylinder);O.prototype.redrawPath=function(c,l,x,p,v,A){A?(c.moveTo(0,0),c.lineTo(p/2,v/2),c.lineTo(p,0),c.end()):(c.moveTo(0,0),c.lineTo(p,0),c.lineTo(p,v),c.lineTo(0,v),c.close())};mxCellRenderer.registerShape("message",O);mxUtils.extend(ba,mxShape);ba.prototype.paintBackground=function(c,l,x,p,v){c.translate(l,x);c.ellipse(p/4,0,p/2,v/4);c.fillAndStroke();c.begin();c.moveTo(p/2,v/4);c.lineTo(p/2,2*v/3);c.moveTo(p/2,v/3);c.lineTo(0,v/3);c.moveTo(p/
+2,v/3);c.lineTo(p,v/3);c.moveTo(p/2,2*v/3);c.lineTo(0,v);c.moveTo(p/2,2*v/3);c.lineTo(p,v);c.end();c.stroke()};mxCellRenderer.registerShape("umlActor",ba);mxUtils.extend(la,mxShape);la.prototype.getLabelMargins=function(c){return new mxRectangle(c.width/6,0,0,0)};la.prototype.paintBackground=function(c,l,x,p,v){c.translate(l,x);c.begin();c.moveTo(0,v/4);c.lineTo(0,3*v/4);c.end();c.stroke();c.begin();c.moveTo(0,v/2);c.lineTo(p/6,v/2);c.end();c.stroke();c.ellipse(p/6,0,5*p/6,v);c.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",
+la);mxUtils.extend(u,mxEllipse);u.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+p/8,x+v);c.lineTo(l+7*p/8,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("umlEntity",u);mxUtils.extend(H,mxShape);H.prototype.paintVertexShape=function(c,l,x,p,v){c.translate(l,x);c.begin();c.moveTo(p,0);c.lineTo(0,v);c.moveTo(0,0);c.lineTo(p,v);c.end();c.stroke()};mxCellRenderer.registerShape("umlDestroy",H);mxUtils.extend(P,mxShape);
+P.prototype.getLabelBounds=function(c){return new mxRectangle(c.x,c.y+c.height/8,c.width,7*c.height/8)};P.prototype.paintBackground=function(c,l,x,p,v){c.translate(l,x);c.begin();c.moveTo(3*p/8,v/8*1.1);c.lineTo(5*p/8,0);c.end();c.stroke();c.ellipse(0,v/8,p,7*v/8);c.fillAndStroke()};P.prototype.paintForeground=function(c,l,x,p,v){c.begin();c.moveTo(3*p/8,v/8*1.1);c.lineTo(5*p/8,v/4);c.end();c.stroke()};mxCellRenderer.registerShape("umlControl",P);mxUtils.extend(W,mxRectangleShape);W.prototype.size=
+40;W.prototype.isHtmlAllowed=function(){return!1};W.prototype.getLabelBounds=function(c){var l=Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(c.x,c.y,c.width,l)};W.prototype.paintBackground=function(c,l,x,p,v){var A=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),B=mxUtils.getValue(this.style,"participant");null==B||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,c,l,
+x,p,A):(B=this.state.view.graph.cellRenderer.getShape(B),null!=B&&B!=W&&(B=new B,B.apply(this.state),c.save(),B.paintVertexShape(c,l,x,p,A),c.restore()));A<v&&(c.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),c.begin(),c.moveTo(l+p/2,x+A),c.lineTo(l+p/2,x+v),c.end(),c.stroke())};W.prototype.paintForeground=function(c,l,x,p,v){var A=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,c,l,x,p,Math.min(v,
+A))};mxCellRenderer.registerShape("umlLifeline",W);mxUtils.extend(R,mxShape);R.prototype.width=60;R.prototype.height=30;R.prototype.corner=10;R.prototype.getLabelMargins=function(c){return new mxRectangle(0,0,c.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),c.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};R.prototype.paintBackground=function(c,l,x,p,v){var A=this.corner,B=Math.min(p,Math.max(A,parseFloat(mxUtils.getValue(this.style,
"width",this.width)))),ka=Math.min(v,Math.max(1.5*A,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),J=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);J!=mxConstants.NONE&&(c.setFillColor(J),c.rect(l,x,p,v),c.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(c,l,x,p,v),c.setGradient(this.fill,this.gradient,l,x,p,v,this.gradientDirection)):c.setFillColor(this.fill);c.begin();
c.moveTo(l,x);c.lineTo(l+B,x);c.lineTo(l+B,x+Math.max(0,ka-1.5*A));c.lineTo(l+Math.max(0,B-A),x+ka);c.lineTo(l,x+ka);c.close();c.fillAndStroke();c.begin();c.moveTo(l+B,x);c.lineTo(l+p,x);c.lineTo(l+p,x+v);c.lineTo(l,x+v);c.lineTo(l,x+ka);c.stroke()};mxCellRenderer.registerShape("umlFrame",R);mxPerimeter.CenterPerimeter=function(c,l,x,p){return new mxPoint(c.getCenterX(),c.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(c,
-l,x,p){p=S.prototype.size;null!=l&&(p=mxUtils.getValue(l.style,"size",p)*l.view.scale);l=parseFloat(l.style[mxConstants.STYLE_STROKEWIDTH]||1)*l.view.scale/2-1;x.x<c.getCenterX()&&(l=-1*(l+1));return new mxPoint(c.getCenterX()+l,Math.min(c.y+c.height,Math.max(c.y+p,x.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(c,l,x,p){p=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",
+l,x,p){p=W.prototype.size;null!=l&&(p=mxUtils.getValue(l.style,"size",p)*l.view.scale);l=parseFloat(l.style[mxConstants.STYLE_STROKEWIDTH]||1)*l.view.scale/2-1;x.x<c.getCenterX()&&(l=-1*(l+1));return new mxPoint(c.getCenterX()+l,Math.min(c.y+c.height,Math.max(c.y+p,x.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(c,l,x,p){p=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",
mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(c,l,x,p){p=parseFloat(l.style[mxConstants.STYLE_STROKEWIDTH]||1)*l.view.scale/2-1;null!=l.style.backboneSize&&(p+=parseFloat(l.style.backboneSize)*l.view.scale/2-1);if("south"==l.style[mxConstants.STYLE_DIRECTION]||"north"==l.style[mxConstants.STYLE_DIRECTION])return x.x<c.getCenterX()&&(p=-1*(p+1)),new mxPoint(c.getCenterX()+p,Math.min(c.y+c.height,Math.max(c.y,x.y)));x.y<c.getCenterY()&&(p=-1*(p+1));return new mxPoint(Math.min(c.x+
-c.width,Math.max(c.x,x.x)),c.getCenterY()+p)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(c,l,x,p){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(c,new mxRectangle(0,0,0,Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(l.style,"size",ja.prototype.size))*l.view.scale))),l.style),l,x,p)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(c,
-l,x,p){var v="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=v?Z.prototype.fixedSize:Z.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));v&&(A*=l.view.scale);var B=c.x,ka=c.y,J=c.width,xa=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ka=[new mxPoint(B,ka),new mxPoint(B+J,ka+v),new mxPoint(B+
-J,ka+xa),new mxPoint(B,ka+xa-v),new mxPoint(B,ka)]):(v=v?Math.max(0,Math.min(.5*J,A)):J*Math.max(0,Math.min(1,A)),ka=[new mxPoint(B+v,ka),new mxPoint(B+J,ka),new mxPoint(B+J-v,ka+xa),new mxPoint(B,ka+xa),new mxPoint(B+v,ka)]);xa=c.getCenterX();c=c.getCenterY();c=new mxPoint(xa,c);p&&(x.x<B||x.x>B+J?c.y=x.y:c.x=x.x);return mxUtils.getPerimeterPoint(ka,c,x)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(c,l,x,p){var v="0"!=
-mxUtils.getValue(l.style,"fixedSize","0"),A=v?X.prototype.fixedSize:X.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));v&&(A*=l.view.scale);var B=c.x,ka=c.y,J=c.width,xa=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(.5*J,A)):J*Math.max(0,Math.min(1,A)),ka=[new mxPoint(B+v,ka),new mxPoint(B+J-v,ka),new mxPoint(B+J,ka+xa),new mxPoint(B,ka+xa),new mxPoint(B+
-v,ka)]):l==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(J,A)):J*Math.max(0,Math.min(1,A)),ka=[new mxPoint(B,ka),new mxPoint(B+J,ka),new mxPoint(B+J-v,ka+xa),new mxPoint(B+v,ka+xa),new mxPoint(B,ka)]):l==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ka=[new mxPoint(B,ka+v),new mxPoint(B+J,ka),new mxPoint(B+J,ka+xa),new mxPoint(B,ka+xa-v),new mxPoint(B,ka+v)]):(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ka=[new mxPoint(B,ka),new mxPoint(B+
-J,ka+v),new mxPoint(B+J,ka+xa-v),new mxPoint(B,ka+xa),new mxPoint(B,ka)]);xa=c.getCenterX();c=c.getCenterY();c=new mxPoint(xa,c);p&&(x.x<B||x.x>B+J?c.y=x.y:c.x=x.x);return mxUtils.getPerimeterPoint(ka,c,x)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,l,x,p){var v="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=v?U.prototype.fixedSize:U.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));v&&(A*=l.view.scale);var B=c.x,
-ka=c.y,J=c.width,xa=c.height,oa=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(J,A)):J*Math.max(0,Math.min(1,A)),ka=[new mxPoint(B,ka),new mxPoint(B+J-v,ka),new mxPoint(B+J,c),new mxPoint(B+J-v,ka+xa),new mxPoint(B,ka+xa),new mxPoint(B+v,c),new mxPoint(B,ka)]):l==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(J,A)):J*Math.max(0,Math.min(1,
-A)),ka=[new mxPoint(B+v,ka),new mxPoint(B+J,ka),new mxPoint(B+J-v,c),new mxPoint(B+J,ka+xa),new mxPoint(B+v,ka+xa),new mxPoint(B,c),new mxPoint(B+v,ka)]):l==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ka=[new mxPoint(B,ka+v),new mxPoint(oa,ka),new mxPoint(B+J,ka+v),new mxPoint(B+J,ka+xa),new mxPoint(oa,ka+xa-v),new mxPoint(B,ka+xa),new mxPoint(B,ka+v)]):(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ka=[new mxPoint(B,ka),new mxPoint(oa,ka+
-v),new mxPoint(B+J,ka),new mxPoint(B+J,ka+xa-v),new mxPoint(oa,ka+xa),new mxPoint(B,ka+xa-v),new mxPoint(B,ka)]);oa=new mxPoint(oa,c);p&&(x.x<B||x.x>B+J?oa.y=x.y:oa.x=x.x);return mxUtils.getPerimeterPoint(ka,oa,x)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(c,l,x,p){var v="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=v?L.prototype.fixedSize:L.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));v&&(A*=l.view.scale);var B=
-c.x,ka=c.y,J=c.width,xa=c.height,oa=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ka=[new mxPoint(oa,ka),new mxPoint(B+J,ka+v),new mxPoint(B+J,ka+xa-v),new mxPoint(oa,ka+xa),new mxPoint(B,ka+xa-v),new mxPoint(B,ka+v),new mxPoint(oa,ka)]):(v=v?Math.max(0,Math.min(J,A)):J*Math.max(0,
-Math.min(1,A)),ka=[new mxPoint(B+v,ka),new mxPoint(B+J-v,ka),new mxPoint(B+J,c),new mxPoint(B+J-v,ka+xa),new mxPoint(B+v,ka+xa),new mxPoint(B,c),new mxPoint(B+v,ka)]);oa=new mxPoint(oa,c);p&&(x.x<B||x.x>B+J?oa.y=x.y:oa.x=x.x);return mxUtils.getPerimeterPoint(ka,oa,x)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(ca,mxShape);ca.prototype.size=10;ca.prototype.paintBackground=function(c,l,x,p,v){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size));
-c.translate(l,x);c.ellipse((p-A)/2,0,A,A);c.fillAndStroke();c.begin();c.moveTo(p/2,A);c.lineTo(p/2,v);c.end();c.stroke()};mxCellRenderer.registerShape("lollipop",ca);mxUtils.extend(ea,mxShape);ea.prototype.size=10;ea.prototype.inset=2;ea.prototype.paintBackground=function(c,l,x,p,v){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size)),B=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(l,x);c.begin();c.moveTo(p/2,A+B);c.lineTo(p/2,v);c.end();c.stroke();
-c.begin();c.moveTo((p-A)/2-B,A/2);c.quadTo((p-A)/2-B,A+B,p/2,A+B);c.quadTo((p+A)/2+B,A+B,(p+A)/2+B,A/2);c.end();c.stroke()};mxCellRenderer.registerShape("requires",ea);mxUtils.extend(fa,mxShape);fa.prototype.paintBackground=function(c,l,x,p,v){c.translate(l,x);c.begin();c.moveTo(0,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,0,v);c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",fa);mxUtils.extend(ra,mxShape);ra.prototype.inset=2;ra.prototype.paintBackground=function(c,l,x,p,v){var A=parseFloat(mxUtils.getValue(this.style,
-"inset",this.inset))+this.strokewidth;c.translate(l,x);c.ellipse(0,A,p-2*A,v-2*A);c.fillAndStroke();c.begin();c.moveTo(p/2,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p/2,v);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",ra);mxUtils.extend(ua,mxCylinder);ua.prototype.jettyWidth=20;ua.prototype.jettyHeight=10;ua.prototype.redrawPath=function(c,l,x,p,v,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",
-this.jettyHeight));x=B/2;B=x+B/2;var ka=Math.min(l,v-l),J=Math.min(ka+2*l,v-l);A?(c.moveTo(x,ka),c.lineTo(B,ka),c.lineTo(B,ka+l),c.lineTo(x,ka+l),c.moveTo(x,J),c.lineTo(B,J),c.lineTo(B,J+l),c.lineTo(x,J+l)):(c.moveTo(x,0),c.lineTo(p,0),c.lineTo(p,v),c.lineTo(x,v),c.lineTo(x,J+l),c.lineTo(0,J+l),c.lineTo(0,J),c.lineTo(x,J),c.lineTo(x,ka+l),c.lineTo(0,ka+l),c.lineTo(0,ka),c.lineTo(x,ka),c.close());c.end()};mxCellRenderer.registerShape("module",ua);mxUtils.extend(sa,mxCylinder);sa.prototype.jettyWidth=
-32;sa.prototype.jettyHeight=12;sa.prototype.redrawPath=function(c,l,x,p,v,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));x=B/2;B=x+B/2;var ka=.3*v-l/2,J=.7*v-l/2;A?(c.moveTo(x,ka),c.lineTo(B,ka),c.lineTo(B,ka+l),c.lineTo(x,ka+l),c.moveTo(x,J),c.lineTo(B,J),c.lineTo(B,J+l),c.lineTo(x,J+l)):(c.moveTo(x,0),c.lineTo(p,0),c.lineTo(p,v),c.lineTo(x,v),c.lineTo(x,J+l),c.lineTo(0,J+l),c.lineTo(0,J),c.lineTo(x,
-J),c.lineTo(x,ka+l),c.lineTo(0,ka+l),c.lineTo(0,ka),c.lineTo(x,ka),c.close());c.end()};mxCellRenderer.registerShape("component",sa);mxUtils.extend(Aa,mxRectangleShape);Aa.prototype.paintForeground=function(c,l,x,p,v){var A=p/2,B=v/2,ka=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c.begin();this.addPoints(c,[new mxPoint(l+A,x),new mxPoint(l+p,x+B),new mxPoint(l+A,x+v),new mxPoint(l,x+B)],this.isRounded,ka,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
-arguments)};mxCellRenderer.registerShape("associativeEntity",Aa);mxUtils.extend(Ca,mxDoubleEllipse);Ca.prototype.outerStroke=!0;Ca.prototype.paintVertexShape=function(c,l,x,p,v){var A=Math.min(4,Math.min(p/5,v/5));0<p&&0<v&&(c.ellipse(l+A,x+A,p-2*A,v-2*A),c.fillAndStroke());c.setShadow(!1);this.outerStroke&&(c.ellipse(l,x,p,v),c.stroke())};mxCellRenderer.registerShape("endState",Ca);mxUtils.extend(Ba,Ca);Ba.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",Ba);mxUtils.extend(ta,mxArrowConnector);
-ta.prototype.defaultWidth=4;ta.prototype.isOpenEnded=function(){return!0};ta.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};ta.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",ta);mxUtils.extend(Pa,mxArrowConnector);Pa.prototype.defaultWidth=10;Pa.prototype.defaultArrowWidth=20;Pa.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,
-"startWidth",this.defaultArrowWidth)};Pa.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Pa.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Pa);mxUtils.extend(Ta,mxActor);Ta.prototype.size=30;Ta.prototype.isRoundable=function(){return!0};Ta.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(v,parseFloat(mxUtils.getValue(this.style,
-"size",this.size)));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(0,l),new mxPoint(p,0),new mxPoint(p,v)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("manualInput",Ta);mxUtils.extend(Oa,mxRectangleShape);Oa.prototype.dx=20;Oa.prototype.dy=20;Oa.prototype.isHtmlAllowed=function(){return!1};Oa.prototype.paintForeground=function(c,l,x,p,v){mxRectangleShape.prototype.paintForeground.apply(this,arguments);
-var A=0;if(this.isRounded){var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;A=Math.max(A,Math.min(p*B,v*B))}B=Math.max(A,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));A=Math.max(A,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.begin();c.moveTo(l,x+A);c.lineTo(l+p,x+A);c.end();c.stroke();c.begin();c.moveTo(l+B,x);c.lineTo(l+B,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("internalStorage",Oa);
-mxUtils.extend(Xa,mxActor);Xa.prototype.dx=20;Xa.prototype.dy=20;Xa.prototype.redrawPath=function(c,l,x,p,v){l=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,x),new mxPoint(l,x),
-new mxPoint(l,v),new mxPoint(0,v)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("corner",Xa);mxUtils.extend(Ga,mxActor);Ga.prototype.redrawPath=function(c,l,x,p,v){c.moveTo(0,0);c.lineTo(0,v);c.end();c.moveTo(p,0);c.lineTo(p,v);c.end();c.moveTo(0,v/2);c.lineTo(p,v/2);c.end()};mxCellRenderer.registerShape("crossbar",Ga);mxUtils.extend(eb,mxActor);eb.prototype.dx=20;eb.prototype.dy=20;eb.prototype.redrawPath=function(c,l,x,p,v){l=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,
-"dx",this.dx))));x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,x),new mxPoint((p+l)/2,x),new mxPoint((p+l)/2,v),new mxPoint((p-l)/2,v),new mxPoint((p-l)/2,x),new mxPoint(0,x)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("tee",eb);mxUtils.extend(bb,
-mxActor);bb.prototype.arrowWidth=.3;bb.prototype.arrowSize=.2;bb.prototype.redrawPath=function(c,l,x,p,v){var A=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));l=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));x=(v-A)/2;A=x+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,x),new mxPoint(p-l,x),new mxPoint(p-l,0),new mxPoint(p,v/2),new mxPoint(p-
-l,v),new mxPoint(p-l,A),new mxPoint(0,A)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("singleArrow",bb);mxUtils.extend(z,mxActor);z.prototype.redrawPath=function(c,l,x,p,v){var A=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",bb.prototype.arrowWidth))));l=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",bb.prototype.arrowSize))));x=(v-A)/2;A=x+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
+c.width,Math.max(c.x,x.x)),c.getCenterY()+p)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(c,l,x,p){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(c,new mxRectangle(0,0,0,Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(l.style,"size",ma.prototype.size))*l.view.scale))),l.style),l,x,p)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(c,
+l,x,p){var v="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=v?aa.prototype.fixedSize:aa.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));v&&(A*=l.view.scale);var B=c.x,ka=c.y,J=c.width,wa=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(v=v?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ka=[new mxPoint(B,ka),new mxPoint(B+J,ka+v),new mxPoint(B+
+J,ka+wa),new mxPoint(B,ka+wa-v),new mxPoint(B,ka)]):(v=v?Math.max(0,Math.min(.5*J,A)):J*Math.max(0,Math.min(1,A)),ka=[new mxPoint(B+v,ka),new mxPoint(B+J,ka),new mxPoint(B+J-v,ka+wa),new mxPoint(B,ka+wa),new mxPoint(B+v,ka)]);wa=c.getCenterX();c=c.getCenterY();c=new mxPoint(wa,c);p&&(x.x<B||x.x>B+J?c.y=x.y:c.x=x.x);return mxUtils.getPerimeterPoint(ka,c,x)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(c,l,x,p){var v="0"!=
+mxUtils.getValue(l.style,"fixedSize","0"),A=v?Y.prototype.fixedSize:Y.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));v&&(A*=l.view.scale);var B=c.x,ka=c.y,J=c.width,wa=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(.5*J,A)):J*Math.max(0,Math.min(1,A)),ka=[new mxPoint(B+v,ka),new mxPoint(B+J-v,ka),new mxPoint(B+J,ka+wa),new mxPoint(B,ka+wa),new mxPoint(B+
+v,ka)]):l==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(J,A)):J*Math.max(0,Math.min(1,A)),ka=[new mxPoint(B,ka),new mxPoint(B+J,ka),new mxPoint(B+J-v,ka+wa),new mxPoint(B+v,ka+wa),new mxPoint(B,ka)]):l==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ka=[new mxPoint(B,ka+v),new mxPoint(B+J,ka),new mxPoint(B+J,ka+wa),new mxPoint(B,ka+wa-v),new mxPoint(B,ka+v)]):(v=v?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ka=[new mxPoint(B,ka),new mxPoint(B+
+J,ka+v),new mxPoint(B+J,ka+wa-v),new mxPoint(B,ka+wa),new mxPoint(B,ka)]);wa=c.getCenterX();c=c.getCenterY();c=new mxPoint(wa,c);p&&(x.x<B||x.x>B+J?c.y=x.y:c.x=x.x);return mxUtils.getPerimeterPoint(ka,c,x)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,l,x,p){var v="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=v?T.prototype.fixedSize:T.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));v&&(A*=l.view.scale);var B=c.x,
+ka=c.y,J=c.width,wa=c.height,oa=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(J,A)):J*Math.max(0,Math.min(1,A)),ka=[new mxPoint(B,ka),new mxPoint(B+J-v,ka),new mxPoint(B+J,c),new mxPoint(B+J-v,ka+wa),new mxPoint(B,ka+wa),new mxPoint(B+v,c),new mxPoint(B,ka)]):l==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(J,A)):J*Math.max(0,Math.min(1,
+A)),ka=[new mxPoint(B+v,ka),new mxPoint(B+J,ka),new mxPoint(B+J-v,c),new mxPoint(B+J,ka+wa),new mxPoint(B+v,ka+wa),new mxPoint(B,c),new mxPoint(B+v,ka)]):l==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ka=[new mxPoint(B,ka+v),new mxPoint(oa,ka),new mxPoint(B+J,ka+v),new mxPoint(B+J,ka+wa),new mxPoint(oa,ka+wa-v),new mxPoint(B,ka+wa),new mxPoint(B,ka+v)]):(v=v?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ka=[new mxPoint(B,ka),new mxPoint(oa,ka+
+v),new mxPoint(B+J,ka),new mxPoint(B+J,ka+wa-v),new mxPoint(oa,ka+wa),new mxPoint(B,ka+wa-v),new mxPoint(B,ka)]);oa=new mxPoint(oa,c);p&&(x.x<B||x.x>B+J?oa.y=x.y:oa.x=x.x);return mxUtils.getPerimeterPoint(ka,oa,x)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(c,l,x,p){var v="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=v?M.prototype.fixedSize:M.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));v&&(A*=l.view.scale);var B=
+c.x,ka=c.y,J=c.width,wa=c.height,oa=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(v=v?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ka=[new mxPoint(oa,ka),new mxPoint(B+J,ka+v),new mxPoint(B+J,ka+wa-v),new mxPoint(oa,ka+wa),new mxPoint(B,ka+wa-v),new mxPoint(B,ka+v),new mxPoint(oa,ka)]):(v=v?Math.max(0,Math.min(J,A)):J*Math.max(0,
+Math.min(1,A)),ka=[new mxPoint(B+v,ka),new mxPoint(B+J-v,ka),new mxPoint(B+J,c),new mxPoint(B+J-v,ka+wa),new mxPoint(B+v,ka+wa),new mxPoint(B,c),new mxPoint(B+v,ka)]);oa=new mxPoint(oa,c);p&&(x.x<B||x.x>B+J?oa.y=x.y:oa.x=x.x);return mxUtils.getPerimeterPoint(ka,oa,x)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(da,mxShape);da.prototype.size=10;da.prototype.paintBackground=function(c,l,x,p,v){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size));
+c.translate(l,x);c.ellipse((p-A)/2,0,A,A);c.fillAndStroke();c.begin();c.moveTo(p/2,A);c.lineTo(p/2,v);c.end();c.stroke()};mxCellRenderer.registerShape("lollipop",da);mxUtils.extend(fa,mxShape);fa.prototype.size=10;fa.prototype.inset=2;fa.prototype.paintBackground=function(c,l,x,p,v){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size)),B=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(l,x);c.begin();c.moveTo(p/2,A+B);c.lineTo(p/2,v);c.end();c.stroke();
+c.begin();c.moveTo((p-A)/2-B,A/2);c.quadTo((p-A)/2-B,A+B,p/2,A+B);c.quadTo((p+A)/2+B,A+B,(p+A)/2+B,A/2);c.end();c.stroke()};mxCellRenderer.registerShape("requires",fa);mxUtils.extend(ea,mxShape);ea.prototype.paintBackground=function(c,l,x,p,v){c.translate(l,x);c.begin();c.moveTo(0,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,0,v);c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",ea);mxUtils.extend(qa,mxShape);qa.prototype.inset=2;qa.prototype.paintBackground=function(c,l,x,p,v){var A=parseFloat(mxUtils.getValue(this.style,
+"inset",this.inset))+this.strokewidth;c.translate(l,x);c.ellipse(0,A,p-2*A,v-2*A);c.fillAndStroke();c.begin();c.moveTo(p/2,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p/2,v);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",qa);mxUtils.extend(va,mxCylinder);va.prototype.jettyWidth=20;va.prototype.jettyHeight=10;va.prototype.redrawPath=function(c,l,x,p,v,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",
+this.jettyHeight));x=B/2;B=x+B/2;var ka=Math.min(l,v-l),J=Math.min(ka+2*l,v-l);A?(c.moveTo(x,ka),c.lineTo(B,ka),c.lineTo(B,ka+l),c.lineTo(x,ka+l),c.moveTo(x,J),c.lineTo(B,J),c.lineTo(B,J+l),c.lineTo(x,J+l)):(c.moveTo(x,0),c.lineTo(p,0),c.lineTo(p,v),c.lineTo(x,v),c.lineTo(x,J+l),c.lineTo(0,J+l),c.lineTo(0,J),c.lineTo(x,J),c.lineTo(x,ka+l),c.lineTo(0,ka+l),c.lineTo(0,ka),c.lineTo(x,ka),c.close());c.end()};mxCellRenderer.registerShape("module",va);mxUtils.extend(ua,mxCylinder);ua.prototype.jettyWidth=
+32;ua.prototype.jettyHeight=12;ua.prototype.redrawPath=function(c,l,x,p,v,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));x=B/2;B=x+B/2;var ka=.3*v-l/2,J=.7*v-l/2;A?(c.moveTo(x,ka),c.lineTo(B,ka),c.lineTo(B,ka+l),c.lineTo(x,ka+l),c.moveTo(x,J),c.lineTo(B,J),c.lineTo(B,J+l),c.lineTo(x,J+l)):(c.moveTo(x,0),c.lineTo(p,0),c.lineTo(p,v),c.lineTo(x,v),c.lineTo(x,J+l),c.lineTo(0,J+l),c.lineTo(0,J),c.lineTo(x,
+J),c.lineTo(x,ka+l),c.lineTo(0,ka+l),c.lineTo(0,ka),c.lineTo(x,ka),c.close());c.end()};mxCellRenderer.registerShape("component",ua);mxUtils.extend(Aa,mxRectangleShape);Aa.prototype.paintForeground=function(c,l,x,p,v){var A=p/2,B=v/2,ka=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c.begin();this.addPoints(c,[new mxPoint(l+A,x),new mxPoint(l+p,x+B),new mxPoint(l+A,x+v),new mxPoint(l,x+B)],this.isRounded,ka,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
+arguments)};mxCellRenderer.registerShape("associativeEntity",Aa);mxUtils.extend(za,mxDoubleEllipse);za.prototype.outerStroke=!0;za.prototype.paintVertexShape=function(c,l,x,p,v){var A=Math.min(4,Math.min(p/5,v/5));0<p&&0<v&&(c.ellipse(l+A,x+A,p-2*A,v-2*A),c.fillAndStroke());c.setShadow(!1);this.outerStroke&&(c.ellipse(l,x,p,v),c.stroke())};mxCellRenderer.registerShape("endState",za);mxUtils.extend(Ca,za);Ca.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",Ca);mxUtils.extend(sa,mxArrowConnector);
+sa.prototype.defaultWidth=4;sa.prototype.isOpenEnded=function(){return!0};sa.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};sa.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",sa);mxUtils.extend(Va,mxArrowConnector);Va.prototype.defaultWidth=10;Va.prototype.defaultArrowWidth=20;Va.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,
+"startWidth",this.defaultArrowWidth)};Va.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Va.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Va);mxUtils.extend(Ua,mxActor);Ua.prototype.size=30;Ua.prototype.isRoundable=function(){return!0};Ua.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(v,parseFloat(mxUtils.getValue(this.style,
+"size",this.size)));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(0,l),new mxPoint(p,0),new mxPoint(p,v)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("manualInput",Ua);mxUtils.extend(Ra,mxRectangleShape);Ra.prototype.dx=20;Ra.prototype.dy=20;Ra.prototype.isHtmlAllowed=function(){return!1};Ra.prototype.paintForeground=function(c,l,x,p,v){mxRectangleShape.prototype.paintForeground.apply(this,arguments);
+var A=0;if(this.isRounded){var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;A=Math.max(A,Math.min(p*B,v*B))}B=Math.max(A,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));A=Math.max(A,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.begin();c.moveTo(l,x+A);c.lineTo(l+p,x+A);c.end();c.stroke();c.begin();c.moveTo(l+B,x);c.lineTo(l+B,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("internalStorage",Ra);
+mxUtils.extend(Za,mxActor);Za.prototype.dx=20;Za.prototype.dy=20;Za.prototype.redrawPath=function(c,l,x,p,v){l=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,x),new mxPoint(l,x),
+new mxPoint(l,v),new mxPoint(0,v)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("corner",Za);mxUtils.extend(Ha,mxActor);Ha.prototype.redrawPath=function(c,l,x,p,v){c.moveTo(0,0);c.lineTo(0,v);c.end();c.moveTo(p,0);c.lineTo(p,v);c.end();c.moveTo(0,v/2);c.lineTo(p,v/2);c.end()};mxCellRenderer.registerShape("crossbar",Ha);mxUtils.extend(db,mxActor);db.prototype.dx=20;db.prototype.dy=20;db.prototype.redrawPath=function(c,l,x,p,v){l=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,
+"dx",this.dx))));x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,x),new mxPoint((p+l)/2,x),new mxPoint((p+l)/2,v),new mxPoint((p-l)/2,v),new mxPoint((p-l)/2,x),new mxPoint(0,x)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("tee",db);mxUtils.extend(cb,
+mxActor);cb.prototype.arrowWidth=.3;cb.prototype.arrowSize=.2;cb.prototype.redrawPath=function(c,l,x,p,v){var A=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));l=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));x=(v-A)/2;A=x+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,x),new mxPoint(p-l,x),new mxPoint(p-l,0),new mxPoint(p,v/2),new mxPoint(p-
+l,v),new mxPoint(p-l,A),new mxPoint(0,A)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("singleArrow",cb);mxUtils.extend(z,mxActor);z.prototype.redrawPath=function(c,l,x,p,v){var A=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",cb.prototype.arrowWidth))));l=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",cb.prototype.arrowSize))));x=(v-A)/2;A=x+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
2;this.addPoints(c,[new mxPoint(0,v/2),new mxPoint(l,0),new mxPoint(l,x),new mxPoint(p-l,x),new mxPoint(p-l,0),new mxPoint(p,v/2),new mxPoint(p-l,v),new mxPoint(p-l,A),new mxPoint(l,A),new mxPoint(l,v)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("doubleArrow",z);mxUtils.extend(K,mxActor);K.prototype.size=.1;K.prototype.fixedSize=20;K.prototype.redrawPath=function(c,l,x,p,v){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,
-"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(l,0);c.lineTo(p,0);c.quadTo(p-2*l,v/2,p,v);c.lineTo(l,v);c.quadTo(l-2*l,v/2,l,0);c.close();c.end()};mxCellRenderer.registerShape("dataStorage",K);mxUtils.extend(M,mxActor);M.prototype.redrawPath=function(c,l,x,p,v){c.moveTo(0,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,0,v);c.close();c.end()};mxCellRenderer.registerShape("or",M);mxUtils.extend(T,mxActor);T.prototype.redrawPath=function(c,
-l,x,p,v){c.moveTo(0,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,0,v);c.quadTo(p/2,v/2,0,0);c.close();c.end()};mxCellRenderer.registerShape("xor",T);mxUtils.extend(V,mxActor);V.prototype.size=20;V.prototype.isRoundable=function(){return!0};V.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(p/2,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(p-l,0),new mxPoint(p,
-.8*l),new mxPoint(p,v),new mxPoint(0,v),new mxPoint(0,.8*l)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("loopLimit",V);mxUtils.extend(ia,mxActor);ia.prototype.size=.375;ia.prototype.isRoundable=function(){return!0};ia.prototype.redrawPath=function(c,l,x,p,v){l=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,
-v-l),new mxPoint(p/2,v),new mxPoint(0,v-l)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("offPageConnector",ia);mxUtils.extend(na,mxEllipse);na.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+p/2,x+v);c.lineTo(l+p,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",na);mxUtils.extend(va,mxEllipse);va.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,
-arguments);c.setShadow(!1);c.begin();c.moveTo(l,x+v/2);c.lineTo(l+p,x+v/2);c.end();c.stroke();c.begin();c.moveTo(l+p/2,x);c.lineTo(l+p/2,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("orEllipse",va);mxUtils.extend(pa,mxEllipse);pa.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l+.145*p,x+.145*v);c.lineTo(l+.855*p,x+.855*v);c.end();c.stroke();c.begin();c.moveTo(l+.855*p,x+.145*v);c.lineTo(l+.145*p,
-x+.855*v);c.end();c.stroke()};mxCellRenderer.registerShape("sumEllipse",pa);mxUtils.extend(za,mxRhombus);za.prototype.paintVertexShape=function(c,l,x,p,v){mxRhombus.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l,x+v/2);c.lineTo(l+p,x+v/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",za);mxUtils.extend(Da,mxEllipse);Da.prototype.paintVertexShape=function(c,l,x,p,v){c.begin();c.moveTo(l,x);c.lineTo(l+p,x);c.lineTo(l+p/2,x+v/2);c.close();c.fillAndStroke();
-c.begin();c.moveTo(l,x+v);c.lineTo(l+p,x+v);c.lineTo(l+p/2,x+v/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",Da);mxUtils.extend(Ma,mxEllipse);Ma.prototype.paintVertexShape=function(c,l,x,p,v){var A=c.state.strokeWidth/2,B=10+2*A,ka=x+v-B/2;c.begin();c.moveTo(l,x);c.lineTo(l,x+v);c.moveTo(l+A,ka);c.lineTo(l+A+B,ka-B/2);c.moveTo(l+A,ka);c.lineTo(l+A+B,ka+B/2);c.moveTo(l+A,ka);c.lineTo(l+p-A,ka);c.moveTo(l+p,x);c.lineTo(l+p,x+v);c.moveTo(l+p-A,ka);c.lineTo(l+p-B-A,ka-B/2);c.moveTo(l+
-p-A,ka);c.lineTo(l+p-B-A,ka+B/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",Ma);mxUtils.extend(La,mxEllipse);La.prototype.drawHidden=!0;La.prototype.paintVertexShape=function(c,l,x,p,v){this.outline||c.setStrokeColor(null);if(null!=this.style){var A=c.pointerEvents,B=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||B||(c.pointerEvents=!1);var ka="1"==mxUtils.getValue(this.style,"top","1"),J="1"==mxUtils.getValue(this.style,
-"left","1"),xa="1"==mxUtils.getValue(this.style,"right","1"),oa="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||B||this.outline||ka||xa||oa||J?(c.rect(l,x,p,v),c.fill(),c.pointerEvents=A,c.setStrokeColor(this.stroke),c.setLineCap("square"),c.begin(),c.moveTo(l,x),this.outline||ka?c.lineTo(l+p,x):c.moveTo(l+p,x),this.outline||xa?c.lineTo(l+p,x+v):c.moveTo(l+p,x+v),this.outline||oa?c.lineTo(l,x+v):c.moveTo(l,x+v),(this.outline||J)&&c.lineTo(l,x),c.end(),c.stroke(),c.setLineCap("flat")):
-c.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",La);mxUtils.extend(Ua,mxEllipse);Ua.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();"vertical"==mxUtils.getValue(this.style,"line")?(c.moveTo(l+p/2,x),c.lineTo(l+p/2,x+v)):(c.moveTo(l,x+v/2),c.lineTo(l+p,x+v/2));c.end();c.stroke()};mxCellRenderer.registerShape("lineEllipse",Ua);mxUtils.extend(Sa,mxActor);Sa.prototype.redrawPath=function(c,
+"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(l,0);c.lineTo(p,0);c.quadTo(p-2*l,v/2,p,v);c.lineTo(l,v);c.quadTo(l-2*l,v/2,l,0);c.close();c.end()};mxCellRenderer.registerShape("dataStorage",K);mxUtils.extend(L,mxActor);L.prototype.redrawPath=function(c,l,x,p,v){c.moveTo(0,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,0,v);c.close();c.end()};mxCellRenderer.registerShape("or",L);mxUtils.extend(S,mxActor);S.prototype.redrawPath=function(c,
+l,x,p,v){c.moveTo(0,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,0,v);c.quadTo(p/2,v/2,0,0);c.close();c.end()};mxCellRenderer.registerShape("xor",S);mxUtils.extend(V,mxActor);V.prototype.size=20;V.prototype.isRoundable=function(){return!0};V.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(p/2,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(p-l,0),new mxPoint(p,
+.8*l),new mxPoint(p,v),new mxPoint(0,v),new mxPoint(0,.8*l)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("loopLimit",V);mxUtils.extend(ja,mxActor);ja.prototype.size=.375;ja.prototype.isRoundable=function(){return!0};ja.prototype.redrawPath=function(c,l,x,p,v){l=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,
+v-l),new mxPoint(p/2,v),new mxPoint(0,v-l)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("offPageConnector",ja);mxUtils.extend(na,mxEllipse);na.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+p/2,x+v);c.lineTo(l+p,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",na);mxUtils.extend(ya,mxEllipse);ya.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,
+arguments);c.setShadow(!1);c.begin();c.moveTo(l,x+v/2);c.lineTo(l+p,x+v/2);c.end();c.stroke();c.begin();c.moveTo(l+p/2,x);c.lineTo(l+p/2,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("orEllipse",ya);mxUtils.extend(ra,mxEllipse);ra.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l+.145*p,x+.145*v);c.lineTo(l+.855*p,x+.855*v);c.end();c.stroke();c.begin();c.moveTo(l+.855*p,x+.145*v);c.lineTo(l+.145*p,
+x+.855*v);c.end();c.stroke()};mxCellRenderer.registerShape("sumEllipse",ra);mxUtils.extend(ta,mxRhombus);ta.prototype.paintVertexShape=function(c,l,x,p,v){mxRhombus.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l,x+v/2);c.lineTo(l+p,x+v/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",ta);mxUtils.extend(Da,mxEllipse);Da.prototype.paintVertexShape=function(c,l,x,p,v){c.begin();c.moveTo(l,x);c.lineTo(l+p,x);c.lineTo(l+p/2,x+v/2);c.close();c.fillAndStroke();
+c.begin();c.moveTo(l,x+v);c.lineTo(l+p,x+v);c.lineTo(l+p/2,x+v/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",Da);mxUtils.extend(Oa,mxEllipse);Oa.prototype.paintVertexShape=function(c,l,x,p,v){var A=c.state.strokeWidth/2,B=10+2*A,ka=x+v-B/2;c.begin();c.moveTo(l,x);c.lineTo(l,x+v);c.moveTo(l+A,ka);c.lineTo(l+A+B,ka-B/2);c.moveTo(l+A,ka);c.lineTo(l+A+B,ka+B/2);c.moveTo(l+A,ka);c.lineTo(l+p-A,ka);c.moveTo(l+p,x);c.lineTo(l+p,x+v);c.moveTo(l+p-A,ka);c.lineTo(l+p-B-A,ka-B/2);c.moveTo(l+
+p-A,ka);c.lineTo(l+p-B-A,ka+B/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",Oa);mxUtils.extend(Ma,mxEllipse);Ma.prototype.drawHidden=!0;Ma.prototype.paintVertexShape=function(c,l,x,p,v){this.outline||c.setStrokeColor(null);if(null!=this.style){var A=c.pointerEvents,B=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||B||(c.pointerEvents=!1);var ka="1"==mxUtils.getValue(this.style,"top","1"),J="1"==mxUtils.getValue(this.style,
+"left","1"),wa="1"==mxUtils.getValue(this.style,"right","1"),oa="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||B||this.outline||ka||wa||oa||J?(c.rect(l,x,p,v),c.fill(),c.pointerEvents=A,c.setStrokeColor(this.stroke),c.setLineCap("square"),c.begin(),c.moveTo(l,x),this.outline||ka?c.lineTo(l+p,x):c.moveTo(l+p,x),this.outline||wa?c.lineTo(l+p,x+v):c.moveTo(l+p,x+v),this.outline||oa?c.lineTo(l,x+v):c.moveTo(l,x+v),(this.outline||J)&&c.lineTo(l,x),c.end(),c.stroke(),c.setLineCap("flat")):
+c.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Ma);mxUtils.extend(Wa,mxEllipse);Wa.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();"vertical"==mxUtils.getValue(this.style,"line")?(c.moveTo(l+p/2,x),c.lineTo(l+p/2,x+v)):(c.moveTo(l,x+v/2),c.lineTo(l+p,x+v/2));c.end();c.stroke()};mxCellRenderer.registerShape("lineEllipse",Wa);mxUtils.extend(Sa,mxActor);Sa.prototype.redrawPath=function(c,
l,x,p,v){l=Math.min(p,v/2);c.moveTo(0,0);c.lineTo(p-l,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p-l,v);c.lineTo(0,v);c.close();c.end()};mxCellRenderer.registerShape("delay",Sa);mxUtils.extend(Fa,mxActor);Fa.prototype.size=.2;Fa.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(v,p);var A=Math.max(0,Math.min(l,l*parseFloat(mxUtils.getValue(this.style,"size",this.size))));l=(v-A)/2;x=l+A;var B=(p-A)/2;A=B+A;c.moveTo(0,l);c.lineTo(B,l);c.lineTo(B,0);c.lineTo(A,0);c.lineTo(A,l);c.lineTo(p,l);c.lineTo(p,x);
-c.lineTo(A,x);c.lineTo(A,v);c.lineTo(B,v);c.lineTo(B,x);c.lineTo(0,x);c.close();c.end()};mxCellRenderer.registerShape("cross",Fa);mxUtils.extend(wa,mxActor);wa.prototype.size=.25;wa.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(p,v/2);x=Math.min(p-l,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*p);c.moveTo(0,v/2);c.lineTo(x,0);c.lineTo(p-l,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p-l,v);c.lineTo(x,v);c.close();c.end()};mxCellRenderer.registerShape("display",wa);mxUtils.extend(ya,
-mxActor);ya.prototype.cst={RECT2:"mxgraph.basic.rect"};ya.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"size",dispName:"Corner Size",type:"float",defVal:10},{name:"absoluteCornerSize",dispName:"Abs. Corner Size",type:"bool",defVal:!0},{name:"indent",dispName:"Indent",type:"float",
+c.lineTo(A,x);c.lineTo(A,v);c.lineTo(B,v);c.lineTo(B,x);c.lineTo(0,x);c.close();c.end()};mxCellRenderer.registerShape("cross",Fa);mxUtils.extend(Ja,mxActor);Ja.prototype.size=.25;Ja.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(p,v/2);x=Math.min(p-l,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*p);c.moveTo(0,v/2);c.lineTo(x,0);c.lineTo(p-l,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p-l,v);c.lineTo(x,v);c.close();c.end()};mxCellRenderer.registerShape("display",Ja);mxUtils.extend(xa,
+mxActor);xa.prototype.cst={RECT2:"mxgraph.basic.rect"};xa.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"size",dispName:"Corner Size",type:"float",defVal:10},{name:"absoluteCornerSize",dispName:"Abs. Corner Size",type:"bool",defVal:!0},{name:"indent",dispName:"Indent",type:"float",
defVal:2},{name:"rectOutline",dispName:"Outline",type:"enum",defVal:"single",enumList:[{val:"single",dispName:"Single"},{val:"double",dispName:"Double"},{val:"frame",dispName:"Frame"}]},{name:"fillColor2",dispName:"Inside Fill Color",type:"color",defVal:"none"},{name:"gradientColor2",dispName:"Inside Gradient Color",type:"color",defVal:"none"},{name:"gradientDirection2",dispName:"Inside Gradient Direction",type:"enum",defVal:"south",enumList:[{val:"south",dispName:"South"},{val:"west",dispName:"West"},
{val:"north",dispName:"North"},{val:"east",dispName:"East"}]},{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"right",dispName:"Right",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left ",type:"bool",defVal:!0},{name:"topLeftStyle",dispName:"Top Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},
{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"topRightStyle",dispName:"Top Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomRightStyle",dispName:"Bottom Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",
-dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",dispName:"Bottom Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];ya.prototype.paintVertexShape=function(c,l,x,p,v){c.translate(l,
-x);this.strictDrawShape(c,0,0,p,v)};ya.prototype.strictDrawShape=function(c,l,x,p,v,A){var B=A&&A.rectStyle?A.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),ka=A&&A.absoluteCornerSize?A.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),J=A&&A.size?A.size:Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),xa=A&&A.rectOutline?A.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),oa=A&&A.indent?
-A.indent:Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),$a=A&&A.dashed?A.dashed:mxUtils.getValue(this.style,"dashed",!1),jb=A&&A.dashPattern?A.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),hb=A&&A.relIndent?A.relIndent:Math.max(0,Math.min(50,oa)),Ea=A&&A.top?A.top:mxUtils.getValue(this.style,"top",!0),Ka=A&&A.right?A.right:mxUtils.getValue(this.style,"right",!0),Ia=A&&A.bottom?A.bottom:mxUtils.getValue(this.style,"bottom",!0),Ha=A&&A.left?A.left:
-mxUtils.getValue(this.style,"left",!0),Ra=A&&A.topLeftStyle?A.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),Va=A&&A.topRightStyle?A.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),Wa=A&&A.bottomRightStyle?A.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),Ya=A&&A.bottomLeftStyle?A.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Eb=A&&A.fillColor?A.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");
+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"}]}];xa.prototype.paintVertexShape=function(c,l,x,p,v){c.translate(l,
+x);this.strictDrawShape(c,0,0,p,v)};xa.prototype.strictDrawShape=function(c,l,x,p,v,A){var B=A&&A.rectStyle?A.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),ka=A&&A.absoluteCornerSize?A.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),J=A&&A.size?A.size:Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),wa=A&&A.rectOutline?A.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),oa=A&&A.indent?
+A.indent:Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),ab=A&&A.dashed?A.dashed:mxUtils.getValue(this.style,"dashed",!1),jb=A&&A.dashPattern?A.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),gb=A&&A.relIndent?A.relIndent:Math.max(0,Math.min(50,oa)),Ea=A&&A.top?A.top:mxUtils.getValue(this.style,"top",!0),La=A&&A.right?A.right:mxUtils.getValue(this.style,"right",!0),Ia=A&&A.bottom?A.bottom:mxUtils.getValue(this.style,"bottom",!0),Ga=A&&A.left?A.left:
+mxUtils.getValue(this.style,"left",!0),Ta=A&&A.topLeftStyle?A.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),Xa=A&&A.topRightStyle?A.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),Ya=A&&A.bottomRightStyle?A.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),$a=A&&A.bottomLeftStyle?A.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Eb=A&&A.fillColor?A.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");
A&&A.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var Fb=A&&A.strokeWidth?A.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),Cb=A&&A.fillColor2?A.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),Db=A&&A.gradientColor2?A.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),Gb=A&&A.gradientDirection2?A.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Hb=A&&A.opacity?A.opacity:mxUtils.getValue(this.style,"opacity","100"),
-Ib=Math.max(0,Math.min(50,J));A=ya.prototype;c.setDashed($a);jb&&""!=jb&&c.setDashPattern(jb);c.setStrokeWidth(Fb);J=Math.min(.5*v,.5*p,J);ka||(J=Ib*Math.min(p,v)/100);J=Math.min(J,.5*Math.min(p,v));ka||(oa=Math.min(hb*Math.min(p,v)/100));oa=Math.min(oa,.5*Math.min(p,v)-J);(Ea||Ka||Ia||Ha)&&"frame"!=xa&&(c.begin(),Ea?A.moveNW(c,l,x,p,v,B,Ra,J,Ha):c.moveTo(0,0),Ea&&A.paintNW(c,l,x,p,v,B,Ra,J,Ha),A.paintTop(c,l,x,p,v,B,Va,J,Ka),Ka&&A.paintNE(c,l,x,p,v,B,Va,J,Ea),A.paintRight(c,l,x,p,v,B,Wa,J,Ia),Ia&&
-A.paintSE(c,l,x,p,v,B,Wa,J,Ka),A.paintBottom(c,l,x,p,v,B,Ya,J,Ha),Ha&&A.paintSW(c,l,x,p,v,B,Ya,J,Ia),A.paintLeft(c,l,x,p,v,B,Ra,J,Ea),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(Cb),$a=ka=Hb,"none"==Cb&&(ka=0),"none"==Db&&($a=0),c.setGradient(Cb,Db,0,0,p,v,Gb,ka,$a),c.begin(),Ea?A.moveNWInner(c,l,x,p,v,B,Ra,J,oa,Ea,Ha):c.moveTo(oa,0),A.paintLeftInner(c,l,x,p,v,B,Ya,J,oa,Ia,Ha),Ha&&Ia&&A.paintSWInner(c,l,x,p,v,B,Ya,J,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Wa,J,oa,Ka,Ia),Ia&&Ka&&A.paintSEInner(c,
-l,x,p,v,B,Wa,J,oa),A.paintRightInner(c,l,x,p,v,B,Va,J,oa,Ea,Ka),Ka&&Ea&&A.paintNEInner(c,l,x,p,v,B,Va,J,oa),A.paintTopInner(c,l,x,p,v,B,Ra,J,oa,Ha,Ea),Ea&&Ha&&A.paintNWInner(c,l,x,p,v,B,Ra,J,oa),c.fill(),"none"==Eb&&(c.begin(),A.paintFolds(c,l,x,p,v,B,Ra,Va,Wa,Ya,J,Ea,Ka,Ia,Ha),c.stroke()));Ea||Ka||Ia||!Ha?Ea||Ka||!Ia||Ha?!Ea&&!Ka&&Ia&&Ha?"frame"!=xa?(c.begin(),A.moveSE(c,l,x,p,v,B,Wa,J,Ka),A.paintBottom(c,l,x,p,v,B,Ya,J,Ha),A.paintSW(c,l,x,p,v,B,Ya,J,Ia),A.paintLeft(c,l,x,p,v,B,Ra,J,Ea),"double"==
-xa&&(A.moveNWInner(c,l,x,p,v,B,Ra,J,oa,Ea,Ha),A.paintLeftInner(c,l,x,p,v,B,Ya,J,oa,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,Ya,J,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Wa,J,oa,Ka,Ia)),c.stroke()):(c.begin(),A.moveSE(c,l,x,p,v,B,Wa,J,Ka),A.paintBottom(c,l,x,p,v,B,Ya,J,Ha),A.paintSW(c,l,x,p,v,B,Ya,J,Ia),A.paintLeft(c,l,x,p,v,B,Ra,J,Ea),A.lineNWInner(c,l,x,p,v,B,Ra,J,oa,Ea,Ha),A.paintLeftInner(c,l,x,p,v,B,Ya,J,oa,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,Ya,J,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Wa,J,oa,Ka,Ia),c.close(),
-c.fillAndStroke()):Ea||!Ka||Ia||Ha?!Ea&&Ka&&!Ia&&Ha?"frame"!=xa?(c.begin(),A.moveSW(c,l,x,p,v,B,Ra,J,Ia),A.paintLeft(c,l,x,p,v,B,Ra,J,Ea),"double"==xa&&(A.moveNWInner(c,l,x,p,v,B,Ra,J,oa,Ea,Ha),A.paintLeftInner(c,l,x,p,v,B,Ya,J,oa,Ia,Ha)),c.stroke(),c.begin(),A.moveNE(c,l,x,p,v,B,Va,J,Ea),A.paintRight(c,l,x,p,v,B,Wa,J,Ia),"double"==xa&&(A.moveSEInner(c,l,x,p,v,B,Wa,J,oa,Ia),A.paintRightInner(c,l,x,p,v,B,Va,J,oa,Ea,Ka)),c.stroke()):(c.begin(),A.moveSW(c,l,x,p,v,B,Ra,J,Ia),A.paintLeft(c,l,x,p,v,B,Ra,
-J,Ea),A.lineNWInner(c,l,x,p,v,B,Ra,J,oa,Ea,Ha),A.paintLeftInner(c,l,x,p,v,B,Ya,J,oa,Ia,Ha),c.close(),c.fillAndStroke(),c.begin(),A.moveNE(c,l,x,p,v,B,Va,J,Ea),A.paintRight(c,l,x,p,v,B,Wa,J,Ia),A.lineSEInner(c,l,x,p,v,B,Wa,J,oa,Ia),A.paintRightInner(c,l,x,p,v,B,Va,J,oa,Ea,Ka),c.close(),c.fillAndStroke()):!Ea&&Ka&&Ia&&!Ha?"frame"!=xa?(c.begin(),A.moveNE(c,l,x,p,v,B,Va,J,Ea),A.paintRight(c,l,x,p,v,B,Wa,J,Ia),A.paintSE(c,l,x,p,v,B,Wa,J,Ka),A.paintBottom(c,l,x,p,v,B,Ya,J,Ha),"double"==xa&&(A.moveSWInner(c,
-l,x,p,v,B,Ya,J,oa,Ha),A.paintBottomInner(c,l,x,p,v,B,Wa,J,oa,Ka,Ia),A.paintSEInner(c,l,x,p,v,B,Wa,J,oa),A.paintRightInner(c,l,x,p,v,B,Va,J,oa,Ea,Ka)),c.stroke()):(c.begin(),A.moveNE(c,l,x,p,v,B,Va,J,Ea),A.paintRight(c,l,x,p,v,B,Wa,J,Ia),A.paintSE(c,l,x,p,v,B,Wa,J,Ka),A.paintBottom(c,l,x,p,v,B,Ya,J,Ha),A.lineSWInner(c,l,x,p,v,B,Ya,J,oa,Ha),A.paintBottomInner(c,l,x,p,v,B,Wa,J,oa,Ka,Ia),A.paintSEInner(c,l,x,p,v,B,Wa,J,oa),A.paintRightInner(c,l,x,p,v,B,Va,J,oa,Ea,Ka),c.close(),c.fillAndStroke()):!Ea&&
-Ka&&Ia&&Ha?"frame"!=xa?(c.begin(),A.moveNE(c,l,x,p,v,B,Va,J,Ea),A.paintRight(c,l,x,p,v,B,Wa,J,Ia),A.paintSE(c,l,x,p,v,B,Wa,J,Ka),A.paintBottom(c,l,x,p,v,B,Ya,J,Ha),A.paintSW(c,l,x,p,v,B,Ya,J,Ia),A.paintLeft(c,l,x,p,v,B,Ra,J,Ea),"double"==xa&&(A.moveNWInner(c,l,x,p,v,B,Ra,J,oa,Ea,Ha),A.paintLeftInner(c,l,x,p,v,B,Ya,J,oa,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,Ya,J,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Wa,J,oa,Ka,Ia),A.paintSEInner(c,l,x,p,v,B,Wa,J,oa),A.paintRightInner(c,l,x,p,v,B,Va,J,oa,Ea,Ka)),c.stroke()):
-(c.begin(),A.moveNE(c,l,x,p,v,B,Va,J,Ea),A.paintRight(c,l,x,p,v,B,Wa,J,Ia),A.paintSE(c,l,x,p,v,B,Wa,J,Ka),A.paintBottom(c,l,x,p,v,B,Ya,J,Ha),A.paintSW(c,l,x,p,v,B,Ya,J,Ia),A.paintLeft(c,l,x,p,v,B,Ra,J,Ea),A.lineNWInner(c,l,x,p,v,B,Ra,J,oa,Ea,Ha),A.paintLeftInner(c,l,x,p,v,B,Ya,J,oa,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,Ya,J,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Wa,J,oa,Ka,Ia),A.paintSEInner(c,l,x,p,v,B,Wa,J,oa),A.paintRightInner(c,l,x,p,v,B,Va,J,oa,Ea,Ka),c.close(),c.fillAndStroke()):!Ea||Ka||Ia||Ha?
-Ea&&!Ka&&!Ia&&Ha?"frame"!=xa?(c.begin(),A.moveSW(c,l,x,p,v,B,Ya,J,Ia),A.paintLeft(c,l,x,p,v,B,Ra,J,Ea),A.paintNW(c,l,x,p,v,B,Ra,J,Ha),A.paintTop(c,l,x,p,v,B,Va,J,Ka),"double"==xa&&(A.moveNEInner(c,l,x,p,v,B,Va,J,oa,Ka),A.paintTopInner(c,l,x,p,v,B,Ra,J,oa,Ha,Ea),A.paintNWInner(c,l,x,p,v,B,Ra,J,oa),A.paintLeftInner(c,l,x,p,v,B,Ya,J,oa,Ia,Ha)),c.stroke()):(c.begin(),A.moveSW(c,l,x,p,v,B,Ya,J,Ia),A.paintLeft(c,l,x,p,v,B,Ra,J,Ea),A.paintNW(c,l,x,p,v,B,Ra,J,Ha),A.paintTop(c,l,x,p,v,B,Va,J,Ka),A.lineNEInner(c,
-l,x,p,v,B,Va,J,oa,Ka),A.paintTopInner(c,l,x,p,v,B,Ra,J,oa,Ha,Ea),A.paintNWInner(c,l,x,p,v,B,Ra,J,oa),A.paintLeftInner(c,l,x,p,v,B,Ya,J,oa,Ia,Ha),c.close(),c.fillAndStroke()):Ea&&!Ka&&Ia&&!Ha?"frame"!=xa?(c.begin(),A.moveNW(c,l,x,p,v,B,Ra,J,Ha),A.paintTop(c,l,x,p,v,B,Va,J,Ka),"double"==xa&&(A.moveNEInner(c,l,x,p,v,B,Va,J,oa,Ka),A.paintTopInner(c,l,x,p,v,B,Ra,J,oa,Ha,Ea)),c.stroke(),c.begin(),A.moveSE(c,l,x,p,v,B,Wa,J,Ka),A.paintBottom(c,l,x,p,v,B,Ya,J,Ha),"double"==xa&&(A.moveSWInner(c,l,x,p,v,B,Ya,
-J,oa,Ha),A.paintBottomInner(c,l,x,p,v,B,Wa,J,oa,Ka,Ia)),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Ra,J,Ha),A.paintTop(c,l,x,p,v,B,Va,J,Ka),A.lineNEInner(c,l,x,p,v,B,Va,J,oa,Ka),A.paintTopInner(c,l,x,p,v,B,Ra,J,oa,Ha,Ea),c.close(),c.fillAndStroke(),c.begin(),A.moveSE(c,l,x,p,v,B,Wa,J,Ka),A.paintBottom(c,l,x,p,v,B,Ya,J,Ha),A.lineSWInner(c,l,x,p,v,B,Ya,J,oa,Ha),A.paintBottomInner(c,l,x,p,v,B,Wa,J,oa,Ka,Ia),c.close(),c.fillAndStroke()):Ea&&!Ka&&Ia&&Ha?"frame"!=xa?(c.begin(),A.moveSE(c,l,x,p,v,B,Wa,
-J,Ka),A.paintBottom(c,l,x,p,v,B,Ya,J,Ha),A.paintSW(c,l,x,p,v,B,Ya,J,Ia),A.paintLeft(c,l,x,p,v,B,Ra,J,Ea),A.paintNW(c,l,x,p,v,B,Ra,J,Ha),A.paintTop(c,l,x,p,v,B,Va,J,Ka),"double"==xa&&(A.moveNEInner(c,l,x,p,v,B,Va,J,oa,Ka),A.paintTopInner(c,l,x,p,v,B,Ra,J,oa,Ha,Ea),A.paintNWInner(c,l,x,p,v,B,Ra,J,oa),A.paintLeftInner(c,l,x,p,v,B,Ya,J,oa,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,Ya,J,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Wa,J,oa,Ka,Ia)),c.stroke()):(c.begin(),A.moveSE(c,l,x,p,v,B,Wa,J,Ka),A.paintBottom(c,l,
-x,p,v,B,Ya,J,Ha),A.paintSW(c,l,x,p,v,B,Ya,J,Ia),A.paintLeft(c,l,x,p,v,B,Ra,J,Ea),A.paintNW(c,l,x,p,v,B,Ra,J,Ha),A.paintTop(c,l,x,p,v,B,Va,J,Ka),A.lineNEInner(c,l,x,p,v,B,Va,J,oa,Ka),A.paintTopInner(c,l,x,p,v,B,Ra,J,oa,Ha,Ea),A.paintNWInner(c,l,x,p,v,B,Ra,J,oa),A.paintLeftInner(c,l,x,p,v,B,Ya,J,oa,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,Ya,J,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Wa,J,oa,Ka,Ia),c.close(),c.fillAndStroke()):Ea&&Ka&&!Ia&&!Ha?"frame"!=xa?(c.begin(),A.moveNW(c,l,x,p,v,B,Ra,J,Ha),A.paintTop(c,
-l,x,p,v,B,Va,J,Ka),A.paintNE(c,l,x,p,v,B,Va,J,Ea),A.paintRight(c,l,x,p,v,B,Wa,J,Ia),"double"==xa&&(A.moveSEInner(c,l,x,p,v,B,Wa,J,oa,Ia),A.paintRightInner(c,l,x,p,v,B,Va,J,oa,Ea,Ka),A.paintNEInner(c,l,x,p,v,B,Va,J,oa),A.paintTopInner(c,l,x,p,v,B,Ra,J,oa,Ha,Ea)),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Ra,J,Ha),A.paintTop(c,l,x,p,v,B,Va,J,Ka),A.paintNE(c,l,x,p,v,B,Va,J,Ea),A.paintRight(c,l,x,p,v,B,Wa,J,Ia),A.lineSEInner(c,l,x,p,v,B,Wa,J,oa,Ia),A.paintRightInner(c,l,x,p,v,B,Va,J,oa,Ea,Ka),A.paintNEInner(c,
-l,x,p,v,B,Va,J,oa),A.paintTopInner(c,l,x,p,v,B,Ra,J,oa,Ha,Ea),c.close(),c.fillAndStroke()):Ea&&Ka&&!Ia&&Ha?"frame"!=xa?(c.begin(),A.moveSW(c,l,x,p,v,B,Ya,J,Ia),A.paintLeft(c,l,x,p,v,B,Ra,J,Ea),A.paintNW(c,l,x,p,v,B,Ra,J,Ha),A.paintTop(c,l,x,p,v,B,Va,J,Ka),A.paintNE(c,l,x,p,v,B,Va,J,Ea),A.paintRight(c,l,x,p,v,B,Wa,J,Ia),"double"==xa&&(A.moveSEInner(c,l,x,p,v,B,Wa,J,oa,Ia),A.paintRightInner(c,l,x,p,v,B,Va,J,oa,Ea,Ka),A.paintNEInner(c,l,x,p,v,B,Va,J,oa),A.paintTopInner(c,l,x,p,v,B,Ra,J,oa,Ha,Ea),A.paintNWInner(c,
-l,x,p,v,B,Ra,J,oa),A.paintLeftInner(c,l,x,p,v,B,Ya,J,oa,Ia,Ha)),c.stroke()):(c.begin(),A.moveSW(c,l,x,p,v,B,Ya,J,Ia),A.paintLeft(c,l,x,p,v,B,Ra,J,Ea),A.paintNW(c,l,x,p,v,B,Ra,J,Ha),A.paintTop(c,l,x,p,v,B,Va,J,Ka),A.paintNE(c,l,x,p,v,B,Va,J,Ea),A.paintRight(c,l,x,p,v,B,Wa,J,Ia),A.lineSEInner(c,l,x,p,v,B,Wa,J,oa,Ia),A.paintRightInner(c,l,x,p,v,B,Va,J,oa,Ea,Ka),A.paintNEInner(c,l,x,p,v,B,Va,J,oa),A.paintTopInner(c,l,x,p,v,B,Ra,J,oa,Ha,Ea),A.paintNWInner(c,l,x,p,v,B,Ra,J,oa),A.paintLeftInner(c,l,x,p,
-v,B,Ya,J,oa,Ia,Ha),c.close(),c.fillAndStroke()):Ea&&Ka&&Ia&&!Ha?"frame"!=xa?(c.begin(),A.moveNW(c,l,x,p,v,B,Ra,J,Ha),A.paintTop(c,l,x,p,v,B,Va,J,Ka),A.paintNE(c,l,x,p,v,B,Va,J,Ea),A.paintRight(c,l,x,p,v,B,Wa,J,Ia),A.paintSE(c,l,x,p,v,B,Wa,J,Ka),A.paintBottom(c,l,x,p,v,B,Ya,J,Ha),"double"==xa&&(A.moveSWInner(c,l,x,p,v,B,Ya,J,oa,Ha),A.paintBottomInner(c,l,x,p,v,B,Wa,J,oa,Ka,Ia),A.paintSEInner(c,l,x,p,v,B,Wa,J,oa),A.paintRightInner(c,l,x,p,v,B,Va,J,oa,Ea,Ka),A.paintNEInner(c,l,x,p,v,B,Va,J,oa),A.paintTopInner(c,
-l,x,p,v,B,Ra,J,oa,Ha,Ea)),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Ra,J,Ha),A.paintTop(c,l,x,p,v,B,Va,J,Ka),A.paintNE(c,l,x,p,v,B,Va,J,Ea),A.paintRight(c,l,x,p,v,B,Wa,J,Ia),A.paintSE(c,l,x,p,v,B,Wa,J,Ka),A.paintBottom(c,l,x,p,v,B,Ya,J,Ha),A.lineSWInner(c,l,x,p,v,B,Ya,J,oa,Ha),A.paintBottomInner(c,l,x,p,v,B,Wa,J,oa,Ka,Ia),A.paintSEInner(c,l,x,p,v,B,Wa,J,oa),A.paintRightInner(c,l,x,p,v,B,Va,J,oa,Ea,Ka),A.paintNEInner(c,l,x,p,v,B,Va,J,oa),A.paintTopInner(c,l,x,p,v,B,Ra,J,oa,Ha,Ea),c.close(),c.fillAndStroke()):
-Ea&&Ka&&Ia&&Ha&&("frame"!=xa?(c.begin(),A.moveNW(c,l,x,p,v,B,Ra,J,Ha),A.paintNW(c,l,x,p,v,B,Ra,J,Ha),A.paintTop(c,l,x,p,v,B,Va,J,Ka),A.paintNE(c,l,x,p,v,B,Va,J,Ea),A.paintRight(c,l,x,p,v,B,Wa,J,Ia),A.paintSE(c,l,x,p,v,B,Wa,J,Ka),A.paintBottom(c,l,x,p,v,B,Ya,J,Ha),A.paintSW(c,l,x,p,v,B,Ya,J,Ia),A.paintLeft(c,l,x,p,v,B,Ra,J,Ea),c.close(),"double"==xa&&(A.moveSWInner(c,l,x,p,v,B,Ya,J,oa,Ha),A.paintSWInner(c,l,x,p,v,B,Ya,J,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Wa,J,oa,Ka,Ia),A.paintSEInner(c,l,x,p,v,
-B,Wa,J,oa),A.paintRightInner(c,l,x,p,v,B,Va,J,oa,Ea,Ka),A.paintNEInner(c,l,x,p,v,B,Va,J,oa),A.paintTopInner(c,l,x,p,v,B,Ra,J,oa,Ha,Ea),A.paintNWInner(c,l,x,p,v,B,Ra,J,oa),A.paintLeftInner(c,l,x,p,v,B,Ya,J,oa,Ia,Ha),c.close()),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Ra,J,Ha),A.paintNW(c,l,x,p,v,B,Ra,J,Ha),A.paintTop(c,l,x,p,v,B,Va,J,Ka),A.paintNE(c,l,x,p,v,B,Va,J,Ea),A.paintRight(c,l,x,p,v,B,Wa,J,Ia),A.paintSE(c,l,x,p,v,B,Wa,J,Ka),A.paintBottom(c,l,x,p,v,B,Ya,J,Ha),A.paintSW(c,l,x,p,v,B,Ya,J,Ia),
-A.paintLeft(c,l,x,p,v,B,Ra,J,Ea),c.close(),A.moveSWInner(c,l,x,p,v,B,Ya,J,oa,Ha),A.paintSWInner(c,l,x,p,v,B,Ya,J,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Wa,J,oa,Ka,Ia),A.paintSEInner(c,l,x,p,v,B,Wa,J,oa),A.paintRightInner(c,l,x,p,v,B,Va,J,oa,Ea,Ka),A.paintNEInner(c,l,x,p,v,B,Va,J,oa),A.paintTopInner(c,l,x,p,v,B,Ra,J,oa,Ha,Ea),A.paintNWInner(c,l,x,p,v,B,Ra,J,oa),A.paintLeftInner(c,l,x,p,v,B,Ya,J,oa,Ia,Ha),c.close(),c.fillAndStroke())):"frame"!=xa?(c.begin(),A.moveNW(c,l,x,p,v,B,Ra,J,Ha),A.paintTop(c,
-l,x,p,v,B,Va,J,Ka),"double"==xa&&(A.moveNEInner(c,l,x,p,v,B,Va,J,oa,Ka),A.paintTopInner(c,l,x,p,v,B,Ra,J,oa,Ha,Ea)),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Ra,J,Ha),A.paintTop(c,l,x,p,v,B,Va,J,Ka),A.lineNEInner(c,l,x,p,v,B,Va,J,oa,Ka),A.paintTopInner(c,l,x,p,v,B,Ra,J,oa,Ha,Ea),c.close(),c.fillAndStroke()):"frame"!=xa?(c.begin(),A.moveNE(c,l,x,p,v,B,Va,J,Ea),A.paintRight(c,l,x,p,v,B,Wa,J,Ia),"double"==xa&&(A.moveSEInner(c,l,x,p,v,B,Wa,J,oa,Ia),A.paintRightInner(c,l,x,p,v,B,Va,J,oa,Ea,Ka)),c.stroke()):
-(c.begin(),A.moveNE(c,l,x,p,v,B,Va,J,Ea),A.paintRight(c,l,x,p,v,B,Wa,J,Ia),A.lineSEInner(c,l,x,p,v,B,Wa,J,oa,Ia),A.paintRightInner(c,l,x,p,v,B,Va,J,oa,Ea,Ka),c.close(),c.fillAndStroke()):"frame"!=xa?(c.begin(),A.moveSE(c,l,x,p,v,B,Wa,J,Ka),A.paintBottom(c,l,x,p,v,B,Ya,J,Ha),"double"==xa&&(A.moveSWInner(c,l,x,p,v,B,Ya,J,oa,Ha),A.paintBottomInner(c,l,x,p,v,B,Wa,J,oa,Ka,Ia)),c.stroke()):(c.begin(),A.moveSE(c,l,x,p,v,B,Wa,J,Ka),A.paintBottom(c,l,x,p,v,B,Ya,J,Ha),A.lineSWInner(c,l,x,p,v,B,Ya,J,oa,Ha),
-A.paintBottomInner(c,l,x,p,v,B,Wa,J,oa,Ka,Ia),c.close(),c.fillAndStroke()):"frame"!=xa?(c.begin(),A.moveSW(c,l,x,p,v,B,Ra,J,Ia),A.paintLeft(c,l,x,p,v,B,Ra,J,Ea),"double"==xa&&(A.moveNWInner(c,l,x,p,v,B,Ra,J,oa,Ea,Ha),A.paintLeftInner(c,l,x,p,v,B,Ya,J,oa,Ia,Ha)),c.stroke()):(c.begin(),A.moveSW(c,l,x,p,v,B,Ra,J,Ia),A.paintLeft(c,l,x,p,v,B,Ra,J,Ea),A.lineNWInner(c,l,x,p,v,B,Ra,J,oa,Ea,Ha),A.paintLeftInner(c,l,x,p,v,B,Ya,J,oa,Ia,Ha),c.close(),c.fillAndStroke());c.begin();A.paintFolds(c,l,x,p,v,B,Ra,Va,
-Wa,Ya,J,Ea,Ka,Ia,Ha);c.stroke()};ya.prototype.moveNW=function(c,l,x,p,v,A,B,ka,J){"square"==B||"default"==B&&"square"==A||!J?c.moveTo(0,0):c.moveTo(0,ka)};ya.prototype.moveNE=function(c,l,x,p,v,A,B,ka,J){"square"==B||"default"==B&&"square"==A||!J?c.moveTo(p,0):c.moveTo(p-ka,0)};ya.prototype.moveSE=function(c,l,x,p,v,A,B,ka,J){"square"==B||"default"==B&&"square"==A||!J?c.moveTo(p,v):c.moveTo(p,v-ka)};ya.prototype.moveSW=function(c,l,x,p,v,A,B,ka,J){"square"==B||"default"==B&&"square"==A||!J?c.moveTo(0,
-v):c.moveTo(ka,v)};ya.prototype.paintNW=function(c,l,x,p,v,A,B,ka,J){if(J)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ka,ka,0,0,l,ka,0)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(ka,0);else c.lineTo(0,0)};ya.prototype.paintTop=function(c,l,x,p,v,A,B,ka,J){"square"==B||"default"==B&&"square"==A||!J?c.lineTo(p,0):c.lineTo(p-ka,0)};ya.prototype.paintNE=
-function(c,l,x,p,v,A,B,ka,J){if(J)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ka,ka,0,0,l,p,ka)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p,ka);else c.lineTo(p,0)};ya.prototype.paintRight=function(c,l,x,p,v,A,B,ka,J){"square"==B||"default"==B&&"square"==A||!J?c.lineTo(p,v):c.lineTo(p,v-ka)};ya.prototype.paintLeft=function(c,l,x,p,v,A,B,ka,J){"square"==
-B||"default"==B&&"square"==A||!J?c.lineTo(0,0):c.lineTo(0,ka)};ya.prototype.paintSE=function(c,l,x,p,v,A,B,ka,J){if(J)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ka,ka,0,0,l,p-ka,v)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-ka,v);else c.lineTo(p,v)};ya.prototype.paintBottom=function(c,l,x,p,v,A,B,ka,J){"square"==B||"default"==B&&"square"==A||!J?c.lineTo(0,
-v):c.lineTo(ka,v)};ya.prototype.paintSW=function(c,l,x,p,v,A,B,ka,J){if(J)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ka,ka,0,0,l,0,v-ka)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(0,v-ka);else c.lineTo(0,v)};ya.prototype.paintNWInner=function(c,l,x,p,v,A,B,ka,J){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ka-.5*J,ka-.5*J,0,0,0,J,.5*J+ka);else if("invRound"==
-B||"default"==B&&"invRound"==A)c.arcTo(ka+J,ka+J,0,0,1,J,J+ka);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(J,.5*J+ka);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(J+ka,J+ka),c.lineTo(J,J+ka)};ya.prototype.paintTopInner=function(c,l,x,p,v,A,B,ka,J,xa,oa){xa||oa?!xa&&oa?c.lineTo(0,J):xa&&!oa?c.lineTo(J,0):xa?"square"==B||"default"==B&&"square"==A?c.lineTo(J,J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(ka+.5*J,J):c.lineTo(ka+J,J):c.lineTo(0,
-J):c.lineTo(0,0)};ya.prototype.paintNEInner=function(c,l,x,p,v,A,B,ka,J){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ka-.5*J,ka-.5*J,0,0,0,p-ka-.5*J,J);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(ka+J,ka+J,0,0,1,p-ka-J,J);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(p-ka-.5*J,J);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(p-ka-J,ka+J),c.lineTo(p-ka-J,J)};ya.prototype.paintRightInner=function(c,l,x,p,v,A,B,ka,J,xa,oa){xa||oa?!xa&&oa?c.lineTo(p-J,0):xa&&!oa?c.lineTo(p,
-J):xa?"square"==B||"default"==B&&"square"==A?c.lineTo(p-J,J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-J,ka+.5*J):c.lineTo(p-J,ka+J):c.lineTo(p-J,0):c.lineTo(p,0)};ya.prototype.paintLeftInner=function(c,l,x,p,v,A,B,ka,J,xa,oa){xa||oa?!xa&&oa?c.lineTo(J,v):xa&&!oa?c.lineTo(0,v-J):xa?"square"==B||"default"==B&&"square"==A?c.lineTo(J,v-J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(J,v-ka-.5*J):c.lineTo(J,v-ka-J):
-c.lineTo(J,v):c.lineTo(0,v)};ya.prototype.paintSEInner=function(c,l,x,p,v,A,B,ka,J){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ka-.5*J,ka-.5*J,0,0,0,p-J,v-ka-.5*J);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(ka+J,ka+J,0,0,1,p-J,v-ka-J);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(p-J,v-ka-.5*J);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(p-ka-J,v-ka-J),c.lineTo(p-J,v-ka-J)};ya.prototype.paintBottomInner=function(c,l,x,p,v,A,B,ka,J,xa,oa){xa||oa?!xa&&oa?c.lineTo(p,
-v-J):xa&&!oa?c.lineTo(p-J,v):"square"==B||"default"==B&&"square"==A||!xa?c.lineTo(p-J,v-J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-ka-.5*J,v-J):c.lineTo(p-ka-J,v-J):c.lineTo(p,v)};ya.prototype.paintSWInner=function(c,l,x,p,v,A,B,ka,J,xa){if(!xa)c.lineTo(J,v);else if("square"==B||"default"==B&&"square"==A)c.lineTo(J,v-J);else if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ka-.5*J,ka-.5*J,0,0,0,ka+.5*J,v-J);else if("invRound"==B||"default"==B&&"invRound"==
-A)c.arcTo(ka+J,ka+J,0,0,1,ka+J,v-J);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(ka+.5*J,v-J);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(J+ka,v-ka-J),c.lineTo(J+ka,v-J)};ya.prototype.moveSWInner=function(c,l,x,p,v,A,B,ka,J,xa){xa?"square"==B||"default"==B&&"square"==A?c.moveTo(J,v-J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(J,v-ka-.5*J):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(J,v-ka-J):
-c.moveTo(0,v-J)};ya.prototype.lineSWInner=function(c,l,x,p,v,A,B,ka,J,xa){xa?"square"==B||"default"==B&&"square"==A?c.lineTo(J,v-J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(J,v-ka-.5*J):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(J,v-ka-J):c.lineTo(0,v-J)};ya.prototype.moveSEInner=function(c,l,x,p,v,A,B,ka,J,xa){xa?"square"==B||"default"==B&&"square"==A?c.moveTo(p-J,v-J):"rounded"==B||"default"==B&&"rounded"==
-A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(p-J,v-ka-.5*J):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(p-J,v-ka-J):c.moveTo(p-J,v)};ya.prototype.lineSEInner=function(c,l,x,p,v,A,B,ka,J,xa){xa?"square"==B||"default"==B&&"square"==A?c.lineTo(p-J,v-J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-J,v-ka-.5*J):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-J,v-ka-J):
-c.lineTo(p-J,v)};ya.prototype.moveNEInner=function(c,l,x,p,v,A,B,ka,J,xa){xa?"square"==B||"default"==B&&"square"==A||xa?c.moveTo(p-J,J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(p-J,ka+.5*J):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(p-J,ka+J):c.moveTo(p,J)};ya.prototype.lineNEInner=function(c,l,x,p,v,A,B,ka,J,xa){xa?"square"==B||"default"==B&&"square"==A||xa?c.lineTo(p-J,J):"rounded"==B||"default"==B&&"rounded"==
-A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-J,ka+.5*J):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-J,ka+J):c.lineTo(p,J)};ya.prototype.moveNWInner=function(c,l,x,p,v,A,B,ka,J,xa,oa){xa||oa?!xa&&oa?c.moveTo(J,0):xa&&!oa?c.moveTo(0,J):"square"==B||"default"==B&&"square"==A?c.moveTo(J,J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(J,ka+.5*J):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==
-B&&"fold"==A)&&c.moveTo(J,ka+J):c.moveTo(0,0)};ya.prototype.lineNWInner=function(c,l,x,p,v,A,B,ka,J,xa,oa){xa||oa?!xa&&oa?c.lineTo(J,0):xa&&!oa?c.lineTo(0,J):"square"==B||"default"==B&&"square"==A?c.lineTo(J,J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(J,ka+.5*J):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(J,ka+J):c.lineTo(0,0)};ya.prototype.paintFolds=function(c,l,x,p,v,A,B,ka,J,xa,oa,$a,jb,hb,Ea){if("fold"==
-A||"fold"==B||"fold"==ka||"fold"==J||"fold"==xa)("fold"==B||"default"==B&&"fold"==A)&&$a&&Ea&&(c.moveTo(0,oa),c.lineTo(oa,oa),c.lineTo(oa,0)),("fold"==ka||"default"==ka&&"fold"==A)&&$a&&jb&&(c.moveTo(p-oa,0),c.lineTo(p-oa,oa),c.lineTo(p,oa)),("fold"==J||"default"==J&&"fold"==A)&&hb&&jb&&(c.moveTo(p-oa,v),c.lineTo(p-oa,v-oa),c.lineTo(p,v-oa)),("fold"==xa||"default"==xa&&"fold"==A)&&hb&&Ea&&(c.moveTo(0,v-oa),c.lineTo(oa,v-oa),c.lineTo(oa,v))};mxCellRenderer.registerShape(ya.prototype.cst.RECT2,ya);
-ya.prototype.constraints=null;mxUtils.extend(Na,mxConnector);Na.prototype.origPaintEdgeShape=Na.prototype.paintEdgeShape;Na.prototype.paintEdgeShape=function(c,l,x){for(var p=[],v=0;v<l.length;v++)p.push(mxUtils.clone(l[v]));v=c.state.dashed;var A=c.state.fixDash;Na.prototype.origPaintEdgeShape.apply(this,[c,p,x]);3<=c.state.strokeWidth&&(p=mxUtils.getValue(this.style,"fillColor",null),null!=p&&(c.setStrokeColor(p),c.setStrokeWidth(c.state.strokeWidth-2),c.setDashed(v,A),Na.prototype.origPaintEdgeShape.apply(this,
-[c,l,x])))};mxCellRenderer.registerShape("filledEdge",Na);"undefined"!==typeof StyleFormatPanel&&function(){var c=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var l=this.editorUi.getSelectionState(),x=c.apply(this,arguments);"umlFrame"==l.style.shape&&x.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return x}}();mxMarker.addMarker("dash",function(c,l,x,p,v,A,B,ka,J,xa){var oa=v*(B+J+1),$a=A*(B+J+1);return function(){c.begin();
-c.moveTo(p.x-oa/2-$a/2,p.y-$a/2+oa/2);c.lineTo(p.x+$a/2-3*oa/2,p.y-3*$a/2-oa/2);c.stroke()}});mxMarker.addMarker("box",function(c,l,x,p,v,A,B,ka,J,xa){var oa=v*(B+J+1),$a=A*(B+J+1),jb=p.x+oa/2,hb=p.y+$a/2;p.x-=oa;p.y-=$a;return function(){c.begin();c.moveTo(jb-oa/2-$a/2,hb-$a/2+oa/2);c.lineTo(jb-oa/2+$a/2,hb-$a/2-oa/2);c.lineTo(jb+$a/2-3*oa/2,hb-3*$a/2-oa/2);c.lineTo(jb-$a/2-3*oa/2,hb-3*$a/2+oa/2);c.close();xa?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("cross",function(c,l,x,p,v,A,B,ka,J,
-xa){var oa=v*(B+J+1),$a=A*(B+J+1);return function(){c.begin();c.moveTo(p.x-oa/2-$a/2,p.y-$a/2+oa/2);c.lineTo(p.x+$a/2-3*oa/2,p.y-3*$a/2-oa/2);c.moveTo(p.x-oa/2+$a/2,p.y-$a/2-oa/2);c.lineTo(p.x-$a/2-3*oa/2,p.y-3*$a/2+oa/2);c.stroke()}});mxMarker.addMarker("circle",Ja);mxMarker.addMarker("circlePlus",function(c,l,x,p,v,A,B,ka,J,xa){var oa=p.clone(),$a=Ja.apply(this,arguments),jb=v*(B+2*J),hb=A*(B+2*J);return function(){$a.apply(this,arguments);c.begin();c.moveTo(oa.x-v*J,oa.y-A*J);c.lineTo(oa.x-2*jb+
-v*J,oa.y-2*hb+A*J);c.moveTo(oa.x-jb-hb+A*J,oa.y-hb+jb-v*J);c.lineTo(oa.x+hb-jb-A*J,oa.y-hb-jb+v*J);c.stroke()}});mxMarker.addMarker("halfCircle",function(c,l,x,p,v,A,B,ka,J,xa){var oa=v*(B+J+1),$a=A*(B+J+1),jb=p.clone();p.x-=oa;p.y-=$a;return function(){c.begin();c.moveTo(jb.x-$a,jb.y+oa);c.quadTo(p.x-$a,p.y+oa,p.x,p.y);c.quadTo(p.x+$a,p.y-oa,jb.x+$a,jb.y-oa);c.stroke()}});mxMarker.addMarker("async",function(c,l,x,p,v,A,B,ka,J,xa){l=v*J*1.118;x=A*J*1.118;v*=B+J;A*=B+J;var oa=p.clone();oa.x-=l;oa.y-=
-x;p.x+=-v-l;p.y+=-A-x;return function(){c.begin();c.moveTo(oa.x,oa.y);ka?c.lineTo(oa.x-v-A/2,oa.y-A+v/2):c.lineTo(oa.x+A/2-v,oa.y-A-v/2);c.lineTo(oa.x-v,oa.y-A);c.close();xa?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("openAsync",function(c){c=null!=c?c:2;return function(l,x,p,v,A,B,ka,J,xa,oa){A*=ka+xa;B*=ka+xa;var $a=v.clone();return function(){l.begin();l.moveTo($a.x,$a.y);J?l.lineTo($a.x-A-B/c,$a.y-B+A/c):l.lineTo($a.x+B/c-A,$a.y-B-A/c);l.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var kb=
-function(c,l,x){return ib(c,["width"],l,function(p,v,A,B,ka){ka=c.shape.getEdgeWidth()*c.view.scale+x;return new mxPoint(B.x+v*p/4+A*ka/2,B.y+A*p/4-v*ka/2)},function(p,v,A,B,ka,J){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ka.x,ka.y,J.x,J.y));c.style.width=Math.round(2*p)/c.view.scale-x})},ib=function(c,l,x,p,v){return gb(c,l,function(A){var B=c.absolutePoints,ka=B.length-1;A=c.view.translate;var J=c.view.scale,xa=x?B[0]:B[ka];B=x?B[1]:B[ka-1];ka=B.x-xa.x;var oa=B.y-xa.y,$a=Math.sqrt(ka*ka+oa*oa);xa=
-p.call(this,$a,ka/$a,oa/$a,xa,B);return new mxPoint(xa.x/J-A.x,xa.y/J-A.y)},function(A,B,ka){var J=c.absolutePoints,xa=J.length-1;A=c.view.translate;var oa=c.view.scale,$a=x?J[0]:J[xa];J=x?J[1]:J[xa-1];xa=J.x-$a.x;var jb=J.y-$a.y,hb=Math.sqrt(xa*xa+jb*jb);B.x=(B.x+A.x)*oa;B.y=(B.y+A.y)*oa;v.call(this,hb,xa/hb,jb/hb,$a,J,B,ka)})},ob=function(c){return function(l){return[gb(l,["arrowWidth","arrowSize"],function(x){var p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",bb.prototype.arrowWidth))),
-v=Math.max(0,Math.min(c,mxUtils.getValue(this.state.style,"arrowSize",bb.prototype.arrowSize)));return new mxPoint(x.x+(1-v)*x.width,x.y+(1-p)*x.height/2)},function(x,p){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(x.y+x.height/2-p.y)/x.height*2));this.state.style.arrowSize=Math.max(0,Math.min(c,(x.x+x.width-p.x)/x.width))})]}},vb=function(c){return function(l){return[gb(l,["size"],function(x){var p=Math.max(0,Math.min(.5*x.height,parseFloat(mxUtils.getValue(this.state.style,"size",
-c))));return new mxPoint(x.x,x.y+p)},function(x,p){this.state.style.size=Math.max(0,p.y-x.y)},!0)]}},nb=function(c,l,x){return function(p){var v=[gb(p,["size"],function(A){var B=Math.max(0,Math.min(A.width,Math.min(A.height,parseFloat(mxUtils.getValue(this.state.style,"size",l)))))*c;return new mxPoint(A.x+B,A.y+B)},function(A,B){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(A.width,B.x-A.x),Math.min(A.height,B.y-A.y)))/c)},!1)];x&&mxUtils.getValue(p.style,mxConstants.STYLE_ROUNDED,
-!1)&&v.push(pb(p));return v}},Bb=function(c,l,x,p,v){x=null!=x?x:.5;return function(A){var B=[gb(A,["size"],function(ka){var J=null!=v?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,xa=parseFloat(mxUtils.getValue(this.state.style,"size",J?v:c));return new mxPoint(ka.x+Math.max(0,Math.min(.5*ka.width,xa*(J?1:ka.width))),ka.getCenterY())},function(ka,J,xa){ka=null!=v&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?J.x-ka.x:Math.max(0,Math.min(x,(J.x-ka.x)/ka.width));this.state.style.size=
-ka},!1,p)];l&&mxUtils.getValue(A.style,mxConstants.STYLE_ROUNDED,!1)&&B.push(pb(A));return B}},yb=function(c,l,x){c=null!=c?c:.5;return function(p){var v=[gb(p,["size"],function(A){var B=null!=x?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,ka=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",B?x:l)));return new mxPoint(A.x+Math.min(.75*A.width*c,ka*(B?.75:.75*A.width)),A.y+A.height/4)},function(A,B){A=null!=x&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?B.x-
-A.x:Math.max(0,Math.min(c,(B.x-A.x)/A.width*.75));this.state.style.size=A},!1,!0)];mxUtils.getValue(p.style,mxConstants.STYLE_ROUNDED,!1)&&v.push(pb(p));return v}},mb=function(){return function(c){var l=[];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(pb(c));return l}},pb=function(c,l){return gb(c,[mxConstants.STYLE_ARCSIZE],function(x){var p=null!=l?l:x.height/8;if("1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var v=mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,
+Ib=Math.max(0,Math.min(50,J));A=xa.prototype;c.setDashed(ab);jb&&""!=jb&&c.setDashPattern(jb);c.setStrokeWidth(Fb);J=Math.min(.5*v,.5*p,J);ka||(J=Ib*Math.min(p,v)/100);J=Math.min(J,.5*Math.min(p,v));ka||(oa=Math.min(gb*Math.min(p,v)/100));oa=Math.min(oa,.5*Math.min(p,v)-J);(Ea||La||Ia||Ga)&&"frame"!=wa&&(c.begin(),Ea?A.moveNW(c,l,x,p,v,B,Ta,J,Ga):c.moveTo(0,0),Ea&&A.paintNW(c,l,x,p,v,B,Ta,J,Ga),A.paintTop(c,l,x,p,v,B,Xa,J,La),La&&A.paintNE(c,l,x,p,v,B,Xa,J,Ea),A.paintRight(c,l,x,p,v,B,Ya,J,Ia),Ia&&
+A.paintSE(c,l,x,p,v,B,Ya,J,La),A.paintBottom(c,l,x,p,v,B,$a,J,Ga),Ga&&A.paintSW(c,l,x,p,v,B,$a,J,Ia),A.paintLeft(c,l,x,p,v,B,Ta,J,Ea),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(Cb),ab=ka=Hb,"none"==Cb&&(ka=0),"none"==Db&&(ab=0),c.setGradient(Cb,Db,0,0,p,v,Gb,ka,ab),c.begin(),Ea?A.moveNWInner(c,l,x,p,v,B,Ta,J,oa,Ea,Ga):c.moveTo(oa,0),A.paintLeftInner(c,l,x,p,v,B,$a,J,oa,Ia,Ga),Ga&&Ia&&A.paintSWInner(c,l,x,p,v,B,$a,J,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Ya,J,oa,La,Ia),Ia&&La&&A.paintSEInner(c,
+l,x,p,v,B,Ya,J,oa),A.paintRightInner(c,l,x,p,v,B,Xa,J,oa,Ea,La),La&&Ea&&A.paintNEInner(c,l,x,p,v,B,Xa,J,oa),A.paintTopInner(c,l,x,p,v,B,Ta,J,oa,Ga,Ea),Ea&&Ga&&A.paintNWInner(c,l,x,p,v,B,Ta,J,oa),c.fill(),"none"==Eb&&(c.begin(),A.paintFolds(c,l,x,p,v,B,Ta,Xa,Ya,$a,J,Ea,La,Ia,Ga),c.stroke()));Ea||La||Ia||!Ga?Ea||La||!Ia||Ga?!Ea&&!La&&Ia&&Ga?"frame"!=wa?(c.begin(),A.moveSE(c,l,x,p,v,B,Ya,J,La),A.paintBottom(c,l,x,p,v,B,$a,J,Ga),A.paintSW(c,l,x,p,v,B,$a,J,Ia),A.paintLeft(c,l,x,p,v,B,Ta,J,Ea),"double"==
+wa&&(A.moveNWInner(c,l,x,p,v,B,Ta,J,oa,Ea,Ga),A.paintLeftInner(c,l,x,p,v,B,$a,J,oa,Ia,Ga),A.paintSWInner(c,l,x,p,v,B,$a,J,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Ya,J,oa,La,Ia)),c.stroke()):(c.begin(),A.moveSE(c,l,x,p,v,B,Ya,J,La),A.paintBottom(c,l,x,p,v,B,$a,J,Ga),A.paintSW(c,l,x,p,v,B,$a,J,Ia),A.paintLeft(c,l,x,p,v,B,Ta,J,Ea),A.lineNWInner(c,l,x,p,v,B,Ta,J,oa,Ea,Ga),A.paintLeftInner(c,l,x,p,v,B,$a,J,oa,Ia,Ga),A.paintSWInner(c,l,x,p,v,B,$a,J,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Ya,J,oa,La,Ia),c.close(),
+c.fillAndStroke()):Ea||!La||Ia||Ga?!Ea&&La&&!Ia&&Ga?"frame"!=wa?(c.begin(),A.moveSW(c,l,x,p,v,B,Ta,J,Ia),A.paintLeft(c,l,x,p,v,B,Ta,J,Ea),"double"==wa&&(A.moveNWInner(c,l,x,p,v,B,Ta,J,oa,Ea,Ga),A.paintLeftInner(c,l,x,p,v,B,$a,J,oa,Ia,Ga)),c.stroke(),c.begin(),A.moveNE(c,l,x,p,v,B,Xa,J,Ea),A.paintRight(c,l,x,p,v,B,Ya,J,Ia),"double"==wa&&(A.moveSEInner(c,l,x,p,v,B,Ya,J,oa,Ia),A.paintRightInner(c,l,x,p,v,B,Xa,J,oa,Ea,La)),c.stroke()):(c.begin(),A.moveSW(c,l,x,p,v,B,Ta,J,Ia),A.paintLeft(c,l,x,p,v,B,Ta,
+J,Ea),A.lineNWInner(c,l,x,p,v,B,Ta,J,oa,Ea,Ga),A.paintLeftInner(c,l,x,p,v,B,$a,J,oa,Ia,Ga),c.close(),c.fillAndStroke(),c.begin(),A.moveNE(c,l,x,p,v,B,Xa,J,Ea),A.paintRight(c,l,x,p,v,B,Ya,J,Ia),A.lineSEInner(c,l,x,p,v,B,Ya,J,oa,Ia),A.paintRightInner(c,l,x,p,v,B,Xa,J,oa,Ea,La),c.close(),c.fillAndStroke()):!Ea&&La&&Ia&&!Ga?"frame"!=wa?(c.begin(),A.moveNE(c,l,x,p,v,B,Xa,J,Ea),A.paintRight(c,l,x,p,v,B,Ya,J,Ia),A.paintSE(c,l,x,p,v,B,Ya,J,La),A.paintBottom(c,l,x,p,v,B,$a,J,Ga),"double"==wa&&(A.moveSWInner(c,
+l,x,p,v,B,$a,J,oa,Ga),A.paintBottomInner(c,l,x,p,v,B,Ya,J,oa,La,Ia),A.paintSEInner(c,l,x,p,v,B,Ya,J,oa),A.paintRightInner(c,l,x,p,v,B,Xa,J,oa,Ea,La)),c.stroke()):(c.begin(),A.moveNE(c,l,x,p,v,B,Xa,J,Ea),A.paintRight(c,l,x,p,v,B,Ya,J,Ia),A.paintSE(c,l,x,p,v,B,Ya,J,La),A.paintBottom(c,l,x,p,v,B,$a,J,Ga),A.lineSWInner(c,l,x,p,v,B,$a,J,oa,Ga),A.paintBottomInner(c,l,x,p,v,B,Ya,J,oa,La,Ia),A.paintSEInner(c,l,x,p,v,B,Ya,J,oa),A.paintRightInner(c,l,x,p,v,B,Xa,J,oa,Ea,La),c.close(),c.fillAndStroke()):!Ea&&
+La&&Ia&&Ga?"frame"!=wa?(c.begin(),A.moveNE(c,l,x,p,v,B,Xa,J,Ea),A.paintRight(c,l,x,p,v,B,Ya,J,Ia),A.paintSE(c,l,x,p,v,B,Ya,J,La),A.paintBottom(c,l,x,p,v,B,$a,J,Ga),A.paintSW(c,l,x,p,v,B,$a,J,Ia),A.paintLeft(c,l,x,p,v,B,Ta,J,Ea),"double"==wa&&(A.moveNWInner(c,l,x,p,v,B,Ta,J,oa,Ea,Ga),A.paintLeftInner(c,l,x,p,v,B,$a,J,oa,Ia,Ga),A.paintSWInner(c,l,x,p,v,B,$a,J,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Ya,J,oa,La,Ia),A.paintSEInner(c,l,x,p,v,B,Ya,J,oa),A.paintRightInner(c,l,x,p,v,B,Xa,J,oa,Ea,La)),c.stroke()):
+(c.begin(),A.moveNE(c,l,x,p,v,B,Xa,J,Ea),A.paintRight(c,l,x,p,v,B,Ya,J,Ia),A.paintSE(c,l,x,p,v,B,Ya,J,La),A.paintBottom(c,l,x,p,v,B,$a,J,Ga),A.paintSW(c,l,x,p,v,B,$a,J,Ia),A.paintLeft(c,l,x,p,v,B,Ta,J,Ea),A.lineNWInner(c,l,x,p,v,B,Ta,J,oa,Ea,Ga),A.paintLeftInner(c,l,x,p,v,B,$a,J,oa,Ia,Ga),A.paintSWInner(c,l,x,p,v,B,$a,J,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Ya,J,oa,La,Ia),A.paintSEInner(c,l,x,p,v,B,Ya,J,oa),A.paintRightInner(c,l,x,p,v,B,Xa,J,oa,Ea,La),c.close(),c.fillAndStroke()):!Ea||La||Ia||Ga?
+Ea&&!La&&!Ia&&Ga?"frame"!=wa?(c.begin(),A.moveSW(c,l,x,p,v,B,$a,J,Ia),A.paintLeft(c,l,x,p,v,B,Ta,J,Ea),A.paintNW(c,l,x,p,v,B,Ta,J,Ga),A.paintTop(c,l,x,p,v,B,Xa,J,La),"double"==wa&&(A.moveNEInner(c,l,x,p,v,B,Xa,J,oa,La),A.paintTopInner(c,l,x,p,v,B,Ta,J,oa,Ga,Ea),A.paintNWInner(c,l,x,p,v,B,Ta,J,oa),A.paintLeftInner(c,l,x,p,v,B,$a,J,oa,Ia,Ga)),c.stroke()):(c.begin(),A.moveSW(c,l,x,p,v,B,$a,J,Ia),A.paintLeft(c,l,x,p,v,B,Ta,J,Ea),A.paintNW(c,l,x,p,v,B,Ta,J,Ga),A.paintTop(c,l,x,p,v,B,Xa,J,La),A.lineNEInner(c,
+l,x,p,v,B,Xa,J,oa,La),A.paintTopInner(c,l,x,p,v,B,Ta,J,oa,Ga,Ea),A.paintNWInner(c,l,x,p,v,B,Ta,J,oa),A.paintLeftInner(c,l,x,p,v,B,$a,J,oa,Ia,Ga),c.close(),c.fillAndStroke()):Ea&&!La&&Ia&&!Ga?"frame"!=wa?(c.begin(),A.moveNW(c,l,x,p,v,B,Ta,J,Ga),A.paintTop(c,l,x,p,v,B,Xa,J,La),"double"==wa&&(A.moveNEInner(c,l,x,p,v,B,Xa,J,oa,La),A.paintTopInner(c,l,x,p,v,B,Ta,J,oa,Ga,Ea)),c.stroke(),c.begin(),A.moveSE(c,l,x,p,v,B,Ya,J,La),A.paintBottom(c,l,x,p,v,B,$a,J,Ga),"double"==wa&&(A.moveSWInner(c,l,x,p,v,B,$a,
+J,oa,Ga),A.paintBottomInner(c,l,x,p,v,B,Ya,J,oa,La,Ia)),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Ta,J,Ga),A.paintTop(c,l,x,p,v,B,Xa,J,La),A.lineNEInner(c,l,x,p,v,B,Xa,J,oa,La),A.paintTopInner(c,l,x,p,v,B,Ta,J,oa,Ga,Ea),c.close(),c.fillAndStroke(),c.begin(),A.moveSE(c,l,x,p,v,B,Ya,J,La),A.paintBottom(c,l,x,p,v,B,$a,J,Ga),A.lineSWInner(c,l,x,p,v,B,$a,J,oa,Ga),A.paintBottomInner(c,l,x,p,v,B,Ya,J,oa,La,Ia),c.close(),c.fillAndStroke()):Ea&&!La&&Ia&&Ga?"frame"!=wa?(c.begin(),A.moveSE(c,l,x,p,v,B,Ya,
+J,La),A.paintBottom(c,l,x,p,v,B,$a,J,Ga),A.paintSW(c,l,x,p,v,B,$a,J,Ia),A.paintLeft(c,l,x,p,v,B,Ta,J,Ea),A.paintNW(c,l,x,p,v,B,Ta,J,Ga),A.paintTop(c,l,x,p,v,B,Xa,J,La),"double"==wa&&(A.moveNEInner(c,l,x,p,v,B,Xa,J,oa,La),A.paintTopInner(c,l,x,p,v,B,Ta,J,oa,Ga,Ea),A.paintNWInner(c,l,x,p,v,B,Ta,J,oa),A.paintLeftInner(c,l,x,p,v,B,$a,J,oa,Ia,Ga),A.paintSWInner(c,l,x,p,v,B,$a,J,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Ya,J,oa,La,Ia)),c.stroke()):(c.begin(),A.moveSE(c,l,x,p,v,B,Ya,J,La),A.paintBottom(c,l,
+x,p,v,B,$a,J,Ga),A.paintSW(c,l,x,p,v,B,$a,J,Ia),A.paintLeft(c,l,x,p,v,B,Ta,J,Ea),A.paintNW(c,l,x,p,v,B,Ta,J,Ga),A.paintTop(c,l,x,p,v,B,Xa,J,La),A.lineNEInner(c,l,x,p,v,B,Xa,J,oa,La),A.paintTopInner(c,l,x,p,v,B,Ta,J,oa,Ga,Ea),A.paintNWInner(c,l,x,p,v,B,Ta,J,oa),A.paintLeftInner(c,l,x,p,v,B,$a,J,oa,Ia,Ga),A.paintSWInner(c,l,x,p,v,B,$a,J,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Ya,J,oa,La,Ia),c.close(),c.fillAndStroke()):Ea&&La&&!Ia&&!Ga?"frame"!=wa?(c.begin(),A.moveNW(c,l,x,p,v,B,Ta,J,Ga),A.paintTop(c,
+l,x,p,v,B,Xa,J,La),A.paintNE(c,l,x,p,v,B,Xa,J,Ea),A.paintRight(c,l,x,p,v,B,Ya,J,Ia),"double"==wa&&(A.moveSEInner(c,l,x,p,v,B,Ya,J,oa,Ia),A.paintRightInner(c,l,x,p,v,B,Xa,J,oa,Ea,La),A.paintNEInner(c,l,x,p,v,B,Xa,J,oa),A.paintTopInner(c,l,x,p,v,B,Ta,J,oa,Ga,Ea)),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Ta,J,Ga),A.paintTop(c,l,x,p,v,B,Xa,J,La),A.paintNE(c,l,x,p,v,B,Xa,J,Ea),A.paintRight(c,l,x,p,v,B,Ya,J,Ia),A.lineSEInner(c,l,x,p,v,B,Ya,J,oa,Ia),A.paintRightInner(c,l,x,p,v,B,Xa,J,oa,Ea,La),A.paintNEInner(c,
+l,x,p,v,B,Xa,J,oa),A.paintTopInner(c,l,x,p,v,B,Ta,J,oa,Ga,Ea),c.close(),c.fillAndStroke()):Ea&&La&&!Ia&&Ga?"frame"!=wa?(c.begin(),A.moveSW(c,l,x,p,v,B,$a,J,Ia),A.paintLeft(c,l,x,p,v,B,Ta,J,Ea),A.paintNW(c,l,x,p,v,B,Ta,J,Ga),A.paintTop(c,l,x,p,v,B,Xa,J,La),A.paintNE(c,l,x,p,v,B,Xa,J,Ea),A.paintRight(c,l,x,p,v,B,Ya,J,Ia),"double"==wa&&(A.moveSEInner(c,l,x,p,v,B,Ya,J,oa,Ia),A.paintRightInner(c,l,x,p,v,B,Xa,J,oa,Ea,La),A.paintNEInner(c,l,x,p,v,B,Xa,J,oa),A.paintTopInner(c,l,x,p,v,B,Ta,J,oa,Ga,Ea),A.paintNWInner(c,
+l,x,p,v,B,Ta,J,oa),A.paintLeftInner(c,l,x,p,v,B,$a,J,oa,Ia,Ga)),c.stroke()):(c.begin(),A.moveSW(c,l,x,p,v,B,$a,J,Ia),A.paintLeft(c,l,x,p,v,B,Ta,J,Ea),A.paintNW(c,l,x,p,v,B,Ta,J,Ga),A.paintTop(c,l,x,p,v,B,Xa,J,La),A.paintNE(c,l,x,p,v,B,Xa,J,Ea),A.paintRight(c,l,x,p,v,B,Ya,J,Ia),A.lineSEInner(c,l,x,p,v,B,Ya,J,oa,Ia),A.paintRightInner(c,l,x,p,v,B,Xa,J,oa,Ea,La),A.paintNEInner(c,l,x,p,v,B,Xa,J,oa),A.paintTopInner(c,l,x,p,v,B,Ta,J,oa,Ga,Ea),A.paintNWInner(c,l,x,p,v,B,Ta,J,oa),A.paintLeftInner(c,l,x,p,
+v,B,$a,J,oa,Ia,Ga),c.close(),c.fillAndStroke()):Ea&&La&&Ia&&!Ga?"frame"!=wa?(c.begin(),A.moveNW(c,l,x,p,v,B,Ta,J,Ga),A.paintTop(c,l,x,p,v,B,Xa,J,La),A.paintNE(c,l,x,p,v,B,Xa,J,Ea),A.paintRight(c,l,x,p,v,B,Ya,J,Ia),A.paintSE(c,l,x,p,v,B,Ya,J,La),A.paintBottom(c,l,x,p,v,B,$a,J,Ga),"double"==wa&&(A.moveSWInner(c,l,x,p,v,B,$a,J,oa,Ga),A.paintBottomInner(c,l,x,p,v,B,Ya,J,oa,La,Ia),A.paintSEInner(c,l,x,p,v,B,Ya,J,oa),A.paintRightInner(c,l,x,p,v,B,Xa,J,oa,Ea,La),A.paintNEInner(c,l,x,p,v,B,Xa,J,oa),A.paintTopInner(c,
+l,x,p,v,B,Ta,J,oa,Ga,Ea)),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Ta,J,Ga),A.paintTop(c,l,x,p,v,B,Xa,J,La),A.paintNE(c,l,x,p,v,B,Xa,J,Ea),A.paintRight(c,l,x,p,v,B,Ya,J,Ia),A.paintSE(c,l,x,p,v,B,Ya,J,La),A.paintBottom(c,l,x,p,v,B,$a,J,Ga),A.lineSWInner(c,l,x,p,v,B,$a,J,oa,Ga),A.paintBottomInner(c,l,x,p,v,B,Ya,J,oa,La,Ia),A.paintSEInner(c,l,x,p,v,B,Ya,J,oa),A.paintRightInner(c,l,x,p,v,B,Xa,J,oa,Ea,La),A.paintNEInner(c,l,x,p,v,B,Xa,J,oa),A.paintTopInner(c,l,x,p,v,B,Ta,J,oa,Ga,Ea),c.close(),c.fillAndStroke()):
+Ea&&La&&Ia&&Ga&&("frame"!=wa?(c.begin(),A.moveNW(c,l,x,p,v,B,Ta,J,Ga),A.paintNW(c,l,x,p,v,B,Ta,J,Ga),A.paintTop(c,l,x,p,v,B,Xa,J,La),A.paintNE(c,l,x,p,v,B,Xa,J,Ea),A.paintRight(c,l,x,p,v,B,Ya,J,Ia),A.paintSE(c,l,x,p,v,B,Ya,J,La),A.paintBottom(c,l,x,p,v,B,$a,J,Ga),A.paintSW(c,l,x,p,v,B,$a,J,Ia),A.paintLeft(c,l,x,p,v,B,Ta,J,Ea),c.close(),"double"==wa&&(A.moveSWInner(c,l,x,p,v,B,$a,J,oa,Ga),A.paintSWInner(c,l,x,p,v,B,$a,J,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Ya,J,oa,La,Ia),A.paintSEInner(c,l,x,p,v,
+B,Ya,J,oa),A.paintRightInner(c,l,x,p,v,B,Xa,J,oa,Ea,La),A.paintNEInner(c,l,x,p,v,B,Xa,J,oa),A.paintTopInner(c,l,x,p,v,B,Ta,J,oa,Ga,Ea),A.paintNWInner(c,l,x,p,v,B,Ta,J,oa),A.paintLeftInner(c,l,x,p,v,B,$a,J,oa,Ia,Ga),c.close()),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Ta,J,Ga),A.paintNW(c,l,x,p,v,B,Ta,J,Ga),A.paintTop(c,l,x,p,v,B,Xa,J,La),A.paintNE(c,l,x,p,v,B,Xa,J,Ea),A.paintRight(c,l,x,p,v,B,Ya,J,Ia),A.paintSE(c,l,x,p,v,B,Ya,J,La),A.paintBottom(c,l,x,p,v,B,$a,J,Ga),A.paintSW(c,l,x,p,v,B,$a,J,Ia),
+A.paintLeft(c,l,x,p,v,B,Ta,J,Ea),c.close(),A.moveSWInner(c,l,x,p,v,B,$a,J,oa,Ga),A.paintSWInner(c,l,x,p,v,B,$a,J,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Ya,J,oa,La,Ia),A.paintSEInner(c,l,x,p,v,B,Ya,J,oa),A.paintRightInner(c,l,x,p,v,B,Xa,J,oa,Ea,La),A.paintNEInner(c,l,x,p,v,B,Xa,J,oa),A.paintTopInner(c,l,x,p,v,B,Ta,J,oa,Ga,Ea),A.paintNWInner(c,l,x,p,v,B,Ta,J,oa),A.paintLeftInner(c,l,x,p,v,B,$a,J,oa,Ia,Ga),c.close(),c.fillAndStroke())):"frame"!=wa?(c.begin(),A.moveNW(c,l,x,p,v,B,Ta,J,Ga),A.paintTop(c,
+l,x,p,v,B,Xa,J,La),"double"==wa&&(A.moveNEInner(c,l,x,p,v,B,Xa,J,oa,La),A.paintTopInner(c,l,x,p,v,B,Ta,J,oa,Ga,Ea)),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Ta,J,Ga),A.paintTop(c,l,x,p,v,B,Xa,J,La),A.lineNEInner(c,l,x,p,v,B,Xa,J,oa,La),A.paintTopInner(c,l,x,p,v,B,Ta,J,oa,Ga,Ea),c.close(),c.fillAndStroke()):"frame"!=wa?(c.begin(),A.moveNE(c,l,x,p,v,B,Xa,J,Ea),A.paintRight(c,l,x,p,v,B,Ya,J,Ia),"double"==wa&&(A.moveSEInner(c,l,x,p,v,B,Ya,J,oa,Ia),A.paintRightInner(c,l,x,p,v,B,Xa,J,oa,Ea,La)),c.stroke()):
+(c.begin(),A.moveNE(c,l,x,p,v,B,Xa,J,Ea),A.paintRight(c,l,x,p,v,B,Ya,J,Ia),A.lineSEInner(c,l,x,p,v,B,Ya,J,oa,Ia),A.paintRightInner(c,l,x,p,v,B,Xa,J,oa,Ea,La),c.close(),c.fillAndStroke()):"frame"!=wa?(c.begin(),A.moveSE(c,l,x,p,v,B,Ya,J,La),A.paintBottom(c,l,x,p,v,B,$a,J,Ga),"double"==wa&&(A.moveSWInner(c,l,x,p,v,B,$a,J,oa,Ga),A.paintBottomInner(c,l,x,p,v,B,Ya,J,oa,La,Ia)),c.stroke()):(c.begin(),A.moveSE(c,l,x,p,v,B,Ya,J,La),A.paintBottom(c,l,x,p,v,B,$a,J,Ga),A.lineSWInner(c,l,x,p,v,B,$a,J,oa,Ga),
+A.paintBottomInner(c,l,x,p,v,B,Ya,J,oa,La,Ia),c.close(),c.fillAndStroke()):"frame"!=wa?(c.begin(),A.moveSW(c,l,x,p,v,B,Ta,J,Ia),A.paintLeft(c,l,x,p,v,B,Ta,J,Ea),"double"==wa&&(A.moveNWInner(c,l,x,p,v,B,Ta,J,oa,Ea,Ga),A.paintLeftInner(c,l,x,p,v,B,$a,J,oa,Ia,Ga)),c.stroke()):(c.begin(),A.moveSW(c,l,x,p,v,B,Ta,J,Ia),A.paintLeft(c,l,x,p,v,B,Ta,J,Ea),A.lineNWInner(c,l,x,p,v,B,Ta,J,oa,Ea,Ga),A.paintLeftInner(c,l,x,p,v,B,$a,J,oa,Ia,Ga),c.close(),c.fillAndStroke());c.begin();A.paintFolds(c,l,x,p,v,B,Ta,Xa,
+Ya,$a,J,Ea,La,Ia,Ga);c.stroke()};xa.prototype.moveNW=function(c,l,x,p,v,A,B,ka,J){"square"==B||"default"==B&&"square"==A||!J?c.moveTo(0,0):c.moveTo(0,ka)};xa.prototype.moveNE=function(c,l,x,p,v,A,B,ka,J){"square"==B||"default"==B&&"square"==A||!J?c.moveTo(p,0):c.moveTo(p-ka,0)};xa.prototype.moveSE=function(c,l,x,p,v,A,B,ka,J){"square"==B||"default"==B&&"square"==A||!J?c.moveTo(p,v):c.moveTo(p,v-ka)};xa.prototype.moveSW=function(c,l,x,p,v,A,B,ka,J){"square"==B||"default"==B&&"square"==A||!J?c.moveTo(0,
+v):c.moveTo(ka,v)};xa.prototype.paintNW=function(c,l,x,p,v,A,B,ka,J){if(J)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ka,ka,0,0,l,ka,0)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(ka,0);else c.lineTo(0,0)};xa.prototype.paintTop=function(c,l,x,p,v,A,B,ka,J){"square"==B||"default"==B&&"square"==A||!J?c.lineTo(p,0):c.lineTo(p-ka,0)};xa.prototype.paintNE=
+function(c,l,x,p,v,A,B,ka,J){if(J)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ka,ka,0,0,l,p,ka)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p,ka);else c.lineTo(p,0)};xa.prototype.paintRight=function(c,l,x,p,v,A,B,ka,J){"square"==B||"default"==B&&"square"==A||!J?c.lineTo(p,v):c.lineTo(p,v-ka)};xa.prototype.paintLeft=function(c,l,x,p,v,A,B,ka,J){"square"==
+B||"default"==B&&"square"==A||!J?c.lineTo(0,0):c.lineTo(0,ka)};xa.prototype.paintSE=function(c,l,x,p,v,A,B,ka,J){if(J)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ka,ka,0,0,l,p-ka,v)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-ka,v);else c.lineTo(p,v)};xa.prototype.paintBottom=function(c,l,x,p,v,A,B,ka,J){"square"==B||"default"==B&&"square"==A||!J?c.lineTo(0,
+v):c.lineTo(ka,v)};xa.prototype.paintSW=function(c,l,x,p,v,A,B,ka,J){if(J)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ka,ka,0,0,l,0,v-ka)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(0,v-ka);else c.lineTo(0,v)};xa.prototype.paintNWInner=function(c,l,x,p,v,A,B,ka,J){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ka-.5*J,ka-.5*J,0,0,0,J,.5*J+ka);else if("invRound"==
+B||"default"==B&&"invRound"==A)c.arcTo(ka+J,ka+J,0,0,1,J,J+ka);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(J,.5*J+ka);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(J+ka,J+ka),c.lineTo(J,J+ka)};xa.prototype.paintTopInner=function(c,l,x,p,v,A,B,ka,J,wa,oa){wa||oa?!wa&&oa?c.lineTo(0,J):wa&&!oa?c.lineTo(J,0):wa?"square"==B||"default"==B&&"square"==A?c.lineTo(J,J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(ka+.5*J,J):c.lineTo(ka+J,J):c.lineTo(0,
+J):c.lineTo(0,0)};xa.prototype.paintNEInner=function(c,l,x,p,v,A,B,ka,J){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ka-.5*J,ka-.5*J,0,0,0,p-ka-.5*J,J);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(ka+J,ka+J,0,0,1,p-ka-J,J);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(p-ka-.5*J,J);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(p-ka-J,ka+J),c.lineTo(p-ka-J,J)};xa.prototype.paintRightInner=function(c,l,x,p,v,A,B,ka,J,wa,oa){wa||oa?!wa&&oa?c.lineTo(p-J,0):wa&&!oa?c.lineTo(p,
+J):wa?"square"==B||"default"==B&&"square"==A?c.lineTo(p-J,J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-J,ka+.5*J):c.lineTo(p-J,ka+J):c.lineTo(p-J,0):c.lineTo(p,0)};xa.prototype.paintLeftInner=function(c,l,x,p,v,A,B,ka,J,wa,oa){wa||oa?!wa&&oa?c.lineTo(J,v):wa&&!oa?c.lineTo(0,v-J):wa?"square"==B||"default"==B&&"square"==A?c.lineTo(J,v-J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(J,v-ka-.5*J):c.lineTo(J,v-ka-J):
+c.lineTo(J,v):c.lineTo(0,v)};xa.prototype.paintSEInner=function(c,l,x,p,v,A,B,ka,J){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ka-.5*J,ka-.5*J,0,0,0,p-J,v-ka-.5*J);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(ka+J,ka+J,0,0,1,p-J,v-ka-J);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(p-J,v-ka-.5*J);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(p-ka-J,v-ka-J),c.lineTo(p-J,v-ka-J)};xa.prototype.paintBottomInner=function(c,l,x,p,v,A,B,ka,J,wa,oa){wa||oa?!wa&&oa?c.lineTo(p,
+v-J):wa&&!oa?c.lineTo(p-J,v):"square"==B||"default"==B&&"square"==A||!wa?c.lineTo(p-J,v-J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-ka-.5*J,v-J):c.lineTo(p-ka-J,v-J):c.lineTo(p,v)};xa.prototype.paintSWInner=function(c,l,x,p,v,A,B,ka,J,wa){if(!wa)c.lineTo(J,v);else if("square"==B||"default"==B&&"square"==A)c.lineTo(J,v-J);else if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ka-.5*J,ka-.5*J,0,0,0,ka+.5*J,v-J);else if("invRound"==B||"default"==B&&"invRound"==
+A)c.arcTo(ka+J,ka+J,0,0,1,ka+J,v-J);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(ka+.5*J,v-J);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(J+ka,v-ka-J),c.lineTo(J+ka,v-J)};xa.prototype.moveSWInner=function(c,l,x,p,v,A,B,ka,J,wa){wa?"square"==B||"default"==B&&"square"==A?c.moveTo(J,v-J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(J,v-ka-.5*J):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(J,v-ka-J):
+c.moveTo(0,v-J)};xa.prototype.lineSWInner=function(c,l,x,p,v,A,B,ka,J,wa){wa?"square"==B||"default"==B&&"square"==A?c.lineTo(J,v-J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(J,v-ka-.5*J):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(J,v-ka-J):c.lineTo(0,v-J)};xa.prototype.moveSEInner=function(c,l,x,p,v,A,B,ka,J,wa){wa?"square"==B||"default"==B&&"square"==A?c.moveTo(p-J,v-J):"rounded"==B||"default"==B&&"rounded"==
+A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(p-J,v-ka-.5*J):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(p-J,v-ka-J):c.moveTo(p-J,v)};xa.prototype.lineSEInner=function(c,l,x,p,v,A,B,ka,J,wa){wa?"square"==B||"default"==B&&"square"==A?c.lineTo(p-J,v-J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-J,v-ka-.5*J):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-J,v-ka-J):
+c.lineTo(p-J,v)};xa.prototype.moveNEInner=function(c,l,x,p,v,A,B,ka,J,wa){wa?"square"==B||"default"==B&&"square"==A||wa?c.moveTo(p-J,J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(p-J,ka+.5*J):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(p-J,ka+J):c.moveTo(p,J)};xa.prototype.lineNEInner=function(c,l,x,p,v,A,B,ka,J,wa){wa?"square"==B||"default"==B&&"square"==A||wa?c.lineTo(p-J,J):"rounded"==B||"default"==B&&"rounded"==
+A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-J,ka+.5*J):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-J,ka+J):c.lineTo(p,J)};xa.prototype.moveNWInner=function(c,l,x,p,v,A,B,ka,J,wa,oa){wa||oa?!wa&&oa?c.moveTo(J,0):wa&&!oa?c.moveTo(0,J):"square"==B||"default"==B&&"square"==A?c.moveTo(J,J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(J,ka+.5*J):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==
+B&&"fold"==A)&&c.moveTo(J,ka+J):c.moveTo(0,0)};xa.prototype.lineNWInner=function(c,l,x,p,v,A,B,ka,J,wa,oa){wa||oa?!wa&&oa?c.lineTo(J,0):wa&&!oa?c.lineTo(0,J):"square"==B||"default"==B&&"square"==A?c.lineTo(J,J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(J,ka+.5*J):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(J,ka+J):c.lineTo(0,0)};xa.prototype.paintFolds=function(c,l,x,p,v,A,B,ka,J,wa,oa,ab,jb,gb,Ea){if("fold"==
+A||"fold"==B||"fold"==ka||"fold"==J||"fold"==wa)("fold"==B||"default"==B&&"fold"==A)&&ab&&Ea&&(c.moveTo(0,oa),c.lineTo(oa,oa),c.lineTo(oa,0)),("fold"==ka||"default"==ka&&"fold"==A)&&ab&&jb&&(c.moveTo(p-oa,0),c.lineTo(p-oa,oa),c.lineTo(p,oa)),("fold"==J||"default"==J&&"fold"==A)&&gb&&jb&&(c.moveTo(p-oa,v),c.lineTo(p-oa,v-oa),c.lineTo(p,v-oa)),("fold"==wa||"default"==wa&&"fold"==A)&&gb&&Ea&&(c.moveTo(0,v-oa),c.lineTo(oa,v-oa),c.lineTo(oa,v))};mxCellRenderer.registerShape(xa.prototype.cst.RECT2,xa);
+xa.prototype.constraints=null;mxUtils.extend(Ba,mxConnector);Ba.prototype.origPaintEdgeShape=Ba.prototype.paintEdgeShape;Ba.prototype.paintEdgeShape=function(c,l,x){for(var p=[],v=0;v<l.length;v++)p.push(mxUtils.clone(l[v]));v=c.state.dashed;var A=c.state.fixDash;Ba.prototype.origPaintEdgeShape.apply(this,[c,p,x]);3<=c.state.strokeWidth&&(p=mxUtils.getValue(this.style,"fillColor",null),null!=p&&(c.setStrokeColor(p),c.setStrokeWidth(c.state.strokeWidth-2),c.setDashed(v,A),Ba.prototype.origPaintEdgeShape.apply(this,
+[c,l,x])))};mxCellRenderer.registerShape("filledEdge",Ba);"undefined"!==typeof StyleFormatPanel&&function(){var c=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var l=this.editorUi.getSelectionState(),x=c.apply(this,arguments);"umlFrame"==l.style.shape&&x.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return x}}();mxMarker.addMarker("dash",function(c,l,x,p,v,A,B,ka,J,wa){var oa=v*(B+J+1),ab=A*(B+J+1);return function(){c.begin();
+c.moveTo(p.x-oa/2-ab/2,p.y-ab/2+oa/2);c.lineTo(p.x+ab/2-3*oa/2,p.y-3*ab/2-oa/2);c.stroke()}});mxMarker.addMarker("box",function(c,l,x,p,v,A,B,ka,J,wa){var oa=v*(B+J+1),ab=A*(B+J+1),jb=p.x+oa/2,gb=p.y+ab/2;p.x-=oa;p.y-=ab;return function(){c.begin();c.moveTo(jb-oa/2-ab/2,gb-ab/2+oa/2);c.lineTo(jb-oa/2+ab/2,gb-ab/2-oa/2);c.lineTo(jb+ab/2-3*oa/2,gb-3*ab/2-oa/2);c.lineTo(jb-ab/2-3*oa/2,gb-3*ab/2+oa/2);c.close();wa?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("cross",function(c,l,x,p,v,A,B,ka,J,
+wa){var oa=v*(B+J+1),ab=A*(B+J+1);return function(){c.begin();c.moveTo(p.x-oa/2-ab/2,p.y-ab/2+oa/2);c.lineTo(p.x+ab/2-3*oa/2,p.y-3*ab/2-oa/2);c.moveTo(p.x-oa/2+ab/2,p.y-ab/2-oa/2);c.lineTo(p.x-ab/2-3*oa/2,p.y-3*ab/2+oa/2);c.stroke()}});mxMarker.addMarker("circle",Pa);mxMarker.addMarker("circlePlus",function(c,l,x,p,v,A,B,ka,J,wa){var oa=p.clone(),ab=Pa.apply(this,arguments),jb=v*(B+2*J),gb=A*(B+2*J);return function(){ab.apply(this,arguments);c.begin();c.moveTo(oa.x-v*J,oa.y-A*J);c.lineTo(oa.x-2*jb+
+v*J,oa.y-2*gb+A*J);c.moveTo(oa.x-jb-gb+A*J,oa.y-gb+jb-v*J);c.lineTo(oa.x+gb-jb-A*J,oa.y-gb-jb+v*J);c.stroke()}});mxMarker.addMarker("halfCircle",function(c,l,x,p,v,A,B,ka,J,wa){var oa=v*(B+J+1),ab=A*(B+J+1),jb=p.clone();p.x-=oa;p.y-=ab;return function(){c.begin();c.moveTo(jb.x-ab,jb.y+oa);c.quadTo(p.x-ab,p.y+oa,p.x,p.y);c.quadTo(p.x+ab,p.y-oa,jb.x+ab,jb.y-oa);c.stroke()}});mxMarker.addMarker("async",function(c,l,x,p,v,A,B,ka,J,wa){l=v*J*1.118;x=A*J*1.118;v*=B+J;A*=B+J;var oa=p.clone();oa.x-=l;oa.y-=
+x;p.x+=-v-l;p.y+=-A-x;return function(){c.begin();c.moveTo(oa.x,oa.y);ka?c.lineTo(oa.x-v-A/2,oa.y-A+v/2):c.lineTo(oa.x+A/2-v,oa.y-A-v/2);c.lineTo(oa.x-v,oa.y-A);c.close();wa?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("openAsync",function(c){c=null!=c?c:2;return function(l,x,p,v,A,B,ka,J,wa,oa){A*=ka+wa;B*=ka+wa;var ab=v.clone();return function(){l.begin();l.moveTo(ab.x,ab.y);J?l.lineTo(ab.x-A-B/c,ab.y-B+A/c):l.lineTo(ab.x+B/c-A,ab.y-B-A/c);l.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var kb=
+function(c,l,x){return ib(c,["width"],l,function(p,v,A,B,ka){ka=c.shape.getEdgeWidth()*c.view.scale+x;return new mxPoint(B.x+v*p/4+A*ka/2,B.y+A*p/4-v*ka/2)},function(p,v,A,B,ka,J){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ka.x,ka.y,J.x,J.y));c.style.width=Math.round(2*p)/c.view.scale-x})},ib=function(c,l,x,p,v){return fb(c,l,function(A){var B=c.absolutePoints,ka=B.length-1;A=c.view.translate;var J=c.view.scale,wa=x?B[0]:B[ka];B=x?B[1]:B[ka-1];ka=B.x-wa.x;var oa=B.y-wa.y,ab=Math.sqrt(ka*ka+oa*oa);wa=
+p.call(this,ab,ka/ab,oa/ab,wa,B);return new mxPoint(wa.x/J-A.x,wa.y/J-A.y)},function(A,B,ka){var J=c.absolutePoints,wa=J.length-1;A=c.view.translate;var oa=c.view.scale,ab=x?J[0]:J[wa];J=x?J[1]:J[wa-1];wa=J.x-ab.x;var jb=J.y-ab.y,gb=Math.sqrt(wa*wa+jb*jb);B.x=(B.x+A.x)*oa;B.y=(B.y+A.y)*oa;v.call(this,gb,wa/gb,jb/gb,ab,J,B,ka)})},pb=function(c){return function(l){return[fb(l,["arrowWidth","arrowSize"],function(x){var p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",cb.prototype.arrowWidth))),
+v=Math.max(0,Math.min(c,mxUtils.getValue(this.state.style,"arrowSize",cb.prototype.arrowSize)));return new mxPoint(x.x+(1-v)*x.width,x.y+(1-p)*x.height/2)},function(x,p){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(x.y+x.height/2-p.y)/x.height*2));this.state.style.arrowSize=Math.max(0,Math.min(c,(x.x+x.width-p.x)/x.width))})]}},vb=function(c){return function(l){return[fb(l,["size"],function(x){var p=Math.max(0,Math.min(.5*x.height,parseFloat(mxUtils.getValue(this.state.style,"size",
+c))));return new mxPoint(x.x,x.y+p)},function(x,p){this.state.style.size=Math.max(0,p.y-x.y)},!0)]}},ob=function(c,l,x){return function(p){var v=[fb(p,["size"],function(A){var B=Math.max(0,Math.min(A.width,Math.min(A.height,parseFloat(mxUtils.getValue(this.state.style,"size",l)))))*c;return new mxPoint(A.x+B,A.y+B)},function(A,B){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(A.width,B.x-A.x),Math.min(A.height,B.y-A.y)))/c)},!1)];x&&mxUtils.getValue(p.style,mxConstants.STYLE_ROUNDED,
+!1)&&v.push(qb(p));return v}},Bb=function(c,l,x,p,v){x=null!=x?x:.5;return function(A){var B=[fb(A,["size"],function(ka){var J=null!=v?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,wa=parseFloat(mxUtils.getValue(this.state.style,"size",J?v:c));return new mxPoint(ka.x+Math.max(0,Math.min(.5*ka.width,wa*(J?1:ka.width))),ka.getCenterY())},function(ka,J,wa){ka=null!=v&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?J.x-ka.x:Math.max(0,Math.min(x,(J.x-ka.x)/ka.width));this.state.style.size=
+ka},!1,p)];l&&mxUtils.getValue(A.style,mxConstants.STYLE_ROUNDED,!1)&&B.push(qb(A));return B}},yb=function(c,l,x){c=null!=c?c:.5;return function(p){var v=[fb(p,["size"],function(A){var B=null!=x?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,ka=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",B?x:l)));return new mxPoint(A.x+Math.min(.75*A.width*c,ka*(B?.75:.75*A.width)),A.y+A.height/4)},function(A,B){A=null!=x&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?B.x-
+A.x:Math.max(0,Math.min(c,(B.x-A.x)/A.width*.75));this.state.style.size=A},!1,!0)];mxUtils.getValue(p.style,mxConstants.STYLE_ROUNDED,!1)&&v.push(qb(p));return v}},nb=function(){return function(c){var l=[];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(qb(c));return l}},qb=function(c,l){return fb(c,[mxConstants.STYLE_ARCSIZE],function(x){var p=null!=l?l:x.height/8;if("1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var v=mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,
mxConstants.LINE_ARCSIZE)/2;return new mxPoint(x.x+x.width-Math.min(x.width/2,v),x.y+p)}v=Math.max(0,parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(x.x+x.width-Math.min(Math.max(x.width/2,x.height/2),Math.min(x.width,x.height)*v),x.y+p)},function(x,p,v){"1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(x.width,2*(x.x+x.width-
-p.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(x.width-p.x+x.x)/Math.min(x.width,x.height))))})},gb=function(c,l,x,p,v,A,B){var ka=new mxHandle(c,null,mxVertexHandler.prototype.secondaryHandleImage);ka.execute=function(xa){for(var oa=0;oa<l.length;oa++)this.copyStyle(l[oa]);B&&B(xa)};ka.getPosition=x;ka.setPosition=p;ka.ignoreGrid=null!=v?v:!0;if(A){var J=ka.positionChanged;ka.positionChanged=function(){J.apply(this,arguments);c.view.invalidate(this.state.cell);
+p.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(x.width-p.x+x.x)/Math.min(x.width,x.height))))})},fb=function(c,l,x,p,v,A,B){var ka=new mxHandle(c,null,mxVertexHandler.prototype.secondaryHandleImage);ka.execute=function(wa){for(var oa=0;oa<l.length;oa++)this.copyStyle(l[oa]);B&&B(wa)};ka.getPosition=x;ka.setPosition=p;ka.ignoreGrid=null!=v?v:!0;if(A){var J=ka.positionChanged;ka.positionChanged=function(){J.apply(this,arguments);c.view.invalidate(this.state.cell);
c.view.validate()}}return ka},rb={link:function(c){return[kb(c,!0,10),kb(c,!1,10)]},flexArrow:function(c){var l=c.view.graph.gridSize/c.view.scale,x=[];mxUtils.getValue(c.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(x.push(ib(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(p,v,A,B,ka){p=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;ka=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;
-return new mxPoint(B.x+v*(ka+c.shape.strokewidth*c.view.scale)+A*p/2,B.y+A*(ka+c.shape.strokewidth*c.view.scale)-v*p/2)},function(p,v,A,B,ka,J,xa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ka.x,ka.y,J.x,J.y));v=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-v,J.x,J.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*p)/c.view.scale;if(mxEvent.isShiftDown(xa.getEvent())||mxEvent.isControlDown(xa.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=
-c.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(xa.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE])})),x.push(ib(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(p,v,A,B,ka){p=(c.shape.getStartArrowWidth()-c.shape.strokewidth)*c.view.scale;ka=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/
-5)*c.view.scale;return new mxPoint(B.x+v*(ka+c.shape.strokewidth*c.view.scale)+A*p/2,B.y+A*(ka+c.shape.strokewidth*c.view.scale)-v*p/2)},function(p,v,A,B,ka,J,xa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ka.x,ka.y,J.x,J.y));v=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-v,J.x,J.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.startWidth=Math.max(0,Math.round(2*p)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(xa.getEvent())||mxEvent.isControlDown(xa.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=
-c.style[mxConstants.STYLE_STARTSIZE],c.style.endWidth=c.style.startWidth;mxEvent.isAltDown(xa.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(c.style.startWidth)-parseFloat(c.style.endWidth))<l&&(c.style.startWidth=c.style.endWidth))})));mxUtils.getValue(c.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(x.push(ib(c,
-["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(p,v,A,B,ka){p=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;ka=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+v*(ka+c.shape.strokewidth*c.view.scale)-A*p/2,B.y+A*(ka+c.shape.strokewidth*c.view.scale)+v*p/2)},function(p,v,A,B,ka,J,xa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ka.x,ka.y,J.x,J.y));v=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-v,J.x,J.y);
-c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*p)/c.view.scale;if(mxEvent.isShiftDown(xa.getEvent())||mxEvent.isControlDown(xa.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(xa.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE])})),
-x.push(ib(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(p,v,A,B,ka){p=(c.shape.getEndArrowWidth()-c.shape.strokewidth)*c.view.scale;ka=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+v*(ka+c.shape.strokewidth*c.view.scale)-A*p/2,B.y+A*(ka+c.shape.strokewidth*c.view.scale)+v*p/2)},function(p,v,A,B,ka,J,xa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ka.x,ka.y,J.x,J.y));v=mxUtils.ptLineDist(B.x,
-B.y,B.x+A,B.y-v,J.x,J.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.endWidth=Math.max(0,Math.round(2*p)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(xa.getEvent())||mxEvent.isControlDown(xa.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE],c.style.startWidth=c.style.endWidth;mxEvent.isAltDown(xa.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<
-l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(c.style.endWidth)-parseFloat(c.style.startWidth))<l&&(c.style.endWidth=c.style.startWidth))})));return x},swimlane:function(c){var l=[];if(mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED)){var x=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));l.push(pb(c,x/2))}l.push(gb(c,[mxConstants.STYLE_STARTSIZE],function(p){var v=parseFloat(mxUtils.getValue(c.style,
+return new mxPoint(B.x+v*(ka+c.shape.strokewidth*c.view.scale)+A*p/2,B.y+A*(ka+c.shape.strokewidth*c.view.scale)-v*p/2)},function(p,v,A,B,ka,J,wa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ka.x,ka.y,J.x,J.y));v=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-v,J.x,J.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*p)/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=
+c.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(wa.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE])})),x.push(ib(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(p,v,A,B,ka){p=(c.shape.getStartArrowWidth()-c.shape.strokewidth)*c.view.scale;ka=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/
+5)*c.view.scale;return new mxPoint(B.x+v*(ka+c.shape.strokewidth*c.view.scale)+A*p/2,B.y+A*(ka+c.shape.strokewidth*c.view.scale)-v*p/2)},function(p,v,A,B,ka,J,wa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ka.x,ka.y,J.x,J.y));v=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-v,J.x,J.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.startWidth=Math.max(0,Math.round(2*p)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=
+c.style[mxConstants.STYLE_STARTSIZE],c.style.endWidth=c.style.startWidth;mxEvent.isAltDown(wa.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(c.style.startWidth)-parseFloat(c.style.endWidth))<l&&(c.style.startWidth=c.style.endWidth))})));mxUtils.getValue(c.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(x.push(ib(c,
+["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(p,v,A,B,ka){p=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;ka=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+v*(ka+c.shape.strokewidth*c.view.scale)-A*p/2,B.y+A*(ka+c.shape.strokewidth*c.view.scale)+v*p/2)},function(p,v,A,B,ka,J,wa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ka.x,ka.y,J.x,J.y));v=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-v,J.x,J.y);
+c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*p)/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(wa.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE])})),
+x.push(ib(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(p,v,A,B,ka){p=(c.shape.getEndArrowWidth()-c.shape.strokewidth)*c.view.scale;ka=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+v*(ka+c.shape.strokewidth*c.view.scale)-A*p/2,B.y+A*(ka+c.shape.strokewidth*c.view.scale)+v*p/2)},function(p,v,A,B,ka,J,wa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ka.x,ka.y,J.x,J.y));v=mxUtils.ptLineDist(B.x,
+B.y,B.x+A,B.y-v,J.x,J.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.endWidth=Math.max(0,Math.round(2*p)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE],c.style.startWidth=c.style.endWidth;mxEvent.isAltDown(wa.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<
+l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(c.style.endWidth)-parseFloat(c.style.startWidth))<l&&(c.style.endWidth=c.style.startWidth))})));return x},swimlane:function(c){var l=[];if(mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED)){var x=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));l.push(qb(c,x/2))}l.push(fb(c,[mxConstants.STYLE_STARTSIZE],function(p){var v=parseFloat(mxUtils.getValue(c.style,
mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(c.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(p.getCenterX(),p.y+Math.max(0,Math.min(p.height,v))):new mxPoint(p.x+Math.max(0,Math.min(p.width,v)),p.getCenterY())},function(p,v){c.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(p.height,v.y-p.y))):Math.round(Math.max(0,Math.min(p.width,v.x-p.x)))},!1,null,function(p){var v=
-c.view.graph;if(!mxEvent.isShiftDown(p.getEvent())&&!mxEvent.isControlDown(p.getEvent())&&(v.isTableRow(c.cell)||v.isTableCell(c.cell))){p=v.getSwimlaneDirection(c.style);var A=v.model.getParent(c.cell);A=v.model.getChildCells(A,!0);for(var B=[],ka=0;ka<A.length;ka++)A[ka]!=c.cell&&v.isSwimlane(A[ka])&&v.getSwimlaneDirection(v.getCurrentCellStyle(A[ka]))==p&&B.push(A[ka]);v.setCellStyles(mxConstants.STYLE_STARTSIZE,c.style[mxConstants.STYLE_STARTSIZE],B)}}));return l},label:mb(),ext:mb(),rectangle:mb(),
-triangle:mb(),rhombus:mb(),umlLifeline:function(c){return[gb(c,["size"],function(l){var x=Math.max(0,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",S.prototype.size))));return new mxPoint(l.getCenterX(),l.y+x)},function(l,x){this.state.style.size=Math.round(Math.max(0,Math.min(l.height,x.y-l.y)))},!1)]},umlFrame:function(c){return[gb(c,["width","height"],function(l){var x=Math.max(R.prototype.corner,Math.min(l.width,mxUtils.getValue(this.state.style,"width",R.prototype.width))),
-p=Math.max(1.5*R.prototype.corner,Math.min(l.height,mxUtils.getValue(this.state.style,"height",R.prototype.height)));return new mxPoint(l.x+x,l.y+p)},function(l,x){this.state.style.width=Math.round(Math.max(R.prototype.corner,Math.min(l.width,x.x-l.x)));this.state.style.height=Math.round(Math.max(1.5*R.prototype.corner,Math.min(l.height,x.y-l.y)))},!1)]},process:function(c){var l=[gb(c,["size"],function(x){var p="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),v=parseFloat(mxUtils.getValue(this.state.style,
-"size",ha.prototype.size));return p?new mxPoint(x.x+v,x.y+x.height/4):new mxPoint(x.x+x.width*v,x.y+x.height/4)},function(x,p){x="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*x.width,p.x-x.x)):Math.max(0,Math.min(.5,(p.x-x.x)/x.width));this.state.style.size=x},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(pb(c));return l},cross:function(c){return[gb(c,["size"],function(l){var x=Math.min(l.width,l.height);x=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
-"size",Fa.prototype.size)))*x/2;return new mxPoint(l.getCenterX()-x,l.getCenterY()-x)},function(l,x){var p=Math.min(l.width,l.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,l.getCenterY()-x.y)/p*2,Math.max(0,l.getCenterX()-x.x)/p*2)))})]},note:function(c){return[gb(c,["size"],function(l){var x=Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",f.prototype.size)))));return new mxPoint(l.x+l.width-x,l.y+x)},function(l,x){this.state.style.size=
-Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-x.x),Math.min(l.height,x.y-l.y))))})]},note2:function(c){return[gb(c,["size"],function(l){var x=Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",g.prototype.size)))));return new mxPoint(l.x+l.width-x,l.y+x)},function(l,x){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-x.x),Math.min(l.height,x.y-l.y))))})]},manualInput:function(c){var l=[gb(c,["size"],function(x){var p=
-Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,"size",Ta.prototype.size)));return new mxPoint(x.x+x.width/4,x.y+3*p/4)},function(x,p){this.state.style.size=Math.round(Math.max(0,Math.min(x.height,4*(p.y-x.y)/3)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(pb(c));return l},dataStorage:function(c){return[gb(c,["size"],function(l){var x="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),p=parseFloat(mxUtils.getValue(this.state.style,"size",x?K.prototype.fixedSize:
-K.prototype.size));return new mxPoint(l.x+l.width-p*(x?1:l.width),l.getCenterY())},function(l,x){l="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(l.width,l.x+l.width-x.x)):Math.max(0,Math.min(1,(l.x+l.width-x.x)/l.width));this.state.style.size=l},!1)]},callout:function(c){var l=[gb(c,["size","position"],function(x){var p=Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,"size",ja.prototype.size))),v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
-"position",ja.prototype.position)));mxUtils.getValue(this.state.style,"base",ja.prototype.base);return new mxPoint(x.x+v*x.width,x.y+x.height-p)},function(x,p){mxUtils.getValue(this.state.style,"base",ja.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(x.height,x.y+x.height-p.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(p.x-x.x)/x.width)))/100},!1),gb(c,["position2"],function(x){var p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",ja.prototype.position2)));
-return new mxPoint(x.x+p*x.width,x.y+x.height)},function(x,p){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(p.x-x.x)/x.width)))/100},!1),gb(c,["base"],function(x){var p=Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,"size",ja.prototype.size))),v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ja.prototype.position))),A=Math.max(0,Math.min(x.width,mxUtils.getValue(this.state.style,"base",ja.prototype.base)));return new mxPoint(x.x+Math.min(x.width,
-v*x.width+A),x.y+x.height-p)},function(x,p){var v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ja.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(x.width,p.x-x.x-v*x.width)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(pb(c));return l},internalStorage:function(c){var l=[gb(c,["dx","dy"],function(x){var p=Math.max(0,Math.min(x.width,mxUtils.getValue(this.state.style,"dx",Oa.prototype.dx))),v=Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,
-"dy",Oa.prototype.dy)));return new mxPoint(x.x+p,x.y+v)},function(x,p){this.state.style.dx=Math.round(Math.max(0,Math.min(x.width,p.x-x.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(x.height,p.y-x.y)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(pb(c));return l},module:function(c){return[gb(c,["jettyWidth","jettyHeight"],function(l){var x=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"jettyWidth",ua.prototype.jettyWidth))),p=Math.max(0,Math.min(l.height,
-mxUtils.getValue(this.state.style,"jettyHeight",ua.prototype.jettyHeight)));return new mxPoint(l.x+x/2,l.y+2*p)},function(l,x){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(l.width,x.x-l.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(l.height,x.y-l.y))/2)})]},corner:function(c){return[gb(c,["dx","dy"],function(l){var x=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",Xa.prototype.dx))),p=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,
-"dy",Xa.prototype.dy)));return new mxPoint(l.x+x,l.y+p)},function(l,x){this.state.style.dx=Math.round(Math.max(0,Math.min(l.width,x.x-l.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(l.height,x.y-l.y)))},!1)]},tee:function(c){return[gb(c,["dx","dy"],function(l){var x=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",eb.prototype.dx))),p=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",eb.prototype.dy)));return new mxPoint(l.x+(l.width+x)/2,l.y+p)},function(l,
-x){this.state.style.dx=Math.round(Math.max(0,2*Math.min(l.width/2,x.x-l.x-l.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(l.height,x.y-l.y)))},!1)]},singleArrow:ob(1),doubleArrow:ob(.5),folder:function(c){return[gb(c,["tabWidth","tabHeight"],function(l){var x=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"tabWidth",C.prototype.tabWidth))),p=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"tabHeight",C.prototype.tabHeight)));mxUtils.getValue(this.state.style,
-"tabPosition",C.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(x=l.width-x);return new mxPoint(l.x+x,l.y+p)},function(l,x){var p=Math.max(0,Math.min(l.width,x.x-l.x));mxUtils.getValue(this.state.style,"tabPosition",C.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(p=l.width-p);this.state.style.tabWidth=Math.round(p);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(l.height,x.y-l.y)))},!1)]},document:function(c){return[gb(c,["size"],function(l){var x=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,
-"size",ba.prototype.size))));return new mxPoint(l.x+3*l.width/4,l.y+(1-x)*l.height)},function(l,x){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-x.y)/l.height))},!1)]},tape:function(c){return[gb(c,["size"],function(l){var x=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",Y.prototype.size))));return new mxPoint(l.getCenterX(),l.y+x*l.height/2)},function(l,x){this.state.style.size=Math.max(0,Math.min(1,(x.y-l.y)/l.height*2))},!1)]},isoCube2:function(c){return[gb(c,
-["isoAngle"],function(l){var x=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",m.isoAngle))))*Math.PI/200;return new mxPoint(l.x,l.y+Math.min(l.width*Math.tan(x),.5*l.height))},function(l,x){this.state.style.isoAngle=Math.max(0,50*(x.y-l.y)/l.height)},!0)]},cylinder2:vb(q.prototype.size),cylinder3:vb(y.prototype.size),offPageConnector:function(c){return[gb(c,["size"],function(l){var x=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ia.prototype.size))));
+c.view.graph;if(!mxEvent.isShiftDown(p.getEvent())&&!mxEvent.isControlDown(p.getEvent())&&(v.isTableRow(c.cell)||v.isTableCell(c.cell))){p=v.getSwimlaneDirection(c.style);var A=v.model.getParent(c.cell);A=v.model.getChildCells(A,!0);for(var B=[],ka=0;ka<A.length;ka++)A[ka]!=c.cell&&v.isSwimlane(A[ka])&&v.getSwimlaneDirection(v.getCurrentCellStyle(A[ka]))==p&&B.push(A[ka]);v.setCellStyles(mxConstants.STYLE_STARTSIZE,c.style[mxConstants.STYLE_STARTSIZE],B)}}));return l},label:nb(),ext:nb(),rectangle:nb(),
+triangle:nb(),rhombus:nb(),umlLifeline:function(c){return[fb(c,["size"],function(l){var x=Math.max(0,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",W.prototype.size))));return new mxPoint(l.getCenterX(),l.y+x)},function(l,x){this.state.style.size=Math.round(Math.max(0,Math.min(l.height,x.y-l.y)))},!1)]},umlFrame:function(c){return[fb(c,["width","height"],function(l){var x=Math.max(R.prototype.corner,Math.min(l.width,mxUtils.getValue(this.state.style,"width",R.prototype.width))),
+p=Math.max(1.5*R.prototype.corner,Math.min(l.height,mxUtils.getValue(this.state.style,"height",R.prototype.height)));return new mxPoint(l.x+x,l.y+p)},function(l,x){this.state.style.width=Math.round(Math.max(R.prototype.corner,Math.min(l.width,x.x-l.x)));this.state.style.height=Math.round(Math.max(1.5*R.prototype.corner,Math.min(l.height,x.y-l.y)))},!1)]},process:function(c){var l=[fb(c,["size"],function(x){var p="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),v=parseFloat(mxUtils.getValue(this.state.style,
+"size",ha.prototype.size));return p?new mxPoint(x.x+v,x.y+x.height/4):new mxPoint(x.x+x.width*v,x.y+x.height/4)},function(x,p){x="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*x.width,p.x-x.x)):Math.max(0,Math.min(.5,(p.x-x.x)/x.width));this.state.style.size=x},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(qb(c));return l},cross:function(c){return[fb(c,["size"],function(l){var x=Math.min(l.width,l.height);x=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
+"size",Fa.prototype.size)))*x/2;return new mxPoint(l.getCenterX()-x,l.getCenterY()-x)},function(l,x){var p=Math.min(l.width,l.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,l.getCenterY()-x.y)/p*2,Math.max(0,l.getCenterX()-x.x)/p*2)))})]},note:function(c){return[fb(c,["size"],function(l){var x=Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",f.prototype.size)))));return new mxPoint(l.x+l.width-x,l.y+x)},function(l,x){this.state.style.size=
+Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-x.x),Math.min(l.height,x.y-l.y))))})]},note2:function(c){return[fb(c,["size"],function(l){var x=Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",g.prototype.size)))));return new mxPoint(l.x+l.width-x,l.y+x)},function(l,x){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-x.x),Math.min(l.height,x.y-l.y))))})]},manualInput:function(c){var l=[fb(c,["size"],function(x){var p=
+Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,"size",Ua.prototype.size)));return new mxPoint(x.x+x.width/4,x.y+3*p/4)},function(x,p){this.state.style.size=Math.round(Math.max(0,Math.min(x.height,4*(p.y-x.y)/3)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(qb(c));return l},dataStorage:function(c){return[fb(c,["size"],function(l){var x="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),p=parseFloat(mxUtils.getValue(this.state.style,"size",x?K.prototype.fixedSize:
+K.prototype.size));return new mxPoint(l.x+l.width-p*(x?1:l.width),l.getCenterY())},function(l,x){l="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(l.width,l.x+l.width-x.x)):Math.max(0,Math.min(1,(l.x+l.width-x.x)/l.width));this.state.style.size=l},!1)]},callout:function(c){var l=[fb(c,["size","position"],function(x){var p=Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,"size",ma.prototype.size))),v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
+"position",ma.prototype.position)));mxUtils.getValue(this.state.style,"base",ma.prototype.base);return new mxPoint(x.x+v*x.width,x.y+x.height-p)},function(x,p){mxUtils.getValue(this.state.style,"base",ma.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(x.height,x.y+x.height-p.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(p.x-x.x)/x.width)))/100},!1),fb(c,["position2"],function(x){var p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",ma.prototype.position2)));
+return new mxPoint(x.x+p*x.width,x.y+x.height)},function(x,p){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(p.x-x.x)/x.width)))/100},!1),fb(c,["base"],function(x){var p=Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,"size",ma.prototype.size))),v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ma.prototype.position))),A=Math.max(0,Math.min(x.width,mxUtils.getValue(this.state.style,"base",ma.prototype.base)));return new mxPoint(x.x+Math.min(x.width,
+v*x.width+A),x.y+x.height-p)},function(x,p){var v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ma.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(x.width,p.x-x.x-v*x.width)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(qb(c));return l},internalStorage:function(c){var l=[fb(c,["dx","dy"],function(x){var p=Math.max(0,Math.min(x.width,mxUtils.getValue(this.state.style,"dx",Ra.prototype.dx))),v=Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,
+"dy",Ra.prototype.dy)));return new mxPoint(x.x+p,x.y+v)},function(x,p){this.state.style.dx=Math.round(Math.max(0,Math.min(x.width,p.x-x.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(x.height,p.y-x.y)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(qb(c));return l},module:function(c){return[fb(c,["jettyWidth","jettyHeight"],function(l){var x=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"jettyWidth",va.prototype.jettyWidth))),p=Math.max(0,Math.min(l.height,
+mxUtils.getValue(this.state.style,"jettyHeight",va.prototype.jettyHeight)));return new mxPoint(l.x+x/2,l.y+2*p)},function(l,x){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(l.width,x.x-l.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(l.height,x.y-l.y))/2)})]},corner:function(c){return[fb(c,["dx","dy"],function(l){var x=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",Za.prototype.dx))),p=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,
+"dy",Za.prototype.dy)));return new mxPoint(l.x+x,l.y+p)},function(l,x){this.state.style.dx=Math.round(Math.max(0,Math.min(l.width,x.x-l.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(l.height,x.y-l.y)))},!1)]},tee:function(c){return[fb(c,["dx","dy"],function(l){var x=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",db.prototype.dx))),p=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",db.prototype.dy)));return new mxPoint(l.x+(l.width+x)/2,l.y+p)},function(l,
+x){this.state.style.dx=Math.round(Math.max(0,2*Math.min(l.width/2,x.x-l.x-l.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(l.height,x.y-l.y)))},!1)]},singleArrow:pb(1),doubleArrow:pb(.5),folder:function(c){return[fb(c,["tabWidth","tabHeight"],function(l){var x=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"tabWidth",C.prototype.tabWidth))),p=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"tabHeight",C.prototype.tabHeight)));mxUtils.getValue(this.state.style,
+"tabPosition",C.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(x=l.width-x);return new mxPoint(l.x+x,l.y+p)},function(l,x){var p=Math.max(0,Math.min(l.width,x.x-l.x));mxUtils.getValue(this.state.style,"tabPosition",C.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(p=l.width-p);this.state.style.tabWidth=Math.round(p);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(l.height,x.y-l.y)))},!1)]},document:function(c){return[fb(c,["size"],function(l){var x=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,
+"size",ca.prototype.size))));return new mxPoint(l.x+3*l.width/4,l.y+(1-x)*l.height)},function(l,x){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-x.y)/l.height))},!1)]},tape:function(c){return[fb(c,["size"],function(l){var x=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",Z.prototype.size))));return new mxPoint(l.getCenterX(),l.y+x*l.height/2)},function(l,x){this.state.style.size=Math.max(0,Math.min(1,(x.y-l.y)/l.height*2))},!1)]},isoCube2:function(c){return[fb(c,
+["isoAngle"],function(l){var x=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",m.isoAngle))))*Math.PI/200;return new mxPoint(l.x,l.y+Math.min(l.width*Math.tan(x),.5*l.height))},function(l,x){this.state.style.isoAngle=Math.max(0,50*(x.y-l.y)/l.height)},!0)]},cylinder2:vb(q.prototype.size),cylinder3:vb(y.prototype.size),offPageConnector:function(c){return[fb(c,["size"],function(l){var x=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ja.prototype.size))));
return new mxPoint(l.getCenterX(),l.y+(1-x)*l.height)},function(l,x){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-x.y)/l.height))},!1)]},"mxgraph.basic.rect":function(c){var l=[Graph.createHandle(c,["size"],function(x){var p=Math.max(0,Math.min(x.width/2,x.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(x.x+p,x.y+p)},function(x,p){this.state.style.size=Math.round(100*Math.max(0,Math.min(x.height/2,x.width/2,p.x-x.x)))/100})];c=Graph.createHandle(c,
-["indent"],function(x){var p=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(x.x+.75*x.width,x.y+p*x.height/200)},function(x,p){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(p.y-x.y)/x.height)))/100});l.push(c);return l},step:Bb(U.prototype.size,!0,null,!0,U.prototype.fixedSize),hexagon:Bb(L.prototype.size,!0,.5,!0,L.prototype.fixedSize),curlyBracket:Bb(qa.prototype.size,!1),display:Bb(wa.prototype.size,!1),cube:nb(1,
-n.prototype.size,!1),card:nb(.5,G.prototype.size,!0),loopLimit:nb(.5,V.prototype.size,!0),trapezoid:yb(.5,X.prototype.size,X.prototype.fixedSize),parallelogram:yb(1,Z.prototype.size,Z.prototype.fixedSize)};Graph.createHandle=gb;Graph.handleFactory=rb;var tb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=tb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var l=this.state.style.shape;null==mxCellRenderer.defaultShapes[l]&&
+["indent"],function(x){var p=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(x.x+.75*x.width,x.y+p*x.height/200)},function(x,p){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(p.y-x.y)/x.height)))/100});l.push(c);return l},step:Bb(T.prototype.size,!0,null,!0,T.prototype.fixedSize),hexagon:Bb(M.prototype.size,!0,.5,!0,M.prototype.fixedSize),curlyBracket:Bb(pa.prototype.size,!1),display:Bb(Ja.prototype.size,!1),cube:ob(1,
+n.prototype.size,!1),card:ob(.5,G.prototype.size,!0),loopLimit:ob(.5,V.prototype.size,!0),trapezoid:yb(.5,Y.prototype.size,Y.prototype.fixedSize),parallelogram:yb(1,aa.prototype.size,aa.prototype.fixedSize)};Graph.createHandle=fb;Graph.handleFactory=rb;var tb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=tb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var l=this.state.style.shape;null==mxCellRenderer.defaultShapes[l]&&
null==mxStencilRegistry.getStencil(l)?l=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(l=mxConstants.SHAPE_SWIMLANE);l=rb[l];null==l&&null!=this.state.shape&&this.state.shape.isRoundable()&&(l=rb[mxConstants.SHAPE_RECTANGLE]);null!=l&&(l=l(this.state),null!=l&&(c=null==c?l:c.concat(l)))}return c};mxEdgeHandler.prototype.createCustomHandles=function(){var c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&null==mxStencilRegistry.getStencil(c)&&(c=mxConstants.SHAPE_CONNECTOR);
c=rb[c];return null!=c?c(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var zb=new mxPoint(1,0),wb=new mxPoint(1,0),Ab=mxUtils.toRadians(-30);zb=mxUtils.getRotatedPoint(zb,Math.cos(Ab),Math.sin(Ab));var lb=mxUtils.toRadians(-150);wb=mxUtils.getRotatedPoint(wb,Math.cos(lb),Math.sin(lb));mxEdgeStyle.IsometricConnector=function(c,l,x,p,v){var A=c.view;p=null!=p&&0<p.length?p[0]:null;var B=c.absolutePoints,ka=B[0];B=B[B.length-1];null!=p&&(p=A.transformControlPoint(c,p));
-null==ka&&null!=l&&(ka=new mxPoint(l.getCenterX(),l.getCenterY()));null==B&&null!=x&&(B=new mxPoint(x.getCenterX(),x.getCenterY()));var J=zb.x,xa=zb.y,oa=wb.x,$a=wb.y,jb="horizontal"==mxUtils.getValue(c.style,"elbow","horizontal");if(null!=B&&null!=ka){c=function(Ea,Ka,Ia){Ea-=hb.x;var Ha=Ka-hb.y;Ka=($a*Ea-oa*Ha)/(J*$a-xa*oa);Ea=(xa*Ea-J*Ha)/(xa*oa-J*$a);jb?(Ia&&(hb=new mxPoint(hb.x+J*Ka,hb.y+xa*Ka),v.push(hb)),hb=new mxPoint(hb.x+oa*Ea,hb.y+$a*Ea)):(Ia&&(hb=new mxPoint(hb.x+oa*Ea,hb.y+$a*Ea),v.push(hb)),
-hb=new mxPoint(hb.x+J*Ka,hb.y+xa*Ka));v.push(hb)};var hb=ka;null==p&&(p=new mxPoint(ka.x+(B.x-ka.x)/2,ka.y+(B.y-ka.y)/2));c(p.x,p.y,!0);c(B.x,B.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var xb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,l){if(l==mxEdgeStyle.IsometricConnector){var x=new mxElbowEdgeHandler(c);x.snapToTerminals=!1;return x}return xb.apply(this,arguments)};t.prototype.constraints=[];E.prototype.getConstraints=
+null==ka&&null!=l&&(ka=new mxPoint(l.getCenterX(),l.getCenterY()));null==B&&null!=x&&(B=new mxPoint(x.getCenterX(),x.getCenterY()));var J=zb.x,wa=zb.y,oa=wb.x,ab=wb.y,jb="horizontal"==mxUtils.getValue(c.style,"elbow","horizontal");if(null!=B&&null!=ka){c=function(Ea,La,Ia){Ea-=gb.x;var Ga=La-gb.y;La=(ab*Ea-oa*Ga)/(J*ab-wa*oa);Ea=(wa*Ea-J*Ga)/(wa*oa-J*ab);jb?(Ia&&(gb=new mxPoint(gb.x+J*La,gb.y+wa*La),v.push(gb)),gb=new mxPoint(gb.x+oa*Ea,gb.y+ab*Ea)):(Ia&&(gb=new mxPoint(gb.x+oa*Ea,gb.y+ab*Ea),v.push(gb)),
+gb=new mxPoint(gb.x+J*La,gb.y+wa*La));v.push(gb)};var gb=ka;null==p&&(p=new mxPoint(ka.x+(B.x-ka.x)/2,ka.y+(B.y-ka.y)/2));c(p.x,p.y,!0);c(B.x,B.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var xb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,l){if(l==mxEdgeStyle.IsometricConnector){var x=new mxElbowEdgeHandler(c);x.snapToTerminals=!1;return x}return xb.apply(this,arguments)};t.prototype.constraints=[];E.prototype.getConstraints=
function(c,l,x){c=[];var p=Math.tan(mxUtils.toRadians(30)),v=(.5-p)/2;p=Math.min(l,x/(.5+p));l=(l-p)/2;x=(x-p)/2;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,x+.25*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+.5*p,x+p*v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+p,x+.25*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+p,x+.75*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+.5*p,x+(1-v)*p));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,l,x+.75*p));return c};m.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;p=Math.min(l*Math.tan(p),.5*x);c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,p));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,x-p));c.push(new mxConnectionConstraint(new mxPoint(.5,
-1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));return c};ja.prototype.getConstraints=function(c,l,x){c=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var p=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var v=l*Math.max(0,
+1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));return c};ma.prototype.getConstraints=function(c,l,x){c=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var p=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var v=l*Math.max(0,
Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(x-p)));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,l,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(x-p)));l>=2*p&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,
-1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];La.prototype.constraints=mxRectangleShape.prototype.constraints;
-mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;da.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;f.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(0,Math.min(l,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];Ma.prototype.constraints=mxRectangleShape.prototype.constraints;
+mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;ia.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;f.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(0,Math.min(l,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*(l-p),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-p,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*p,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(x+p)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
.5),!1));l>=2*p&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};G.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(0,Math.min(l,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+p),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,0,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(x+p)));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));l>=2*p&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};n.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(0,Math.min(l,Math.min(x,parseFloat(mxUtils.getValue(this.style,
@@ -2901,37 +2904,37 @@ mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwim
function(c,l,x){c=[];var p=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),v=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(c.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,0)),c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,p,v)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+p),v))):(c.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*p,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-p,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-p,v)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-p),v)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,l,.25*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.75*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,.75*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x));c.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return c};Oa.prototype.constraints=mxRectangleShape.prototype.constraints;K.prototype.constraints=mxRectangleShape.prototype.constraints;na.prototype.constraints=mxEllipse.prototype.constraints;va.prototype.constraints=mxEllipse.prototype.constraints;
-pa.prototype.constraints=mxEllipse.prototype.constraints;Ua.prototype.constraints=mxEllipse.prototype.constraints;Ta.prototype.constraints=mxRectangleShape.prototype.constraints;Sa.prototype.constraints=mxRectangleShape.prototype.constraints;wa.prototype.getConstraints=function(c,l,x){c=[];var p=Math.min(l,x/2),v=Math.min(l-p,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*l);c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,v,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(v+l-p),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-p,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-p,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(v+l-p),x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));return c};ua.prototype.getConstraints=function(c,l,x){l=parseFloat(mxUtils.getValue(c,
-"jettyWidth",ua.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c,"jettyHeight",ua.prototype.jettyHeight));var p=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,l),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,
+0),!1,null,0,.75*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x));c.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return c};Ra.prototype.constraints=mxRectangleShape.prototype.constraints;K.prototype.constraints=mxRectangleShape.prototype.constraints;na.prototype.constraints=mxEllipse.prototype.constraints;ya.prototype.constraints=mxEllipse.prototype.constraints;
+ra.prototype.constraints=mxEllipse.prototype.constraints;Wa.prototype.constraints=mxEllipse.prototype.constraints;Ua.prototype.constraints=mxRectangleShape.prototype.constraints;Sa.prototype.constraints=mxRectangleShape.prototype.constraints;Ja.prototype.getConstraints=function(c,l,x){c=[];var p=Math.min(l,x/2),v=Math.min(l-p,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*l);c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,v,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(v+l-p),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-p,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-p,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(v+l-p),x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));return c};va.prototype.getConstraints=function(c,l,x){l=parseFloat(mxUtils.getValue(c,
+"jettyWidth",va.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c,"jettyHeight",va.prototype.jettyHeight));var p=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,l),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,
.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,l),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(x-.5*c,1.5*c)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(x-.5*c,3.5*c))];x>5*c&&p.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,l));x>8*c&&p.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1,null,l));x>15*c&&p.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,l));return p};V.prototype.constraints=mxRectangleShape.prototype.constraints;ia.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
-.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];aa.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)];sa.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,
+.5),!1,null,l));x>15*c&&p.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,l));return p};V.prototype.constraints=mxRectangleShape.prototype.constraints;ja.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
+.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];ba.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)];ua.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)];F.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)];U.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,
-.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ca.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,
+.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];Z.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,
+.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];T.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,
+.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];da.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,
0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,
.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,
1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,
-.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];Z.prototype.constraints=mxRectangleShape.prototype.constraints;X.prototype.constraints=mxRectangleShape.prototype.constraints;ba.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
-0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;eb.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),v=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,
+.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];aa.prototype.constraints=mxRectangleShape.prototype.constraints;Y.prototype.constraints=mxRectangleShape.prototype.constraints;ca.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
+0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;db.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),v=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,
"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*l+.25*p,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+p),v));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*(l+p),.5*(x+v)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+p),x));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-p),x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-p),.5*(x+v)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-p),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*l-.25*p,v));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*v));return c};Xa.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),v=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*v));return c};Za.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),v=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,l,.5*v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+p),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*(x+v)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,x));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-1),!1));return c};Ga.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];bb.prototype.getConstraints=
+1),!1));return c};Ha.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];cb.prototype.getConstraints=
function(c,l,x){c=[];var p=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),v=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));p=(x-p)/2;c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-v),p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-v,0));c.push(new mxConnectionConstraint(new mxPoint(1,
-.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-v),x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-p));return c};z.prototype.getConstraints=function(c,l,x){c=[];var p=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",bb.prototype.arrowWidth)))),v=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",bb.prototype.arrowSize))));p=(x-p)/2;c.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-v),x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-p));return c};z.prototype.getConstraints=function(c,l,x){c=[];var p=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",cb.prototype.arrowWidth)))),v=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",cb.prototype.arrowSize))));p=(x-p)/2;c.push(new mxConnectionConstraint(new mxPoint(0,
.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-v,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));return c};Fa.prototype.getConstraints=
function(c,l,x){c=[];var p=Math.min(x,l),v=Math.max(0,Math.min(p,p*parseFloat(mxUtils.getValue(this.style,"size",this.size))));p=(x-v)/2;var A=p+v,B=(l-v)/2;v=B+v;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,0));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,v,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,x-.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,x));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x-.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+v),p));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,l,p));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+v),A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*B,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*B,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,p));return c};S.prototype.constraints=null;M.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,
-.9),!1)];T.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];fa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ra.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*B,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,p));return c};W.prototype.constraints=null;L.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,
+.9),!1)];S.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];ea.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];qa.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(g){t.escape();g=t.deleteCells(t.getDeletableCells(t.getSelectionCells()),g);null!=g&&t.setSelectionCells(g)}function e(){if(!t.isSelectionEmpty()){t.getModel().beginUpdate();try{for(var g=t.getSelectionCells(),m=0;m<g.length;m++)t.cellLabelChanged(g[m],"")}finally{t.getModel().endUpdate()}}}function k(g,m,q,y,F){F.getModel().beginUpdate();try{var C=F.getCellGeometry(g);null!=C&&q&&y&&(q/=y,C=C.clone(),1<q?C.height=C.width/q:C.width=C.height*q,F.getModel().setGeometry(g,
C));F.setCellStyles(mxConstants.STYLE_CLIP_PATH,m,[g]);F.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[g])}finally{F.getModel().endUpdate()}}var n=this.editorUi,D=n.editor,t=D.graph,E=function(){return Action.prototype.isEnabled.apply(this,arguments)&&t.isEnabled()};this.addAction("new...",function(){t.openLink(n.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";n.openFile()});this.addAction("smartFit",function(){t.popupMenuHandler.hideMenu();var g=t.view.scale,
@@ -2940,7 +2943,7 @@ window.openFile.setConsumer(mxUtils.bind(this,function(g,m){try{var q=mxUtils.pa
null,Editor.ctrlKey+"+Shift+S").isEnabled=E;this.addAction("export...",function(){n.showDialog((new ExportDialog(n)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var g=new EditDiagramDialog(n);n.showDialog(g.container,620,420,!0,!1);g.init()});this.addAction("pageSetup...",function(){n.showDialog((new PageSetupDialog(n)).container,320,240,!0,!0)}).isEnabled=E;this.addAction("print...",function(){n.showDialog((new PrintDialog(n)).container,300,180,!0,!0)},null,"sprite-print",
Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(t,null,10,10)});this.addAction("undo",function(){n.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){n.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var g=null;try{g=n.copyXml(),null!=g&&t.removeCells(g,!1)}catch(m){}null==g&&mxClipboard.cut(t)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{n.copyXml()}catch(g){}try{mxClipboard.copy(t)}catch(g){n.handleError(g)}},
null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())){var g=!1;try{Editor.enableNativeCipboard&&(n.readGraphModelFromClipboard(function(m){if(null!=m){t.getModel().beginUpdate();try{n.pasteXml(m,!0)}finally{t.getModel().endUpdate()}}else mxClipboard.paste(t)}),g=!0)}catch(m){}g||mxClipboard.paste(t)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(g){function m(y){if(null!=y){for(var F=!0,C=0;C<
-y.length&&F;C++)F=F&&t.model.isEdge(y[C]);var I=t.view.translate;C=t.view.scale;var G=I.x,Y=I.y;I=null;if(1==y.length&&F){var ba=t.getCellGeometry(y[0]);null!=ba&&(I=ba.getTerminalPoint(!0))}I=null!=I?I:t.getBoundingBoxFromGeometry(y,F);null!=I&&(F=Math.round(t.snap(t.popupMenuHandler.triggerX/C-G)),C=Math.round(t.snap(t.popupMenuHandler.triggerY/C-Y)),t.cellsMoved(y,F-I.x,C-I.y))}}function q(){t.getModel().beginUpdate();try{m(mxClipboard.paste(t))}finally{t.getModel().endUpdate()}}if(t.isEnabled()&&
+y.length&&F;C++)F=F&&t.model.isEdge(y[C]);var I=t.view.translate;C=t.view.scale;var G=I.x,Z=I.y;I=null;if(1==y.length&&F){var ca=t.getCellGeometry(y[0]);null!=ca&&(I=ca.getTerminalPoint(!0))}I=null!=I?I:t.getBoundingBoxFromGeometry(y,F);null!=I&&(F=Math.round(t.snap(t.popupMenuHandler.triggerX/C-G)),C=Math.round(t.snap(t.popupMenuHandler.triggerY/C-Z)),t.cellsMoved(y,F-I.x,C-I.y))}}function q(){t.getModel().beginUpdate();try{m(mxClipboard.paste(t))}finally{t.getModel().endUpdate()}}if(t.isEnabled()&&
!t.isCellLocked(t.getDefaultParent())){g=!1;try{Editor.enableNativeCipboard&&(n.readGraphModelFromClipboard(function(y){if(null!=y){t.getModel().beginUpdate();try{m(n.pasteXml(y,!0))}finally{t.getModel().endUpdate()}}else q()}),g=!0)}catch(y){}g||q()}});this.addAction("copySize",function(){var g=t.getSelectionCell();t.isEnabled()&&null!=g&&t.getModel().isVertex(g)&&(g=t.getCellGeometry(g),null!=g&&(n.copiedSize=new mxRectangle(g.x,g.y,g.width,g.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",
function(){if(t.isEnabled()&&!t.isSelectionEmpty()&&null!=n.copiedSize){t.getModel().beginUpdate();try{for(var g=t.getResizableCells(t.getSelectionCells()),m=0;m<g.length;m++)if(t.getModel().isVertex(g[m])){var q=t.getCellGeometry(g[m]);null!=q&&(q=q.clone(),q.width=n.copiedSize.width,q.height=n.copiedSize.height,t.getModel().setGeometry(g[m],q))}}finally{t.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",function(){var g=t.getSelectionCell()||t.getModel().getRoot();t.isEnabled()&&
null!=g&&(g=g.cloneValue(),null==g||isNaN(g.nodeType)||(n.copiedValue=g))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(g,m){function q(C,I){var G=y.getValue(C);I=C.cloneValue(I);I.removeAttribute("placeholders");null==G||isNaN(G.nodeType)||I.setAttribute("placeholders",G.getAttribute("placeholders"));null!=g&&mxEvent.isShiftDown(g)||I.setAttribute("label",t.convertValueToString(C));y.setValue(C,I)}g=null!=m?m:g;var y=t.getModel();if(t.isEnabled()&&!t.isSelectionEmpty()&&null!=n.copiedValue){y.beginUpdate();
@@ -2989,9 +2992,9 @@ null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function
t.getModel().getParent(g),C=t.getCellGeometry(g);F=Math.round(t.snap(t.popupMenuHandler.triggerX/y-F));y=Math.round(t.snap(t.popupMenuHandler.triggerY/y-q));m.addPointAt(m.state,F,y)}}});this.addAction("removeWaypoint",function(){var g=n.actions.get("removeWaypoint");null!=g.handler&&g.handler.removePoint(g.handler.state,g.index)});this.addAction("clearWaypoints",function(g,m){g=null!=m?m:g;var q=t.getSelectionCells();if(null!=q){q=t.getEditableCells(t.addAllEdges(q));t.getModel().beginUpdate();try{for(var y=
0;y<q.length;y++){var F=q[y];if(t.getModel().isEdge(F)){var C=t.getCellGeometry(F);null!=m&&mxEvent.isShiftDown(g)?(t.setCellStyles(mxConstants.STYLE_EXIT_X,null,[F]),t.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[F]),t.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[F]),t.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[F])):null!=C&&(C=C.clone(),C.points=null,C.x=0,C.y=0,C.offset=null,t.getModel().setGeometry(F,C))}}}finally{t.getModel().endUpdate()}}},null,null,"Alt+Shift+C");d=this.addAction("subscript",
mxUtils.bind(this,function(){t.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");d=this.addAction("superscript",mxUtils.bind(this,function(){t.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())){var g=mxResources.get("image")+" ("+mxResources.get("url")+"):",m=t.getView().getState(t.getSelectionCell()),
-q="",y=null;null!=m&&(q=m.style[mxConstants.STYLE_IMAGE]||q,y=m.style[mxConstants.STYLE_CLIP_PATH]||y);var F=t.cellEditor.saveSelection();n.showImageDialog(g,q,function(C,I,G,Y,ba,Z){if(t.cellEditor.isContentEditing())t.cellEditor.restoreSelection(F),t.insertImage(C,I,G);else{var X=t.getSelectionCells();if(null!=C&&(0<C.length||0<X.length)){var qa=null;t.getModel().beginUpdate();try{if(0==X.length){X=[t.insertVertex(t.getDefaultParent(),null,"",0,0,I,G,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];
-var Q=t.getCenterInsertPoint(t.getBoundingBoxFromGeometry(X,!0));X[0].geometry.x=Q.x;X[0].geometry.y=Q.y;null!=Y&&k(X[0],Y,ba,Z,t);qa=X;t.fireEvent(new mxEventObject("cellsInserted","cells",qa))}t.setCellStyles(mxConstants.STYLE_IMAGE,0<C.length?C:null,X);var W=t.getCurrentCellStyle(X[0]);"image"!=W[mxConstants.STYLE_SHAPE]&&"label"!=W[mxConstants.STYLE_SHAPE]?t.setCellStyles(mxConstants.STYLE_SHAPE,"image",X):0==C.length&&t.setCellStyles(mxConstants.STYLE_SHAPE,null,X);if(1==t.getSelectionCount()&&
-null!=I&&null!=G){var ha=X[0],la=t.getModel().getGeometry(ha);null!=la&&(la=la.clone(),la.width=I,la.height=G,t.getModel().setGeometry(ha,la));null!=Y?k(ha,Y,ba,Z,t):t.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,X)}}finally{t.getModel().endUpdate()}null!=qa&&(t.setSelectionCells(qa),t.scrollCellToVisible(qa[0]))}}},t.cellEditor.isContentEditing(),!t.cellEditor.isContentEditing(),!0,y)}}).isEnabled=E;this.addAction("crop...",function(){var g=t.getSelectionCell();if(t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&
+q="",y=null;null!=m&&(q=m.style[mxConstants.STYLE_IMAGE]||q,y=m.style[mxConstants.STYLE_CLIP_PATH]||y);var F=t.cellEditor.saveSelection();n.showImageDialog(g,q,function(C,I,G,Z,ca,aa){if(t.cellEditor.isContentEditing())t.cellEditor.restoreSelection(F),t.insertImage(C,I,G);else{var Y=t.getSelectionCells();if(null!=C&&(0<C.length||0<Y.length)){var pa=null;t.getModel().beginUpdate();try{if(0==Y.length){Y=[t.insertVertex(t.getDefaultParent(),null,"",0,0,I,G,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];
+var Q=t.getCenterInsertPoint(t.getBoundingBoxFromGeometry(Y,!0));Y[0].geometry.x=Q.x;Y[0].geometry.y=Q.y;null!=Z&&k(Y[0],Z,ca,aa,t);pa=Y;t.fireEvent(new mxEventObject("cellsInserted","cells",pa))}t.setCellStyles(mxConstants.STYLE_IMAGE,0<C.length?C:null,Y);var X=t.getCurrentCellStyle(Y[0]);"image"!=X[mxConstants.STYLE_SHAPE]&&"label"!=X[mxConstants.STYLE_SHAPE]?t.setCellStyles(mxConstants.STYLE_SHAPE,"image",Y):0==C.length&&t.setCellStyles(mxConstants.STYLE_SHAPE,null,Y);if(1==t.getSelectionCount()&&
+null!=I&&null!=G){var ha=Y[0],U=t.getModel().getGeometry(ha);null!=U&&(U=U.clone(),U.width=I,U.height=G,t.getModel().setGeometry(ha,U));null!=Z?k(ha,Z,ca,aa,t):t.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,Y)}}finally{t.getModel().endUpdate()}null!=pa&&(t.setSelectionCells(pa),t.scrollCellToVisible(pa[0]))}}},t.cellEditor.isContentEditing(),!t.cellEditor.isContentEditing(),!0,y)}}).isEnabled=E;this.addAction("crop...",function(){var g=t.getSelectionCell();if(t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&
null!=g){var m=t.getCurrentCellStyle(g),q=m[mxConstants.STYLE_IMAGE],y=m[mxConstants.STYLE_SHAPE];q&&"image"==y&&(m=new CropImageDialog(n,q,m[mxConstants.STYLE_CLIP_PATH],function(F,C,I){k(g,F,C,I,t)}),n.showDialog(m.container,300,390,!0,!0))}}).isEnabled=E;d=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(n,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",mxUtils.bind(this,function(){n.fireEvent(new mxEventObject("layers"))})),
this.layersWindow.window.addListener("hide",function(){n.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),n.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");d.setToggleAction(!0);d.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));d=this.addAction("formatPanel",mxUtils.bind(this,
function(){n.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");d.setToggleAction(!0);d.setSelectedCallback(mxUtils.bind(this,function(){return 0<n.formatWidth}));d=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(n,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){n.fireEvent(new mxEventObject("outline"))})),this.outlineWindow.window.addListener("hide",function(){n.fireEvent(new mxEventObject("outline"))}),
@@ -3007,7 +3010,7 @@ e))}catch(t){null!=e&&e(t)}}),e))};
DrawioFile.prototype.mergeFile=function(b,e,k,n){var D=!0;try{this.stats.fileMerged++;var t=this.getShadowPages(),E=b.getShadowPages();if(null!=E&&0<E.length){var d=[this.ui.diffPages(null!=n?n:t,E)],f=this.ignorePatches(d);this.setShadowPages(E);if(f)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",f);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(t,this.ui.pages):null;n={};f={};var g=this.ui.patchPages(t,d[0]),m=this.ui.getHashValueForPages(g,
n),q=this.ui.getHashValueForPages(E,f);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",t,"pages",this.ui.pages,"patches",d,"backup",this.backupPatch,"checksum",m,"current",q,"valid",m==q,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=m&&m!=q){var y=this.compressReportData(this.getAnonymizedXmlForPages(E)),F=this.compressReportData(this.getAnonymizedXmlForPages(g)),C=this.ui.hashValue(b.getCurrentEtag()),I=this.ui.hashValue(this.getCurrentEtag());
this.checksumError(k,d,"Shadow Details: "+JSON.stringify(n)+"\nChecksum: "+m+"\nCurrent: "+q+"\nCurrent Details: "+JSON.stringify(f)+"\nFrom: "+C+"\nTo: "+I+"\n\nFile Data:\n"+y+"\nPatched Shadow:\n"+F,null,"mergeFile");return}if(null!=this.sync){var G=this.sync.patchRealtime(d,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==G||mxUtils.isEmptyObject(G)||d.push(G)}this.patch(d,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw D=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=
-this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=e&&e()}catch(Z){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=k&&k(Z);try{if(D)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,Z);else{var Y=this.getCurrentUser(),ba=null!=Y?Y.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),ba,Z)}}catch(X){}}};
+this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=e&&e()}catch(aa){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=k&&k(aa);try{if(D)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,aa);else{var Z=this.getCurrentUser(),ca=null!=Z?Z.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),ca,aa)}}catch(Y){}}};
DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var e=new mxCodec(mxUtils.createXmlDocument()),k=e.document.createElement("mxfile");if(null!=b)for(var n=0;n<b.length;n++){var D=e.encode(new mxGraphModel(b[n].root));"1"!=urlParams.dev&&(D=this.ui.anonymizeNode(D,!0));D.setAttribute("id",b[n].getId());b[n].viewState&&this.ui.editor.graph.saveViewState(b[n].viewState,D,!0);k.appendChild(D)}return mxUtils.getPrettyXml(k)};
DrawioFile.prototype.compressReportData=function(b,e,k){e=null!=e?e:1E4;null!=k&&null!=b&&b.length>k?b=b.substring(0,k)+"[...]":null!=b&&b.length>e&&(b=Graph.compress(b)+"\n");return b};
DrawioFile.prototype.checksumError=function(b,e,k,n,D){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=e)for(b=0;b<e.length;b++)this.ui.anonymizePatch(e[b]);var t=mxUtils.bind(this,function(g){var m=this.compressReportData(JSON.stringify(e,null,2));g=null==g?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(g.data)),
@@ -3130,195 +3133,195 @@ H.isVertex(H.getParent(u.vertices[0])):!1}},{name:"editable",dispName:"Editable"
{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"fixedWidth",dispName:"Fixed Width",type:"bool",defVal:!1},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},
{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(u,H){var P=mxUtils.getValue(u.style,mxConstants.STYLE_FILLCOLOR,null);return H.editorUi.editor.graph.isSwimlane(u.vertices[0])||null==P||P==mxConstants.NONE||0==mxUtils.getValue(u.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(u.style,mxConstants.STYLE_OPACITY,100)||
null!=u.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(u,H){return 0<u.vertices.length&&H.editorUi.editor.graph.isContainer(u.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Collapsed state for vertices. Possible values are true or false. Default is false.\n#\n# collapsed: false\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
-Editor.createRoughCanvas=function(u){var H=rough.canvas({getContext:function(){return u}});H.draw=function(P){var S=P.sets||[];P=P.options||this.getDefaultOptions();for(var R=0;R<S.length;R++){var ca=S[R];switch(ca.type){case "path":null!=P.stroke&&this._drawToContext(u,ca,P);break;case "fillPath":this._drawToContext(u,ca,P);break;case "fillSketch":this.fillSketch(u,ca,P)}}};H.fillSketch=function(P,S,R){var ca=u.state.strokeColor,ea=u.state.strokeWidth,fa=u.state.strokeAlpha,ra=u.state.dashed,ua=
-R.fillWeight;0>ua&&(ua=R.strokeWidth/2);u.setStrokeAlpha(u.state.fillAlpha);u.setStrokeColor(R.fill||"");u.setStrokeWidth(ua);u.setDashed(!1);this._drawToContext(P,S,R);u.setDashed(ra);u.setStrokeWidth(ea);u.setStrokeColor(ca);u.setStrokeAlpha(fa)};H._drawToContext=function(P,S,R){P.begin();for(var ca=0;ca<S.ops.length;ca++){var ea=S.ops[ca],fa=ea.data;switch(ea.op){case "move":P.moveTo(fa[0],fa[1]);break;case "bcurveTo":P.curveTo(fa[0],fa[1],fa[2],fa[3],fa[4],fa[5]);break;case "lineTo":P.lineTo(fa[0],
-fa[1])}}P.end();"fillPath"===S.type&&R.filled?P.fill():P.stroke()};return H};(function(){function u(ca,ea,fa){this.canvas=ca;this.rc=ea;this.shape=fa;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,u.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,u.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,u.prototype.rect);this.originalRoundrect=
+Editor.createRoughCanvas=function(u){var H=rough.canvas({getContext:function(){return u}});H.draw=function(P){var W=P.sets||[];P=P.options||this.getDefaultOptions();for(var R=0;R<W.length;R++){var da=W[R];switch(da.type){case "path":null!=P.stroke&&this._drawToContext(u,da,P);break;case "fillPath":this._drawToContext(u,da,P);break;case "fillSketch":this.fillSketch(u,da,P)}}};H.fillSketch=function(P,W,R){var da=u.state.strokeColor,fa=u.state.strokeWidth,ea=u.state.strokeAlpha,qa=u.state.dashed,va=
+R.fillWeight;0>va&&(va=R.strokeWidth/2);u.setStrokeAlpha(u.state.fillAlpha);u.setStrokeColor(R.fill||"");u.setStrokeWidth(va);u.setDashed(!1);this._drawToContext(P,W,R);u.setDashed(qa);u.setStrokeWidth(fa);u.setStrokeColor(da);u.setStrokeAlpha(ea)};H._drawToContext=function(P,W,R){P.begin();for(var da=0;da<W.ops.length;da++){var fa=W.ops[da],ea=fa.data;switch(fa.op){case "move":P.moveTo(ea[0],ea[1]);break;case "bcurveTo":P.curveTo(ea[0],ea[1],ea[2],ea[3],ea[4],ea[5]);break;case "lineTo":P.lineTo(ea[0],
+ea[1])}}P.end();"fillPath"===W.type&&R.filled?P.fill():P.stroke()};return H};(function(){function u(da,fa,ea){this.canvas=da;this.rc=fa;this.shape=ea;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,u.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,u.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,u.prototype.rect);this.originalRoundrect=
this.canvas.roundrect;this.canvas.roundrect=mxUtils.bind(this,u.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,u.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,u.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,u.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,u.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
this.canvas.curveTo=mxUtils.bind(this,u.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,u.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,u.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,u.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,u.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=
-mxUtils.bind(this,u.prototype.fillAndStroke);this.path=[];this.passThrough=!1}u.prototype.moveOp="M";u.prototype.lineOp="L";u.prototype.quadOp="Q";u.prototype.curveOp="C";u.prototype.closeOp="Z";u.prototype.getStyle=function(ca,ea){var fa=1;if(null!=this.shape.state){var ra=this.shape.state.cell.id;if(null!=ra)for(var ua=0;ua<ra.length;ua++)fa=(fa<<5)-fa+ra.charCodeAt(ua)<<0}fa={strokeWidth:this.canvas.state.strokeWidth,seed:fa,preserveVertices:!0};ra=this.rc.getDefaultOptions();fa.stroke=ca?this.canvas.state.strokeColor===
-mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;ca=null;(fa.filled=ea)?(fa.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,ca=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):fa.fill="";fa.bowing=mxUtils.getValue(this.shape.style,"bowing",ra.bowing);fa.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",ra.hachureAngle);fa.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",
-ra.curveFitting);fa.roughness=mxUtils.getValue(this.shape.style,"jiggle",ra.roughness);fa.simplification=mxUtils.getValue(this.shape.style,"simplification",ra.simplification);fa.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",ra.disableMultiStroke);fa.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",ra.disableMultiStrokeFill);ea=mxUtils.getValue(this.shape.style,"hachureGap",-1);fa.hachureGap="auto"==ea?-1:ea;fa.dashGap=mxUtils.getValue(this.shape.style,
-"dashGap",ea);fa.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",ea);fa.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",ea);ea=mxUtils.getValue(this.shape.style,"fillWeight",-1);fa.fillWeight="auto"==ea?-1:ea;ea=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==ea&&(ea=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),ea=null!=fa.fill&&(null!=ca||null!=ea&&fa.fill==ea)?"solid":
-ra.fillStyle);fa.fillStyle=ea;return fa};u.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};u.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};u.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var ca=2;ca<arguments.length;ca+=2)this.lastX=arguments[ca-1],this.lastY=arguments[ca],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};
-u.prototype.lineTo=function(ca,ea){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,ca,ea),this.lastX=ca,this.lastY=ea)};u.prototype.moveTo=function(ca,ea){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,ca,ea),this.lastX=ca,this.lastY=ea,this.firstX=ca,this.firstY=ea)};u.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};u.prototype.quadTo=function(ca,
-ea,fa,ra){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,ca,ea,fa,ra),this.lastX=fa,this.lastY=ra)};u.prototype.curveTo=function(ca,ea,fa,ra,ua,sa){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,ca,ea,fa,ra,ua,sa),this.lastX=ua,this.lastY=sa)};u.prototype.arcTo=function(ca,ea,fa,ra,ua,sa,Aa){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var Ca=mxUtils.arcToCurves(this.lastX,this.lastY,
-ca,ea,fa,ra,ua,sa,Aa);if(null!=Ca)for(var Ba=0;Ba<Ca.length;Ba+=6)this.curveTo(Ca[Ba],Ca[Ba+1],Ca[Ba+2],Ca[Ba+3],Ca[Ba+4],Ca[Ba+5]);this.lastX=sa;this.lastY=Aa}};u.prototype.rect=function(ca,ea,fa,ra){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(ca,ea,fa,ra,this.getStyle(!0,!0)))};u.prototype.ellipse=function(ca,ea,fa,ra){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(ca+
-fa/2,ea+ra/2,fa,ra,this.getStyle(!0,!0)))};u.prototype.roundrect=function(ca,ea,fa,ra,ua,sa){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(ca+ua,ea),this.lineTo(ca+fa-ua,ea),this.quadTo(ca+fa,ea,ca+fa,ea+sa),this.lineTo(ca+fa,ea+ra-sa),this.quadTo(ca+fa,ea+ra,ca+fa-ua,ea+ra),this.lineTo(ca+ua,ea+ra),this.quadTo(ca,ea+ra,ca,ea+ra-sa),this.lineTo(ca,ea+sa),this.quadTo(ca,ea,ca+ua,ea))};u.prototype.drawPath=function(ca){if(0<this.path.length){this.passThrough=
-!0;try{this.rc.path(this.path.join(" "),ca)}catch(fa){}this.passThrough=!1}else if(null!=this.nextShape){for(var ea in ca)this.nextShape.options[ea]=ca[ea];ca.stroke!=mxConstants.NONE&&null!=ca.stroke||delete this.nextShape.options.stroke;ca.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};u.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};u.prototype.fill=
+mxUtils.bind(this,u.prototype.fillAndStroke);this.path=[];this.passThrough=!1}u.prototype.moveOp="M";u.prototype.lineOp="L";u.prototype.quadOp="Q";u.prototype.curveOp="C";u.prototype.closeOp="Z";u.prototype.getStyle=function(da,fa){var ea=1;if(null!=this.shape.state){var qa=this.shape.state.cell.id;if(null!=qa)for(var va=0;va<qa.length;va++)ea=(ea<<5)-ea+qa.charCodeAt(va)<<0}ea={strokeWidth:this.canvas.state.strokeWidth,seed:ea,preserveVertices:!0};qa=this.rc.getDefaultOptions();ea.stroke=da?this.canvas.state.strokeColor===
+mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;da=null;(ea.filled=fa)?(ea.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,da=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):ea.fill="";ea.bowing=mxUtils.getValue(this.shape.style,"bowing",qa.bowing);ea.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",qa.hachureAngle);ea.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",
+qa.curveFitting);ea.roughness=mxUtils.getValue(this.shape.style,"jiggle",qa.roughness);ea.simplification=mxUtils.getValue(this.shape.style,"simplification",qa.simplification);ea.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",qa.disableMultiStroke);ea.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",qa.disableMultiStrokeFill);fa=mxUtils.getValue(this.shape.style,"hachureGap",-1);ea.hachureGap="auto"==fa?-1:fa;ea.dashGap=mxUtils.getValue(this.shape.style,
+"dashGap",fa);ea.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",fa);ea.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",fa);fa=mxUtils.getValue(this.shape.style,"fillWeight",-1);ea.fillWeight="auto"==fa?-1:fa;fa=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==fa&&(fa=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),fa=null!=ea.fill&&(null!=da||null!=fa&&ea.fill==fa)?"solid":
+qa.fillStyle);ea.fillStyle=fa;return ea};u.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};u.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};u.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var da=2;da<arguments.length;da+=2)this.lastX=arguments[da-1],this.lastY=arguments[da],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};
+u.prototype.lineTo=function(da,fa){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,da,fa),this.lastX=da,this.lastY=fa)};u.prototype.moveTo=function(da,fa){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,da,fa),this.lastX=da,this.lastY=fa,this.firstX=da,this.firstY=fa)};u.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};u.prototype.quadTo=function(da,
+fa,ea,qa){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,da,fa,ea,qa),this.lastX=ea,this.lastY=qa)};u.prototype.curveTo=function(da,fa,ea,qa,va,ua){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,da,fa,ea,qa,va,ua),this.lastX=va,this.lastY=ua)};u.prototype.arcTo=function(da,fa,ea,qa,va,ua,Aa){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var za=mxUtils.arcToCurves(this.lastX,this.lastY,
+da,fa,ea,qa,va,ua,Aa);if(null!=za)for(var Ca=0;Ca<za.length;Ca+=6)this.curveTo(za[Ca],za[Ca+1],za[Ca+2],za[Ca+3],za[Ca+4],za[Ca+5]);this.lastX=ua;this.lastY=Aa}};u.prototype.rect=function(da,fa,ea,qa){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(da,fa,ea,qa,this.getStyle(!0,!0)))};u.prototype.ellipse=function(da,fa,ea,qa){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(da+
+ea/2,fa+qa/2,ea,qa,this.getStyle(!0,!0)))};u.prototype.roundrect=function(da,fa,ea,qa,va,ua){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(da+va,fa),this.lineTo(da+ea-va,fa),this.quadTo(da+ea,fa,da+ea,fa+ua),this.lineTo(da+ea,fa+qa-ua),this.quadTo(da+ea,fa+qa,da+ea-va,fa+qa),this.lineTo(da+va,fa+qa),this.quadTo(da,fa+qa,da,fa+qa-ua),this.lineTo(da,fa+ua),this.quadTo(da,fa,da+va,fa))};u.prototype.drawPath=function(da){if(0<this.path.length){this.passThrough=
+!0;try{this.rc.path(this.path.join(" "),da)}catch(ea){}this.passThrough=!1}else if(null!=this.nextShape){for(var fa in da)this.nextShape.options[fa]=da[fa];da.stroke!=mxConstants.NONE&&null!=da.stroke||delete this.nextShape.options.stroke;da.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};u.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};u.prototype.fill=
function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};u.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};u.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(ca){return new u(ca,Editor.createRoughCanvas(ca),this)};var H=mxShape.prototype.createHandJiggle;
-mxShape.prototype.createHandJiggle=function(ca){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?H.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(ca):this.createRoughCanvas(ca)};var P=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(ca,ea,fa,ra,ua){null!=ca.handJiggle&&ca.handJiggle.passThrough||P.apply(this,arguments)};var S=mxShape.prototype.paint;mxShape.prototype.paint=
-function(ca){var ea=ca.addTolerance,fa=!0;null!=this.style&&(fa="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=ca.handJiggle&&ca.handJiggle.constructor==u&&!this.outline){ca.save();var ra=this.fill,ua=this.stroke;this.stroke=this.fill=null;var sa=this.configurePointerEvents,Aa=ca.setStrokeColor;ca.setStrokeColor=function(){};var Ca=ca.setFillColor;ca.setFillColor=function(){};fa||null==ra||(this.configurePointerEvents=function(){});ca.handJiggle.passThrough=!0;S.apply(this,
-arguments);ca.handJiggle.passThrough=!1;ca.setFillColor=Ca;ca.setStrokeColor=Aa;this.configurePointerEvents=sa;this.stroke=ua;this.fill=ra;ca.restore();fa&&null!=ra&&(ca.addTolerance=function(){})}S.apply(this,arguments);ca.addTolerance=ea};var R=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(ca,ea,fa,ra,ua,sa){null!=ca.handJiggle&&ca.handJiggle.constructor==u?(ca.handJiggle.passThrough=!0,R.apply(this,arguments),ca.handJiggle.passThrough=!1):R.apply(this,arguments)}})();
-Editor.fastCompress=function(u){return null==u||0==u.length||"undefined"===typeof pako?u:Graph.arrayBufferToString(pako.deflateRaw(u))};Editor.fastDecompress=function(u){return null==u||0==u.length||"undefined"===typeof pako?u:pako.inflateRaw(Graph.stringToArrayBuffer(atob(u)),{to:"string"})};Editor.extractGraphModel=function(u,H,P){if(null!=u&&"undefined"!==typeof pako){var S=u.ownerDocument.getElementsByTagName("div"),R=[];if(null!=S&&0<S.length)for(var ca=0;ca<S.length;ca++)if("mxgraph"==S[ca].getAttribute("class")){R.push(S[ca]);
-break}0<R.length&&(S=R[0].getAttribute("data-mxgraph"),null!=S?(R=JSON.parse(S),null!=R&&null!=R.xml&&(u=mxUtils.parseXml(R.xml),u=u.documentElement)):(R=R[0].getElementsByTagName("div"),0<R.length&&(S=mxUtils.getTextContent(R[0]),S=Graph.decompress(S,null,P),0<S.length&&(u=mxUtils.parseXml(S),u=u.documentElement))))}if(null!=u&&"svg"==u.nodeName)if(S=u.getAttribute("content"),null!=S&&"<"!=S.charAt(0)&&"%"!=S.charAt(0)&&(S=unescape(window.atob?atob(S):Base64.decode(cont,S))),null!=S&&"%"==S.charAt(0)&&
-(S=decodeURIComponent(S)),null!=S&&0<S.length)u=mxUtils.parseXml(S).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==u||H||(R=null,"diagram"==u.nodeName?R=u:"mxfile"==u.nodeName&&(S=u.getElementsByTagName("diagram"),0<S.length&&(R=S[Math.max(0,Math.min(S.length-1,urlParams.page||0))])),null!=R&&(u=Editor.parseDiagramNode(R,P)));null==u||"mxGraphModel"==u.nodeName||H&&"mxfile"==u.nodeName||(u=null);return u};Editor.parseDiagramNode=function(u,H){var P=mxUtils.trim(mxUtils.getTextContent(u)),
-S=null;0<P.length?(u=Graph.decompress(P,null,H),null!=u&&0<u.length&&(S=mxUtils.parseXml(u).documentElement)):(u=mxUtils.getChildNodes(u),0<u.length&&(S=mxUtils.createXmlDocument(),S.appendChild(S.importNode(u[0],!0)),S=S.documentElement));return S};Editor.getDiagramNodeXml=function(u){var H=mxUtils.getTextContent(u),P=null;0<H.length?P=Graph.decompress(H):null!=u.firstChild&&(P=mxUtils.getXml(u.firstChild));return P};Editor.extractGraphModelFromPdf=function(u){u=u.substring(u.indexOf(",")+1);u=window.atob&&
-!mxClient.IS_SF?atob(u):Base64.decode(u,!0);if("%PDF-1.7"==u.substring(0,8)){var H=u.indexOf("EmbeddedFile");if(-1<H){var P=u.indexOf("stream",H)+9;if(0<u.substring(H,P).indexOf("application#2Fvnd.jgraph.mxfile"))return H=u.indexOf("endstream",P-1),pako.inflateRaw(Graph.stringToArrayBuffer(u.substring(P,H)),{to:"string"})}return null}P=null;H="";for(var S=0,R=0,ca=[],ea=null;R<u.length;){var fa=u.charCodeAt(R);R+=1;10!=fa&&(H+=String.fromCharCode(fa));fa=="/Subject (%3Cmxfile".charCodeAt(S)?S++:S=
-0;if(19==S){var ra=u.indexOf("%3C%2Fmxfile%3E)",R)+15;R-=9;if(ra>R){P=u.substring(R,ra);break}}10==fa&&("endobj"==H?ea=null:"obj"==H.substring(H.length-3,H.length)||"xref"==H||"trailer"==H?(ea=[],ca[H.split(" ")[0]]=ea):null!=ea&&ea.push(H),H="")}null==P&&(P=Editor.extractGraphModelFromXref(ca));null!=P&&(P=decodeURIComponent(P.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return P};Editor.extractGraphModelFromXref=function(u){var H=u.trailer,P=null;null!=H&&(H=/.* \/Info (\d+) (\d+) R/g.exec(H.join("\n")),
+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(da){return new u(da,Editor.createRoughCanvas(da),this)};var H=mxShape.prototype.createHandJiggle;
+mxShape.prototype.createHandJiggle=function(da){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?H.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(da):this.createRoughCanvas(da)};var P=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(da,fa,ea,qa,va){null!=da.handJiggle&&da.handJiggle.passThrough||P.apply(this,arguments)};var W=mxShape.prototype.paint;mxShape.prototype.paint=
+function(da){var fa=da.addTolerance,ea=!0;null!=this.style&&(ea="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=da.handJiggle&&da.handJiggle.constructor==u&&!this.outline){da.save();var qa=this.fill,va=this.stroke;this.stroke=this.fill=null;var ua=this.configurePointerEvents,Aa=da.setStrokeColor;da.setStrokeColor=function(){};var za=da.setFillColor;da.setFillColor=function(){};ea||null==qa||(this.configurePointerEvents=function(){});da.handJiggle.passThrough=!0;W.apply(this,
+arguments);da.handJiggle.passThrough=!1;da.setFillColor=za;da.setStrokeColor=Aa;this.configurePointerEvents=ua;this.stroke=va;this.fill=qa;da.restore();ea&&null!=qa&&(da.addTolerance=function(){})}W.apply(this,arguments);da.addTolerance=fa};var R=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(da,fa,ea,qa,va,ua){null!=da.handJiggle&&da.handJiggle.constructor==u?(da.handJiggle.passThrough=!0,R.apply(this,arguments),da.handJiggle.passThrough=!1):R.apply(this,arguments)}})();
+Editor.fastCompress=function(u){return null==u||0==u.length||"undefined"===typeof pako?u:Graph.arrayBufferToString(pako.deflateRaw(u))};Editor.fastDecompress=function(u){return null==u||0==u.length||"undefined"===typeof pako?u:pako.inflateRaw(Graph.stringToArrayBuffer(atob(u)),{to:"string"})};Editor.extractGraphModel=function(u,H,P){if(null!=u&&"undefined"!==typeof pako){var W=u.ownerDocument.getElementsByTagName("div"),R=[];if(null!=W&&0<W.length)for(var da=0;da<W.length;da++)if("mxgraph"==W[da].getAttribute("class")){R.push(W[da]);
+break}0<R.length&&(W=R[0].getAttribute("data-mxgraph"),null!=W?(R=JSON.parse(W),null!=R&&null!=R.xml&&(u=mxUtils.parseXml(R.xml),u=u.documentElement)):(R=R[0].getElementsByTagName("div"),0<R.length&&(W=mxUtils.getTextContent(R[0]),W=Graph.decompress(W,null,P),0<W.length&&(u=mxUtils.parseXml(W),u=u.documentElement))))}if(null!=u&&"svg"==u.nodeName)if(W=u.getAttribute("content"),null!=W&&"<"!=W.charAt(0)&&"%"!=W.charAt(0)&&(W=unescape(window.atob?atob(W):Base64.decode(cont,W))),null!=W&&"%"==W.charAt(0)&&
+(W=decodeURIComponent(W)),null!=W&&0<W.length)u=mxUtils.parseXml(W).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==u||H||(R=null,"diagram"==u.nodeName?R=u:"mxfile"==u.nodeName&&(W=u.getElementsByTagName("diagram"),0<W.length&&(R=W[Math.max(0,Math.min(W.length-1,urlParams.page||0))])),null!=R&&(u=Editor.parseDiagramNode(R,P)));null==u||"mxGraphModel"==u.nodeName||H&&"mxfile"==u.nodeName||(u=null);return u};Editor.parseDiagramNode=function(u,H){var P=mxUtils.trim(mxUtils.getTextContent(u)),
+W=null;0<P.length?(u=Graph.decompress(P,null,H),null!=u&&0<u.length&&(W=mxUtils.parseXml(u).documentElement)):(u=mxUtils.getChildNodes(u),0<u.length&&(W=mxUtils.createXmlDocument(),W.appendChild(W.importNode(u[0],!0)),W=W.documentElement));return W};Editor.getDiagramNodeXml=function(u){var H=mxUtils.getTextContent(u),P=null;0<H.length?P=Graph.decompress(H):null!=u.firstChild&&(P=mxUtils.getXml(u.firstChild));return P};Editor.extractGraphModelFromPdf=function(u){u=u.substring(u.indexOf(",")+1);u=window.atob&&
+!mxClient.IS_SF?atob(u):Base64.decode(u,!0);if("%PDF-1.7"==u.substring(0,8)){var H=u.indexOf("EmbeddedFile");if(-1<H){var P=u.indexOf("stream",H)+9;if(0<u.substring(H,P).indexOf("application#2Fvnd.jgraph.mxfile"))return H=u.indexOf("endstream",P-1),pako.inflateRaw(Graph.stringToArrayBuffer(u.substring(P,H)),{to:"string"})}return null}P=null;H="";for(var W=0,R=0,da=[],fa=null;R<u.length;){var ea=u.charCodeAt(R);R+=1;10!=ea&&(H+=String.fromCharCode(ea));ea=="/Subject (%3Cmxfile".charCodeAt(W)?W++:W=
+0;if(19==W){var qa=u.indexOf("%3C%2Fmxfile%3E)",R)+15;R-=9;if(qa>R){P=u.substring(R,qa);break}}10==ea&&("endobj"==H?fa=null:"obj"==H.substring(H.length-3,H.length)||"xref"==H||"trailer"==H?(fa=[],da[H.split(" ")[0]]=fa):null!=fa&&fa.push(H),H="")}null==P&&(P=Editor.extractGraphModelFromXref(da));null!=P&&(P=decodeURIComponent(P.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return P};Editor.extractGraphModelFromXref=function(u){var H=u.trailer,P=null;null!=H&&(H=/.* \/Info (\d+) (\d+) R/g.exec(H.join("\n")),
null!=H&&0<H.length&&(H=u[H[1]],null!=H&&(H=/.* \/Subject (\d+) (\d+) R/g.exec(H.join("\n")),null!=H&&0<H.length&&(u=u[H[1]],null!=u&&(u=u.join("\n"),P=u.substring(1,u.length-1))))));return P};Editor.extractParserError=function(u,H){var P=null;u=null!=u?u.getElementsByTagName("parsererror"):null;null!=u&&0<u.length&&(P=H||mxResources.get("invalidChars"),H=u[0].getElementsByTagName("div"),0<H.length&&(P=mxUtils.getTextContent(H[0])));return null!=P?mxUtils.trim(P):P};Editor.addRetryToError=function(u,
H){null!=u&&(u=null!=u.error?u.error:u,null==u.retry&&(u.retry=H))};Editor.configure=function(u,H){if(null!=u){Editor.config=u;Editor.configVersion=u.version;Menus.prototype.defaultFonts=u.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=u.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=u.defaultColors||ColorDialog.prototype.defaultColors;ColorDialog.prototype.colorNames=u.colorNames||ColorDialog.prototype.colorNames;StyleFormatPanel.prototype.defaultColorSchemes=
u.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=u.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=u.autosaveDelay||DrawioFile.prototype.autosaveDelay;u.debug&&(urlParams.test="1");null!=u.templateFile&&(EditorUi.templateFile=u.templateFile);null!=u.styles&&(Array.isArray(u.styles)?Editor.styles=u.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=u.globalVars&&(Editor.globalVars=
u.globalVars);null!=u.compressXml&&(Editor.compressXml=u.compressXml);null!=u.includeDiagram&&(Editor.defaultIncludeDiagram=u.includeDiagram);null!=u.simpleLabels&&(Editor.simpleLabels=u.simpleLabels);null!=u.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=u.oneDriveInlinePicker);null!=u.darkColor&&(Editor.darkColor=u.darkColor);null!=u.lightColor&&(Editor.lightColor=u.lightColor);null!=u.settingsName&&(Editor.configurationKey="."+u.settingsName+"-configuration",Editor.settingsKey="."+u.settingsName+
"-config",mxSettings.key=Editor.settingsKey);u.customFonts&&(Menus.prototype.defaultFonts=u.customFonts.concat(Menus.prototype.defaultFonts));u.customPresetColors&&(ColorDialog.prototype.presetColors=u.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=u.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=u.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=u.css){var P=document.createElement("style");P.setAttribute("type","text/css");
-P.appendChild(document.createTextNode(u.css));var S=document.getElementsByTagName("script")[0];S.parentNode.insertBefore(P,S)}null!=u.libraries&&(Sidebar.prototype.customEntries=u.libraries);null!=u.enabledLibraries&&(Array.isArray(u.enabledLibraries)?Sidebar.prototype.enabledLibraries=u.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=u.defaultLibraries&&(Sidebar.prototype.defaultEntries=u.defaultLibraries);null!=u.defaultCustomLibraries&&(Editor.defaultCustomLibraries=
+P.appendChild(document.createTextNode(u.css));var W=document.getElementsByTagName("script")[0];W.parentNode.insertBefore(P,W)}null!=u.libraries&&(Sidebar.prototype.customEntries=u.libraries);null!=u.enabledLibraries&&(Array.isArray(u.enabledLibraries)?Sidebar.prototype.enabledLibraries=u.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=u.defaultLibraries&&(Sidebar.prototype.defaultEntries=u.defaultLibraries);null!=u.defaultCustomLibraries&&(Editor.defaultCustomLibraries=
u.defaultCustomLibraries);null!=u.enableCustomLibraries&&(Editor.enableCustomLibraries=u.enableCustomLibraries);null!=u.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=u.defaultVertexStyle);null!=u.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=u.defaultEdgeStyle);null!=u.defaultPageVisible&&(Graph.prototype.defaultPageVisible=u.defaultPageVisible);null!=u.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=u.defaultGridEnabled);null!=u.zoomWheel&&(Graph.zoomWheel=u.zoomWheel);null!=
-u.zoomFactor&&(P=parseFloat(u.zoomFactor),!isNaN(P)&&1<P?Graph.prototype.zoomFactor=P:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=u.gridSteps&&(P=parseInt(u.gridSteps),!isNaN(P)&&0<P?mxGraphView.prototype.gridSteps=P:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));null!=u.pageFormat&&(P=parseInt(u.pageFormat.width),S=parseInt(u.pageFormat.height),!isNaN(P)&&0<P&&!isNaN(S)&&0<S?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,P,S),
+u.zoomFactor&&(P=parseFloat(u.zoomFactor),!isNaN(P)&&1<P?Graph.prototype.zoomFactor=P:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=u.gridSteps&&(P=parseInt(u.gridSteps),!isNaN(P)&&0<P?mxGraphView.prototype.gridSteps=P:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));null!=u.pageFormat&&(P=parseInt(u.pageFormat.width),W=parseInt(u.pageFormat.height),!isNaN(P)&&0<P&&!isNaN(W)&&0<W?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,P,W),
mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));u.thumbWidth&&(Sidebar.prototype.thumbWidth=u.thumbWidth);u.thumbHeight&&(Sidebar.prototype.thumbHeight=u.thumbHeight);u.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=u.emptyLibraryXml);u.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=u.emptyDiagramXml);u.sidebarWidth&&(EditorUi.prototype.hsplitPosition=u.sidebarWidth);u.sidebarTitles&&
(Sidebar.prototype.sidebarTitles=u.sidebarTitles);u.sidebarTitleSize&&(P=parseInt(u.sidebarTitleSize),!isNaN(P)&&0<P?Sidebar.prototype.sidebarTitleSize=P:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));u.fontCss&&("string"===typeof u.fontCss?Editor.configureFontCss(u.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));null!=u.autosaveDelay&&(P=parseInt(u.autosaveDelay),!isNaN(P)&&0<P?DrawioFile.prototype.autosaveDelay=P:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));
if(null!=u.plugins&&!H)for(App.initPluginCallback(),H=0;H<u.plugins.length;H++)mxscript(u.plugins[H]);null!=u.maxImageBytes&&(EditorUi.prototype.maxImageBytes=u.maxImageBytes);null!=u.maxImageSize&&(EditorUi.prototype.maxImageSize=u.maxImageSize);null!=u.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=u.shareCursorPosition);null!=u.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=u.showRemoteCursors)}};Editor.configureFontCss=function(u){if(null!=u){Editor.prototype.fontCss=u;
-var H=document.getElementsByTagName("script")[0];if(null!=H&&null!=H.parentNode){var P=document.createElement("style");P.setAttribute("type","text/css");P.appendChild(document.createTextNode(u));H.parentNode.insertBefore(P,H);u=u.split("url(");for(P=1;P<u.length;P++){var S=u[P].indexOf(")");S=Editor.trimCssUrl(u[P].substring(0,S));var R=document.createElement("link");R.setAttribute("rel","preload");R.setAttribute("href",S);R.setAttribute("as","font");R.setAttribute("crossorigin","");H.parentNode.insertBefore(R,
+var H=document.getElementsByTagName("script")[0];if(null!=H&&null!=H.parentNode){var P=document.createElement("style");P.setAttribute("type","text/css");P.appendChild(document.createTextNode(u));H.parentNode.insertBefore(P,H);u=u.split("url(");for(P=1;P<u.length;P++){var W=u[P].indexOf(")");W=Editor.trimCssUrl(u[P].substring(0,W));var R=document.createElement("link");R.setAttribute("rel","preload");R.setAttribute("href",W);R.setAttribute("as","font");R.setAttribute("crossorigin","");H.parentNode.insertBefore(R,
H)}}}};Editor.trimCssUrl=function(u){return u.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(u){u=null!=u?u:Editor.GUID_LENGTH;for(var H=[],P=0;P<u;P++)H.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return H.join("")};Editor.prototype.timeout=
25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(u){u=null!=u&&"mxlibrary"!=u.nodeName?this.extractGraphModel(u):null;if(null!=u){var H=Editor.extractParserError(u,mxResources.get("invalidOrMissingFile"));if(H)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[u],"cause",[H]),Error(mxResources.get("notADiagramFile")+
-" ("+H+")");if("mxGraphModel"==u.nodeName){H=u.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=H&&""!=H)H!=this.graph.currentStyle&&(P=null!=this.graph.themes?this.graph.themes[H]:mxUtils.load(STYLE_PATH+"/"+H+".xml").getDocumentElement(),null!=P&&(S=new mxCodec(P.ownerDocument),S.decode(P,this.graph.getStylesheet())));else{var P=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=P){var S=new mxCodec(P.ownerDocument);
-S.decode(P,this.graph.getStylesheet())}}this.graph.currentStyle=H;this.graph.mathEnabled="1"==urlParams.math||"1"==u.getAttribute("math");H=u.getAttribute("backgroundImage");null!=H?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(H)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==u.getAttribute("shadow"),!1);if(H=u.getAttribute("extFonts"))try{for(H=
+" ("+H+")");if("mxGraphModel"==u.nodeName){H=u.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=H&&""!=H)H!=this.graph.currentStyle&&(P=null!=this.graph.themes?this.graph.themes[H]:mxUtils.load(STYLE_PATH+"/"+H+".xml").getDocumentElement(),null!=P&&(W=new mxCodec(P.ownerDocument),W.decode(P,this.graph.getStylesheet())));else{var P=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=P){var W=new mxCodec(P.ownerDocument);
+W.decode(P,this.graph.getStylesheet())}}this.graph.currentStyle=H;this.graph.mathEnabled="1"==urlParams.math||"1"==u.getAttribute("math");H=u.getAttribute("backgroundImage");null!=H?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(H)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==u.getAttribute("shadow"),!1);if(H=u.getAttribute("extFonts"))try{for(H=
H.split("|").map(function(R){R=R.split("^");return{name:R[0],url:R[1]}}),P=0;P<H.length;P++)this.graph.addExtFont(H[P].name,H[P].url)}catch(R){console.log("ExtFonts format error: "+R.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var e=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(u,H){u=null!=
-u?u:!0;var P=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&P.setAttribute("style",this.graph.currentStyle);var S=this.graph.getBackgroundImageObject(this.graph.backgroundImage,H);null!=S&&P.setAttribute("backgroundImage",JSON.stringify(S));P.setAttribute("math",this.graph.mathEnabled?"1":"0");P.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(S=this.graph.extFonts.map(function(R){return R.name+
-"^"+R.url}),P.setAttribute("extFonts",S.join("|")));return P};Editor.prototype.isDataSvg=function(u){try{var H=mxUtils.parseXml(u).documentElement.getAttribute("content");if(null!=H&&(null!=H&&"<"!=H.charAt(0)&&"%"!=H.charAt(0)&&(H=unescape(window.atob?atob(H):Base64.decode(cont,H))),null!=H&&"%"==H.charAt(0)&&(H=decodeURIComponent(H)),null!=H&&0<H.length)){var P=mxUtils.parseXml(H).documentElement;return"mxfile"==P.nodeName||"mxGraphModel"==P.nodeName}}catch(S){}return!1};Editor.prototype.extractGraphModel=
+u?u:!0;var P=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&P.setAttribute("style",this.graph.currentStyle);var W=this.graph.getBackgroundImageObject(this.graph.backgroundImage,H);null!=W&&P.setAttribute("backgroundImage",JSON.stringify(W));P.setAttribute("math",this.graph.mathEnabled?"1":"0");P.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(W=this.graph.extFonts.map(function(R){return R.name+
+"^"+R.url}),P.setAttribute("extFonts",W.join("|")));return P};Editor.prototype.isDataSvg=function(u){try{var H=mxUtils.parseXml(u).documentElement.getAttribute("content");if(null!=H&&(null!=H&&"<"!=H.charAt(0)&&"%"!=H.charAt(0)&&(H=unescape(window.atob?atob(H):Base64.decode(cont,H))),null!=H&&"%"==H.charAt(0)&&(H=decodeURIComponent(H)),null!=H&&0<H.length)){var P=mxUtils.parseXml(H).documentElement;return"mxfile"==P.nodeName||"mxGraphModel"==P.nodeName}}catch(W){}return!1};Editor.prototype.extractGraphModel=
function(u,H,P){return Editor.extractGraphModel.apply(this,arguments)};var k=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();k.apply(this,arguments)};var n=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){n.apply(this,
-arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(u,H){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){u=null!=u?u:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(R){try{MathJax.typesetClear([R]),MathJax.typeset([R]),Editor.onMathJaxDone()}catch(ca){MathJax.typesetClear([R]),null!=ca.retry?ca.retry.then(function(){MathJax.typesetPromise([R]).then(Editor.onMathJaxDone)}):
-null!=window.console&&console.log("Error in MathJax: "+ca.toString())}};window.MathJax=null!=H?H:{loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath"]},startup:{pageReady:function(){for(var R=0;R<Editor.mathJaxQueue.length;R++)Editor.doMathJaxRender(Editor.mathJaxQueue[R])}}};Editor.MathJaxRender=function(R){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(R):Editor.mathJaxQueue.push(R)};Editor.MathJaxClear=
-function(){Editor.mathJaxQueue=[]};Editor.onMathJaxDone=function(){};var P=Editor.prototype.init;Editor.prototype.init=function(){P.apply(this,arguments);var R=mxUtils.bind(this,function(ca,ea){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,R);this.graph.addListener(mxEvent.REFRESH,R)};H=document.getElementsByTagName("script");if(null!=H&&0<H.length){var S=document.createElement("script");
-S.setAttribute("type","text/javascript");S.setAttribute("src",u);H[0].parentNode.appendChild(S)}}};Editor.prototype.csvToArray=function(u){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(u))return null;var H=[];u.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,
-function(P,S,R,ca){void 0!==S?H.push(S.replace(/\\'/g,"'")):void 0!==R?H.push(R.replace(/\\"/g,'"')):void 0!==ca&&H.push(ca);return""});/,\s*$/.test(u)&&H.push("");return H};Editor.prototype.isCorsEnabledForUrl=function(u){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||u.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(u)||
-"https://raw.githubusercontent.com/"===u.substring(0,34)||"https://fonts.googleapis.com/"===u.substring(0,29)||"https://fonts.gstatic.com/"===u.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var u=new mxUrlConverter;u.updateBaseUrl();var H=u.convert,P=this;u.convert=function(S){if(null!=S){var R="http://"==S.substring(0,7)||"https://"==S.substring(0,8);R&&!navigator.onLine?S=Editor.svgBrokenImage.src:!R||S.substring(0,u.baseUrl.length)==u.baseUrl||P.crossOriginImages&&P.isCorsEnabledForUrl(S)?
-"chrome-extension://"==S.substring(0,19)||mxClient.IS_CHROMEAPP||(S=H.apply(this,arguments)):S=PROXY_URL+"?url="+encodeURIComponent(S)}return S};return u};Editor.createSvgDataUri=function(u){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(u)))};Editor.prototype.convertImageToDataUri=function(u,H){try{var P=!0,S=window.setTimeout(mxUtils.bind(this,function(){P=!1;H(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(u))mxUtils.get(u,mxUtils.bind(this,function(ca){window.clearTimeout(S);
-P&&H(Editor.createSvgDataUri(ca.getText()))}),function(){window.clearTimeout(S);P&&H(Editor.svgBrokenImage.src)});else{var R=new Image;this.crossOriginImages&&(R.crossOrigin="anonymous");R.onload=function(){window.clearTimeout(S);if(P)try{var ca=document.createElement("canvas"),ea=ca.getContext("2d");ca.height=R.height;ca.width=R.width;ea.drawImage(R,0,0);H(ca.toDataURL())}catch(fa){H(Editor.svgBrokenImage.src)}};R.onerror=function(){window.clearTimeout(S);P&&H(Editor.svgBrokenImage.src)};R.src=u}}catch(ca){H(Editor.svgBrokenImage.src)}};
-Editor.prototype.convertImages=function(u,H,P,S){null==S&&(S=this.createImageUrlConverter());var R=0,ca=P||{};P=mxUtils.bind(this,function(ea,fa){ea=u.getElementsByTagName(ea);for(var ra=0;ra<ea.length;ra++)mxUtils.bind(this,function(ua){try{if(null!=ua){var sa=S.convert(ua.getAttribute(fa));if(null!=sa&&"data:"!=sa.substring(0,5)){var Aa=ca[sa];null==Aa?(R++,this.convertImageToDataUri(sa,function(Ca){null!=Ca&&(ca[sa]=Ca,ua.setAttribute(fa,Ca));R--;0==R&&H(u)})):ua.setAttribute(fa,Aa)}else null!=
-sa&&ua.setAttribute(fa,sa)}}catch(Ca){}})(ea[ra])});P("image","xlink:href");P("img","src");0==R&&H(u)};Editor.base64Encode=function(u){for(var H="",P=0,S=u.length,R,ca,ea;P<S;){R=u.charCodeAt(P++)&255;if(P==S){H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R>>2);H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&3)<<4);H+="==";break}ca=u.charCodeAt(P++);if(P==S){H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R>>
-2);H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&3)<<4|(ca&240)>>4);H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((ca&15)<<2);H+="=";break}ea=u.charCodeAt(P++);H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R>>2);H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&3)<<4|(ca&240)>>4);H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((ca&15)<<2|(ea&192)>>
-6);H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(ea&63)}return H};Editor.prototype.loadUrl=function(u,H,P,S,R,ca,ea,fa){try{var ra=!ea&&(S||/(\.png)($|\?)/i.test(u)||/(\.jpe?g)($|\?)/i.test(u)||/(\.gif)($|\?)/i.test(u)||/(\.pdf)($|\?)/i.test(u));R=null!=R?R:!0;var ua=mxUtils.bind(this,function(){mxUtils.get(u,mxUtils.bind(this,function(sa){if(200<=sa.getStatus()&&299>=sa.getStatus()){if(null!=H){var Aa=sa.getText();if(ra){if((9==document.documentMode||10==document.documentMode)&&
-"undefined"!==typeof window.mxUtilsBinaryToArray){sa=mxUtilsBinaryToArray(sa.request.responseBody).toArray();Aa=Array(sa.length);for(var Ca=0;Ca<sa.length;Ca++)Aa[Ca]=String.fromCharCode(sa[Ca]);Aa=Aa.join("")}ca=null!=ca?ca:"data:image/png;base64,";Aa=ca+Editor.base64Encode(Aa)}H(Aa)}}else null!=P&&(0==sa.getStatus()?P({message:mxResources.get("accessDenied")},sa):P({message:mxResources.get("error")+" "+sa.getStatus()},sa))}),function(sa){null!=P&&P({message:mxResources.get("error")+" "+sa.getStatus()})},
-ra,this.timeout,function(){R&&null!=P&&P({code:App.ERROR_TIMEOUT,retry:ua})},fa)});ua()}catch(sa){null!=P&&P(sa)}};Editor.prototype.absoluteCssFonts=function(u){var H=null;if(null!=u){var P=u.split("url(");if(0<P.length){H=[P[0]];u=window.location.pathname;var S=null!=u?u.lastIndexOf("/"):-1;0<=S&&(u=u.substring(0,S+1));S=document.getElementsByTagName("base");var R=null;null!=S&&0<S.length&&(R=S[0].getAttribute("href"));for(var ca=1;ca<P.length;ca++)if(S=P[ca].indexOf(")"),0<S){var ea=Editor.trimCssUrl(P[ca].substring(0,
-S));this.graph.isRelativeUrl(ea)&&(ea=null!=R?R+ea:window.location.protocol+"//"+window.location.hostname+("/"==ea.charAt(0)?"":u)+ea);H.push('url("'+ea+'"'+P[ca].substring(S))}else H.push(P[ca])}else H=[u]}return null!=H?H.join(""):null};Editor.prototype.mapFontUrl=function(u,H,P){/^https?:\/\//.test(H)&&!this.isCorsEnabledForUrl(H)&&(H=PROXY_URL+"?url="+encodeURIComponent(H));P(u,H)};Editor.prototype.embedCssFonts=function(u,H){var P=u.split("url("),S=0;null==this.cachedFonts&&(this.cachedFonts=
-{});var R=mxUtils.bind(this,function(){if(0==S){for(var ra=[P[0]],ua=1;ua<P.length;ua++){var sa=P[ua].indexOf(")");ra.push('url("');ra.push(this.cachedFonts[Editor.trimCssUrl(P[ua].substring(0,sa))]);ra.push('"'+P[ua].substring(sa))}H(ra.join(""))}});if(0<P.length){for(u=1;u<P.length;u++){var ca=P[u].indexOf(")"),ea=null,fa=P[u].indexOf("format(",ca);0<fa&&(ea=Editor.trimCssUrl(P[u].substring(fa+7,P[u].indexOf(")",fa))));mxUtils.bind(this,function(ra){if(null==this.cachedFonts[ra]){this.cachedFonts[ra]=
-ra;S++;var ua="application/x-font-ttf";if("svg"==ea||/(\.svg)($|\?)/i.test(ra))ua="image/svg+xml";else if("otf"==ea||"embedded-opentype"==ea||/(\.otf)($|\?)/i.test(ra))ua="application/x-font-opentype";else if("woff"==ea||/(\.woff)($|\?)/i.test(ra))ua="application/font-woff";else if("woff2"==ea||/(\.woff2)($|\?)/i.test(ra))ua="application/font-woff2";else if("eot"==ea||/(\.eot)($|\?)/i.test(ra))ua="application/vnd.ms-fontobject";else if("sfnt"==ea||/(\.sfnt)($|\?)/i.test(ra))ua="application/font-sfnt";
-this.mapFontUrl(ua,ra,mxUtils.bind(this,function(sa,Aa){this.loadUrl(Aa,mxUtils.bind(this,function(Ca){this.cachedFonts[ra]=Ca;S--;R()}),mxUtils.bind(this,function(Ca){S--;R()}),!0,null,"data:"+sa+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(P[u].substring(0,ca)),ea)}R()}else H(u)};Editor.prototype.loadFonts=function(u){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(H){this.resolvedFontCss=H;null!=u&&u()})):null!=u&&u()};Editor.prototype.createGoogleFontCache=
-function(){var u={},H;for(H in Graph.fontMapping)Graph.isCssFontUrl(H)&&(u[H]=Graph.fontMapping[H]);return u};Editor.prototype.embedExtFonts=function(u){var H=this.graph.getCustomFonts();if(0<H.length){var P=[],S=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var R=mxUtils.bind(this,function(){0==S&&this.embedCssFonts(P.join(""),u)}),ca=0;ca<H.length;ca++)mxUtils.bind(this,function(ea,fa){Graph.isCssFontUrl(fa)?null==this.cachedGoogleFonts[fa]?(S++,this.loadUrl(fa,
-mxUtils.bind(this,function(ra){this.cachedGoogleFonts[fa]=ra;P.push(ra+"\n");S--;R()}),mxUtils.bind(this,function(ra){S--;P.push("@import url("+fa+");\n");R()}))):P.push(this.cachedGoogleFonts[fa]+"\n"):P.push('@font-face {font-family: "'+ea+'";src: url("'+fa+'")}\n')})(H[ca].name,H[ca].url);R()}else u()};Editor.prototype.addMathCss=function(u){u=u.getElementsByTagName("defs");if(null!=u&&0<u.length)for(var H=document.getElementsByTagName("style"),P=0;P<H.length;P++){var S=mxUtils.getTextContent(H[P]);
-0>S.indexOf("mxPageSelector")&&0<S.indexOf("MathJax")&&u[0].appendChild(H[P].cloneNode(!0))}};Editor.prototype.addFontCss=function(u,H){H=null!=H?H:this.absoluteCssFonts(this.fontCss);if(null!=H){var P=u.getElementsByTagName("defs"),S=u.ownerDocument;0==P.length?(P=null!=S.createElementNS?S.createElementNS(mxConstants.NS_SVG,"defs"):S.createElement("defs"),null!=u.firstChild?u.insertBefore(P,u.firstChild):u.appendChild(P)):P=P[0];u=null!=S.createElementNS?S.createElementNS(mxConstants.NS_SVG,"style"):
-S.createElement("style");u.setAttribute("type","text/css");mxUtils.setTextContent(u,H);P.appendChild(u)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(u,H,P){var S=mxClient.IS_FF?8192:16384;return Math.min(P,Math.min(S/u,S/H))};Editor.prototype.exportToCanvas=function(u,H,P,S,R,ca,ea,fa,ra,ua,sa,Aa,Ca,Ba,ta,Pa,Ta,Oa){try{ca=null!=ca?ca:!0;ea=null!=ea?ea:!0;Aa=null!=Aa?Aa:this.graph;Ca=null!=Ca?Ca:0;
-var Xa=ra?null:Aa.background;Xa==mxConstants.NONE&&(Xa=null);null==Xa&&(Xa=S);null==Xa&&0==ra&&(Xa=Pa?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(Aa.getSvg(null,null,Ca,Ba,null,ea,null,null,null,ua,null,Pa,Ta,Oa),mxUtils.bind(this,function(Ga){try{var eb=new Image;eb.onload=mxUtils.bind(this,function(){try{var z=function(){mxClient.IS_SF?window.setTimeout(function(){V.drawImage(eb,0,0);u(K,Ga)},0):(V.drawImage(eb,0,0),u(K,Ga))},K=document.createElement("canvas"),M=parseInt(Ga.getAttribute("width")),
-T=parseInt(Ga.getAttribute("height"));fa=null!=fa?fa:1;null!=H&&(fa=ca?Math.min(1,Math.min(3*H/(4*T),H/M)):H/M);fa=this.getMaxCanvasScale(M,T,fa);M=Math.ceil(fa*M);T=Math.ceil(fa*T);K.setAttribute("width",M);K.setAttribute("height",T);var V=K.getContext("2d");null!=Xa&&(V.beginPath(),V.rect(0,0,M,T),V.fillStyle=Xa,V.fill());1!=fa&&V.scale(fa,fa);if(ta){var ia=Aa.view,na=ia.scale;ia.scale=1;var va=btoa(unescape(encodeURIComponent(ia.createSvgGrid(ia.gridColor))));ia.scale=na;va="data:image/svg+xml;base64,"+
-va;var pa=Aa.gridSize*ia.gridSteps*fa,za=Aa.getGraphBounds(),Da=ia.translate.x*na,Ma=ia.translate.y*na,La=Da+(za.x-Da)/na-Ca,Ua=Ma+(za.y-Ma)/na-Ca,Sa=new Image;Sa.onload=function(){try{for(var Fa=-Math.round(pa-mxUtils.mod((Da-La)*fa,pa)),wa=-Math.round(pa-mxUtils.mod((Ma-Ua)*fa,pa));Fa<M;Fa+=pa)for(var ya=wa;ya<T;ya+=pa)V.drawImage(Sa,Fa/fa,ya/fa);z()}catch(Na){null!=R&&R(Na)}};Sa.onerror=function(Fa){null!=R&&R(Fa)};Sa.src=va}else z()}catch(Fa){null!=R&&R(Fa)}});eb.onerror=function(z){null!=R&&
-R(z)};ua&&this.graph.addSvgShadow(Ga);this.graph.mathEnabled&&this.addMathCss(Ga);var bb=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(Ga,this.resolvedFontCss),eb.src=Editor.createSvgDataUri(mxUtils.getXml(Ga))}catch(z){null!=R&&R(z)}});this.embedExtFonts(mxUtils.bind(this,function(z){try{null!=z&&this.addFontCss(Ga,z),this.loadFonts(bb)}catch(K){null!=R&&R(K)}}))}catch(z){null!=R&&R(z)}}),P,sa)}catch(Ga){null!=R&&R(Ga)}};Editor.crcTable=[];for(var D=0;256>D;D++)for(var t=
-D,E=0;8>E;E++)t=1==(t&1)?3988292384^t>>>1:t>>>1,Editor.crcTable[D]=t;Editor.updateCRC=function(u,H,P,S){for(var R=0;R<S;R++)u=Editor.crcTable[(u^H.charCodeAt(P+R))&255]^u>>>8;return u};Editor.crc32=function(u){for(var H=-1,P=0;P<u.length;P++)H=H>>>8^Editor.crcTable[(H^u.charCodeAt(P))&255];return(H^-1)>>>0};Editor.writeGraphModelToPng=function(u,H,P,S,R){function ca(sa,Aa){var Ca=ra;ra+=Aa;return sa.substring(Ca,ra)}function ea(sa){sa=ca(sa,4);return sa.charCodeAt(3)+(sa.charCodeAt(2)<<8)+(sa.charCodeAt(1)<<
-16)+(sa.charCodeAt(0)<<24)}function fa(sa){return String.fromCharCode(sa>>24&255,sa>>16&255,sa>>8&255,sa&255)}u=u.substring(u.indexOf(",")+1);u=window.atob?atob(u):Base64.decode(u,!0);var ra=0;if(ca(u,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=R&&R();else if(ca(u,4),"IHDR"!=ca(u,4))null!=R&&R();else{ca(u,17);R=u.substring(0,ra);do{var ua=ea(u);if("IDAT"==ca(u,4)){R=u.substring(0,ra-8);"pHYs"==H&&"dpi"==P?(P=Math.round(S/.0254),P=fa(P)+fa(P)+String.fromCharCode(1)):P=
-P+String.fromCharCode(0)+("zTXt"==H?String.fromCharCode(0):"")+S;S=4294967295;S=Editor.updateCRC(S,H,0,4);S=Editor.updateCRC(S,P,0,P.length);R+=fa(P.length)+H+P+fa(S^4294967295);R+=u.substring(ra-8,u.length);break}R+=u.substring(ra-8,ra-4+ua);ca(u,ua);ca(u,4)}while(ua);return"data:image/png;base64,"+(window.btoa?btoa(R):Base64.encode(R,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var d=ColorDialog.addRecentColor;ColorDialog.addRecentColor=
-function(u,H){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(u,H){var P=null;null!=u.editor.graph.getModel().getParent(H)?P=H.getId():null!=u.currentPage&&(P=u.currentPage.getId());return P});if(null!=window.StyleFormatPanel){var g=
-Format.prototype.init;Format.prototype.init=function(){g.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var 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 u=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=u&&u.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=
-function(u){return!1};var q=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(u){u=q.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var H=this.editorUi,P=H.editor.graph,S=this.createOption(mxResources.get("shadow"),function(){return P.shadowVisible},function(R){var ca=new ChangePageSetup(H);ca.ignoreColor=!0;ca.ignoreImage=!0;ca.shadowVisible=R;P.model.execute(ca)},{install:function(R){this.listener=function(){R(P.shadowVisible)};
-H.addListener("shadowVisibleChanged",this.listener)},destroy:function(){H.removeListener(this.listener)}});Editor.enableShadowOption||(S.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(S,60));u.appendChild(S)}return u};var y=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(u){u=y.apply(this,arguments);var H=this.editorUi,P=H.editor.graph;if(P.isEnabled()){var S=H.getCurrentFile();if(null!=S&&S.isAutosaveOptional()){var R=
-this.createOption(mxResources.get("autosave"),function(){return H.editor.autosave},function(ea){H.editor.setAutosave(ea);H.editor.autosave&&S.isModified()&&S.fileChanged()},{install:function(ea){this.listener=function(){ea(H.editor.autosave)};H.editor.addListener("autosaveChanged",this.listener)},destroy:function(){H.editor.removeListener(this.listener)}});u.appendChild(R)}}if(this.isMathOptionVisible()&&P.isEnabled()&&"undefined"!==typeof MathJax){R=this.createOption(mxResources.get("mathematicalTypesetting"),
-function(){return P.mathEnabled},function(ea){H.actions.get("mathematicalTypesetting").funct()},{install:function(ea){this.listener=function(){ea(P.mathEnabled)};H.addListener("mathEnabledChanged",this.listener)},destroy:function(){H.removeListener(this.listener)}});R.style.paddingTop="5px";u.appendChild(R);var ca=H.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");ca.style.position="relative";ca.style.marginLeft="6px";ca.style.top="2px";R.appendChild(ca)}return u};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=
-[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",
-dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",
-type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",
-dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",defVal:.3,min:0,max:1}];mxCellRenderer.defaultShapes.internalStorage.prototype.customProperties=
-[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"dx",dispName:"Left Line",type:"float",min:0,defVal:20},{name:"dy",dispName:"Top Line",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.cube.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0},{name:"darkOpacity2",dispName:"Dark Opacity 2",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.step.prototype.customProperties=
-[{name:"size",dispName:"Notch Size",type:"float",min:0,defVal:20},{name:"fixedSize",dispName:"Fixed Size",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.trapezoid.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.tape.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.4}];mxCellRenderer.defaultShapes.note.prototype.customProperties=
-[{name:"size",dispName:"Fold Size",type:"float",min:0,defVal:30},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.card.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Cutoff Size",type:"float",min:0,defVal:30}];mxCellRenderer.defaultShapes.callout.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
-{name:"base",dispName:"Callout Width",type:"float",min:0,defVal:20},{name:"size",dispName:"Callout Length",type:"float",min:0,defVal:30},{name:"position",dispName:"Callout Position",type:"float",min:0,max:1,defVal:.5},{name:"position2",dispName:"Callout Tip Position",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.folder.prototype.customProperties=[{name:"tabWidth",dispName:"Tab Width",type:"float"},{name:"tabHeight",dispName:"Tab Height",type:"float"},{name:"tabPosition",dispName:"Tap Position",
-type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"right",dispName:"Right"}]}];mxCellRenderer.defaultShapes.swimlane.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"startSize",dispName:"Header Size",type:"float"},{name:"swimlaneHead",dispName:"Head Border",type:"bool",defVal:!0},{name:"swimlaneBody",dispName:"Body Border",type:"bool",defVal:!0},{name:"horizontal",dispName:"Horizontal",type:"bool",defVal:!0},{name:"separatorColor",dispName:"Separator Color",
-type:"color",defVal:null}];mxCellRenderer.defaultShapes.table.prototype.customProperties=[{name:"rowLines",dispName:"Row Lines",type:"bool",defVal:!0},{name:"columnLines",dispName:"Column Lines",type:"bool",defVal:!0},{name:"fixedRows",dispName:"Fixed Rows",type:"bool",defVal:!1},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",defVal:!1},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",defVal:!1}].concat(mxCellRenderer.defaultShapes.swimlane.prototype.customProperties).concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);
-mxCellRenderer.defaultShapes.tableRow.prototype.customProperties=mxCellRenderer.defaultShapes.swimlane.prototype.customProperties.concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);mxCellRenderer.defaultShapes.doubleEllipse.prototype.customProperties=[{name:"margin",dispName:"Indent",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.ext.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"double",dispName:"Double",
-type:"bool",defVal:!1},{name:"margin",dispName:"Indent",type:"float",min:0,defVal:0}];mxCellRenderer.defaultShapes.curlyBracket.prototype.customProperties=[{name:"rounded",dispName:"Rounded",type:"bool",defVal:!0},{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.image.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.label.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",
-type:"bool",defVal:!0},{name:"imageAlign",dispName:"Image Align",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"center",dispName:"Center"},{val:"right",dispName:"Right"}],defVal:"left"},{name:"imageVerticalAlign",dispName:"Image Vertical Align",type:"enum",enumList:[{val:"top",dispName:"Top"},{val:"middle",dispName:"Middle"},{val:"bottom",dispName:"Bottom"}],defVal:"middle"},{name:"imageWidth",dispName:"Image Width",type:"float",min:0,defVal:24},{name:"imageHeight",dispName:"Image Height",
-type:"float",min:0,defVal:24},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:12},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.dataStorage.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.1}];mxCellRenderer.defaultShapes.manualInput.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:30},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.loopLimit.prototype.customProperties=
-[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.offPageConnector.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:38},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.display.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.singleArrow.prototype.customProperties=
-[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.doubleArrow.prototype.customProperties=[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.cross.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,
-max:1,defVal:.2}];mxCellRenderer.defaultShapes.corner.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.tee.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.umlLifeline.prototype.customProperties=[{name:"participant",dispName:"Participant",type:"enum",
-defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName:"Actor"},{val:"umlBoundary",dispName:"Boundary"},{val:"umlEntity",dispName:"Entity"},{val:"umlControl",dispName:"Control"}]},{name:"size",dispName:"Height",type:"float",defVal:40,min:0}];mxCellRenderer.defaultShapes.umlFrame.prototype.customProperties=[{name:"width",dispName:"Title Width",type:"float",defVal:60,min:0},{name:"height",dispName:"Title Height",type:"float",defVal:30,min:0}];StyleFormatPanel.prototype.defaultColorSchemes=
-[[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",font:"#333333"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[{fill:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",
-stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",
-font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},
-{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=
-function(u,H,P){if(null!=H){var S=function(ca){if(null!=ca)if(P)for(var ea=0;ea<ca.length;ea++)H[ca[ea].name]=ca[ea];else for(var fa in H){var ra=!1;for(ea=0;ea<ca.length;ea++)if(ca[ea].name==fa&&ca[ea].type==H[fa].type){ra=!0;break}ra||delete H[fa]}},R=this.editorUi.editor.graph.view.getState(u);null!=R&&null!=R.shape&&(R.shape.commonCustomPropAdded||(R.shape.commonCustomPropAdded=!0,R.shape.customProperties=R.shape.customProperties||[],R.cell.vertex?Array.prototype.push.apply(R.shape.customProperties,
-Editor.commonVertexProperties):Array.prototype.push.apply(R.shape.customProperties,Editor.commonEdgeProperties)),S(R.shape.customProperties));u=u.getAttribute("customProperties");if(null!=u)try{S(JSON.parse(u))}catch(ca){}}};var F=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var u=this.editorUi.getSelectionState();"image"!=u.style.shape&&!u.containsLabel&&0<u.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));F.apply(this,arguments);if(Editor.enableCustomProperties){for(var H=
-{},P=u.vertices,S=u.edges,R=0;R<P.length;R++)this.findCommonProperties(P[R],H,0==R);for(R=0;R<S.length;R++)this.findCommonProperties(S[R],H,0==P.length&&0==R);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(H).length&&this.container.appendChild(this.addProperties(this.createPanel(),H,u))}};var C=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(u){this.addActions(u,["copyStyle","pasteStyle"]);return C.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=
-!0;StyleFormatPanel.prototype.addProperties=function(u,H,P){function S(V,ia,na,va){Aa.getModel().beginUpdate();try{var pa=[],za=[];if(null!=na.index){for(var Da=[],Ma=na.parentRow.nextSibling;Ma&&Ma.getAttribute("data-pName")==V;)Da.push(Ma.getAttribute("data-pValue")),Ma=Ma.nextSibling;na.index<Da.length?null!=va?Da.splice(va,1):Da[na.index]=ia:Da.push(ia);null!=na.size&&Da.length>na.size&&(Da=Da.slice(0,na.size));ia=Da.join(",");null!=na.countProperty&&(Aa.setCellStyles(na.countProperty,Da.length,
-Aa.getSelectionCells()),pa.push(na.countProperty),za.push(Da.length))}Aa.setCellStyles(V,ia,Aa.getSelectionCells());pa.push(V);za.push(ia);if(null!=na.dependentProps)for(V=0;V<na.dependentProps.length;V++){var La=na.dependentPropsDefVal[V],Ua=na.dependentPropsVals[V];if(Ua.length>ia)Ua=Ua.slice(0,ia);else for(var Sa=Ua.length;Sa<ia;Sa++)Ua.push(La);Ua=Ua.join(",");Aa.setCellStyles(na.dependentProps[V],Ua,Aa.getSelectionCells());pa.push(na.dependentProps[V]);za.push(Ua)}if("function"==typeof na.onChange)na.onChange(Aa,
-ia);sa.editorUi.fireEvent(new mxEventObject("styleChanged","keys",pa,"values",za,"cells",Aa.getSelectionCells()))}finally{Aa.getModel().endUpdate()}}function R(V,ia,na){var va=mxUtils.getOffset(u,!0),pa=mxUtils.getOffset(V,!0);ia.style.position="absolute";ia.style.left=pa.x-va.x+"px";ia.style.top=pa.y-va.y+"px";ia.style.width=V.offsetWidth+"px";ia.style.height=V.offsetHeight-(na?4:0)+"px";ia.style.zIndex=5}function ca(V,ia,na){var va=document.createElement("div");va.style.width="32px";va.style.height=
-"4px";va.style.margin="2px";va.style.border="1px solid black";va.style.background=ia&&"none"!=ia?ia:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(sa,function(pa){this.editorUi.pickColor(ia,function(za){va.style.background="none"==za?"url('"+Dialog.prototype.noColorImage+"')":za;S(V,za,na)});mxEvent.consume(pa)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(va);return btn}function ea(V,ia,na,va,pa,za,Da){null!=ia&&(ia=ia.split(","),
-Ca.push({name:V,values:ia,type:na,defVal:va,countProperty:pa,parentRow:za,isDeletable:!0,flipBkg:Da}));btn=mxUtils.button("+",mxUtils.bind(sa,function(Ma){for(var La=za,Ua=0;null!=La.nextSibling;)if(La.nextSibling.getAttribute("data-pName")==V)La=La.nextSibling,Ua++;else break;var Sa={type:na,parentRow:za,index:Ua,isDeletable:!0,defVal:va,countProperty:pa};Ua=ua(V,"",Sa,0==Ua%2,Da);S(V,va,Sa);La.parentNode.insertBefore(Ua,La.nextSibling);mxEvent.consume(Ma)}));btn.style.height="16px";btn.style.width=
-"25px";btn.className="geColorBtn";return btn}function fa(V,ia,na,va,pa,za,Da){if(0<pa){var Ma=Array(pa);ia=null!=ia?ia.split(","):[];for(var La=0;La<pa;La++)Ma[La]=null!=ia[La]?ia[La]:null!=va?va:"";Ca.push({name:V,values:Ma,type:na,defVal:va,parentRow:za,flipBkg:Da,size:pa})}return document.createElement("div")}function ra(V,ia,na){var va=document.createElement("input");va.type="checkbox";va.checked="1"==ia;mxEvent.addListener(va,"change",function(){S(V,va.checked?"1":"0",na)});return va}function ua(V,
-ia,na,va,pa){var za=na.dispName,Da=na.type,Ma=document.createElement("tr");Ma.className="gePropRow"+(pa?"Dark":"")+(va?"Alt":"")+" gePropNonHeaderRow";Ma.setAttribute("data-pName",V);Ma.setAttribute("data-pValue",ia);va=!1;null!=na.index&&(Ma.setAttribute("data-index",na.index),za=(null!=za?za:"")+"["+na.index+"]",va=!0);var La=document.createElement("td");La.className="gePropRowCell";za=mxResources.get(za,null,za);mxUtils.write(La,za);La.setAttribute("title",za);va&&(La.style.textAlign="right");
-Ma.appendChild(La);La=document.createElement("td");La.className="gePropRowCell";if("color"==Da)La.appendChild(ca(V,ia,na));else if("bool"==Da||"boolean"==Da)La.appendChild(ra(V,ia,na));else if("enum"==Da){var Ua=na.enumList;for(pa=0;pa<Ua.length;pa++)if(za=Ua[pa],za.val==ia){mxUtils.write(La,mxResources.get(za.dispName,null,za.dispName));break}mxEvent.addListener(La,"click",mxUtils.bind(sa,function(){var Sa=document.createElement("select");R(La,Sa);for(var Fa=0;Fa<Ua.length;Fa++){var wa=Ua[Fa],ya=
-document.createElement("option");ya.value=mxUtils.htmlEntities(wa.val);mxUtils.write(ya,mxResources.get(wa.dispName,null,wa.dispName));Sa.appendChild(ya)}Sa.value=ia;u.appendChild(Sa);mxEvent.addListener(Sa,"change",function(){var Na=mxUtils.htmlEntities(Sa.value);S(V,Na,na)});Sa.focus();mxEvent.addListener(Sa,"blur",function(){u.removeChild(Sa)})}))}else"dynamicArr"==Da?La.appendChild(ea(V,ia,na.subType,na.subDefVal,na.countProperty,Ma,pa)):"staticArr"==Da?La.appendChild(fa(V,ia,na.subType,na.subDefVal,
-na.size,Ma,pa)):"readOnly"==Da?(pa=document.createElement("input"),pa.setAttribute("readonly",""),pa.value=ia,pa.style.width="96px",pa.style.borderWidth="0px",La.appendChild(pa)):(La.innerHTML=mxUtils.htmlEntities(decodeURIComponent(ia)),mxEvent.addListener(La,"click",mxUtils.bind(sa,function(){function Sa(){var wa=Fa.value;wa=0==wa.length&&"string"!=Da?0:wa;na.allowAuto&&(null!=wa.trim&&"auto"==wa.trim().toLowerCase()?(wa="auto",Da="string"):(wa=parseFloat(wa),wa=isNaN(wa)?0:wa));null!=na.min&&wa<
-na.min?wa=na.min:null!=na.max&&wa>na.max&&(wa=na.max);wa=encodeURIComponent(("int"==Da?parseInt(wa):wa)+"");S(V,wa,na)}var Fa=document.createElement("input");R(La,Fa,!0);Fa.value=decodeURIComponent(ia);Fa.className="gePropEditor";"int"!=Da&&"float"!=Da||na.allowAuto||(Fa.type="number",Fa.step="int"==Da?"1":"any",null!=na.min&&(Fa.min=parseFloat(na.min)),null!=na.max&&(Fa.max=parseFloat(na.max)));u.appendChild(Fa);mxEvent.addListener(Fa,"keypress",function(wa){13==wa.keyCode&&Sa()});Fa.focus();mxEvent.addListener(Fa,
-"blur",function(){Sa()})})));na.isDeletable&&(pa=mxUtils.button("-",mxUtils.bind(sa,function(Sa){S(V,"",na,na.index);mxEvent.consume(Sa)})),pa.style.height="16px",pa.style.width="25px",pa.style.float="right",pa.className="geColorBtn",La.appendChild(pa));Ma.appendChild(La);return Ma}var sa=this,Aa=this.editorUi.editor.graph,Ca=[];u.style.position="relative";u.style.padding="0";var Ba=document.createElement("table");Ba.className="geProperties";Ba.style.whiteSpace="nowrap";Ba.style.width="100%";var ta=
-document.createElement("tr");ta.className="gePropHeader";var Pa=document.createElement("th");Pa.className="gePropHeaderCell";var Ta=document.createElement("img");Ta.src=Sidebar.prototype.expandedImage;Ta.style.verticalAlign="middle";Pa.appendChild(Ta);mxUtils.write(Pa,mxResources.get("property"));ta.style.cursor="pointer";var Oa=function(){var V=Ba.querySelectorAll(".gePropNonHeaderRow");if(sa.editorUi.propertiesCollapsed){Ta.src=Sidebar.prototype.collapsedImage;var ia="none";for(var na=u.childNodes.length-
-1;0<=na;na--)try{var va=u.childNodes[na],pa=va.nodeName.toUpperCase();"INPUT"!=pa&&"SELECT"!=pa||u.removeChild(va)}catch(za){}}else Ta.src=Sidebar.prototype.expandedImage,ia="";for(na=0;na<V.length;na++)V[na].style.display=ia};mxEvent.addListener(ta,"click",function(){sa.editorUi.propertiesCollapsed=!sa.editorUi.propertiesCollapsed;Oa()});ta.appendChild(Pa);Pa=document.createElement("th");Pa.className="gePropHeaderCell";Pa.innerHTML=mxResources.get("value");ta.appendChild(Pa);Ba.appendChild(ta);var Xa=
-!1,Ga=!1;ta=null;1==P.vertices.length&&0==P.edges.length?ta=P.vertices[0].id:0==P.vertices.length&&1==P.edges.length&&(ta=P.edges[0].id);null!=ta&&Ba.appendChild(ua("id",mxUtils.htmlEntities(ta),{dispName:"ID",type:"readOnly"},!0,!1));for(var eb in H)if(ta=H[eb],"function"!=typeof ta.isVisible||ta.isVisible(P,this)){var bb=null!=P.style[eb]?mxUtils.htmlEntities(P.style[eb]+""):null!=ta.getDefaultValue?ta.getDefaultValue(P,this):ta.defVal;if("separator"==ta.type)Ga=!Ga;else{if("staticArr"==ta.type)ta.size=
-parseInt(P.style[ta.sizeProperty]||H[ta.sizeProperty].defVal)||0;else if(null!=ta.dependentProps){var z=ta.dependentProps,K=[],M=[];for(Pa=0;Pa<z.length;Pa++){var T=P.style[z[Pa]];M.push(H[z[Pa]].subDefVal);K.push(null!=T?T.split(","):[])}ta.dependentPropsDefVal=M;ta.dependentPropsVals=K}Ba.appendChild(ua(eb,bb,ta,Xa,Ga));Xa=!Xa}}for(Pa=0;Pa<Ca.length;Pa++)for(ta=Ca[Pa],H=ta.parentRow,P=0;P<ta.values.length;P++)eb=ua(ta.name,ta.values[P],{type:ta.type,parentRow:ta.parentRow,isDeletable:ta.isDeletable,
-index:P,defVal:ta.defVal,countProperty:ta.countProperty,size:ta.size},0==P%2,ta.flipBkg),H.parentNode.insertBefore(eb,H.nextSibling),H=eb;u.appendChild(Ba);Oa();return u};StyleFormatPanel.prototype.addStyles=function(u){function H(ta){mxEvent.addListener(ta,"mouseenter",function(){ta.style.opacity="1"});mxEvent.addListener(ta,"mouseleave",function(){ta.style.opacity="0.5"})}var P=this.editorUi,S=P.editor.graph,R=document.createElement("div");R.style.whiteSpace="nowrap";R.style.paddingLeft="24px";
-R.style.paddingRight="20px";u.style.paddingLeft="16px";u.style.paddingBottom="6px";u.style.position="relative";u.appendChild(R);var ca="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(" "),ea=document.createElement("div");ea.style.whiteSpace="nowrap";ea.style.position="relative";ea.style.textAlign="center";ea.style.width="210px";for(var fa=[],ra=0;ra<this.defaultColorSchemes.length;ra++){var ua=
-document.createElement("div");ua.style.display="inline-block";ua.style.width="6px";ua.style.height="6px";ua.style.marginLeft="4px";ua.style.marginRight="3px";ua.style.borderRadius="3px";ua.style.cursor="pointer";ua.style.background="transparent";ua.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(ta){mxEvent.addListener(ua,"click",mxUtils.bind(this,function(){sa(ta)}))})(ra);fa.push(ua);ea.appendChild(ua)}var sa=mxUtils.bind(this,function(ta){null!=fa[ta]&&(null!=this.format.currentScheme&&
-null!=fa[this.format.currentScheme]&&(fa[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=ta,Aa(this.defaultColorSchemes[this.format.currentScheme]),fa[this.format.currentScheme].style.background="#84d7ff")}),Aa=mxUtils.bind(this,function(ta){var Pa=mxUtils.bind(this,function(Oa){var Xa=mxUtils.button("",mxUtils.bind(this,function(bb){S.getModel().beginUpdate();try{for(var z=P.getSelectionState().cells,K=0;K<z.length;K++){for(var M=S.getModel().getStyle(z[K]),T=
-0;T<ca.length;T++)M=mxUtils.removeStylename(M,ca[T]);var V=S.getModel().isVertex(z[K])?S.defaultVertexStyle:S.defaultEdgeStyle;null!=Oa?(mxEvent.isShiftDown(bb)||(M=""==Oa.fill?mxUtils.setStyle(M,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(M,mxConstants.STYLE_FILLCOLOR,Oa.fill||mxUtils.getValue(V,mxConstants.STYLE_FILLCOLOR,null)),M=mxUtils.setStyle(M,mxConstants.STYLE_GRADIENTCOLOR,Oa.gradient||mxUtils.getValue(V,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(bb)||mxClient.IS_MAC&&
-mxEvent.isMetaDown(bb)||!S.getModel().isVertex(z[K])||(M=mxUtils.setStyle(M,mxConstants.STYLE_FONTCOLOR,Oa.font||mxUtils.getValue(V,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(bb)||(M=""==Oa.stroke?mxUtils.setStyle(M,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(M,mxConstants.STYLE_STROKECOLOR,Oa.stroke||mxUtils.getValue(V,mxConstants.STYLE_STROKECOLOR,null)))):(M=mxUtils.setStyle(M,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(V,mxConstants.STYLE_FILLCOLOR,"#ffffff")),M=mxUtils.setStyle(M,
-mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(V,mxConstants.STYLE_STROKECOLOR,"#000000")),M=mxUtils.setStyle(M,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(V,mxConstants.STYLE_GRADIENTCOLOR,null)),S.getModel().isVertex(z[K])&&(M=mxUtils.setStyle(M,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(V,mxConstants.STYLE_FONTCOLOR,null))));S.getModel().setStyle(z[K],M)}}finally{S.getModel().endUpdate()}}));Xa.className="geStyleButton";Xa.style.width="36px";Xa.style.height=10>=this.defaultColorSchemes.length?
-"24px":"30px";Xa.style.margin="0px 6px 6px 0px";if(null!=Oa){var Ga="1"==urlParams.sketch?"2px solid":"1px solid";null!=Oa.gradient?mxClient.IS_IE&&10>document.documentMode?Xa.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+Oa.fill+"', EndColorStr='"+Oa.gradient+"', GradientType=0)":Xa.style.backgroundImage="linear-gradient("+Oa.fill+" 0px,"+Oa.gradient+" 100%)":Oa.fill==mxConstants.NONE?Xa.style.background="url('"+Dialog.prototype.noColorImage+"')":Xa.style.backgroundColor=
-""==Oa.fill?mxUtils.getValue(S.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):Oa.fill||mxUtils.getValue(S.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");Xa.style.border=Oa.stroke==mxConstants.NONE?Ga+" transparent":""==Oa.stroke?Ga+" "+mxUtils.getValue(S.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):Ga+" "+(Oa.stroke||mxUtils.getValue(S.defaultVertexStyle,
-mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=Oa.title&&Xa.setAttribute("title",Oa.title)}else{Ga=mxUtils.getValue(S.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var eb=mxUtils.getValue(S.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");Xa.style.backgroundColor=Ga;Xa.style.border="1px solid "+eb}Xa.style.borderRadius="0";R.appendChild(Xa)});R.innerText="";for(var Ta=0;Ta<ta.length;Ta++)0<Ta&&0==mxUtils.mod(Ta,4)&&mxUtils.br(R),Pa(ta[Ta])});
-null==this.format.currentScheme?sa(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):sa(this.format.currentScheme);ra=10>=this.defaultColorSchemes.length?28:8;var Ca=document.createElement("div");Ca.style.cssText="position:absolute;left:10px;top:8px;bottom:"+ra+"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(Ca,"click",mxUtils.bind(this,function(){sa(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var Ba=document.createElement("div");Ba.style.cssText="position:absolute;left:202px;top:8px;bottom:"+ra+"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&&(u.appendChild(Ca),u.appendChild(Ba));mxEvent.addListener(Ba,"click",mxUtils.bind(this,function(){sa(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));H(Ca);H(Ba);Aa(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&u.appendChild(ea);return u};StyleFormatPanel.prototype.addEditOps=function(u){var H=this.editorUi.getSelectionState(),P=this.editorUi.editor.graph,S=null;1==H.cells.length&&(S=mxUtils.button(mxResources.get("editStyle"),
-mxUtils.bind(this,function(R){this.editorUi.actions.get("editStyle").funct()})),S.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),S.style.width="210px",S.style.marginBottom="2px",u.appendChild(S));P=1==H.cells.length?P.view.getState(H.cells[0]):null;null!=P&&null!=P.shape&&null!=P.shape.stencil?(H=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(R){this.editorUi.actions.get("editShape").funct()})),H.setAttribute("title",
-mxResources.get("editShape")),H.style.marginBottom="2px",null==S?H.style.width="210px":(S.style.width="104px",H.style.width="104px",H.style.marginLeft="2px"),u.appendChild(H)):H.image&&0<H.cells.length&&(H=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(R){this.editorUi.actions.get("image").funct()})),H.setAttribute("title",mxResources.get("editImage")),H.style.marginBottom="2px",null==S?H.style.width="210px":(S.style.width="104px",H.style.width="104px",H.style.marginLeft="2px"),
+arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(u,H){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){u=null!=u?u:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(R){try{MathJax.typesetClear([R]),MathJax.typeset([R]),Editor.onMathJaxDone()}catch(da){MathJax.typesetClear([R]),null!=da.retry?da.retry.then(function(){MathJax.typesetPromise([R]).then(Editor.onMathJaxDone)}):
+null!=window.console&&console.log("Error in MathJax: "+da.toString())}};window.MathJax=null!=H?H:{loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath"]},startup:{pageReady:function(){for(var R=0;R<Editor.mathJaxQueue.length;R++)Editor.doMathJaxRender(Editor.mathJaxQueue[R])}}};Editor.MathJaxRender=function(R){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(R):Editor.mathJaxQueue.push(R)};Editor.MathJaxClear=
+function(){Editor.mathJaxQueue=[]};Editor.onMathJaxDone=function(){};var P=Editor.prototype.init;Editor.prototype.init=function(){P.apply(this,arguments);var R=mxUtils.bind(this,function(da,fa){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,R);this.graph.addListener(mxEvent.REFRESH,R)};H=document.getElementsByTagName("script");if(null!=H&&0<H.length){var W=document.createElement("script");
+W.setAttribute("type","text/javascript");W.setAttribute("src",u);H[0].parentNode.appendChild(W)}}};Editor.prototype.csvToArray=function(u){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(u))return null;var H=[];u.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,
+function(P,W,R,da){void 0!==W?H.push(W.replace(/\\'/g,"'")):void 0!==R?H.push(R.replace(/\\"/g,'"')):void 0!==da&&H.push(da);return""});/,\s*$/.test(u)&&H.push("");return H};Editor.prototype.isCorsEnabledForUrl=function(u){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||u.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(u)||
+"https://raw.githubusercontent.com/"===u.substring(0,34)||"https://fonts.googleapis.com/"===u.substring(0,29)||"https://fonts.gstatic.com/"===u.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var u=new mxUrlConverter;u.updateBaseUrl();var H=u.convert,P=this;u.convert=function(W){if(null!=W){var R="http://"==W.substring(0,7)||"https://"==W.substring(0,8);R&&!navigator.onLine?W=Editor.svgBrokenImage.src:!R||W.substring(0,u.baseUrl.length)==u.baseUrl||P.crossOriginImages&&P.isCorsEnabledForUrl(W)?
+"chrome-extension://"==W.substring(0,19)||mxClient.IS_CHROMEAPP||(W=H.apply(this,arguments)):W=PROXY_URL+"?url="+encodeURIComponent(W)}return W};return u};Editor.createSvgDataUri=function(u){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(u)))};Editor.prototype.convertImageToDataUri=function(u,H){try{var P=!0,W=window.setTimeout(mxUtils.bind(this,function(){P=!1;H(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(u))mxUtils.get(u,mxUtils.bind(this,function(da){window.clearTimeout(W);
+P&&H(Editor.createSvgDataUri(da.getText()))}),function(){window.clearTimeout(W);P&&H(Editor.svgBrokenImage.src)});else{var R=new Image;this.crossOriginImages&&(R.crossOrigin="anonymous");R.onload=function(){window.clearTimeout(W);if(P)try{var da=document.createElement("canvas"),fa=da.getContext("2d");da.height=R.height;da.width=R.width;fa.drawImage(R,0,0);H(da.toDataURL())}catch(ea){H(Editor.svgBrokenImage.src)}};R.onerror=function(){window.clearTimeout(W);P&&H(Editor.svgBrokenImage.src)};R.src=u}}catch(da){H(Editor.svgBrokenImage.src)}};
+Editor.prototype.convertImages=function(u,H,P,W){null==W&&(W=this.createImageUrlConverter());var R=0,da=P||{};P=mxUtils.bind(this,function(fa,ea){fa=u.getElementsByTagName(fa);for(var qa=0;qa<fa.length;qa++)mxUtils.bind(this,function(va){try{if(null!=va){var ua=W.convert(va.getAttribute(ea));if(null!=ua&&"data:"!=ua.substring(0,5)){var Aa=da[ua];null==Aa?(R++,this.convertImageToDataUri(ua,function(za){null!=za&&(da[ua]=za,va.setAttribute(ea,za));R--;0==R&&H(u)})):va.setAttribute(ea,Aa)}else null!=
+ua&&va.setAttribute(ea,ua)}}catch(za){}})(fa[qa])});P("image","xlink:href");P("img","src");0==R&&H(u)};Editor.base64Encode=function(u){for(var H="",P=0,W=u.length,R,da,fa;P<W;){R=u.charCodeAt(P++)&255;if(P==W){H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R>>2);H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&3)<<4);H+="==";break}da=u.charCodeAt(P++);if(P==W){H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R>>
+2);H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&3)<<4|(da&240)>>4);H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((da&15)<<2);H+="=";break}fa=u.charCodeAt(P++);H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R>>2);H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&3)<<4|(da&240)>>4);H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((da&15)<<2|(fa&192)>>
+6);H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(fa&63)}return H};Editor.prototype.loadUrl=function(u,H,P,W,R,da,fa,ea){try{var qa=!fa&&(W||/(\.png)($|\?)/i.test(u)||/(\.jpe?g)($|\?)/i.test(u)||/(\.gif)($|\?)/i.test(u)||/(\.pdf)($|\?)/i.test(u));R=null!=R?R:!0;var va=mxUtils.bind(this,function(){mxUtils.get(u,mxUtils.bind(this,function(ua){if(200<=ua.getStatus()&&299>=ua.getStatus()){if(null!=H){var Aa=ua.getText();if(qa){if((9==document.documentMode||10==document.documentMode)&&
+"undefined"!==typeof window.mxUtilsBinaryToArray){ua=mxUtilsBinaryToArray(ua.request.responseBody).toArray();Aa=Array(ua.length);for(var za=0;za<ua.length;za++)Aa[za]=String.fromCharCode(ua[za]);Aa=Aa.join("")}da=null!=da?da:"data:image/png;base64,";Aa=da+Editor.base64Encode(Aa)}H(Aa)}}else null!=P&&(0==ua.getStatus()?P({message:mxResources.get("accessDenied")},ua):404==ua.getStatus()?P({code:ua.getStatus()},ua):P({message:mxResources.get("error")+" "+ua.getStatus()},ua))}),function(ua){null!=P&&
+P({message:mxResources.get("error")+" "+ua.getStatus()})},qa,this.timeout,function(){R&&null!=P&&P({code:App.ERROR_TIMEOUT,retry:va})},ea)});va()}catch(ua){null!=P&&P(ua)}};Editor.prototype.absoluteCssFonts=function(u){var H=null;if(null!=u){var P=u.split("url(");if(0<P.length){H=[P[0]];u=window.location.pathname;var W=null!=u?u.lastIndexOf("/"):-1;0<=W&&(u=u.substring(0,W+1));W=document.getElementsByTagName("base");var R=null;null!=W&&0<W.length&&(R=W[0].getAttribute("href"));for(var da=1;da<P.length;da++)if(W=
+P[da].indexOf(")"),0<W){var fa=Editor.trimCssUrl(P[da].substring(0,W));this.graph.isRelativeUrl(fa)&&(fa=null!=R?R+fa:window.location.protocol+"//"+window.location.hostname+("/"==fa.charAt(0)?"":u)+fa);H.push('url("'+fa+'"'+P[da].substring(W))}else H.push(P[da])}else H=[u]}return null!=H?H.join(""):null};Editor.prototype.mapFontUrl=function(u,H,P){/^https?:\/\//.test(H)&&!this.isCorsEnabledForUrl(H)&&(H=PROXY_URL+"?url="+encodeURIComponent(H));P(u,H)};Editor.prototype.embedCssFonts=function(u,H){var P=
+u.split("url("),W=0;null==this.cachedFonts&&(this.cachedFonts={});var R=mxUtils.bind(this,function(){if(0==W){for(var qa=[P[0]],va=1;va<P.length;va++){var ua=P[va].indexOf(")");qa.push('url("');qa.push(this.cachedFonts[Editor.trimCssUrl(P[va].substring(0,ua))]);qa.push('"'+P[va].substring(ua))}H(qa.join(""))}});if(0<P.length){for(u=1;u<P.length;u++){var da=P[u].indexOf(")"),fa=null,ea=P[u].indexOf("format(",da);0<ea&&(fa=Editor.trimCssUrl(P[u].substring(ea+7,P[u].indexOf(")",ea))));mxUtils.bind(this,
+function(qa){if(null==this.cachedFonts[qa]){this.cachedFonts[qa]=qa;W++;var va="application/x-font-ttf";if("svg"==fa||/(\.svg)($|\?)/i.test(qa))va="image/svg+xml";else if("otf"==fa||"embedded-opentype"==fa||/(\.otf)($|\?)/i.test(qa))va="application/x-font-opentype";else if("woff"==fa||/(\.woff)($|\?)/i.test(qa))va="application/font-woff";else if("woff2"==fa||/(\.woff2)($|\?)/i.test(qa))va="application/font-woff2";else if("eot"==fa||/(\.eot)($|\?)/i.test(qa))va="application/vnd.ms-fontobject";else if("sfnt"==
+fa||/(\.sfnt)($|\?)/i.test(qa))va="application/font-sfnt";this.mapFontUrl(va,qa,mxUtils.bind(this,function(ua,Aa){this.loadUrl(Aa,mxUtils.bind(this,function(za){this.cachedFonts[qa]=za;W--;R()}),mxUtils.bind(this,function(za){W--;R()}),!0,null,"data:"+ua+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(P[u].substring(0,da)),fa)}R()}else H(u)};Editor.prototype.loadFonts=function(u){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(H){this.resolvedFontCss=
+H;null!=u&&u()})):null!=u&&u()};Editor.prototype.createGoogleFontCache=function(){var u={},H;for(H in Graph.fontMapping)Graph.isCssFontUrl(H)&&(u[H]=Graph.fontMapping[H]);return u};Editor.prototype.embedExtFonts=function(u){var H=this.graph.getCustomFonts();if(0<H.length){var P=[],W=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var R=mxUtils.bind(this,function(){0==W&&this.embedCssFonts(P.join(""),u)}),da=0;da<H.length;da++)mxUtils.bind(this,function(fa,
+ea){Graph.isCssFontUrl(ea)?null==this.cachedGoogleFonts[ea]?(W++,this.loadUrl(ea,mxUtils.bind(this,function(qa){this.cachedGoogleFonts[ea]=qa;P.push(qa+"\n");W--;R()}),mxUtils.bind(this,function(qa){W--;P.push("@import url("+ea+");\n");R()}))):P.push(this.cachedGoogleFonts[ea]+"\n"):P.push('@font-face {font-family: "'+fa+'";src: url("'+ea+'")}\n')})(H[da].name,H[da].url);R()}else u()};Editor.prototype.addMathCss=function(u){u=u.getElementsByTagName("defs");if(null!=u&&0<u.length)for(var H=document.getElementsByTagName("style"),
+P=0;P<H.length;P++){var W=mxUtils.getTextContent(H[P]);0>W.indexOf("mxPageSelector")&&0<W.indexOf("MathJax")&&u[0].appendChild(H[P].cloneNode(!0))}};Editor.prototype.addFontCss=function(u,H){H=null!=H?H:this.absoluteCssFonts(this.fontCss);if(null!=H){var P=u.getElementsByTagName("defs"),W=u.ownerDocument;0==P.length?(P=null!=W.createElementNS?W.createElementNS(mxConstants.NS_SVG,"defs"):W.createElement("defs"),null!=u.firstChild?u.insertBefore(P,u.firstChild):u.appendChild(P)):P=P[0];u=null!=W.createElementNS?
+W.createElementNS(mxConstants.NS_SVG,"style"):W.createElement("style");u.setAttribute("type","text/css");mxUtils.setTextContent(u,H);P.appendChild(u)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(u,H,P){var W=mxClient.IS_FF?8192:16384;return Math.min(P,Math.min(W/u,W/H))};Editor.prototype.exportToCanvas=function(u,H,P,W,R,da,fa,ea,qa,va,ua,Aa,za,Ca,sa,Va,Ua,Ra){try{da=null!=da?da:!0;fa=null!=fa?fa:
+!0;Aa=null!=Aa?Aa:this.graph;za=null!=za?za:0;var Za=qa?null:Aa.background;Za==mxConstants.NONE&&(Za=null);null==Za&&(Za=W);null==Za&&0==qa&&(Za=Va?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(Aa.getSvg(null,null,za,Ca,null,fa,null,null,null,va,null,Va,Ua,Ra),mxUtils.bind(this,function(Ha){try{var db=new Image;db.onload=mxUtils.bind(this,function(){try{var z=function(){mxClient.IS_SF?window.setTimeout(function(){V.drawImage(db,0,0);u(K,Ha)},0):(V.drawImage(db,0,0),u(K,Ha))},
+K=document.createElement("canvas"),L=parseInt(Ha.getAttribute("width")),S=parseInt(Ha.getAttribute("height"));ea=null!=ea?ea:1;null!=H&&(ea=da?Math.min(1,Math.min(3*H/(4*S),H/L)):H/L);ea=this.getMaxCanvasScale(L,S,ea);L=Math.ceil(ea*L);S=Math.ceil(ea*S);K.setAttribute("width",L);K.setAttribute("height",S);var V=K.getContext("2d");null!=Za&&(V.beginPath(),V.rect(0,0,L,S),V.fillStyle=Za,V.fill());1!=ea&&V.scale(ea,ea);if(sa){var ja=Aa.view,na=ja.scale;ja.scale=1;var ya=btoa(unescape(encodeURIComponent(ja.createSvgGrid(ja.gridColor))));
+ja.scale=na;ya="data:image/svg+xml;base64,"+ya;var ra=Aa.gridSize*ja.gridSteps*ea,ta=Aa.getGraphBounds(),Da=ja.translate.x*na,Oa=ja.translate.y*na,Ma=Da+(ta.x-Da)/na-za,Wa=Oa+(ta.y-Oa)/na-za,Sa=new Image;Sa.onload=function(){try{for(var Fa=-Math.round(ra-mxUtils.mod((Da-Ma)*ea,ra)),Ja=-Math.round(ra-mxUtils.mod((Oa-Wa)*ea,ra));Fa<L;Fa+=ra)for(var xa=Ja;xa<S;xa+=ra)V.drawImage(Sa,Fa/ea,xa/ea);z()}catch(Ba){null!=R&&R(Ba)}};Sa.onerror=function(Fa){null!=R&&R(Fa)};Sa.src=ya}else z()}catch(Fa){null!=
+R&&R(Fa)}});db.onerror=function(z){null!=R&&R(z)};va&&this.graph.addSvgShadow(Ha);this.graph.mathEnabled&&this.addMathCss(Ha);var cb=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(Ha,this.resolvedFontCss),db.src=Editor.createSvgDataUri(mxUtils.getXml(Ha))}catch(z){null!=R&&R(z)}});this.embedExtFonts(mxUtils.bind(this,function(z){try{null!=z&&this.addFontCss(Ha,z),this.loadFonts(cb)}catch(K){null!=R&&R(K)}}))}catch(z){null!=R&&R(z)}}),P,ua)}catch(Ha){null!=R&&R(Ha)}};
+Editor.crcTable=[];for(var D=0;256>D;D++)for(var t=D,E=0;8>E;E++)t=1==(t&1)?3988292384^t>>>1:t>>>1,Editor.crcTable[D]=t;Editor.updateCRC=function(u,H,P,W){for(var R=0;R<W;R++)u=Editor.crcTable[(u^H.charCodeAt(P+R))&255]^u>>>8;return u};Editor.crc32=function(u){for(var H=-1,P=0;P<u.length;P++)H=H>>>8^Editor.crcTable[(H^u.charCodeAt(P))&255];return(H^-1)>>>0};Editor.writeGraphModelToPng=function(u,H,P,W,R){function da(ua,Aa){var za=qa;qa+=Aa;return ua.substring(za,qa)}function fa(ua){ua=da(ua,4);return ua.charCodeAt(3)+
+(ua.charCodeAt(2)<<8)+(ua.charCodeAt(1)<<16)+(ua.charCodeAt(0)<<24)}function ea(ua){return String.fromCharCode(ua>>24&255,ua>>16&255,ua>>8&255,ua&255)}u=u.substring(u.indexOf(",")+1);u=window.atob?atob(u):Base64.decode(u,!0);var qa=0;if(da(u,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=R&&R();else if(da(u,4),"IHDR"!=da(u,4))null!=R&&R();else{da(u,17);R=u.substring(0,qa);do{var va=fa(u);if("IDAT"==da(u,4)){R=u.substring(0,qa-8);"pHYs"==H&&"dpi"==P?(P=Math.round(W/.0254),
+P=ea(P)+ea(P)+String.fromCharCode(1)):P=P+String.fromCharCode(0)+("zTXt"==H?String.fromCharCode(0):"")+W;W=4294967295;W=Editor.updateCRC(W,H,0,4);W=Editor.updateCRC(W,P,0,P.length);R+=ea(P.length)+H+P+ea(W^4294967295);R+=u.substring(qa-8,u.length);break}R+=u.substring(qa-8,qa-4+va);da(u,va);da(u,4)}while(va);return"data:image/png;base64,"+(window.btoa?btoa(R):Base64.encode(R,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var d=ColorDialog.addRecentColor;
+ColorDialog.addRecentColor=function(u,H){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(u,H){var P=null;null!=u.editor.graph.getModel().getParent(H)?P=H.getId():null!=u.currentPage&&(P=u.currentPage.getId());return P});
+if(null!=window.StyleFormatPanel){var g=Format.prototype.init;Format.prototype.init=function(){g.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var 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 u=this.editorUi.getCurrentFile();return"1"==urlParams.embed||
+null!=u&&u.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(u){return!1};var q=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(u){u=q.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var H=this.editorUi,P=H.editor.graph,W=this.createOption(mxResources.get("shadow"),function(){return P.shadowVisible},function(R){var da=new ChangePageSetup(H);da.ignoreColor=!0;da.ignoreImage=!0;da.shadowVisible=
+R;P.model.execute(da)},{install:function(R){this.listener=function(){R(P.shadowVisible)};H.addListener("shadowVisibleChanged",this.listener)},destroy:function(){H.removeListener(this.listener)}});Editor.enableShadowOption||(W.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(W,60));u.appendChild(W)}return u};var y=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(u){u=y.apply(this,arguments);var H=this.editorUi,P=H.editor.graph;
+if(P.isEnabled()){var W=H.getCurrentFile();if(null!=W&&W.isAutosaveOptional()){var R=this.createOption(mxResources.get("autosave"),function(){return H.editor.autosave},function(fa){H.editor.setAutosave(fa);H.editor.autosave&&W.isModified()&&W.fileChanged()},{install:function(fa){this.listener=function(){fa(H.editor.autosave)};H.editor.addListener("autosaveChanged",this.listener)},destroy:function(){H.editor.removeListener(this.listener)}});u.appendChild(R)}}if(this.isMathOptionVisible()&&P.isEnabled()&&
+"undefined"!==typeof MathJax){R=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return P.mathEnabled},function(fa){H.actions.get("mathematicalTypesetting").funct()},{install:function(fa){this.listener=function(){fa(P.mathEnabled)};H.addListener("mathEnabledChanged",this.listener)},destroy:function(){H.removeListener(this.listener)}});R.style.paddingTop="5px";u.appendChild(R);var da=H.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");da.style.position=
+"relative";da.style.marginLeft="6px";da.style.top="2px";R.appendChild(da)}return u};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=
+[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",
+dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
+{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties=
+[{name:"size",dispName:"Size",type:"float",defVal:.3,min:0,max:1}];mxCellRenderer.defaultShapes.internalStorage.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"dx",dispName:"Left Line",type:"float",min:0,defVal:20},{name:"dy",dispName:"Top Line",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.cube.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"darkOpacity",dispName:"Dark Opacity",
+type:"float",min:-1,max:1,defVal:0},{name:"darkOpacity2",dispName:"Dark Opacity 2",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.step.prototype.customProperties=[{name:"size",dispName:"Notch Size",type:"float",min:0,defVal:20},{name:"fixedSize",dispName:"Fixed Size",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.trapezoid.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",
+type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.tape.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.4}];mxCellRenderer.defaultShapes.note.prototype.customProperties=[{name:"size",dispName:"Fold Size",type:"float",min:0,defVal:30},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.card.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
+{name:"size",dispName:"Cutoff Size",type:"float",min:0,defVal:30}];mxCellRenderer.defaultShapes.callout.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"base",dispName:"Callout Width",type:"float",min:0,defVal:20},{name:"size",dispName:"Callout Length",type:"float",min:0,defVal:30},{name:"position",dispName:"Callout Position",type:"float",min:0,max:1,defVal:.5},{name:"position2",dispName:"Callout Tip Position",type:"float",
+min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.folder.prototype.customProperties=[{name:"tabWidth",dispName:"Tab Width",type:"float"},{name:"tabHeight",dispName:"Tab Height",type:"float"},{name:"tabPosition",dispName:"Tap Position",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"right",dispName:"Right"}]}];mxCellRenderer.defaultShapes.swimlane.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"startSize",dispName:"Header Size",type:"float"},
+{name:"swimlaneHead",dispName:"Head Border",type:"bool",defVal:!0},{name:"swimlaneBody",dispName:"Body Border",type:"bool",defVal:!0},{name:"horizontal",dispName:"Horizontal",type:"bool",defVal:!0},{name:"separatorColor",dispName:"Separator Color",type:"color",defVal:null}];mxCellRenderer.defaultShapes.table.prototype.customProperties=[{name:"rowLines",dispName:"Row Lines",type:"bool",defVal:!0},{name:"columnLines",dispName:"Column Lines",type:"bool",defVal:!0},{name:"fixedRows",dispName:"Fixed Rows",
+type:"bool",defVal:!1},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",defVal:!1},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",defVal:!1}].concat(mxCellRenderer.defaultShapes.swimlane.prototype.customProperties).concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);mxCellRenderer.defaultShapes.tableRow.prototype.customProperties=mxCellRenderer.defaultShapes.swimlane.prototype.customProperties.concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);
+mxCellRenderer.defaultShapes.doubleEllipse.prototype.customProperties=[{name:"margin",dispName:"Indent",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.ext.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"double",dispName:"Double",type:"bool",defVal:!1},{name:"margin",dispName:"Indent",type:"float",min:0,defVal:0}];mxCellRenderer.defaultShapes.curlyBracket.prototype.customProperties=[{name:"rounded",dispName:"Rounded",type:"bool",defVal:!0},
+{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.image.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.label.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0},{name:"imageAlign",dispName:"Image Align",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"center",dispName:"Center"},{val:"right",dispName:"Right"}],defVal:"left"},
+{name:"imageVerticalAlign",dispName:"Image Vertical Align",type:"enum",enumList:[{val:"top",dispName:"Top"},{val:"middle",dispName:"Middle"},{val:"bottom",dispName:"Bottom"}],defVal:"middle"},{name:"imageWidth",dispName:"Image Width",type:"float",min:0,defVal:24},{name:"imageHeight",dispName:"Image Height",type:"float",min:0,defVal:24},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:12},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.dataStorage.prototype.customProperties=
+[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.1}];mxCellRenderer.defaultShapes.manualInput.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:30},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.loopLimit.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.offPageConnector.prototype.customProperties=
+[{name:"size",dispName:"Size",type:"float",min:0,defVal:38},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.display.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.singleArrow.prototype.customProperties=[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.doubleArrow.prototype.customProperties=
+[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.cross.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.corner.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.tee.prototype.customProperties=
+[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.umlLifeline.prototype.customProperties=[{name:"participant",dispName:"Participant",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName:"Actor"},{val:"umlBoundary",dispName:"Boundary"},{val:"umlEntity",dispName:"Entity"},{val:"umlControl",dispName:"Control"}]},{name:"size",dispName:"Height",type:"float",defVal:40,
+min:0}];mxCellRenderer.defaultShapes.umlFrame.prototype.customProperties=[{name:"width",dispName:"Title Width",type:"float",defVal:60,min:0},{name:"height",dispName:"Title Height",type:"float",defVal:30,min:0}];StyleFormatPanel.prototype.defaultColorSchemes=[[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",font:"#333333"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",
+stroke:"#9673a6"}],[{fill:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",
+font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",
+stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},
+{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=function(u,H,P){if(null!=H){var W=function(da){if(null!=da)if(P)for(var fa=0;fa<da.length;fa++)H[da[fa].name]=da[fa];else for(var ea in H){var qa=!1;for(fa=0;fa<da.length;fa++)if(da[fa].name==ea&&da[fa].type==H[ea].type){qa=!0;break}qa||
+delete H[ea]}},R=this.editorUi.editor.graph.view.getState(u);null!=R&&null!=R.shape&&(R.shape.commonCustomPropAdded||(R.shape.commonCustomPropAdded=!0,R.shape.customProperties=R.shape.customProperties||[],R.cell.vertex?Array.prototype.push.apply(R.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(R.shape.customProperties,Editor.commonEdgeProperties)),W(R.shape.customProperties));u=u.getAttribute("customProperties");if(null!=u)try{W(JSON.parse(u))}catch(da){}}};var F=
+StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var u=this.editorUi.getSelectionState();"image"!=u.style.shape&&!u.containsLabel&&0<u.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));F.apply(this,arguments);if(Editor.enableCustomProperties){for(var H={},P=u.vertices,W=u.edges,R=0;R<P.length;R++)this.findCommonProperties(P[R],H,0==R);for(R=0;R<W.length;R++)this.findCommonProperties(W[R],H,0==P.length&&0==R);null!=Object.getOwnPropertyNames&&0<
+Object.getOwnPropertyNames(H).length&&this.container.appendChild(this.addProperties(this.createPanel(),H,u))}};var C=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(u){this.addActions(u,["copyStyle","pasteStyle"]);return C.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(u,H,P){function W(V,ja,na,ya){Aa.getModel().beginUpdate();try{var ra=[],ta=[];if(null!=na.index){for(var Da=[],Oa=na.parentRow.nextSibling;Oa&&
+Oa.getAttribute("data-pName")==V;)Da.push(Oa.getAttribute("data-pValue")),Oa=Oa.nextSibling;na.index<Da.length?null!=ya?Da.splice(ya,1):Da[na.index]=ja:Da.push(ja);null!=na.size&&Da.length>na.size&&(Da=Da.slice(0,na.size));ja=Da.join(",");null!=na.countProperty&&(Aa.setCellStyles(na.countProperty,Da.length,Aa.getSelectionCells()),ra.push(na.countProperty),ta.push(Da.length))}Aa.setCellStyles(V,ja,Aa.getSelectionCells());ra.push(V);ta.push(ja);if(null!=na.dependentProps)for(V=0;V<na.dependentProps.length;V++){var Ma=
+na.dependentPropsDefVal[V],Wa=na.dependentPropsVals[V];if(Wa.length>ja)Wa=Wa.slice(0,ja);else for(var Sa=Wa.length;Sa<ja;Sa++)Wa.push(Ma);Wa=Wa.join(",");Aa.setCellStyles(na.dependentProps[V],Wa,Aa.getSelectionCells());ra.push(na.dependentProps[V]);ta.push(Wa)}if("function"==typeof na.onChange)na.onChange(Aa,ja);ua.editorUi.fireEvent(new mxEventObject("styleChanged","keys",ra,"values",ta,"cells",Aa.getSelectionCells()))}finally{Aa.getModel().endUpdate()}}function R(V,ja,na){var ya=mxUtils.getOffset(u,
+!0),ra=mxUtils.getOffset(V,!0);ja.style.position="absolute";ja.style.left=ra.x-ya.x+"px";ja.style.top=ra.y-ya.y+"px";ja.style.width=V.offsetWidth+"px";ja.style.height=V.offsetHeight-(na?4:0)+"px";ja.style.zIndex=5}function da(V,ja,na){var ya=document.createElement("div");ya.style.width="32px";ya.style.height="4px";ya.style.margin="2px";ya.style.border="1px solid black";ya.style.background=ja&&"none"!=ja?ja:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(ua,function(ra){this.editorUi.pickColor(ja,
+function(ta){ya.style.background="none"==ta?"url('"+Dialog.prototype.noColorImage+"')":ta;W(V,ta,na)});mxEvent.consume(ra)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(ya);return btn}function fa(V,ja,na,ya,ra,ta,Da){null!=ja&&(ja=ja.split(","),za.push({name:V,values:ja,type:na,defVal:ya,countProperty:ra,parentRow:ta,isDeletable:!0,flipBkg:Da}));btn=mxUtils.button("+",mxUtils.bind(ua,function(Oa){for(var Ma=ta,Wa=0;null!=Ma.nextSibling;)if(Ma.nextSibling.getAttribute("data-pName")==
+V)Ma=Ma.nextSibling,Wa++;else break;var Sa={type:na,parentRow:ta,index:Wa,isDeletable:!0,defVal:ya,countProperty:ra};Wa=va(V,"",Sa,0==Wa%2,Da);W(V,ya,Sa);Ma.parentNode.insertBefore(Wa,Ma.nextSibling);mxEvent.consume(Oa)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function ea(V,ja,na,ya,ra,ta,Da){if(0<ra){var Oa=Array(ra);ja=null!=ja?ja.split(","):[];for(var Ma=0;Ma<ra;Ma++)Oa[Ma]=null!=ja[Ma]?ja[Ma]:null!=ya?ya:"";za.push({name:V,values:Oa,type:na,defVal:ya,
+parentRow:ta,flipBkg:Da,size:ra})}return document.createElement("div")}function qa(V,ja,na){var ya=document.createElement("input");ya.type="checkbox";ya.checked="1"==ja;mxEvent.addListener(ya,"change",function(){W(V,ya.checked?"1":"0",na)});return ya}function va(V,ja,na,ya,ra){var ta=na.dispName,Da=na.type,Oa=document.createElement("tr");Oa.className="gePropRow"+(ra?"Dark":"")+(ya?"Alt":"")+" gePropNonHeaderRow";Oa.setAttribute("data-pName",V);Oa.setAttribute("data-pValue",ja);ya=!1;null!=na.index&&
+(Oa.setAttribute("data-index",na.index),ta=(null!=ta?ta:"")+"["+na.index+"]",ya=!0);var Ma=document.createElement("td");Ma.className="gePropRowCell";ta=mxResources.get(ta,null,ta);mxUtils.write(Ma,ta);Ma.setAttribute("title",ta);ya&&(Ma.style.textAlign="right");Oa.appendChild(Ma);Ma=document.createElement("td");Ma.className="gePropRowCell";if("color"==Da)Ma.appendChild(da(V,ja,na));else if("bool"==Da||"boolean"==Da)Ma.appendChild(qa(V,ja,na));else if("enum"==Da){var Wa=na.enumList;for(ra=0;ra<Wa.length;ra++)if(ta=
+Wa[ra],ta.val==ja){mxUtils.write(Ma,mxResources.get(ta.dispName,null,ta.dispName));break}mxEvent.addListener(Ma,"click",mxUtils.bind(ua,function(){var Sa=document.createElement("select");R(Ma,Sa);for(var Fa=0;Fa<Wa.length;Fa++){var Ja=Wa[Fa],xa=document.createElement("option");xa.value=mxUtils.htmlEntities(Ja.val);mxUtils.write(xa,mxResources.get(Ja.dispName,null,Ja.dispName));Sa.appendChild(xa)}Sa.value=ja;u.appendChild(Sa);mxEvent.addListener(Sa,"change",function(){var Ba=mxUtils.htmlEntities(Sa.value);
+W(V,Ba,na)});Sa.focus();mxEvent.addListener(Sa,"blur",function(){u.removeChild(Sa)})}))}else"dynamicArr"==Da?Ma.appendChild(fa(V,ja,na.subType,na.subDefVal,na.countProperty,Oa,ra)):"staticArr"==Da?Ma.appendChild(ea(V,ja,na.subType,na.subDefVal,na.size,Oa,ra)):"readOnly"==Da?(ra=document.createElement("input"),ra.setAttribute("readonly",""),ra.value=ja,ra.style.width="96px",ra.style.borderWidth="0px",Ma.appendChild(ra)):(Ma.innerHTML=mxUtils.htmlEntities(decodeURIComponent(ja)),mxEvent.addListener(Ma,
+"click",mxUtils.bind(ua,function(){function Sa(){var Ja=Fa.value;Ja=0==Ja.length&&"string"!=Da?0:Ja;na.allowAuto&&(null!=Ja.trim&&"auto"==Ja.trim().toLowerCase()?(Ja="auto",Da="string"):(Ja=parseFloat(Ja),Ja=isNaN(Ja)?0:Ja));null!=na.min&&Ja<na.min?Ja=na.min:null!=na.max&&Ja>na.max&&(Ja=na.max);Ja=encodeURIComponent(("int"==Da?parseInt(Ja):Ja)+"");W(V,Ja,na)}var Fa=document.createElement("input");R(Ma,Fa,!0);Fa.value=decodeURIComponent(ja);Fa.className="gePropEditor";"int"!=Da&&"float"!=Da||na.allowAuto||
+(Fa.type="number",Fa.step="int"==Da?"1":"any",null!=na.min&&(Fa.min=parseFloat(na.min)),null!=na.max&&(Fa.max=parseFloat(na.max)));u.appendChild(Fa);mxEvent.addListener(Fa,"keypress",function(Ja){13==Ja.keyCode&&Sa()});Fa.focus();mxEvent.addListener(Fa,"blur",function(){Sa()})})));na.isDeletable&&(ra=mxUtils.button("-",mxUtils.bind(ua,function(Sa){W(V,"",na,na.index);mxEvent.consume(Sa)})),ra.style.height="16px",ra.style.width="25px",ra.style.float="right",ra.className="geColorBtn",Ma.appendChild(ra));
+Oa.appendChild(Ma);return Oa}var ua=this,Aa=this.editorUi.editor.graph,za=[];u.style.position="relative";u.style.padding="0";var Ca=document.createElement("table");Ca.className="geProperties";Ca.style.whiteSpace="nowrap";Ca.style.width="100%";var sa=document.createElement("tr");sa.className="gePropHeader";var Va=document.createElement("th");Va.className="gePropHeaderCell";var Ua=document.createElement("img");Ua.src=Sidebar.prototype.expandedImage;Ua.style.verticalAlign="middle";Va.appendChild(Ua);
+mxUtils.write(Va,mxResources.get("property"));sa.style.cursor="pointer";var Ra=function(){var V=Ca.querySelectorAll(".gePropNonHeaderRow");if(ua.editorUi.propertiesCollapsed){Ua.src=Sidebar.prototype.collapsedImage;var ja="none";for(var na=u.childNodes.length-1;0<=na;na--)try{var ya=u.childNodes[na],ra=ya.nodeName.toUpperCase();"INPUT"!=ra&&"SELECT"!=ra||u.removeChild(ya)}catch(ta){}}else Ua.src=Sidebar.prototype.expandedImage,ja="";for(na=0;na<V.length;na++)V[na].style.display=ja};mxEvent.addListener(sa,
+"click",function(){ua.editorUi.propertiesCollapsed=!ua.editorUi.propertiesCollapsed;Ra()});sa.appendChild(Va);Va=document.createElement("th");Va.className="gePropHeaderCell";Va.innerHTML=mxResources.get("value");sa.appendChild(Va);Ca.appendChild(sa);var Za=!1,Ha=!1;sa=null;1==P.vertices.length&&0==P.edges.length?sa=P.vertices[0].id:0==P.vertices.length&&1==P.edges.length&&(sa=P.edges[0].id);null!=sa&&Ca.appendChild(va("id",mxUtils.htmlEntities(sa),{dispName:"ID",type:"readOnly"},!0,!1));for(var db in H)if(sa=
+H[db],"function"!=typeof sa.isVisible||sa.isVisible(P,this)){var cb=null!=P.style[db]?mxUtils.htmlEntities(P.style[db]+""):null!=sa.getDefaultValue?sa.getDefaultValue(P,this):sa.defVal;if("separator"==sa.type)Ha=!Ha;else{if("staticArr"==sa.type)sa.size=parseInt(P.style[sa.sizeProperty]||H[sa.sizeProperty].defVal)||0;else if(null!=sa.dependentProps){var z=sa.dependentProps,K=[],L=[];for(Va=0;Va<z.length;Va++){var S=P.style[z[Va]];L.push(H[z[Va]].subDefVal);K.push(null!=S?S.split(","):[])}sa.dependentPropsDefVal=
+L;sa.dependentPropsVals=K}Ca.appendChild(va(db,cb,sa,Za,Ha));Za=!Za}}for(Va=0;Va<za.length;Va++)for(sa=za[Va],H=sa.parentRow,P=0;P<sa.values.length;P++)db=va(sa.name,sa.values[P],{type:sa.type,parentRow:sa.parentRow,isDeletable:sa.isDeletable,index:P,defVal:sa.defVal,countProperty:sa.countProperty,size:sa.size},0==P%2,sa.flipBkg),H.parentNode.insertBefore(db,H.nextSibling),H=db;u.appendChild(Ca);Ra();return u};StyleFormatPanel.prototype.addStyles=function(u){function H(sa){mxEvent.addListener(sa,
+"mouseenter",function(){sa.style.opacity="1"});mxEvent.addListener(sa,"mouseleave",function(){sa.style.opacity="0.5"})}var P=this.editorUi,W=P.editor.graph,R=document.createElement("div");R.style.whiteSpace="nowrap";R.style.paddingLeft="24px";R.style.paddingRight="20px";u.style.paddingLeft="16px";u.style.paddingBottom="6px";u.style.position="relative";u.appendChild(R);var da="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(" "),
+fa=document.createElement("div");fa.style.whiteSpace="nowrap";fa.style.position="relative";fa.style.textAlign="center";fa.style.width="210px";for(var ea=[],qa=0;qa<this.defaultColorSchemes.length;qa++){var va=document.createElement("div");va.style.display="inline-block";va.style.width="6px";va.style.height="6px";va.style.marginLeft="4px";va.style.marginRight="3px";va.style.borderRadius="3px";va.style.cursor="pointer";va.style.background="transparent";va.style.border="1px solid #b5b6b7";mxUtils.bind(this,
+function(sa){mxEvent.addListener(va,"click",mxUtils.bind(this,function(){ua(sa)}))})(qa);ea.push(va);fa.appendChild(va)}var ua=mxUtils.bind(this,function(sa){null!=ea[sa]&&(null!=this.format.currentScheme&&null!=ea[this.format.currentScheme]&&(ea[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=sa,Aa(this.defaultColorSchemes[this.format.currentScheme]),ea[this.format.currentScheme].style.background="#84d7ff")}),Aa=mxUtils.bind(this,function(sa){var Va=mxUtils.bind(this,
+function(Ra){var Za=mxUtils.button("",mxUtils.bind(this,function(cb){W.getModel().beginUpdate();try{for(var z=P.getSelectionState().cells,K=0;K<z.length;K++){for(var L=W.getModel().getStyle(z[K]),S=0;S<da.length;S++)L=mxUtils.removeStylename(L,da[S]);var V=W.getModel().isVertex(z[K])?W.defaultVertexStyle:W.defaultEdgeStyle;null!=Ra?(mxEvent.isShiftDown(cb)||(L=""==Ra.fill?mxUtils.setStyle(L,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(L,mxConstants.STYLE_FILLCOLOR,Ra.fill||mxUtils.getValue(V,
+mxConstants.STYLE_FILLCOLOR,null)),L=mxUtils.setStyle(L,mxConstants.STYLE_GRADIENTCOLOR,Ra.gradient||mxUtils.getValue(V,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(cb)||mxClient.IS_MAC&&mxEvent.isMetaDown(cb)||!W.getModel().isVertex(z[K])||(L=mxUtils.setStyle(L,mxConstants.STYLE_FONTCOLOR,Ra.font||mxUtils.getValue(V,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(cb)||(L=""==Ra.stroke?mxUtils.setStyle(L,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(L,mxConstants.STYLE_STROKECOLOR,
+Ra.stroke||mxUtils.getValue(V,mxConstants.STYLE_STROKECOLOR,null)))):(L=mxUtils.setStyle(L,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(V,mxConstants.STYLE_FILLCOLOR,"#ffffff")),L=mxUtils.setStyle(L,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(V,mxConstants.STYLE_STROKECOLOR,"#000000")),L=mxUtils.setStyle(L,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(V,mxConstants.STYLE_GRADIENTCOLOR,null)),W.getModel().isVertex(z[K])&&(L=mxUtils.setStyle(L,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(V,mxConstants.STYLE_FONTCOLOR,
+null))));W.getModel().setStyle(z[K],L)}}finally{W.getModel().endUpdate()}}));Za.className="geStyleButton";Za.style.width="36px";Za.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";Za.style.margin="0px 6px 6px 0px";if(null!=Ra){var Ha="1"==urlParams.sketch?"2px solid":"1px solid";null!=Ra.gradient?mxClient.IS_IE&&10>document.documentMode?Za.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+Ra.fill+"', EndColorStr='"+Ra.gradient+"', GradientType=0)":Za.style.backgroundImage=
+"linear-gradient("+Ra.fill+" 0px,"+Ra.gradient+" 100%)":Ra.fill==mxConstants.NONE?Za.style.background="url('"+Dialog.prototype.noColorImage+"')":Za.style.backgroundColor=""==Ra.fill?mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):Ra.fill||mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");Za.style.border=Ra.stroke==mxConstants.NONE?Ha+" transparent":""==Ra.stroke?Ha+" "+
+mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):Ha+" "+(Ra.stroke||mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=Ra.title&&Za.setAttribute("title",Ra.title)}else{Ha=mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var db=mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");Za.style.backgroundColor=Ha;
+Za.style.border="1px solid "+db}Za.style.borderRadius="0";R.appendChild(Za)});R.innerText="";for(var Ua=0;Ua<sa.length;Ua++)0<Ua&&0==mxUtils.mod(Ua,4)&&mxUtils.br(R),Va(sa[Ua])});null==this.format.currentScheme?ua(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):ua(this.format.currentScheme);qa=10>=this.defaultColorSchemes.length?28:8;var za=document.createElement("div");za.style.cssText="position:absolute;left:10px;top:8px;bottom:"+qa+"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(za,"click",mxUtils.bind(this,function(){ua(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var Ca=document.createElement("div");Ca.style.cssText="position:absolute;left:202px;top:8px;bottom:"+qa+"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&&(u.appendChild(za),u.appendChild(Ca));mxEvent.addListener(Ca,"click",mxUtils.bind(this,function(){ua(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));H(za);H(Ca);Aa(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&u.appendChild(fa);return u};StyleFormatPanel.prototype.addEditOps=function(u){var H=this.editorUi.getSelectionState(),P=this.editorUi.editor.graph,W=null;1==H.cells.length&&(W=mxUtils.button(mxResources.get("editStyle"),
+mxUtils.bind(this,function(R){this.editorUi.actions.get("editStyle").funct()})),W.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),W.style.width="210px",W.style.marginBottom="2px",u.appendChild(W));P=1==H.cells.length?P.view.getState(H.cells[0]):null;null!=P&&null!=P.shape&&null!=P.shape.stencil?(H=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(R){this.editorUi.actions.get("editShape").funct()})),H.setAttribute("title",
+mxResources.get("editShape")),H.style.marginBottom="2px",null==W?H.style.width="210px":(W.style.width="104px",H.style.width="104px",H.style.marginLeft="2px"),u.appendChild(H)):H.image&&0<H.cells.length&&(H=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(R){this.editorUi.actions.get("image").funct()})),H.setAttribute("title",mxResources.get("editImage")),H.style.marginBottom="2px",null==W?H.style.width="210px":(W.style.width="104px",H.style.width="104px",H.style.marginLeft="2px"),
u.appendChild(H));return u}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(u){return u.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(u){return Graph.isGoogleFontUrl(u)};Graph.createFontElement=function(u,
-H){var P=Graph.fontMapping[H];null==P&&Graph.isCssFontUrl(H)?(u=document.createElement("link"),u.setAttribute("rel","stylesheet"),u.setAttribute("type","text/css"),u.setAttribute("charset","UTF-8"),u.setAttribute("href",H)):(null==P&&(P='@font-face {\nfont-family: "'+u+'";\nsrc: url("'+H+'");\n}'),u=document.createElement("style"),mxUtils.write(u,P));return u};Graph.addFont=function(u,H,P){if(null!=u&&0<u.length&&null!=H&&0<H.length){var S=u.toLowerCase();if("helvetica"!=S&&"arial"!=u&&"sans-serif"!=
-S){var R=Graph.customFontElements[S];null!=R&&R.url!=H&&(R.elt.parentNode.removeChild(R.elt),R=null);null==R?(R=H,"http:"==H.substring(0,5)&&(R=PROXY_URL+"?url="+encodeURIComponent(H)),R={name:u,url:H,elt:Graph.createFontElement(u,R)},Graph.customFontElements[S]=R,Graph.recentCustomFonts[S]=R,H=document.getElementsByTagName("head")[0],null!=P&&("link"==R.elt.nodeName.toLowerCase()?(R.elt.onload=P,R.elt.onerror=P):P()),null!=H&&H.appendChild(R.elt)):null!=P&&P()}else null!=P&&P()}else null!=P&&P();
-return u};Graph.getFontUrl=function(u,H){u=Graph.customFontElements[u.toLowerCase()];null!=u&&(H=u.url);return H};Graph.processFontAttributes=function(u){u=u.getElementsByTagName("*");for(var H=0;H<u.length;H++){var P=u[H].getAttribute("data-font-src");if(null!=P){var S="FONT"==u[H].nodeName?u[H].getAttribute("face"):u[H].style.fontFamily;null!=S&&Graph.addFont(S,P)}}};Graph.processFontStyle=function(u){if(null!=u){var H=mxUtils.getValue(u,"fontSource",null);if(null!=H){var P=mxUtils.getValue(u,mxConstants.STYLE_FONTFAMILY,
+H){var P=Graph.fontMapping[H];null==P&&Graph.isCssFontUrl(H)?(u=document.createElement("link"),u.setAttribute("rel","stylesheet"),u.setAttribute("type","text/css"),u.setAttribute("charset","UTF-8"),u.setAttribute("href",H)):(null==P&&(P='@font-face {\nfont-family: "'+u+'";\nsrc: url("'+H+'");\n}'),u=document.createElement("style"),mxUtils.write(u,P));return u};Graph.addFont=function(u,H,P){if(null!=u&&0<u.length&&null!=H&&0<H.length){var W=u.toLowerCase();if("helvetica"!=W&&"arial"!=u&&"sans-serif"!=
+W){var R=Graph.customFontElements[W];null!=R&&R.url!=H&&(R.elt.parentNode.removeChild(R.elt),R=null);null==R?(R=H,"http:"==H.substring(0,5)&&(R=PROXY_URL+"?url="+encodeURIComponent(H)),R={name:u,url:H,elt:Graph.createFontElement(u,R)},Graph.customFontElements[W]=R,Graph.recentCustomFonts[W]=R,H=document.getElementsByTagName("head")[0],null!=P&&("link"==R.elt.nodeName.toLowerCase()?(R.elt.onload=P,R.elt.onerror=P):P()),null!=H&&H.appendChild(R.elt)):null!=P&&P()}else null!=P&&P()}else null!=P&&P();
+return u};Graph.getFontUrl=function(u,H){u=Graph.customFontElements[u.toLowerCase()];null!=u&&(H=u.url);return H};Graph.processFontAttributes=function(u){u=u.getElementsByTagName("*");for(var H=0;H<u.length;H++){var P=u[H].getAttribute("data-font-src");if(null!=P){var W="FONT"==u[H].nodeName?u[H].getAttribute("face"):u[H].style.fontFamily;null!=W&&Graph.addFont(W,P)}}};Graph.processFontStyle=function(u){if(null!=u){var H=mxUtils.getValue(u,"fontSource",null);if(null!=H){var P=mxUtils.getValue(u,mxConstants.STYLE_FONTFAMILY,
null);null!=P&&Graph.addFont(P,decodeURIComponent(H))}}return u};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!=
urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var I=Graph.prototype.init;Graph.prototype.init=function(){function u(R){H=R}I.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var H=null;mxEvent.addListener(this.container,"mouseenter",u);mxEvent.addListener(this.container,"mousemove",u);mxEvent.addListener(this.container,"mouseleave",function(R){H=null});this.isMouseInsertPoint=function(){return null!=H};var P=this.getInsertPoint;
-this.getInsertPoint=function(){return null!=H?this.getPointForEvent(H):P.apply(this,arguments)};var S=this.layoutManager.getLayout;this.layoutManager.getLayout=function(R){var ca=this.graph.getCellStyle(R);if(null!=ca&&"rack"==ca.childLayout){var ea=new mxStackLayout(this.graph,!1);ea.gridSize=null!=ca.rackUnitSize?parseFloat(ca.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;ea.marginLeft=ca.marginLeft||0;ea.marginRight=ca.marginRight||0;ea.marginTop=ca.marginTop||
-0;ea.marginBottom=ca.marginBottom||0;ea.allowGaps=ca.allowGaps||0;ea.horizontal="1"==mxUtils.getValue(ca,"horizontalRack","0");ea.resizeParent=!1;ea.fill=!0;return ea}return S.apply(this,arguments)};this.updateGlobalUrlVariables()};var G=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(u,H){return Graph.processFontStyle(G.apply(this,arguments))};var Y=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(u,H,P,S,R,ca,ea,fa,ra,ua,
-sa){Y.apply(this,arguments);Graph.processFontAttributes(sa)};var ba=mxText.prototype.redraw;mxText.prototype.redraw=function(){ba.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(u,H,P){function S(){for(var ta=ea.getSelectionCells(),Pa=[],Ta=0;Ta<ta.length;Ta++)ea.isCellVisible(ta[Ta])&&Pa.push(ta[Ta]);ea.setSelectionCells(Pa)}function R(ta){ea.setHiddenTags(ta?[]:fa.slice());S();ea.refresh()}function ca(ta,
-Pa){ua.innerText="";if(0<ta.length){var Ta=document.createElement("table");Ta.setAttribute("cellpadding","2");Ta.style.boxSizing="border-box";Ta.style.tableLayout="fixed";Ta.style.width="100%";var Oa=document.createElement("tbody");if(null!=ta&&0<ta.length)for(var Xa=0;Xa<ta.length;Xa++)(function(Ga){var eb=0>mxUtils.indexOf(ea.hiddenTags,Ga),bb=document.createElement("tr"),z=document.createElement("td");z.style.align="center";z.style.width="16px";var K=document.createElement("img");K.setAttribute("src",
-eb?Editor.visibleImage:Editor.hiddenImage);K.setAttribute("title",mxResources.get(eb?"hideIt":"show",[Ga]));mxUtils.setOpacity(K,eb?75:25);K.style.verticalAlign="middle";K.style.cursor="pointer";K.style.width="16px";if(H||Editor.isDarkMode())K.style.filter="invert(100%)";z.appendChild(K);mxEvent.addListener(K,"click",function(T){mxEvent.isShiftDown(T)?R(0<=mxUtils.indexOf(ea.hiddenTags,Ga)):(ea.toggleHiddenTag(Ga),S(),ea.refresh());mxEvent.consume(T)});bb.appendChild(z);z=document.createElement("td");
-z.style.overflow="hidden";z.style.whiteSpace="nowrap";z.style.textOverflow="ellipsis";z.style.verticalAlign="middle";z.style.cursor="pointer";z.setAttribute("title",Ga);a=document.createElement("a");mxUtils.write(a,Ga);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,eb?100:40);z.appendChild(a);mxEvent.addListener(z,"click",function(T){if(mxEvent.isShiftDown(T)){R(!0);var V=ea.getCellsForTags([Ga],null,null,!0);ea.isEnabled()?ea.setSelectionCells(V):ea.highlightCells(V)}else if(eb&&
-0<ea.hiddenTags.length)R(!0);else{V=fa.slice();var ia=mxUtils.indexOf(V,Ga);V.splice(ia,1);ea.setHiddenTags(V);S();ea.refresh()}mxEvent.consume(T)});bb.appendChild(z);if(ea.isEnabled()){z=document.createElement("td");z.style.verticalAlign="middle";z.style.textAlign="center";z.style.width="18px";if(null==Pa){z.style.align="center";z.style.width="16px";K=document.createElement("img");K.setAttribute("src",Editor.crossImage);K.setAttribute("title",mxResources.get("removeIt",[Ga]));mxUtils.setOpacity(K,
-eb?75:25);K.style.verticalAlign="middle";K.style.cursor="pointer";K.style.width="16px";if(H||Editor.isDarkMode())K.style.filter="invert(100%)";mxEvent.addListener(K,"click",function(T){var V=mxUtils.indexOf(fa,Ga);0<=V&&fa.splice(V,1);ea.removeTagsForCells(ea.model.getDescendants(ea.model.getRoot()),[Ga]);ea.refresh();mxEvent.consume(T)});z.appendChild(K)}else{var M=document.createElement("input");M.setAttribute("type","checkbox");M.style.margin="0px";M.defaultChecked=null!=Pa&&0<=mxUtils.indexOf(Pa,
-Ga);M.checked=M.defaultChecked;M.style.background="transparent";M.setAttribute("title",mxResources.get(M.defaultChecked?"removeIt":"add",[Ga]));mxEvent.addListener(M,"change",function(T){M.checked?ea.addTagsForCells(ea.getSelectionCells(),[Ga]):ea.removeTagsForCells(ea.getSelectionCells(),[Ga]);mxEvent.consume(T)});z.appendChild(M)}bb.appendChild(z)}Oa.appendChild(bb)})(ta[Xa]);Ta.appendChild(Oa);ua.appendChild(Ta)}}var ea=this,fa=ea.hiddenTags.slice(),ra=document.createElement("div");ra.style.userSelect=
-"none";ra.style.overflow="hidden";ra.style.padding="10px";ra.style.height="100%";var ua=document.createElement("div");ua.style.boxSizing="border-box";ua.style.borderRadius="4px";ua.style.userSelect="none";ua.style.overflow="auto";ua.style.position="absolute";ua.style.left="10px";ua.style.right="10px";ua.style.top="10px";ua.style.border=ea.isEnabled()?"1px solid #808080":"none";ua.style.bottom=ea.isEnabled()?"48px":"10px";ra.appendChild(ua);var sa=mxUtils.button(mxResources.get("reset"),function(ta){ea.setHiddenTags([]);
-mxEvent.isShiftDown(ta)||(fa=ea.hiddenTags.slice());S();ea.refresh()});sa.setAttribute("title",mxResources.get("reset"));sa.className="geBtn";sa.style.margin="0 4px 0 0";var Aa=mxUtils.button(mxResources.get("add"),function(){null!=P&&P(fa,function(ta){fa=ta;Ca()})});Aa.setAttribute("title",mxResources.get("add"));Aa.className="geBtn";Aa.style.margin="0";ea.addListener(mxEvent.ROOT,function(){fa=ea.hiddenTags.slice()});var Ca=mxUtils.bind(this,function(ta,Pa){if(u()){ta=ea.getAllTags();for(Pa=0;Pa<
-ta.length;Pa++)0>mxUtils.indexOf(fa,ta[Pa])&&fa.push(ta[Pa]);fa.sort();ea.isSelectionEmpty()?ca(fa):ca(fa,ea.getCommonTagsForCells(ea.getSelectionCells()))}});ea.selectionModel.addListener(mxEvent.CHANGE,Ca);ea.model.addListener(mxEvent.CHANGE,Ca);ea.addListener(mxEvent.REFRESH,Ca);var Ba=document.createElement("div");Ba.style.boxSizing="border-box";Ba.style.whiteSpace="nowrap";Ba.style.position="absolute";Ba.style.overflow="hidden";Ba.style.bottom="0px";Ba.style.height="42px";Ba.style.right="10px";
-Ba.style.left="10px";ea.isEnabled()&&(Ba.appendChild(sa),Ba.appendChild(Aa),ra.appendChild(Ba));return{div:ra,refresh:Ca}};Graph.prototype.getCustomFonts=function(){var u=this.extFonts;u=null!=u?u.slice():[];for(var H in Graph.customFontElements){var P=Graph.customFontElements[H];u.push({name:P.name,url:P.url})}return u};Graph.prototype.setFont=function(u,H){Graph.addFont(u,H);document.execCommand("fontname",!1,u);if(null!=H){var P=this.cellEditor.textarea.getElementsByTagName("font");H=Graph.getFontUrl(u,
-H);for(var S=0;S<P.length;S++)P[S].getAttribute("face")==u&&P[S].getAttribute("data-font-src")!=H&&P[S].setAttribute("data-font-src",H)}};var Z=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return Z.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 u=JSON.parse(decodeURIComponent(urlParams.vars));
-if(null!=u)for(var H in u)this.globalVars[H]=u[H]}catch(P){null!=window.console&&console.log("Error in vars URL parameter: "+P)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var X=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(u){var H=X.apply(this,arguments);null==H&&null!=this.globalVars&&(H=this.globalVars[u]);return H};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var u=
-this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(u.ownerDocument)).decode(u)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var qa=Graph.prototype.getSvg;Graph.prototype.getSvg=function(u,H,P,S,R,ca,ea,fa,ra,ua,sa,Aa,Ca,Ba){var ta=null,Pa=null,Ta=null;Aa||null==this.themes||"darkTheme"!=this.defaultThemeName||(ta=this.stylesheet,Pa=this.shapeForegroundColor,Ta=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?
-"#000000":Editor.lightColor,this.shapeBackgroundColor="darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var Oa=qa.apply(this,arguments),Xa=this.getCustomFonts();if(sa&&0<Xa.length){var Ga=Oa.ownerDocument,eb=null!=Ga.createElementNS?Ga.createElementNS(mxConstants.NS_SVG,"style"):Ga.createElement("style");null!=Ga.setAttributeNS?eb.setAttributeNS("type","text/css"):eb.setAttribute("type","text/css");for(var bb="",z="",K=0;K<Xa.length;K++){var M=
-Xa[K].name,T=Xa[K].url;Graph.isCssFontUrl(T)?bb+="@import url("+T+");\n":z+='@font-face {\nfont-family: "'+M+'";\nsrc: url("'+T+'");\n}\n'}eb.appendChild(Ga.createTextNode(bb+z));Oa.getElementsByTagName("defs")[0].appendChild(eb)}this.mathEnabled&&(document.body.appendChild(Oa),Editor.MathJaxRender(Oa),Oa.parentNode.removeChild(Oa));null!=ta&&(this.shapeBackgroundColor=Ta,this.shapeForegroundColor=Pa,this.stylesheet=ta,this.refresh());return Oa};var Q=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=
-function(u){Q.apply(this,arguments);null!=u.secondLabel&&(u.secondLabel.destroy(),u.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(u){return[u.shape,u.text,u.secondLabel,u.control]};var W=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){W.apply(this,arguments);this.enumerationState=0};var ha=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(u){null!=u.shape&&this.redrawEnumerationState(u);return ha.apply(this,
+this.getInsertPoint=function(){return null!=H?this.getPointForEvent(H):P.apply(this,arguments)};var W=this.layoutManager.getLayout;this.layoutManager.getLayout=function(R){var da=this.graph.getCellStyle(R);if(null!=da&&"rack"==da.childLayout){var fa=new mxStackLayout(this.graph,!1);fa.gridSize=null!=da.rackUnitSize?parseFloat(da.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;fa.marginLeft=da.marginLeft||0;fa.marginRight=da.marginRight||0;fa.marginTop=da.marginTop||
+0;fa.marginBottom=da.marginBottom||0;fa.allowGaps=da.allowGaps||0;fa.horizontal="1"==mxUtils.getValue(da,"horizontalRack","0");fa.resizeParent=!1;fa.fill=!0;return fa}return W.apply(this,arguments)};this.updateGlobalUrlVariables()};var G=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(u,H){return Graph.processFontStyle(G.apply(this,arguments))};var Z=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(u,H,P,W,R,da,fa,ea,qa,va,
+ua){Z.apply(this,arguments);Graph.processFontAttributes(ua)};var ca=mxText.prototype.redraw;mxText.prototype.redraw=function(){ca.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(u,H,P){function W(){for(var sa=fa.getSelectionCells(),Va=[],Ua=0;Ua<sa.length;Ua++)fa.isCellVisible(sa[Ua])&&Va.push(sa[Ua]);fa.setSelectionCells(Va)}function R(sa){fa.setHiddenTags(sa?[]:ea.slice());W();fa.refresh()}function da(sa,
+Va){va.innerText="";if(0<sa.length){var Ua=document.createElement("table");Ua.setAttribute("cellpadding","2");Ua.style.boxSizing="border-box";Ua.style.tableLayout="fixed";Ua.style.width="100%";var Ra=document.createElement("tbody");if(null!=sa&&0<sa.length)for(var Za=0;Za<sa.length;Za++)(function(Ha){var db=0>mxUtils.indexOf(fa.hiddenTags,Ha),cb=document.createElement("tr"),z=document.createElement("td");z.style.align="center";z.style.width="16px";var K=document.createElement("img");K.setAttribute("src",
+db?Editor.visibleImage:Editor.hiddenImage);K.setAttribute("title",mxResources.get(db?"hideIt":"show",[Ha]));mxUtils.setOpacity(K,db?75:25);K.style.verticalAlign="middle";K.style.cursor="pointer";K.style.width="16px";if(H||Editor.isDarkMode())K.style.filter="invert(100%)";z.appendChild(K);mxEvent.addListener(K,"click",function(S){mxEvent.isShiftDown(S)?R(0<=mxUtils.indexOf(fa.hiddenTags,Ha)):(fa.toggleHiddenTag(Ha),W(),fa.refresh());mxEvent.consume(S)});cb.appendChild(z);z=document.createElement("td");
+z.style.overflow="hidden";z.style.whiteSpace="nowrap";z.style.textOverflow="ellipsis";z.style.verticalAlign="middle";z.style.cursor="pointer";z.setAttribute("title",Ha);a=document.createElement("a");mxUtils.write(a,Ha);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,db?100:40);z.appendChild(a);mxEvent.addListener(z,"click",function(S){if(mxEvent.isShiftDown(S)){R(!0);var V=fa.getCellsForTags([Ha],null,null,!0);fa.isEnabled()?fa.setSelectionCells(V):fa.highlightCells(V)}else if(db&&
+0<fa.hiddenTags.length)R(!0);else{V=ea.slice();var ja=mxUtils.indexOf(V,Ha);V.splice(ja,1);fa.setHiddenTags(V);W();fa.refresh()}mxEvent.consume(S)});cb.appendChild(z);if(fa.isEnabled()){z=document.createElement("td");z.style.verticalAlign="middle";z.style.textAlign="center";z.style.width="18px";if(null==Va){z.style.align="center";z.style.width="16px";K=document.createElement("img");K.setAttribute("src",Editor.crossImage);K.setAttribute("title",mxResources.get("removeIt",[Ha]));mxUtils.setOpacity(K,
+db?75:25);K.style.verticalAlign="middle";K.style.cursor="pointer";K.style.width="16px";if(H||Editor.isDarkMode())K.style.filter="invert(100%)";mxEvent.addListener(K,"click",function(S){var V=mxUtils.indexOf(ea,Ha);0<=V&&ea.splice(V,1);fa.removeTagsForCells(fa.model.getDescendants(fa.model.getRoot()),[Ha]);fa.refresh();mxEvent.consume(S)});z.appendChild(K)}else{var L=document.createElement("input");L.setAttribute("type","checkbox");L.style.margin="0px";L.defaultChecked=null!=Va&&0<=mxUtils.indexOf(Va,
+Ha);L.checked=L.defaultChecked;L.style.background="transparent";L.setAttribute("title",mxResources.get(L.defaultChecked?"removeIt":"add",[Ha]));mxEvent.addListener(L,"change",function(S){L.checked?fa.addTagsForCells(fa.getSelectionCells(),[Ha]):fa.removeTagsForCells(fa.getSelectionCells(),[Ha]);mxEvent.consume(S)});z.appendChild(L)}cb.appendChild(z)}Ra.appendChild(cb)})(sa[Za]);Ua.appendChild(Ra);va.appendChild(Ua)}}var fa=this,ea=fa.hiddenTags.slice(),qa=document.createElement("div");qa.style.userSelect=
+"none";qa.style.overflow="hidden";qa.style.padding="10px";qa.style.height="100%";var va=document.createElement("div");va.style.boxSizing="border-box";va.style.borderRadius="4px";va.style.userSelect="none";va.style.overflow="auto";va.style.position="absolute";va.style.left="10px";va.style.right="10px";va.style.top="10px";va.style.border=fa.isEnabled()?"1px solid #808080":"none";va.style.bottom=fa.isEnabled()?"48px":"10px";qa.appendChild(va);var ua=mxUtils.button(mxResources.get("reset"),function(sa){fa.setHiddenTags([]);
+mxEvent.isShiftDown(sa)||(ea=fa.hiddenTags.slice());W();fa.refresh()});ua.setAttribute("title",mxResources.get("reset"));ua.className="geBtn";ua.style.margin="0 4px 0 0";var Aa=mxUtils.button(mxResources.get("add"),function(){null!=P&&P(ea,function(sa){ea=sa;za()})});Aa.setAttribute("title",mxResources.get("add"));Aa.className="geBtn";Aa.style.margin="0";fa.addListener(mxEvent.ROOT,function(){ea=fa.hiddenTags.slice()});var za=mxUtils.bind(this,function(sa,Va){if(u()){sa=fa.getAllTags();for(Va=0;Va<
+sa.length;Va++)0>mxUtils.indexOf(ea,sa[Va])&&ea.push(sa[Va]);ea.sort();fa.isSelectionEmpty()?da(ea):da(ea,fa.getCommonTagsForCells(fa.getSelectionCells()))}});fa.selectionModel.addListener(mxEvent.CHANGE,za);fa.model.addListener(mxEvent.CHANGE,za);fa.addListener(mxEvent.REFRESH,za);var Ca=document.createElement("div");Ca.style.boxSizing="border-box";Ca.style.whiteSpace="nowrap";Ca.style.position="absolute";Ca.style.overflow="hidden";Ca.style.bottom="0px";Ca.style.height="42px";Ca.style.right="10px";
+Ca.style.left="10px";fa.isEnabled()&&(Ca.appendChild(ua),Ca.appendChild(Aa),qa.appendChild(Ca));return{div:qa,refresh:za}};Graph.prototype.getCustomFonts=function(){var u=this.extFonts;u=null!=u?u.slice():[];for(var H in Graph.customFontElements){var P=Graph.customFontElements[H];u.push({name:P.name,url:P.url})}return u};Graph.prototype.setFont=function(u,H){Graph.addFont(u,H);document.execCommand("fontname",!1,u);if(null!=H){var P=this.cellEditor.textarea.getElementsByTagName("font");H=Graph.getFontUrl(u,
+H);for(var W=0;W<P.length;W++)P[W].getAttribute("face")==u&&P[W].getAttribute("data-font-src")!=H&&P[W].setAttribute("data-font-src",H)}};var aa=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return aa.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 u=JSON.parse(decodeURIComponent(urlParams.vars));
+if(null!=u)for(var H in u)this.globalVars[H]=u[H]}catch(P){null!=window.console&&console.log("Error in vars URL parameter: "+P)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var Y=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(u){var H=Y.apply(this,arguments);null==H&&null!=this.globalVars&&(H=this.globalVars[u]);return H};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var u=
+this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(u.ownerDocument)).decode(u)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var pa=Graph.prototype.getSvg;Graph.prototype.getSvg=function(u,H,P,W,R,da,fa,ea,qa,va,ua,Aa,za,Ca){var sa=null,Va=null,Ua=null;Aa||null==this.themes||"darkTheme"!=this.defaultThemeName||(sa=this.stylesheet,Va=this.shapeForegroundColor,Ua=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?
+"#000000":Editor.lightColor,this.shapeBackgroundColor="darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var Ra=pa.apply(this,arguments),Za=this.getCustomFonts();if(ua&&0<Za.length){var Ha=Ra.ownerDocument,db=null!=Ha.createElementNS?Ha.createElementNS(mxConstants.NS_SVG,"style"):Ha.createElement("style");null!=Ha.setAttributeNS?db.setAttributeNS("type","text/css"):db.setAttribute("type","text/css");for(var cb="",z="",K=0;K<Za.length;K++){var L=
+Za[K].name,S=Za[K].url;Graph.isCssFontUrl(S)?cb+="@import url("+S+");\n":z+='@font-face {\nfont-family: "'+L+'";\nsrc: url("'+S+'");\n}\n'}db.appendChild(Ha.createTextNode(cb+z));Ra.getElementsByTagName("defs")[0].appendChild(db)}this.mathEnabled&&(document.body.appendChild(Ra),Editor.MathJaxRender(Ra),Ra.parentNode.removeChild(Ra));null!=sa&&(this.shapeBackgroundColor=Ua,this.shapeForegroundColor=Va,this.stylesheet=sa,this.refresh());return Ra};var Q=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=
+function(u){Q.apply(this,arguments);null!=u.secondLabel&&(u.secondLabel.destroy(),u.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(u){return[u.shape,u.text,u.secondLabel,u.control]};var X=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){X.apply(this,arguments);this.enumerationState=0};var ha=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(u){null!=u.shape&&this.redrawEnumerationState(u);return ha.apply(this,
arguments)};mxGraphView.prototype.createEnumerationValue=function(u){u=decodeURIComponent(mxUtils.getValue(u.style,"enumerateValue",""));""==u&&(u=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(u)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(u){var H="1"==mxUtils.getValue(u.style,"enumerate",0);H&&null==u.secondLabel?(u.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),
-u.secondLabel.size=12,u.secondLabel.state=u,u.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(u,u.secondLabel)):H||null==u.secondLabel||(u.secondLabel.destroy(),u.secondLabel=null);H=u.secondLabel;if(null!=H){var P=u.view.scale,S=this.createEnumerationValue(u);u=this.graph.model.isVertex(u.cell)?new mxRectangle(u.x+u.width-4*P,u.y+4*P,0,0):mxRectangle.fromPoint(u.view.getPoint(u));H.bounds.equals(u)&&H.value==S&&H.scale==P||(H.bounds=u,H.value=S,H.scale=
-P,H.redraw())}};var la=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){la.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var u=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;",u.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,u.ownerSVGElement))}};var ja=Graph.prototype.refresh;Graph.prototype.refresh=function(){ja.apply(this,
-arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var U=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){U.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(u){"data:action/json,"==u.substring(0,17)&&(u=JSON.parse(u.substring(17)),null!=
-u.actions&&this.executeCustomActions(u.actions))};Graph.prototype.executeCustomActions=function(u,H){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 P=!1,S=0,R=0,ca=mxUtils.bind(this,function(){P||(P=!0,this.model.beginUpdate())}),ea=mxUtils.bind(this,
-function(){P&&(P=!1,this.model.endUpdate())}),fa=mxUtils.bind(this,function(){0<S&&S--;0==S&&ra()}),ra=mxUtils.bind(this,function(){if(R<u.length){var ua=this.stoppingCustomActions,sa=u[R++],Aa=[];if(null!=sa.open)if(ea(),this.isCustomLink(sa.open)){if(!this.customLinkClicked(sa.open))return}else this.openLink(sa.open);null==sa.wait||ua||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;fa()}),S++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,
-""!=sa.wait?parseInt(sa.wait):1E3),ea());null!=sa.opacity&&null!=sa.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(sa.opacity,!0)),sa.opacity.value);null!=sa.fadeIn&&(S++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(sa.fadeIn,!0)),0,1,fa,ua?0:sa.fadeIn.delay));null!=sa.fadeOut&&(S++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(sa.fadeOut,!0)),1,0,fa,ua?0:sa.fadeOut.delay));null!=sa.wipeIn&&(Aa=Aa.concat(this.createWipeAnimations(this.getCellsForAction(sa.wipeIn,
-!0),!0)));null!=sa.wipeOut&&(Aa=Aa.concat(this.createWipeAnimations(this.getCellsForAction(sa.wipeOut,!0),!1)));null!=sa.toggle&&(ca(),this.toggleCells(this.getCellsForAction(sa.toggle,!0)));if(null!=sa.show){ca();var Ca=this.getCellsForAction(sa.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(Ca),1);this.setCellsVisible(Ca,!0)}null!=sa.hide&&(ca(),Ca=this.getCellsForAction(sa.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(Ca),0),this.setCellsVisible(Ca,!1));null!=sa.toggleStyle&&
-null!=sa.toggleStyle.key&&(ca(),this.toggleCellStyles(sa.toggleStyle.key,null!=sa.toggleStyle.defaultValue?sa.toggleStyle.defaultValue:"0",this.getCellsForAction(sa.toggleStyle,!0)));null!=sa.style&&null!=sa.style.key&&(ca(),this.setCellStyles(sa.style.key,sa.style.value,this.getCellsForAction(sa.style,!0)));Ca=[];null!=sa.select&&this.isEnabled()&&(Ca=this.getCellsForAction(sa.select),this.setSelectionCells(Ca));null!=sa.highlight&&(Ca=this.getCellsForAction(sa.highlight),this.highlightCells(Ca,
-sa.highlight.color,sa.highlight.duration,sa.highlight.opacity));null!=sa.scroll&&(Ca=this.getCellsForAction(sa.scroll));null!=sa.viewbox&&this.fitWindow(sa.viewbox,sa.viewbox.border);0<Ca.length&&this.scrollCellToVisible(Ca[0]);if(null!=sa.tags){Ca=[];null!=sa.tags.hidden&&(Ca=Ca.concat(sa.tags.hidden));if(null!=sa.tags.visible)for(var Ba=this.getAllTags(),ta=0;ta<Ba.length;ta++)0>mxUtils.indexOf(sa.tags.visible,Ba[ta])&&0>mxUtils.indexOf(Ca,Ba[ta])&&Ca.push(Ba[ta]);this.setHiddenTags(Ca);this.refresh()}0<
-Aa.length&&(S++,this.executeAnimations(Aa,fa,ua?1:sa.steps,ua?0:sa.delay));0==S?ra():ea()}else this.stoppingCustomActions=this.executingCustomActions=!1,ea(),null!=H&&H()});ra()}};Graph.prototype.doUpdateCustomLinksForCell=function(u,H){var P=this.getLinkForCell(H);null!=P&&"data:action/json,"==P.substring(0,17)&&this.setLinkForCell(H,this.updateCustomLink(u,P));if(this.isHtmlLabel(H)){var S=document.createElement("div");S.innerHTML=this.sanitizeHtml(this.getLabel(H));for(var R=S.getElementsByTagName("a"),
-ca=!1,ea=0;ea<R.length;ea++)P=R[ea].getAttribute("href"),null!=P&&"data:action/json,"==P.substring(0,17)&&(R[ea].setAttribute("href",this.updateCustomLink(u,P)),ca=!0);ca&&this.labelChanged(H,S.innerHTML)}};Graph.prototype.updateCustomLink=function(u,H){if("data:action/json,"==H.substring(0,17))try{var P=JSON.parse(H.substring(17));null!=P.actions&&(this.updateCustomLinkActions(u,P.actions),H="data:action/json,"+JSON.stringify(P))}catch(S){}return H};Graph.prototype.updateCustomLinkActions=function(u,
-H){for(var P=0;P<H.length;P++){var S=H[P],R;for(R in S)this.updateCustomLinkAction(u,S[R],"cells"),this.updateCustomLinkAction(u,S[R],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(u,H,P){if(null!=H&&null!=H[P]){for(var S=[],R=0;R<H[P].length;R++)if("*"==H[P][R])S.push(H[P][R]);else{var ca=u[H[P][R]];null!=ca?""!=ca&&S.push(ca):S.push(H[P][R])}H[P]=S}};Graph.prototype.getCellsForAction=function(u,H){H=this.getCellsById(u.cells).concat(this.getCellsForTags(u.tags,null,H));if(null!=
-u.excludeCells){for(var P=[],S=0;S<H.length;S++)0>u.excludeCells.indexOf(H[S].id)&&P.push(H[S]);H=P}return H};Graph.prototype.getCellsById=function(u){var H=[];if(null!=u)for(var P=0;P<u.length;P++)if("*"==u[P]){var S=this.model.getRoot();H=H.concat(this.model.filterDescendants(function(ca){return ca!=S},S))}else{var R=this.model.getCell(u[P]);null!=R&&H.push(R)}return H};var L=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(u){return L.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(u))};
+u.secondLabel.size=12,u.secondLabel.state=u,u.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(u,u.secondLabel)):H||null==u.secondLabel||(u.secondLabel.destroy(),u.secondLabel=null);H=u.secondLabel;if(null!=H){var P=u.view.scale,W=this.createEnumerationValue(u);u=this.graph.model.isVertex(u.cell)?new mxRectangle(u.x+u.width-4*P,u.y+4*P,0,0):mxRectangle.fromPoint(u.view.getPoint(u));H.bounds.equals(u)&&H.value==W&&H.scale==P||(H.bounds=u,H.value=W,H.scale=
+P,H.redraw())}};var U=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){U.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var u=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;",u.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,u.ownerSVGElement))}};var ma=Graph.prototype.refresh;Graph.prototype.refresh=function(){ma.apply(this,
+arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var T=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){T.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(u){"data:action/json,"==u.substring(0,17)&&(u=JSON.parse(u.substring(17)),null!=
+u.actions&&this.executeCustomActions(u.actions))};Graph.prototype.executeCustomActions=function(u,H){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 P=!1,W=0,R=0,da=mxUtils.bind(this,function(){P||(P=!0,this.model.beginUpdate())}),fa=mxUtils.bind(this,
+function(){P&&(P=!1,this.model.endUpdate())}),ea=mxUtils.bind(this,function(){0<W&&W--;0==W&&qa()}),qa=mxUtils.bind(this,function(){if(R<u.length){var va=this.stoppingCustomActions,ua=u[R++],Aa=[];if(null!=ua.open)if(fa(),this.isCustomLink(ua.open)){if(!this.customLinkClicked(ua.open))return}else this.openLink(ua.open);null==ua.wait||va||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;ea()}),W++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,
+""!=ua.wait?parseInt(ua.wait):1E3),fa());null!=ua.opacity&&null!=ua.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(ua.opacity,!0)),ua.opacity.value);null!=ua.fadeIn&&(W++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(ua.fadeIn,!0)),0,1,ea,va?0:ua.fadeIn.delay));null!=ua.fadeOut&&(W++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(ua.fadeOut,!0)),1,0,ea,va?0:ua.fadeOut.delay));null!=ua.wipeIn&&(Aa=Aa.concat(this.createWipeAnimations(this.getCellsForAction(ua.wipeIn,
+!0),!0)));null!=ua.wipeOut&&(Aa=Aa.concat(this.createWipeAnimations(this.getCellsForAction(ua.wipeOut,!0),!1)));null!=ua.toggle&&(da(),this.toggleCells(this.getCellsForAction(ua.toggle,!0)));if(null!=ua.show){da();var za=this.getCellsForAction(ua.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(za),1);this.setCellsVisible(za,!0)}null!=ua.hide&&(da(),za=this.getCellsForAction(ua.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(za),0),this.setCellsVisible(za,!1));null!=ua.toggleStyle&&
+null!=ua.toggleStyle.key&&(da(),this.toggleCellStyles(ua.toggleStyle.key,null!=ua.toggleStyle.defaultValue?ua.toggleStyle.defaultValue:"0",this.getCellsForAction(ua.toggleStyle,!0)));null!=ua.style&&null!=ua.style.key&&(da(),this.setCellStyles(ua.style.key,ua.style.value,this.getCellsForAction(ua.style,!0)));za=[];null!=ua.select&&this.isEnabled()&&(za=this.getCellsForAction(ua.select),this.setSelectionCells(za));null!=ua.highlight&&(za=this.getCellsForAction(ua.highlight),this.highlightCells(za,
+ua.highlight.color,ua.highlight.duration,ua.highlight.opacity));null!=ua.scroll&&(za=this.getCellsForAction(ua.scroll));null!=ua.viewbox&&this.fitWindow(ua.viewbox,ua.viewbox.border);0<za.length&&this.scrollCellToVisible(za[0]);if(null!=ua.tags){za=[];null!=ua.tags.hidden&&(za=za.concat(ua.tags.hidden));if(null!=ua.tags.visible)for(var Ca=this.getAllTags(),sa=0;sa<Ca.length;sa++)0>mxUtils.indexOf(ua.tags.visible,Ca[sa])&&0>mxUtils.indexOf(za,Ca[sa])&&za.push(Ca[sa]);this.setHiddenTags(za);this.refresh()}0<
+Aa.length&&(W++,this.executeAnimations(Aa,ea,va?1:ua.steps,va?0:ua.delay));0==W?qa():fa()}else this.stoppingCustomActions=this.executingCustomActions=!1,fa(),null!=H&&H()});qa()}};Graph.prototype.doUpdateCustomLinksForCell=function(u,H){var P=this.getLinkForCell(H);null!=P&&"data:action/json,"==P.substring(0,17)&&this.setLinkForCell(H,this.updateCustomLink(u,P));if(this.isHtmlLabel(H)){var W=document.createElement("div");W.innerHTML=this.sanitizeHtml(this.getLabel(H));for(var R=W.getElementsByTagName("a"),
+da=!1,fa=0;fa<R.length;fa++)P=R[fa].getAttribute("href"),null!=P&&"data:action/json,"==P.substring(0,17)&&(R[fa].setAttribute("href",this.updateCustomLink(u,P)),da=!0);da&&this.labelChanged(H,W.innerHTML)}};Graph.prototype.updateCustomLink=function(u,H){if("data:action/json,"==H.substring(0,17))try{var P=JSON.parse(H.substring(17));null!=P.actions&&(this.updateCustomLinkActions(u,P.actions),H="data:action/json,"+JSON.stringify(P))}catch(W){}return H};Graph.prototype.updateCustomLinkActions=function(u,
+H){for(var P=0;P<H.length;P++){var W=H[P],R;for(R in W)this.updateCustomLinkAction(u,W[R],"cells"),this.updateCustomLinkAction(u,W[R],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(u,H,P){if(null!=H&&null!=H[P]){for(var W=[],R=0;R<H[P].length;R++)if("*"==H[P][R])W.push(H[P][R]);else{var da=u[H[P][R]];null!=da?""!=da&&W.push(da):W.push(H[P][R])}H[P]=W}};Graph.prototype.getCellsForAction=function(u,H){H=this.getCellsById(u.cells).concat(this.getCellsForTags(u.tags,null,H));if(null!=
+u.excludeCells){for(var P=[],W=0;W<H.length;W++)0>u.excludeCells.indexOf(H[W].id)&&P.push(H[W]);H=P}return H};Graph.prototype.getCellsById=function(u){var H=[];if(null!=u)for(var P=0;P<u.length;P++)if("*"==u[P]){var W=this.model.getRoot();H=H.concat(this.model.filterDescendants(function(da){return da!=W},W))}else{var R=this.model.getCell(u[P]);null!=R&&H.push(R)}return H};var M=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(u){return M.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(u))};
Graph.prototype.setHiddenTags=function(u){this.hiddenTags=u;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(u){var H=mxUtils.indexOf(this.hiddenTags,u);0>H?this.hiddenTags.push(u):0<=H&&this.hiddenTags.splice(H,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(u){if(null==u||0==u.length||0==this.hiddenTags.length)return!1;u=u.split(" ");if(u.length>this.hiddenTags.length)return!1;for(var H=0;H<u.length;H++)if(0>
-mxUtils.indexOf(this.hiddenTags,u[H]))return!1;return!0};Graph.prototype.getCellsForTags=function(u,H,P,S){var R=[];if(null!=u){H=null!=H?H:this.model.getDescendants(this.model.getRoot());for(var ca=0,ea={},fa=0;fa<u.length;fa++)0<u[fa].length&&(ea[u[fa]]=!0,ca++);for(fa=0;fa<H.length;fa++)if(P&&this.model.getParent(H[fa])==this.model.root||this.model.isVertex(H[fa])||this.model.isEdge(H[fa])){var ra=this.getTagsForCell(H[fa]),ua=!1;if(0<ra.length&&(ra=ra.split(" "),ra.length>=u.length)){for(var sa=
-ua=0;sa<ra.length&&ua<ca;sa++)null!=ea[ra[sa]]&&ua++;ua=ua==ca}ua&&(1!=S||this.isCellVisible(H[fa]))&&R.push(H[fa])}}return R};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(u){for(var H=null,P=[],S=0;S<u.length;S++){var R=this.getTagsForCell(u[S]);P=[];if(0<R.length){R=R.split(" ");for(var ca={},ea=0;ea<R.length;ea++)if(null==H||null!=H[R[ea]])ca[R[ea]]=!0,P.push(R[ea]);H=ca}else return[]}return P};
-Graph.prototype.getTagsForCells=function(u){for(var H=[],P={},S=0;S<u.length;S++){var R=this.getTagsForCell(u[S]);if(0<R.length){R=R.split(" ");for(var ca=0;ca<R.length;ca++)null==P[R[ca]]&&(P[R[ca]]=!0,H.push(R[ca]))}}return H};Graph.prototype.getTagsForCell=function(u){return this.getAttributeForCell(u,"tags","")};Graph.prototype.addTagsForCells=function(u,H){if(0<u.length&&0<H.length){this.model.beginUpdate();try{for(var P=0;P<u.length;P++){for(var S=this.getTagsForCell(u[P]),R=S.split(" "),ca=
-!1,ea=0;ea<H.length;ea++){var fa=mxUtils.trim(H[ea]);""!=fa&&0>mxUtils.indexOf(R,fa)&&(S=0<S.length?S+" "+fa:fa,ca=!0)}ca&&this.setAttributeForCell(u[P],"tags",S)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(u,H){if(0<u.length&&0<H.length){this.model.beginUpdate();try{for(var P=0;P<u.length;P++){var S=this.getTagsForCell(u[P]);if(0<S.length){for(var R=S.split(" "),ca=!1,ea=0;ea<H.length;ea++){var fa=mxUtils.indexOf(R,H[ea]);0<=fa&&(R.splice(fa,1),ca=!0)}ca&&this.setAttributeForCell(u[P],
-"tags",R.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(u){this.model.beginUpdate();try{for(var H=0;H<u.length;H++)this.model.setVisible(u[H],!this.model.isVisible(u[H]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(u,H){this.model.beginUpdate();try{for(var P=0;P<u.length;P++)this.model.setVisible(u[P],H)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(u,H,P,S){for(var R=0;R<u.length;R++)this.highlightCell(u[R],
-H,P,S)};Graph.prototype.highlightCell=function(u,H,P,S,R){H=null!=H?H:mxConstants.DEFAULT_VALID_COLOR;P=null!=P?P:1E3;u=this.view.getState(u);var ca=null;null!=u&&(R=null!=R?R:4,R=Math.max(R+1,mxUtils.getValue(u.style,mxConstants.STYLE_STROKEWIDTH,1)+R),ca=new mxCellHighlight(this,H,R,!1),null!=S&&(ca.opacity=S),ca.highlight(u),window.setTimeout(function(){null!=ca.shape&&(mxUtils.setPrefixedStyle(ca.shape.node.style,"transition","all 1200ms ease-in-out"),ca.shape.node.style.opacity=0);window.setTimeout(function(){ca.destroy()},
-1200)},P));return ca};Graph.prototype.addSvgShadow=function(u,H,P,S){P=null!=P?P:!1;S=null!=S?S:!0;var R=u.ownerDocument,ca=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"filter"):R.createElement("filter");ca.setAttribute("id",this.shadowId);var ea=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):R.createElement("feGaussianBlur");ea.setAttribute("in","SourceAlpha");ea.setAttribute("stdDeviation",this.svgShadowBlur);ea.setAttribute("result","blur");ca.appendChild(ea);
-ea=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feOffset"):R.createElement("feOffset");ea.setAttribute("in","blur");ea.setAttribute("dx",this.svgShadowSize);ea.setAttribute("dy",this.svgShadowSize);ea.setAttribute("result","offsetBlur");ca.appendChild(ea);ea=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feFlood"):R.createElement("feFlood");ea.setAttribute("flood-color",this.svgShadowColor);ea.setAttribute("flood-opacity",this.svgShadowOpacity);ea.setAttribute("result",
-"offsetColor");ca.appendChild(ea);ea=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feComposite"):R.createElement("feComposite");ea.setAttribute("in","offsetColor");ea.setAttribute("in2","offsetBlur");ea.setAttribute("operator","in");ea.setAttribute("result","offsetBlur");ca.appendChild(ea);ea=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feBlend"):R.createElement("feBlend");ea.setAttribute("in","SourceGraphic");ea.setAttribute("in2","offsetBlur");ca.appendChild(ea);
-ea=u.getElementsByTagName("defs");0==ea.length?(R=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"defs"):R.createElement("defs"),null!=u.firstChild?u.insertBefore(R,u.firstChild):u.appendChild(R)):R=ea[0];R.appendChild(ca);P||(H=null!=H?H:u.getElementsByTagName("g")[0],null!=H&&(H.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(u.getAttribute("width")))&&S&&(u.setAttribute("width",parseInt(u.getAttribute("width"))+6),u.setAttribute("height",parseInt(u.getAttribute("height"))+
-6),H=u.getAttribute("viewBox"),null!=H&&0<H.length&&(H=H.split(" "),3<H.length&&(w=parseFloat(H[2])+6,h=parseFloat(H[3])+6,u.setAttribute("viewBox",H[0]+" "+H[1]+" "+w+" "+h))))));return ca};Graph.prototype.setShadowVisible=function(u,H){mxClient.IS_SVG&&!mxClient.IS_SF&&(H=null!=H?H:!0,(this.shadowVisible=u)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),H&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=
+mxUtils.indexOf(this.hiddenTags,u[H]))return!1;return!0};Graph.prototype.getCellsForTags=function(u,H,P,W){var R=[];if(null!=u){H=null!=H?H:this.model.getDescendants(this.model.getRoot());for(var da=0,fa={},ea=0;ea<u.length;ea++)0<u[ea].length&&(fa[u[ea]]=!0,da++);for(ea=0;ea<H.length;ea++)if(P&&this.model.getParent(H[ea])==this.model.root||this.model.isVertex(H[ea])||this.model.isEdge(H[ea])){var qa=this.getTagsForCell(H[ea]),va=!1;if(0<qa.length&&(qa=qa.split(" "),qa.length>=u.length)){for(var ua=
+va=0;ua<qa.length&&va<da;ua++)null!=fa[qa[ua]]&&va++;va=va==da}va&&(1!=W||this.isCellVisible(H[ea]))&&R.push(H[ea])}}return R};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(u){for(var H=null,P=[],W=0;W<u.length;W++){var R=this.getTagsForCell(u[W]);P=[];if(0<R.length){R=R.split(" ");for(var da={},fa=0;fa<R.length;fa++)if(null==H||null!=H[R[fa]])da[R[fa]]=!0,P.push(R[fa]);H=da}else return[]}return P};
+Graph.prototype.getTagsForCells=function(u){for(var H=[],P={},W=0;W<u.length;W++){var R=this.getTagsForCell(u[W]);if(0<R.length){R=R.split(" ");for(var da=0;da<R.length;da++)null==P[R[da]]&&(P[R[da]]=!0,H.push(R[da]))}}return H};Graph.prototype.getTagsForCell=function(u){return this.getAttributeForCell(u,"tags","")};Graph.prototype.addTagsForCells=function(u,H){if(0<u.length&&0<H.length){this.model.beginUpdate();try{for(var P=0;P<u.length;P++){for(var W=this.getTagsForCell(u[P]),R=W.split(" "),da=
+!1,fa=0;fa<H.length;fa++){var ea=mxUtils.trim(H[fa]);""!=ea&&0>mxUtils.indexOf(R,ea)&&(W=0<W.length?W+" "+ea:ea,da=!0)}da&&this.setAttributeForCell(u[P],"tags",W)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(u,H){if(0<u.length&&0<H.length){this.model.beginUpdate();try{for(var P=0;P<u.length;P++){var W=this.getTagsForCell(u[P]);if(0<W.length){for(var R=W.split(" "),da=!1,fa=0;fa<H.length;fa++){var ea=mxUtils.indexOf(R,H[fa]);0<=ea&&(R.splice(ea,1),da=!0)}da&&this.setAttributeForCell(u[P],
+"tags",R.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(u){this.model.beginUpdate();try{for(var H=0;H<u.length;H++)this.model.setVisible(u[H],!this.model.isVisible(u[H]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(u,H){this.model.beginUpdate();try{for(var P=0;P<u.length;P++)this.model.setVisible(u[P],H)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(u,H,P,W){for(var R=0;R<u.length;R++)this.highlightCell(u[R],
+H,P,W)};Graph.prototype.highlightCell=function(u,H,P,W,R){H=null!=H?H:mxConstants.DEFAULT_VALID_COLOR;P=null!=P?P:1E3;u=this.view.getState(u);var da=null;null!=u&&(R=null!=R?R:4,R=Math.max(R+1,mxUtils.getValue(u.style,mxConstants.STYLE_STROKEWIDTH,1)+R),da=new mxCellHighlight(this,H,R,!1),null!=W&&(da.opacity=W),da.highlight(u),window.setTimeout(function(){null!=da.shape&&(mxUtils.setPrefixedStyle(da.shape.node.style,"transition","all 1200ms ease-in-out"),da.shape.node.style.opacity=0);window.setTimeout(function(){da.destroy()},
+1200)},P));return da};Graph.prototype.addSvgShadow=function(u,H,P,W){P=null!=P?P:!1;W=null!=W?W:!0;var R=u.ownerDocument,da=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"filter"):R.createElement("filter");da.setAttribute("id",this.shadowId);var fa=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):R.createElement("feGaussianBlur");fa.setAttribute("in","SourceAlpha");fa.setAttribute("stdDeviation",this.svgShadowBlur);fa.setAttribute("result","blur");da.appendChild(fa);
+fa=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feOffset"):R.createElement("feOffset");fa.setAttribute("in","blur");fa.setAttribute("dx",this.svgShadowSize);fa.setAttribute("dy",this.svgShadowSize);fa.setAttribute("result","offsetBlur");da.appendChild(fa);fa=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feFlood"):R.createElement("feFlood");fa.setAttribute("flood-color",this.svgShadowColor);fa.setAttribute("flood-opacity",this.svgShadowOpacity);fa.setAttribute("result",
+"offsetColor");da.appendChild(fa);fa=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feComposite"):R.createElement("feComposite");fa.setAttribute("in","offsetColor");fa.setAttribute("in2","offsetBlur");fa.setAttribute("operator","in");fa.setAttribute("result","offsetBlur");da.appendChild(fa);fa=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feBlend"):R.createElement("feBlend");fa.setAttribute("in","SourceGraphic");fa.setAttribute("in2","offsetBlur");da.appendChild(fa);
+fa=u.getElementsByTagName("defs");0==fa.length?(R=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"defs"):R.createElement("defs"),null!=u.firstChild?u.insertBefore(R,u.firstChild):u.appendChild(R)):R=fa[0];R.appendChild(da);P||(H=null!=H?H:u.getElementsByTagName("g")[0],null!=H&&(H.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(u.getAttribute("width")))&&W&&(u.setAttribute("width",parseInt(u.getAttribute("width"))+6),u.setAttribute("height",parseInt(u.getAttribute("height"))+
+6),H=u.getAttribute("viewBox"),null!=H&&0<H.length&&(H=H.split(" "),3<H.length&&(w=parseFloat(H[2])+6,h=parseFloat(H[3])+6,u.setAttribute("viewBox",H[0]+" "+H[1]+" "+w+" "+h))))));return da};Graph.prototype.setShadowVisible=function(u,H){mxClient.IS_SVG&&!mxClient.IS_SF&&(H=null!=H?H:!0,(this.shadowVisible=u)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),H&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=
function(){if(null==this.defaultParent){var u=this.model.getChildCount(this.model.root),H=0;do var P=this.model.getChildAt(this.model.root,H);while(H++<u&&"1"==mxUtils.getValue(this.getCellStyle(P),"locked","0"));null!=P&&this.setDefaultParent(P)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=
[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.bpmn2=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.c4=[SHAPES_PATH+"/mxC4.js"];mxStencilRegistry.libraries.cisco19=[SHAPES_PATH+"/mxCisco19.js",STENCIL_PATH+"/cisco19.xml"];mxStencilRegistry.libraries.cisco_safe=[SHAPES_PATH+"/mxCiscoSafe.js",STENCIL_PATH+"/cisco_safe/architecture.xml",STENCIL_PATH+"/cisco_safe/business_icons.xml",
STENCIL_PATH+"/cisco_safe/capability.xml",STENCIL_PATH+"/cisco_safe/design.xml",STENCIL_PATH+"/cisco_safe/iot_things_icons.xml",STENCIL_PATH+"/cisco_safe/people_places_things_icons.xml",STENCIL_PATH+"/cisco_safe/security_icons.xml",STENCIL_PATH+"/cisco_safe/technology_icons.xml",STENCIL_PATH+"/cisco_safe/threat.xml"];mxStencilRegistry.libraries.dfd=[SHAPES_PATH+"/mxDFD.js"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.kubernetes=[SHAPES_PATH+"/mxKubernetes.js",
@@ -3330,36 +3333,36 @@ STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[S
STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.ibm=[SHAPES_PATH+"/mxIBM.js",STENCIL_PATH+"/ibm.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];
mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=
[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.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(u){var H=null;null!=u&&0<u.length&&("ER"==u.substring(0,2)?H="mxgraph.er":"sysML"==u.substring(0,5)&&(H="mxgraph.sysml"));return H};var da=mxMarker.createMarker;mxMarker.createMarker=
-function(u,H,P,S,R,ca,ea,fa,ra,ua){if(null!=P&&null==mxMarker.markers[P]){var sa=this.getPackageForType(P);null!=sa&&mxStencilRegistry.getStencil(sa)}return da.apply(this,arguments)};var O=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(u,H,P,S,R,ca){"1"==mxUtils.getValue(H.style,"lineShape",null)&&u.setFillColor(mxUtils.getValue(H.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return O.apply(this,arguments)};PrintDialog.prototype.create=function(u,H){function P(){Ca.value=
-Math.max(1,Math.min(fa,Math.max(parseInt(Ca.value),parseInt(Aa.value))));Aa.value=Math.max(1,Math.min(fa,Math.min(parseInt(Ca.value),parseInt(Aa.value))))}function S(za){function Da(ab,db,kb){var ib=ab.useCssTransforms,ob=ab.currentTranslate,vb=ab.currentScale,nb=ab.view.translate,Bb=ab.view.scale;ab.useCssTransforms&&(ab.useCssTransforms=!1,ab.currentTranslate=new mxPoint(0,0),ab.currentScale=1,ab.view.translate=new mxPoint(0,0),ab.view.scale=1);var yb=ab.getGraphBounds(),mb=0,pb=0,gb=va.get(),rb=
-1/ab.pageScale,tb=Oa.checked;if(tb){rb=parseInt(ia.value);var zb=parseInt(na.value);rb=Math.min(gb.height*zb/(yb.height/ab.view.scale),gb.width*rb/(yb.width/ab.view.scale))}else rb=parseInt(Ta.value)/(100*ab.pageScale),isNaN(rb)&&(Ma=1/ab.pageScale,Ta.value="100 %");gb=mxRectangle.fromRectangle(gb);gb.width=Math.ceil(gb.width*Ma);gb.height=Math.ceil(gb.height*Ma);rb*=Ma;!tb&&ab.pageVisible?(yb=ab.getPageLayout(),mb-=yb.x*gb.width,pb-=yb.y*gb.height):tb=!0;if(null==db){db=PrintDialog.createPrintPreview(ab,
-rb,gb,0,mb,pb,tb);db.pageSelector=!1;db.mathEnabled=!1;Ba.checked&&(db.isCellVisible=function(lb){return ab.isCellSelected(lb)});mb=u.getCurrentFile();null!=mb&&(db.title=mb.getTitle());var wb=db.writeHead;db.writeHead=function(lb){wb.apply(this,arguments);mxClient.IS_GC&&(lb.writeln('<style type="text/css">'),lb.writeln("@media print {"),lb.writeln(".MathJax svg { shape-rendering: crispEdges; }"),lb.writeln("}"),lb.writeln("</style>"));null!=u.editor.fontCss&&(lb.writeln('<style type="text/css">'),
-lb.writeln(u.editor.fontCss),lb.writeln("</style>"));for(var xb=ab.getCustomFonts(),c=0;c<xb.length;c++){var l=xb[c].name,x=xb[c].url;Graph.isCssFontUrl(x)?lb.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(x)+'" charset="UTF-8" type="text/css">'):(lb.writeln('<style type="text/css">'),lb.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(l)+'";\nsrc: url("'+mxUtils.htmlEntities(x)+'");\n}'),lb.writeln("</style>"))}};if("undefined"!==typeof MathJax){var Ab=db.renderPage;db.renderPage=
-function(lb,xb,c,l,x,p){var v=mxClient.NO_FO,A=Ab.apply(this,arguments);mxClient.NO_FO=v;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:A.className="geDisableMathJax";return A}}mb=null;pb=R.shapeForegroundColor;tb=R.shapeBackgroundColor;gb=R.enableFlowAnimation;R.enableFlowAnimation=!1;null!=R.themes&&"darkTheme"==R.defaultThemeName&&(mb=R.stylesheet,R.stylesheet=R.getDefaultStylesheet(),R.shapeForegroundColor="#000000",R.shapeBackgroundColor="#ffffff",R.refresh());db.open(null,null,
-kb,!0);R.enableFlowAnimation=gb;null!=mb&&(R.shapeForegroundColor=pb,R.shapeBackgroundColor=tb,R.stylesheet=mb,R.refresh())}else{gb=ab.background;if(null==gb||""==gb||gb==mxConstants.NONE)gb="#ffffff";db.backgroundColor=gb;db.autoOrigin=tb;db.appendGraph(ab,rb,mb,pb,kb,!0);kb=ab.getCustomFonts();if(null!=db.wnd)for(mb=0;mb<kb.length;mb++)pb=kb[mb].name,tb=kb[mb].url,Graph.isCssFontUrl(tb)?db.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(tb)+'" charset="UTF-8" type="text/css">'):
-(db.wnd.document.writeln('<style type="text/css">'),db.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(pb)+'";\nsrc: url("'+mxUtils.htmlEntities(tb)+'");\n}'),db.wnd.document.writeln("</style>"))}ib&&(ab.useCssTransforms=ib,ab.currentTranslate=ob,ab.currentScale=vb,ab.view.translate=nb,ab.view.scale=Bb);return db}var Ma=parseInt(pa.value)/100;isNaN(Ma)&&(Ma=1,pa.value="100 %");Ma*=.75;var La=null,Ua=R.shapeForegroundColor,Sa=R.shapeBackgroundColor;null!=R.themes&&"darkTheme"==
-R.defaultThemeName&&(La=R.stylesheet,R.stylesheet=R.getDefaultStylesheet(),R.shapeForegroundColor="#000000",R.shapeBackgroundColor="#ffffff",R.refresh());var Fa=Aa.value,wa=Ca.value,ya=!ua.checked,Na=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(u,ua.checked,Fa,wa,Oa.checked,ia.value,na.value,parseInt(Ta.value)/100,parseInt(pa.value)/100,va.get());else{ya&&(ya=Ba.checked||Fa==ra&&wa==ra);if(!ya&&null!=u.pages&&u.pages.length){var Ja=0;ya=u.pages.length-1;ua.checked||(Ja=parseInt(Fa)-1,
-ya=parseInt(wa)-1);for(var Qa=Ja;Qa<=ya;Qa++){var Za=u.pages[Qa];Fa=Za==u.currentPage?R:null;if(null==Fa){Fa=u.createTemporaryGraph(R.stylesheet);Fa.shapeForegroundColor=R.shapeForegroundColor;Fa.shapeBackgroundColor=R.shapeBackgroundColor;wa=!0;Ja=!1;var cb=null,fb=null;null==Za.viewState&&null==Za.root&&u.updatePageRoot(Za);null!=Za.viewState&&(wa=Za.viewState.pageVisible,Ja=Za.viewState.mathEnabled,cb=Za.viewState.background,fb=Za.viewState.backgroundImage,Fa.extFonts=Za.viewState.extFonts);null!=
-fb&&null!=fb.originalSrc&&(fb=u.createImageForPageLink(fb.originalSrc,Za));Fa.background=cb;Fa.backgroundImage=null!=fb?new mxImage(fb.src,fb.width,fb.height,fb.x,fb.y):null;Fa.pageVisible=wa;Fa.mathEnabled=Ja;var qb=Fa.getGraphBounds;Fa.getGraphBounds=function(){var ab=qb.apply(this,arguments),db=this.backgroundImage;if(null!=db&&null!=db.width&&null!=db.height){var kb=this.view.translate,ib=this.view.scale;ab=mxRectangle.fromRectangle(ab);ab.add(new mxRectangle((kb.x+db.x)*ib,(kb.y+db.y)*ib,db.width*
-ib,db.height*ib))}return ab};var ub=Fa.getGlobalVariable;Fa.getGlobalVariable=function(ab){return"page"==ab?Za.getName():"pagenumber"==ab?Qa+1:"pagecount"==ab?null!=u.pages?u.pages.length:1:ub.apply(this,arguments)};document.body.appendChild(Fa.container);u.updatePageRoot(Za);Fa.model.setRoot(Za.root)}Na=Da(Fa,Na,Qa!=ya);Fa!=R&&Fa.container.parentNode.removeChild(Fa.container)}}else Na=Da(R);null==Na?u.handleError({message:mxResources.get("errorUpdatingPreview")}):(Na.mathEnabled&&(ya=Na.wnd.document,
-za&&(Na.wnd.IMMEDIATE_PRINT=!0),ya.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),Na.closeDocument(),!Na.mathEnabled&&za&&PrintDialog.printPreview(Na));null!=La&&(R.shapeForegroundColor=Ua,R.shapeBackgroundColor=Sa,R.stylesheet=La,R.refresh())}}var R=u.editor.graph,ca=document.createElement("div"),ea=document.createElement("h3");ea.style.width="100%";ea.style.textAlign="center";ea.style.marginTop="0px";mxUtils.write(ea,H||mxResources.get("print"));
-ca.appendChild(ea);var fa=1,ra=1;ea=document.createElement("div");ea.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var ua=document.createElement("input");ua.style.cssText="margin-right:8px;margin-bottom:8px;";ua.setAttribute("value","all");ua.setAttribute("type","radio");ua.setAttribute("name","pages-printdialog");ea.appendChild(ua);H=document.createElement("span");mxUtils.write(H,mxResources.get("printAllPages"));ea.appendChild(H);mxUtils.br(ea);var sa=
-ua.cloneNode(!0);ua.setAttribute("checked","checked");sa.setAttribute("value","range");ea.appendChild(sa);H=document.createElement("span");mxUtils.write(H,mxResources.get("pages")+":");ea.appendChild(H);var Aa=document.createElement("input");Aa.style.cssText="margin:0 8px 0 8px;";Aa.setAttribute("value","1");Aa.setAttribute("type","number");Aa.setAttribute("min","1");Aa.style.width="50px";ea.appendChild(Aa);H=document.createElement("span");mxUtils.write(H,mxResources.get("to"));ea.appendChild(H);
-var Ca=Aa.cloneNode(!0);ea.appendChild(Ca);mxEvent.addListener(Aa,"focus",function(){sa.checked=!0});mxEvent.addListener(Ca,"focus",function(){sa.checked=!0});mxEvent.addListener(Aa,"change",P);mxEvent.addListener(Ca,"change",P);if(null!=u.pages&&(fa=u.pages.length,null!=u.currentPage))for(H=0;H<u.pages.length;H++)if(u.currentPage==u.pages[H]){ra=H+1;Aa.value=ra;Ca.value=ra;break}Aa.setAttribute("max",fa);Ca.setAttribute("max",fa);u.isPagesEnabled()?1<fa&&(ca.appendChild(ea),sa.checked=!0):sa.checked=
-!0;mxUtils.br(ea);var Ba=document.createElement("input");Ba.setAttribute("value","all");Ba.setAttribute("type","radio");Ba.style.marginRight="8px";R.isSelectionEmpty()&&Ba.setAttribute("disabled","disabled");var ta=document.createElement("div");ta.style.marginBottom="10px";1==fa?(Ba.setAttribute("type","checkbox"),Ba.style.marginBottom="12px",ta.appendChild(Ba)):(Ba.setAttribute("name","pages-printdialog"),Ba.style.marginBottom="8px",ea.appendChild(Ba));H=document.createElement("span");mxUtils.write(H,
-mxResources.get("selectionOnly"));Ba.parentNode.appendChild(H);1==fa&&mxUtils.br(Ba.parentNode);var Pa=document.createElement("input");Pa.style.marginRight="8px";Pa.setAttribute("value","adjust");Pa.setAttribute("type","radio");Pa.setAttribute("name","printZoom");ta.appendChild(Pa);H=document.createElement("span");mxUtils.write(H,mxResources.get("adjustTo"));ta.appendChild(H);var Ta=document.createElement("input");Ta.style.cssText="margin:0 8px 0 8px;";Ta.setAttribute("value","100 %");Ta.style.width=
-"50px";ta.appendChild(Ta);mxEvent.addListener(Ta,"focus",function(){Pa.checked=!0});ca.appendChild(ta);ea=ea.cloneNode(!1);var Oa=Pa.cloneNode(!0);Oa.setAttribute("value","fit");Pa.setAttribute("checked","checked");H=document.createElement("div");H.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";H.appendChild(Oa);ea.appendChild(H);ta=document.createElement("table");ta.style.display="inline-block";var Xa=document.createElement("tbody"),Ga=document.createElement("tr"),eb=Ga.cloneNode(!0),
-bb=document.createElement("td"),z=bb.cloneNode(!0),K=bb.cloneNode(!0),M=bb.cloneNode(!0),T=bb.cloneNode(!0),V=bb.cloneNode(!0);bb.style.textAlign="right";M.style.textAlign="right";mxUtils.write(bb,mxResources.get("fitTo"));var ia=document.createElement("input");ia.style.cssText="margin:0 8px 0 8px;";ia.setAttribute("value","1");ia.setAttribute("min","1");ia.setAttribute("type","number");ia.style.width="40px";z.appendChild(ia);H=document.createElement("span");mxUtils.write(H,mxResources.get("fitToSheetsAcross"));
-K.appendChild(H);mxUtils.write(M,mxResources.get("fitToBy"));var na=ia.cloneNode(!0);T.appendChild(na);mxEvent.addListener(ia,"focus",function(){Oa.checked=!0});mxEvent.addListener(na,"focus",function(){Oa.checked=!0});H=document.createElement("span");mxUtils.write(H,mxResources.get("fitToSheetsDown"));V.appendChild(H);Ga.appendChild(bb);Ga.appendChild(z);Ga.appendChild(K);eb.appendChild(M);eb.appendChild(T);eb.appendChild(V);Xa.appendChild(Ga);Xa.appendChild(eb);ta.appendChild(Xa);ea.appendChild(ta);
-ca.appendChild(ea);ea=document.createElement("div");H=document.createElement("div");H.style.fontWeight="bold";H.style.marginBottom="12px";mxUtils.write(H,mxResources.get("paperSize"));ea.appendChild(H);H=document.createElement("div");H.style.marginBottom="12px";var va=PageSetupDialog.addPageFormatPanel(H,"printdialog",u.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);ea.appendChild(H);H=document.createElement("span");mxUtils.write(H,mxResources.get("pageScale"));ea.appendChild(H);var pa=
-document.createElement("input");pa.style.cssText="margin:0 8px 0 8px;";pa.setAttribute("value","100 %");pa.style.width="60px";ea.appendChild(pa);ca.appendChild(ea);H=document.createElement("div");H.style.cssText="text-align:right;margin:48px 0 0 0;";ea=mxUtils.button(mxResources.get("cancel"),function(){u.hideDialog()});ea.className="geBtn";u.editor.cancelFirst&&H.appendChild(ea);u.isOffline()||(ta=mxUtils.button(mxResources.get("help"),function(){R.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),
-ta.className="geBtn",H.appendChild(ta));PrintDialog.previewEnabled&&(ta=mxUtils.button(mxResources.get("preview"),function(){u.hideDialog();S(!1)}),ta.className="geBtn",H.appendChild(ta));ta=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){u.hideDialog();S(!0)});ta.className="geBtn gePrimaryBtn";H.appendChild(ta);u.editor.cancelFirst||H.appendChild(ea);ca.appendChild(H);this.container=ca};var N=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==
+"/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(u){var H=null;null!=u&&0<u.length&&("ER"==u.substring(0,2)?H="mxgraph.er":"sysML"==u.substring(0,5)&&(H="mxgraph.sysml"));return H};var ia=mxMarker.createMarker;mxMarker.createMarker=
+function(u,H,P,W,R,da,fa,ea,qa,va){if(null!=P&&null==mxMarker.markers[P]){var ua=this.getPackageForType(P);null!=ua&&mxStencilRegistry.getStencil(ua)}return ia.apply(this,arguments)};var N=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(u,H,P,W,R,da){"1"==mxUtils.getValue(H.style,"lineShape",null)&&u.setFillColor(mxUtils.getValue(H.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return N.apply(this,arguments)};PrintDialog.prototype.create=function(u,H){function P(){za.value=
+Math.max(1,Math.min(ea,Math.max(parseInt(za.value),parseInt(Aa.value))));Aa.value=Math.max(1,Math.min(ea,Math.min(parseInt(za.value),parseInt(Aa.value))))}function W(ta){function Da(bb,eb,kb){var ib=bb.useCssTransforms,pb=bb.currentTranslate,vb=bb.currentScale,ob=bb.view.translate,Bb=bb.view.scale;bb.useCssTransforms&&(bb.useCssTransforms=!1,bb.currentTranslate=new mxPoint(0,0),bb.currentScale=1,bb.view.translate=new mxPoint(0,0),bb.view.scale=1);var yb=bb.getGraphBounds(),nb=0,qb=0,fb=ya.get(),rb=
+1/bb.pageScale,tb=Ra.checked;if(tb){rb=parseInt(ja.value);var zb=parseInt(na.value);rb=Math.min(fb.height*zb/(yb.height/bb.view.scale),fb.width*rb/(yb.width/bb.view.scale))}else rb=parseInt(Ua.value)/(100*bb.pageScale),isNaN(rb)&&(Oa=1/bb.pageScale,Ua.value="100 %");fb=mxRectangle.fromRectangle(fb);fb.width=Math.ceil(fb.width*Oa);fb.height=Math.ceil(fb.height*Oa);rb*=Oa;!tb&&bb.pageVisible?(yb=bb.getPageLayout(),nb-=yb.x*fb.width,qb-=yb.y*fb.height):tb=!0;if(null==eb){eb=PrintDialog.createPrintPreview(bb,
+rb,fb,0,nb,qb,tb);eb.pageSelector=!1;eb.mathEnabled=!1;Ca.checked&&(eb.isCellVisible=function(lb){return bb.isCellSelected(lb)});nb=u.getCurrentFile();null!=nb&&(eb.title=nb.getTitle());var wb=eb.writeHead;eb.writeHead=function(lb){wb.apply(this,arguments);mxClient.IS_GC&&(lb.writeln('<style type="text/css">'),lb.writeln("@media print {"),lb.writeln(".MathJax svg { shape-rendering: crispEdges; }"),lb.writeln("}"),lb.writeln("</style>"));null!=u.editor.fontCss&&(lb.writeln('<style type="text/css">'),
+lb.writeln(u.editor.fontCss),lb.writeln("</style>"));for(var xb=bb.getCustomFonts(),c=0;c<xb.length;c++){var l=xb[c].name,x=xb[c].url;Graph.isCssFontUrl(x)?lb.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(x)+'" charset="UTF-8" type="text/css">'):(lb.writeln('<style type="text/css">'),lb.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(l)+'";\nsrc: url("'+mxUtils.htmlEntities(x)+'");\n}'),lb.writeln("</style>"))}};if("undefined"!==typeof MathJax){var Ab=eb.renderPage;eb.renderPage=
+function(lb,xb,c,l,x,p){var v=mxClient.NO_FO,A=Ab.apply(this,arguments);mxClient.NO_FO=v;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:A.className="geDisableMathJax";return A}}nb=null;qb=R.shapeForegroundColor;tb=R.shapeBackgroundColor;fb=R.enableFlowAnimation;R.enableFlowAnimation=!1;null!=R.themes&&"darkTheme"==R.defaultThemeName&&(nb=R.stylesheet,R.stylesheet=R.getDefaultStylesheet(),R.shapeForegroundColor="#000000",R.shapeBackgroundColor="#ffffff",R.refresh());eb.open(null,null,
+kb,!0);R.enableFlowAnimation=fb;null!=nb&&(R.shapeForegroundColor=qb,R.shapeBackgroundColor=tb,R.stylesheet=nb,R.refresh())}else{fb=bb.background;if(null==fb||""==fb||fb==mxConstants.NONE)fb="#ffffff";eb.backgroundColor=fb;eb.autoOrigin=tb;eb.appendGraph(bb,rb,nb,qb,kb,!0);kb=bb.getCustomFonts();if(null!=eb.wnd)for(nb=0;nb<kb.length;nb++)qb=kb[nb].name,tb=kb[nb].url,Graph.isCssFontUrl(tb)?eb.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(tb)+'" charset="UTF-8" type="text/css">'):
+(eb.wnd.document.writeln('<style type="text/css">'),eb.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(qb)+'";\nsrc: url("'+mxUtils.htmlEntities(tb)+'");\n}'),eb.wnd.document.writeln("</style>"))}ib&&(bb.useCssTransforms=ib,bb.currentTranslate=pb,bb.currentScale=vb,bb.view.translate=ob,bb.view.scale=Bb);return eb}var Oa=parseInt(ra.value)/100;isNaN(Oa)&&(Oa=1,ra.value="100 %");Oa*=.75;var Ma=null,Wa=R.shapeForegroundColor,Sa=R.shapeBackgroundColor;null!=R.themes&&"darkTheme"==
+R.defaultThemeName&&(Ma=R.stylesheet,R.stylesheet=R.getDefaultStylesheet(),R.shapeForegroundColor="#000000",R.shapeBackgroundColor="#ffffff",R.refresh());var Fa=Aa.value,Ja=za.value,xa=!va.checked,Ba=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(u,va.checked,Fa,Ja,Ra.checked,ja.value,na.value,parseInt(Ua.value)/100,parseInt(ra.value)/100,ya.get());else{xa&&(xa=Ca.checked||Fa==qa&&Ja==qa);if(!xa&&null!=u.pages&&u.pages.length){var Pa=0;xa=u.pages.length-1;va.checked||(Pa=parseInt(Fa)-1,
+xa=parseInt(Ja)-1);for(var Ka=Pa;Ka<=xa;Ka++){var Na=u.pages[Ka];Fa=Na==u.currentPage?R:null;if(null==Fa){Fa=u.createTemporaryGraph(R.stylesheet);Fa.shapeForegroundColor=R.shapeForegroundColor;Fa.shapeBackgroundColor=R.shapeBackgroundColor;Ja=!0;Pa=!1;var hb=null,Qa=null;null==Na.viewState&&null==Na.root&&u.updatePageRoot(Na);null!=Na.viewState&&(Ja=Na.viewState.pageVisible,Pa=Na.viewState.mathEnabled,hb=Na.viewState.background,Qa=Na.viewState.backgroundImage,Fa.extFonts=Na.viewState.extFonts);null!=
+Qa&&null!=Qa.originalSrc&&(Qa=u.createImageForPageLink(Qa.originalSrc,Na));Fa.background=hb;Fa.backgroundImage=null!=Qa?new mxImage(Qa.src,Qa.width,Qa.height,Qa.x,Qa.y):null;Fa.pageVisible=Ja;Fa.mathEnabled=Pa;var mb=Fa.getGraphBounds;Fa.getGraphBounds=function(){var bb=mb.apply(this,arguments),eb=this.backgroundImage;if(null!=eb&&null!=eb.width&&null!=eb.height){var kb=this.view.translate,ib=this.view.scale;bb=mxRectangle.fromRectangle(bb);bb.add(new mxRectangle((kb.x+eb.x)*ib,(kb.y+eb.y)*ib,eb.width*
+ib,eb.height*ib))}return bb};var ub=Fa.getGlobalVariable;Fa.getGlobalVariable=function(bb){return"page"==bb?Na.getName():"pagenumber"==bb?Ka+1:"pagecount"==bb?null!=u.pages?u.pages.length:1:ub.apply(this,arguments)};document.body.appendChild(Fa.container);u.updatePageRoot(Na);Fa.model.setRoot(Na.root)}Ba=Da(Fa,Ba,Ka!=xa);Fa!=R&&Fa.container.parentNode.removeChild(Fa.container)}}else Ba=Da(R);null==Ba?u.handleError({message:mxResources.get("errorUpdatingPreview")}):(Ba.mathEnabled&&(xa=Ba.wnd.document,
+ta&&(Ba.wnd.IMMEDIATE_PRINT=!0),xa.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),Ba.closeDocument(),!Ba.mathEnabled&&ta&&PrintDialog.printPreview(Ba));null!=Ma&&(R.shapeForegroundColor=Wa,R.shapeBackgroundColor=Sa,R.stylesheet=Ma,R.refresh())}}var R=u.editor.graph,da=document.createElement("div"),fa=document.createElement("h3");fa.style.width="100%";fa.style.textAlign="center";fa.style.marginTop="0px";mxUtils.write(fa,H||mxResources.get("print"));
+da.appendChild(fa);var ea=1,qa=1;fa=document.createElement("div");fa.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var va=document.createElement("input");va.style.cssText="margin-right:8px;margin-bottom:8px;";va.setAttribute("value","all");va.setAttribute("type","radio");va.setAttribute("name","pages-printdialog");fa.appendChild(va);H=document.createElement("span");mxUtils.write(H,mxResources.get("printAllPages"));fa.appendChild(H);mxUtils.br(fa);var ua=
+va.cloneNode(!0);va.setAttribute("checked","checked");ua.setAttribute("value","range");fa.appendChild(ua);H=document.createElement("span");mxUtils.write(H,mxResources.get("pages")+":");fa.appendChild(H);var Aa=document.createElement("input");Aa.style.cssText="margin:0 8px 0 8px;";Aa.setAttribute("value","1");Aa.setAttribute("type","number");Aa.setAttribute("min","1");Aa.style.width="50px";fa.appendChild(Aa);H=document.createElement("span");mxUtils.write(H,mxResources.get("to"));fa.appendChild(H);
+var za=Aa.cloneNode(!0);fa.appendChild(za);mxEvent.addListener(Aa,"focus",function(){ua.checked=!0});mxEvent.addListener(za,"focus",function(){ua.checked=!0});mxEvent.addListener(Aa,"change",P);mxEvent.addListener(za,"change",P);if(null!=u.pages&&(ea=u.pages.length,null!=u.currentPage))for(H=0;H<u.pages.length;H++)if(u.currentPage==u.pages[H]){qa=H+1;Aa.value=qa;za.value=qa;break}Aa.setAttribute("max",ea);za.setAttribute("max",ea);u.isPagesEnabled()?1<ea&&(da.appendChild(fa),ua.checked=!0):ua.checked=
+!0;mxUtils.br(fa);var Ca=document.createElement("input");Ca.setAttribute("value","all");Ca.setAttribute("type","radio");Ca.style.marginRight="8px";R.isSelectionEmpty()&&Ca.setAttribute("disabled","disabled");var sa=document.createElement("div");sa.style.marginBottom="10px";1==ea?(Ca.setAttribute("type","checkbox"),Ca.style.marginBottom="12px",sa.appendChild(Ca)):(Ca.setAttribute("name","pages-printdialog"),Ca.style.marginBottom="8px",fa.appendChild(Ca));H=document.createElement("span");mxUtils.write(H,
+mxResources.get("selectionOnly"));Ca.parentNode.appendChild(H);1==ea&&mxUtils.br(Ca.parentNode);var Va=document.createElement("input");Va.style.marginRight="8px";Va.setAttribute("value","adjust");Va.setAttribute("type","radio");Va.setAttribute("name","printZoom");sa.appendChild(Va);H=document.createElement("span");mxUtils.write(H,mxResources.get("adjustTo"));sa.appendChild(H);var Ua=document.createElement("input");Ua.style.cssText="margin:0 8px 0 8px;";Ua.setAttribute("value","100 %");Ua.style.width=
+"50px";sa.appendChild(Ua);mxEvent.addListener(Ua,"focus",function(){Va.checked=!0});da.appendChild(sa);fa=fa.cloneNode(!1);var Ra=Va.cloneNode(!0);Ra.setAttribute("value","fit");Va.setAttribute("checked","checked");H=document.createElement("div");H.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";H.appendChild(Ra);fa.appendChild(H);sa=document.createElement("table");sa.style.display="inline-block";var Za=document.createElement("tbody"),Ha=document.createElement("tr"),db=Ha.cloneNode(!0),
+cb=document.createElement("td"),z=cb.cloneNode(!0),K=cb.cloneNode(!0),L=cb.cloneNode(!0),S=cb.cloneNode(!0),V=cb.cloneNode(!0);cb.style.textAlign="right";L.style.textAlign="right";mxUtils.write(cb,mxResources.get("fitTo"));var ja=document.createElement("input");ja.style.cssText="margin:0 8px 0 8px;";ja.setAttribute("value","1");ja.setAttribute("min","1");ja.setAttribute("type","number");ja.style.width="40px";z.appendChild(ja);H=document.createElement("span");mxUtils.write(H,mxResources.get("fitToSheetsAcross"));
+K.appendChild(H);mxUtils.write(L,mxResources.get("fitToBy"));var na=ja.cloneNode(!0);S.appendChild(na);mxEvent.addListener(ja,"focus",function(){Ra.checked=!0});mxEvent.addListener(na,"focus",function(){Ra.checked=!0});H=document.createElement("span");mxUtils.write(H,mxResources.get("fitToSheetsDown"));V.appendChild(H);Ha.appendChild(cb);Ha.appendChild(z);Ha.appendChild(K);db.appendChild(L);db.appendChild(S);db.appendChild(V);Za.appendChild(Ha);Za.appendChild(db);sa.appendChild(Za);fa.appendChild(sa);
+da.appendChild(fa);fa=document.createElement("div");H=document.createElement("div");H.style.fontWeight="bold";H.style.marginBottom="12px";mxUtils.write(H,mxResources.get("paperSize"));fa.appendChild(H);H=document.createElement("div");H.style.marginBottom="12px";var ya=PageSetupDialog.addPageFormatPanel(H,"printdialog",u.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);fa.appendChild(H);H=document.createElement("span");mxUtils.write(H,mxResources.get("pageScale"));fa.appendChild(H);var ra=
+document.createElement("input");ra.style.cssText="margin:0 8px 0 8px;";ra.setAttribute("value","100 %");ra.style.width="60px";fa.appendChild(ra);da.appendChild(fa);H=document.createElement("div");H.style.cssText="text-align:right;margin:48px 0 0 0;";fa=mxUtils.button(mxResources.get("cancel"),function(){u.hideDialog()});fa.className="geBtn";u.editor.cancelFirst&&H.appendChild(fa);u.isOffline()||(sa=mxUtils.button(mxResources.get("help"),function(){R.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),
+sa.className="geBtn",H.appendChild(sa));PrintDialog.previewEnabled&&(sa=mxUtils.button(mxResources.get("preview"),function(){u.hideDialog();W(!1)}),sa.className="geBtn",H.appendChild(sa));sa=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){u.hideDialog();W(!0)});sa.className="geBtn gePrimaryBtn";H.appendChild(sa);u.editor.cancelFirst||H.appendChild(fa);da.appendChild(H);this.container=da};var O=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 u=this.image;null!=u&&null!=u.src&&Graph.isPageLink(u.src)&&(u={originalSrc:u.src});this.page.viewState.backgroundImage=u}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 aa=document.createElement("canvas"),ma=new Image;ma.onload=function(){try{aa.getContext("2d").drawImage(ma,
-0,0);var u=aa.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=u&&6<u.length}catch(H){}};ma.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(u){}})();
+this.shadowVisible)}}else O.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 ba=document.createElement("canvas"),la=new Image;la.onload=function(){try{ba.getContext("2d").drawImage(la,
+0,0);var u=ba.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=u&&6<u.length}catch(H){}};la.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(u){}})();
(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(e,k,n){n.ui=e.ui;return k};b.afterDecode=function(e,k,n){n.previousColor=n.color;n.previousImage=n.image;n.previousFormat=n.format;null!=n.foldingEnabled&&(n.foldingEnabled=!n.foldingEnabled);null!=n.mathEnabled&&(n.mathEnabled=!n.mathEnabled);null!=n.shadowVisible&&(n.shadowVisible=!n.shadowVisible);return n};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,k,n){n.ui=e.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.0.2";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(e,k,n){n.ui=e.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.0.3";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=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&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;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(d,f,g,m,q,y,F){y=null!=y?y:0<=d.indexOf("NetworkError")||0<=d.indexOf("SecurityError")||0<=d.indexOf("NS_ERROR_FAILURE")||0<=d.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
@@ -3375,7 +3378,7 @@ d;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prot
this.editor.graph.defaultMathEnabled=d;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(d){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(d){return this.isOfflineApp()||!navigator.onLine||!d&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};
EditorUi.prototype.createSpinner=function(d,f,g){var m=null==d||null==f;g=null!=g?g:24;var q=new Spinner({lines:12,length:g,width:Math.round(g/3),radius:Math.round(g/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),y=q.spin;q.spin=function(C,I){var G=!1;this.active||(y.call(this,C),this.active=!0,null!=I&&(m&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/2-2),G=document.createElement("div"),
G.style.position="absolute",G.style.whiteSpace="nowrap",G.style.background="#4B4243",G.style.color="white",G.style.fontFamily=Editor.defaultHtmlFont,G.style.fontSize="9pt",G.style.padding="6px",G.style.paddingLeft="10px",G.style.paddingRight="10px",G.style.zIndex=2E9,G.style.left=Math.max(0,d)+"px",G.style.top=Math.max(0,f+70)+"px",mxUtils.setPrefixedStyle(G.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(G.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(G.style,
-"boxShadow","2px 2px 3px 0px #ddd"),"..."!=I.substring(I.length-3,I.length)&&"!"!=I.charAt(I.length-1)&&(I+="..."),G.innerHTML=I,C.appendChild(G),q.status=G),this.pause=mxUtils.bind(this,function(){var Y=function(){};this.active&&(Y=mxUtils.bind(this,function(){this.spin(C,I)}));this.stop();return Y}),G=!0);return G};var F=q.stop;q.stop=function(){F.call(this);this.active=!1;null!=q.status&&null!=q.status.parentNode&&q.status.parentNode.removeChild(q.status);q.status=null};q.pause=function(){return function(){}};
+"boxShadow","2px 2px 3px 0px #ddd"),"..."!=I.substring(I.length-3,I.length)&&"!"!=I.charAt(I.length-1)&&(I+="..."),G.innerHTML=I,C.appendChild(G),q.status=G),this.pause=mxUtils.bind(this,function(){var Z=function(){};this.active&&(Z=mxUtils.bind(this,function(){this.spin(C,I)}));this.stop();return Z}),G=!0);return G};var F=q.stop;q.stop=function(){F.call(this);this.active=!1;null!=q.status&&null!=q.status.parentNode&&q.status.parentNode.removeChild(q.status);q.status=null};q.pause=function(){return function(){}};
return q};EditorUi.prototype.isCompatibleString=function(d){try{var f=mxUtils.parseXml(d),g=this.editor.extractGraphModel(f.documentElement,!0);return null!=g&&0==g.getElementsByTagName("parsererror").length}catch(m){}return!1};EditorUi.prototype.isVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&
3==d.charCodeAt(2)&&4==d.charCodeAt(3)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&3==d.charCodeAt(2)&&6==d.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||60==d.charCodeAt(0)&&63==d.charCodeAt(1)&&120==d.charCodeAt(2)&&109==d.charCodeAt(3)&&108==d.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;
EditorUi.prototype.createKeyHandler=function(d){var f=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var g=f.getFunction,m=this.editor.graph,q=this;f.getFunction=function(y){if(m.isSelectionEmpty()&&null!=q.pages&&0<q.pages.length){var F=q.getSelectedPageIndex();if(mxEvent.isShiftDown(y)){if(37==y.keyCode)return function(){0<F&&q.movePage(F,F-1)};if(38==y.keyCode)return function(){0<F&&q.movePage(F,0)};if(39==y.keyCode)return function(){F<q.pages.length-1&&q.movePage(F,
@@ -3384,10 +3387,10 @@ var e=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGra
y?mxUtils.getXml(y):""}}catch(F){}return f};EditorUi.prototype.validateFileData=function(d){if(null!=d&&0<d.length){var f=d.indexOf('<meta charset="utf-8">');0<=f&&(d=d.slice(0,f)+'<meta charset="utf-8"/>'+d.slice(f+23-1,d.length));d=Graph.zapGremlins(d)}return d};EditorUi.prototype.replaceFileData=function(d){d=this.validateFileData(d);d=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:null;var f=null!=d?this.editor.extractGraphModel(d,!0):null;null!=f&&(d=f);if(null!=d){f=this.editor.graph;
f.model.beginUpdate();try{var g=null!=this.pages?this.pages.slice():null,m=d.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<m.length||1==m.length&&m[0].hasAttribute("name")){this.fileNode=d;this.pages=null!=this.pages?this.pages:[];for(var q=m.length-1;0<=q;q--){var y=this.updatePageRoot(new DiagramPage(m[q]));null==y.getName()&&y.setName(mxResources.get("pageWithNumber",[q+1]));f.model.execute(new ChangePage(this,y,0==q?y:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=
d.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(d.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),f.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(d),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=g)for(q=0;q<g.length;q++)f.model.execute(new ChangePage(this,g[q],null))}finally{f.model.endUpdate()}}};EditorUi.prototype.createFileData=
-function(d,f,g,m,q,y,F,C,I,G,Y){f=null!=f?f:this.editor.graph;q=null!=q?q:!1;I=null!=I?I:!0;var ba=null;if(null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER)var Z="_blank";else ba=Z=m;if(null==d)return"";var X=d;if("mxfile"!=X.nodeName.toLowerCase()){if(Y){var qa=d.ownerDocument.createElement("diagram");qa.setAttribute("id",Editor.guid());qa.appendChild(d)}else{qa=Graph.zapGremlins(mxUtils.getXml(d));X=Graph.compress(qa);if(Graph.decompress(X)!=qa)return qa;qa=d.ownerDocument.createElement("diagram");
-qa.setAttribute("id",Editor.guid());mxUtils.setTextContent(qa,X)}X=d.ownerDocument.createElement("mxfile");X.appendChild(qa)}G?(X=X.cloneNode(!0),X.removeAttribute("modified"),X.removeAttribute("host"),X.removeAttribute("agent"),X.removeAttribute("etag"),X.removeAttribute("userAgent"),X.removeAttribute("version"),X.removeAttribute("editor"),X.removeAttribute("type")):(X.removeAttribute("userAgent"),X.removeAttribute("version"),X.removeAttribute("editor"),X.removeAttribute("pages"),X.removeAttribute("type"),
-mxClient.IS_CHROMEAPP?X.setAttribute("host","Chrome"):EditorUi.isElectronApp?X.setAttribute("host","Electron"):X.setAttribute("host",window.location.hostname),X.setAttribute("modified",(new Date).toISOString()),X.setAttribute("agent",navigator.appVersion),X.setAttribute("version",EditorUi.VERSION),X.setAttribute("etag",Editor.guid()),d=null!=g?g.getMode():this.mode,null!=d&&X.setAttribute("type",d),1<X.getElementsByTagName("diagram").length&&null!=this.pages&&X.setAttribute("pages",this.pages.length));
-Y=Y?mxUtils.getPrettyXml(X):mxUtils.getXml(X);if(!y&&!q&&(F||null!=g&&/(\.html)$/i.test(g.getTitle())))Y=this.getHtml2(mxUtils.getXml(X),f,null!=g?g.getTitle():null,Z,ba);else if(y||!q&&null!=g&&/(\.svg)$/i.test(g.getTitle()))null==g||g.getMode()!=App.MODE_DEVICE&&g.getMode()!=App.MODE_BROWSER||(m=null),Y=this.getEmbeddedSvg(Y,f,m,null,C,I,ba);return Y};EditorUi.prototype.getXmlFileData=function(d,f,g,m){d=null!=d?d:!0;f=null!=f?f:!1;g=null!=g?g:!Editor.compressXml;var q=this.editor.getGraphXml(d,
+function(d,f,g,m,q,y,F,C,I,G,Z){f=null!=f?f:this.editor.graph;q=null!=q?q:!1;I=null!=I?I:!0;var ca=null;if(null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER)var aa="_blank";else ca=aa=m;if(null==d)return"";var Y=d;if("mxfile"!=Y.nodeName.toLowerCase()){if(Z){var pa=d.ownerDocument.createElement("diagram");pa.setAttribute("id",Editor.guid());pa.appendChild(d)}else{pa=Graph.zapGremlins(mxUtils.getXml(d));Y=Graph.compress(pa);if(Graph.decompress(Y)!=pa)return pa;pa=d.ownerDocument.createElement("diagram");
+pa.setAttribute("id",Editor.guid());mxUtils.setTextContent(pa,Y)}Y=d.ownerDocument.createElement("mxfile");Y.appendChild(pa)}G?(Y=Y.cloneNode(!0),Y.removeAttribute("modified"),Y.removeAttribute("host"),Y.removeAttribute("agent"),Y.removeAttribute("etag"),Y.removeAttribute("userAgent"),Y.removeAttribute("version"),Y.removeAttribute("editor"),Y.removeAttribute("type")):(Y.removeAttribute("userAgent"),Y.removeAttribute("version"),Y.removeAttribute("editor"),Y.removeAttribute("pages"),Y.removeAttribute("type"),
+mxClient.IS_CHROMEAPP?Y.setAttribute("host","Chrome"):EditorUi.isElectronApp?Y.setAttribute("host","Electron"):Y.setAttribute("host",window.location.hostname),Y.setAttribute("modified",(new Date).toISOString()),Y.setAttribute("agent",navigator.appVersion),Y.setAttribute("version",EditorUi.VERSION),Y.setAttribute("etag",Editor.guid()),d=null!=g?g.getMode():this.mode,null!=d&&Y.setAttribute("type",d),1<Y.getElementsByTagName("diagram").length&&null!=this.pages&&Y.setAttribute("pages",this.pages.length));
+Z=Z?mxUtils.getPrettyXml(Y):mxUtils.getXml(Y);if(!y&&!q&&(F||null!=g&&/(\.html)$/i.test(g.getTitle())))Z=this.getHtml2(mxUtils.getXml(Y),f,null!=g?g.getTitle():null,aa,ca);else if(y||!q&&null!=g&&/(\.svg)$/i.test(g.getTitle()))null==g||g.getMode()!=App.MODE_DEVICE&&g.getMode()!=App.MODE_BROWSER||(m=null),Z=this.getEmbeddedSvg(Z,f,m,null,C,I,ca);return Z};EditorUi.prototype.getXmlFileData=function(d,f,g,m){d=null!=d?d:!0;f=null!=f?f:!1;g=null!=g?g:!Editor.compressXml;var q=this.editor.getGraphXml(d,
m);if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(I){var G=I.getElementsByTagName("mxGraphModel");G=0<G.length?G[0]:null;null==G&&g?(G=mxUtils.trim(mxUtils.getTextContent(I)),I=I.cloneNode(!1),0<G.length&&(G=Graph.decompress(G),null!=G&&0<G.length&&I.appendChild(mxUtils.parseXml(G).documentElement))):null==G||g?I=I.cloneNode(!0):(I=I.cloneNode(!1),mxUtils.setTextContent(I,Graph.compressNode(G)));q.appendChild(I)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,
Graph.compressNode(q)),q=this.fileNode.cloneNode(!1),f)d(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var y=this.pages[f],F=y.node;if(y!=this.currentPage)if(y.needsUpdate){var C=new mxCodec(mxUtils.createXmlDocument());C=C.encode(new mxGraphModel(y.root));this.editor.graph.saveViewState(y.viewState,C,null,m);EditorUi.removeChildNodes(F);mxUtils.setTextContent(F,Graph.compressNode(C));delete y.needsUpdate}else m&&(this.updatePageRoot(y),null!=y.viewState.backgroundImage&&(null!=y.viewState.backgroundImage.originalSrc?
y.viewState.backgroundImage=this.createImageForPageLink(y.viewState.backgroundImage.originalSrc,y):Graph.isPageLink(y.viewState.backgroundImage.src)&&(y.viewState.backgroundImage=this.createImageForPageLink(y.viewState.backgroundImage.src,y))),null!=y.viewState.backgroundImage&&null!=y.viewState.backgroundImage.originalSrc&&(C=new mxCodec(mxUtils.createXmlDocument()),C=C.encode(new mxGraphModel(y.root)),this.editor.graph.saveViewState(y.viewState,C,null,m),F=F.cloneNode(!1),mxUtils.setTextContent(F,
@@ -3397,9 +3400,9 @@ function(d){if(null!=d[EditorUi.DIFF_INSERT])for(var f=0;f<d[EditorUi.DIFF_INSER
delete d[EditorUi.DIFF_UPDATE][m]}mxUtils.isEmptyObject(d[EditorUi.DIFF_UPDATE])&&delete d[EditorUi.DIFF_UPDATE]}return d};EditorUi.prototype.anonymizeAttributes=function(d,f){if(null!=d.attributes)for(var g=0;g<d.attributes.length;g++)"as"!=d.attributes[g].name&&d.setAttribute(d.attributes[g].name,this.anonymizeString(d.attributes[g].value,f));if(null!=d.childNodes)for(g=0;g<d.childNodes.length;g++)this.anonymizeAttributes(d.childNodes[g],f)};EditorUi.prototype.anonymizeNode=function(d,f){f=d.getElementsByTagName("mxCell");
for(var g=0;g<f.length;g++)null!=f[g].getAttribute("value")&&f[g].setAttribute("value","["+f[g].getAttribute("value").length+"]"),null!=f[g].getAttribute("xmlValue")&&f[g].setAttribute("xmlValue","["+f[g].getAttribute("xmlValue").length+"]"),null!=f[g].getAttribute("style")&&f[g].setAttribute("style","["+f[g].getAttribute("style").length+"]"),null!=f[g].parentNode&&"root"!=f[g].parentNode.nodeName&&null!=f[g].parentNode.parentNode&&(f[g].setAttribute("id",f[g].parentNode.getAttribute("id")),f[g].parentNode.parentNode.replaceChild(f[g],
f[g].parentNode));return d};EditorUi.prototype.synchronizeCurrentFile=function(d){var f=this.getCurrentFile();null!=f&&(f.savingFile?this.handleError({message:mxResources.get("busy")}):!d&&f.invalidChecksum?f.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(f.clearAutosave(),this.editor.setStatus(""),d?f.reloadFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)})):f.synchronizeFile(mxUtils.bind(this,
-function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)}))))};EditorUi.prototype.getFileData=function(d,f,g,m,q,y,F,C,I,G,Y){q=null!=q?q:!0;y=null!=y?y:!1;var ba=this.editor.graph;if(f||!d&&null!=I&&/(\.svg)$/i.test(I.getTitle())){var Z=null!=ba.themes&&"darkTheme"==ba.defaultThemeName;G=!1;if(Z||null!=this.pages&&this.currentPage!=this.pages[0]){var X=ba.getGlobalVariable;ba=this.createTemporaryGraph(Z?ba.getDefaultStylesheet():ba.getStylesheet());
-ba.setBackgroundImage=this.editor.graph.setBackgroundImage;ba.background=this.editor.graph.background;var qa=this.pages[0];this.currentPage==qa?ba.setBackgroundImage(this.editor.graph.backgroundImage):null!=qa.viewState&&null!=qa.viewState&&ba.setBackgroundImage(qa.viewState.backgroundImage);ba.getGlobalVariable=function(Q){return"page"==Q?qa.getName():"pagenumber"==Q?1:X.apply(this,arguments)};document.body.appendChild(ba.container);ba.model.setRoot(qa.root)}}F=null!=F?F:this.getXmlFileData(q,y,
-G,Y);I=null!=I?I:this.getCurrentFile();d=this.createFileData(F,ba,I,window.location.href,d,f,g,m,q,C,G);ba!=this.editor.graph&&ba.container.parentNode.removeChild(ba.container);return d};EditorUi.prototype.getHtml=function(d,f,g,m,q,y){y=null!=y?y:!0;var F=null,C=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){F=y?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var I=f.view.scale;y=Math.floor(F.x/I-f.view.translate.x);I=Math.floor(F.y/I-f.view.translate.y);F=f.background;null==
+function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)}))))};EditorUi.prototype.getFileData=function(d,f,g,m,q,y,F,C,I,G,Z){q=null!=q?q:!0;y=null!=y?y:!1;var ca=this.editor.graph;if(f||!d&&null!=I&&/(\.svg)$/i.test(I.getTitle())){var aa=null!=ca.themes&&"darkTheme"==ca.defaultThemeName;G=!1;if(aa||null!=this.pages&&this.currentPage!=this.pages[0]){var Y=ca.getGlobalVariable;ca=this.createTemporaryGraph(aa?ca.getDefaultStylesheet():ca.getStylesheet());
+ca.setBackgroundImage=this.editor.graph.setBackgroundImage;ca.background=this.editor.graph.background;var pa=this.pages[0];this.currentPage==pa?ca.setBackgroundImage(this.editor.graph.backgroundImage):null!=pa.viewState&&null!=pa.viewState&&ca.setBackgroundImage(pa.viewState.backgroundImage);ca.getGlobalVariable=function(Q){return"page"==Q?pa.getName():"pagenumber"==Q?1:Y.apply(this,arguments)};document.body.appendChild(ca.container);ca.model.setRoot(pa.root)}}F=null!=F?F:this.getXmlFileData(q,y,
+G,Z);I=null!=I?I:this.getCurrentFile();d=this.createFileData(F,ca,I,window.location.href,d,f,g,m,q,C,G);ca!=this.editor.graph&&ca.container.parentNode.removeChild(ca.container);return d};EditorUi.prototype.getHtml=function(d,f,g,m,q,y){y=null!=y?y:!0;var F=null,C=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){F=y?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var I=f.view.scale;y=Math.floor(F.x/I-f.view.translate.x);I=Math.floor(F.y/I-f.view.translate.y);F=f.background;null==
q&&(f=this.getBasenames().join(";"),0<f.length&&(C=EditorUi.drawHost+"/embed.js?s="+f));d.setAttribute("x0",y);d.setAttribute("y0",I)}null!=d&&(d.setAttribute("pan","1"),d.setAttribute("zoom","1"),d.setAttribute("resize","0"),d.setAttribute("fit","0"),d.setAttribute("border","20"),d.setAttribute("links","1"),null!=m&&d.setAttribute("edit",m));null!=q&&(q=q.replace(/&/g,"&amp;"));d=null!=d?Graph.zapGremlins(mxUtils.getXml(d)):"";m=Graph.compress(d);Graph.decompress(m)!=d&&(m=encodeURIComponent(d));
return(null==q?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=q?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==q?null!=g?"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=q?'<meta http-equiv="refresh" content="0;URL=\''+q+"'\"/>\n":"")+"</head>\n<body"+(null==q&&null!=F&&F!=mxConstants.NONE?' style="background-color:'+F+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+
m+"</div>\n</div>\n"+(null==q?'<script type="text/javascript" src="'+C+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+q+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(d,f,g,m,q){f=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=q&&(q=q.replace(/&/g,"&amp;"));d={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,
@@ -3409,50 +3412,50 @@ function(d){d=this.validateFileData(d);this.pages=this.fileNode=this.currentPage
"0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name"))){g=null;this.fileNode=f;this.pages=[];for(var m=0;m<d.length;m++)null==d[m].getAttribute("id")&&d[m].setAttribute("id",m),f=new DiagramPage(d[m]),null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[m+1])),this.pages.push(f),null!=urlParams["page-id"]&&f.getId()==urlParams["page-id"]&&(g=f);this.currentPage=null!=g?g:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];f=this.currentPage.node}"0"!=
urlParams.pages&&null==this.fileNode&&null!=f&&(this.fileNode=f.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(f.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(f);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var q=urlParams["layer-ids"].split(" ");f={};for(m=0;m<q.length;m++)f[q[m]]=!0;var y=this.editor.graph.getModel(),
F=y.getChildren(y.root);for(m=0;m<F.length;m++){var C=F[m];y.setVisible(C,f[C.id]||!1)}}catch(I){}};EditorUi.prototype.getBaseFilename=function(d){var f=this.getCurrentFile();f=null!=f&&null!=f.getTitle()?f.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(f)||/(\.html)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.png)$/i.test(f))f=f.substring(0,f.lastIndexOf("."));/(\.drawio)$/i.test(f)&&(f=f.substring(0,f.lastIndexOf(".")));!d&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&
-0<this.currentPage.getName().length&&(f=f+"-"+this.currentPage.getName());return f};EditorUi.prototype.downloadFile=function(d,f,g,m,q,y,F,C,I,G,Y,ba){try{m=null!=m?m:this.editor.graph.isSelectionEmpty();var Z=this.getBaseFilename("remoteSvg"==d?!1:!q),X=Z+("xml"==d||"pdf"==d&&Y?".drawio":"")+"."+d;if("xml"==d){var qa=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,m,q,null,null,null,f);this.saveData(X,d,qa,"text/xml")}else if("html"==d)qa=this.getHtml2(this.getFileData(!0),this.editor.graph,
-Z),this.saveData(X,d,qa,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==d)X=Z+".png";else if("jpeg"==d)X=Z+".jpg";else if("remoteSvg"==d){X=Z+".svg";d="svg";var Q=parseInt(I);"string"===typeof C&&0<C.indexOf("%")&&(C=parseInt(C)/100);if(0<Q){var W=this.editor.graph,ha=W.getGraphBounds();var la=Math.ceil(ha.width*C/W.view.scale+2*Q);var ja=Math.ceil(ha.height*C/W.view.scale+2*Q)}}this.saveRequest(X,d,mxUtils.bind(this,function(N,
-aa){try{var ma=this.editor.graph.pageVisible;0==y&&(this.editor.graph.pageVisible=y);var u=this.createDownloadRequest(N,d,m,aa,F,q,C,I,G,Y,ba,la,ja);this.editor.graph.pageVisible=ma;return u}catch(H){this.handleError(H)}}))}else{var U=null,L=mxUtils.bind(this,function(N){N.length<=MAX_REQUEST_SIZE?this.saveData(X,"svg",N,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(U)}))});if("svg"==d){var da=this.editor.graph.background;
-if(F||da==mxConstants.NONE)da=null;var O=this.editor.graph.getSvg(da,null,null,null,null,m);g&&this.editor.graph.addSvgShadow(O);this.editor.convertImages(O,mxUtils.bind(this,mxUtils.bind(this,function(N){this.spinner.stop();L(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(N))})))}else X=Z+".svg",U=this.getFileData(!1,!0,null,mxUtils.bind(this,function(N){this.spinner.stop();L(N)}),m)}}catch(N){this.handleError(N)}};EditorUi.prototype.createDownloadRequest=function(d,f,g,m,q,y,F,C,
-I,G,Y,ba,Z){var X=this.editor.graph,qa=X.getGraphBounds();g=this.getFileData(!0,null,null,null,g,0==y?!1:"xmlpng"!=f,null,null,null,!1,"pdf"==f);var Q="",W="";if(qa.width*qa.height>MAX_AREA||g.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};G=G?"1":"0";"pdf"==f&&(null!=Y?W="&from="+Y.from+"&to="+Y.to:0==y&&(W="&allPages=1"));"xmlpng"==f&&(G="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(y=0;y<this.pages.length;y++)if(this.pages[y]==
-this.currentPage){Q="&from="+y;break}y=X.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!q?q||null!=y&&y!=mxConstants.NONE||(y="#ffffff"):y=mxConstants.NONE;q={globalVars:X.getExportVariables()};I&&(q.grid={size:X.gridSize,steps:X.view.gridSteps,color:X.view.gridColor});Graph.translateDiagram&&(q.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+f+Q+W+"&bg="+(null!=y?y:mxConstants.NONE)+"&base64="+m+"&embedXml="+G+"&xml="+encodeURIComponent(g)+(null!=d?"&filename="+encodeURIComponent(d):
-"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(null!=F?"&scale="+F:"")+(null!=C?"&border="+C:"")+(ba&&isFinite(ba)?"&w="+ba:"")+(Z&&isFinite(Z)?"&h="+Z:""))};EditorUi.prototype.setMode=function(d,f){this.mode=d};EditorUi.prototype.loadDescriptor=function(d,f,g){var m=window.location.hash,q=mxUtils.bind(this,function(y){var F=null!=d.data?d.data:"";null!=y&&0<y.length&&(0<F.length&&(F+="\n"),F+=y);y=new LocalFile(this,"csv"!=d.format&&0<F.length?F:this.emptyDiagramXml,null!=urlParams.title?
-decodeURIComponent(urlParams.title):this.defaultFilename,!0);y.getHash=function(){return m};this.fileLoaded(y);"csv"==d.format&&this.importCsv(F,mxUtils.bind(this,function(ba){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=d.update){var C=null!=d.interval?parseInt(d.interval):6E4,I=null,G=mxUtils.bind(this,function(){var ba=this.currentPage;mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,
-function(Z){ba===this.currentPage&&(200<=Z.getStatus()&&300>=Z.getStatus()?(this.updateDiagram(Z.getText()),Y()):this.handleError({message:mxResources.get("error")+" "+Z.getStatus()}))}),mxUtils.bind(this,function(Z){this.handleError(Z)}))}),Y=mxUtils.bind(this,function(){window.clearTimeout(I);I=window.setTimeout(G,C)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){Y();G()}));Y();G()}null!=f&&f()});null!=d.url&&0<d.url.length?this.editor.loadUrl(d.url,mxUtils.bind(this,function(y){q(y)}),
-mxUtils.bind(this,function(y){null!=g&&g(y)})):q("")};EditorUi.prototype.updateDiagram=function(d){function f(ja){var U=new mxCellOverlay(ja.image||q.warningImage,ja.tooltip,ja.align,ja.valign,ja.offset);U.addListener(mxEvent.CLICK,function(L,da){m.alert(ja.tooltip)});return U}var g=null,m=this;if(null!=d&&0<d.length&&(g=mxUtils.parseXml(d),d=null!=g?g.documentElement:null,null!=d&&"updates"==d.nodeName)){var q=this.editor.graph,y=q.getModel();y.beginUpdate();var F=null;try{for(d=d.firstChild;null!=
-d;){if("update"==d.nodeName){var C=y.getCell(d.getAttribute("id"));if(null!=C){try{var I=d.getAttribute("value");if(null!=I){var G=mxUtils.parseXml(I).documentElement;if(null!=G)if("1"==G.getAttribute("replace-value"))y.setValue(C,G);else for(var Y=G.attributes,ba=0;ba<Y.length;ba++)q.setAttributeForCell(C,Y[ba].nodeName,0<Y[ba].nodeValue.length?Y[ba].nodeValue:null)}}catch(ja){null!=window.console&&console.log("Error in value for "+C.id+": "+ja)}try{var Z=d.getAttribute("style");null!=Z&&q.model.setStyle(C,
-Z)}catch(ja){null!=window.console&&console.log("Error in style for "+C.id+": "+ja)}try{var X=d.getAttribute("icon");if(null!=X){var qa=0<X.length?JSON.parse(X):null;null!=qa&&qa.append||q.removeCellOverlays(C);null!=qa&&q.addCellOverlay(C,f(qa))}}catch(ja){null!=window.console&&console.log("Error in icon for "+C.id+": "+ja)}try{var Q=d.getAttribute("geometry");if(null!=Q){Q=JSON.parse(Q);var W=q.getCellGeometry(C);if(null!=W){W=W.clone();for(key in Q){var ha=parseFloat(Q[key]);"dx"==key?W.x+=ha:"dy"==
-key?W.y+=ha:"dw"==key?W.width+=ha:"dh"==key?W.height+=ha:W[key]=parseFloat(Q[key])}q.model.setGeometry(C,W)}}}catch(ja){null!=window.console&&console.log("Error in icon for "+C.id+": "+ja)}}}else if("model"==d.nodeName){for(var la=d.firstChild;null!=la&&la.nodeType!=mxConstants.NODETYPE_ELEMENT;)la=la.nextSibling;null!=la&&(new mxCodec(d.firstChild)).decode(la,y)}else if("view"==d.nodeName){if(d.hasAttribute("scale")&&(q.view.scale=parseFloat(d.getAttribute("scale"))),d.hasAttribute("dx")||d.hasAttribute("dy"))q.view.translate=
-new mxPoint(parseFloat(d.getAttribute("dx")||0),parseFloat(d.getAttribute("dy")||0))}else"fit"==d.nodeName&&(F=d.hasAttribute("max-scale")?parseFloat(d.getAttribute("max-scale")):1);d=d.nextSibling}}finally{y.endUpdate()}null!=F&&this.chromelessResize&&this.chromelessResize(!0,F)}return g};EditorUi.prototype.getCopyFilename=function(d,f){var g=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;d="";var m=g.lastIndexOf(".");0<=m&&(d=g.substring(m),g=g.substring(0,m));if(f){f=g;var q=new Date;
-g=q.getFullYear();m=q.getMonth()+1;var y=q.getDate(),F=q.getHours(),C=q.getMinutes();q=q.getSeconds();g=f+(" "+(g+"-"+m+"-"+y+"-"+F+"-"+C+"-"+q))}return g=mxResources.get("copyOf",[g])+d};EditorUi.prototype.fileLoaded=function(d,f){var g=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var m=!1;this.hideDialog();null!=g&&(EditorUi.debug("File.closed",[g]),g.removeListener(this.descriptorChangedListener),g.close());this.editor.graph.model.clear();this.editor.undoManager.clear();
-var q=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=g&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!f&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerText="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();f||this.showSplash()});
-if(null!=d)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(d);d.addListener("descriptorChanged",this.descriptorChangedListener);d.addListener("contentChanged",this.descriptorChangedListener);d.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(d.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();d.isEditable()?d.isModified()?(d.addUnsavedStatus(),
-null!=d.backupPatch&&d.patch([d.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"));
-m=!0;if(!this.isOffline()&&null!=d.getMode()){var y="1"==urlParams.sketch?"sketch":uiTheme;if(null==y)y="default";else if("sketch"==y||"min"==y)y+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:d.getMode().toUpperCase()+"-OPEN-FILE-"+d.getHash(),action:"size_"+d.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+y})}EditorUi.debug("File.opened",[d]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==
-d.getMode()&&d.getMode()!=App.MODE_DEVICE&&null!=d.getMode())try{this.addRecent({id:d.getHash(),title:d.getTitle(),mode:d.getMode()})}catch(F){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(F){}}catch(F){this.fileLoadedError=F;if(null!=d)try{d.close()}catch(C){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=d?d.getHash():"none"),action:"message_"+F.message,label:"stack_"+F.stack})}catch(C){}d=mxUtils.bind(this,
-function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=g?this.fileLoaded(g)||q():q()});f?d():this.handleError(F,mxResources.get("errorLoadingFile"),d,!0,null,null,!0)}else q();return m};EditorUi.prototype.getHashValueForPages=function(d,f){var g=0,m=new mxGraphModel,q=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var y=0;y<d.length;y++){this.updatePageRoot(d[y]);var F=
-d[y].node.cloneNode(!1);F.removeAttribute("name");m.root=d[y].root;var C=q.encode(m);this.editor.graph.saveViewState(d[y].viewState,C,!0);C.removeAttribute("pageWidth");C.removeAttribute("pageHeight");F.appendChild(C);null!=f&&(f.eltCount+=F.getElementsByTagName("*").length,f.nodeCount+=F.getElementsByTagName("mxCell").length);g=(g<<5)-g+this.hashValue(F,function(I,G,Y,ba){return!ba||"mxGeometry"!=I.nodeName&&"mxPoint"!=I.nodeName||"x"!=G&&"y"!=G&&"width"!=G&&"height"!=G?ba&&"mxCell"==I.nodeName&&
-"previous"==G?null:Y:Math.round(Y)},f)<<0}return g};EditorUi.prototype.hashValue=function(d,f,g){var m=0;if(null!=d&&"object"===typeof d&&"number"===typeof d.nodeType&&"string"===typeof d.nodeName&&"function"===typeof d.getAttribute){null!=d.nodeName&&(m^=this.hashValue(d.nodeName,f,g));if(null!=d.attributes){null!=g&&(g.attrCount+=d.attributes.length);for(var q=0;q<d.attributes.length;q++){var y=d.attributes[q].name,F=null!=f?f(d,y,d.attributes[q].value,!0):d.attributes[q].value;null!=F&&(m^=this.hashValue(y,
+0<this.currentPage.getName().length&&(f=f+"-"+this.currentPage.getName());return f};EditorUi.prototype.downloadFile=function(d,f,g,m,q,y,F,C,I,G,Z,ca){try{m=null!=m?m:this.editor.graph.isSelectionEmpty();var aa=this.getBaseFilename("remoteSvg"==d?!1:!q),Y=aa+("xml"==d||"pdf"==d&&Z?".drawio":"")+"."+d;if("xml"==d){var pa=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,m,q,null,null,null,f);this.saveData(Y,d,pa,"text/xml")}else if("html"==d)pa=this.getHtml2(this.getFileData(!0),this.editor.graph,
+aa),this.saveData(Y,d,pa,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==d)Y=aa+".png";else if("jpeg"==d)Y=aa+".jpg";else if("remoteSvg"==d){Y=aa+".svg";d="svg";var Q=parseInt(I);"string"===typeof C&&0<C.indexOf("%")&&(C=parseInt(C)/100);if(0<Q){var X=this.editor.graph,ha=X.getGraphBounds();var U=Math.ceil(ha.width*C/X.view.scale+2*Q);var ma=Math.ceil(ha.height*C/X.view.scale+2*Q)}}this.saveRequest(Y,d,mxUtils.bind(this,function(O,
+ba){try{var la=this.editor.graph.pageVisible;0==y&&(this.editor.graph.pageVisible=y);var u=this.createDownloadRequest(O,d,m,ba,F,q,C,I,G,Z,ca,U,ma);this.editor.graph.pageVisible=la;return u}catch(H){this.handleError(H)}}))}else{var T=null,M=mxUtils.bind(this,function(O){O.length<=MAX_REQUEST_SIZE?this.saveData(Y,"svg",O,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(T)}))});if("svg"==d){var ia=this.editor.graph.background;
+if(F||ia==mxConstants.NONE)ia=null;var N=this.editor.graph.getSvg(ia,null,null,null,null,m);g&&this.editor.graph.addSvgShadow(N);this.editor.convertImages(N,mxUtils.bind(this,mxUtils.bind(this,function(O){this.spinner.stop();M(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(O))})))}else Y=aa+".svg",T=this.getFileData(!1,!0,null,mxUtils.bind(this,function(O){this.spinner.stop();M(O)}),m)}}catch(O){this.handleError(O)}};EditorUi.prototype.createDownloadRequest=function(d,f,g,m,q,y,F,
+C,I,G,Z,ca,aa){var Y=this.editor.graph,pa=Y.getGraphBounds();g=this.getFileData(!0,null,null,null,g,0==y?!1:"xmlpng"!=f,null,null,null,!1,"pdf"==f);var Q="",X="";if(pa.width*pa.height>MAX_AREA||g.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};G=G?"1":"0";"pdf"==f&&(null!=Z?X="&from="+Z.from+"&to="+Z.to:0==y&&(X="&allPages=1"));"xmlpng"==f&&(G="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(y=0;y<this.pages.length;y++)if(this.pages[y]==
+this.currentPage){Q="&from="+y;break}y=Y.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!q?q||null!=y&&y!=mxConstants.NONE||(y="#ffffff"):y=mxConstants.NONE;q={globalVars:Y.getExportVariables()};I&&(q.grid={size:Y.gridSize,steps:Y.view.gridSteps,color:Y.view.gridColor});Graph.translateDiagram&&(q.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+f+Q+X+"&bg="+(null!=y?y:mxConstants.NONE)+"&base64="+m+"&embedXml="+G+"&xml="+encodeURIComponent(g)+(null!=d?"&filename="+encodeURIComponent(d):
+"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(null!=F?"&scale="+F:"")+(null!=C?"&border="+C:"")+(ca&&isFinite(ca)?"&w="+ca:"")+(aa&&isFinite(aa)?"&h="+aa:""))};EditorUi.prototype.setMode=function(d,f){this.mode=d};EditorUi.prototype.loadDescriptor=function(d,f,g){var m=window.location.hash,q=mxUtils.bind(this,function(y){var F=null!=d.data?d.data:"";null!=y&&0<y.length&&(0<F.length&&(F+="\n"),F+=y);y=new LocalFile(this,"csv"!=d.format&&0<F.length?F:this.emptyDiagramXml,null!=urlParams.title?
+decodeURIComponent(urlParams.title):this.defaultFilename,!0);y.getHash=function(){return m};this.fileLoaded(y);"csv"==d.format&&this.importCsv(F,mxUtils.bind(this,function(ca){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=d.update){var C=null!=d.interval?parseInt(d.interval):6E4,I=null,G=mxUtils.bind(this,function(){var ca=this.currentPage;mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,
+function(aa){ca===this.currentPage&&(200<=aa.getStatus()&&300>=aa.getStatus()?(this.updateDiagram(aa.getText()),Z()):this.handleError({message:mxResources.get("error")+" "+aa.getStatus()}))}),mxUtils.bind(this,function(aa){this.handleError(aa)}))}),Z=mxUtils.bind(this,function(){window.clearTimeout(I);I=window.setTimeout(G,C)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){Z();G()}));Z();G()}null!=f&&f()});null!=d.url&&0<d.url.length?this.editor.loadUrl(d.url,mxUtils.bind(this,
+function(y){q(y)}),mxUtils.bind(this,function(y){null!=g&&g(y)})):q("")};EditorUi.prototype.updateDiagram=function(d){function f(ma){var T=new mxCellOverlay(ma.image||q.warningImage,ma.tooltip,ma.align,ma.valign,ma.offset);T.addListener(mxEvent.CLICK,function(M,ia){m.alert(ma.tooltip)});return T}var g=null,m=this;if(null!=d&&0<d.length&&(g=mxUtils.parseXml(d),d=null!=g?g.documentElement:null,null!=d&&"updates"==d.nodeName)){var q=this.editor.graph,y=q.getModel();y.beginUpdate();var F=null;try{for(d=
+d.firstChild;null!=d;){if("update"==d.nodeName){var C=y.getCell(d.getAttribute("id"));if(null!=C){try{var I=d.getAttribute("value");if(null!=I){var G=mxUtils.parseXml(I).documentElement;if(null!=G)if("1"==G.getAttribute("replace-value"))y.setValue(C,G);else for(var Z=G.attributes,ca=0;ca<Z.length;ca++)q.setAttributeForCell(C,Z[ca].nodeName,0<Z[ca].nodeValue.length?Z[ca].nodeValue:null)}}catch(ma){null!=window.console&&console.log("Error in value for "+C.id+": "+ma)}try{var aa=d.getAttribute("style");
+null!=aa&&q.model.setStyle(C,aa)}catch(ma){null!=window.console&&console.log("Error in style for "+C.id+": "+ma)}try{var Y=d.getAttribute("icon");if(null!=Y){var pa=0<Y.length?JSON.parse(Y):null;null!=pa&&pa.append||q.removeCellOverlays(C);null!=pa&&q.addCellOverlay(C,f(pa))}}catch(ma){null!=window.console&&console.log("Error in icon for "+C.id+": "+ma)}try{var Q=d.getAttribute("geometry");if(null!=Q){Q=JSON.parse(Q);var X=q.getCellGeometry(C);if(null!=X){X=X.clone();for(key in Q){var ha=parseFloat(Q[key]);
+"dx"==key?X.x+=ha:"dy"==key?X.y+=ha:"dw"==key?X.width+=ha:"dh"==key?X.height+=ha:X[key]=parseFloat(Q[key])}q.model.setGeometry(C,X)}}}catch(ma){null!=window.console&&console.log("Error in icon for "+C.id+": "+ma)}}}else if("model"==d.nodeName){for(var U=d.firstChild;null!=U&&U.nodeType!=mxConstants.NODETYPE_ELEMENT;)U=U.nextSibling;null!=U&&(new mxCodec(d.firstChild)).decode(U,y)}else if("view"==d.nodeName){if(d.hasAttribute("scale")&&(q.view.scale=parseFloat(d.getAttribute("scale"))),d.hasAttribute("dx")||
+d.hasAttribute("dy"))q.view.translate=new mxPoint(parseFloat(d.getAttribute("dx")||0),parseFloat(d.getAttribute("dy")||0))}else"fit"==d.nodeName&&(F=d.hasAttribute("max-scale")?parseFloat(d.getAttribute("max-scale")):1);d=d.nextSibling}}finally{y.endUpdate()}null!=F&&this.chromelessResize&&this.chromelessResize(!0,F)}return g};EditorUi.prototype.getCopyFilename=function(d,f){var g=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;d="";var m=g.lastIndexOf(".");0<=m&&(d=g.substring(m),g=
+g.substring(0,m));if(f){f=g;var q=new Date;g=q.getFullYear();m=q.getMonth()+1;var y=q.getDate(),F=q.getHours(),C=q.getMinutes();q=q.getSeconds();g=f+(" "+(g+"-"+m+"-"+y+"-"+F+"-"+C+"-"+q))}return g=mxResources.get("copyOf",[g])+d};EditorUi.prototype.fileLoaded=function(d,f){var g=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var m=!1;this.hideDialog();null!=g&&(EditorUi.debug("File.closed",[g]),g.removeListener(this.descriptorChangedListener),g.close());
+this.editor.graph.model.clear();this.editor.undoManager.clear();var q=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=g&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!f&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerText="",this.fname.setAttribute("title",mxResources.get("rename")));
+this.editor.setStatus("");this.updateUi();f||this.showSplash()});if(null!=d)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(d);d.addListener("descriptorChanged",this.descriptorChangedListener);d.addListener("contentChanged",this.descriptorChangedListener);d.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(d.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();
+this.updateUi();d.isEditable()?d.isModified()?(d.addUnsavedStatus(),null!=d.backupPatch&&d.patch([d.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"));m=!0;if(!this.isOffline()&&null!=d.getMode()){var y="1"==urlParams.sketch?"sketch":uiTheme;if(null==y)y="default";else if("sketch"==y||"min"==y)y+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:d.getMode().toUpperCase()+"-OPEN-FILE-"+d.getHash(),action:"size_"+d.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+y})}EditorUi.debug("File.opened",[d]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));
+if(this.editor.editable&&this.mode==d.getMode()&&d.getMode()!=App.MODE_DEVICE&&null!=d.getMode())try{this.addRecent({id:d.getHash(),title:d.getTitle(),mode:d.getMode()})}catch(F){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(F){}}catch(F){this.fileLoadedError=F;if(null!=d)try{d.close()}catch(C){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=d?d.getHash():"none"),action:"message_"+F.message,label:"stack_"+
+F.stack})}catch(C){}d=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=g?this.fileLoaded(g)||q():q()});f?d():this.handleError(F,mxResources.get("errorLoadingFile"),d,!0,null,null,!0)}else q();return m};EditorUi.prototype.getHashValueForPages=function(d,f){var g=0,m=new mxGraphModel,q=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var y=0;y<d.length;y++){this.updatePageRoot(d[y]);
+var F=d[y].node.cloneNode(!1);F.removeAttribute("name");m.root=d[y].root;var C=q.encode(m);this.editor.graph.saveViewState(d[y].viewState,C,!0);C.removeAttribute("pageWidth");C.removeAttribute("pageHeight");F.appendChild(C);null!=f&&(f.eltCount+=F.getElementsByTagName("*").length,f.nodeCount+=F.getElementsByTagName("mxCell").length);g=(g<<5)-g+this.hashValue(F,function(I,G,Z,ca){return!ca||"mxGeometry"!=I.nodeName&&"mxPoint"!=I.nodeName||"x"!=G&&"y"!=G&&"width"!=G&&"height"!=G?ca&&"mxCell"==I.nodeName&&
+"previous"==G?null:Z:Math.round(Z)},f)<<0}return g};EditorUi.prototype.hashValue=function(d,f,g){var m=0;if(null!=d&&"object"===typeof d&&"number"===typeof d.nodeType&&"string"===typeof d.nodeName&&"function"===typeof d.getAttribute){null!=d.nodeName&&(m^=this.hashValue(d.nodeName,f,g));if(null!=d.attributes){null!=g&&(g.attrCount+=d.attributes.length);for(var q=0;q<d.attributes.length;q++){var y=d.attributes[q].name,F=null!=f?f(d,y,d.attributes[q].value,!0):d.attributes[q].value;null!=F&&(m^=this.hashValue(y,
f,g)+this.hashValue(F,f,g))}}if(null!=d.childNodes)for(q=0;q<d.childNodes.length;q++)m=(m<<5)-m+this.hashValue(d.childNodes[q],f,g)<<0}else if(null!=d&&"function"!==typeof d){d=String(d);f=0;null!=g&&(g.byteCount+=d.length);for(q=0;q<d.length;q++)f=(f<<5)-f+d.charCodeAt(q)<<0;m^=f}return m};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(d,f,g,m,q,y,F){};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(d){null==d&&(d=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,d,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(d){var f=mxUtils.createXmlDocument(),g=f.createElement("mxlibrary");mxUtils.setTextContent(g,JSON.stringify(d));f.appendChild(g);
return mxUtils.getXml(f)};EditorUi.prototype.closeLibrary=function(d){null!=d&&(this.removeLibrarySidebar(d.getHash()),d.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(d.getHash()),".scratchpad"==d.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(d){var f=this.sidebar.palettes[d];if(null!=f){for(var g=0;g<f.length;g++)f[g].parentNode.removeChild(f[g]);delete this.sidebar.palettes[d]}};EditorUi.prototype.repositionLibrary=function(d){var f=this.sidebar.container;
if(null==d){var g=this.sidebar.palettes["L.scratchpad"];null==g&&(g=this.sidebar.palettes.search);null!=g&&(d=g[g.length-1].nextSibling)}d=null!=d?d:f.firstChild.nextSibling.nextSibling;g=f.lastChild;var m=g.previousSibling;f.insertBefore(g,d);f.insertBefore(m,g)};EditorUi.prototype.loadLibrary=function(d,f){var g=mxUtils.parseXml(d.getData());if("mxlibrary"==g.documentElement.nodeName){var m=JSON.parse(mxUtils.getTextContent(g.documentElement));this.libraryLoaded(d,m,g.documentElement.getAttribute("title"),
-f)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(d){return""};EditorUi.prototype.libraryLoaded=function(d,f,g,m){if(null!=this.sidebar){d.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(d.getHash());".scratchpad"==d.title&&(this.scratchpad=d);var q=this.sidebar.palettes[d.getHash()];q=null!=q?q[q.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var y=null,F=mxUtils.bind(this,function(la,ja){0==la.length&&d.isEditable()?
-(null==y&&(y=document.createElement("div"),y.className="geDropTarget",mxUtils.write(y,mxResources.get("dragElementsHere"))),ja.appendChild(y)):this.addLibraryEntries(la,ja)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==g&&(g=d.getTitle(),null!=g&&/(\.xml)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf("."))));var C=this.sidebar.addPalette(d.getHash(),g,null!=m?m:!0,mxUtils.bind(this,function(la){F(f,la)}));this.repositionLibrary(q);var I=C.parentNode.previousSibling;m=I.getAttribute("title");
-null!=m&&0<m.length&&".scratchpad"!=d.title&&I.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+m);var G=document.createElement("div");G.style.position="absolute";G.style.right="0px";G.style.top="0px";G.style.padding="8px";G.style.backgroundColor="inherit";I.style.position="relative";var Y=document.createElement("img");Y.setAttribute("src",Editor.crossImage);Y.setAttribute("title",mxResources.get("close"));Y.setAttribute("valign","absmiddle");Y.setAttribute("border","0");Y.style.position="relative";
-Y.style.top="2px";Y.style.width="14px";Y.style.cursor="pointer";Y.style.margin="0 3px";Editor.isDarkMode()&&(Y.style.filter="invert(100%)");var ba=null;if(".scratchpad"!=d.title||this.closableScratchpad)G.appendChild(Y),mxEvent.addListener(Y,"click",mxUtils.bind(this,function(la){if(!mxEvent.isConsumed(la)){var ja=mxUtils.bind(this,function(){this.closeLibrary(d)});null!=ba?this.confirm(mxResources.get("allChangesLost"),null,ja,mxResources.get("cancel"),mxResources.get("discardChanges")):ja();mxEvent.consume(la)}}));
-if(d.isEditable()){var Z=this.editor.graph,X=null,qa=mxUtils.bind(this,function(la){this.showLibraryDialog(d.getTitle(),C,f,d,d.getMode());mxEvent.consume(la)}),Q=mxUtils.bind(this,function(la){d.setModified(!0);d.isAutosave()?(null!=X&&null!=X.parentNode&&X.parentNode.removeChild(X),X=Y.cloneNode(!1),X.setAttribute("src",Editor.spinImage),X.setAttribute("title",mxResources.get("saving")),X.style.cursor="default",X.style.marginRight="2px",X.style.marginTop="-2px",G.insertBefore(X,G.firstChild),I.style.paddingRight=
-18*G.childNodes.length+"px",this.saveLibrary(d.getTitle(),f,d,d.getMode(),!0,!0,function(){null!=X&&null!=X.parentNode&&(X.parentNode.removeChild(X),I.style.paddingRight=18*G.childNodes.length+"px")})):null==ba&&(ba=Y.cloneNode(!1),ba.setAttribute("src",Editor.saveImage),ba.setAttribute("title",mxResources.get("save")),G.insertBefore(ba,G.firstChild),mxEvent.addListener(ba,"click",mxUtils.bind(this,function(ja){this.saveLibrary(d.getTitle(),f,d,d.getMode(),d.constructor==LocalLibrary,!0,function(){null==
-ba||d.isModified()||(I.style.paddingRight=18*G.childNodes.length+"px",ba.parentNode.removeChild(ba),ba=null)});mxEvent.consume(ja)})),I.style.paddingRight=18*G.childNodes.length+"px")}),W=mxUtils.bind(this,function(la,ja,U,L){la=Z.cloneCells(mxUtils.sortCells(Z.model.getTopmostCells(la)));for(var da=0;da<la.length;da++){var O=Z.getCellGeometry(la[da]);null!=O&&O.translate(-ja.x,-ja.y)}C.appendChild(this.sidebar.createVertexTemplateFromCells(la,ja.width,ja.height,L||"",!0,null,!1));la={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(la))),
-w:ja.width,h:ja.height};null!=L&&(la.title=L);f.push(la);Q(U);null!=y&&null!=y.parentNode&&0<f.length&&(y.parentNode.removeChild(y),y=null)}),ha=mxUtils.bind(this,function(la){if(Z.isSelectionEmpty())Z.getRubberband().isActive()?(Z.getRubberband().execute(la),Z.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var ja=Z.getSelectionCells(),U=Z.view.getBounds(ja),L=Z.view.scale;U.x/=L;U.y/=L;U.width/=L;U.height/=L;U.x-=
-Z.view.translate.x;U.y-=Z.view.translate.y;W(ja,U)}mxEvent.consume(la)});mxEvent.addGestureListeners(C,function(){},mxUtils.bind(this,function(la){Z.isMouseDown&&null!=Z.panningManager&&null!=Z.graphHandler.first&&(Z.graphHandler.suspend(),null!=Z.graphHandler.hint&&(Z.graphHandler.hint.style.visibility="hidden"),C.style.backgroundColor="#f1f3f4",C.style.cursor="copy",Z.panningManager.stop(),Z.autoScroll=!1,mxEvent.consume(la))}),mxUtils.bind(this,function(la){Z.isMouseDown&&null!=Z.panningManager&&
-null!=Z.graphHandler&&(C.style.backgroundColor="",C.style.cursor="default",this.sidebar.showTooltips=!0,Z.panningManager.stop(),Z.graphHandler.reset(),Z.isMouseDown=!1,Z.autoScroll=!0,ha(la),mxEvent.consume(la))}));mxEvent.addListener(C,"mouseleave",mxUtils.bind(this,function(la){Z.isMouseDown&&null!=Z.graphHandler.first&&(Z.graphHandler.resume(),null!=Z.graphHandler.hint&&(Z.graphHandler.hint.style.visibility="visible"),C.style.backgroundColor="",C.style.cursor="",Z.autoScroll=!0)}));Graph.fileSupport&&
-(mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(la){C.style.backgroundColor="#f1f3f4";la.dataTransfer.dropEffect="copy";C.style.cursor="copy";this.sidebar.hideTooltip();la.stopPropagation();la.preventDefault()})),mxEvent.addListener(C,"drop",mxUtils.bind(this,function(la){C.style.cursor="";C.style.backgroundColor="";0<la.dataTransfer.files.length&&this.importFiles(la.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(ja,U,L,da,O,N,aa,ma,u){if(null!=ja&&"image/"==U.substring(0,
-6))ja="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(ja),ja=[new mxCell("",new mxGeometry(0,0,O,N),ja)],ja[0].vertex=!0,W(ja,new mxRectangle(0,0,O,N),la,mxEvent.isAltDown(la)?null:aa.substring(0,aa.lastIndexOf(".")).replace(/_/g," ")),null!=y&&null!=y.parentNode&&0<f.length&&(y.parentNode.removeChild(y),y=null);else{var H=!1,P=mxUtils.bind(this,function(S,R){null!=S&&"application/pdf"==R&&(R=Editor.extractGraphModelFromPdf(S),null!=
-R&&0<R.length&&(S=R));if(null!=S)if(S=mxUtils.parseXml(S),"mxlibrary"==S.documentElement.nodeName)try{var ca=JSON.parse(mxUtils.getTextContent(S.documentElement));F(ca,C);f=f.concat(ca);Q(la);this.spinner.stop();H=!0}catch(ua){}else if("mxfile"==S.documentElement.nodeName)try{var ea=S.documentElement.getElementsByTagName("diagram");for(ca=0;ca<ea.length;ca++){var fa=this.stringToCells(Editor.getDiagramNodeXml(ea[ca])),ra=this.editor.graph.getBoundingBoxFromGeometry(fa);W(fa,new mxRectangle(0,0,ra.width,
-ra.height),la)}H=!0}catch(ua){null!=window.console&&console.log("error in drop handler:",ua)}H||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=y&&null!=y.parentNode&&0<f.length&&(y.parentNode.removeChild(y),y=null)});null!=u&&null!=aa&&(/(\.v(dx|sdx?))($|\?)/i.test(aa)||/(\.vs(x|sx?))($|\?)/i.test(aa))?this.importVisio(u,function(S){P(S,"text/xml")},null,aa):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(ja,aa)&&null!=u?this.isExternalDataComms()?
-this.parseFile(u,mxUtils.bind(this,function(S){4==S.readyState&&(this.spinner.stop(),200<=S.status&&299>=S.status?P(S.responseText,"text/xml"):this.handleError({message:mxResources.get(413==S.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):P(ja,U)}}));la.stopPropagation();la.preventDefault()})),mxEvent.addListener(C,"dragleave",function(la){C.style.cursor="";C.style.backgroundColor=
-"";la.stopPropagation();la.preventDefault()}));Y=Y.cloneNode(!1);Y.setAttribute("src",Editor.editImage);Y.setAttribute("title",mxResources.get("edit"));G.insertBefore(Y,G.firstChild);mxEvent.addListener(Y,"click",qa);mxEvent.addListener(C,"dblclick",function(la){mxEvent.getSource(la)==C&&qa(la)});m=Y.cloneNode(!1);m.setAttribute("src",Editor.plusImage);m.setAttribute("title",mxResources.get("add"));G.insertBefore(m,G.firstChild);mxEvent.addListener(m,"click",ha);this.isOffline()||".scratchpad"!=d.title||
-null==EditorUi.scratchpadHelpLink||(m=document.createElement("span"),m.setAttribute("title",mxResources.get("help")),m.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(m,"?"),mxEvent.addGestureListeners(m,mxUtils.bind(this,function(la){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(la)})),G.insertBefore(m,G.firstChild))}I.appendChild(G);I.style.paddingRight=18*G.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(d,f){for(var g=
+f)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(d){return""};EditorUi.prototype.libraryLoaded=function(d,f,g,m){if(null!=this.sidebar){d.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(d.getHash());".scratchpad"==d.title&&(this.scratchpad=d);var q=this.sidebar.palettes[d.getHash()];q=null!=q?q[q.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var y=null,F=mxUtils.bind(this,function(U,ma){0==U.length&&d.isEditable()?
+(null==y&&(y=document.createElement("div"),y.className="geDropTarget",mxUtils.write(y,mxResources.get("dragElementsHere"))),ma.appendChild(y)):this.addLibraryEntries(U,ma)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==g&&(g=d.getTitle(),null!=g&&/(\.xml)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf("."))));var C=this.sidebar.addPalette(d.getHash(),g,null!=m?m:!0,mxUtils.bind(this,function(U){F(f,U)}));this.repositionLibrary(q);var I=C.parentNode.previousSibling;m=I.getAttribute("title");
+null!=m&&0<m.length&&".scratchpad"!=d.title&&I.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+m);var G=document.createElement("div");G.style.position="absolute";G.style.right="0px";G.style.top="0px";G.style.padding="8px";G.style.backgroundColor="inherit";I.style.position="relative";var Z=document.createElement("img");Z.setAttribute("src",Editor.crossImage);Z.setAttribute("title",mxResources.get("close"));Z.setAttribute("valign","absmiddle");Z.setAttribute("border","0");Z.style.position="relative";
+Z.style.top="2px";Z.style.width="14px";Z.style.cursor="pointer";Z.style.margin="0 3px";Editor.isDarkMode()&&(Z.style.filter="invert(100%)");var ca=null;if(".scratchpad"!=d.title||this.closableScratchpad)G.appendChild(Z),mxEvent.addListener(Z,"click",mxUtils.bind(this,function(U){if(!mxEvent.isConsumed(U)){var ma=mxUtils.bind(this,function(){this.closeLibrary(d)});null!=ca?this.confirm(mxResources.get("allChangesLost"),null,ma,mxResources.get("cancel"),mxResources.get("discardChanges")):ma();mxEvent.consume(U)}}));
+if(d.isEditable()){var aa=this.editor.graph,Y=null,pa=mxUtils.bind(this,function(U){this.showLibraryDialog(d.getTitle(),C,f,d,d.getMode());mxEvent.consume(U)}),Q=mxUtils.bind(this,function(U){d.setModified(!0);d.isAutosave()?(null!=Y&&null!=Y.parentNode&&Y.parentNode.removeChild(Y),Y=Z.cloneNode(!1),Y.setAttribute("src",Editor.spinImage),Y.setAttribute("title",mxResources.get("saving")),Y.style.cursor="default",Y.style.marginRight="2px",Y.style.marginTop="-2px",G.insertBefore(Y,G.firstChild),I.style.paddingRight=
+18*G.childNodes.length+"px",this.saveLibrary(d.getTitle(),f,d,d.getMode(),!0,!0,function(){null!=Y&&null!=Y.parentNode&&(Y.parentNode.removeChild(Y),I.style.paddingRight=18*G.childNodes.length+"px")})):null==ca&&(ca=Z.cloneNode(!1),ca.setAttribute("src",Editor.saveImage),ca.setAttribute("title",mxResources.get("save")),G.insertBefore(ca,G.firstChild),mxEvent.addListener(ca,"click",mxUtils.bind(this,function(ma){this.saveLibrary(d.getTitle(),f,d,d.getMode(),d.constructor==LocalLibrary,!0,function(){null==
+ca||d.isModified()||(I.style.paddingRight=18*G.childNodes.length+"px",ca.parentNode.removeChild(ca),ca=null)});mxEvent.consume(ma)})),I.style.paddingRight=18*G.childNodes.length+"px")}),X=mxUtils.bind(this,function(U,ma,T,M){U=aa.cloneCells(mxUtils.sortCells(aa.model.getTopmostCells(U)));for(var ia=0;ia<U.length;ia++){var N=aa.getCellGeometry(U[ia]);null!=N&&N.translate(-ma.x,-ma.y)}C.appendChild(this.sidebar.createVertexTemplateFromCells(U,ma.width,ma.height,M||"",!0,null,!1));U={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(U))),
+w:ma.width,h:ma.height};null!=M&&(U.title=M);f.push(U);Q(T);null!=y&&null!=y.parentNode&&0<f.length&&(y.parentNode.removeChild(y),y=null)}),ha=mxUtils.bind(this,function(U){if(aa.isSelectionEmpty())aa.getRubberband().isActive()?(aa.getRubberband().execute(U),aa.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var ma=aa.getSelectionCells(),T=aa.view.getBounds(ma),M=aa.view.scale;T.x/=M;T.y/=M;T.width/=M;T.height/=M;T.x-=
+aa.view.translate.x;T.y-=aa.view.translate.y;X(ma,T)}mxEvent.consume(U)});mxEvent.addGestureListeners(C,function(){},mxUtils.bind(this,function(U){aa.isMouseDown&&null!=aa.panningManager&&null!=aa.graphHandler.first&&(aa.graphHandler.suspend(),null!=aa.graphHandler.hint&&(aa.graphHandler.hint.style.visibility="hidden"),C.style.backgroundColor="#f1f3f4",C.style.cursor="copy",aa.panningManager.stop(),aa.autoScroll=!1,mxEvent.consume(U))}),mxUtils.bind(this,function(U){aa.isMouseDown&&null!=aa.panningManager&&
+null!=aa.graphHandler&&(C.style.backgroundColor="",C.style.cursor="default",this.sidebar.showTooltips=!0,aa.panningManager.stop(),aa.graphHandler.reset(),aa.isMouseDown=!1,aa.autoScroll=!0,ha(U),mxEvent.consume(U))}));mxEvent.addListener(C,"mouseleave",mxUtils.bind(this,function(U){aa.isMouseDown&&null!=aa.graphHandler.first&&(aa.graphHandler.resume(),null!=aa.graphHandler.hint&&(aa.graphHandler.hint.style.visibility="visible"),C.style.backgroundColor="",C.style.cursor="",aa.autoScroll=!0)}));Graph.fileSupport&&
+(mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(U){C.style.backgroundColor="#f1f3f4";U.dataTransfer.dropEffect="copy";C.style.cursor="copy";this.sidebar.hideTooltip();U.stopPropagation();U.preventDefault()})),mxEvent.addListener(C,"drop",mxUtils.bind(this,function(U){C.style.cursor="";C.style.backgroundColor="";0<U.dataTransfer.files.length&&this.importFiles(U.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(ma,T,M,ia,N,O,ba,la,u){if(null!=ma&&"image/"==T.substring(0,
+6))ma="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(ma),ma=[new mxCell("",new mxGeometry(0,0,N,O),ma)],ma[0].vertex=!0,X(ma,new mxRectangle(0,0,N,O),U,mxEvent.isAltDown(U)?null:ba.substring(0,ba.lastIndexOf(".")).replace(/_/g," ")),null!=y&&null!=y.parentNode&&0<f.length&&(y.parentNode.removeChild(y),y=null);else{var H=!1,P=mxUtils.bind(this,function(W,R){null!=W&&"application/pdf"==R&&(R=Editor.extractGraphModelFromPdf(W),null!=
+R&&0<R.length&&(W=R));if(null!=W)if(W=mxUtils.parseXml(W),"mxlibrary"==W.documentElement.nodeName)try{var da=JSON.parse(mxUtils.getTextContent(W.documentElement));F(da,C);f=f.concat(da);Q(U);this.spinner.stop();H=!0}catch(va){}else if("mxfile"==W.documentElement.nodeName)try{var fa=W.documentElement.getElementsByTagName("diagram");for(da=0;da<fa.length;da++){var ea=this.stringToCells(Editor.getDiagramNodeXml(fa[da])),qa=this.editor.graph.getBoundingBoxFromGeometry(ea);X(ea,new mxRectangle(0,0,qa.width,
+qa.height),U)}H=!0}catch(va){null!=window.console&&console.log("error in drop handler:",va)}H||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=y&&null!=y.parentNode&&0<f.length&&(y.parentNode.removeChild(y),y=null)});null!=u&&null!=ba&&(/(\.v(dx|sdx?))($|\?)/i.test(ba)||/(\.vs(x|sx?))($|\?)/i.test(ba))?this.importVisio(u,function(W){P(W,"text/xml")},null,ba):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(ma,ba)&&null!=u?this.isExternalDataComms()?
+this.parseFile(u,mxUtils.bind(this,function(W){4==W.readyState&&(this.spinner.stop(),200<=W.status&&299>=W.status?P(W.responseText,"text/xml"):this.handleError({message:mxResources.get(413==W.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):P(ma,T)}}));U.stopPropagation();U.preventDefault()})),mxEvent.addListener(C,"dragleave",function(U){C.style.cursor="";C.style.backgroundColor=
+"";U.stopPropagation();U.preventDefault()}));Z=Z.cloneNode(!1);Z.setAttribute("src",Editor.editImage);Z.setAttribute("title",mxResources.get("edit"));G.insertBefore(Z,G.firstChild);mxEvent.addListener(Z,"click",pa);mxEvent.addListener(C,"dblclick",function(U){mxEvent.getSource(U)==C&&pa(U)});m=Z.cloneNode(!1);m.setAttribute("src",Editor.plusImage);m.setAttribute("title",mxResources.get("add"));G.insertBefore(m,G.firstChild);mxEvent.addListener(m,"click",ha);this.isOffline()||".scratchpad"!=d.title||
+null==EditorUi.scratchpadHelpLink||(m=document.createElement("span"),m.setAttribute("title",mxResources.get("help")),m.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(m,"?"),mxEvent.addGestureListeners(m,mxUtils.bind(this,function(U){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(U)})),G.insertBefore(m,G.firstChild))}I.appendChild(G);I.style.paddingRight=18*G.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(d,f){for(var g=
0;g<d.length;g++){var m=d[g],q=m.data;if(null!=q){q=this.convertDataUri(q);var y="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==m.aspect&&(y+="aspect=fixed;");f.appendChild(this.sidebar.createVertexTemplate(y+"image="+q,m.w,m.h,"",m.title||"",!1,null,!0))}else null!=m.xml&&(q=this.stringToCells(Graph.decompress(m.xml)),0<q.length&&f.appendChild(this.sidebar.createVertexTemplateFromCells(q,m.w,m.h,m.title||"",!0,null,!0)))}};EditorUi.prototype.getResource=function(d){return null!=
d?d[mxLanguage]||d.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.shapeBackgroundColor=Editor.darkColor,Graph.prototype.shapeForegroundColor=Editor.lightColor,Graph.prototype.defaultPageBackgroundColor=Editor.darkColor,Graph.prototype.defaultPageBorderColor="#505759",BaseFormatPanel.prototype.buttonBackgroundColor=
@@ -3462,27 +3465,27 @@ new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImage
400,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(d,f,g,m,q){d=new LibraryDialog(this,d,f,g,m,q);this.showDialog(d.container,640,440,!0,!1,mxUtils.bind(this,function(y){y&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));d.init()};var k=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(d){var f=k.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(g){this.editor.graph.isSelectionEmpty()&&
f.refresh()}));return f};EditorUi.prototype.createSidebarFooterContainer=function(){var d=this.createDiv("geSidebarContainer geSidebarFooter");d.style.position="absolute";d.style.overflow="hidden";var f=document.createElement("a");f.className="geTitle";f.style.color="#DF6C0C";f.style.fontWeight="bold";f.style.height="100%";f.style.paddingTop="9px";f.innerHTML="<span>+</span>";var g=f.getElementsByTagName("span")[0];g.style.fontSize="18px";g.style.marginRight="5px";mxUtils.write(f,mxResources.get("moreShapes")+
"...");mxEvent.addListener(f,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(m){m.preventDefault()}));mxEvent.addListener(f,"click",mxUtils.bind(this,function(m){this.actions.get("shapes").funct();mxEvent.consume(m)}));d.appendChild(f);return d};EditorUi.prototype.handleError=function(d,f,g,m,q,y,F){var C=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},I=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!=
-d.message)try{F?null!=window.console&&console.error("EditorUi.handleError:",d):EditorUi.logError("Caught: "+(""==d.message&&null!=d.name)?d.name:d.message,d.filename,d.lineNumber,d.columnNumber,d,"INFO")}catch(X){}if(null!=I||null!=f){F=mxUtils.htmlEntities(mxResources.get("unknownError"));var G=mxResources.get("ok"),Y=null;f=null!=f?f:mxResources.get("error");if(null!=I){null!=I.retry&&(G=mxResources.get("cancel"),Y=function(){C();I.retry()});if(404==I.code||404==I.status||403==I.code){F=403==I.code?
-null!=I.message?mxUtils.htmlEntities(I.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=q?q:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var ba=null!=q?null:null!=y?y:window.location.hash;if(null!=ba&&("#G"==ba.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==ba.substring(0,45))&&(null!=d&&null!=d.error&&(null!=d.error.errors&&0<d.error.errors.length&&
-"fileAccess"==d.error.errors[0].reason||null!=d.error.data&&0<d.error.data.length&&"fileAccess"==d.error.data[0].reason)||404==I.code||404==I.status)){ba="#U"==ba.substring(0,2)?ba.substring(45,ba.lastIndexOf("%26ex")):ba.substring(2);this.showError(f,F,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+ba);this.handleError(d,f,g,m,q)}),Y,mxResources.get("changeUser"),mxUtils.bind(this,function(){function X(){ha.innerText=
-"";for(var la=0;la<qa.length;la++){var ja=document.createElement("option");mxUtils.write(ja,qa[la].displayName);ja.value=la;ha.appendChild(ja);ja=document.createElement("option");ja.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(ja,"<"+qa[la].email+">");ja.setAttribute("disabled","disabled");ha.appendChild(ja)}ja=document.createElement("option");mxUtils.write(ja,mxResources.get("addAccount"));ja.value=qa.length;ha.appendChild(ja)}var qa=this.drive.getUsersList(),Q=document.createElement("div"),W=document.createElement("span");
-W.style.marginTop="6px";mxUtils.write(W,mxResources.get("changeUser")+": ");Q.appendChild(W);var ha=document.createElement("select");ha.style.width="200px";X();mxEvent.addListener(ha,"change",mxUtils.bind(this,function(){var la=ha.value,ja=qa.length!=la;ja&&this.drive.setUser(qa[la]);this.drive.authorize(ja,mxUtils.bind(this,function(){ja||(qa=this.drive.getUsersList(),X())}),mxUtils.bind(this,function(U){this.handleError(U)}),!0)}));Q.appendChild(ha);Q=new CustomDialog(this,Q,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),
+d.message)try{F?null!=window.console&&console.error("EditorUi.handleError:",d):EditorUi.logError("Caught: "+(""==d.message&&null!=d.name)?d.name:d.message,d.filename,d.lineNumber,d.columnNumber,d,"INFO")}catch(Y){}if(null!=I||null!=f){F=mxUtils.htmlEntities(mxResources.get("unknownError"));var G=mxResources.get("ok"),Z=null;f=null!=f?f:mxResources.get("error");if(null!=I){null!=I.retry&&(G=mxResources.get("cancel"),Z=function(){C();I.retry()});if(404==I.code||404==I.status||403==I.code){F=403==I.code?
+null!=I.message?mxUtils.htmlEntities(I.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=q?q:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var ca=null!=q?null:null!=y?y:window.location.hash;if(null!=ca&&("#G"==ca.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==ca.substring(0,45))&&(null!=d&&null!=d.error&&(null!=d.error.errors&&0<d.error.errors.length&&
+"fileAccess"==d.error.errors[0].reason||null!=d.error.data&&0<d.error.data.length&&"fileAccess"==d.error.data[0].reason)||404==I.code||404==I.status)){ca="#U"==ca.substring(0,2)?ca.substring(45,ca.lastIndexOf("%26ex")):ca.substring(2);this.showError(f,F,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+ca);this.handleError(d,f,g,m,q)}),Z,mxResources.get("changeUser"),mxUtils.bind(this,function(){function Y(){ha.innerText=
+"";for(var U=0;U<pa.length;U++){var ma=document.createElement("option");mxUtils.write(ma,pa[U].displayName);ma.value=U;ha.appendChild(ma);ma=document.createElement("option");ma.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(ma,"<"+pa[U].email+">");ma.setAttribute("disabled","disabled");ha.appendChild(ma)}ma=document.createElement("option");mxUtils.write(ma,mxResources.get("addAccount"));ma.value=pa.length;ha.appendChild(ma)}var pa=this.drive.getUsersList(),Q=document.createElement("div"),X=document.createElement("span");
+X.style.marginTop="6px";mxUtils.write(X,mxResources.get("changeUser")+": ");Q.appendChild(X);var ha=document.createElement("select");ha.style.width="200px";Y();mxEvent.addListener(ha,"change",mxUtils.bind(this,function(){var U=ha.value,ma=pa.length!=U;ma&&this.drive.setUser(pa[U]);this.drive.authorize(ma,mxUtils.bind(this,function(){ma||(pa=this.drive.getUsersList(),Y())}),mxUtils.bind(this,function(T){this.handleError(T)}),!0)}));Q.appendChild(ha);Q=new CustomDialog(this,Q,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),
!0)}));this.showDialog(Q.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=g&&g()}),480,150);return}}null!=I.message?F=""==I.message&&null!=I.name?mxUtils.htmlEntities(I.name):mxUtils.htmlEntities(I.message):null!=I.response&&null!=I.response.error?F=mxUtils.htmlEntities(I.response.error):"undefined"!==typeof window.App&&(I.code==App.ERROR_TIMEOUT?F=mxUtils.htmlEntities(mxResources.get("timeout")):I.code==App.ERROR_BUSY?F=mxUtils.htmlEntities(mxResources.get("busy")):
-"string"===typeof I&&0<I.length&&(F=mxUtils.htmlEntities(I)))}var Z=y=null;null!=I&&null!=I.helpLink?(y=mxResources.get("help"),Z=mxUtils.bind(this,function(){return this.editor.graph.openLink(I.helpLink)})):null!=I&&null!=I.ownerEmail&&(y=mxResources.get("contactOwner"),F+=mxUtils.htmlEntities(" ("+y+": "+I.ownerEmail+")"),Z=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(I.ownerEmail))}));this.showError(f,F,G,g,Y,null,null,y,Z,null,null,null,m?g:null)}else null!=
+"string"===typeof I&&0<I.length&&(F=mxUtils.htmlEntities(I)))}var aa=y=null;null!=I&&null!=I.helpLink?(y=mxResources.get("help"),aa=mxUtils.bind(this,function(){return this.editor.graph.openLink(I.helpLink)})):null!=I&&null!=I.ownerEmail&&(y=mxResources.get("contactOwner"),F+=mxUtils.htmlEntities(" ("+y+": "+I.ownerEmail+")"),aa=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(I.ownerEmail))}));this.showError(f,F,G,g,Z,null,null,y,aa,null,null,null,m?g:null)}else null!=
g&&g()};EditorUi.prototype.alert=function(d,f,g){d=new ErrorDialog(this,null,d,mxResources.get("ok"),f);this.showDialog(d.container,g||340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(d,f,g,m,q,y){var F=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},C=Math.min(200,28*Math.ceil(d.length/50));d=new ConfirmDialog(this,d,function(){F();null!=f&&f()},function(){F();null!=g&&g()},m,q,null,null,null,null,C);this.showDialog(d.container,340,46+C,!0,y);d.init()};
EditorUi.prototype.showBanner=function(d,f,g,m){var q=!1;if(!(this.bannerShowing||this["hideBanner"+d]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+d])){var y=document.createElement("div");y.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(y.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(y.style,
"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(y.style,"transition","all 1s ease");y.className="geBtn gePrimaryBtn";q=document.createElement("img");q.setAttribute("src",IMAGE_PATH+"/logo.png");q.setAttribute("border","0");q.setAttribute("align","absmiddle");q.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";y.appendChild(q);q=document.createElement("img");q.setAttribute("src",Dialog.prototype.closeImage);q.setAttribute("title",mxResources.get(m?
"doNotShowAgain":"close"));q.setAttribute("border","0");q.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";y.appendChild(q);mxUtils.write(y,f);document.body.appendChild(y);this.bannerShowing=!0;f=document.createElement("div");f.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var F=document.createElement("input");F.setAttribute("type","checkbox");F.setAttribute("id","geDoNotShowAgainCheckbox");F.style.marginRight="6px";
if(!m){f.appendChild(F);var C=document.createElement("label");C.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(C,mxResources.get("doNotShowAgain"));f.appendChild(C);y.style.paddingBottom="30px";y.appendChild(f)}var I=mxUtils.bind(this,function(){null!=y.parentNode&&(y.parentNode.removeChild(y),this.bannerShowing=!1,F.checked||m)&&(this["hideBanner"+d]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+d]=Date.now(),mxSettings.save()))});mxEvent.addListener(q,
-"click",mxUtils.bind(this,function(Y){mxEvent.consume(Y);I()}));var G=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(y.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){I()}),1E3)});mxEvent.addListener(y,"click",mxUtils.bind(this,function(Y){var ba=mxEvent.getSource(Y);ba!=F&&ba!=C?(null!=g&&g(),I(),mxEvent.consume(Y)):G()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(y.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(G,
+"click",mxUtils.bind(this,function(Z){mxEvent.consume(Z);I()}));var G=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(y.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){I()}),1E3)});mxEvent.addListener(y,"click",mxUtils.bind(this,function(Z){var ca=mxEvent.getSource(Z);ca!=F&&ca!=C?(null!=g&&g(),I(),mxEvent.consume(Z)):G()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(y.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(G,
3E4);q=!0}return q};EditorUi.prototype.setCurrentFile=function(d){null!=d&&(d.opened=new Date);this.currentFile=d};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(d,f,g,m){d=d.toDataURL("image/"+g);if(null!=d&&6<d.length)null!=f&&(d=Editor.writeGraphModelToPng(d,"tEXt","mxfile",encodeURIComponent(f))),0<m&&(d=Editor.writeGraphModelToPng(d,"pHYs",
"dpi",m));else throw{message:mxResources.get("unknownError")};return d};EditorUi.prototype.saveCanvas=function(d,f,g,m,q){var y="jpeg"==g?"jpg":g;m=this.getBaseFilename(m)+(null!=f?".drawio":"")+"."+y;d=this.createImageDataUri(d,f,g,q);this.saveData(m,y,d.substring(d.lastIndexOf(",")+1),"image/"+g,!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(d,f){d=new TextareaDialog(this,d,f,null,null,mxResources.get("close"));this.showDialog(d.container,620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(d,f,g,m,q,y){"text/xml"!=g||/(\.drawio)$/i.test(f)||/(\.xml)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.html)$/i.test(f)||(f=f+"."+(null!=y?y:"drawio"));if(window.Blob&&
navigator.msSaveOrOpenBlob)d=m?this.base64ToBlob(d,g):new Blob([d],{type:g}),navigator.msSaveOrOpenBlob(d,f);else if(mxClient.IS_IE)g=window.open("about:blank","_blank"),null==g?mxUtils.popup(d,!0):(g.document.write(d),g.document.close(),g.document.execCommand("SaveAs",!0,f),g.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==g||"image/"!=g.substring(0,6)?this.showTextDialog(f+":",d):this.openInNewWindow(d,g,m);else{var F=document.createElement("a");y=(null==navigator.userAgent||
0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof F.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var C=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);y=65==(C?parseInt(C[2],10):!1)?!1:y}if(y||this.isOffline()){F.href=URL.createObjectURL(m?this.base64ToBlob(d,g):new Blob([d],{type:g}));y?F.download=f:F.setAttribute("target","_blank");document.body.appendChild(F);try{window.setTimeout(function(){URL.revokeObjectURL(F.href)},2E4),F.click(),F.parentNode.removeChild(F)}catch(I){}}else this.createEchoRequest(d,
f,g,m,q).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(d,f,g,m,q,y){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,d+(null!=g?"&mime="+g:"")+(null!=q?"&format="+q:"")+(null!=y?"&base64="+y:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(m?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(d,f){f=f||"";d=atob(d);for(var g=d.length,m=Math.ceil(g/1024),q=Array(m),y=0;y<m;++y){for(var F=1024*y,C=Math.min(F+1024,g),I=Array(C-F),G=0;F<C;++G,++F)I[G]=
-d[F].charCodeAt(0);q[y]=new Uint8Array(I)}return new Blob(q,{type:f})};EditorUi.prototype.saveLocalFile=function(d,f,g,m,q,y,F,C){y=null!=y?y:!1;F=null!=F?F:"vsdx"!=q&&(!mxClient.IS_IOS||!navigator.standalone);q=this.getServiceCount(y);isLocalStorage&&q++;var I=4>=q?2:6<q?4:3;f=new CreateDialog(this,f,mxUtils.bind(this,function(G,Y){try{if("_blank"==Y)if(null!=g&&"image/"==g.substring(0,6))this.openInNewWindow(d,g,m);else if(null!=g&&"text/html"==g.substring(0,9)){var ba=new EmbedDialog(this,d);this.showDialog(ba.container,
-450,240,!0,!0);ba.init()}else{var Z=window.open("about:blank");null==Z?mxUtils.popup(d,!0):(Z.document.write("<pre>"+mxUtils.htmlEntities(d,!1)+"</pre>"),Z.document.close())}else Y==App.MODE_DEVICE||"download"==Y?this.doSaveLocalFile(d,G,g,m,null,C):null!=G&&0<G.length&&this.pickFolder(Y,mxUtils.bind(this,function(X){try{this.exportFile(d,G,g,m,Y,X)}catch(qa){this.handleError(qa)}}))}catch(X){this.handleError(X)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),
+d[F].charCodeAt(0);q[y]=new Uint8Array(I)}return new Blob(q,{type:f})};EditorUi.prototype.saveLocalFile=function(d,f,g,m,q,y,F,C){y=null!=y?y:!1;F=null!=F?F:"vsdx"!=q&&(!mxClient.IS_IOS||!navigator.standalone);q=this.getServiceCount(y);isLocalStorage&&q++;var I=4>=q?2:6<q?4:3;f=new CreateDialog(this,f,mxUtils.bind(this,function(G,Z){try{if("_blank"==Z)if(null!=g&&"image/"==g.substring(0,6))this.openInNewWindow(d,g,m);else if(null!=g&&"text/html"==g.substring(0,9)){var ca=new EmbedDialog(this,d);this.showDialog(ca.container,
+450,240,!0,!0);ca.init()}else{var aa=window.open("about:blank");null==aa?mxUtils.popup(d,!0):(aa.document.write("<pre>"+mxUtils.htmlEntities(d,!1)+"</pre>"),aa.document.close())}else Z==App.MODE_DEVICE||"download"==Z?this.doSaveLocalFile(d,G,g,m,null,C):null!=G&&0<G.length&&this.pickFolder(Z,mxUtils.bind(this,function(Y){try{this.exportFile(d,G,g,m,Z,Y)}catch(pa){this.handleError(pa)}}))}catch(Y){this.handleError(Y)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),
!1,y,F,null,1<q,I,d,g,m);y=this.isServices(q)?q>I?390:280:160;this.showDialog(f.container,420,y,!0,!0);f.init()};EditorUi.prototype.openInNewWindow=function(d,f,g){var m=window.open("about:blank");null==m||null==m.document?mxUtils.popup(d,!0):("image/svg+xml"!=f||mxClient.IS_SVG?"image/svg+xml"!=f||this.editor.graph.mathEnabled?(d=g?d:btoa(unescape(encodeURIComponent(d))),m.document.write('<html><img style="max-width:100%;" src="data:'+f+";base64,"+d+'"/></html>')):m.document.write("<html>"+d+"</html>"):
m.document.write("<html><pre>"+mxUtils.htmlEntities(d,!1)+"</pre></html>"),m.document.close())};var n=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(d){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var f=d(mxUtils.bind(this,function(m){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=
@@ -3496,13 +3499,13 @@ this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.styl
this.exportDialog.style.zIndex=y.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(C){F.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var I=this.createImageDataUri(C,null,"png");C=document.createElement("img");C.style.maxWidth="140px";C.style.maxHeight=
"140px";C.style.cursor="pointer";C.style.backgroundColor="white";C.setAttribute("title",mxResources.get("openInNewWindow"));C.setAttribute("border","0");C.setAttribute("src",I);this.exportDialog.appendChild(C);mxEvent.addListener(C,"click",mxUtils.bind(this,function(){this.openInNewWindow(I.substring(I.indexOf(",")+1),"image/png",!0);q.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}),null,null,null,null,null,null,null,
Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",q);document.body.appendChild(this.exportDialog)}mxEvent.consume(m)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(d,f,g,m,q){this.isLocalFileSave()?this.saveLocalFile(g,d,m,q,f):this.saveRequest(d,f,mxUtils.bind(this,function(y,F){return this.createEchoRequest(g,y,m,q,f,F)}),g,q,m)};EditorUi.prototype.saveRequest=function(d,f,g,m,q,y,F){F=null!=F?F:!mxClient.IS_IOS||!navigator.standalone;
-var C=this.getServiceCount(!1);isLocalStorage&&C++;var I=4>=C?2:6<C?4:3;d=new CreateDialog(this,d,mxUtils.bind(this,function(G,Y){if("_blank"==Y||null!=G&&0<G.length){var ba=g("_blank"==Y?null:G,Y==App.MODE_DEVICE||"download"==Y||null==Y||"_blank"==Y?"0":"1");null!=ba&&(Y==App.MODE_DEVICE||"download"==Y||"_blank"==Y?ba.simulate(document,"_blank"):this.pickFolder(Y,mxUtils.bind(this,function(Z){y=null!=y?y:"pdf"==f?"application/pdf":"image/"+f;if(null!=m)try{this.exportFile(m,G,y,!0,Y,Z)}catch(X){this.handleError(X)}else this.spinner.spin(document.body,
-mxResources.get("saving"))&&ba.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=ba.getStatus()&&299>=ba.getStatus())try{this.exportFile(ba.getText(),G,y,!0,Y,Z)}catch(X){this.handleError(X)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(X){this.spinner.stop();this.handleError(X)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,F,null,1<C,I,m,y,q);C=this.isServices(C)?4<C?390:280:160;this.showDialog(d.container,
-420,C,!0,!0);d.init()};EditorUi.prototype.isServices=function(d){return 1!=d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,f,g,m,q,y){};EditorUi.prototype.pickFolder=function(d,f,g){f(null)};EditorUi.prototype.exportSvg=function(d,f,g,m,q,y,F,C,I,G,Y,ba,Z,X){if(this.spinner.spin(document.body,mxResources.get("export")))try{var qa=this.editor.graph.isSelectionEmpty();g=null!=g?g:qa;var Q=f?null:this.editor.graph.background;Q==mxConstants.NONE&&
-(Q=null);null==Q&&0==f&&(Q=Y?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var W=this.editor.graph.getSvg(Q,d,F,C,null,g,null,null,"blank"==G?"_blank":"self"==G?"_top":null,null,!Z,Y,ba);m&&this.editor.graph.addSvgShadow(W);var ha=this.getBaseFilename()+(q?".drawio":"")+".svg";X=null!=X?X:mxUtils.bind(this,function(U){this.isLocalFileSave()||U.length<=MAX_REQUEST_SIZE?this.saveData(ha,"svg",U,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),
-mxUtils.bind(this,function(){mxUtils.popup(U)}))});var la=mxUtils.bind(this,function(U){this.spinner.stop();q&&U.setAttribute("content",this.getFileData(!0,null,null,null,g,I,null,null,null,!1));X(Graph.xmlDeclaration+"\n"+(q?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(U))});this.editor.graph.mathEnabled&&this.editor.addMathCss(W);var ja=mxUtils.bind(this,function(U){y?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(U,la,this.thumbImageCache)):
-la(U)});Z?this.embedFonts(W,ja):(this.editor.addFontCss(W),ja(W))}catch(U){this.handleError(U)}};EditorUi.prototype.addRadiobox=function(d,f,g,m,q,y,F){return this.addCheckbox(d,g,m,q,y,F,!0,f)};EditorUi.prototype.addCheckbox=function(d,f,g,m,q,y,F,C){y=null!=y?y:!0;var I=document.createElement("input");I.style.marginRight="8px";I.style.marginTop="16px";I.setAttribute("type",F?"radio":"checkbox");F="geCheckbox-"+Editor.guid();I.id=F;null!=C&&I.setAttribute("name",C);g&&(I.setAttribute("checked","checked"),
-I.defaultChecked=!0);m&&I.setAttribute("disabled","disabled");y&&(d.appendChild(I),g=document.createElement("label"),mxUtils.write(g,f),g.setAttribute("for",F),d.appendChild(g),q||mxUtils.br(d));return I};EditorUi.prototype.addEditButton=function(d,f){var g=this.addCheckbox(d,mxResources.get("edit")+":",!0,null,!0);g.style.marginLeft="24px";var m=this.getCurrentFile(),q="";null!=m&&m.getMode()!=App.MODE_DEVICE&&m.getMode()!=App.MODE_BROWSER&&(q=window.location.href);var y=document.createElement("select");
+var C=this.getServiceCount(!1);isLocalStorage&&C++;var I=4>=C?2:6<C?4:3;d=new CreateDialog(this,d,mxUtils.bind(this,function(G,Z){if("_blank"==Z||null!=G&&0<G.length){var ca=g("_blank"==Z?null:G,Z==App.MODE_DEVICE||"download"==Z||null==Z||"_blank"==Z?"0":"1");null!=ca&&(Z==App.MODE_DEVICE||"download"==Z||"_blank"==Z?ca.simulate(document,"_blank"):this.pickFolder(Z,mxUtils.bind(this,function(aa){y=null!=y?y:"pdf"==f?"application/pdf":"image/"+f;if(null!=m)try{this.exportFile(m,G,y,!0,Z,aa)}catch(Y){this.handleError(Y)}else this.spinner.spin(document.body,
+mxResources.get("saving"))&&ca.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=ca.getStatus()&&299>=ca.getStatus())try{this.exportFile(ca.getText(),G,y,!0,Z,aa)}catch(Y){this.handleError(Y)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(Y){this.spinner.stop();this.handleError(Y)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,F,null,1<C,I,m,y,q);C=this.isServices(C)?4<C?390:280:160;
+this.showDialog(d.container,420,C,!0,!0);d.init()};EditorUi.prototype.isServices=function(d){return 1!=d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,f,g,m,q,y){};EditorUi.prototype.pickFolder=function(d,f,g){f(null)};EditorUi.prototype.exportSvg=function(d,f,g,m,q,y,F,C,I,G,Z,ca,aa,Y){if(this.spinner.spin(document.body,mxResources.get("export")))try{var pa=this.editor.graph.isSelectionEmpty();g=null!=g?g:pa;var Q=f?null:this.editor.graph.background;
+Q==mxConstants.NONE&&(Q=null);null==Q&&0==f&&(Q=Z?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var X=this.editor.graph.getSvg(Q,d,F,C,null,g,null,null,"blank"==G?"_blank":"self"==G?"_top":null,null,!aa,Z,ca);m&&this.editor.graph.addSvgShadow(X);var ha=this.getBaseFilename()+(q?".drawio":"")+".svg";Y=null!=Y?Y:mxUtils.bind(this,function(T){this.isLocalFileSave()||T.length<=MAX_REQUEST_SIZE?this.saveData(ha,"svg",T,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},
+mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(T)}))});var U=mxUtils.bind(this,function(T){this.spinner.stop();q&&T.setAttribute("content",this.getFileData(!0,null,null,null,g,I,null,null,null,!1));Y(Graph.xmlDeclaration+"\n"+(q?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(T))});this.editor.graph.mathEnabled&&this.editor.addMathCss(X);var ma=mxUtils.bind(this,function(T){y?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(T,
+U,this.thumbImageCache)):U(T)});aa?this.embedFonts(X,ma):(this.editor.addFontCss(X),ma(X))}catch(T){this.handleError(T)}};EditorUi.prototype.addRadiobox=function(d,f,g,m,q,y,F){return this.addCheckbox(d,g,m,q,y,F,!0,f)};EditorUi.prototype.addCheckbox=function(d,f,g,m,q,y,F,C){y=null!=y?y:!0;var I=document.createElement("input");I.style.marginRight="8px";I.style.marginTop="16px";I.setAttribute("type",F?"radio":"checkbox");F="geCheckbox-"+Editor.guid();I.id=F;null!=C&&I.setAttribute("name",C);g&&(I.setAttribute("checked",
+"checked"),I.defaultChecked=!0);m&&I.setAttribute("disabled","disabled");y&&(d.appendChild(I),g=document.createElement("label"),mxUtils.write(g,f),g.setAttribute("for",F),d.appendChild(g),q||mxUtils.br(d));return I};EditorUi.prototype.addEditButton=function(d,f){var g=this.addCheckbox(d,mxResources.get("edit")+":",!0,null,!0);g.style.marginLeft="24px";var m=this.getCurrentFile(),q="";null!=m&&m.getMode()!=App.MODE_DEVICE&&m.getMode()!=App.MODE_BROWSER&&(q=window.location.href);var y=document.createElement("select");
y.style.maxWidth="200px";y.style.width="auto";y.style.marginLeft="8px";y.style.marginRight="10px";y.className="geBtn";m=document.createElement("option");m.setAttribute("value","blank");mxUtils.write(m,mxResources.get("makeCopy"));y.appendChild(m);m=document.createElement("option");m.setAttribute("value","custom");mxUtils.write(m,mxResources.get("custom")+"...");y.appendChild(m);d.appendChild(y);mxEvent.addListener(y,"change",mxUtils.bind(this,function(){if("custom"==y.value){var F=new FilenameDialog(this,
q,mxResources.get("ok"),function(C){null!=C?q=C:y.value="blank"},mxResources.get("url"),null,null,null,null,function(){y.value="blank"});this.showDialog(F.container,300,80,!0,!1);F.init()}}));mxEvent.addListener(g,"change",mxUtils.bind(this,function(){g.checked&&(null==f||f.checked)?y.removeAttribute("disabled"):y.setAttribute("disabled","disabled")}));mxUtils.br(d);return{getLink:function(){return g.checked?"blank"===y.value?"_blank":q:null},getEditInput:function(){return g},getEditSelect:function(){return y}}};
EditorUi.prototype.addLinkSection=function(d,f){function g(){var C=document.createElement("div");C.style.width="100%";C.style.height="100%";C.style.boxSizing="border-box";null!=y&&y!=mxConstants.NONE?(C.style.border="1px solid black",C.style.backgroundColor=y):(C.style.backgroundPosition="center center",C.style.backgroundRepeat="no-repeat",C.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");F.innerText="";F.appendChild(C)}mxUtils.write(d,mxResources.get("links")+":");var m=document.createElement("select");
@@ -3511,297 +3514,296 @@ m.appendChild(q);f&&(f=document.createElement("option"),f.setAttribute("value","
"22px";F.style.width="22px";F.style.position="relative";F.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";F.className="geColorBtn";d.appendChild(F);mxUtils.br(d);return{getColor:function(){return y},getTarget:function(){return m.value},focus:function(){m.focus()}}};EditorUi.prototype.createUrlParameters=function(d,f,g,m,q,y,F){F=null!=F?F:[];m&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||F.push("lightbox=1"),"auto"!=d&&F.push("target="+d),null!=
f&&f!=mxConstants.NONE&&F.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=q&&0<q.length&&F.push("edit="+encodeURIComponent(q)),y&&F.push("layers=1"),this.editor.graph.foldingEnabled&&F.push("nav=1"));g&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&F.push("page-id="+this.currentPage.getId());return F};EditorUi.prototype.createLink=function(d,f,g,m,q,y,F,C,I,G){I=this.createUrlParameters(d,f,g,m,q,y,I);d=this.getCurrentFile();f=!0;null!=F?g="#U"+encodeURIComponent(F):
(d=this.getCurrentFile(),C||null==d||d.constructor!=window.DriveFile?g="#R"+encodeURIComponent(g?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(g="#"+d.getHash(),f=!1));f&&null!=d&&null!=d.getTitle()&&d.getTitle()!=this.defaultFilename&&I.push("title="+encodeURIComponent(d.getTitle()));G&&1<g.length&&(I.push("open="+g.substring(1)),g="");return(m&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||
-!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<I.length?"?"+I.join("&"):"")+g};EditorUi.prototype.createHtml=function(d,f,g,m,q,y,F,C,I,G,Y,ba){this.getBasenames();var Z={};""!=q&&q!=mxConstants.NONE&&(Z.highlight=q);"auto"!==m&&(Z.target=m);G||(Z.lightbox=!1);Z.nav=this.editor.graph.foldingEnabled;g=parseInt(g);isNaN(g)||100==g||(Z.zoom=g/100);g=[];F&&(g.push("pages"),Z.resize=!0,null!=this.pages&&null!=this.currentPage&&(Z.page=mxUtils.indexOf(this.pages,
-this.currentPage)));f&&(g.push("zoom"),Z.resize=!0);C&&g.push("layers");I&&g.push("tags");0<g.length&&(G&&g.push("lightbox"),Z.toolbar=g.join(" "));null!=Y&&0<Y.length&&(Z.edit=Y);null!=d?Z.url=d:Z.xml=this.getFileData(!0,null,null,null,null,!F);f='<div class="mxgraph" style="'+(y?"max-width:100%;":"")+(""!=g?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(Z))+'"></div>';d=null!=d?"&fetch="+encodeURIComponent(d):"";ba(f,'<script type="text/javascript" src="'+
+!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<I.length?"?"+I.join("&"):"")+g};EditorUi.prototype.createHtml=function(d,f,g,m,q,y,F,C,I,G,Z,ca){this.getBasenames();var aa={};""!=q&&q!=mxConstants.NONE&&(aa.highlight=q);"auto"!==m&&(aa.target=m);G||(aa.lightbox=!1);aa.nav=this.editor.graph.foldingEnabled;g=parseInt(g);isNaN(g)||100==g||(aa.zoom=g/100);g=[];F&&(g.push("pages"),aa.resize=!0,null!=this.pages&&null!=this.currentPage&&(aa.page=
+mxUtils.indexOf(this.pages,this.currentPage)));f&&(g.push("zoom"),aa.resize=!0);C&&g.push("layers");I&&g.push("tags");0<g.length&&(G&&g.push("lightbox"),aa.toolbar=g.join(" "));null!=Z&&0<Z.length&&(aa.edit=Z);null!=d?aa.url=d:aa.xml=this.getFileData(!0,null,null,null,null,!F);f='<div class="mxgraph" style="'+(y?"max-width:100%;":"")+(""!=g?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(aa))+'"></div>';d=null!=d?"&fetch="+encodeURIComponent(d):"";ca(f,'<script type="text/javascript" src="'+
(0<d.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+d:"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(d,f,g,m){var q=document.createElement("div");q.style.whiteSpace="nowrap";var y=document.createElement("h3");mxUtils.write(y,mxResources.get("html"));y.style.cssText=
"width:100%;text-align:center;margin-top:0px;margin-bottom:12px";q.appendChild(y);var F=document.createElement("div");F.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var C=document.createElement("input");C.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";C.setAttribute("value","url");C.setAttribute("type","radio");C.setAttribute("name","type-embedhtmldialog");y=C.cloneNode(!0);y.setAttribute("value","copy");F.appendChild(y);var I=document.createElement("span");
mxUtils.write(I,mxResources.get("includeCopyOfMyDiagram"));F.appendChild(I);mxUtils.br(F);F.appendChild(C);I=document.createElement("span");mxUtils.write(I,mxResources.get("publicDiagramUrl"));F.appendChild(I);var G=this.getCurrentFile();null==g&&null!=G&&G.constructor==window.DriveFile&&(I=document.createElement("a"),I.style.paddingLeft="12px",I.style.color="gray",I.style.cursor="pointer",mxUtils.write(I,mxResources.get("share")),F.appendChild(I),mxEvent.addListener(I,"click",mxUtils.bind(this,function(){this.hideDialog();
-this.drive.showPermissions(G.getId())})));y.setAttribute("checked","checked");null==g&&C.setAttribute("disabled","disabled");q.appendChild(F);var Y=this.addLinkSection(q),ba=this.addCheckbox(q,mxResources.get("zoom"),!0,null,!0);mxUtils.write(q,":");var Z=document.createElement("input");Z.setAttribute("type","text");Z.style.marginRight="16px";Z.style.width="60px";Z.style.marginLeft="4px";Z.style.marginRight="12px";Z.value="100%";q.appendChild(Z);var X=this.addCheckbox(q,mxResources.get("fit"),!0);
-F=null!=this.pages&&1<this.pages.length;var qa=qa=this.addCheckbox(q,mxResources.get("allPages"),F,!F),Q=this.addCheckbox(q,mxResources.get("layers"),!0),W=this.addCheckbox(q,mxResources.get("tags"),!0),ha=this.addCheckbox(q,mxResources.get("lightbox"),!0),la=null;F=380;if(EditorUi.enableHtmlEditOption){la=this.addEditButton(q,ha);var ja=la.getEditInput();ja.style.marginBottom="16px";F+=50;mxEvent.addListener(ha,"change",function(){ha.checked?ja.removeAttribute("disabled"):ja.setAttribute("disabled",
-"disabled");ja.checked&&ha.checked?la.getEditSelect().removeAttribute("disabled"):la.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,q,mxUtils.bind(this,function(){m(C.checked?g:null,ba.checked,Z.value,Y.getTarget(),Y.getColor(),X.checked,qa.checked,Q.checked,W.checked,ha.checked,null!=la?la.getLink():null)}),null,d,f);this.showDialog(d.container,340,F,!0,!0);y.focus()};EditorUi.prototype.showPublishLinkDialog=function(d,f,g,m,q,y,F,C){var I=document.createElement("div");
-I.style.whiteSpace="nowrap";var G=document.createElement("h3");mxUtils.write(G,d||mxResources.get("link"));G.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";I.appendChild(G);var Y=this.getCurrentFile();d=0;if(null==Y||Y.constructor!=window.DriveFile||f)F=null!=F?F:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{d=80;F=null!=F?F:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";G=document.createElement("div");G.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";
-var ba=document.createElement("div");ba.style.whiteSpace="normal";mxUtils.write(ba,mxResources.get("linkAccountRequired"));G.appendChild(ba);ba=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(Y.getId())}));ba.style.marginTop="12px";ba.className="geBtn";G.appendChild(ba);I.appendChild(G);ba=document.createElement("a");ba.style.paddingLeft="12px";ba.style.color="gray";ba.style.fontSize="11px";ba.style.cursor="pointer";mxUtils.write(ba,mxResources.get("check"));
-G.appendChild(ba);mxEvent.addListener(ba,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(L){this.spinner.stop();L=new ErrorDialog(this,null,mxResources.get(null!=L?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(L.container,300,80,!0,!1);L.init()}))}))}var Z=null,X=null;if(null!=g||null!=m)d+=30,mxUtils.write(I,mxResources.get("width")+":"),Z=document.createElement("input"),
-Z.setAttribute("type","text"),Z.style.marginRight="16px",Z.style.width="50px",Z.style.marginLeft="6px",Z.style.marginRight="16px",Z.style.marginBottom="10px",Z.value="100%",I.appendChild(Z),mxUtils.write(I,mxResources.get("height")+":"),X=document.createElement("input"),X.setAttribute("type","text"),X.style.width="50px",X.style.marginLeft="6px",X.style.marginBottom="10px",X.value=m+"px",I.appendChild(X),mxUtils.br(I);var qa=this.addLinkSection(I,y);g=null!=this.pages&&1<this.pages.length;var Q=null;
-if(null==Y||Y.constructor!=window.DriveFile||f)Q=this.addCheckbox(I,mxResources.get("allPages"),g,!g);var W=this.addCheckbox(I,mxResources.get("lightbox"),!0,null,null,!y),ha=this.addEditButton(I,W),la=ha.getEditInput();y&&(la.style.marginLeft=W.style.marginLeft,W.style.display="none",d-=20);var ja=this.addCheckbox(I,mxResources.get("layers"),!0);ja.style.marginLeft=la.style.marginLeft;ja.style.marginTop="8px";var U=this.addCheckbox(I,mxResources.get("tags"),!0);U.style.marginLeft=la.style.marginLeft;
-U.style.marginBottom="16px";U.style.marginTop="16px";mxEvent.addListener(W,"change",function(){W.checked?(ja.removeAttribute("disabled"),la.removeAttribute("disabled")):(ja.setAttribute("disabled","disabled"),la.setAttribute("disabled","disabled"));la.checked&&W.checked?ha.getEditSelect().removeAttribute("disabled"):ha.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,I,mxUtils.bind(this,function(){q(qa.getTarget(),qa.getColor(),null==Q?!0:Q.checked,W.checked,ha.getLink(),
-ja.checked,null!=Z?Z.value:null,null!=X?X.value:null,U.checked)}),null,mxResources.get("create"),F,C);this.showDialog(f.container,340,300+d,!0,!0);null!=Z?(Z.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?Z.select():document.execCommand("selectAll",!1,null)):qa.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,f,g,m,q){var y=document.createElement("div");y.style.whiteSpace="nowrap";var F=document.createElement("h3");mxUtils.write(F,mxResources.get("image"));F.style.cssText=
+this.drive.showPermissions(G.getId())})));y.setAttribute("checked","checked");null==g&&C.setAttribute("disabled","disabled");q.appendChild(F);var Z=this.addLinkSection(q),ca=this.addCheckbox(q,mxResources.get("zoom"),!0,null,!0);mxUtils.write(q,":");var aa=document.createElement("input");aa.setAttribute("type","text");aa.style.marginRight="16px";aa.style.width="60px";aa.style.marginLeft="4px";aa.style.marginRight="12px";aa.value="100%";q.appendChild(aa);var Y=this.addCheckbox(q,mxResources.get("fit"),
+!0);F=null!=this.pages&&1<this.pages.length;var pa=pa=this.addCheckbox(q,mxResources.get("allPages"),F,!F),Q=this.addCheckbox(q,mxResources.get("layers"),!0),X=this.addCheckbox(q,mxResources.get("tags"),!0),ha=this.addCheckbox(q,mxResources.get("lightbox"),!0),U=null;F=380;if(EditorUi.enableHtmlEditOption){U=this.addEditButton(q,ha);var ma=U.getEditInput();ma.style.marginBottom="16px";F+=50;mxEvent.addListener(ha,"change",function(){ha.checked?ma.removeAttribute("disabled"):ma.setAttribute("disabled",
+"disabled");ma.checked&&ha.checked?U.getEditSelect().removeAttribute("disabled"):U.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,q,mxUtils.bind(this,function(){m(C.checked?g:null,ca.checked,aa.value,Z.getTarget(),Z.getColor(),Y.checked,pa.checked,Q.checked,X.checked,ha.checked,null!=U?U.getLink():null)}),null,d,f);this.showDialog(d.container,340,F,!0,!0);y.focus()};EditorUi.prototype.showPublishLinkDialog=function(d,f,g,m,q,y,F,C){var I=document.createElement("div");
+I.style.whiteSpace="nowrap";var G=document.createElement("h3");mxUtils.write(G,d||mxResources.get("link"));G.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";I.appendChild(G);var Z=this.getCurrentFile();d=0;if(null==Z||Z.constructor!=window.DriveFile||f)F=null!=F?F:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{d=80;F=null!=F?F:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";G=document.createElement("div");G.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";
+var ca=document.createElement("div");ca.style.whiteSpace="normal";mxUtils.write(ca,mxResources.get("linkAccountRequired"));G.appendChild(ca);ca=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(Z.getId())}));ca.style.marginTop="12px";ca.className="geBtn";G.appendChild(ca);I.appendChild(G);ca=document.createElement("a");ca.style.paddingLeft="12px";ca.style.color="gray";ca.style.fontSize="11px";ca.style.cursor="pointer";mxUtils.write(ca,mxResources.get("check"));
+G.appendChild(ca);mxEvent.addListener(ca,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(M){this.spinner.stop();M=new ErrorDialog(this,null,mxResources.get(null!=M?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(M.container,300,80,!0,!1);M.init()}))}))}var aa=null,Y=null;if(null!=g||null!=m)d+=30,mxUtils.write(I,mxResources.get("width")+":"),aa=document.createElement("input"),
+aa.setAttribute("type","text"),aa.style.marginRight="16px",aa.style.width="50px",aa.style.marginLeft="6px",aa.style.marginRight="16px",aa.style.marginBottom="10px",aa.value="100%",I.appendChild(aa),mxUtils.write(I,mxResources.get("height")+":"),Y=document.createElement("input"),Y.setAttribute("type","text"),Y.style.width="50px",Y.style.marginLeft="6px",Y.style.marginBottom="10px",Y.value=m+"px",I.appendChild(Y),mxUtils.br(I);var pa=this.addLinkSection(I,y);g=null!=this.pages&&1<this.pages.length;
+var Q=null;if(null==Z||Z.constructor!=window.DriveFile||f)Q=this.addCheckbox(I,mxResources.get("allPages"),g,!g);var X=this.addCheckbox(I,mxResources.get("lightbox"),!0,null,null,!y),ha=this.addEditButton(I,X),U=ha.getEditInput();y&&(U.style.marginLeft=X.style.marginLeft,X.style.display="none",d-=20);var ma=this.addCheckbox(I,mxResources.get("layers"),!0);ma.style.marginLeft=U.style.marginLeft;ma.style.marginTop="8px";var T=this.addCheckbox(I,mxResources.get("tags"),!0);T.style.marginLeft=U.style.marginLeft;
+T.style.marginBottom="16px";T.style.marginTop="16px";mxEvent.addListener(X,"change",function(){X.checked?(ma.removeAttribute("disabled"),U.removeAttribute("disabled")):(ma.setAttribute("disabled","disabled"),U.setAttribute("disabled","disabled"));U.checked&&X.checked?ha.getEditSelect().removeAttribute("disabled"):ha.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,I,mxUtils.bind(this,function(){q(pa.getTarget(),pa.getColor(),null==Q?!0:Q.checked,X.checked,ha.getLink(),
+ma.checked,null!=aa?aa.value:null,null!=Y?Y.value:null,T.checked)}),null,mxResources.get("create"),F,C);this.showDialog(f.container,340,300+d,!0,!0);null!=aa?(aa.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?aa.select():document.execCommand("selectAll",!1,null)):pa.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,f,g,m,q){var y=document.createElement("div");y.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:"+(q?"10":"4")+"px";y.appendChild(F);if(q){mxUtils.write(y,mxResources.get("zoom")+":");var C=document.createElement("input");C.setAttribute("type","text");C.style.marginRight="16px";C.style.width="60px";C.style.marginLeft="4px";C.style.marginRight="12px";C.value=this.lastExportZoom||"100%";y.appendChild(C);mxUtils.write(y,mxResources.get("borderWidth")+":");var I=document.createElement("input");I.setAttribute("type","text");I.style.marginRight=
-"16px";I.style.width="60px";I.style.marginLeft="4px";I.value=this.lastExportBorder||"0";y.appendChild(I);mxUtils.br(y)}var G=this.addCheckbox(y,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),Y=m?null:this.addCheckbox(y,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);F=this.editor.graph;var ba=m?null:this.addCheckbox(y,mxResources.get("transparentBackground"),F.background==mxConstants.NONE||null==F.background);null!=ba&&(ba.style.marginBottom="16px");
-d=new CustomDialog(this,y,mxUtils.bind(this,function(){var Z=parseInt(C.value)/100||1,X=parseInt(I.value)||0;g(!G.checked,null!=Y?Y.checked:!1,null!=ba?ba.checked:!1,Z,X)}),null,d,f);this.showDialog(d.container,300,(q?25:0)+(m?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,f,g,m,q,y,F,C,I){F=null!=F?F:Editor.defaultIncludeDiagram;var G=document.createElement("div");G.style.whiteSpace="nowrap";var Y=this.editor.graph,ba="jpeg"==C?220:300,Z=document.createElement("h3");mxUtils.write(Z,
-d);Z.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";G.appendChild(Z);mxUtils.write(G,mxResources.get("zoom")+":");var X=document.createElement("input");X.setAttribute("type","text");X.style.marginRight="16px";X.style.width="60px";X.style.marginLeft="4px";X.style.marginRight="12px";X.value=this.lastExportZoom||"100%";G.appendChild(X);mxUtils.write(G,mxResources.get("borderWidth")+":");var qa=document.createElement("input");qa.setAttribute("type","text");qa.style.marginRight=
-"16px";qa.style.width="60px";qa.style.marginLeft="4px";qa.value=this.lastExportBorder||"0";G.appendChild(qa);mxUtils.br(G);var Q=this.addCheckbox(G,mxResources.get("selectionOnly"),!1,Y.isSelectionEmpty()),W=document.createElement("input");W.style.marginTop="16px";W.style.marginRight="8px";W.style.marginLeft="24px";W.setAttribute("disabled","disabled");W.setAttribute("type","checkbox");var ha=document.createElement("select");ha.style.marginTop="16px";ha.style.marginLeft="8px";d=["selectionOnly","diagram",
-"page"];var la={};for(Z=0;Z<d.length;Z++)if(!Y.isSelectionEmpty()||"selectionOnly"!=d[Z]){var ja=document.createElement("option");mxUtils.write(ja,mxResources.get(d[Z]));ja.setAttribute("value",d[Z]);ha.appendChild(ja);la[d[Z]]=ja}I?(mxUtils.write(G,mxResources.get("size")+":"),G.appendChild(ha),mxUtils.br(G),ba+=26,mxEvent.addListener(ha,"change",function(){"selectionOnly"==ha.value&&(Q.checked=!0)})):y&&(G.appendChild(W),mxUtils.write(G,mxResources.get("crop")),mxUtils.br(G),ba+=30,mxEvent.addListener(Q,
-"change",function(){Q.checked?W.removeAttribute("disabled"):W.setAttribute("disabled","disabled")}));Y.isSelectionEmpty()?I&&(Q.style.display="none",Q.nextSibling.style.display="none",Q.nextSibling.nextSibling.style.display="none",ba-=30):(ha.value="diagram",W.setAttribute("checked","checked"),W.defaultChecked=!0,mxEvent.addListener(Q,"change",function(){ha.value=Q.checked?"selectionOnly":"diagram"}));var U=this.addCheckbox(G,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=C),L=null;
-Editor.isDarkMode()&&(L=this.addCheckbox(G,mxResources.get("dark"),!0),ba+=26);var da=this.addCheckbox(G,mxResources.get("shadow"),Y.shadowVisible),O=null;if("png"==C||"jpeg"==C)O=this.addCheckbox(G,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),ba+=30;var N=this.addCheckbox(G,mxResources.get("includeCopyOfMyDiagram"),F,null,null,"jpeg"!=C);N.style.marginBottom="16px";var aa=document.createElement("input");aa.style.marginBottom="16px";aa.style.marginRight="8px";aa.setAttribute("type",
-"checkbox");!this.isOffline()&&this.canvasSupported||aa.setAttribute("disabled","disabled");var ma=document.createElement("select");ma.style.maxWidth="260px";ma.style.marginLeft="8px";ma.style.marginRight="10px";ma.style.marginBottom="16px";ma.className="geBtn";y=document.createElement("option");y.setAttribute("value","none");mxUtils.write(y,mxResources.get("noChange"));ma.appendChild(y);y=document.createElement("option");y.setAttribute("value","embedFonts");mxUtils.write(y,mxResources.get("embedFonts"));
-ma.appendChild(y);y=document.createElement("option");y.setAttribute("value","lblToSvg");mxUtils.write(y,mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||ma.appendChild(y);mxEvent.addListener(ma,"change",mxUtils.bind(this,function(){"lblToSvg"==ma.value?(aa.checked=!0,aa.setAttribute("disabled","disabled"),la.page.style.display="none","page"==ha.value&&(ha.value="diagram"),da.checked=!1,da.setAttribute("disabled","disabled"),H.style.display="inline-block",u.style.display="none"):
-"disabled"==aa.getAttribute("disabled")&&(aa.checked=!1,aa.removeAttribute("disabled"),da.removeAttribute("disabled"),la.page.style.display="",H.style.display="none",u.style.display="")}));f&&(G.appendChild(aa),mxUtils.write(G,mxResources.get("embedImages")),mxUtils.br(G),mxUtils.write(G,mxResources.get("txtSettings")+":"),G.appendChild(ma),mxUtils.br(G),ba+=60);var u=document.createElement("select");u.style.maxWidth="260px";u.style.marginLeft="8px";u.style.marginRight="10px";u.className="geBtn";
-f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));u.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));u.appendChild(f);f=document.createElement("option");f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));u.appendChild(f);var H=document.createElement("div");mxUtils.write(H,mxResources.get("LinksLost"));H.style.margin="7px";
-H.style.display="none";"svg"==C&&(mxUtils.write(G,mxResources.get("links")+":"),G.appendChild(u),G.appendChild(H),mxUtils.br(G),mxUtils.br(G),ba+=50);g=new CustomDialog(this,G,mxUtils.bind(this,function(){this.lastExportBorder=qa.value;this.lastExportZoom=X.value;q(X.value,U.checked,!Q.checked,da.checked,N.checked,aa.checked,qa.value,W.checked,!1,u.value,null!=O?O.checked:null,null!=L?L.checked:null,ha.value,"embedFonts"==ma.value,"lblToSvg"==ma.value)}),null,g,m);this.showDialog(g.container,340,
-ba,!0,!0,null,null,null,null,!0);X.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?X.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,f,g,m,q){var y=document.createElement("div");y.style.whiteSpace="nowrap";var F=this.editor.graph;if(null!=f){var C=document.createElement("h3");mxUtils.write(C,f);C.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";y.appendChild(C)}var I=this.addCheckbox(y,mxResources.get("fit"),
-!0),G=this.addCheckbox(y,mxResources.get("shadow"),F.shadowVisible&&m,!m),Y=this.addCheckbox(y,g),ba=this.addCheckbox(y,mxResources.get("lightbox"),!0),Z=this.addEditButton(y,ba),X=Z.getEditInput(),qa=1<F.model.getChildCount(F.model.getRoot()),Q=this.addCheckbox(y,mxResources.get("layers"),qa,!qa);Q.style.marginLeft=X.style.marginLeft;Q.style.marginBottom="12px";Q.style.marginTop="8px";mxEvent.addListener(ba,"change",function(){ba.checked?(qa&&Q.removeAttribute("disabled"),X.removeAttribute("disabled")):
-(Q.setAttribute("disabled","disabled"),X.setAttribute("disabled","disabled"));X.checked&&ba.checked?Z.getEditSelect().removeAttribute("disabled"):Z.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,y,mxUtils.bind(this,function(){d(I.checked,G.checked,Y.checked,ba.checked,Z.getLink(),Q.checked)}),null,mxResources.get("embed"),q);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,f,g,m,q,y,F,C){function I(X){var qa=" ",Q="";m&&(qa=
-" 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!=Y?"&page="+Y:"")+(q?"&edit=_blank":"")+(y?"&layers=1":"")+"');}})(this);\"",Q+="cursor:pointer;");d&&(Q+="max-width:100%;");var W="";g&&(W=' width="'+
-Math.round(G.width)+'" height="'+Math.round(G.height)+'"');F('<img src="'+X+'"'+W+(""!=Q?' style="'+Q+'"':"")+qa+"/>")}var G=this.editor.graph.getGraphBounds(),Y=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(X){var qa=m?this.getFileData(!0):null;X=this.createImageDataUri(X,qa,"png");I(X)}),null,null,null,mxUtils.bind(this,function(X){C({message:mxResources.get("unknownError")})}),null,!0,g?2:1,null,f,null,null,Editor.defaultBorder);else if(f=
-this.getFileData(!0),G.width*G.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var ba="";g&&(ba="&w="+Math.round(2*G.width)+"&h="+Math.round(2*G.height));var Z=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(m?"1":"0")+ba+"&xml="+encodeURIComponent(f));Z.send(mxUtils.bind(this,function(){200<=Z.getStatus()&&299>=Z.getStatus()?I("data:image/png;base64,"+Z.getText()):C({message:mxResources.get("unknownError")})}))}else C({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=
-function(d,f,g,m,q,y,F){var C=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!g),I=C.getElementsByTagName("a");if(null!=I)for(var G=0;G<I.length;G++){var Y=I[G].getAttribute("href");null!=Y&&"#"==Y.charAt(0)&&"_blank"==I[G].getAttribute("target")&&I[G].removeAttribute("target")}m&&C.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(C);if(g){var ba=" ",Z="";m&&(ba="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"+(q?"&edit=_blank":"")+(y?"&layers=1":"")+"');}})(this);\"",Z+="cursor:pointer;");d&&(Z+="max-width:100%;");this.editor.convertImages(C,mxUtils.bind(this,function(X){F('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(X))+'"'+(""!=Z?' style="'+Z+'"':"")+ba+"/>")}))}else Z="",m&&(f=this.getSelectedPageIndex(),C.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(null!=f?"&page="+f:"")+(q?"&edit=_blank":"")+(y?"&layers=1":"")+"');}}})(this);"),Z+="cursor:pointer;"),d&&(d=parseInt(C.getAttribute("width")),q=parseInt(C.getAttribute("height")),C.setAttribute("viewBox","-0.5 -0.5 "+d+" "+q),Z+="max-width:100%;max-height:"+q+"px;",C.removeAttribute("height")),""!=Z&&C.setAttribute("style",Z),this.editor.addFontCss(C),this.editor.graph.mathEnabled&&this.editor.addMathCss(C),F(mxUtils.getXml(C))};EditorUi.prototype.timeSince=function(d){d=
-Math.floor((new Date-d)/1E3);var f=Math.floor(d/31536E3);if(1<f)return f+" "+mxResources.get("years");f=Math.floor(d/2592E3);if(1<f)return f+" "+mxResources.get("months");f=Math.floor(d/86400);if(1<f)return f+" "+mxResources.get("days");f=Math.floor(d/3600);if(1<f)return f+" "+mxResources.get("hours");f=Math.floor(d/60);return 1<f?f+" "+mxResources.get("minutes"):1==f?f+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(d,f){if(null!=d){var g=null;if("diagram"==d.nodeName)g=
-d;else if("mxfile"==d.nodeName){var m=d.getElementsByTagName("diagram");if(0<m.length){g=m[0];var q=f.getGlobalVariable;f.getGlobalVariable=function(y){return"page"==y?g.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==y?1:q.apply(this,arguments)}}}null!=g&&(d=Editor.parseDiagramNode(g))}m=this.editor.graph;try{this.editor.graph=f,this.editor.setGraphXml(d)}catch(y){}finally{this.editor.graph=m}return d};EditorUi.prototype.getPngFileProperties=function(d){var f=1,g=0;if(null!=
-d){if(d.hasAttribute("scale")){var m=parseFloat(d.getAttribute("scale"));!isNaN(m)&&0<m&&(f=m)}d.hasAttribute("border")&&(m=parseInt(d.getAttribute("border")),!isNaN(m)&&0<m&&(g=m))}return{scale:f,border:g}};EditorUi.prototype.getEmbeddedPng=function(d,f,g,m,q){try{var y=this.editor.graph,F=null!=y.themes&&"darkTheme"==y.defaultThemeName,C=null;if(null!=g&&0<g.length)y=this.createTemporaryGraph(F?y.getDefaultStylesheet():y.getStylesheet()),document.body.appendChild(y.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(g).documentElement,
-!0),y),C=g;else if(F||null!=this.pages&&this.currentPage!=this.pages[0]){y=this.createTemporaryGraph(F?y.getDefaultStylesheet():y.getStylesheet());var I=y.getGlobalVariable;y.setBackgroundImage=this.editor.graph.setBackgroundImage;var G=this.pages[0];this.currentPage==G?y.setBackgroundImage(this.editor.graph.backgroundImage):null!=G.viewState&&null!=G.viewState&&y.setBackgroundImage(G.viewState.backgroundImage);y.getGlobalVariable=function(Y){return"page"==Y?G.getName():"pagenumber"==Y?1:I.apply(this,
-arguments)};document.body.appendChild(y.container);y.model.setRoot(G.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(Y){try{null==C&&(C=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var ba=Y.toDataURL("image/png");ba=Editor.writeGraphModelToPng(ba,"tEXt","mxfile",encodeURIComponent(C));d(ba.substring(ba.lastIndexOf(",")+1));y!=this.editor.graph&&y.container.parentNode.removeChild(y.container)}catch(Z){null!=f&&f(Z)}}),null,null,null,mxUtils.bind(this,function(Y){null!=
-f&&f(Y)}),null,null,m,null,y.shadowVisible,null,y,q,null,null,null,"diagram",null)}catch(Y){null!=f&&f(Y)}};EditorUi.prototype.getEmbeddedSvg=function(d,f,g,m,q,y,F,C,I,G,Y,ba,Z){C=null!=C?C:!0;Y=null!=Y?Y:0;F=null!=I?I:f.background;F==mxConstants.NONE&&(F=null);y=f.getSvg(F,G,Y,null,null,y,null,null,null,f.shadowVisible||ba,null,Z,"diagram");(f.shadowVisible||ba)&&f.addSvgShadow(y,null,null,0==Y);null!=d&&y.setAttribute("content",d);null!=g&&y.setAttribute("resource",g);var X=mxUtils.bind(this,function(qa){qa=
-(m?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(qa);null!=q&&q(qa);return qa});f.mathEnabled&&this.editor.addMathCss(y);if(null!=q)this.embedFonts(y,mxUtils.bind(this,function(qa){C?this.editor.convertImages(qa,mxUtils.bind(this,function(Q){X(Q)})):X(qa)}));else return X(y)};EditorUi.prototype.embedFonts=function(d,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(d,this.editor.resolvedFontCss),
-this.editor.embedExtFonts(mxUtils.bind(this,function(g){try{null!=g&&this.editor.addFontCss(d,g),f(d)}catch(m){f(d)}}))}catch(g){f(d)}}))};EditorUi.prototype.exportImage=function(d,f,g,m,q,y,F,C,I,G,Y,ba,Z){I=null!=I?I:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var X=this.editor.graph.isSelectionEmpty();g=null!=g?g:X;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(qa){this.spinner.stop();try{this.saveCanvas(qa,
-q?this.getFileData(!0,null,null,null,g,C):null,I,null==this.pages||0==this.pages.length,Y)}catch(Q){this.handleError(Q)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(qa){this.spinner.stop();this.handleError(qa)}),null,g,d||1,f,m,null,null,y,F,G,ba,Z)}catch(qa){this.spinner.stop(),this.handleError(qa)}}};EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.importXml=function(d,f,g,m,q,y,F){f=null!=f?f:0;g=null!=g?g:0;var C=
-[];try{var I=this.editor.graph;if(null!=d&&0<d.length){I.model.beginUpdate();try{var G=mxUtils.parseXml(d);d={};var Y=this.editor.extractGraphModel(G.documentElement,null!=this.pages);if(null!=Y&&"mxfile"==Y.nodeName&&null!=this.pages){var ba=Y.getElementsByTagName("diagram");if(1==ba.length&&!y){if(Y=Editor.parseDiagramNode(ba[0]),null!=this.currentPage&&(d[ba[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var Z=ba[0].getAttribute("name");null!=Z&&""!=Z&&this.editor.graph.model.execute(new RenamePage(this,
-this.currentPage,Z))}}else if(0<ba.length){y=[];var X=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(d[ba[0].getAttribute("id")]=this.pages[0].getId(),Y=Editor.parseDiagramNode(ba[0]),m=!1,X=1);for(;X<ba.length;X++){var qa=ba[X].getAttribute("id");ba[X].removeAttribute("id");var Q=this.updatePageRoot(new DiagramPage(ba[X]));d[qa]=ba[X].getAttribute("id");var W=this.pages.length;null==Q.getName()&&Q.setName(mxResources.get("pageWithNumber",[W+1]));I.model.execute(new ChangePage(this,
-Q,Q,W,!0));y.push(Q)}this.updatePageLinks(d,y)}}if(null!=Y&&"mxGraphModel"===Y.nodeName){C=I.importGraphModel(Y,f,g,m);if(null!=C)for(X=0;X<C.length;X++)this.updatePageLinksForCell(d,C[X]);var ha=I.parseBackgroundImage(Y.getAttribute("backgroundImage"));if(null!=ha&&null!=ha.originalSrc){this.updateBackgroundPageLink(d,ha);var la=new ChangePageSetup(this,null,ha);la.ignoreColor=!0;I.model.execute(la)}}F&&this.insertHandler(C,null,null,I.defaultVertexStyle,I.defaultEdgeStyle,!1,!0)}finally{I.model.endUpdate()}}}catch(ja){if(q)throw ja;
-this.handleError(ja)}return C};EditorUi.prototype.updatePageLinks=function(d,f){for(var g=0;g<f.length;g++)this.updatePageLinksForCell(d,f[g].root),null!=f[g].viewState&&this.updateBackgroundPageLink(d,f[g].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var g=d[f.originalSrc.substring(f.originalSrc.indexOf(",")+1)];null!=g&&(f.originalSrc="data:page/id,"+g)}}catch(m){}};EditorUi.prototype.updatePageLinksForCell=
+"16px";I.style.width="60px";I.style.marginLeft="4px";I.value=this.lastExportBorder||"0";y.appendChild(I);mxUtils.br(y)}var G=this.addCheckbox(y,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),Z=m?null:this.addCheckbox(y,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);F=this.editor.graph;var ca=m?null:this.addCheckbox(y,mxResources.get("transparentBackground"),F.background==mxConstants.NONE||null==F.background);null!=ca&&(ca.style.marginBottom="16px");
+d=new CustomDialog(this,y,mxUtils.bind(this,function(){var aa=parseInt(C.value)/100||1,Y=parseInt(I.value)||0;g(!G.checked,null!=Z?Z.checked:!1,null!=ca?ca.checked:!1,aa,Y)}),null,d,f);this.showDialog(d.container,300,(q?25:0)+(m?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,f,g,m,q,y,F,C,I){F=null!=F?F:Editor.defaultIncludeDiagram;var G=document.createElement("div");G.style.whiteSpace="nowrap";var Z=this.editor.graph,ca="jpeg"==C?220:300,aa=document.createElement("h3");mxUtils.write(aa,
+d);aa.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";G.appendChild(aa);mxUtils.write(G,mxResources.get("zoom")+":");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=this.lastExportZoom||"100%";G.appendChild(Y);mxUtils.write(G,mxResources.get("borderWidth")+":");var pa=document.createElement("input");pa.setAttribute("type","text");pa.style.marginRight=
+"16px";pa.style.width="60px";pa.style.marginLeft="4px";pa.value=this.lastExportBorder||"0";G.appendChild(pa);mxUtils.br(G);var Q=this.addCheckbox(G,mxResources.get("selectionOnly"),!1,Z.isSelectionEmpty()),X=document.createElement("input");X.style.marginTop="16px";X.style.marginRight="8px";X.style.marginLeft="24px";X.setAttribute("disabled","disabled");X.setAttribute("type","checkbox");var ha=document.createElement("select");ha.style.marginTop="16px";ha.style.marginLeft="8px";d=["selectionOnly","diagram",
+"page"];var U={};for(aa=0;aa<d.length;aa++)if(!Z.isSelectionEmpty()||"selectionOnly"!=d[aa]){var ma=document.createElement("option");mxUtils.write(ma,mxResources.get(d[aa]));ma.setAttribute("value",d[aa]);ha.appendChild(ma);U[d[aa]]=ma}I?(mxUtils.write(G,mxResources.get("size")+":"),G.appendChild(ha),mxUtils.br(G),ca+=26,mxEvent.addListener(ha,"change",function(){"selectionOnly"==ha.value&&(Q.checked=!0)})):y&&(G.appendChild(X),mxUtils.write(G,mxResources.get("crop")),mxUtils.br(G),ca+=30,mxEvent.addListener(Q,
+"change",function(){Q.checked?X.removeAttribute("disabled"):X.setAttribute("disabled","disabled")}));Z.isSelectionEmpty()?I&&(Q.style.display="none",Q.nextSibling.style.display="none",Q.nextSibling.nextSibling.style.display="none",ca-=30):(ha.value="diagram",X.setAttribute("checked","checked"),X.defaultChecked=!0,mxEvent.addListener(Q,"change",function(){ha.value=Q.checked?"selectionOnly":"diagram"}));var T=this.addCheckbox(G,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=C),M=null;
+Editor.isDarkMode()&&(M=this.addCheckbox(G,mxResources.get("dark"),!0),ca+=26);var ia=this.addCheckbox(G,mxResources.get("shadow"),Z.shadowVisible),N=null;if("png"==C||"jpeg"==C)N=this.addCheckbox(G,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),ca+=30;var O=this.addCheckbox(G,mxResources.get("includeCopyOfMyDiagram"),F,null,null,"jpeg"!=C);O.style.marginBottom="16px";var ba=document.createElement("input");ba.style.marginBottom="16px";ba.style.marginRight="8px";ba.setAttribute("type",
+"checkbox");!this.isOffline()&&this.canvasSupported||ba.setAttribute("disabled","disabled");var la=document.createElement("select");la.style.maxWidth="260px";la.style.marginLeft="8px";la.style.marginRight="10px";la.style.marginBottom="16px";la.className="geBtn";y=document.createElement("option");y.setAttribute("value","none");mxUtils.write(y,mxResources.get("noChange"));la.appendChild(y);y=document.createElement("option");y.setAttribute("value","embedFonts");mxUtils.write(y,mxResources.get("embedFonts"));
+la.appendChild(y);y=document.createElement("option");y.setAttribute("value","lblToSvg");mxUtils.write(y,mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||la.appendChild(y);mxEvent.addListener(la,"change",mxUtils.bind(this,function(){"lblToSvg"==la.value?(ba.checked=!0,ba.setAttribute("disabled","disabled"),U.page.style.display="none","page"==ha.value&&(ha.value="diagram"),ia.checked=!1,ia.setAttribute("disabled","disabled"),H.style.display="inline-block",u.style.display="none"):
+"disabled"==ba.getAttribute("disabled")&&(ba.checked=!1,ba.removeAttribute("disabled"),ia.removeAttribute("disabled"),U.page.style.display="",H.style.display="none",u.style.display="")}));f&&(G.appendChild(ba),mxUtils.write(G,mxResources.get("embedImages")),mxUtils.br(G),mxUtils.write(G,mxResources.get("txtSettings")+":"),G.appendChild(la),mxUtils.br(G),ca+=60);var u=document.createElement("select");u.style.maxWidth="260px";u.style.marginLeft="8px";u.style.marginRight="10px";u.className="geBtn";f=
+document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));u.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));u.appendChild(f);f=document.createElement("option");f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));u.appendChild(f);var H=document.createElement("div");mxUtils.write(H,mxResources.get("LinksLost"));H.style.margin="7px";
+H.style.display="none";"svg"==C&&(mxUtils.write(G,mxResources.get("links")+":"),G.appendChild(u),G.appendChild(H),mxUtils.br(G),mxUtils.br(G),ca+=50);g=new CustomDialog(this,G,mxUtils.bind(this,function(){this.lastExportBorder=pa.value;this.lastExportZoom=Y.value;q(Y.value,T.checked,!Q.checked,ia.checked,O.checked,ba.checked,pa.value,X.checked,!1,u.value,null!=N?N.checked:null,null!=M?M.checked:null,ha.value,"embedFonts"==la.value,"lblToSvg"==la.value)}),null,g,m);this.showDialog(g.container,340,
+ca,!0,!0,null,null,null,null,!0);Y.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?Y.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,f,g,m,q){var y=document.createElement("div");y.style.whiteSpace="nowrap";var F=this.editor.graph;if(null!=f){var C=document.createElement("h3");mxUtils.write(C,f);C.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";y.appendChild(C)}var I=this.addCheckbox(y,mxResources.get("fit"),
+!0),G=this.addCheckbox(y,mxResources.get("shadow"),F.shadowVisible&&m,!m),Z=this.addCheckbox(y,g),ca=this.addCheckbox(y,mxResources.get("lightbox"),!0),aa=this.addEditButton(y,ca),Y=aa.getEditInput(),pa=1<F.model.getChildCount(F.model.getRoot()),Q=this.addCheckbox(y,mxResources.get("layers"),pa,!pa);Q.style.marginLeft=Y.style.marginLeft;Q.style.marginBottom="12px";Q.style.marginTop="8px";mxEvent.addListener(ca,"change",function(){ca.checked?(pa&&Q.removeAttribute("disabled"),Y.removeAttribute("disabled")):
+(Q.setAttribute("disabled","disabled"),Y.setAttribute("disabled","disabled"));Y.checked&&ca.checked?aa.getEditSelect().removeAttribute("disabled"):aa.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,y,mxUtils.bind(this,function(){d(I.checked,G.checked,Z.checked,ca.checked,aa.getLink(),Q.checked)}),null,mxResources.get("embed"),q);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,f,g,m,q,y,F,C){function I(Y){var pa=" ",Q="";m&&(pa=
+" 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!=Z?"&page="+Z:"")+(q?"&edit=_blank":"")+(y?"&layers=1":"")+"');}})(this);\"",Q+="cursor:pointer;");d&&(Q+="max-width:100%;");var X="";g&&(X=' width="'+
+Math.round(G.width)+'" height="'+Math.round(G.height)+'"');F('<img src="'+Y+'"'+X+(""!=Q?' style="'+Q+'"':"")+pa+"/>")}var G=this.editor.graph.getGraphBounds(),Z=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(Y){var pa=m?this.getFileData(!0):null;Y=this.createImageDataUri(Y,pa,"png");I(Y)}),null,null,null,mxUtils.bind(this,function(Y){C({message:mxResources.get("unknownError")})}),null,!0,g?2:1,null,f,null,null,Editor.defaultBorder);else if(f=
+this.getFileData(!0),G.width*G.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var ca="";g&&(ca="&w="+Math.round(2*G.width)+"&h="+Math.round(2*G.height));var aa=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(m?"1":"0")+ca+"&xml="+encodeURIComponent(f));aa.send(mxUtils.bind(this,function(){200<=aa.getStatus()&&299>=aa.getStatus()?I("data:image/png;base64,"+aa.getText()):C({message:mxResources.get("unknownError")})}))}else C({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=
+function(d,f,g,m,q,y,F){var C=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!g),I=C.getElementsByTagName("a");if(null!=I)for(var G=0;G<I.length;G++){var Z=I[G].getAttribute("href");null!=Z&&"#"==Z.charAt(0)&&"_blank"==I[G].getAttribute("target")&&I[G].removeAttribute("target")}m&&C.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(C);if(g){var ca=" ",aa="";m&&(ca="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"+(q?"&edit=_blank":"")+(y?"&layers=1":"")+"');}})(this);\"",aa+="cursor:pointer;");d&&(aa+="max-width:100%;");this.editor.convertImages(C,mxUtils.bind(this,function(Y){F('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(Y))+'"'+(""!=aa?' style="'+aa+'"':"")+ca+"/>")}))}else aa="",m&&(f=this.getSelectedPageIndex(),C.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(null!=f?"&page="+f:"")+(q?"&edit=_blank":"")+(y?"&layers=1":"")+"');}}})(this);"),aa+="cursor:pointer;"),d&&(d=parseInt(C.getAttribute("width")),q=parseInt(C.getAttribute("height")),C.setAttribute("viewBox","-0.5 -0.5 "+d+" "+q),aa+="max-width:100%;max-height:"+q+"px;",C.removeAttribute("height")),""!=aa&&C.setAttribute("style",aa),this.editor.addFontCss(C),this.editor.graph.mathEnabled&&this.editor.addMathCss(C),F(mxUtils.getXml(C))};EditorUi.prototype.timeSince=
+function(d){d=Math.floor((new Date-d)/1E3);var f=Math.floor(d/31536E3);if(1<f)return f+" "+mxResources.get("years");f=Math.floor(d/2592E3);if(1<f)return f+" "+mxResources.get("months");f=Math.floor(d/86400);if(1<f)return f+" "+mxResources.get("days");f=Math.floor(d/3600);if(1<f)return f+" "+mxResources.get("hours");f=Math.floor(d/60);return 1<f?f+" "+mxResources.get("minutes"):1==f?f+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(d,f){if(null!=d){var g=null;if("diagram"==
+d.nodeName)g=d;else if("mxfile"==d.nodeName){var m=d.getElementsByTagName("diagram");if(0<m.length){g=m[0];var q=f.getGlobalVariable;f.getGlobalVariable=function(y){return"page"==y?g.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==y?1:q.apply(this,arguments)}}}null!=g&&(d=Editor.parseDiagramNode(g))}m=this.editor.graph;try{this.editor.graph=f,this.editor.setGraphXml(d)}catch(y){}finally{this.editor.graph=m}return d};EditorUi.prototype.getPngFileProperties=function(d){var f=
+1,g=0;if(null!=d){if(d.hasAttribute("scale")){var m=parseFloat(d.getAttribute("scale"));!isNaN(m)&&0<m&&(f=m)}d.hasAttribute("border")&&(m=parseInt(d.getAttribute("border")),!isNaN(m)&&0<m&&(g=m))}return{scale:f,border:g}};EditorUi.prototype.getEmbeddedPng=function(d,f,g,m,q){try{var y=this.editor.graph,F=null!=y.themes&&"darkTheme"==y.defaultThemeName,C=null;if(null!=g&&0<g.length)y=this.createTemporaryGraph(F?y.getDefaultStylesheet():y.getStylesheet()),document.body.appendChild(y.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(g).documentElement,
+!0),y),C=g;else if(F||null!=this.pages&&this.currentPage!=this.pages[0]){y=this.createTemporaryGraph(F?y.getDefaultStylesheet():y.getStylesheet());var I=y.getGlobalVariable;y.setBackgroundImage=this.editor.graph.setBackgroundImage;var G=this.pages[0];this.currentPage==G?y.setBackgroundImage(this.editor.graph.backgroundImage):null!=G.viewState&&null!=G.viewState&&y.setBackgroundImage(G.viewState.backgroundImage);y.getGlobalVariable=function(Z){return"page"==Z?G.getName():"pagenumber"==Z?1:I.apply(this,
+arguments)};document.body.appendChild(y.container);y.model.setRoot(G.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(Z){try{null==C&&(C=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var ca=Z.toDataURL("image/png");ca=Editor.writeGraphModelToPng(ca,"tEXt","mxfile",encodeURIComponent(C));d(ca.substring(ca.lastIndexOf(",")+1));y!=this.editor.graph&&y.container.parentNode.removeChild(y.container)}catch(aa){null!=f&&f(aa)}}),null,null,null,mxUtils.bind(this,function(Z){null!=
+f&&f(Z)}),null,null,m,null,y.shadowVisible,null,y,q,null,null,null,"diagram",null)}catch(Z){null!=f&&f(Z)}};EditorUi.prototype.getEmbeddedSvg=function(d,f,g,m,q,y,F,C,I,G,Z,ca,aa){C=null!=C?C:!0;Z=null!=Z?Z:0;F=null!=I?I:f.background;F==mxConstants.NONE&&(F=null);y=f.getSvg(F,G,Z,null,null,y,null,null,null,f.shadowVisible||ca,null,aa,"diagram");(f.shadowVisible||ca)&&f.addSvgShadow(y,null,null,0==Z);null!=d&&y.setAttribute("content",d);null!=g&&y.setAttribute("resource",g);var Y=mxUtils.bind(this,
+function(pa){pa=(m?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(pa);null!=q&&q(pa);return pa});f.mathEnabled&&this.editor.addMathCss(y);if(null!=q)this.embedFonts(y,mxUtils.bind(this,function(pa){C?this.editor.convertImages(pa,mxUtils.bind(this,function(Q){Y(Q)})):Y(pa)}));else return Y(y)};EditorUi.prototype.embedFonts=function(d,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(d,this.editor.resolvedFontCss),
+this.editor.embedExtFonts(mxUtils.bind(this,function(g){try{null!=g&&this.editor.addFontCss(d,g),f(d)}catch(m){f(d)}}))}catch(g){f(d)}}))};EditorUi.prototype.exportImage=function(d,f,g,m,q,y,F,C,I,G,Z,ca,aa){I=null!=I?I:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var Y=this.editor.graph.isSelectionEmpty();g=null!=g?g:Y;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(pa){this.spinner.stop();try{this.saveCanvas(pa,
+q?this.getFileData(!0,null,null,null,g,C):null,I,null==this.pages||0==this.pages.length,Z)}catch(Q){this.handleError(Q)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(pa){this.spinner.stop();this.handleError(pa)}),null,g,d||1,f,m,null,null,y,F,G,ca,aa)}catch(pa){this.spinner.stop(),this.handleError(pa)}}};EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.importXml=function(d,f,g,m,q,y,F){f=null!=f?f:0;g=null!=g?g:0;var C=
+[];try{var I=this.editor.graph;if(null!=d&&0<d.length){I.model.beginUpdate();try{var G=mxUtils.parseXml(d);d={};var Z=this.editor.extractGraphModel(G.documentElement,null!=this.pages);if(null!=Z&&"mxfile"==Z.nodeName&&null!=this.pages){var ca=Z.getElementsByTagName("diagram");if(1==ca.length&&!y){if(Z=Editor.parseDiagramNode(ca[0]),null!=this.currentPage&&(d[ca[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var aa=ca[0].getAttribute("name");null!=aa&&""!=aa&&this.editor.graph.model.execute(new RenamePage(this,
+this.currentPage,aa))}}else if(0<ca.length){y=[];var Y=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(d[ca[0].getAttribute("id")]=this.pages[0].getId(),Z=Editor.parseDiagramNode(ca[0]),m=!1,Y=1);for(;Y<ca.length;Y++){var pa=ca[Y].getAttribute("id");ca[Y].removeAttribute("id");var Q=this.updatePageRoot(new DiagramPage(ca[Y]));d[pa]=ca[Y].getAttribute("id");var X=this.pages.length;null==Q.getName()&&Q.setName(mxResources.get("pageWithNumber",[X+1]));I.model.execute(new ChangePage(this,
+Q,Q,X,!0));y.push(Q)}this.updatePageLinks(d,y)}}if(null!=Z&&"mxGraphModel"===Z.nodeName){C=I.importGraphModel(Z,f,g,m);if(null!=C)for(Y=0;Y<C.length;Y++)this.updatePageLinksForCell(d,C[Y]);var ha=I.parseBackgroundImage(Z.getAttribute("backgroundImage"));if(null!=ha&&null!=ha.originalSrc){this.updateBackgroundPageLink(d,ha);var U=new ChangePageSetup(this,null,ha);U.ignoreColor=!0;I.model.execute(U)}}F&&this.insertHandler(C,null,null,I.defaultVertexStyle,I.defaultEdgeStyle,!1,!0)}finally{I.model.endUpdate()}}}catch(ma){if(q)throw ma;
+this.handleError(ma)}return C};EditorUi.prototype.updatePageLinks=function(d,f){for(var g=0;g<f.length;g++)this.updatePageLinksForCell(d,f[g].root),null!=f[g].viewState&&this.updateBackgroundPageLink(d,f[g].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var g=d[f.originalSrc.substring(f.originalSrc.indexOf(",")+1)];null!=g&&(f.originalSrc="data:page/id,"+g)}}catch(m){}};EditorUi.prototype.updatePageLinksForCell=
function(d,f){var g=document.createElement("div"),m=this.editor.graph,q=m.getLinkForCell(f);null!=q&&m.setLinkForCell(f,this.updatePageLink(d,q));if(m.isHtmlLabel(f)){g.innerHTML=m.sanitizeHtml(m.getLabel(f));for(var y=g.getElementsByTagName("a"),F=!1,C=0;C<y.length;C++)q=y[C].getAttribute("href"),null!=q&&(y[C].setAttribute("href",this.updatePageLink(d,q)),F=!0);F&&m.labelChanged(f,g.innerHTML)}for(C=0;C<m.model.getChildCount(f);C++)this.updatePageLinksForCell(d,m.model.getChildAt(f,C))};EditorUi.prototype.updatePageLink=
function(d,f){if(Graph.isPageLink(f)){var g=d[f.substring(f.indexOf(",")+1)];f=null!=g?"data:page/id,"+g:null}else if("data:action/json,"==f.substring(0,17))try{var m=JSON.parse(f.substring(17));if(null!=m.actions){for(var q=0;q<m.actions.length;q++){var y=m.actions[q];if(null!=y.open&&Graph.isPageLink(y.open)){var F=y.open.substring(y.open.indexOf(",")+1);g=d[F];null!=g?y.open="data:page/id,"+g:null==this.getPageById(F)&&delete y.open}}f="data:action/json,"+JSON.stringify(m)}}catch(C){}return f};
EditorUi.prototype.isRemoteVisioFormat=function(d){return/(\.v(sd|dx))($|\?)/i.test(d)||/(\.vs(s|x))($|\?)/i.test(d)};EditorUi.prototype.importVisio=function(d,f,g,m,q){m=null!=m?m:d.name;g=null!=g?g:mxUtils.bind(this,function(F){this.handleError(F)});var y=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var F=this.isRemoteVisioFormat(m);try{var C="UNKNOWN-VISIO",I=m.lastIndexOf(".");if(0<=I&&I<m.length)C=m.substring(I+1).toUpperCase();else{var G=m.lastIndexOf("/");0<=
-G&&G<m.length&&(m=m.substring(G+1))}EditorUi.logEvent({category:C+"-MS-IMPORT-FILE",action:"filename_"+m,label:F?"remote":"local"})}catch(ba){}if(F)if(null==VSD_CONVERT_URL||this.isOffline())g({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{F=new FormData;F.append("file1",d,m);var Y=new XMLHttpRequest;Y.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(m)?"?stencil=1":""));Y.responseType="blob";this.addRemoteServiceSecurityCheck(Y);
-null!=q&&Y.setRequestHeader("x-convert-custom",q);Y.onreadystatechange=mxUtils.bind(this,function(){if(4==Y.readyState)if(200<=Y.status&&299>=Y.status)try{var ba=Y.response;if("text/xml"==ba.type){var Z=new FileReader;Z.onload=mxUtils.bind(this,function(X){try{f(X.target.result)}catch(qa){g({message:mxResources.get("errorLoadingFile")})}});Z.readAsText(ba)}else this.doImportVisio(ba,f,g,m)}catch(X){g(X)}else try{""==Y.responseType||"text"==Y.responseType?g({message:Y.responseText}):(Z=new FileReader,
-Z.onload=function(){g({message:JSON.parse(Z.result).Message})},Z.readAsText(Y.response))}catch(X){g({})}});Y.send(F)}else try{this.doImportVisio(d,f,g,m)}catch(ba){g(ba)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?y():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",y))};EditorUi.prototype.importGraphML=function(d,f,g){g=null!=g?g:mxUtils.bind(this,function(q){this.handleError(q)});
+G&&G<m.length&&(m=m.substring(G+1))}EditorUi.logEvent({category:C+"-MS-IMPORT-FILE",action:"filename_"+m,label:F?"remote":"local"})}catch(ca){}if(F)if(null==VSD_CONVERT_URL||this.isOffline())g({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{F=new FormData;F.append("file1",d,m);var Z=new XMLHttpRequest;Z.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(m)?"?stencil=1":""));Z.responseType="blob";this.addRemoteServiceSecurityCheck(Z);
+null!=q&&Z.setRequestHeader("x-convert-custom",q);Z.onreadystatechange=mxUtils.bind(this,function(){if(4==Z.readyState)if(200<=Z.status&&299>=Z.status)try{var ca=Z.response;if("text/xml"==ca.type){var aa=new FileReader;aa.onload=mxUtils.bind(this,function(Y){try{f(Y.target.result)}catch(pa){g({message:mxResources.get("errorLoadingFile")})}});aa.readAsText(ca)}else this.doImportVisio(ca,f,g,m)}catch(Y){g(Y)}else try{""==Z.responseType||"text"==Z.responseType?g({message:Z.responseText}):(aa=new FileReader,
+aa.onload=function(){g({message:JSON.parse(aa.result).Message})},aa.readAsText(Z.response))}catch(Y){g({})}});Z.send(F)}else try{this.doImportVisio(d,f,g,m)}catch(ca){g(ca)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?y():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",y))};EditorUi.prototype.importGraphML=function(d,f,g){g=null!=g?g:mxUtils.bind(this,function(q){this.handleError(q)});
var m=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(d,f,g)}catch(q){g(q)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?m():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",m))};EditorUi.prototype.exportVisio=function(d){var f=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(d)||
this.handleError({message:mxResources.get("unknownError")})}catch(g){this.handleError(g)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.convertLucidChart=function(d,f,g){var m=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{var q=
JSON.parse(d);f(LucidImporter.importState(q));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+d.length}),null!=window.console&&"1"==urlParams.test){var y=[(new Date).toISOString(),"convertLucidChart",q];null!=q.state&&y.push(JSON.parse(q.state));if(null!=q.svgThumbs)for(var F=0;F<q.svgThumbs.length;F++)y.push(Editor.createSvgDataUri(q.svgThumbs[F]));null!=q.thumb&&y.push(q.thumb);console.log.apply(console,y)}}catch(C){}}catch(C){null!=window.console&&console.error(C),g(C)}else g({message:mxResources.get("serviceUnavailableOrBlocked")})});
"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(m,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",m)})})})}):mxscript("js/extensions.min.js",m))};EditorUi.prototype.generateMermaidImage=function(d,
f,g,m){var q=this,y=function(){try{this.loadingMermaid=!1,f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig),f.securityLevel="strict",f.startOnLoad=!1,Editor.isDarkMode()&&(f.theme="dark"),mermaid.mermaidAPI.initialize(f),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),d,function(F){try{if(mxClient.IS_IE||mxClient.IS_IE11)F=F.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(F).getElementsByTagName("svg");
-if(0<C.length){var I=parseFloat(C[0].getAttribute("width")),G=parseFloat(C[0].getAttribute("height"));if(isNaN(I)||isNaN(G))try{var Y=C[0].getAttribute("viewBox").split(/\s+/);I=parseFloat(Y[2]);G=parseFloat(Y[3])}catch(ba){I=I||100,G=G||100}g(q.convertDataUri(Editor.createSvgDataUri(F)),I,G)}else m({message:mxResources.get("invalidInput")})}catch(ba){m(ba)}})}catch(F){m(F)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?y():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",
+if(0<C.length){var I=parseFloat(C[0].getAttribute("width")),G=parseFloat(C[0].getAttribute("height"));if(isNaN(I)||isNaN(G))try{var Z=C[0].getAttribute("viewBox").split(/\s+/);I=parseFloat(Z[2]);G=parseFloat(Z[3])}catch(ca){I=I||100,G=G||100}g(q.convertDataUri(Editor.createSvgDataUri(F)),I,G)}else m({message:mxResources.get("invalidInput")})}catch(ca){m(ca)}})}catch(F){m(F)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?y():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",
y):mxscript("js/extensions.min.js",y))};EditorUi.prototype.generatePlantUmlImage=function(d,f,g,m){function q(C,I,G){c1=C>>2;c2=(C&3)<<4|I>>4;c3=(I&15)<<2|G>>6;c4=G&63;r="";r+=y(c1&63);r+=y(c2&63);r+=y(c3&63);return r+=y(c4&63)}function y(C){if(10>C)return String.fromCharCode(48+C);C-=10;if(26>C)return String.fromCharCode(65+C);C-=26;if(26>C)return String.fromCharCode(97+C);C-=26;return 0==C?"-":1==C?"_":"?"}var F=new XMLHttpRequest;F.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/":
-PLANT_URL+"/svg/")+function(C){r="";for(i=0;i<C.length;i+=3)r=i+2==C.length?r+q(C.charCodeAt(i),C.charCodeAt(i+1),0):i+1==C.length?r+q(C.charCodeAt(i),0,0):r+q(C.charCodeAt(i),C.charCodeAt(i+1),C.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=f&&(F.responseType="blob");F.onload=function(C){if(200<=this.status&&300>this.status)if("txt"==f)g(this.response);else{var I=new FileReader;I.readAsDataURL(this.response);I.onloadend=function(G){var Y=new Image;Y.onload=
-function(){try{var ba=Y.width,Z=Y.height;if(0==ba&&0==Z){var X=I.result,qa=X.indexOf(","),Q=decodeURIComponent(escape(atob(X.substring(qa+1)))),W=mxUtils.parseXml(Q).getElementsByTagName("svg");0<W.length&&(ba=parseFloat(W[0].getAttribute("width")),Z=parseFloat(W[0].getAttribute("height")))}g(I.result,ba,Z)}catch(ha){m(ha)}};Y.src=I.result};I.onerror=function(G){m(G)}}else m(C)};F.onerror=function(C){m(C)};F.send()};EditorUi.prototype.insertAsPreText=function(d,f,g){var m=this.editor.graph,q=null;
-m.getModel().beginUpdate();try{q=m.insertVertex(null,null,"<pre>"+d+"</pre>",f,g,1,1,"text;html=1;align=left;verticalAlign=top;"),m.updateCellSize(q,!0)}finally{m.getModel().endUpdate()}return q};EditorUi.prototype.insertTextAt=function(d,f,g,m,q,y,F,C){y=null!=y?y:!0;F=null!=F?F:!0;if(null!=d)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(d.replace(/\s+/g," "),
-mxUtils.bind(this,function(Z){4==Z.readyState&&200<=Z.status&&299>=Z.status&&this.editor.graph.setSelectionCells(this.insertTextAt(Z.responseText,f,g,!0))}));else if("data:"==d.substring(0,5)||!this.isOffline()&&(q||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d))){var I=this.editor.graph;if("data:application/pdf;base64,"==d.substring(0,28)){var G=Editor.extractGraphModelFromPdf(d);if(null!=G&&0<G.length)return this.importXml(G,f,g,y,!0,C)}if(Editor.isPngDataUrl(d)&&(G=Editor.extractGraphModelFromPng(d),
-null!=G&&0<G.length))return this.importXml(G,f,g,y,!0,C);if("data:image/svg+xml;"==d.substring(0,19))try{G=null;"data:image/svg+xml;base64,"==d.substring(0,26)?(G=d.substring(d.indexOf(",")+1),G=window.atob&&!mxClient.IS_SF?atob(G):Base64.decode(G,!0)):G=decodeURIComponent(d.substring(d.indexOf(",")+1));var Y=this.importXml(G,f,g,y,!0,C);if(0<Y.length)return Y}catch(Z){}this.loadImage(d,mxUtils.bind(this,function(Z){if("data:"==d.substring(0,5))this.resizeImage(Z,d,mxUtils.bind(this,function(Q,W,
-ha){I.setSelectionCell(I.insertVertex(null,null,"",I.snap(f),I.snap(g),W,ha,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(Q)+";"))}),F,this.maxImageSize);else{var X=Math.min(1,Math.min(this.maxImageSize/Z.width,this.maxImageSize/Z.height)),qa=Math.round(Z.width*X);Z=Math.round(Z.height*X);I.setSelectionCell(I.insertVertex(null,null,"",I.snap(f),I.snap(g),qa,Z,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-d+";"))}}),mxUtils.bind(this,function(){var Z=null;I.getModel().beginUpdate();try{Z=I.insertVertex(I.getDefaultParent(),null,d,I.snap(f),I.snap(g),1,1,"text;"+(m?"html=1;":"")),I.updateCellSize(Z),I.fireEvent(new mxEventObject("textInserted","cells",[Z]))}finally{I.getModel().endUpdate()}I.setSelectionCell(Z)}))}else{d=Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,f,g,y,null,C);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this,
-function(Z){this.editor.graph.setSelectionCells(this.importXml(Z,f,g,y,null,C))}),mxUtils.bind(this,function(Z){this.handleError(Z)}));else{I=this.editor.graph;q=null;I.getModel().beginUpdate();try{q=I.insertVertex(I.getDefaultParent(),null,"",I.snap(f),I.snap(g),1,1,"text;whiteSpace=wrap;"+(m?"html=1;":""));I.fireEvent(new mxEventObject("textInserted","cells",[q]));"<"==d.charAt(0)&&d.indexOf(">")==d.length-1&&(d=mxUtils.htmlEntities(d));d.length>this.maxTextBytes&&(d=d.substring(0,this.maxTextBytes)+
-"...");q.value=d;I.updateCellSize(q);if(0<this.maxTextWidth&&q.geometry.width>this.maxTextWidth){var ba=I.getPreferredSizeForCell(q,this.maxTextWidth);q.geometry.width=ba.width;q.geometry.height=ba.height}Graph.isLink(q.value)&&I.setLinkForCell(q,q.value);q.geometry.width+=I.gridSize;q.geometry.height+=I.gridSize}finally{I.getModel().endUpdate()}return[q]}}return[]};EditorUi.prototype.formatFileSize=function(d){var f=-1;do d/=1024,f++;while(1024<d);return Math.max(d,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[f]};
+PLANT_URL+"/svg/")+function(C){r="";for(i=0;i<C.length;i+=3)r=i+2==C.length?r+q(C.charCodeAt(i),C.charCodeAt(i+1),0):i+1==C.length?r+q(C.charCodeAt(i),0,0):r+q(C.charCodeAt(i),C.charCodeAt(i+1),C.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=f&&(F.responseType="blob");F.onload=function(C){if(200<=this.status&&300>this.status)if("txt"==f)g(this.response);else{var I=new FileReader;I.readAsDataURL(this.response);I.onloadend=function(G){var Z=new Image;Z.onload=
+function(){try{var ca=Z.width,aa=Z.height;if(0==ca&&0==aa){var Y=I.result,pa=Y.indexOf(","),Q=decodeURIComponent(escape(atob(Y.substring(pa+1)))),X=mxUtils.parseXml(Q).getElementsByTagName("svg");0<X.length&&(ca=parseFloat(X[0].getAttribute("width")),aa=parseFloat(X[0].getAttribute("height")))}g(I.result,ca,aa)}catch(ha){m(ha)}};Z.src=I.result};I.onerror=function(G){m(G)}}else m(C)};F.onerror=function(C){m(C)};F.send()};EditorUi.prototype.insertAsPreText=function(d,f,g){var m=this.editor.graph,q=
+null;m.getModel().beginUpdate();try{q=m.insertVertex(null,null,"<pre>"+d+"</pre>",f,g,1,1,"text;html=1;align=left;verticalAlign=top;"),m.updateCellSize(q,!0)}finally{m.getModel().endUpdate()}return q};EditorUi.prototype.insertTextAt=function(d,f,g,m,q,y,F,C){y=null!=y?y:!0;F=null!=F?F:!0;if(null!=d)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(d.replace(/\s+/g,
+" "),mxUtils.bind(this,function(aa){4==aa.readyState&&200<=aa.status&&299>=aa.status&&this.editor.graph.setSelectionCells(this.insertTextAt(aa.responseText,f,g,!0))}));else if("data:"==d.substring(0,5)||!this.isOffline()&&(q||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d))){var I=this.editor.graph;if("data:application/pdf;base64,"==d.substring(0,28)){var G=Editor.extractGraphModelFromPdf(d);if(null!=G&&0<G.length)return this.importXml(G,f,g,y,!0,C)}if(Editor.isPngDataUrl(d)&&(G=Editor.extractGraphModelFromPng(d),
+null!=G&&0<G.length))return this.importXml(G,f,g,y,!0,C);if("data:image/svg+xml;"==d.substring(0,19))try{G=null;"data:image/svg+xml;base64,"==d.substring(0,26)?(G=d.substring(d.indexOf(",")+1),G=window.atob&&!mxClient.IS_SF?atob(G):Base64.decode(G,!0)):G=decodeURIComponent(d.substring(d.indexOf(",")+1));var Z=this.importXml(G,f,g,y,!0,C);if(0<Z.length)return Z}catch(aa){}this.loadImage(d,mxUtils.bind(this,function(aa){if("data:"==d.substring(0,5))this.resizeImage(aa,d,mxUtils.bind(this,function(Q,
+X,ha){I.setSelectionCell(I.insertVertex(null,null,"",I.snap(f),I.snap(g),X,ha,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(Q)+";"))}),F,this.maxImageSize);else{var Y=Math.min(1,Math.min(this.maxImageSize/aa.width,this.maxImageSize/aa.height)),pa=Math.round(aa.width*Y);aa=Math.round(aa.height*Y);I.setSelectionCell(I.insertVertex(null,null,"",I.snap(f),I.snap(g),pa,aa,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+d+";"))}}),mxUtils.bind(this,function(){var aa=null;I.getModel().beginUpdate();try{aa=I.insertVertex(I.getDefaultParent(),null,d,I.snap(f),I.snap(g),1,1,"text;"+(m?"html=1;":"")),I.updateCellSize(aa),I.fireEvent(new mxEventObject("textInserted","cells",[aa]))}finally{I.getModel().endUpdate()}I.setSelectionCell(aa)}))}else{d=Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,f,g,y,null,C);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this,
+function(aa){this.editor.graph.setSelectionCells(this.importXml(aa,f,g,y,null,C))}),mxUtils.bind(this,function(aa){this.handleError(aa)}));else{I=this.editor.graph;q=null;I.getModel().beginUpdate();try{q=I.insertVertex(I.getDefaultParent(),null,"",I.snap(f),I.snap(g),1,1,"text;whiteSpace=wrap;"+(m?"html=1;":""));I.fireEvent(new mxEventObject("textInserted","cells",[q]));"<"==d.charAt(0)&&d.indexOf(">")==d.length-1&&(d=mxUtils.htmlEntities(d));d.length>this.maxTextBytes&&(d=d.substring(0,this.maxTextBytes)+
+"...");q.value=d;I.updateCellSize(q);if(0<this.maxTextWidth&&q.geometry.width>this.maxTextWidth){var ca=I.getPreferredSizeForCell(q,this.maxTextWidth);q.geometry.width=ca.width;q.geometry.height=ca.height}Graph.isLink(q.value)&&I.setLinkForCell(q,q.value);q.geometry.width+=I.gridSize;q.geometry.height+=I.gridSize}finally{I.getModel().endUpdate()}return[q]}}return[]};EditorUi.prototype.formatFileSize=function(d){var f=-1;do d/=1024,f++;while(1024<d);return Math.max(d,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[f]};
EditorUi.prototype.convertDataUri=function(d){if("data:"==d.substring(0,5)){var f=d.indexOf(";");0<f&&(d=d.substring(0,f)+d.substring(d.indexOf(",",f+1)))}return d};EditorUi.prototype.isRemoteFileFormat=function(d,f){return/("contentType":\s*"application\/gliffy\+json")/.test(d)};EditorUi.prototype.isLucidChartData=function(d){return null!=d&&('{"state":"{\\"Properties\\":'==d.substring(0,26)||'{"Properties":'==d.substring(0,14))};EditorUi.prototype.importLocalFile=function(d,f){if(d&&Graph.fileSupport){if(null==
this.importFileInputElt){var g=document.createElement("input");g.setAttribute("type","file");mxEvent.addListener(g,"change",mxUtils.bind(this,function(){null!=g.files&&(this.importFiles(g.files,null,null,this.maxImageSize),g.type="",g.type="file",g.value="")}));g.style.display="none";document.body.appendChild(g);this.importFileInputElt=g}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(F,C){StorageFile.listFiles(this,
"F",F,C)});window.openBrowserFile=mxUtils.bind(this,function(F,C,I){StorageFile.getFileContent(this,F,C,I)});window.deleteBrowserFile=mxUtils.bind(this,function(F,C,I){StorageFile.deleteFile(this,F,C,I)});if(!f){var m=Editor.useLocalStorage;Editor.useLocalStorage=!d}window.openFile=new OpenFile(mxUtils.bind(this,function(F){this.hideDialog(F)}));window.openFile.setConsumer(mxUtils.bind(this,function(F,C){null!=C&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(C)?(F=new Blob([F],{type:"application/octet-stream"}),
this.importVisio(F,mxUtils.bind(this,function(I){this.importXml(I,0,0,!0)}),null,C)):this.editor.graph.setSelectionCells(this.importXml(F,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!f){var q=this.dialog,y=q.close;this.dialog.close=mxUtils.bind(this,function(F){Editor.useLocalStorage=m;y.apply(q,arguments);F&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};
-EditorUi.prototype.importZipFile=function(d,f,g){var m=this,q=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(y){if(mxUtils.isEmptyObject(y.files))g();else{var F=0,C,I=!1;y.forEach(function(G,Y){G=Y.name.toLowerCase();"diagram/diagram.xml"==G?(I=!0,Y.async("string").then(function(ba){0==ba.indexOf("<mxfile ")?f(ba):g()})):0==G.indexOf("versions/")&&(G=parseInt(G.substr(9)),G>F&&(F=G,C=Y))});0<F?C.async("string").then(function(G){(new XMLHttpRequest).upload&&
-m.isRemoteFileFormat(G,d.name)?m.isOffline()?m.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g):m.parseFileData(G,mxUtils.bind(this,function(Y){4==Y.readyState&&(200<=Y.status&&299>=Y.status?f(Y.responseText):g())}),d.name):g()}):I||g()}},function(y){g(y)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?q():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",q))};EditorUi.prototype.importFile=function(d,f,g,m,q,y,F,C,I,G,Y,ba){G=null!=
-G?G:!0;var Z=!1,X=null,qa=mxUtils.bind(this,function(Q){var W=null;null!=Q&&"<mxlibrary"==Q.substring(0,10)?this.loadLibrary(new LocalLibrary(this,Q,F)):W=this.importXml(Q,g,m,G,null,null!=ba?mxEvent.isControlDown(ba):null);null!=C&&C(W)});"image"==f.substring(0,5)?(I=!1,"image/png"==f.substring(0,9)&&(f=Y?null:this.extractGraphModelFromPng(d),null!=f&&0<f.length&&(X=this.importXml(f,g,m,G,null,null!=ba?mxEvent.isControlDown(ba):null),I=!0)),I||(f=this.editor.graph,I=d.indexOf(";"),0<I&&(d=d.substring(0,
-I)+d.substring(d.indexOf(",",I+1))),G&&f.isGridEnabled()&&(g=f.snap(g),m=f.snap(m)),X=[f.insertVertex(null,null,"",g,m,q,y,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+d+";")])):/(\.*<graphml )/.test(d)?(Z=!0,this.importGraphML(d,qa)):null!=I&&null!=F&&(/(\.v(dx|sdx?))($|\?)/i.test(F)||/(\.vs(x|sx?))($|\?)/i.test(F))?(Z=!0,this.importVisio(I,qa)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,F)?this.isOffline()?
-this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(Z=!0,q=mxUtils.bind(this,function(Q){4==Q.readyState&&(200<=Q.status&&299>=Q.status?qa(Q.responseText):null!=C&&C(null))}),null!=d?this.parseFileData(d,q,F):this.parseFile(I,q,F)):0==d.indexOf("PK")&&null!=I?(Z=!0,this.importZipFile(I,qa,mxUtils.bind(this,function(){X=this.insertTextAt(this.validateFileData(d),g,m,!0,null,G);C(X)}))):/(\.v(sd|dx))($|\?)/i.test(F)||/(\.vs(s|x))($|\?)/i.test(F)||(X=this.insertTextAt(this.validateFileData(d),
-g,m,!0,null,G,null,null!=ba?mxEvent.isControlDown(ba):null));Z||null==C||C(X);return X};EditorUi.prototype.importFiles=function(d,f,g,m,q,y,F,C,I,G,Y,ba,Z){m=null!=m?m:this.maxImageSize;G=null!=G?G:this.maxImageBytes;var X=null!=f&&null!=g,qa=!0;f=null!=f?f:0;g=null!=g?g:0;var Q=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var W=Y||this.resampleThreshold,ha=0;ha<d.length;ha++)if("image/svg"!==d[ha].type.substring(0,9)&&"image/"===d[ha].type.substring(0,6)&&d[ha].size>W){Q=!0;break}var la=mxUtils.bind(this,
-function(){var ja=this.editor.graph,U=ja.gridSize;q=null!=q?q:mxUtils.bind(this,function(ma,u,H,P,S,R,ca,ea,fa){try{return null!=ma&&"<mxlibrary"==ma.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,ma,ca)),null):this.importFile(ma,u,H,P,S,R,ca,ea,fa,X,ba,Z)}catch(ra){return this.handleError(ra),null}});y=null!=y?y:mxUtils.bind(this,function(ma){ja.setSelectionCells(ma)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var L=d.length,da=L,O=[],N=mxUtils.bind(this,
-function(ma,u){O[ma]=u;if(0==--da){this.spinner.stop();if(null!=C)C(O);else{var H=[];ja.getModel().beginUpdate();try{for(ma=0;ma<O.length;ma++){var P=O[ma]();null!=P&&(H=H.concat(P))}}finally{ja.getModel().endUpdate()}}y(H)}}),aa=0;aa<L;aa++)mxUtils.bind(this,function(ma){var u=d[ma];if(null!=u){var H=new FileReader;H.onload=mxUtils.bind(this,function(P){if(null==F||F(u))if("image/"==u.type.substring(0,6))if("image/svg"==u.type.substring(0,9)){var S=Graph.clipSvgDataUri(P.target.result),R=S.indexOf(",");
-R=decodeURIComponent(escape(atob(S.substring(R+1))));var ca=mxUtils.parseXml(R);R=ca.getElementsByTagName("svg");if(0<R.length){R=R[0];var ea=ba?null:R.getAttribute("content");null!=ea&&"<"!=ea.charAt(0)&&"%"!=ea.charAt(0)&&(ea=unescape(window.atob?atob(ea):Base64.decode(ea,!0)));null!=ea&&"%"==ea.charAt(0)&&(ea=decodeURIComponent(ea));null==ea||"<mxfile "!==ea.substring(0,8)&&"<mxGraphModel "!==ea.substring(0,14)?N(ma,mxUtils.bind(this,function(){try{if(null!=ca){var ua=ca.getElementsByTagName("svg");
-if(0<ua.length){var sa=ua[0],Aa=sa.getAttribute("width"),Ca=sa.getAttribute("height");Aa=null!=Aa&&"%"!=Aa.charAt(Aa.length-1)?parseFloat(Aa):NaN;Ca=null!=Ca&&"%"!=Ca.charAt(Ca.length-1)?parseFloat(Ca):NaN;var Ba=sa.getAttribute("viewBox");if(null==Ba||0==Ba.length)sa.setAttribute("viewBox","0 0 "+Aa+" "+Ca);else if(isNaN(Aa)||isNaN(Ca)){var ta=Ba.split(" ");3<ta.length&&(Aa=parseFloat(ta[2]),Ca=parseFloat(ta[3]))}S=Editor.createSvgDataUri(mxUtils.getXml(sa));var Pa=Math.min(1,Math.min(m/Math.max(1,
-Aa)),m/Math.max(1,Ca)),Ta=q(S,u.type,f+ma*U,g+ma*U,Math.max(1,Math.round(Aa*Pa)),Math.max(1,Math.round(Ca*Pa)),u.name);if(isNaN(Aa)||isNaN(Ca)){var Oa=new Image;Oa.onload=mxUtils.bind(this,function(){Aa=Math.max(1,Oa.width);Ca=Math.max(1,Oa.height);Ta[0].geometry.width=Aa;Ta[0].geometry.height=Ca;sa.setAttribute("viewBox","0 0 "+Aa+" "+Ca);S=Editor.createSvgDataUri(mxUtils.getXml(sa));var Xa=S.indexOf(";");0<Xa&&(S=S.substring(0,Xa)+S.substring(S.indexOf(",",Xa+1)));ja.setCellStyles("image",S,[Ta[0]])});
-Oa.src=Editor.createSvgDataUri(mxUtils.getXml(sa))}return Ta}}}catch(Xa){}return null})):N(ma,mxUtils.bind(this,function(){return q(ea,"text/xml",f+ma*U,g+ma*U,0,0,u.name)}))}else N(ma,mxUtils.bind(this,function(){return null}))}else{R=!1;if("image/png"==u.type){var fa=ba?null:this.extractGraphModelFromPng(P.target.result);if(null!=fa&&0<fa.length){var ra=new Image;ra.src=P.target.result;N(ma,mxUtils.bind(this,function(){return q(fa,"text/xml",f+ma*U,g+ma*U,ra.width,ra.height,u.name)}));R=!0}}R||
-(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(P.target.result,mxUtils.bind(this,function(ua){this.resizeImage(ua,P.target.result,mxUtils.bind(this,function(sa,Aa,Ca){N(ma,mxUtils.bind(this,function(){if(null!=sa&&sa.length<G){var Ba=qa&&this.isResampleImageSize(u.size,
-Y)?Math.min(1,Math.min(m/Aa,m/Ca)):1;return q(sa,u.type,f+ma*U,g+ma*U,Math.round(Aa*Ba),Math.round(Ca*Ba),u.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),qa,m,Y,u.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else S=P.target.result,q(S,u.type,f+ma*U,g+ma*U,240,160,u.name,function(ua){N(ma,function(){return ua})},u)});/(\.v(dx|sdx?))($|\?)/i.test(u.name)||/(\.vs(x|sx?))($|\?)/i.test(u.name)?q(null,u.type,
-f+ma*U,g+ma*U,240,160,u.name,function(P){N(ma,function(){return P})},u):"image"==u.type.substring(0,5)||"application/pdf"==u.type?H.readAsDataURL(u):H.readAsText(u)}})(aa)});if(Q){Q=[];for(ha=0;ha<d.length;ha++)Q.push(d[ha]);d=Q;this.confirmImageResize(function(ja){qa=ja;la()},I)}else la()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=
+EditorUi.prototype.importZipFile=function(d,f,g){var m=this,q=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(y){if(mxUtils.isEmptyObject(y.files))g();else{var F=0,C,I=!1;y.forEach(function(G,Z){G=Z.name.toLowerCase();"diagram/diagram.xml"==G?(I=!0,Z.async("string").then(function(ca){0==ca.indexOf("<mxfile ")?f(ca):g()})):0==G.indexOf("versions/")&&(G=parseInt(G.substr(9)),G>F&&(F=G,C=Z))});0<F?C.async("string").then(function(G){(new XMLHttpRequest).upload&&
+m.isRemoteFileFormat(G,d.name)?m.isOffline()?m.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g):m.parseFileData(G,mxUtils.bind(this,function(Z){4==Z.readyState&&(200<=Z.status&&299>=Z.status?f(Z.responseText):g())}),d.name):g()}):I||g()}},function(y){g(y)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?q():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",q))};EditorUi.prototype.importFile=function(d,f,g,m,q,y,F,C,I,G,Z,ca){G=null!=
+G?G:!0;var aa=!1,Y=null,pa=mxUtils.bind(this,function(Q){var X=null;null!=Q&&"<mxlibrary"==Q.substring(0,10)?this.loadLibrary(new LocalLibrary(this,Q,F)):X=this.importXml(Q,g,m,G,null,null!=ca?mxEvent.isControlDown(ca):null);null!=C&&C(X)});"image"==f.substring(0,5)?(I=!1,"image/png"==f.substring(0,9)&&(f=Z?null:this.extractGraphModelFromPng(d),null!=f&&0<f.length&&(Y=this.importXml(f,g,m,G,null,null!=ca?mxEvent.isControlDown(ca):null),I=!0)),I||(f=this.editor.graph,I=d.indexOf(";"),0<I&&(d=d.substring(0,
+I)+d.substring(d.indexOf(",",I+1))),G&&f.isGridEnabled()&&(g=f.snap(g),m=f.snap(m)),Y=[f.insertVertex(null,null,"",g,m,q,y,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+d+";")])):/(\.*<graphml )/.test(d)?(aa=!0,this.importGraphML(d,pa)):null!=I&&null!=F&&(/(\.v(dx|sdx?))($|\?)/i.test(F)||/(\.vs(x|sx?))($|\?)/i.test(F))?(aa=!0,this.importVisio(I,pa)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,F)?this.isOffline()?
+this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(aa=!0,q=mxUtils.bind(this,function(Q){4==Q.readyState&&(200<=Q.status&&299>=Q.status?pa(Q.responseText):null!=C&&C(null))}),null!=d?this.parseFileData(d,q,F):this.parseFile(I,q,F)):0==d.indexOf("PK")&&null!=I?(aa=!0,this.importZipFile(I,pa,mxUtils.bind(this,function(){Y=this.insertTextAt(this.validateFileData(d),g,m,!0,null,G);C(Y)}))):/(\.v(sd|dx))($|\?)/i.test(F)||/(\.vs(s|x))($|\?)/i.test(F)||(Y=this.insertTextAt(this.validateFileData(d),
+g,m,!0,null,G,null,null!=ca?mxEvent.isControlDown(ca):null));aa||null==C||C(Y);return Y};EditorUi.prototype.importFiles=function(d,f,g,m,q,y,F,C,I,G,Z,ca,aa){m=null!=m?m:this.maxImageSize;G=null!=G?G:this.maxImageBytes;var Y=null!=f&&null!=g,pa=!0;f=null!=f?f:0;g=null!=g?g:0;var Q=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var X=Z||this.resampleThreshold,ha=0;ha<d.length;ha++)if("image/svg"!==d[ha].type.substring(0,9)&&"image/"===d[ha].type.substring(0,6)&&d[ha].size>X){Q=!0;break}var U=mxUtils.bind(this,
+function(){var ma=this.editor.graph,T=ma.gridSize;q=null!=q?q:mxUtils.bind(this,function(la,u,H,P,W,R,da,fa,ea){try{return null!=la&&"<mxlibrary"==la.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,la,da)),null):this.importFile(la,u,H,P,W,R,da,fa,ea,Y,ca,aa)}catch(qa){return this.handleError(qa),null}});y=null!=y?y:mxUtils.bind(this,function(la){ma.setSelectionCells(la)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var M=d.length,ia=M,N=[],O=mxUtils.bind(this,
+function(la,u){N[la]=u;if(0==--ia){this.spinner.stop();if(null!=C)C(N);else{var H=[];ma.getModel().beginUpdate();try{for(la=0;la<N.length;la++){var P=N[la]();null!=P&&(H=H.concat(P))}}finally{ma.getModel().endUpdate()}}y(H)}}),ba=0;ba<M;ba++)mxUtils.bind(this,function(la){var u=d[la];if(null!=u){var H=new FileReader;H.onload=mxUtils.bind(this,function(P){if(null==F||F(u))if("image/"==u.type.substring(0,6))if("image/svg"==u.type.substring(0,9)){var W=Graph.clipSvgDataUri(P.target.result),R=W.indexOf(",");
+R=decodeURIComponent(escape(atob(W.substring(R+1))));var da=mxUtils.parseXml(R);R=da.getElementsByTagName("svg");if(0<R.length){R=R[0];var fa=ca?null:R.getAttribute("content");null!=fa&&"<"!=fa.charAt(0)&&"%"!=fa.charAt(0)&&(fa=unescape(window.atob?atob(fa):Base64.decode(fa,!0)));null!=fa&&"%"==fa.charAt(0)&&(fa=decodeURIComponent(fa));null==fa||"<mxfile "!==fa.substring(0,8)&&"<mxGraphModel "!==fa.substring(0,14)?O(la,mxUtils.bind(this,function(){try{if(null!=da){var va=da.getElementsByTagName("svg");
+if(0<va.length){var ua=va[0],Aa=ua.getAttribute("width"),za=ua.getAttribute("height");Aa=null!=Aa&&"%"!=Aa.charAt(Aa.length-1)?parseFloat(Aa):NaN;za=null!=za&&"%"!=za.charAt(za.length-1)?parseFloat(za):NaN;var Ca=ua.getAttribute("viewBox");if(null==Ca||0==Ca.length)ua.setAttribute("viewBox","0 0 "+Aa+" "+za);else if(isNaN(Aa)||isNaN(za)){var sa=Ca.split(" ");3<sa.length&&(Aa=parseFloat(sa[2]),za=parseFloat(sa[3]))}W=Editor.createSvgDataUri(mxUtils.getXml(ua));var Va=Math.min(1,Math.min(m/Math.max(1,
+Aa)),m/Math.max(1,za)),Ua=q(W,u.type,f+la*T,g+la*T,Math.max(1,Math.round(Aa*Va)),Math.max(1,Math.round(za*Va)),u.name);if(isNaN(Aa)||isNaN(za)){var Ra=new Image;Ra.onload=mxUtils.bind(this,function(){Aa=Math.max(1,Ra.width);za=Math.max(1,Ra.height);Ua[0].geometry.width=Aa;Ua[0].geometry.height=za;ua.setAttribute("viewBox","0 0 "+Aa+" "+za);W=Editor.createSvgDataUri(mxUtils.getXml(ua));var Za=W.indexOf(";");0<Za&&(W=W.substring(0,Za)+W.substring(W.indexOf(",",Za+1)));ma.setCellStyles("image",W,[Ua[0]])});
+Ra.src=Editor.createSvgDataUri(mxUtils.getXml(ua))}return Ua}}}catch(Za){}return null})):O(la,mxUtils.bind(this,function(){return q(fa,"text/xml",f+la*T,g+la*T,0,0,u.name)}))}else O(la,mxUtils.bind(this,function(){return null}))}else{R=!1;if("image/png"==u.type){var ea=ca?null:this.extractGraphModelFromPng(P.target.result);if(null!=ea&&0<ea.length){var qa=new Image;qa.src=P.target.result;O(la,mxUtils.bind(this,function(){return q(ea,"text/xml",f+la*T,g+la*T,qa.width,qa.height,u.name)}));R=!0}}R||
+(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(P.target.result,mxUtils.bind(this,function(va){this.resizeImage(va,P.target.result,mxUtils.bind(this,function(ua,Aa,za){O(la,mxUtils.bind(this,function(){if(null!=ua&&ua.length<G){var Ca=pa&&this.isResampleImageSize(u.size,
+Z)?Math.min(1,Math.min(m/Aa,m/za)):1;return q(ua,u.type,f+la*T,g+la*T,Math.round(Aa*Ca),Math.round(za*Ca),u.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),pa,m,Z,u.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else W=P.target.result,q(W,u.type,f+la*T,g+la*T,240,160,u.name,function(va){O(la,function(){return va})},u)});/(\.v(dx|sdx?))($|\?)/i.test(u.name)||/(\.vs(x|sx?))($|\?)/i.test(u.name)?q(null,u.type,
+f+la*T,g+la*T,240,160,u.name,function(P){O(la,function(){return P})},u):"image"==u.type.substring(0,5)||"application/pdf"==u.type?H.readAsDataURL(u):H.readAsText(u)}})(ba)});if(Q){Q=[];for(ha=0;ha<d.length;ha++)Q.push(d[ha]);d=Q;this.confirmImageResize(function(ma){pa=ma;U()},I)}else U()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=
function(d,f){f=null!=f?f:!1;var g=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},m=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,q=function(y,F){if(y||f)mxSettings.setResizeImages(y?F:null),mxSettings.save();g();d(F)};null==m||f?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(y){q(y,!0)},function(y){q(y,!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):q(!1,m)};EditorUi.prototype.parseFile=function(d,f,g){g=null!=g?g:d.name;var m=new FileReader;m.onload=mxUtils.bind(this,function(){this.parseFileData(m.result,f,g)});m.readAsText(d)};EditorUi.prototype.parseFileData=function(d,f,g){var m=new XMLHttpRequest;m.open("POST",OPEN_URL);m.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
m.onreadystatechange=function(){f(m)};m.send("format=xml&filename="+encodeURIComponent(g)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(q){}};EditorUi.prototype.isResampleImageSize=function(d,f){f=null!=f?f:this.resampleThreshold;return d>f};EditorUi.prototype.resizeImage=function(d,f,g,m,q,y,F){q=null!=q?q:this.maxImageSize;var C=Math.max(1,d.width),I=Math.max(1,d.height);if(m&&this.isResampleImageSize(null!=F?F:f.length,y))try{var G=
-Math.max(C/q,I/q);if(1<G){var Y=Math.round(C/G),ba=Math.round(I/G),Z=document.createElement("canvas");Z.width=Y;Z.height=ba;Z.getContext("2d").drawImage(d,0,0,Y,ba);var X=Z.toDataURL();if(X.length<f.length){var qa=document.createElement("canvas");qa.width=Y;qa.height=ba;var Q=qa.toDataURL();X!==Q&&(f=X,C=Y,I=ba)}}}catch(W){}g(f,C,I)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,f,g){try{var m=new Image;m.onload=
-function(){m.width=0<m.width?m.width:120;m.height=0<m.height?m.height:120;f(m)};null!=g&&(m.onerror=g);m.src=d}catch(q){if(null!=g)g(q);else throw q;}};EditorUi.prototype.getDefaultSketchMode=function(){var d="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?urlParams.rough:d)};var D=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:this.getDefaultSketchMode()),null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());var d=this,f=this.editor.graph;Editor.isDarkMode()&&(f.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);Graph.touchStyle&&(f.panningHandler.isPanningTrigger=function(W){var ha=W.getEvent();return null==W.getState()&&
-!mxEvent.isMouseEvent(ha)&&!f.freehand.isDrawing()||mxEvent.isPopupTrigger(ha)&&(null==W.getState()||mxEvent.isControlDown(ha)||mxEvent.isShiftDown(ha))});f.cellEditor.editPlantUmlData=function(W,ha,la){var ja=JSON.parse(la);ha=new TextareaDialog(d,mxResources.get("plantUml")+":",ja.data,function(U){null!=U&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(U,ja.format,function(L,da,O){d.spinner.stop();f.getModel().beginUpdate();try{if("txt"==ja.format)f.labelChanged(W,
-"<pre>"+L+"</pre>"),f.updateCellSize(W,!0);else{f.setCellStyles("image",d.convertDataUri(L),[W]);var N=f.model.getGeometry(W);null!=N&&(N=N.clone(),N.width=da,N.height=O,f.cellsResized([W],[N],!1))}f.setAttributeForCell(W,"plantUmlData",JSON.stringify({data:U,format:ja.format}))}finally{f.getModel().endUpdate()}},function(L){d.handleError(L)})},null,null,400,220);d.showDialog(ha.container,420,300,!0,!0);ha.init()};f.cellEditor.editMermaidData=function(W,ha,la){var ja=JSON.parse(la);ha=new TextareaDialog(d,
-mxResources.get("mermaid")+":",ja.data,function(U){null!=U&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(U,ja.config,function(L,da,O){d.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",L,[W]);var N=f.model.getGeometry(W);null!=N&&(N=N.clone(),N.width=Math.max(N.width,da),N.height=Math.max(N.height,O),f.cellsResized([W],[N],!1));f.setAttributeForCell(W,"mermaidData",JSON.stringify({data:U,config:ja.config},null,2))}finally{f.getModel().endUpdate()}},
-function(L){d.handleError(L)})},null,null,400,220);d.showDialog(ha.container,420,300,!0,!0);ha.init()};var g=f.cellEditor.startEditing;f.cellEditor.startEditing=function(W,ha){try{var la=this.graph.getAttributeForCell(W,"plantUmlData");if(null!=la)this.editPlantUmlData(W,ha,la);else if(la=this.graph.getAttributeForCell(W,"mermaidData"),null!=la)this.editMermaidData(W,ha,la);else{var ja=f.getCellStyle(W);"1"==mxUtils.getValue(ja,"metaEdit","0")?d.showDataDialog(W):g.apply(this,arguments)}}catch(U){d.handleError(U)}};
-f.getLinkTitle=function(W){return d.getLinkTitle(W)};f.customLinkClicked=function(W){var ha=!1;try{d.handleCustomLink(W),ha=!0}catch(la){d.handleError(la)}return ha};var m=f.parseBackgroundImage;f.parseBackgroundImage=function(W){var ha=m.apply(this,arguments);null!=ha&&null!=ha.src&&Graph.isPageLink(ha.src)&&(ha={originalSrc:ha.src});return ha};var q=f.setBackgroundImage;f.setBackgroundImage=function(W){null!=W&&null!=W.originalSrc&&(W=d.createImageForPageLink(W.originalSrc,d.currentPage,this));
-q.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(W,ha){W=null!=f.backgroundImage?f.backgroundImage.originalSrc:null;if(null!=W){var la=W.indexOf(",");if(0<la)for(W=W.substring(la+1),ha=ha.getProperty("patches"),la=0;la<ha.length;la++)if(null!=ha[la][EditorUi.DIFF_UPDATE]&&
-null!=ha[la][EditorUi.DIFF_UPDATE][W]||null!=ha[la][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(ha[la][EditorUi.DIFF_REMOVE],W)){f.refreshBackgroundImage();break}}}));var y=f.getBackgroundImageObject;f.getBackgroundImageObject=function(W,ha){var la=y.apply(this,arguments);if(null!=la&&null!=la.originalSrc)if(!ha)la={src:la.originalSrc};else if(ha&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var ja=this.stylesheet,U=this.shapeForegroundColor,L=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();
-this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";la=d.createImageForPageLink(la.originalSrc);this.shapeBackgroundColor=L;this.shapeForegroundColor=U;this.stylesheet=ja}return la};var F=this.clearDefaultStyle;this.clearDefaultStyle=function(){F.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 C=d.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(W){W=null!=W?W:"";"1"==urlParams.dev&&(W+=(0<W.length?"&":"?")+"dev=1");return C.apply(this,arguments)};var I=f.addClickHandler;f.addClickHandler=function(W,ha,la){var ja=ha;ha=function(U,L){if(null==L){var da=mxEvent.getSource(U);"a"==da.nodeName.toLowerCase()&&(L=da.getAttribute("href"))}null!=L&&f.isCustomLink(L)&&(mxEvent.isTouchEvent(U)||
-!mxEvent.isPopupTrigger(U))&&f.customLinkClicked(L)&&mxEvent.consume(U);null!=ja&&ja(U,L)};I.call(this,W,ha,la)};D.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var G=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(W,ha,la){d.editor.graph.isSelectionEmpty()?G.apply(this,arguments):d.menus.addMenuItems(W,"delete - cut copy copyAsImage - duplicate".split(" "),null,la)}}d.actions.get("print").funct=
-function(){d.showDialog((new PrintDialog(d)).container,360,null!=d.pages&&1<d.pages.length?470:390,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var Y=f.getExportVariables;f.getExportVariables=function(){var W=Y.apply(this,arguments),ha=d.getCurrentFile();null!=ha&&(W.filename=ha.getTitle());W.pagecount=null!=d.pages?d.pages.length:1;W.page=null!=d.currentPage?d.currentPage.getName():"";W.pagenumber=null!=d.pages&&null!=d.currentPage?mxUtils.indexOf(d.pages,d.currentPage)+1:1;return W};
-var ba=f.getGlobalVariable;f.getGlobalVariable=function(W){var ha=d.getCurrentFile();return"filename"==W&&null!=ha?ha.getTitle():"page"==W&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==W?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+1:1:"pagecount"==W?null!=d.pages?d.pages.length:1:ba.apply(this,arguments)};var Z=f.labelLinkClicked;f.labelLinkClicked=function(W,ha,la){var ja=ha.getAttribute("href");if(null==ja||!f.isCustomLink(ja)||!mxEvent.isTouchEvent(la)&&
-mxEvent.isPopupTrigger(la))Z.apply(this,arguments);else{if(!f.isEnabled()||null!=W&&f.isCellLocked(W.cell))f.customLinkClicked(ja),f.getRubberband().reset();mxEvent.consume(la)}};this.editor.getOrCreateFilename=function(){var W=d.defaultFilename,ha=d.getCurrentFile();null!=ha&&(W=null!=ha.getTitle()?ha.getTitle():W);return W};var X=this.actions.get("print");X.setEnabled(!mxClient.IS_IOS||!navigator.standalone);X.visible=X.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,
-!0,"findReplace"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"insertRectangle"),this.keyHandler.bindAction(75,!0,"insertEllipse",!0),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));
-this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&f.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(W){var ha=f.cellEditor.text2,la=null;null!=ha&&(mxEvent.addListener(ha,"dragleave",function(ja){null!=la&&(la.parentNode.removeChild(la),la=null);ja.stopPropagation();ja.preventDefault()}),mxEvent.addListener(ha,"dragover",mxUtils.bind(this,function(ja){null==la&&(!mxClient.IS_IE||10<document.documentMode)&&(la=this.highlightElement(ha));ja.stopPropagation();ja.preventDefault()})),
-mxEvent.addListener(ha,"drop",mxUtils.bind(this,function(ja){null!=la&&(la.parentNode.removeChild(la),la=null);if(0<ja.dataTransfer.files.length)this.importFiles(ja.dataTransfer.files,0,0,this.maxImageSize,function(L,da,O,N,aa,ma){f.insertImage(L,aa,ma)},function(){},function(L){return"image/"==L.type.substring(0,6)},function(L){for(var da=0;da<L.length;da++)L[da]()},mxEvent.isControlDown(ja));else if(0<=mxUtils.indexOf(ja.dataTransfer.types,"text/uri-list")){var U=ja.dataTransfer.getData("text/uri-list");
-/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(U)?this.loadImage(decodeURIComponent(U),mxUtils.bind(this,function(L){var da=Math.max(1,L.width);L=Math.max(1,L.height);var O=this.maxImageSize;O=Math.min(1,Math.min(O/Math.max(1,da)),O/Math.max(1,L));f.insertImage(decodeURIComponent(U),da*O,L*O)})):document.execCommand("insertHTML",!1,ja.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(ja.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,ja.dataTransfer.getData("text/html")):0<=
-mxUtils.indexOf(ja.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,ja.dataTransfer.getData("text/plain"));ja.stopPropagation();ja.preventDefault()})))}));this.isSettingsEnabled()&&(X=this.editor.graph.view,X.setUnit(mxSettings.getUnit()),X.addListener("unitChanged",function(W,ha){mxSettings.setUnit(ha.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&
-!this.editor.editable?null:new mxDualRuler(this,X.unit),this.refresh());if("1"==urlParams.styledev){X=document.getElementById("geFooter");null!=X&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",
-mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),X.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(W,ha){0<this.editor.graph.getSelectionCount()?(W=this.editor.graph.getSelectionCell(),W=this.editor.graph.getModel().getStyle(W),this.styleInput.value=W||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var qa=
-this.isSelectionAllowed;this.isSelectionAllowed=function(W){return mxEvent.getSource(W)==this.styleInput?!0:qa.apply(this,arguments)}}X=document.getElementById("geInfo");null!=X&&X.parentNode.removeChild(X);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var Q=null;mxEvent.addListener(f.container,"dragleave",function(W){f.isEnabled()&&(null!=Q&&(Q.parentNode.removeChild(Q),Q=null),W.stopPropagation(),W.preventDefault())});mxEvent.addListener(f.container,"dragover",mxUtils.bind(this,
-function(W){null==Q&&(!mxClient.IS_IE||10<document.documentMode)&&(Q=this.highlightElement(f.container));null!=this.sidebar&&this.sidebar.hideTooltip();W.stopPropagation();W.preventDefault()}));mxEvent.addListener(f.container,"drop",mxUtils.bind(this,function(W){null!=Q&&(Q.parentNode.removeChild(Q),Q=null);if(f.isEnabled()){var ha=mxUtils.convertPoint(f.container,mxEvent.getClientX(W),mxEvent.getClientY(W)),la=W.dataTransfer.files,ja=f.view.translate,U=f.view.scale,L=ha.x/U-ja.x,da=ha.y/U-ja.y;if(0<
-la.length)ha=1==la.length&&this.isBlankFile()&&!this.canUndo()&&("image/svg"===la[0].type.substring(0,9)||"image/"!==la[0].type.substring(0,6)||/(\.drawio.png)$/i.test(la[0].name)),"1"!=urlParams.embed&&(mxEvent.isShiftDown(W)||ha)?(!mxEvent.isShiftDown(W)&&ha&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(la,!0)):(mxEvent.isAltDown(W)&&(da=L=null),this.importFiles(la,L,da,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(W),null,null,mxEvent.isShiftDown(W),W));else{mxEvent.isAltDown(W)&&
-(da=L=0);var O=0<=mxUtils.indexOf(W.dataTransfer.types,"text/uri-list")?W.dataTransfer.getData("text/uri-list"):null;la=this.extractGraphModelFromEvent(W,null!=this.pages);if(null!=la)f.setSelectionCells(this.importXml(la,L,da,!0));else if(0<=mxUtils.indexOf(W.dataTransfer.types,"text/html")){var N=W.dataTransfer.getData("text/html");la=document.createElement("div");la.innerHTML=f.sanitizeHtml(N);var aa=null;ha=la.getElementsByTagName("img");null!=ha&&1==ha.length?(N=ha[0].getAttribute("src"),null==
-N&&(N=ha[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(N)||(aa=!0)):(ha=la.getElementsByTagName("a"),null!=ha&&1==ha.length?N=ha[0].getAttribute("href"):(la=la.getElementsByTagName("pre"),null!=la&&1==la.length&&(N=mxUtils.getTextContent(la[0]))));var ma=!0,u=mxUtils.bind(this,function(){f.setSelectionCells(this.insertTextAt(N,L,da,!0,aa,null,ma,mxEvent.isControlDown(W)))});aa&&null!=N&&N.length>this.resampleThreshold?this.confirmImageResize(function(H){ma=H;u()},mxEvent.isControlDown(W)):
-u()}else null!=O&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(O)?this.loadImage(decodeURIComponent(O),mxUtils.bind(this,function(H){var P=Math.max(1,H.width);H=Math.max(1,H.height);var S=this.maxImageSize;S=Math.min(1,Math.min(S/Math.max(1,P)),S/Math.max(1,H));f.setSelectionCell(f.insertVertex(null,null,"",L,da,P*S,H*S,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+O+";"))}),mxUtils.bind(this,function(H){f.setSelectionCells(this.insertTextAt(O,
-L,da,!0))})):0<=mxUtils.indexOf(W.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(W.dataTransfer.getData("text/plain"),L,da,!0))}}W.stopPropagation();W.preventDefault()}),!1)}f.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var d=this.editor.graph;d.container.addEventListener("paste",mxUtils.bind(this,function(f){if(!mxEvent.isConsumed(f))try{for(var g=
-f.clipboardData||f.originalEvent.clipboardData,m=!1,q=0;q<g.types.length;q++)if("text/"===g.types[q].substring(0,5)){m=!0;break}if(!m){var y=g.items;for(index in y){var F=y[index];if("file"===F.kind){if(d.isEditing())this.importFiles([F.getAsFile()],0,0,this.maxImageSize,function(I,G,Y,ba,Z,X){d.insertImage(I,Z,X)},function(){},function(I){return"image/"==I.type.substring(0,6)},function(I){for(var G=0;G<I.length;G++)I[G]()});else{var C=this.editor.graph.getInsertPoint();this.importFiles([F.getAsFile()],
-C.x,C.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(I){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function d(){window.setTimeout(function(){g.innerHTML="&nbsp;";g.focus();document.execCommand("selectAll",!1,null)},0)}var f=this.editor.graph,g=document.createElement("div");g.setAttribute("autocomplete","off");g.setAttribute("autocorrect","off");g.setAttribute("autocapitalize","off");g.setAttribute("spellcheck","false");g.style.textRendering="optimizeSpeed";g.style.fontFamily=
-"monospace";g.style.wordBreak="break-all";g.style.background="transparent";g.style.color="transparent";g.style.position="absolute";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.display="block";g.style.fontSize="1";g.style.zIndex="-1";g.style.resize="none";g.style.outline="none";g.style.width="1px";g.style.height="1px";mxUtils.setOpacity(g,0);g.contentEditable=!0;g.innerHTML="&nbsp;";var m=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,
-null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(y){var F=mxEvent.getSource(y);null==f.container||!f.isEnabled()||f.isMouseDown||f.isEditing()||null!=this.dialog||"INPUT"==F.nodeName||"TEXTAREA"==F.nodeName||224!=y.keyCode&&(mxClient.IS_MAC||17!=y.keyCode)&&(!mxClient.IS_MAC||91!=y.keyCode&&93!=y.keyCode)||m||(g.style.left=f.container.scrollLeft+10+"px",g.style.top=f.container.scrollTop+10+"px",f.container.appendChild(g),m=!0,g.focus(),document.execCommand("selectAll",!1,null))}));
-mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(y){var F=y.keyCode;window.setTimeout(mxUtils.bind(this,function(){!m||224!=F&&17!=F&&91!=F&&93!=F||(m=!1,f.isEditing()||null!=this.dialog||null==f.container||f.container.focus(),g.parentNode.removeChild(g),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(g,"copy",mxUtils.bind(this,function(y){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(g),d()}catch(F){this.handleError(F)}}));mxEvent.addListener(g,"cut",
-mxUtils.bind(this,function(y){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(g,!0),d()}catch(F){this.handleError(F)}}));mxEvent.addListener(g,"paste",mxUtils.bind(this,function(y){f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&(g.innerHTML="&nbsp;",g.focus(),null!=y.clipboardData&&this.pasteCells(y,g,!0,!0),mxEvent.isConsumed(y)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(y,g,!1,!0)}),0))}),!0);var q=this.isSelectionAllowed;this.isSelectionAllowed=function(y){return mxEvent.getSource(y)==
-g?!0:q.apply(this,arguments)}};EditorUi.prototype.setSketchMode=function(d){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(d);null==urlParams.rough&&(mxSettings.settings.sketchMode=d,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};EditorUi.prototype.setPagesVisible=function(d){Editor.pagesVisible!=d&&(Editor.pagesVisible=d,mxSettings.settings.pagesVisible=d,mxSettings.save(),
-this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(d,f){this.sidebar.sidebarTitles!=d&&(this.sidebar.sidebarTitles=d,this.sidebar.refresh(),this.isSettingsEnabled()&&f&&(mxSettings.settings.sidebarTitles=d,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};EditorUi.prototype.setInlineFullscreen=function(d){Editor.inlineFullscreen!=d&&(Editor.inlineFullscreen=d,this.fireEvent(new mxEventObject("inlineFullscreenChanged")),
-(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),window.setTimeout(mxUtils.bind(this,function(){this.refresh();this.actions.get("resetView").funct()}),10))};EditorUi.prototype.doSetSketchMode=function(d){if(Editor.sketchMode!=d){var f=function(m,q,y){null==m[q]&&(m[q]=y)},g=this.editor.graph;Editor.sketchMode=d;this.menus.defaultFontSize=d?20:16;g.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);
-f(g.defaultVertexStyle,"fontSize",this.menus.defaultFontSize);g.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);f(g.defaultEdgeStyle,"fontSize",this.menus.defaultFontSize-4);f(g.defaultEdgeStyle,"edgeStyle","none");f(g.defaultEdgeStyle,"rounded","0");f(g.defaultEdgeStyle,"curved","1");f(g.defaultEdgeStyle,"jettySize","auto");f(g.defaultEdgeStyle,"orthogonalLoop","1");f(g.defaultEdgeStyle,"endArrow","open");f(g.defaultEdgeStyle,"endSize","14");f(g.defaultEdgeStyle,"startSize","14");
-d&&(f(g.defaultVertexStyle,"fontFamily",Editor.sketchFontFamily),f(g.defaultVertexStyle,"fontSource",Editor.sketchFontSource),f(g.defaultVertexStyle,"hachureGap","4"),f(g.defaultVertexStyle,"sketch","1"),f(g.defaultEdgeStyle,"fontFamily",Editor.sketchFontFamily),f(g.defaultEdgeStyle,"fontSource",Editor.sketchFontSource),f(g.defaultEdgeStyle,"sketch","1"),f(g.defaultEdgeStyle,"hachureGap","4"),f(g.defaultEdgeStyle,"sourcePerimeterSpacing","8"),f(g.defaultEdgeStyle,"targetPerimeterSpacing","8"));g.currentVertexStyle=
-mxUtils.clone(g.defaultVertexStyle);g.currentEdgeStyle=mxUtils.clone(g.defaultEdgeStyle);this.clearDefaultStyle()}};EditorUi.prototype.getLinkTitle=function(d){var f=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(d)){var g=d.indexOf(",");0<g&&(f=this.getPageById(d.substring(g+1)),f=null!=f?f.getName():mxResources.get("pageNotFound"))}else"data:"==d.substring(0,5)&&(f=mxResources.get("action"));return f};EditorUi.prototype.handleCustomLink=function(d){if(Graph.isPageLink(d)){var f=
-d.indexOf(",");if(d=this.getPageById(d.substring(f+1)))this.selectPage(d);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(d)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){Editor.pagesVisible=mxSettings.settings.pagesVisible;ColorDialog.recentColors=mxSettings.getRecentColors();
-if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(d){d.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(d){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(d,f){"1"!=urlParams["ext-fonts"]?mxSettings.setCustomFonts(this.menus.customFonts):
-(d=f.getProperty("customFonts"),this.menus.customFonts=d,mxSettings.setCustomFonts(d));mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(d,f){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:
-mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(d,f){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor=mxSettings.getGridColor(!0);this.editor.graph.view.defaultGridColor=mxSettings.getGridColor(!1);this.addListener("gridColorChanged",mxUtils.bind(this,function(d,f){mxSettings.setGridColor(this.editor.graph.view.gridColor,
-Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(d,f){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",
-mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(d,f,g){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(m,
-q){try{this.spinner.stop();var y=this.createImageDataUri(m,f,"png"),F=parseInt(q.getAttribute("width")),C=parseInt(q.getAttribute("height"));this.writeImageToClipboard(y,F,C,mxUtils.bind(this,function(I){this.handleError(I)}))}catch(I){this.handleError(I)}}),null,null,null,mxUtils.bind(this,function(m){this.spinner.stop();this.handleError(m)}),null,null,null!=g?g:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<d.length?d:null)}catch(m){this.handleError(m)}};
-EditorUi.prototype.writeImageToClipboard=function(d,f,g,m){var q=this.base64ToBlob(d.substring(d.indexOf(",")+1),"image/png");d=new ClipboardItem({"image/png":q,"text/html":new Blob(['<img src="'+d+'" width="'+f+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([d])["catch"](m)};EditorUi.prototype.copyCells=function(d,f){var g=this.editor.graph;if(g.isSelectionEmpty())d.innerText="";else{var m=mxUtils.sortCells(g.model.getTopmostCells(g.getSelectionCells())),q=mxUtils.getXml(g.encodeCells(m));
-mxUtils.setTextContent(d,encodeURIComponent(q));f?(g.removeCells(m,!1),g.lastPasteXml=null):(g.lastPasteXml=q,g.pasteCounter=0);d.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var d=null;if(Editor.enableNativeCipboard){var f=this.editor.graph;f.isSelectionEmpty()||(d=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),f=mxUtils.getXml(f.encodeCells(d)),navigator.clipboard.writeText(f))}return d};EditorUi.prototype.pasteXml=
-function(d,f,g,m){var q=this.editor.graph,y=null;q.lastPasteXml==d?q.pasteCounter++:(q.lastPasteXml=d,q.pasteCounter=0);var F=q.pasteCounter*q.gridSize;if(g||this.isCompatibleString(d))y=this.importXml(d,F,F),q.setSelectionCells(y);else if(f&&1==q.getSelectionCount()){F=q.getStartEditingCell(q.getSelectionCell(),m);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&"image"==q.getCurrentCellStyle(F)[mxConstants.STYLE_SHAPE])q.setCellStyles(mxConstants.STYLE_IMAGE,d,[F]);else{q.model.beginUpdate();try{q.labelChanged(F,
-d),Graph.isLink(d)&&q.setLinkForCell(F,d)}finally{q.model.endUpdate()}}q.setSelectionCell(F)}else y=q.getInsertPoint(),q.isMouseInsertPoint()&&(F=0,q.lastPasteXml==d&&0<q.pasteCounter&&q.pasteCounter--),y=this.insertTextAt(d,y.x+F,y.y+F,!0),q.setSelectionCells(y);q.isSelectionEmpty()||(q.scrollCellToVisible(q.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(q.view.getState(q.getSelectionCell())));return y};EditorUi.prototype.pasteCells=function(d,f,g,m){if(!mxEvent.isConsumed(d)){var q=
-f,y=!1;if(g&&null!=d.clipboardData&&d.clipboardData.getData){var F=d.clipboardData.getData("text/plain"),C=!1;if(null!=F&&0<F.length&&"%3CmxGraphModel%3E"==F.substring(0,18))try{var I=decodeURIComponent(F);this.isCompatibleString(I)&&(C=!0,F=I)}catch(ba){}C=C?null:d.clipboardData.getData("text/html");null!=C&&0<C.length?(q=this.parseHtmlData(C),y="text/plain"!=q.getAttribute("data-type")):null!=F&&0<F.length&&(q=document.createElement("div"),mxUtils.setTextContent(q,C))}F=q.getElementsByTagName("span");
-if(null!=F&&0<F.length&&"application/vnd.lucid.chart.objects"===F[0].getAttribute("data-lucid-type"))g=F[0].getAttribute("data-lucid-content"),null!=g&&0<g.length&&(this.convertLucidChart(g,mxUtils.bind(this,function(ba){var Z=this.editor.graph;Z.lastPasteXml==ba?Z.pasteCounter++:(Z.lastPasteXml=ba,Z.pasteCounter=0);var X=Z.pasteCounter*Z.gridSize;Z.setSelectionCells(this.importXml(ba,X,X));Z.scrollCellToVisible(Z.getSelectionCell())}),mxUtils.bind(this,function(ba){this.handleError(ba)})),mxEvent.consume(d));
-else{y=y?q.innerHTML:mxUtils.trim(null==q.innerText?mxUtils.getTextContent(q):q.innerText);C=!1;try{var G=y.lastIndexOf("%3E");0<=G&&G<y.length-3&&(y=y.substring(0,G+3))}catch(ba){}try{F=q.getElementsByTagName("span"),(I=null!=F&&0<F.length?mxUtils.trim(decodeURIComponent(F[0].textContent)):decodeURIComponent(y))&&(this.isCompatibleString(I)||0==I.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(C=!0,y=I)}catch(ba){}try{if(null!=y&&0<y.length){if(0==y.substring(0,20).replace(/\s/g,
-"").indexOf('{"isProtected":'))try{"undefined"!==typeof MiroImporter&&(y=(new MiroImporter).importMiroJson(JSON.parse(y)))}catch(ba){console.log("Miro import error:",ba)}this.pasteXml(y,m,C,d);try{mxEvent.consume(d)}catch(ba){}}else if(!g){var Y=this.editor.graph;Y.lastPasteXml=null;Y.pasteCounter=0}}catch(ba){this.handleError(ba)}}}f.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(d){if(Graph.fileSupport)for(var f=null,g=0;g<d.length;g++)mxEvent.addListener(d[g],"dragleave",function(m){null!=
-f&&(f.parentNode.removeChild(f),f=null);m.stopPropagation();m.preventDefault()}),mxEvent.addListener(d[g],"dragover",mxUtils.bind(this,function(m){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==f&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(f=this.highlightElement());m.stopPropagation();m.preventDefault()})),mxEvent.addListener(d[g],"drop",mxUtils.bind(this,function(m){null!=f&&(f.parentNode.removeChild(f),f=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<
-m.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(m.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(m)&&!mxEvent.isShiftDown(m)):this.openFiles(m.dataTransfer.files,!0);else{var q=this.extractGraphModelFromEvent(m);if(null==q){var y=null!=m.dataTransfer?m.dataTransfer:m.clipboardData;null!=y&&(10==document.documentMode||11==document.documentMode?q=y.getData("Text"):(q=null,q=0<=mxUtils.indexOf(y.types,"text/uri-list")?m.dataTransfer.getData("text/uri-list"):
-0<=mxUtils.indexOf(y.types,"text/html")?y.getData("text/html"):null,null!=q&&0<q.length?(y=document.createElement("div"),y.innerHTML=this.editor.graph.sanitizeHtml(q),y=y.getElementsByTagName("img"),0<y.length&&(q=y[0].getAttribute("src"))):0<=mxUtils.indexOf(y.types,"text/plain")&&(q=y.getData("text/plain"))),null!=q&&(Editor.isPngDataUrl(q)?(q=Editor.extractGraphModelFromPng(q),null!=q&&0<q.length&&this.openLocalFile(q,null,!0)):this.isRemoteFileFormat(q)?this.isOffline()?this.showError(mxResources.get("error"),
-mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(q))).send(mxUtils.bind(this,function(F){200<=F.getStatus()&&299>=F.getStatus()&&this.openLocalFile(F.getText(),null,!0)})):/^https?:\/\//.test(q)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(q):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(q)))))}else this.openLocalFile(q,null,!0)}m.stopPropagation();
-m.preventDefault()}))};EditorUi.prototype.highlightElement=function(d){var f=0,g=0;if(null==d){var m=document.body;var q=document.documentElement;var y=(m.clientWidth||q.clientWidth)-3;m=Math.max(m.clientHeight||0,q.clientHeight)-3}else f=d.offsetTop,g=d.offsetLeft,y=d.clientWidth,m=d.clientHeight;q=document.createElement("div");q.style.zIndex=mxPopupMenu.prototype.zIndex+2;q.style.border="3px dotted rgb(254, 137, 12)";q.style.pointerEvents="none";q.style.position="absolute";q.style.top=f+"px";q.style.left=
-g+"px";q.style.width=Math.max(0,y-3)+"px";q.style.height=Math.max(0,m-3)+"px";null!=d&&d.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(q):document.body.appendChild(q);return q};EditorUi.prototype.stringToCells=function(d){d=mxUtils.parseXml(d);var f=this.editor.extractGraphModel(d.documentElement);d=[];if(null!=f){var g=new mxCodec(f.ownerDocument),m=new mxGraphModel;g.decode(f,m);f=m.getChildAt(m.getRoot(),0);for(g=0;g<m.getChildCount(f);g++)d.push(m.getChildAt(f,
-g))}return d};EditorUi.prototype.openFileHandle=function(d,f,g,m,q){if(null!=f&&0<f.length){!this.useCanvasForExport&&/(\.png)$/i.test(f)?f=f.substring(0,f.length-4)+".drawio":/(\.pdf)$/i.test(f)&&(f=f.substring(0,f.length-4)+".drawio");var y=mxUtils.bind(this,function(C){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==C.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,
-m);try{this.loadLibrary(new LocalLibrary(this,C,f))}catch(I){this.handleError(I,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(C,f,m)});if(/(\.v(dx|sdx?))($|\?)/i.test(f)||/(\.vs(x|sx?))($|\?)/i.test(f))this.importVisio(g,mxUtils.bind(this,function(C){this.spinner.stop();y(C)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(C){this.spinner.stop();y(C)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,f))this.isOffline()?
-(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(g,mxUtils.bind(this,function(C){4==C.readyState&&(this.spinner.stop(),200<=C.status&&299>=C.status?y(C.responseText):this.handleError({message:mxResources.get(413==C.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,
-function(C){this.spinner.stop();this.openLocalFile(C,f,m)}),mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}));else if("<mxlibrary"==d.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,m);try{this.loadLibrary(new LocalLibrary(this,d,g.name))}catch(C){this.handleError(C,mxResources.get("errorLoadingFile"))}}else if(0==d.indexOf("PK"))this.importZipFile(g,mxUtils.bind(this,function(C){this.spinner.stop();
-y(C)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,f,m)}));else{if("image/png"==g.type.substring(0,9))d=this.extractGraphModelFromPng(d);else if("application/pdf"==g.type){var F=Editor.extractGraphModelFromPdf(d);null!=F&&(q=null,m=!0,d=F)}this.spinner.stop();this.openLocalFile(d,f,m,q,null!=q?g:null)}}};EditorUi.prototype.openFiles=function(d,f){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var g=0;g<d.length;g++)mxUtils.bind(this,function(m){var q=
-new FileReader;q.onload=mxUtils.bind(this,function(y){try{this.openFileHandle(y.target.result,m.name,m,f)}catch(F){this.handleError(F)}});q.onerror=mxUtils.bind(this,function(y){this.spinner.stop();this.handleError(y);window.openFile=null});"image"!==m.type.substring(0,5)&&"application/pdf"!==m.type||"image/svg"===m.type.substring(0,9)?q.readAsText(m):q.readAsDataURL(m)})(d[g])};EditorUi.prototype.openLocalFile=function(d,f,g,m,q){var y=this.getCurrentFile(),F=mxUtils.bind(this,function(){window.openFile=
-null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var C=mxUtils.parseXml(d);null!=C&&(this.editor.setGraphXml(C.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,d,f||this.defaultFilename,g,m,q))});if(null!=d&&0<d.length)null==y||!y.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=m)?F():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=m)&&null!=y&&y.isModified()?this.confirm(mxResources.get("allChangesLost"),null,F,
-mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(d,f),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=y&&y.isModified()?this.confirm(mxResources.get("allChangesLost"),null,F,mxResources.get("cancel"),mxResources.get("discardChanges")):F()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var d={};if(null!=this.pages)for(var f=
-0;f<this.pages.length;f++)this.updatePageRoot(this.pages[f]),this.addBasenamesForCell(this.pages[f].root,d);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),d);f=[];for(var g in d)f.push(g);return f};EditorUi.prototype.addBasenamesForCell=function(d,f){function g(F){if(null!=F){var C=F.lastIndexOf(".");0<C&&(F=F.substring(C+1,F.length));null==f[F]&&(f[F]=!0)}}var m=this.editor.graph,q=m.getCellStyle(d);g(mxStencilRegistry.getBasenameForStencil(q[mxConstants.STYLE_SHAPE]));m.model.isEdge(d)&&
-(g(mxMarker.getPackageForType(q[mxConstants.STYLE_STARTARROW])),g(mxMarker.getPackageForType(q[mxConstants.STYLE_ENDARROW])));q=m.model.getChildCount(d);for(var y=0;y<q;y++)this.addBasenamesForCell(m.model.getChildAt(d,y),f)};EditorUi.prototype.setGraphEnabled=function(d){this.diagramContainer.style.visibility=d?"":"hidden";this.formatContainer.style.visibility=d?"":"hidden";this.sidebarFooterContainer.style.display=d?"":"none";this.sidebarContainer.style.display=d?"":"none";this.hsplit.style.display=
-d?"":"none";this.editor.graph.setEnabled(d);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=d?"":"hidden",this.ruler.vRuler.container.style.visibility=d?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=d?"":"hidden");d||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=
-this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var d=!1;this.installMessageHandler(mxUtils.bind(this,function(f,g,m,q){d||(d=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));
-if(null==f||0==f.length)f=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,f,{}));this.mode=App.MODE_EMBED;this.setFileData(f);if(q)try{var y=this.editor.graph;y.setGridEnabled(!1);y.pageVisible=!1;var F=y.model.cells,C;for(C in F){var I=F[C];null!=I&&null!=I.style&&(I.style+=";sketch=1;"+(-1==I.style.indexOf("fontFamily=")||-1<I.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":
-""))}}catch(G){console.log(G)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=m?m:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?
-this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(d,f){null!=d?d.getPublicUrl(f):f(null)};EditorUi.prototype.createLoadMessage=function(d){var f=this.editor.graph;return{event:d,pageVisible:f.pageVisible,translate:f.view.translate,bounds:f.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:f.view.scale,page:f.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(d){var f=this.editor.graph;
-f.isEditing()&&f.stopEditing(!f.isInvokesStopCellEditing());var g=window.opener||window.parent;if(this.editor.modified){var m=f.background;if(null==m||m==mxConstants.NONE)m=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),f,null,!0,mxUtils.bind(this,function(q){g.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=d?!d:!0,data:Editor.createSvgDataUri(q)}),"*")}),null,null,!0,m,1,this.embedExportBorder)}else d||
-g.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");d||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,f.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler=function(d){var f=null,g=!1,m=!1,q=null,y=mxUtils.bind(this,function(I,G){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,y);mxEvent.addListener(window,"message",mxUtils.bind(this,function(I){if(I.source==(window.opener||window.parent)){var G=I.data,Y=null,ba=mxUtils.bind(this,function(fa){if(null!=fa&&"function"===typeof fa.charAt&&"<"!=fa.charAt(0))try{Editor.isPngDataUrl(fa)?fa=Editor.extractGraphModelFromPng(fa):"data:image/svg+xml;base64,"==
-fa.substring(0,26)?fa=atob(fa.substring(26)):"data:image/svg+xml;utf8,"==fa.substring(0,24)&&(fa=fa.substring(24)),null!=fa&&("%"==fa.charAt(0)?fa=decodeURIComponent(fa):"<"!=fa.charAt(0)&&(fa=Graph.decompress(fa)))}catch(ra){}return fa});if("json"==urlParams.proto){var Z=!1;try{G=JSON.parse(G),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[I],"data",[G])}catch(fa){G=null}try{if(null==G)return;if("dialog"==G.action){this.showError(null!=G.titleKey?mxResources.get(G.titleKey):G.title,
-null!=G.messageKey?mxResources.get(G.messageKey):G.message,null!=G.buttonKey?mxResources.get(G.buttonKey):G.button);null!=G.modified&&(this.editor.modified=G.modified);return}if("layout"==G.action){this.executeLayouts(this.editor.graph.createLayouts(G.layouts));return}if("prompt"==G.action){this.spinner.stop();var X=new FilenameDialog(this,G.defaultValue||"",null!=G.okKey?mxResources.get(G.okKey):G.ok,function(fa){null!=fa?F.postMessage(JSON.stringify({event:"prompt",value:fa,message:G}),"*"):F.postMessage(JSON.stringify({event:"prompt-cancel",
-message:G}),"*")},null!=G.titleKey?mxResources.get(G.titleKey):G.title);this.showDialog(X.container,300,80,!0,!1);X.init();return}if("draft"==G.action){var qa=ba(G.xml);this.spinner.stop();X=new DraftDialog(this,mxResources.get("draftFound",[G.name||this.defaultFilename]),qa,mxUtils.bind(this,function(){this.hideDialog();F.postMessage(JSON.stringify({event:"draft",result:"edit",message:G}),"*")}),mxUtils.bind(this,function(){this.hideDialog();F.postMessage(JSON.stringify({event:"draft",result:"discard",
-message:G}),"*")}),G.editKey?mxResources.get(G.editKey):null,G.discardKey?mxResources.get(G.discardKey):null,G.ignore?mxUtils.bind(this,function(){this.hideDialog();F.postMessage(JSON.stringify({event:"draft",result:"ignore",message:G}),"*")}):null);this.showDialog(X.container,640,480,!0,!1,mxUtils.bind(this,function(fa){fa&&this.actions.get("exit").funct()}));try{X.init()}catch(fa){F.postMessage(JSON.stringify({event:"draft",error:fa.toString(),message:G}),"*")}return}if("template"==G.action){this.spinner.stop();
-var Q=1==G.enableRecent,W=1==G.enableSearch,ha=1==G.enableCustomTemp;if("1"==urlParams.newTempDlg&&!G.templatesOnly&&null!=G.callback){var la=this.getCurrentUser(),ja=new TemplatesDialog(this,function(fa,ra,ua){fa=fa||this.emptyDiagramXml;F.postMessage(JSON.stringify({event:"template",xml:fa,blank:fa==this.emptyDiagramXml,name:ra,tempUrl:ua.url,libs:ua.libs,builtIn:null!=ua.info&&null!=ua.info.custContentId,message:G}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,
-null!=la?la.id:null,Q?mxUtils.bind(this,function(fa,ra,ua){this.remoteInvoke("getRecentDiagrams",[ua],null,fa,ra)}):null,W?mxUtils.bind(this,function(fa,ra,ua,sa){this.remoteInvoke("searchDiagrams",[fa,sa],null,ra,ua)}):null,mxUtils.bind(this,function(fa,ra,ua){this.remoteInvoke("getFileContent",[fa.url],null,ra,ua)}),null,ha?mxUtils.bind(this,function(fa){this.remoteInvoke("getCustomTemplates",null,null,fa,function(){fa({},0)})}):null,!1,!1,!0,!0);this.showDialog(ja.container,window.innerWidth,window.innerHeight,
-!0,!1,null,!1,!0);return}X=new NewDialog(this,!1,G.templatesOnly?!1:null!=G.callback,mxUtils.bind(this,function(fa,ra,ua,sa){fa=fa||this.emptyDiagramXml;null!=G.callback?F.postMessage(JSON.stringify({event:"template",xml:fa,blank:fa==this.emptyDiagramXml,name:ra,tempUrl:ua,libs:sa,builtIn:!0,message:G}),"*"):(d(fa,I,fa!=this.emptyDiagramXml,G.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,Q?mxUtils.bind(this,function(fa){this.remoteInvoke("getRecentDiagrams",
-[null],null,fa,function(){fa(null,"Network Error!")})}):null,W?mxUtils.bind(this,function(fa,ra){this.remoteInvoke("searchDiagrams",[fa,null],null,ra,function(){ra(null,"Network Error!")})}):null,mxUtils.bind(this,function(fa,ra,ua){F.postMessage(JSON.stringify({event:"template",docUrl:fa,info:ra,name:ua}),"*")}),null,null,ha?mxUtils.bind(this,function(fa){this.remoteInvoke("getCustomTemplates",null,null,fa,function(){fa({},0)})}):null,1==G.withoutType);this.showDialog(X.container,620,460,!0,!1,mxUtils.bind(this,
-function(fa){this.sidebar.hideTooltip();fa&&this.actions.get("exit").funct()}));X.init();return}if("textContent"==G.action){var U=this.getDiagramTextContent();F.postMessage(JSON.stringify({event:"textContent",data:U,message:G}),"*");return}if("status"==G.action){null!=G.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(G.messageKey))):null!=G.message&&this.editor.setStatus(mxUtils.htmlEntities(G.message));null!=G.modified&&(this.editor.modified=G.modified);return}if("spinner"==
-G.action){var L=null!=G.messageKey?mxResources.get(G.messageKey):G.message;null==G.show||G.show?this.spinner.spin(document.body,L):this.spinner.stop();return}if("exit"==G.action){this.actions.get("exit").funct();return}if("viewport"==G.action){null!=G.viewport&&(this.embedViewport=G.viewport);return}if("snapshot"==G.action){this.sendEmbeddedSvgExport(!0);return}if("export"==G.action){if("png"==G.format||"xmlpng"==G.format){if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?
-mxResources.get(G.spinKey):G.spin)){var da=null!=G.xml?G.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var O=this.editor.graph,N=mxUtils.bind(this,function(fa){this.editor.graph.setEnabled(!0);this.spinner.stop();var ra=this.createLoadMessage("export");ra.format=G.format;ra.message=G;ra.data=fa;ra.xml=da;F.postMessage(JSON.stringify(ra),"*")}),aa=mxUtils.bind(this,function(fa){null==fa&&(fa=Editor.blankImage);"xmlpng"==G.format&&(fa=Editor.writeGraphModelToPng(fa,"tEXt","mxfile",encodeURIComponent(da)));
-O!=this.editor.graph&&O.container.parentNode.removeChild(O.container);N(fa)}),ma=G.pageId||(null!=this.pages?G.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var u=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=ma){var fa=O.getGlobalVariable;O=this.createTemporaryGraph(O.getStylesheet());for(var ra,ua=0;ua<this.pages.length;ua++)if(this.pages[ua].getId()==ma){ra=this.updatePageRoot(this.pages[ua]);break}null==ra&&(ra=this.currentPage);
-O.getGlobalVariable=function(Ba){return"page"==Ba?ra.getName():"pagenumber"==Ba?1:fa.apply(this,arguments)};document.body.appendChild(O.container);O.model.setRoot(ra.root)}if(null!=G.layerIds){var sa=O.model,Aa=sa.getChildCells(sa.getRoot()),Ca={};for(ua=0;ua<G.layerIds.length;ua++)Ca[G.layerIds[ua]]=!0;for(ua=0;ua<Aa.length;ua++)sa.setVisible(Aa[ua],Ca[Aa[ua].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(Ba){aa(Ba.toDataURL("image/png"))}),G.width,null,G.background,mxUtils.bind(this,
-function(){aa(null)}),null,null,G.scale,G.transparent,G.shadow,null,O,G.border,null,G.grid,G.keepTheme)});null!=G.xml&&0<G.xml.length&&(g=!0,this.setFileData(da),g=!1);u()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==G.format?"1":"0")+(null!=ma?"&pageId="+ma:"")+(null!=G.layerIds&&0<G.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:G.layerIds})):"")+(null!=G.scale?"&scale="+G.scale:"")+"&base64=1&xml="+encodeURIComponent(da))).send(mxUtils.bind(this,function(fa){200<=
-fa.getStatus()&&299>=fa.getStatus()?N("data:image/png;base64,"+fa.getText()):aa(null)}),mxUtils.bind(this,function(){aa(null)}))}}else if(u=mxUtils.bind(this,function(){var fa=this.createLoadMessage("export");fa.message=G;if("html2"==G.format||"html"==G.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ra=this.getXmlFileData();fa.xml=mxUtils.getXml(ra);fa.data=this.getFileData(null,null,!0,null,null,null,ra);fa.format=G.format}else if("html"==G.format)ra=this.editor.getGraphXml(),
-fa.data=this.getHtml(ra,this.editor.graph),fa.xml=mxUtils.getXml(ra),fa.format=G.format;else{mxSvgCanvas2D.prototype.foAltText=null;ra=null!=G.background?G.background:this.editor.graph.background;ra==mxConstants.NONE&&(ra=null);fa.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);fa.format="svg";var ua=mxUtils.bind(this,function(sa){this.editor.graph.setEnabled(!0);this.spinner.stop();fa.data=Editor.createSvgDataUri(sa);F.postMessage(JSON.stringify(fa),"*")});if("xmlsvg"==G.format)(null==
-G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin))&&this.getEmbeddedSvg(fa.xml,this.editor.graph,null,!0,ua,null,null,G.embedImages,ra,G.scale,G.border,G.shadow,G.keepTheme);else if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin))this.editor.graph.setEnabled(!1),ra=this.editor.graph.getSvg(ra,G.scale,G.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||G.shadow,
-null,G.keepTheme),(this.editor.graph.shadowVisible||G.shadow)&&this.editor.graph.addSvgShadow(ra),this.embedFonts(ra,mxUtils.bind(this,function(sa){G.embedImages||null==G.embedImages?this.editor.convertImages(sa,mxUtils.bind(this,function(Aa){ua(mxUtils.getXml(Aa))})):ua(mxUtils.getXml(sa))}));return}F.postMessage(JSON.stringify(fa),"*")}),null!=G.xml&&0<G.xml.length){if(this.editor.graph.mathEnabled){var H=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){H.apply(this,arguments);u()}}g=!0;this.setFileData(G.xml);
-g=!1;this.editor.graph.mathEnabled||u()}else u();return}if("load"==G.action){Z=G.toSketch;m=1==G.autosave;this.hideDialog();null!=G.modified&&null==urlParams.modified&&(urlParams.modified=G.modified);null!=G.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=G.saveAndExit);null!=G.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=G.noSaveBtn);if(null!=G.rough){var P=Editor.sketchMode;this.doSetSketchMode(G.rough);P!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=
-G.dark&&(P=Editor.darkMode,this.doSetDarkMode(G.dark),P!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));null!=G.border&&(this.embedExportBorder=G.border);null!=G.background&&(this.embedExportBackground=G.background);null!=G.viewport&&(this.embedViewport=G.viewport);this.embedExitPoint=null;if(null!=G.rect){var S=this.embedExportBorder;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.top=G.rect.top+"px";this.diagramContainer.style.left=G.rect.left+
-"px";this.diagramContainer.style.height=G.rect.height+"px";this.diagramContainer.style.width=G.rect.width+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";Y=mxUtils.bind(this,function(){var fa=this.editor.graph,ra=fa.maxFitScale;fa.maxFitScale=G.maxFitScale;fa.fit(2*S);fa.maxFitScale=ra;fa.container.scrollTop-=2*S;fa.container.scrollLeft-=2*S;this.fireEvent(new mxEventObject("editInlineStart","data",[G]))})}null!=G.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=
-G.noExitBtn);null!=G.title&&null!=this.buttonContainer&&(qa=document.createElement("span"),mxUtils.write(qa,G.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(qa),this.embedFilenameSpan=qa);try{G.libs&&this.sidebar.showEntries(G.libs)}catch(fa){}G=null!=G.xmlpng?this.extractGraphModelFromPng(G.xmlpng):null!=G.descriptor?G.descriptor:G.xml}else{if("merge"==G.action){var R=this.getCurrentFile();null!=R&&(qa=ba(G.xml),
-null!=qa&&""!=qa&&R.mergeFile(new LocalFile(this,qa),function(){F.postMessage(JSON.stringify({event:"merge",message:G}),"*")},function(fa){F.postMessage(JSON.stringify({event:"merge",message:G,error:fa}),"*")}))}else"remoteInvokeReady"==G.action?this.handleRemoteInvokeReady(F):"remoteInvoke"==G.action?this.handleRemoteInvoke(G,I.origin):"remoteInvokeResponse"==G.action?this.handleRemoteInvokeResponse(G):F.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(G)}),"*");return}}catch(fa){this.handleError(fa)}}var ca=
-mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),ea=mxUtils.bind(this,function(fa,ra){g=!0;try{d(fa,ra,null,Z)}catch(ua){this.handleError(ua)}g=!1;null!=urlParams.modified&&this.editor.setStatus("");q=ca();m&&null==f&&(f=mxUtils.bind(this,function(ua,sa){ua=ca();ua==q||g||(sa=this.createLoadMessage("autosave"),sa.xml=ua,(window.opener||window.parent).postMessage(JSON.stringify(sa),"*"));
-q=ua}),this.editor.graph.model.addListener(mxEvent.CHANGE,f),this.editor.graph.addListener("gridSizeChanged",f),this.editor.graph.addListener("shadowVisibleChanged",f),this.addListener("pageFormatChanged",f),this.addListener("pageScaleChanged",f),this.addListener("backgroundColorChanged",f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",
-f),this.addListener("pageViewChanged",f));if("1"==urlParams.returnbounds||"json"==urlParams.proto)ra=this.createLoadMessage("load"),ra.xml=fa,F.postMessage(JSON.stringify(ra),"*");null!=Y&&Y()});null!=G&&"function"===typeof G.substring&&"data:application/vnd.visio;base64,"==G.substring(0,34)?(ba="0M8R4KGxGuE"==G.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(G.substring(G.indexOf(",")+1)),function(fa){ea(fa,I)},mxUtils.bind(this,function(fa){this.handleError(fa)}),ba)):null!=
-G&&"function"===typeof G.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(G,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(G,mxUtils.bind(this,function(fa){4==fa.readyState&&200<=fa.status&&299>=fa.status&&"<mxGraphModel"==fa.responseText.substring(0,13)&&ea(fa.responseText,I)}),""):null!=G&&"function"===typeof G.substring&&this.isLucidChartData(G)?this.convertLucidChart(G,mxUtils.bind(this,function(fa){ea(fa)}),mxUtils.bind(this,
-function(fa){this.handleError(fa)})):null==G||"object"!==typeof G||null==G.format||null==G.data&&null==G.url?(G=ba(G),ea(G,I)):this.loadDescriptor(G,mxUtils.bind(this,function(fa){ea(ca(),I)}),mxUtils.bind(this,function(fa){this.handleError(fa,mxResources.get("errorLoadingFile"))}))}}));var F=window.opener||window.parent;y="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";F.postMessage(y,"*");if("json"==urlParams.proto){var C=this.editor.graph.openLink;this.editor.graph.openLink=
-function(I,G,Y){C.apply(this,arguments);F.postMessage(JSON.stringify({event:"openLink",href:I,target:G,allowOpener:Y}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar&&"1"!=urlParams.embedInline){var d=document.createElement("div");d.style.display="inline-block";d.style.position="absolute";d.style.paddingTop="atlas"==uiTheme||"1"==urlParams.atlas?"2px":"0px";d.style.paddingLeft="8px";d.style.paddingBottom="2px";var f=document.createElement("button");f.className="geBigButton";
-var g=f;if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var m="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(f,m);f.setAttribute("title",m);mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));d.appendChild(f)}}else mxUtils.write(f,mxResources.get("save")),f.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),
-d.appendChild(f),"1"==urlParams.saveAndExit&&(f=document.createElement("a"),mxUtils.write(f,mxResources.get("saveAndExit")),f.setAttribute("title",mxResources.get("saveAndExit")),f.className="geBigButton geBigStandardButton",f.style.marginLeft="6px",mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),d.appendChild(f),g=f);"1"!=urlParams.noExitBtn&&(f=document.createElement("a"),g="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),
-mxUtils.write(f,g),f.setAttribute("title",g),f.className="geBigButton geBigStandardButton",f.style.marginLeft="6px",mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),d.appendChild(f),g=f);g.style.marginRight="20px";this.toolbar.container.appendChild(d);this.toolbar.staticElements.push(d);d.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(d){this.importCsv(d)}),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.loadOrgChartLayouts=function(d){var f=mxUtils.bind(this,function(){this.loadingOrgChart=!1;this.spinner.stop();d()});
-"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?f():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.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",f)})})}):mxscript(DRAWIO_BASE_URL+"/js/orgchart.min.js",f))};EditorUi.prototype.importCsv=function(d,f){this.loadOrgChartLayouts(mxUtils.bind(this,
-function(){this.doImportCsv(d,f)}))};EditorUi.prototype.doImportCsv=function(d,f){try{var g=d.split("\n"),m=[],q=[],y=[],F={};if(0<g.length){var C={},I=this.editor.graph,G=null,Y=null,ba=null,Z=null,X=null,qa=null,Q=null,W="whiteSpace=wrap;html=1;",ha=null,la=null,ja="",U="auto",L="auto",da=!1,O=null,N=null,aa=40,ma=40,u=100,H=0,P=function(){null!=f?f(va):(I.setSelectionCells(va),I.scrollCellToVisible(I.getSelectionCell()))},S=I.getFreeInsertPoint(),R=S.x,ca=S.y;S=ca;var ea=null,fa="auto";la=null;
-for(var ra=[],ua=null,sa=null,Aa=0;Aa<g.length&&"#"==g[Aa].charAt(0);){d=g[Aa].replace(/\r$/,"");for(Aa++;Aa<g.length&&"\\"==d.charAt(d.length-1)&&"#"==g[Aa].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(g[Aa].substring(1)),Aa++;if("#"!=d.charAt(1)){var Ca=d.indexOf(":");if(0<Ca){var Ba=mxUtils.trim(d.substring(1,Ca)),ta=mxUtils.trim(d.substring(Ca+1));"label"==Ba?ea=I.sanitizeHtml(ta):"labelname"==Ba&&0<ta.length&&"-"!=ta?X=ta:"labels"==Ba&&0<ta.length&&"-"!=ta?Q=JSON.parse(ta):"style"==Ba?
-Y=ta:"parentstyle"==Ba?W=ta:"unknownStyle"==Ba&&"-"!=ta?qa=ta:"stylename"==Ba&&0<ta.length&&"-"!=ta?Z=ta:"styles"==Ba&&0<ta.length&&"-"!=ta?ba=JSON.parse(ta):"vars"==Ba&&0<ta.length&&"-"!=ta?G=JSON.parse(ta):"identity"==Ba&&0<ta.length&&"-"!=ta?ha=ta:"parent"==Ba&&0<ta.length&&"-"!=ta?la=ta:"namespace"==Ba&&0<ta.length&&"-"!=ta?ja=ta:"width"==Ba?U=ta:"height"==Ba?L=ta:"collapsed"==Ba&&"-"!=ta?da="true"==ta:"left"==Ba&&0<ta.length?O=ta:"top"==Ba&&0<ta.length?N=ta:"ignore"==Ba?sa=ta.split(","):"connect"==
-Ba?ra.push(JSON.parse(ta)):"link"==Ba?ua=ta:"padding"==Ba?H=parseFloat(ta):"edgespacing"==Ba?aa=parseFloat(ta):"nodespacing"==Ba?ma=parseFloat(ta):"levelspacing"==Ba?u=parseFloat(ta):"layout"==Ba&&(fa=ta)}}}if(null==g[Aa])throw Error(mxResources.get("invalidOrMissingFile"));var Pa=this.editor.csvToArray(g[Aa].replace(/\r$/,""));Ca=d=null;Ba=[];for(ta=0;ta<Pa.length;ta++)ha==Pa[ta]&&(d=ta),la==Pa[ta]&&(Ca=ta),Ba.push(mxUtils.trim(Pa[ta]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,
-""));null==ea&&(ea="%"+Ba[0]+"%");if(null!=ra)for(var Ta=0;Ta<ra.length;Ta++)null==C[ra[Ta].to]&&(C[ra[Ta].to]={});ha=[];for(ta=Aa+1;ta<g.length;ta++){var Oa=this.editor.csvToArray(g[ta].replace(/\r$/,""));if(null==Oa){var Xa=40<g[ta].length?g[ta].substring(0,40)+"...":g[ta];throw Error(Xa+" ("+ta+"):\n"+mxResources.get("containsValidationErrors"));}0<Oa.length&&ha.push(Oa)}I.model.beginUpdate();try{for(ta=0;ta<ha.length;ta++){Oa=ha[ta];var Ga=null,eb=null!=d?ja+Oa[d]:null;g=!1;null!=eb&&(Ga=I.model.getCell(eb),
-g=null==Ga||0<=mxUtils.indexOf(m,Ga));var bb=new mxCell(ea,new mxGeometry(R,S,0,0),Y||"whiteSpace=wrap;html=1;");bb.collapsed=da;bb.vertex=!0;bb.id=eb;null==Ga||g||I.model.setCollapsed(Ga,da);for(var z=0;z<Oa.length;z++)I.setAttributeForCell(bb,Ba[z],Oa[z]),null==Ga||g||I.setAttributeForCell(Ga,Ba[z],Oa[z]);if(null!=X&&null!=Q){var K=Q[bb.getAttribute(X)];null!=K&&(I.labelChanged(bb,K),null==Ga||g||I.cellLabelChanged(Ga,K))}if(null!=Z&&null!=ba){var M=ba[bb.getAttribute(Z)];null!=M&&(bb.style=M)}I.setAttributeForCell(bb,
-"placeholders","1");bb.style=I.replacePlaceholders(bb,bb.style,G);null==Ga||g?I.fireEvent(new mxEventObject("cellsInserted","cells",[bb])):(I.model.setStyle(Ga,bb.style),0>mxUtils.indexOf(y,Ga)&&y.push(Ga),I.fireEvent(new mxEventObject("cellsInserted","cells",[Ga])));g=null!=Ga;Ga=bb;if(!g)for(Ta=0;Ta<ra.length;Ta++)C[ra[Ta].to][Ga.getAttribute(ra[Ta].to)]=Ga;null!=ua&&"link"!=ua&&(I.setLinkForCell(Ga,Ga.getAttribute(ua)),I.setAttributeForCell(Ga,ua,null));var T=this.editor.graph.getPreferredSizeForCell(Ga);
-la=null!=Ca?I.model.getCell(ja+Oa[Ca]):null;if(Ga.vertex){Xa=null!=la?0:R;Aa=null!=la?0:ca;null!=O&&null!=Ga.getAttribute(O)&&(Ga.geometry.x=Xa+parseFloat(Ga.getAttribute(O)));null!=N&&null!=Ga.getAttribute(N)&&(Ga.geometry.y=Aa+parseFloat(Ga.getAttribute(N)));var V="@"==U.charAt(0)?Ga.getAttribute(U.substring(1)):null;Ga.geometry.width=null!=V&&"auto"!=V?parseFloat(Ga.getAttribute(U.substring(1))):"auto"==U||"auto"==V?T.width+H:parseFloat(U);var ia="@"==L.charAt(0)?Ga.getAttribute(L.substring(1)):
-null;Ga.geometry.height=null!=ia&&"auto"!=ia?parseFloat(ia):"auto"==L||"auto"==ia?T.height+H:parseFloat(L);S+=Ga.geometry.height+ma}g?(null==F[eb]&&(F[eb]=[]),F[eb].push(Ga)):(m.push(Ga),null!=la?(la.style=I.replacePlaceholders(la,W,G),I.addCell(Ga,la),q.push(la)):y.push(I.addCell(Ga)))}for(ta=0;ta<q.length;ta++)V="@"==U.charAt(0)?q[ta].getAttribute(U.substring(1)):null,ia="@"==L.charAt(0)?q[ta].getAttribute(L.substring(1)):null,"auto"!=U&&"auto"!=V||"auto"!=L&&"auto"!=ia||I.updateGroupBounds([q[ta]],
-H,!0);var na=y.slice(),va=y.slice();for(Ta=0;Ta<ra.length;Ta++){var pa=ra[Ta];for(ta=0;ta<m.length;ta++){Ga=m[ta];var za=mxUtils.bind(this,function(Za,cb,fb){var qb=cb.getAttribute(fb.from);if(null!=qb&&""!=qb){qb=qb.split(",");for(var ub=0;ub<qb.length;ub++){var ab=C[fb.to][qb[ub]];if(null==ab&&null!=qa){ab=new mxCell(qb[ub],new mxGeometry(R,ca,0,0),qa);ab.style=I.replacePlaceholders(cb,ab.style,G);var db=this.editor.graph.getPreferredSizeForCell(ab);ab.geometry.width=db.width+H;ab.geometry.height=
-db.height+H;C[fb.to][qb[ub]]=ab;ab.vertex=!0;ab.id=qb[ub];y.push(I.addCell(ab))}if(null!=ab){db=fb.label;null!=fb.fromlabel&&(db=(cb.getAttribute(fb.fromlabel)||"")+(db||""));null!=fb.sourcelabel&&(db=I.replacePlaceholders(cb,fb.sourcelabel,G)+(db||""));null!=fb.tolabel&&(db=(db||"")+(ab.getAttribute(fb.tolabel)||""));null!=fb.targetlabel&&(db=(db||"")+I.replacePlaceholders(ab,fb.targetlabel,G));var kb="target"==fb.placeholders==!fb.invert?ab:Za;kb=null!=fb.style?I.replacePlaceholders(kb,fb.style,
-G):I.createCurrentEdgeStyle();db=I.insertEdge(null,null,db||"",fb.invert?ab:Za,fb.invert?Za:ab,kb);if(null!=fb.labels)for(kb=0;kb<fb.labels.length;kb++){var ib=fb.labels[kb],ob=new mxCell(ib.label||kb,new mxGeometry(null!=ib.x?ib.x:0,null!=ib.y?ib.y:0,0,0),"resizable=0;html=1;");ob.vertex=!0;ob.connectable=!1;ob.geometry.relative=!0;null!=ib.placeholders&&(ob.value=I.replacePlaceholders("target"==ib.placeholders==!fb.invert?ab:Za,ob.value,G));if(null!=ib.dx||null!=ib.dy)ob.geometry.offset=new mxPoint(null!=
-ib.dx?ib.dx:0,null!=ib.dy?ib.dy:0);db.insert(ob)}va.push(db);mxUtils.remove(fb.invert?Za:ab,na)}}}});za(Ga,Ga,pa);if(null!=F[Ga.id])for(z=0;z<F[Ga.id].length;z++)za(Ga,F[Ga.id][z],pa)}}if(null!=sa)for(ta=0;ta<m.length;ta++)for(Ga=m[ta],z=0;z<sa.length;z++)I.setAttributeForCell(Ga,mxUtils.trim(sa[z]),null);if(0<y.length){var Da=new mxParallelEdgeLayout(I);Da.spacing=aa;Da.checkOverlap=!0;var Ma=function(){0<Da.spacing&&Da.execute(I.getDefaultParent());for(var Za=0;Za<y.length;Za++){var cb=I.getCellGeometry(y[Za]);
-cb.x=Math.round(I.snap(cb.x));cb.y=Math.round(I.snap(cb.y));"auto"==U&&(cb.width=Math.round(I.snap(cb.width)));"auto"==L&&(cb.height=Math.round(I.snap(cb.height)))}};if("["==fa.charAt(0)){var La=P;I.view.validate();this.executeLayouts(I.createLayouts(JSON.parse(fa)),function(){Ma();La()});P=null}else if("circle"==fa){var Ua=new mxCircleLayout(I);Ua.disableEdgeStyle=!1;Ua.resetEdges=!1;var Sa=Ua.isVertexIgnored;Ua.isVertexIgnored=function(Za){return Sa.apply(this,arguments)||0>mxUtils.indexOf(y,Za)};
-this.executeLayout(function(){Ua.execute(I.getDefaultParent());Ma()},!0,P);P=null}else if("horizontaltree"==fa||"verticaltree"==fa||"auto"==fa&&va.length==2*y.length-1&&1==na.length){I.view.validate();var Fa=new mxCompactTreeLayout(I,"horizontaltree"==fa);Fa.levelDistance=ma;Fa.edgeRouting=!1;Fa.resetEdges=!1;this.executeLayout(function(){Fa.execute(I.getDefaultParent(),0<na.length?na[0]:null)},!0,P);P=null}else if("horizontalflow"==fa||"verticalflow"==fa||"auto"==fa&&1==na.length){I.view.validate();
-var wa=new mxHierarchicalLayout(I,"horizontalflow"==fa?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);wa.intraCellSpacing=ma;wa.parallelEdgeSpacing=aa;wa.interRankCellSpacing=u;wa.disableEdgeStyle=!1;this.executeLayout(function(){wa.execute(I.getDefaultParent(),va);I.moveCells(va,R,ca)},!0,P);P=null}else if("orgchart"==fa){I.view.validate();var ya=new mxOrgChartLayout(I,2,u,ma),Na=ya.isVertexIgnored;ya.isVertexIgnored=function(Za){return Na.apply(this,arguments)||0>mxUtils.indexOf(y,Za)};
-this.executeLayout(function(){ya.execute(I.getDefaultParent());Ma()},!0,P);P=null}else if("organic"==fa||"auto"==fa&&va.length>y.length){I.view.validate();var Ja=new mxFastOrganicLayout(I);Ja.forceConstant=3*ma;Ja.disableEdgeStyle=!1;Ja.resetEdges=!1;var Qa=Ja.isVertexIgnored;Ja.isVertexIgnored=function(Za){return Qa.apply(this,arguments)||0>mxUtils.indexOf(y,Za)};this.executeLayout(function(){Ja.execute(I.getDefaultParent());Ma()},!0,P);P=null}}this.hideDialog()}finally{I.model.endUpdate()}null!=
-P&&P()}}catch(Za){this.handleError(Za)}};EditorUi.prototype.getSearch=function(d){var f="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=d&&0<window.location.search.length){var g="?",m;for(m in urlParams)0>mxUtils.indexOf(d,m)&&null!=urlParams[m]&&(f+=g+m+"="+urlParams[m],g="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(d){d=null!=d?d:window.location.pathname;var f=0<d.indexOf("?")?1:0;if("1"==urlParams.offline)d+=window.location.search;else{var g="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
-m;for(m in urlParams)0>mxUtils.indexOf(g,m)&&(d=0==f?d+"?":d+"&",null!=urlParams[m]&&(d+=m+"="+urlParams[m],f++))}return d};EditorUi.prototype.showLinkDialog=function(d,f,g,m,q){d=new LinkDialog(this,d,f,g,!0,m,q);this.showDialog(d.container,560,130,!0,!0);d.init()};EditorUi.prototype.getServiceCount=function(d){var f=1;null==this.drive&&"function"!==typeof window.DriveClient||f++;null==this.dropbox&&"function"!==typeof window.DropboxClient||f++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||
-f++;null!=this.gitHub&&f++;null!=this.gitLab&&f++;d&&isLocalStorage&&"1"==urlParams.browser&&f++;return f};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var d=this.getCurrentFile(),f=null!=d||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(f);this.menus.get("viewZoom").setEnabled(f);var g=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==d||d.isRestricted());this.actions.get("makeCopy").setEnabled(!g);
-this.actions.get("print").setEnabled(!g);this.menus.get("exportAs").setEnabled(!g);this.menus.get("embed").setEnabled(!g);g="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(g);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(g),this.menus.get("newLibrary").setEnabled(g));d="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=d&&d.isEditable();this.actions.get("image").setEnabled(f);this.actions.get("zoomIn").setEnabled(f);this.actions.get("zoomOut").setEnabled(f);
-this.actions.get("resetView").setEnabled(f);this.actions.get("undo").setEnabled(this.canUndo()&&d);this.actions.get("redo").setEnabled(this.canRedo()&&d);this.menus.get("edit").setEnabled(f);this.menus.get("view").setEnabled(f);this.menus.get("importFrom").setEnabled(d);this.menus.get("arrange").setEnabled(d);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(d),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(d));this.updateUserElement()};
-EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var d=this.getCurrentFile();return null!=d&&d.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var t=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){t.apply(this,arguments);var d=this.editor.graph,
-f=this.getCurrentFile(),g=this.getSelectionState(),m=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(m);this.actions.get("autosave").setEnabled(null!=f&&f.isEditable()&&f.isAutosaveOptional());this.actions.get("guides").setEnabled(m);this.actions.get("editData").setEnabled(d.isEnabled());this.actions.get("shadowVisible").setEnabled(m);this.actions.get("connectionArrows").setEnabled(m);this.actions.get("connectionPoints").setEnabled(m);this.actions.get("copyStyle").setEnabled(m&&!d.isSelectionEmpty());
-this.actions.get("pasteStyle").setEnabled(m&&0<g.cells.length);this.actions.get("editGeometry").setEnabled(0<g.vertices.length);this.actions.get("createShape").setEnabled(m);this.actions.get("createRevision").setEnabled(m);this.actions.get("moveToFolder").setEnabled(null!=f);this.actions.get("makeCopy").setEnabled(null!=f&&!f.isRestricted());this.actions.get("editDiagram").setEnabled(m&&(null==f||!f.isRestricted()));this.actions.get("publishLink").setEnabled(null!=f&&!f.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!=f&&f.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=f);this.menus.get("publish").setEnabled(null!=f&&!f.isRestricted());f=this.actions.get("findReplace");f.setEnabled("hidden"!=this.diagramContainer.style.visibility);
-f.label=mxResources.get("find")+(d.isEnabled()?"/"+mxResources.get("replace"):"")+"...";d=d.view.getState(d.getSelectionCell());this.actions.get("editShape").setEnabled(m&&null!=d&&null!=d.shape&&null!=d.shape.stencil)};var E=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);E.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=
-!1,ExportDialog.exportFile=function(d,f,g,m,q,y,F,C){var I=d.editor.graph;if("xml"==g)d.hideDialog(),d.saveData(f,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");else if("svg"==g)d.hideDialog(),d.saveData(f,"svg",mxUtils.getXml(I.getSvg(m,q,y)),"image/svg+xml");else{var G=d.getFileData(!0,null,null,null,null,!0),Y=I.getGraphBounds(),ba=Math.floor(Y.width*q/I.view.scale),Z=Math.floor(Y.height*q/I.view.scale);if(G.length<=MAX_REQUEST_SIZE&&ba*Z<MAX_AREA)if(d.hideDialog(),"png"!=g&&"jpg"!=g&&
-"jpeg"!=g||!d.isExportToCanvas()){var X={globalVars:I.getExportVariables()};C&&(X.grid={size:I.gridSize,steps:I.view.gridSteps,color:I.view.gridColor});d.saveRequest(f,g,function(qa,Q){return new mxXmlRequest(EXPORT_URL,"format="+g+"&base64="+(Q||"0")+(null!=qa?"&filename="+encodeURIComponent(qa):"")+"&extras="+encodeURIComponent(JSON.stringify(X))+(0<F?"&dpi="+F:"")+"&bg="+(null!=m?m:"none")+"&w="+ba+"&h="+Z+"&border="+y+"&xml="+encodeURIComponent(G))})}else"png"==g?d.exportImage(q,null==m||"none"==
-m,!0,!1,!1,y,!0,!1,null,C,F):d.exportImage(q,!1,!0,!1,!1,y,!0,!1,"jpeg",C);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var d=this.editor.graph,f="";if(null!=this.pages)for(var g=0;g<this.pages.length;g++){var m=d;this.currentPage!=this.pages[g]&&(m=this.createTemporaryGraph(d.getStylesheet()),this.updatePageRoot(this.pages[g]),m.model.setRoot(this.pages[g].root));f+=this.pages[g].getName()+" "+m.getIndexableText()+
-" "}else f=d.getIndexableText();this.editor.graph.setEnabled(!0);return f};EditorUi.prototype.showRemotelyStoredLibrary=function(d){var f={},g=document.createElement("div");g.style.whiteSpace="nowrap";var m=document.createElement("h3");mxUtils.write(m,mxUtils.htmlEntities(d));m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(m);var q=document.createElement("div");q.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";q.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+
-IMAGE_PATH+'/spin.gif"></div>';var y={};try{var F=mxSettings.getCustomLibraries();for(d=0;d<F.length;d++){var C=F[d];if("R"==C.substring(0,1)){var I=JSON.parse(decodeURIComponent(C.substring(1)));y[I[0]]={id:I[0],title:I[1],downloadUrl:I[2]}}}}catch(G){}this.remoteInvoke("getCustomLibraries",null,null,function(G){q.innerText="";if(0==G.length)q.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var Y=0;Y<
-G.length;Y++){var ba=G[Y];y[ba.id]&&(f[ba.id]=ba);var Z=this.addCheckbox(q,ba.title,y[ba.id]);(function(X,qa){mxEvent.addListener(qa,"change",function(){this.checked?f[X.id]=X:delete f[X.id]})})(ba,Z)}},mxUtils.bind(this,function(G){q.innerText="";var Y=document.createElement("div");Y.style.padding="8px";Y.style.textAlign="center";mxUtils.write(Y,mxResources.get("error")+": ");mxUtils.write(Y,null!=G&&null!=G.message?G.message:mxResources.get("unknownError"));q.appendChild(Y)}));g.appendChild(q);
-g=new CustomDialog(this,g,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var G=0,Y;for(Y in f)null==y[Y]&&(G++,mxUtils.bind(this,function(ba){this.remoteInvoke("getFileContent",[ba.downloadUrl],null,mxUtils.bind(this,function(Z){G--;0==G&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,Z,ba))}catch(X){this.handleError(X,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){G--;0==G&&this.spinner.stop();this.handleError(null,
-mxResources.get("errorLoadingFile"))}))})(f[Y]));for(Y in y)f[Y]||this.closeLibrary(new RemoteLibrary(this,null,y[Y]));0==G&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(g.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(d){this.remoteWin=d;for(var f=0;f<this.remoteInvokeQueue.length;f++)d.postMessage(this.remoteInvokeQueue[f],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(d){var f=d.msgMarkers,g=this.remoteInvokeCallbacks[f.callbackId];if(null==g)throw Error("No callback for "+
-(null!=f?f.callbackId:"null"));d.error?g.error&&g.error(d.error.errResp):g.callback&&g.callback.apply(this,d.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,f,g,m,q){var y=!0,F=window.setTimeout(mxUtils.bind(this,function(){y=!1;q({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),C=mxUtils.bind(this,function(){window.clearTimeout(F);y&&m.apply(this,arguments)}),I=mxUtils.bind(this,function(){window.clearTimeout(F);y&&q.apply(this,
-arguments)});g=g||{};g.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:C,error:I});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:f,msgMarkers:g});null!=this.remoteWin?this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,f){var g=mxUtils.bind(this,function(G,Y){var ba={event:"remoteInvokeResponse",msgMarkers:d.msgMarkers};null!=Y?ba.error={errResp:Y}:null!=G&&(ba.resp=G);this.remoteWin.postMessage(JSON.stringify(ba),
-"*")});try{var m=d.funtionName,q=this.remoteInvokableFns[m];if(null!=q&&"function"===typeof this[m]){if(q.allowedDomains){for(var y=!1,F=0;F<q.allowedDomains.length;F++)if(f=="https://"+q.allowedDomains[F]){y=!0;break}if(!y){g(null,"Invalid Call: "+m+" is not allowed.");return}}var C=d.functionArgs;Array.isArray(C)||(C=[]);if(q.isAsync)C.push(function(){g(Array.prototype.slice.apply(arguments))}),C.push(function(G){g(null,G||"Unkown Error")}),this[m].apply(this,C);else{var I=this[m].apply(this,C);
-g([I])}}else g(null,"Invalid Call: "+m+" is not found.")}catch(G){g(null,"Invalid Call: An error occurred, "+G.message)}};EditorUi.prototype.openDatabase=function(d,f){if(null==this.database){var g=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=g)try{var m=g.open("database",2);m.onupgradeneeded=function(q){try{var y=m.result;1>q.oldVersion&&y.createObjectStore("objects",{keyPath:"key"});2>q.oldVersion&&(y.createObjectStore("files",{keyPath:"title"}),y.createObjectStore("filesInfo",
-{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(F){null!=f&&f(F)}};m.onsuccess=mxUtils.bind(this,function(q){var y=m.result;this.database=y;EditorUi.migrateStorageFiles&&(StorageFile.migrate(y),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(F){if(!F||"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 I=!0,G=!1,Y,ba=0,Z=mxUtils.bind(this,function(){G=!0;this.setDatabaseItem(".drawioMigrated3",!0);C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),X=mxUtils.bind(this,function(){ba++;qa()}),qa=mxUtils.bind(this,function(){try{if(ba>=Y.length)Z();else{var W=Y[ba];StorageFile.getFileContent(this,W,mxUtils.bind(this,
-function(ha){null==ha||".scratchpad"==W&&ha==this.emptyLibraryXml?C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[W]}),"*"):X()}),X)}}catch(ha){console.log(ha)}}),Q=mxUtils.bind(this,function(W){try{this.setDatabaseItem(null,[{title:W.title,size:W.data.length,lastModified:Date.now(),type:W.isLib?"L":"F"},{title:W.title,data:W.data}],X,X,["filesInfo","files"])}catch(ha){console.log(ha)}});F=mxUtils.bind(this,function(W){try{if(W.source==
-C.contentWindow){var ha={};try{ha=JSON.parse(W.data)}catch(la){}"init"==ha.event?(C.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=ha.event||G||(I?null!=ha.resp&&0<ha.resp.length&&null!=ha.resp[0]?(Y=ha.resp[0],I=!1,qa()):Z():null!=ha.resp&&0<ha.resp.length&&null!=ha.resp[0]?Q(ha.resp[0]):X())}}catch(la){console.log(la)}});window.addEventListener("message",
-F)}})));d(y);y.onversionchange=function(){y.close()}});m.onerror=f;m.onblocked=function(){}}catch(q){null!=f&&f(q)}else null!=f&&f()}else d(this.database)};EditorUi.prototype.setDatabaseItem=function(d,f,g,m,q){this.openDatabase(mxUtils.bind(this,function(y){try{q=q||"objects";Array.isArray(q)||(q=[q],d=[d],f=[f]);var F=y.transaction(q,"readwrite");F.oncomplete=g;F.onerror=m;for(y=0;y<q.length;y++)F.objectStore(q[y]).put(null!=d&&null!=d[y]?{key:d[y],data:f[y]}:f[y])}catch(C){null!=m&&m(C)}}),m)};
-EditorUi.prototype.removeDatabaseItem=function(d,f,g,m){this.openDatabase(mxUtils.bind(this,function(q){m=m||"objects";Array.isArray(m)||(m=[m],d=[d]);q=q.transaction(m,"readwrite");q.oncomplete=f;q.onerror=g;for(var y=0;y<m.length;y++)q.objectStore(m[y]).delete(d[y])}),g)};EditorUi.prototype.getDatabaseItem=function(d,f,g,m){this.openDatabase(mxUtils.bind(this,function(q){try{m=m||"objects";var y=q.transaction([m],"readonly").objectStore(m).get(d);y.onsuccess=function(){f(y.result)};y.onerror=g}catch(F){null!=
-g&&g(F)}}),g)};EditorUi.prototype.getDatabaseItems=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(m){try{g=g||"objects";var q=m.transaction([g],"readonly").objectStore(g).openCursor(IDBKeyRange.lowerBound(0)),y=[];q.onsuccess=function(F){null==F.target.result?d(y):(y.push(F.target.result.value),F.target.result.continue())};q.onerror=f}catch(F){null!=f&&f(F)}}),f)};EditorUi.prototype.getDatabaseItemKeys=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(m){try{g=g||"objects";
-var q=m.transaction([g],"readonly").objectStore(g).getAllKeys();q.onsuccess=function(){d(q.result)};q.onerror=f}catch(y){null!=f&&f(y)}}),f)};EditorUi.prototype.commentsSupported=function(){var d=this.getCurrentFile();return null!=d?d.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsSaveNeeded():!1};
-EditorUi.prototype.getComments=function(d,f){var g=this.getCurrentFile();null!=g?g.getComments(d,f):d([])};EditorUi.prototype.addComment=function(d,f,g){var m=this.getCurrentFile();null!=m?m.addComment(d,f,g):f(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var d=this.getCurrentFile();return null!=d?d.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var d=this.getCurrentFile();return null!=d?d.canComment():!0};EditorUi.prototype.newComment=function(d,f){var g=this.getCurrentFile();
-return null!=g?g.newComment(d,f):new DrawioComment(this,null,d,Date.now(),Date.now(),!1,f)};EditorUi.prototype.isRevisionHistorySupported=function(){var d=this.getCurrentFile();return null!=d&&d.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(d,f){var g=this.getCurrentFile();null!=g&&g.getRevisions?g.getRevisions(d,f):f({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var d=this.getCurrentFile();return null!=d&&(d.constructor==
-DriveFile&&d.isEditable()||d.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(d){d.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(d,f,g,m,q,y,F,C){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(d,f,g,m,q,y,F,C)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(d)};
-EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(d,f)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,f,g,m,q,y,F,C,I,G,Y,ba,Z,X,qa,Q){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");
-return this.editor.exportToCanvas(d,f,g,m,q,y,F,C,I,G,Y,ba,Z,X,qa,Q)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(d,f,g,m){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(d,f,g,m)};EditorUi.prototype.convertImageToDataUri=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");
-return this.editor.convertImageToDataUri(d,f)};EditorUi.prototype.base64Encode=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(d)};EditorUi.prototype.updateCRC=function(d,f,g,m){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(d,f,g,m)};EditorUi.prototype.crc32=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(d)};EditorUi.prototype.writeGraphModelToPng=function(d,f,g,m,q){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");
-return Editor.writeGraphModelToPng(d,f,g,m,q)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var d=[],f=0;f<localStorage.length;f++){var g=localStorage.key(f),m=localStorage.getItem(g);if(0<g.length&&(".scratchpad"==g||"."!=g.charAt(0))&&0<m.length){var q="<mxfile "===m.substring(0,8)||"<?xml"===m.substring(0,5)||"\x3c!--[if IE]>"===m.substring(0,12);m="<mxlibrary>"===m.substring(0,11);(q||
-m)&&d.push(g)}}return d};EditorUi.prototype.getLocalStorageFile=function(d){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var f=localStorage.getItem(d);return{title:d,data:f,isLib:"<mxlibrary>"===f.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(b,e,k,n,D,t){function E(){for(var ja=ba.getElementsByTagName("div"),U=0,L=0;L<ja.length;L++)"none"!=ja[L].style.display&&ja[L].parentNode==ba&&U++;Z.style.display=0==U?"block":"none"}function d(ja,U,L,da){function O(){U.removeChild(ma);U.removeChild(u);aa.style.display="block";N.style.display="block"}I={div:U,comment:ja,saveCallback:L,deleteOnCancel:da};var N=U.querySelector(".geCommentTxt"),aa=U.querySelector(".geCommentActionsList"),ma=document.createElement("textarea");
-ma.className="geCommentEditTxtArea";ma.style.minHeight=N.offsetHeight+"px";ma.value=ja.content;U.insertBefore(ma,N);var u=document.createElement("div");u.className="geCommentEditBtns";var H=mxUtils.button(mxResources.get("cancel"),function(){da?(U.parentNode.removeChild(U),E()):O();I=null});H.className="geCommentEditBtn";u.appendChild(H);var P=mxUtils.button(mxResources.get("save"),function(){N.innerText="";ja.content=ma.value;mxUtils.write(N,ja.content);O();L(ja);I=null});mxEvent.addListener(ma,
-"keydown",mxUtils.bind(this,function(S){mxEvent.isConsumed(S)||((mxEvent.isControlDown(S)||mxClient.IS_MAC&&mxEvent.isMetaDown(S))&&13==S.keyCode?(P.click(),mxEvent.consume(S)):27==S.keyCode&&(H.click(),mxEvent.consume(S)))}));P.focus();P.className="geCommentEditBtn gePrimaryBtn";u.appendChild(P);U.insertBefore(u,N);aa.style.display="none";N.style.display="none";ma.focus()}function f(ja,U){U.innerText="";ja=new Date(ja.modifiedDate);var L=b.timeSince(ja);null==L&&(L=mxResources.get("lessThanAMinute"));
-mxUtils.write(U,mxResources.get("timeAgo",[L],"{1} ago"));U.setAttribute("title",ja.toLocaleDateString()+" "+ja.toLocaleTimeString())}function g(ja){var U=document.createElement("img");U.className="geCommentBusyImg";U.src=IMAGE_PATH+"/spin.gif";ja.appendChild(U);ja.busyImg=U}function m(ja){ja.style.border="1px solid red";ja.removeChild(ja.busyImg)}function q(ja){ja.style.border="";ja.removeChild(ja.busyImg)}function y(ja,U,L,da,O){function N(ca,ea,fa){var ra=document.createElement("li");ra.className=
-"geCommentAction";var ua=document.createElement("a");ua.className="geCommentActionLnk";mxUtils.write(ua,ca);ra.appendChild(ua);mxEvent.addListener(ua,"click",function(sa){ea(sa,ja);sa.preventDefault();mxEvent.consume(sa)});R.appendChild(ra);fa&&(ra.style.display="none")}function aa(){function ca(ra){ea.push(fa);if(null!=ra.replies)for(var ua=0;ua<ra.replies.length;ua++)fa=fa.nextSibling,ca(ra.replies[ua])}var ea=[],fa=u;ca(ja);return{pdiv:fa,replies:ea}}function ma(ca,ea,fa,ra,ua){function sa(){g(ta);
-ja.addReply(Ba,function(Pa){Ba.id=Pa;ja.replies.push(Ba);q(ta);fa&&fa()},function(Pa){Aa();m(ta);b.handleError(Pa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},ra,ua)}function Aa(){d(Ba,ta,function(Pa){sa()},!0)}var Ca=aa().pdiv,Ba=b.newComment(ca,b.getCurrentUser());Ba.pCommentId=ja.id;null==ja.replies&&(ja.replies=[]);var ta=y(Ba,ja.replies,Ca,da+1);ea?Aa():sa()}if(O||!ja.isResolved){Z.style.display="none";var u=document.createElement("div");u.className="geCommentContainer";
-u.setAttribute("data-commentId",ja.id);u.style.marginLeft=20*da+5+"px";ja.isResolved&&!Editor.isDarkMode()&&(u.style.backgroundColor="ghostWhite");var H=document.createElement("div");H.className="geCommentHeader";var P=document.createElement("img");P.className="geCommentUserImg";P.src=ja.user.pictureUrl||Editor.userImage;H.appendChild(P);P=document.createElement("div");P.className="geCommentHeaderTxt";H.appendChild(P);var S=document.createElement("div");S.className="geCommentUsername";mxUtils.write(S,
-ja.user.displayName||"");P.appendChild(S);S=document.createElement("div");S.className="geCommentDate";S.setAttribute("data-commentId",ja.id);f(ja,S);P.appendChild(S);u.appendChild(H);H=document.createElement("div");H.className="geCommentTxt";mxUtils.write(H,ja.content||"");u.appendChild(H);ja.isLocked&&(u.style.opacity="0.5");H=document.createElement("div");H.className="geCommentActions";var R=document.createElement("ul");R.className="geCommentActionsList";H.appendChild(R);F||ja.isLocked||0!=da&&
-!C||N(mxResources.get("reply"),function(){ma("",!0)},ja.isResolved);P=b.getCurrentUser();null==P||P.id!=ja.user.id||F||ja.isLocked||(N(mxResources.get("edit"),function(){function ca(){d(ja,u,function(){g(u);ja.editComment(ja.content,function(){q(u)},function(ea){m(u);ca();b.handleError(ea,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}ca()},ja.isResolved),N(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){g(u);ja.deleteComment(function(ca){if(!0===
-ca){ca=u.querySelector(".geCommentTxt");ca.innerText="";mxUtils.write(ca,mxResources.get("msgDeleted"));var ea=u.querySelectorAll(".geCommentAction");for(ca=0;ca<ea.length;ca++)ea[ca].parentNode.removeChild(ea[ca]);q(u);u.style.opacity="0.5"}else{ea=aa(ja).replies;for(ca=0;ca<ea.length;ca++)ba.removeChild(ea[ca]);for(ca=0;ca<U.length;ca++)if(U[ca]==ja){U.splice(ca,1);break}Z.style.display=0==ba.getElementsByTagName("div").length?"block":"none"}},function(ca){m(u);b.handleError(ca,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},
-ja.isResolved));F||ja.isLocked||0!=da||N(ja.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(ca){function ea(){var fa=ca.target;fa.innerText="";ja.isResolved=!ja.isResolved;mxUtils.write(fa,ja.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var ra=ja.isResolved?"none":"",ua=aa(ja).replies,sa=Editor.isDarkMode()?"transparent":ja.isResolved?"ghostWhite":"white",Aa=0;Aa<ua.length;Aa++){ua[Aa].style.backgroundColor=sa;for(var Ca=ua[Aa].querySelectorAll(".geCommentAction"),
-Ba=0;Ba<Ca.length;Ba++)Ca[Ba]!=fa.parentNode&&(Ca[Ba].style.display=ra);Q||(ua[Aa].style.display="none")}E()}ja.isResolved?ma(mxResources.get("reOpened")+": ",!0,ea,!1,!0):ma(mxResources.get("markedAsResolved"),!1,ea,!0)});u.appendChild(H);null!=L?ba.insertBefore(u,L.nextSibling):ba.appendChild(u);for(L=0;null!=ja.replies&&L<ja.replies.length;L++)H=ja.replies[L],H.isResolved=ja.isResolved,y(H,ja.replies,null,da+1,O);null!=I&&(I.comment.id==ja.id?(O=ja.content,ja.content=I.comment.content,d(ja,u,I.saveCallback,
-I.deleteOnCancel),ja.content=O):null==I.comment.id&&I.comment.pCommentId==ja.id&&(ba.appendChild(I.div),d(I.comment,I.div,I.saveCallback,I.deleteOnCancel)));return u}}var F=!b.canComment(),C=b.canReplyToReplies(),I=null,G=document.createElement("div");G.className="geCommentsWin";G.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var Y=EditorUi.compactUi?"26px":"30px",ba=document.createElement("div");ba.className="geCommentsList";ba.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:
-"whiteSmoke";ba.style.bottom=parseInt(Y)+7+"px";G.appendChild(ba);var Z=document.createElement("span");Z.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(Z,mxResources.get("noCommentsFound"));var X=document.createElement("div");X.className="geToolbarContainer geCommentsToolbar";X.style.height=Y;X.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";X.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";Y=document.createElement("a");Y.className=
-"geButton";if(!F){var qa=Y.cloneNode();qa.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';qa.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(qa,"click",function(ja){function U(){d(L,da,function(O){g(da);b.addComment(O,function(N){O.id=N;W.push(O);q(da)},function(N){m(da);U();b.handleError(N,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var L=b.newComment("",b.getCurrentUser()),da=y(L,W,null,0);U();ja.preventDefault();
-mxEvent.consume(ja)});X.appendChild(qa)}qa=Y.cloneNode();qa.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';qa.setAttribute("title",mxResources.get("showResolved"));var Q=!1;Editor.isDarkMode()&&(qa.style.filter="invert(100%)");mxEvent.addListener(qa,"click",function(ja){this.className=(Q=!Q)?"geButton geCheckedBtn":"geButton";ha();ja.preventDefault();mxEvent.consume(ja)});X.appendChild(qa);b.commentsRefreshNeeded()&&(qa=Y.cloneNode(),qa.innerHTML='<img src="'+
-IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',qa.setAttribute("title",mxResources.get("refresh")),Editor.isDarkMode()&&(qa.style.filter="invert(100%)"),mxEvent.addListener(qa,"click",function(ja){ha();ja.preventDefault();mxEvent.consume(ja)}),X.appendChild(qa));b.commentsSaveNeeded()&&(Y=Y.cloneNode(),Y.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',Y.setAttribute("title",mxResources.get("save")),Editor.isDarkMode()&&(Y.style.filter="invert(100%)"),
-mxEvent.addListener(Y,"click",function(ja){t();ja.preventDefault();mxEvent.consume(ja)}),X.appendChild(Y));G.appendChild(X);var W=[],ha=mxUtils.bind(this,function(){this.hasError=!1;if(null!=I)try{I.div=I.div.cloneNode(!0);var ja=I.div.querySelector(".geCommentEditTxtArea"),U=I.div.querySelector(".geCommentEditBtns");I.comment.content=ja.value;ja.parentNode.removeChild(ja);U.parentNode.removeChild(U)}catch(L){b.handleError(L)}ba.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+
-IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";C=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(L){function da(O){if(null!=O){O.sort(function(aa,ma){return new Date(aa.modifiedDate)-new Date(ma.modifiedDate)});for(var N=0;N<O.length;N++)da(O[N].replies)}}L.sort(function(O,N){return new Date(O.modifiedDate)-new Date(N.modifiedDate)});ba.innerText="";ba.appendChild(Z);Z.style.display="block";W=L;for(L=0;L<W.length;L++)da(W[L].replies),
-y(W[L],W,null,0,Q);null!=I&&null==I.comment.id&&null==I.comment.pCommentId&&(ba.appendChild(I.div),d(I.comment,I.div,I.saveCallback,I.deleteOnCancel))},mxUtils.bind(this,function(L){ba.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(L&&L.message?": "+L.message:""));this.hasError=!0})):ba.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});ha();this.refreshComments=ha;X=mxUtils.bind(this,function(){function ja(N){var aa=L[N.id];if(null!=aa)for(f(N,aa),aa=0;null!=N.replies&&aa<N.replies.length;aa++)ja(N.replies[aa])}
-if(this.window.isVisible()){for(var U=ba.querySelectorAll(".geCommentDate"),L={},da=0;da<U.length;da++){var O=U[da];L[O.getAttribute("data-commentId")]=O}for(da=0;da<W.length;da++)ja(W[da])}});setInterval(X,6E4);this.refreshCommentsTime=X;this.window=new mxWindow(mxResources.get("comments"),G,e,k,n,D,!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(ja,U){var L=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;ja=Math.max(0,Math.min(ja,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));U=Math.max(0,Math.min(U,L-this.table.clientHeight-48));this.getX()==ja&&this.getY()==U||mxWindow.prototype.setLocation.apply(this,arguments)};var la=
-mxUtils.bind(this,function(){var ja=this.window.getX(),U=this.window.getY();this.window.setLocation(ja,U)});mxEvent.addListener(window,"resize",la);this.destroy=function(){mxEvent.removeListener(window,"resize",la);this.window.destroy()}},ConfirmDialog=function(b,e,k,n,D,t,E,d,f,g,m){var q=document.createElement("div");q.style.textAlign="center";m=null!=m?m:44;var y=document.createElement("div");y.style.padding="6px";y.style.overflow="auto";y.style.maxHeight=m+"px";y.style.lineHeight="1.2em";mxUtils.write(y,
-e);q.appendChild(y);null!=g&&(y=document.createElement("div"),y.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",g),y.appendChild(e),q.appendChild(y));g=document.createElement("div");g.style.textAlign="center";g.style.whiteSpace="nowrap";var F=document.createElement("input");F.setAttribute("type","checkbox");t=mxUtils.button(t||mxResources.get("cancel"),function(){b.hideDialog();null!=n&&n(F.checked)});t.className="geBtn";null!=d&&(t.innerHTML=d+"<br>"+t.innerHTML,
-t.style.paddingBottom="8px",t.style.paddingTop="8px",t.style.height="auto",t.style.width="40%");b.editor.cancelFirst&&g.appendChild(t);var C=mxUtils.button(D||mxResources.get("ok"),function(){b.hideDialog();null!=k&&k(F.checked)});g.appendChild(C);null!=E?(C.innerHTML=E+"<br>"+C.innerHTML+"<br>",C.style.paddingBottom="8px",C.style.paddingTop="8px",C.style.height="auto",C.className="geBtn",C.style.width="40%"):C.className="geBtn gePrimaryBtn";b.editor.cancelFirst||g.appendChild(t);q.appendChild(g);
-f?(g.style.marginTop="10px",y=document.createElement("p"),y.style.marginTop="20px",y.style.marginBottom="0px",y.appendChild(F),D=document.createElement("span"),mxUtils.write(D," "+mxResources.get("rememberThisSetting")),y.appendChild(D),q.appendChild(y),mxEvent.addListener(D,"click",function(I){F.checked=!F.checked;mxEvent.consume(I)})):g.style.marginTop="12px";this.init=function(){C.focus()};this.container=q};function DiagramPage(b,e){this.node=b;null!=e?this.node.setAttribute("id",e):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
+Math.max(C/q,I/q);if(1<G){var Z=Math.round(C/G),ca=Math.round(I/G),aa=document.createElement("canvas");aa.width=Z;aa.height=ca;aa.getContext("2d").drawImage(d,0,0,Z,ca);var Y=aa.toDataURL();if(Y.length<f.length){var pa=document.createElement("canvas");pa.width=Z;pa.height=ca;var Q=pa.toDataURL();Y!==Q&&(f=Y,C=Z,I=ca)}}}catch(X){}g(f,C,I)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,f,g){try{var m=new Image;
+m.onload=function(){m.width=0<m.width?m.width:120;m.height=0<m.height?m.height:120;f(m)};null!=g&&(m.onerror=g);m.src=d}catch(q){if(null!=g)g(q);else throw q;}};EditorUi.prototype.getDefaultSketchMode=function(){var d="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?urlParams.rough:d)};var D=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:this.getDefaultSketchMode()),null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());var d=this,f=this.editor.graph;Editor.isDarkMode()&&(f.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);Graph.touchStyle&&(f.panningHandler.isPanningTrigger=function(X){var ha=X.getEvent();
+return null==X.getState()&&!mxEvent.isMouseEvent(ha)&&!f.freehand.isDrawing()||mxEvent.isPopupTrigger(ha)&&(null==X.getState()||mxEvent.isControlDown(ha)||mxEvent.isShiftDown(ha))});f.cellEditor.editPlantUmlData=function(X,ha,U){var ma=JSON.parse(U);ha=new TextareaDialog(d,mxResources.get("plantUml")+":",ma.data,function(T){null!=T&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(T,ma.format,function(M,ia,N){d.spinner.stop();f.getModel().beginUpdate();try{if("txt"==
+ma.format)f.labelChanged(X,"<pre>"+M+"</pre>"),f.updateCellSize(X,!0);else{f.setCellStyles("image",d.convertDataUri(M),[X]);var O=f.model.getGeometry(X);null!=O&&(O=O.clone(),O.width=ia,O.height=N,f.cellsResized([X],[O],!1))}f.setAttributeForCell(X,"plantUmlData",JSON.stringify({data:T,format:ma.format}))}finally{f.getModel().endUpdate()}},function(M){d.handleError(M)})},null,null,400,220);d.showDialog(ha.container,420,300,!0,!0);ha.init()};f.cellEditor.editMermaidData=function(X,ha,U){var ma=JSON.parse(U);
+ha=new TextareaDialog(d,mxResources.get("mermaid")+":",ma.data,function(T){null!=T&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(T,ma.config,function(M,ia,N){d.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",M,[X]);var O=f.model.getGeometry(X);null!=O&&(O=O.clone(),O.width=Math.max(O.width,ia),O.height=Math.max(O.height,N),f.cellsResized([X],[O],!1));f.setAttributeForCell(X,"mermaidData",JSON.stringify({data:T,config:ma.config},null,2))}finally{f.getModel().endUpdate()}},
+function(M){d.handleError(M)})},null,null,400,220);d.showDialog(ha.container,420,300,!0,!0);ha.init()};var g=f.cellEditor.startEditing;f.cellEditor.startEditing=function(X,ha){try{var U=this.graph.getAttributeForCell(X,"plantUmlData");if(null!=U)this.editPlantUmlData(X,ha,U);else if(U=this.graph.getAttributeForCell(X,"mermaidData"),null!=U)this.editMermaidData(X,ha,U);else{var ma=f.getCellStyle(X);"1"==mxUtils.getValue(ma,"metaEdit","0")?d.showDataDialog(X):g.apply(this,arguments)}}catch(T){d.handleError(T)}};
+f.getLinkTitle=function(X){return d.getLinkTitle(X)};f.customLinkClicked=function(X){var ha=!1;try{d.handleCustomLink(X),ha=!0}catch(U){d.handleError(U)}return ha};var m=f.parseBackgroundImage;f.parseBackgroundImage=function(X){var ha=m.apply(this,arguments);null!=ha&&null!=ha.src&&Graph.isPageLink(ha.src)&&(ha={originalSrc:ha.src});return ha};var q=f.setBackgroundImage;f.setBackgroundImage=function(X){null!=X&&null!=X.originalSrc&&(X=d.createImageForPageLink(X.originalSrc,d.currentPage,this));q.apply(this,
+arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(X,ha){X=null!=f.backgroundImage?f.backgroundImage.originalSrc:null;if(null!=X){var U=X.indexOf(",");if(0<U)for(X=X.substring(U+1),ha=ha.getProperty("patches"),U=0;U<ha.length;U++)if(null!=ha[U][EditorUi.DIFF_UPDATE]&&null!=ha[U][EditorUi.DIFF_UPDATE][X]||
+null!=ha[U][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(ha[U][EditorUi.DIFF_REMOVE],X)){f.refreshBackgroundImage();break}}}));var y=f.getBackgroundImageObject;f.getBackgroundImageObject=function(X,ha){var U=y.apply(this,arguments);if(null!=U&&null!=U.originalSrc)if(!ha)U={src:U.originalSrc};else if(ha&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var ma=this.stylesheet,T=this.shapeForegroundColor,M=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor=
+"#ffffff";this.shapeForegroundColor="#000000";U=d.createImageForPageLink(U.originalSrc);this.shapeBackgroundColor=M;this.shapeForegroundColor=T;this.stylesheet=ma}return U};var F=this.clearDefaultStyle;this.clearDefaultStyle=function(){F.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 C=d.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(X){X=null!=X?X:"";"1"==urlParams.dev&&(X+=(0<X.length?"&":"?")+"dev=1");return C.apply(this,arguments)};var I=f.addClickHandler;f.addClickHandler=function(X,ha,U){var ma=ha;ha=function(T,M){if(null==M){var ia=mxEvent.getSource(T);"a"==ia.nodeName.toLowerCase()&&(M=ia.getAttribute("href"))}null!=M&&f.isCustomLink(M)&&(mxEvent.isTouchEvent(T)||!mxEvent.isPopupTrigger(T))&&f.customLinkClicked(M)&&mxEvent.consume(T);
+null!=ma&&ma(T,M)};I.call(this,X,ha,U)};D.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var G=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(X,ha,U){d.editor.graph.isSelectionEmpty()?G.apply(this,arguments):d.menus.addMenuItems(X,"delete - cut copy copyAsImage - duplicate".split(" "),null,U)}}d.actions.get("print").funct=function(){d.showDialog((new PrintDialog(d)).container,360,null!=
+d.pages&&1<d.pages.length?470:390,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var Z=f.getExportVariables;f.getExportVariables=function(){var X=Z.apply(this,arguments),ha=d.getCurrentFile();null!=ha&&(X.filename=ha.getTitle());X.pagecount=null!=d.pages?d.pages.length:1;X.page=null!=d.currentPage?d.currentPage.getName():"";X.pagenumber=null!=d.pages&&null!=d.currentPage?mxUtils.indexOf(d.pages,d.currentPage)+1:1;return X};var ca=f.getGlobalVariable;f.getGlobalVariable=function(X){var ha=
+d.getCurrentFile();return"filename"==X&&null!=ha?ha.getTitle():"page"==X&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==X?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+1:1:"pagecount"==X?null!=d.pages?d.pages.length:1:ca.apply(this,arguments)};var aa=f.labelLinkClicked;f.labelLinkClicked=function(X,ha,U){var ma=ha.getAttribute("href");if(null==ma||!f.isCustomLink(ma)||!mxEvent.isTouchEvent(U)&&mxEvent.isPopupTrigger(U))aa.apply(this,arguments);else{if(!f.isEnabled()||
+null!=X&&f.isCellLocked(X.cell))f.customLinkClicked(ma),f.getRubberband().reset();mxEvent.consume(U)}};this.editor.getOrCreateFilename=function(){var X=d.defaultFilename,ha=d.getCurrentFile();null!=ha&&(X=null!=ha.getTitle()?ha.getTitle():X);return X};var Y=this.actions.get("print");Y.setEnabled(!mxClient.IS_IOS||!navigator.standalone);Y.visible=Y.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(67,!0,"copyStyle",
+!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"insertRectangle"),this.keyHandler.bindAction(75,!0,"insertEllipse",!0),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,
+null,24);Graph.fileSupport&&f.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(X){var ha=f.cellEditor.text2,U=null;null!=ha&&(mxEvent.addListener(ha,"dragleave",function(ma){null!=U&&(U.parentNode.removeChild(U),U=null);ma.stopPropagation();ma.preventDefault()}),mxEvent.addListener(ha,"dragover",mxUtils.bind(this,function(ma){null==U&&(!mxClient.IS_IE||10<document.documentMode)&&(U=this.highlightElement(ha));ma.stopPropagation();ma.preventDefault()})),mxEvent.addListener(ha,"drop",mxUtils.bind(this,
+function(ma){null!=U&&(U.parentNode.removeChild(U),U=null);if(0<ma.dataTransfer.files.length)this.importFiles(ma.dataTransfer.files,0,0,this.maxImageSize,function(M,ia,N,O,ba,la){f.insertImage(M,ba,la)},function(){},function(M){return"image/"==M.type.substring(0,6)},function(M){for(var ia=0;ia<M.length;ia++)M[ia]()},mxEvent.isControlDown(ma));else if(0<=mxUtils.indexOf(ma.dataTransfer.types,"text/uri-list")){var T=ma.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(T)?
+this.loadImage(decodeURIComponent(T),mxUtils.bind(this,function(M){var ia=Math.max(1,M.width);M=Math.max(1,M.height);var N=this.maxImageSize;N=Math.min(1,Math.min(N/Math.max(1,ia)),N/Math.max(1,M));f.insertImage(decodeURIComponent(T),ia*N,M*N)})):document.execCommand("insertHTML",!1,ma.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(ma.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,ma.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(ma.dataTransfer.types,"text/plain")&&
+document.execCommand("insertHTML",!1,ma.dataTransfer.getData("text/plain"));ma.stopPropagation();ma.preventDefault()})))}));this.isSettingsEnabled()&&(Y=this.editor.graph.view,Y.setUnit(mxSettings.getUnit()),Y.addListener("unitChanged",function(X,ha){mxSettings.setUnit(ha.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,
+Y.unit),this.refresh());if("1"==urlParams.styledev){Y=document.getElementById("geFooter");null!=Y&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),
+this.styleInput.value)})),Y.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(X,ha){0<this.editor.graph.getSelectionCount()?(X=this.editor.graph.getSelectionCell(),X=this.editor.graph.getModel().getStyle(X),this.styleInput.value=X||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var pa=this.isSelectionAllowed;this.isSelectionAllowed=function(X){return mxEvent.getSource(X)==this.styleInput?
+!0:pa.apply(this,arguments)}}Y=document.getElementById("geInfo");null!=Y&&Y.parentNode.removeChild(Y);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var Q=null;mxEvent.addListener(f.container,"dragleave",function(X){f.isEnabled()&&(null!=Q&&(Q.parentNode.removeChild(Q),Q=null),X.stopPropagation(),X.preventDefault())});mxEvent.addListener(f.container,"dragover",mxUtils.bind(this,function(X){null==Q&&(!mxClient.IS_IE||10<document.documentMode)&&(Q=this.highlightElement(f.container));
+null!=this.sidebar&&this.sidebar.hideTooltip();X.stopPropagation();X.preventDefault()}));mxEvent.addListener(f.container,"drop",mxUtils.bind(this,function(X){null!=Q&&(Q.parentNode.removeChild(Q),Q=null);if(f.isEnabled()){var ha=mxUtils.convertPoint(f.container,mxEvent.getClientX(X),mxEvent.getClientY(X)),U=X.dataTransfer.files,ma=f.view.translate,T=f.view.scale,M=ha.x/T-ma.x,ia=ha.y/T-ma.y;if(0<U.length)ha=1==U.length&&this.isBlankFile()&&!this.canUndo()&&("image/svg"===U[0].type.substring(0,9)||
+"image/"!==U[0].type.substring(0,6)||/(\.drawio.png)$/i.test(U[0].name)),"1"!=urlParams.embed&&(mxEvent.isShiftDown(X)||ha)?(!mxEvent.isShiftDown(X)&&ha&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(U,!0)):(mxEvent.isAltDown(X)&&(ia=M=null),this.importFiles(U,M,ia,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(X),null,null,mxEvent.isShiftDown(X),X));else{mxEvent.isAltDown(X)&&(ia=M=0);var N=0<=mxUtils.indexOf(X.dataTransfer.types,"text/uri-list")?X.dataTransfer.getData("text/uri-list"):
+null;U=this.extractGraphModelFromEvent(X,null!=this.pages);if(null!=U)f.setSelectionCells(this.importXml(U,M,ia,!0));else if(0<=mxUtils.indexOf(X.dataTransfer.types,"text/html")){var O=X.dataTransfer.getData("text/html");U=document.createElement("div");U.innerHTML=f.sanitizeHtml(O);var ba=null;ha=U.getElementsByTagName("img");null!=ha&&1==ha.length?(O=ha[0].getAttribute("src"),null==O&&(O=ha[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(O)||(ba=!0)):(ha=U.getElementsByTagName("a"),
+null!=ha&&1==ha.length?O=ha[0].getAttribute("href"):(U=U.getElementsByTagName("pre"),null!=U&&1==U.length&&(O=mxUtils.getTextContent(U[0]))));var la=!0,u=mxUtils.bind(this,function(){f.setSelectionCells(this.insertTextAt(O,M,ia,!0,ba,null,la,mxEvent.isControlDown(X)))});ba&&null!=O&&O.length>this.resampleThreshold?this.confirmImageResize(function(H){la=H;u()},mxEvent.isControlDown(X)):u()}else null!=N&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(N)?this.loadImage(decodeURIComponent(N),mxUtils.bind(this,
+function(H){var P=Math.max(1,H.width);H=Math.max(1,H.height);var W=this.maxImageSize;W=Math.min(1,Math.min(W/Math.max(1,P)),W/Math.max(1,H));f.setSelectionCell(f.insertVertex(null,null,"",M,ia,P*W,H*W,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+N+";"))}),mxUtils.bind(this,function(H){f.setSelectionCells(this.insertTextAt(N,M,ia,!0))})):0<=mxUtils.indexOf(X.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(X.dataTransfer.getData("text/plain"),
+M,ia,!0))}}X.stopPropagation();X.preventDefault()}),!1)}f.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var d=this.editor.graph;d.container.addEventListener("paste",mxUtils.bind(this,function(f){if(!mxEvent.isConsumed(f))try{for(var g=f.clipboardData||f.originalEvent.clipboardData,m=!1,q=0;q<g.types.length;q++)if("text/"===g.types[q].substring(0,5)){m=!0;break}if(!m){var y=
+g.items;for(index in y){var F=y[index];if("file"===F.kind){if(d.isEditing())this.importFiles([F.getAsFile()],0,0,this.maxImageSize,function(I,G,Z,ca,aa,Y){d.insertImage(I,aa,Y)},function(){},function(I){return"image/"==I.type.substring(0,6)},function(I){for(var G=0;G<I.length;G++)I[G]()});else{var C=this.editor.graph.getInsertPoint();this.importFiles([F.getAsFile()],C.x,C.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(I){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function d(){window.setTimeout(function(){g.innerHTML=
+"&nbsp;";g.focus();document.execCommand("selectAll",!1,null)},0)}var f=this.editor.graph,g=document.createElement("div");g.setAttribute("autocomplete","off");g.setAttribute("autocorrect","off");g.setAttribute("autocapitalize","off");g.setAttribute("spellcheck","false");g.style.textRendering="optimizeSpeed";g.style.fontFamily="monospace";g.style.wordBreak="break-all";g.style.background="transparent";g.style.color="transparent";g.style.position="absolute";g.style.whiteSpace="nowrap";g.style.overflow=
+"hidden";g.style.display="block";g.style.fontSize="1";g.style.zIndex="-1";g.style.resize="none";g.style.outline="none";g.style.width="1px";g.style.height="1px";mxUtils.setOpacity(g,0);g.contentEditable=!0;g.innerHTML="&nbsp;";var m=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(y){var F=mxEvent.getSource(y);null==f.container||!f.isEnabled()||f.isMouseDown||
+f.isEditing()||null!=this.dialog||"INPUT"==F.nodeName||"TEXTAREA"==F.nodeName||224!=y.keyCode&&(mxClient.IS_MAC||17!=y.keyCode)&&(!mxClient.IS_MAC||91!=y.keyCode&&93!=y.keyCode)||m||(g.style.left=f.container.scrollLeft+10+"px",g.style.top=f.container.scrollTop+10+"px",f.container.appendChild(g),m=!0,g.focus(),document.execCommand("selectAll",!1,null))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(y){var F=y.keyCode;window.setTimeout(mxUtils.bind(this,function(){!m||224!=F&&17!=
+F&&91!=F&&93!=F||(m=!1,f.isEditing()||null!=this.dialog||null==f.container||f.container.focus(),g.parentNode.removeChild(g),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(g,"copy",mxUtils.bind(this,function(y){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(g),d()}catch(F){this.handleError(F)}}));mxEvent.addListener(g,"cut",mxUtils.bind(this,function(y){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(g,!0),d()}catch(F){this.handleError(F)}}));mxEvent.addListener(g,
+"paste",mxUtils.bind(this,function(y){f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&(g.innerHTML="&nbsp;",g.focus(),null!=y.clipboardData&&this.pasteCells(y,g,!0,!0),mxEvent.isConsumed(y)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(y,g,!1,!0)}),0))}),!0);var q=this.isSelectionAllowed;this.isSelectionAllowed=function(y){return mxEvent.getSource(y)==g?!0:q.apply(this,arguments)}};EditorUi.prototype.setSketchMode=function(d){this.spinner.spin(document.body,mxResources.get("working")+
+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(d);null==urlParams.rough&&(mxSettings.settings.sketchMode=d,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};EditorUi.prototype.setPagesVisible=function(d){Editor.pagesVisible!=d&&(Editor.pagesVisible=d,mxSettings.settings.pagesVisible=d,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(d,f){this.sidebar.sidebarTitles!=
+d&&(this.sidebar.sidebarTitles=d,this.sidebar.refresh(),this.isSettingsEnabled()&&f&&(mxSettings.settings.sidebarTitles=d,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};EditorUi.prototype.setInlineFullscreen=function(d){Editor.inlineFullscreen!=d&&(Editor.inlineFullscreen=d,this.fireEvent(new mxEventObject("inlineFullscreenChanged")),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),
+"*"),window.setTimeout(mxUtils.bind(this,function(){this.refresh();this.actions.get("resetView").funct()}),10))};EditorUi.prototype.doSetSketchMode=function(d){if(Editor.sketchMode!=d){var f=function(m,q,y){null==m[q]&&(m[q]=y)},g=this.editor.graph;Editor.sketchMode=d;this.menus.defaultFontSize=d?20:16;g.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);f(g.defaultVertexStyle,"fontSize",this.menus.defaultFontSize);g.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);
+f(g.defaultEdgeStyle,"fontSize",this.menus.defaultFontSize-4);f(g.defaultEdgeStyle,"edgeStyle","none");f(g.defaultEdgeStyle,"rounded","0");f(g.defaultEdgeStyle,"curved","1");f(g.defaultEdgeStyle,"jettySize","auto");f(g.defaultEdgeStyle,"orthogonalLoop","1");f(g.defaultEdgeStyle,"endArrow","open");f(g.defaultEdgeStyle,"endSize","14");f(g.defaultEdgeStyle,"startSize","14");d&&(f(g.defaultVertexStyle,"fontFamily",Editor.sketchFontFamily),f(g.defaultVertexStyle,"fontSource",Editor.sketchFontSource),f(g.defaultVertexStyle,
+"hachureGap","4"),f(g.defaultVertexStyle,"sketch","1"),f(g.defaultEdgeStyle,"fontFamily",Editor.sketchFontFamily),f(g.defaultEdgeStyle,"fontSource",Editor.sketchFontSource),f(g.defaultEdgeStyle,"sketch","1"),f(g.defaultEdgeStyle,"hachureGap","4"),f(g.defaultEdgeStyle,"sourcePerimeterSpacing","8"),f(g.defaultEdgeStyle,"targetPerimeterSpacing","8"));g.currentVertexStyle=mxUtils.clone(g.defaultVertexStyle);g.currentEdgeStyle=mxUtils.clone(g.defaultEdgeStyle);this.clearDefaultStyle()}};EditorUi.prototype.getLinkTitle=
+function(d){var f=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(d)){var g=d.indexOf(",");0<g&&(f=this.getPageById(d.substring(g+1)),f=null!=f?f.getName():mxResources.get("pageNotFound"))}else"data:"==d.substring(0,5)&&(f=mxResources.get("action"));return f};EditorUi.prototype.handleCustomLink=function(d){if(Graph.isPageLink(d)){var f=d.indexOf(",");if(d=this.getPageById(d.substring(f+1)))this.selectPage(d);else throw Error(mxResources.get("pageNotFound")||"Page not found");
+}else this.editor.graph.handleCustomLink(d)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){Editor.pagesVisible=mxSettings.settings.pagesVisible;ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(d){d.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=
+mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(d){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(d,f){"1"!=urlParams["ext-fonts"]?mxSettings.setCustomFonts(this.menus.customFonts):(d=f.getProperty("customFonts"),this.menus.customFonts=d,mxSettings.setCustomFonts(d));mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());
+this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(d,f){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(d,f){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));
+this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor=mxSettings.getGridColor(!0);this.editor.graph.view.defaultGridColor=mxSettings.getGridColor(!1);this.addListener("gridColorChanged",mxUtils.bind(this,function(d,f){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(d,
+f){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),
+mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(d,f,g){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(m,q){try{this.spinner.stop();var y=this.createImageDataUri(m,f,"png"),F=parseInt(q.getAttribute("width")),C=parseInt(q.getAttribute("height"));this.writeImageToClipboard(y,
+F,C,mxUtils.bind(this,function(I){this.handleError(I)}))}catch(I){this.handleError(I)}}),null,null,null,mxUtils.bind(this,function(m){this.spinner.stop();this.handleError(m)}),null,null,null!=g?g:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<d.length?d:null)}catch(m){this.handleError(m)}};EditorUi.prototype.writeImageToClipboard=function(d,f,g,m){var q=this.base64ToBlob(d.substring(d.indexOf(",")+1),"image/png");d=new ClipboardItem({"image/png":q,
+"text/html":new Blob(['<img src="'+d+'" width="'+f+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([d])["catch"](m)};EditorUi.prototype.copyCells=function(d,f){var g=this.editor.graph;if(g.isSelectionEmpty())d.innerText="";else{var m=mxUtils.sortCells(g.model.getTopmostCells(g.getSelectionCells())),q=mxUtils.getXml(g.encodeCells(m));mxUtils.setTextContent(d,encodeURIComponent(q));f?(g.removeCells(m,!1),g.lastPasteXml=null):(g.lastPasteXml=q,g.pasteCounter=0);d.focus();document.execCommand("selectAll",
+!1,null)}};EditorUi.prototype.copyXml=function(){var d=null;if(Editor.enableNativeCipboard){var f=this.editor.graph;f.isSelectionEmpty()||(d=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),f=mxUtils.getXml(f.encodeCells(d)),navigator.clipboard.writeText(f))}return d};EditorUi.prototype.pasteXml=function(d,f,g,m){var q=this.editor.graph,y=null;q.lastPasteXml==d?q.pasteCounter++:(q.lastPasteXml=d,q.pasteCounter=0);var F=q.pasteCounter*q.gridSize;if(g||this.isCompatibleString(d))y=
+this.importXml(d,F,F),q.setSelectionCells(y);else if(f&&1==q.getSelectionCount()){F=q.getStartEditingCell(q.getSelectionCell(),m);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&"image"==q.getCurrentCellStyle(F)[mxConstants.STYLE_SHAPE])q.setCellStyles(mxConstants.STYLE_IMAGE,d,[F]);else{q.model.beginUpdate();try{q.labelChanged(F,d),Graph.isLink(d)&&q.setLinkForCell(F,d)}finally{q.model.endUpdate()}}q.setSelectionCell(F)}else y=q.getInsertPoint(),q.isMouseInsertPoint()&&(F=0,q.lastPasteXml==d&&0<q.pasteCounter&&
+q.pasteCounter--),y=this.insertTextAt(d,y.x+F,y.y+F,!0),q.setSelectionCells(y);q.isSelectionEmpty()||(q.scrollCellToVisible(q.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(q.view.getState(q.getSelectionCell())));return y};EditorUi.prototype.pasteCells=function(d,f,g,m){if(!mxEvent.isConsumed(d)){var q=f,y=!1;if(g&&null!=d.clipboardData&&d.clipboardData.getData){var F=d.clipboardData.getData("text/plain"),C=!1;if(null!=F&&0<F.length&&"%3CmxGraphModel%3E"==F.substring(0,18))try{var I=
+decodeURIComponent(F);this.isCompatibleString(I)&&(C=!0,F=I)}catch(ca){}C=C?null:d.clipboardData.getData("text/html");null!=C&&0<C.length?(q=this.parseHtmlData(C),y="text/plain"!=q.getAttribute("data-type")):null!=F&&0<F.length&&(q=document.createElement("div"),mxUtils.setTextContent(q,C))}F=q.getElementsByTagName("span");if(null!=F&&0<F.length&&"application/vnd.lucid.chart.objects"===F[0].getAttribute("data-lucid-type"))g=F[0].getAttribute("data-lucid-content"),null!=g&&0<g.length&&(this.convertLucidChart(g,
+mxUtils.bind(this,function(ca){var aa=this.editor.graph;aa.lastPasteXml==ca?aa.pasteCounter++:(aa.lastPasteXml=ca,aa.pasteCounter=0);var Y=aa.pasteCounter*aa.gridSize;aa.setSelectionCells(this.importXml(ca,Y,Y));aa.scrollCellToVisible(aa.getSelectionCell())}),mxUtils.bind(this,function(ca){this.handleError(ca)})),mxEvent.consume(d));else{y=y?q.innerHTML:mxUtils.trim(null==q.innerText?mxUtils.getTextContent(q):q.innerText);C=!1;try{var G=y.lastIndexOf("%3E");0<=G&&G<y.length-3&&(y=y.substring(0,G+
+3))}catch(ca){}try{F=q.getElementsByTagName("span"),(I=null!=F&&0<F.length?mxUtils.trim(decodeURIComponent(F[0].textContent)):decodeURIComponent(y))&&(this.isCompatibleString(I)||0==I.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(C=!0,y=I)}catch(ca){}try{if(null!=y&&0<y.length){if(0==y.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))try{"undefined"!==typeof MiroImporter&&(y=(new MiroImporter).importMiroJson(JSON.parse(y)))}catch(ca){console.log("Miro import error:",
+ca)}this.pasteXml(y,m,C,d);try{mxEvent.consume(d)}catch(ca){}}else if(!g){var Z=this.editor.graph;Z.lastPasteXml=null;Z.pasteCounter=0}}catch(ca){this.handleError(ca)}}}f.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(d){if(Graph.fileSupport)for(var f=null,g=0;g<d.length;g++)mxEvent.addListener(d[g],"dragleave",function(m){null!=f&&(f.parentNode.removeChild(f),f=null);m.stopPropagation();m.preventDefault()}),mxEvent.addListener(d[g],"dragover",mxUtils.bind(this,function(m){(this.editor.graph.isEnabled()||
+"1"!=urlParams.embed)&&null==f&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(f=this.highlightElement());m.stopPropagation();m.preventDefault()})),mxEvent.addListener(d[g],"drop",mxUtils.bind(this,function(m){null!=f&&(f.parentNode.removeChild(f),f=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<m.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(m.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(m)&&
+!mxEvent.isShiftDown(m)):this.openFiles(m.dataTransfer.files,!0);else{var q=this.extractGraphModelFromEvent(m);if(null==q){var y=null!=m.dataTransfer?m.dataTransfer:m.clipboardData;null!=y&&(10==document.documentMode||11==document.documentMode?q=y.getData("Text"):(q=null,q=0<=mxUtils.indexOf(y.types,"text/uri-list")?m.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(y.types,"text/html")?y.getData("text/html"):null,null!=q&&0<q.length?(y=document.createElement("div"),y.innerHTML=this.editor.graph.sanitizeHtml(q),
+y=y.getElementsByTagName("img"),0<y.length&&(q=y[0].getAttribute("src"))):0<=mxUtils.indexOf(y.types,"text/plain")&&(q=y.getData("text/plain"))),null!=q&&(Editor.isPngDataUrl(q)?(q=Editor.extractGraphModelFromPng(q),null!=q&&0<q.length&&this.openLocalFile(q,null,!0)):this.isRemoteFileFormat(q)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(q))).send(mxUtils.bind(this,function(F){200<=F.getStatus()&&
+299>=F.getStatus()&&this.openLocalFile(F.getText(),null,!0)})):/^https?:\/\//.test(q)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(q):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(q)))))}else this.openLocalFile(q,null,!0)}m.stopPropagation();m.preventDefault()}))};EditorUi.prototype.highlightElement=function(d){var f=0,g=0;if(null==d){var m=document.body;var q=document.documentElement;
+var y=(m.clientWidth||q.clientWidth)-3;m=Math.max(m.clientHeight||0,q.clientHeight)-3}else f=d.offsetTop,g=d.offsetLeft,y=d.clientWidth,m=d.clientHeight;q=document.createElement("div");q.style.zIndex=mxPopupMenu.prototype.zIndex+2;q.style.border="3px dotted rgb(254, 137, 12)";q.style.pointerEvents="none";q.style.position="absolute";q.style.top=f+"px";q.style.left=g+"px";q.style.width=Math.max(0,y-3)+"px";q.style.height=Math.max(0,m-3)+"px";null!=d&&d.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(q):
+document.body.appendChild(q);return q};EditorUi.prototype.stringToCells=function(d){d=mxUtils.parseXml(d);var f=this.editor.extractGraphModel(d.documentElement);d=[];if(null!=f){var g=new mxCodec(f.ownerDocument),m=new mxGraphModel;g.decode(f,m);f=m.getChildAt(m.getRoot(),0);for(g=0;g<m.getChildCount(f);g++)d.push(m.getChildAt(f,g))}return d};EditorUi.prototype.openFileHandle=function(d,f,g,m,q){if(null!=f&&0<f.length){!this.useCanvasForExport&&/(\.png)$/i.test(f)?f=f.substring(0,f.length-4)+".drawio":
+/(\.pdf)$/i.test(f)&&(f=f.substring(0,f.length-4)+".drawio");var y=mxUtils.bind(this,function(C){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==C.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,m);try{this.loadLibrary(new LocalLibrary(this,C,f))}catch(I){this.handleError(I,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(C,f,m)});if(/(\.v(dx|sdx?))($|\?)/i.test(f)||
+/(\.vs(x|sx?))($|\?)/i.test(f))this.importVisio(g,mxUtils.bind(this,function(C){this.spinner.stop();y(C)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(C){this.spinner.stop();y(C)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,f))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(g,mxUtils.bind(this,function(C){4==C.readyState&&(this.spinner.stop(),
+200<=C.status&&299>=C.status?y(C.responseText):this.handleError({message:mxResources.get(413==C.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,function(C){this.spinner.stop();this.openLocalFile(C,f,m)}),mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}));else if("<mxlibrary"==d.substring(0,10)){this.spinner.stop();
+null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,m);try{this.loadLibrary(new LocalLibrary(this,d,g.name))}catch(C){this.handleError(C,mxResources.get("errorLoadingFile"))}}else if(0==d.indexOf("PK"))this.importZipFile(g,mxUtils.bind(this,function(C){this.spinner.stop();y(C)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,f,m)}));else{if("image/png"==g.type.substring(0,9))d=this.extractGraphModelFromPng(d);else if("application/pdf"==
+g.type){var F=Editor.extractGraphModelFromPdf(d);null!=F&&(q=null,m=!0,d=F)}this.spinner.stop();this.openLocalFile(d,f,m,q,null!=q?g:null)}}};EditorUi.prototype.openFiles=function(d,f){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var g=0;g<d.length;g++)mxUtils.bind(this,function(m){var q=new FileReader;q.onload=mxUtils.bind(this,function(y){try{this.openFileHandle(y.target.result,m.name,m,f)}catch(F){this.handleError(F)}});q.onerror=mxUtils.bind(this,function(y){this.spinner.stop();
+this.handleError(y);window.openFile=null});"image"!==m.type.substring(0,5)&&"application/pdf"!==m.type||"image/svg"===m.type.substring(0,9)?q.readAsText(m):q.readAsDataURL(m)})(d[g])};EditorUi.prototype.openLocalFile=function(d,f,g,m,q){var y=this.getCurrentFile(),F=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var C=mxUtils.parseXml(d);null!=C&&(this.editor.setGraphXml(C.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,
+d,f||this.defaultFilename,g,m,q))});if(null!=d&&0<d.length)null==y||!y.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=m)?F():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=m)&&null!=y&&y.isModified()?this.confirm(mxResources.get("allChangesLost"),null,F,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(d,f),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=
+y&&y.isModified()?this.confirm(mxResources.get("allChangesLost"),null,F,mxResources.get("cancel"),mxResources.get("discardChanges")):F()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var d={};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)this.updatePageRoot(this.pages[f]),this.addBasenamesForCell(this.pages[f].root,d);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),d);f=[];for(var g in d)f.push(g);return f};EditorUi.prototype.addBasenamesForCell=
+function(d,f){function g(F){if(null!=F){var C=F.lastIndexOf(".");0<C&&(F=F.substring(C+1,F.length));null==f[F]&&(f[F]=!0)}}var m=this.editor.graph,q=m.getCellStyle(d);g(mxStencilRegistry.getBasenameForStencil(q[mxConstants.STYLE_SHAPE]));m.model.isEdge(d)&&(g(mxMarker.getPackageForType(q[mxConstants.STYLE_STARTARROW])),g(mxMarker.getPackageForType(q[mxConstants.STYLE_ENDARROW])));q=m.model.getChildCount(d);for(var y=0;y<q;y++)this.addBasenamesForCell(m.model.getChildAt(d,y),f)};EditorUi.prototype.setGraphEnabled=
+function(d){this.diagramContainer.style.visibility=d?"":"hidden";this.formatContainer.style.visibility=d?"":"hidden";this.sidebarFooterContainer.style.display=d?"":"none";this.sidebarContainer.style.display=d?"":"none";this.hsplit.style.display=d?"":"none";this.editor.graph.setEnabled(d);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=d?"":"hidden",this.ruler.vRuler.container.style.visibility=d?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=d?"":"hidden");
+d||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=
+window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var d=!1;this.installMessageHandler(mxUtils.bind(this,function(f,g,m,q){d||(d=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==f||0==f.length)f=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,f,{}));this.mode=App.MODE_EMBED;this.setFileData(f);if(q)try{var y=this.editor.graph;y.setGridEnabled(!1);y.pageVisible=!1;var F=y.model.cells,C;for(C in F){var I=F[C];null!=
+I&&null!=I.style&&(I.style+=";sketch=1;"+(-1==I.style.indexOf("fontFamily=")||-1<I.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(G){console.log(G)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=m?m:!1;this.updateUi();
+window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(d,f){null!=d?d.getPublicUrl(f):f(null)};EditorUi.prototype.createLoadMessage=function(d){var f=this.editor.graph;return{event:d,
+pageVisible:f.pageVisible,translate:f.view.translate,bounds:f.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:f.view.scale,page:f.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(d){var f=this.editor.graph;f.isEditing()&&f.stopEditing(!f.isInvokesStopCellEditing());var g=window.opener||window.parent;if(this.editor.modified){var m=f.background;if(null==m||m==mxConstants.NONE)m=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,
+null,null,null,null,null,null,!1),f,null,!0,mxUtils.bind(this,function(q){g.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=d?!d:!0,data:Editor.createSvgDataUri(q)}),"*")}),null,null,!0,m,1,this.embedExportBorder)}else d||g.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");d||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,f.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=
+!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler=function(d){var f=null,g=!1,m=!1,q=null,y=mxUtils.bind(this,function(I,G){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,y);mxEvent.addListener(window,"message",mxUtils.bind(this,function(I){if(I.source==
+(window.opener||window.parent)){var G=I.data,Z=null,ca=mxUtils.bind(this,function(ea){if(null!=ea&&"function"===typeof ea.charAt&&"<"!=ea.charAt(0))try{Editor.isPngDataUrl(ea)?ea=Editor.extractGraphModelFromPng(ea):"data:image/svg+xml;base64,"==ea.substring(0,26)?ea=atob(ea.substring(26)):"data:image/svg+xml;utf8,"==ea.substring(0,24)&&(ea=ea.substring(24)),null!=ea&&("%"==ea.charAt(0)?ea=decodeURIComponent(ea):"<"!=ea.charAt(0)&&(ea=Graph.decompress(ea)))}catch(qa){}return ea});if("json"==urlParams.proto){var aa=
+!1;try{G=JSON.parse(G),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[I],"data",[G])}catch(ea){G=null}try{if(null==G)return;if("dialog"==G.action){this.showError(null!=G.titleKey?mxResources.get(G.titleKey):G.title,null!=G.messageKey?mxResources.get(G.messageKey):G.message,null!=G.buttonKey?mxResources.get(G.buttonKey):G.button);null!=G.modified&&(this.editor.modified=G.modified);return}if("layout"==G.action){this.executeLayouts(this.editor.graph.createLayouts(G.layouts));return}if("prompt"==
+G.action){this.spinner.stop();var Y=new FilenameDialog(this,G.defaultValue||"",null!=G.okKey?mxResources.get(G.okKey):G.ok,function(ea){null!=ea?F.postMessage(JSON.stringify({event:"prompt",value:ea,message:G}),"*"):F.postMessage(JSON.stringify({event:"prompt-cancel",message:G}),"*")},null!=G.titleKey?mxResources.get(G.titleKey):G.title);this.showDialog(Y.container,300,80,!0,!1);Y.init();return}if("draft"==G.action){var pa=ca(G.xml);this.spinner.stop();Y=new DraftDialog(this,mxResources.get("draftFound",
+[G.name||this.defaultFilename]),pa,mxUtils.bind(this,function(){this.hideDialog();F.postMessage(JSON.stringify({event:"draft",result:"edit",message:G}),"*")}),mxUtils.bind(this,function(){this.hideDialog();F.postMessage(JSON.stringify({event:"draft",result:"discard",message:G}),"*")}),G.editKey?mxResources.get(G.editKey):null,G.discardKey?mxResources.get(G.discardKey):null,G.ignore?mxUtils.bind(this,function(){this.hideDialog();F.postMessage(JSON.stringify({event:"draft",result:"ignore",message:G}),
+"*")}):null);this.showDialog(Y.container,640,480,!0,!1,mxUtils.bind(this,function(ea){ea&&this.actions.get("exit").funct()}));try{Y.init()}catch(ea){F.postMessage(JSON.stringify({event:"draft",error:ea.toString(),message:G}),"*")}return}if("template"==G.action){this.spinner.stop();var Q=1==G.enableRecent,X=1==G.enableSearch,ha=1==G.enableCustomTemp;if("1"==urlParams.newTempDlg&&!G.templatesOnly&&null!=G.callback){var U=this.getCurrentUser(),ma=new TemplatesDialog(this,function(ea,qa,va){ea=ea||this.emptyDiagramXml;
+F.postMessage(JSON.stringify({event:"template",xml:ea,blank:ea==this.emptyDiagramXml,name:qa,tempUrl:va.url,libs:va.libs,builtIn:null!=va.info&&null!=va.info.custContentId,message:G}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=U?U.id:null,Q?mxUtils.bind(this,function(ea,qa,va){this.remoteInvoke("getRecentDiagrams",[va],null,ea,qa)}):null,X?mxUtils.bind(this,function(ea,qa,va,ua){this.remoteInvoke("searchDiagrams",[ea,ua],null,qa,va)}):null,mxUtils.bind(this,
+function(ea,qa,va){this.remoteInvoke("getFileContent",[ea.url],null,qa,va)}),null,ha?mxUtils.bind(this,function(ea){this.remoteInvoke("getCustomTemplates",null,null,ea,function(){ea({},0)})}):null,!1,!1,!0,!0);this.showDialog(ma.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}Y=new NewDialog(this,!1,G.templatesOnly?!1:null!=G.callback,mxUtils.bind(this,function(ea,qa,va,ua){ea=ea||this.emptyDiagramXml;null!=G.callback?F.postMessage(JSON.stringify({event:"template",xml:ea,blank:ea==
+this.emptyDiagramXml,name:qa,tempUrl:va,libs:ua,builtIn:!0,message:G}),"*"):(d(ea,I,ea!=this.emptyDiagramXml,G.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,Q?mxUtils.bind(this,function(ea){this.remoteInvoke("getRecentDiagrams",[null],null,ea,function(){ea(null,"Network Error!")})}):null,X?mxUtils.bind(this,function(ea,qa){this.remoteInvoke("searchDiagrams",[ea,null],null,qa,function(){qa(null,"Network Error!")})}):null,mxUtils.bind(this,function(ea,
+qa,va){F.postMessage(JSON.stringify({event:"template",docUrl:ea,info:qa,name:va}),"*")}),null,null,ha?mxUtils.bind(this,function(ea){this.remoteInvoke("getCustomTemplates",null,null,ea,function(){ea({},0)})}):null,1==G.withoutType);this.showDialog(Y.container,620,460,!0,!1,mxUtils.bind(this,function(ea){this.sidebar.hideTooltip();ea&&this.actions.get("exit").funct()}));Y.init();return}if("textContent"==G.action){var T=this.getDiagramTextContent();F.postMessage(JSON.stringify({event:"textContent",
+data:T,message:G}),"*");return}if("status"==G.action){null!=G.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(G.messageKey))):null!=G.message&&this.editor.setStatus(mxUtils.htmlEntities(G.message));null!=G.modified&&(this.editor.modified=G.modified);return}if("spinner"==G.action){var M=null!=G.messageKey?mxResources.get(G.messageKey):G.message;null==G.show||G.show?this.spinner.spin(document.body,M):this.spinner.stop();return}if("exit"==G.action){this.actions.get("exit").funct();
+return}if("viewport"==G.action){null!=G.viewport&&(this.embedViewport=G.viewport);return}if("snapshot"==G.action){this.sendEmbeddedSvgExport(!0);return}if("export"==G.action){if("png"==G.format||"xmlpng"==G.format){if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin)){var ia=null!=G.xml?G.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var N=this.editor.graph,O=mxUtils.bind(this,function(ea){this.editor.graph.setEnabled(!0);
+this.spinner.stop();var qa=this.createLoadMessage("export");qa.format=G.format;qa.message=G;qa.data=ea;qa.xml=ia;F.postMessage(JSON.stringify(qa),"*")}),ba=mxUtils.bind(this,function(ea){null==ea&&(ea=Editor.blankImage);"xmlpng"==G.format&&(ea=Editor.writeGraphModelToPng(ea,"tEXt","mxfile",encodeURIComponent(ia)));N!=this.editor.graph&&N.container.parentNode.removeChild(N.container);O(ea)}),la=G.pageId||(null!=this.pages?G.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var u=
+mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=la){var ea=N.getGlobalVariable;N=this.createTemporaryGraph(N.getStylesheet());for(var qa,va=0;va<this.pages.length;va++)if(this.pages[va].getId()==la){qa=this.updatePageRoot(this.pages[va]);break}null==qa&&(qa=this.currentPage);N.getGlobalVariable=function(Ca){return"page"==Ca?qa.getName():"pagenumber"==Ca?1:ea.apply(this,arguments)};document.body.appendChild(N.container);N.model.setRoot(qa.root)}if(null!=G.layerIds){var ua=
+N.model,Aa=ua.getChildCells(ua.getRoot()),za={};for(va=0;va<G.layerIds.length;va++)za[G.layerIds[va]]=!0;for(va=0;va<Aa.length;va++)ua.setVisible(Aa[va],za[Aa[va].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(Ca){ba(Ca.toDataURL("image/png"))}),G.width,null,G.background,mxUtils.bind(this,function(){ba(null)}),null,null,G.scale,G.transparent,G.shadow,null,N,G.border,null,G.grid,G.keepTheme)});null!=G.xml&&0<G.xml.length&&(g=!0,this.setFileData(ia),g=!1);u()}else(new mxXmlRequest(EXPORT_URL,
+"format=png&embedXml="+("xmlpng"==G.format?"1":"0")+(null!=la?"&pageId="+la:"")+(null!=G.layerIds&&0<G.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:G.layerIds})):"")+(null!=G.scale?"&scale="+G.scale:"")+"&base64=1&xml="+encodeURIComponent(ia))).send(mxUtils.bind(this,function(ea){200<=ea.getStatus()&&299>=ea.getStatus()?O("data:image/png;base64,"+ea.getText()):ba(null)}),mxUtils.bind(this,function(){ba(null)}))}}else if(u=mxUtils.bind(this,function(){var ea=this.createLoadMessage("export");
+ea.message=G;if("html2"==G.format||"html"==G.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var qa=this.getXmlFileData();ea.xml=mxUtils.getXml(qa);ea.data=this.getFileData(null,null,!0,null,null,null,qa);ea.format=G.format}else if("html"==G.format)qa=this.editor.getGraphXml(),ea.data=this.getHtml(qa,this.editor.graph),ea.xml=mxUtils.getXml(qa),ea.format=G.format;else{mxSvgCanvas2D.prototype.foAltText=null;qa=null!=G.background?G.background:this.editor.graph.background;qa==
+mxConstants.NONE&&(qa=null);ea.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);ea.format="svg";var va=mxUtils.bind(this,function(ua){this.editor.graph.setEnabled(!0);this.spinner.stop();ea.data=Editor.createSvgDataUri(ua);F.postMessage(JSON.stringify(ea),"*")});if("xmlsvg"==G.format)(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin))&&this.getEmbeddedSvg(ea.xml,this.editor.graph,null,!0,va,null,null,G.embedImages,
+qa,G.scale,G.border,G.shadow,G.keepTheme);else if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin))this.editor.graph.setEnabled(!1),qa=this.editor.graph.getSvg(qa,G.scale,G.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||G.shadow,null,G.keepTheme),(this.editor.graph.shadowVisible||G.shadow)&&this.editor.graph.addSvgShadow(qa),this.embedFonts(qa,mxUtils.bind(this,function(ua){G.embedImages||null==G.embedImages?this.editor.convertImages(ua,
+mxUtils.bind(this,function(Aa){va(mxUtils.getXml(Aa))})):va(mxUtils.getXml(ua))}));return}F.postMessage(JSON.stringify(ea),"*")}),null!=G.xml&&0<G.xml.length){if(this.editor.graph.mathEnabled){var H=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){H.apply(this,arguments);u()}}g=!0;this.setFileData(G.xml);g=!1;this.editor.graph.mathEnabled||u()}else u();return}if("load"==G.action){aa=G.toSketch;m=1==G.autosave;this.hideDialog();null!=G.modified&&null==urlParams.modified&&(urlParams.modified=G.modified);
+null!=G.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=G.saveAndExit);null!=G.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=G.noSaveBtn);if(null!=G.rough){var P=Editor.sketchMode;this.doSetSketchMode(G.rough);P!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=G.dark&&(P=Editor.darkMode,this.doSetDarkMode(G.dark),P!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));null!=G.border&&(this.embedExportBorder=G.border);
+null!=G.background&&(this.embedExportBackground=G.background);null!=G.viewport&&(this.embedViewport=G.viewport);this.embedExitPoint=null;if(null!=G.rect){var W=this.embedExportBorder;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.top=G.rect.top+"px";this.diagramContainer.style.left=G.rect.left+"px";this.diagramContainer.style.height=G.rect.height+"px";this.diagramContainer.style.width=G.rect.width+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right=
+"";Z=mxUtils.bind(this,function(){var ea=this.editor.graph,qa=ea.maxFitScale;ea.maxFitScale=G.maxFitScale;ea.fit(2*W);ea.maxFitScale=qa;ea.container.scrollTop-=2*W;ea.container.scrollLeft-=2*W;this.fireEvent(new mxEventObject("editInlineStart","data",[G]))})}null!=G.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=G.noExitBtn);null!=G.title&&null!=this.buttonContainer&&(pa=document.createElement("span"),mxUtils.write(pa,G.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),
+this.buttonContainer.appendChild(pa),this.embedFilenameSpan=pa);try{G.libs&&this.sidebar.showEntries(G.libs)}catch(ea){}G=null!=G.xmlpng?this.extractGraphModelFromPng(G.xmlpng):null!=G.descriptor?G.descriptor:G.xml}else{if("merge"==G.action){var R=this.getCurrentFile();null!=R&&(pa=ca(G.xml),null!=pa&&""!=pa&&R.mergeFile(new LocalFile(this,pa),function(){F.postMessage(JSON.stringify({event:"merge",message:G}),"*")},function(ea){F.postMessage(JSON.stringify({event:"merge",message:G,error:ea}),"*")}))}else"remoteInvokeReady"==
+G.action?this.handleRemoteInvokeReady(F):"remoteInvoke"==G.action?this.handleRemoteInvoke(G,I.origin):"remoteInvokeResponse"==G.action?this.handleRemoteInvokeResponse(G):F.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(G)}),"*");return}}catch(ea){this.handleError(ea)}}var da=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(ea,qa){g=!0;
+try{d(ea,qa,null,aa)}catch(va){this.handleError(va)}g=!1;null!=urlParams.modified&&this.editor.setStatus("");q=da();m&&null==f&&(f=mxUtils.bind(this,function(va,ua){va=da();va==q||g||(ua=this.createLoadMessage("autosave"),ua.xml=va,(window.opener||window.parent).postMessage(JSON.stringify(ua),"*"));q=va}),this.editor.graph.model.addListener(mxEvent.CHANGE,f),this.editor.graph.addListener("gridSizeChanged",f),this.editor.graph.addListener("shadowVisibleChanged",f),this.addListener("pageFormatChanged",
+f),this.addListener("pageScaleChanged",f),this.addListener("backgroundColorChanged",f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",f),this.addListener("pageViewChanged",f));if("1"==urlParams.returnbounds||"json"==urlParams.proto)qa=this.createLoadMessage("load"),qa.xml=ea,F.postMessage(JSON.stringify(qa),"*");null!=Z&&Z()});null!=G&&
+"function"===typeof G.substring&&"data:application/vnd.visio;base64,"==G.substring(0,34)?(ca="0M8R4KGxGuE"==G.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(G.substring(G.indexOf(",")+1)),function(ea){fa(ea,I)},mxUtils.bind(this,function(ea){this.handleError(ea)}),ca)):null!=G&&"function"===typeof G.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(G,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(G,
+mxUtils.bind(this,function(ea){4==ea.readyState&&200<=ea.status&&299>=ea.status&&"<mxGraphModel"==ea.responseText.substring(0,13)&&fa(ea.responseText,I)}),""):null!=G&&"function"===typeof G.substring&&this.isLucidChartData(G)?this.convertLucidChart(G,mxUtils.bind(this,function(ea){fa(ea)}),mxUtils.bind(this,function(ea){this.handleError(ea)})):null==G||"object"!==typeof G||null==G.format||null==G.data&&null==G.url?(G=ca(G),fa(G,I)):this.loadDescriptor(G,mxUtils.bind(this,function(ea){fa(da(),I)}),
+mxUtils.bind(this,function(ea){this.handleError(ea,mxResources.get("errorLoadingFile"))}))}}));var F=window.opener||window.parent;y="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";F.postMessage(y,"*");if("json"==urlParams.proto){var C=this.editor.graph.openLink;this.editor.graph.openLink=function(I,G,Z){C.apply(this,arguments);F.postMessage(JSON.stringify({event:"openLink",href:I,target:G,allowOpener:Z}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=
+this.menubar&&"1"!=urlParams.embedInline){var d=document.createElement("div");d.style.display="inline-block";d.style.position="absolute";d.style.paddingTop="atlas"==uiTheme||"1"==urlParams.atlas?"2px":"0px";d.style.paddingLeft="8px";d.style.paddingBottom="2px";var f=document.createElement("button");f.className="geBigButton";var g=f;if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var m="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(f,
+m);f.setAttribute("title",m);mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));d.appendChild(f)}}else mxUtils.write(f,mxResources.get("save")),f.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),d.appendChild(f),"1"==urlParams.saveAndExit&&(f=document.createElement("a"),mxUtils.write(f,mxResources.get("saveAndExit")),f.setAttribute("title",
+mxResources.get("saveAndExit")),f.className="geBigButton geBigStandardButton",f.style.marginLeft="6px",mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),d.appendChild(f),g=f);"1"!=urlParams.noExitBtn&&(f=document.createElement("a"),g="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(f,g),f.setAttribute("title",g),f.className="geBigButton geBigStandardButton",f.style.marginLeft="6px",mxEvent.addListener(f,
+"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),d.appendChild(f),g=f);g.style.marginRight="20px";this.toolbar.container.appendChild(d);this.toolbar.staticElements.push(d);d.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(d){this.importCsv(d)}),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.loadOrgChartLayouts=function(d){var f=mxUtils.bind(this,function(){this.loadingOrgChart=!1;this.spinner.stop();d()});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?f():this.spinner.spin(document.body,mxResources.get("loading"))&&
+(this.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",f)})})}):mxscript(DRAWIO_BASE_URL+"/js/orgchart.min.js",f))};EditorUi.prototype.importCsv=function(d,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(d,f)}))};EditorUi.prototype.doImportCsv=function(d,f){try{var g=d.split("\n"),
+m=[],q=[],y=[],F={};if(0<g.length){var C={},I=this.editor.graph,G=null,Z=null,ca=null,aa=null,Y=null,pa=null,Q=null,X="whiteSpace=wrap;html=1;",ha=null,U=null,ma="",T="auto",M="auto",ia=!1,N=null,O=null,ba=40,la=40,u=100,H=0,P=function(){null!=f?f(ya):(I.setSelectionCells(ya),I.scrollCellToVisible(I.getSelectionCell()))},W=I.getFreeInsertPoint(),R=W.x,da=W.y;W=da;var fa=null,ea="auto";U=null;for(var qa=[],va=null,ua=null,Aa=0;Aa<g.length&&"#"==g[Aa].charAt(0);){d=g[Aa].replace(/\r$/,"");for(Aa++;Aa<
+g.length&&"\\"==d.charAt(d.length-1)&&"#"==g[Aa].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(g[Aa].substring(1)),Aa++;if("#"!=d.charAt(1)){var za=d.indexOf(":");if(0<za){var Ca=mxUtils.trim(d.substring(1,za)),sa=mxUtils.trim(d.substring(za+1));"label"==Ca?fa=I.sanitizeHtml(sa):"labelname"==Ca&&0<sa.length&&"-"!=sa?Y=sa:"labels"==Ca&&0<sa.length&&"-"!=sa?Q=JSON.parse(sa):"style"==Ca?Z=sa:"parentstyle"==Ca?X=sa:"unknownStyle"==Ca&&"-"!=sa?pa=sa:"stylename"==Ca&&0<sa.length&&"-"!=sa?aa=sa:"styles"==
+Ca&&0<sa.length&&"-"!=sa?ca=JSON.parse(sa):"vars"==Ca&&0<sa.length&&"-"!=sa?G=JSON.parse(sa):"identity"==Ca&&0<sa.length&&"-"!=sa?ha=sa:"parent"==Ca&&0<sa.length&&"-"!=sa?U=sa:"namespace"==Ca&&0<sa.length&&"-"!=sa?ma=sa:"width"==Ca?T=sa:"height"==Ca?M=sa:"collapsed"==Ca&&"-"!=sa?ia="true"==sa:"left"==Ca&&0<sa.length?N=sa:"top"==Ca&&0<sa.length?O=sa:"ignore"==Ca?ua=sa.split(","):"connect"==Ca?qa.push(JSON.parse(sa)):"link"==Ca?va=sa:"padding"==Ca?H=parseFloat(sa):"edgespacing"==Ca?ba=parseFloat(sa):
+"nodespacing"==Ca?la=parseFloat(sa):"levelspacing"==Ca?u=parseFloat(sa):"layout"==Ca&&(ea=sa)}}}if(null==g[Aa])throw Error(mxResources.get("invalidOrMissingFile"));var Va=this.editor.csvToArray(g[Aa].replace(/\r$/,""));za=d=null;Ca=[];for(sa=0;sa<Va.length;sa++)ha==Va[sa]&&(d=sa),U==Va[sa]&&(za=sa),Ca.push(mxUtils.trim(Va[sa]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==fa&&(fa="%"+Ca[0]+"%");if(null!=qa)for(var Ua=0;Ua<qa.length;Ua++)null==C[qa[Ua].to]&&(C[qa[Ua].to]=
+{});ha=[];for(sa=Aa+1;sa<g.length;sa++){var Ra=this.editor.csvToArray(g[sa].replace(/\r$/,""));if(null==Ra){var Za=40<g[sa].length?g[sa].substring(0,40)+"...":g[sa];throw Error(Za+" ("+sa+"):\n"+mxResources.get("containsValidationErrors"));}0<Ra.length&&ha.push(Ra)}I.model.beginUpdate();try{for(sa=0;sa<ha.length;sa++){Ra=ha[sa];var Ha=null,db=null!=d?ma+Ra[d]:null;g=!1;null!=db&&(Ha=I.model.getCell(db),g=null==Ha||0<=mxUtils.indexOf(m,Ha));var cb=new mxCell(fa,new mxGeometry(R,W,0,0),Z||"whiteSpace=wrap;html=1;");
+cb.collapsed=ia;cb.vertex=!0;cb.id=db;null==Ha||g||I.model.setCollapsed(Ha,ia);for(var z=0;z<Ra.length;z++)I.setAttributeForCell(cb,Ca[z],Ra[z]),null==Ha||g||I.setAttributeForCell(Ha,Ca[z],Ra[z]);if(null!=Y&&null!=Q){var K=Q[cb.getAttribute(Y)];null!=K&&(I.labelChanged(cb,K),null==Ha||g||I.cellLabelChanged(Ha,K))}if(null!=aa&&null!=ca){var L=ca[cb.getAttribute(aa)];null!=L&&(cb.style=L)}I.setAttributeForCell(cb,"placeholders","1");cb.style=I.replacePlaceholders(cb,cb.style,G);null==Ha||g?I.fireEvent(new mxEventObject("cellsInserted",
+"cells",[cb])):(I.model.setStyle(Ha,cb.style),0>mxUtils.indexOf(y,Ha)&&y.push(Ha),I.fireEvent(new mxEventObject("cellsInserted","cells",[Ha])));g=null!=Ha;Ha=cb;if(!g)for(Ua=0;Ua<qa.length;Ua++)C[qa[Ua].to][Ha.getAttribute(qa[Ua].to)]=Ha;null!=va&&"link"!=va&&(I.setLinkForCell(Ha,Ha.getAttribute(va)),I.setAttributeForCell(Ha,va,null));var S=this.editor.graph.getPreferredSizeForCell(Ha);U=null!=za?I.model.getCell(ma+Ra[za]):null;if(Ha.vertex){Za=null!=U?0:R;Aa=null!=U?0:da;null!=N&&null!=Ha.getAttribute(N)&&
+(Ha.geometry.x=Za+parseFloat(Ha.getAttribute(N)));null!=O&&null!=Ha.getAttribute(O)&&(Ha.geometry.y=Aa+parseFloat(Ha.getAttribute(O)));var V="@"==T.charAt(0)?Ha.getAttribute(T.substring(1)):null;Ha.geometry.width=null!=V&&"auto"!=V?parseFloat(Ha.getAttribute(T.substring(1))):"auto"==T||"auto"==V?S.width+H:parseFloat(T);var ja="@"==M.charAt(0)?Ha.getAttribute(M.substring(1)):null;Ha.geometry.height=null!=ja&&"auto"!=ja?parseFloat(ja):"auto"==M||"auto"==ja?S.height+H:parseFloat(M);W+=Ha.geometry.height+
+la}g?(null==F[db]&&(F[db]=[]),F[db].push(Ha)):(m.push(Ha),null!=U?(U.style=I.replacePlaceholders(U,X,G),I.addCell(Ha,U),q.push(U)):y.push(I.addCell(Ha)))}for(sa=0;sa<q.length;sa++)V="@"==T.charAt(0)?q[sa].getAttribute(T.substring(1)):null,ja="@"==M.charAt(0)?q[sa].getAttribute(M.substring(1)):null,"auto"!=T&&"auto"!=V||"auto"!=M&&"auto"!=ja||I.updateGroupBounds([q[sa]],H,!0);var na=y.slice(),ya=y.slice();for(Ua=0;Ua<qa.length;Ua++){var ra=qa[Ua];for(sa=0;sa<m.length;sa++){Ha=m[sa];var ta=mxUtils.bind(this,
+function(Na,hb,Qa){var mb=hb.getAttribute(Qa.from);if(null!=mb&&""!=mb){mb=mb.split(",");for(var ub=0;ub<mb.length;ub++){var bb=C[Qa.to][mb[ub]];if(null==bb&&null!=pa){bb=new mxCell(mb[ub],new mxGeometry(R,da,0,0),pa);bb.style=I.replacePlaceholders(hb,bb.style,G);var eb=this.editor.graph.getPreferredSizeForCell(bb);bb.geometry.width=eb.width+H;bb.geometry.height=eb.height+H;C[Qa.to][mb[ub]]=bb;bb.vertex=!0;bb.id=mb[ub];y.push(I.addCell(bb))}if(null!=bb){eb=Qa.label;null!=Qa.fromlabel&&(eb=(hb.getAttribute(Qa.fromlabel)||
+"")+(eb||""));null!=Qa.sourcelabel&&(eb=I.replacePlaceholders(hb,Qa.sourcelabel,G)+(eb||""));null!=Qa.tolabel&&(eb=(eb||"")+(bb.getAttribute(Qa.tolabel)||""));null!=Qa.targetlabel&&(eb=(eb||"")+I.replacePlaceholders(bb,Qa.targetlabel,G));var kb="target"==Qa.placeholders==!Qa.invert?bb:Na;kb=null!=Qa.style?I.replacePlaceholders(kb,Qa.style,G):I.createCurrentEdgeStyle();eb=I.insertEdge(null,null,eb||"",Qa.invert?bb:Na,Qa.invert?Na:bb,kb);if(null!=Qa.labels)for(kb=0;kb<Qa.labels.length;kb++){var ib=
+Qa.labels[kb],pb=new mxCell(ib.label||kb,new mxGeometry(null!=ib.x?ib.x:0,null!=ib.y?ib.y:0,0,0),"resizable=0;html=1;");pb.vertex=!0;pb.connectable=!1;pb.geometry.relative=!0;null!=ib.placeholders&&(pb.value=I.replacePlaceholders("target"==ib.placeholders==!Qa.invert?bb:Na,pb.value,G));if(null!=ib.dx||null!=ib.dy)pb.geometry.offset=new mxPoint(null!=ib.dx?ib.dx:0,null!=ib.dy?ib.dy:0);eb.insert(pb)}ya.push(eb);mxUtils.remove(Qa.invert?Na:bb,na)}}}});ta(Ha,Ha,ra);if(null!=F[Ha.id])for(z=0;z<F[Ha.id].length;z++)ta(Ha,
+F[Ha.id][z],ra)}}if(null!=ua)for(sa=0;sa<m.length;sa++)for(Ha=m[sa],z=0;z<ua.length;z++)I.setAttributeForCell(Ha,mxUtils.trim(ua[z]),null);if(0<y.length){var Da=new mxParallelEdgeLayout(I);Da.spacing=ba;Da.checkOverlap=!0;var Oa=function(){0<Da.spacing&&Da.execute(I.getDefaultParent());for(var Na=0;Na<y.length;Na++){var hb=I.getCellGeometry(y[Na]);hb.x=Math.round(I.snap(hb.x));hb.y=Math.round(I.snap(hb.y));"auto"==T&&(hb.width=Math.round(I.snap(hb.width)));"auto"==M&&(hb.height=Math.round(I.snap(hb.height)))}};
+if("["==ea.charAt(0)){var Ma=P;I.view.validate();this.executeLayouts(I.createLayouts(JSON.parse(ea)),function(){Oa();Ma()});P=null}else if("circle"==ea){var Wa=new mxCircleLayout(I);Wa.disableEdgeStyle=!1;Wa.resetEdges=!1;var Sa=Wa.isVertexIgnored;Wa.isVertexIgnored=function(Na){return Sa.apply(this,arguments)||0>mxUtils.indexOf(y,Na)};this.executeLayout(function(){Wa.execute(I.getDefaultParent());Oa()},!0,P);P=null}else if("horizontaltree"==ea||"verticaltree"==ea||"auto"==ea&&ya.length==2*y.length-
+1&&1==na.length){I.view.validate();var Fa=new mxCompactTreeLayout(I,"horizontaltree"==ea);Fa.levelDistance=la;Fa.edgeRouting=!1;Fa.resetEdges=!1;this.executeLayout(function(){Fa.execute(I.getDefaultParent(),0<na.length?na[0]:null)},!0,P);P=null}else if("horizontalflow"==ea||"verticalflow"==ea||"auto"==ea&&1==na.length){I.view.validate();var Ja=new mxHierarchicalLayout(I,"horizontalflow"==ea?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);Ja.intraCellSpacing=la;Ja.parallelEdgeSpacing=ba;Ja.interRankCellSpacing=
+u;Ja.disableEdgeStyle=!1;this.executeLayout(function(){Ja.execute(I.getDefaultParent(),ya);I.moveCells(ya,R,da)},!0,P);P=null}else if("orgchart"==ea){I.view.validate();var xa=new mxOrgChartLayout(I,2,u,la),Ba=xa.isVertexIgnored;xa.isVertexIgnored=function(Na){return Ba.apply(this,arguments)||0>mxUtils.indexOf(y,Na)};this.executeLayout(function(){xa.execute(I.getDefaultParent());Oa()},!0,P);P=null}else if("organic"==ea||"auto"==ea&&ya.length>y.length){I.view.validate();var Pa=new mxFastOrganicLayout(I);
+Pa.forceConstant=3*la;Pa.disableEdgeStyle=!1;Pa.resetEdges=!1;var Ka=Pa.isVertexIgnored;Pa.isVertexIgnored=function(Na){return Ka.apply(this,arguments)||0>mxUtils.indexOf(y,Na)};this.executeLayout(function(){Pa.execute(I.getDefaultParent());Oa()},!0,P);P=null}}this.hideDialog()}finally{I.model.endUpdate()}null!=P&&P()}}catch(Na){this.handleError(Na)}};EditorUi.prototype.getSearch=function(d){var f="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=d&&0<window.location.search.length){var g="?",
+m;for(m in urlParams)0>mxUtils.indexOf(d,m)&&null!=urlParams[m]&&(f+=g+m+"="+urlParams[m],g="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(d){d=null!=d?d:window.location.pathname;var f=0<d.indexOf("?")?1:0;if("1"==urlParams.offline)d+=window.location.search;else{var g="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),m;for(m in urlParams)0>mxUtils.indexOf(g,m)&&(d=0==f?d+"?":d+"&",null!=urlParams[m]&&(d+=m+"="+urlParams[m],
+f++))}return d};EditorUi.prototype.showLinkDialog=function(d,f,g,m,q){d=new LinkDialog(this,d,f,g,!0,m,q);this.showDialog(d.container,560,130,!0,!0);d.init()};EditorUi.prototype.getServiceCount=function(d){var f=1;null==this.drive&&"function"!==typeof window.DriveClient||f++;null==this.dropbox&&"function"!==typeof window.DropboxClient||f++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||f++;null!=this.gitHub&&f++;null!=this.gitLab&&f++;d&&isLocalStorage&&"1"==urlParams.browser&&f++;
+return f};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var d=this.getCurrentFile(),f=null!=d||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(f);this.menus.get("viewZoom").setEnabled(f);var g=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==d||d.isRestricted());this.actions.get("makeCopy").setEnabled(!g);this.actions.get("print").setEnabled(!g);this.menus.get("exportAs").setEnabled(!g);this.menus.get("embed").setEnabled(!g);
+g="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(g);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(g),this.menus.get("newLibrary").setEnabled(g));d="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=d&&d.isEditable();this.actions.get("image").setEnabled(f);this.actions.get("zoomIn").setEnabled(f);this.actions.get("zoomOut").setEnabled(f);this.actions.get("resetView").setEnabled(f);this.actions.get("undo").setEnabled(this.canUndo()&&
+d);this.actions.get("redo").setEnabled(this.canRedo()&&d);this.menus.get("edit").setEnabled(f);this.menus.get("view").setEnabled(f);this.menus.get("importFrom").setEnabled(d);this.menus.get("arrange").setEnabled(d);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(d),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(d));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=
+function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var d=this.getCurrentFile();return null!=d&&d.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var t=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){t.apply(this,arguments);var d=this.editor.graph,f=this.getCurrentFile(),g=this.getSelectionState(),m=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(m);
+this.actions.get("autosave").setEnabled(null!=f&&f.isEditable()&&f.isAutosaveOptional());this.actions.get("guides").setEnabled(m);this.actions.get("editData").setEnabled(d.isEnabled());this.actions.get("shadowVisible").setEnabled(m);this.actions.get("connectionArrows").setEnabled(m);this.actions.get("connectionPoints").setEnabled(m);this.actions.get("copyStyle").setEnabled(m&&!d.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(m&&0<g.cells.length);this.actions.get("editGeometry").setEnabled(0<
+g.vertices.length);this.actions.get("createShape").setEnabled(m);this.actions.get("createRevision").setEnabled(m);this.actions.get("moveToFolder").setEnabled(null!=f);this.actions.get("makeCopy").setEnabled(null!=f&&!f.isRestricted());this.actions.get("editDiagram").setEnabled(m&&(null==f||!f.isRestricted()));this.actions.get("publishLink").setEnabled(null!=f&&!f.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!=f&&f.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=f);this.menus.get("publish").setEnabled(null!=f&&!f.isRestricted());f=this.actions.get("findReplace");f.setEnabled("hidden"!=this.diagramContainer.style.visibility);f.label=mxResources.get("find")+(d.isEnabled()?"/"+mxResources.get("replace"):
+"")+"...";d=d.view.getState(d.getSelectionCell());this.actions.get("editShape").setEnabled(m&&null!=d&&null!=d.shape&&null!=d.shape.stencil)};var E=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);E.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(d,f,g,m,q,y,F,C){var I=d.editor.graph;
+if("xml"==g)d.hideDialog(),d.saveData(f,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");else if("svg"==g)d.hideDialog(),d.saveData(f,"svg",mxUtils.getXml(I.getSvg(m,q,y)),"image/svg+xml");else{var G=d.getFileData(!0,null,null,null,null,!0),Z=I.getGraphBounds(),ca=Math.floor(Z.width*q/I.view.scale),aa=Math.floor(Z.height*q/I.view.scale);if(G.length<=MAX_REQUEST_SIZE&&ca*aa<MAX_AREA)if(d.hideDialog(),"png"!=g&&"jpg"!=g&&"jpeg"!=g||!d.isExportToCanvas()){var Y={globalVars:I.getExportVariables()};
+C&&(Y.grid={size:I.gridSize,steps:I.view.gridSteps,color:I.view.gridColor});d.saveRequest(f,g,function(pa,Q){return new mxXmlRequest(EXPORT_URL,"format="+g+"&base64="+(Q||"0")+(null!=pa?"&filename="+encodeURIComponent(pa):"")+"&extras="+encodeURIComponent(JSON.stringify(Y))+(0<F?"&dpi="+F:"")+"&bg="+(null!=m?m:"none")+"&w="+ca+"&h="+aa+"&border="+y+"&xml="+encodeURIComponent(G))})}else"png"==g?d.exportImage(q,null==m||"none"==m,!0,!1,!1,y,!0,!1,null,C,F):d.exportImage(q,!1,!0,!1,!1,y,!0,!1,"jpeg",
+C);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var d=this.editor.graph,f="";if(null!=this.pages)for(var g=0;g<this.pages.length;g++){var m=d;this.currentPage!=this.pages[g]&&(m=this.createTemporaryGraph(d.getStylesheet()),this.updatePageRoot(this.pages[g]),m.model.setRoot(this.pages[g].root));f+=this.pages[g].getName()+" "+m.getIndexableText()+" "}else f=d.getIndexableText();this.editor.graph.setEnabled(!0);
+return f};EditorUi.prototype.showRemotelyStoredLibrary=function(d){var f={},g=document.createElement("div");g.style.whiteSpace="nowrap";var m=document.createElement("h3");mxUtils.write(m,mxUtils.htmlEntities(d));m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(m);var q=document.createElement("div");q.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";q.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';
+var y={};try{var F=mxSettings.getCustomLibraries();for(d=0;d<F.length;d++){var C=F[d];if("R"==C.substring(0,1)){var I=JSON.parse(decodeURIComponent(C.substring(1)));y[I[0]]={id:I[0],title:I[1],downloadUrl:I[2]}}}}catch(G){}this.remoteInvoke("getCustomLibraries",null,null,function(G){q.innerText="";if(0==G.length)q.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var Z=0;Z<G.length;Z++){var ca=G[Z];y[ca.id]&&
+(f[ca.id]=ca);var aa=this.addCheckbox(q,ca.title,y[ca.id]);(function(Y,pa){mxEvent.addListener(pa,"change",function(){this.checked?f[Y.id]=Y:delete f[Y.id]})})(ca,aa)}},mxUtils.bind(this,function(G){q.innerText="";var Z=document.createElement("div");Z.style.padding="8px";Z.style.textAlign="center";mxUtils.write(Z,mxResources.get("error")+": ");mxUtils.write(Z,null!=G&&null!=G.message?G.message:mxResources.get("unknownError"));q.appendChild(Z)}));g.appendChild(q);g=new CustomDialog(this,g,mxUtils.bind(this,
+function(){this.spinner.spin(document.body,mxResources.get("loading"));var G=0,Z;for(Z in f)null==y[Z]&&(G++,mxUtils.bind(this,function(ca){this.remoteInvoke("getFileContent",[ca.downloadUrl],null,mxUtils.bind(this,function(aa){G--;0==G&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,aa,ca))}catch(Y){this.handleError(Y,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){G--;0==G&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(f[Z]));
+for(Z in y)f[Z]||this.closeLibrary(new RemoteLibrary(this,null,y[Z]));0==G&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(g.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(d){this.remoteWin=d;for(var f=0;f<this.remoteInvokeQueue.length;f++)d.postMessage(this.remoteInvokeQueue[f],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(d){var f=d.msgMarkers,g=this.remoteInvokeCallbacks[f.callbackId];if(null==g)throw Error("No callback for "+(null!=f?f.callbackId:"null"));d.error?g.error&&g.error(d.error.errResp):
+g.callback&&g.callback.apply(this,d.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,f,g,m,q){var y=!0,F=window.setTimeout(mxUtils.bind(this,function(){y=!1;q({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),C=mxUtils.bind(this,function(){window.clearTimeout(F);y&&m.apply(this,arguments)}),I=mxUtils.bind(this,function(){window.clearTimeout(F);y&&q.apply(this,arguments)});g=g||{};g.callbackId=this.remoteInvokeCallbacks.length;
+this.remoteInvokeCallbacks.push({callback:C,error:I});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:f,msgMarkers:g});null!=this.remoteWin?this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,f){var g=mxUtils.bind(this,function(G,Z){var ca={event:"remoteInvokeResponse",msgMarkers:d.msgMarkers};null!=Z?ca.error={errResp:Z}:null!=G&&(ca.resp=G);this.remoteWin.postMessage(JSON.stringify(ca),"*")});try{var m=d.funtionName,
+q=this.remoteInvokableFns[m];if(null!=q&&"function"===typeof this[m]){if(q.allowedDomains){for(var y=!1,F=0;F<q.allowedDomains.length;F++)if(f=="https://"+q.allowedDomains[F]){y=!0;break}if(!y){g(null,"Invalid Call: "+m+" is not allowed.");return}}var C=d.functionArgs;Array.isArray(C)||(C=[]);if(q.isAsync)C.push(function(){g(Array.prototype.slice.apply(arguments))}),C.push(function(G){g(null,G||"Unkown Error")}),this[m].apply(this,C);else{var I=this[m].apply(this,C);g([I])}}else g(null,"Invalid Call: "+
+m+" is not found.")}catch(G){g(null,"Invalid Call: An error occurred, "+G.message)}};EditorUi.prototype.openDatabase=function(d,f){if(null==this.database){var g=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=g)try{var m=g.open("database",2);m.onupgradeneeded=function(q){try{var y=m.result;1>q.oldVersion&&y.createObjectStore("objects",{keyPath:"key"});2>q.oldVersion&&(y.createObjectStore("files",{keyPath:"title"}),y.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=
+isLocalStorage)}catch(F){null!=f&&f(F)}};m.onsuccess=mxUtils.bind(this,function(q){var y=m.result;this.database=y;EditorUi.migrateStorageFiles&&(StorageFile.migrate(y),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(F){if(!F||"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 I=!0,G=!1,Z,ca=0,aa=mxUtils.bind(this,function(){G=!0;this.setDatabaseItem(".drawioMigrated3",!0);C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),Y=mxUtils.bind(this,function(){ca++;pa()}),pa=mxUtils.bind(this,function(){try{if(ca>=Z.length)aa();else{var X=Z[ca];StorageFile.getFileContent(this,X,mxUtils.bind(this,function(ha){null==ha||".scratchpad"==X&&ha==this.emptyLibraryXml?C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
+funtionName:"getLocalStorageFile",functionArgs:[X]}),"*"):Y()}),Y)}}catch(ha){console.log(ha)}}),Q=mxUtils.bind(this,function(X){try{this.setDatabaseItem(null,[{title:X.title,size:X.data.length,lastModified:Date.now(),type:X.isLib?"L":"F"},{title:X.title,data:X.data}],Y,Y,["filesInfo","files"])}catch(ha){console.log(ha)}});F=mxUtils.bind(this,function(X){try{if(X.source==C.contentWindow){var ha={};try{ha=JSON.parse(X.data)}catch(U){}"init"==ha.event?(C.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),
+"*"),C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=ha.event||G||(I?null!=ha.resp&&0<ha.resp.length&&null!=ha.resp[0]?(Z=ha.resp[0],I=!1,pa()):aa():null!=ha.resp&&0<ha.resp.length&&null!=ha.resp[0]?Q(ha.resp[0]):Y())}}catch(U){console.log(U)}});window.addEventListener("message",F)}})));d(y);y.onversionchange=function(){y.close()}});m.onerror=f;m.onblocked=function(){}}catch(q){null!=f&&f(q)}else null!=f&&f()}else d(this.database)};
+EditorUi.prototype.setDatabaseItem=function(d,f,g,m,q){this.openDatabase(mxUtils.bind(this,function(y){try{q=q||"objects";Array.isArray(q)||(q=[q],d=[d],f=[f]);var F=y.transaction(q,"readwrite");F.oncomplete=g;F.onerror=m;for(y=0;y<q.length;y++)F.objectStore(q[y]).put(null!=d&&null!=d[y]?{key:d[y],data:f[y]}:f[y])}catch(C){null!=m&&m(C)}}),m)};EditorUi.prototype.removeDatabaseItem=function(d,f,g,m){this.openDatabase(mxUtils.bind(this,function(q){m=m||"objects";Array.isArray(m)||(m=[m],d=[d]);q=q.transaction(m,
+"readwrite");q.oncomplete=f;q.onerror=g;for(var y=0;y<m.length;y++)q.objectStore(m[y]).delete(d[y])}),g)};EditorUi.prototype.getDatabaseItem=function(d,f,g,m){this.openDatabase(mxUtils.bind(this,function(q){try{m=m||"objects";var y=q.transaction([m],"readonly").objectStore(m).get(d);y.onsuccess=function(){f(y.result)};y.onerror=g}catch(F){null!=g&&g(F)}}),g)};EditorUi.prototype.getDatabaseItems=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(m){try{g=g||"objects";var q=m.transaction([g],
+"readonly").objectStore(g).openCursor(IDBKeyRange.lowerBound(0)),y=[];q.onsuccess=function(F){null==F.target.result?d(y):(y.push(F.target.result.value),F.target.result.continue())};q.onerror=f}catch(F){null!=f&&f(F)}}),f)};EditorUi.prototype.getDatabaseItemKeys=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(m){try{g=g||"objects";var q=m.transaction([g],"readonly").objectStore(g).getAllKeys();q.onsuccess=function(){d(q.result)};q.onerror=f}catch(y){null!=f&&f(y)}}),f)};EditorUi.prototype.commentsSupported=
+function(){var d=this.getCurrentFile();return null!=d?d.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(d,f){var g=this.getCurrentFile();null!=g?g.getComments(d,f):d([])};EditorUi.prototype.addComment=function(d,f,g){var m=this.getCurrentFile();
+null!=m?m.addComment(d,f,g):f(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var d=this.getCurrentFile();return null!=d?d.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var d=this.getCurrentFile();return null!=d?d.canComment():!0};EditorUi.prototype.newComment=function(d,f){var g=this.getCurrentFile();return null!=g?g.newComment(d,f):new DrawioComment(this,null,d,Date.now(),Date.now(),!1,f)};EditorUi.prototype.isRevisionHistorySupported=function(){var d=this.getCurrentFile();
+return null!=d&&d.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(d,f){var g=this.getCurrentFile();null!=g&&g.getRevisions?g.getRevisions(d,f):f({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var d=this.getCurrentFile();return null!=d&&(d.constructor==DriveFile&&d.isEditable()||d.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(d){d.setRequestHeader("Content-Language",
+"da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(d,f,g,m,q,y,F,C){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(d,f,g,m,q,y,F,C)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(d)};EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");
+return this.editor.embedCssFonts(d,f)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,f,g,m,q,y,F,C,I,G,Z,ca,aa,Y,pa,Q){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(d,f,g,m,q,y,F,C,I,G,Z,ca,aa,Y,pa,Q)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");
+return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(d,f,g,m){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(d,f,g,m)};EditorUi.prototype.convertImageToDataUri=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(d,f)};EditorUi.prototype.base64Encode=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(d)};EditorUi.prototype.updateCRC=
+function(d,f,g,m){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(d,f,g,m)};EditorUi.prototype.crc32=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(d)};EditorUi.prototype.writeGraphModelToPng=function(d,f,g,m,q){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(d,f,g,m,q)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=
+urlParams.forceMigration)return null;for(var d=[],f=0;f<localStorage.length;f++){var g=localStorage.key(f),m=localStorage.getItem(g);if(0<g.length&&(".scratchpad"==g||"."!=g.charAt(0))&&0<m.length){var q="<mxfile "===m.substring(0,8)||"<?xml"===m.substring(0,5)||"\x3c!--[if IE]>"===m.substring(0,12);m="<mxlibrary>"===m.substring(0,11);(q||m)&&d.push(g)}}return d};EditorUi.prototype.getLocalStorageFile=function(d){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;
+var f=localStorage.getItem(d);return{title:d,data:f,isLib:"<mxlibrary>"===f.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
+var CommentsWindow=function(b,e,k,n,D,t){function E(){for(var U=ca.getElementsByTagName("div"),ma=0,T=0;T<U.length;T++)"none"!=U[T].style.display&&U[T].parentNode==ca&&ma++;aa.style.display=0==ma?"block":"none"}function d(U,ma,T,M){function ia(){ma.removeChild(ba);ma.removeChild(la);O.style.display="block";N.style.display="block"}I={div:ma,comment:U,saveCallback:T,deleteOnCancel:M};var N=ma.querySelector(".geCommentTxt"),O=ma.querySelector(".geCommentActionsList"),ba=document.createElement("textarea");
+ba.className="geCommentEditTxtArea";ba.style.minHeight=N.offsetHeight+"px";ba.value=U.content;ma.insertBefore(ba,N);var la=document.createElement("div");la.className="geCommentEditBtns";var u=mxUtils.button(mxResources.get("cancel"),function(){M?(ma.parentNode.removeChild(ma),E()):ia();I=null});u.className="geCommentEditBtn";la.appendChild(u);var H=mxUtils.button(mxResources.get("save"),function(){N.innerText="";U.content=ba.value;mxUtils.write(N,U.content);ia();T(U);I=null});mxEvent.addListener(ba,
+"keydown",mxUtils.bind(this,function(P){mxEvent.isConsumed(P)||((mxEvent.isControlDown(P)||mxClient.IS_MAC&&mxEvent.isMetaDown(P))&&13==P.keyCode?(H.click(),mxEvent.consume(P)):27==P.keyCode&&(u.click(),mxEvent.consume(P)))}));H.focus();H.className="geCommentEditBtn gePrimaryBtn";la.appendChild(H);ma.insertBefore(la,N);O.style.display="none";N.style.display="none";ba.focus()}function f(U,ma){ma.innerText="";U=new Date(U.modifiedDate);var T=b.timeSince(U);null==T&&(T=mxResources.get("lessThanAMinute"));
+mxUtils.write(ma,mxResources.get("timeAgo",[T],"{1} ago"));ma.setAttribute("title",U.toLocaleDateString()+" "+U.toLocaleTimeString())}function g(U){var ma=document.createElement("img");ma.className="geCommentBusyImg";ma.src=IMAGE_PATH+"/spin.gif";U.appendChild(ma);U.busyImg=ma}function m(U){U.style.border="1px solid red";U.removeChild(U.busyImg)}function q(U){U.style.border="";U.removeChild(U.busyImg)}function y(U,ma,T,M,ia){function N(R,da,fa){var ea=document.createElement("li");ea.className="geCommentAction";
+var qa=document.createElement("a");qa.className="geCommentActionLnk";mxUtils.write(qa,R);ea.appendChild(qa);mxEvent.addListener(qa,"click",function(va){da(va,U);va.preventDefault();mxEvent.consume(va)});W.appendChild(ea);fa&&(ea.style.display="none")}function O(){function R(ea){da.push(fa);if(null!=ea.replies)for(var qa=0;qa<ea.replies.length;qa++)fa=fa.nextSibling,R(ea.replies[qa])}var da=[],fa=la;R(U);return{pdiv:fa,replies:da}}function ba(R,da,fa,ea,qa){function va(){g(Ca);U.addReply(za,function(sa){za.id=
+sa;U.replies.push(za);q(Ca);fa&&fa()},function(sa){ua();m(Ca);b.handleError(sa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},ea,qa)}function ua(){d(za,Ca,function(sa){va()},!0)}var Aa=O().pdiv,za=b.newComment(R,b.getCurrentUser());za.pCommentId=U.id;null==U.replies&&(U.replies=[]);var Ca=y(za,U.replies,Aa,M+1);da?ua():va()}if(ia||!U.isResolved){aa.style.display="none";var la=document.createElement("div");la.className="geCommentContainer";la.setAttribute("data-commentId",
+U.id);la.style.marginLeft=20*M+5+"px";U.isResolved&&!Editor.isDarkMode()&&(la.style.backgroundColor="ghostWhite");var u=document.createElement("div");u.className="geCommentHeader";var H=document.createElement("img");H.className="geCommentUserImg";H.src=U.user.pictureUrl||Editor.userImage;u.appendChild(H);H=document.createElement("div");H.className="geCommentHeaderTxt";u.appendChild(H);var P=document.createElement("div");P.className="geCommentUsername";mxUtils.write(P,U.user.displayName||"");H.appendChild(P);
+P=document.createElement("div");P.className="geCommentDate";P.setAttribute("data-commentId",U.id);f(U,P);H.appendChild(P);la.appendChild(u);u=document.createElement("div");u.className="geCommentTxt";mxUtils.write(u,U.content||"");la.appendChild(u);U.isLocked&&(la.style.opacity="0.5");u=document.createElement("div");u.className="geCommentActions";var W=document.createElement("ul");W.className="geCommentActionsList";u.appendChild(W);F||U.isLocked||0!=M&&!C||N(mxResources.get("reply"),function(){ba("",
+!0)},U.isResolved);H=b.getCurrentUser();null==H||H.id!=U.user.id||F||U.isLocked||(N(mxResources.get("edit"),function(){function R(){d(U,la,function(){g(la);U.editComment(U.content,function(){q(la)},function(da){m(la);R();b.handleError(da,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}R()},U.isResolved),N(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){g(la);U.deleteComment(function(R){if(!0===R){R=la.querySelector(".geCommentTxt");
+R.innerText="";mxUtils.write(R,mxResources.get("msgDeleted"));var da=la.querySelectorAll(".geCommentAction");for(R=0;R<da.length;R++)da[R].parentNode.removeChild(da[R]);q(la);la.style.opacity="0.5"}else{da=O(U).replies;for(R=0;R<da.length;R++)ca.removeChild(da[R]);for(R=0;R<ma.length;R++)if(ma[R]==U){ma.splice(R,1);break}aa.style.display=0==ca.getElementsByTagName("div").length?"block":"none"}},function(R){m(la);b.handleError(R,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},
+U.isResolved));F||U.isLocked||0!=M||N(U.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(R){function da(){var fa=R.target;fa.innerText="";U.isResolved=!U.isResolved;mxUtils.write(fa,U.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var ea=U.isResolved?"none":"",qa=O(U).replies,va=Editor.isDarkMode()?"transparent":U.isResolved?"ghostWhite":"white",ua=0;ua<qa.length;ua++){qa[ua].style.backgroundColor=va;for(var Aa=qa[ua].querySelectorAll(".geCommentAction"),
+za=0;za<Aa.length;za++)Aa[za]!=fa.parentNode&&(Aa[za].style.display=ea);Q||(qa[ua].style.display="none")}E()}U.isResolved?ba(mxResources.get("reOpened")+": ",!0,da,!1,!0):ba(mxResources.get("markedAsResolved"),!1,da,!0)});la.appendChild(u);null!=T?ca.insertBefore(la,T.nextSibling):ca.appendChild(la);for(T=0;null!=U.replies&&T<U.replies.length;T++)u=U.replies[T],u.isResolved=U.isResolved,y(u,U.replies,null,M+1,ia);null!=I&&(I.comment.id==U.id?(ia=U.content,U.content=I.comment.content,d(U,la,I.saveCallback,
+I.deleteOnCancel),U.content=ia):null==I.comment.id&&I.comment.pCommentId==U.id&&(ca.appendChild(I.div),d(I.comment,I.div,I.saveCallback,I.deleteOnCancel)));return la}}var F=!b.canComment(),C=b.canReplyToReplies(),I=null,G=document.createElement("div");G.className="geCommentsWin";G.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var Z=EditorUi.compactUi?"26px":"30px",ca=document.createElement("div");ca.className="geCommentsList";ca.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:
+"whiteSmoke";ca.style.bottom=parseInt(Z)+7+"px";G.appendChild(ca);var aa=document.createElement("span");aa.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(aa,mxResources.get("noCommentsFound"));var Y=document.createElement("div");Y.className="geToolbarContainer geCommentsToolbar";Y.style.height=Z;Y.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";Y.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";Z=document.createElement("a");Z.className=
+"geButton";if(!F){var pa=Z.cloneNode();pa.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';pa.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(pa,"click",function(U){function ma(){d(T,M,function(ia){g(M);b.addComment(ia,function(N){ia.id=N;X.push(ia);q(M)},function(N){m(M);ma();b.handleError(N,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var T=b.newComment("",b.getCurrentUser()),M=y(T,X,null,0);ma();U.preventDefault();
+mxEvent.consume(U)});Y.appendChild(pa)}pa=Z.cloneNode();pa.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';pa.setAttribute("title",mxResources.get("showResolved"));var Q=!1;Editor.isDarkMode()&&(pa.style.filter="invert(100%)");mxEvent.addListener(pa,"click",function(U){this.className=(Q=!Q)?"geButton geCheckedBtn":"geButton";ha();U.preventDefault();mxEvent.consume(U)});Y.appendChild(pa);b.commentsRefreshNeeded()&&(pa=Z.cloneNode(),pa.innerHTML='<img src="'+IMAGE_PATH+
+'/update16.png" style="width: 16px; padding: 2px;">',pa.setAttribute("title",mxResources.get("refresh")),Editor.isDarkMode()&&(pa.style.filter="invert(100%)"),mxEvent.addListener(pa,"click",function(U){ha();U.preventDefault();mxEvent.consume(U)}),Y.appendChild(pa));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(U){t();U.preventDefault();mxEvent.consume(U)}),Y.appendChild(Z));G.appendChild(Y);var X=[],ha=mxUtils.bind(this,function(){this.hasError=!1;if(null!=I)try{I.div=I.div.cloneNode(!0);var U=I.div.querySelector(".geCommentEditTxtArea"),ma=I.div.querySelector(".geCommentEditBtns");I.comment.content=U.value;U.parentNode.removeChild(U);ma.parentNode.removeChild(ma)}catch(T){b.handleError(T)}ca.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+
+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";C=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(T){function M(ia){if(null!=ia){ia.sort(function(O,ba){return new Date(O.modifiedDate)-new Date(ba.modifiedDate)});for(var N=0;N<ia.length;N++)M(ia[N].replies)}}T.sort(function(ia,N){return new Date(ia.modifiedDate)-new Date(N.modifiedDate)});ca.innerText="";ca.appendChild(aa);aa.style.display="block";X=T;for(T=0;T<X.length;T++)M(X[T].replies),y(X[T],X,null,0,Q);null!=I&&
+null==I.comment.id&&null==I.comment.pCommentId&&(ca.appendChild(I.div),d(I.comment,I.div,I.saveCallback,I.deleteOnCancel))},mxUtils.bind(this,function(T){ca.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(T&&T.message?": "+T.message:""));this.hasError=!0})):ca.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});ha();this.refreshComments=ha;Y=mxUtils.bind(this,function(){function U(N){var O=T[N.id];if(null!=O)for(f(N,O),O=0;null!=N.replies&&O<N.replies.length;O++)U(N.replies[O])}if(this.window.isVisible()){for(var ma=
+ca.querySelectorAll(".geCommentDate"),T={},M=0;M<ma.length;M++){var ia=ma[M];T[ia.getAttribute("data-commentId")]=ia}for(M=0;M<X.length;M++)U(X[M])}});setInterval(Y,6E4);this.refreshCommentsTime=Y;this.window=new mxWindow(mxResources.get("comments"),G,e,k,n,D,!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()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,e,k,n,D,t,E,d,f,g,m){var q=document.createElement("div");q.style.textAlign="center";m=null!=m?m:44;var y=document.createElement("div");y.style.padding="6px";y.style.overflow="auto";y.style.maxHeight=m+"px";y.style.lineHeight="1.2em";mxUtils.write(y,e);q.appendChild(y);null!=g&&(y=document.createElement("div"),y.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",
+g),y.appendChild(e),q.appendChild(y));g=document.createElement("div");g.style.textAlign="center";g.style.whiteSpace="nowrap";var F=document.createElement("input");F.setAttribute("type","checkbox");t=mxUtils.button(t||mxResources.get("cancel"),function(){b.hideDialog();null!=n&&n(F.checked)});t.className="geBtn";null!=d&&(t.innerHTML=d+"<br>"+t.innerHTML,t.style.paddingBottom="8px",t.style.paddingTop="8px",t.style.height="auto",t.style.width="40%");b.editor.cancelFirst&&g.appendChild(t);var C=mxUtils.button(D||
+mxResources.get("ok"),function(){b.hideDialog();null!=k&&k(F.checked)});g.appendChild(C);null!=E?(C.innerHTML=E+"<br>"+C.innerHTML+"<br>",C.style.paddingBottom="8px",C.style.paddingTop="8px",C.style.height="auto",C.className="geBtn",C.style.width="40%"):C.className="geBtn gePrimaryBtn";b.editor.cancelFirst||g.appendChild(t);q.appendChild(g);f?(g.style.marginTop="10px",y=document.createElement("p"),y.style.marginTop="20px",y.style.marginBottom="0px",y.appendChild(F),D=document.createElement("span"),
+mxUtils.write(D," "+mxResources.get("rememberThisSetting")),y.appendChild(D),q.appendChild(y),mxEvent.addListener(D,"click",function(I){F.checked=!F.checked;mxEvent.consume(I)})):g.style.marginTop="12px";this.init=function(){C.focus()};this.container=q};function DiagramPage(b,e){this.node=b;null!=e?this.node.setAttribute("id",e):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
DiagramPage.prototype.setName=function(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};function RenamePage(b,e,k){this.ui=b;this.page=e;this.previous=this.name=k}RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
function MovePage(b,e,k){this.ui=b;this.oldIndex=e;this.newIndex=k}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var b=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
function SelectPage(b,e,k){this.ui=b;this.previousPage=this.page=e;this.neverShown=!0;null!=e&&(this.neverShown=null==e.viewState,this.ui.updatePageRoot(e),null!=k&&(e.viewState=k,this.neverShown=!1))}
@@ -3867,42 +3869,42 @@ EditorUi.drawHost:"https://"+window.location.host)+"/"+D+"#"+n.getHash()}}return
EditorUi.prototype.createPageMenu=function(b,e){return mxUtils.bind(this,function(k,n){var D=this.editor.graph;k.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,b)+1)}),n);k.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),n);k.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(b,e)}),n);null!=this.getLinkForPage(b)&&(k.addSeparator(n),k.addItem(mxResources.get("link"),
null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(t,E,d,f,g,m){t=this.createUrlParameters(t,E,d,f,g,m);d||t.push("hide-pages=1");D.isSelectionEmpty()||(d=D.getBoundingBox(D.getSelectionCells()),E=D.view.translate,g=D.view.scale,d.width/=g,d.height/=g,d.x=d.x/g-E.x,d.y=d.y/g-E.y,t.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(d.x),y:Math.round(d.y),width:Math.round(d.width),height:Math.round(d.height),border:100}))));
f=new EmbedDialog(this,this.getLinkForPage(b,t,f));this.showDialog(f.container,450,240,!0,!0);f.init()}))})));k.addSeparator(n);k.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),n);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(k.addSeparator(n),k.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,
-!0,!0))}),n))})};(function(){var b=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(e){b.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(e,k,n){n.ui=e.ui;return k};b.afterDecode=function(e,k,n){e=n.oldIndex;n.oldIndex=n.newIndex;n.newIndex=e;return n};mxCodecRegistry.register(b)})();
+!0,!0))}),n))})};(function(){var b=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(){b.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(e,k,n){n.ui=e.ui;return k};b.afterDecode=function(e,k,n){e=n.oldIndex;n.oldIndex=n.newIndex;n.newIndex=e;return n};mxCodecRegistry.register(b)})();
(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(e,k,n){n.ui=e.ui;return k};b.afterDecode=function(e,k,n){e=n.previous;n.previous=n.name;n.name=e;return n};mxCodecRegistry.register(b)})();
(function(){var b=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" "));b.afterEncode=function(e,k,n){n.setAttribute("relatedPage",k.relatedPage.getId());null==k.index&&(n.setAttribute("name",k.relatedPage.getName()),null!=k.relatedPage.viewState&&n.setAttribute("viewState",JSON.stringify(k.relatedPage.viewState,function(D,t){return 0>mxUtils.indexOf(EditorUi.transientViewStateProperties,D)?t:void 0})),null!=k.relatedPage.root&&e.encodeCell(k.relatedPage.root,
n));return n};b.beforeDecode=function(e,k,n){n.ui=e.ui;n.relatedPage=n.ui.getPageById(k.getAttribute("relatedPage"));if(null==n.relatedPage){var D=k.ownerDocument.createElement("diagram");D.setAttribute("id",k.getAttribute("relatedPage"));D.setAttribute("name",k.getAttribute("name"));n.relatedPage=new DiagramPage(D);D=k.getAttribute("viewState");null!=D&&(n.relatedPage.viewState=JSON.parse(D),k.removeAttribute("viewState"));k=k.cloneNode(!0);D=k.firstChild;if(null!=D)for(n.relatedPage.root=e.decodeCell(D,
!1),n=D.nextSibling,D.parentNode.removeChild(D),D=n;null!=D;){n=D.nextSibling;if(D.nodeType==mxConstants.NODETYPE_ELEMENT){var t=D.getAttribute("id");null==e.lookup(t)&&e.decodeCell(D)}D.parentNode.removeChild(D);D=n}}return k};b.afterDecode=function(e,k,n){n.index=n.previousIndex;return n};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(n,D,t,E,d){D=null!=D?D:!1;null==t&&(t=this.getFoldableCells(this.getSelectionCells(),n));this.stopEditing();this.model.beginUpdate();try{for(var f=t.slice(),g=0;g<t.length;g++)"1"==mxUtils.getValue(this.getCurrentCellStyle(t[g]),"treeFolding","0")&&this.foldTreeCell(n,t[g]);t=f;t=b.apply(this,arguments)}finally{this.model.endUpdate()}return t};Graph.prototype.foldTreeCell=
function(n,D){this.model.beginUpdate();try{var t=[];this.traverse(D,!0,mxUtils.bind(this,function(d,f){var g=null!=f&&this.isTreeEdge(f);g&&t.push(f);d==D||null!=f&&!g||t.push(d);return(null==f||g)&&(d==D||!this.model.isCollapsed(d))}));this.model.setCollapsed(D,n);for(var E=0;E<t.length;E++)this.model.setVisible(t[E],!n)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(n){return!this.isEdgeIgnored(n)};Graph.prototype.getTreeEdges=function(n,D,t,E,d,f){return this.model.filterCells(this.getEdges(n,
-D,t,E,d,f),mxUtils.bind(this,function(g){return this.isTreeEdge(g)}))};Graph.prototype.getIncomingTreeEdges=function(n,D){return this.getTreeEdges(n,D,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(n,D){return this.getTreeEdges(n,D,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function n(L){return I.isVertex(L)&&t(L)}function D(L){var da=
-!1;null!=L&&(da="1"==C.getCurrentCellStyle(L).treeMoving);return da}function t(L){var da=!1;null!=L&&(L=I.getParent(L),da=C.view.getState(L),da="tree"==(null!=da?da.style:C.getCellStyle(L)).containerType);return da}function E(L){var da=!1;null!=L&&(L=I.getParent(L),da=C.view.getState(L),C.view.getState(L),da=null!=(null!=da?da.style:C.getCellStyle(L)).childLayout);return da}function d(L){L=C.view.getState(L);if(null!=L){var da=C.getIncomingTreeEdges(L.cell);if(0<da.length&&(da=C.view.getState(da[0]),
-null!=da&&(da=da.absolutePoints,null!=da&&0<da.length&&(da=da[da.length-1],null!=da)))){if(da.y==L.y&&Math.abs(da.x-L.getCenterX())<L.width/2)return mxConstants.DIRECTION_SOUTH;if(da.y==L.y+L.height&&Math.abs(da.x-L.getCenterX())<L.width/2)return mxConstants.DIRECTION_NORTH;if(da.x>L.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function f(L,da){da=null!=da?da:!0;C.model.beginUpdate();try{var O=C.model.getParent(L),N=C.getIncomingTreeEdges(L),aa=C.cloneCells([N[0],
-L]);C.model.setTerminal(aa[0],C.model.getTerminal(N[0],!0),!0);var ma=d(L),u=O.geometry;ma==mxConstants.DIRECTION_SOUTH||ma==mxConstants.DIRECTION_NORTH?aa[1].geometry.x+=da?L.geometry.width+10:-aa[1].geometry.width-10:aa[1].geometry.y+=da?L.geometry.height+10:-aa[1].geometry.height-10;C.view.currentRoot!=O&&(aa[1].geometry.x-=u.x,aa[1].geometry.y-=u.y);var H=C.view.getState(L),P=C.view.scale;if(null!=H){var S=mxRectangle.fromRectangle(H);ma==mxConstants.DIRECTION_SOUTH||ma==mxConstants.DIRECTION_NORTH?
-S.x+=(da?L.geometry.width+10:-aa[1].geometry.width-10)*P:S.y+=(da?L.geometry.height+10:-aa[1].geometry.height-10)*P;var R=C.getOutgoingTreeEdges(C.model.getTerminal(N[0],!0));if(null!=R){for(var ca=ma==mxConstants.DIRECTION_SOUTH||ma==mxConstants.DIRECTION_NORTH,ea=u=N=0;ea<R.length;ea++){var fa=C.model.getTerminal(R[ea],!1);if(ma==d(fa)){var ra=C.view.getState(fa);fa!=L&&null!=ra&&(ca&&da!=ra.getCenterX()<H.getCenterX()||!ca&&da!=ra.getCenterY()<H.getCenterY())&&mxUtils.intersects(S,ra)&&(N=10+Math.max(N,
-(Math.min(S.x+S.width,ra.x+ra.width)-Math.max(S.x,ra.x))/P),u=10+Math.max(u,(Math.min(S.y+S.height,ra.y+ra.height)-Math.max(S.y,ra.y))/P))}}ca?u=0:N=0;for(ea=0;ea<R.length;ea++)if(fa=C.model.getTerminal(R[ea],!1),ma==d(fa)&&(ra=C.view.getState(fa),fa!=L&&null!=ra&&(ca&&da!=ra.getCenterX()<H.getCenterX()||!ca&&da!=ra.getCenterY()<H.getCenterY()))){var ua=[];C.traverse(ra.cell,!0,function(sa,Aa){var Ca=null!=Aa&&C.isTreeEdge(Aa);Ca&&ua.push(Aa);(null==Aa||Ca)&&ua.push(sa);return null==Aa||Ca});C.moveCells(ua,
-(da?1:-1)*N,(da?1:-1)*u)}}}return C.addCells(aa,O)}finally{C.model.endUpdate()}}function g(L){C.model.beginUpdate();try{var da=d(L),O=C.getIncomingTreeEdges(L),N=C.cloneCells([O[0],L]);C.model.setTerminal(O[0],N[1],!1);C.model.setTerminal(N[0],N[1],!0);C.model.setTerminal(N[0],L,!1);var aa=C.model.getParent(L),ma=aa.geometry,u=[];C.view.currentRoot!=aa&&(N[1].geometry.x-=ma.x,N[1].geometry.y-=ma.y);C.traverse(L,!0,function(S,R){var ca=null!=R&&C.isTreeEdge(R);ca&&u.push(R);(null==R||ca)&&u.push(S);
-return null==R||ca});var H=L.geometry.width+40,P=L.geometry.height+40;da==mxConstants.DIRECTION_SOUTH?H=0:da==mxConstants.DIRECTION_NORTH?(H=0,P=-P):da==mxConstants.DIRECTION_WEST?(H=-H,P=0):da==mxConstants.DIRECTION_EAST&&(P=0);C.moveCells(u,H,P);return C.addCells(N,aa)}finally{C.model.endUpdate()}}function m(L,da){C.model.beginUpdate();try{var O=C.model.getParent(L),N=C.getIncomingTreeEdges(L),aa=d(L);0==N.length&&(N=[C.createEdge(O,null,"",null,null,C.createCurrentEdgeStyle())],aa=da);var ma=C.cloneCells([N[0],
-L]);C.model.setTerminal(ma[0],L,!0);if(null==C.model.getTerminal(ma[0],!1)){C.model.setTerminal(ma[0],ma[1],!1);var u=C.getCellStyle(ma[1]).newEdgeStyle;if(null!=u)try{var H=JSON.parse(u),P;for(P in H)C.setCellStyles(P,H[P],[ma[0]]),"edgeStyle"==P&&"elbowEdgeStyle"==H[P]&&C.setCellStyles("elbow",aa==mxConstants.DIRECTION_SOUTH||aa==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[ma[0]])}catch(ra){}}N=C.getOutgoingTreeEdges(L);var S=O.geometry;da=[];C.view.currentRoot==O&&(S=new mxRectangle);for(u=
-0;u<N.length;u++){var R=C.model.getTerminal(N[u],!1);null!=R&&da.push(R)}var ca=C.view.getBounds(da),ea=C.view.translate,fa=C.view.scale;aa==mxConstants.DIRECTION_SOUTH?(ma[1].geometry.x=null==ca?L.geometry.x+(L.geometry.width-ma[1].geometry.width)/2:(ca.x+ca.width)/fa-ea.x-S.x+10,ma[1].geometry.y+=ma[1].geometry.height-S.y+40):aa==mxConstants.DIRECTION_NORTH?(ma[1].geometry.x=null==ca?L.geometry.x+(L.geometry.width-ma[1].geometry.width)/2:(ca.x+ca.width)/fa-ea.x+-S.x+10,ma[1].geometry.y-=ma[1].geometry.height+
-S.y+40):(ma[1].geometry.x=aa==mxConstants.DIRECTION_WEST?ma[1].geometry.x-(ma[1].geometry.width+S.x+40):ma[1].geometry.x+(ma[1].geometry.width-S.x+40),ma[1].geometry.y=null==ca?L.geometry.y+(L.geometry.height-ma[1].geometry.height)/2:(ca.y+ca.height)/fa-ea.y+-S.y+10);return C.addCells(ma,O)}finally{C.model.endUpdate()}}function q(L,da,O){L=C.getOutgoingTreeEdges(L);O=C.view.getState(O);var N=[];if(null!=O&&null!=L){for(var aa=0;aa<L.length;aa++){var ma=C.view.getState(C.model.getTerminal(L[aa],!1));
-null!=ma&&(!da&&Math.min(ma.x+ma.width,O.x+O.width)>=Math.max(ma.x,O.x)||da&&Math.min(ma.y+ma.height,O.y+O.height)>=Math.max(ma.y,O.y))&&N.push(ma)}N.sort(function(u,H){return da?u.x+u.width-H.x-H.width:u.y+u.height-H.y-H.height})}return N}function y(L,da){var O=d(L),N=da==mxConstants.DIRECTION_EAST||da==mxConstants.DIRECTION_WEST;(O==mxConstants.DIRECTION_EAST||O==mxConstants.DIRECTION_WEST)==N&&O!=da?F.actions.get("selectParent").funct():O==da?(da=C.getOutgoingTreeEdges(L),null!=da&&0<da.length&&
-C.setSelectionCell(C.model.getTerminal(da[0],!1))):(O=C.getIncomingTreeEdges(L),null!=O&&0<O.length&&(N=q(C.model.getTerminal(O[0],!0),N,L),L=C.view.getState(L),null!=L&&(L=mxUtils.indexOf(N,L),0<=L&&(L+=da==mxConstants.DIRECTION_NORTH||da==mxConstants.DIRECTION_WEST?-1:1,0<=L&&L<=N.length-1&&C.setSelectionCell(N[L].cell)))))}var F=this,C=F.editor.graph,I=C.getModel(),G=F.menus.createPopupMenu;F.menus.createPopupMenu=function(L,da,O){G.apply(this,arguments);if(1==C.getSelectionCount()){da=C.getSelectionCell();
-var N=C.getOutgoingTreeEdges(da);L.addSeparator();0<N.length&&(n(C.getSelectionCell())&&this.addMenuItems(L,["selectChildren"],null,O),this.addMenuItems(L,["selectDescendants"],null,O));n(C.getSelectionCell())?(L.addSeparator(),0<C.getIncomingTreeEdges(da).length&&this.addMenuItems(L,["selectSiblings","selectParent"],null,O)):0<C.model.getEdgeCount(da)&&this.addMenuItems(L,["selectConnections"],null,O)}};F.actions.addAction("selectChildren",function(){if(C.isEnabled()&&1==C.getSelectionCount()){var L=
-C.getSelectionCell();L=C.getOutgoingTreeEdges(L);if(null!=L){for(var da=[],O=0;O<L.length;O++)da.push(C.model.getTerminal(L[O],!1));C.setSelectionCells(da)}}},null,null,"Alt+Shift+X");F.actions.addAction("selectSiblings",function(){if(C.isEnabled()&&1==C.getSelectionCount()){var L=C.getSelectionCell();L=C.getIncomingTreeEdges(L);if(null!=L&&0<L.length&&(L=C.getOutgoingTreeEdges(C.model.getTerminal(L[0],!0)),null!=L)){for(var da=[],O=0;O<L.length;O++)da.push(C.model.getTerminal(L[O],!1));C.setSelectionCells(da)}}},
-null,null,"Alt+Shift+S");F.actions.addAction("selectParent",function(){if(C.isEnabled()&&1==C.getSelectionCount()){var L=C.getSelectionCell();L=C.getIncomingTreeEdges(L);null!=L&&0<L.length&&C.setSelectionCell(C.model.getTerminal(L[0],!0))}},null,null,"Alt+Shift+P");F.actions.addAction("selectDescendants",function(L,da){L=C.getSelectionCell();if(C.isEnabled()&&C.model.isVertex(L)){if(null!=da&&mxEvent.isAltDown(da))C.setSelectionCells(C.model.getTreeEdges(L,null==da||!mxEvent.isShiftDown(da),null==
-da||!mxEvent.isControlDown(da)));else{var O=[];C.traverse(L,!0,function(N,aa){var ma=null!=aa&&C.isTreeEdge(aa);ma&&O.push(aa);null!=aa&&!ma||null!=da&&mxEvent.isShiftDown(da)||O.push(N);return null==aa||ma})}C.setSelectionCells(O)}},null,null,"Alt+Shift+D");var Y=C.removeCells;C.removeCells=function(L,da){da=null!=da?da:!0;null==L&&(L=this.getDeletableCells(this.getSelectionCells()));da&&(L=this.getDeletableCells(this.addAllEdges(L)));for(var O=[],N=0;N<L.length;N++){var aa=L[N];I.isEdge(aa)&&t(aa)&&
-(O.push(aa),aa=I.getTerminal(aa,!1));if(n(aa)){var ma=[];C.traverse(aa,!0,function(u,H){var P=null!=H&&C.isTreeEdge(H);P&&ma.push(H);(null==H||P)&&ma.push(u);return null==H||P});0<ma.length&&(O=O.concat(ma),aa=C.getIncomingTreeEdges(L[N]),L=L.concat(aa))}else null!=aa&&O.push(L[N])}L=O;return Y.apply(this,arguments)};F.hoverIcons.getStateAt=function(L,da,O){return n(L.cell)?null:this.graph.view.getState(this.graph.getCellAt(da,O))};var ba=C.duplicateCells;C.duplicateCells=function(L,da){L=null!=L?
-L:this.getSelectionCells();for(var O=L.slice(0),N=0;N<O.length;N++){var aa=C.view.getState(O[N]);if(null!=aa&&n(aa.cell)){var ma=C.getIncomingTreeEdges(aa.cell);for(aa=0;aa<ma.length;aa++)mxUtils.remove(ma[aa],L)}}this.model.beginUpdate();try{var u=ba.call(this,L,da);if(u.length==L.length)for(N=0;N<L.length;N++)if(n(L[N])){var H=C.getIncomingTreeEdges(u[N]);ma=C.getIncomingTreeEdges(L[N]);if(0==H.length&&0<ma.length){var P=this.cloneCell(ma[0]);this.addEdge(P,C.getDefaultParent(),this.model.getTerminal(ma[0],
-!0),u[N])}}}finally{this.model.endUpdate()}return u};var Z=C.moveCells;C.moveCells=function(L,da,O,N,aa,ma,u){var H=null;this.model.beginUpdate();try{var P=aa,S=this.getCurrentCellStyle(aa);if(null!=L&&n(aa)&&"1"==mxUtils.getValue(S,"treeFolding","0")){for(var R=0;R<L.length;R++)if(n(L[R])||C.model.isEdge(L[R])&&null==C.model.getTerminal(L[R],!0)){aa=C.model.getParent(L[R]);break}if(null!=P&&aa!=P&&null!=this.view.getState(L[0])){var ca=C.getIncomingTreeEdges(L[0]);if(0<ca.length){var ea=C.view.getState(C.model.getTerminal(ca[0],
-!0));if(null!=ea){var fa=C.view.getState(P);null!=fa&&(da=(fa.getCenterX()-ea.getCenterX())/C.view.scale,O=(fa.getCenterY()-ea.getCenterY())/C.view.scale)}}}}H=Z.apply(this,arguments);if(null!=H&&null!=L&&H.length==L.length)for(R=0;R<H.length;R++)if(this.model.isEdge(H[R]))n(P)&&0>mxUtils.indexOf(H,this.model.getTerminal(H[R],!0))&&this.model.setTerminal(H[R],P,!0);else if(n(L[R])&&(ca=C.getIncomingTreeEdges(L[R]),0<ca.length))if(!N)n(P)&&0>mxUtils.indexOf(L,this.model.getTerminal(ca[0],!0))&&this.model.setTerminal(ca[0],
-P,!0);else if(0==C.getIncomingTreeEdges(H[R]).length){S=P;if(null==S||S==C.model.getParent(L[R]))S=C.model.getTerminal(ca[0],!0);N=this.cloneCell(ca[0]);this.addEdge(N,C.getDefaultParent(),S,H[R])}}finally{this.model.endUpdate()}return H};if(null!=F.sidebar){var X=F.sidebar.dropAndConnect;F.sidebar.dropAndConnect=function(L,da,O,N){var aa=C.model,ma=null;aa.beginUpdate();try{if(ma=X.apply(this,arguments),n(L))for(var u=0;u<ma.length;u++)if(aa.isEdge(ma[u])&&null==aa.getTerminal(ma[u],!0)){aa.setTerminal(ma[u],
-L,!0);var H=C.getCellGeometry(ma[u]);H.points=null;null!=H.getTerminalPoint(!0)&&H.setTerminalPoint(null,!0)}}finally{aa.endUpdate()}return ma}}var qa={88:F.actions.get("selectChildren"),84:F.actions.get("selectSubtree"),80:F.actions.get("selectParent"),83:F.actions.get("selectSiblings")},Q=F.onKeyDown;F.onKeyDown=function(L){try{if(C.isEnabled()&&!C.isEditing()&&n(C.getSelectionCell())&&1==C.getSelectionCount()){var da=null;0<C.getIncomingTreeEdges(C.getSelectionCell()).length&&(9==L.which?da=mxEvent.isShiftDown(L)?
-g(C.getSelectionCell()):m(C.getSelectionCell()):13==L.which&&(da=f(C.getSelectionCell(),!mxEvent.isShiftDown(L))));if(null!=da&&0<da.length)1==da.length&&C.model.isEdge(da[0])?C.setSelectionCell(C.model.getTerminal(da[0],!1)):C.setSelectionCell(da[da.length-1]),null!=F.hoverIcons&&F.hoverIcons.update(C.view.getState(C.getSelectionCell())),C.startEditingAtCell(C.getSelectionCell()),mxEvent.consume(L);else if(mxEvent.isAltDown(L)&&mxEvent.isShiftDown(L)){var O=qa[L.keyCode];null!=O&&(O.funct(L),mxEvent.consume(L))}else 37==
-L.keyCode?(y(C.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(L)):38==L.keyCode?(y(C.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(L)):39==L.keyCode?(y(C.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(L)):40==L.keyCode&&(y(C.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(L))}}catch(N){F.handleError(N)}mxEvent.isConsumed(L)||Q.apply(this,arguments)};var W=C.connectVertex;C.connectVertex=function(L,da,O,N,aa,ma,u){var H=C.getIncomingTreeEdges(L);
-if(n(L)){var P=d(L),S=P==mxConstants.DIRECTION_EAST||P==mxConstants.DIRECTION_WEST,R=da==mxConstants.DIRECTION_EAST||da==mxConstants.DIRECTION_WEST;return P==da||0==H.length?m(L,da):S==R?g(L):f(L,da!=mxConstants.DIRECTION_NORTH&&da!=mxConstants.DIRECTION_WEST)}return W.apply(this,arguments)};C.getSubtree=function(L){var da=[L];!D(L)&&!n(L)||E(L)||C.traverse(L,!0,function(O,N){var aa=null!=N&&C.isTreeEdge(N);aa&&0>mxUtils.indexOf(da,N)&&da.push(N);(null==N||aa)&&0>mxUtils.indexOf(da,O)&&da.push(O);
-return null==N||aa});return da};var ha=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){ha.apply(this,arguments);(D(this.state.cell)||n(this.state.cell))&&!E(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(L){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(L),mxEvent.getClientY(L),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(L);this.graph.isMouseDown=!0;F.hoverIcons.reset();mxEvent.consume(L)})))};var la=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=
-function(){la.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 ja=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(L){ja.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=L?"":"none")};var U=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=
-function(L,da){U.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var k=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var n=k.apply(this,arguments),D=this.graph;return n.concat([this.addEntry("tree container",function(){var t=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");t.vertex=
+D,t,E,d,f),mxUtils.bind(this,function(g){return this.isTreeEdge(g)}))};Graph.prototype.getIncomingTreeEdges=function(n,D){return this.getTreeEdges(n,D,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(n,D){return this.getTreeEdges(n,D,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function n(M){return I.isVertex(M)&&t(M)}function D(M){var ia=
+!1;null!=M&&(ia="1"==C.getCurrentCellStyle(M).treeMoving);return ia}function t(M){var ia=!1;null!=M&&(M=I.getParent(M),ia=C.view.getState(M),ia="tree"==(null!=ia?ia.style:C.getCellStyle(M)).containerType);return ia}function E(M){var ia=!1;null!=M&&(M=I.getParent(M),ia=C.view.getState(M),C.view.getState(M),ia=null!=(null!=ia?ia.style:C.getCellStyle(M)).childLayout);return ia}function d(M){M=C.view.getState(M);if(null!=M){var ia=C.getIncomingTreeEdges(M.cell);if(0<ia.length&&(ia=C.view.getState(ia[0]),
+null!=ia&&(ia=ia.absolutePoints,null!=ia&&0<ia.length&&(ia=ia[ia.length-1],null!=ia)))){if(ia.y==M.y&&Math.abs(ia.x-M.getCenterX())<M.width/2)return mxConstants.DIRECTION_SOUTH;if(ia.y==M.y+M.height&&Math.abs(ia.x-M.getCenterX())<M.width/2)return mxConstants.DIRECTION_NORTH;if(ia.x>M.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function f(M,ia){ia=null!=ia?ia:!0;C.model.beginUpdate();try{var N=C.model.getParent(M),O=C.getIncomingTreeEdges(M),ba=C.cloneCells([O[0],
+M]);C.model.setTerminal(ba[0],C.model.getTerminal(O[0],!0),!0);var la=d(M),u=N.geometry;la==mxConstants.DIRECTION_SOUTH||la==mxConstants.DIRECTION_NORTH?ba[1].geometry.x+=ia?M.geometry.width+10:-ba[1].geometry.width-10:ba[1].geometry.y+=ia?M.geometry.height+10:-ba[1].geometry.height-10;C.view.currentRoot!=N&&(ba[1].geometry.x-=u.x,ba[1].geometry.y-=u.y);var H=C.view.getState(M),P=C.view.scale;if(null!=H){var W=mxRectangle.fromRectangle(H);la==mxConstants.DIRECTION_SOUTH||la==mxConstants.DIRECTION_NORTH?
+W.x+=(ia?M.geometry.width+10:-ba[1].geometry.width-10)*P:W.y+=(ia?M.geometry.height+10:-ba[1].geometry.height-10)*P;var R=C.getOutgoingTreeEdges(C.model.getTerminal(O[0],!0));if(null!=R){for(var da=la==mxConstants.DIRECTION_SOUTH||la==mxConstants.DIRECTION_NORTH,fa=u=O=0;fa<R.length;fa++){var ea=C.model.getTerminal(R[fa],!1);if(la==d(ea)){var qa=C.view.getState(ea);ea!=M&&null!=qa&&(da&&ia!=qa.getCenterX()<H.getCenterX()||!da&&ia!=qa.getCenterY()<H.getCenterY())&&mxUtils.intersects(W,qa)&&(O=10+Math.max(O,
+(Math.min(W.x+W.width,qa.x+qa.width)-Math.max(W.x,qa.x))/P),u=10+Math.max(u,(Math.min(W.y+W.height,qa.y+qa.height)-Math.max(W.y,qa.y))/P))}}da?u=0:O=0;for(fa=0;fa<R.length;fa++)if(ea=C.model.getTerminal(R[fa],!1),la==d(ea)&&(qa=C.view.getState(ea),ea!=M&&null!=qa&&(da&&ia!=qa.getCenterX()<H.getCenterX()||!da&&ia!=qa.getCenterY()<H.getCenterY()))){var va=[];C.traverse(qa.cell,!0,function(ua,Aa){var za=null!=Aa&&C.isTreeEdge(Aa);za&&va.push(Aa);(null==Aa||za)&&va.push(ua);return null==Aa||za});C.moveCells(va,
+(ia?1:-1)*O,(ia?1:-1)*u)}}}return C.addCells(ba,N)}finally{C.model.endUpdate()}}function g(M){C.model.beginUpdate();try{var ia=d(M),N=C.getIncomingTreeEdges(M),O=C.cloneCells([N[0],M]);C.model.setTerminal(N[0],O[1],!1);C.model.setTerminal(O[0],O[1],!0);C.model.setTerminal(O[0],M,!1);var ba=C.model.getParent(M),la=ba.geometry,u=[];C.view.currentRoot!=ba&&(O[1].geometry.x-=la.x,O[1].geometry.y-=la.y);C.traverse(M,!0,function(W,R){var da=null!=R&&C.isTreeEdge(R);da&&u.push(R);(null==R||da)&&u.push(W);
+return null==R||da});var H=M.geometry.width+40,P=M.geometry.height+40;ia==mxConstants.DIRECTION_SOUTH?H=0:ia==mxConstants.DIRECTION_NORTH?(H=0,P=-P):ia==mxConstants.DIRECTION_WEST?(H=-H,P=0):ia==mxConstants.DIRECTION_EAST&&(P=0);C.moveCells(u,H,P);return C.addCells(O,ba)}finally{C.model.endUpdate()}}function m(M,ia){C.model.beginUpdate();try{var N=C.model.getParent(M),O=C.getIncomingTreeEdges(M),ba=d(M);0==O.length&&(O=[C.createEdge(N,null,"",null,null,C.createCurrentEdgeStyle())],ba=ia);var la=C.cloneCells([O[0],
+M]);C.model.setTerminal(la[0],M,!0);if(null==C.model.getTerminal(la[0],!1)){C.model.setTerminal(la[0],la[1],!1);var u=C.getCellStyle(la[1]).newEdgeStyle;if(null!=u)try{var H=JSON.parse(u),P;for(P in H)C.setCellStyles(P,H[P],[la[0]]),"edgeStyle"==P&&"elbowEdgeStyle"==H[P]&&C.setCellStyles("elbow",ba==mxConstants.DIRECTION_SOUTH||ba==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[la[0]])}catch(qa){}}O=C.getOutgoingTreeEdges(M);var W=N.geometry;ia=[];C.view.currentRoot==N&&(W=new mxRectangle);for(u=
+0;u<O.length;u++){var R=C.model.getTerminal(O[u],!1);null!=R&&ia.push(R)}var da=C.view.getBounds(ia),fa=C.view.translate,ea=C.view.scale;ba==mxConstants.DIRECTION_SOUTH?(la[1].geometry.x=null==da?M.geometry.x+(M.geometry.width-la[1].geometry.width)/2:(da.x+da.width)/ea-fa.x-W.x+10,la[1].geometry.y+=la[1].geometry.height-W.y+40):ba==mxConstants.DIRECTION_NORTH?(la[1].geometry.x=null==da?M.geometry.x+(M.geometry.width-la[1].geometry.width)/2:(da.x+da.width)/ea-fa.x+-W.x+10,la[1].geometry.y-=la[1].geometry.height+
+W.y+40):(la[1].geometry.x=ba==mxConstants.DIRECTION_WEST?la[1].geometry.x-(la[1].geometry.width+W.x+40):la[1].geometry.x+(la[1].geometry.width-W.x+40),la[1].geometry.y=null==da?M.geometry.y+(M.geometry.height-la[1].geometry.height)/2:(da.y+da.height)/ea-fa.y+-W.y+10);return C.addCells(la,N)}finally{C.model.endUpdate()}}function q(M,ia,N){M=C.getOutgoingTreeEdges(M);N=C.view.getState(N);var O=[];if(null!=N&&null!=M){for(var ba=0;ba<M.length;ba++){var la=C.view.getState(C.model.getTerminal(M[ba],!1));
+null!=la&&(!ia&&Math.min(la.x+la.width,N.x+N.width)>=Math.max(la.x,N.x)||ia&&Math.min(la.y+la.height,N.y+N.height)>=Math.max(la.y,N.y))&&O.push(la)}O.sort(function(u,H){return ia?u.x+u.width-H.x-H.width:u.y+u.height-H.y-H.height})}return O}function y(M,ia){var N=d(M),O=ia==mxConstants.DIRECTION_EAST||ia==mxConstants.DIRECTION_WEST;(N==mxConstants.DIRECTION_EAST||N==mxConstants.DIRECTION_WEST)==O&&N!=ia?F.actions.get("selectParent").funct():N==ia?(ia=C.getOutgoingTreeEdges(M),null!=ia&&0<ia.length&&
+C.setSelectionCell(C.model.getTerminal(ia[0],!1))):(N=C.getIncomingTreeEdges(M),null!=N&&0<N.length&&(O=q(C.model.getTerminal(N[0],!0),O,M),M=C.view.getState(M),null!=M&&(M=mxUtils.indexOf(O,M),0<=M&&(M+=ia==mxConstants.DIRECTION_NORTH||ia==mxConstants.DIRECTION_WEST?-1:1,0<=M&&M<=O.length-1&&C.setSelectionCell(O[M].cell)))))}var F=this,C=F.editor.graph,I=C.getModel(),G=F.menus.createPopupMenu;F.menus.createPopupMenu=function(M,ia,N){G.apply(this,arguments);if(1==C.getSelectionCount()){ia=C.getSelectionCell();
+var O=C.getOutgoingTreeEdges(ia);M.addSeparator();0<O.length&&(n(C.getSelectionCell())&&this.addMenuItems(M,["selectChildren"],null,N),this.addMenuItems(M,["selectDescendants"],null,N));n(C.getSelectionCell())?(M.addSeparator(),0<C.getIncomingTreeEdges(ia).length&&this.addMenuItems(M,["selectSiblings","selectParent"],null,N)):0<C.model.getEdgeCount(ia)&&this.addMenuItems(M,["selectConnections"],null,N)}};F.actions.addAction("selectChildren",function(){if(C.isEnabled()&&1==C.getSelectionCount()){var M=
+C.getSelectionCell();M=C.getOutgoingTreeEdges(M);if(null!=M){for(var ia=[],N=0;N<M.length;N++)ia.push(C.model.getTerminal(M[N],!1));C.setSelectionCells(ia)}}},null,null,"Alt+Shift+X");F.actions.addAction("selectSiblings",function(){if(C.isEnabled()&&1==C.getSelectionCount()){var M=C.getSelectionCell();M=C.getIncomingTreeEdges(M);if(null!=M&&0<M.length&&(M=C.getOutgoingTreeEdges(C.model.getTerminal(M[0],!0)),null!=M)){for(var ia=[],N=0;N<M.length;N++)ia.push(C.model.getTerminal(M[N],!1));C.setSelectionCells(ia)}}},
+null,null,"Alt+Shift+S");F.actions.addAction("selectParent",function(){if(C.isEnabled()&&1==C.getSelectionCount()){var M=C.getSelectionCell();M=C.getIncomingTreeEdges(M);null!=M&&0<M.length&&C.setSelectionCell(C.model.getTerminal(M[0],!0))}},null,null,"Alt+Shift+P");F.actions.addAction("selectDescendants",function(M,ia){M=C.getSelectionCell();if(C.isEnabled()&&C.model.isVertex(M)){if(null!=ia&&mxEvent.isAltDown(ia))C.setSelectionCells(C.model.getTreeEdges(M,null==ia||!mxEvent.isShiftDown(ia),null==
+ia||!mxEvent.isControlDown(ia)));else{var N=[];C.traverse(M,!0,function(O,ba){var la=null!=ba&&C.isTreeEdge(ba);la&&N.push(ba);null!=ba&&!la||null!=ia&&mxEvent.isShiftDown(ia)||N.push(O);return null==ba||la})}C.setSelectionCells(N)}},null,null,"Alt+Shift+D");var Z=C.removeCells;C.removeCells=function(M,ia){ia=null!=ia?ia:!0;null==M&&(M=this.getDeletableCells(this.getSelectionCells()));ia&&(M=this.getDeletableCells(this.addAllEdges(M)));for(var N=[],O=0;O<M.length;O++){var ba=M[O];I.isEdge(ba)&&t(ba)&&
+(N.push(ba),ba=I.getTerminal(ba,!1));if(n(ba)){var la=[];C.traverse(ba,!0,function(u,H){var P=null!=H&&C.isTreeEdge(H);P&&la.push(H);(null==H||P)&&la.push(u);return null==H||P});0<la.length&&(N=N.concat(la),ba=C.getIncomingTreeEdges(M[O]),M=M.concat(ba))}else null!=ba&&N.push(M[O])}M=N;return Z.apply(this,arguments)};F.hoverIcons.getStateAt=function(M,ia,N){return n(M.cell)?null:this.graph.view.getState(this.graph.getCellAt(ia,N))};var ca=C.duplicateCells;C.duplicateCells=function(M,ia){M=null!=M?
+M:this.getSelectionCells();for(var N=M.slice(0),O=0;O<N.length;O++){var ba=C.view.getState(N[O]);if(null!=ba&&n(ba.cell)){var la=C.getIncomingTreeEdges(ba.cell);for(ba=0;ba<la.length;ba++)mxUtils.remove(la[ba],M)}}this.model.beginUpdate();try{var u=ca.call(this,M,ia);if(u.length==M.length)for(O=0;O<M.length;O++)if(n(M[O])){var H=C.getIncomingTreeEdges(u[O]);la=C.getIncomingTreeEdges(M[O]);if(0==H.length&&0<la.length){var P=this.cloneCell(la[0]);this.addEdge(P,C.getDefaultParent(),this.model.getTerminal(la[0],
+!0),u[O])}}}finally{this.model.endUpdate()}return u};var aa=C.moveCells;C.moveCells=function(M,ia,N,O,ba,la,u){var H=null;this.model.beginUpdate();try{var P=ba,W=this.getCurrentCellStyle(ba);if(null!=M&&n(ba)&&"1"==mxUtils.getValue(W,"treeFolding","0")){for(var R=0;R<M.length;R++)if(n(M[R])||C.model.isEdge(M[R])&&null==C.model.getTerminal(M[R],!0)){ba=C.model.getParent(M[R]);break}if(null!=P&&ba!=P&&null!=this.view.getState(M[0])){var da=C.getIncomingTreeEdges(M[0]);if(0<da.length){var fa=C.view.getState(C.model.getTerminal(da[0],
+!0));if(null!=fa){var ea=C.view.getState(P);null!=ea&&(ia=(ea.getCenterX()-fa.getCenterX())/C.view.scale,N=(ea.getCenterY()-fa.getCenterY())/C.view.scale)}}}}H=aa.apply(this,arguments);if(null!=H&&null!=M&&H.length==M.length)for(R=0;R<H.length;R++)if(this.model.isEdge(H[R]))n(P)&&0>mxUtils.indexOf(H,this.model.getTerminal(H[R],!0))&&this.model.setTerminal(H[R],P,!0);else if(n(M[R])&&(da=C.getIncomingTreeEdges(M[R]),0<da.length))if(!O)n(P)&&0>mxUtils.indexOf(M,this.model.getTerminal(da[0],!0))&&this.model.setTerminal(da[0],
+P,!0);else if(0==C.getIncomingTreeEdges(H[R]).length){W=P;if(null==W||W==C.model.getParent(M[R]))W=C.model.getTerminal(da[0],!0);O=this.cloneCell(da[0]);this.addEdge(O,C.getDefaultParent(),W,H[R])}}finally{this.model.endUpdate()}return H};if(null!=F.sidebar){var Y=F.sidebar.dropAndConnect;F.sidebar.dropAndConnect=function(M,ia,N,O){var ba=C.model,la=null;ba.beginUpdate();try{if(la=Y.apply(this,arguments),n(M))for(var u=0;u<la.length;u++)if(ba.isEdge(la[u])&&null==ba.getTerminal(la[u],!0)){ba.setTerminal(la[u],
+M,!0);var H=C.getCellGeometry(la[u]);H.points=null;null!=H.getTerminalPoint(!0)&&H.setTerminalPoint(null,!0)}}finally{ba.endUpdate()}return la}}var pa={88:F.actions.get("selectChildren"),84:F.actions.get("selectSubtree"),80:F.actions.get("selectParent"),83:F.actions.get("selectSiblings")},Q=F.onKeyDown;F.onKeyDown=function(M){try{if(C.isEnabled()&&!C.isEditing()&&n(C.getSelectionCell())&&1==C.getSelectionCount()){var ia=null;0<C.getIncomingTreeEdges(C.getSelectionCell()).length&&(9==M.which?ia=mxEvent.isShiftDown(M)?
+g(C.getSelectionCell()):m(C.getSelectionCell()):13==M.which&&(ia=f(C.getSelectionCell(),!mxEvent.isShiftDown(M))));if(null!=ia&&0<ia.length)1==ia.length&&C.model.isEdge(ia[0])?C.setSelectionCell(C.model.getTerminal(ia[0],!1)):C.setSelectionCell(ia[ia.length-1]),null!=F.hoverIcons&&F.hoverIcons.update(C.view.getState(C.getSelectionCell())),C.startEditingAtCell(C.getSelectionCell()),mxEvent.consume(M);else if(mxEvent.isAltDown(M)&&mxEvent.isShiftDown(M)){var N=pa[M.keyCode];null!=N&&(N.funct(M),mxEvent.consume(M))}else 37==
+M.keyCode?(y(C.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(M)):38==M.keyCode?(y(C.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(M)):39==M.keyCode?(y(C.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(M)):40==M.keyCode&&(y(C.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(M))}}catch(O){F.handleError(O)}mxEvent.isConsumed(M)||Q.apply(this,arguments)};var X=C.connectVertex;C.connectVertex=function(M,ia,N,O,ba,la,u){var H=C.getIncomingTreeEdges(M);
+if(n(M)){var P=d(M),W=P==mxConstants.DIRECTION_EAST||P==mxConstants.DIRECTION_WEST,R=ia==mxConstants.DIRECTION_EAST||ia==mxConstants.DIRECTION_WEST;return P==ia||0==H.length?m(M,ia):W==R?g(M):f(M,ia!=mxConstants.DIRECTION_NORTH&&ia!=mxConstants.DIRECTION_WEST)}return X.apply(this,arguments)};C.getSubtree=function(M){var ia=[M];!D(M)&&!n(M)||E(M)||C.traverse(M,!0,function(N,O){var ba=null!=O&&C.isTreeEdge(O);ba&&0>mxUtils.indexOf(ia,O)&&ia.push(O);(null==O||ba)&&0>mxUtils.indexOf(ia,N)&&ia.push(N);
+return null==O||ba});return ia};var ha=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){ha.apply(this,arguments);(D(this.state.cell)||n(this.state.cell))&&!E(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(M){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(M),mxEvent.getClientY(M),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(M);this.graph.isMouseDown=!0;F.hoverIcons.reset();mxEvent.consume(M)})))};var U=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=
+function(){U.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 ma=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(M){ma.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=M?"":"none")};var T=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=
+function(M,ia){T.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var k=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var n=k.apply(this,arguments),D=this.graph;return n.concat([this.addEntry("tree container",function(){var t=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");t.vertex=
!0;var E=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');E.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 f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
f.geometry.relative=!0;f.edge=!0;E.insertEdge(f,!0);d.insertEdge(f,!1);t.insert(f);t.insert(E);t.insert(d);return sb.createVertexTemplateFromCells([t],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var t=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");t.vertex=!0;var E=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};');
E.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 f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");f.geometry.relative=!0;f.edge=!0;
@@ -3920,27 +3922,26 @@ m.geometry.relative=!0;m.edge=!0;E.insertEdge(m,!0);g.insertEdge(m,!1);t.insert(
E.geometry.setTerminalPoint(new mxPoint(0,0),!0);E.geometry.relative=!0;E.edge=!0;t.insertEdge(E,!1);return sb.createVertexTemplateFromCells([t,E],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree sub sections",function(){var t=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");t.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");
E.geometry.setTerminalPoint(new mxPoint(110,-40),!0);E.geometry.relative=!0;E.edge=!0;t.insertEdge(E,!1);var d=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");f.geometry.setTerminalPoint(new mxPoint(110,-40),!0);f.geometry.relative=
!0;f.edge=!0;d.insertEdge(f,!1);return sb.createVertexTemplateFromCells([E,f,t,d],220,60,"Sub Sections")})])}}})();EditorUi.windowed="0"!=urlParams.windows;
-EditorUi.initMinimalTheme=function(){function b(Q,W){if(EditorUi.windowed){var ha=Q.editor.graph;ha.popupMenuHandler.hideMenu();if(null==Q.formatWindow){W="1"==urlParams.sketch?Math.max(10,Q.diagramContainer.clientWidth-241):Math.max(10,Q.diagramContainer.clientWidth-248);var la="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;ha="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,ha.container.clientHeight-10);Q.formatWindow=new t(Q,mxResources.get("format"),W,la,240,ha,function(U){var L=
-Q.createFormat(U);L.init();Q.addListener("darkModeChanged",mxUtils.bind(this,function(){L.refresh()}));return L});Q.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){Q.formatWindow.window.fit()}));Q.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else Q.formatWindow.window.setVisible(null!=W?W:!Q.formatWindow.window.isVisible())}else{if(null==Q.formatElt){Q.formatElt=D();var ja=Q.createFormat(Q.formatElt);ja.init();Q.formatElt.style.border="none";Q.formatElt.style.width=
-"240px";Q.formatElt.style.borderLeft="1px solid gray";Q.formatElt.style.right="0px";Q.addListener("darkModeChanged",mxUtils.bind(this,function(){ja.refresh()}))}ha=Q.diagramContainer.parentNode;null!=Q.formatElt.parentNode?(Q.formatElt.parentNode.removeChild(Q.formatElt),ha.style.right="0px"):(ha.parentNode.appendChild(Q.formatElt),ha.style.right=Q.formatElt.style.width)}}function e(Q,W){function ha(L,da){var O=Q.menus.get(L);L=U.addMenu(da,mxUtils.bind(this,function(){O.funct.apply(this,arguments)}));
-L.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;";L.className="geTitle";W.appendChild(L);return L}var la=document.createElement("div");la.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";la.className="geTitle";var ja=document.createElement("span");ja.style.fontSize="18px";ja.style.marginRight=
-"5px";ja.innerHTML="+";la.appendChild(ja);mxUtils.write(la,mxResources.get("moreShapes"));W.appendChild(la);mxEvent.addListener(la,"click",function(){Q.actions.get("shapes").funct()});var U=new Menubar(Q,W);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?la.style.bottom="0":null!=Q.actions.get("newLibrary")?(la=document.createElement("div"),la.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",
-la.className="geTitle",ja=document.createElement("span"),ja.style.cssText="position:relative;top:6px;",mxUtils.write(ja,mxResources.get("newLibrary")),la.appendChild(ja),W.appendChild(la),mxEvent.addListener(la,"click",Q.actions.get("newLibrary").funct),la=document.createElement("div"),la.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;",la.className="geTitle",ja=
-document.createElement("span"),ja.style.cssText="position:relative;top:6px;",mxUtils.write(ja,mxResources.get("openLibrary")),la.appendChild(ja),W.appendChild(la),mxEvent.addListener(la,"click",Q.actions.get("openLibrary").funct)):(la=ha("newLibrary",mxResources.get("newLibrary")),la.style.boxSizing="border-box",la.style.paddingRight="6px",la.style.paddingLeft="6px",la.style.height="32px",la.style.left="0",la=ha("openLibraryFrom",mxResources.get("openLibraryFrom")),la.style.borderLeft="1px solid lightgray",
-la.style.boxSizing="border-box",la.style.paddingRight="6px",la.style.paddingLeft="6px",la.style.height="32px",la.style.left="50%");W.appendChild(Q.sidebar.container);W.style.overflow="hidden"}function k(Q,W){if(EditorUi.windowed){var ha=Q.editor.graph;ha.popupMenuHandler.hideMenu();if(null==Q.sidebarWindow){W=Math.min(ha.container.clientWidth-10,218);var la="1"==urlParams.embedInline?650:Math.min(ha.container.clientHeight-40,650);Q.sidebarWindow=new t(Q,mxResources.get("shapes"),"1"==urlParams.sketch&&
-"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&"1"!=urlParams.embedInline?Math.max(30,(ha.container.clientHeight-la)/2):56,W-6,la-6,function(ja){e(Q,ja)});Q.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){Q.sidebarWindow.window.fit()}));Q.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);Q.sidebarWindow.window.setVisible(!0);isLocalStorage&&Q.getLocalData("sidebar",function(ja){Q.sidebar.showEntries(ja,null,!0)});Q.restoreLibraries()}else Q.sidebarWindow.window.setVisible(null!=
-W?W:!Q.sidebarWindow.window.isVisible())}else null==Q.sidebarElt&&(Q.sidebarElt=D(),e(Q,Q.sidebarElt),Q.sidebarElt.style.border="none",Q.sidebarElt.style.width="210px",Q.sidebarElt.style.borderRight="1px solid gray"),ha=Q.diagramContainer.parentNode,null!=Q.sidebarElt.parentNode?(Q.sidebarElt.parentNode.removeChild(Q.sidebarElt),ha.style.left="0px"):(ha.parentNode.appendChild(Q.sidebarElt),ha.style.left=Q.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||
-"undefined"===typeof window.Menus)window.uiTheme=null;else{var n=0;try{n=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(Q){}var D=function(){var Q=document.createElement("div");Q.className="geSidebarContainer";Q.style.position="absolute";Q.style.width="100%";Q.style.height="100%";Q.style.border="1px solid whiteSmoke";Q.style.overflowX="hidden";Q.style.overflowY="auto";return Q},t=function(Q,W,ha,la,ja,U,L){var da=D();L(da);this.window=new mxWindow(W,da,ha,
-la,ja,U,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.setLocation=function(O,N){var aa=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,ma=this.table.firstChild.firstChild.firstChild;O=Math.max(0,Math.min(O,(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-ma.clientWidth-2));N=Math.max(0,Math.min(N,aa-ma.clientHeight-
-2));this.getX()==O&&this.getY()==N||mxWindow.prototype.setLocation.apply(this,arguments)};mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(O){null==O&&(O=window.event);return null!=O&&Q.isSelectionAllowed(O)}))};Editor.checkmarkImage=Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;mxWindow.prototype.closeImage=
-Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');
+EditorUi.initMinimalTheme=function(){function b(Q,X){if(EditorUi.windowed){var ha=Q.editor.graph;ha.popupMenuHandler.hideMenu();if(null==Q.formatWindow){X="1"==urlParams.sketch?Math.max(10,Q.diagramContainer.clientWidth-241):Math.max(10,Q.diagramContainer.clientWidth-248);var U="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;ha="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,ha.container.clientHeight-10);Q.formatWindow=new t(Q,mxResources.get("format"),X,U,240,ha,function(T){var M=
+Q.createFormat(T);M.init();Q.addListener("darkModeChanged",mxUtils.bind(this,function(){M.refresh()}));return M});Q.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){Q.formatWindow.window.fit()}));Q.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else Q.formatWindow.window.setVisible(null!=X?X:!Q.formatWindow.window.isVisible())}else{if(null==Q.formatElt){Q.formatElt=D();var ma=Q.createFormat(Q.formatElt);ma.init();Q.formatElt.style.border="none";Q.formatElt.style.width=
+"240px";Q.formatElt.style.borderLeft="1px solid gray";Q.formatElt.style.right="0px";Q.addListener("darkModeChanged",mxUtils.bind(this,function(){ma.refresh()}))}ha=Q.diagramContainer.parentNode;null!=Q.formatElt.parentNode?(Q.formatElt.parentNode.removeChild(Q.formatElt),ha.style.right="0px"):(ha.parentNode.appendChild(Q.formatElt),ha.style.right=Q.formatElt.style.width)}}function e(Q,X){function ha(M,ia){var N=Q.menus.get(M);M=T.addMenu(ia,mxUtils.bind(this,function(){N.funct.apply(this,arguments)}));
+M.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;";M.className="geTitle";X.appendChild(M);return M}var U=document.createElement("div");U.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";U.className="geTitle";var ma=document.createElement("span");ma.style.fontSize="18px";ma.style.marginRight=
+"5px";ma.innerHTML="+";U.appendChild(ma);mxUtils.write(U,mxResources.get("moreShapes"));X.appendChild(U);mxEvent.addListener(U,"click",function(){Q.actions.get("shapes").funct()});var T=new Menubar(Q,X);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?U.style.bottom="0":null!=Q.actions.get("newLibrary")?(U=document.createElement("div"),U.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",
+U.className="geTitle",ma=document.createElement("span"),ma.style.cssText="position:relative;top:6px;",mxUtils.write(ma,mxResources.get("newLibrary")),U.appendChild(ma),X.appendChild(U),mxEvent.addListener(U,"click",Q.actions.get("newLibrary").funct),U=document.createElement("div"),U.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;",U.className="geTitle",ma=document.createElement("span"),
+ma.style.cssText="position:relative;top:6px;",mxUtils.write(ma,mxResources.get("openLibrary")),U.appendChild(ma),X.appendChild(U),mxEvent.addListener(U,"click",Q.actions.get("openLibrary").funct)):(U=ha("newLibrary",mxResources.get("newLibrary")),U.style.boxSizing="border-box",U.style.paddingRight="6px",U.style.paddingLeft="6px",U.style.height="32px",U.style.left="0",U=ha("openLibraryFrom",mxResources.get("openLibraryFrom")),U.style.borderLeft="1px solid lightgray",U.style.boxSizing="border-box",
+U.style.paddingRight="6px",U.style.paddingLeft="6px",U.style.height="32px",U.style.left="50%");X.appendChild(Q.sidebar.container);X.style.overflow="hidden"}function k(Q,X){if(EditorUi.windowed){var ha=Q.editor.graph;ha.popupMenuHandler.hideMenu();if(null==Q.sidebarWindow){X=Math.min(ha.container.clientWidth-10,218);var U="1"==urlParams.embedInline?650:Math.min(ha.container.clientHeight-40,650);Q.sidebarWindow=new t(Q,mxResources.get("shapes"),"1"==urlParams.sketch&&"1"!=urlParams.embedInline?66:10,
+"1"==urlParams.sketch&&"1"!=urlParams.embedInline?Math.max(30,(ha.container.clientHeight-U)/2):56,X-6,U-6,function(ma){e(Q,ma)});Q.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){Q.sidebarWindow.window.fit()}));Q.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);Q.sidebarWindow.window.setVisible(!0);isLocalStorage&&Q.getLocalData("sidebar",function(ma){Q.sidebar.showEntries(ma,null,!0)});Q.restoreLibraries()}else Q.sidebarWindow.window.setVisible(null!=X?X:!Q.sidebarWindow.window.isVisible())}else null==
+Q.sidebarElt&&(Q.sidebarElt=D(),e(Q,Q.sidebarElt),Q.sidebarElt.style.border="none",Q.sidebarElt.style.width="210px",Q.sidebarElt.style.borderRight="1px solid gray"),ha=Q.diagramContainer.parentNode,null!=Q.sidebarElt.parentNode?(Q.sidebarElt.parentNode.removeChild(Q.sidebarElt),ha.style.left="0px"):(ha.parentNode.appendChild(Q.sidebarElt),ha.style.left=Q.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=
+null;else{var n=0;try{n=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(Q){}var D=function(){var Q=document.createElement("div");Q.className="geSidebarContainer";Q.style.position="absolute";Q.style.width="100%";Q.style.height="100%";Q.style.border="1px solid whiteSmoke";Q.style.overflowX="hidden";Q.style.overflowY="auto";return Q},t=function(Q,X,ha,U,ma,T,M){var ia=D();M(ia);this.window=new mxWindow(X,ia,ha,U,ma,T,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);
+this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);Q.installResizeHandler(this,!0);mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(N){null==N&&(N=window.event);return null!=N&&Q.isSelectionAllowed(N)}))};Editor.checkmarkImage=Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;
+mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');
mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR="#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR="#C0C0C0";mxConstants.HIGHLIGHT_STROKEWIDTH=5;mxConstants.HIGHLIGHT_OPACITY=35;mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity=
"0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur="1.2";Format.inactiveTabBackgroundColor="#f0f0f0";mxGraphHandler.prototype.previewColor="#C0C0C0";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight="1"==urlParams.sketch?1:46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert="1"!=urlParams.sketch&&!mxClient.IS_IOS&&!mxClient.IS_ANDROID;
EditorUi.prototype.setDarkMode=function(Q){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetDarkMode(Q);null==urlParams.dark&&(mxSettings.settings.darkMode=Q,mxSettings.save());this.fireEvent(new mxEventObject("darkModeChanged"))}),0)};var E=document.createElement("link");E.setAttribute("rel","stylesheet");E.setAttribute("href",STYLE_PATH+"/dark.css");E.setAttribute("charset","UTF-8");E.setAttribute("type",
-"text/css");EditorUi.prototype.doSetDarkMode=function(Q){if(Editor.darkMode!=Q){var W=this.editor.graph;Editor.darkMode=Q;this.spinner.opts.color=Editor.isDarkMode()?"#c0c0c0":"#000";W.view.gridColor=Editor.isDarkMode()?W.view.defaultDarkGridColor:W.view.defaultGridColor;W.defaultPageBackgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";W.defaultPageBorderColor=Editor.isDarkMode()?"#505759":"#ffffff";W.shapeBackgroundColor=Editor.isDarkMode()?Editor.darkColor:
-"#ffffff";W.shapeForegroundColor=Editor.isDarkMode()?Editor.lightColor:"#000000";W.defaultThemeName=Editor.isDarkMode()?"darkTheme":"default-style2";W.graphHandler.previewColor=Editor.isDarkMode()?"#cccccc":"black";document.body.style.backgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";W.loadStylesheet();null!=this.actions.layersWindow&&(Q=this.actions.layersWindow.window.isVisible(),this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),
-this.actions.layersWindow=null,Q&&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();Graph.prototype.defaultPageBackgroundColor=W.defaultPageBackgroundColor;Graph.prototype.defaultPageBorderColor=W.defaultPageBorderColor;Graph.prototype.shapeBackgroundColor=W.shapeBackgroundColor;Graph.prototype.shapeForegroundColor=
-W.shapeForegroundColor;Graph.prototype.defaultThemeName=W.defaultThemeName;StyleFormatPanel.prototype.defaultStrokeColor=Editor.isDarkMode()?"#cccccc":"black";BaseFormatPanel.prototype.buttonBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"white";Format.inactiveTabBackgroundColor=Editor.isDarkMode()?"black":"#f0f0f0";Dialog.backdropColor=Editor.isDarkMode()?Editor.darkColor:"white";mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000FF";Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?
+"text/css");EditorUi.prototype.doSetDarkMode=function(Q){if(Editor.darkMode!=Q){var X=this.editor.graph;Editor.darkMode=Q;this.spinner.opts.color=Editor.isDarkMode()?"#c0c0c0":"#000";X.view.gridColor=Editor.isDarkMode()?X.view.defaultDarkGridColor:X.view.defaultGridColor;X.defaultPageBackgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";X.defaultPageBorderColor=Editor.isDarkMode()?"#505759":"#ffffff";X.shapeBackgroundColor=Editor.isDarkMode()?Editor.darkColor:
+"#ffffff";X.shapeForegroundColor=Editor.isDarkMode()?Editor.lightColor:"#000000";X.defaultThemeName=Editor.isDarkMode()?"darkTheme":"default-style2";X.graphHandler.previewColor=Editor.isDarkMode()?"#cccccc":"black";document.body.style.backgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";X.loadStylesheet();null!=this.actions.layersWindow&&(Q=this.actions.layersWindow.window.isVisible(),this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),
+this.actions.layersWindow=null,Q&&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();Graph.prototype.defaultPageBackgroundColor=X.defaultPageBackgroundColor;Graph.prototype.defaultPageBorderColor=X.defaultPageBorderColor;Graph.prototype.shapeBackgroundColor=X.shapeBackgroundColor;Graph.prototype.shapeForegroundColor=
+X.shapeForegroundColor;Graph.prototype.defaultThemeName=X.defaultThemeName;StyleFormatPanel.prototype.defaultStrokeColor=Editor.isDarkMode()?"#cccccc":"black";BaseFormatPanel.prototype.buttonBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"white";Format.inactiveTabBackgroundColor=Editor.isDarkMode()?"black":"#f0f0f0";Dialog.backdropColor=Editor.isDarkMode()?Editor.darkColor:"white";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;d.innerHTML=Editor.createMinimalCss();Editor.darkMode?null==E.parentNode&&document.getElementsByTagName("head")[0].appendChild(E):null!=E.parentNode&&E.parentNode.removeChild(E)}};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 .geSidebarContainer *:not(svg *) { font-size:9pt; }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; }.geStatus > div { box-sizing: border-box; max-width: 100%; text-overflow: ellipsis; }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: '+
@@ -3951,101 +3952,102 @@ Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMo
(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 d=document.createElement("style");d.type="text/css";d.innerHTML=Editor.createMinimalCss();document.getElementsByTagName("head")[0].appendChild(d);Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var f=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");f.apply(this,arguments)};var g=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){g.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var m=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(Q,
-W){null!=W.shortcut&&900>n&&!mxClient.IS_IOS?Q.firstChild.nextSibling.setAttribute("title",W.shortcut):m.apply(this,arguments)};var q=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){q.apply(this,arguments);if(null!=this.userElement){var Q=this.userElement;Q.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+Q.style.display;Q.className="geToolbarButton";Q.innerText="";Q.style.backgroundImage="url("+Editor.userImage+")";Q.style.backgroundPosition="center center";
-Q.style.backgroundRepeat="no-repeat";Q.style.backgroundSize="24px 24px";Q.style.height="24px";Q.style.width="24px";Q.style.cssFloat="right";Q.setAttribute("title",mxResources.get("changeUser"));if("none"!=Q.style.display){Q.style.display="inline-block";var W=this.getCurrentFile();if(null!=W&&W.isRealtimeEnabled()&&W.isRealtimeSupported()){var ha=document.createElement("img");ha.setAttribute("border","0");ha.style.position="absolute";ha.style.left="18px";ha.style.top="2px";ha.style.width="12px";ha.style.height=
-"12px";var la=W.getRealtimeError();W=W.getRealtimeState();var ja=mxResources.get("realtimeCollaboration");1==W?(ha.src=Editor.syncImage,ja+=" ("+mxResources.get("online")+")"):(ha.src=Editor.syncProblemImage,ja=null!=la&&null!=la.message?ja+(" ("+la.message+")"):ja+(" ("+mxResources.get("disconnected")+")"));ha.setAttribute("title",ja);Q.style.paddingRight="4px";Q.appendChild(ha)}}}};var y=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){y.apply(this,arguments);if(null!=
+X){null!=X.shortcut&&900>n&&!mxClient.IS_IOS?Q.firstChild.nextSibling.setAttribute("title",X.shortcut):m.apply(this,arguments)};var q=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){q.apply(this,arguments);if(null!=this.userElement){var Q=this.userElement;Q.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+Q.style.display;Q.className="geToolbarButton";Q.innerText="";Q.style.backgroundImage="url("+Editor.userImage+")";Q.style.backgroundPosition="center center";
+Q.style.backgroundRepeat="no-repeat";Q.style.backgroundSize="24px 24px";Q.style.height="24px";Q.style.width="24px";Q.style.cssFloat="right";Q.setAttribute("title",mxResources.get("changeUser"));if("none"!=Q.style.display){Q.style.display="inline-block";var X=this.getCurrentFile();if(null!=X&&X.isRealtimeEnabled()&&X.isRealtimeSupported()){var ha=document.createElement("img");ha.setAttribute("border","0");ha.style.position="absolute";ha.style.left="18px";ha.style.top="2px";ha.style.width="12px";ha.style.height=
+"12px";var U=X.getRealtimeError();X=X.getRealtimeState();var ma=mxResources.get("realtimeCollaboration");1==X?(ha.src=Editor.syncImage,ma+=" ("+mxResources.get("online")+")"):(ha.src=Editor.syncProblemImage,ma=null!=U&&null!=U.message?ma+(" ("+U.message+")"):ma+(" ("+mxResources.get("disconnected")+")"));ha.setAttribute("title",ma);Q.style.paddingRight="4px";Q.appendChild(ha)}}}};var y=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){y.apply(this,arguments);if(null!=
this.shareButton){var Q=this.shareButton;Q.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";Q.className="geToolbarButton";Q.innerText="";Q.style.backgroundImage="url("+Editor.shareImage+")";Q.style.backgroundPosition="center center";Q.style.backgroundRepeat="no-repeat";Q.style.backgroundSize="24px 24px";Q.style.height="24px";Q.style.width="24px";"1"==urlParams.sketch&&(this.shareButton.style.display="none")}null!=this.buttonContainer&&(this.buttonContainer.style.marginTop=
-"-2px",this.buttonContainer.style.paddingTop="4px")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer&&"1"!=urlParams.embedInline){var Q=document.createElement("div");Q.style.display="inline-block";Q.style.position="relative";Q.style.marginTop="6px";Q.style.marginRight="4px";var W=document.createElement("a");W.className="geMenuItem gePrimaryBtn";W.style.marginLeft="8px";W.style.padding="6px";if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var ha="1"==urlParams.publishClose?
-mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(W,ha);W.setAttribute("title",ha);mxEvent.addListener(W,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));Q.appendChild(W)}}else mxUtils.write(W,mxResources.get("save")),W.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(W,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),Q.appendChild(W),"1"==urlParams.saveAndExit&&(W=document.createElement("a"),
-mxUtils.write(W,mxResources.get("saveAndExit")),W.setAttribute("title",mxResources.get("saveAndExit")),W.className="geMenuItem",W.style.marginLeft="6px",W.style.padding="6px",mxEvent.addListener(W,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),Q.appendChild(W));"1"!=urlParams.noExitBtn&&(W=document.createElement("a"),ha="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(W,ha),W.setAttribute("title",ha),W.className="geMenuItem",
-W.style.marginLeft="6px",W.style.padding="6px",mxEvent.addListener(W,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),Q.appendChild(W));this.buttonContainer.appendChild(Q);this.buttonContainer.style.top="6px";this.editor.fireEvent(new mxEventObject("statusChanged"))}};var F=Sidebar.prototype.getTooltipOffset;Sidebar.prototype.getTooltipOffset=function(Q,W){if(null==this.editorUi.sidebarWindow||mxUtils.isAncestorNode(this.editorUi.picker,Q)){var ha=mxUtils.getOffset(this.editorUi.picker);
-ha.x+=this.editorUi.picker.offsetWidth+4;ha.y+=Q.offsetTop-W.height/2+16;return ha}var la=F.apply(this,arguments);ha=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);la.x+=ha.x-16;la.y+=ha.y;return la};var C=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(Q,W,ha){var la=this.editorUi.editor.graph;Q.smartSeparators=!0;C.apply(this,arguments);"1"==urlParams.sketch?la.isEnabled()&&(Q.addSeparator(),1==la.getSelectionCount()&&this.addMenuItems(Q,["-","lockUnlock"],null,
-ha)):1==la.getSelectionCount()?(la.isCellFoldable(la.getSelectionCell())&&this.addMenuItems(Q,la.isCellCollapsed(W)?["expand"]:["collapse"],null,ha),this.addMenuItems(Q,["collapsible","-","lockUnlock","enterGroup"],null,ha),Q.addSeparator(),this.addSubmenu("layout",Q)):la.isSelectionEmpty()&&la.isEnabled()?(Q.addSeparator(),this.addMenuItems(Q,["editData"],null,ha),Q.addSeparator(),this.addSubmenu("layout",Q),this.addSubmenu("insert",Q),this.addMenuItems(Q,["-","exitGroup"],null,ha)):la.isEnabled()&&
-this.addMenuItems(Q,["-","lockUnlock"],null,ha)};var I=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(Q,W,ha){I.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(Q,["copyAsImage"],null,ha)};EditorUi.prototype.toggleFormatPanel=function(Q){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=Q?Q:!this.formatWindow.window.isVisible()):b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};
-var G=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.window.setVisible(!1),this.actions.outlineWindow.window.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&
-(this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.window.setVisible(!1),this.menus.tagsWindow.window.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.window.setVisible(!1),this.menus.findWindow.window.destroy(),this.menus.findWindow=null);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.window.setVisible(!1),this.menus.findReplaceWindow.window.destroy(),
-this.menus.findReplaceWindow=null);G.apply(this,arguments)};var Y=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(Q){Y.apply(this,arguments);if(Q){var W=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=W&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=W||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),
-null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var ba=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(Q){Q=ba.apply(this,arguments);var W=this.editorUi,ha=W.editor.graph;if(ha.isEnabled()&&"1"==urlParams.sketch){var la=this.createOption(mxResources.get("sketch"),function(){return Editor.sketchMode},function(ja,U){W.setSketchMode(!Editor.sketchMode);null!=U&&mxEvent.isShiftDown(U)||ha.updateCellStyles({sketch:ja?
-"1":null},ha.getVerticesAndEdges())},{install:function(ja){this.listener=function(){ja(Editor.sketchMode)};W.addListener("sketchModeChanged",this.listener)},destroy:function(){W.removeListener(this.listener)}});Q.appendChild(la)}return Q};var Z=Menus.prototype.init;Menus.prototype.init=function(){Z.apply(this,arguments);var Q=this.editorUi,W=Q.editor.graph;Q.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";Q.actions.get("createShape").label=mxResources.get("shape")+"...";Q.actions.get("outline").label=
-mxResources.get("outline")+"...";Q.actions.get("layers").label=mxResources.get("layers")+"...";Q.actions.get("tags").label=mxResources.get("tags")+"...";Q.actions.get("comments").label=mxResources.get("comments")+"...";var ha=Q.actions.put("toggleDarkMode",new Action(mxResources.get("dark"),function(N){Q.setDarkMode(!Editor.darkMode)}));ha.setToggleAction(!0);ha.setSelectedCallback(function(){return Editor.isDarkMode()});ha=Q.actions.put("toggleSketchMode",new Action(mxResources.get("sketch"),function(N){Q.setSketchMode(!Editor.sketchMode)}));
-ha.setToggleAction(!0);ha.setSelectedCallback(function(){return Editor.sketchMode});ha=Q.actions.put("togglePagesVisible",new Action(mxResources.get("pages"),function(N){Q.setPagesVisible(!Editor.pagesVisible)}));ha.setToggleAction(!0);ha.setSelectedCallback(function(){return Editor.pagesVisible});Q.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){W.popupMenuHandler.hideMenu();Q.showImportCsvDialog()}));Q.actions.put("importText",new Action(mxResources.get("text")+"...",
-function(){var N=new ParseDialog(Q,"Insert from Text");Q.showDialog(N.container,620,420,!0,!1);N.init()}));Q.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var N=new ParseDialog(Q,"Insert from Text","formatSql");Q.showDialog(N.container,620,420,!0,!1);N.init()}));Q.actions.put("toggleShapes",new Action(mxResources.get("1"==urlParams.sketch?"moreShapes":"shapes")+"...",function(){k(Q)},null,null,Editor.ctrlKey+"+Shift+K"));Q.actions.put("toggleFormat",new Action(mxResources.get("format")+
-"...",function(){b(Q)})).shortcut=Q.actions.get("formatPanel").shortcut;EditorUi.enablePlantUml&&!Q.isOffline()&&Q.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var N=new ParseDialog(Q,mxResources.get("plantUml")+"...","plantUml");Q.showDialog(N.container,620,420,!0,!1);N.init()}));Q.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var N=new ParseDialog(Q,mxResources.get("mermaid")+"...","mermaid");Q.showDialog(N.container,620,420,!0,!1);
-N.init()}));var la=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,function(N,aa){var ma=this.editorUi.editor.graph,u=ma.getSelectionCell();la.call(this,N,u,null,aa);this.addMenuItems(N,["editTooltip"],aa);ma.model.isVertex(u)&&this.addMenuItems(N,["editGeometry"],aa);this.addMenuItems(N,["-","edit"],aa)})));this.addPopupMenuCellEditItems=function(N,aa,ma,u){N.addSeparator();this.addSubmenu("editCell",N,u,mxResources.get("edit"))};this.put("file",new Menu(mxUtils.bind(this,
-function(N,aa){var ma=Q.getCurrentFile();Q.menus.addMenuItems(N,["new"],aa);Q.menus.addSubmenu("openFrom",N,aa);isLocalStorage&&this.addSubmenu("openRecent",N,aa);N.addSeparator(aa);null!=ma&&ma.constructor==DriveFile?Q.menus.addMenuItems(N,["save","rename","makeCopy","moveToFolder"],aa):(Q.menus.addMenuItems(N,["save","saveAs","-","rename"],aa),Q.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(N,["upload"],aa):Q.menus.addMenuItems(N,["makeCopy"],
-aa));N.addSeparator(aa);null!=ma&&(ma.isRevisionHistorySupported()&&Q.menus.addMenuItems(N,["revisionHistory"],aa),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||ma.constructor==LocalFile&&null==ma.fileHandle||Q.menus.addMenuItems(N,["synchronize"],aa));Q.menus.addMenuItems(N,["autosave"],aa);if(null!=ma&&(N.addSeparator(aa),ma.constructor==DriveFile&&Q.menus.addMenuItems(N,["share"],aa),null!=Q.fileNode&&"1"!=urlParams.embedInline)){var u=null!=ma.getTitle()?ma.getTitle():Q.defaultFilename;(ma.constructor==
-DriveFile&&null!=ma.sync&&ma.sync.isConnected()||!/(\.html)$/i.test(u)&&!/(\.svg)$/i.test(u))&&this.addMenuItems(N,["-","properties"],aa)}})));this.put("diagram",new Menu(mxUtils.bind(this,function(N,aa){var ma=Q.getCurrentFile();Q.menus.addSubmenu("extras",N,aa,mxResources.get("preferences"));N.addSeparator(aa);if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)Q.menus.addMenuItems(N,"new open - synchronize - save saveAs -".split(" "),aa);else if("1"==urlParams.embed||Q.mode==App.MODE_ATLAS){"1"!=
-urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&Q.menus.addMenuItems(N,["-","save"],aa);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||Q.mode==App.MODE_ATLAS)Q.menus.addMenuItems(N,["saveAndExit"],aa),null!=ma&&ma.isRevisionHistorySupported()&&Q.menus.addMenuItems(N,["revisionHistory"],aa);N.addSeparator(aa)}else Q.mode==App.MODE_ATLAS?Q.menus.addMenuItems(N,["save","synchronize","-"],aa):"1"!=urlParams.noFileMenu&&("1"!=urlParams.sketch?(Q.menus.addMenuItems(N,
-["new"],aa),Q.menus.addSubmenu("openFrom",N,aa),isLocalStorage&&this.addSubmenu("openRecent",N,aa),N.addSeparator(aa),null!=ma&&(ma.constructor==DriveFile&&Q.menus.addMenuItems(N,["share"],aa),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||ma.constructor==LocalFile||Q.menus.addMenuItems(N,["synchronize"],aa)),N.addSeparator(aa),Q.menus.addSubmenu("save",N,aa)):Q.menus.addSubmenu("file",N,aa));Q.menus.addSubmenu("exportAs",N,aa);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?Q.menus.addMenuItems(N,
-["import"],aa):"1"!=urlParams.noFileMenu&&Q.menus.addSubmenu("importFrom",N,aa);Q.commentsSupported()&&Q.menus.addMenuItems(N,["-","comments"],aa);Q.menus.addMenuItems(N,"- findReplace outline layers tags - pageSetup".split(" "),aa);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||Q.menus.addMenuItems(N,["print"],aa);"1"!=urlParams.sketch&&null!=ma&&null!=Q.fileNode&&"1"!=urlParams.embedInline&&(ma=null!=ma.getTitle()?ma.getTitle():Q.defaultFilename,/(\.html)$/i.test(ma)||/(\.svg)$/i.test(ma)||
-this.addMenuItems(N,["-","properties"]));N.addSeparator(aa);Q.menus.addSubmenu("help",N,aa);"1"==urlParams.embed||Q.mode==App.MODE_ATLAS?("1"!=urlParams.noExitBtn||Q.mode==App.MODE_ATLAS)&&Q.menus.addMenuItems(N,["-","exit"],aa):"1"!=urlParams.noFileMenu&&Q.menus.addMenuItems(N,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(N,aa){var ma=Q.getCurrentFile();null!=ma&&ma.constructor==DriveFile?Q.menus.addMenuItems(N,["save","makeCopy","-","rename","moveToFolder"],aa):(Q.menus.addMenuItems(N,
-["save","saveAs","-","rename"],aa),Q.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(N,["upload"],aa):Q.menus.addMenuItems(N,["makeCopy"],aa));Q.menus.addMenuItems(N,["-","autosave"],aa);null!=ma&&ma.isRevisionHistorySupported()&&Q.menus.addMenuItems(N,["-","revisionHistory"],aa)})));var ja=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(N,aa){ja.funct(N,aa);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||Q.menus.addMenuItems(N,
-["publishLink"],aa);Q.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(N.addSeparator(aa),Q.menus.addSubmenu("embed",N,aa))})));var U=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(N,aa){Q.menus.addInsertTableCellItem(N,aa)})));if("1"==urlParams.sketch){var L=this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(N,aa){L.funct(N,aa);this.addMenuItems(N,["-","pageScale","-","ruler"],aa)})))}this.put("extras",new Menu(mxUtils.bind(this,function(N,aa){null!=U&&
-Q.menus.addSubmenu("language",N,aa);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&Q.mode!=App.MODE_ATLAS&&Q.menus.addSubmenu("theme",N,aa);Q.menus.addSubmenu("units",N,aa);N.addSeparator(aa);"1"!=urlParams.sketch&&Q.menus.addMenuItems(N,"pageScale ruler scrollbars - tooltips copyConnect collapseExpand".split(" "),aa);"1"!=urlParams.embedInline&&"1"!=urlParams.sketch&&"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&Q.mode!=App.MODE_ATLAS&&Q.menus.addMenuItems(N,["-","showStartScreen",
-"search","scratchpad"],aa);N.addSeparator(aa);"1"==urlParams.sketch?Q.menus.addMenuItems(N,"configuration - copyConnect collapseExpand tooltips -".split(" "),aa):(Q.mode!=App.MODE_ATLAS&&Q.menus.addMenuItem(N,"configuration",aa),!Q.isOfflineApp()&&isLocalStorage&&Q.mode!=App.MODE_ATLAS&&Q.menus.addMenuItem(N,"plugins",aa));EditorUi.isElectronApp&&Q.menus.addMenuItems(N,["-","spellCheck","autoBkp","drafts","-"],aa);var ma=Q.getCurrentFile();null!=ma&&ma.isRealtimeEnabled()&&ma.isRealtimeSupported()&&
-this.addMenuItems(N,["-","showRemoteCursors","shareCursor","-"],aa);N.addSeparator(aa);Q.mode!=App.MODE_ATLAS&&this.addMenuItems(N,["fullscreen"],aa);("1"!=urlParams.embedInline&&Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(N,["toggleDarkMode"],aa);N.addSeparator(aa)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(N,aa){Q.menus.addMenuItems(N,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),aa)})));mxUtils.bind(this,
-function(){var N=this.get("insert"),aa=N.funct;N.funct=function(ma,u){"1"==urlParams.sketch?(Q.insertTemplateEnabled&&!Q.isOffline()&&Q.menus.addMenuItems(ma,["insertTemplate"],u),Q.menus.addMenuItems(ma,["insertImage","insertLink","-"],u),Q.menus.addSubmenu("insertAdvanced",ma,u,mxResources.get("advanced")),Q.menus.addSubmenu("layout",ma,u)):(aa.apply(this,arguments),Q.menus.addSubmenu("table",ma,u))}})();var da="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),
-O=function(N,aa,ma,u){N.addItem(ma,null,mxUtils.bind(this,function(){var H=new CreateGraphDialog(Q,ma,u);Q.showDialog(H.container,620,420,!0,!1);H.init()}),aa)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(N,aa){for(var ma=0;ma<da.length;ma++)"-"==da[ma]?N.addSeparator(aa):O(N,aa,mxResources.get(da[ma])+"...",da[ma])})))};EditorUi.prototype.installFormatToolbar=function(Q){var W=this.editor.graph,ha=document.createElement("div");ha.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%;";
-W.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(la,ja){0<W.getSelectionCount()?(Q.appendChild(ha),ha.innerHTML="Selected: "+W.getSelectionCount()):null!=ha.parentNode&&ha.parentNode.removeChild(ha)}))};var X=!1;EditorUi.prototype.initFormatWindow=function(){if(!X&&null!=this.formatWindow){X=!0;this.formatWindow.window.setClosable(!1);var Q=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){Q.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(W){mxEvent.getSource(W)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var qa=EditorUi.prototype.init;EditorUi.prototype.init=
-function(){function Q(wa,ya,Na){var Ja=U.menus.get(wa),Qa=N.addMenu(mxResources.get(wa),mxUtils.bind(this,function(){Ja.funct.apply(this,arguments)}),O);Qa.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";Qa.style.display="inline-block";Qa.style.boxSizing="border-box";Qa.style.top="6px";Qa.style.marginRight="6px";Qa.style.height="30px";Qa.style.paddingTop="6px";Qa.style.paddingBottom="6px";Qa.style.cursor="pointer";Qa.setAttribute("title",mxResources.get(wa));U.menus.menuCreated(Ja,
-Qa,"geMenuItem");null!=Na?(Qa.style.backgroundImage="url("+Na+")",Qa.style.backgroundPosition="center center",Qa.style.backgroundRepeat="no-repeat",Qa.style.backgroundSize="24px 24px",Qa.style.width="34px",Qa.innerText=""):ya||(Qa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",Qa.style.backgroundPosition="right 6px center",Qa.style.backgroundRepeat="no-repeat",Qa.style.paddingRight="22px");return Qa}function W(wa,ya,Na,Ja,Qa,Za){var cb=document.createElement("a");cb.className=
-"1"==urlParams.sketch?"geToolbarButton":"geMenuItem";cb.style.display="inline-block";cb.style.boxSizing="border-box";cb.style.height="30px";cb.style.padding="6px";cb.style.position="relative";cb.style.verticalAlign="top";cb.style.top="0px";"1"==urlParams.sketch&&(cb.style.borderStyle="none",cb.style.boxShadow="none",cb.style.padding="6px",cb.style.margin="0px");null!=U.statusContainer?da.insertBefore(cb,U.statusContainer):da.appendChild(cb);null!=Za?(cb.style.backgroundImage="url("+Za+")",cb.style.backgroundPosition=
-"center center",cb.style.backgroundRepeat="no-repeat",cb.style.backgroundSize="24px 24px",cb.style.width="34px"):mxUtils.write(cb,wa);mxEvent.addListener(cb,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(fb){fb.preventDefault()}));mxEvent.addListener(cb,"click",function(fb){"disabled"!=cb.getAttribute("disabled")&&ya(fb);mxEvent.consume(fb)});null==Na&&(cb.style.marginRight="4px");null!=Ja&&cb.setAttribute("title",Ja);null!=Qa&&(wa=function(){Qa.isEnabled()?(cb.removeAttribute("disabled"),
-cb.style.cursor="pointer"):(cb.setAttribute("disabled","disabled"),cb.style.cursor="default")},Qa.addListener("stateChanged",wa),L.addListener("enabledChanged",wa),wa());return cb}function ha(wa,ya,Na){Na=document.createElement("div");Na.className="geMenuItem";Na.style.display="inline-block";Na.style.verticalAlign="top";Na.style.marginRight="6px";Na.style.padding="0 4px 0 4px";Na.style.height="30px";Na.style.position="relative";Na.style.top="0px";"1"==urlParams.sketch&&(Na.style.boxShadow="none");
-for(var Ja=0;Ja<wa.length;Ja++)null!=wa[Ja]&&("1"==urlParams.sketch&&(wa[Ja].style.padding="10px 8px",wa[Ja].style.width="30px"),wa[Ja].style.margin="0px",wa[Ja].style.boxShadow="none",Na.appendChild(wa[Ja]));null!=ya&&mxUtils.setOpacity(Na,ya);null!=U.statusContainer&&"1"!=urlParams.sketch?da.insertBefore(Na,U.statusContainer):da.appendChild(Na);return Na}function la(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(ca.style.left=58>R.offsetTop-R.offsetHeight/2?"70px":"10px");else{for(var wa=
-da.firstChild;null!=wa;){var ya=wa.nextSibling;"geMenuItem"!=wa.className&&"geItem"!=wa.className||wa.parentNode.removeChild(wa);wa=ya}O=da.firstChild;n=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;wa=1E3>n||"1"==urlParams.sketch;var Na=null;wa||(Na=Q("diagram"));ya=wa?Q("diagram",null,Editor.drawLogoImage):null;null!=ya&&(Na=ya);ha([Na,W(mxResources.get("shapes"),U.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),U.actions.get("image"),wa?Editor.shapesImage:
-null),W(mxResources.get("format"),U.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+U.actions.get("formatPanel").shortcut+")",U.actions.get("image"),wa?Editor.formatImage:null)],wa?60:null);ya=Q("insert",!0,wa?P:null);ha([ya,W(mxResources.get("delete"),U.actions.get("delete").funct,null,mxResources.get("delete"),U.actions.get("delete"),wa?Editor.trashImage:null)],wa?60:null);411<=n&&(ha([z,K],60),520<=n&&ha([za,640<=n?W("",Oa.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+
-" +)",Oa,Editor.zoomInImage):null,640<=n?W("",Xa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",Xa,Editor.zoomOutImage):null],60))}null!=Na&&(mxEvent.disableContextMenu(Na),mxEvent.addGestureListeners(Na,mxUtils.bind(this,function(Ja){(mxEvent.isShiftDown(Ja)||mxEvent.isAltDown(Ja)||mxEvent.isMetaDown(Ja)||mxEvent.isControlDown(Ja)||mxEvent.isPopupTrigger(Ja))&&U.appIconClicked(Ja)}),null,null));ya=U.menus.get("language");null!=ya&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=
-n&&"1"!=urlParams.sketch?(null==Ma&&(ya=N.addMenu("",ya.funct),ya.setAttribute("title",mxResources.get("language")),ya.className="geToolbarButton",ya.style.backgroundImage="url("+Editor.globeImage+")",ya.style.backgroundPosition="center center",ya.style.backgroundRepeat="no-repeat",ya.style.backgroundSize="24px 24px",ya.style.position="absolute",ya.style.height="24px",ya.style.width="24px",ya.style.zIndex="1",ya.style.right="8px",ya.style.cursor="pointer",ya.style.top="1"==urlParams.embed?"12px":
-"11px",da.appendChild(ya),Ma=ya),U.buttonContainer.style.paddingRight="34px"):(U.buttonContainer.style.paddingRight="4px",null!=Ma&&(Ma.parentNode.removeChild(Ma),Ma=null))}qa.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 ja=document.createElement("div");ja.style.cssText=
-"position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";ja.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(ja);"1"==urlParams.sketch&&null!=this.sidebar&&this.isSettingsEnabled()&&(this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save()),this.sidebar.showPalette("search",mxSettings.settings.search));if("1"!=
-urlParams.sketch&&1E3<=n||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])k(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));var U=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==U.embedViewport)mxUtils.fit(this.div);else{var wa=parseInt(this.div.offsetLeft),ya=parseInt(this.div.offsetWidth),Na=U.embedViewport.x+
-U.embedViewport.width,Ja=parseInt(this.div.offsetTop),Qa=parseInt(this.div.offsetHeight),Za=U.embedViewport.y+U.embedViewport.height;this.div.style.left=Math.max(U.embedViewport.x,Math.min(wa,Na-ya))+"px";this.div.style.top=Math.max(U.embedViewport.y,Math.min(Ja,Za-Qa))+"px";this.div.style.height=Math.min(U.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(U.embedViewport.width,parseInt(this.div.style.width))+"px"}};this.keyHandler.bindAction(75,!0,"toggleShapes",
-!0);EditorUi.windowed&&("1"==urlParams.sketch||1E3<=n)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?(this.initFormatWindow(),ja=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>n||708>ja)?this.formatWindow.window.toggleMinimized():this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));U=this;var L=U.editor.graph;U.toolbar=this.createToolbar(U.createDiv("geToolbar"));U.defaultLibraryName=
-mxResources.get("untitledLibrary");var da=document.createElement("div");da.className="geMenubarContainer";var O=null,N=new Menubar(U,da);U.statusContainer=U.createStatusContainer();U.statusContainer.style.position="relative";U.statusContainer.style.maxWidth="";U.statusContainer.style.marginTop="7px";U.statusContainer.style.marginLeft="6px";U.statusContainer.style.color="gray";U.statusContainer.style.cursor="default";var aa=U.hideCurrentMenu;U.hideCurrentMenu=function(){aa.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};
-var ma=U.descriptorChanged;U.descriptorChanged=function(){ma.apply(this,arguments);var wa=U.getCurrentFile();if(null!=wa&&null!=wa.getTitle()){var ya=wa.getMode();"google"==ya?ya="googleDrive":"github"==ya?ya="gitHub":"gitlab"==ya?ya="gitLab":"onedrive"==ya&&(ya="oneDrive");ya=mxResources.get(ya);da.setAttribute("title",wa.getTitle()+(null!=ya?" ("+ya+")":""))}else da.removeAttribute("title")};U.setStatusText(U.editor.getStatus());da.appendChild(U.statusContainer);U.buttonContainer=document.createElement("div");
-U.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";da.appendChild(U.buttonContainer);U.menubarContainer=U.buttonContainer;U.tabContainer=document.createElement("div");U.tabContainer.className="geTabContainer";U.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";ja=U.diagramContainer.parentNode;var u=document.createElement("div");
-u.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";U.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){u.style.top="20px";U.titlebar=document.createElement("div");U.titlebar.style.cssText="position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var H=document.createElement("div");H.style.cssText="max-width: calc(100% - 100px);text-overflow: ellipsis;user-select:none;height:20px;margin: 2px 10px;font-size: 12px;white-space: nowrap;overflow: hidden;";
-U.titlebar.appendChild(H);ja.appendChild(U.titlebar)}H=U.menus.get("viewZoom");var P="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,S="1"==urlParams.sketch?document.createElement("div"):null,R="1"==urlParams.sketch?document.createElement("div"):null,ca="1"==urlParams.sketch?document.createElement("div"):null,ea=mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.refresh();L.refresh();L.view.validateBackground()});U.addListener("darkModeChanged",ea);U.addListener("sketchModeChanged",
-ea);var fa=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)ca.style.left="10px",ca.style.top="10px",R.style.left="10px",R.style.top="60px",S.style.top="10px",S.style.right="12px",S.style.left="",U.diagramContainer.setAttribute("data-bounds",U.diagramContainer.style.top+" "+U.diagramContainer.style.left+" "+U.diagramContainer.style.width+" "+U.diagramContainer.style.height),U.diagramContainer.style.top="0px",U.diagramContainer.style.left="0px",U.diagramContainer.style.bottom="0px",U.diagramContainer.style.right=
-"0px",U.diagramContainer.style.width="",U.diagramContainer.style.height="";else{var wa=U.diagramContainer.getAttribute("data-bounds");if(null!=wa){U.diagramContainer.style.background="transparent";U.diagramContainer.removeAttribute("data-bounds");var ya=L.getGraphBounds();wa=wa.split(" ");U.diagramContainer.style.top=wa[0];U.diagramContainer.style.left=wa[1];U.diagramContainer.style.width=ya.width+50+"px";U.diagramContainer.style.height=ya.height+46+"px";U.diagramContainer.style.bottom="";U.diagramContainer.style.right=
-"";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:U.diagramContainer.getBoundingClientRect()}),"*");U.refresh()}ca.style.left=U.diagramContainer.offsetLeft+"px";ca.style.top=U.diagramContainer.offsetTop-ca.offsetHeight-4+"px";R.style.display="";R.style.left=U.diagramContainer.offsetLeft-R.offsetWidth-4+"px";R.style.top=U.diagramContainer.offsetTop+"px";S.style.left=U.diagramContainer.offsetLeft+U.diagramContainer.offsetWidth-S.offsetWidth+"px";S.style.top=ca.style.top;
-S.style.right="";U.bottomResizer.style.left=U.diagramContainer.offsetLeft+(U.diagramContainer.offsetWidth-U.bottomResizer.offsetWidth)/2+"px";U.bottomResizer.style.top=U.diagramContainer.offsetTop+U.diagramContainer.offsetHeight-U.bottomResizer.offsetHeight/2-1+"px";U.rightResizer.style.left=U.diagramContainer.offsetLeft+U.diagramContainer.offsetWidth-U.rightResizer.offsetWidth/2-1+"px";U.rightResizer.style.top=U.diagramContainer.offsetTop+(U.diagramContainer.offsetHeight-U.bottomResizer.offsetHeight)/
-2+"px"}U.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";U.rightResizer.style.visibility=U.bottomResizer.style.visibility;da.style.display="none";ca.style.visibility="";S.style.visibility=""}),ra=mxUtils.bind(this,function(){M.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";fa()});ea=mxUtils.bind(this,
-function(){ra();b(U,!0);U.initFormatWindow();var wa=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(wa.x+wa.width+4,wa.y)});U.addListener("inlineFullscreenChanged",ra);U.addListener("editInlineStart",ea);"1"==urlParams.embedInline&&U.addListener("darkModeChanged",ea);U.addListener("editInlineStop",mxUtils.bind(this,function(wa){U.diagramContainer.style.width="10px";U.diagramContainer.style.height="10px";U.diagramContainer.style.border="";U.bottomResizer.style.visibility=
-"hidden";U.rightResizer.style.visibility="hidden";ca.style.visibility="hidden";S.style.visibility="hidden";R.style.display="none"}));if(null!=U.hoverIcons){var ua=U.hoverIcons.update;U.hoverIcons.update=function(){L.freehand.isDrawing()||ua.apply(this,arguments)}}if(null!=L.freehand){var sa=L.freehand.createStyle;L.freehand.createStyle=function(wa){return sa.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){R.className="geToolbarContainer";S.className="geToolbarContainer";ca.className=
-"geToolbarContainer";da.className="geToolbarContainer";U.picker=R;var Aa=!1;"1"!=urlParams.embed&&"atlassian"!=U.getServiceName()&&(mxEvent.addListener(da,"mouseenter",function(){U.statusContainer.style.display="inline-block"}),mxEvent.addListener(da,"mouseleave",function(){Aa||(U.statusContainer.style.display="none")}));var Ca=mxUtils.bind(this,function(wa){null!=U.notificationBtn&&(null!=wa?U.notificationBtn.setAttribute("title",wa):U.notificationBtn.removeAttribute("title"))});da.style.visibility=
-20>da.clientWidth?"hidden":"";U.editor.addListener("statusChanged",mxUtils.bind(this,function(){U.setStatusText(U.editor.getStatus());if("1"!=urlParams.embed&&"atlassian"!=U.getServiceName())if(U.statusContainer.style.display="inline-block",Aa=!0,1==U.statusContainer.children.length&&""==U.editor.getStatus())da.style.visibility="hidden";else{if(0==U.statusContainer.children.length||1==U.statusContainer.children.length&&"function"===typeof U.statusContainer.firstChild.getAttribute&&null==U.statusContainer.firstChild.getAttribute("class")){var wa=
-null!=U.statusContainer.firstChild&&"function"===typeof U.statusContainer.firstChild.getAttribute?U.statusContainer.firstChild.getAttribute("title"):U.editor.getStatus();Ca(wa);var ya=U.getCurrentFile();ya=null!=ya?ya.savingStatusKey:DrawioFile.prototype.savingStatusKey;wa==mxResources.get(ya)+"..."?(U.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(ya))+'..."src="'+Editor.tailSpin+'">',U.statusContainer.style.display="inline-block",Aa=!0):6<U.buttonContainer.clientWidth&&
-(U.statusContainer.style.display="none",Aa=!1)}else U.statusContainer.style.display="inline-block",Ca(null),Aa=!0;da.style.visibility=20>da.clientWidth&&!Aa?"hidden":""}}));pa=Q("diagram",null,Editor.menuImage);pa.style.boxShadow="none";pa.style.padding="6px";pa.style.margin="0px";ca.appendChild(pa);mxEvent.disableContextMenu(pa);mxEvent.addGestureListeners(pa,mxUtils.bind(this,function(wa){(mxEvent.isShiftDown(wa)||mxEvent.isAltDown(wa)||mxEvent.isMetaDown(wa)||mxEvent.isControlDown(wa)||mxEvent.isPopupTrigger(wa))&&
-this.appIconClicked(wa)}),null,null);U.statusContainer.style.position="";U.statusContainer.style.display="none";U.statusContainer.style.margin="0px";U.statusContainer.style.padding="6px 0px";U.statusContainer.style.maxWidth=Math.min(n-240,280)+"px";U.statusContainer.style.display="inline-block";U.statusContainer.style.textOverflow="ellipsis";U.buttonContainer.style.position="";U.buttonContainer.style.paddingRight="0px";U.buttonContainer.style.display="inline-block";var Ba=document.createElement("a");
-Ba.style.padding="0px";Ba.style.boxShadow="none";Ba.className="geMenuItem";Ba.style.display="inline-block";Ba.style.width="40px";Ba.style.height="12px";Ba.style.marginBottom="-2px";Ba.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";Ba.style.backgroundPosition="top center";Ba.style.backgroundRepeat="no-repeat";Ba.setAttribute("title","Minimize");var ta=!1,Pa=mxUtils.bind(this,function(){R.innerText="";if(!ta){var wa=function(Ja,Qa,Za){Ja=W("",Ja.funct,null,Qa,Ja,Za);Ja.style.width=
-"40px";Ja.style.opacity="0.7";return ya(Ja,null,"pointer")},ya=function(Ja,Qa,Za){null!=Qa&&Ja.setAttribute("title",Qa);Ja.style.cursor=null!=Za?Za:"default";Ja.style.margin="2px 0px";R.appendChild(Ja);mxUtils.br(R);return Ja};ya(U.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text"),!0,!1,null,!0,!0),mxResources.get("text")+" ("+Editor.ctrlKey+"+Shift+X)");ya(U.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,!1,null,!0),mxResources.get("note"));ya(U.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle"),!0,!1,null,!0),mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");ya(U.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse"),!0,!1,null,!0),mxResources.get("ellipse"));(function(){var Ja=new mxCell("",new mxGeometry(0,0,L.defaultEdgeLength,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");
-Ja.geometry.setTerminalPoint(new mxPoint(0,0),!0);Ja.geometry.setTerminalPoint(new mxPoint(Ja.geometry.width,0),!1);Ja.geometry.points=[];Ja.geometry.relative=!0;Ja.edge=!0;ya(U.sidebar.createEdgeTemplateFromCells([Ja],Ja.geometry.width,Ja.geometry.height,mxResources.get("line"),!0,null,!0,!1),mxResources.get("line"));Ja=Ja.clone();Ja.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";Ja.geometry.width=L.defaultEdgeLength+20;Ja.geometry.setTerminalPoint(new mxPoint(0,
-20),!0);Ja.geometry.setTerminalPoint(new mxPoint(Ja.geometry.width,20),!1);Ja=ya(U.sidebar.createEdgeTemplateFromCells([Ja],Ja.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"));Ja.style.borderBottom="1px solid "+(Editor.isDarkMode()?"#505050":"lightgray");Ja.style.paddingBottom="14px";Ja.style.marginBottom="14px"})();wa(U.actions.get("insertFreehand"),mxResources.get("freehand"),Editor.freehandImage);var Na=U.actions.get("toggleShapes");wa(Na,mxResources.get("shapes")+
-" ("+Na.shortcut+")",P);pa=Q("table",null,Editor.calendarImage);pa.style.boxShadow="none";pa.style.opacity="0.7";pa.style.padding="6px";pa.style.margin="0px";pa.style.width="37px";ya(pa,null,"pointer");pa=Q("insert",null,Editor.plusImage);pa.style.boxShadow="none";pa.style.opacity="0.7";pa.style.padding="6px";pa.style.margin="0px";pa.style.width="37px";ya(pa,null,"pointer")}"1"!=urlParams.embedInline&&R.appendChild(Ba)});mxEvent.addListener(Ba,"click",mxUtils.bind(this,function(){ta?(mxUtils.setPrefixedStyle(R.style,
-"transform","translate(0, -50%)"),R.style.padding="8px 6px 4px",R.style.top="50%",R.style.bottom="",R.style.height="",Ba.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",Ba.style.width="40px",Ba.style.height="12px",Ba.setAttribute("title","Minimize"),ta=!1,Pa()):(R.innerText="",R.appendChild(Ba),mxUtils.setPrefixedStyle(R.style,"transform","translate(0, 0)"),R.style.top="",R.style.bottom="12px",R.style.padding="0px",R.style.height="24px",Ba.style.height="24px",Ba.style.backgroundImage=
-"url("+Editor.plusImage+")",Ba.setAttribute("title",mxResources.get("insert")),Ba.style.width="24px",ta=!0)}));Pa();U.addListener("darkModeChanged",Pa);U.addListener("sketchModeChanged",Pa)}else U.editor.addListener("statusChanged",mxUtils.bind(this,function(){U.setStatusText(U.editor.getStatus())}));if(null!=H){var Ta=function(wa){mxEvent.isShiftDown(wa)?(U.hideCurrentMenu(),U.actions.get("smartFit").funct(),mxEvent.consume(wa)):mxEvent.isAltDown(wa)&&(U.hideCurrentMenu(),U.actions.get("customZoom").funct(),
-mxEvent.consume(wa))},Oa=U.actions.get("zoomIn"),Xa=U.actions.get("zoomOut"),Ga=U.actions.get("resetView");ea=U.actions.get("fullscreen");var eb=U.actions.get("undo"),bb=U.actions.get("redo"),z=W("",eb.funct,null,mxResources.get("undo")+" ("+eb.shortcut+")",eb,Editor.undoImage),K=W("",bb.funct,null,mxResources.get("redo")+" ("+bb.shortcut+")",bb,Editor.redoImage),M=W("",ea.funct,null,mxResources.get("fullscreen"),ea,Editor.fullscreenImage);if(null!=S){Ga=function(){va.style.display=null!=U.pages&&
-("0"!=urlParams.pages||1<U.pages.length||Editor.pagesVisible)?"inline-block":"none"};var T=function(){va.innerText="";if(null!=U.currentPage){mxUtils.write(va,U.currentPage.getName());var wa=null!=U.pages?U.pages.length:1,ya=U.getPageIndex(U.currentPage);ya=null!=ya?ya+1:1;var Na=U.currentPage.getId();va.setAttribute("title",U.currentPage.getName()+" ("+ya+"/"+wa+")"+(null!=Na?" ["+Na+"]":""))}};M.parentNode.removeChild(M);var V=U.actions.get("delete"),ia=W("",V.funct,null,mxResources.get("delete"),
-V,Editor.trashImage);ia.style.opacity="0.1";ca.appendChild(ia);V.addListener("stateChanged",function(){ia.style.opacity=V.enabled?"":"0.1"});var na=function(){z.style.display=0<U.editor.undoManager.history.length||L.isEditing()?"inline-block":"none";K.style.display=z.style.display;z.style.opacity=eb.enabled?"":"0.1";K.style.opacity=bb.enabled?"":"0.1"};ca.appendChild(z);ca.appendChild(K);eb.addListener("stateChanged",na);bb.addListener("stateChanged",na);na();var va=this.createPageMenuTab(!1,!0);
-va.style.display="none";va.style.position="";va.style.marginLeft="";va.style.top="";va.style.left="";va.style.height="100%";va.style.lineHeight="";va.style.borderStyle="none";va.style.padding="3px 0";va.style.margin="0px";va.style.background="";va.style.border="";va.style.boxShadow="none";va.style.verticalAlign="top";va.style.width="auto";va.style.maxWidth="160px";va.style.position="relative";va.style.padding="6px";va.style.textOverflow="ellipsis";va.style.opacity="0.8";S.appendChild(va);U.editor.addListener("pagesPatched",
-T);U.editor.addListener("pageSelected",T);U.editor.addListener("pageRenamed",T);U.editor.addListener("fileLoaded",T);T();U.addListener("fileDescriptorChanged",Ga);U.addListener("pagesVisibleChanged",Ga);U.editor.addListener("pagesPatched",Ga);Ga();Ga=W("",Xa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",Xa,Editor.zoomOutImage);S.appendChild(Ga);var pa=N.addMenu("100%",H.funct);pa.setAttribute("title",mxResources.get("zoom"));pa.innerHTML="100%";pa.style.display="inline-block";
-pa.style.color="inherit";pa.style.cursor="pointer";pa.style.textAlign="center";pa.style.whiteSpace="nowrap";pa.style.paddingRight="10px";pa.style.textDecoration="none";pa.style.verticalAlign="top";pa.style.padding="6px 0";pa.style.fontSize="14px";pa.style.width="40px";pa.style.opacity="0.4";S.appendChild(pa);H=W("",Oa.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",Oa,Editor.zoomInImage);S.appendChild(H);ea.visible&&(S.appendChild(M),mxEvent.addListener(document,"fullscreenchange",
-function(){M.style.backgroundImage="url("+(null!=document.fullscreenElement?Editor.fullscreenExitImage:Editor.fullscreenImage)+")"}));"1"==urlParams.embedInline&&(H=U.actions.get("exit"),S.appendChild(W("",H.funct,null,mxResources.get("exit"),H,Editor.closeImage)));U.tabContainer.style.visibility="hidden";da.style.cssText="position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px 0px 6px 6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
-ca.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";S.style.cssText="position:absolute;right:14px;bottom:14px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";u.appendChild(ca);u.appendChild(S);R.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";
-mxClient.IS_POINTER&&(R.style.touchAction="none");u.appendChild(R);window.setTimeout(function(){mxUtils.setPrefixedStyle(R.style,"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(u)}else{var za=W("",Ta,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",Ga,Editor.zoomFitImage);da.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";pa=N.addMenu("100%",
-H.funct);pa.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");pa.style.whiteSpace="nowrap";pa.style.paddingRight="10px";pa.style.textDecoration="none";pa.style.textDecoration="none";pa.style.overflow="hidden";pa.style.visibility="hidden";pa.style.textAlign="center";pa.style.cursor="pointer";pa.style.height=parseInt(U.tabContainerHeight)-1+"px";pa.style.lineHeight=parseInt(U.tabContainerHeight)+1+"px";pa.style.position="absolute";pa.style.display="block";pa.style.fontSize="12px";pa.style.width=
-"59px";pa.style.right="0px";pa.style.bottom="0px";pa.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";pa.style.backgroundPosition="right 6px center";pa.style.backgroundRepeat="no-repeat";u.appendChild(pa)}(function(wa){mxEvent.addListener(wa,"click",Ta);var ya=mxUtils.bind(this,function(){wa.innerText="";mxUtils.write(wa,Math.round(100*U.editor.graph.view.scale)+"%")});U.editor.graph.view.addListener(mxEvent.EVENT_SCALE,ya);U.editor.addListener("resetGraphView",ya);U.editor.addListener("pageSelected",
-ya)})(pa);var Da=U.setGraphEnabled;U.setGraphEnabled=function(){Da.apply(this,arguments);null!=this.tabContainer&&(pa.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==S?this.tabContainerHeight+"px":"0px")}}u.appendChild(da);u.appendChild(U.diagramContainer);ja.appendChild(u);U.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=n)&&"1"!=urlParams.embedInline&&b(this,!0);null==S&&u.appendChild(U.tabContainer);
-var Ma=null;la();mxEvent.addListener(window,"resize",function(){la();null!=U.sidebarWindow&&U.sidebarWindow.window.fit();null!=U.formatWindow&&U.formatWindow.window.fit();null!=U.actions.outlineWindow&&U.actions.outlineWindow.window.fit();null!=U.actions.layersWindow&&U.actions.layersWindow.window.fit();null!=U.menus.tagsWindow&&U.menus.tagsWindow.window.fit();null!=U.menus.findWindow&&U.menus.findWindow.window.fit();null!=U.menus.findReplaceWindow&&U.menus.findReplaceWindow.window.fit()});if("1"==
-urlParams.embedInline){document.body.style.cursor="text";R.style.transform="";mxEvent.addGestureListeners(U.diagramContainer.parentNode,function(wa){mxEvent.getSource(wa)==U.diagramContainer.parentNode&&(U.embedExitPoint=new mxPoint(mxEvent.getClientX(wa),mxEvent.getClientY(wa)),U.sendEmbeddedSvgExport())});ja=document.createElement("div");ja.style.position="absolute";ja.style.width="10px";ja.style.height="10px";ja.style.borderRadius="5px";ja.style.border="1px solid gray";ja.style.background="#ffffff";
-ja.style.cursor="row-resize";U.diagramContainer.parentNode.appendChild(ja);U.bottomResizer=ja;var La=null,Ua=null,Sa=null,Fa=null;mxEvent.addGestureListeners(ja,function(wa){Fa=parseInt(U.diagramContainer.style.height);Ua=mxEvent.getClientY(wa);L.popupMenuHandler.hideMenu();mxEvent.consume(wa)});ja=ja.cloneNode(!1);ja.style.cursor="col-resize";U.diagramContainer.parentNode.appendChild(ja);U.rightResizer=ja;mxEvent.addGestureListeners(ja,function(wa){Sa=parseInt(U.diagramContainer.style.width);La=
-mxEvent.getClientX(wa);L.popupMenuHandler.hideMenu();mxEvent.consume(wa)});mxEvent.addGestureListeners(document.body,null,function(wa){var ya=!1;null!=La&&(U.diagramContainer.style.width=Math.max(20,Sa+mxEvent.getClientX(wa)-La)+"px",ya=!0);null!=Ua&&(U.diagramContainer.style.height=Math.max(20,Fa+mxEvent.getClientY(wa)-Ua)+"px",ya=!0);ya&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:U.diagramContainer.getBoundingClientRect()}),
-"*"),fa(),U.refresh())},function(wa){null==La&&null==Ua||mxEvent.consume(wa);Ua=La=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";U.bottomResizer.style.visibility="hidden";U.rightResizer.style.visibility="hidden";ca.style.visibility="hidden";S.style.visibility="hidden";R.style.display="none"}"1"==urlParams.prefetchFonts&&U.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)}})();DrawioComment=function(b,e,k,n,D,t,E){this.file=b;this.id=e;this.content=k;this.modifiedDate=n;this.createdDate=D;this.isResolved=t;this.user=E;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,k,n,D){e()};DrawioComment.prototype.editComment=function(b,e,k){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DrawioUser=function(b,e,k,n,D){this.id=b;this.email=e;this.displayName=k;this.pictureUrl=n;this.locale=D};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\nbeta=beta\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\nrealtimeCollaboration=Real-Time Collaboration\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.\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\ngetNotionChromeExtension=Get the Notion Chrome Extension\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\nlabels=Labels\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\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\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\nsnapToGrid=Snap to Grid\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\nunmerge=Unmerge\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\ncreateODFile=Create OneDrive File\npickGDriveFile=Pick Google Drive File\ncreateGDriveFile=Create 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\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\nautoBkp=Automatic Backup\nconfAIgnoreCollectErr=Ignore collecting current pages errors\ndrafts=Drafts\ndraftSaveInt=Draft save interval [sec] (0 to disable)\npluginsDisabled=External plugins disabled.\nextExpNotConfigured=External image service is not configured\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="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="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><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="default"/></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;
+"-2px",this.buttonContainer.style.paddingTop="4px")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer&&"1"!=urlParams.embedInline){var Q=document.createElement("div");Q.style.display="inline-block";Q.style.position="relative";Q.style.marginTop="6px";Q.style.marginRight="4px";var X=document.createElement("a");X.className="geMenuItem gePrimaryBtn";X.style.marginLeft="8px";X.style.padding="6px";if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var ha="1"==urlParams.publishClose?
+mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(X,ha);X.setAttribute("title",ha);mxEvent.addListener(X,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));Q.appendChild(X)}}else mxUtils.write(X,mxResources.get("save")),X.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(X,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),Q.appendChild(X),"1"==urlParams.saveAndExit&&(X=document.createElement("a"),
+mxUtils.write(X,mxResources.get("saveAndExit")),X.setAttribute("title",mxResources.get("saveAndExit")),X.className="geMenuItem",X.style.marginLeft="6px",X.style.padding="6px",mxEvent.addListener(X,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),Q.appendChild(X));"1"!=urlParams.noExitBtn&&(X=document.createElement("a"),ha="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(X,ha),X.setAttribute("title",ha),X.className="geMenuItem",
+X.style.marginLeft="6px",X.style.padding="6px",mxEvent.addListener(X,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),Q.appendChild(X));this.buttonContainer.appendChild(Q);this.buttonContainer.style.top="6px";this.editor.fireEvent(new mxEventObject("statusChanged"))}};var F=Sidebar.prototype.getTooltipOffset;Sidebar.prototype.getTooltipOffset=function(Q,X){if(null==this.editorUi.sidebarWindow||mxUtils.isAncestorNode(this.editorUi.picker,Q)){var ha=mxUtils.getOffset(this.editorUi.picker);
+ha.x+=this.editorUi.picker.offsetWidth+4;ha.y+=Q.offsetTop-X.height/2+16;return ha}var U=F.apply(this,arguments);ha=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);U.x+=ha.x-16;U.y+=ha.y;return U};var C=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(Q,X,ha){var U=this.editorUi.editor.graph;Q.smartSeparators=!0;C.apply(this,arguments);"1"==urlParams.sketch?U.isEnabled()&&(Q.addSeparator(),1==U.getSelectionCount()&&this.addMenuItems(Q,["-","lockUnlock"],null,ha)):
+1==U.getSelectionCount()?(U.isCellFoldable(U.getSelectionCell())&&this.addMenuItems(Q,U.isCellCollapsed(X)?["expand"]:["collapse"],null,ha),this.addMenuItems(Q,["collapsible","-","lockUnlock","enterGroup"],null,ha),Q.addSeparator(),this.addSubmenu("layout",Q)):U.isSelectionEmpty()&&U.isEnabled()?(Q.addSeparator(),this.addMenuItems(Q,["editData"],null,ha),Q.addSeparator(),this.addSubmenu("layout",Q),this.addSubmenu("insert",Q),this.addMenuItems(Q,["-","exitGroup"],null,ha)):U.isEnabled()&&this.addMenuItems(Q,
+["-","lockUnlock"],null,ha)};var I=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(Q,X,ha){I.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(Q,["copyAsImage"],null,ha)};EditorUi.prototype.toggleFormatPanel=function(Q){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=Q?Q:!this.formatWindow.window.isVisible()):b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var G=EditorUi.prototype.destroy;
+EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.window.setVisible(!1),this.actions.outlineWindow.window.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.window.setVisible(!1),
+this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.window.setVisible(!1),this.menus.tagsWindow.window.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.window.setVisible(!1),this.menus.findWindow.window.destroy(),this.menus.findWindow=null);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.window.setVisible(!1),this.menus.findReplaceWindow.window.destroy(),this.menus.findReplaceWindow=
+null);G.apply(this,arguments)};var Z=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(Q){Z.apply(this,arguments);if(Q){var X=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=X&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=X||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),
+null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var ca=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(Q){Q=ca.apply(this,arguments);var X=this.editorUi,ha=X.editor.graph;if(ha.isEnabled()&&"1"==urlParams.sketch){var U=this.createOption(mxResources.get("sketch"),function(){return Editor.sketchMode},function(ma,T){X.setSketchMode(!Editor.sketchMode);null!=T&&mxEvent.isShiftDown(T)||ha.updateCellStyles({sketch:ma?
+"1":null},ha.getVerticesAndEdges())},{install:function(ma){this.listener=function(){ma(Editor.sketchMode)};X.addListener("sketchModeChanged",this.listener)},destroy:function(){X.removeListener(this.listener)}});Q.appendChild(U)}return Q};var aa=Menus.prototype.init;Menus.prototype.init=function(){aa.apply(this,arguments);var Q=this.editorUi,X=Q.editor.graph;Q.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";Q.actions.get("createShape").label=mxResources.get("shape")+"...";Q.actions.get("outline").label=
+mxResources.get("outline")+"...";Q.actions.get("layers").label=mxResources.get("layers")+"...";Q.actions.get("tags").label=mxResources.get("tags")+"...";Q.actions.get("comments").label=mxResources.get("comments")+"...";var ha=Q.actions.put("toggleDarkMode",new Action(mxResources.get("dark"),function(O){Q.setDarkMode(!Editor.darkMode)}));ha.setToggleAction(!0);ha.setSelectedCallback(function(){return Editor.isDarkMode()});ha=Q.actions.put("toggleSketchMode",new Action(mxResources.get("sketch"),function(O){Q.setSketchMode(!Editor.sketchMode)}));
+ha.setToggleAction(!0);ha.setSelectedCallback(function(){return Editor.sketchMode});ha=Q.actions.put("togglePagesVisible",new Action(mxResources.get("pages"),function(O){Q.setPagesVisible(!Editor.pagesVisible)}));ha.setToggleAction(!0);ha.setSelectedCallback(function(){return Editor.pagesVisible});Q.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){X.popupMenuHandler.hideMenu();Q.showImportCsvDialog()}));Q.actions.put("importText",new Action(mxResources.get("text")+"...",
+function(){var O=new ParseDialog(Q,"Insert from Text");Q.showDialog(O.container,620,420,!0,!1);O.init()}));Q.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var O=new ParseDialog(Q,"Insert from Text","formatSql");Q.showDialog(O.container,620,420,!0,!1);O.init()}));Q.actions.put("toggleShapes",new Action(mxResources.get("1"==urlParams.sketch?"moreShapes":"shapes")+"...",function(){k(Q)},null,null,Editor.ctrlKey+"+Shift+K"));Q.actions.put("toggleFormat",new Action(mxResources.get("format")+
+"...",function(){b(Q)})).shortcut=Q.actions.get("formatPanel").shortcut;EditorUi.enablePlantUml&&!Q.isOffline()&&Q.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var O=new ParseDialog(Q,mxResources.get("plantUml")+"...","plantUml");Q.showDialog(O.container,620,420,!0,!1);O.init()}));Q.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var O=new ParseDialog(Q,mxResources.get("mermaid")+"...","mermaid");Q.showDialog(O.container,620,420,!0,!1);
+O.init()}));var U=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,function(O,ba){var la=this.editorUi.editor.graph,u=la.getSelectionCell();U.call(this,O,u,null,ba);this.addMenuItems(O,["editTooltip"],ba);la.model.isVertex(u)&&this.addMenuItems(O,["editGeometry"],ba);this.addMenuItems(O,["-","edit"],ba)})));this.addPopupMenuCellEditItems=function(O,ba,la,u){O.addSeparator();this.addSubmenu("editCell",O,u,mxResources.get("edit"))};this.put("file",new Menu(mxUtils.bind(this,
+function(O,ba){var la=Q.getCurrentFile();Q.menus.addMenuItems(O,["new"],ba);Q.menus.addSubmenu("openFrom",O,ba);isLocalStorage&&this.addSubmenu("openRecent",O,ba);O.addSeparator(ba);null!=la&&la.constructor==DriveFile?Q.menus.addMenuItems(O,["save","rename","makeCopy","moveToFolder"],ba):(Q.menus.addMenuItems(O,["save","saveAs","-","rename"],ba),Q.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(O,["upload"],ba):Q.menus.addMenuItems(O,["makeCopy"],
+ba));O.addSeparator(ba);null!=la&&(la.isRevisionHistorySupported()&&Q.menus.addMenuItems(O,["revisionHistory"],ba),la.constructor==DriveFile&&Q.menus.addMenuItems(O,["openFolder"],ba),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||la.constructor==LocalFile&&null==la.fileHandle||Q.menus.addMenuItems(O,["synchronize"],ba));Q.menus.addMenuItems(O,["autosave"],ba);if(null!=la){O.addSeparator(ba);"1"==urlParams.sketch&&Q.commentsSupported()&&Q.menus.addMenuItems(O,["comments"],ba);if(null!=Q.fileNode&&
+"1"!=urlParams.embedInline){var u=null!=la.getTitle()?la.getTitle():Q.defaultFilename;(la.constructor==DriveFile&&null!=la.sync&&la.sync.isConnected()||!/(\.html)$/i.test(u)&&!/(\.svg)$/i.test(u))&&this.addMenuItems(O,["properties"],ba)}la.constructor==DriveFile&&Q.menus.addMenuItems(O,["share"],ba)}})));this.put("diagram",new Menu(mxUtils.bind(this,function(O,ba){var la=Q.getCurrentFile();Q.menus.addSubmenu("extras",O,ba,mxResources.get("preferences"));O.addSeparator(ba);if(mxClient.IS_CHROMEAPP||
+EditorUi.isElectronApp)Q.menus.addMenuItems(O,"new open - synchronize - save saveAs -".split(" "),ba);else if("1"==urlParams.embed||Q.mode==App.MODE_ATLAS){"1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&Q.menus.addMenuItems(O,["-","save"],ba);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||Q.mode==App.MODE_ATLAS)Q.menus.addMenuItems(O,["saveAndExit"],ba),null!=la&&la.isRevisionHistorySupported()&&Q.menus.addMenuItems(O,["revisionHistory"],ba);O.addSeparator(ba)}else Q.mode==
+App.MODE_ATLAS?Q.menus.addMenuItems(O,["save","synchronize","-"],ba):"1"!=urlParams.noFileMenu&&("1"!=urlParams.sketch?(Q.menus.addMenuItems(O,["new"],ba),Q.menus.addSubmenu("openFrom",O,ba),isLocalStorage&&this.addSubmenu("openRecent",O,ba),O.addSeparator(ba),null!=la&&(la.constructor==DriveFile&&Q.menus.addMenuItems(O,["share"],ba),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||la.constructor==LocalFile||Q.menus.addMenuItems(O,["synchronize"],ba)),O.addSeparator(ba),Q.menus.addSubmenu("save",O,
+ba)):Q.menus.addSubmenu("file",O,ba));Q.menus.addSubmenu("exportAs",O,ba);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?Q.menus.addMenuItems(O,["import"],ba):"1"!=urlParams.noFileMenu&&Q.menus.addSubmenu("importFrom",O,ba);"1"!=urlParams.embed&&"1"==urlParams.sketch&&"1"!=urlParams.noFileMenu||!Q.commentsSupported()||Q.menus.addMenuItems(O,["-","comments"],ba);Q.menus.addMenuItems(O,"- findReplace layers tags - pageSetup".split(" "),ba);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||
+Q.menus.addMenuItems(O,["print"],ba);"1"!=urlParams.sketch&&null!=la&&null!=Q.fileNode&&"1"!=urlParams.embedInline&&(la=null!=la.getTitle()?la.getTitle():Q.defaultFilename,/(\.html)$/i.test(la)||/(\.svg)$/i.test(la)||this.addMenuItems(O,["-","properties"]));O.addSeparator(ba);Q.menus.addSubmenu("help",O,ba);"1"==urlParams.embed||Q.mode==App.MODE_ATLAS?("1"!=urlParams.noExitBtn||Q.mode==App.MODE_ATLAS)&&Q.menus.addMenuItems(O,["-","exit"],ba):"1"!=urlParams.noFileMenu&&Q.menus.addMenuItems(O,["-",
+"close"])})));this.put("save",new Menu(mxUtils.bind(this,function(O,ba){var la=Q.getCurrentFile();null!=la&&la.constructor==DriveFile?Q.menus.addMenuItems(O,["save","makeCopy","-","rename","moveToFolder"],ba):(Q.menus.addMenuItems(O,["save","saveAs","-","rename"],ba),Q.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(O,["upload"],ba):Q.menus.addMenuItems(O,["makeCopy"],ba));Q.menus.addMenuItems(O,["-","autosave"],ba);null!=la&&la.isRevisionHistorySupported()&&
+Q.menus.addMenuItems(O,["-","revisionHistory"],ba)})));var ma=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(O,ba){ma.funct(O,ba);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||Q.menus.addMenuItems(O,["publishLink"],ba);Q.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(O.addSeparator(ba),Q.menus.addSubmenu("embed",O,ba))})));var T=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(O,ba){Q.menus.addInsertTableCellItem(O,ba)})));if("1"==urlParams.sketch){var M=
+this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(O,ba){M.funct(O,ba);this.addMenuItems(O,["-","pageScale","-","ruler"],ba)})))}this.put("extras",new Menu(mxUtils.bind(this,function(O,ba){null!=T&&Q.menus.addSubmenu("language",O,ba);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&Q.mode!=App.MODE_ATLAS&&Q.menus.addSubmenu("theme",O,ba);Q.menus.addSubmenu("units",O,ba);O.addSeparator(ba);"1"!=urlParams.sketch&&Q.menus.addMenuItems(O,"pageScale ruler scrollbars - tooltips copyConnect collapseExpand".split(" "),
+ba);"1"!=urlParams.embedInline&&"1"!=urlParams.sketch&&"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&Q.mode!=App.MODE_ATLAS&&Q.menus.addMenuItems(O,["-","showStartScreen","search","scratchpad"],ba);O.addSeparator(ba);"1"==urlParams.sketch?Q.menus.addMenuItems(O,"configuration - copyConnect collapseExpand tooltips -".split(" "),ba):(Q.mode!=App.MODE_ATLAS&&Q.menus.addMenuItem(O,"configuration",ba),!Q.isOfflineApp()&&isLocalStorage&&Q.mode!=App.MODE_ATLAS&&Q.menus.addMenuItem(O,"plugins",
+ba));EditorUi.isElectronApp&&Q.menus.addMenuItems(O,["-","spellCheck","autoBkp","drafts","-"],ba);var la=Q.getCurrentFile();null!=la&&la.isRealtimeEnabled()&&la.isRealtimeSupported()&&this.addMenuItems(O,["-","showRemoteCursors","shareCursor","-"],ba);O.addSeparator(ba);Q.mode!=App.MODE_ATLAS&&this.addMenuItems(O,["fullscreen"],ba);("1"!=urlParams.embedInline&&Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(O,["toggleDarkMode"],ba);O.addSeparator(ba)})));this.put("insertAdvanced",
+new Menu(mxUtils.bind(this,function(O,ba){Q.menus.addMenuItems(O,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),ba)})));mxUtils.bind(this,function(){var O=this.get("insert"),ba=O.funct;O.funct=function(la,u){"1"==urlParams.sketch?(Q.insertTemplateEnabled&&!Q.isOffline()&&Q.menus.addMenuItems(la,["insertTemplate"],u),Q.menus.addMenuItems(la,["insertImage","insertLink","-"],u),Q.menus.addSubmenu("insertAdvanced",la,u,mxResources.get("advanced")),Q.menus.addSubmenu("layout",
+la,u)):(ba.apply(this,arguments),Q.menus.addSubmenu("table",la,u))}})();var ia="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),N=function(O,ba,la,u){O.addItem(la,null,mxUtils.bind(this,function(){var H=new CreateGraphDialog(Q,la,u);Q.showDialog(H.container,620,420,!0,!1);H.init()}),ba)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(O,ba){for(var la=0;la<ia.length;la++)"-"==ia[la]?O.addSeparator(ba):N(O,ba,mxResources.get(ia[la])+"...",
+ia[la])})))};EditorUi.prototype.installFormatToolbar=function(Q){var X=this.editor.graph,ha=document.createElement("div");ha.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%;";X.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(U,ma){0<X.getSelectionCount()?(Q.appendChild(ha),ha.innerHTML="Selected: "+X.getSelectionCount()):null!=
+ha.parentNode&&ha.parentNode.removeChild(ha)}))};var Y=!1;EditorUi.prototype.initFormatWindow=function(){if(!Y&&null!=this.formatWindow){Y=!0;this.formatWindow.window.setClosable(!1);var Q=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){Q.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(X){mxEvent.getSource(X)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var pa=EditorUi.prototype.init;EditorUi.prototype.init=function(){function Q(xa,Ba,Pa){var Ka=T.menus.get(xa),Na=O.addMenu(mxResources.get(xa),mxUtils.bind(this,function(){Ka.funct.apply(this,arguments)}),N);Na.className="1"==
+urlParams.sketch?"geToolbarButton":"geMenuItem";Na.style.display="inline-block";Na.style.boxSizing="border-box";Na.style.top="6px";Na.style.marginRight="6px";Na.style.height="30px";Na.style.paddingTop="6px";Na.style.paddingBottom="6px";Na.style.cursor="pointer";Na.setAttribute("title",mxResources.get(xa));T.menus.menuCreated(Ka,Na,"geMenuItem");null!=Pa?(Na.style.backgroundImage="url("+Pa+")",Na.style.backgroundPosition="center center",Na.style.backgroundRepeat="no-repeat",Na.style.backgroundSize=
+"24px 24px",Na.style.width="34px",Na.innerText=""):Ba||(Na.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",Na.style.backgroundPosition="right 6px center",Na.style.backgroundRepeat="no-repeat",Na.style.paddingRight="22px");return Na}function X(xa,Ba,Pa,Ka,Na,hb){var Qa=document.createElement("a");Qa.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";Qa.style.display="inline-block";Qa.style.boxSizing="border-box";Qa.style.height="30px";Qa.style.padding="6px";Qa.style.position=
+"relative";Qa.style.verticalAlign="top";Qa.style.top="0px";"1"==urlParams.sketch&&(Qa.style.borderStyle="none",Qa.style.boxShadow="none",Qa.style.padding="6px",Qa.style.margin="0px");null!=T.statusContainer?ia.insertBefore(Qa,T.statusContainer):ia.appendChild(Qa);null!=hb?(Qa.style.backgroundImage="url("+hb+")",Qa.style.backgroundPosition="center center",Qa.style.backgroundRepeat="no-repeat",Qa.style.backgroundSize="24px 24px",Qa.style.width="34px"):mxUtils.write(Qa,xa);mxEvent.addListener(Qa,mxClient.IS_POINTER?
+"pointerdown":"mousedown",mxUtils.bind(this,function(mb){mb.preventDefault()}));mxEvent.addListener(Qa,"click",function(mb){"disabled"!=Qa.getAttribute("disabled")&&Ba(mb);mxEvent.consume(mb)});null==Pa&&(Qa.style.marginRight="4px");null!=Ka&&Qa.setAttribute("title",Ka);null!=Na&&(xa=function(){Na.isEnabled()?(Qa.removeAttribute("disabled"),Qa.style.cursor="pointer"):(Qa.setAttribute("disabled","disabled"),Qa.style.cursor="default")},Na.addListener("stateChanged",xa),M.addListener("enabledChanged",
+xa),xa());return Qa}function ha(xa,Ba,Pa){Pa=document.createElement("div");Pa.className="geMenuItem";Pa.style.display="inline-block";Pa.style.verticalAlign="top";Pa.style.marginRight="6px";Pa.style.padding="0 4px 0 4px";Pa.style.height="30px";Pa.style.position="relative";Pa.style.top="0px";"1"==urlParams.sketch&&(Pa.style.boxShadow="none");for(var Ka=0;Ka<xa.length;Ka++)null!=xa[Ka]&&("1"==urlParams.sketch&&(xa[Ka].style.padding="10px 8px",xa[Ka].style.width="30px"),xa[Ka].style.margin="0px",xa[Ka].style.boxShadow=
+"none",Pa.appendChild(xa[Ka]));null!=Ba&&mxUtils.setOpacity(Pa,Ba);null!=T.statusContainer&&"1"!=urlParams.sketch?ia.insertBefore(Pa,T.statusContainer):ia.appendChild(Pa);return Pa}function U(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(fa.style.left=58>da.offsetTop-da.offsetHeight/2?"70px":"10px");else{for(var xa=ia.firstChild;null!=xa;){var Ba=xa.nextSibling;"geMenuItem"!=xa.className&&"geItem"!=xa.className||xa.parentNode.removeChild(xa);xa=Ba}N=ia.firstChild;n=window.innerWidth||document.documentElement.clientWidth||
+document.body.clientWidth;xa=1E3>n||"1"==urlParams.sketch;var Pa=null;xa||(Pa=Q("diagram"));Ba=xa?Q("diagram",null,Editor.drawLogoImage):null;null!=Ba&&(Pa=Ba);ha([Pa,X(mxResources.get("shapes"),T.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),T.actions.get("image"),xa?Editor.shapesImage:null),X(mxResources.get("format"),T.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+T.actions.get("formatPanel").shortcut+")",T.actions.get("image"),xa?Editor.formatImage:null)],
+xa?60:null);Ba=Q("insert",!0,xa?W:null);ha([Ba,X(mxResources.get("delete"),T.actions.get("delete").funct,null,mxResources.get("delete"),T.actions.get("delete"),xa?Editor.trashImage:null)],xa?60:null);411<=n&&(ha([K,L],60),520<=n&&ha([Da,640<=n?X("",Za.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",Za,Editor.zoomInImage):null,640<=n?X("",Ha.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",Ha,Editor.zoomOutImage):null],60))}null!=Pa&&(mxEvent.disableContextMenu(Pa),mxEvent.addGestureListeners(Pa,
+mxUtils.bind(this,function(Ka){(mxEvent.isShiftDown(Ka)||mxEvent.isAltDown(Ka)||mxEvent.isMetaDown(Ka)||mxEvent.isControlDown(Ka)||mxEvent.isPopupTrigger(Ka))&&T.appIconClicked(Ka)}),null,null));Ba=T.menus.get("language");null!=Ba&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=n&&"1"!=urlParams.sketch?(null==Ma&&(Ba=O.addMenu("",Ba.funct),Ba.setAttribute("title",mxResources.get("language")),Ba.className="geToolbarButton",Ba.style.backgroundImage="url("+Editor.globeImage+")",Ba.style.backgroundPosition=
+"center center",Ba.style.backgroundRepeat="no-repeat",Ba.style.backgroundSize="24px 24px",Ba.style.position="absolute",Ba.style.height="24px",Ba.style.width="24px",Ba.style.zIndex="1",Ba.style.right="8px",Ba.style.cursor="pointer",Ba.style.top="1"==urlParams.embed?"12px":"11px",ia.appendChild(Ba),Ma=Ba),T.buttonContainer.style.paddingRight="34px"):(T.buttonContainer.style.paddingRight="4px",null!=Ma&&(Ma.parentNode.removeChild(Ma),Ma=null))}pa.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 ma=document.createElement("div");ma.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";ma.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(ma);"1"==urlParams.sketch&&null!=this.sidebar&&
+this.isSettingsEnabled()&&(this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save()),this.sidebar.showPalette("search",mxSettings.settings.search));if("1"!=urlParams.sketch&&1E3<=n||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])k(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),
+this.sidebar.showEntries("search"));var T=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==T.embedViewport)mxUtils.fit(this.div);else{var xa=parseInt(this.div.offsetLeft),Ba=parseInt(this.div.offsetWidth),Pa=T.embedViewport.x+T.embedViewport.width,Ka=parseInt(this.div.offsetTop),Na=parseInt(this.div.offsetHeight),hb=T.embedViewport.y+T.embedViewport.height;this.div.style.left=Math.max(T.embedViewport.x,Math.min(xa,Pa-Ba))+"px";this.div.style.top=Math.max(T.embedViewport.y,
+Math.min(Ka,hb-Na))+"px";this.div.style.height=Math.min(T.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(T.embedViewport.width,parseInt(this.div.style.width))+"px"}};this.keyHandler.bindAction(75,!0,"toggleShapes",!0);EditorUi.windowed&&("1"==urlParams.sketch||1E3<=n)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?(this.initFormatWindow(),ma=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&
+(1200>n||708>ma)?this.formatWindow.window.toggleMinimized():this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));T=this;var M=T.editor.graph;T.toolbar=this.createToolbar(T.createDiv("geToolbar"));T.defaultLibraryName=mxResources.get("untitledLibrary");var ia=document.createElement("div");ia.className="geMenubarContainer";var N=null,O=new Menubar(T,ia);T.statusContainer=T.createStatusContainer();T.statusContainer.style.position="relative";T.statusContainer.style.maxWidth=
+"";T.statusContainer.style.marginTop="7px";T.statusContainer.style.marginLeft="6px";T.statusContainer.style.color="gray";T.statusContainer.style.cursor="default";var ba=T.hideCurrentMenu;T.hideCurrentMenu=function(){ba.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var la=T.descriptorChanged;T.descriptorChanged=function(){la.apply(this,arguments);var xa=T.getCurrentFile();if(null!=xa&&null!=xa.getTitle()){var Ba=xa.getMode();"google"==Ba?Ba="googleDrive":"github"==Ba?Ba="gitHub":
+"gitlab"==Ba?Ba="gitLab":"onedrive"==Ba&&(Ba="oneDrive");Ba=mxResources.get(Ba);ia.setAttribute("title",xa.getTitle()+(null!=Ba?" ("+Ba+")":""))}else ia.removeAttribute("title")};T.setStatusText(T.editor.getStatus());ia.appendChild(T.statusContainer);T.buttonContainer=document.createElement("div");T.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";ia.appendChild(T.buttonContainer);T.menubarContainer=
+T.buttonContainer;T.tabContainer=document.createElement("div");T.tabContainer.className="geTabContainer";T.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";ma=T.diagramContainer.parentNode;var u=document.createElement("div");u.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";T.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";if("1"==urlParams.winCtrls&&
+"1"==urlParams.sketch){u.style.top="20px";T.titlebar=document.createElement("div");T.titlebar.style.cssText="position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var H=document.createElement("div");H.style.cssText="max-width: calc(100% - 100px);text-overflow: ellipsis;user-select:none;height:20px;margin: 2px 10px;font-size: 12px;white-space: nowrap;overflow: hidden;";T.titlebar.appendChild(H);ma.appendChild(T.titlebar)}H=T.menus.get("viewZoom");
+var P=H.funct;H.funct=function(xa,Ba){P.apply(this,arguments);T.menus.addMenuItems(xa,["-","outline"],Ba)};var W="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,R="1"==urlParams.sketch?document.createElement("div"):null,da="1"==urlParams.sketch?document.createElement("div"):null,fa="1"==urlParams.sketch?document.createElement("div"):null,ea=mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.refresh();M.refresh();M.view.validateBackground()});T.addListener("darkModeChanged",ea);
+T.addListener("sketchModeChanged",ea);var qa=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)fa.style.left="10px",fa.style.top="10px",da.style.left="10px",da.style.top="60px",R.style.top="10px",R.style.right="12px",R.style.left="",T.diagramContainer.setAttribute("data-bounds",T.diagramContainer.style.top+" "+T.diagramContainer.style.left+" "+T.diagramContainer.style.width+" "+T.diagramContainer.style.height),T.diagramContainer.style.top="0px",T.diagramContainer.style.left="0px",T.diagramContainer.style.bottom=
+"0px",T.diagramContainer.style.right="0px",T.diagramContainer.style.width="",T.diagramContainer.style.height="";else{var xa=T.diagramContainer.getAttribute("data-bounds");if(null!=xa){T.diagramContainer.style.background="transparent";T.diagramContainer.removeAttribute("data-bounds");var Ba=M.getGraphBounds();xa=xa.split(" ");T.diagramContainer.style.top=xa[0];T.diagramContainer.style.left=xa[1];T.diagramContainer.style.width=Ba.width+50+"px";T.diagramContainer.style.height=Ba.height+46+"px";T.diagramContainer.style.bottom=
+"";T.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:T.diagramContainer.getBoundingClientRect()}),"*");T.refresh()}fa.style.left=T.diagramContainer.offsetLeft+"px";fa.style.top=T.diagramContainer.offsetTop-fa.offsetHeight-4+"px";da.style.display="";da.style.left=T.diagramContainer.offsetLeft-da.offsetWidth-4+"px";da.style.top=T.diagramContainer.offsetTop+"px";R.style.left=T.diagramContainer.offsetLeft+T.diagramContainer.offsetWidth-R.offsetWidth+
+"px";R.style.top=fa.style.top;R.style.right="";T.bottomResizer.style.left=T.diagramContainer.offsetLeft+(T.diagramContainer.offsetWidth-T.bottomResizer.offsetWidth)/2+"px";T.bottomResizer.style.top=T.diagramContainer.offsetTop+T.diagramContainer.offsetHeight-T.bottomResizer.offsetHeight/2-1+"px";T.rightResizer.style.left=T.diagramContainer.offsetLeft+T.diagramContainer.offsetWidth-T.rightResizer.offsetWidth/2-1+"px";T.rightResizer.style.top=T.diagramContainer.offsetTop+(T.diagramContainer.offsetHeight-
+T.bottomResizer.offsetHeight)/2+"px"}T.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";T.rightResizer.style.visibility=T.bottomResizer.style.visibility;ia.style.display="none";fa.style.visibility="";R.style.visibility=""}),va=mxUtils.bind(this,function(){S.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";
+qa()});ea=mxUtils.bind(this,function(){va();b(T,!0);T.initFormatWindow();var xa=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(xa.x+xa.width+4,xa.y)});T.addListener("inlineFullscreenChanged",va);T.addListener("editInlineStart",ea);"1"==urlParams.embedInline&&T.addListener("darkModeChanged",ea);T.addListener("editInlineStop",mxUtils.bind(this,function(xa){T.diagramContainer.style.width="10px";T.diagramContainer.style.height="10px";T.diagramContainer.style.border=
+"";T.bottomResizer.style.visibility="hidden";T.rightResizer.style.visibility="hidden";fa.style.visibility="hidden";R.style.visibility="hidden";da.style.display="none"}));if(null!=T.hoverIcons){var ua=T.hoverIcons.update;T.hoverIcons.update=function(){M.freehand.isDrawing()||ua.apply(this,arguments)}}if(null!=M.freehand){var Aa=M.freehand.createStyle;M.freehand.createStyle=function(xa){return Aa.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){da.className="geToolbarContainer";R.className=
+"geToolbarContainer";fa.className="geToolbarContainer";ia.className="geToolbarContainer";T.picker=da;var za=!1;"1"!=urlParams.embed&&"atlassian"!=T.getServiceName()&&(mxEvent.addListener(ia,"mouseenter",function(){T.statusContainer.style.display="inline-block"}),mxEvent.addListener(ia,"mouseleave",function(){za||(T.statusContainer.style.display="none")}));var Ca=mxUtils.bind(this,function(xa){null!=T.notificationBtn&&(null!=xa?T.notificationBtn.setAttribute("title",xa):T.notificationBtn.removeAttribute("title"))});
+ia.style.visibility=20>ia.clientWidth?"hidden":"";T.editor.addListener("statusChanged",mxUtils.bind(this,function(){T.setStatusText(T.editor.getStatus());if("1"!=urlParams.embed&&"atlassian"!=T.getServiceName())if(T.statusContainer.style.display="inline-block",za=!0,1==T.statusContainer.children.length&&""==T.editor.getStatus())ia.style.visibility="hidden";else{if(0==T.statusContainer.children.length||1==T.statusContainer.children.length&&"function"===typeof T.statusContainer.firstChild.getAttribute&&
+null==T.statusContainer.firstChild.getAttribute("class")){var xa=null!=T.statusContainer.firstChild&&"function"===typeof T.statusContainer.firstChild.getAttribute?T.statusContainer.firstChild.getAttribute("title"):T.editor.getStatus();Ca(xa);var Ba=T.getCurrentFile();Ba=null!=Ba?Ba.savingStatusKey:DrawioFile.prototype.savingStatusKey;xa==mxResources.get(Ba)+"..."?(T.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(Ba))+'..."src="'+Editor.tailSpin+'">',T.statusContainer.style.display=
+"inline-block",za=!0):6<T.buttonContainer.clientWidth&&(T.statusContainer.style.display="none",za=!1)}else T.statusContainer.style.display="inline-block",Ca(null),za=!0;ia.style.visibility=20>ia.clientWidth&&!za?"hidden":""}}));ta=Q("diagram",null,Editor.menuImage);ta.style.boxShadow="none";ta.style.padding="6px";ta.style.margin="0px";fa.appendChild(ta);mxEvent.disableContextMenu(ta);mxEvent.addGestureListeners(ta,mxUtils.bind(this,function(xa){(mxEvent.isShiftDown(xa)||mxEvent.isAltDown(xa)||mxEvent.isMetaDown(xa)||
+mxEvent.isControlDown(xa)||mxEvent.isPopupTrigger(xa))&&this.appIconClicked(xa)}),null,null);T.statusContainer.style.position="";T.statusContainer.style.display="none";T.statusContainer.style.margin="0px";T.statusContainer.style.padding="6px 0px";T.statusContainer.style.maxWidth=Math.min(n-240,280)+"px";T.statusContainer.style.display="inline-block";T.statusContainer.style.textOverflow="ellipsis";T.buttonContainer.style.position="";T.buttonContainer.style.paddingRight="0px";T.buttonContainer.style.display=
+"inline-block";var sa=document.createElement("a");sa.style.padding="0px";sa.style.boxShadow="none";sa.className="geMenuItem";sa.style.display="inline-block";sa.style.width="40px";sa.style.height="12px";sa.style.marginBottom="-2px";sa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";sa.style.backgroundPosition="top center";sa.style.backgroundRepeat="no-repeat";sa.setAttribute("title","Minimize");var Va=!1,Ua=mxUtils.bind(this,function(){da.innerText="";if(!Va){var xa=function(Ka,
+Na,hb){Ka=X("",Ka.funct,null,Na,Ka,hb);Ka.style.width="40px";Ka.style.opacity="0.7";return Ba(Ka,null,"pointer")},Ba=function(Ka,Na,hb){null!=Na&&Ka.setAttribute("title",Na);Ka.style.cursor=null!=hb?hb:"default";Ka.style.margin="2px 0px";da.appendChild(Ka);mxUtils.br(da);return Ka};Ba(T.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text"),!0,!1,null,!0,!0),mxResources.get("text")+
+" ("+Editor.ctrlKey+"+Shift+X)");Ba(T.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,!1,null,!0),mxResources.get("note"));Ba(T.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle"),!0,!1,null,!0),
+mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");Ba(T.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse"),!0,!1,null,!0),mxResources.get("ellipse"));(function(){var Ka=new mxCell("",new mxGeometry(0,0,M.defaultEdgeLength,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");Ka.geometry.setTerminalPoint(new mxPoint(0,0),!0);Ka.geometry.setTerminalPoint(new mxPoint(Ka.geometry.width,0),!1);Ka.geometry.points=[];Ka.geometry.relative=!0;Ka.edge=
+!0;Ba(T.sidebar.createEdgeTemplateFromCells([Ka],Ka.geometry.width,Ka.geometry.height,mxResources.get("line"),!0,null,!0,!1),mxResources.get("line"));Ka=Ka.clone();Ka.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";Ka.geometry.width=M.defaultEdgeLength+20;Ka.geometry.setTerminalPoint(new mxPoint(0,20),!0);Ka.geometry.setTerminalPoint(new mxPoint(Ka.geometry.width,20),!1);Ka=Ba(T.sidebar.createEdgeTemplateFromCells([Ka],Ka.geometry.width,
+40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"));Ka.style.borderBottom="1px solid "+(Editor.isDarkMode()?"#505050":"lightgray");Ka.style.paddingBottom="14px";Ka.style.marginBottom="14px"})();xa(T.actions.get("insertFreehand"),mxResources.get("freehand"),Editor.freehandImage);var Pa=T.actions.get("toggleShapes");xa(Pa,mxResources.get("shapes")+" ("+Pa.shortcut+")",W);ta=Q("table",null,Editor.calendarImage);ta.style.boxShadow="none";ta.style.opacity="0.7";ta.style.padding="6px";
+ta.style.margin="0px";ta.style.width="37px";Ba(ta,null,"pointer");ta=Q("insert",null,Editor.plusImage);ta.style.boxShadow="none";ta.style.opacity="0.7";ta.style.padding="6px";ta.style.margin="0px";ta.style.width="37px";Ba(ta,null,"pointer")}"1"!=urlParams.embedInline&&da.appendChild(sa)});mxEvent.addListener(sa,"click",mxUtils.bind(this,function(){Va?(mxUtils.setPrefixedStyle(da.style,"transform","translate(0, -50%)"),da.style.padding="8px 6px 4px",da.style.top="50%",da.style.bottom="",da.style.height=
+"",sa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",sa.style.width="40px",sa.style.height="12px",sa.setAttribute("title","Minimize"),Va=!1,Ua()):(da.innerText="",da.appendChild(sa),mxUtils.setPrefixedStyle(da.style,"transform","translate(0, 0)"),da.style.top="",da.style.bottom="12px",da.style.padding="0px",da.style.height="24px",sa.style.height="24px",sa.style.backgroundImage="url("+Editor.plusImage+")",sa.setAttribute("title",mxResources.get("insert")),sa.style.width="24px",
+Va=!0)}));Ua();T.addListener("darkModeChanged",Ua);T.addListener("sketchModeChanged",Ua)}else T.editor.addListener("statusChanged",mxUtils.bind(this,function(){T.setStatusText(T.editor.getStatus())}));if(null!=H){var Ra=function(xa){mxEvent.isShiftDown(xa)?(T.hideCurrentMenu(),T.actions.get("smartFit").funct(),mxEvent.consume(xa)):mxEvent.isAltDown(xa)&&(T.hideCurrentMenu(),T.actions.get("customZoom").funct(),mxEvent.consume(xa))},Za=T.actions.get("zoomIn"),Ha=T.actions.get("zoomOut"),db=T.actions.get("resetView");
+ea=T.actions.get("fullscreen");var cb=T.actions.get("undo"),z=T.actions.get("redo"),K=X("",cb.funct,null,mxResources.get("undo")+" ("+cb.shortcut+")",cb,Editor.undoImage),L=X("",z.funct,null,mxResources.get("redo")+" ("+z.shortcut+")",z,Editor.redoImage),S=X("",ea.funct,null,mxResources.get("fullscreen"),ea,Editor.fullscreenImage);if(null!=R){db=function(){ra.style.display=null!=T.pages&&("0"!=urlParams.pages||1<T.pages.length||Editor.pagesVisible)?"inline-block":"none"};var V=function(){ra.innerText=
+"";if(null!=T.currentPage){mxUtils.write(ra,T.currentPage.getName());var xa=null!=T.pages?T.pages.length:1,Ba=T.getPageIndex(T.currentPage);Ba=null!=Ba?Ba+1:1;var Pa=T.currentPage.getId();ra.setAttribute("title",T.currentPage.getName()+" ("+Ba+"/"+xa+")"+(null!=Pa?" ["+Pa+"]":""))}};S.parentNode.removeChild(S);var ja=T.actions.get("delete"),na=X("",ja.funct,null,mxResources.get("delete"),ja,Editor.trashImage);na.style.opacity="0.1";fa.appendChild(na);ja.addListener("stateChanged",function(){na.style.opacity=
+ja.enabled?"":"0.1"});var ya=function(){K.style.display=0<T.editor.undoManager.history.length||M.isEditing()?"inline-block":"none";L.style.display=K.style.display;K.style.opacity=cb.enabled?"":"0.1";L.style.opacity=z.enabled?"":"0.1"};fa.appendChild(K);fa.appendChild(L);cb.addListener("stateChanged",ya);z.addListener("stateChanged",ya);ya();var ra=this.createPageMenuTab(!1,!0);ra.style.display="none";ra.style.position="";ra.style.marginLeft="";ra.style.top="";ra.style.left="";ra.style.height="100%";
+ra.style.lineHeight="";ra.style.borderStyle="none";ra.style.padding="3px 0";ra.style.margin="0px";ra.style.background="";ra.style.border="";ra.style.boxShadow="none";ra.style.verticalAlign="top";ra.style.width="auto";ra.style.maxWidth="160px";ra.style.position="relative";ra.style.padding="6px";ra.style.textOverflow="ellipsis";ra.style.opacity="0.8";R.appendChild(ra);T.editor.addListener("pagesPatched",V);T.editor.addListener("pageSelected",V);T.editor.addListener("pageRenamed",V);T.editor.addListener("fileLoaded",
+V);V();T.addListener("fileDescriptorChanged",db);T.addListener("pagesVisibleChanged",db);T.editor.addListener("pagesPatched",db);db();db=X("",Ha.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",Ha,Editor.zoomOutImage);R.appendChild(db);var ta=O.addMenu("100%",H.funct);ta.setAttribute("title",mxResources.get("zoom"));ta.innerHTML="100%";ta.style.display="inline-block";ta.style.color="inherit";ta.style.cursor="pointer";ta.style.textAlign="center";ta.style.whiteSpace="nowrap";
+ta.style.paddingRight="10px";ta.style.textDecoration="none";ta.style.verticalAlign="top";ta.style.padding="6px 0";ta.style.fontSize="14px";ta.style.width="40px";ta.style.opacity="0.4";R.appendChild(ta);H=X("",Za.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",Za,Editor.zoomInImage);R.appendChild(H);ea.visible&&(R.appendChild(S),mxEvent.addListener(document,"fullscreenchange",function(){S.style.backgroundImage="url("+(null!=document.fullscreenElement?Editor.fullscreenExitImage:
+Editor.fullscreenImage)+")"}));"1"==urlParams.embedInline&&(H=T.actions.get("exit"),R.appendChild(X("",H.funct,null,mxResources.get("exit"),H,Editor.closeImage)));T.tabContainer.style.visibility="hidden";ia.style.cssText="position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px 0px 6px 6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";fa.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
+R.style.cssText="position:absolute;right:14px;bottom:14px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";u.appendChild(fa);u.appendChild(R);da.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";mxClient.IS_POINTER&&(da.style.touchAction="none");u.appendChild(da);window.setTimeout(function(){mxUtils.setPrefixedStyle(da.style,
+"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(u)}else{var Da=X("",Ra,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",db,Editor.zoomFitImage);ia.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";ta=O.addMenu("100%",H.funct);ta.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");ta.style.whiteSpace="nowrap";ta.style.paddingRight=
+"10px";ta.style.textDecoration="none";ta.style.textDecoration="none";ta.style.overflow="hidden";ta.style.visibility="hidden";ta.style.textAlign="center";ta.style.cursor="pointer";ta.style.height=parseInt(T.tabContainerHeight)-1+"px";ta.style.lineHeight=parseInt(T.tabContainerHeight)+1+"px";ta.style.position="absolute";ta.style.display="block";ta.style.fontSize="12px";ta.style.width="59px";ta.style.right="0px";ta.style.bottom="0px";ta.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";
+ta.style.backgroundPosition="right 6px center";ta.style.backgroundRepeat="no-repeat";u.appendChild(ta)}(function(xa){mxEvent.addListener(xa,"click",Ra);var Ba=mxUtils.bind(this,function(){xa.innerText="";mxUtils.write(xa,Math.round(100*T.editor.graph.view.scale)+"%")});T.editor.graph.view.addListener(mxEvent.EVENT_SCALE,Ba);T.editor.addListener("resetGraphView",Ba);T.editor.addListener("pageSelected",Ba)})(ta);var Oa=T.setGraphEnabled;T.setGraphEnabled=function(){Oa.apply(this,arguments);null!=this.tabContainer&&
+(ta.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==R?this.tabContainerHeight+"px":"0px")}}u.appendChild(ia);u.appendChild(T.diagramContainer);ma.appendChild(u);T.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=n)&&"1"!=urlParams.embedInline&&b(this,!0);null==R&&u.appendChild(T.tabContainer);var Ma=null;U();mxEvent.addListener(window,"resize",function(){U();null!=T.sidebarWindow&&T.sidebarWindow.window.fit();
+null!=T.formatWindow&&T.formatWindow.window.fit();null!=T.actions.outlineWindow&&T.actions.outlineWindow.window.fit();null!=T.actions.layersWindow&&T.actions.layersWindow.window.fit();null!=T.menus.tagsWindow&&T.menus.tagsWindow.window.fit();null!=T.menus.findWindow&&T.menus.findWindow.window.fit();null!=T.menus.findReplaceWindow&&T.menus.findReplaceWindow.window.fit()});if("1"==urlParams.embedInline){document.body.style.cursor="text";da.style.transform="";mxEvent.addGestureListeners(T.diagramContainer.parentNode,
+function(xa){mxEvent.getSource(xa)==T.diagramContainer.parentNode&&(T.embedExitPoint=new mxPoint(mxEvent.getClientX(xa),mxEvent.getClientY(xa)),T.sendEmbeddedSvgExport())});ma=document.createElement("div");ma.style.position="absolute";ma.style.width="10px";ma.style.height="10px";ma.style.borderRadius="5px";ma.style.border="1px solid gray";ma.style.background="#ffffff";ma.style.cursor="row-resize";T.diagramContainer.parentNode.appendChild(ma);T.bottomResizer=ma;var Wa=null,Sa=null,Fa=null,Ja=null;
+mxEvent.addGestureListeners(ma,function(xa){Ja=parseInt(T.diagramContainer.style.height);Sa=mxEvent.getClientY(xa);M.popupMenuHandler.hideMenu();mxEvent.consume(xa)});ma=ma.cloneNode(!1);ma.style.cursor="col-resize";T.diagramContainer.parentNode.appendChild(ma);T.rightResizer=ma;mxEvent.addGestureListeners(ma,function(xa){Fa=parseInt(T.diagramContainer.style.width);Wa=mxEvent.getClientX(xa);M.popupMenuHandler.hideMenu();mxEvent.consume(xa)});mxEvent.addGestureListeners(document.body,null,function(xa){var Ba=
+!1;null!=Wa&&(T.diagramContainer.style.width=Math.max(20,Fa+mxEvent.getClientX(xa)-Wa)+"px",Ba=!0);null!=Sa&&(T.diagramContainer.style.height=Math.max(20,Ja+mxEvent.getClientY(xa)-Sa)+"px",Ba=!0);Ba&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:T.diagramContainer.getBoundingClientRect()}),"*"),qa(),T.refresh())},function(xa){null==Wa&&null==Sa||mxEvent.consume(xa);Sa=Wa=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor=
+"transparent";T.bottomResizer.style.visibility="hidden";T.rightResizer.style.visibility="hidden";fa.style.visibility="hidden";R.style.visibility="hidden";da.style.display="none"}"1"==urlParams.prefetchFonts&&T.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)}})();DrawioComment=function(b,e,k,n,D,t,E){this.file=b;this.id=e;this.content=k;this.modifiedDate=n;this.createdDate=D;this.isResolved=t;this.user=E;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,k,n,D){e()};DrawioComment.prototype.editComment=function(b,e,k){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DrawioUser=function(b,e,k,n,D){this.id=b;this.email=e;this.displayName=k;this.pictureUrl=n;this.locale=D};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\nbeta=beta\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\nrealtimeCollaboration=Real-Time Collaboration\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.\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\ngetNotionChromeExtension=Get the Notion Chrome Extension\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\nlabels=Labels\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\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\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\nsnapToGrid=Snap to Grid\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\nunmerge=Unmerge\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\ncreateODFile=Create OneDrive File\npickGDriveFile=Pick Google Drive File\ncreateGDriveFile=Create 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\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\nautoBkp=Automatic Backup\nconfAIgnoreCollectErr=Ignore collecting current pages errors\ndrafts=Drafts\ndraftSaveInt=Draft save interval [sec] (0 to disable)\npluginsDisabled=External plugins disabled.\nextExpNotConfigured=External image service is not configured\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="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="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><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="default"/></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=Graph.prototype.defaultThemes["default-style2"];GraphViewer=function(b,e,k){this.init(b,e,k)};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,e,k){this.graphConfig=null!=k?k:{};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"]?
@@ -4057,7 +4059,7 @@ this.graphConfig.responsive:this.responsive)&&!this.zoomEnabled&&!mxClient.NO_FO
this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");this.xmlNode=this.editor.extractGraphModel(this.xmlNode,!0);this.xmlNode!=e&&(this.xml=mxUtils.getXml(this.xmlNode),this.xmlDocument=this.xmlNode.ownerDocument);var d=this;this.graph.getImageFromBundles=function(I){return d.getImageUrl(I)};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 m=this.graph.getGlobalVariable;d=this;this.graph.getGlobalVariable=function(I){var G=f[d.currentPage];return"page"==I?G.getAttribute("name")||"Page-"+(d.currentPage+1):"pagenumber"==I?d.currentPage+1:"pagecount"==I?f.length:m.apply(this,arguments)}}}this.diagrams=[];var q=null;this.selectPage=function(I){this.handlingResize||(this.currentPage=mxUtils.mod(I,this.diagrams.length),
this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(I){I=this.getIndexById(I);var G=0<=I;G&&this.selectPage(I);return G};g=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=q&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),q=this.xmlNode)});var y=this.graph.setBackgroundImage;this.graph.setBackgroundImage=function(I){if(null!=I&&Graph.isPageLink(I.src)){var G=I.src,
-Y=G.indexOf(",");0<Y&&(Y=d.getIndexById(G.substring(Y+1)),0<=Y&&(I=d.getImageForGraphModel(Editor.parseDiagramNode(d.diagrams[Y])),I.originalSrc=G))}y.apply(this,arguments)};var F=this.graph.getGraphBounds;this.graph.getGraphBounds=function(I){var G=F.apply(this,arguments);I=this.backgroundImage;if(null!=I){var Y=this.view.translate,ba=this.view.scale;G=mxRectangle.fromRectangle(G);G.add(new mxRectangle((Y.x+I.x)*ba,(Y.y+I.y)*ba,I.width*ba,I.height*ba))}return G};this.addListener("xmlNodeChanged",
+Z=G.indexOf(",");0<Z&&(Z=d.getIndexById(G.substring(Z+1)),0<=Z&&(I=d.getImageForGraphModel(Editor.parseDiagramNode(d.diagrams[Z])),I.originalSrc=G))}y.apply(this,arguments)};var F=this.graph.getGraphBounds;this.graph.getGraphBounds=function(I){var G=F.apply(this,arguments);I=this.backgroundImage;if(null!=I){var Z=this.view.translate,ca=this.view.scale;G=mxRectangle.fromRectangle(G);G.add(new mxRectangle((Z.x+I.x)*ca,(Z.y+I.y)*ca,I.width*ca,I.height*ca))}return G};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(I){return!mxEvent.isPopupTrigger(I.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(I){if(Graph.isPageLink(I)){var G=I.indexOf(",");d.selectPageById(I.substring(G+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else this.handleCustomLink(I);return!0};var C=this.graph.foldTreeCell;this.graph.foldTreeCell=
@@ -4080,26 +4082,26 @@ null!=d||0!=this.graphConfig.resize||""==b.style.height?(d=null!=d?d:new mxPoint
GraphViewer.prototype.crop=function(){var b=this.graph,e=b.getGraphBounds(),k=b.border,n=b.view.scale;b.view.setTranslate(null!=e.x?Math.floor(b.view.translate.x-e.x/n+k):k,null!=e.y?Math.floor(b.view.translate.y-e.y/n+k):k)};GraphViewer.prototype.updateContainerWidth=function(b,e){b.style.width=e+"px"};GraphViewer.prototype.updateContainerHeight=function(b,e){if(this.forceCenter||this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||8==document.documentMode)b.style.height=e+"px"};
GraphViewer.prototype.showLayers=function(b,e){var k=this.graphConfig.layers;k=null!=k&&0<k.length?k.split(" "):[];var n=this.graphConfig.layerIds,D=null!=n&&0<n.length,t=!1;if(0<k.length||D||null!=e){e=null!=e?e.getModel():null;b=b.getModel();b.beginUpdate();try{var E=b.getChildCount(b.root);if(null==e){e=!1;t={};if(D)for(var d=0;d<n.length;d++){var f=b.getCell(n[d]);null!=f&&(e=!0,t[f.id]=!0)}else for(d=0;d<k.length;d++)f=b.getChildAt(b.root,parseInt(k[d])),null!=f&&(e=!0,t[f.id]=!0);for(d=0;e&&
d<E;d++)f=b.getChildAt(b.root,d),b.setVisible(f,t[f.id]||!1)}else for(d=0;d<E;d++)b.setVisible(b.getChildAt(b.root,d),e.isVisible(e.getChildAt(e.root,d)))}finally{b.endUpdate()}t=!0}return t};
-GraphViewer.prototype.addToolbar=function(){function b(ha,la,ja,U){var L=document.createElement("div");L.style.borderRight="1px solid #d0d0d0";L.style.padding="3px 6px 3px 6px";mxEvent.addListener(L,"click",ha);null!=ja&&L.setAttribute("title",ja);L.style.display="inline-block";ha=document.createElement("img");ha.setAttribute("border","0");ha.setAttribute("src",la);ha.style.width="18px";null==U||U?(mxEvent.addListener(L,"mouseenter",function(){L.style.backgroundColor="#ddd"}),mxEvent.addListener(L,
-"mouseleave",function(){L.style.backgroundColor="#eee"}),mxUtils.setOpacity(ha,60),L.style.cursor="pointer"):mxUtils.setOpacity(L,30);L.appendChild(ha);k.appendChild(L);m++;return L}var e=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?e.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(e.style.marginTop=this.toolbarHeight+"px");var k=e.ownerDocument.createElement("div");k.style.position="absolute";k.style.overflow="hidden";k.style.boxSizing=
+GraphViewer.prototype.addToolbar=function(){function b(ha,U,ma,T){var M=document.createElement("div");M.style.borderRight="1px solid #d0d0d0";M.style.padding="3px 6px 3px 6px";mxEvent.addListener(M,"click",ha);null!=ma&&M.setAttribute("title",ma);M.style.display="inline-block";ha=document.createElement("img");ha.setAttribute("border","0");ha.setAttribute("src",U);ha.style.width="18px";null==T||T?(mxEvent.addListener(M,"mouseenter",function(){M.style.backgroundColor="#ddd"}),mxEvent.addListener(M,
+"mouseleave",function(){M.style.backgroundColor="#eee"}),mxUtils.setOpacity(ha,60),M.style.cursor="pointer"):mxUtils.setOpacity(M,30);M.appendChild(ha);k.appendChild(M);m++;return M}var e=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?e.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(e.style.marginTop=this.toolbarHeight+"px");var k=e.ownerDocument.createElement("div");k.style.position="absolute";k.style.overflow="hidden";k.style.boxSizing=
"border-box";k.style.whiteSpace="nowrap";k.style.textAlign="left";k.style.zIndex=this.toolbarZIndex;k.style.backgroundColor="#eee";k.style.height=this.toolbarHeight+"px";this.toolbar=k;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(k.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(k,30);var n=null,D=null,t=mxUtils.bind(this,function(ha){null!=n&&(window.clearTimeout(n),fadeThead=null);null!=D&&(window.clearTimeout(D),fadeThead2=null);n=window.setTimeout(mxUtils.bind(this,
function(){mxUtils.setOpacity(k,0);n=null;D=window.setTimeout(mxUtils.bind(this,function(){k.style.display="none";D=null}),100)}),ha||200)}),E=mxUtils.bind(this,function(ha){null!=n&&(window.clearTimeout(n),fadeThead=null);null!=D&&(window.clearTimeout(D),fadeThead2=null);k.style.display="";mxUtils.setOpacity(k,ha||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(ha){mxEvent.isTouchEvent(ha)||(E(30),t())}));mxEvent.addListener(k,
-mxClient.IS_POINTER?"pointermove":"mousemove",function(ha){mxEvent.consume(ha)});mxEvent.addListener(k,"mouseenter",mxUtils.bind(this,function(ha){E(100)}));mxEvent.addListener(k,"mousemove",mxUtils.bind(this,function(ha){E(100);mxEvent.consume(ha)}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(ha){mxEvent.isTouchEvent(ha)||E(30)}));var d=this.graph,f=d.getTolerance();d.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ha,la){this.startX=la.getGraphX();
-this.startY=la.getGraphY();this.scrollLeft=d.container.scrollLeft;this.scrollTop=d.container.scrollTop},mouseMove:function(ha,la){},mouseUp:function(ha,la){mxEvent.isTouchEvent(la.getEvent())&&Math.abs(this.scrollLeft-d.container.scrollLeft)<f&&Math.abs(this.scrollTop-d.container.scrollTop)<f&&Math.abs(this.startX-la.getGraphX())<f&&Math.abs(this.startY-la.getGraphY())<f&&(0<parseFloat(k.style.opacity||0)?t():E(30))}})}for(var g=this.toolbarItems,m=0,q=null,y=null,F=null,C=null,I=0;I<g.length;I++){var G=
-g[I];if("pages"==G){C=e.ownerDocument.createElement("div");C.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(C,70);var Y=b(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");Y.style.borderRightStyle="none";Y.style.paddingLeft="0px";Y.style.paddingRight="0px";k.appendChild(C);var ba=
-b(mxUtils.bind(this,function(){this.selectPage(this.currentPage+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");ba.style.paddingLeft="0px";ba.style.paddingRight="0px";G=mxUtils.bind(this,function(){C.innerText="";mxUtils.write(C,this.currentPage+1+" / "+this.diagrams.length);C.style.display=1<this.diagrams.length?"inline-block":"none";Y.style.display=C.style.display;ba.style.display=C.style.display});this.addListener("graphChanged",G);G()}else if("zoom"==G)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"==G){if(this.layersEnabled){var Z=this.graph.getModel(),
-X=b(mxUtils.bind(this,function(ha){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 ja=this.graph.getGraphBounds(),U=this.graph.view;0>ja.x||0>ja.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:U.translate.clone(),scale:U.scale}):null!=this.graph.originalViewState&&0<ja.x/U.scale+this.graph.originalViewState.translate.x-
-U.translate.x&&0<ja.y/U.scale+this.graph.originalViewState.translate.y-U.translate.y&&(U.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:U.translate.clone(),scale:U.scale})}}));mxEvent.addListener(q,"mouseleave",function(){q.parentNode.removeChild(q);q=null});ha=X.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.overflowY="auto";q.style.maxHeight=this.graph.container.clientHeight-this.toolbarHeight-10+"px";q.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(q,80);var la=mxUtils.getDocumentScrollOrigin(document);q.style.left=la.x+ha.left-1+"px";q.style.top=la.y+ha.bottom-2+"px";document.body.appendChild(q)}}),Editor.layersImage,mxResources.get("layers")||"Layers");Z.addListener(mxEvent.CHANGE,function(){X.style.display=
-1<Z.getChildCount(Z.root)?"inline-block":"none"});X.style.display=1<Z.getChildCount(Z.root)?"inline-block":"none"}}else if("tags"==G){if(this.tagsEnabled){var qa=b(mxUtils.bind(this,function(ha){null==y&&(y=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),y.div.getElementsByTagName("div")[0].style.position="",y.div.style.maxHeight="160px",y.div.style.maxWidth="120px",y.div.style.padding="2px",y.div.style.overflow="auto",y.div.style.height="auto",y.div.style.position="fixed",y.div.style.fontFamily=
-Editor.defaultHtmlFont,y.div.style.fontSize="11px",y.div.style.backgroundColor="#eee",y.div.style.color="#000",y.div.style.border="1px solid #d0d0d0",y.div.style.zIndex=this.toolbarZIndex+1,mxUtils.setOpacity(y.div,80));if(null!=F)F.parentNode.removeChild(F),F=null;else{F=y.div;mxEvent.addListener(F,"mouseleave",function(){F.parentNode.removeChild(F);F=null});ha=qa.getBoundingClientRect();var la=mxUtils.getDocumentScrollOrigin(document);F.style.left=la.x+ha.left-1+"px";F.style.top=la.y+ha.bottom-
-2+"px";document.body.appendChild(F);y.refresh()}}),Editor.tagsImage,mxResources.get("tags")||"Tags");Z.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){qa.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}));qa.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}}else"lightbox"==G?this.lightboxEnabled&&b(mxUtils.bind(this,function(){this.showLightbox()}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&
+mxClient.IS_POINTER?"pointermove":"mousemove",function(ha){mxEvent.consume(ha)});mxEvent.addListener(k,"mouseenter",mxUtils.bind(this,function(ha){E(100)}));mxEvent.addListener(k,"mousemove",mxUtils.bind(this,function(ha){E(100);mxEvent.consume(ha)}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(ha){mxEvent.isTouchEvent(ha)||E(30)}));var d=this.graph,f=d.getTolerance();d.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ha,U){this.startX=U.getGraphX();
+this.startY=U.getGraphY();this.scrollLeft=d.container.scrollLeft;this.scrollTop=d.container.scrollTop},mouseMove:function(ha,U){},mouseUp:function(ha,U){mxEvent.isTouchEvent(U.getEvent())&&Math.abs(this.scrollLeft-d.container.scrollLeft)<f&&Math.abs(this.scrollTop-d.container.scrollTop)<f&&Math.abs(this.startX-U.getGraphX())<f&&Math.abs(this.startY-U.getGraphY())<f&&(0<parseFloat(k.style.opacity||0)?t():E(30))}})}for(var g=this.toolbarItems,m=0,q=null,y=null,F=null,C=null,I=0;I<g.length;I++){var G=
+g[I];if("pages"==G){C=e.ownerDocument.createElement("div");C.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(C,70);var Z=b(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");Z.style.borderRightStyle="none";Z.style.paddingLeft="0px";Z.style.paddingRight="0px";k.appendChild(C);var ca=
+b(mxUtils.bind(this,function(){this.selectPage(this.currentPage+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");ca.style.paddingLeft="0px";ca.style.paddingRight="0px";G=mxUtils.bind(this,function(){C.innerText="";mxUtils.write(C,this.currentPage+1+" / "+this.diagrams.length);C.style.display=1<this.diagrams.length?"inline-block":"none";Z.style.display=C.style.display;ca.style.display=C.style.display});this.addListener("graphChanged",G);G()}else if("zoom"==G)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"==G){if(this.layersEnabled){var aa=this.graph.getModel(),
+Y=b(mxUtils.bind(this,function(ha){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 ma=this.graph.getGraphBounds(),T=this.graph.view;0>ma.x||0>ma.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:T.translate.clone(),scale:T.scale}):null!=this.graph.originalViewState&&0<ma.x/T.scale+this.graph.originalViewState.translate.x-
+T.translate.x&&0<ma.y/T.scale+this.graph.originalViewState.translate.y-T.translate.y&&(T.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:T.translate.clone(),scale:T.scale})}}));mxEvent.addListener(q,"mouseleave",function(){q.parentNode.removeChild(q);q=null});ha=Y.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.overflowY="auto";q.style.maxHeight=this.graph.container.clientHeight-this.toolbarHeight-10+"px";q.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(q,80);var U=mxUtils.getDocumentScrollOrigin(document);q.style.left=U.x+ha.left-1+"px";q.style.top=U.y+ha.bottom-2+"px";document.body.appendChild(q)}}),Editor.layersImage,mxResources.get("layers")||"Layers");aa.addListener(mxEvent.CHANGE,function(){Y.style.display=
+1<aa.getChildCount(aa.root)?"inline-block":"none"});Y.style.display=1<aa.getChildCount(aa.root)?"inline-block":"none"}}else if("tags"==G){if(this.tagsEnabled){var pa=b(mxUtils.bind(this,function(ha){null==y&&(y=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),y.div.getElementsByTagName("div")[0].style.position="",y.div.style.maxHeight="160px",y.div.style.maxWidth="120px",y.div.style.padding="2px",y.div.style.overflow="auto",y.div.style.height="auto",y.div.style.position="fixed",
+y.div.style.fontFamily=Editor.defaultHtmlFont,y.div.style.fontSize="11px",y.div.style.backgroundColor="#eee",y.div.style.color="#000",y.div.style.border="1px solid #d0d0d0",y.div.style.zIndex=this.toolbarZIndex+1,mxUtils.setOpacity(y.div,80));if(null!=F)F.parentNode.removeChild(F),F=null;else{F=y.div;mxEvent.addListener(F,"mouseleave",function(){F.parentNode.removeChild(F);F=null});ha=pa.getBoundingClientRect();var U=mxUtils.getDocumentScrollOrigin(document);F.style.left=U.x+ha.left-1+"px";F.style.top=
+U.y+ha.bottom-2+"px";document.body.appendChild(F);y.refresh()}}),Editor.tagsImage,mxResources.get("tags")||"Tags");aa.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){pa.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}));pa.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}}else"lightbox"==G?this.lightboxEnabled&&b(mxUtils.bind(this,function(){this.showLightbox()}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&
(G=this.graphConfig["toolbar-buttons"][G],null!=G&&(G.elem=b(null==G.enabled||G.enabled?G.handler:function(){},G.image,G.title,G.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*m);null!=this.graphConfig.title&&(g=e.ownerDocument.createElement("div"),g.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",g.setAttribute("title",this.graphConfig.title),
-mxUtils.write(g,this.graphConfig.title),mxUtils.setOpacity(g,70),k.appendChild(g),this.filename=g);this.minToolbarWidth=34*m;var Q=e.style.border,W=mxUtils.bind(this,function(){k.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,e.offsetWidth)+"px";k.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var ha=e.getBoundingClientRect(),la=mxUtils.getScrollOrigin(document.body);la="relative"===document.body.style.position?document.body.getBoundingClientRect():
-{left:-la.x,top:-la.y};ha={left:ha.left-la.left,top:ha.top-la.top,bottom:ha.bottom-la.top,right:ha.right-la.left};k.style.left=ha.left+"px";"bottom"==this.graphConfig["toolbar-position"]?k.style.top=ha.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(k.style.marginTop=-this.toolbarHeight+"px",k.style.top=ha.top+1+"px"):k.style.top=ha.top+"px";"1px solid transparent"==Q&&(e.style.border="1px solid #d0d0d0");document.body.appendChild(k);var ja=mxUtils.bind(this,function(){null!=k.parentNode&&
-k.parentNode.removeChild(k);null!=q&&(q.parentNode.removeChild(q),q=null);e.style.border=Q});mxEvent.addListener(document,"mousemove",function(U){for(U=mxEvent.getSource(U);null!=U;){if(U==e||U==k||U==q)return;U=U.parentNode}ja()});mxEvent.addListener(document.body,"mouseleave",function(U){ja()})}else k.style.top=-this.toolbarHeight+"px",e.appendChild(k)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(e,"mouseenter",W):W();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=
-k.parentNode&&W()})).observe(e)};GraphViewer.prototype.disableButton=function(b){var e=this.graphConfig["toolbar-buttons"]?this.graphConfig["toolbar-buttons"][b]:null;null!=e&&(mxUtils.setOpacity(e.elem,30),mxEvent.removeListener(e.elem,"click",e.handler),mxEvent.addListener(e.elem,"mouseenter",function(){e.elem.style.backgroundColor="#eee"}))};
+mxUtils.write(g,this.graphConfig.title),mxUtils.setOpacity(g,70),k.appendChild(g),this.filename=g);this.minToolbarWidth=34*m;var Q=e.style.border,X=mxUtils.bind(this,function(){k.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,e.offsetWidth)+"px";k.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var ha=e.getBoundingClientRect(),U=mxUtils.getScrollOrigin(document.body);U="relative"===document.body.style.position?document.body.getBoundingClientRect():
+{left:-U.x,top:-U.y};ha={left:ha.left-U.left,top:ha.top-U.top,bottom:ha.bottom-U.top,right:ha.right-U.left};k.style.left=ha.left+"px";"bottom"==this.graphConfig["toolbar-position"]?k.style.top=ha.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(k.style.marginTop=-this.toolbarHeight+"px",k.style.top=ha.top+1+"px"):k.style.top=ha.top+"px";"1px solid transparent"==Q&&(e.style.border="1px solid #d0d0d0");document.body.appendChild(k);var ma=mxUtils.bind(this,function(){null!=k.parentNode&&
+k.parentNode.removeChild(k);null!=q&&(q.parentNode.removeChild(q),q=null);e.style.border=Q});mxEvent.addListener(document,"mousemove",function(T){for(T=mxEvent.getSource(T);null!=T;){if(T==e||T==k||T==q)return;T=T.parentNode}ma()});mxEvent.addListener(document.body,"mouseleave",function(T){ma()})}else k.style.top=-this.toolbarHeight+"px",e.appendChild(k)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(e,"mouseenter",X):X();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=
+k.parentNode&&X()})).observe(e)};GraphViewer.prototype.disableButton=function(b){var e=this.graphConfig["toolbar-buttons"]?this.graphConfig["toolbar-buttons"][b]:null;null!=e&&(mxUtils.setOpacity(e.elem,30),mxEvent.removeListener(e.elem,"click",e.handler),mxEvent.addListener(e.elem,"mouseenter",function(){e.elem.style.backgroundColor="#eee"}))};
GraphViewer.prototype.addClickHandler=function(b,e){b.linkPolicy=this.graphConfig.target||b.linkPolicy;b.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(k,n){if(null==n)for(var D=mxEvent.getSource(k);D!=b.container&&null!=D&&null==n;)"a"==D.nodeName.toLowerCase()&&(n=D.getAttribute("href")),D=D.parentNode;null!=e?null==n||b.isCustomLink(n)?mxEvent.consume(k):b.isExternalProtocol(n)||b.isBlankLink(n)||window.setTimeout(function(){e.destroy()},0):null!=n&&null==e&&b.isCustomLink(n)&&
(mxEvent.isTouchEvent(k)||!mxEvent.isPopupTrigger(k))&&b.customLinkClicked(n)&&(mxUtils.clearSelection(),mxEvent.consume(k))}),mxUtils.bind(this,function(k){null!=e||!this.lightboxClickEnabled||mxEvent.isTouchEvent(k)&&0!=this.toolbarItems.length||this.showLightbox()}))};
GraphViewer.prototype.showLightbox=function(b,e,k){if("open"==this.graphConfig.lightbox||window.self!==window.top)if(null==this.lightboxWindow||this.lightboxWindow.closed){b=null!=b?b:null!=this.graphConfig.editable?this.graphConfig.editable:!0;k={client:1,target:null!=k?k:"blank"};b&&(k.edit=this.graphConfig.edit||"_blank");if(null!=e?e:1)k.close=1;this.layersEnabled&&(k.layers=1);this.tagsEnabled&&(k.tags={});null!=this.graphConfig&&0!=this.graphConfig.nav&&(k.nav=1);null!=this.graphConfig&&null!=
@@ -4120,7 +4122,7 @@ GraphViewer.initCss=function(){try{var b=document.createElement("style");b.type=
GraphViewer.cachedUrls={};GraphViewer.getUrl=function(b,e,k){if(null!=GraphViewer.cachedUrls[b])e(GraphViewer.cachedUrls[b]);else{var n=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;n.open("GET",b);n.onload=function(){e(null!=n.getText?n.getText():n.responseText)};n.onerror=k;n.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0;
(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(k){return window.setTimeout(k,20)},e=function(k,n){function D(){this.q=[];this.add=function(F){this.q.push(F)};var q,y;this.call=function(){q=0;for(y=this.q.length;q<y;q++)this.q[q].call()}}function t(q,y){return q.currentStyle?q.currentStyle[y]:window.getComputedStyle?window.getComputedStyle(q,null).getPropertyValue(y):q.style[y]}function E(q,y){if(!q.resizedAttached)q.resizedAttached=
new D,q.resizedAttached.add(y);else if(q.resizedAttached){q.resizedAttached.add(y);return}q.resizeSensor=document.createElement("div");q.resizeSensor.className="resize-sensor";q.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";q.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>';
-q.appendChild(q.resizeSensor);"static"==t(q,"position")&&(q.style.position="relative");var F=q.resizeSensor.childNodes[0],C=F.childNodes[0],I=q.resizeSensor.childNodes[1],G=function(){C.style.width="100000px";C.style.height="100000px";F.scrollLeft=1E5;F.scrollTop=1E5;I.scrollLeft=1E5;I.scrollTop=1E5};G();var Y=!1,ba=function(){q.resizedAttached&&(Y&&(q.resizedAttached.call(),Y=!1),b(ba))};b(ba);var Z,X,qa,Q;y=function(){if((qa=q.offsetWidth)!=Z||(Q=q.offsetHeight)!=X)Y=!0,Z=qa,X=Q;G()};var W=function(ha,
-la,ja){ha.attachEvent?ha.attachEvent("on"+la,ja):ha.addEventListener(la,ja)};W(F,"scroll",y);W(I,"scroll",y)}var d=function(){GraphViewer.resizeSensorEnabled&&n()},f=Object.prototype.toString.call(k),g="[object Array]"===f||"[object NodeList]"===f||"[object HTMLCollection]"===f||"undefined"!==typeof jQuery&&k instanceof jQuery||"undefined"!==typeof Elements&&k instanceof Elements;if(g){f=0;for(var m=k.length;f<m;f++)E(k[f],d)}else E(k,d);this.detach=function(){if(g)for(var q=0,y=k.length;q<y;q++)e.detach(k[q]);
+q.appendChild(q.resizeSensor);"static"==t(q,"position")&&(q.style.position="relative");var F=q.resizeSensor.childNodes[0],C=F.childNodes[0],I=q.resizeSensor.childNodes[1],G=function(){C.style.width="100000px";C.style.height="100000px";F.scrollLeft=1E5;F.scrollTop=1E5;I.scrollLeft=1E5;I.scrollTop=1E5};G();var Z=!1,ca=function(){q.resizedAttached&&(Z&&(q.resizedAttached.call(),Z=!1),b(ca))};b(ca);var aa,Y,pa,Q;y=function(){if((pa=q.offsetWidth)!=aa||(Q=q.offsetHeight)!=Y)Z=!0,aa=pa,Y=Q;G()};var X=function(ha,
+U,ma){ha.attachEvent?ha.attachEvent("on"+U,ma):ha.addEventListener(U,ma)};X(F,"scroll",y);X(I,"scroll",y)}var d=function(){GraphViewer.resizeSensorEnabled&&n()},f=Object.prototype.toString.call(k),g="[object Array]"===f||"[object NodeList]"===f||"[object HTMLCollection]"===f||"undefined"!==typeof jQuery&&k instanceof jQuery||"undefined"!==typeof Elements&&k instanceof Elements;if(g){f=0;for(var m=k.length;f<m;f++)E(k[f],d)}else E(k,d);this.detach=function(){if(g)for(var q=0,y=k.length;q<y;q++)e.detach(k[q]);
else e.detach(k)}};e.detach=function(k){k.resizeSensor&&(k.removeChild(k.resizeSensor),delete k.resizeSensor,delete k.resizedAttached)};window.ResizeSensor=e})();
(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 1e4abe45..0bb908ad 100644
--- a/src/main/webapp/mxgraph/mxClient.js
+++ b/src/main/webapp/mxgraph/mxClient.js
@@ -1,4 +1,4 @@
-var mxClient={VERSION:"20.0.2",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:"20.0.3",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)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints,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]"!==
diff --git a/src/main/webapp/service-worker.js b/src/main/webapp/service-worker.js
index 3408b0e8..fe30e568 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 r=Promise.resolve();return i[e]||(r=new Promise((async r=>{if("document"in self){const i=document.createElement("script");i.src=e,document.head.appendChild(i),i.onload=r}else importScripts(e),r()}))),r.then((()=>{if(!i[e])throw new Error(`Module ${e} didn’t register its module`);return i[e]}))},r=(r,i)=>{Promise.all(r.map(e)).then((e=>i(1===e.length?e[0]:e)))},i={require:Promise.resolve(r)};self.define=(r,a,c)=>{i[r]||(i[r]=Promise.resolve().then((()=>{let i={};const s={uri:location.origin+r.slice(1)};return Promise.all(a.map((r=>{switch(r){case"exports":return i;case"module":return s;default:return e(r)}}))).then((e=>{const r=c(...e);return i.default||(i.default=r),i}))})))}}define("./service-worker.js",["./workbox-7a2a8380"],(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:"746e2af48d9761b0ca075f875f7f8237"},{url:"js/extensions.min.js",revision:"45df373f567b94c1dce78ba61b591983"},{url:"js/stencils.min.js",revision:"ad302abdede5be524537278bbc457284"},{url:"js/shapes-14-6-5.min.js",revision:"f0e1d4c09054df2f3ea3793491e9fe08"},{url:"js/math-print.js",revision:"8495f0dfe75795fcfbebea97060e1a17"},{url:"index.html",revision:"8b5b1cf07fc74454cf354717e9d18534"},{url:"open.html",revision:"d71816b3b00e769fc6019fcdd6921662"},{url:"styles/fonts/ArchitectsDaughter-Regular.ttf",revision:"31c2153c0530e32553b31a49b3d70736"},{url:"styles/grapheditor.css",revision:"4f2c07c4585347249c95cd9158872fb2"},{url:"styles/atlas.css",revision:"e8152cda9233d3a3af017422993abfce"},{url:"styles/dark.css",revision:"3179f617dd02efd2cefeb8c06f965880"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"505e8280346666f7ee801bc59521fa67"},{url:"js/viewer-static.min.js",revision:"67ae1eee8ab372a5a4ab60d2bcb44d5f"},{url:"connect/jira/editor-1-3-3.html",revision:"a2b0e7267a08a838f3cc404eba831ec0"},{url:"connect/jira/viewerPanel-1-3-12.html",revision:"c96db1790184cb35781f791e8d1dafd9"},{url:"connect/jira/fullScreenViewer-1-3-3.html",revision:"ba7ece2dfb2833b72f97280d7092f25e"},{url:"connect/jira/viewerPanel.js",revision:"7bb9525fbd4504dd6855663605476f56"},{url:"connect/jira/spinner.gif",revision:"7d857ab9d86123e93d74d48e958fe743"},{url:"connect/jira/editor.js",revision:"01caa325f3ad3f6565e0b4228907fb63"},{url:"connect/jira/fullscreen-viewer-init.js",revision:"e00ad51fc16b87c362d6eaf930ab1fa5"},{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:"80d3c5ec6575b41d271eb6f7a6efe40b"},{url:"connect/confluence/connectUtils-1-4-8.js",revision:"c36b256237fa27ea379e30f7d5add825"},{url:"connect/new_common/cac.js",revision:"3d8c436c566db645fb1e6e6ba9f69bbc"},{url:"connect/gdrive_common/gac.js",revision:"38f1df3ecc4d78290493f47e62202138"},{url:"connect/onedrive_common/ac.js",revision:"d089f12446d443ca01752a5115456fcc"},{url:"connect/confluence/viewer-init.js",revision:"8aa8d02147def4535563bc65632a3e6d"},{url:"connect/confluence/viewer.js",revision:"96cc3ed26b8ae45de1316e8a6684ee7e"},{url:"connect/confluence/viewer-1-4-42.html",revision:"4c58f3a1a4c99b1c4264593b6e05100b"},{url:"connect/confluence/macroEditor-1-4-8.html",revision:"8cd74a2fb60bf2e3e86026d66107cf11"},{url:"connect/confluence/includeDiagram-1-4-8.js",revision:"7e198d0456c3075b4b305da188f09714"},{url:"connect/confluence/includeDiagram.html",revision:"30730e721f86bf3c4f09d1e5e7f42e84"},{url:"connect/confluence/macro-editor.js",revision:"412bc4b87e630b697a40f247c579d398"},{url:"math/es5/startup.js",revision:"dc7130cdc866593293dbb5dde11ceb40"},{url:"math/es5/core.js",revision:"f71bc0bfb7d2ac8261747f97a5d47dd4"},{url:"math/es5/output/svg.js",revision:"4f55967d16197ebb01b86356d8ab179a"},{url:"math/es5/input/tex.js",revision:"5c4f470da2ccb1acf85041fcecd6fff6"},{url:"math/es5/input/asciimath.js",revision:"c2d4076dd8e26d509bfe3a378e71cfa7"},{url:"resources/dia.txt",revision:"1eec6d0fa87ddf175f3809286bab6e15"},{url:"resources/dia_am.txt",revision:"bf7c1b2dabed5ee1d8b2deed806fdf07"},{url:"resources/dia_ar.txt",revision:"585145341744d7b3a507336d927eb09d"},{url:"resources/dia_bg.txt",revision:"e2c26106a8513abc325545de77eae6c1"},{url:"resources/dia_bn.txt",revision:"fe535cc2720ee07d81874383b1b3cb05"},{url:"resources/dia_bs.txt",revision:"6d008ae422df1ccddef6f2936f3aa441"},{url:"resources/dia_ca.txt",revision:"bf689f9192a922cf89adef8b47337726"},{url:"resources/dia_cs.txt",revision:"43ab9819a9e28be02a277e0ae5f5da5d"},{url:"resources/dia_da.txt",revision:"87bc99ab805fcfeac0c877480272b340"},{url:"resources/dia_de.txt",revision:"c2d22ac04a966341899230c7f5cc66e1"},{url:"resources/dia_el.txt",revision:"a5396186b509c364aa601c83f4439eda"},{url:"resources/dia_eo.txt",revision:"f0ef9ae9750d63dcae378d6366032baf"},{url:"resources/dia_es.txt",revision:"f9ee5a18997037eb577e3f684aa96473"},{url:"resources/dia_et.txt",revision:"1c243e9f6a5210335af0104f50a55a8c"},{url:"resources/dia_eu.txt",revision:"357185c3b672294ac1c513b2223a1b3d"},{url:"resources/dia_fa.txt",revision:"9ed02180c4329db27d16130eea24e5d6"},{url:"resources/dia_fi.txt",revision:"605274e2a6449913968487a9a0ad5505"},{url:"resources/dia_fil.txt",revision:"e3353f0eb5ddaf5ad306953561d50cf3"},{url:"resources/dia_fr.txt",revision:"373050eb13cde1f069ad2d197e82a9f5"},{url:"resources/dia_gl.txt",revision:"85acf27fb549f05a66cd0bccbab04524"},{url:"resources/dia_gu.txt",revision:"05587cb635ac6a5b0aa66777c227387b"},{url:"resources/dia_he.txt",revision:"a7b4ea7c870bd1f45aa70b441bc1ce9e"},{url:"resources/dia_hi.txt",revision:"e848288aaaa9158b1886e5c147be92b5"},{url:"resources/dia_hr.txt",revision:"77bc8ebda8cdbbb7bafd8b7dfee54c9f"},{url:"resources/dia_hu.txt",revision:"dc7dd3f13ade80dbfb0e1f2e6c8750dd"},{url:"resources/dia_id.txt",revision:"59694e949df4ecdb89403422f6675ee9"},{url:"resources/dia_it.txt",revision:"63be8184ac7f04108800fdf7fe77ff66"},{url:"resources/dia_ja.txt",revision:"673acadfd9f6e528220a81f20b5980ee"},{url:"resources/dia_kn.txt",revision:"bc514c912444d7c47f217ed015b19bb6"},{url:"resources/dia_ko.txt",revision:"eac15371d909ef555d6bf04fda8d0bfd"},{url:"resources/dia_lt.txt",revision:"bd29c2a0fa1ca71bae0bf25ccee9538f"},{url:"resources/dia_lv.txt",revision:"1d658a1ad58fae175559625876d76d55"},{url:"resources/dia_ml.txt",revision:"edd35e23129e88458a009ab84e964c59"},{url:"resources/dia_mr.txt",revision:"692b2c149b22d71fce5ae3fc2e1dbf21"},{url:"resources/dia_ms.txt",revision:"a706881981c2bff3f7eb6a437c7d3156"},{url:"resources/dia_my.txt",revision:"1eec6d0fa87ddf175f3809286bab6e15"},{url:"resources/dia_nl.txt",revision:"23197594ae0341e7acb9d87b74a8da4d"},{url:"resources/dia_no.txt",revision:"7bf121f919817d7a9feecd4f14f98035"},{url:"resources/dia_pl.txt",revision:"a324a5e93fd29e823b0f824f2d8f30ff"},{url:"resources/dia_pt-br.txt",revision:"039c7f80da4efb24e3b8b2ce04feed44"},{url:"resources/dia_pt.txt",revision:"12ffa13225e8794157baefe0b4ae58f1"},{url:"resources/dia_ro.txt",revision:"5ccb64fc757e1e101a3ea96acf34843b"},{url:"resources/dia_ru.txt",revision:"a662eec82e14192450431f2b210238a5"},{url:"resources/dia_si.txt",revision:"1eec6d0fa87ddf175f3809286bab6e15"},{url:"resources/dia_sk.txt",revision:"4ace1ed0f44b5d8e88f1ee274d723db4"},{url:"resources/dia_sl.txt",revision:"fa886367144e5868a71d306ae5e22708"},{url:"resources/dia_sr.txt",revision:"119329a69e4742451082f502202e654c"},{url:"resources/dia_sv.txt",revision:"efa3c1391ed132af3428bfe72ea1f259"},{url:"resources/dia_sw.txt",revision:"1218440d868b3f3b912716e191907dec"},{url:"resources/dia_ta.txt",revision:"f521418537e570a68edf339049f74a97"},{url:"resources/dia_te.txt",revision:"8d56ac0c17ac1ed2a14e49a2d9965f6b"},{url:"resources/dia_th.txt",revision:"5b4ccbea5c345850657b69527e7acc42"},{url:"resources/dia_tr.txt",revision:"fd42e81b0e63ea18a0d889975c96a3e9"},{url:"resources/dia_uk.txt",revision:"4239cf947c20e62716988eadc72ebe02"},{url:"resources/dia_vi.txt",revision:"63f0364e410bfefd299b2c5024280e60"},{url:"resources/dia_zh-tw.txt",revision:"64b2677cc1f15788cc64eeaac14e40f0"},{url:"resources/dia_zh.txt",revision:"290c5ab70cdbb847e89aeb9d497ab6f7"},{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 r=Promise.resolve();return i[e]||(r=new Promise((async r=>{if("document"in self){const i=document.createElement("script");i.src=e,document.head.appendChild(i),i.onload=r}else importScripts(e),r()}))),r.then((()=>{if(!i[e])throw new Error(`Module ${e} didn’t register its module`);return i[e]}))},r=(r,i)=>{Promise.all(r.map(e)).then((e=>i(1===e.length?e[0]:e)))},i={require:Promise.resolve(r)};self.define=(r,a,s)=>{i[r]||(i[r]=Promise.resolve().then((()=>{let i={};const c={uri:location.origin+r.slice(1)};return Promise.all(a.map((r=>{switch(r){case"exports":return i;case"module":return c;default:return e(r)}}))).then((e=>{const r=s(...e);return i.default||(i.default=r),i}))})))}}define("./service-worker.js",["./workbox-7a2a8380"],(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:"1f66afa48ef6f80f175b898e4b32edc3"},{url:"js/extensions.min.js",revision:"45df373f567b94c1dce78ba61b591983"},{url:"js/stencils.min.js",revision:"ad302abdede5be524537278bbc457284"},{url:"js/shapes-14-6-5.min.js",revision:"f0e1d4c09054df2f3ea3793491e9fe08"},{url:"js/math-print.js",revision:"8495f0dfe75795fcfbebea97060e1a17"},{url:"index.html",revision:"8b5b1cf07fc74454cf354717e9d18534"},{url:"open.html",revision:"d71816b3b00e769fc6019fcdd6921662"},{url:"styles/fonts/ArchitectsDaughter-Regular.ttf",revision:"31c2153c0530e32553b31a49b3d70736"},{url:"styles/grapheditor.css",revision:"4f2c07c4585347249c95cd9158872fb2"},{url:"styles/atlas.css",revision:"e8152cda9233d3a3af017422993abfce"},{url:"styles/dark.css",revision:"3179f617dd02efd2cefeb8c06f965880"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"505e8280346666f7ee801bc59521fa67"},{url:"js/viewer-static.min.js",revision:"ff727fe96a5ef64589af90ef79039ba4"},{url:"connect/jira/editor-1-3-3.html",revision:"a2b0e7267a08a838f3cc404eba831ec0"},{url:"connect/jira/viewerPanel-1-3-12.html",revision:"c96db1790184cb35781f791e8d1dafd9"},{url:"connect/jira/fullScreenViewer-1-3-3.html",revision:"ba7ece2dfb2833b72f97280d7092f25e"},{url:"connect/jira/viewerPanel.js",revision:"7bb9525fbd4504dd6855663605476f56"},{url:"connect/jira/spinner.gif",revision:"7d857ab9d86123e93d74d48e958fe743"},{url:"connect/jira/editor.js",revision:"01caa325f3ad3f6565e0b4228907fb63"},{url:"connect/jira/fullscreen-viewer-init.js",revision:"e00ad51fc16b87c362d6eaf930ab1fa5"},{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:"80d3c5ec6575b41d271eb6f7a6efe40b"},{url:"connect/confluence/connectUtils-1-4-8.js",revision:"c36b256237fa27ea379e30f7d5add825"},{url:"connect/new_common/cac.js",revision:"3d8c436c566db645fb1e6e6ba9f69bbc"},{url:"connect/gdrive_common/gac.js",revision:"38f1df3ecc4d78290493f47e62202138"},{url:"connect/onedrive_common/ac.js",revision:"d089f12446d443ca01752a5115456fcc"},{url:"connect/confluence/viewer-init.js",revision:"8aa8d02147def4535563bc65632a3e6d"},{url:"connect/confluence/viewer.js",revision:"96cc3ed26b8ae45de1316e8a6684ee7e"},{url:"connect/confluence/viewer-1-4-42.html",revision:"4c58f3a1a4c99b1c4264593b6e05100b"},{url:"connect/confluence/macroEditor-1-4-8.html",revision:"8cd74a2fb60bf2e3e86026d66107cf11"},{url:"connect/confluence/includeDiagram-1-4-8.js",revision:"7e198d0456c3075b4b305da188f09714"},{url:"connect/confluence/includeDiagram.html",revision:"30730e721f86bf3c4f09d1e5e7f42e84"},{url:"connect/confluence/macro-editor.js",revision:"412bc4b87e630b697a40f247c579d398"},{url:"math/es5/startup.js",revision:"dc7130cdc866593293dbb5dde11ceb40"},{url:"math/es5/core.js",revision:"f71bc0bfb7d2ac8261747f97a5d47dd4"},{url:"math/es5/output/svg.js",revision:"4f55967d16197ebb01b86356d8ab179a"},{url:"math/es5/input/tex.js",revision:"5c4f470da2ccb1acf85041fcecd6fff6"},{url:"math/es5/input/asciimath.js",revision:"c2d4076dd8e26d509bfe3a378e71cfa7"},{url:"resources/dia.txt",revision:"1eec6d0fa87ddf175f3809286bab6e15"},{url:"resources/dia_am.txt",revision:"bf7c1b2dabed5ee1d8b2deed806fdf07"},{url:"resources/dia_ar.txt",revision:"585145341744d7b3a507336d927eb09d"},{url:"resources/dia_bg.txt",revision:"e2c26106a8513abc325545de77eae6c1"},{url:"resources/dia_bn.txt",revision:"fe535cc2720ee07d81874383b1b3cb05"},{url:"resources/dia_bs.txt",revision:"6d008ae422df1ccddef6f2936f3aa441"},{url:"resources/dia_ca.txt",revision:"bf689f9192a922cf89adef8b47337726"},{url:"resources/dia_cs.txt",revision:"43ab9819a9e28be02a277e0ae5f5da5d"},{url:"resources/dia_da.txt",revision:"87bc99ab805fcfeac0c877480272b340"},{url:"resources/dia_de.txt",revision:"c2d22ac04a966341899230c7f5cc66e1"},{url:"resources/dia_el.txt",revision:"a5396186b509c364aa601c83f4439eda"},{url:"resources/dia_eo.txt",revision:"f0ef9ae9750d63dcae378d6366032baf"},{url:"resources/dia_es.txt",revision:"f9ee5a18997037eb577e3f684aa96473"},{url:"resources/dia_et.txt",revision:"1c243e9f6a5210335af0104f50a55a8c"},{url:"resources/dia_eu.txt",revision:"357185c3b672294ac1c513b2223a1b3d"},{url:"resources/dia_fa.txt",revision:"9ed02180c4329db27d16130eea24e5d6"},{url:"resources/dia_fi.txt",revision:"605274e2a6449913968487a9a0ad5505"},{url:"resources/dia_fil.txt",revision:"e3353f0eb5ddaf5ad306953561d50cf3"},{url:"resources/dia_fr.txt",revision:"373050eb13cde1f069ad2d197e82a9f5"},{url:"resources/dia_gl.txt",revision:"85acf27fb549f05a66cd0bccbab04524"},{url:"resources/dia_gu.txt",revision:"05587cb635ac6a5b0aa66777c227387b"},{url:"resources/dia_he.txt",revision:"a7b4ea7c870bd1f45aa70b441bc1ce9e"},{url:"resources/dia_hi.txt",revision:"e848288aaaa9158b1886e5c147be92b5"},{url:"resources/dia_hr.txt",revision:"77bc8ebda8cdbbb7bafd8b7dfee54c9f"},{url:"resources/dia_hu.txt",revision:"dc7dd3f13ade80dbfb0e1f2e6c8750dd"},{url:"resources/dia_id.txt",revision:"59694e949df4ecdb89403422f6675ee9"},{url:"resources/dia_it.txt",revision:"63be8184ac7f04108800fdf7fe77ff66"},{url:"resources/dia_ja.txt",revision:"673acadfd9f6e528220a81f20b5980ee"},{url:"resources/dia_kn.txt",revision:"bc514c912444d7c47f217ed015b19bb6"},{url:"resources/dia_ko.txt",revision:"eac15371d909ef555d6bf04fda8d0bfd"},{url:"resources/dia_lt.txt",revision:"bd29c2a0fa1ca71bae0bf25ccee9538f"},{url:"resources/dia_lv.txt",revision:"1d658a1ad58fae175559625876d76d55"},{url:"resources/dia_ml.txt",revision:"edd35e23129e88458a009ab84e964c59"},{url:"resources/dia_mr.txt",revision:"692b2c149b22d71fce5ae3fc2e1dbf21"},{url:"resources/dia_ms.txt",revision:"a706881981c2bff3f7eb6a437c7d3156"},{url:"resources/dia_my.txt",revision:"1eec6d0fa87ddf175f3809286bab6e15"},{url:"resources/dia_nl.txt",revision:"23197594ae0341e7acb9d87b74a8da4d"},{url:"resources/dia_no.txt",revision:"7bf121f919817d7a9feecd4f14f98035"},{url:"resources/dia_pl.txt",revision:"a324a5e93fd29e823b0f824f2d8f30ff"},{url:"resources/dia_pt-br.txt",revision:"039c7f80da4efb24e3b8b2ce04feed44"},{url:"resources/dia_pt.txt",revision:"12ffa13225e8794157baefe0b4ae58f1"},{url:"resources/dia_ro.txt",revision:"5ccb64fc757e1e101a3ea96acf34843b"},{url:"resources/dia_ru.txt",revision:"a662eec82e14192450431f2b210238a5"},{url:"resources/dia_si.txt",revision:"1eec6d0fa87ddf175f3809286bab6e15"},{url:"resources/dia_sk.txt",revision:"4ace1ed0f44b5d8e88f1ee274d723db4"},{url:"resources/dia_sl.txt",revision:"fa886367144e5868a71d306ae5e22708"},{url:"resources/dia_sr.txt",revision:"119329a69e4742451082f502202e654c"},{url:"resources/dia_sv.txt",revision:"efa3c1391ed132af3428bfe72ea1f259"},{url:"resources/dia_sw.txt",revision:"1218440d868b3f3b912716e191907dec"},{url:"resources/dia_ta.txt",revision:"f521418537e570a68edf339049f74a97"},{url:"resources/dia_te.txt",revision:"8d56ac0c17ac1ed2a14e49a2d9965f6b"},{url:"resources/dia_th.txt",revision:"5b4ccbea5c345850657b69527e7acc42"},{url:"resources/dia_tr.txt",revision:"fd42e81b0e63ea18a0d889975c96a3e9"},{url:"resources/dia_uk.txt",revision:"4239cf947c20e62716988eadc72ebe02"},{url:"resources/dia_vi.txt",revision:"63f0364e410bfefd299b2c5024280e60"},{url:"resources/dia_zh-tw.txt",revision:"64b2677cc1f15788cc64eeaac14e40f0"},{url:"resources/dia_zh.txt",revision:"290c5ab70cdbb847e89aeb9d497ab6f7"},{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 3f573b09..05cc911b 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":["../../../../../../../tmp/54d8b4eb818114d6b5a9899242ba8c97/service-worker.js"],"sourcesContent":["import {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/opt/hostedtoolcache/node/14.19.3/x64/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\": \"746e2af48d9761b0ca075f875f7f8237\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"45df373f567b94c1dce78ba61b591983\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"ad302abdede5be524537278bbc457284\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"f0e1d4c09054df2f3ea3793491e9fe08\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"8495f0dfe75795fcfbebea97060e1a17\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"8b5b1cf07fc74454cf354717e9d18534\"\n },\n {\n \"url\": \"open.html\",\n \"revision\": \"d71816b3b00e769fc6019fcdd6921662\"\n },\n {\n \"url\": \"styles/fonts/ArchitectsDaughter-Regular.ttf\",\n \"revision\": \"31c2153c0530e32553b31a49b3d70736\"\n },\n {\n \"url\": \"styles/grapheditor.css\",\n \"revision\": \"4f2c07c4585347249c95cd9158872fb2\"\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/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\": \"67ae1eee8ab372a5a4ab60d2bcb44d5f\"\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\": \"c96db1790184cb35781f791e8d1dafd9\"\n },\n {\n \"url\": \"connect/jira/fullScreenViewer-1-3-3.html\",\n \"revision\": \"ba7ece2dfb2833b72f97280d7092f25e\"\n },\n {\n \"url\": \"connect/jira/viewerPanel.js\",\n \"revision\": \"7bb9525fbd4504dd6855663605476f56\"\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\": \"e00ad51fc16b87c362d6eaf930ab1fa5\"\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\": \"80d3c5ec6575b41d271eb6f7a6efe40b\"\n },\n {\n \"url\": \"connect/confluence/connectUtils-1-4-8.js\",\n \"revision\": \"c36b256237fa27ea379e30f7d5add825\"\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\": \"d089f12446d443ca01752a5115456fcc\"\n },\n {\n \"url\": \"connect/confluence/viewer-init.js\",\n \"revision\": \"8aa8d02147def4535563bc65632a3e6d\"\n },\n {\n \"url\": \"connect/confluence/viewer.js\",\n \"revision\": \"96cc3ed26b8ae45de1316e8a6684ee7e\"\n },\n {\n \"url\": \"connect/confluence/viewer-1-4-42.html\",\n \"revision\": \"4c58f3a1a4c99b1c4264593b6e05100b\"\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\": \"7e198d0456c3075b4b305da188f09714\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram.html\",\n \"revision\": \"30730e721f86bf3c4f09d1e5e7f42e84\"\n },\n {\n \"url\": \"connect/confluence/macro-editor.js\",\n \"revision\": \"412bc4b87e630b697a40f247c579d398\"\n },\n {\n \"url\": \"math/es5/startup.js\",\n \"revision\": \"dc7130cdc866593293dbb5dde11ceb40\"\n },\n {\n \"url\": \"math/es5/core.js\",\n \"revision\": \"f71bc0bfb7d2ac8261747f97a5d47dd4\"\n },\n {\n \"url\": \"math/es5/output/svg.js\",\n \"revision\": \"4f55967d16197ebb01b86356d8ab179a\"\n },\n {\n \"url\": \"math/es5/input/tex.js\",\n \"revision\": \"5c4f470da2ccb1acf85041fcecd6fff6\"\n },\n {\n \"url\": \"math/es5/input/asciimath.js\",\n \"revision\": \"c2d4076dd8e26d509bfe3a378e71cfa7\"\n },\n {\n \"url\": \"resources/dia.txt\",\n \"revision\": \"1eec6d0fa87ddf175f3809286bab6e15\"\n },\n {\n \"url\": \"resources/dia_am.txt\",\n \"revision\": \"bf7c1b2dabed5ee1d8b2deed806fdf07\"\n },\n {\n \"url\": \"resources/dia_ar.txt\",\n \"revision\": \"585145341744d7b3a507336d927eb09d\"\n },\n {\n \"url\": \"resources/dia_bg.txt\",\n \"revision\": \"e2c26106a8513abc325545de77eae6c1\"\n },\n {\n \"url\": \"resources/dia_bn.txt\",\n \"revision\": \"fe535cc2720ee07d81874383b1b3cb05\"\n },\n {\n \"url\": \"resources/dia_bs.txt\",\n \"revision\": \"6d008ae422df1ccddef6f2936f3aa441\"\n },\n {\n \"url\": \"resources/dia_ca.txt\",\n \"revision\": \"bf689f9192a922cf89adef8b47337726\"\n },\n {\n \"url\": \"resources/dia_cs.txt\",\n \"revision\": \"43ab9819a9e28be02a277e0ae5f5da5d\"\n },\n {\n \"url\": \"resources/dia_da.txt\",\n \"revision\": \"87bc99ab805fcfeac0c877480272b340\"\n },\n {\n \"url\": \"resources/dia_de.txt\",\n \"revision\": \"c2d22ac04a966341899230c7f5cc66e1\"\n },\n {\n \"url\": \"resources/dia_el.txt\",\n \"revision\": \"a5396186b509c364aa601c83f4439eda\"\n },\n {\n \"url\": \"resources/dia_eo.txt\",\n \"revision\": \"f0ef9ae9750d63dcae378d6366032baf\"\n },\n {\n \"url\": \"resources/dia_es.txt\",\n \"revision\": \"f9ee5a18997037eb577e3f684aa96473\"\n },\n {\n \"url\": \"resources/dia_et.txt\",\n \"revision\": \"1c243e9f6a5210335af0104f50a55a8c\"\n },\n {\n \"url\": \"resources/dia_eu.txt\",\n \"revision\": \"357185c3b672294ac1c513b2223a1b3d\"\n },\n {\n \"url\": \"resources/dia_fa.txt\",\n \"revision\": \"9ed02180c4329db27d16130eea24e5d6\"\n },\n {\n \"url\": \"resources/dia_fi.txt\",\n \"revision\": \"605274e2a6449913968487a9a0ad5505\"\n },\n {\n \"url\": \"resources/dia_fil.txt\",\n \"revision\": \"e3353f0eb5ddaf5ad306953561d50cf3\"\n },\n {\n \"url\": \"resources/dia_fr.txt\",\n \"revision\": \"373050eb13cde1f069ad2d197e82a9f5\"\n },\n {\n \"url\": \"resources/dia_gl.txt\",\n \"revision\": \"85acf27fb549f05a66cd0bccbab04524\"\n },\n {\n \"url\": \"resources/dia_gu.txt\",\n \"revision\": \"05587cb635ac6a5b0aa66777c227387b\"\n },\n {\n \"url\": \"resources/dia_he.txt\",\n \"revision\": \"a7b4ea7c870bd1f45aa70b441bc1ce9e\"\n },\n {\n \"url\": \"resources/dia_hi.txt\",\n \"revision\": \"e848288aaaa9158b1886e5c147be92b5\"\n },\n {\n \"url\": \"resources/dia_hr.txt\",\n \"revision\": \"77bc8ebda8cdbbb7bafd8b7dfee54c9f\"\n },\n {\n \"url\": \"resources/dia_hu.txt\",\n \"revision\": \"dc7dd3f13ade80dbfb0e1f2e6c8750dd\"\n },\n {\n \"url\": \"resources/dia_id.txt\",\n \"revision\": \"59694e949df4ecdb89403422f6675ee9\"\n },\n {\n \"url\": \"resources/dia_it.txt\",\n \"revision\": \"63be8184ac7f04108800fdf7fe77ff66\"\n },\n {\n \"url\": \"resources/dia_ja.txt\",\n \"revision\": \"673acadfd9f6e528220a81f20b5980ee\"\n },\n {\n \"url\": \"resources/dia_kn.txt\",\n \"revision\": \"bc514c912444d7c47f217ed015b19bb6\"\n },\n {\n \"url\": \"resources/dia_ko.txt\",\n \"revision\": \"eac15371d909ef555d6bf04fda8d0bfd\"\n },\n {\n \"url\": \"resources/dia_lt.txt\",\n \"revision\": \"bd29c2a0fa1ca71bae0bf25ccee9538f\"\n },\n {\n \"url\": \"resources/dia_lv.txt\",\n \"revision\": \"1d658a1ad58fae175559625876d76d55\"\n },\n {\n \"url\": \"resources/dia_ml.txt\",\n \"revision\": \"edd35e23129e88458a009ab84e964c59\"\n },\n {\n \"url\": \"resources/dia_mr.txt\",\n \"revision\": \"692b2c149b22d71fce5ae3fc2e1dbf21\"\n },\n {\n \"url\": \"resources/dia_ms.txt\",\n \"revision\": \"a706881981c2bff3f7eb6a437c7d3156\"\n },\n {\n \"url\": \"resources/dia_my.txt\",\n \"revision\": \"1eec6d0fa87ddf175f3809286bab6e15\"\n },\n {\n \"url\": \"resources/dia_nl.txt\",\n \"revision\": \"23197594ae0341e7acb9d87b74a8da4d\"\n },\n {\n \"url\": \"resources/dia_no.txt\",\n \"revision\": \"7bf121f919817d7a9feecd4f14f98035\"\n },\n {\n \"url\": \"resources/dia_pl.txt\",\n \"revision\": \"a324a5e93fd29e823b0f824f2d8f30ff\"\n },\n {\n \"url\": \"resources/dia_pt-br.txt\",\n \"revision\": \"039c7f80da4efb24e3b8b2ce04feed44\"\n },\n {\n \"url\": \"resources/dia_pt.txt\",\n \"revision\": \"12ffa13225e8794157baefe0b4ae58f1\"\n },\n {\n \"url\": \"resources/dia_ro.txt\",\n \"revision\": \"5ccb64fc757e1e101a3ea96acf34843b\"\n },\n {\n \"url\": \"resources/dia_ru.txt\",\n \"revision\": \"a662eec82e14192450431f2b210238a5\"\n },\n {\n \"url\": \"resources/dia_si.txt\",\n \"revision\": \"1eec6d0fa87ddf175f3809286bab6e15\"\n },\n {\n \"url\": \"resources/dia_sk.txt\",\n \"revision\": \"4ace1ed0f44b5d8e88f1ee274d723db4\"\n },\n {\n \"url\": \"resources/dia_sl.txt\",\n \"revision\": \"fa886367144e5868a71d306ae5e22708\"\n },\n {\n \"url\": \"resources/dia_sr.txt\",\n \"revision\": \"119329a69e4742451082f502202e654c\"\n },\n {\n \"url\": \"resources/dia_sv.txt\",\n \"revision\": \"efa3c1391ed132af3428bfe72ea1f259\"\n },\n {\n \"url\": \"resources/dia_sw.txt\",\n \"revision\": \"1218440d868b3f3b912716e191907dec\"\n },\n {\n \"url\": \"resources/dia_ta.txt\",\n \"revision\": \"f521418537e570a68edf339049f74a97\"\n },\n {\n \"url\": \"resources/dia_te.txt\",\n \"revision\": \"8d56ac0c17ac1ed2a14e49a2d9965f6b\"\n },\n {\n \"url\": \"resources/dia_th.txt\",\n \"revision\": \"5b4ccbea5c345850657b69527e7acc42\"\n },\n {\n \"url\": \"resources/dia_tr.txt\",\n \"revision\": \"fd42e81b0e63ea18a0d889975c96a3e9\"\n },\n {\n \"url\": \"resources/dia_uk.txt\",\n \"revision\": \"4239cf947c20e62716988eadc72ebe02\"\n },\n {\n \"url\": \"resources/dia_vi.txt\",\n \"revision\": \"63f0364e410bfefd299b2c5024280e60\"\n },\n {\n \"url\": \"resources/dia_zh-tw.txt\",\n \"revision\": \"64b2677cc1f15788cc64eeaac14e40f0\"\n },\n {\n \"url\": \"resources/dia_zh.txt\",\n \"revision\": \"290c5ab70cdbb847e89aeb9d497ab6f7\"\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","workbox_precaching_precacheAndRoute","url","revision","ignoreURLParametersMatching"],"mappings":"szBAmBAA,KAAKC,iBAAiB,WAAYC,IAC5BA,EAAMC,MAA4B,iBAApBD,EAAMC,KAAKC,MAC3BJ,KAAKK,iBAYTC,EAAAA,iBAAoC,CAClC,CACEC,IAAO,gBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,qBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,aACPC,SAAY,oCAEd,CACED,IAAO,YACPC,SAAY,oCAEd,CACED,IAAO,8CACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,uCACPC,SAAY,oCAEd,CACED,IAAO,2CACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,2CACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,wCACPC,SAAY,oCAEd,CACED,IAAO,4CACPC,SAAY,oCAEd,CACED,IAAO,6CACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,qCACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,oBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,cACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,kCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,6BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,oBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,qCACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,sCACPC,SAAY,oCAEd,CACED,IAAO,6BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,gBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,kCACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,qCAEb,CACDC,4BAA+B,CAAC"} \ No newline at end of file
+{"version":3,"file":"service-worker.js","sources":["../../../../../../../tmp/d1b37bb29c4b0221f1d5b88de5ab9f43/service-worker.js"],"sourcesContent":["import {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/opt/hostedtoolcache/node/14.19.3/x64/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\": \"1f66afa48ef6f80f175b898e4b32edc3\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"45df373f567b94c1dce78ba61b591983\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"ad302abdede5be524537278bbc457284\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"f0e1d4c09054df2f3ea3793491e9fe08\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"8495f0dfe75795fcfbebea97060e1a17\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"8b5b1cf07fc74454cf354717e9d18534\"\n },\n {\n \"url\": \"open.html\",\n \"revision\": \"d71816b3b00e769fc6019fcdd6921662\"\n },\n {\n \"url\": \"styles/fonts/ArchitectsDaughter-Regular.ttf\",\n \"revision\": \"31c2153c0530e32553b31a49b3d70736\"\n },\n {\n \"url\": \"styles/grapheditor.css\",\n \"revision\": \"4f2c07c4585347249c95cd9158872fb2\"\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/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\": \"ff727fe96a5ef64589af90ef79039ba4\"\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\": \"c96db1790184cb35781f791e8d1dafd9\"\n },\n {\n \"url\": \"connect/jira/fullScreenViewer-1-3-3.html\",\n \"revision\": \"ba7ece2dfb2833b72f97280d7092f25e\"\n },\n {\n \"url\": \"connect/jira/viewerPanel.js\",\n \"revision\": \"7bb9525fbd4504dd6855663605476f56\"\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\": \"e00ad51fc16b87c362d6eaf930ab1fa5\"\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\": \"80d3c5ec6575b41d271eb6f7a6efe40b\"\n },\n {\n \"url\": \"connect/confluence/connectUtils-1-4-8.js\",\n \"revision\": \"c36b256237fa27ea379e30f7d5add825\"\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\": \"d089f12446d443ca01752a5115456fcc\"\n },\n {\n \"url\": \"connect/confluence/viewer-init.js\",\n \"revision\": \"8aa8d02147def4535563bc65632a3e6d\"\n },\n {\n \"url\": \"connect/confluence/viewer.js\",\n \"revision\": \"96cc3ed26b8ae45de1316e8a6684ee7e\"\n },\n {\n \"url\": \"connect/confluence/viewer-1-4-42.html\",\n \"revision\": \"4c58f3a1a4c99b1c4264593b6e05100b\"\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\": \"7e198d0456c3075b4b305da188f09714\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram.html\",\n \"revision\": \"30730e721f86bf3c4f09d1e5e7f42e84\"\n },\n {\n \"url\": \"connect/confluence/macro-editor.js\",\n \"revision\": \"412bc4b87e630b697a40f247c579d398\"\n },\n {\n \"url\": \"math/es5/startup.js\",\n \"revision\": \"dc7130cdc866593293dbb5dde11ceb40\"\n },\n {\n \"url\": \"math/es5/core.js\",\n \"revision\": \"f71bc0bfb7d2ac8261747f97a5d47dd4\"\n },\n {\n \"url\": \"math/es5/output/svg.js\",\n \"revision\": \"4f55967d16197ebb01b86356d8ab179a\"\n },\n {\n \"url\": \"math/es5/input/tex.js\",\n \"revision\": \"5c4f470da2ccb1acf85041fcecd6fff6\"\n },\n {\n \"url\": \"math/es5/input/asciimath.js\",\n \"revision\": \"c2d4076dd8e26d509bfe3a378e71cfa7\"\n },\n {\n \"url\": \"resources/dia.txt\",\n \"revision\": \"1eec6d0fa87ddf175f3809286bab6e15\"\n },\n {\n \"url\": \"resources/dia_am.txt\",\n \"revision\": \"bf7c1b2dabed5ee1d8b2deed806fdf07\"\n },\n {\n \"url\": \"resources/dia_ar.txt\",\n \"revision\": \"585145341744d7b3a507336d927eb09d\"\n },\n {\n \"url\": \"resources/dia_bg.txt\",\n \"revision\": \"e2c26106a8513abc325545de77eae6c1\"\n },\n {\n \"url\": \"resources/dia_bn.txt\",\n \"revision\": \"fe535cc2720ee07d81874383b1b3cb05\"\n },\n {\n \"url\": \"resources/dia_bs.txt\",\n \"revision\": \"6d008ae422df1ccddef6f2936f3aa441\"\n },\n {\n \"url\": \"resources/dia_ca.txt\",\n \"revision\": \"bf689f9192a922cf89adef8b47337726\"\n },\n {\n \"url\": \"resources/dia_cs.txt\",\n \"revision\": \"43ab9819a9e28be02a277e0ae5f5da5d\"\n },\n {\n \"url\": \"resources/dia_da.txt\",\n \"revision\": \"87bc99ab805fcfeac0c877480272b340\"\n },\n {\n \"url\": \"resources/dia_de.txt\",\n \"revision\": \"c2d22ac04a966341899230c7f5cc66e1\"\n },\n {\n \"url\": \"resources/dia_el.txt\",\n \"revision\": \"a5396186b509c364aa601c83f4439eda\"\n },\n {\n \"url\": \"resources/dia_eo.txt\",\n \"revision\": \"f0ef9ae9750d63dcae378d6366032baf\"\n },\n {\n \"url\": \"resources/dia_es.txt\",\n \"revision\": \"f9ee5a18997037eb577e3f684aa96473\"\n },\n {\n \"url\": \"resources/dia_et.txt\",\n \"revision\": \"1c243e9f6a5210335af0104f50a55a8c\"\n },\n {\n \"url\": \"resources/dia_eu.txt\",\n \"revision\": \"357185c3b672294ac1c513b2223a1b3d\"\n },\n {\n \"url\": \"resources/dia_fa.txt\",\n \"revision\": \"9ed02180c4329db27d16130eea24e5d6\"\n },\n {\n \"url\": \"resources/dia_fi.txt\",\n \"revision\": \"605274e2a6449913968487a9a0ad5505\"\n },\n {\n \"url\": \"resources/dia_fil.txt\",\n \"revision\": \"e3353f0eb5ddaf5ad306953561d50cf3\"\n },\n {\n \"url\": \"resources/dia_fr.txt\",\n \"revision\": \"373050eb13cde1f069ad2d197e82a9f5\"\n },\n {\n \"url\": \"resources/dia_gl.txt\",\n \"revision\": \"85acf27fb549f05a66cd0bccbab04524\"\n },\n {\n \"url\": \"resources/dia_gu.txt\",\n \"revision\": \"05587cb635ac6a5b0aa66777c227387b\"\n },\n {\n \"url\": \"resources/dia_he.txt\",\n \"revision\": \"a7b4ea7c870bd1f45aa70b441bc1ce9e\"\n },\n {\n \"url\": \"resources/dia_hi.txt\",\n \"revision\": \"e848288aaaa9158b1886e5c147be92b5\"\n },\n {\n \"url\": \"resources/dia_hr.txt\",\n \"revision\": \"77bc8ebda8cdbbb7bafd8b7dfee54c9f\"\n },\n {\n \"url\": \"resources/dia_hu.txt\",\n \"revision\": \"dc7dd3f13ade80dbfb0e1f2e6c8750dd\"\n },\n {\n \"url\": \"resources/dia_id.txt\",\n \"revision\": \"59694e949df4ecdb89403422f6675ee9\"\n },\n {\n \"url\": \"resources/dia_it.txt\",\n \"revision\": \"63be8184ac7f04108800fdf7fe77ff66\"\n },\n {\n \"url\": \"resources/dia_ja.txt\",\n \"revision\": \"673acadfd9f6e528220a81f20b5980ee\"\n },\n {\n \"url\": \"resources/dia_kn.txt\",\n \"revision\": \"bc514c912444d7c47f217ed015b19bb6\"\n },\n {\n \"url\": \"resources/dia_ko.txt\",\n \"revision\": \"eac15371d909ef555d6bf04fda8d0bfd\"\n },\n {\n \"url\": \"resources/dia_lt.txt\",\n \"revision\": \"bd29c2a0fa1ca71bae0bf25ccee9538f\"\n },\n {\n \"url\": \"resources/dia_lv.txt\",\n \"revision\": \"1d658a1ad58fae175559625876d76d55\"\n },\n {\n \"url\": \"resources/dia_ml.txt\",\n \"revision\": \"edd35e23129e88458a009ab84e964c59\"\n },\n {\n \"url\": \"resources/dia_mr.txt\",\n \"revision\": \"692b2c149b22d71fce5ae3fc2e1dbf21\"\n },\n {\n \"url\": \"resources/dia_ms.txt\",\n \"revision\": \"a706881981c2bff3f7eb6a437c7d3156\"\n },\n {\n \"url\": \"resources/dia_my.txt\",\n \"revision\": \"1eec6d0fa87ddf175f3809286bab6e15\"\n },\n {\n \"url\": \"resources/dia_nl.txt\",\n \"revision\": \"23197594ae0341e7acb9d87b74a8da4d\"\n },\n {\n \"url\": \"resources/dia_no.txt\",\n \"revision\": \"7bf121f919817d7a9feecd4f14f98035\"\n },\n {\n \"url\": \"resources/dia_pl.txt\",\n \"revision\": \"a324a5e93fd29e823b0f824f2d8f30ff\"\n },\n {\n \"url\": \"resources/dia_pt-br.txt\",\n \"revision\": \"039c7f80da4efb24e3b8b2ce04feed44\"\n },\n {\n \"url\": \"resources/dia_pt.txt\",\n \"revision\": \"12ffa13225e8794157baefe0b4ae58f1\"\n },\n {\n \"url\": \"resources/dia_ro.txt\",\n \"revision\": \"5ccb64fc757e1e101a3ea96acf34843b\"\n },\n {\n \"url\": \"resources/dia_ru.txt\",\n \"revision\": \"a662eec82e14192450431f2b210238a5\"\n },\n {\n \"url\": \"resources/dia_si.txt\",\n \"revision\": \"1eec6d0fa87ddf175f3809286bab6e15\"\n },\n {\n \"url\": \"resources/dia_sk.txt\",\n \"revision\": \"4ace1ed0f44b5d8e88f1ee274d723db4\"\n },\n {\n \"url\": \"resources/dia_sl.txt\",\n \"revision\": \"fa886367144e5868a71d306ae5e22708\"\n },\n {\n \"url\": \"resources/dia_sr.txt\",\n \"revision\": \"119329a69e4742451082f502202e654c\"\n },\n {\n \"url\": \"resources/dia_sv.txt\",\n \"revision\": \"efa3c1391ed132af3428bfe72ea1f259\"\n },\n {\n \"url\": \"resources/dia_sw.txt\",\n \"revision\": \"1218440d868b3f3b912716e191907dec\"\n },\n {\n \"url\": \"resources/dia_ta.txt\",\n \"revision\": \"f521418537e570a68edf339049f74a97\"\n },\n {\n \"url\": \"resources/dia_te.txt\",\n \"revision\": \"8d56ac0c17ac1ed2a14e49a2d9965f6b\"\n },\n {\n \"url\": \"resources/dia_th.txt\",\n \"revision\": \"5b4ccbea5c345850657b69527e7acc42\"\n },\n {\n \"url\": \"resources/dia_tr.txt\",\n \"revision\": \"fd42e81b0e63ea18a0d889975c96a3e9\"\n },\n {\n \"url\": \"resources/dia_uk.txt\",\n \"revision\": \"4239cf947c20e62716988eadc72ebe02\"\n },\n {\n \"url\": \"resources/dia_vi.txt\",\n \"revision\": \"63f0364e410bfefd299b2c5024280e60\"\n },\n {\n \"url\": \"resources/dia_zh-tw.txt\",\n \"revision\": \"64b2677cc1f15788cc64eeaac14e40f0\"\n },\n {\n \"url\": \"resources/dia_zh.txt\",\n \"revision\": \"290c5ab70cdbb847e89aeb9d497ab6f7\"\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","workbox_precaching_precacheAndRoute","url","revision","ignoreURLParametersMatching"],"mappings":"szBAmBAA,KAAKC,iBAAiB,WAAYC,IAC5BA,EAAMC,MAA4B,iBAApBD,EAAMC,KAAKC,MAC3BJ,KAAKK,iBAYTC,EAAAA,iBAAoC,CAClC,CACEC,IAAO,gBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,qBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,aACPC,SAAY,oCAEd,CACED,IAAO,YACPC,SAAY,oCAEd,CACED,IAAO,8CACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,uCACPC,SAAY,oCAEd,CACED,IAAO,2CACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,2CACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,wCACPC,SAAY,oCAEd,CACED,IAAO,4CACPC,SAAY,oCAEd,CACED,IAAO,6CACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,qCACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,oBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,cACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,kCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,6BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,oBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,qCACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,sCACPC,SAAY,oCAEd,CACED,IAAO,6BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,gBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,kCACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,qCAEb,CACDC,4BAA+B,CAAC"} \ No newline at end of file